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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) 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.d.ts +5 -3
  271. package/lib/constant/cdn.js +1 -1
  272. package/lib/constant/cli.js +1 -1
  273. package/lib/constant/defaults.js +1 -1
  274. package/lib/constant/domain.js +1 -1
  275. package/lib/constant/env.js +1 -1
  276. package/lib/constant/output.js +1 -1
  277. package/lib/constant/paths.js +1 -1
  278. package/lib/constant/region.js +1 -1
  279. package/lib/constant/risk.js +1 -1
  280. package/lib/constant/routing-profile.js +1 -1
  281. package/lib/context/app-resolver.d.ts +2 -0
  282. package/lib/context/app-resolver.js +1 -1
  283. package/lib/context/auth-resolver.js +1 -1
  284. package/lib/context/config-loader.js +1 -1
  285. package/lib/context.d.ts +2 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.d.ts +13 -17
  288. package/lib/core/alias-resolver.js +1 -1
  289. package/lib/core/api-client.d.ts +6 -0
  290. package/lib/core/api-client.js +1 -1
  291. package/lib/core/bff/config.js +1 -1
  292. package/lib/core/bff/file-system.js +1 -1
  293. package/lib/core/bff/hash.js +1 -1
  294. package/lib/core/bff/hook-directory.js +1 -1
  295. package/lib/core/bff/lock.js +1 -1
  296. package/lib/core/bff/utils.js +1 -1
  297. package/lib/core/cross-db-relation.d.ts +41 -0
  298. package/lib/core/cross-db-relation.js +1 -0
  299. package/lib/core/db-resolver.js +1 -1
  300. package/lib/core/flow-config.js +1 -1
  301. package/lib/core/instant-api-policy/config.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.d.ts +1 -1
  324. package/lib/framework/runner-alias.js +1 -1
  325. package/lib/framework/runner.js +1 -1
  326. package/lib/framework/schema-export.js +1 -1
  327. package/lib/framework/supported-flags.js +1 -1
  328. package/lib/framework/types.js +1 -1
  329. package/lib/generated/build-info.d.ts +4 -4
  330. package/lib/generated/build-info.js +1 -1
  331. package/lib/generated/official-routing.js +1 -1
  332. package/lib/generated/routing-contract.js +1 -1
  333. package/lib/help.js +1 -1
  334. package/lib/postinstall.js +1 -1
  335. package/lib/runtime/confirmation.js +1 -1
  336. package/lib/runtime/event.js +1 -1
  337. package/lib/runtime/index.js +1 -1
  338. package/lib/runtime/queue.js +1 -1
  339. package/lib/runtime/resolve.js +1 -1
  340. package/lib/skills/builtin-skill.js +1 -1
  341. package/lib/skills/main.js +1 -1
  342. package/lib/skills/npx-skills-add.d.ts +0 -10
  343. package/lib/skills/npx-skills-add.js +1 -1
  344. package/lib/skills/skill-presence.js +1 -1
  345. package/lib/telemetry/cli-command-trace.js +1 -1
  346. package/lib/telemetry/cli-help-trace.js +1 -1
  347. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  348. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  349. package/lib/telemetry/send-cli-trace-log.js +1 -1
  350. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  351. package/lib/types/index.d.ts +11 -1
  352. package/lib/utils/ai_config.js +1 -1
  353. package/lib/utils/apply-jq-filter.js +1 -1
  354. package/lib/utils/cdn-config.js +1 -1
  355. package/lib/utils/check-sdk-version.js +1 -1
  356. package/lib/utils/cli-version-check.js +1 -1
  357. package/lib/utils/cli-version-policy.d.ts +19 -0
  358. package/lib/utils/cli-version-policy.js +1 -1
  359. package/lib/utils/config.js +1 -1
  360. package/lib/utils/entity-with-id.js +1 -1
  361. package/lib/utils/file-utils.js +1 -1
  362. package/lib/utils/guides-cdn.js +1 -1
  363. package/lib/utils/http-client.js +1 -1
  364. package/lib/utils/is-non-interactive.js +1 -1
  365. package/lib/utils/logger.js +1 -1
  366. package/lib/utils/params.js +1 -1
  367. package/lib/utils/platform.js +1 -1
  368. package/lib/utils/sleep.js +1 -1
  369. package/lib/utils/template-replacer.js +1 -1
  370. package/lib/utils/update-notice.js +1 -1
  371. package/lib/utils/version.js +1 -1
  372. package/lib/utils/with-active-cookie.js +1 -1
  373. package/lib/utils/write-cli-side-channel.js +1 -1
  374. package/package.json +6 -1
  375. package/skills/rabetbase/SKILL.md +16 -10
  376. package/skills/rabetbase/guides/backend-function.md +5 -1
  377. package/skills/rabetbase/guides/bff-creation-workflow.md +3 -1
  378. package/skills/rabetbase/guides/cross-database-bff.md +70 -0
  379. package/skills/rabetbase/guides/data-api-guidelines.md +35 -33
  380. package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
  381. package/skills/rabetbase/guides/sql-creation-workflow.md +2 -0
  382. package/skills/rabetbase/guides/typescript-sdk.md +9 -0
  383. package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
  384. package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
  385. package/skills/rabetbase/references/rabetbase-config.md +2 -1
  386. package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +64 -0
  387. package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
  388. package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
  389. package/skills/rabetbase.manifest.json +5 -3
  390. package/templates/README.md +46 -6
  391. package/templates/generate-api/model-runtime.ts.tpl +101 -0
  392. package/templates/generate-api/profile-api.ts.tpl +21 -0
  393. package/templates/generate-api/profile-client.ts.tpl +14 -0
@@ -1 +1 @@
1
- const a38_0x391df8=a38_0x4a08;(function(_0x22d0da,_0x54c554){const _0x4550dd=a38_0x4a08,_0x65cb4f=_0x22d0da();while(!![]){try{const _0x36099e=parseInt(_0x4550dd(0xab))/0x1+parseInt(_0x4550dd(0xbe))/0x2*(parseInt(_0x4550dd(0xb0))/0x3)+parseInt(_0x4550dd(0xc2))/0x4*(parseInt(_0x4550dd(0xa6))/0x5)+parseInt(_0x4550dd(0x8d))/0x6+parseInt(_0x4550dd(0xda))/0x7*(-parseInt(_0x4550dd(0xca))/0x8)+-parseInt(_0x4550dd(0x73))/0x9*(parseInt(_0x4550dd(0x75))/0xa)+parseInt(_0x4550dd(0xb2))/0xb*(-parseInt(_0x4550dd(0xa7))/0xc);if(_0x36099e===_0x54c554)break;else _0x65cb4f['push'](_0x65cb4f['shift']());}catch(_0x1af402){_0x65cb4f['push'](_0x65cb4f['shift']());}}}(a38_0x4ef9,0x8d97a));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';function a38_0x4ef9(){const _0x18b57c=['Local\x20function\x20not\x20found:\x20','functions','toISOString','flatMap','runtime\x20cache\x20not\x20needed','117ivvmax','\x20skipped','766430LenQDN','script','str','Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','requires','validation',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','string','Force\x20push\x20ignoring\x20hash\x20protection','Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.','afterScriptId','operationType','runtime\x20cache\x20cleared','apps','write','join','has','attempted','datasetCode','BFF_REMOTE_VERSION_CHANGED','functionNode','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','delete','appCode','2136192voIgBo','before','bff','size','apiDir','name','push','type','/api/management/library/scripts/save','lockFilePath','startsWith','HOOK','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','runtime\x20cache\x20clear\x20failed','every','Push\x20only\x20this\x20script\x20type','ENDPOINT','BFF_REMOTE_VERSION_MISSING','failed','some','bool','beforeScriptId','conflict','remoteId','85ourvEv','9892752voMlLl','version','lockKey','utf8','891496ENMDFr','dataset','alias','Push\x20complete:\x20','\x20conflict','6bPaoQR','scriptsRoot','11LGBWMI','require','\x20failed','HOOK_DATASET_NOT_FOUND:','warnings','scriptType','hash','get','COMMON','values','POST','datasetId','576454iUapdH','cleared','\x20--format\x20compress','filter','219892LiSKAK','description','length','\x22\x20not\x20found\x20after\x20ensureLockScope.','Runtime\x20script\x20cache\x20cleared.','\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','message','update','2862448MDZAJh','test','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','set','existingHooks','No\x20local\x20Backend\x20Function\x20scripts\x20found.','stringify','would_push','force','map','Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20','resolutions','filePath','failures','parse','status','7daAcAu','create','functionName'];a38_0x4ef9=function(){return _0x18b57c;};return a38_0x4ef9();}import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a38_0x391df8(0x8f),'command':a38_0x391df8(0x93),'description':a38_0x391df8(0x78),'risk':a38_0x391df8(0x83),'structuredErrors':!![],'flags':[{'name':a38_0x391df8(0x94),'type':a38_0x391df8(0x7c),'description':a38_0x391df8(0x9d),'enum':[a38_0x391df8(0xba),a38_0x391df8(0x9e),a38_0x391df8(0x98)]},{'name':a38_0x391df8(0x92),'type':a38_0x391df8(0x7c),'description':a38_0x391df8(0x9a)},{'name':a38_0x391df8(0xd2),'type':'boolean','description':a38_0x391df8(0x7d)}],async 'dryRun'(_0x387d59){const _0x3be4f8=a38_0x391df8,_0x1507bb=loadBffProjectConfig(_0x387d59[_0x3be4f8(0x8c)]),_0x24e3ff=await readBffLockFile(_0x1507bb[_0x3be4f8(0x96)]),{appLock:_0x1cec24}=ensureLockScope(_0x24e3ff??createEmptyBffLock(),_0x387d59[_0x3be4f8(0x8c)],_0x1507bb[_0x3be4f8(0xb1)],'push'),_0x45f75d=await getTargetFunctions(_0x1507bb,_0x387d59),_0x3ade05=_0x45f75d[_0x3be4f8(0xa1)](_0x4886c9=>_0x4886c9[_0x3be4f8(0x94)]===_0x3be4f8(0x98))?await scanLocalBffFunctions(_0x1507bb,'HOOK'):_0x45f75d,_0x28464e=await buildHookMaps(_0x387d59[_0x3be4f8(0x8c)],_0x387d59['apiDir'],_0x3ade05,_0x1cec24),_0x154941=_0x387d59['bool']('force'),_0x34bd6c=[];for(const _0x4eba69 of _0x45f75d){const _0x42c717=await computeFileHash(_0x4eba69['filePath']),_0x498942=_0x1cec24[_0x3be4f8(0xde)][_0x4eba69['lockKey']],_0x3f7a7e=!!_0x498942&&_0x498942[_0x3be4f8(0xb8)]===_0x42c717,_0x12cae5=_0x28464e[_0x3be4f8(0xd5)][_0x3be4f8(0xb9)](_0x4eba69[_0x3be4f8(0xa9)]),_0x541674=!!_0x498942?.[_0x3be4f8(0xa5)]&&_0x498942['version']==null&&(_0x154941||!_0x3f7a7e),_0x1f5aa2=_0x541674?missingRemoteVersionConflict(_0x4eba69,_0x498942):undefined,_0x3340cc=_0x28464e[_0x3be4f8(0xd7)][_0x3be4f8(0x85)](_0x4eba69[_0x3be4f8(0xa9)])?_0x3be4f8(0xa0):!_0x154941&&_0x3f7a7e?'unchanged':_0x1f5aa2?_0x3be4f8(0xa4):'would_push';_0x34bd6c[_0x3be4f8(0x93)]({'lockKey':_0x4eba69[_0x3be4f8(0xa9)],'filePath':_0x4eba69['filePath'],'remoteId':_0x498942?.[_0x3be4f8(0xa5)]??null,'mode':_0x498942?.[_0x3be4f8(0xa5)]?_0x3be4f8(0xc9):_0x3be4f8(0xdb),'status':_0x3340cc,..._0x28464e[_0x3be4f8(0xd7)][_0x3be4f8(0x85)](_0x4eba69[_0x3be4f8(0xa9)])?{'error':_0x28464e[_0x3be4f8(0xd7)][_0x3be4f8(0xb9)](_0x4eba69[_0x3be4f8(0xa9)])}:{},..._0x1f5aa2?{'conflict':_0x1f5aa2}:{},..._0x28464e[_0x3be4f8(0xce)]['has'](_0x4eba69[_0x3be4f8(0xa9)])?{'datasetCode':_0x498942?.['datasetCode'],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x4eba69[_0x3be4f8(0xa9)])]}:{},..._0x12cae5?{'alias':_0x12cae5[_0x3be4f8(0xad)]??null,'datasetCode':_0x12cae5[_0x3be4f8(0x87)],'operationType':_0x4eba69[_0x3be4f8(0x80)],'functionNode':_0x4eba69[_0x3be4f8(0x89)],'warnings':_0x12cae5[_0x3be4f8(0xb6)]}:{}});}return{'method':_0x3be4f8(0xbc),'url':_0x3be4f8(0x95),'body':{'appCode':_0x387d59[_0x3be4f8(0x8c)],'force':_0x154941,'files':_0x34bd6c,'cacheClearAtRuntime':_0x34bd6c[_0x3be4f8(0xa1)](_0xb97ffb=>_0xb97ffb[_0x3be4f8(0xd9)]===_0x3be4f8(0xd1)),'cacheClearAtRuntimeTimes':_0x34bd6c['some'](_0x55c59e=>_0x55c59e['status']===_0x3be4f8(0xd1))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x34bd6c[_0x3be4f8(0xc4)]+_0x3be4f8(0xc7)};},async 'execute'(_0x1309d3){const _0x3ea39f=a38_0x391df8,_0x16b532=loadBffProjectConfig(_0x1309d3[_0x3ea39f(0x8c)]),_0x387f34=await readBffLockFile(_0x16b532[_0x3ea39f(0x96)]),{lockData:_0x57e95c,appLock:_0x561115}=ensureLockScope(_0x387f34??createEmptyBffLock(),_0x1309d3['appCode'],_0x16b532[_0x3ea39f(0xb1)],_0x3ea39f(0x93)),_0x5c3fad=await getTargetFunctions(_0x16b532,_0x1309d3);if(_0x5c3fad[_0x3ea39f(0xc4)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x3ea39f(0xcf)};const _0x38f18c=_0x1309d3[_0x3ea39f(0xa2)](_0x3ea39f(0xd2)),_0xa700bf=JSON[_0x3ea39f(0xd8)](JSON[_0x3ea39f(0xd0)](_0x57e95c)),_0x53d80d=_0xa700bf['apps'][_0x1309d3[_0x3ea39f(0x8c)]];if(!_0x53d80d)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x1309d3[_0x3ea39f(0x8c)]+_0x3ea39f(0xc5));const _0x3631a7=_0x5c3fad[_0x3ea39f(0xa1)](_0x5757de=>_0x5757de[_0x3ea39f(0x94)]===_0x3ea39f(0x98))?await scanLocalBffFunctions(_0x16b532,'HOOK'):_0x5c3fad,_0x5b47d0=await buildHookMaps(_0x1309d3['appCode'],_0x1309d3[_0x3ea39f(0x91)],_0x3631a7,_0x53d80d),_0x5ec21c=[],_0x451190=[],_0x2065f3=[],_0x3fcc2b=[];for(const _0x69316 of _0x5c3fad){const _0x2ae4d5=_0x5b47d0[_0x3ea39f(0xd7)][_0x3ea39f(0xb9)](_0x69316[_0x3ea39f(0xa9)]);if(_0x2ae4d5){_0x3fcc2b[_0x3ea39f(0x93)]({'lockKey':_0x69316['lockKey'],'error':_0x2ae4d5});continue;}const _0x347cce=await computeFileHash(_0x69316['filePath']),_0x2d519d=_0x53d80d[_0x3ea39f(0xde)][_0x69316['lockKey']];if(!_0x38f18c&&_0x2d519d&&_0x2d519d[_0x3ea39f(0xb8)]===_0x347cce){_0x451190['push']({'lockKey':_0x69316[_0x3ea39f(0xa9)],'reason':'unchanged'});continue;}if(_0x2d519d?.['remoteId']&&_0x2d519d['version']==null){_0x2065f3[_0x3ea39f(0x93)](missingRemoteVersionConflict(_0x69316,_0x2d519d));continue;}try{await uploadSingleFunction(_0x1309d3[_0x3ea39f(0x8c)],_0x69316,_0x53d80d,_0x5b47d0);const _0x33906d=_0x53d80d[_0x3ea39f(0xde)][_0x69316['lockKey']];_0x5ec21c[_0x3ea39f(0x93)]({'lockKey':_0x69316[_0x3ea39f(0xa9)],'remoteId':_0x33906d?.[_0x3ea39f(0xa5)]??0x0});}catch(_0x2a59e1){const _0x25b551=remoteVersionChangedConflict(_0x69316,_0x2d519d,_0x2a59e1);if(_0x25b551){_0x2065f3[_0x3ea39f(0x93)](_0x25b551);continue;}_0x3fcc2b['push']({'lockKey':_0x69316[_0x3ea39f(0xa9)],'error':_0x2a59e1 instanceof Error?_0x2a59e1[_0x3ea39f(0xc8)]:String(_0x2a59e1)});}}_0x53d80d['lastSync']=new Date()[_0x3ea39f(0x70)](),await writeBffLockFile(_0x16b532['lockFilePath'],_0xa700bf),await waitForUploadedLockEntries(_0x16b532['lockFilePath'],_0x1309d3[_0x3ea39f(0x8c)],_0x5ec21c[_0x3ea39f(0xd3)](_0x45d214=>_0x45d214[_0x3ea39f(0xa9)]));let _0x141eb9={'attempted':![],'cleared':![]};if(_0x5ec21c[_0x3ea39f(0xc4)]>0x0)try{let _0x2da719='';for(let _0x3b97cc=0x0;_0x3b97cc<CACHE_CLEAR_ATTEMPTS;_0x3b97cc+=0x1){_0x2da719=await clearBffScriptCache(),_0x3b97cc<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x141eb9={'attempted':!![],'cleared':!![],'message':_0x2da719||_0x3ea39f(0xc6)};}catch(_0x2f43b2){_0x141eb9={'attempted':!![],'cleared':![],'error':_0x2f43b2 instanceof Error?_0x2f43b2[_0x3ea39f(0xc8)]:String(_0x2f43b2)};}const _0x36a592=_0x3fcc2b['length']===0x0&&(_0x141eb9[_0x3ea39f(0x86)]?_0x141eb9[_0x3ea39f(0xbf)]:!![]),_0x484a8b=_0x36a592,_0x4f63e2=_0x141eb9['attempted']?_0x141eb9['cleared']?_0x3ea39f(0x81):_0x3ea39f(0x9b):_0x3ea39f(0x72);return{'ok':_0x484a8b,'data':{'uploaded':_0x5ec21c,'skipped':_0x451190,'conflicts':_0x2065f3,'failed':_0x3fcc2b,'cacheClear':_0x141eb9,'warnings':[...[..._0x5b47d0[_0x3ea39f(0xd5)][_0x3ea39f(0xbb)]()][_0x3ea39f(0x71)](_0x1524ab=>_0x1524ab[_0x3ea39f(0xb6)]),...[..._0x5b47d0[_0x3ea39f(0xce)]][_0x3ea39f(0xd3)](existingHookWarning)]},'message':formatPushMessage(_0x5ec21c['length'],_0x451190['length'],_0x2065f3[_0x3ea39f(0xc4)],_0x3fcc2b[_0x3ea39f(0xc4)],_0x4f63e2)};}};function missingRemoteVersionConflict(_0x1718ac,_0x18f2a7){const _0x3d04c1=a38_0x391df8;return remoteVersionConflict(_0x1718ac,_0x18f2a7,_0x3d04c1(0x9f),_0x3d04c1(0xcc));}function remoteVersionChangedConflict(_0x3069b7,_0x14dbca,_0x4c08de){const _0x159fe8=a38_0x391df8;if(!_0x14dbca?.[_0x159fe8(0xa5)]||_0x14dbca[_0x159fe8(0xa8)]==null||!isRemoteVersionConflict(_0x4c08de))return undefined;return remoteVersionConflict(_0x3069b7,_0x14dbca,_0x159fe8(0x88),'Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.');}function remoteVersionConflict(_0x39b11b,_0x1dbe18,_0x1cf75a,_0x2445a2){const _0x3acdb0=a38_0x391df8;return{'code':_0x1cf75a,'lockKey':_0x39b11b[_0x3acdb0(0xa9)],'filePath':_0x39b11b[_0x3acdb0(0xd6)],'remoteId':_0x1dbe18['remoteId'],..._0x1dbe18[_0x3acdb0(0xa8)]!=null?{'expectedVersion':_0x1dbe18['version']}:{},'message':_0x2445a2,'nextAction':{'action':'review_remote_and_merge','command':CLI_BIN_NAME+'\x20bff\x20detail\x20--id\x20'+_0x1dbe18[_0x3acdb0(0xa5)]+_0x3acdb0(0xc0),'requiresReview':!![],'message':_0x3acdb0(0x7e)}};}function isRemoteVersionConflict(_0x38dd39){const _0x166f56=a38_0x391df8,_0xcfc6c5=_0x38dd39 instanceof Error?_0x38dd39[_0x166f56(0xc8)]:String(_0x38dd39),_0x47faa3=getPlatformErrorCode(_0x38dd39)??'';return[_0xcfc6c5,_0x47faa3]['some'](_0x22df07=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x166f56(0xcb)](_0x22df07));}function a38_0x4a08(_0x252b35,_0x3b8e96){_0x252b35=_0x252b35-0x70;const _0x4ef9b1=a38_0x4ef9();let _0x4a0804=_0x4ef9b1[_0x252b35];return _0x4a0804;}function formatPushMessage(_0x252e95,_0x446291,_0x262129,_0x21a451,_0x27ab6d){const _0x512bfd=a38_0x391df8,_0x1c8e52=[_0x512bfd(0xae)+_0x252e95+'\x20uploaded',_0x446291+_0x512bfd(0x74)];_0x262129>0x0&&_0x1c8e52[_0x512bfd(0x93)](_0x262129+_0x512bfd(0xaf)+(_0x262129===0x1?'':'s')+'\x20'+(_0x262129===0x1?_0x512bfd(0x79):_0x512bfd(0xb3))+'\x20resolution');if(_0x21a451>0x0)_0x1c8e52[_0x512bfd(0x93)](_0x21a451+_0x512bfd(0xb4));return _0x1c8e52[_0x512bfd(0x93)](_0x27ab6d),_0x1c8e52[_0x512bfd(0x84)](',\x20');}async function getTargetFunctions(_0x184dde,_0x178244){const _0x32c976=a38_0x391df8,_0x28da77=_0x178244[_0x32c976(0x77)](_0x32c976(0x94)),_0x2bc9e1=_0x178244[_0x32c976(0x77)](_0x32c976(0x92)),_0x528987=normalizeBffType(_0x28da77)??undefined;if(_0x2bc9e1&&!_0x528987)throw CliErrors[_0x32c976(0x7a)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x4d1498=await scanLocalBffFunctions(_0x184dde,_0x528987);if(_0x2bc9e1){const _0x343f57=_0x4d1498[_0x32c976(0xc1)](_0x4e97f2=>_0x4e97f2[_0x32c976(0x92)]===_0x2bc9e1);if(_0x343f57[_0x32c976(0xc4)]===0x0)throw CliErrors['validation'](_0x32c976(0xdd)+_0x528987+'/'+_0x2bc9e1);return _0x343f57;}return _0x4d1498;}function existingHookWarning(_0xeb4781){const _0xec1948=a38_0x391df8;return{'code':'EXISTING_HOOK_BINDING_PRESERVED','lockKey':_0xeb4781,'message':_0xec1948(0x8a)};}async function buildHookMaps(_0x263cc3,_0x11663c,_0x532461,_0xa09f01){const _0x28a0e0=a38_0x391df8,_0x40e7af=_0x532461['some'](_0x96aaf=>_0x96aaf[_0x28a0e0(0x94)]===_0x28a0e0(0x98));if(!_0x40e7af)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x10ccfe=loadAliasMap(_0x11663c,undefined,resolveApiFilePath(_0x11663c,_0x263cc3));assertUnambiguousHookAliases(_0x10ccfe);const _0x2329a2=[..._0x10ccfe['map'](_0x1b352e=>[_0x1b352e[_0x28a0e0(0xad)],_0x1b352e[_0x28a0e0(0x87)]]),...trackedHookDirectoryMappings(_0xa09f01)['map'](_0x481ea9=>[_0x481ea9['alias'],_0x481ea9[_0x28a0e0(0x87)]])],_0x3b9ab4=await listDatasets(_0x263cc3);assertUnambiguousHookDirectoryMappings(_0x2329a2['map'](([_0x10b308,_0x13c36b])=>({'alias':_0x10b308,'datasetCode':_0x13c36b})));const _0x6633fc=buildHookDirectoryIndexes(_0x3b9ab4,_0x2329a2),_0x4073dd=new Map(),_0x3aca43=preflightPushHookDirectories(_0x532461,_0xa09f01,_0x6633fc,_0x4073dd),_0x21f7aa=new Set(),_0x23a9e8=_0x532461[_0x28a0e0(0xc1)](_0x275450=>_0x4073dd[_0x28a0e0(0xb9)](_0x275450['lockKey'])?.[_0x28a0e0(0x97)](_0x28a0e0(0xb5))&&_0xa09f01[_0x28a0e0(0xde)][_0x275450['lockKey']]?.[_0x28a0e0(0xa5)]&&_0xa09f01[_0x28a0e0(0xde)][_0x275450[_0x28a0e0(0xa9)]]?.[_0x28a0e0(0x87)]);if(_0x23a9e8[_0x28a0e0(0xc4)]>0x0){let _0x2937c1;try{_0x2937c1=await getBffScriptStatistics(_0x263cc3);}catch(_0x634a95){for(const _0x571e00 of _0x23a9e8)_0x4073dd[_0x28a0e0(0xcd)](_0x571e00[_0x28a0e0(0xa9)],_0x28a0e0(0xd4)+(_0x634a95 instanceof Error?_0x634a95[_0x28a0e0(0xc8)]:String(_0x634a95)));return{'resolutions':_0x3aca43,'failures':_0x4073dd,'existingHooks':_0x21f7aa};}for(const _0x3807ff of _0x23a9e8){const _0x8b0854=_0xa09f01['functions'][_0x3807ff[_0x28a0e0(0xa9)]];try{const _0x1fcaa4=new Set(_0x532461['filter'](_0x2ae0b6=>_0x2ae0b6[_0x28a0e0(0x94)]==='HOOK'&&_0xa09f01[_0x28a0e0(0xde)][_0x2ae0b6[_0x28a0e0(0xa9)]]?.['datasetCode']===_0x8b0854[_0x28a0e0(0x87)])[_0x28a0e0(0xd3)](_0x48f940=>_0x48f940[_0x28a0e0(0xad)]));if(_0x1fcaa4[_0x28a0e0(0x90)]>0x1)throw CliErrors[_0x28a0e0(0x7a)](_0x28a0e0(0x99));const _0x3a6da9=_0x2937c1[_0x28a0e0(0x71)](_0x45d75d=>[{'datasetCode':_0x45d75d[_0x28a0e0(0x87)],'operationType':snakeToCamel(_0x45d75d[_0x28a0e0(0x80)]),'functionNode':_0x28a0e0(0x8e),'id':_0x45d75d[_0x28a0e0(0xa3)]},{'datasetCode':_0x45d75d[_0x28a0e0(0x87)],'operationType':snakeToCamel(_0x45d75d['operationType']),'functionNode':'after','id':_0x45d75d[_0x28a0e0(0x7f)]}])[_0x28a0e0(0xc1)](_0x47651c=>_0x47651c['id']===_0x8b0854[_0x28a0e0(0xa5)]),_0x57e1e3=await getBffScriptInfo(_0x8b0854[_0x28a0e0(0xa5)]);if(_0x57e1e3['id']!==_0x8b0854['remoteId']||_0x57e1e3[_0x28a0e0(0x8c)]!==_0x263cc3||_0x57e1e3[_0x28a0e0(0xb7)]!==_0x28a0e0(0x98)||_0x57e1e3[_0x28a0e0(0xdc)]!==_0x3807ff[_0x28a0e0(0x92)]||_0x8b0854['version']==null||_0x57e1e3['version']!==_0x8b0854['version']||_0x3a6da9[_0x28a0e0(0xc4)]!==0x1||_0x3a6da9[0x0][_0x28a0e0(0x87)]!==_0x8b0854[_0x28a0e0(0x87)]||_0x3a6da9[0x0][_0x28a0e0(0x80)]!==_0x3807ff[_0x28a0e0(0x80)]||_0x3a6da9[0x0][_0x28a0e0(0x89)]!==_0x3807ff[_0x28a0e0(0x89)]||_0x8b0854['operationType']!==_0x3807ff[_0x28a0e0(0x80)]||_0x8b0854[_0x28a0e0(0x89)]!==_0x3807ff[_0x28a0e0(0x89)])throw CliErrors[_0x28a0e0(0x7a)]('Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.');_0x21f7aa['add'](_0x3807ff[_0x28a0e0(0xa9)]),_0x4073dd[_0x28a0e0(0x8b)](_0x3807ff[_0x28a0e0(0xa9)]);}catch(_0x797f15){_0x4073dd[_0x28a0e0(0xcd)](_0x3807ff[_0x28a0e0(0xa9)],_0x797f15 instanceof Error?_0x797f15[_0x28a0e0(0xc8)]:String(_0x797f15));}}}return{'resolutions':_0x3aca43,'failures':_0x4073dd,'existingHooks':_0x21f7aa};}async function uploadSingleFunction(_0x147fc3,_0x3e6536,_0x157722,_0x2497c9){const _0x2c1f6a=a38_0x391df8,_0x43f884=await readFile(_0x3e6536[_0x2c1f6a(0xd6)],_0x2c1f6a(0xaa)),_0x2720f9=await computeFileHash(_0x3e6536[_0x2c1f6a(0xd6)]),_0x43ecf4=_0x157722[_0x2c1f6a(0xde)][_0x3e6536[_0x2c1f6a(0xa9)]];if(_0x43ecf4?.['remoteId']&&_0x43ecf4[_0x2c1f6a(0xa8)]==null)throw CliErrors[_0x2c1f6a(0x7a)](_0x3e6536[_0x2c1f6a(0xa9)]+_0x2c1f6a(0x7b));let _0x3e02e9=extractScriptDescription(_0x43f884);if(!_0x3e02e9&&_0x43ecf4?.[_0x2c1f6a(0xa5)]){const _0x5aa462=await getBffScriptInfo(_0x43ecf4[_0x2c1f6a(0xa5)]);_0x3e02e9=_0x5aa462[_0x2c1f6a(0xc3)]||undefined;}const _0x28f942={'appCode':_0x147fc3,'functionName':_0x3e6536[_0x2c1f6a(0x92)],'scriptType':_0x3e6536[_0x2c1f6a(0x94)],'scriptContent':_0x43f884};if(_0x43ecf4?.[_0x2c1f6a(0xa5)])_0x28f942['id']=_0x43ecf4[_0x2c1f6a(0xa5)];if(_0x43ecf4?.[_0x2c1f6a(0xa8)]!=null)_0x28f942['version']=_0x43ecf4[_0x2c1f6a(0xa8)];if(_0x3e02e9)_0x28f942[_0x2c1f6a(0xc3)]=_0x3e02e9;if(_0x3e6536['type']===_0x2c1f6a(0x98)){const _0x4b2e02=_0x2497c9[_0x2c1f6a(0xd5)][_0x2c1f6a(0xb9)](_0x3e6536[_0x2c1f6a(0xa9)]);if(!_0x4b2e02&&!_0x2497c9['existingHooks'][_0x2c1f6a(0x85)](_0x3e6536['lockKey'])||!_0x3e6536[_0x2c1f6a(0x80)]||!_0x3e6536[_0x2c1f6a(0x89)])throw CliErrors[_0x2c1f6a(0x7a)]('Incomplete\x20HOOK\x20path:\x20'+_0x3e6536[_0x2c1f6a(0xa9)]);_0x4b2e02&&(_0x28f942[_0x2c1f6a(0xbd)]=_0x4b2e02[_0x2c1f6a(0xac)]['id'],_0x28f942[_0x2c1f6a(0x80)]=_0x3e6536['operationType']),_0x28f942['functionNode']=_0x3e6536[_0x2c1f6a(0x89)];}const _0x52c682=await saveBffScript(_0x28f942),_0x5a964a=_0x52c682['id'],_0x37e130=_0x52c682[_0x2c1f6a(0x76)]??await getBffScriptInfo(_0x5a964a),_0x5aa78f={'hash':_0x2720f9,'remoteId':_0x5a964a,'version':_0x37e130['version']};if(_0x3e6536['type']===_0x2c1f6a(0x98)){const _0x1c992a=_0x2497c9['resolutions'][_0x2c1f6a(0xb9)](_0x3e6536['lockKey']);if(!_0x1c992a){_0x157722[_0x2c1f6a(0xde)][_0x3e6536['lockKey']]={..._0x43ecf4,..._0x5aa78f};return;}_0x5aa78f[_0x2c1f6a(0xad)]=_0x1c992a[_0x2c1f6a(0xad)]??_0x43ecf4?.['alias'],_0x5aa78f[_0x2c1f6a(0x87)]=_0x1c992a['datasetCode'],_0x5aa78f[_0x2c1f6a(0x80)]=_0x3e6536[_0x2c1f6a(0x80)],_0x5aa78f['functionNode']=_0x3e6536[_0x2c1f6a(0x89)];}_0x157722[_0x2c1f6a(0xde)][_0x3e6536[_0x2c1f6a(0xa9)]]=_0x5aa78f;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3c3ec6,_0x57dd67,_0x4f1bca){const _0x509ff4=a38_0x391df8;if(_0x4f1bca[_0x509ff4(0xc4)]===0x0)return;for(let _0x321dfe=0x0;_0x321dfe<LOCK_SETTLE_RETRY_COUNT;_0x321dfe+=0x1){const _0x4c66b8=await readBffLockFile(_0x3c3ec6),_0x2a55c5=_0x4c66b8?.[_0x509ff4(0x82)]?.[_0x57dd67]?.['functions']??{},_0x3d45ea=_0x4f1bca[_0x509ff4(0x9c)](_0x2051b3=>!!_0x2a55c5[_0x2051b3]?.[_0x509ff4(0xa5)]);if(_0x3d45ea)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x4f1bca[_0x509ff4(0x84)](',\x20')+'.');}
1
+ function a43_0x3540(_0x4a5abf,_0x4849af){_0x4a5abf=_0x4a5abf-0xb6;const _0x139ce7=a43_0x139c();let _0x35406d=_0x139ce7[_0x4a5abf];return _0x35406d;}const a43_0x46f424=a43_0x3540;(function(_0x554534,_0x4f4dc3){const _0x823e22=a43_0x3540,_0x236e00=_0x554534();while(!![]){try{const _0x96c945=-parseInt(_0x823e22(0x114))/0x1*(parseInt(_0x823e22(0xb8))/0x2)+parseInt(_0x823e22(0xc5))/0x3+-parseInt(_0x823e22(0xbc))/0x4*(-parseInt(_0x823e22(0xbf))/0x5)+-parseInt(_0x823e22(0x103))/0x6+parseInt(_0x823e22(0xde))/0x7*(-parseInt(_0x823e22(0xe2))/0x8)+-parseInt(_0x823e22(0xd7))/0x9*(-parseInt(_0x823e22(0xb6))/0xa)+parseInt(_0x823e22(0x10e))/0xb;if(_0x96c945===_0x4f4dc3)break;else _0x236e00['push'](_0x236e00['shift']());}catch(_0x3a7b50){_0x236e00['push'](_0x236e00['shift']());}}}(a43_0x139c,0x3b711));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,getBffScriptStatistics,getPlatformErrorCode,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{buildHookDirectoryIndexes,assertUnambiguousHookAliases,assertUnambiguousHookDirectoryMappings,preflightPushHookDirectories,trackedHookDirectoryMappings}from'../../core/bff/hook-directory.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription,snakeToCamel}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a43_0x46f424(0xc4),'command':a43_0x46f424(0xd2),'description':'Push\x20local\x20Backend\x20Function\x20scripts\x20to\x20remote','risk':a43_0x46f424(0xf2),'structuredErrors':!![],'flags':[{'name':a43_0x46f424(0xe3),'type':a43_0x46f424(0xfa),'description':a43_0x46f424(0x10d),'enum':[a43_0x46f424(0x111),a43_0x46f424(0xe4),a43_0x46f424(0x108)]},{'name':a43_0x46f424(0xbd),'type':'string','description':a43_0x46f424(0xf9)},{'name':a43_0x46f424(0x110),'type':a43_0x46f424(0xc0),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x2d35c5){const _0xedb10e=a43_0x46f424,_0x4c6a80=loadBffProjectConfig(_0x2d35c5['appCode']),_0x1442ac=await readBffLockFile(_0x4c6a80[_0xedb10e(0xcc)]),{appLock:_0x597987}=ensureLockScope(_0x1442ac??createEmptyBffLock(),_0x2d35c5[_0xedb10e(0x105)],_0x4c6a80[_0xedb10e(0x107)],'push'),_0xd4d683=await getTargetFunctions(_0x4c6a80,_0x2d35c5),_0x2c0aa8=_0xd4d683[_0xedb10e(0xff)](_0x567e05=>_0x567e05[_0xedb10e(0xe3)]===_0xedb10e(0x108))?await scanLocalBffFunctions(_0x4c6a80,'HOOK'):_0xd4d683,_0x34591c=await buildHookMaps(_0x2d35c5[_0xedb10e(0x105)],_0x2d35c5[_0xedb10e(0x119)],_0x2c0aa8,_0x597987,_0x2d35c5['selectedAppName']||_0x2d35c5[_0xedb10e(0xd0)]?.[_0xedb10e(0xd1)]||_0x2d35c5[_0xedb10e(0xd0)]?.[_0xedb10e(0x104)]),_0x28ff27=_0x2d35c5[_0xedb10e(0xba)](_0xedb10e(0x110)),_0xfed4d9=[];for(const _0x332cc3 of _0xd4d683){const _0x17e3ae=await computeFileHash(_0x332cc3[_0xedb10e(0xe9)]),_0x4e1217=_0x597987[_0xedb10e(0x118)][_0x332cc3[_0xedb10e(0x101)]],_0x1bea58=!!_0x4e1217&&_0x4e1217['hash']===_0x17e3ae,_0x3db87e=_0x34591c[_0xedb10e(0xf3)]['get'](_0x332cc3[_0xedb10e(0x101)]),_0x341734=!!_0x4e1217?.[_0xedb10e(0xe7)]&&_0x4e1217[_0xedb10e(0xc2)]==null&&(_0x28ff27||!_0x1bea58),_0x5e321e=_0x341734?missingRemoteVersionConflict(_0x332cc3,_0x4e1217):undefined,_0x2d86f1=_0x34591c[_0xedb10e(0xeb)][_0xedb10e(0xdd)](_0x332cc3[_0xedb10e(0x101)])?_0xedb10e(0xf1):!_0x28ff27&&_0x1bea58?_0xedb10e(0xb9):_0x5e321e?_0xedb10e(0xd5):_0xedb10e(0xcd);_0xfed4d9[_0xedb10e(0xd2)]({'lockKey':_0x332cc3[_0xedb10e(0x101)],'filePath':_0x332cc3['filePath'],'remoteId':_0x4e1217?.[_0xedb10e(0xe7)]??null,'mode':_0x4e1217?.[_0xedb10e(0xe7)]?_0xedb10e(0xfd):_0xedb10e(0x120),'status':_0x2d86f1,..._0x34591c['failures'][_0xedb10e(0xdd)](_0x332cc3[_0xedb10e(0x101)])?{'error':_0x34591c['failures'][_0xedb10e(0xe1)](_0x332cc3[_0xedb10e(0x101)])}:{},..._0x5e321e?{'conflict':_0x5e321e}:{},..._0x34591c[_0xedb10e(0x11b)][_0xedb10e(0xdd)](_0x332cc3[_0xedb10e(0x101)])?{'datasetCode':_0x4e1217?.[_0xedb10e(0xd4)],'bindingPreserved':!![],'warnings':[existingHookWarning(_0x332cc3[_0xedb10e(0x101)])]}:{},..._0x3db87e?{'alias':_0x3db87e[_0xedb10e(0x11a)]??null,'datasetCode':_0x3db87e[_0xedb10e(0xd4)],'operationType':_0x332cc3[_0xedb10e(0xfb)],'functionNode':_0x332cc3['functionNode'],'warnings':_0x3db87e['warnings']}:{}});}return{'method':_0xedb10e(0xcf),'url':_0xedb10e(0x116),'body':{'appCode':_0x2d35c5[_0xedb10e(0x105)],'force':_0x28ff27,'files':_0xfed4d9,'cacheClearAtRuntime':_0xfed4d9[_0xedb10e(0xff)](_0x43675b=>_0x43675b[_0xedb10e(0xda)]===_0xedb10e(0xcd)),'cacheClearAtRuntimeTimes':_0xfed4d9[_0xedb10e(0xff)](_0x595328=>_0x595328['status']==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0xedb10e(0xed)+_0xfed4d9[_0xedb10e(0xbb)]+'\x20local\x20Backend\x20Function\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x21485c){const _0x18e8ca=a43_0x46f424,_0x53303b=loadBffProjectConfig(_0x21485c[_0x18e8ca(0x105)]),_0x2c8c08=await readBffLockFile(_0x53303b[_0x18e8ca(0xcc)]),{lockData:_0x3d0262,appLock:_0x574204}=ensureLockScope(_0x2c8c08??createEmptyBffLock(),_0x21485c[_0x18e8ca(0x105)],_0x53303b[_0x18e8ca(0x107)],_0x18e8ca(0xd2)),_0x2ec3aa=await getTargetFunctions(_0x53303b,_0x21485c);if(_0x2ec3aa['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'conflicts':[],'failed':[]},'message':_0x18e8ca(0xe6)};const _0x3e313f=_0x21485c[_0x18e8ca(0xba)]('force'),_0x3cf97f=JSON[_0x18e8ca(0x11e)](JSON['stringify'](_0x3d0262)),_0x2f97db=_0x3cf97f[_0x18e8ca(0xc8)][_0x21485c[_0x18e8ca(0x105)]];if(!_0x2f97db)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x21485c[_0x18e8ca(0x105)]+_0x18e8ca(0x121));const _0x1692c7=_0x2ec3aa['some'](_0xf2866c=>_0xf2866c[_0x18e8ca(0xe3)]===_0x18e8ca(0x108))?await scanLocalBffFunctions(_0x53303b,'HOOK'):_0x2ec3aa,_0x5b4325=await buildHookMaps(_0x21485c[_0x18e8ca(0x105)],_0x21485c[_0x18e8ca(0x119)],_0x1692c7,_0x2f97db,_0x21485c['selectedAppName']||_0x21485c['mergedCli']?.['currentApp']||_0x21485c['mergedCli']?.['defaultApp']),_0x4dd824=[],_0x16b601=[],_0x398c3f=[],_0x5bf64d=[];for(const _0x353aa4 of _0x2ec3aa){const _0x2a47f7=_0x5b4325[_0x18e8ca(0xeb)][_0x18e8ca(0xe1)](_0x353aa4[_0x18e8ca(0x101)]);if(_0x2a47f7){_0x5bf64d[_0x18e8ca(0xd2)]({'lockKey':_0x353aa4[_0x18e8ca(0x101)],'error':_0x2a47f7});continue;}const _0x54fa81=await computeFileHash(_0x353aa4['filePath']),_0x44858d=_0x2f97db[_0x18e8ca(0x118)][_0x353aa4['lockKey']];if(!_0x3e313f&&_0x44858d&&_0x44858d[_0x18e8ca(0xf7)]===_0x54fa81){_0x16b601[_0x18e8ca(0xd2)]({'lockKey':_0x353aa4['lockKey'],'reason':'unchanged'});continue;}if(_0x44858d?.[_0x18e8ca(0xe7)]&&_0x44858d[_0x18e8ca(0xc2)]==null){_0x398c3f['push'](missingRemoteVersionConflict(_0x353aa4,_0x44858d));continue;}try{await uploadSingleFunction(_0x21485c['appCode'],_0x353aa4,_0x2f97db,_0x5b4325);const _0x76e11f=_0x2f97db[_0x18e8ca(0x118)][_0x353aa4[_0x18e8ca(0x101)]];_0x4dd824[_0x18e8ca(0xd2)]({'lockKey':_0x353aa4[_0x18e8ca(0x101)],'remoteId':_0x76e11f?.[_0x18e8ca(0xe7)]??0x0});}catch(_0x55870d){const _0x2e0853=remoteVersionChangedConflict(_0x353aa4,_0x44858d,_0x55870d);if(_0x2e0853){_0x398c3f[_0x18e8ca(0xd2)](_0x2e0853);continue;}_0x5bf64d[_0x18e8ca(0xd2)]({'lockKey':_0x353aa4[_0x18e8ca(0x101)],'error':_0x55870d instanceof Error?_0x55870d[_0x18e8ca(0x11d)]:String(_0x55870d)});}}_0x2f97db['lastSync']=new Date()[_0x18e8ca(0xea)](),await writeBffLockFile(_0x53303b[_0x18e8ca(0xcc)],_0x3cf97f),await waitForUploadedLockEntries(_0x53303b[_0x18e8ca(0xcc)],_0x21485c[_0x18e8ca(0x105)],_0x4dd824['map'](_0x275dcd=>_0x275dcd[_0x18e8ca(0x101)]));let _0x41938d={'attempted':![],'cleared':![]};if(_0x4dd824[_0x18e8ca(0xbb)]>0x0)try{let _0x2306c3='';for(let _0x2af3a9=0x0;_0x2af3a9<CACHE_CLEAR_ATTEMPTS;_0x2af3a9+=0x1){_0x2306c3=await clearBffScriptCache(),_0x2af3a9<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x41938d={'attempted':!![],'cleared':!![],'message':_0x2306c3||_0x18e8ca(0xd6)};}catch(_0x37aea7){_0x41938d={'attempted':!![],'cleared':![],'error':_0x37aea7 instanceof Error?_0x37aea7[_0x18e8ca(0x11d)]:String(_0x37aea7)};}const _0xe626e2=_0x5bf64d[_0x18e8ca(0xbb)]===0x0&&(_0x41938d[_0x18e8ca(0x112)]?_0x41938d[_0x18e8ca(0xe0)]:!![]),_0x245614=_0xe626e2,_0x14d875=_0x41938d[_0x18e8ca(0x112)]?_0x41938d[_0x18e8ca(0xe0)]?_0x18e8ca(0x109):_0x18e8ca(0xc1):_0x18e8ca(0xf6);return{'ok':_0x245614,'data':{'uploaded':_0x4dd824,'skipped':_0x16b601,'conflicts':_0x398c3f,'failed':_0x5bf64d,'cacheClear':_0x41938d,'warnings':[...[..._0x5b4325[_0x18e8ca(0xf3)]['values']()][_0x18e8ca(0xca)](_0x5f5362=>_0x5f5362[_0x18e8ca(0xdb)]),...[..._0x5b4325[_0x18e8ca(0x11b)]]['map'](existingHookWarning)]},'message':formatPushMessage(_0x4dd824[_0x18e8ca(0xbb)],_0x16b601[_0x18e8ca(0xbb)],_0x398c3f[_0x18e8ca(0xbb)],_0x5bf64d[_0x18e8ca(0xbb)],_0x14d875)};}};function missingRemoteVersionConflict(_0x4e9eb6,_0x2e3189){const _0x2c2ef4=a43_0x46f424;return remoteVersionConflict(_0x4e9eb6,_0x2e3189,'BFF_REMOTE_VERSION_MISSING',_0x2c2ef4(0xef));}function remoteVersionChangedConflict(_0x37b468,_0x5990d5,_0x2e9342){const _0x5dbac3=a43_0x46f424;if(!_0x5990d5?.['remoteId']||_0x5990d5[_0x5dbac3(0xc2)]==null||!isRemoteVersionConflict(_0x2e9342))return undefined;return remoteVersionConflict(_0x37b468,_0x5990d5,'BFF_REMOTE_VERSION_CHANGED',_0x5dbac3(0xe8));}function remoteVersionConflict(_0x3816f1,_0x494e83,_0x449a2d,_0x5e2562){const _0x4d5d3a=a43_0x46f424;return{'code':_0x449a2d,'lockKey':_0x3816f1['lockKey'],'filePath':_0x3816f1[_0x4d5d3a(0xe9)],'remoteId':_0x494e83[_0x4d5d3a(0xe7)],..._0x494e83[_0x4d5d3a(0xc2)]!=null?{'expectedVersion':_0x494e83[_0x4d5d3a(0xc2)]}:{},'message':_0x5e2562,'nextAction':{'action':_0x4d5d3a(0xd8),'command':CLI_BIN_NAME+_0x4d5d3a(0xc3)+_0x494e83[_0x4d5d3a(0xe7)]+_0x4d5d3a(0xee),'requiresReview':!![],'message':'Review\x20the\x20current\x20remote\x20source,\x20merge\x20it\x20into\x20the\x20local\x20script,\x20then\x20retry\x20push.\x20Do\x20not\x20use\x20--force\x20unless\x20you\x20intentionally\x20discard\x20local\x20changes.'}};}function isRemoteVersionConflict(_0x37f34b){const _0x418a76=a43_0x46f424,_0x26c997=_0x37f34b instanceof Error?_0x37f34b[_0x418a76(0x11d)]:String(_0x37f34b),_0x1fdbd6=getPlatformErrorCode(_0x37f34b)??'';return[_0x26c997,_0x1fdbd6][_0x418a76(0xff)](_0x509afd=>/(?:version|optimistic)[\s_-]*(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)|(?:conflict|mismatch|changed|stale|out[\s_-]*of[\s_-]*date)[\s_-]*(?:version|optimistic)/i[_0x418a76(0x102)](_0x509afd));}function formatPushMessage(_0x375af1,_0x1474bc,_0x2d0e7b,_0x148253,_0xa32a64){const _0x16f075=a43_0x46f424,_0x2b2818=['Push\x20complete:\x20'+_0x375af1+_0x16f075(0x10c),_0x1474bc+'\x20skipped'];_0x2d0e7b>0x0&&_0x2b2818[_0x16f075(0xd2)](_0x2d0e7b+'\x20conflict'+(_0x2d0e7b===0x1?'':'s')+'\x20'+(_0x2d0e7b===0x1?'requires':_0x16f075(0xb7))+_0x16f075(0x10f));if(_0x148253>0x0)_0x2b2818['push'](_0x148253+_0x16f075(0x11f));return _0x2b2818[_0x16f075(0xd2)](_0xa32a64),_0x2b2818[_0x16f075(0xf0)](',\x20');}async function getTargetFunctions(_0x4212f4,_0x11cc14){const _0x3bbcf5=a43_0x46f424,_0x1e2a12=_0x11cc14['str'](_0x3bbcf5(0xe3)),_0x317d19=_0x11cc14[_0x3bbcf5(0xf5)](_0x3bbcf5(0xbd)),_0x5d5935=normalizeBffType(_0x1e2a12)??undefined;if(_0x317d19&&!_0x5d5935)throw CliErrors[_0x3bbcf5(0x115)](_0x3bbcf5(0xce));const _0x2b9785=await scanLocalBffFunctions(_0x4212f4,_0x5d5935);if(_0x317d19){const _0x15d74f=_0x2b9785[_0x3bbcf5(0xe5)](_0x3ea541=>_0x3ea541[_0x3bbcf5(0xbd)]===_0x317d19);if(_0x15d74f['length']===0x0)throw CliErrors[_0x3bbcf5(0x115)]('Local\x20function\x20not\x20found:\x20'+_0x5d5935+'/'+_0x317d19);return _0x15d74f;}return _0x2b9785;}function existingHookWarning(_0x171342){const _0x5604ce=a43_0x46f424;return{'code':_0x5604ce(0xc9),'lockKey':_0x171342,'message':_0x5604ce(0xcb)};}function a43_0x139c(){const _0xf3dcf6=['toISOString','failures','set','Would\x20inspect\x20','\x20--format\x20compress','The\x20local\x20sync\x20lock\x20has\x20no\x20remote\x20version\x20for\x20this\x20script.','join','failed','write','resolutions','functionName','str','runtime\x20cache\x20not\x20needed','hash','afterScriptId','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','string','operationType','dataset','update','functionNode','some','datasetId','lockKey','test','435600EzwRVP','defaultApp','appCode','before','scriptsRoot','HOOK','runtime\x20cache\x20cleared','Incomplete\x20HOOK\x20path:\x20',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','\x20uploaded','Push\x20only\x20this\x20script\x20type','7892654oYsGqT','\x20resolution','force','COMMON','attempted','startsWith','378157DjZPEO','validation','/api/management/library/scripts/save','description','functions','apiDir','alias','existingHooks','size','message','parse','\x20failed','create','\x22\x20not\x20found\x20after\x20ensureLockScope.','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','2910eVEcVn','require','2aapdas','unchanged','bool','length','2420JJGOqp','name','map','1010PGpXBx','boolean','runtime\x20cache\x20clear\x20failed','version','\x20bff\x20detail\x20--id\x20','bff','224544UEmBvF','beforeScriptId','add','apps','EXISTING_HOOK_BINDING_PRESERVED','flatMap','Dataset\x20metadata\x20is\x20unavailable;\x20the\x20existing\x20script\x20and\x20binding\x20were\x20verified.\x20Update\x20by\x20script\x20ID\x20without\x20rebinding.','lockFilePath','would_push','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','POST','mergedCli','currentApp','push','Multiple\x20HOOK\x20directories\x20reference\x20the\x20same\x20missing\x20Dataset.\x20Resolve\x20duplicate\x20directories\x20before\x20pushing.','datasetCode','conflict','Runtime\x20script\x20cache\x20cleared.','3951jqgVGh','review_remote_and_merge','HOOK_DATASET_NOT_FOUND:','status','warnings','script','has','7rxgMqM','after','cleared','get','2784728pnomxX','type','ENDPOINT','filter','No\x20local\x20Backend\x20Function\x20scripts\x20found.','remoteId','Remote\x20script\x20version\x20changed\x20since\x20the\x20last\x20pull.','filePath'];a43_0x139c=function(){return _0xf3dcf6;};return a43_0x139c();}async function buildHookMaps(_0x49210d,_0x3bff82,_0x569227,_0x270d6a,_0x168f17){const _0x22ad0b=a43_0x46f424,_0x4aa8ad=_0x569227[_0x22ad0b(0xff)](_0x401ede=>_0x401ede[_0x22ad0b(0xe3)]===_0x22ad0b(0x108));if(!_0x4aa8ad)return{'resolutions':new Map(),'failures':new Map(),'existingHooks':new Set()};const _0x37173e=resolveApiModelSource(_0x3bff82,_0x49210d,_0x168f17),_0x26afbf=loadAliasMap(_0x3bff82,undefined,_0x37173e[_0x22ad0b(0xe9)],_0x37173e['profileName']);assertUnambiguousHookAliases(_0x26afbf);const _0x1ccbcb=[..._0x26afbf[_0x22ad0b(0xbe)](_0x4cb029=>[_0x4cb029[_0x22ad0b(0x11a)],_0x4cb029[_0x22ad0b(0xd4)]]),...trackedHookDirectoryMappings(_0x270d6a)['map'](_0x34afc6=>[_0x34afc6[_0x22ad0b(0x11a)],_0x34afc6[_0x22ad0b(0xd4)]])],_0x38dcf6=await listDatasets(_0x49210d);assertUnambiguousHookDirectoryMappings(_0x1ccbcb[_0x22ad0b(0xbe)](([_0x57999d,_0x5f295f])=>({'alias':_0x57999d,'datasetCode':_0x5f295f})));const _0x491a27=buildHookDirectoryIndexes(_0x38dcf6,_0x1ccbcb),_0x4f9b01=new Map(),_0x4c6346=preflightPushHookDirectories(_0x569227,_0x270d6a,_0x491a27,_0x4f9b01),_0x26ee50=new Set(),_0x11f4b7=_0x569227[_0x22ad0b(0xe5)](_0x2f4cf2=>_0x4f9b01[_0x22ad0b(0xe1)](_0x2f4cf2[_0x22ad0b(0x101)])?.[_0x22ad0b(0x113)](_0x22ad0b(0xd9))&&_0x270d6a[_0x22ad0b(0x118)][_0x2f4cf2['lockKey']]?.[_0x22ad0b(0xe7)]&&_0x270d6a[_0x22ad0b(0x118)][_0x2f4cf2[_0x22ad0b(0x101)]]?.['datasetCode']);if(_0x11f4b7[_0x22ad0b(0xbb)]>0x0){let _0x48c234;try{_0x48c234=await getBffScriptStatistics(_0x49210d);}catch(_0x166599){for(const _0x48fe09 of _0x11f4b7)_0x4f9b01['set'](_0x48fe09[_0x22ad0b(0x101)],'Cannot\x20verify\x20existing\x20HOOK\x20binding:\x20'+(_0x166599 instanceof Error?_0x166599['message']:String(_0x166599)));return{'resolutions':_0x4c6346,'failures':_0x4f9b01,'existingHooks':_0x26ee50};}for(const _0x1cbd67 of _0x11f4b7){const _0x434eb6=_0x270d6a['functions'][_0x1cbd67[_0x22ad0b(0x101)]];try{const _0x40f6d7=new Set(_0x569227[_0x22ad0b(0xe5)](_0x24ffa4=>_0x24ffa4['type']===_0x22ad0b(0x108)&&_0x270d6a['functions'][_0x24ffa4[_0x22ad0b(0x101)]]?.[_0x22ad0b(0xd4)]===_0x434eb6[_0x22ad0b(0xd4)])[_0x22ad0b(0xbe)](_0x179991=>_0x179991['alias']));if(_0x40f6d7[_0x22ad0b(0x11c)]>0x1)throw CliErrors['validation'](_0x22ad0b(0xd3));const _0x430f41=_0x48c234[_0x22ad0b(0xca)](_0x5b29b6=>[{'datasetCode':_0x5b29b6['datasetCode'],'operationType':snakeToCamel(_0x5b29b6[_0x22ad0b(0xfb)]),'functionNode':_0x22ad0b(0x106),'id':_0x5b29b6[_0x22ad0b(0xc6)]},{'datasetCode':_0x5b29b6[_0x22ad0b(0xd4)],'operationType':snakeToCamel(_0x5b29b6[_0x22ad0b(0xfb)]),'functionNode':_0x22ad0b(0xdf),'id':_0x5b29b6[_0x22ad0b(0xf8)]}])[_0x22ad0b(0xe5)](_0x130705=>_0x130705['id']===_0x434eb6[_0x22ad0b(0xe7)]),_0x309833=await getBffScriptInfo(_0x434eb6[_0x22ad0b(0xe7)]);if(_0x309833['id']!==_0x434eb6[_0x22ad0b(0xe7)]||_0x309833[_0x22ad0b(0x105)]!==_0x49210d||_0x309833['scriptType']!==_0x22ad0b(0x108)||_0x309833[_0x22ad0b(0xf4)]!==_0x1cbd67[_0x22ad0b(0xbd)]||_0x434eb6[_0x22ad0b(0xc2)]==null||_0x309833[_0x22ad0b(0xc2)]!==_0x434eb6[_0x22ad0b(0xc2)]||_0x430f41[_0x22ad0b(0xbb)]!==0x1||_0x430f41[0x0][_0x22ad0b(0xd4)]!==_0x434eb6[_0x22ad0b(0xd4)]||_0x430f41[0x0]['operationType']!==_0x1cbd67[_0x22ad0b(0xfb)]||_0x430f41[0x0]['functionNode']!==_0x1cbd67['functionNode']||_0x434eb6[_0x22ad0b(0xfb)]!==_0x1cbd67[_0x22ad0b(0xfb)]||_0x434eb6[_0x22ad0b(0xfe)]!==_0x1cbd67[_0x22ad0b(0xfe)])throw CliErrors['validation']('Existing\x20HOOK\x20identity,\x20version\x20or\x20binding\x20does\x20not\x20match\x20the\x20local\x20lock.\x20Pull\x20and\x20review\x20before\x20pushing.');_0x26ee50[_0x22ad0b(0xc7)](_0x1cbd67[_0x22ad0b(0x101)]),_0x4f9b01['delete'](_0x1cbd67[_0x22ad0b(0x101)]);}catch(_0x4339fd){_0x4f9b01[_0x22ad0b(0xec)](_0x1cbd67[_0x22ad0b(0x101)],_0x4339fd instanceof Error?_0x4339fd[_0x22ad0b(0x11d)]:String(_0x4339fd));}}}return{'resolutions':_0x4c6346,'failures':_0x4f9b01,'existingHooks':_0x26ee50};}async function uploadSingleFunction(_0x1ed03a,_0x1f6256,_0x541dc8,_0x4bc2fc){const _0x56c566=a43_0x46f424,_0xee4312=await readFile(_0x1f6256[_0x56c566(0xe9)],'utf8'),_0x58bc11=await computeFileHash(_0x1f6256[_0x56c566(0xe9)]),_0x1fd6a7=_0x541dc8[_0x56c566(0x118)][_0x1f6256[_0x56c566(0x101)]];if(_0x1fd6a7?.[_0x56c566(0xe7)]&&_0x1fd6a7[_0x56c566(0xc2)]==null)throw CliErrors['validation'](_0x1f6256['lockKey']+_0x56c566(0x10b));let _0x9b0f1f=extractScriptDescription(_0xee4312);if(!_0x9b0f1f&&_0x1fd6a7?.[_0x56c566(0xe7)]){const _0xd9a0ff=await getBffScriptInfo(_0x1fd6a7[_0x56c566(0xe7)]);_0x9b0f1f=_0xd9a0ff[_0x56c566(0x117)]||undefined;}const _0x57ed9e={'appCode':_0x1ed03a,'functionName':_0x1f6256[_0x56c566(0xbd)],'scriptType':_0x1f6256[_0x56c566(0xe3)],'scriptContent':_0xee4312};if(_0x1fd6a7?.[_0x56c566(0xe7)])_0x57ed9e['id']=_0x1fd6a7[_0x56c566(0xe7)];if(_0x1fd6a7?.[_0x56c566(0xc2)]!=null)_0x57ed9e['version']=_0x1fd6a7[_0x56c566(0xc2)];if(_0x9b0f1f)_0x57ed9e[_0x56c566(0x117)]=_0x9b0f1f;if(_0x1f6256[_0x56c566(0xe3)]===_0x56c566(0x108)){const _0x4e616d=_0x4bc2fc['resolutions'][_0x56c566(0xe1)](_0x1f6256[_0x56c566(0x101)]);if(!_0x4e616d&&!_0x4bc2fc[_0x56c566(0x11b)][_0x56c566(0xdd)](_0x1f6256[_0x56c566(0x101)])||!_0x1f6256[_0x56c566(0xfb)]||!_0x1f6256[_0x56c566(0xfe)])throw CliErrors['validation'](_0x56c566(0x10a)+_0x1f6256['lockKey']);_0x4e616d&&(_0x57ed9e[_0x56c566(0x100)]=_0x4e616d[_0x56c566(0xfc)]['id'],_0x57ed9e[_0x56c566(0xfb)]=_0x1f6256[_0x56c566(0xfb)]),_0x57ed9e[_0x56c566(0xfe)]=_0x1f6256['functionNode'];}const _0x3c5622=await saveBffScript(_0x57ed9e),_0x4eed46=_0x3c5622['id'],_0x2ddbe4=_0x3c5622[_0x56c566(0xdc)]??await getBffScriptInfo(_0x4eed46),_0x336aed={'hash':_0x58bc11,'remoteId':_0x4eed46,'version':_0x2ddbe4[_0x56c566(0xc2)]};if(_0x1f6256[_0x56c566(0xe3)]==='HOOK'){const _0x396ec5=_0x4bc2fc[_0x56c566(0xf3)]['get'](_0x1f6256[_0x56c566(0x101)]);if(!_0x396ec5){_0x541dc8[_0x56c566(0x118)][_0x1f6256[_0x56c566(0x101)]]={..._0x1fd6a7,..._0x336aed};return;}_0x336aed[_0x56c566(0x11a)]=_0x396ec5['alias']??_0x1fd6a7?.[_0x56c566(0x11a)],_0x336aed['datasetCode']=_0x396ec5[_0x56c566(0xd4)],_0x336aed[_0x56c566(0xfb)]=_0x1f6256[_0x56c566(0xfb)],_0x336aed[_0x56c566(0xfe)]=_0x1f6256[_0x56c566(0xfe)];}_0x541dc8[_0x56c566(0x118)][_0x1f6256['lockKey']]=_0x336aed;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xd2e9db,_0x2f969a,_0x2592c6){const _0x201c9f=a43_0x46f424;if(_0x2592c6[_0x201c9f(0xbb)]===0x0)return;for(let _0x1e7262=0x0;_0x1e7262<LOCK_SETTLE_RETRY_COUNT;_0x1e7262+=0x1){const _0x5fa590=await readBffLockFile(_0xd2e9db),_0x465066=_0x5fa590?.['apps']?.[_0x2f969a]?.[_0x201c9f(0x118)]??{},_0x27fcc3=_0x2592c6['every'](_0x3c59b4=>!!_0x465066[_0x3c59b4]?.[_0x201c9f(0xe7)]);if(_0x27fcc3)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x201c9f(0x122)+_0x2592c6[_0x201c9f(0xf0)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a39_0x216da6=a39_0x5096;(function(_0x1b8e85,_0x35c72c){const _0x23c0ea=a39_0x5096,_0x14bd2f=_0x1b8e85();while(!![]){try{const _0x2e9e0f=-parseInt(_0x23c0ea(0xae))/0x1+parseInt(_0x23c0ea(0xc1))/0x2*(-parseInt(_0x23c0ea(0xb8))/0x3)+parseInt(_0x23c0ea(0xad))/0x4+-parseInt(_0x23c0ea(0xb0))/0x5*(parseInt(_0x23c0ea(0xa6))/0x6)+-parseInt(_0x23c0ea(0xbe))/0x7*(-parseInt(_0x23c0ea(0xc0))/0x8)+parseInt(_0x23c0ea(0xb4))/0x9*(parseInt(_0x23c0ea(0xb7))/0xa)+-parseInt(_0x23c0ea(0xc2))/0xb*(-parseInt(_0x23c0ea(0xb6))/0xc);if(_0x2e9e0f===_0x35c72c)break;else _0x14bd2f['push'](_0x14bd2f['shift']());}catch(_0x2427b6){_0x14bd2f['push'](_0x14bd2f['shift']());}}}(a39_0x4c5d,0xdce47));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a39_0x5096(_0x2f5df8,_0x4dc258){_0x2f5df8=_0x2f5df8-0xa6;const _0x4c5d58=a39_0x4c5d();let _0x509627=_0x4c5d58[_0x2f5df8];return _0x509627;}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a39_0x216da6(0xb9),'description':a39_0x216da6(0xbd),'risk':'read','flags':[{'name':'remote','type':'boolean','description':a39_0x216da6(0xa8)}],async 'execute'(_0x52faf0){const _0x438496=a39_0x216da6,_0x3e3fc8=loadBffProjectConfig(_0x52faf0['appCode']),_0x27b6c2=await readBffLockFile(_0x3e3fc8['lockFilePath']),{appLock:_0x16ebd3}=ensureLockScope(_0x27b6c2??createEmptyBffLock(),_0x52faf0[_0x438496(0xbf)],_0x3e3fc8[_0x438496(0xab)],_0x438496(0xb9)),_0x2d0e6b=await scanLocalBffFunctions(_0x3e3fc8),_0xa3109=[],_0x54e05b=[],_0x683076=[];for(const _0x4676bd of _0x2d0e6b){const _0x2dd086=await computeFileHash(_0x4676bd[_0x438496(0xb1)]),_0xe12950=_0x16ebd3['functions'][_0x4676bd['lockKey']];if(!_0xe12950)_0xa3109['push'](_0x4676bd[_0x438496(0xaf)]);else _0xe12950['hash']!==_0x2dd086?_0x54e05b[_0x438496(0xa7)](_0x4676bd[_0x438496(0xaf)]):_0x683076['push'](_0x4676bd['lockKey']);}const _0x2272d4=[];if(_0x52faf0['bool']('remote')){const _0x112c84=loadAliasMap(_0x52faf0[_0x438496(0xba)],undefined,resolveApiFilePath(_0x52faf0[_0x438496(0xba)],_0x52faf0[_0x438496(0xbf)])),_0x49f374=new Map(_0x112c84['map'](_0x496d3a=>[_0x496d3a[_0x438496(0xbc)],_0x496d3a[_0x438496(0xbb)]])),[_0x9c1468,_0x2714ca]=await Promise[_0x438496(0xac)]([listBffScripts(_0x52faf0[_0x438496(0xbf)]),getBffScriptStatistics(_0x52faf0[_0x438496(0xbf)])]),_0x208d35=createHookLocationMap(_0x2714ca),_0x504bf9=new Set(_0x2d0e6b['map'](_0x1ed965=>_0x1ed965[_0x438496(0xaf)]));for(const _0x52fe16 of _0x9c1468){const _0x2e0e85=resolveRemoteScriptTarget(_0x3e3fc8,_0x52fe16,_0x208d35,_0x16ebd3['functions'],_0x49f374);_0x2e0e85&&!_0x504bf9[_0x438496(0xaa)](_0x2e0e85['lockKey'])&&_0x2272d4[_0x438496(0xa7)](_0x2e0e85[_0x438496(0xaf)]);}}const _0x2dc4f6=_0xa3109[_0x438496(0xa9)]===0x0&&_0x54e05b[_0x438496(0xa9)]===0x0&&_0x2272d4[_0x438496(0xa9)]===0x0;return{'ok':!![],'data':{'added':_0xa3109,'modified':_0x54e05b,'unchanged':_0x683076,'remoteOnly':_0x2272d4},'message':_0x2dc4f6?_0x438496(0xb5):_0xa3109['length']+_0x438496(0xb2)+_0x54e05b[_0x438496(0xa9)]+'\x20modified,\x20'+_0x683076['length']+'\x20unchanged'+(_0x2272d4['length']>0x0?',\x20'+_0x2272d4[_0x438496(0xa9)]+_0x438496(0xb3):'')};}};function a39_0x4c5d(){const _0x517691=['6337644QplhnO','19182aHZRwQ','lockKey','375385QGQOaP','filePath','\x20added,\x20','\x20remote-only','16299AkCxdY','All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.','349344lgmmxh','1910lrWJHW','4541559sXpcnH','status','apiDir','alias','datasetCode','Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','34041zKAMhE','appCode','56XdNqCz','2XEfdyg','264RLtpvc','18EmDyra','push','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','length','has','scriptsRoot','all'];a39_0x4c5d=function(){return _0x517691;};return a39_0x4c5d();}
1
+ const a44_0x399d5b=a44_0x1001;(function(_0x3de135,_0x5141e7){const _0x512d0f=a44_0x1001,_0x59489e=_0x3de135();while(!![]){try{const _0x3f2c68=parseInt(_0x512d0f(0x195))/0x1+-parseInt(_0x512d0f(0x17a))/0x2*(parseInt(_0x512d0f(0x17e))/0x3)+-parseInt(_0x512d0f(0x18d))/0x4*(parseInt(_0x512d0f(0x194))/0x5)+-parseInt(_0x512d0f(0x18b))/0x6+parseInt(_0x512d0f(0x187))/0x7+parseInt(_0x512d0f(0x178))/0x8*(parseInt(_0x512d0f(0x192))/0x9)+-parseInt(_0x512d0f(0x181))/0xa*(-parseInt(_0x512d0f(0x182))/0xb);if(_0x3f2c68===_0x5141e7)break;else _0x59489e['push'](_0x59489e['shift']());}catch(_0x1b189b){_0x59489e['push'](_0x59489e['shift']());}}}(a44_0x2492,0xab5ef));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiModelSource}from'../../api/model-source.js';function a44_0x1001(_0x5aba25,_0xeae75c){_0x5aba25=_0x5aba25-0x177;const _0x249205=a44_0x2492();let _0x100123=_0x249205[_0x5aba25];return _0x100123;}import{loadBffProjectConfig}from'../../core/bff/config.js';function a44_0x2492(){const _0xfdc47b=['apiDir','push','4830dIwTyB','27775OtiErW','defaultApp','filePath','lockKey','map','4837063ZOIiII','appCode','functions','mergedCli','7359786TSMCYH','hash','352LNgbvv','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','\x20unchanged','remote','bool','2205AQiqxY','all','8845gKmrUh','570116HuyQsc','profileName','selectedAppName','bff','3080vHNdxe','lockFilePath','89234OnjWsX','currentApp','status','length','33GKzMcN'];a44_0x2492=function(){return _0xfdc47b;};return a44_0x2492();}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a44_0x399d5b(0x177),'command':a44_0x399d5b(0x17c),'description':'Check\x20local\x20Backend\x20Function\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':a44_0x399d5b(0x190),'type':'boolean','description':a44_0x399d5b(0x18e)}],async 'execute'(_0x127c39){const _0x5bb6d7=a44_0x399d5b,_0x26f3af=loadBffProjectConfig(_0x127c39['appCode']),_0x3a9a6b=await readBffLockFile(_0x26f3af[_0x5bb6d7(0x179)]),{appLock:_0x2c3c8a}=ensureLockScope(_0x3a9a6b??createEmptyBffLock(),_0x127c39[_0x5bb6d7(0x188)],_0x26f3af['scriptsRoot'],_0x5bb6d7(0x17c)),_0x1c6304=await scanLocalBffFunctions(_0x26f3af),_0x3e3479=[],_0x4cc925=[],_0x404977=[];for(const _0x1620b6 of _0x1c6304){const _0x35f897=await computeFileHash(_0x1620b6[_0x5bb6d7(0x184)]),_0x198d3e=_0x2c3c8a[_0x5bb6d7(0x189)][_0x1620b6[_0x5bb6d7(0x185)]];if(!_0x198d3e)_0x3e3479['push'](_0x1620b6[_0x5bb6d7(0x185)]);else _0x198d3e[_0x5bb6d7(0x18c)]!==_0x35f897?_0x4cc925[_0x5bb6d7(0x180)](_0x1620b6[_0x5bb6d7(0x185)]):_0x404977[_0x5bb6d7(0x180)](_0x1620b6['lockKey']);}const _0x29e5c8=[];if(_0x127c39[_0x5bb6d7(0x191)](_0x5bb6d7(0x190))){const _0x16cb27=resolveApiModelSource(_0x127c39[_0x5bb6d7(0x17f)],_0x127c39[_0x5bb6d7(0x188)],_0x127c39[_0x5bb6d7(0x197)]||_0x127c39[_0x5bb6d7(0x18a)]?.[_0x5bb6d7(0x17b)]||_0x127c39[_0x5bb6d7(0x18a)]?.[_0x5bb6d7(0x183)]),_0x51dc7e=loadAliasMap(_0x127c39[_0x5bb6d7(0x17f)],undefined,_0x16cb27['filePath'],_0x16cb27[_0x5bb6d7(0x196)]),_0x39f8fb=new Map(_0x51dc7e[_0x5bb6d7(0x186)](_0x460278=>[_0x460278['datasetCode'],_0x460278['alias']])),[_0x582abd,_0x1b006f]=await Promise[_0x5bb6d7(0x193)]([listBffScripts(_0x127c39['appCode']),getBffScriptStatistics(_0x127c39['appCode'])]),_0x154664=createHookLocationMap(_0x1b006f),_0x21f6a3=new Set(_0x1c6304[_0x5bb6d7(0x186)](_0x545726=>_0x545726[_0x5bb6d7(0x185)]));for(const _0x467d9c of _0x582abd){const _0xb55310=resolveRemoteScriptTarget(_0x26f3af,_0x467d9c,_0x154664,_0x2c3c8a[_0x5bb6d7(0x189)],_0x39f8fb);_0xb55310&&!_0x21f6a3['has'](_0xb55310[_0x5bb6d7(0x185)])&&_0x29e5c8[_0x5bb6d7(0x180)](_0xb55310[_0x5bb6d7(0x185)]);}}const _0x489ab8=_0x3e3479[_0x5bb6d7(0x17d)]===0x0&&_0x4cc925[_0x5bb6d7(0x17d)]===0x0&&_0x29e5c8[_0x5bb6d7(0x17d)]===0x0;return{'ok':!![],'data':{'added':_0x3e3479,'modified':_0x4cc925,'unchanged':_0x404977,'remoteOnly':_0x29e5c8},'message':_0x489ab8?'All\x20Backend\x20Function\x20scripts\x20are\x20in\x20sync.':_0x3e3479[_0x5bb6d7(0x17d)]+'\x20added,\x20'+_0x4cc925[_0x5bb6d7(0x17d)]+'\x20modified,\x20'+_0x404977[_0x5bb6d7(0x17d)]+_0x5bb6d7(0x18f)+(_0x29e5c8[_0x5bb6d7(0x17d)]>0x0?',\x20'+_0x29e5c8[_0x5bb6d7(0x17d)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a40_0xacb3dd=a40_0x252c;function a40_0x2a23(){const _0x95b42f=['191201KEJhuL','4462645hMVKsq','cli-skill-install','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','\x20is\x20already\x20current','inherit','apiError',']:\x20','info','\x20installed','read','3jdDSZm','nonInteractive','1852398kWbwMo','\x20at\x20','175340WMFopE','skillVersion','4559232JOOTvW','Built-in\x20Skill\x20install\x20failed\x20[','CLI\x20Built-in\x20Skill\x20','576nhgAtR','\x20via\x20skills@latest','2366154ISKPNa','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','193779EVPGJu','pipe','installedPath','code','changed'];a40_0x2a23=function(){return _0x95b42f;};return a40_0x2a23();}(function(_0x412e39,_0x25c955){const _0x36d4fe=a40_0x252c,_0x39bf87=_0x412e39();while(!![]){try{const _0x3713e3=parseInt(_0x36d4fe(0x142))/0x1+parseInt(_0x36d4fe(0x132))/0x2+-parseInt(_0x36d4fe(0x130))/0x3*(-parseInt(_0x36d4fe(0x134))/0x4)+-parseInt(_0x36d4fe(0x143))/0x5+-parseInt(_0x36d4fe(0x136))/0x6+-parseInt(_0x36d4fe(0x13b))/0x7+-parseInt(_0x36d4fe(0x139))/0x8*(-parseInt(_0x36d4fe(0x13d))/0x9);if(_0x3713e3===_0x25c955)break;else _0x39bf87['push'](_0x39bf87['shift']());}catch(_0x5b25aa){_0x39bf87['push'](_0x39bf87['shift']());}}}(a40_0x2a23,0xb0094));function a40_0x252c(_0x7b80c7,_0x5601bf){_0x7b80c7=_0x7b80c7-0x12e;const _0x2a236a=a40_0x2a23();let _0x252cd2=_0x2a236a[_0x7b80c7];return _0x252cd2;}import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':'install','description':a40_0xacb3dd(0x145),'risk':a40_0xacb3dd(0x12f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3c1af0){const _0x5dfe05=a40_0xacb3dd;logger['setLogPath'](process['cwd']()),logger[_0x5dfe05(0x14a)](_0x5dfe05(0x144),_0x5dfe05(0x13c));const _0x44f421=installBuiltinSkill({'stdio':_0x3c1af0[_0x5dfe05(0x131)]?_0x5dfe05(0x13e):_0x5dfe05(0x147)});if(!_0x44f421['ok'])throw CliErrors[_0x5dfe05(0x148)](_0x5dfe05(0x137)+_0x44f421[_0x5dfe05(0x140)]+_0x5dfe05(0x149)+(_0x44f421['error']||'unknown'),'Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20'+_0x44f421['repairCommand']);return console['log'](_0x44f421[_0x5dfe05(0x141)]?'CLI\x20Built-in\x20Skill\x20'+_0x44f421[_0x5dfe05(0x135)]+_0x5dfe05(0x12e)+(_0x44f421['installedPath']?_0x5dfe05(0x133)+_0x44f421[_0x5dfe05(0x13f)]:_0x5dfe05(0x13a)):_0x5dfe05(0x138)+_0x44f421['skillVersion']+_0x5dfe05(0x146)+(_0x44f421[_0x5dfe05(0x13f)]?'\x20at\x20'+_0x44f421[_0x5dfe05(0x13f)]:'')),{'ok':!![]};}}];
1
+ function a45_0x2bc0(){const _0xd9317b=['2PPXQbp','apiError','inherit','cwd','72darFkE','info','6vLYLMI','code','cli-skill-install','2052465nTTYNA','error','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','502407YFAghe','\x20installed','7248950DKGeeN','\x20is\x20already\x20current','Built-in\x20Skill\x20install\x20failed\x20[','408839LnyzEv','\x20via\x20skills@latest','unknown','500372bBvduX','2438772RZfEPR','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','skillVersion','setLogPath','installedPath','log',']:\x20','CLI\x20Built-in\x20Skill\x20','nonInteractive','\x20at\x20','1574193CITiIW'];a45_0x2bc0=function(){return _0xd9317b;};return a45_0x2bc0();}(function(_0x39544f,_0x4a6677){const _0x3ae654=a45_0x5508,_0x4ed5bf=_0x39544f();while(!![]){try{const _0x1a320c=-parseInt(_0x3ae654(0x17b))/0x1*(-parseInt(_0x3ae654(0x18a))/0x2)+parseInt(_0x3ae654(0x189))/0x3+-parseInt(_0x3ae654(0x17e))/0x4+parseInt(_0x3ae654(0x193))/0x5*(-parseInt(_0x3ae654(0x190))/0x6)+-parseInt(_0x3ae654(0x17f))/0x7+parseInt(_0x3ae654(0x18e))/0x8*(-parseInt(_0x3ae654(0x176))/0x9)+parseInt(_0x3ae654(0x178))/0xa;if(_0x1a320c===_0x4a6677)break;else _0x4ed5bf['push'](_0x4ed5bf['shift']());}catch(_0x1618a0){_0x4ed5bf['push'](_0x4ed5bf['shift']());}}}(a45_0x2bc0,0x426cc));import{CliErrors}from'../../errors.js';function a45_0x5508(_0x3709a2,_0x523990){_0x3709a2=_0x3709a2-0x175;const _0x2bc01e=a45_0x2bc0();let _0x5508a6=_0x2bc01e[_0x3709a2];return _0x5508a6;}import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':'install','description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x49b25d){const _0x22649c=a45_0x5508;logger[_0x22649c(0x182)](process[_0x22649c(0x18d)]()),logger[_0x22649c(0x18f)](_0x22649c(0x192),_0x22649c(0x180));const _0x37284e=installBuiltinSkill({'stdio':_0x49b25d[_0x22649c(0x187)]?'pipe':_0x22649c(0x18c)});if(!_0x37284e['ok'])throw CliErrors[_0x22649c(0x18b)](_0x22649c(0x17a)+_0x37284e[_0x22649c(0x191)]+_0x22649c(0x185)+(_0x37284e[_0x22649c(0x194)]||_0x22649c(0x17d)),_0x22649c(0x175)+_0x37284e['repairCommand']);return console[_0x22649c(0x184)](_0x37284e['changed']?_0x22649c(0x186)+_0x37284e[_0x22649c(0x181)]+_0x22649c(0x177)+(_0x37284e[_0x22649c(0x183)]?_0x22649c(0x188)+_0x37284e[_0x22649c(0x183)]:_0x22649c(0x17c)):'CLI\x20Built-in\x20Skill\x20'+_0x37284e['skillVersion']+_0x22649c(0x179)+(_0x37284e['installedPath']?_0x22649c(0x188)+_0x37284e[_0x22649c(0x183)]:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a41_0x13f6a6=a41_0x595f;function a41_0x595f(_0x5beb32,_0xd843b7){_0x5beb32=_0x5beb32-0x64;const _0x11147c=a41_0x1114();let _0x595fe9=_0x11147c[_0x5beb32];return _0x595fe9;}(function(_0x4ffcce,_0x4bd1fe){const _0x5b1c73=a41_0x595f,_0x533cd4=_0x4ffcce();while(!![]){try{const _0x2d78b3=-parseInt(_0x5b1c73(0x65))/0x1*(-parseInt(_0x5b1c73(0x90))/0x2)+-parseInt(_0x5b1c73(0x7c))/0x3+-parseInt(_0x5b1c73(0xb3))/0x4+parseInt(_0x5b1c73(0x88))/0x5+parseInt(_0x5b1c73(0x8c))/0x6+-parseInt(_0x5b1c73(0x68))/0x7+-parseInt(_0x5b1c73(0x6d))/0x8*(-parseInt(_0x5b1c73(0x6a))/0x9);if(_0x2d78b3===_0x4bd1fe)break;else _0x533cd4['push'](_0x533cd4['shift']());}catch(_0x461923){_0x533cd4['push'](_0x533cd4['shift']());}}}(a41_0x1114,0xb8f15));import a41_0x38cd94 from'chalk';import a41_0x501352 from'ora';function a41_0x1114(){const _0xe6603a=['yellow','bool','1GXRtMQ','beta','bun','4372830PqURtS','code','9pJQkIG',',\x20then\x20verify\x20with:\x20','Invalid\x20version:\x20','12112312lbyjYV','slice','install','apiError','start','length','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20install\x20-g\x20','Install\x20a\x20specific\x20CLI\x20version','log','\x20doctor','...','Updated\x20to\x20v','validation','3331428HjxSWW','toLowerCase','\x20\x20CLI\x20Built-in\x20Skill\x20','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','execPath','\x20\x20Try\x20manually:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','update','str','message','current','boolean','237675UYPBDk','object','Already\x20on\x20requested\x20version\x20(v','green','8253360SqRkHX','Current\x20version:\x20','info','Current\x20version\x20v','904746DaDDjG','trim','fail','valid',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','repairCommand','succeed','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','unknown','latest','Run:\x20','timeout','json','Checking\x20CLI\x20Built-in\x20Skill...','skillVersion','Update\x20failed','red','fromEntries','Update\x20available:\x20','version','CLI\x20updated\x20to\x20v','Beta\x20version:\x20','npm','\x20→\x20','map','error','gray','pipe','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','\x20is\x20up\x20to\x20date.','state','source','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','expected\x20','Checking\x20for\x20updates...','3587264QdWiXb','Version\x20comparison\x20failed'];a41_0x1114=function(){return _0xe6603a;};return a41_0x1114();}import a41_0x382b3c from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x4279f9=a41_0x595f;return GIT_COMMIT!==_0x4279f9(0x98)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x4279f9(0x6e)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3a1ce0=a41_0x595f,_0x1d772a=process[_0x3a1ce0(0x80)][_0x3a1ce0(0x7d)]();if(_0x1d772a['includes'](_0x3a1ce0(0x67)))return _0x3a1ce0(0x67);return _0x3a1ce0(0xa6);}const updateFlags=[{'name':'beta','type':a41_0x13f6a6(0x87),'description':a41_0x13f6a6(0x74),'default':![]},{'name':a41_0x13f6a6(0xa3),'type':'string','description':a41_0x13f6a6(0x76)}];function getRequestedVersion(_0x5c27c1){const _0x374f84=a41_0x13f6a6;return _0x5c27c1[_0x374f84(0x84)](_0x374f84(0xa3))[_0x374f84(0x91)]();}async function validateUpdateFlags(_0x4a21ad){const _0x2fa454=a41_0x13f6a6,_0x129a70=_0x4a21ad[_0x2fa454(0x64)]('beta'),_0x4dcd75=getRequestedVersion(_0x4a21ad);if(_0x129a70&&_0x4dcd75)throw CliErrors[_0x2fa454(0x7b)](_0x2fa454(0x7f),_0x2fa454(0x73));if(_0x4dcd75&&!a41_0x382b3c[_0x2fa454(0x93)](_0x4dcd75))throw CliErrors[_0x2fa454(0x7b)](_0x2fa454(0x6c)+_0x4dcd75,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x58de07=a41_0x13f6a6;try{const _0x3e59cf=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x58de07(0x9b)](0x2710)});if(!_0x3e59cf['ok'])return null;const _0x3811b2=await _0x3e59cf[_0x58de07(0x9c)]();if(!_0x3811b2||typeof _0x3811b2!==_0x58de07(0x89))return null;return Object[_0x58de07(0xa1)](Object['entries'](_0x3811b2)['filter'](([,_0x457855])=>typeof _0x457855==='string'&&_0x457855[_0x58de07(0x91)]()[_0x58de07(0x72)]>0x0)[_0x58de07(0xa8)](([_0x5f514c,_0xec8c82])=>[_0x5f514c,String(_0xec8c82)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x35e0dc){const _0x6374f=await fetchNpmDistTags();return _0x6374f?.[_0x35e0dc]??null;}async function fetchLatestVersion(){const _0x21d936=a41_0x13f6a6;return fetchNpmDistTagVersion(_0x21d936(0x99));}async function resolveTargetVersion(_0x2a7385){const _0x105108=a41_0x13f6a6,_0x3585ca=getRequestedVersion(_0x2a7385);if(_0x3585ca)return{'version':_0x3585ca,'source':_0x105108(0xa3)};if(_0x2a7385['bool']('beta')){const _0xd7417b=await fetchNpmDistTagVersion('beta');if(!_0xd7417b)return null;return{'version':_0xd7417b,'source':'beta'};}const _0x3b1369=await fetchLatestVersion();if(!_0x3b1369)return null;return{'version':_0x3b1369,'source':_0x105108(0x99)};}function shouldInstallTarget(_0x3a3868,_0x5e4e7c){const _0x4e6605=a41_0x13f6a6;if(_0x5e4e7c[_0x4e6605(0xaf)]==='version'||_0x5e4e7c[_0x4e6605(0xaf)]===_0x4e6605(0x66))return!a41_0x382b3c['eq'](_0x3a3868,_0x5e4e7c['version']);return a41_0x382b3c['lt'](_0x3a3868,_0x5e4e7c[_0x4e6605(0xa3)]);}function getInstallPlanLabel(_0x3cf037,_0x20c343){const _0x36d350=a41_0x13f6a6;switch(_0x20c343[_0x36d350(0xaf)]){case _0x36d350(0x66):return _0x36d350(0xa5)+a41_0x38cd94[_0x36d350(0xb5)](_0x3cf037)+'\x20→\x20'+a41_0x38cd94['green'](_0x20c343['version']);case'version':return'Requested\x20version:\x20'+a41_0x38cd94[_0x36d350(0xb5)](_0x3cf037)+_0x36d350(0xa7)+a41_0x38cd94[_0x36d350(0x8b)](_0x20c343[_0x36d350(0xa3)]);case _0x36d350(0x99):default:return _0x36d350(0xa2)+a41_0x38cd94[_0x36d350(0xb5)](_0x3cf037)+_0x36d350(0xa7)+a41_0x38cd94[_0x36d350(0x8b)](_0x20c343[_0x36d350(0xa3)]);}}function repairCurrentBuiltinSkill(){const _0xff0499=a41_0x13f6a6;console[_0xff0499(0x77)](a41_0x38cd94[_0xff0499(0xaa)](_0xff0499(0x9d)));const _0x35c217=installBuiltinSkill();if(_0x35c217['ok']){console[_0xff0499(0x77)](a41_0x38cd94['gray'](_0xff0499(0x7e)+_0x35c217[_0xff0499(0x9e)]+_0xff0499(0xad)));return;}throw CliErrors[_0xff0499(0x70)](_0xff0499(0x97)+_0x35c217[_0xff0499(0x69)]+']:\x20'+(_0x35c217[_0xff0499(0xa9)]||_0xff0499(0x98)),_0xff0499(0x9a)+_0x35c217[_0xff0499(0x95)]+_0xff0499(0x6b)+CLI_BIN_NAME+_0xff0499(0x78));}function verifyUpdatedBuiltinSkill(_0x47761e){const _0x2823cd=a41_0x13f6a6,_0x2f6210=inspectInstalledBuiltinSkillVersion(_0x47761e);if(_0x2f6210[_0x2823cd(0xae)]===_0x2823cd(0x86)){console[_0x2823cd(0x77)](a41_0x38cd94[_0x2823cd(0xaa)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x47761e+_0x2823cd(0xad)));return;}const _0x400ce6=_0x2f6210[_0x2823cd(0x9e)]?_0x2823cd(0xb1)+_0x47761e+',\x20found\x20'+_0x2f6210[_0x2823cd(0x9e)]:_0x2823cd(0xb1)+_0x47761e+',\x20state\x20'+_0x2f6210[_0x2823cd(0xae)];throw CliErrors['apiError'](_0x2823cd(0xa4)+_0x47761e+_0x2823cd(0x94)+_0x400ce6,'Run:\x20'+_0x2f6210[_0x2823cd(0x95)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x2823cd(0x78));}async function execute(_0x42cb84){const _0x4d5517=a41_0x13f6a6;await validateUpdateFlags(_0x42cb84);const _0x339b4a=getCurrentVersion();console[_0x4d5517(0x77)](_0x4d5517(0x8d)+_0x339b4a);const _0x3fbb7c=a41_0x501352(_0x4d5517(0xb2))[_0x4d5517(0x71)](),_0x3b65d8=await resolveTargetVersion(_0x42cb84);if(!_0x3b65d8){const _0x103083=_0x42cb84['bool'](_0x4d5517(0x66))?_0x4d5517(0xb0):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x3fbb7c[_0x4d5517(0x92)](_0x103083),console[_0x4d5517(0x77)](a41_0x38cd94[_0x4d5517(0xaa)](_0x4d5517(0x82)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x103083};}const _0x4a2a3a=a41_0x382b3c[_0x4d5517(0x93)](VERSION),_0x415964=a41_0x382b3c[_0x4d5517(0x93)](_0x3b65d8[_0x4d5517(0xa3)]);if(!_0x4a2a3a||!_0x415964)return _0x3fbb7c[_0x4d5517(0x92)](_0x4d5517(0xb4)),{'ok':![],'message':_0x4d5517(0xb4)};if(!shouldInstallTarget(_0x4a2a3a,_0x3b65d8)){const _0x453f69=_0x3b65d8[_0x4d5517(0xaf)]===_0x4d5517(0xa3)?_0x4d5517(0x8a)+_0x3b65d8[_0x4d5517(0xa3)]+')':a41_0x382b3c['gt'](_0x4a2a3a,_0x415964)?_0x4d5517(0x8f)+_0x339b4a+'\x20is\x20newer\x20than\x20npm\x20latest\x20v'+_0x3b65d8[_0x4d5517(0xa3)]:'Already\x20up\x20to\x20date\x20(v'+_0x3b65d8[_0x4d5517(0xa3)]+')';return _0x3fbb7c[_0x4d5517(0x96)](_0x453f69),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x3fbb7c[_0x4d5517(0x8e)](getInstallPlanLabel(_0x339b4a,_0x3b65d8));const _0x45566c=detectPackageManager(),_0x1fbf36=_0x45566c===_0x4d5517(0xa6)?resolveNpmBin(_0x4d5517(0xa6)):_0x45566c,_0x205729=a41_0x501352('Updating\x20via\x20'+_0x45566c+_0x4d5517(0x79))[_0x4d5517(0x71)]();try{await execa(_0x1fbf36,[_0x4d5517(0x6f),'-g',NPM_PACKAGE_NAME+'@'+_0x3b65d8[_0x4d5517(0xa3)]],{'stdio':_0x4d5517(0xab)}),_0x205729['succeed'](_0x4d5517(0x7a)+_0x3b65d8['version']),console[_0x4d5517(0x77)](a41_0x38cd94[_0x4d5517(0xaa)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.'));}catch(_0x571a67){return _0x205729['fail'](_0x4d5517(0x9f)),console['error'](a41_0x38cd94[_0x4d5517(0xa0)]('\x20\x20'+_0x571a67[_0x4d5517(0x85)])),console['log'](a41_0x38cd94['gray'](_0x4d5517(0x81)+_0x45566c+_0x4d5517(0x75)+NPM_PACKAGE_NAME+'@'+_0x3b65d8['version'])),{'ok':![],'message':_0x571a67['message']};}return verifyUpdatedBuiltinSkill(_0x3b65d8[_0x4d5517(0xa3)]),{'ok':!![]};}export const updateDefinition={'service':a41_0x13f6a6(0x83),'command':'run','description':a41_0x13f6a6(0xac),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a46_0x4fee38=a46_0x4358;(function(_0x98d0b8,_0x1d705c){const _0x31de58=a46_0x4358,_0x524e68=_0x98d0b8();while(!![]){try{const _0x18ef82=parseInt(_0x31de58(0x76))/0x1+-parseInt(_0x31de58(0x9e))/0x2*(-parseInt(_0x31de58(0xab))/0x3)+-parseInt(_0x31de58(0x73))/0x4+parseInt(_0x31de58(0x92))/0x5*(-parseInt(_0x31de58(0x80))/0x6)+parseInt(_0x31de58(0xbe))/0x7*(-parseInt(_0x31de58(0x86))/0x8)+parseInt(_0x31de58(0xaa))/0x9+parseInt(_0x31de58(0x74))/0xa;if(_0x18ef82===_0x1d705c)break;else _0x524e68['push'](_0x524e68['shift']());}catch(_0x115338){_0x524e68['push'](_0x524e68['shift']());}}}(a46_0x3aaf,0xc6644));import a46_0x55c765 from'chalk';import a46_0x454c29 from'ora';import a46_0xefa40d from'semver';import{execa}from'execa';function a46_0x3aaf(){const _0x5cf8af=['info','Current\x20version\x20v','includes','timeout','bool','source','trim','start','length','state','validation','6KIIyZK','red',',\x20but\x20Built-in\x20Skill\x20verification\x20failed:\x20','filter','str','object','https://registry.npmjs.org/-/package/','repairCommand','Already\x20on\x20requested\x20version\x20(v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Checking\x20for\x20updates...','fromEntries','2917503mdfdcP','1492035EqJrfu','CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','fail','Update\x20failed','execPath','version','message',',\x20state\x20','\x20is\x20newer\x20than\x20npm\x20latest\x20v','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','CLI\x20updated\x20to\x20v','pipe','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','map','\x20doctor','toLowerCase','error','Install\x20a\x20specific\x20CLI\x20version','\x20install\x20-g\x20','7lMWcmc','Updating\x20via\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Update\x20available:\x20',']:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20','beta','Invalid\x20version:\x20','latest','Beta\x20version:\x20','bun','...','1102652FpWEZe','11600660rdiyki','unknown','816323RJOVSg','code','succeed','log','Updated\x20to\x20v',',\x20found\x20','Run:\x20','yellow','string','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','7231674nDSeZk','npm','json','Already\x20up\x20to\x20date\x20(v','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','expected\x20','11992296oQWBak','Current\x20version:\x20','\x20→\x20','gray','\x20is\x20up\x20to\x20date.','slice','Checking\x20CLI\x20Built-in\x20Skill...','skillVersion','\x20\x20Try\x20manually:\x20','valid','apiError','green','5vKrRGF'];a46_0x3aaf=function(){return _0x5cf8af;};return a46_0x3aaf();}import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x2068ed=a46_0x4358;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2068ed(0x8b)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xd8cef6=a46_0x4358,_0x2b284a=process[_0xd8cef6(0xaf)][_0xd8cef6(0xba)]();if(_0x2b284a[_0xd8cef6(0x95)](_0xd8cef6(0x71)))return _0xd8cef6(0x71);return _0xd8cef6(0x81);}const updateFlags=[{'name':a46_0x4fee38(0xc4),'type':'boolean','description':a46_0x4fee38(0xb7),'default':![]},{'name':'version','type':a46_0x4fee38(0x7e),'description':a46_0x4fee38(0xbc)}];function getRequestedVersion(_0x3deab1){const _0x3455fb=a46_0x4fee38;return _0x3deab1[_0x3455fb(0xa2)](_0x3455fb(0xb0))[_0x3455fb(0x99)]();}async function validateUpdateFlags(_0x194f4b){const _0x11e3c9=a46_0x4fee38,_0x38276c=_0x194f4b[_0x11e3c9(0x97)](_0x11e3c9(0xc4)),_0x53ba78=getRequestedVersion(_0x194f4b);if(_0x38276c&&_0x53ba78)throw CliErrors[_0x11e3c9(0x9d)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x53ba78&&!a46_0xefa40d[_0x11e3c9(0x8f)](_0x53ba78))throw CliErrors['validation'](_0x11e3c9(0xc5)+_0x53ba78,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x30706b=a46_0x4fee38;try{const _0x56a69f=await fetch(_0x30706b(0xa4)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x30706b(0x96)](0x2710)});if(!_0x56a69f['ok'])return null;const _0x371a43=await _0x56a69f[_0x30706b(0x82)]();if(!_0x371a43||typeof _0x371a43!==_0x30706b(0xa3))return null;return Object[_0x30706b(0xa9)](Object['entries'](_0x371a43)[_0x30706b(0xa1)](([,_0x3c5632])=>typeof _0x3c5632===_0x30706b(0x7e)&&_0x3c5632['trim']()[_0x30706b(0x9b)]>0x0)[_0x30706b(0xb8)](([_0x2db22e,_0x12df36])=>[_0x2db22e,String(_0x12df36)[_0x30706b(0x99)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x260e10){const _0x569d3e=await fetchNpmDistTags();return _0x569d3e?.[_0x260e10]??null;}async function fetchLatestVersion(){const _0x569d10=a46_0x4fee38;return fetchNpmDistTagVersion(_0x569d10(0xc6));}async function resolveTargetVersion(_0x4b1dee){const _0xb807a5=a46_0x4fee38,_0x2b53e7=getRequestedVersion(_0x4b1dee);if(_0x2b53e7)return{'version':_0x2b53e7,'source':_0xb807a5(0xb0)};if(_0x4b1dee[_0xb807a5(0x97)](_0xb807a5(0xc4))){const _0x493f0d=await fetchNpmDistTagVersion('beta');if(!_0x493f0d)return null;return{'version':_0x493f0d,'source':_0xb807a5(0xc4)};}const _0x5e6b7e=await fetchLatestVersion();if(!_0x5e6b7e)return null;return{'version':_0x5e6b7e,'source':_0xb807a5(0xc6)};}function a46_0x4358(_0x2ed78f,_0x53f3b6){_0x2ed78f=_0x2ed78f-0x71;const _0x3aaf82=a46_0x3aaf();let _0x435830=_0x3aaf82[_0x2ed78f];return _0x435830;}function shouldInstallTarget(_0x38edec,_0x232e21){const _0x243cde=a46_0x4fee38;if(_0x232e21['source']==='version'||_0x232e21[_0x243cde(0x98)]==='beta')return!a46_0xefa40d['eq'](_0x38edec,_0x232e21[_0x243cde(0xb0)]);return a46_0xefa40d['lt'](_0x38edec,_0x232e21[_0x243cde(0xb0)]);}function getInstallPlanLabel(_0x158827,_0xc7826e){const _0x125528=a46_0x4fee38;switch(_0xc7826e[_0x125528(0x98)]){case _0x125528(0xc4):return _0x125528(0xc7)+a46_0x55c765[_0x125528(0x7d)](_0x158827)+_0x125528(0x88)+a46_0x55c765[_0x125528(0x91)](_0xc7826e['version']);case _0x125528(0xb0):return'Requested\x20version:\x20'+a46_0x55c765[_0x125528(0x7d)](_0x158827)+'\x20→\x20'+a46_0x55c765['green'](_0xc7826e['version']);case _0x125528(0xc6):default:return _0x125528(0xc1)+a46_0x55c765[_0x125528(0x7d)](_0x158827)+_0x125528(0x88)+a46_0x55c765[_0x125528(0x91)](_0xc7826e['version']);}}function repairCurrentBuiltinSkill(){const _0x2ac9e1=a46_0x4fee38;console[_0x2ac9e1(0x79)](a46_0x55c765['gray'](_0x2ac9e1(0x8c)));const _0x2d1e7d=installBuiltinSkill();if(_0x2d1e7d['ok']){console[_0x2ac9e1(0x79)](a46_0x55c765[_0x2ac9e1(0x89)](_0x2ac9e1(0xc3)+_0x2d1e7d[_0x2ac9e1(0x8d)]+'\x20is\x20up\x20to\x20date.'));return;}throw CliErrors[_0x2ac9e1(0x90)](_0x2ac9e1(0xac)+_0x2d1e7d[_0x2ac9e1(0x77)]+_0x2ac9e1(0xc2)+(_0x2d1e7d[_0x2ac9e1(0xbb)]||_0x2ac9e1(0x75)),_0x2ac9e1(0x7c)+_0x2d1e7d['repairCommand']+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x2ac9e1(0xb9));}function verifyUpdatedBuiltinSkill(_0x51e3fb){const _0x72f48e=a46_0x4fee38,_0x1ddd12=inspectInstalledBuiltinSkillVersion(_0x51e3fb);if(_0x1ddd12[_0x72f48e(0x9c)]==='current'){console['log'](a46_0x55c765[_0x72f48e(0x89)](_0x72f48e(0xc3)+_0x51e3fb+_0x72f48e(0x8a)));return;}const _0x4f1196=_0x1ddd12[_0x72f48e(0x8d)]?_0x72f48e(0x85)+_0x51e3fb+_0x72f48e(0x7b)+_0x1ddd12[_0x72f48e(0x8d)]:_0x72f48e(0x85)+_0x51e3fb+_0x72f48e(0xb2)+_0x1ddd12[_0x72f48e(0x9c)];throw CliErrors['apiError'](_0x72f48e(0xb5)+_0x51e3fb+_0x72f48e(0xa0)+_0x4f1196,_0x72f48e(0x7c)+_0x1ddd12[_0x72f48e(0xa5)]+',\x20then\x20verify\x20with:\x20'+CLI_BIN_NAME+_0x72f48e(0xb9));}async function execute(_0x92c60e){const _0x1f3298=a46_0x4fee38;await validateUpdateFlags(_0x92c60e);const _0x267039=getCurrentVersion();console[_0x1f3298(0x79)](_0x1f3298(0x87)+_0x267039);const _0x28a2c1=a46_0x454c29(_0x1f3298(0xa8))['start'](),_0x2d4a99=await resolveTargetVersion(_0x92c60e);if(!_0x2d4a99){const _0x6113ff=_0x92c60e[_0x1f3298(0x97)](_0x1f3298(0xc4))?_0x1f3298(0xb4):_0x1f3298(0xc0);return _0x28a2c1['fail'](_0x6113ff),console[_0x1f3298(0x79)](a46_0x55c765['gray'](_0x1f3298(0x7f)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x6113ff};}const _0x45fccf=a46_0xefa40d[_0x1f3298(0x8f)](VERSION),_0x15fab2=a46_0xefa40d[_0x1f3298(0x8f)](_0x2d4a99[_0x1f3298(0xb0)]);if(!_0x45fccf||!_0x15fab2)return _0x28a2c1[_0x1f3298(0xad)]('Version\x20comparison\x20failed'),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x45fccf,_0x2d4a99)){const _0x2c8503=_0x2d4a99['source']==='version'?_0x1f3298(0xa6)+_0x2d4a99[_0x1f3298(0xb0)]+')':a46_0xefa40d['gt'](_0x45fccf,_0x15fab2)?_0x1f3298(0x94)+_0x267039+_0x1f3298(0xb3)+_0x2d4a99[_0x1f3298(0xb0)]:_0x1f3298(0x83)+_0x2d4a99[_0x1f3298(0xb0)]+')';return _0x28a2c1[_0x1f3298(0x78)](_0x2c8503),repairCurrentBuiltinSkill(),{'ok':!![]};}_0x28a2c1[_0x1f3298(0x93)](getInstallPlanLabel(_0x267039,_0x2d4a99));const _0x4394ba=detectPackageManager(),_0x2d144d=_0x4394ba==='npm'?resolveNpmBin(_0x1f3298(0x81)):_0x4394ba,_0x7c0aad=a46_0x454c29(_0x1f3298(0xbf)+_0x4394ba+_0x1f3298(0x72))[_0x1f3298(0x9a)]();try{await execa(_0x2d144d,['install','-g',NPM_PACKAGE_NAME+'@'+_0x2d4a99[_0x1f3298(0xb0)]],{'stdio':_0x1f3298(0xb6)}),_0x7c0aad[_0x1f3298(0x78)](_0x1f3298(0x7a)+_0x2d4a99[_0x1f3298(0xb0)]),console[_0x1f3298(0x79)](a46_0x55c765['gray'](_0x1f3298(0xa7)));}catch(_0x2130be){return _0x7c0aad[_0x1f3298(0xad)](_0x1f3298(0xae)),console[_0x1f3298(0xbb)](a46_0x55c765[_0x1f3298(0x9f)]('\x20\x20'+_0x2130be[_0x1f3298(0xb1)])),console[_0x1f3298(0x79)](a46_0x55c765[_0x1f3298(0x89)](_0x1f3298(0x8e)+_0x4394ba+_0x1f3298(0xbd)+NPM_PACKAGE_NAME+'@'+_0x2d4a99[_0x1f3298(0xb0)])),{'ok':![],'message':_0x2130be[_0x1f3298(0xb1)]};}return verifyUpdatedBuiltinSkill(_0x2d4a99[_0x1f3298(0xb0)]),{'ok':!![]};}export const updateDefinition={'service':'update','command':'run','description':a46_0x4fee38(0x84),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x4305fd,_0x50e119){const _0x36678f=a42_0x3ad1,_0x3f06c3=_0x4305fd();while(!![]){try{const _0xa708d9=parseInt(_0x36678f(0x1d7))/0x1+-parseInt(_0x36678f(0x1d5))/0x2*(-parseInt(_0x36678f(0x1d6))/0x3)+parseInt(_0x36678f(0x1d9))/0x4+-parseInt(_0x36678f(0x1da))/0x5+parseInt(_0x36678f(0x1d8))/0x6+parseInt(_0x36678f(0x1dc))/0x7*(parseInt(_0x36678f(0x1db))/0x8)+-parseInt(_0x36678f(0x1dd))/0x9;if(_0xa708d9===_0x50e119)break;else _0x3f06c3['push'](_0x3f06c3['shift']());}catch(_0x95f2cb){_0x3f06c3['push'](_0x3f06c3['shift']());}}}(a42_0x5471,0xbd048));function a42_0x3ad1(_0x54e108,_0x348f1d){_0x54e108=_0x54e108-0x1d5;const _0x5471e6=a42_0x5471();let _0x3ad1f2=_0x5471e6[_0x54e108];return _0x3ad1f2;}import{codegenSdk}from'../../commands/codegen/sdk.js';function a42_0x5471(){const _0x1c5c08=['21682XttIoR','354JEkEgt','920864Pfuofa','7628880cFZLeK','3766456Qeanzj','2246330Tpnfsr','10359672NypPFb','7kdXdXe','40362057CPlWzz'];a42_0x5471=function(){return _0x1c5c08;};return a42_0x5471();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x22bac2,_0x2f4db2){const _0x307304=a47_0x2331,_0x493f35=_0x22bac2();while(!![]){try{const _0x36c125=-parseInt(_0x307304(0x13f))/0x1*(parseInt(_0x307304(0x13a))/0x2)+parseInt(_0x307304(0x138))/0x3*(-parseInt(_0x307304(0x13c))/0x4)+parseInt(_0x307304(0x13b))/0x5+-parseInt(_0x307304(0x13d))/0x6+-parseInt(_0x307304(0x13e))/0x7*(-parseInt(_0x307304(0x140))/0x8)+parseInt(_0x307304(0x139))/0x9+parseInt(_0x307304(0x137))/0xa;if(_0x36c125===_0x2f4db2)break;else _0x493f35['push'](_0x493f35['shift']());}catch(_0x1857e5){_0x493f35['push'](_0x493f35['shift']());}}}(a47_0x304b,0x7a8a7));function a47_0x304b(){const _0x376969=['1358014OMSAvC','222419Piawki','16rUiiXb','6654210gVUODh','55353fBKkMQ','6915555aunTAp','4GHkyII','3623280GKdCgo','160URFXnM','5170026DLwOIu'];a47_0x304b=function(){return _0x376969;};return a47_0x304b();}import{codegenSdk}from'../../commands/codegen/sdk.js';function a47_0x2331(_0x71e089,_0x1cf842){_0x71e089=_0x71e089-0x137;const _0x304b46=a47_0x304b();let _0x2331db=_0x304b46[_0x71e089];return _0x2331db;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a43_0x2e7562=a43_0x3b94;(function(_0xfc7b64,_0x496a9b){const _0x37370a=a43_0x3b94,_0x58b027=_0xfc7b64();while(!![]){try{const _0x1856cc=-parseInt(_0x37370a(0x19c))/0x1+-parseInt(_0x37370a(0x19e))/0x2+parseInt(_0x37370a(0x1a7))/0x3+-parseInt(_0x37370a(0x1a6))/0x4+-parseInt(_0x37370a(0x196))/0x5+-parseInt(_0x37370a(0x1a5))/0x6+parseInt(_0x37370a(0x1a1))/0x7*(parseInt(_0x37370a(0x1a0))/0x8);if(_0x1856cc===_0x496a9b)break;else _0x58b027['push'](_0x58b027['shift']());}catch(_0xcf219c){_0x58b027['push'](_0x58b027['shift']());}}}(a43_0xd8f7,0xb59a2));function a43_0x3b94(_0x43b6bb,_0xabd8c2){_0x43b6bb=_0x43b6bb-0x195;const _0xd8f792=a43_0xd8f7();let _0x3b94e5=_0xd8f792[_0x43b6bb];return _0x3b94e5;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a43_0xd8f7(){const _0x3ddd0e=['alias','bool','6084654cmgHdR','5613156WtBuVl','2518554rXqANC','skip-imports','1663030uppCKA','code','name','Omit\x20import\x20statements\x20from\x20generated\x20code','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','string','1248139PBhCiZ','str','87084zWOLkQ','read','424NirJhZ','521171tWyubk','operation'];a43_0xd8f7=function(){return _0x3ddd0e;};return a43_0xd8f7();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a43_0x2e7562(0x19f),'flags':[CODE_FLAG_OPTIONAL,{'name':a43_0x2e7562(0x1a3),'type':a43_0x2e7562(0x19b),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a43_0x2e7562(0x1a2),'type':a43_0x2e7562(0x19b),'required':!![],'description':a43_0x2e7562(0x19a)},{'name':a43_0x2e7562(0x195),'type':'boolean','description':a43_0x2e7562(0x199)}],async 'execute'(_0x3e23ed){const _0x5dc275=a43_0x2e7562,{dataset:_0x1f9032,operation:_0x1c81ce}=await getOperationDetail(_0x3e23ed['appCode'],_0x3e23ed['str'](_0x5dc275(0x197)),_0x3e23ed[_0x5dc275(0x19d)]('operation')),_0x341d7c=generateSdkCode(_0x1f9032,_0x1c81ce,{'includeImports':!_0x3e23ed[_0x5dc275(0x1a4)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x1f9032[_0x5dc275(0x198)],'code':_0x1f9032[_0x5dc275(0x197)],'tableName':_0x1f9032['tableName']},'operation':_0x3e23ed[_0x5dc275(0x19d)]('operation'),'code':_0x341d7c}};}};
1
+ const a48_0x26900a=a48_0x4bd1;(function(_0x254155,_0x503319){const _0x300228=a48_0x4bd1,_0x1c0c4f=_0x254155();while(!![]){try{const _0x54ec0b=parseInt(_0x300228(0x1af))/0x1+parseInt(_0x300228(0x1c0))/0x2+parseInt(_0x300228(0x1ae))/0x3+parseInt(_0x300228(0x1b0))/0x4+parseInt(_0x300228(0x1b5))/0x5+-parseInt(_0x300228(0x1bc))/0x6*(parseInt(_0x300228(0x1ba))/0x7)+-parseInt(_0x300228(0x1c3))/0x8;if(_0x54ec0b===_0x503319)break;else _0x1c0c4f['push'](_0x1c0c4f['shift']());}catch(_0x58de3d){_0x1c0c4f['push'](_0x1c0c4f['shift']());}}}(a48_0x206c,0x892c2));function a48_0x4bd1(_0x2b0ff9,_0xfcdebd){_0x2b0ff9=_0x2b0ff9-0x1ae;const _0x206c54=a48_0x206c();let _0x4bd11e=_0x206c54[_0x2b0ff9];return _0x4bd11e;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a48_0x26900a(0x1b1),'command':a48_0x26900a(0x1c4),'description':a48_0x26900a(0x1b8),'risk':a48_0x26900a(0x1b4),'flags':[CODE_FLAG_OPTIONAL,{'name':a48_0x26900a(0x1b9),'type':a48_0x26900a(0x1b2),'description':a48_0x26900a(0x1be)},{'name':a48_0x26900a(0x1c2),'type':'string','required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a48_0x26900a(0x1bb),'type':'boolean','description':a48_0x26900a(0x1b6)}],async 'execute'(_0x108117){const _0x42c74b=a48_0x26900a,{dataset:_0x2aca23,operation:_0xdf7b3}=await getOperationDetail(_0x108117[_0x42c74b(0x1bf)],_0x108117['str'](_0x42c74b(0x1b3)),_0x108117[_0x42c74b(0x1b7)]('operation')),_0x344036=generateSdkCode(_0x2aca23,_0xdf7b3,{'includeImports':!_0x108117[_0x42c74b(0x1c1)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x2aca23['name'],'code':_0x2aca23['code'],'tableName':_0x2aca23[_0x42c74b(0x1bd)]},'operation':_0x108117[_0x42c74b(0x1b7)](_0x42c74b(0x1c2)),'code':_0x344036}};}};function a48_0x206c(){const _0x5aee05=['alias','707jTTlDJ','skip-imports','39966kejMjJ','tableName','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','appCode','975220OEDpQk','bool','operation','16832536svnqLI','sdk','2351415jTAIwr','770790oKwYJl','738288DzBmgs','codegen','string','code','read','5559545YckGMs','Omit\x20import\x20statements\x20from\x20generated\x20code','str','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation'];a48_0x206c=function(){return _0x5aee05;};return a48_0x206c();}
@@ -1 +1 @@
1
- const a44_0x162cf9=a44_0x89d6;(function(_0x28a58e,_0x2493f1){const _0x276642=a44_0x89d6,_0x9b0da5=_0x28a58e();while(!![]){try{const _0x26aff8=parseInt(_0x276642(0xc7))/0x1+parseInt(_0x276642(0xbd))/0x2*(-parseInt(_0x276642(0xca))/0x3)+-parseInt(_0x276642(0xce))/0x4*(parseInt(_0x276642(0xbc))/0x5)+-parseInt(_0x276642(0xc3))/0x6+-parseInt(_0x276642(0xcb))/0x7+-parseInt(_0x276642(0xc6))/0x8*(-parseInt(_0x276642(0xcf))/0x9)+parseInt(_0x276642(0xbb))/0xa*(parseInt(_0x276642(0xc8))/0xb);if(_0x26aff8===_0x2493f1)break;else _0x9b0da5['push'](_0x9b0da5['shift']());}catch(_0x59785e){_0x9b0da5['push'](_0x9b0da5['shift']());}}}(a44_0x2a81,0x3204b));function a44_0x89d6(_0x24c1c9,_0xd16101){_0x24c1c9=_0x24c1c9-0xba;const _0x2a8140=a44_0x2a81();let _0x89d604=_0x2a8140[_0x24c1c9];return _0x89d604;}function a44_0x2a81(){const _0x35e14=['target','3590890hZfuxe','30togQYE','129432MqKtIy','no-imports','string','sqlcode','read','sqlName','362898dxyLhn','sql','Omit\x20import\x20statements\x20from\x20generated\x20code','3392MKMALp','352697FRRnDP','11DFFNxF','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','12kFZSIM','2112558qMAwVy','sdk','sqlCode','72812jBuSua','4743nGFAmN','bff','boolean','appCode'];a44_0x2a81=function(){return _0x35e14;};return a44_0x2a81();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a44_0x162cf9(0xc4),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a44_0x162cf9(0xc1),'flags':[SQLCODE_FLAG,{'name':'target','type':a44_0x162cf9(0xbf),'description':a44_0x162cf9(0xc9),'default':a44_0x162cf9(0xcc),'enum':[a44_0x162cf9(0xcc),a44_0x162cf9(0xd0)]},{'name':a44_0x162cf9(0xbe),'type':a44_0x162cf9(0xd1),'description':a44_0x162cf9(0xc5)}],async 'execute'(_0x112948){const _0x36b45f=a44_0x162cf9,_0x245c32=await getSqlQueryInfo(_0x112948[_0x36b45f(0xd2)],_0x112948['str'](_0x36b45f(0xc0))),_0x16041a=_0x112948['str'](_0x36b45f(0xba))||'sdk',_0x5d6731=generateSqlCodeTemplate(_0x245c32,{'target':_0x16041a,'includeImports':!_0x112948['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x245c32[_0x36b45f(0xcd)],'sqlName':_0x245c32[_0x36b45f(0xc2)],'target':_0x16041a,'code':_0x5d6731}};}};
1
+ const a49_0x45a4fe=a49_0x3f27;(function(_0x4f33ab,_0x2e2fa5){const _0x130c14=a49_0x3f27,_0x6a3949=_0x4f33ab();while(!![]){try{const _0x241bd9=parseInt(_0x130c14(0xd7))/0x1+parseInt(_0x130c14(0xdc))/0x2+parseInt(_0x130c14(0xda))/0x3+parseInt(_0x130c14(0xd3))/0x4*(-parseInt(_0x130c14(0xe8))/0x5)+-parseInt(_0x130c14(0xde))/0x6*(-parseInt(_0x130c14(0xe1))/0x7)+-parseInt(_0x130c14(0xe7))/0x8*(-parseInt(_0x130c14(0xea))/0x9)+-parseInt(_0x130c14(0xe3))/0xa;if(_0x241bd9===_0x2e2fa5)break;else _0x6a3949['push'](_0x6a3949['shift']());}catch(_0x4a92b0){_0x6a3949['push'](_0x6a3949['shift']());}}}(a49_0x496f,0xa101f));function a49_0x496f(){const _0x35c5f6=['sql','6wYkIiP','sqlName','sqlCode','8355221aRQUSA','str','19872090tSitxF','sqlcode','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sdk','175552cbQrHN','4485865viIexp','string','315nWSpdu','read','4cKGbHX','codegen','appCode','target','590048kEugWa','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','boolean','346266rAslqZ','Omit\x20import\x20statements\x20from\x20generated\x20code','1753512CCCGHC'];a49_0x496f=function(){return _0x35c5f6;};return a49_0x496f();}function a49_0x3f27(_0x2e1fc0,_0xbeefbc){_0x2e1fc0=_0x2e1fc0-0xd2;const _0x496fec=a49_0x496f();let _0x3f2720=_0x496fec[_0x2e1fc0];return _0x3f2720;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a49_0x45a4fe(0xd4),'command':a49_0x45a4fe(0xdd),'description':a49_0x45a4fe(0xd8),'risk':a49_0x45a4fe(0xd2),'flags':[SQLCODE_FLAG,{'name':a49_0x45a4fe(0xd6),'type':a49_0x45a4fe(0xe9),'description':a49_0x45a4fe(0xe5),'default':'sdk','enum':[a49_0x45a4fe(0xe6),'bff']},{'name':'no-imports','type':a49_0x45a4fe(0xd9),'description':a49_0x45a4fe(0xdb)}],async 'execute'(_0x36ab3b){const _0x434fff=a49_0x45a4fe,_0x2133ad=await getSqlQueryInfo(_0x36ab3b[_0x434fff(0xd5)],_0x36ab3b[_0x434fff(0xe2)](_0x434fff(0xe4))),_0x342cda=_0x36ab3b['str'](_0x434fff(0xd6))||_0x434fff(0xe6),_0x293e93=generateSqlCodeTemplate(_0x2133ad,{'target':_0x342cda,'includeImports':!_0x36ab3b['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x2133ad[_0x434fff(0xe0)],'sqlName':_0x2133ad[_0x434fff(0xdf)],'target':_0x342cda,'code':_0x293e93}};}};
@@ -1 +1 @@
1
- (function(_0x53771f,_0x790a58){const _0x4a5fbb=a45_0x35ce,_0x166210=_0x53771f();while(!![]){try{const _0x4d5651=-parseInt(_0x4a5fbb(0xc4))/0x1*(-parseInt(_0x4a5fbb(0xd3))/0x2)+-parseInt(_0x4a5fbb(0xca))/0x3*(parseInt(_0x4a5fbb(0xb4))/0x4)+-parseInt(_0x4a5fbb(0xcb))/0x5*(-parseInt(_0x4a5fbb(0xbe))/0x6)+parseInt(_0x4a5fbb(0xd8))/0x7*(parseInt(_0x4a5fbb(0xc3))/0x8)+-parseInt(_0x4a5fbb(0xde))/0x9+-parseInt(_0x4a5fbb(0xd2))/0xa+-parseInt(_0x4a5fbb(0xdb))/0xb*(-parseInt(_0x4a5fbb(0xd0))/0xc);if(_0x4d5651===_0x790a58)break;else _0x166210['push'](_0x166210['shift']());}catch(_0x3dc8d7){_0x166210['push'](_0x166210['shift']());}}}(a45_0x332e,0x3ab89));function a45_0x332e(){const _0x1dd23e=['1190EefqXL','projectConfig','App\x20\x22','args','App\x20code','4956bcTXjT','appcode','1635180HlKyEh','2hgFxWs','Updated','\x20<name>\x20[--global]','validation','bool','77MrOWYh','project','Missing\x20app\x20name.','11MvrEHr','keys','defaultApp','3165804CcZSVT','Usage:\x20','global','Use\x20global\x20config\x20scope','\x20Default\x20app\x20is\x20\x22','117164xLybjI','str','Removed\x20app\x20\x22','flagMissing','\x22\x20not\x20found.','\x20<name>','\x20<name>\x20--appcode\x20<code>','globalConfig','\x20Note:\x20app\x20\x22','string','9354eHWjjt','\x20Default\x20app\x20changed\x20to\x20\x22','apps','\x22\x20still\x20defined\x20in\x20','\x20app\x20\x22','124088LRyAHr','448047AxDAZf','boolean','object','length','\x20Remaining\x20app\x20\x22','\x20config.','24hrukJC'];a45_0x332e=function(){return _0x1dd23e;};return a45_0x332e();}import{CliErrors}from'../../errors.js';function a45_0x35ce(_0x278dd1,_0x5361f8){_0x278dd1=_0x278dd1-0xb2;const _0x332e43=a45_0x332e();let _0x35ce71=_0x332e43[_0x278dd1];return _0x35ce71;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x1c17e1=a45_0x35ce;return[{'name':_0x1c17e1(0xd1),'type':'string','description':_0x1c17e1(0xcf),'required':!![]},{'name':_0x1c17e1(0xe0),'type':_0x1c17e1(0xc5),'description':_0x1c17e1(0xb2),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x1b6c4c=a45_0x35ce;return[{'name':_0x1b6c4c(0xe0),'type':_0x1b6c4c(0xc5),'description':_0x1b6c4c(0xb2),'default':![]}];}export async function validateAppName(_0x13968f,_0x1568e7){const _0xc47396=a45_0x35ce,_0x5dc216=_0x13968f[_0xc47396(0xce)][0x0]?.['trim']();if(!_0x5dc216)throw CliErrors[_0xc47396(0xd6)]('Missing\x20app\x20name.',_0xc47396(0xdf)+CLI_BIN_NAME+'\x20'+_0x1568e7+_0xc47396(0xb9));}export async function runAppAdd(_0x1f5c57,_0x1b317f){const _0x301c92=a45_0x35ce,_0x51f889=_0x1f5c57[_0x301c92(0xce)][0x0]?.['trim']();if(!_0x51f889)throw CliErrors[_0x301c92(0xd6)](_0x301c92(0xda),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1b317f+_0x301c92(0xba));const _0x20c35a=_0x1f5c57[_0x301c92(0xb5)](_0x301c92(0xd1));if(!_0x20c35a)throw CliErrors[_0x301c92(0xb7)](_0x301c92(0xd1),_0x301c92(0xdf)+CLI_BIN_NAME+'\x20'+_0x1b317f+_0x301c92(0xba));const _0x414a11={'global':_0x1f5c57['bool'](_0x301c92(0xe0))},_0x48ec3e=readConfig(_0x414a11);if(!_0x48ec3e[_0x301c92(0xc0)])_0x48ec3e['apps']={};const _0x5884f9={'appcode':_0x20c35a,...collectAppProfileOverrides(_0x423f81=>_0x1f5c57[_0x301c92(0xb5)](_0x423f81))},_0x5ad4d5=_0x48ec3e[_0x301c92(0xc0)],_0x563ca7=Object['keys'](_0x5ad4d5),_0x5cc39f=typeof _0x48ec3e[_0x301c92(0xdd)]===_0x301c92(0xbd)&&_0x5ad4d5[_0x48ec3e[_0x301c92(0xdd)]]?_0x48ec3e[_0x301c92(0xdd)]:_0x563ca7['length']===0x1?_0x563ca7[0x0]:undefined,_0x20c0c1=!!_0x5ad4d5[_0x51f889];_0x5ad4d5[_0x51f889]=_0x5884f9;const _0x5dbad3=normalizeStoredDefaultApp(_0x48ec3e,_0x5cc39f);writeConfig(_0x48ec3e,_0x414a11);const _0x11f621=!_0x20c0c1&&_0x5dbad3?_0x301c92(0xb3)+_0x5dbad3+'\x22.':'',_0x199908=(_0x20c0c1?_0x301c92(0xd4):'Added')+_0x301c92(0xc2)+_0x51f889+'\x22\x20(appcode:\x20'+_0x20c35a+')'+scopeLabel(_0x414a11)+'.'+_0x11f621;return{'ok':!![],'message':_0x199908};}export async function runAppRemove(_0x4bc887,_0x449427){const _0x5644ed=a45_0x35ce,_0x2ae7e2=_0x4bc887[_0x5644ed(0xce)][0x0]?.['trim']();if(!_0x2ae7e2)throw CliErrors['validation'](_0x5644ed(0xda),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x449427+_0x5644ed(0xd5));const _0x413a5a=_0x4bc887[_0x5644ed(0xd7)](_0x5644ed(0xe0)),{config:_0x98ad35,layers:_0x394db3}=readRawConfigWithLayers(),_0x158947=_0x98ad35[_0x5644ed(0xc0)]??{};if(!_0x158947[_0x2ae7e2])throw CliErrors['validation'](_0x5644ed(0xcd)+_0x2ae7e2+_0x5644ed(0xb8));const _0x427e5f=_0x394db3[_0x5644ed(0xbb)]['apps']&&typeof _0x394db3[_0x5644ed(0xbb)][_0x5644ed(0xc0)]===_0x5644ed(0xc6)?_0x394db3[_0x5644ed(0xbb)][_0x5644ed(0xc0)]:{},_0x2f78cd=_0x394db3[_0x5644ed(0xcc)][_0x5644ed(0xc0)]&&typeof _0x394db3[_0x5644ed(0xcc)]['apps']==='object'?_0x394db3['projectConfig'][_0x5644ed(0xc0)]:{},_0x4b30d2=appDefinedIn(_0x2ae7e2,_0x427e5f,_0x2f78cd),_0x40b2af=resolveAppScopeForWrite(_0x2ae7e2,_0x413a5a,_0x394db3),_0x50d57d={'global':_0x40b2af==='global'},_0x25e108=readConfig(_0x50d57d),_0x180161=_0x25e108[_0x5644ed(0xc0)];if(!_0x180161||!_0x180161[_0x2ae7e2])throw CliErrors[_0x5644ed(0xd6)](_0x5644ed(0xcd)+_0x2ae7e2+_0x5644ed(0xb8));delete _0x180161[_0x2ae7e2];let _0x54a168='';const _0x41505b=typeof _0x25e108[_0x5644ed(0xdd)]===_0x5644ed(0xbd)?_0x25e108[_0x5644ed(0xdd)]:undefined,_0x375692=Object[_0x5644ed(0xdc)](_0x180161),_0x45bd19=_0x41505b===_0x2ae7e2?_0x375692[0x0]:_0x41505b,_0x3982df=normalizeStoredDefaultApp(_0x25e108,_0x45bd19);if(_0x41505b===_0x2ae7e2&&_0x375692[_0x5644ed(0xc7)]===0x1)_0x54a168=_0x5644ed(0xc8)+_0x375692[0x0]+'\x22\x20is\x20selected\x20automatically.';else _0x41505b===_0x2ae7e2&&_0x3982df&&(_0x54a168=_0x5644ed(0xbf)+_0x3982df+'\x22.');Object[_0x5644ed(0xdc)](_0x180161)[_0x5644ed(0xc7)]===0x0&&(delete _0x25e108['apps'],delete _0x25e108[_0x5644ed(0xdd)]);writeConfig(_0x25e108,_0x50d57d);const _0x47ba5d=_0x4b30d2==='both'?_0x5644ed(0xbc)+_0x2ae7e2+_0x5644ed(0xc1)+(_0x40b2af===_0x5644ed(0xd9)?_0x5644ed(0xe0):_0x5644ed(0xd9))+_0x5644ed(0xc9):'';return{'ok':!![],'message':_0x5644ed(0xb6)+_0x2ae7e2+'\x22'+scopeLabel(_0x50d57d)+'.'+_0x54a168+_0x47ba5d};}
1
+ (function(_0xf85c26,_0x179dcd){const _0x5cac08=a50_0x1cb9,_0x118a4d=_0xf85c26();while(!![]){try{const _0x1efc8b=-parseInt(_0x5cac08(0x114))/0x1*(parseInt(_0x5cac08(0x104))/0x2)+parseInt(_0x5cac08(0x10c))/0x3*(parseInt(_0x5cac08(0x111))/0x4)+-parseInt(_0x5cac08(0xf6))/0x5+-parseInt(_0x5cac08(0x105))/0x6+-parseInt(_0x5cac08(0xf4))/0x7*(parseInt(_0x5cac08(0x11c))/0x8)+parseInt(_0x5cac08(0x119))/0x9*(-parseInt(_0x5cac08(0xfc))/0xa)+parseInt(_0x5cac08(0x116))/0xb;if(_0x1efc8b===_0x179dcd)break;else _0x118a4d['push'](_0x118a4d['shift']());}catch(_0x1a344b){_0x118a4d['push'](_0x118a4d['shift']());}}}(a50_0x1523,0x97cd4));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs,normalizeStoredDefaultApp}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x403541=a50_0x1cb9;return[{'name':'appcode','type':_0x403541(0xfb),'description':'App\x20code','required':!![]},{'name':'global','type':'boolean','description':_0x403541(0xfa),'default':![]},...getAppProfileFlagDefs()];}function a50_0x1cb9(_0x33ec5e,_0x40d9f3){_0x33ec5e=_0x33ec5e-0xf4;const _0x152302=a50_0x1523();let _0x1cb9e0=_0x152302[_0x33ec5e];return _0x1cb9e0;}export function buildAppRemoveFlags(){const _0x71c4=a50_0x1cb9;return[{'name':_0x71c4(0x11b),'type':_0x71c4(0x100),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0xe48578,_0x17d6a8){const _0x52b63c=a50_0x1cb9,_0x529e46=_0xe48578[_0x52b63c(0xf9)][0x0]?.[_0x52b63c(0xf7)]();if(!_0x529e46)throw CliErrors[_0x52b63c(0x10d)](_0x52b63c(0xf5),_0x52b63c(0x113)+CLI_BIN_NAME+'\x20'+_0x17d6a8+'\x20<name>');}export async function runAppAdd(_0x47a612,_0x518581){const _0x3d0fa5=a50_0x1cb9,_0x51f4e3=_0x47a612[_0x3d0fa5(0xf9)][0x0]?.[_0x3d0fa5(0xf7)]();if(!_0x51f4e3)throw CliErrors['validation'](_0x3d0fa5(0xf5),_0x3d0fa5(0x113)+CLI_BIN_NAME+'\x20'+_0x518581+_0x3d0fa5(0x106));const _0x3a558e=_0x47a612['str'](_0x3d0fa5(0x10f));if(!_0x3a558e)throw CliErrors[_0x3d0fa5(0xfd)](_0x3d0fa5(0x10f),_0x3d0fa5(0x113)+CLI_BIN_NAME+'\x20'+_0x518581+_0x3d0fa5(0x106));const _0x44ae5f={'global':_0x47a612[_0x3d0fa5(0xff)](_0x3d0fa5(0x11b))},_0x17bca5=readConfig(_0x44ae5f);if(!_0x17bca5[_0x3d0fa5(0x110)])_0x17bca5[_0x3d0fa5(0x110)]={};const _0x7bece0={'appcode':_0x3a558e,...collectAppProfileOverrides(_0x55090a=>_0x47a612[_0x3d0fa5(0x102)](_0x55090a))},_0x3122e9=_0x17bca5['apps'],_0x2f2ad8=Object[_0x3d0fa5(0x11a)](_0x3122e9),_0x190911=typeof _0x17bca5['defaultApp']==='string'&&_0x3122e9[_0x17bca5['defaultApp']]?_0x17bca5[_0x3d0fa5(0x101)]:_0x2f2ad8[_0x3d0fa5(0xf8)]===0x1?_0x2f2ad8[0x0]:undefined,_0x54943e=!!_0x3122e9[_0x51f4e3];_0x3122e9[_0x51f4e3]=_0x7bece0;const _0x3c8db4=normalizeStoredDefaultApp(_0x17bca5,_0x190911);writeConfig(_0x17bca5,_0x44ae5f);const _0x1ad03e=!_0x54943e&&_0x3c8db4?_0x3d0fa5(0x118)+_0x3c8db4+'\x22.':'',_0x266963=(_0x54943e?'Updated':'Added')+'\x20app\x20\x22'+_0x51f4e3+_0x3d0fa5(0x103)+_0x3a558e+')'+scopeLabel(_0x44ae5f)+'.'+_0x1ad03e;return{'ok':!![],'message':_0x266963};}export async function runAppRemove(_0x58ecb7,_0x18b950){const _0xb4d763=a50_0x1cb9,_0xafe6d0=_0x58ecb7[_0xb4d763(0xf9)][0x0]?.[_0xb4d763(0xf7)]();if(!_0xafe6d0)throw CliErrors[_0xb4d763(0x10d)](_0xb4d763(0xf5),_0xb4d763(0x113)+CLI_BIN_NAME+'\x20'+_0x18b950+'\x20<name>\x20[--global]');const _0x21c885=_0x58ecb7[_0xb4d763(0xff)](_0xb4d763(0x11b)),{config:_0x40a199,layers:_0x3d483e}=readRawConfigWithLayers(),_0x282a96=_0x40a199['apps']??{};if(!_0x282a96[_0xafe6d0])throw CliErrors[_0xb4d763(0x10d)](_0xb4d763(0x108)+_0xafe6d0+_0xb4d763(0x10e));const _0x57d405=_0x3d483e[_0xb4d763(0x109)][_0xb4d763(0x110)]&&typeof _0x3d483e[_0xb4d763(0x109)][_0xb4d763(0x110)]===_0xb4d763(0x10b)?_0x3d483e[_0xb4d763(0x109)]['apps']:{},_0x1a4334=_0x3d483e['projectConfig'][_0xb4d763(0x110)]&&typeof _0x3d483e[_0xb4d763(0x10a)]['apps']==='object'?_0x3d483e[_0xb4d763(0x10a)][_0xb4d763(0x110)]:{},_0x55669e=appDefinedIn(_0xafe6d0,_0x57d405,_0x1a4334),_0x5d42d6=resolveAppScopeForWrite(_0xafe6d0,_0x21c885,_0x3d483e),_0x2a49fa={'global':_0x5d42d6==='global'},_0x72939d=readConfig(_0x2a49fa),_0x28d521=_0x72939d[_0xb4d763(0x110)];if(!_0x28d521||!_0x28d521[_0xafe6d0])throw CliErrors['validation'](_0xb4d763(0x108)+_0xafe6d0+_0xb4d763(0x10e));delete _0x28d521[_0xafe6d0];let _0x22ad34='';const _0x470e07=typeof _0x72939d['defaultApp']==='string'?_0x72939d['defaultApp']:undefined,_0x3367c4=Object[_0xb4d763(0x11a)](_0x28d521),_0x1376c3=_0x470e07===_0xafe6d0?_0x3367c4[0x0]:_0x470e07,_0x129e15=normalizeStoredDefaultApp(_0x72939d,_0x1376c3);if(_0x470e07===_0xafe6d0&&_0x3367c4[_0xb4d763(0xf8)]===0x1)_0x22ad34='\x20Remaining\x20app\x20\x22'+_0x3367c4[0x0]+_0xb4d763(0xfe);else _0x470e07===_0xafe6d0&&_0x129e15&&(_0x22ad34=_0xb4d763(0x112)+_0x129e15+'\x22.');Object[_0xb4d763(0x11a)](_0x28d521)[_0xb4d763(0xf8)]===0x0&&(delete _0x72939d[_0xb4d763(0x110)],delete _0x72939d['defaultApp']);writeConfig(_0x72939d,_0x2a49fa);const _0x3831c7=_0x55669e==='both'?_0xb4d763(0x107)+_0xafe6d0+_0xb4d763(0x117)+(_0x5d42d6===_0xb4d763(0x115)?_0xb4d763(0x11b):_0xb4d763(0x115))+'\x20config.':'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0xafe6d0+'\x22'+scopeLabel(_0x2a49fa)+'.'+_0x22ad34+_0x3831c7};}function a50_0x1523(){const _0x3d3c32=['projectConfig','object','226497PuRVPo','validation','\x22\x20not\x20found.','appcode','apps','12xsyaKj','\x20Default\x20app\x20changed\x20to\x20\x22','Usage:\x20','143IHbKkE','project','52625177OMqMLl','\x22\x20still\x20defined\x20in\x20','\x20Default\x20app\x20is\x20\x22','140886jmyVUj','keys','global','9320BgwpCe','6853NhEPgA','Missing\x20app\x20name.','3563420PbLxDz','trim','length','args','Use\x20global\x20config\x20scope','string','220BGochi','flagMissing','\x22\x20is\x20selected\x20automatically.','bool','boolean','defaultApp','str','\x22\x20(appcode:\x20','13444VvZiPG','7379826VULrov','\x20<name>\x20--appcode\x20<code>','\x20Note:\x20app\x20\x22','App\x20\x22','globalConfig'];a50_0x1523=function(){return _0x3d3c32;};return a50_0x1523();}
@@ -1 +1 @@
1
- function a46_0x17d4(){const _0x562beb=['1033227dIkwku','214TeCegn','appCode','Fetching\x20available\x20apps...','App\x20Code:','find','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','custom','77886zGQDDg','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','328MDUBAb','2090hAvdNv','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','map','yellow','gray','1443911xZzOYQ','trim','✎\x20Enter\x20appcode\x20manually','1333dYAfSD','Select\x20the\x20app\x20to\x20bind:','length','48jxtTwW','manual','Found\x20','✎\x20Enter\x20manually','1647440opodTw','skip','Invalid\x20App\x20Code','\x0aNo\x20available\x20apps\x20found.','message','4173AlLJIe','appName','\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.','908aHtise','11930MkTCEB','6OcLYTG','No\x20available\x20apps\x20found.','Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'];a46_0x17d4=function(){return _0x562beb;};return a46_0x17d4();}function a46_0x11a0(_0x209793,_0x199a9f){_0x209793=_0x209793-0xd1;const _0x17d4fb=a46_0x17d4();let _0x11a049=_0x17d4fb[_0x209793];return _0x11a049;}(function(_0x10a411,_0x184126){const _0x11b542=a46_0x11a0,_0x437df6=_0x10a411();while(!![]){try{const _0x49dc44=-parseInt(_0x11b542(0xe3))/0x1*(-parseInt(_0x11b542(0xd1))/0x2)+parseInt(_0x11b542(0xef))/0x3*(parseInt(_0x11b542(0xf2))/0x4)+-parseInt(_0x11b542(0xea))/0x5+-parseInt(_0x11b542(0xf4))/0x6*(parseInt(_0x11b542(0xe0))/0x7)+-parseInt(_0x11b542(0xda))/0x8*(-parseInt(_0x11b542(0xd8))/0x9)+parseInt(_0x11b542(0xf3))/0xa*(parseInt(_0x11b542(0xdb))/0xb)+-parseInt(_0x11b542(0xe6))/0xc*(parseInt(_0x11b542(0xf7))/0xd);if(_0x49dc44===_0x184126)break;else _0x437df6['push'](_0x437df6['shift']());}catch(_0x4c6be7){_0x437df6['push'](_0x437df6['shift']());}}}(a46_0x17d4,0x2d753));import{input,checkbox,select}from'@inquirer/prompts';import a46_0xe9c6f2 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x204450=a46_0x11a0,_0x540173=await input({'message':'App\x20Code:','validate':_0x51674a=>{const _0x2e494a=a46_0x11a0,_0x597b4c=validateAppcode(_0x51674a[_0x2e494a(0xe1)]());return _0x597b4c['valid']||_0x597b4c[_0x2e494a(0xee)]||_0x2e494a(0xec);}});return _0x540173[_0x204450(0xe1)]();}export async function promptAppSelection(_0x405702){const _0x5b613f=a46_0x11a0,_0xb9b482=[{'name':a46_0xe9c6f2['yellow'](_0x5b613f(0xe2)),'value':-0x1},..._0x405702[_0x5b613f(0xdd)]((_0x587331,_0x11fbe4)=>({'name':_0x587331[_0x5b613f(0xf0)]+'\x20\x20'+a46_0xe9c6f2[_0x5b613f(0xdf)]('('+_0x587331['appCode']+')'),'value':_0x11fbe4}))],_0x37c408=await checkbox({'message':_0x5b613f(0xe8)+a46_0xe9c6f2['cyan'](_0x405702[_0x5b613f(0xe5)])+_0x5b613f(0xd9),'choices':_0xb9b482,'loop':![]});if(_0x37c408['includes'](-0x1))return _0x5b613f(0xd7);if(_0x37c408['length']===0x0)return _0x5b613f(0xd7);return _0x37c408[_0x5b613f(0xdd)](_0x2c58a2=>_0x405702[_0x2c58a2]);}export async function promptSingleAppSelection(_0x54c8ce){const _0x37d26e=a46_0x11a0,_0x900b63=[{'name':a46_0xe9c6f2[_0x37d26e(0xdf)](_0x37d26e(0xdc)),'value':_0x37d26e(0xeb)},{'name':a46_0xe9c6f2[_0x37d26e(0xde)](_0x37d26e(0xe2)),'value':_0x37d26e(0xd7)},..._0x54c8ce[_0x37d26e(0xdd)](_0x5c433e=>({'name':_0x5c433e['appName']+'\x20\x20'+a46_0xe9c6f2[_0x37d26e(0xdf)]('('+_0x5c433e[_0x37d26e(0xd2)]+')'),'value':_0x5c433e[_0x37d26e(0xd2)]}))],_0x4cb42a=await select({'message':_0x37d26e(0xe4),'choices':_0x900b63});if(_0x4cb42a===_0x37d26e(0xeb))return _0x37d26e(0xeb);if(_0x4cb42a==='custom')return'custom';return _0x54c8ce[_0x37d26e(0xd5)](_0x2a6639=>_0x2a6639[_0x37d26e(0xd2)]===_0x4cb42a);}export async function selectSingleAppcode(_0x56275e){const _0x326648=a46_0x11a0;if(!_0x56275e)return writeCliSideChannelLine(a46_0xe9c6f2['gray'](_0x326648(0xd6))),_fallbackOrSkip();writeCliSideChannelLine(_0x326648(0xd3));let _0x531efa;try{_0x531efa=await withActiveCookie(_0x56275e,()=>listRemoteApps());}catch(_0x5dd45b){writeCliSideChannelLine(a46_0xe9c6f2[_0x326648(0xde)](_0x326648(0xf6)));if(_0x5dd45b instanceof Error)writeCliSideChannelLine(a46_0xe9c6f2[_0x326648(0xdf)]('\x20\x20('+_0x5dd45b['message']+')'));return _fallbackOrSkip();}if(_0x531efa[_0x326648(0xe5)]===0x0)return writeCliSideChannelLine(a46_0xe9c6f2[_0x326648(0xde)](_0x326648(0xf5))),_fallbackOrSkip();const _0x2da778=await promptSingleAppSelection(_0x531efa);if(_0x2da778===_0x326648(0xeb))return'';if(_0x2da778===_0x326648(0xd7))return promptCustomAppcode();return _0x2da778[_0x326648(0xd2)];}export async function selectMultipleApps(_0x2fcba9){const _0x5deab2=a46_0x11a0;writeCliSideChannelLine(_0x5deab2(0xd3));let _0x12e073;try{_0x12e073=await withActiveCookie(_0x2fcba9,()=>listRemoteApps());}catch(_0x130e3c){writeCliSideChannelLine(_0x5deab2(0xf1));if(_0x130e3c instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x130e3c[_0x5deab2(0xee)]+')');return _0x5deab2(0xd7);}if(_0x12e073[_0x5deab2(0xe5)]===0x0)return writeCliSideChannelLine(_0x5deab2(0xed)),'custom';return promptAppSelection(_0x12e073);}async function _fallbackOrSkip(){const _0x5d0836=a46_0x11a0,_0x5672e5=await select({'message':_0x5d0836(0xd4),'choices':[{'name':a46_0xe9c6f2[_0x5d0836(0xdf)]('(Skip;\x20configure\x20later)'),'value':_0x5d0836(0xeb)},{'name':a46_0xe9c6f2[_0x5d0836(0xde)](_0x5d0836(0xe9)),'value':_0x5d0836(0xe7)}]});if(_0x5672e5===_0x5d0836(0xeb))return'';return promptCustomAppcode();}
1
+ (function(_0x3f309e,_0x3ebeb5){const _0x554c9b=a51_0x26ff,_0x520782=_0x3f309e();while(!![]){try{const _0x13a228=parseInt(_0x554c9b(0x147))/0x1+-parseInt(_0x554c9b(0x14f))/0x2*(-parseInt(_0x554c9b(0x13f))/0x3)+-parseInt(_0x554c9b(0x135))/0x4*(-parseInt(_0x554c9b(0x152))/0x5)+parseInt(_0x554c9b(0x149))/0x6*(parseInt(_0x554c9b(0x13a))/0x7)+parseInt(_0x554c9b(0x132))/0x8*(parseInt(_0x554c9b(0x139))/0x9)+parseInt(_0x554c9b(0x13d))/0xa*(parseInt(_0x554c9b(0x150))/0xb)+-parseInt(_0x554c9b(0x145))/0xc;if(_0x13a228===_0x3ebeb5)break;else _0x520782['push'](_0x520782['shift']());}catch(_0x20fd9a){_0x520782['push'](_0x520782['shift']());}}}(a51_0x42fe,0xa781d));import{input,checkbox,select}from'@inquirer/prompts';function a51_0x26ff(_0x25ac22,_0x2866d1){_0x25ac22=_0x25ac22-0x132;const _0x42feb1=a51_0x42fe();let _0x26ffd2=_0x42feb1[_0x25ac22];return _0x26ffd2;}import a51_0x5bac80 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a51_0x42fe(){const _0x2c4222=['map','1241357wGzVyy','Fetching\x20available\x20apps...','8580SFgIfj','trim','length','appCode','cyan','(Skip;\x20configure\x20later\x20with\x20config\x20set\x20appcode)','73988pbcDtG','781eHOQGT','✎\x20Enter\x20appcode\x20manually','525040aBYfal','custom','App\x20Code:','No\x20available\x20apps\x20found.','896TmBdTp','skip','(No\x20login\x20session.\x20Enter\x20an\x20App\x20Code\x20manually\x20or\x20skip.)','52QQiqsF','\x20\x20(','message','yellow','79227OSmyQY','4907qVRmZP','Invalid\x20App\x20Code','Found\x20','77030zCjbKG','appName','96xKqTgn','includes','find','Select\x20the\x20app\x20to\x20bind:','gray','\x20apps.\x20Select\x20with\x20space,\x20a=all,\x20i=invert:','67673268OJvpHy'];a51_0x42fe=function(){return _0x2c4222;};return a51_0x42fe();}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x17e7cb=a51_0x26ff,_0x212d5e=await input({'message':_0x17e7cb(0x154),'validate':_0x2185cc=>{const _0x5740ce=_0x17e7cb,_0x58d8fb=validateAppcode(_0x2185cc['trim']());return _0x58d8fb['valid']||_0x58d8fb['message']||_0x5740ce(0x13b);}});return _0x212d5e[_0x17e7cb(0x14a)]();}export async function promptAppSelection(_0xa77ff5){const _0x499e59=a51_0x26ff,_0x4dac78=[{'name':a51_0x5bac80['yellow'](_0x499e59(0x151)),'value':-0x1},..._0xa77ff5['map']((_0x3270ea,_0x1e3b2d)=>({'name':_0x3270ea[_0x499e59(0x13e)]+'\x20\x20'+a51_0x5bac80[_0x499e59(0x143)]('('+_0x3270ea[_0x499e59(0x14c)]+')'),'value':_0x1e3b2d}))],_0x56d31b=await checkbox({'message':_0x499e59(0x13c)+a51_0x5bac80[_0x499e59(0x14d)](_0xa77ff5[_0x499e59(0x14b)])+_0x499e59(0x144),'choices':_0x4dac78,'loop':![]});if(_0x56d31b[_0x499e59(0x140)](-0x1))return _0x499e59(0x153);if(_0x56d31b[_0x499e59(0x14b)]===0x0)return _0x499e59(0x153);return _0x56d31b['map'](_0x16069d=>_0xa77ff5[_0x16069d]);}export async function promptSingleAppSelection(_0x1c7ba3){const _0x1dfbf6=a51_0x26ff,_0x4892f0=[{'name':a51_0x5bac80[_0x1dfbf6(0x143)](_0x1dfbf6(0x14e)),'value':_0x1dfbf6(0x133)},{'name':a51_0x5bac80['yellow'](_0x1dfbf6(0x151)),'value':_0x1dfbf6(0x153)},..._0x1c7ba3[_0x1dfbf6(0x146)](_0x75535d=>({'name':_0x75535d[_0x1dfbf6(0x13e)]+'\x20\x20'+a51_0x5bac80['gray']('('+_0x75535d[_0x1dfbf6(0x14c)]+')'),'value':_0x75535d[_0x1dfbf6(0x14c)]}))],_0x42f80e=await select({'message':_0x1dfbf6(0x142),'choices':_0x4892f0});if(_0x42f80e===_0x1dfbf6(0x133))return'skip';if(_0x42f80e===_0x1dfbf6(0x153))return _0x1dfbf6(0x153);return _0x1c7ba3[_0x1dfbf6(0x141)](_0x2468c4=>_0x2468c4[_0x1dfbf6(0x14c)]===_0x42f80e);}export async function selectSingleAppcode(_0x5a626c){const _0x465f26=a51_0x26ff;if(!_0x5a626c)return writeCliSideChannelLine(a51_0x5bac80[_0x465f26(0x143)](_0x465f26(0x134))),_fallbackOrSkip();writeCliSideChannelLine('Fetching\x20available\x20apps...');let _0x127217;try{_0x127217=await withActiveCookie(_0x5a626c,()=>listRemoteApps());}catch(_0x302d5d){writeCliSideChannelLine(a51_0x5bac80[_0x465f26(0x138)]('Could\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.'));if(_0x302d5d instanceof Error)writeCliSideChannelLine(a51_0x5bac80['gray'](_0x465f26(0x136)+_0x302d5d[_0x465f26(0x137)]+')'));return _fallbackOrSkip();}if(_0x127217[_0x465f26(0x14b)]===0x0)return writeCliSideChannelLine(a51_0x5bac80[_0x465f26(0x138)](_0x465f26(0x155))),_fallbackOrSkip();const _0x5b9fee=await promptSingleAppSelection(_0x127217);if(_0x5b9fee==='skip')return'';if(_0x5b9fee===_0x465f26(0x153))return promptCustomAppcode();return _0x5b9fee[_0x465f26(0x14c)];}export async function selectMultipleApps(_0x63b2be){const _0x379865=a51_0x26ff;writeCliSideChannelLine(_0x379865(0x148));let _0x357fc2;try{_0x357fc2=await withActiveCookie(_0x63b2be,()=>listRemoteApps());}catch(_0x1eafa4){writeCliSideChannelLine('\x0aCould\x20not\x20fetch\x20the\x20remote\x20app\x20list.\x20Enter\x20an\x20App\x20Code\x20manually.');if(_0x1eafa4 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x1eafa4[_0x379865(0x137)]+')');return _0x379865(0x153);}if(_0x357fc2['length']===0x0)return writeCliSideChannelLine('\x0aNo\x20available\x20apps\x20found.'),'custom';return promptAppSelection(_0x357fc2);}async function _fallbackOrSkip(){const _0x5c8b59=a51_0x26ff,_0x1f2f48=await select({'message':_0x5c8b59(0x154),'choices':[{'name':a51_0x5bac80[_0x5c8b59(0x143)]('(Skip;\x20configure\x20later)'),'value':_0x5c8b59(0x133)},{'name':a51_0x5bac80['yellow']('✎\x20Enter\x20manually'),'value':'manual'}]});if(_0x1f2f48===_0x5c8b59(0x133))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a47_0x437b4=a47_0x597b;function a47_0x597b(_0x1bdf1f,_0xe9936d){_0x1bdf1f=_0x1bdf1f-0x1d1;const _0x49e266=a47_0x49e2();let _0x597b11=_0x49e266[_0x1bdf1f];return _0x597b11;}function a47_0x49e2(){const _0x5292d8=['errorMessage','26101746RxxbIZ','status','10sHYkyX','8536212suZGzU','apiError','2780073ykSjcN','159FFgidJ','toUpperCase','trim','PENDING','3656996FaRGBu','\x20is\x20processing.','\x20response\x20did\x20not\x20contain\x20a\x20status.','string','FAILED','10388079BHeAPU','has','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20task\x20status\x20--task-id\x20','10294tkXXME','Async\x20task\x20','\x27\x5c\x27\x27','PROCESSING','5PZqmyV','\x20--appcode\x20','Task\x20','\x20failed.','taskId','\x20--format\x20compress','324863JzPCUO','56jZKjth'];a47_0x49e2=function(){return _0x5292d8;};return a47_0x49e2();}(function(_0x284f97,_0x2965aa){const _0x4d3938=a47_0x597b,_0x15384e=_0x284f97();while(!![]){try{const _0x52d62d=parseInt(_0x4d3938(0x1db))/0x1*(parseInt(_0x4d3938(0x1e8))/0x2)+-parseInt(_0x4d3938(0x1da))/0x3+-parseInt(_0x4d3938(0x1df))/0x4*(-parseInt(_0x4d3938(0x1ec))/0x5)+-parseInt(_0x4d3938(0x1d8))/0x6+-parseInt(_0x4d3938(0x1d2))/0x7*(-parseInt(_0x4d3938(0x1d3))/0x8)+parseInt(_0x4d3938(0x1e4))/0x9*(-parseInt(_0x4d3938(0x1d7))/0xa)+parseInt(_0x4d3938(0x1d5))/0xb;if(_0x52d62d===_0x2965aa)break;else _0x15384e['push'](_0x15384e['shift']());}catch(_0x2a4030){_0x15384e['push'](_0x15384e['shift']());}}}(a47_0x49e2,0xe241b));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a47_0x437b4(0x1e3)]),NON_TERMINAL_STATUSES=new Set([a47_0x437b4(0x1de),a47_0x437b4(0x1eb)]);export function normalizeAsyncTask(_0x74e0ec){const _0x402106=a47_0x437b4,_0x2811eb=typeof _0x74e0ec?.['taskId']===_0x402106(0x1e2)?_0x74e0ec['taskId'][_0x402106(0x1dd)]():'';if(!_0x2811eb)throw CliErrors[_0x402106(0x1d9)](_0x402106(0x1e6));const _0x10a26c=typeof _0x74e0ec['status']===_0x402106(0x1e2)?_0x74e0ec[_0x402106(0x1d6)][_0x402106(0x1dd)]()[_0x402106(0x1dc)]():'';if(!_0x10a26c)throw CliErrors['apiError'](_0x402106(0x1e9)+_0x2811eb+_0x402106(0x1e1));return{'taskId':_0x2811eb,'status':_0x10a26c,'errorMessage':typeof _0x74e0ec[_0x402106(0x1d4)]===_0x402106(0x1e2)&&_0x74e0ec[_0x402106(0x1d4)][_0x402106(0x1dd)]()?_0x74e0ec['errorMessage']['trim']():null,'isTerminal':TERMINAL_STATUSES['has'](_0x10a26c),'knownStatus':TERMINAL_STATUSES[_0x402106(0x1e5)](_0x10a26c)||NON_TERMINAL_STATUSES['has'](_0x10a26c)};}export function buildAsyncTaskStatusCommand(_0x1c8352,_0x3bae2a){const _0x5d32c5=a47_0x437b4;return CLI_BIN_NAME+_0x5d32c5(0x1e7)+quoteShellArg(_0x1c8352)+_0x5d32c5(0x1ed)+quoteShellArg(_0x3bae2a)+_0x5d32c5(0x1d1);}export function asyncTaskMessage(_0x521798){const _0x2d5746=a47_0x437b4;switch(_0x521798[_0x2d5746(0x1d6)]){case _0x2d5746(0x1de):return _0x2d5746(0x1ee)+_0x521798['taskId']+'\x20is\x20pending.';case _0x2d5746(0x1eb):return _0x2d5746(0x1ee)+_0x521798['taskId']+_0x2d5746(0x1e0);case'SUCCESS':return _0x2d5746(0x1ee)+_0x521798['taskId']+'\x20completed\x20successfully.';case _0x2d5746(0x1e3):return _0x521798[_0x2d5746(0x1d4)]?_0x2d5746(0x1ee)+_0x521798[_0x2d5746(0x1f0)]+'\x20failed:\x20'+_0x521798[_0x2d5746(0x1d4)]:_0x2d5746(0x1ee)+_0x521798['taskId']+_0x2d5746(0x1ef);default:return _0x2d5746(0x1ee)+_0x521798[_0x2d5746(0x1f0)]+'\x20returned\x20unknown\x20status\x20'+_0x521798['status']+'.';}}function quoteShellArg(_0xc12a55){const _0x3c6030=a47_0x437b4;return'\x27'+_0xc12a55['replace'](/'/g,_0x3c6030(0x1ea))+'\x27';}
1
+ const a52_0x339455=a52_0x382a;(function(_0x12240a,_0x189eb1){const _0x29df1e=a52_0x382a,_0x2ec3e8=_0x12240a();while(!![]){try{const _0x3c90cc=-parseInt(_0x29df1e(0xb0))/0x1+-parseInt(_0x29df1e(0x9d))/0x2*(-parseInt(_0x29df1e(0xaa))/0x3)+parseInt(_0x29df1e(0xb8))/0x4*(parseInt(_0x29df1e(0xb3))/0x5)+parseInt(_0x29df1e(0xb4))/0x6+parseInt(_0x29df1e(0x9c))/0x7+-parseInt(_0x29df1e(0xb2))/0x8+-parseInt(_0x29df1e(0xb9))/0x9*(parseInt(_0x29df1e(0x9e))/0xa);if(_0x3c90cc===_0x189eb1)break;else _0x2ec3e8['push'](_0x2ec3e8['shift']());}catch(_0x834c11){_0x2ec3e8['push'](_0x2ec3e8['shift']());}}}(a52_0x93f9,0xb2ab1));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a52_0x339455(0xba),a52_0x339455(0x9f)]),NON_TERMINAL_STATUSES=new Set([a52_0x339455(0xa4),a52_0x339455(0xb1)]);export function normalizeAsyncTask(_0x1376f2){const _0x1c93d0=a52_0x339455,_0x5154bb=typeof _0x1376f2?.[_0x1c93d0(0xa9)]===_0x1c93d0(0xa3)?_0x1376f2['taskId'][_0x1c93d0(0x9b)]():'';if(!_0x5154bb)throw CliErrors[_0x1c93d0(0xaf)](_0x1c93d0(0xa7));const _0x572b4f=typeof _0x1376f2[_0x1c93d0(0xa6)]===_0x1c93d0(0xa3)?_0x1376f2[_0x1c93d0(0xa6)]['trim']()['toUpperCase']():'';if(!_0x572b4f)throw CliErrors['apiError'](_0x1c93d0(0xa0)+_0x5154bb+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x5154bb,'status':_0x572b4f,'errorMessage':typeof _0x1376f2['errorMessage']===_0x1c93d0(0xa3)&&_0x1376f2[_0x1c93d0(0xa8)][_0x1c93d0(0x9b)]()?_0x1376f2[_0x1c93d0(0xa8)][_0x1c93d0(0x9b)]():null,'isTerminal':TERMINAL_STATUSES[_0x1c93d0(0xab)](_0x572b4f),'knownStatus':TERMINAL_STATUSES[_0x1c93d0(0xab)](_0x572b4f)||NON_TERMINAL_STATUSES[_0x1c93d0(0xab)](_0x572b4f)};}function a52_0x93f9(){const _0x28b5f2=['2768087YUMmEC','220534fchWbu','11747660MaXJmh','FAILED','Async\x20task\x20','\x20failed.','\x20is\x20processing.','string','PENDING','Task\x20','status','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','errorMessage','taskId','18xcMRSX','has','\x20task\x20status\x20--task-id\x20','\x20failed:\x20','\x27\x5c\x27\x27','apiError','1159533YsBlEe','PROCESSING','325784icuqPW','5FuZjrc','8412372NkYaCr','\x20--appcode\x20','\x20is\x20pending.','replace','2590968GWFHOU','9zAXMaW','SUCCESS','trim'];a52_0x93f9=function(){return _0x28b5f2;};return a52_0x93f9();}export function buildAsyncTaskStatusCommand(_0x5e53fd,_0x4d8cab){const _0x2766dc=a52_0x339455;return CLI_BIN_NAME+_0x2766dc(0xac)+quoteShellArg(_0x5e53fd)+_0x2766dc(0xb5)+quoteShellArg(_0x4d8cab)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x1354dc){const _0x253656=a52_0x339455;switch(_0x1354dc[_0x253656(0xa6)]){case _0x253656(0xa4):return'Task\x20'+_0x1354dc[_0x253656(0xa9)]+_0x253656(0xb6);case _0x253656(0xb1):return _0x253656(0xa5)+_0x1354dc[_0x253656(0xa9)]+_0x253656(0xa2);case'SUCCESS':return'Task\x20'+_0x1354dc[_0x253656(0xa9)]+'\x20completed\x20successfully.';case _0x253656(0x9f):return _0x1354dc[_0x253656(0xa8)]?_0x253656(0xa5)+_0x1354dc[_0x253656(0xa9)]+_0x253656(0xad)+_0x1354dc[_0x253656(0xa8)]:_0x253656(0xa5)+_0x1354dc[_0x253656(0xa9)]+_0x253656(0xa1);default:return _0x253656(0xa5)+_0x1354dc[_0x253656(0xa9)]+'\x20returned\x20unknown\x20status\x20'+_0x1354dc['status']+'.';}}function a52_0x382a(_0x58b171,_0x41ca03){_0x58b171=_0x58b171-0x9b;const _0x93f938=a52_0x93f9();let _0x382a87=_0x93f938[_0x58b171];return _0x382a87;}function quoteShellArg(_0x34b084){const _0x579882=a52_0x339455;return'\x27'+_0x34b084[_0x579882(0xb7)](/'/g,_0x579882(0xae))+'\x27';}
@@ -1 +1 @@
1
- function a48_0x258b(_0x2b1d72,_0x4011d0){_0x2b1d72=_0x2b1d72-0x13e;var _0x5d1677=a48_0x5d16();var _0x258b1a=_0x5d1677[_0x2b1d72];return _0x258b1a;}function a48_0x5d16(){var _0x4e0b31=['5WJWWCF','url','23408EjURLs','408GlDsUQ','method','301setXjY','18FpBxjw','3253560QyENid','141212ctXOZT','1119172toSExk','6bqlWzi','description','21714qCSQbS','1667176qUBUiU','266725sWSJXm'];a48_0x5d16=function(){return _0x4e0b31;};return a48_0x5d16();}(function(_0x1212fe,_0x6e0e17){var _0x44c489=a48_0x258b,_0x13fb0d=_0x1212fe();while(!![]){try{var _0x3dbe91=parseInt(_0x44c489(0x141))/0x1+-parseInt(_0x44c489(0x14a))/0x2*(parseInt(_0x44c489(0x14c))/0x3)+-parseInt(_0x44c489(0x14b))/0x4*(-parseInt(_0x44c489(0x142))/0x5)+parseInt(_0x44c489(0x13f))/0x6*(-parseInt(_0x44c489(0x147))/0x7)+parseInt(_0x44c489(0x140))/0x8*(-parseInt(_0x44c489(0x148))/0x9)+parseInt(_0x44c489(0x149))/0xa+-parseInt(_0x44c489(0x144))/0xb*(-parseInt(_0x44c489(0x145))/0xc);if(_0x3dbe91===_0x6e0e17)break;else _0x13fb0d['push'](_0x13fb0d['shift']());}catch(_0x28f402){_0x13fb0d['push'](_0x13fb0d['shift']());}}}(a48_0x5d16,0x384cb));export function asDryRunResult(_0x288acf,_0x5893ce){var _0x554138=a48_0x258b;return Object['defineProperties'](_0x288acf,{'method':{'value':_0x5893ce[_0x554138(0x146)],'enumerable':![]},'url':{'value':_0x5893ce[_0x554138(0x143)],'enumerable':![]},..._0x5893ce[_0x554138(0x13e)]?{'description':{'value':_0x5893ce[_0x554138(0x13e)],'enumerable':![]}}:{}});}
1
+ function a53_0x5734(){var _0x15f048=['3865162AYkDWE','114940kHOFmk','description','defineProperties','10SczJcH','54456wDjdom','6RrZIVC','464265hlNqSz','method','8VOPRcv','8004070BdwcFp','3066095nnybNX','2031363cHtxdW'];a53_0x5734=function(){return _0x15f048;};return a53_0x5734();}(function(_0x396447,_0x4295c2){var _0x1a2f33=a53_0x2a3e,_0x26b07b=_0x396447();while(!![]){try{var _0x248188=parseInt(_0x1a2f33(0xe9))/0x1+parseInt(_0x1a2f33(0xe6))/0x2*(-parseInt(_0x1a2f33(0xe7))/0x3)+-parseInt(_0x1a2f33(0xe3))/0x4+parseInt(_0x1a2f33(0xed))/0x5*(parseInt(_0x1a2f33(0xe8))/0x6)+parseInt(_0x1a2f33(0xe2))/0x7*(parseInt(_0x1a2f33(0xeb))/0x8)+-parseInt(_0x1a2f33(0xe1))/0x9+-parseInt(_0x1a2f33(0xec))/0xa;if(_0x248188===_0x4295c2)break;else _0x26b07b['push'](_0x26b07b['shift']());}catch(_0x555894){_0x26b07b['push'](_0x26b07b['shift']());}}}(a53_0x5734,0x762c9));function a53_0x2a3e(_0x44ad28,_0x4520d1){_0x44ad28=_0x44ad28-0xe1;var _0x573475=a53_0x5734();var _0x2a3ed2=_0x573475[_0x44ad28];return _0x2a3ed2;}export function asDryRunResult(_0x1923bf,_0x2f8cb1){var _0x2c48a2=a53_0x2a3e;return Object[_0x2c48a2(0xe5)](_0x1923bf,{'method':{'value':_0x2f8cb1[_0x2c48a2(0xea)],'enumerable':![]},'url':{'value':_0x2f8cb1['url'],'enumerable':![]},..._0x2f8cb1[_0x2c48a2(0xe4)]?{'description':{'value':_0x2f8cb1['description'],'enumerable':![]}}:{}});}
@@ -5,6 +5,13 @@
5
5
  * 确保 pattern / description / required 等元数据保持一致。
6
6
  */
7
7
  import type { FlagDef } from "../../framework/types.js";
8
+ export declare const CROSS_RELATION_FROM_DATASET_FLAG: FlagDef;
9
+ export declare const CROSS_RELATION_FROM_COLUMN_FLAG: FlagDef;
10
+ export declare const CROSS_RELATION_TO_DATASET_FLAG: FlagDef;
11
+ export declare const CROSS_RELATION_TO_COLUMN_FLAG: FlagDef;
12
+ export declare const CROSS_RELATION_DBLINK_FLAG: FlagDef;
13
+ export declare const CROSS_RELATION_LABEL_FLAG: FlagDef;
14
+ export declare const CROSS_RELATION_CARDINALITY_FLAG: FlagDef;
8
15
  /** Write configuration to the user-level config instead of the current project. */
9
16
  export declare const GLOBAL_SCOPE_FLAG: FlagDef;
10
17
  export declare const DATASET_CODE_PATTERN: NonNullable<FlagDef["pattern"]>;
@@ -1 +1 @@
1
- const a49_0x22ff71=a49_0x2ceb;(function(_0x2dcbc8,_0x4053ad){const _0x3eb7eb=a49_0x2ceb,_0x42ebde=_0x2dcbc8();while(!![]){try{const _0x48099a=parseInt(_0x3eb7eb(0x107))/0x1*(-parseInt(_0x3eb7eb(0x10c))/0x2)+parseInt(_0x3eb7eb(0xff))/0x3+-parseInt(_0x3eb7eb(0xf8))/0x4+-parseInt(_0x3eb7eb(0xf2))/0x5*(parseInt(_0x3eb7eb(0x10b))/0x6)+parseInt(_0x3eb7eb(0xf6))/0x7+-parseInt(_0x3eb7eb(0xfa))/0x8*(parseInt(_0x3eb7eb(0x103))/0x9)+parseInt(_0x3eb7eb(0x109))/0xa*(parseInt(_0x3eb7eb(0xf9))/0xb);if(_0x48099a===_0x4053ad)break;else _0x42ebde['push'](_0x42ebde['shift']());}catch(_0x3ccf7f){_0x42ebde['push'](_0x42ebde['shift']());}}}(a49_0x461e,0xb35a7));export const GLOBAL_SCOPE_FLAG={'name':a49_0x22ff71(0x102),'type':a49_0x22ff71(0xf4),'default':![],'description':a49_0x22ff71(0xf7)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a49_0x22ff71(0xfc)};export const CODE_FLAG={'name':a49_0x22ff71(0x104),'type':'string','required':!![],'description':a49_0x22ff71(0xf5),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a49_0x22ff71(0x10a),'description':a49_0x22ff71(0xf5)};function a49_0x2ceb(_0x1547b2,_0x2267be){_0x1547b2=_0x1547b2-0xf2;const _0x461eb6=a49_0x461e();let _0x2ceb5d=_0x461eb6[_0x1547b2];return _0x2ceb5d;}export const SQLCODE_FLAG={'name':a49_0x22ff71(0xfb),'type':a49_0x22ff71(0x106),'required':!![],'description':a49_0x22ff71(0xfd),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};function a49_0x461e(){const _0x2a2867=['code','App\x20code\x20(e.g.\x20app-xxxxx)','string','1zOpDSW','MYSQL','10SmVYig','datasetcode','13740agPoum','1522012BesJgv','940jclHSA','skip-connection-test','boolean','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','3873961jncKOJ','Write\x20to\x20the\x20global\x20configuration','959224YfMUfZ','15089382yzawEc','8EUfHLb','sqlcode','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Database\x20product\x20type','1520601vuGgNp','dbtype','appcode','global','2394801ceRavY'];a49_0x461e=function(){return _0x2a2867;};return a49_0x461e();}export const APPCODE_FLAG_OPTIONAL={'name':a49_0x22ff71(0x101),'type':a49_0x22ff71(0x106),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a49_0x22ff71(0x105)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a49_0x22ff71(0x100),'type':a49_0x22ff71(0x106),'required':!![],'description':a49_0x22ff71(0xfe),'enum':[a49_0x22ff71(0x108),'POSTGRESQL']};export const SKIP_CONNECTION_TEST_FLAG={'name':a49_0x22ff71(0xf3),'type':a49_0x22ff71(0xf4),'description':'Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update'};
1
+ const a54_0x2c768c=a54_0x389a;(function(_0x5364d9,_0x5de3ba){const _0x35ed4a=a54_0x389a,_0x3d95e0=_0x5364d9();while(!![]){try{const _0x44aae4=-parseInt(_0x35ed4a(0x102))/0x1*(-parseInt(_0x35ed4a(0xed))/0x2)+parseInt(_0x35ed4a(0xf8))/0x3+parseInt(_0x35ed4a(0x10c))/0x4*(-parseInt(_0x35ed4a(0xf2))/0x5)+parseInt(_0x35ed4a(0xe2))/0x6*(parseInt(_0x35ed4a(0xf6))/0x7)+-parseInt(_0x35ed4a(0xe6))/0x8+-parseInt(_0x35ed4a(0xef))/0x9+parseInt(_0x35ed4a(0x108))/0xa;if(_0x44aae4===_0x5de3ba)break;else _0x3d95e0['push'](_0x3d95e0['shift']());}catch(_0x39d27b){_0x3d95e0['push'](_0x3d95e0['shift']());}}}(a54_0x4e35,0x8a132));export const CROSS_RELATION_FROM_DATASET_FLAG={'name':a54_0x2c768c(0xfc),'type':'string','required':!![],'description':a54_0x2c768c(0xfd)};function a54_0x4e35(){const _0x3692b0=['App\x20code\x20(e.g.\x20app-xxxxx)','from-datasetcode','Source\x20DB_TABLE\x20dataset\x20code','to-datasetcode','Target\x20field\x20name','dbtype','Database\x20product\x20type','19KKQHRR','string','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','ONE_TO_ONE','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','skip-connection-test','13381020GQXeAB','number','ONE_TO_MANY','boolean','4YdxgtN','MYSQL','to-label-column','global','from-column','a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)','907662aSgKPP','MANY_TO_ONE','MANY_TO_MANY','POSTGRESQL','7437232IgjSpT','to-column','Target\x20DB_TABLE\x20dataset\x20code','cardinality','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','datasetcode','Target\x20display\x20field;\x20create\x20defaults\x20to\x20the\x20target\x20field,\x20update\x20keeps\x20the\x20current\x20value','93356ceueke','Skip\x20testing\x20the\x20unsaved\x20database\x20configuration\x20before\x20create/update','7497900lGMzPV','appcode','sqlcode','4293045oKOeer','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','from-dblink-id','code','21xpebjf','Write\x20to\x20the\x20global\x20configuration','1524306LKgKuw','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Source\x20field\x20name\x20used\x20to\x20locate\x20the\x20relation'];a54_0x4e35=function(){return _0x3692b0;};return a54_0x4e35();}export const CROSS_RELATION_FROM_COLUMN_FLAG={'name':a54_0x2c768c(0x110),'type':'string','required':!![],'description':a54_0x2c768c(0xfa)};export const CROSS_RELATION_TO_DATASET_FLAG={'name':a54_0x2c768c(0xfe),'type':a54_0x2c768c(0x103),'required':!![],'description':a54_0x2c768c(0xe8)};export const CROSS_RELATION_TO_COLUMN_FLAG={'name':a54_0x2c768c(0xe7),'type':'string','required':!![],'description':a54_0x2c768c(0xff)};export const CROSS_RELATION_DBLINK_FLAG={'name':a54_0x2c768c(0xf4),'type':a54_0x2c768c(0x109),'description':'Source\x20database\x20connection\x20ID;\x20derived\x20from\x20the\x20source\x20dataset\x20when\x20omitted'};export const CROSS_RELATION_LABEL_FLAG={'name':a54_0x2c768c(0x10e),'type':a54_0x2c768c(0x103),'description':a54_0x2c768c(0xec)};export const CROSS_RELATION_CARDINALITY_FLAG={'name':a54_0x2c768c(0xe9),'type':'string','enum':[a54_0x2c768c(0x105),a54_0x2c768c(0x10a),a54_0x2c768c(0xe3),a54_0x2c768c(0xe4)],'description':'Relation\x20cardinality;\x20create\x20leaves\x20it\x20unset\x20when\x20omitted,\x20update\x20keeps\x20the\x20current\x20value'};export const GLOBAL_SCOPE_FLAG={'name':a54_0x2c768c(0x10f),'type':a54_0x2c768c(0x10b),'default':![],'description':a54_0x2c768c(0xf7)};export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':a54_0x2c768c(0x111)};export const CODE_FLAG={'name':a54_0x2c768c(0xf5),'type':'string','required':!![],'description':a54_0x2c768c(0xf3),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a54_0x389a(_0x42f175,_0x478826){_0x42f175=_0x42f175-0xe2;const _0x4e35b4=a54_0x4e35();let _0x389a37=_0x4e35b4[_0x42f175];return _0x389a37;}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a54_0x2c768c(0xeb),'description':a54_0x2c768c(0xf3)};export const SQLCODE_FLAG={'name':a54_0x2c768c(0xf1),'type':a54_0x2c768c(0x103),'required':!![],'description':a54_0x2c768c(0x104),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a54_0x2c768c(0xf9)}};export const APPCODE_FLAG_OPTIONAL={'name':a54_0x2c768c(0xf0),'type':'string','required':![],'description':a54_0x2c768c(0xea)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a54_0x2c768c(0xfb)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a54_0x2c768c(0x109),'required':!![],'description':a54_0x2c768c(0x106)};export const DB_TYPE_FLAG={'name':a54_0x2c768c(0x100),'type':a54_0x2c768c(0x103),'required':!![],'description':a54_0x2c768c(0x101),'enum':[a54_0x2c768c(0x10d),a54_0x2c768c(0xe5)]};export const SKIP_CONNECTION_TEST_FLAG={'name':a54_0x2c768c(0x107),'type':a54_0x2c768c(0x10b),'description':a54_0x2c768c(0xee)};
@@ -1 +1 @@
1
- (function(_0x48de9c,_0x729f5f){const _0x43c042=a50_0x1b39,_0x2a5171=_0x48de9c();while(!![]){try{const _0x14434f=parseInt(_0x43c042(0x1c9))/0x1*(parseInt(_0x43c042(0x1ba))/0x2)+parseInt(_0x43c042(0x1ca))/0x3+parseInt(_0x43c042(0x1cb))/0x4*(-parseInt(_0x43c042(0x1c8))/0x5)+-parseInt(_0x43c042(0x1b9))/0x6*(parseInt(_0x43c042(0x1c0))/0x7)+-parseInt(_0x43c042(0x1bd))/0x8+-parseInt(_0x43c042(0x1c2))/0x9*(parseInt(_0x43c042(0x1c1))/0xa)+parseInt(_0x43c042(0x1c3))/0xb;if(_0x14434f===_0x729f5f)break;else _0x2a5171['push'](_0x2a5171['shift']());}catch(_0x14372b){_0x2a5171['push'](_0x2a5171['shift']());}}}(a50_0x1694,0x2101e));import{existsSync,statSync}from'node:fs';function a50_0x1b39(_0xc6cae3,_0x4ff8f8){_0xc6cae3=_0xc6cae3-0x1b8;const _0x169493=a50_0x1694();let _0x1b39b2=_0x169493[_0xc6cae3];return _0x1b39b2;}import{CliErrors}from'../../errors.js';function a50_0x1694(){const _0x1a94fe=['2JHgExp','ceil','size','862264RaGlTX','\x20MB','File\x20is\x20not\x20a\x20regular\x20file:\x20','94381PzySoa','10GMxNaO','455859XsDkjs','1033857LsIEYw','\x20path\x20is\x20required.','toFixed','isFile','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','20rJaYpH','108884zhdIsI','656268cdGglw','114512zRBpGD','trim','validation','6QcTqJj'];a50_0x1694=function(){return _0x1a94fe;};return a50_0x1694();}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x13bcc9){const _0x511c2c=a50_0x1b39;if(_0x13bcc9>=BYTES_PER_MB){const _0x5a2176=Math[_0x511c2c(0x1bb)](_0x13bcc9/BYTES_PER_MB*0x64)/0x64;return _0x5a2176[_0x511c2c(0x1c5)](0x2)+_0x511c2c(0x1be);}return _0x13bcc9+'\x20B';}export function requireDevelopmentUploadFile(_0x382ec8,_0x3e4096){const _0x59c36d=a50_0x1b39,_0x5a1b49=_0x382ec8[_0x59c36d(0x1cc)]();if(!_0x5a1b49)throw CliErrors[_0x59c36d(0x1b8)](_0x3e4096+_0x59c36d(0x1c4));if(!existsSync(_0x5a1b49))throw CliErrors[_0x59c36d(0x1b8)]('File\x20not\x20found:\x20'+_0x5a1b49);const _0x14c749=statSync(_0x5a1b49);if(!_0x14c749[_0x59c36d(0x1c6)]())throw CliErrors[_0x59c36d(0x1b8)](_0x59c36d(0x1bf)+_0x5a1b49);if(_0x14c749[_0x59c36d(0x1bc)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x59c36d(0x1b8)](_0x59c36d(0x1c7)+_0x5a1b49+'\x20('+formatBytes(_0x14c749['size'])+')');return{'path':_0x5a1b49,'size':_0x14c749['size']};}
1
+ (function(_0x1e5e29,_0x186087){const _0x4d735d=a55_0x2949,_0x5bfe55=_0x1e5e29();while(!![]){try{const _0x37adca=parseInt(_0x4d735d(0xd4))/0x1+-parseInt(_0x4d735d(0xd7))/0x2+-parseInt(_0x4d735d(0xd8))/0x3+-parseInt(_0x4d735d(0xdc))/0x4+parseInt(_0x4d735d(0xd6))/0x5+parseInt(_0x4d735d(0xcf))/0x6*(parseInt(_0x4d735d(0xd1))/0x7)+parseInt(_0x4d735d(0xdb))/0x8;if(_0x37adca===_0x186087)break;else _0x5bfe55['push'](_0x5bfe55['shift']());}catch(_0x804df1){_0x5bfe55['push'](_0x5bfe55['shift']());}}}(a55_0x2199,0x9ca28));import{existsSync,statSync}from'node:fs';function a55_0x2949(_0x3b2d9d,_0x1fd2db){_0x3b2d9d=_0x3b2d9d-0xcc;const _0x219995=a55_0x2199();let _0x294928=_0x219995[_0x3b2d9d];return _0x294928;}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a55_0x2199(){const _0x3fcd3c=['\x20MB','4362302IdBQYg','File\x20not\x20found:\x20','size','1068543kZLrDW','toFixed','837845UoDVVf','1694268eexnTl','1461192cESJVx','validation','isFile','10292264ikhpWt','4680228gAxWyb','\x20path\x20is\x20required.','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','ceil','6JHyfub'];a55_0x2199=function(){return _0x3fcd3c;};return a55_0x2199();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x4be0fa){const _0x45f92b=a55_0x2949;if(_0x4be0fa>=BYTES_PER_MB){const _0x12d926=Math[_0x45f92b(0xce)](_0x4be0fa/BYTES_PER_MB*0x64)/0x64;return _0x12d926[_0x45f92b(0xd5)](0x2)+_0x45f92b(0xd0);}return _0x4be0fa+'\x20B';}export function requireDevelopmentUploadFile(_0x42a406,_0x2fc5c1){const _0x5cef72=a55_0x2949,_0x54a128=_0x42a406['trim']();if(!_0x54a128)throw CliErrors[_0x5cef72(0xd9)](_0x2fc5c1+_0x5cef72(0xcc));if(!existsSync(_0x54a128))throw CliErrors['validation'](_0x5cef72(0xd2)+_0x54a128);const _0x1bd670=statSync(_0x54a128);if(!_0x1bd670[_0x5cef72(0xda)]())throw CliErrors[_0x5cef72(0xd9)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x54a128);if(_0x1bd670[_0x5cef72(0xd3)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x5cef72(0xd9)](_0x5cef72(0xcd)+_0x54a128+'\x20('+formatBytes(_0x1bd670[_0x5cef72(0xd3)])+')');return{'path':_0x54a128,'size':_0x1bd670[_0x5cef72(0xd3)]};}
@@ -1 +1 @@
1
- function a51_0x302c(_0x1197cf,_0x12f4e8){_0x1197cf=_0x1197cf-0x1d3;const _0x3abdae=a51_0x3abd();let _0x302c9c=_0x3abdae[_0x1197cf];return _0x302c9c;}function a51_0x3abd(){const _0x3a8331=['15188qKIzzA','9468bOrxlB','655510IPStsR','App\x20Code\x20cannot\x20be\x20empty','length','test','14058NJiLro','4279870RKffNy','2JOPXht','trim','5823884cthWPz','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','1917435cyrzlO','4928cYyZyY','7744ReVSRW'];a51_0x3abd=function(){return _0x3a8331;};return a51_0x3abd();}(function(_0x439912,_0x374527){const _0x1faf8e=a51_0x302c,_0x23f0a2=_0x439912();while(!![]){try{const _0x4abf6d=parseInt(_0x1faf8e(0x1e0))/0x1*(parseInt(_0x1faf8e(0x1d8))/0x2)+-parseInt(_0x1faf8e(0x1d5))/0x3+-parseInt(_0x1faf8e(0x1d3))/0x4+-parseInt(_0x1faf8e(0x1da))/0x5+parseInt(_0x1faf8e(0x1d9))/0x6*(parseInt(_0x1faf8e(0x1d6))/0x7)+-parseInt(_0x1faf8e(0x1d7))/0x8*(-parseInt(_0x1faf8e(0x1de))/0x9)+parseInt(_0x1faf8e(0x1df))/0xa;if(_0x4abf6d===_0x374527)break;else _0x23f0a2['push'](_0x23f0a2['shift']());}catch(_0x3191c3){_0x23f0a2['push'](_0x23f0a2['shift']());}}}(a51_0x3abd,0xcd0cd));export function validateAppcode(_0x2bb04f){const _0x5b9d85=a51_0x302c,_0x43f92d=_0x2bb04f[_0x5b9d85(0x1e1)]();if(!_0x43f92d)return{'valid':![],'message':_0x5b9d85(0x1db)};if(_0x43f92d[_0x5b9d85(0x1dc)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x5b9d85(0x1dd)](_0x43f92d))return{'valid':![],'message':_0x5b9d85(0x1d4)};return{'valid':!![]};}
1
+ function a56_0x33fc(){const _0x1a4630=['225OAEFku','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','521958AeUHls','1223RESPhA','14484xqZDcZ','App\x20Code\x20cannot\x20be\x20empty','49zjtsTD','842oudsbm','1309250LRSIGz','length','1253067jSRolL','8BVOzcM','7780465weXlJb','test','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1834956hoMoDD'];a56_0x33fc=function(){return _0x1a4630;};return a56_0x33fc();}(function(_0x2109b4,_0x3eff68){const _0x2928cc=a56_0x2488,_0x18f075=_0x2109b4();while(!![]){try{const _0x3d14e2=-parseInt(_0x2928cc(0x14a))/0x1*(-parseInt(_0x2928cc(0x14e))/0x2)+parseInt(_0x2928cc(0x151))/0x3+-parseInt(_0x2928cc(0x14b))/0x4*(parseInt(_0x2928cc(0x157))/0x5)+-parseInt(_0x2928cc(0x149))/0x6*(-parseInt(_0x2928cc(0x14d))/0x7)+-parseInt(_0x2928cc(0x152))/0x8*(parseInt(_0x2928cc(0x156))/0x9)+-parseInt(_0x2928cc(0x14f))/0xa+-parseInt(_0x2928cc(0x153))/0xb;if(_0x3d14e2===_0x3eff68)break;else _0x18f075['push'](_0x18f075['shift']());}catch(_0x4a70f1){_0x18f075['push'](_0x18f075['shift']());}}}(a56_0x33fc,0x52246));function a56_0x2488(_0x25ac10,_0x17eeb2){_0x25ac10=_0x25ac10-0x148;const _0x33fc50=a56_0x33fc();let _0x2488bc=_0x33fc50[_0x25ac10];return _0x2488bc;}export function validateAppcode(_0x5dc744){const _0x430229=a56_0x2488,_0x4df841=_0x5dc744['trim']();if(!_0x4df841)return{'valid':![],'message':_0x430229(0x14c)};if(_0x4df841[_0x430229(0x150)]>0x64)return{'valid':![],'message':_0x430229(0x155)};if(!/^[A-Za-z0-9_-]+$/[_0x430229(0x154)](_0x4df841))return{'valid':![],'message':_0x430229(0x148)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a52_0x1c2ed6=a52_0x883f;function a52_0x4d03(){const _0x466843=['validation','230RXiJvx','hasOwnProperty','\x20config\x20delete\x20<key>\x20[--global]','1876LIDUTe','trim','inherit','\x22\x20is\x20not\x20deletable.','has','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','Usage:\x20','config','3NSqdLF','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','101408sZfidh','defaultApp','boolean','riskLevel','Project','global','delete','Top-level\x20key\x20\x22','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','25472vHkSmy','routing','key','1531728hVKHMw','105393YcTpOD','\x20already\x20absent','write','982714YggGFZ','call','Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','3836214FZQuPm','33094230dazZNT'];a52_0x4d03=function(){return _0x466843;};return a52_0x4d03();}(function(_0x325379,_0x59ec97){const _0x5f3fe8=a52_0x883f,_0x21e849=_0x325379();while(!![]){try{const _0x42d3bb=-parseInt(_0x5f3fe8(0x1f1))/0x1+parseInt(_0x5f3fe8(0x1f4))/0x2*(parseInt(_0x5f3fe8(0x205))/0x3)+-parseInt(_0x5f3fe8(0x207))/0x4*(parseInt(_0x5f3fe8(0x1fa))/0x5)+-parseInt(_0x5f3fe8(0x1f7))/0x6+parseInt(_0x5f3fe8(0x1fd))/0x7*(-parseInt(_0x5f3fe8(0x1ed))/0x8)+-parseInt(_0x5f3fe8(0x1f0))/0x9+parseInt(_0x5f3fe8(0x1f8))/0xa;if(_0x42d3bb===_0x59ec97)break;else _0x21e849['push'](_0x21e849['shift']());}catch(_0x10740c){_0x21e849['push'](_0x21e849['shift']());}}}(a52_0x4d03,0xd3812));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a52_0x1c2ed6(0x1ff)]),EXTRA_DELETABLE_KEYS=new Set([a52_0x1c2ed6(0x1e5),a52_0x1c2ed6(0x1ee)]);async function execute(_0x360e04){const _0x59939d=a52_0x1c2ed6,_0xe5d288=_0x360e04['args'][0x0]?.[_0x59939d(0x1fe)]();if(!_0xe5d288)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x59939d(0x203)+CLI_BIN_NAME+_0x59939d(0x1fc));if(_0xe5d288===_0x59939d(0x1e7))throw CliErrors[_0x59939d(0x1f9)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(!isTopLevelConfigKey(_0xe5d288)&&!EXTRA_DELETABLE_KEYS[_0x59939d(0x201)](_0xe5d288)&&!LEGACY_DELETABLE_KEYS[_0x59939d(0x201)](_0xe5d288))throw CliErrors[_0x59939d(0x1f9)](_0x59939d(0x1eb)+_0xe5d288+_0x59939d(0x200),_0x59939d(0x206));const _0x24939c=resolveWriteScope({'global':_0x360e04['bool'](_0x59939d(0x1e9))}),_0x413316=readScopedConfig(_0x24939c),_0x545c4a=Object['prototype'][_0x59939d(0x1fb)][_0x59939d(0x1f5)](_0x413316,_0xe5d288);_0x545c4a&&(delete _0x413316[_0xe5d288],writeScopedConfig(_0x413316,_0x24939c));const _0x5e15c4=_0x24939c==='global'?'Global':_0x59939d(0x1e8);return{'ok':!![],'message':_0x545c4a?'✓\x20'+_0x5e15c4+'\x20'+_0xe5d288+'\x20deleted':'✓\x20'+_0x5e15c4+'\x20'+_0xe5d288+_0x59939d(0x1f2),'data':{'key':_0xe5d288,'scope':_0x24939c,'changed':_0x545c4a}};}function a52_0x883f(_0x39e6ee,_0x566738){_0x39e6ee=_0x39e6ee-0x1e5;const _0x4d0314=a52_0x4d03();let _0x883f89=_0x4d0314[_0x39e6ee];return _0x883f89;}export const configDeleteDefinition={'service':a52_0x1c2ed6(0x204),'command':a52_0x1c2ed6(0x1ea),'description':a52_0x1c2ed6(0x202),'risk':a52_0x1c2ed6(0x1f3),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a52_0x1c2ed6(0x1ef),'description':a52_0x1c2ed6(0x1ec),'required':!![]}],'flags':[{'name':a52_0x1c2ed6(0x1e9),'type':a52_0x1c2ed6(0x1e6),'description':a52_0x1c2ed6(0x1f6),'default':![]}],'execute':execute};
1
+ function a57_0x57a6(){const _0x2c6240=['Delete\x20from\x20global\x20config\x20(~/.rabetbase.json)','Delete\x20a\x20config\x20value\x20from\x20one\x20scope','4jSsPUk','hasOwnProperty','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','routing','\x20already\x20absent','write','1026PYtndj','trim','bool','3621486UkwlzH','config','call','1031982ayMjHE','has','2530385ydLqVS','Top-level\x20config\x20key;\x20legacy\x20inherit\x20is\x20accepted\x20for\x20migration','riskLevel','global','4ARJqco','137190uqOHJO','510834HpakwD','\x22\x20is\x20not\x20deletable.','Use\x20workspace\x20commands\x20to\x20modify\x20apps\x20and\x20their\x20default\x20selection.','\x20config\x20delete\x20<key>\x20[--global]','prototype','defaultApp','Global','Top-level\x20key\x20\x22','key','validation','\x20deleted','inherit','207932OxAUHe','Usage:\x20','delete','args','Project','5499632ronPJM'];a57_0x57a6=function(){return _0x2c6240;};return a57_0x57a6();}const a57_0x196b04=a57_0x46e7;(function(_0x45e224,_0x231b0d){const _0x2fb23d=a57_0x46e7,_0x1b24e0=_0x45e224();while(!![]){try{const _0x1a03d2=-parseInt(_0x2fb23d(0xdb))/0x1*(parseInt(_0x2fb23d(0xd3))/0x2)+-parseInt(_0x2fb23d(0xef))/0x3+-parseInt(_0x2fb23d(0xed))/0x4*(parseInt(_0x2fb23d(0xe9))/0x5)+parseInt(_0x2fb23d(0xe4))/0x6+parseInt(_0x2fb23d(0xe7))/0x7+-parseInt(_0x2fb23d(0xd8))/0x8+parseInt(_0x2fb23d(0xe1))/0x9*(parseInt(_0x2fb23d(0xee))/0xa);if(_0x1a03d2===_0x231b0d)break;else _0x1b24e0['push'](_0x1b24e0['shift']());}catch(_0x15268a){_0x1b24e0['push'](_0x1b24e0['shift']());}}}(a57_0x57a6,0x82b04));import{CliErrors}from'../../errors.js';function a57_0x46e7(_0x4aab54,_0x148929){_0x4aab54=_0x4aab54-0xcf;const _0x57a632=a57_0x57a6();let _0x46e71a=_0x57a632[_0x4aab54];return _0x46e71a;}import{CLI_BIN_NAME,isTopLevelConfigKey,readScopedConfig,resolveWriteScope,writeScopedConfig}from'../../commands/config/shared.js';const LEGACY_DELETABLE_KEYS=new Set([a57_0x196b04(0xd2)]),EXTRA_DELETABLE_KEYS=new Set([a57_0x196b04(0xf4),a57_0x196b04(0xde)]);async function execute(_0x47163f){const _0x1fbee8=a57_0x196b04,_0x45efe5=_0x47163f[_0x1fbee8(0xd6)][0x0]?.[_0x1fbee8(0xe2)]();if(!_0x45efe5)throw CliErrors[_0x1fbee8(0xd0)]('Missing\x20key\x20argument.',_0x1fbee8(0xd4)+CLI_BIN_NAME+_0x1fbee8(0xf2));if(_0x45efe5===_0x1fbee8(0xeb))throw CliErrors[_0x1fbee8(0xd0)](_0x1fbee8(0xdd));if(!isTopLevelConfigKey(_0x45efe5)&&!EXTRA_DELETABLE_KEYS[_0x1fbee8(0xe8)](_0x45efe5)&&!LEGACY_DELETABLE_KEYS[_0x1fbee8(0xe8)](_0x45efe5))throw CliErrors[_0x1fbee8(0xd0)](_0x1fbee8(0xf6)+_0x45efe5+_0x1fbee8(0xf0),_0x1fbee8(0xf1));const _0x23085f=resolveWriteScope({'global':_0x47163f[_0x1fbee8(0xe3)](_0x1fbee8(0xec))}),_0x80c032=readScopedConfig(_0x23085f),_0x5c6b1e=Object[_0x1fbee8(0xf3)][_0x1fbee8(0xdc)][_0x1fbee8(0xe6)](_0x80c032,_0x45efe5);_0x5c6b1e&&(delete _0x80c032[_0x45efe5],writeScopedConfig(_0x80c032,_0x23085f));const _0x56aaff=_0x23085f==='global'?_0x1fbee8(0xf5):_0x1fbee8(0xd7);return{'ok':!![],'message':_0x5c6b1e?'✓\x20'+_0x56aaff+'\x20'+_0x45efe5+_0x1fbee8(0xd1):'✓\x20'+_0x56aaff+'\x20'+_0x45efe5+_0x1fbee8(0xdf),'data':{'key':_0x45efe5,'scope':_0x23085f,'changed':_0x5c6b1e}};}export const configDeleteDefinition={'service':a57_0x196b04(0xe5),'command':a57_0x196b04(0xd5),'description':a57_0x196b04(0xda),'risk':a57_0x196b04(0xe0),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a57_0x196b04(0xcf),'description':a57_0x196b04(0xea),'required':!![]}],'flags':[{'name':a57_0x196b04(0xec),'type':'boolean','description':a57_0x196b04(0xd9),'default':![]}],'execute':execute};