@lovrabet/rabetbase-cli 2.3.16-beta.7 → 2.4.1-beta.1

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 (435) hide show
  1. package/README.md +4 -10
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/react/create.d.ts +2 -0
  142. package/lib/commands/page/react/create.js +1 -0
  143. package/lib/commands/page/react/detail.d.ts +2 -0
  144. package/lib/commands/page/react/detail.js +1 -0
  145. package/lib/commands/page/react/list.d.ts +2 -0
  146. package/lib/commands/page/react/list.js +1 -0
  147. package/lib/commands/page/react/publish.d.ts +2 -0
  148. package/lib/commands/page/react/publish.js +1 -0
  149. package/lib/commands/page/react/shared.d.ts +78 -0
  150. package/lib/commands/page/react/shared.js +1 -0
  151. package/lib/commands/page/react/syntax.d.ts +18 -0
  152. package/lib/commands/page/react/syntax.js +1 -0
  153. package/lib/commands/page/react/template.d.ts +8 -0
  154. package/lib/commands/page/react/template.js +1 -0
  155. package/lib/commands/page/react/update.d.ts +2 -0
  156. package/lib/commands/page/react/update.js +1 -0
  157. package/lib/commands/page/relation-audit.js +1 -1
  158. package/lib/commands/page/restore.js +1 -1
  159. package/lib/commands/page/shared.d.ts +1 -0
  160. package/lib/commands/page/shared.js +1 -1
  161. package/lib/commands/page/standard-page-status.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/permit/index.js +1 -1
  164. package/lib/commands/permit/page-get.js +1 -1
  165. package/lib/commands/permit/page-set.js +1 -1
  166. package/lib/commands/permit/role-apis-set.js +1 -1
  167. package/lib/commands/permit/role-menus-set.js +1 -1
  168. package/lib/commands/permit/role-menus.js +1 -1
  169. package/lib/commands/permit/shared.js +1 -1
  170. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  171. package/lib/commands/project/create/format-elapsed.js +1 -1
  172. package/lib/commands/project/create/main.js +1 -1
  173. package/lib/commands/project/create/non-interactive.js +1 -1
  174. package/lib/commands/project/create/project-template-path.js +1 -1
  175. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  176. package/lib/commands/project/create/use-format-code.js +1 -1
  177. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  178. package/lib/commands/project/index.js +1 -1
  179. package/lib/commands/project/upgrade.js +1 -1
  180. package/lib/commands/registry.js +1 -1
  181. package/lib/commands/role/create.js +1 -1
  182. package/lib/commands/role/delete.js +1 -1
  183. package/lib/commands/role/detail.js +1 -1
  184. package/lib/commands/role/index.js +1 -1
  185. package/lib/commands/role/list.js +1 -1
  186. package/lib/commands/role/shared.js +1 -1
  187. package/lib/commands/role/update.js +1 -1
  188. package/lib/commands/role/user-add.js +1 -1
  189. package/lib/commands/role/user-remove.js +1 -1
  190. package/lib/commands/role/user-resolve.js +1 -1
  191. package/lib/commands/run/index.js +1 -1
  192. package/lib/commands/schema.js +1 -1
  193. package/lib/commands/sql/create.js +1 -1
  194. package/lib/commands/sql/delete.js +1 -1
  195. package/lib/commands/sql/detail.js +1 -1
  196. package/lib/commands/sql/exec.js +1 -1
  197. package/lib/commands/sql/index.js +1 -1
  198. package/lib/commands/sql/list.js +1 -1
  199. package/lib/commands/sql/pull.js +1 -1
  200. package/lib/commands/sql/push.js +1 -1
  201. package/lib/commands/sql/shared.js +1 -1
  202. package/lib/commands/sql/status.js +1 -1
  203. package/lib/commands/sql/validate.js +1 -1
  204. package/lib/commands/task/index.js +1 -1
  205. package/lib/commands/task/status.js +1 -1
  206. package/lib/commands/tenant/index.js +1 -1
  207. package/lib/commands/tenant/members-list.js +1 -1
  208. package/lib/commands/tenant/shared.js +1 -1
  209. package/lib/commands/user-account/dingding-sandbox-bind.d.ts +2 -0
  210. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -0
  211. package/lib/commands/user-account/index.d.ts +2 -0
  212. package/lib/commands/user-account/index.js +1 -0
  213. package/lib/commands/workspace/add.js +1 -1
  214. package/lib/commands/workspace/index.js +1 -1
  215. package/lib/commands/workspace/remove.js +1 -1
  216. package/lib/config/schema.js +1 -1
  217. package/lib/constant/cdn.js +1 -1
  218. package/lib/constant/cli.js +1 -1
  219. package/lib/constant/defaults.js +1 -1
  220. package/lib/constant/domain.js +1 -1
  221. package/lib/constant/env.js +1 -1
  222. package/lib/constant/output.js +1 -1
  223. package/lib/constant/paths.js +1 -1
  224. package/lib/constant/risk.js +1 -1
  225. package/lib/context/app-resolver.js +1 -1
  226. package/lib/context/auth-resolver.js +1 -1
  227. package/lib/context/config-loader.js +1 -1
  228. package/lib/context.js +1 -1
  229. package/lib/core/alias-resolver.js +1 -1
  230. package/lib/core/api-client.d.ts +117 -0
  231. package/lib/core/api-client.js +1 -1
  232. package/lib/core/bff/config.js +1 -1
  233. package/lib/core/bff/file-system.js +1 -1
  234. package/lib/core/bff/hash.js +1 -1
  235. package/lib/core/bff/lock.js +1 -1
  236. package/lib/core/bff/utils.js +1 -1
  237. package/lib/core/db-resolver.js +1 -1
  238. package/lib/core/page/file-system.js +1 -1
  239. package/lib/core/page/hash.js +1 -1
  240. package/lib/core/page/lock.js +1 -1
  241. package/lib/core/sql-index-auditor.js +1 -1
  242. package/lib/core/sql-sync/config.js +1 -1
  243. package/lib/core/sql-sync/file-system.js +1 -1
  244. package/lib/core/sql-sync/hash.js +1 -1
  245. package/lib/core/sql-sync/lock.js +1 -1
  246. package/lib/core/sql-sync/utils.js +1 -1
  247. package/lib/core/sql-validator.js +1 -1
  248. package/lib/errors.js +1 -1
  249. package/lib/framework/build-all-flags.js +1 -1
  250. package/lib/framework/error-output.js +1 -1
  251. package/lib/framework/explicit-yes.js +1 -1
  252. package/lib/framework/flags.js +1 -1
  253. package/lib/framework/help.js +1 -1
  254. package/lib/framework/index.js +1 -1
  255. package/lib/framework/output.js +1 -1
  256. package/lib/framework/response.js +1 -1
  257. package/lib/framework/runner-alias.js +1 -1
  258. package/lib/framework/runner.js +1 -1
  259. package/lib/framework/schema-export.js +1 -1
  260. package/lib/framework/types.js +1 -1
  261. package/lib/generated/build-info.d.ts +4 -4
  262. package/lib/generated/build-info.js +1 -1
  263. package/lib/help.js +1 -1
  264. package/lib/postinstall.d.ts +3 -0
  265. package/lib/postinstall.js +1 -0
  266. package/lib/runtime/confirmation.js +1 -1
  267. package/lib/runtime/event.js +1 -1
  268. package/lib/runtime/index.js +1 -1
  269. package/lib/runtime/queue.js +1 -1
  270. package/lib/runtime/resolve.js +1 -1
  271. package/lib/skills/builtin-skill.d.ts +37 -0
  272. package/lib/skills/builtin-skill.js +1 -0
  273. package/lib/skills/main.js +1 -1
  274. package/lib/skills/npx-skills-add.d.ts +4 -2
  275. package/lib/skills/npx-skills-add.js +1 -1
  276. package/lib/skills/skill-presence.js +1 -1
  277. package/lib/telemetry/cli-command-trace.js +1 -1
  278. package/lib/telemetry/cli-help-trace.js +1 -1
  279. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  280. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  281. package/lib/telemetry/send-cli-trace-log.js +1 -1
  282. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  283. package/lib/utils/ai_config.js +1 -1
  284. package/lib/utils/apply-jq-filter.js +1 -1
  285. package/lib/utils/cdn-config.js +1 -1
  286. package/lib/utils/check-sdk-version.js +1 -1
  287. package/lib/utils/cli-version-check.js +1 -1
  288. package/lib/utils/cli-version-policy.js +1 -1
  289. package/lib/utils/config.js +1 -1
  290. package/lib/utils/copy-directory.js +1 -1
  291. package/lib/utils/entity-with-id.js +1 -1
  292. package/lib/utils/file-utils.js +1 -1
  293. package/lib/utils/guides-cdn.js +1 -1
  294. package/lib/utils/http-client.js +1 -1
  295. package/lib/utils/is-non-interactive.js +1 -1
  296. package/lib/utils/logger.js +1 -1
  297. package/lib/utils/params.js +1 -1
  298. package/lib/utils/platform.js +1 -1
  299. package/lib/utils/rules-cdn.js +1 -1
  300. package/lib/utils/sleep.js +1 -1
  301. package/lib/utils/template-replacer.js +1 -1
  302. package/lib/utils/update-notice.js +1 -1
  303. package/lib/utils/version.js +1 -1
  304. package/lib/utils/with-active-cookie.js +1 -1
  305. package/lib/utils/write-cli-side-channel.js +1 -1
  306. package/package.json +9 -3
  307. package/scripts/postinstall.mjs +24 -0
  308. package/skills/rabetbase/SKILL.md +493 -0
  309. package/skills/rabetbase/guides/backend-function.md +835 -0
  310. package/skills/rabetbase/guides/best-practices.md +137 -0
  311. package/skills/rabetbase/guides/bff-creation-workflow.md +148 -0
  312. package/skills/rabetbase/guides/conflict-detection.md +119 -0
  313. package/skills/rabetbase/guides/data-api-guidelines.md +414 -0
  314. package/skills/rabetbase/guides/database-connection-workflow.md +169 -0
  315. package/skills/rabetbase/guides/frontend-development.md +179 -0
  316. package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +495 -0
  317. package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +137 -0
  318. package/skills/rabetbase/guides/page-development-workflow.md +187 -0
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +184 -0
  320. package/skills/rabetbase/guides/role-permit-workflow.md +127 -0
  321. package/skills/rabetbase/guides/sql-creation-workflow.md +173 -0
  322. package/skills/rabetbase/guides/sql-mybatis.md +126 -0
  323. package/skills/rabetbase/guides/troubleshooting.md +67 -0
  324. package/skills/rabetbase/guides/typescript-sdk.md +227 -0
  325. package/skills/rabetbase/knowledge/page-schema/LrSmartCreate.md +367 -0
  326. package/skills/rabetbase/knowledge/page-schema/LrSmartDetail.md +153 -0
  327. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +291 -0
  328. package/skills/rabetbase/knowledge/page-schema/LrSmartFilter.md +478 -0
  329. package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +119 -0
  330. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +223 -0
  331. package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +632 -0
  332. package/skills/rabetbase/knowledge/page-schema/YtPage.md +172 -0
  333. package/skills/rabetbase/knowledge/page-schema/dataset-relations.md +126 -0
  334. package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +232 -0
  335. package/skills/rabetbase/knowledge/page-schema/field-components.md +312 -0
  336. package/skills/rabetbase/knowledge/page-schema/syntax-reference.md +278 -0
  337. package/skills/rabetbase/knowledge/react-page/components.md +225 -0
  338. package/skills/rabetbase/knowledge/react-page/generation-standards.md +385 -0
  339. package/skills/rabetbase/references/rabetbase-api-list.md +58 -0
  340. package/skills/rabetbase/references/rabetbase-api-pull.md +82 -0
  341. package/skills/rabetbase/references/rabetbase-app-config.md +95 -0
  342. package/skills/rabetbase/references/rabetbase-app-list.md +79 -0
  343. package/skills/rabetbase/references/rabetbase-app-members-list.md +64 -0
  344. package/skills/rabetbase/references/rabetbase-auth-login.md +53 -0
  345. package/skills/rabetbase/references/rabetbase-auth-logout.md +29 -0
  346. package/skills/rabetbase/references/rabetbase-bff-create.md +59 -0
  347. package/skills/rabetbase/references/rabetbase-bff-delete.md +42 -0
  348. package/skills/rabetbase/references/rabetbase-bff-detail.md +38 -0
  349. package/skills/rabetbase/references/rabetbase-bff-list.md +61 -0
  350. package/skills/rabetbase/references/rabetbase-bff-pull.md +42 -0
  351. package/skills/rabetbase/references/rabetbase-bff-push.md +65 -0
  352. package/skills/rabetbase/references/rabetbase-bff-save.md +63 -0
  353. package/skills/rabetbase/references/rabetbase-bff-status.md +37 -0
  354. package/skills/rabetbase/references/rabetbase-cli-skill-install.md +42 -0
  355. package/skills/rabetbase/references/rabetbase-codegen-sdk.md +35 -0
  356. package/skills/rabetbase/references/rabetbase-codegen-sql.md +33 -0
  357. package/skills/rabetbase/references/rabetbase-config.md +296 -0
  358. package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +84 -0
  359. package/skills/rabetbase/references/rabetbase-dataset-delete.md +54 -0
  360. package/skills/rabetbase/references/rabetbase-dataset-detail.md +106 -0
  361. package/skills/rabetbase/references/rabetbase-dataset-extend-update.md +70 -0
  362. package/skills/rabetbase/references/rabetbase-dataset-field-update.md +117 -0
  363. package/skills/rabetbase/references/rabetbase-dataset-generate.md +206 -0
  364. package/skills/rabetbase/references/rabetbase-dataset-list.md +42 -0
  365. package/skills/rabetbase/references/rabetbase-dataset-operations.md +34 -0
  366. package/skills/rabetbase/references/rabetbase-dataset-relation-audit.md +63 -0
  367. package/skills/rabetbase/references/rabetbase-dataset-relation-mutations.md +141 -0
  368. package/skills/rabetbase/references/rabetbase-dataset-relations.md +71 -0
  369. package/skills/rabetbase/references/rabetbase-dataset-rename.md +107 -0
  370. package/skills/rabetbase/references/rabetbase-dataset-restore.md +54 -0
  371. package/skills/rabetbase/references/rabetbase-db-analyze.md +135 -0
  372. package/skills/rabetbase/references/rabetbase-db-create.md +54 -0
  373. package/skills/rabetbase/references/rabetbase-db-delete.md +26 -0
  374. package/skills/rabetbase/references/rabetbase-db-detail.md +27 -0
  375. package/skills/rabetbase/references/rabetbase-db-diff.md +57 -0
  376. package/skills/rabetbase/references/rabetbase-db-list.md +37 -0
  377. package/skills/rabetbase/references/rabetbase-db-tables.md +25 -0
  378. package/skills/rabetbase/references/rabetbase-db-test.md +29 -0
  379. package/skills/rabetbase/references/rabetbase-db-update.md +29 -0
  380. package/skills/rabetbase/references/rabetbase-doctor.md +62 -0
  381. package/skills/rabetbase/references/rabetbase-file.md +35 -0
  382. package/skills/rabetbase/references/rabetbase-init.md +70 -0
  383. package/skills/rabetbase/references/rabetbase-issue-report.md +132 -0
  384. package/skills/rabetbase/references/rabetbase-kb.md +62 -0
  385. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +135 -0
  386. package/skills/rabetbase/references/rabetbase-menu-delete.md +54 -0
  387. package/skills/rabetbase/references/rabetbase-menu-external-link-create.md +63 -0
  388. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +74 -0
  389. package/skills/rabetbase/references/rabetbase-menu-group-create.md +33 -0
  390. package/skills/rabetbase/references/rabetbase-menu-group-update.md +38 -0
  391. package/skills/rabetbase/references/rabetbase-menu-list.md +144 -0
  392. package/skills/rabetbase/references/rabetbase-menu-move.md +54 -0
  393. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +45 -0
  394. package/skills/rabetbase/references/rabetbase-menu-rename.md +48 -0
  395. package/skills/rabetbase/references/rabetbase-menu-sync.md +60 -0
  396. package/skills/rabetbase/references/rabetbase-notification-config-list.md +80 -0
  397. package/skills/rabetbase/references/rabetbase-ocr.md +86 -0
  398. package/skills/rabetbase/references/rabetbase-page-generate-start.md +32 -0
  399. package/skills/rabetbase/references/rabetbase-page-generate-status.md +32 -0
  400. package/skills/rabetbase/references/rabetbase-page-pull.md +47 -0
  401. package/skills/rabetbase/references/rabetbase-page-push.md +45 -0
  402. package/skills/rabetbase/references/rabetbase-page-react-create.md +29 -0
  403. package/skills/rabetbase/references/rabetbase-page-react-detail.md +26 -0
  404. package/skills/rabetbase/references/rabetbase-page-react-list.md +23 -0
  405. package/skills/rabetbase/references/rabetbase-page-react-publish.md +23 -0
  406. package/skills/rabetbase/references/rabetbase-page-react-update.md +24 -0
  407. package/skills/rabetbase/references/rabetbase-page-relation-binding.md +72 -0
  408. package/skills/rabetbase/references/rabetbase-page-restore.md +45 -0
  409. package/skills/rabetbase/references/rabetbase-page-sync.md +36 -0
  410. package/skills/rabetbase/references/rabetbase-permit-page-set.md +69 -0
  411. package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +53 -0
  412. package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +57 -0
  413. package/skills/rabetbase/references/rabetbase-project-create.md +46 -0
  414. package/skills/rabetbase/references/rabetbase-project-upgrade.md +57 -0
  415. package/skills/rabetbase/references/rabetbase-role-list.md +68 -0
  416. package/skills/rabetbase/references/rabetbase-role-user-add.md +54 -0
  417. package/skills/rabetbase/references/rabetbase-role-user-resolve.md +27 -0
  418. package/skills/rabetbase/references/rabetbase-run.md +53 -0
  419. package/skills/rabetbase/references/rabetbase-schema.md +22 -0
  420. package/skills/rabetbase/references/rabetbase-sql-create.md +41 -0
  421. package/skills/rabetbase/references/rabetbase-sql-delete.md +37 -0
  422. package/skills/rabetbase/references/rabetbase-sql-detail.md +32 -0
  423. package/skills/rabetbase/references/rabetbase-sql-exec.md +34 -0
  424. package/skills/rabetbase/references/rabetbase-sql-list.md +54 -0
  425. package/skills/rabetbase/references/rabetbase-sql-pull.md +54 -0
  426. package/skills/rabetbase/references/rabetbase-sql-push.md +46 -0
  427. package/skills/rabetbase/references/rabetbase-sql-status.md +39 -0
  428. package/skills/rabetbase/references/rabetbase-sql-validate.md +73 -0
  429. package/skills/rabetbase/references/rabetbase-standard-page-status.md +31 -0
  430. package/skills/rabetbase/references/rabetbase-task-status.md +40 -0
  431. package/skills/rabetbase/references/rabetbase-tenant-members-list.md +69 -0
  432. package/skills/rabetbase/references/rabetbase-update.md +56 -0
  433. package/skills/rabetbase/references/rabetbase-user-account.md +45 -0
  434. package/skills/rabetbase/references/rabetbase-workspace.md +60 -0
  435. package/skills/rabetbase.manifest.json +137 -0
@@ -1 +1 @@
1
- const a34_0x120863=a34_0x5877;(function(_0x582f44,_0x1c1017){const _0x1cfb1f=a34_0x5877,_0x3761e8=_0x582f44();while(!![]){try{const _0x44825a=parseInt(_0x1cfb1f(0x1ca))/0x1*(-parseInt(_0x1cfb1f(0x1c7))/0x2)+parseInt(_0x1cfb1f(0x1cd))/0x3+parseInt(_0x1cfb1f(0x1c2))/0x4*(-parseInt(_0x1cfb1f(0x1d1))/0x5)+parseInt(_0x1cfb1f(0x1be))/0x6+parseInt(_0x1cfb1f(0x1cc))/0x7+parseInt(_0x1cfb1f(0x1c8))/0x8*(parseInt(_0x1cfb1f(0x1d6))/0x9)+parseInt(_0x1cfb1f(0x1c6))/0xa*(-parseInt(_0x1cfb1f(0x1c5))/0xb);if(_0x44825a===_0x1c1017)break;else _0x3761e8['push'](_0x3761e8['shift']());}catch(_0x153969){_0x3761e8['push'](_0x3761e8['shift']());}}}(a34_0x3b46,0xe01b1));function a34_0x5877(_0x42123a,_0x513b5b){_0x42123a=_0x42123a-0x1bc;const _0x3b465c=a34_0x3b46();let _0x587705=_0x3b465c[_0x42123a];return _0x587705;}import{listBffScripts}from'../../core/api-client.js';function a34_0x3b46(){const _0x2c50ed=['(unnamed)','Script\x20type\x20filter','11265ezoNhn','length','Filter\x20by\x20script\x20name','boolean','Return\x20full\x20script\x20objects','18FQbrcm','appCode','description','verbose','COMMON','4344228vkeCsL','map','scriptType','str','236XaiTWw','List\x20BFF\x20scripts','read','104401iOzIOX','1380vOVozM','5458QRlDep','4345288neBWDP','bff','448ibEAbT','type','3265346EkuNcj','3919128tUQDdq','name'];a34_0x3b46=function(){return _0x2c50ed;};return a34_0x3b46();}export const bffList={'service':a34_0x120863(0x1c9),'command':'list','description':a34_0x120863(0x1c3),'risk':a34_0x120863(0x1c4),'flags':[{'name':'type','type':'string','description':a34_0x120863(0x1d0),'default':'ENDPOINT','enum':['ENDPOINT',a34_0x120863(0x1bd)]},{'name':a34_0x120863(0x1ce),'type':'string','description':a34_0x120863(0x1d3)},{'name':'verbose','type':a34_0x120863(0x1d4),'description':a34_0x120863(0x1d5)}],async 'execute'(_0x20e911){const _0x5f09a4=a34_0x120863,_0x131028=await listBffScripts(_0x20e911[_0x5f09a4(0x1d7)],_0x20e911['str'](_0x5f09a4(0x1cb)),{'scriptName':_0x20e911[_0x5f09a4(0x1c1)](_0x5f09a4(0x1ce))||undefined}),_0x166c66=_0x20e911['bool'](_0x5f09a4(0x1bc));return{'ok':!![],'data':_0x166c66?_0x131028:_0x131028[_0x5f09a4(0x1bf)](_0x26a73f=>({'id':_0x26a73f['id'],'functionName':_0x26a73f['functionName']??'','description':_0x26a73f[_0x5f09a4(0x1d8)]||_0x5f09a4(0x1cf),'scriptType':_0x26a73f[_0x5f09a4(0x1c0)]})),'message':_0x131028[_0x5f09a4(0x1d2)]===0x0?'No\x20BFF\x20scripts\x20found.':undefined};}};
1
+ function a34_0x4719(_0x1301e5,_0x46f87d){_0x1301e5=_0x1301e5-0x1c8;const _0x1c43a9=a34_0x1c43();let _0x471911=_0x1c43a9[_0x1301e5];return _0x471911;}const a34_0x574fb9=a34_0x4719;(function(_0x477751,_0x147d57){const _0xa21702=a34_0x4719,_0x5ab656=_0x477751();while(!![]){try{const _0x88c808=parseInt(_0xa21702(0x1d3))/0x1+-parseInt(_0xa21702(0x1da))/0x2*(-parseInt(_0xa21702(0x1d0))/0x3)+parseInt(_0xa21702(0x1de))/0x4+parseInt(_0xa21702(0x1d8))/0x5*(-parseInt(_0xa21702(0x1db))/0x6)+-parseInt(_0xa21702(0x1e3))/0x7*(-parseInt(_0xa21702(0x1cc))/0x8)+parseInt(_0xa21702(0x1c9))/0x9*(parseInt(_0xa21702(0x1d7))/0xa)+-parseInt(_0xa21702(0x1ca))/0xb*(parseInt(_0xa21702(0x1cf))/0xc);if(_0x88c808===_0x147d57)break;else _0x5ab656['push'](_0x5ab656['shift']());}catch(_0x20d3d1){_0x5ab656['push'](_0x5ab656['shift']());}}}(a34_0x1c43,0x82315));function a34_0x1c43(){const _0x4c075d=['map','8970813zedpUr','1243xYLqFv','appCode','24KGBCBO','(unnamed)','length','239868cyQGWY','3PPAZmj','bff','string','780938oZQlLY','Script\x20type\x20filter','name','read','10umDYvI','22735AUfqPr','functionName','1019276QJrvMT','204iHktVz','No\x20BFF\x20scripts\x20found.','scriptType','2280368yVYWDw','description','verbose','bool','str','208131aOOwmg','type','ENDPOINT'];a34_0x1c43=function(){return _0x4c075d;};return a34_0x1c43();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a34_0x574fb9(0x1d1),'command':'list','description':'List\x20BFF\x20scripts','risk':a34_0x574fb9(0x1d6),'flags':[{'name':a34_0x574fb9(0x1e4),'type':a34_0x574fb9(0x1d2),'description':a34_0x574fb9(0x1d4),'default':'ENDPOINT','enum':[a34_0x574fb9(0x1e5),'COMMON']},{'name':a34_0x574fb9(0x1d5),'type':'string','description':'Filter\x20by\x20script\x20name'},{'name':'verbose','type':'boolean','description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0xaa23cf){const _0x15fa99=a34_0x574fb9,_0x5a3cab=await listBffScripts(_0xaa23cf[_0x15fa99(0x1cb)],_0xaa23cf[_0x15fa99(0x1e2)](_0x15fa99(0x1e4)),{'scriptName':_0xaa23cf[_0x15fa99(0x1e2)](_0x15fa99(0x1d5))||undefined}),_0x2e2215=_0xaa23cf[_0x15fa99(0x1e1)](_0x15fa99(0x1e0));return{'ok':!![],'data':_0x2e2215?_0x5a3cab:_0x5a3cab[_0x15fa99(0x1c8)](_0x5f1ff1=>({'id':_0x5f1ff1['id'],'functionName':_0x5f1ff1[_0x15fa99(0x1d9)]??'','description':_0x5f1ff1[_0x15fa99(0x1df)]||_0x15fa99(0x1cd),'scriptType':_0x5f1ff1[_0x15fa99(0x1dd)]})),'message':_0x5a3cab[_0x15fa99(0x1ce)]===0x0?_0x15fa99(0x1dc):undefined};}};
@@ -1 +1 @@
1
- const a35_0x32cdb1=a35_0x4b71;(function(_0x3f12cf,_0x18740e){const _0xab12b7=a35_0x4b71,_0x363eb7=_0x3f12cf();while(!![]){try{const _0x1ce3c0=parseInt(_0xab12b7(0xab))/0x1*(-parseInt(_0xab12b7(0x99))/0x2)+-parseInt(_0xab12b7(0x77))/0x3+parseInt(_0xab12b7(0xbe))/0x4*(-parseInt(_0xab12b7(0x83))/0x5)+-parseInt(_0xab12b7(0x82))/0x6+parseInt(_0xab12b7(0xa3))/0x7*(parseInt(_0xab12b7(0xbc))/0x8)+-parseInt(_0xab12b7(0xa1))/0x9+-parseInt(_0xab12b7(0xae))/0xa*(-parseInt(_0xab12b7(0xb6))/0xb);if(_0x1ce3c0===_0x18740e)break;else _0x363eb7['push'](_0x363eb7['shift']());}catch(_0x4457af){_0x363eb7['push'](_0x363eb7['shift']());}}}(a35_0x5826,0x827af));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';function a35_0x5826(){const _0x4a8bbe=['2920350cdiYFI','3035kLltft','functions','would_pull','functionName','force','\x20skipped,\x20','HOOK','\x20pulled,\x20','scriptType','type','validation','alias','stdin','bool','scriptsRoot','lastSync','apiDir','lockFilePath','filePath','scriptContent','pull','\x20failed','70umXmYo','toLowerCase','close','Force\x20overwrite\x20local\x20unsynced\x20changes','datasetCode','Remote\x20script\x20missing\x20id.','operationType','includes','2350053hNBAQj','ENDPOINT','981666zIbfar','trim','utf8','appCode','cancelled','read','hash','/api/management/library/scripts/list?appCode=','13434dYJTZT','\x20remote\x20BFF\x20script(s)\x20for\x20pull','COMMON','50FnEtpU','Pull\x20complete:\x20','toISOString','all','stderr','hookLocation','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','nonInteractive','6097894RJdkGz','&type=','boolean','lockKey','yes','Lock\x20scope\x20for\x20app\x20\x22','8Rmicvn','Force\x20pull\x20cancelled.','4456TjANBk','unresolvable\x20target\x20path','bff','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','1449993AgPZtc','functionNode','No\x20remote\x20BFF\x20scripts\x20found.','length','skipped','apps','str','message','local\x20unsynced\x20changes','push','GET'];a35_0x5826=function(){return _0x4a8bbe;};return a35_0x5826();}function a35_0x4b71(_0x53b9f5,_0x1b2a08){_0x53b9f5=_0x53b9f5-0x76;const _0x5826e3=a35_0x5826();let _0x4b71ea=_0x5826e3[_0x53b9f5];return _0x4b71ea;}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';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a35_0x32cdb1(0xc0),'command':a35_0x32cdb1(0x97),'description':a35_0x32cdb1(0xb4),'risk':a35_0x32cdb1(0xa8),'flags':[{'name':a35_0x32cdb1(0x8c),'type':'string','description':'Pull\x20only\x20this\x20script\x20type','enum':[a35_0x32cdb1(0xad),a35_0x32cdb1(0xa2),a35_0x32cdb1(0x89)]},{'name':a35_0x32cdb1(0x87),'type':a35_0x32cdb1(0xb8),'description':a35_0x32cdb1(0x9c)}],async 'dryRun'(_0x31d343){const _0x56e3f5=a35_0x32cdb1,_0x122fb3=loadBffProjectConfig(_0x31d343['appCode']),_0x29d9b6=await readBffLockFile(_0x122fb3['lockFilePath']),{appLock:_0x5111cf}=ensureLockScope(_0x29d9b6??createEmptyBffLock(),_0x31d343[_0x56e3f5(0xa6)],_0x122fb3[_0x56e3f5(0x91)],_0x56e3f5(0x97)),_0x506ca9=normalizeBffType(_0x31d343['str'](_0x56e3f5(0x8c)))??undefined,_0xac8d80=buildDatasetCodeToAliasMap(_0x31d343[_0x56e3f5(0x93)],_0x31d343['appCode']),[_0x38b070,_0x18f07b]=await Promise[_0x56e3f5(0xb1)]([listBffScripts(_0x31d343[_0x56e3f5(0xa6)],_0x506ca9),getBffScriptStatistics(_0x31d343[_0x56e3f5(0xa6)])]),_0xb7de6f=createHookLocationMap(_0x18f07b),_0x1b103c=[];for(const _0x154f7b of _0x38b070){const _0x544483=resolveRemoteScriptTarget(_0x122fb3,_0x154f7b,_0xb7de6f,_0x5111cf[_0x56e3f5(0x84)],_0xac8d80);if(!_0x544483){_0x1b103c[_0x56e3f5(0x80)]({'scriptType':_0x154f7b[_0x56e3f5(0x8b)],'functionName':_0x154f7b[_0x56e3f5(0x86)]??'','status':_0x56e3f5(0x7b),'reason':_0x56e3f5(0xbf)});continue;}const _0xddc4cc=_0x5111cf[_0x56e3f5(0x84)][_0x544483['lockKey']],_0xd19068=_0x154f7b[_0x56e3f5(0x96)]!=null?computeContentHash(_0x154f7b['scriptContent']):undefined,_0x2d33db=await hasUnsyncedLocalChanges(_0x544483['filePath'],_0xddc4cc,_0xd19068);_0x1b103c['push']({'lockKey':_0x544483[_0x56e3f5(0xb9)],'filePath':_0x544483[_0x56e3f5(0x95)],'remoteId':_0x154f7b['id']??null,'status':_0x2d33db?'conflict':_0x56e3f5(0x85)});}return{'method':_0x56e3f5(0x81),'url':_0x56e3f5(0xaa)+_0x31d343[_0x56e3f5(0xa6)]+(_0x506ca9?_0x56e3f5(0xb7)+_0x506ca9:''),'body':{'appCode':_0x31d343['appCode'],'filterType':_0x506ca9??null,'files':_0x1b103c},'description':'Would\x20inspect\x20'+_0x1b103c[_0x56e3f5(0x7a)]+_0x56e3f5(0xac)};},async 'execute'(_0x5a26d2){const _0x2ec9af=a35_0x32cdb1,_0x597f2e=loadBffProjectConfig(_0x5a26d2[_0x2ec9af(0xa6)]),_0x1faf95=await readBffLockFile(_0x597f2e[_0x2ec9af(0x94)]),{lockData:_0x1d765d,appLock:_0x35537f}=ensureLockScope(_0x1faf95??createEmptyBffLock(),_0x5a26d2[_0x2ec9af(0xa6)],_0x597f2e[_0x2ec9af(0x91)],'pull'),_0x39f422=normalizeBffType(_0x5a26d2['str']('type'))??undefined;if(_0x5a26d2[_0x2ec9af(0x7d)]('type')&&!_0x39f422)throw CliErrors[_0x2ec9af(0x8d)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x5bdd4d,_0x24a1f8]=await Promise[_0x2ec9af(0xb1)]([listBffScripts(_0x5a26d2['appCode'],_0x39f422),getBffScriptStatistics(_0x5a26d2[_0x2ec9af(0xa6)])]);if(_0x5bdd4d[_0x2ec9af(0x7a)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x2ec9af(0x79)};const _0x587d17=_0x5a26d2[_0x2ec9af(0x90)](_0x2ec9af(0x87));if(_0x587d17&&!_0x5a26d2['nonInteractive']){const _0x368fcb=await confirmForce();if(!_0x368fcb)throw CliErrors[_0x2ec9af(0xa7)](_0x2ec9af(0xbd));}if(_0x587d17&&_0x5a26d2[_0x2ec9af(0xb5)]){}const _0x45932b=buildDatasetCodeToAliasMap(_0x5a26d2['apiDir'],_0x5a26d2[_0x2ec9af(0xa6)]),_0x1a8334=createHookLocationMap(_0x24a1f8),_0x36b67f=JSON['parse'](JSON['stringify'](_0x1d765d)),_0x4ea55e=_0x5a26d2[_0x2ec9af(0xa6)],_0xbb0732=_0x36b67f[_0x2ec9af(0x7c)][_0x4ea55e];if(!_0xbb0732)throw new Error(_0x2ec9af(0xbb)+_0x4ea55e+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x34fc8b=[],_0xb2cf9f=[],_0x1a6f2d=[];for(const _0x48b65a of _0x5bdd4d){const _0x9c47e9=resolveRemoteScriptTarget(_0x597f2e,_0x48b65a,_0x1a8334,_0x35537f[_0x2ec9af(0x84)],_0x45932b);if(!_0x9c47e9){_0xb2cf9f[_0x2ec9af(0x80)]({'lockKey':_0x48b65a[_0x2ec9af(0x8b)]+'/'+_0x48b65a[_0x2ec9af(0x86)],'reason':_0x2ec9af(0xbf)});continue;}const _0x4b47e3=_0x35537f['functions'][_0x9c47e9[_0x2ec9af(0xb9)]];try{if(!_0x48b65a['id'])throw new Error(_0x2ec9af(0x9e));if(_0x48b65a[_0x2ec9af(0x96)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x5875b0=_0x48b65a[_0x2ec9af(0x96)],_0x3d996a=computeContentHash(_0x5875b0);if(!_0x587d17){const _0xb8f8bb=await hasUnsyncedLocalChanges(_0x9c47e9['filePath'],_0x4b47e3,_0x3d996a);if(_0xb8f8bb){_0xb2cf9f['push']({'lockKey':_0x9c47e9['lockKey'],'reason':_0x2ec9af(0x7f)});continue;}}await ensureParentDirectory(_0x9c47e9[_0x2ec9af(0x95)]),await writeFile(_0x9c47e9[_0x2ec9af(0x95)],_0x5875b0,_0x2ec9af(0xa5));const _0x3eca55={'hash':_0x3d996a,'remoteId':_0x48b65a['id'],'version':_0x48b65a['version']};_0x9c47e9['type']===_0x2ec9af(0x89)&&_0x9c47e9[_0x2ec9af(0xb3)]&&(_0x3eca55['alias']=_0x9c47e9[_0x2ec9af(0xb3)]['alias'],_0x3eca55[_0x2ec9af(0x9d)]=_0x9c47e9[_0x2ec9af(0xb3)][_0x2ec9af(0x9d)],_0x3eca55[_0x2ec9af(0x9f)]=_0x9c47e9['hookLocation'][_0x2ec9af(0x9f)],_0x3eca55[_0x2ec9af(0x78)]=_0x9c47e9[_0x2ec9af(0xb3)][_0x2ec9af(0x78)]),_0xbb0732[_0x2ec9af(0x84)][_0x9c47e9['lockKey']]=_0x3eca55,_0x34fc8b['push']({'lockKey':_0x9c47e9[_0x2ec9af(0xb9)],'remoteId':_0x48b65a['id']});}catch(_0x3dfb68){_0x1a6f2d[_0x2ec9af(0x80)]({'lockKey':_0x9c47e9['lockKey'],'error':_0x3dfb68 instanceof Error?_0x3dfb68[_0x2ec9af(0x7e)]:String(_0x3dfb68)});}}return _0xbb0732[_0x2ec9af(0x92)]=new Date()[_0x2ec9af(0xb0)](),await writeBffLockFile(_0x597f2e[_0x2ec9af(0x94)],_0x36b67f),{'ok':_0x1a6f2d['length']===0x0,'data':{'pulled':_0x34fc8b,'skipped':_0xb2cf9f,'failed':_0x1a6f2d},'message':_0x2ec9af(0xaf)+_0x34fc8b[_0x2ec9af(0x7a)]+_0x2ec9af(0x8a)+_0xb2cf9f['length']+_0x2ec9af(0x88)+_0x1a6f2d[_0x2ec9af(0x7a)]+_0x2ec9af(0x98)};}};async function hasUnsyncedLocalChanges(_0x3a7338,_0x51836e,_0x3c0a68){const _0x46f23b=a35_0x32cdb1;if(!await fileExists(_0x3a7338))return![];const _0x218330=await computeFileHash(_0x3a7338);if(!_0x51836e)return _0x3c0a68?_0x218330!==_0x3c0a68:!![];return _0x218330!==_0x51836e[_0x46f23b(0xa9)];}function buildDatasetCodeToAliasMap(_0x67be1b,_0x43615b){const _0x392dd0=a35_0x32cdb1,_0x4a361d=loadAliasMap(_0x67be1b,undefined,resolveApiFilePath(_0x67be1b,_0x43615b));return new Map(_0x4a361d['map'](_0x15e4b5=>[_0x15e4b5[_0x392dd0(0x9d)],_0x15e4b5[_0x392dd0(0x8e)]]));}async function confirmForce(){const _0x74e906=a35_0x32cdb1,_0x457fa9=createInterface({'input':process[_0x74e906(0x8f)],'output':process[_0x74e906(0xb2)]}),_0x13555e=await new Promise(_0x3d4700=>{const _0x2fabf9=_0x74e906;_0x457fa9['question'](_0x2fabf9(0x76),_0x3d4700);});return _0x457fa9[_0x74e906(0x9b)](),['y',_0x74e906(0xba)][_0x74e906(0xa0)](_0x13555e[_0x74e906(0xa4)]()[_0x74e906(0x9a)]());}
1
+ const a35_0x31b49e=a35_0x5e56;(function(_0x16dacf,_0x5a78f1){const _0x3390b9=a35_0x5e56,_0x33d9ed=_0x16dacf();while(!![]){try{const _0x412321=parseInt(_0x3390b9(0x18c))/0x1*(parseInt(_0x3390b9(0x1bf))/0x2)+-parseInt(_0x3390b9(0x1c4))/0x3*(-parseInt(_0x3390b9(0x197))/0x4)+parseInt(_0x3390b9(0x1ad))/0x5*(-parseInt(_0x3390b9(0x18f))/0x6)+-parseInt(_0x3390b9(0x192))/0x7*(-parseInt(_0x3390b9(0x1ba))/0x8)+-parseInt(_0x3390b9(0x1a9))/0x9+parseInt(_0x3390b9(0x1b1))/0xa+-parseInt(_0x3390b9(0x1ae))/0xb;if(_0x412321===_0x5a78f1)break;else _0x33d9ed['push'](_0x33d9ed['shift']());}catch(_0x747ad7){_0x33d9ed['push'](_0x33d9ed['shift']());}}}(a35_0x12af,0x5634d));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a35_0x12af(){const _0x1c4010=['question','version','scriptsRoot','apiDir','Pull\x20only\x20this\x20script\x20type','push','unresolvable\x20target\x20path','stderr','filePath','1478808xUniTW','functionName','functionNode','boolean','6035nnliwa','5505742IzPpDK','would_pull','includes','3975990zBlSsu','Remote\x20script\x20missing\x20id.','pull','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','Remote\x20script\x20missing\x20content.','GET','skipped','bool','type','424dFADNB','map','alias','force','apps','658310cKZcPl','/api/management/library/scripts/list?appCode=','Force\x20pull\x20cancelled.','string','trim','3DtjTDe','ENDPOINT','COMMON','Pull\x20complete:\x20','bff','\x20failed','local\x20unsynced\x20changes','operationType','utf8','message','&type=','No\x20remote\x20BFF\x20scripts\x20found.','hash','functions','close','yes','2dtKzZK','scriptContent','nonInteractive','2352uSnoFq','lockKey','lastSync','25319HLbfzk','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','hookLocation','toISOString','973876dQPjOl','Would\x20inspect\x20','str','datasetCode','appCode','length','lockFilePath','stringify','toLowerCase'];a35_0x12af=function(){return _0x1c4010;};return a35_0x12af();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';function a35_0x5e56(_0x152583,_0x39e288){_0x152583=_0x152583-0x18a;const _0x12af5e=a35_0x12af();let _0x5e56db=_0x12af5e[_0x152583];return _0x5e56db;}export const bffPull={'service':a35_0x31b49e(0x1c8),'command':a35_0x31b49e(0x1b3),'description':a35_0x31b49e(0x1b4),'risk':'read','flags':[{'name':a35_0x31b49e(0x1b9),'type':a35_0x31b49e(0x1c2),'description':a35_0x31b49e(0x1a4),'enum':[a35_0x31b49e(0x1c6),a35_0x31b49e(0x1c5),'HOOK']},{'name':a35_0x31b49e(0x1bd),'type':a35_0x31b49e(0x1ac),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x26f94b){const _0x576811=a35_0x31b49e,_0x47c5eb=loadBffProjectConfig(_0x26f94b[_0x576811(0x19b)]),_0x4911ed=await readBffLockFile(_0x47c5eb['lockFilePath']),{appLock:_0x118bf6}=ensureLockScope(_0x4911ed??createEmptyBffLock(),_0x26f94b[_0x576811(0x19b)],_0x47c5eb[_0x576811(0x1a2)],_0x576811(0x1b3)),_0x1d401f=normalizeBffType(_0x26f94b[_0x576811(0x199)](_0x576811(0x1b9)))??undefined,_0x47b1a2=buildDatasetCodeToAliasMap(_0x26f94b[_0x576811(0x1a3)],_0x26f94b[_0x576811(0x19b)]),[_0x233d09,_0x122f91]=await Promise['all']([listBffScripts(_0x26f94b[_0x576811(0x19b)],_0x1d401f),getBffScriptStatistics(_0x26f94b[_0x576811(0x19b)])]),_0xeef42c=createHookLocationMap(_0x122f91),_0x11d364=[];for(const _0x2222ce of _0x233d09){const _0x5be5c6=resolveRemoteScriptTarget(_0x47c5eb,_0x2222ce,_0xeef42c,_0x118bf6[_0x576811(0x1d1)],_0x47b1a2);if(!_0x5be5c6){_0x11d364[_0x576811(0x1a5)]({'scriptType':_0x2222ce['scriptType'],'functionName':_0x2222ce['functionName']??'','status':_0x576811(0x1b7),'reason':_0x576811(0x1a6)});continue;}const _0x188e2b=_0x118bf6[_0x576811(0x1d1)][_0x5be5c6['lockKey']],_0x55db90=_0x2222ce[_0x576811(0x18d)]!=null?computeContentHash(_0x2222ce['scriptContent']):undefined,_0x200e92=await hasUnsyncedLocalChanges(_0x5be5c6[_0x576811(0x1a8)],_0x188e2b,_0x55db90);_0x11d364[_0x576811(0x1a5)]({'lockKey':_0x5be5c6[_0x576811(0x190)],'filePath':_0x5be5c6['filePath'],'remoteId':_0x2222ce['id']??null,'status':_0x200e92?'conflict':_0x576811(0x1af)});}return{'method':_0x576811(0x1b6),'url':_0x576811(0x1c0)+_0x26f94b[_0x576811(0x19b)]+(_0x1d401f?_0x576811(0x1ce)+_0x1d401f:''),'body':{'appCode':_0x26f94b[_0x576811(0x19b)],'filterType':_0x1d401f??null,'files':_0x11d364},'description':_0x576811(0x198)+_0x11d364[_0x576811(0x19c)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x7c114b){const _0x11ac6b=a35_0x31b49e,_0x5d49f6=loadBffProjectConfig(_0x7c114b[_0x11ac6b(0x19b)]),_0x27c3df=await readBffLockFile(_0x5d49f6[_0x11ac6b(0x19d)]),{lockData:_0xe1e1bb,appLock:_0x41bbb4}=ensureLockScope(_0x27c3df??createEmptyBffLock(),_0x7c114b[_0x11ac6b(0x19b)],_0x5d49f6['scriptsRoot'],'pull'),_0x52bcff=normalizeBffType(_0x7c114b[_0x11ac6b(0x199)]('type'))??undefined;if(_0x7c114b['str'](_0x11ac6b(0x1b9))&&!_0x52bcff)throw CliErrors['validation'](_0x11ac6b(0x193));const [_0x382234,_0x20aab2]=await Promise['all']([listBffScripts(_0x7c114b['appCode'],_0x52bcff),getBffScriptStatistics(_0x7c114b['appCode'])]);if(_0x382234['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x11ac6b(0x1cf)};const _0x2f943e=_0x7c114b[_0x11ac6b(0x1b8)](_0x11ac6b(0x1bd));if(_0x2f943e&&!_0x7c114b['nonInteractive']){const _0x4ac903=await confirmForce();if(!_0x4ac903)throw CliErrors['cancelled'](_0x11ac6b(0x1c1));}if(_0x2f943e&&_0x7c114b[_0x11ac6b(0x18e)]){}const _0xa7c59b=buildDatasetCodeToAliasMap(_0x7c114b[_0x11ac6b(0x1a3)],_0x7c114b[_0x11ac6b(0x19b)]),_0x4c072d=createHookLocationMap(_0x20aab2),_0x32debf=JSON['parse'](JSON[_0x11ac6b(0x19e)](_0xe1e1bb)),_0xc38903=_0x7c114b[_0x11ac6b(0x19b)],_0x2eb405=_0x32debf[_0x11ac6b(0x1be)][_0xc38903];if(!_0x2eb405)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0xc38903+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x28ab0b=[],_0x37f715=[],_0x35b455=[];for(const _0x252862 of _0x382234){const _0x3e9351=resolveRemoteScriptTarget(_0x5d49f6,_0x252862,_0x4c072d,_0x41bbb4['functions'],_0xa7c59b);if(!_0x3e9351){_0x37f715[_0x11ac6b(0x1a5)]({'lockKey':_0x252862['scriptType']+'/'+_0x252862[_0x11ac6b(0x1aa)],'reason':_0x11ac6b(0x1a6)});continue;}const _0x13651f=_0x41bbb4[_0x11ac6b(0x1d1)][_0x3e9351[_0x11ac6b(0x190)]];try{if(!_0x252862['id'])throw new Error(_0x11ac6b(0x1b2));if(_0x252862[_0x11ac6b(0x18d)]==null)throw new Error(_0x11ac6b(0x1b5));const _0x94a1b0=_0x252862[_0x11ac6b(0x18d)],_0x52feae=computeContentHash(_0x94a1b0);if(!_0x2f943e){const _0x4c10a0=await hasUnsyncedLocalChanges(_0x3e9351['filePath'],_0x13651f,_0x52feae);if(_0x4c10a0){_0x37f715[_0x11ac6b(0x1a5)]({'lockKey':_0x3e9351[_0x11ac6b(0x190)],'reason':_0x11ac6b(0x1ca)});continue;}}await ensureParentDirectory(_0x3e9351[_0x11ac6b(0x1a8)]),await writeFile(_0x3e9351[_0x11ac6b(0x1a8)],_0x94a1b0,_0x11ac6b(0x1cc));const _0x233c72={'hash':_0x52feae,'remoteId':_0x252862['id'],'version':_0x252862[_0x11ac6b(0x1a1)]};_0x3e9351['type']==='HOOK'&&_0x3e9351[_0x11ac6b(0x195)]&&(_0x233c72[_0x11ac6b(0x1bc)]=_0x3e9351[_0x11ac6b(0x195)][_0x11ac6b(0x1bc)],_0x233c72['datasetCode']=_0x3e9351[_0x11ac6b(0x195)][_0x11ac6b(0x19a)],_0x233c72[_0x11ac6b(0x1cb)]=_0x3e9351[_0x11ac6b(0x195)][_0x11ac6b(0x1cb)],_0x233c72[_0x11ac6b(0x1ab)]=_0x3e9351[_0x11ac6b(0x195)][_0x11ac6b(0x1ab)]),_0x2eb405[_0x11ac6b(0x1d1)][_0x3e9351[_0x11ac6b(0x190)]]=_0x233c72,_0x28ab0b[_0x11ac6b(0x1a5)]({'lockKey':_0x3e9351[_0x11ac6b(0x190)],'remoteId':_0x252862['id']});}catch(_0x5a19cb){_0x35b455[_0x11ac6b(0x1a5)]({'lockKey':_0x3e9351['lockKey'],'error':_0x5a19cb instanceof Error?_0x5a19cb[_0x11ac6b(0x1cd)]:String(_0x5a19cb)});}}return _0x2eb405[_0x11ac6b(0x191)]=new Date()[_0x11ac6b(0x196)](),await writeBffLockFile(_0x5d49f6[_0x11ac6b(0x19d)],_0x32debf),{'ok':_0x35b455[_0x11ac6b(0x19c)]===0x0,'data':{'pulled':_0x28ab0b,'skipped':_0x37f715,'failed':_0x35b455},'message':_0x11ac6b(0x1c7)+_0x28ab0b[_0x11ac6b(0x19c)]+'\x20pulled,\x20'+_0x37f715[_0x11ac6b(0x19c)]+'\x20skipped,\x20'+_0x35b455['length']+_0x11ac6b(0x1c9)};}};async function hasUnsyncedLocalChanges(_0x47aed0,_0x4242e3,_0x5229e1){const _0x28b0f4=a35_0x31b49e;if(!await fileExists(_0x47aed0))return![];const _0x20eeca=await computeFileHash(_0x47aed0);if(!_0x4242e3)return _0x5229e1?_0x20eeca!==_0x5229e1:!![];return _0x20eeca!==_0x4242e3[_0x28b0f4(0x1d0)];}function buildDatasetCodeToAliasMap(_0x1640f5,_0x44d688){const _0x547d93=a35_0x31b49e,_0x19b31f=loadAliasMap(_0x1640f5,undefined,resolveApiFilePath(_0x1640f5,_0x44d688));return new Map(_0x19b31f[_0x547d93(0x1bb)](_0x32dc34=>[_0x32dc34[_0x547d93(0x19a)],_0x32dc34[_0x547d93(0x1bc)]]));}async function confirmForce(){const _0x5264ec=a35_0x31b49e,_0x5974dd=createInterface({'input':process['stdin'],'output':process[_0x5264ec(0x1a7)]}),_0x395fcd=await new Promise(_0x45a4fd=>{const _0x3317bc=_0x5264ec;_0x5974dd[_0x3317bc(0x1a0)](_0x3317bc(0x194),_0x45a4fd);});return _0x5974dd[_0x5264ec(0x18a)](),['y',_0x5264ec(0x18b)][_0x5264ec(0x1b0)](_0x395fcd[_0x5264ec(0x1c3)]()[_0x5264ec(0x19f)]());}
@@ -1 +1 @@
1
- const a36_0x256746=a36_0x4b04;(function(_0x5c767a,_0x2aa957){const _0x352b57=a36_0x4b04,_0x4b9cbc=_0x5c767a();while(!![]){try{const _0x330096=-parseInt(_0x352b57(0xd8))/0x1*(parseInt(_0x352b57(0xc0))/0x2)+parseInt(_0x352b57(0x100))/0x3*(parseInt(_0x352b57(0xb3))/0x4)+parseInt(_0x352b57(0xba))/0x5+-parseInt(_0x352b57(0xb6))/0x6+parseInt(_0x352b57(0xec))/0x7*(-parseInt(_0x352b57(0xfb))/0x8)+parseInt(_0x352b57(0xd2))/0x9+parseInt(_0x352b57(0xb7))/0xa;if(_0x330096===_0x2aa957)break;else _0x4b9cbc['push'](_0x4b9cbc['shift']());}catch(_0x1cd690){_0x4b9cbc['push'](_0x4b9cbc['shift']());}}}(a36_0xbc97,0xe0dbd));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,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{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a36_0x4b04(_0x54b2c8,_0x133cab){_0x54b2c8=_0x54b2c8-0xae;const _0xbc97c=a36_0xbc97();let _0x4b0404=_0xbc97c[_0x54b2c8];return _0x4b0404;}const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a36_0x256746(0xbd),'command':a36_0x256746(0xdc),'description':a36_0x256746(0xc1),'risk':a36_0x256746(0xfc),'flags':[{'name':a36_0x256746(0xbb),'type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':['COMMON',a36_0x256746(0xed),'HOOK']},{'name':a36_0x256746(0xe8),'type':'string','description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a36_0x256746(0xd4),'type':a36_0x256746(0xe5),'description':a36_0x256746(0xc7)}],async 'dryRun'(_0x539e20){const _0x5e5421=a36_0x256746,_0x5b4632=loadBffProjectConfig(_0x539e20[_0x5e5421(0xcf)]),_0x12f878=await readBffLockFile(_0x5b4632[_0x5e5421(0xae)]),{appLock:_0x15f602}=ensureLockScope(_0x12f878??createEmptyBffLock(),_0x539e20['appCode'],_0x5b4632[_0x5e5421(0xcd)],_0x5e5421(0xdc)),_0x427870=await getTargetFunctions(_0x5b4632,_0x539e20),_0x339858=_0x539e20['bool'](_0x5e5421(0xd4)),_0x46908f=[];for(const _0x3e52a1 of _0x427870){const _0x3fc417=await computeFileHash(_0x3e52a1[_0x5e5421(0xf2)]),_0x1ff5cb=_0x15f602['functions'][_0x3e52a1[_0x5e5421(0xde)]],_0x4ae916=!!_0x1ff5cb&&_0x1ff5cb[_0x5e5421(0xf3)]===_0x3fc417;_0x46908f[_0x5e5421(0xdc)]({'lockKey':_0x3e52a1[_0x5e5421(0xde)],'filePath':_0x3e52a1['filePath'],'remoteId':_0x1ff5cb?.[_0x5e5421(0xe7)]??null,'mode':_0x1ff5cb?.['remoteId']?_0x5e5421(0xe9):_0x5e5421(0xf8),'status':!_0x339858&&_0x4ae916?_0x5e5421(0xdd):_0x5e5421(0xfd)});}return{'method':_0x5e5421(0x101),'url':_0x5e5421(0xdf),'body':{'appCode':_0x539e20[_0x5e5421(0xcf)],'force':_0x339858,'files':_0x46908f,'cacheClearAtRuntime':_0x46908f[_0x5e5421(0xb5)](_0xa29a1=>_0xa29a1[_0x5e5421(0xd1)]===_0x5e5421(0xfd)),'cacheClearAtRuntimeTimes':_0x46908f[_0x5e5421(0xb5)](_0xd44ef8=>_0xd44ef8[_0x5e5421(0xd1)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x5e5421(0xd6)+_0x46908f[_0x5e5421(0xea)]+_0x5e5421(0xb8)};},async 'execute'(_0x1efd95){const _0x1adbb2=a36_0x256746,_0x163f34=loadBffProjectConfig(_0x1efd95[_0x1adbb2(0xcf)]),_0x4c9399=await readBffLockFile(_0x163f34[_0x1adbb2(0xae)]),{lockData:_0x2137ac,appLock:_0x5b82d2}=ensureLockScope(_0x4c9399??createEmptyBffLock(),_0x1efd95[_0x1adbb2(0xcf)],_0x163f34[_0x1adbb2(0xcd)],'push'),_0x4bd290=await getTargetFunctions(_0x163f34,_0x1efd95);if(_0x4bd290[_0x1adbb2(0xea)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x1adbb2(0xca)};const _0x17040d=_0x1efd95['bool'](_0x1adbb2(0xd4)),_0x24272a=JSON['parse'](JSON[_0x1adbb2(0xd9)](_0x2137ac)),_0x5ae4ef=_0x24272a[_0x1adbb2(0xdb)][_0x1efd95['appCode']];if(!_0x5ae4ef)throw new Error(_0x1adbb2(0xe0)+_0x1efd95[_0x1adbb2(0xcf)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x56a572=await buildHookMaps(_0x1efd95['appCode'],_0x1efd95[_0x1adbb2(0xff)],_0x4bd290,_0x5ae4ef),_0x16824f=[],_0xc38643=[],_0x4ed930=[];for(const _0x35b1ff of _0x4bd290){const _0xcd589e=await computeFileHash(_0x35b1ff[_0x1adbb2(0xf2)]),_0x2ec1c5=_0x5ae4ef['functions'][_0x35b1ff[_0x1adbb2(0xde)]];if(!_0x17040d&&_0x2ec1c5&&_0x2ec1c5[_0x1adbb2(0xf3)]===_0xcd589e){_0xc38643[_0x1adbb2(0xdc)]({'lockKey':_0x35b1ff[_0x1adbb2(0xde)],'reason':_0x1adbb2(0xdd)});continue;}try{await uploadSingleFunction(_0x1efd95[_0x1adbb2(0xcf)],_0x35b1ff,_0x5ae4ef,_0x56a572);const _0x415e85=_0x5ae4ef[_0x1adbb2(0xcc)][_0x35b1ff['lockKey']];_0x16824f['push']({'lockKey':_0x35b1ff[_0x1adbb2(0xde)],'remoteId':_0x415e85?.['remoteId']??0x0});}catch(_0x2bd89f){_0x4ed930[_0x1adbb2(0xdc)]({'lockKey':_0x35b1ff[_0x1adbb2(0xde)],'error':_0x2bd89f instanceof Error?_0x2bd89f['message']:String(_0x2bd89f)});}}_0x5ae4ef[_0x1adbb2(0xc9)]=new Date()['toISOString'](),await writeBffLockFile(_0x163f34[_0x1adbb2(0xae)],_0x24272a),await waitForUploadedLockEntries(_0x163f34[_0x1adbb2(0xae)],_0x1efd95[_0x1adbb2(0xcf)],_0x16824f[_0x1adbb2(0xce)](_0x4fa873=>_0x4fa873[_0x1adbb2(0xde)]));let _0x41d73c={'attempted':![],'cleared':![]};if(_0x16824f[_0x1adbb2(0xea)]>0x0)try{let _0x3a0f31='';for(let _0x5479d7=0x0;_0x5479d7<CACHE_CLEAR_ATTEMPTS;_0x5479d7+=0x1){_0x3a0f31=await clearBffScriptCache(),_0x5479d7<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x41d73c={'attempted':!![],'cleared':!![],'message':_0x3a0f31||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x3dde3d){_0x41d73c={'attempted':!![],'cleared':![],'error':_0x3dde3d instanceof Error?_0x3dde3d[_0x1adbb2(0xd5)]:String(_0x3dde3d)};}const _0x21495d=_0x4ed930[_0x1adbb2(0xea)]===0x0&&(_0x41d73c[_0x1adbb2(0xe1)]?_0x41d73c[_0x1adbb2(0xeb)]:!![]),_0x54bc83=_0x41d73c[_0x1adbb2(0xe1)]?_0x41d73c['cleared']?_0x1adbb2(0xc6):_0x1adbb2(0xda):_0x1adbb2(0xb0);return{'ok':_0x21495d,'data':{'uploaded':_0x16824f,'skipped':_0xc38643,'failed':_0x4ed930,'cacheClear':_0x41d73c},'message':'Push\x20complete:\x20'+_0x16824f[_0x1adbb2(0xea)]+_0x1adbb2(0xe2)+_0xc38643['length']+_0x1adbb2(0xe3)+_0x4ed930['length']+_0x1adbb2(0xd0)+_0x54bc83};}};async function getTargetFunctions(_0x4592ac,_0x2e4812){const _0x17871a=a36_0x256746,_0x1a086=_0x2e4812[_0x17871a(0xaf)](_0x17871a(0xbb)),_0x4c38e3=_0x2e4812[_0x17871a(0xaf)](_0x17871a(0xe8)),_0xec929f=normalizeBffType(_0x1a086)??undefined;if(_0x4c38e3&&!_0xec929f)throw CliErrors[_0x17871a(0xee)](_0x17871a(0xc3));const _0x4d4c38=await scanLocalBffFunctions(_0x4592ac,_0xec929f);if(_0x4c38e3){const _0x411ddf=_0x4d4c38[_0x17871a(0xf5)](_0x2a0273=>_0x2a0273['name']===_0x4c38e3);if(_0x411ddf[_0x17871a(0xea)]===0x0)throw CliErrors[_0x17871a(0xee)](_0x17871a(0x102)+_0xec929f+'/'+_0x4c38e3);return _0x411ddf;}return _0x4d4c38;}async function buildHookMaps(_0x16cb20,_0x142cb8,_0xa6aa5,_0x409938){const _0x25aa00=a36_0x256746,_0x4dbe23=_0xa6aa5[_0x25aa00(0xb5)](_0x41c8aa=>_0x41c8aa[_0x25aa00(0xbb)]===_0x25aa00(0xc2));if(!_0x4dbe23)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x185664=loadAliasMap(_0x142cb8,undefined,resolveApiFilePath(_0x142cb8,_0x16cb20)),_0x2939a0=new Map(_0x185664[_0x25aa00(0xce)](_0x5af6f=>[_0x5af6f['alias'],_0x5af6f[_0x25aa00(0xe4)]]));for(const _0x5ab115 of Object[_0x25aa00(0xfe)](_0x409938['functions'])){_0x5ab115[_0x25aa00(0xd3)]&&_0x5ab115[_0x25aa00(0xe4)]&&!_0x2939a0[_0x25aa00(0xd7)](_0x5ab115[_0x25aa00(0xd3)])&&_0x2939a0[_0x25aa00(0xb4)](_0x5ab115[_0x25aa00(0xd3)],_0x5ab115[_0x25aa00(0xe4)]);}const _0x69eb2e=await listDatasets(_0x16cb20),_0x551c42=new Map(_0x69eb2e[_0x25aa00(0xce)](_0x392353=>[_0x392353[_0x25aa00(0xc8)],_0x392353]));return{'aliasToDatasetCode':_0x2939a0,'datasetCodeToDataset':_0x551c42};}async function uploadSingleFunction(_0x4f3f36,_0x2fc705,_0x31a858,_0x264f96){const _0x1477c1=a36_0x256746,_0x5f064a=await readFile(_0x2fc705[_0x1477c1(0xf2)],_0x1477c1(0xb1)),_0x420de2=await computeFileHash(_0x2fc705[_0x1477c1(0xf2)]),_0x2a8394=_0x31a858['functions'][_0x2fc705[_0x1477c1(0xde)]];if(_0x2a8394?.[_0x1477c1(0xe7)]&&_0x2a8394[_0x1477c1(0xef)]==null)throw CliErrors['validation'](_0x2fc705[_0x1477c1(0xde)]+_0x1477c1(0xf6));let _0xde6365=extractScriptDescription(_0x5f064a);if(!_0xde6365&&_0x2a8394?.[_0x1477c1(0xe7)]){const _0x31bb26=await getBffScriptInfo(_0x2a8394[_0x1477c1(0xe7)]);_0xde6365=_0x31bb26[_0x1477c1(0xf7)]||undefined;}const _0x53781d={'appCode':_0x4f3f36,'functionName':_0x2fc705['name'],'scriptType':_0x2fc705[_0x1477c1(0xbb)],'scriptContent':_0x5f064a};if(_0x2a8394?.[_0x1477c1(0xe7)])_0x53781d['id']=_0x2a8394['remoteId'];if(_0x2a8394?.[_0x1477c1(0xef)]!=null)_0x53781d[_0x1477c1(0xef)]=_0x2a8394[_0x1477c1(0xef)];if(_0xde6365)_0x53781d[_0x1477c1(0xf7)]=_0xde6365;if(_0x2fc705[_0x1477c1(0xbb)]===_0x1477c1(0xc2)){const _0x42b6e4=_0x2fc705['alias'];if(!_0x42b6e4||!_0x2fc705[_0x1477c1(0xb9)]||!_0x2fc705[_0x1477c1(0xf9)])throw CliErrors[_0x1477c1(0xee)](_0x1477c1(0xbf)+_0x2fc705[_0x1477c1(0xde)]);const _0x5eae12=_0x264f96['aliasToDatasetCode'][_0x1477c1(0xe6)](_0x42b6e4)??_0x2a8394?.[_0x1477c1(0xe4)]??_0x42b6e4,_0x479530=_0x264f96[_0x1477c1(0xf0)][_0x1477c1(0xe6)](_0x5eae12);if(!_0x479530)throw CliErrors[_0x1477c1(0xee)](_0x1477c1(0xcb)+_0x42b6e4+_0x1477c1(0xfa)+(_0x1477c1(0xc4)+CLI_BIN_NAME+_0x1477c1(0x103)));_0x53781d[_0x1477c1(0xc5)]=_0x479530['id'],_0x53781d[_0x1477c1(0xb9)]=_0x2fc705[_0x1477c1(0xb9)],_0x53781d[_0x1477c1(0xf9)]=_0x2fc705[_0x1477c1(0xf9)];}const _0x2eb768=await saveBffScript(_0x53781d),_0x5c2e55=_0x2eb768['id'],_0x599177=_0x2eb768[_0x1477c1(0xb2)]??await getBffScriptInfo(_0x5c2e55),_0x5b5fa2={'hash':_0x420de2,'remoteId':_0x5c2e55,'version':_0x599177[_0x1477c1(0xef)]};if(_0x2fc705[_0x1477c1(0xbb)]==='HOOK'){const _0x375ddc=_0x2fc705[_0x1477c1(0xd3)],_0x362249=_0x264f96[_0x1477c1(0xbe)][_0x1477c1(0xe6)](_0x375ddc)??_0x2a8394?.[_0x1477c1(0xe4)]??_0x375ddc;_0x264f96['aliasToDatasetCode'][_0x1477c1(0xd7)](_0x375ddc)?_0x5b5fa2[_0x1477c1(0xd3)]=_0x375ddc:_0x5b5fa2['alias']=_0x2a8394?.['alias'],_0x5b5fa2[_0x1477c1(0xe4)]=_0x362249,_0x5b5fa2[_0x1477c1(0xb9)]=_0x2fc705['operationType'],_0x5b5fa2[_0x1477c1(0xf9)]=_0x2fc705[_0x1477c1(0xf9)];}_0x31a858['functions'][_0x2fc705[_0x1477c1(0xde)]]=_0x5b5fa2;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a36_0xbc97(){const _0x4e7bfd=['lockFilePath','str','runtime\x20cache\x20not\x20needed','utf8','script','8iaGCLb','set','some','6056754XqBSzD','10699640UVXzbd','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','operationType','5871415rroWDs','type','every','bff','aliasToDatasetCode','Incomplete\x20HOOK\x20path:\x20','115312OcKPYy','Push\x20local\x20BFF\x20scripts\x20to\x20remote','HOOK','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Run\x20`','datasetId','runtime\x20cache\x20cleared','Force\x20push\x20ignoring\x20hash\x20protection','code','lastSync','No\x20local\x20BFF\x20functions\x20found.','Cannot\x20resolve\x20dataset\x20for\x20\x22','functions','scriptsRoot','map','appCode','\x20failed,\x20','status','8663112XYCNNM','alias','force','message','Would\x20inspect\x20','has','4SfsfEN','stringify','runtime\x20cache\x20clear\x20failed','apps','push','unchanged','lockKey','/api/management/library/scripts/save','Lock\x20scope\x20for\x20app\x20\x22','attempted','\x20uploaded,\x20','\x20skipped,\x20','datasetCode','boolean','get','remoteId','name','update','length','cleared','5859WPUFNe','ENDPOINT','validation','version','datasetCodeToDataset','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','filePath','hash','join','filter',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','description','create','functionNode','\x22.\x20','15592TJsAno','high-risk-write','would_push','values','apiDir','878403LwAUQu','POST','Local\x20function\x20not\x20found:\x20','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'];a36_0xbc97=function(){return _0x4e7bfd;};return a36_0xbc97();}async function waitForUploadedLockEntries(_0x21da8c,_0x2d4e56,_0x248de7){const _0x5ef7a3=a36_0x256746;if(_0x248de7[_0x5ef7a3(0xea)]===0x0)return;for(let _0x4c532d=0x0;_0x4c532d<LOCK_SETTLE_RETRY_COUNT;_0x4c532d+=0x1){const _0x1d14cc=await readBffLockFile(_0x21da8c),_0x4c3909=_0x1d14cc?.[_0x5ef7a3(0xdb)]?.[_0x2d4e56]?.[_0x5ef7a3(0xcc)]??{},_0x1c59a4=_0x248de7[_0x5ef7a3(0xbc)](_0x5479ba=>!!_0x4c3909[_0x5479ba]?.[_0x5ef7a3(0xe7)]);if(_0x1c59a4)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x5ef7a3(0xf1)+_0x248de7[_0x5ef7a3(0xf4)](',\x20')+'.');}
1
+ const a36_0x55ae30=a36_0x204e;(function(_0xdbc290,_0x2b36dc){const _0x143e0f=a36_0x204e,_0x3a1b9e=_0xdbc290();while(!![]){try{const _0x12ca4a=-parseInt(_0x143e0f(0x19f))/0x1*(-parseInt(_0x143e0f(0x1c9))/0x2)+-parseInt(_0x143e0f(0x1b1))/0x3+parseInt(_0x143e0f(0x188))/0x4+-parseInt(_0x143e0f(0x1be))/0x5+parseInt(_0x143e0f(0x18d))/0x6+parseInt(_0x143e0f(0x1ae))/0x7*(-parseInt(_0x143e0f(0x1a7))/0x8)+-parseInt(_0x143e0f(0x1ad))/0x9*(parseInt(_0x143e0f(0x1c7))/0xa);if(_0x12ca4a===_0x2b36dc)break;else _0x3a1b9e['push'](_0x3a1b9e['shift']());}catch(_0x1442b2){_0x3a1b9e['push'](_0x3a1b9e['shift']());}}}(a36_0x72f2,0x240dc));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,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{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a36_0x55ae30(0x1b5),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a36_0x55ae30(0x1ca),'flags':[{'name':'type','type':a36_0x55ae30(0x18a),'description':'Push\x20only\x20this\x20script\x20type','enum':[a36_0x55ae30(0x180),a36_0x55ae30(0x1a4),a36_0x55ae30(0x19e)]},{'name':a36_0x55ae30(0x1bf),'type':'string','description':a36_0x55ae30(0x1aa)},{'name':a36_0x55ae30(0x17f),'type':a36_0x55ae30(0x1b3),'description':a36_0x55ae30(0x198)}],async 'dryRun'(_0x449cff){const _0x3f36e2=a36_0x55ae30,_0x277e99=loadBffProjectConfig(_0x449cff[_0x3f36e2(0x1c2)]),_0x540757=await readBffLockFile(_0x277e99[_0x3f36e2(0x17e)]),{appLock:_0x1d9b27}=ensureLockScope(_0x540757??createEmptyBffLock(),_0x449cff[_0x3f36e2(0x1c2)],_0x277e99[_0x3f36e2(0x1bd)],_0x3f36e2(0x1b5)),_0x143288=await getTargetFunctions(_0x277e99,_0x449cff),_0x5b138d=_0x449cff[_0x3f36e2(0x194)](_0x3f36e2(0x17f)),_0x347fa4=[];for(const _0x1ef7f1 of _0x143288){const _0x1bfbaa=await computeFileHash(_0x1ef7f1[_0x3f36e2(0x1a6)]),_0x295c8f=_0x1d9b27[_0x3f36e2(0x18e)][_0x1ef7f1[_0x3f36e2(0x1a0)]],_0x6fcc7d=!!_0x295c8f&&_0x295c8f[_0x3f36e2(0x1b6)]===_0x1bfbaa;_0x347fa4[_0x3f36e2(0x1b5)]({'lockKey':_0x1ef7f1[_0x3f36e2(0x1a0)],'filePath':_0x1ef7f1['filePath'],'remoteId':_0x295c8f?.['remoteId']??null,'mode':_0x295c8f?.[_0x3f36e2(0x17a)]?_0x3f36e2(0x182):_0x3f36e2(0x1a5),'status':!_0x5b138d&&_0x6fcc7d?_0x3f36e2(0x1b2):_0x3f36e2(0x19a)});}return{'method':_0x3f36e2(0x1bb),'url':_0x3f36e2(0x199),'body':{'appCode':_0x449cff[_0x3f36e2(0x1c2)],'force':_0x5b138d,'files':_0x347fa4,'cacheClearAtRuntime':_0x347fa4[_0x3f36e2(0x1a2)](_0x2cbbd4=>_0x2cbbd4['status']===_0x3f36e2(0x19a)),'cacheClearAtRuntimeTimes':_0x347fa4[_0x3f36e2(0x1a2)](_0x56b75e=>_0x56b75e['status']==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3f36e2(0x1c1)+_0x347fa4['length']+_0x3f36e2(0x1a1)};},async 'execute'(_0x49df16){const _0x10f32e=a36_0x55ae30,_0x5b2e11=loadBffProjectConfig(_0x49df16[_0x10f32e(0x1c2)]),_0x1a2c78=await readBffLockFile(_0x5b2e11['lockFilePath']),{lockData:_0xb0c5eb,appLock:_0x4b96a5}=ensureLockScope(_0x1a2c78??createEmptyBffLock(),_0x49df16[_0x10f32e(0x1c2)],_0x5b2e11[_0x10f32e(0x1bd)],_0x10f32e(0x1b5)),_0x9c80c=await getTargetFunctions(_0x5b2e11,_0x49df16);if(_0x9c80c[_0x10f32e(0x1c8)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x10f32e(0x193)};const _0x519fae=_0x49df16[_0x10f32e(0x194)]('force'),_0x10915c=JSON[_0x10f32e(0x1b9)](JSON[_0x10f32e(0x1a3)](_0xb0c5eb)),_0x156019=_0x10915c['apps'][_0x49df16[_0x10f32e(0x1c2)]];if(!_0x156019)throw new Error(_0x10f32e(0x17b)+_0x49df16[_0x10f32e(0x1c2)]+_0x10f32e(0x190));const _0x30a96b=await buildHookMaps(_0x49df16[_0x10f32e(0x1c2)],_0x49df16['apiDir'],_0x9c80c,_0x156019),_0x30bf10=[],_0x57e1d7=[],_0x2b3b9c=[];for(const _0x1698da of _0x9c80c){const _0x18f6ba=await computeFileHash(_0x1698da['filePath']),_0xa61433=_0x156019[_0x10f32e(0x18e)][_0x1698da[_0x10f32e(0x1a0)]];if(!_0x519fae&&_0xa61433&&_0xa61433[_0x10f32e(0x1b6)]===_0x18f6ba){_0x57e1d7[_0x10f32e(0x1b5)]({'lockKey':_0x1698da[_0x10f32e(0x1a0)],'reason':_0x10f32e(0x1b2)});continue;}try{await uploadSingleFunction(_0x49df16['appCode'],_0x1698da,_0x156019,_0x30a96b);const _0xc0f951=_0x156019['functions'][_0x1698da[_0x10f32e(0x1a0)]];_0x30bf10[_0x10f32e(0x1b5)]({'lockKey':_0x1698da[_0x10f32e(0x1a0)],'remoteId':_0xc0f951?.['remoteId']??0x0});}catch(_0x11b4c2){_0x2b3b9c[_0x10f32e(0x1b5)]({'lockKey':_0x1698da['lockKey'],'error':_0x11b4c2 instanceof Error?_0x11b4c2[_0x10f32e(0x191)]:String(_0x11b4c2)});}}_0x156019[_0x10f32e(0x1cb)]=new Date()[_0x10f32e(0x1a8)](),await writeBffLockFile(_0x5b2e11['lockFilePath'],_0x10915c),await waitForUploadedLockEntries(_0x5b2e11[_0x10f32e(0x17e)],_0x49df16[_0x10f32e(0x1c2)],_0x30bf10[_0x10f32e(0x1af)](_0x5aa369=>_0x5aa369[_0x10f32e(0x1a0)]));let _0xdfe3ff={'attempted':![],'cleared':![]};if(_0x30bf10[_0x10f32e(0x1c8)]>0x0)try{let _0x3f6525='';for(let _0x345a56=0x0;_0x345a56<CACHE_CLEAR_ATTEMPTS;_0x345a56+=0x1){_0x3f6525=await clearBffScriptCache(),_0x345a56<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0xdfe3ff={'attempted':!![],'cleared':!![],'message':_0x3f6525||_0x10f32e(0x192)};}catch(_0x1a12ca){_0xdfe3ff={'attempted':!![],'cleared':![],'error':_0x1a12ca instanceof Error?_0x1a12ca[_0x10f32e(0x191)]:String(_0x1a12ca)};}const _0x55702a=_0x2b3b9c[_0x10f32e(0x1c8)]===0x0&&(_0xdfe3ff['attempted']?_0xdfe3ff['cleared']:!![]),_0x12b586=_0xdfe3ff['attempted']?_0xdfe3ff[_0x10f32e(0x17c)]?_0x10f32e(0x1c3):'runtime\x20cache\x20clear\x20failed':_0x10f32e(0x18b);return{'ok':_0x55702a,'data':{'uploaded':_0x30bf10,'skipped':_0x57e1d7,'failed':_0x2b3b9c,'cacheClear':_0xdfe3ff},'message':_0x10f32e(0x186)+_0x30bf10[_0x10f32e(0x1c8)]+_0x10f32e(0x183)+_0x57e1d7['length']+_0x10f32e(0x196)+_0x2b3b9c[_0x10f32e(0x1c8)]+_0x10f32e(0x197)+_0x12b586};}};async function getTargetFunctions(_0x25200e,_0xcbc451){const _0x262376=a36_0x55ae30,_0xb0869b=_0xcbc451['str'](_0x262376(0x1c6)),_0x53d61e=_0xcbc451['str'](_0x262376(0x1bf)),_0x2154d3=normalizeBffType(_0xb0869b)??undefined;if(_0x53d61e&&!_0x2154d3)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x4d6b7e=await scanLocalBffFunctions(_0x25200e,_0x2154d3);if(_0x53d61e){const _0x4edce5=_0x4d6b7e[_0x262376(0x1b8)](_0x3adbd7=>_0x3adbd7[_0x262376(0x1bf)]===_0x53d61e);if(_0x4edce5[_0x262376(0x1c8)]===0x0)throw CliErrors[_0x262376(0x18c)](_0x262376(0x189)+_0x2154d3+'/'+_0x53d61e);return _0x4edce5;}return _0x4d6b7e;}async function buildHookMaps(_0x2b40bb,_0x430a14,_0x3699dc,_0x4415cd){const _0x2b4d03=a36_0x55ae30,_0x591d14=_0x3699dc[_0x2b4d03(0x1a2)](_0x5a7148=>_0x5a7148['type']===_0x2b4d03(0x19e));if(!_0x591d14)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5a3a8d=loadAliasMap(_0x430a14,undefined,resolveApiFilePath(_0x430a14,_0x2b40bb)),_0x46acf6=new Map(_0x5a3a8d[_0x2b4d03(0x1af)](_0x2c6f85=>[_0x2c6f85['alias'],_0x2c6f85[_0x2b4d03(0x1c4)]]));for(const _0x1bd21f of Object[_0x2b4d03(0x18f)](_0x4415cd[_0x2b4d03(0x18e)])){_0x1bd21f[_0x2b4d03(0x1c5)]&&_0x1bd21f[_0x2b4d03(0x1c4)]&&!_0x46acf6[_0x2b4d03(0x17d)](_0x1bd21f[_0x2b4d03(0x1c5)])&&_0x46acf6['set'](_0x1bd21f['alias'],_0x1bd21f[_0x2b4d03(0x1c4)]);}const _0x4dafdf=await listDatasets(_0x2b40bb),_0x3fdc3f=new Map(_0x4dafdf[_0x2b4d03(0x1af)](_0x1098f1=>[_0x1098f1[_0x2b4d03(0x195)],_0x1098f1]));return{'aliasToDatasetCode':_0x46acf6,'datasetCodeToDataset':_0x3fdc3f};}async function uploadSingleFunction(_0x84c760,_0x5530ba,_0xa31b4,_0x200d00){const _0x2f6a12=a36_0x55ae30,_0xa25c8f=await readFile(_0x5530ba['filePath'],_0x2f6a12(0x19c)),_0x39dbe0=await computeFileHash(_0x5530ba[_0x2f6a12(0x1a6)]),_0xec5115=_0xa31b4[_0x2f6a12(0x18e)][_0x5530ba[_0x2f6a12(0x1a0)]];if(_0xec5115?.[_0x2f6a12(0x17a)]&&_0xec5115[_0x2f6a12(0x1ba)]==null)throw CliErrors[_0x2f6a12(0x18c)](_0x5530ba[_0x2f6a12(0x1a0)]+_0x2f6a12(0x1b0));let _0x49b046=extractScriptDescription(_0xa25c8f);if(!_0x49b046&&_0xec5115?.[_0x2f6a12(0x17a)]){const _0x23ef45=await getBffScriptInfo(_0xec5115[_0x2f6a12(0x17a)]);_0x49b046=_0x23ef45[_0x2f6a12(0x184)]||undefined;}const _0x7dc96b={'appCode':_0x84c760,'functionName':_0x5530ba[_0x2f6a12(0x1bf)],'scriptType':_0x5530ba[_0x2f6a12(0x1c6)],'scriptContent':_0xa25c8f};if(_0xec5115?.[_0x2f6a12(0x17a)])_0x7dc96b['id']=_0xec5115[_0x2f6a12(0x17a)];if(_0xec5115?.[_0x2f6a12(0x1ba)]!=null)_0x7dc96b[_0x2f6a12(0x1ba)]=_0xec5115[_0x2f6a12(0x1ba)];if(_0x49b046)_0x7dc96b[_0x2f6a12(0x184)]=_0x49b046;if(_0x5530ba['type']===_0x2f6a12(0x19e)){const _0x1f2083=_0x5530ba[_0x2f6a12(0x1c5)];if(!_0x1f2083||!_0x5530ba[_0x2f6a12(0x19b)]||!_0x5530ba[_0x2f6a12(0x185)])throw CliErrors[_0x2f6a12(0x18c)](_0x2f6a12(0x1c0)+_0x5530ba[_0x2f6a12(0x1a0)]);const _0x132229=_0x200d00[_0x2f6a12(0x1ac)][_0x2f6a12(0x1ab)](_0x1f2083)??_0xec5115?.[_0x2f6a12(0x1c4)]??_0x1f2083,_0x2a6458=_0x200d00[_0x2f6a12(0x1b4)]['get'](_0x132229);if(!_0x2a6458)throw CliErrors['validation'](_0x2f6a12(0x1b7)+_0x1f2083+_0x2f6a12(0x1a9)+(_0x2f6a12(0x181)+CLI_BIN_NAME+_0x2f6a12(0x187)));_0x7dc96b['datasetId']=_0x2a6458['id'],_0x7dc96b[_0x2f6a12(0x19b)]=_0x5530ba[_0x2f6a12(0x19b)],_0x7dc96b[_0x2f6a12(0x185)]=_0x5530ba[_0x2f6a12(0x185)];}const _0x4389b8=await saveBffScript(_0x7dc96b),_0x2f5cb7=_0x4389b8['id'],_0x378342=_0x4389b8['script']??await getBffScriptInfo(_0x2f5cb7),_0x2a2673={'hash':_0x39dbe0,'remoteId':_0x2f5cb7,'version':_0x378342[_0x2f6a12(0x1ba)]};if(_0x5530ba['type']===_0x2f6a12(0x19e)){const _0x2b444f=_0x5530ba[_0x2f6a12(0x1c5)],_0x16021a=_0x200d00['aliasToDatasetCode'][_0x2f6a12(0x1ab)](_0x2b444f)??_0xec5115?.[_0x2f6a12(0x1c4)]??_0x2b444f;_0x200d00[_0x2f6a12(0x1ac)][_0x2f6a12(0x17d)](_0x2b444f)?_0x2a2673[_0x2f6a12(0x1c5)]=_0x2b444f:_0x2a2673[_0x2f6a12(0x1c5)]=_0xec5115?.[_0x2f6a12(0x1c5)],_0x2a2673['datasetCode']=_0x16021a,_0x2a2673['operationType']=_0x5530ba['operationType'],_0x2a2673[_0x2f6a12(0x185)]=_0x5530ba[_0x2f6a12(0x185)];}_0xa31b4[_0x2f6a12(0x18e)][_0x5530ba[_0x2f6a12(0x1a0)]]=_0x2a2673;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xfd6763,_0x5ccc53,_0x58bf32){const _0x38a9c3=a36_0x55ae30;if(_0x58bf32[_0x38a9c3(0x1c8)]===0x0)return;for(let _0x35e2c0=0x0;_0x35e2c0<LOCK_SETTLE_RETRY_COUNT;_0x35e2c0+=0x1){const _0xe5f61e=await readBffLockFile(_0xfd6763),_0x4f8fca=_0xe5f61e?.[_0x38a9c3(0x19d)]?.[_0x5ccc53]?.[_0x38a9c3(0x18e)]??{},_0x49f42b=_0x58bf32['every'](_0x30d276=>!!_0x4f8fca[_0x30d276]?.[_0x38a9c3(0x17a)]);if(_0x49f42b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x58bf32[_0x38a9c3(0x1bc)](',\x20')+'.');}function a36_0x204e(_0x5b8bcb,_0x302ebf){_0x5b8bcb=_0x5b8bcb-0x17a;const _0x72f2c2=a36_0x72f2();let _0x204eaf=_0x72f2c2[_0x5b8bcb];return _0x204eaf;}function a36_0x72f2(){const _0x1e1161=['350540tOUbBv','name','Incomplete\x20HOOK\x20path:\x20','Would\x20inspect\x20','appCode','runtime\x20cache\x20cleared','datasetCode','alias','type','490msITIH','length','8xhDHHq','high-risk-write','lastSync','remoteId','Lock\x20scope\x20for\x20app\x20\x22','cleared','has','lockFilePath','force','COMMON','Run\x20`','update','\x20uploaded,\x20','description','functionNode','Push\x20complete:\x20','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','920748TCVzRy','Local\x20function\x20not\x20found:\x20','string','runtime\x20cache\x20not\x20needed','validation','767352GnLdTt','functions','values','\x22\x20not\x20found\x20after\x20ensureLockScope.','message','Runtime\x20script\x20cache\x20cleared.','No\x20local\x20BFF\x20functions\x20found.','bool','code','\x20skipped,\x20','\x20failed,\x20','Force\x20push\x20ignoring\x20hash\x20protection','/api/management/library/scripts/save','would_push','operationType','utf8','apps','HOOK','20211HAIFnB','lockKey','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','some','stringify','ENDPOINT','create','filePath','8GVcoTP','toISOString','\x22.\x20','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','get','aliasToDatasetCode','13401fyoQLm','732389IoaTht','map',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','130653bTLyZW','unchanged','boolean','datasetCodeToDataset','push','hash','Cannot\x20resolve\x20dataset\x20for\x20\x22','filter','parse','version','POST','join','scriptsRoot'];a36_0x72f2=function(){return _0x1e1161;};return a36_0x72f2();}
@@ -1 +1 @@
1
- const a37_0x536f00=a37_0x2d91;(function(_0x279d18,_0x10bacb){const _0x582a62=a37_0x2d91,_0x3bb918=_0x279d18();while(!![]){try{const _0x33d290=-parseInt(_0x582a62(0x18b))/0x1*(-parseInt(_0x582a62(0x19c))/0x2)+parseInt(_0x582a62(0x1a5))/0x3*(-parseInt(_0x582a62(0x1a3))/0x4)+-parseInt(_0x582a62(0x186))/0x5*(-parseInt(_0x582a62(0x1a2))/0x6)+-parseInt(_0x582a62(0x187))/0x7+-parseInt(_0x582a62(0x197))/0x8+-parseInt(_0x582a62(0x1a0))/0x9*(-parseInt(_0x582a62(0x19d))/0xa)+parseInt(_0x582a62(0x19a))/0xb;if(_0x33d290===_0x10bacb)break;else _0x3bb918['push'](_0x3bb918['shift']());}catch(_0x4c0e20){_0x3bb918['push'](_0x3bb918['shift']());}}}(a37_0x3c9f,0xe5159));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';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a37_0x2d91(_0x2d2140,_0x14a498){_0x2d2140=_0x2d2140-0x182;const _0x3c9f7c=a37_0x3c9f();let _0x2d9113=_0x3c9f7c[_0x2d2140];return _0x2d9113;}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a37_0x3c9f(){const _0x320cd8=['11286oKhOvf','822090zVVjUh','remote','length','81tfQNuf','datasetCode','2184552LNmmnB','378188mzTFxq','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','3bscAyb','alias','map','\x20added,\x20','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','5wZjWjl','5354223Lctyzx','filePath','appCode','status','120txMTlK','\x20remote-only','\x20modified,\x20','has','lockFilePath','push','bool','\x20unchanged','boolean','bff','apiDir','lockKey','356792TCAMcC','functions','read','673541AOMYYT','scriptsRoot'];a37_0x3c9f=function(){return _0x320cd8;};return a37_0x3c9f();}export const bffStatus={'service':a37_0x536f00(0x194),'command':'status','description':a37_0x536f00(0x185),'risk':a37_0x536f00(0x199),'flags':[{'name':a37_0x536f00(0x19e),'type':a37_0x536f00(0x193),'description':a37_0x536f00(0x1a4)}],async 'execute'(_0x44928c){const _0x5724eb=a37_0x536f00,_0x1d7ae9=loadBffProjectConfig(_0x44928c[_0x5724eb(0x189)]),_0x2f68ba=await readBffLockFile(_0x1d7ae9[_0x5724eb(0x18f)]),{appLock:_0x301e80}=ensureLockScope(_0x2f68ba??createEmptyBffLock(),_0x44928c['appCode'],_0x1d7ae9[_0x5724eb(0x19b)],_0x5724eb(0x18a)),_0x3fdc8c=await scanLocalBffFunctions(_0x1d7ae9),_0x3959ac=[],_0x251bc1=[],_0x4bbe8f=[];for(const _0x330346 of _0x3fdc8c){const _0x553772=await computeFileHash(_0x330346[_0x5724eb(0x188)]),_0x3aa45c=_0x301e80[_0x5724eb(0x198)][_0x330346[_0x5724eb(0x196)]];if(!_0x3aa45c)_0x3959ac[_0x5724eb(0x190)](_0x330346[_0x5724eb(0x196)]);else _0x3aa45c['hash']!==_0x553772?_0x251bc1['push'](_0x330346['lockKey']):_0x4bbe8f['push'](_0x330346[_0x5724eb(0x196)]);}const _0x1002e8=[];if(_0x44928c[_0x5724eb(0x191)](_0x5724eb(0x19e))){const _0x5abdf7=loadAliasMap(_0x44928c[_0x5724eb(0x195)],undefined,resolveApiFilePath(_0x44928c[_0x5724eb(0x195)],_0x44928c['appCode'])),_0x5cf9f8=new Map(_0x5abdf7[_0x5724eb(0x183)](_0x5af96d=>[_0x5af96d[_0x5724eb(0x1a1)],_0x5af96d[_0x5724eb(0x182)]])),[_0xb4e89c,_0x36023d]=await Promise['all']([listBffScripts(_0x44928c[_0x5724eb(0x189)]),getBffScriptStatistics(_0x44928c[_0x5724eb(0x189)])]),_0x547d85=createHookLocationMap(_0x36023d),_0x1530aa=new Set(_0x3fdc8c['map'](_0x474aac=>_0x474aac[_0x5724eb(0x196)]));for(const _0x2a61b4 of _0xb4e89c){const _0x5c7ab4=resolveRemoteScriptTarget(_0x1d7ae9,_0x2a61b4,_0x547d85,_0x301e80[_0x5724eb(0x198)],_0x5cf9f8);_0x5c7ab4&&!_0x1530aa[_0x5724eb(0x18e)](_0x5c7ab4[_0x5724eb(0x196)])&&_0x1002e8[_0x5724eb(0x190)](_0x5c7ab4[_0x5724eb(0x196)]);}}const _0x524846=_0x3959ac['length']===0x0&&_0x251bc1[_0x5724eb(0x19f)]===0x0&&_0x1002e8['length']===0x0;return{'ok':!![],'data':{'added':_0x3959ac,'modified':_0x251bc1,'unchanged':_0x4bbe8f,'remoteOnly':_0x1002e8},'message':_0x524846?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x3959ac[_0x5724eb(0x19f)]+_0x5724eb(0x184)+_0x251bc1[_0x5724eb(0x19f)]+_0x5724eb(0x18d)+_0x4bbe8f[_0x5724eb(0x19f)]+_0x5724eb(0x192)+(_0x1002e8[_0x5724eb(0x19f)]>0x0?',\x20'+_0x1002e8[_0x5724eb(0x19f)]+_0x5724eb(0x18c):'')};}};
1
+ const a37_0x375d9b=a37_0x398f;function a37_0x398f(_0x439163,_0x509da9){_0x439163=_0x439163-0xc9;const _0x3bdafb=a37_0x3bda();let _0x398f8a=_0x3bdafb[_0x439163];return _0x398f8a;}function a37_0x3bda(){const _0xa73c22=['length','apiDir','All\x20BFF\x20scripts\x20are\x20in\x20sync.','3421648RzHUAx','268uACBEt','3550764OKnjER','\x20remote-only','boolean','lockKey','functions','remote','bff','alias','\x20added,\x20','12dpYYDx','push','filePath','36684lySuTO','lockFilePath','8DIorFa','57597PHmknr','all','scriptsRoot','map','\x20unchanged','appCode','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','7yyoMbW','23455UiqMrb','status','380sTuean','4348674PMbWWL','154728hMTLAx','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','read'];a37_0x3bda=function(){return _0xa73c22;};return a37_0x3bda();}(function(_0x57e5b9,_0x3065f8){const _0x35c077=a37_0x398f,_0x3436be=_0x57e5b9();while(!![]){try{const _0x2ad773=parseInt(_0x35c077(0xdd))/0x1*(-parseInt(_0x35c077(0xdc))/0x2)+-parseInt(_0x35c077(0xda))/0x3+parseInt(_0x35c077(0xcd))/0x4*(-parseInt(_0x35c077(0xe5))/0x5)+parseInt(_0x35c077(0xce))/0x6*(-parseInt(_0x35c077(0xe4))/0x7)+parseInt(_0x35c077(0xcc))/0x8+parseInt(_0x35c077(0xe9))/0x9*(parseInt(_0x35c077(0xe7))/0xa)+-parseInt(_0x35c077(0xe8))/0xb*(-parseInt(_0x35c077(0xd7))/0xc);if(_0x2ad773===_0x3065f8)break;else _0x3436be['push'](_0x3436be['shift']());}catch(_0x441cf4){_0x3436be['push'](_0x3436be['shift']());}}}(a37_0x3bda,0x4ffcd));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';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':a37_0x375d9b(0xd4),'command':a37_0x375d9b(0xe6),'description':a37_0x375d9b(0xe3),'risk':a37_0x375d9b(0xeb),'flags':[{'name':a37_0x375d9b(0xd3),'type':a37_0x375d9b(0xd0),'description':a37_0x375d9b(0xea)}],async 'execute'(_0x3cffff){const _0x39c057=a37_0x375d9b,_0x1adad5=loadBffProjectConfig(_0x3cffff['appCode']),_0x20b307=await readBffLockFile(_0x1adad5[_0x39c057(0xdb)]),{appLock:_0x5a7508}=ensureLockScope(_0x20b307??createEmptyBffLock(),_0x3cffff['appCode'],_0x1adad5[_0x39c057(0xdf)],_0x39c057(0xe6)),_0x362591=await scanLocalBffFunctions(_0x1adad5),_0x5a394e=[],_0x1e31dc=[],_0x1395e8=[];for(const _0xd1e69c of _0x362591){const _0x58e1a3=await computeFileHash(_0xd1e69c[_0x39c057(0xd9)]),_0x18aca3=_0x5a7508[_0x39c057(0xd2)][_0xd1e69c[_0x39c057(0xd1)]];if(!_0x18aca3)_0x5a394e[_0x39c057(0xd8)](_0xd1e69c['lockKey']);else _0x18aca3['hash']!==_0x58e1a3?_0x1e31dc[_0x39c057(0xd8)](_0xd1e69c['lockKey']):_0x1395e8[_0x39c057(0xd8)](_0xd1e69c[_0x39c057(0xd1)]);}const _0x1ca244=[];if(_0x3cffff['bool'](_0x39c057(0xd3))){const _0x44a81d=loadAliasMap(_0x3cffff[_0x39c057(0xca)],undefined,resolveApiFilePath(_0x3cffff[_0x39c057(0xca)],_0x3cffff[_0x39c057(0xe2)])),_0x39c3a5=new Map(_0x44a81d['map'](_0x90bfc3=>[_0x90bfc3['datasetCode'],_0x90bfc3[_0x39c057(0xd5)]])),[_0xd7306e,_0x1ab918]=await Promise[_0x39c057(0xde)]([listBffScripts(_0x3cffff[_0x39c057(0xe2)]),getBffScriptStatistics(_0x3cffff[_0x39c057(0xe2)])]),_0x18c438=createHookLocationMap(_0x1ab918),_0x5d7e79=new Set(_0x362591[_0x39c057(0xe0)](_0x5004ac=>_0x5004ac['lockKey']));for(const _0x5d48e8 of _0xd7306e){const _0x48d4cb=resolveRemoteScriptTarget(_0x1adad5,_0x5d48e8,_0x18c438,_0x5a7508[_0x39c057(0xd2)],_0x39c3a5);_0x48d4cb&&!_0x5d7e79['has'](_0x48d4cb[_0x39c057(0xd1)])&&_0x1ca244[_0x39c057(0xd8)](_0x48d4cb[_0x39c057(0xd1)]);}}const _0xc1f96b=_0x5a394e[_0x39c057(0xc9)]===0x0&&_0x1e31dc[_0x39c057(0xc9)]===0x0&&_0x1ca244[_0x39c057(0xc9)]===0x0;return{'ok':!![],'data':{'added':_0x5a394e,'modified':_0x1e31dc,'unchanged':_0x1395e8,'remoteOnly':_0x1ca244},'message':_0xc1f96b?_0x39c057(0xcb):_0x5a394e[_0x39c057(0xc9)]+_0x39c057(0xd6)+_0x1e31dc[_0x39c057(0xc9)]+'\x20modified,\x20'+_0x1395e8['length']+_0x39c057(0xe1)+(_0x1ca244[_0x39c057(0xc9)]>0x0?',\x20'+_0x1ca244['length']+_0x39c057(0xcf):'')};}};
@@ -1 +1 @@
1
- function a38_0x5019(){const _0x111d76=['apiError','install','80205JVhVjn','npx\x20skills\x20add\x20failed:\x20','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','1505357nVUNdu','60nXcotu','55956JpZnIs','nonInteractive','cli-skill','4lpWxpe','18EOBmXD','474561FLDpHD','cwd','cli-skill-install','skipped','../../skills/npx-skills-add.js','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','pipe','read','1991BCaXxv','329376sPvyXp','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','2746528UqBeBL','CLI\x20Built-in\x20Skill\x20installed','log','48ARDMcU','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','967390TVrpBe','setLogPath',')...','unknown'];a38_0x5019=function(){return _0x111d76;};return a38_0x5019();}const a38_0x509a2f=a38_0x33fc;function a38_0x33fc(_0x5bdc57,_0x58d835){_0x5bdc57=_0x5bdc57-0xe3;const _0x501964=a38_0x5019();let _0x33fcb4=_0x501964[_0x5bdc57];return _0x33fcb4;}(function(_0x414942,_0xeee06a){const _0x4097d6=a38_0x33fc,_0x30723a=_0x414942();while(!![]){try{const _0x4dd52d=-parseInt(_0x4097d6(0xf8))/0x1*(-parseInt(_0x4097d6(0x103))/0x2)+-parseInt(_0x4097d6(0xf0))/0x3*(-parseInt(_0x4097d6(0xe7))/0x4)+parseInt(_0x4097d6(0xea))/0x5+parseInt(_0x4097d6(0xf9))/0x6*(-parseInt(_0x4097d6(0xf3))/0x7)+parseInt(_0x4097d6(0xe4))/0x8+-parseInt(_0x4097d6(0xfa))/0x9*(-parseInt(_0x4097d6(0xf4))/0xa)+-parseInt(_0x4097d6(0x102))/0xb*(parseInt(_0x4097d6(0xf5))/0xc);if(_0x4dd52d===_0xeee06a)break;else _0x30723a['push'](_0x30723a['shift']());}catch(_0x352b4c){_0x30723a['push'](_0x30723a['shift']());}}}(a38_0x5019,0x53e20));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a38_0x509a2f(0xf7),'command':a38_0x509a2f(0xef),'description':a38_0x509a2f(0xf2),'risk':a38_0x509a2f(0x101),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5ab85b){const _0x3277f5=a38_0x509a2f;logger[_0x3277f5(0xeb)](process['cwd']()),logger['info'](_0x3277f5(0xfc),_0x3277f5(0xff));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x39f159,RABETBASE_SKILL_SOURCE:_0x2d10c8,runNpxSkillsAddGlobal:_0x1bad3e}=await import(_0x3277f5(0xfe)),_0x1eccdd=_0x5ab85b[_0x3277f5(0xf6)]?_0x3277f5(0x100):'inherit';console['log'](_0x3277f5(0xe8)+_0x39f159+_0x3277f5(0xec));const _0x317455=_0x1bad3e(process[_0x3277f5(0xfb)](),_0x2d10c8,{'stdio':_0x1eccdd});if(_0x317455[_0x3277f5(0xfd)])console[_0x3277f5(0xe6)](_0x3277f5(0xe3));else{if(_0x317455['ok'])console[_0x3277f5(0xe6)](_0x3277f5(0xe5));else throw CliErrors[_0x3277f5(0xee)](_0x3277f5(0xf1)+(_0x317455['error']||_0x3277f5(0xed)),_0x3277f5(0xe9)+_0x39f159);}return{'ok':!![]};}}];
1
+ const a38_0xb18701=a38_0xfeb6;function a38_0xfeb6(_0x2c712c,_0x30ee90){_0x2c712c=_0x2c712c-0x182;const _0x374f4c=a38_0x374f();let _0xfeb64d=_0x374f4c[_0x2c712c];return _0xfeb64d;}function a38_0x374f(){const _0x4a38fd=['read','CLI\x20Built-in\x20Skill\x20','Installing\x20CLI\x20Built-in\x20Skill\x20from\x20the\x20current\x20package.','Resolve\x20the\x20Skills\x20CLI\x20installation\x20issue\x20and\x20run:\x20','apiError','unknown',']:\x20','changed','\x20is\x20already\x20current','info','inherit','\x20via\x20skills@latest','1099npFmsk','cli-skill','1568200pJLWXR','24834LFNrKY','install','\x20installed','pipe','setLogPath','nonInteractive','6626aHgFoQ','Built-in\x20Skill\x20install\x20failed\x20[','skillVersion','code','514167OdwarE','cwd','\x20at\x20','1463840bLOPHH','999TCZPIF','log','12353373ppCObu','repairCommand','1589288VGALTT','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','installedPath'];a38_0x374f=function(){return _0x4a38fd;};return a38_0x374f();}(function(_0x16dc84,_0x2917db){const _0x3afcef=a38_0xfeb6,_0x3c88da=_0x16dc84();while(!![]){try{const _0x2a225f=parseInt(_0x3afcef(0x19e))/0x1+-parseInt(_0x3afcef(0x19a))/0x2*(parseInt(_0x3afcef(0x1a2))/0x3)+parseInt(_0x3afcef(0x1a1))/0x4+parseInt(_0x3afcef(0x193))/0x5+parseInt(_0x3afcef(0x194))/0x6*(-parseInt(_0x3afcef(0x191))/0x7)+-parseInt(_0x3afcef(0x182))/0x8+parseInt(_0x3afcef(0x1a4))/0x9;if(_0x2a225f===_0x2917db)break;else _0x3c88da['push'](_0x3c88da['shift']());}catch(_0x3e4795){_0x3c88da['push'](_0x3c88da['shift']());}}}(a38_0x374f,0x960fb));import{CliErrors}from'../../errors.js';import{installBuiltinSkill}from'../../skills/builtin-skill.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a38_0xb18701(0x192),'command':a38_0xb18701(0x195),'description':a38_0xb18701(0x183),'risk':a38_0xb18701(0x185),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4fcde1){const _0x599e03=a38_0xb18701;logger[_0x599e03(0x198)](process[_0x599e03(0x19f)]()),logger[_0x599e03(0x18e)]('cli-skill-install',_0x599e03(0x187));const _0x2a9650=installBuiltinSkill({'stdio':_0x4fcde1[_0x599e03(0x199)]?_0x599e03(0x197):_0x599e03(0x18f)});if(!_0x2a9650['ok'])throw CliErrors[_0x599e03(0x189)](_0x599e03(0x19b)+_0x2a9650[_0x599e03(0x19d)]+_0x599e03(0x18b)+(_0x2a9650['error']||_0x599e03(0x18a)),_0x599e03(0x188)+_0x2a9650[_0x599e03(0x1a5)]);return console[_0x599e03(0x1a3)](_0x2a9650[_0x599e03(0x18c)]?_0x599e03(0x186)+_0x2a9650[_0x599e03(0x19c)]+_0x599e03(0x196)+(_0x2a9650[_0x599e03(0x184)]?_0x599e03(0x1a0)+_0x2a9650[_0x599e03(0x184)]:_0x599e03(0x190)):_0x599e03(0x186)+_0x2a9650[_0x599e03(0x19c)]+_0x599e03(0x18d)+(_0x2a9650['installedPath']?'\x20at\x20'+_0x2a9650[_0x599e03(0x184)]:'')),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a39_0x3dc2db=a39_0x49ec;(function(_0x5809dc,_0x48afdf){const _0x22c44e=a39_0x49ec,_0x1cb171=_0x5809dc();while(!![]){try{const _0x72ea94=parseInt(_0x22c44e(0x117))/0x1+-parseInt(_0x22c44e(0x10d))/0x2+parseInt(_0x22c44e(0x131))/0x3*(parseInt(_0x22c44e(0xf2))/0x4)+parseInt(_0x22c44e(0xef))/0x5*(-parseInt(_0x22c44e(0x12f))/0x6)+parseInt(_0x22c44e(0x110))/0x7*(-parseInt(_0x22c44e(0x13e))/0x8)+-parseInt(_0x22c44e(0x116))/0x9+parseInt(_0x22c44e(0x126))/0xa*(parseInt(_0x22c44e(0xfd))/0xb);if(_0x72ea94===_0x48afdf)break;else _0x1cb171['push'](_0x1cb171['shift']());}catch(_0x1cd4b8){_0x1cb171['push'](_0x1cb171['shift']());}}}(a39_0x3bd9,0xd9a63));import a39_0x45f65f from'chalk';import a39_0x1ab039 from'ora';function a39_0x49ec(_0x4965ae,_0x3c06a9){_0x4965ae=_0x4965ae-0xea;const _0x3bd9e6=a39_0x3bd9();let _0x49ecb2=_0x3bd9e6[_0x4965ae];return _0x49ecb2;}import a39_0x3544a5 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{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x4dca09=a39_0x49ec;return GIT_COMMIT!==_0x4dca09(0xf5)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2cd86f=a39_0x49ec,_0x5779d7=process[_0x2cd86f(0x113)]['toLowerCase']();if(_0x5779d7['includes'](_0x2cd86f(0x138)))return'bun';return _0x2cd86f(0x124);}const updateFlags=[{'name':a39_0x3dc2db(0xf6),'type':'boolean','description':a39_0x3dc2db(0x127),'default':![]},{'name':a39_0x3dc2db(0x12d),'type':a39_0x3dc2db(0x12c),'description':a39_0x3dc2db(0x135)},{'name':a39_0x3dc2db(0x106),'type':a39_0x3dc2db(0x120),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a39_0x3dc2db(0xea),'type':'boolean','description':a39_0x3dc2db(0xf1),'default':!![],'hidden':!![]}];function a39_0x3bd9(){const _0x1d5d3b=['1375703cBktiB','str','run','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','green','Requested\x20version:\x20','succeed','nonInteractive','boolean','log','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','object','npm','inherit','10pUuJNl','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Updated\x20to\x20v','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','validation','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','string','version','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','18DcXUNQ','Invalid\x20version:\x20','443637vFvrfC','error','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Install\x20a\x20specific\x20CLI\x20version','source','fromEntries','bun','map','read','Version\x20comparison\x20failed','https://registry.npmjs.org/-/package/','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','24MXMWvt','skills','flag','Checking\x20for\x20updates...','json','\x20\x20Run\x20manually:\x20','2481535jVuqMj','latest','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','8PMTRfT','yellow','Update\x20failed','unknown','beta','install','filter','Checking\x20CLI\x20Built-in\x20Skill...','warn','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','\x20install\x20-g\x20','57176152msGTXG','start','/dist-tags','message','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','red','Already\x20up\x20to\x20date\x20(v','bool','info','no-skills','fail','valid','Update\x20available:\x20','\x20cli-skill\x20install','trim','gray','2693906QdmLxo','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Already\x20on\x20requested\x20version\x20(v','4109840xlSbzy','length','pipe','execPath','\x20\x20Try\x20manually:\x20','entries','12425112ldEBOa'];a39_0x3bd9=function(){return _0x1d5d3b;};return a39_0x3bd9();}function getRequestedVersion(_0x35d30a){const _0x1e78a3=a39_0x3dc2db;return _0x35d30a[_0x1e78a3(0x118)](_0x1e78a3(0x12d))[_0x1e78a3(0x10b)]();}function shouldSkipCliSkill(_0x1509b2){const _0x4761af=a39_0x3dc2db;return _0x1509b2[_0x4761af(0x104)](_0x4761af(0x106))||_0x1509b2[_0x4761af(0xeb)]('skills')===![];}async function validateUpdateFlags(_0x3e484e){const _0x5229d8=a39_0x3dc2db,_0x3bb6dc=_0x3e484e[_0x5229d8(0x104)](_0x5229d8(0xf6)),_0x5161ee=getRequestedVersion(_0x3e484e);if(_0x3bb6dc&&_0x5161ee)throw CliErrors[_0x5229d8(0x12a)](_0x5229d8(0x13d),_0x5229d8(0x133));if(_0x5161ee&&!a39_0x3544a5['valid'](_0x5161ee))throw CliErrors['validation'](_0x5229d8(0x130)+_0x5161ee,_0x5229d8(0x134));}async function fetchNpmDistTags(){const _0x1c8d40=a39_0x3dc2db;try{const _0x4faf21=await fetch(_0x1c8d40(0x13c)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x1c8d40(0xff),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x4faf21['ok'])return null;const _0x5b93c6=await _0x4faf21[_0x1c8d40(0xed)]();if(!_0x5b93c6||typeof _0x5b93c6!==_0x1c8d40(0x123))return null;return Object[_0x1c8d40(0x137)](Object[_0x1c8d40(0x115)](_0x5b93c6)[_0x1c8d40(0xf8)](([,_0x3da481])=>typeof _0x3da481===_0x1c8d40(0x12c)&&_0x3da481[_0x1c8d40(0x10b)]()[_0x1c8d40(0x111)]>0x0)[_0x1c8d40(0x139)](([_0x28c482,_0x107cc4])=>[_0x28c482,String(_0x107cc4)[_0x1c8d40(0x10b)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3460dc){const _0x4c8669=await fetchNpmDistTags();return _0x4c8669?.[_0x3460dc]??null;}async function fetchLatestVersion(){const _0x33eb3f=a39_0x3dc2db;return fetchNpmDistTagVersion(_0x33eb3f(0xf0));}async function resolveTargetVersion(_0x2ab369){const _0x55a89a=a39_0x3dc2db,_0x31a2c1=getRequestedVersion(_0x2ab369);if(_0x31a2c1)return{'version':_0x31a2c1,'source':_0x55a89a(0x12d)};if(_0x2ab369[_0x55a89a(0x104)](_0x55a89a(0xf6))){const _0x36f4e2=await fetchNpmDistTagVersion('beta');if(!_0x36f4e2)return null;return{'version':_0x36f4e2,'source':_0x55a89a(0xf6)};}const _0x4702d9=await fetchLatestVersion();if(!_0x4702d9)return null;return{'version':_0x4702d9,'source':_0x55a89a(0xf0)};}function shouldInstallTarget(_0x1c03fc,_0x5b4387){const _0x377d8e=a39_0x3dc2db;if(_0x5b4387['source']==='version'||_0x5b4387[_0x377d8e(0x136)]===_0x377d8e(0xf6))return!a39_0x3544a5['eq'](_0x1c03fc,_0x5b4387[_0x377d8e(0x12d)]);return a39_0x3544a5['lt'](_0x1c03fc,_0x5b4387['version']);}function getInstallPlanLabel(_0x2c600c,_0x272e7c){const _0x1159f0=a39_0x3dc2db;switch(_0x272e7c[_0x1159f0(0x136)]){case _0x1159f0(0xf6):return'Beta\x20version:\x20'+a39_0x45f65f['yellow'](_0x2c600c)+'\x20→\x20'+a39_0x45f65f[_0x1159f0(0x11c)](_0x272e7c[_0x1159f0(0x12d)]);case _0x1159f0(0x12d):return _0x1159f0(0x11d)+a39_0x45f65f['yellow'](_0x2c600c)+'\x20→\x20'+a39_0x45f65f[_0x1159f0(0x11c)](_0x272e7c['version']);case _0x1159f0(0xf0):default:return _0x1159f0(0x109)+a39_0x45f65f[_0x1159f0(0xf3)](_0x2c600c)+'\x20→\x20'+a39_0x45f65f[_0x1159f0(0x11c)](_0x272e7c[_0x1159f0(0x12d)]);}}async function installCliSkill(_0x5a27bd){const _0x5a1097=a39_0x3dc2db;console[_0x5a1097(0x121)](a39_0x45f65f[_0x5a1097(0x10c)](_0x5a1097(0xf9)));const _0x3d0892=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5a27bd?_0x5a1097(0x112):_0x5a1097(0x125)});if(_0x3d0892['skipped']){console[_0x5a1097(0x121)](a39_0x45f65f[_0x5a1097(0x10c)](_0x5a1097(0x12b)));return;}if(_0x3d0892['ok']){console[_0x5a1097(0x121)](a39_0x45f65f[_0x5a1097(0x10c)](_0x5a1097(0x12e)));return;}console[_0x5a1097(0xfa)](a39_0x45f65f[_0x5a1097(0xf3)](_0x5a1097(0x11a)+(_0x3d0892[_0x5a1097(0x132)]||_0x5a1097(0xf5)))),console[_0x5a1097(0x121)](a39_0x45f65f[_0x5a1097(0x10c)](_0x5a1097(0xee)+CLI_BIN_NAME+_0x5a1097(0x10a)));}async function execute(_0x17a598){const _0x5d271e=a39_0x3dc2db;await validateUpdateFlags(_0x17a598);const _0x3872d8=getCurrentVersion();console[_0x5d271e(0x121)]('Current\x20version:\x20'+_0x3872d8);const _0x2cea68=a39_0x1ab039(_0x5d271e(0xec))[_0x5d271e(0xfe)](),_0x1f5910=await resolveTargetVersion(_0x17a598);if(!_0x1f5910){const _0x279c55=_0x17a598[_0x5d271e(0x104)]('beta')?_0x5d271e(0x129):_0x5d271e(0x101);return _0x2cea68[_0x5d271e(0x107)](_0x279c55),console['log'](a39_0x45f65f['gray'](_0x5d271e(0x122)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x279c55};}const _0xa76a66=a39_0x3544a5['valid'](VERSION),_0x5ab1ca=a39_0x3544a5[_0x5d271e(0x108)](_0x1f5910[_0x5d271e(0x12d)]);if(!_0xa76a66||!_0x5ab1ca)return _0x2cea68[_0x5d271e(0x107)](_0x5d271e(0x13b)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0xa76a66,_0x1f5910)){const _0x9ff42c=_0x1f5910[_0x5d271e(0x136)]===_0x5d271e(0x12d)?_0x5d271e(0x10f)+_0x1f5910[_0x5d271e(0x12d)]+')':_0x5d271e(0x103)+_0x1f5910[_0x5d271e(0x12d)]+')';return _0x2cea68[_0x5d271e(0x11e)](_0x9ff42c),shouldSkipCliSkill(_0x17a598)?console[_0x5d271e(0x121)](a39_0x45f65f[_0x5d271e(0x10c)](_0x5d271e(0x11b))):await installCliSkill(_0x17a598[_0x5d271e(0x11f)]),{'ok':!![]};}_0x2cea68[_0x5d271e(0x105)](getInstallPlanLabel(_0x3872d8,_0x1f5910));const _0x351fcc=detectPackageManager(),_0x3aa548=_0x351fcc===_0x5d271e(0x124)?resolveNpmBin(_0x5d271e(0x124)):_0x351fcc,_0x6d5319=a39_0x1ab039('Updating\x20via\x20'+_0x351fcc+'...')[_0x5d271e(0xfe)]();try{return await execa(_0x3aa548,[_0x5d271e(0xf7),'-g',NPM_PACKAGE_NAME+'@'+_0x1f5910[_0x5d271e(0x12d)]],{'stdio':'pipe'}),_0x6d5319[_0x5d271e(0x11e)](_0x5d271e(0x128)+_0x1f5910[_0x5d271e(0x12d)]),console[_0x5d271e(0x121)](a39_0x45f65f['gray'](_0x5d271e(0x10e))),shouldSkipCliSkill(_0x17a598)?console[_0x5d271e(0x121)](a39_0x45f65f[_0x5d271e(0x10c)](_0x5d271e(0x11b))):await installCliSkill(_0x17a598[_0x5d271e(0x11f)]),{'ok':!![]};}catch(_0x1a4927){return _0x6d5319[_0x5d271e(0x107)](_0x5d271e(0xf4)),console[_0x5d271e(0x132)](a39_0x45f65f[_0x5d271e(0x102)]('\x20\x20'+_0x1a4927[_0x5d271e(0x100)])),console[_0x5d271e(0x121)](a39_0x45f65f[_0x5d271e(0x10c)](_0x5d271e(0x114)+_0x351fcc+_0x5d271e(0xfc)+NPM_PACKAGE_NAME+'@'+_0x1f5910[_0x5d271e(0x12d)])),{'ok':![],'message':_0x1a4927['message']};}}export const updateDefinition={'service':'update','command':a39_0x3dc2db(0x119),'description':a39_0x3dc2db(0xfb),'risk':a39_0x3dc2db(0x13a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a39_0x2ad843=a39_0x1a85;(function(_0x21d668,_0xc67619){const _0x49105c=a39_0x1a85,_0x7cb0e3=_0x21d668();while(!![]){try{const _0x2ce657=parseInt(_0x49105c(0x224))/0x1*(-parseInt(_0x49105c(0x22a))/0x2)+-parseInt(_0x49105c(0x203))/0x3+-parseInt(_0x49105c(0x1f5))/0x4*(-parseInt(_0x49105c(0x1fe))/0x5)+-parseInt(_0x49105c(0x1f4))/0x6+parseInt(_0x49105c(0x217))/0x7+-parseInt(_0x49105c(0x22b))/0x8+parseInt(_0x49105c(0x223))/0x9*(parseInt(_0x49105c(0x1f8))/0xa);if(_0x2ce657===_0xc67619)break;else _0x7cb0e3['push'](_0x7cb0e3['shift']());}catch(_0x348f00){_0x7cb0e3['push'](_0x7cb0e3['shift']());}}}(a39_0x9d13,0x7a814));import a39_0x476aa0 from'chalk';import a39_0x392902 from'ora';function a39_0x1a85(_0x126a81,_0x2db9b8){_0x126a81=_0x126a81-0x1e1;const _0x9d1372=a39_0x9d13();let _0x1a8563=_0x9d1372[_0x126a81];return _0x1a8563;}import a39_0x54f4ee 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 _0x18eeaa=a39_0x1a85;return GIT_COMMIT!==_0x18eeaa(0x1eb)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x18eeaa(0x1f9)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x24eff8=a39_0x1a85,_0x4c15c8=process['execPath']['toLowerCase']();if(_0x4c15c8['includes'](_0x24eff8(0x1ed)))return'bun';return _0x24eff8(0x1f0);}const updateFlags=[{'name':a39_0x2ad843(0x207),'type':'boolean','description':a39_0x2ad843(0x202),'default':![]},{'name':'version','type':a39_0x2ad843(0x225),'description':a39_0x2ad843(0x20e)}];function getRequestedVersion(_0x3df882){const _0x74a468=a39_0x2ad843;return _0x3df882[_0x74a468(0x21a)]('version')[_0x74a468(0x1e1)]();}async function validateUpdateFlags(_0x30bb7d){const _0xb9c4cf=a39_0x2ad843,_0x335987=_0x30bb7d[_0xb9c4cf(0x1fa)]('beta'),_0x2c8fb2=getRequestedVersion(_0x30bb7d);if(_0x335987&&_0x2c8fb2)throw CliErrors[_0xb9c4cf(0x228)](_0xb9c4cf(0x1fb),_0xb9c4cf(0x205));if(_0x2c8fb2&&!a39_0x54f4ee[_0xb9c4cf(0x209)](_0x2c8fb2))throw CliErrors['validation'](_0xb9c4cf(0x1f6)+_0x2c8fb2,_0xb9c4cf(0x21f));}async function fetchNpmDistTags(){const _0x581718=a39_0x2ad843;try{const _0x401f15=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x581718(0x1e3),{'signal':AbortSignal[_0x581718(0x20f)](0x2710)});if(!_0x401f15['ok'])return null;const _0x54aeb3=await _0x401f15['json']();if(!_0x54aeb3||typeof _0x54aeb3!==_0x581718(0x213))return null;return Object[_0x581718(0x21e)](Object[_0x581718(0x210)](_0x54aeb3)[_0x581718(0x1f7)](([,_0x5292b8])=>typeof _0x5292b8===_0x581718(0x225)&&_0x5292b8[_0x581718(0x1e1)]()[_0x581718(0x1ea)]>0x0)[_0x581718(0x222)](([_0xa29aa5,_0x52bc5f])=>[_0xa29aa5,String(_0x52bc5f)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4d4f7f){const _0x4b0f8c=await fetchNpmDistTags();return _0x4b0f8c?.[_0x4d4f7f]??null;}async function fetchLatestVersion(){const _0x427dc3=a39_0x2ad843;return fetchNpmDistTagVersion(_0x427dc3(0x1ef));}function a39_0x9d13(){const _0x190467=['error','Current\x20version:\x20','trim','\x20\x20Run\x20manually:\x20','/dist-tags','Updating\x20via\x20',',\x20found\x20','red','gray','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','succeed','length','unknown','\x20\x20CLI\x20Built-in\x20Skill\x20','bun','warn','latest','npm','start','\x20install\x20-g\x20','state','551976vWzIlq','16VXmrbV','Invalid\x20version:\x20','filter','7740690IYzvxl','slice','bool','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','version','Beta\x20version:\x20','70EFntuO','Updated\x20to\x20v','skillVersion','\x20→\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','2185128JsVISd','Update\x20failed','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','pipe','beta','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','valid','\x20\x20Try\x20manually:\x20','run','Version\x20comparison\x20failed','install','Install\x20a\x20specific\x20CLI\x20version','timeout','entries','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','log','object','green','current','yellow','3080273wytGcw','...','source','str','fail','expected\x20','\x20is\x20up\x20to\x20date.','fromEntries','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.',']:\x20','read','map','27ptukYe','677FlPuIB','string','Update\x20available:\x20','code','validation','info','1998lkQEzD','6110616vXnodF','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm'];a39_0x9d13=function(){return _0x190467;};return a39_0x9d13();}async function resolveTargetVersion(_0x2e4709){const _0x38e69d=a39_0x2ad843,_0x4b8274=getRequestedVersion(_0x2e4709);if(_0x4b8274)return{'version':_0x4b8274,'source':_0x38e69d(0x1fc)};if(_0x2e4709[_0x38e69d(0x1fa)](_0x38e69d(0x207))){const _0x47fadf=await fetchNpmDistTagVersion(_0x38e69d(0x207));if(!_0x47fadf)return null;return{'version':_0x47fadf,'source':_0x38e69d(0x207)};}const _0xbeb460=await fetchLatestVersion();if(!_0xbeb460)return null;return{'version':_0xbeb460,'source':_0x38e69d(0x1ef)};}function shouldInstallTarget(_0x50cb59,_0x105f16){const _0x37a509=a39_0x2ad843;if(_0x105f16[_0x37a509(0x219)]===_0x37a509(0x1fc)||_0x105f16[_0x37a509(0x219)]===_0x37a509(0x207))return!a39_0x54f4ee['eq'](_0x50cb59,_0x105f16[_0x37a509(0x1fc)]);return a39_0x54f4ee['lt'](_0x50cb59,_0x105f16[_0x37a509(0x1fc)]);}function getInstallPlanLabel(_0x42c424,_0x24bcb6){const _0x512572=a39_0x2ad843;switch(_0x24bcb6[_0x512572(0x219)]){case _0x512572(0x207):return _0x512572(0x1fd)+a39_0x476aa0[_0x512572(0x216)](_0x42c424)+_0x512572(0x201)+a39_0x476aa0[_0x512572(0x214)](_0x24bcb6[_0x512572(0x1fc)]);case _0x512572(0x1fc):return'Requested\x20version:\x20'+a39_0x476aa0[_0x512572(0x216)](_0x42c424)+'\x20→\x20'+a39_0x476aa0[_0x512572(0x214)](_0x24bcb6[_0x512572(0x1fc)]);case _0x512572(0x1ef):default:return _0x512572(0x226)+a39_0x476aa0[_0x512572(0x216)](_0x42c424)+'\x20→\x20'+a39_0x476aa0[_0x512572(0x214)](_0x24bcb6[_0x512572(0x1fc)]);}}function repairCurrentBuiltinSkill(){const _0x2b0ac8=a39_0x2ad843;console[_0x2b0ac8(0x212)](a39_0x476aa0[_0x2b0ac8(0x1e7)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x4a8f55=installBuiltinSkill();if(_0x4a8f55['ok'])return console[_0x2b0ac8(0x212)](a39_0x476aa0[_0x2b0ac8(0x1e7)]('\x20\x20CLI\x20Built-in\x20Skill\x20'+_0x4a8f55[_0x2b0ac8(0x200)]+_0x2b0ac8(0x21d))),!![];return console['warn'](a39_0x476aa0[_0x2b0ac8(0x216)]('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+_0x4a8f55[_0x2b0ac8(0x227)]+_0x2b0ac8(0x220)+(_0x4a8f55[_0x2b0ac8(0x22d)]||'unknown'))),console['log'](a39_0x476aa0['gray'](_0x2b0ac8(0x1e2)+CLI_BIN_NAME+'\x20cli-skill\x20install')),![];}function verifyUpdatedBuiltinSkill(_0x3e3503){const _0x43b271=a39_0x2ad843,_0xb850d=inspectInstalledBuiltinSkillVersion(_0x3e3503);if(_0xb850d[_0x43b271(0x1f3)]===_0x43b271(0x215))return console[_0x43b271(0x212)](a39_0x476aa0['gray'](_0x43b271(0x1ec)+_0x3e3503+_0x43b271(0x21d))),!![];const _0x4bcec4=_0xb850d[_0x43b271(0x200)]?'expected\x20'+_0x3e3503+_0x43b271(0x1e5)+_0xb850d['skillVersion']:_0x43b271(0x21c)+_0x3e3503+',\x20state\x20'+_0xb850d[_0x43b271(0x1f3)];return console[_0x43b271(0x1ee)](a39_0x476aa0[_0x43b271(0x216)](_0x43b271(0x211)+_0x4bcec4)),console[_0x43b271(0x212)](a39_0x476aa0[_0x43b271(0x1e7)](_0x43b271(0x1e2)+_0xb850d['repairCommand'])),![];}async function execute(_0x28b220){const _0xdae04f=a39_0x2ad843;await validateUpdateFlags(_0x28b220);const _0x4b4a33=getCurrentVersion();console[_0xdae04f(0x212)](_0xdae04f(0x22e)+_0x4b4a33);const _0x25ac76=a39_0x392902('Checking\x20for\x20updates...')[_0xdae04f(0x1f1)](),_0x3be4d6=await resolveTargetVersion(_0x28b220);if(!_0x3be4d6){const _0x395240=_0x28b220[_0xdae04f(0x1fa)](_0xdae04f(0x207))?_0xdae04f(0x22c):_0xdae04f(0x208);return _0x25ac76[_0xdae04f(0x21b)](_0x395240),console['log'](a39_0x476aa0[_0xdae04f(0x1e7)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x395240};}const _0x20a16c=a39_0x54f4ee[_0xdae04f(0x209)](VERSION),_0x436122=a39_0x54f4ee[_0xdae04f(0x209)](_0x3be4d6[_0xdae04f(0x1fc)]);if(!_0x20a16c||!_0x436122)return _0x25ac76['fail'](_0xdae04f(0x20c)),{'ok':![],'message':_0xdae04f(0x20c)};if(!shouldInstallTarget(_0x20a16c,_0x3be4d6)){const _0x320462=_0x3be4d6[_0xdae04f(0x219)]===_0xdae04f(0x1fc)?'Already\x20on\x20requested\x20version\x20(v'+_0x3be4d6[_0xdae04f(0x1fc)]+')':'Already\x20up\x20to\x20date\x20(v'+_0x3be4d6['version']+')';return _0x25ac76['succeed'](_0x320462),{'ok':repairCurrentBuiltinSkill()};}_0x25ac76[_0xdae04f(0x229)](getInstallPlanLabel(_0x4b4a33,_0x3be4d6));const _0x2d1e15=detectPackageManager(),_0xbd18be=_0x2d1e15===_0xdae04f(0x1f0)?resolveNpmBin(_0xdae04f(0x1f0)):_0x2d1e15,_0x1e0c61=a39_0x392902(_0xdae04f(0x1e4)+_0x2d1e15+_0xdae04f(0x218))['start']();try{return await execa(_0xbd18be,[_0xdae04f(0x20d),'-g',NPM_PACKAGE_NAME+'@'+_0x3be4d6[_0xdae04f(0x1fc)]],{'stdio':_0xdae04f(0x206)}),_0x1e0c61[_0xdae04f(0x1e9)](_0xdae04f(0x1ff)+_0x3be4d6['version']),console[_0xdae04f(0x212)](a39_0x476aa0[_0xdae04f(0x1e7)](_0xdae04f(0x1e8))),{'ok':verifyUpdatedBuiltinSkill(_0x3be4d6[_0xdae04f(0x1fc)])};}catch(_0x5f09f2){return _0x1e0c61['fail'](_0xdae04f(0x204)),console[_0xdae04f(0x22d)](a39_0x476aa0[_0xdae04f(0x1e6)]('\x20\x20'+_0x5f09f2['message'])),console[_0xdae04f(0x212)](a39_0x476aa0[_0xdae04f(0x1e7)](_0xdae04f(0x20a)+_0x2d1e15+_0xdae04f(0x1f2)+NPM_PACKAGE_NAME+'@'+_0x3be4d6[_0xdae04f(0x1fc)])),{'ok':![],'message':_0x5f09f2['message']};}}export const updateDefinition={'service':'update','command':a39_0x2ad843(0x20b),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a39_0x2ad843(0x221),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x248670,_0x4bca1a){const _0x14390a=a40_0x3513,_0xb86f7c=_0x248670();while(!![]){try{const _0x5854ce=-parseInt(_0x14390a(0x1ad))/0x1+parseInt(_0x14390a(0x1b1))/0x2*(parseInt(_0x14390a(0x1b2))/0x3)+-parseInt(_0x14390a(0x1b5))/0x4*(-parseInt(_0x14390a(0x1b7))/0x5)+parseInt(_0x14390a(0x1b4))/0x6+-parseInt(_0x14390a(0x1b0))/0x7+-parseInt(_0x14390a(0x1b3))/0x8*(parseInt(_0x14390a(0x1ae))/0x9)+parseInt(_0x14390a(0x1af))/0xa*(parseInt(_0x14390a(0x1b6))/0xb);if(_0x5854ce===_0x4bca1a)break;else _0xb86f7c['push'](_0xb86f7c['shift']());}catch(_0x5ccc45){_0xb86f7c['push'](_0xb86f7c['shift']());}}}(a40_0x26d2,0xb2c97));function a40_0x3513(_0x54bd46,_0x1019b0){_0x54bd46=_0x54bd46-0x1ad;const _0x26d2db=a40_0x26d2();let _0x351387=_0x26d2db[_0x54bd46];return _0x351387;}function a40_0x26d2(){const _0x26d26d=['2826VClVMB','358896TZAFBU','2940492MUxBuz','1562804lOpsnd','910261myvANq','15XQUoqb','1317988ZVHmCQ','63WwEjIE','40Txzrkb','7246834guxDlM','2986rNozkk'];a40_0x26d2=function(){return _0x26d26d;};return a40_0x26d2();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a40_0x32ea(_0x399364,_0x558985){_0x399364=_0x399364-0x18e;const _0x5bd391=a40_0x5bd3();let _0x32ea49=_0x5bd391[_0x399364];return _0x32ea49;}function a40_0x5bd3(){const _0x27727b=['50mIGkLy','2JFYbKf','876275yozlni','9ynJLGz','1171732WgsFXt','30lzByNt','2229568hitquR','28717ucGYgU','33180OTdfnN','1760228xoTfpy','27PUyuDl','3518576xMlzRa','10575677oglzWm'];a40_0x5bd3=function(){return _0x27727b;};return a40_0x5bd3();}(function(_0x221d6d,_0x1b1987){const _0x51efa2=a40_0x32ea,_0x4f0cb7=_0x221d6d();while(!![]){try{const _0x1431b2=-parseInt(_0x51efa2(0x19a))/0x1*(parseInt(_0x51efa2(0x190))/0x2)+parseInt(_0x51efa2(0x18f))/0x3*(-parseInt(_0x51efa2(0x195))/0x4)+parseInt(_0x51efa2(0x18e))/0x5*(-parseInt(_0x51efa2(0x191))/0x6)+-parseInt(_0x51efa2(0x198))/0x7+parseInt(_0x51efa2(0x197))/0x8*(-parseInt(_0x51efa2(0x196))/0x9)+-parseInt(_0x51efa2(0x199))/0xa*(-parseInt(_0x51efa2(0x192))/0xb)+parseInt(_0x51efa2(0x194))/0xc*(parseInt(_0x51efa2(0x193))/0xd);if(_0x1431b2===_0x1b1987)break;else _0x4f0cb7['push'](_0x4f0cb7['shift']());}catch(_0x43d1df){_0x4f0cb7['push'](_0x4f0cb7['shift']());}}}(a40_0x5bd3,0xe14f6));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a41_0x4dd388=a41_0x4fdf;(function(_0x4486a3,_0x579fab){const _0xe81bca=a41_0x4fdf,_0x2d337c=_0x4486a3();while(!![]){try{const _0x5980f0=-parseInt(_0xe81bca(0x1d8))/0x1+parseInt(_0xe81bca(0x1d6))/0x2*(-parseInt(_0xe81bca(0x1ea))/0x3)+-parseInt(_0xe81bca(0x1d9))/0x4+parseInt(_0xe81bca(0x1e5))/0x5+parseInt(_0xe81bca(0x1e9))/0x6*(parseInt(_0xe81bca(0x1e4))/0x7)+-parseInt(_0xe81bca(0x1e7))/0x8+parseInt(_0xe81bca(0x1dc))/0x9*(parseInt(_0xe81bca(0x1e8))/0xa);if(_0x5980f0===_0x579fab)break;else _0x2d337c['push'](_0x2d337c['shift']());}catch(_0x18ba4b){_0x2d337c['push'](_0x2d337c['shift']());}}}(a41_0x435d,0x990d2));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a41_0x4fdf(_0xd1e2ee,_0x30cf9b){_0xd1e2ee=_0xd1e2ee-0x1d4;const _0x435d33=a41_0x435d();let _0x4fdf3e=_0x435d33[_0xd1e2ee];return _0x4fdf3e;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a41_0x435d(){const _0xba4d9e=['str','bool','22624119fHTYcK','boolean','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','alias','Omit\x20import\x20statements\x20from\x20generated\x20code','operation','read','codegen','41335YTpmTa','1924530PyUnbp','name','4247952unHSxK','10gbIIGd','834iWFliq','3006615TCXkOB','appCode','sdk','2xdJkRn','string','746161czxZpC','3252936TzolYH'];a41_0x435d=function(){return _0xba4d9e;};return a41_0x435d();}export const codegenSdk={'service':a41_0x4dd388(0x1e3),'command':a41_0x4dd388(0x1d5),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a41_0x4dd388(0x1e2),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x4dd388(0x1df),'type':a41_0x4dd388(0x1d7),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a41_0x4dd388(0x1e1),'type':'string','required':!![],'description':a41_0x4dd388(0x1de)},{'name':'skip-imports','type':a41_0x4dd388(0x1dd),'description':a41_0x4dd388(0x1e0)}],async 'execute'(_0x2fe7b3){const _0x3a490a=a41_0x4dd388,{dataset:_0x4066b1,operation:_0x4fb0f2}=await getOperationDetail(_0x2fe7b3[_0x3a490a(0x1d4)],_0x2fe7b3[_0x3a490a(0x1da)]('code'),_0x2fe7b3['str']('operation')),_0x3968e0=generateSdkCode(_0x4066b1,_0x4fb0f2,{'includeImports':!_0x2fe7b3[_0x3a490a(0x1db)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x4066b1[_0x3a490a(0x1e6)],'code':_0x4066b1['code'],'tableName':_0x4066b1['tableName']},'operation':_0x2fe7b3[_0x3a490a(0x1da)](_0x3a490a(0x1e1)),'code':_0x3968e0}};}};
1
+ const a41_0x14f629=a41_0x4870;(function(_0x53444b,_0x367b5b){const _0x1d53e8=a41_0x4870,_0x2b4686=_0x53444b();while(!![]){try{const _0x1d33cb=parseInt(_0x1d53e8(0x10e))/0x1*(-parseInt(_0x1d53e8(0xf8))/0x2)+parseInt(_0x1d53e8(0x101))/0x3*(-parseInt(_0x1d53e8(0x10c))/0x4)+-parseInt(_0x1d53e8(0x10a))/0x5+parseInt(_0x1d53e8(0x100))/0x6+-parseInt(_0x1d53e8(0xfd))/0x7+-parseInt(_0x1d53e8(0x10d))/0x8+parseInt(_0x1d53e8(0xfc))/0x9*(parseInt(_0x1d53e8(0x102))/0xa);if(_0x1d33cb===_0x367b5b)break;else _0x2b4686['push'](_0x2b4686['shift']());}catch(_0x28b353){_0x2b4686['push'](_0x2b4686['shift']());}}}(a41_0x14e8,0xd2d40));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a41_0x4870(_0xcedf1b,_0x4db188){_0xcedf1b=_0xcedf1b-0xf8;const _0x14e872=a41_0x14e8();let _0x48700c=_0x14e872[_0xcedf1b];return _0x48700c;}function a41_0x14e8(){const _0x50b2bd=['boolean','operation','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','tableName','string','85850tCyPbQ','alias','147900GpgIpX','12689672kXavzc','3avWpQg','code','768566SEMtPP','name','skip-imports','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','37344465aAAMAJ','3324874DJMJwo','sdk','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','7215162CaiLOz','102HYunqh','10sHdXnr','Omit\x20import\x20statements\x20from\x20generated\x20code','str'];a41_0x14e8=function(){return _0x50b2bd;};return a41_0x14e8();}export const codegenSdk={'service':'codegen','command':a41_0x14f629(0xfe),'description':a41_0x14f629(0xff),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x14f629(0x10b),'type':a41_0x14f629(0x109),'description':a41_0x14f629(0x107)},{'name':'operation','type':'string','required':!![],'description':a41_0x14f629(0xfb)},{'name':a41_0x14f629(0xfa),'type':a41_0x14f629(0x105),'description':a41_0x14f629(0x103)}],async 'execute'(_0x357255){const _0x140728=a41_0x14f629,{dataset:_0x484972,operation:_0x697664}=await getOperationDetail(_0x357255['appCode'],_0x357255[_0x140728(0x104)](_0x140728(0x10f)),_0x357255[_0x140728(0x104)]('operation')),_0x5db3ac=generateSdkCode(_0x484972,_0x697664,{'includeImports':!_0x357255['bool'](_0x140728(0xfa))});return{'ok':!![],'data':{'dataset':{'name':_0x484972[_0x140728(0xf9)],'code':_0x484972[_0x140728(0x10f)],'tableName':_0x484972[_0x140728(0x108)]},'operation':_0x357255[_0x140728(0x104)](_0x140728(0x106)),'code':_0x5db3ac}};}};
@@ -1 +1 @@
1
- const a42_0x4fe002=a42_0x30fe;function a42_0x30fe(_0x5c1883,_0x2d5a55){_0x5c1883=_0x5c1883-0x1ae;const _0x4f2f18=a42_0x4f2f();let _0x30fe8d=_0x4f2f18[_0x5c1883];return _0x30fe8d;}function a42_0x4f2f(){const _0x21e9ba=['sdk','string','read','Omit\x20import\x20statements\x20from\x20generated\x20code','972972YWEpUB','339nrOPmh','1718230HIycBE','str','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','1138685loKMUV','sqlcode','2116PYiTqb','no-imports','boolean','sqlName','105108oaGNEb','1879368poPdni','sqlCode','18uUdFoI','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','target','sql','4tGBosH','bff','226311GpCeNZ','appCode'];a42_0x4f2f=function(){return _0x21e9ba;};return a42_0x4f2f();}(function(_0x5b8ff2,_0x396219){const _0x4aa539=a42_0x30fe,_0x192c01=_0x5b8ff2();while(!![]){try{const _0x5bac51=-parseInt(_0x4aa539(0x1b0))/0x1*(parseInt(_0x4aa539(0x1ae))/0x2)+-parseInt(_0x4aa539(0x1b7))/0x3*(parseInt(_0x4aa539(0x1bd))/0x4)+parseInt(_0x4aa539(0x1bb))/0x5+parseInt(_0x4aa539(0x1c1))/0x6+-parseInt(_0x4aa539(0x1b6))/0x7+-parseInt(_0x4aa539(0x1c2))/0x8*(-parseInt(_0x4aa539(0x1c4))/0x9)+parseInt(_0x4aa539(0x1b8))/0xa;if(_0x5bac51===_0x396219)break;else _0x192c01['push'](_0x192c01['shift']());}catch(_0xc6ee6a){_0x192c01['push'](_0x192c01['shift']());}}}(a42_0x4f2f,0x39805));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a42_0x4fe002(0x1c7),'description':a42_0x4fe002(0x1ba),'risk':a42_0x4fe002(0x1b4),'flags':[SQLCODE_FLAG,{'name':a42_0x4fe002(0x1c6),'type':a42_0x4fe002(0x1b3),'description':a42_0x4fe002(0x1c5),'default':a42_0x4fe002(0x1b2),'enum':['sdk',a42_0x4fe002(0x1af)]},{'name':'no-imports','type':a42_0x4fe002(0x1bf),'description':a42_0x4fe002(0x1b5)}],async 'execute'(_0x39832d){const _0x35ca78=a42_0x4fe002,_0x3b8567=await getSqlQueryInfo(_0x39832d[_0x35ca78(0x1b1)],_0x39832d['str'](_0x35ca78(0x1bc))),_0x4a589f=_0x39832d[_0x35ca78(0x1b9)](_0x35ca78(0x1c6))||_0x35ca78(0x1b2),_0x14e286=generateSqlCodeTemplate(_0x3b8567,{'target':_0x4a589f,'includeImports':!_0x39832d['bool'](_0x35ca78(0x1be))});return{'ok':!![],'data':{'sqlCode':_0x3b8567[_0x35ca78(0x1c3)],'sqlName':_0x3b8567[_0x35ca78(0x1c0)],'target':_0x4a589f,'code':_0x14e286}};}};
1
+ function a42_0xeafb(_0x5e0077,_0x43c1fe){_0x5e0077=_0x5e0077-0xf4;const _0x594705=a42_0x5947();let _0xeafbce=_0x594705[_0x5e0077];return _0xeafbce;}const a42_0x37b27b=a42_0xeafb;(function(_0x1c959a,_0xe0da12){const _0x1a429c=a42_0xeafb,_0x3bb2ae=_0x1c959a();while(!![]){try{const _0x4c6ac1=-parseInt(_0x1a429c(0x100))/0x1*(-parseInt(_0x1a429c(0x108))/0x2)+parseInt(_0x1a429c(0x104))/0x3+-parseInt(_0x1a429c(0x106))/0x4+-parseInt(_0x1a429c(0xf5))/0x5+-parseInt(_0x1a429c(0xf6))/0x6*(parseInt(_0x1a429c(0x109))/0x7)+-parseInt(_0x1a429c(0xff))/0x8*(parseInt(_0x1a429c(0xf4))/0x9)+parseInt(_0x1a429c(0x101))/0xa*(parseInt(_0x1a429c(0xf8))/0xb);if(_0x4c6ac1===_0xe0da12)break;else _0x3bb2ae['push'](_0x3bb2ae['shift']());}catch(_0x39f825){_0x3bb2ae['push'](_0x3bb2ae['shift']());}}}(a42_0x5947,0x1c9a0));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a42_0x37b27b(0x10b),'command':a42_0x37b27b(0x105),'description':a42_0x37b27b(0xfc),'risk':a42_0x37b27b(0xfe),'flags':[SQLCODE_FLAG,{'name':a42_0x37b27b(0xfd),'type':a42_0x37b27b(0x103),'description':a42_0x37b27b(0x107),'default':a42_0x37b27b(0x10c),'enum':[a42_0x37b27b(0x10c),a42_0x37b27b(0x10e)]},{'name':a42_0x37b27b(0xf7),'type':a42_0x37b27b(0xfa),'description':a42_0x37b27b(0xfb)}],async 'execute'(_0xca2db2){const _0x4e58de=a42_0x37b27b,_0x409a69=await getSqlQueryInfo(_0xca2db2[_0x4e58de(0x10a)],_0xca2db2[_0x4e58de(0x10d)]('sqlcode')),_0x3580b0=_0xca2db2['str'](_0x4e58de(0xfd))||'sdk',_0x465cab=generateSqlCodeTemplate(_0x409a69,{'target':_0x3580b0,'includeImports':!_0xca2db2[_0x4e58de(0x102)](_0x4e58de(0xf7))});return{'ok':!![],'data':{'sqlCode':_0x409a69[_0x4e58de(0xf9)],'sqlName':_0x409a69['sqlName'],'target':_0x3580b0,'code':_0x465cab}};}};function a42_0x5947(){const _0x11e09e=['sqlCode','boolean','Omit\x20import\x20statements\x20from\x20generated\x20code','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','target','read','71984JQPZaj','1007NVaayx','435380GncsbR','bool','string','422694ChpOUf','sql','828332gWkXzh','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','394TNDqvu','1045933NEqDBI','appCode','codegen','sdk','str','bff','162AfsSJm','912885loKrpy','6uYfvca','no-imports','121aiaLtf'];a42_0x5947=function(){return _0x11e09e;};return a42_0x5947();}
@@ -1 +1 @@
1
- (function(_0x3e5f8b,_0x338b9b){const _0x43940a=a43_0x1f6c,_0x16cc18=_0x3e5f8b();while(!![]){try{const _0x51d0b3=parseInt(_0x43940a(0xee))/0x1*(parseInt(_0x43940a(0xf1))/0x2)+-parseInt(_0x43940a(0xd0))/0x3+parseInt(_0x43940a(0xe9))/0x4+parseInt(_0x43940a(0xf9))/0x5+parseInt(_0x43940a(0xd2))/0x6*(-parseInt(_0x43940a(0xdc))/0x7)+-parseInt(_0x43940a(0xe0))/0x8+parseInt(_0x43940a(0xda))/0x9;if(_0x51d0b3===_0x338b9b)break;else _0x16cc18['push'](_0x16cc18['shift']());}catch(_0x28620f){_0x16cc18['push'](_0x16cc18['shift']());}}}(a43_0x2834,0xaf64b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a43_0x2834(){const _0x574c28=['apps','args','105890zntcQm','Use\x20global\x20config\x20scope','defaultApp','\x20Default\x20app\x20changed\x20to\x20\x22','both','str','\x22\x20(appcode:\x20','\x22\x20not\x20found.','3446690mwtVBo','\x20Note:\x20app\x20\x22','project','3847161YoSvKy','Missing\x20app\x20name.','324wMFoCA','flagMissing','boolean','Removed\x20app\x20\x22','App\x20\x22','\x20<name>','projectConfig','\x20Set\x20as\x20default\x20app.','10872675mGkyal','\x22\x20still\x20defined\x20in\x20','167377sBbHpj','inherit','bool','Updated','3919032Gonvin','Usage:\x20','\x20app\x20\x22','globalConfig','appcode','validation','App\x20code','length','Added','2243332rtkxbM','trim','global','object','keys','25cKsJaG'];a43_0x2834=function(){return _0x574c28;};return a43_0x2834();}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x45e36a=a43_0x1f6c;return[{'name':_0x45e36a(0xe4),'type':'string','description':_0x45e36a(0xe6),'required':!![]},{'name':_0x45e36a(0xeb),'type':_0x45e36a(0xd4),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x29d083=a43_0x1f6c;return[{'name':'global','type':_0x29d083(0xd4),'description':_0x29d083(0xf2),'default':![]}];}export async function validateAppName(_0x53f3a7,_0x443683){const _0x543612=a43_0x1f6c,_0x447439=_0x53f3a7[_0x543612(0xf0)][0x0]?.[_0x543612(0xea)]();if(!_0x447439)throw CliErrors[_0x543612(0xe5)](_0x543612(0xd1),_0x543612(0xe1)+CLI_BIN_NAME+'\x20'+_0x443683+_0x543612(0xd7));}export async function runAppAdd(_0x4b6743,_0x1d7976){const _0x6c059d=a43_0x1f6c,_0x1547f7=_0x4b6743[_0x6c059d(0xf0)][0x0]?.[_0x6c059d(0xea)]();if(!_0x1547f7)throw CliErrors[_0x6c059d(0xe5)](_0x6c059d(0xd1),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1d7976+'\x20<name>\x20--appcode\x20<code>');const _0x3377ef=_0x4b6743[_0x6c059d(0xf6)]('appcode');if(!_0x3377ef)throw CliErrors[_0x6c059d(0xd3)](_0x6c059d(0xe4),_0x6c059d(0xe1)+CLI_BIN_NAME+'\x20'+_0x1d7976+'\x20<name>\x20--appcode\x20<code>');const _0x267935={'global':_0x4b6743['bool'](_0x6c059d(0xeb))},_0x53bb18=readConfig(_0x267935);if(!_0x53bb18[_0x6c059d(0xef)])_0x53bb18[_0x6c059d(0xef)]={};const _0x3bd2a5={'appcode':_0x3377ef,...collectAppProfileOverrides(_0x29cb39=>_0x4b6743[_0x6c059d(0xf6)](_0x29cb39))},_0x21b7c2=_0x53bb18[_0x6c059d(0xef)],_0xa23b84=!!_0x21b7c2[_0x1547f7];_0x21b7c2[_0x1547f7]=_0x3bd2a5;if(!_0x53bb18[_0x6c059d(0xf3)])_0x53bb18[_0x6c059d(0xf3)]=_0x1547f7;writeConfig(_0x53bb18,_0x267935);const _0xe6f6f6=!_0xa23b84&&_0x53bb18[_0x6c059d(0xf3)]===_0x1547f7?_0x6c059d(0xd9):'',_0x4fad5c=(_0xa23b84?_0x6c059d(0xdf):_0x6c059d(0xe8))+_0x6c059d(0xe2)+_0x1547f7+_0x6c059d(0xf7)+_0x3377ef+')'+scopeLabel(_0x267935)+'.'+_0xe6f6f6;return{'ok':!![],'message':_0x4fad5c};}function a43_0x1f6c(_0x32ad2c,_0x2604a7){_0x32ad2c=_0x32ad2c-0xce;const _0x2834f6=a43_0x2834();let _0x1f6c78=_0x2834f6[_0x32ad2c];return _0x1f6c78;}export async function runAppRemove(_0x26406c,_0x27bd87){const _0x174e66=a43_0x1f6c,_0x2d04ee=_0x26406c['args'][0x0]?.[_0x174e66(0xea)]();if(!_0x2d04ee)throw CliErrors[_0x174e66(0xe5)](_0x174e66(0xd1),_0x174e66(0xe1)+CLI_BIN_NAME+'\x20'+_0x27bd87+'\x20<name>\x20[--global]');const _0x3e8e1f=_0x26406c[_0x174e66(0xde)](_0x174e66(0xeb)),{config:_0x35a3dd,layers:_0x1638f3}=readRawConfigWithLayers(),_0x885020=_0x35a3dd[_0x174e66(0xef)]??{};if(!_0x885020[_0x2d04ee])throw CliErrors[_0x174e66(0xe5)](_0x174e66(0xd6)+_0x2d04ee+_0x174e66(0xf8));const _0x18823c=_0x1638f3[_0x174e66(0xe3)][_0x174e66(0xef)]&&typeof _0x1638f3[_0x174e66(0xe3)]['apps']===_0x174e66(0xec)?_0x1638f3[_0x174e66(0xe3)]['apps']:{},_0x69e086=_0x1638f3['projectConfig'][_0x174e66(0xef)]&&typeof _0x1638f3[_0x174e66(0xd8)][_0x174e66(0xef)]==='object'?_0x1638f3[_0x174e66(0xd8)][_0x174e66(0xef)]:{},_0x1b2aec=appDefinedIn(_0x2d04ee,_0x18823c,_0x69e086,_0x1638f3[_0x174e66(0xd8)][_0x174e66(0xdd)]===![]),_0x47efb7=resolveAppScopeForWrite(_0x2d04ee,_0x3e8e1f,_0x1638f3),_0x43024a={'global':_0x47efb7===_0x174e66(0xeb)},_0x189714=readConfig(_0x43024a),_0x232b90=_0x189714[_0x174e66(0xef)];if(!_0x232b90||!_0x232b90[_0x2d04ee])throw CliErrors[_0x174e66(0xe5)](_0x174e66(0xd6)+_0x2d04ee+'\x22\x20not\x20found.');delete _0x232b90[_0x2d04ee];let _0x1dfb63='';if(_0x189714['defaultApp']===_0x2d04ee){const _0xc179bb=Object[_0x174e66(0xed)](_0x232b90);_0x189714[_0x174e66(0xf3)]=_0xc179bb[_0x174e66(0xe7)]>0x0?_0xc179bb[0x0]:undefined,_0x189714[_0x174e66(0xf3)]?_0x1dfb63=_0x174e66(0xf4)+_0x189714['defaultApp']+'\x22.':delete _0x189714['defaultApp'];}Object[_0x174e66(0xed)](_0x232b90)['length']===0x0&&(delete _0x189714[_0x174e66(0xef)],delete _0x189714['defaultApp']);writeConfig(_0x189714,_0x43024a);const _0xaebfc1=_0x1b2aec===_0x174e66(0xf5)?_0x174e66(0xce)+_0x2d04ee+_0x174e66(0xdb)+(_0x47efb7===_0x174e66(0xcf)?_0x174e66(0xeb):_0x174e66(0xcf))+'\x20config.':'';return{'ok':!![],'message':_0x174e66(0xd5)+_0x2d04ee+'\x22'+scopeLabel(_0x43024a)+'.'+_0x1dfb63+_0xaebfc1};}
1
+ (function(_0x32cd1c,_0x43a3bd){const _0x550ab5=a43_0x49f9,_0x2b3430=_0x32cd1c();while(!![]){try{const _0x1de3f6=parseInt(_0x550ab5(0x18b))/0x1+parseInt(_0x550ab5(0x198))/0x2*(-parseInt(_0x550ab5(0x1a1))/0x3)+parseInt(_0x550ab5(0x191))/0x4*(-parseInt(_0x550ab5(0x193))/0x5)+parseInt(_0x550ab5(0x181))/0x6+-parseInt(_0x550ab5(0x182))/0x7+parseInt(_0x550ab5(0x190))/0x8*(-parseInt(_0x550ab5(0x18d))/0x9)+parseInt(_0x550ab5(0x17b))/0xa;if(_0x1de3f6===_0x43a3bd)break;else _0x2b3430['push'](_0x2b3430['shift']());}catch(_0x548123){_0x2b3430['push'](_0x2b3430['shift']());}}}(a43_0x1b91,0xad016));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a43_0x1b91(){const _0x41ad4a=['object','both','boolean','553398QKgPBb','4036578cOQakg','Missing\x20app\x20name.','\x20Default\x20app\x20changed\x20to\x20\x22','global','defaultApp','Use\x20global\x20config\x20scope','\x20<name>\x20[--global]','\x20<name>','App\x20\x22','308232nzvrvo','validation','1503jIefVT','apps','str','64904nFQVGe','100StmYJF','bool','90975ELRGUY','keys','project','trim','\x22\x20not\x20found.','2BqAlYl','\x20Set\x20as\x20default\x20app.','inherit','Usage:\x20','string','\x20app\x20\x22','\x20Note:\x20app\x20\x22','\x20<name>\x20--appcode\x20<code>','appcode','2030151ejRFzG','globalConfig','\x20config.','projectConfig','args','Added','33712820klZoGl','length','Removed\x20app\x20\x22'];a43_0x1b91=function(){return _0x41ad4a;};return a43_0x1b91();}export function buildAppAddFlags(){const _0x28b6d2=a43_0x49f9;return[{'name':_0x28b6d2(0x1a0),'type':_0x28b6d2(0x19c),'description':'App\x20code','required':!![]},{'name':_0x28b6d2(0x185),'type':_0x28b6d2(0x180),'description':_0x28b6d2(0x187),'default':![]},...getAppProfileFlagDefs()];}function a43_0x49f9(_0x13d84e,_0x5213c3){_0x13d84e=_0x13d84e-0x179;const _0x1b9191=a43_0x1b91();let _0x49f965=_0x1b9191[_0x13d84e];return _0x49f965;}export function buildAppRemoveFlags(){const _0x29daf3=a43_0x49f9;return[{'name':_0x29daf3(0x185),'type':_0x29daf3(0x180),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x2e9eb6,_0x5e1277){const _0x5a4cbf=a43_0x49f9,_0x28e75d=_0x2e9eb6[_0x5a4cbf(0x179)][0x0]?.[_0x5a4cbf(0x196)]();if(!_0x28e75d)throw CliErrors[_0x5a4cbf(0x18c)](_0x5a4cbf(0x183),_0x5a4cbf(0x19b)+CLI_BIN_NAME+'\x20'+_0x5e1277+_0x5a4cbf(0x189));}export async function runAppAdd(_0x54dbb2,_0x16cb55){const _0xe33824=a43_0x49f9,_0x53c49f=_0x54dbb2[_0xe33824(0x179)][0x0]?.[_0xe33824(0x196)]();if(!_0x53c49f)throw CliErrors[_0xe33824(0x18c)]('Missing\x20app\x20name.',_0xe33824(0x19b)+CLI_BIN_NAME+'\x20'+_0x16cb55+_0xe33824(0x19f));const _0x27a876=_0x54dbb2[_0xe33824(0x18f)]('appcode');if(!_0x27a876)throw CliErrors['flagMissing'](_0xe33824(0x1a0),_0xe33824(0x19b)+CLI_BIN_NAME+'\x20'+_0x16cb55+_0xe33824(0x19f));const _0x1f7c17={'global':_0x54dbb2['bool'](_0xe33824(0x185))},_0x102484=readConfig(_0x1f7c17);if(!_0x102484['apps'])_0x102484[_0xe33824(0x18e)]={};const _0x427a8e={'appcode':_0x27a876,...collectAppProfileOverrides(_0x3ee238=>_0x54dbb2[_0xe33824(0x18f)](_0x3ee238))},_0x497003=_0x102484[_0xe33824(0x18e)],_0x3d6af8=!!_0x497003[_0x53c49f];_0x497003[_0x53c49f]=_0x427a8e;if(!_0x102484[_0xe33824(0x186)])_0x102484[_0xe33824(0x186)]=_0x53c49f;writeConfig(_0x102484,_0x1f7c17);const _0x241bcd=!_0x3d6af8&&_0x102484['defaultApp']===_0x53c49f?_0xe33824(0x199):'',_0x175dc7=(_0x3d6af8?'Updated':_0xe33824(0x17a))+_0xe33824(0x19d)+_0x53c49f+'\x22\x20(appcode:\x20'+_0x27a876+')'+scopeLabel(_0x1f7c17)+'.'+_0x241bcd;return{'ok':!![],'message':_0x175dc7};}export async function runAppRemove(_0x421ddd,_0x446cab){const _0x561c36=a43_0x49f9,_0x3679a7=_0x421ddd[_0x561c36(0x179)][0x0]?.[_0x561c36(0x196)]();if(!_0x3679a7)throw CliErrors[_0x561c36(0x18c)]('Missing\x20app\x20name.',_0x561c36(0x19b)+CLI_BIN_NAME+'\x20'+_0x446cab+_0x561c36(0x188));const _0x37cbd3=_0x421ddd[_0x561c36(0x192)](_0x561c36(0x185)),{config:_0x4af471,layers:_0x488189}=readRawConfigWithLayers(),_0x5257db=_0x4af471[_0x561c36(0x18e)]??{};if(!_0x5257db[_0x3679a7])throw CliErrors['validation'](_0x561c36(0x18a)+_0x3679a7+_0x561c36(0x197));const _0xe7be2a=_0x488189[_0x561c36(0x1a2)][_0x561c36(0x18e)]&&typeof _0x488189['globalConfig'][_0x561c36(0x18e)]===_0x561c36(0x17e)?_0x488189[_0x561c36(0x1a2)]['apps']:{},_0x37a609=_0x488189[_0x561c36(0x1a4)]['apps']&&typeof _0x488189[_0x561c36(0x1a4)][_0x561c36(0x18e)]===_0x561c36(0x17e)?_0x488189[_0x561c36(0x1a4)][_0x561c36(0x18e)]:{},_0x8190dd=appDefinedIn(_0x3679a7,_0xe7be2a,_0x37a609,_0x488189['projectConfig'][_0x561c36(0x19a)]===![]),_0x5a91cd=resolveAppScopeForWrite(_0x3679a7,_0x37cbd3,_0x488189),_0x4cec98={'global':_0x5a91cd===_0x561c36(0x185)},_0x42b8d6=readConfig(_0x4cec98),_0x5ca9f0=_0x42b8d6[_0x561c36(0x18e)];if(!_0x5ca9f0||!_0x5ca9f0[_0x3679a7])throw CliErrors[_0x561c36(0x18c)](_0x561c36(0x18a)+_0x3679a7+_0x561c36(0x197));delete _0x5ca9f0[_0x3679a7];let _0x50db3e='';if(_0x42b8d6[_0x561c36(0x186)]===_0x3679a7){const _0x9405b5=Object[_0x561c36(0x194)](_0x5ca9f0);_0x42b8d6[_0x561c36(0x186)]=_0x9405b5[_0x561c36(0x17c)]>0x0?_0x9405b5[0x0]:undefined,_0x42b8d6[_0x561c36(0x186)]?_0x50db3e=_0x561c36(0x184)+_0x42b8d6[_0x561c36(0x186)]+'\x22.':delete _0x42b8d6[_0x561c36(0x186)];}Object['keys'](_0x5ca9f0)[_0x561c36(0x17c)]===0x0&&(delete _0x42b8d6[_0x561c36(0x18e)],delete _0x42b8d6[_0x561c36(0x186)]);writeConfig(_0x42b8d6,_0x4cec98);const _0x2ff28b=_0x8190dd===_0x561c36(0x17f)?_0x561c36(0x19e)+_0x3679a7+'\x22\x20still\x20defined\x20in\x20'+(_0x5a91cd===_0x561c36(0x195)?_0x561c36(0x185):_0x561c36(0x195))+_0x561c36(0x1a3):'';return{'ok':!![],'message':_0x561c36(0x17d)+_0x3679a7+'\x22'+scopeLabel(_0x4cec98)+'.'+_0x50db3e+_0x2ff28b};}
@@ -1 +1 @@
1
- (function(_0x4f0790,_0x429ba0){const _0x5c24e9=a44_0x215d,_0x1db011=_0x4f0790();while(!![]){try{const _0x175546=-parseInt(_0x5c24e9(0x1b6))/0x1+-parseInt(_0x5c24e9(0x1c6))/0x2+-parseInt(_0x5c24e9(0x1b5))/0x3*(-parseInt(_0x5c24e9(0x1b2))/0x4)+parseInt(_0x5c24e9(0x1b4))/0x5*(parseInt(_0x5c24e9(0x1ba))/0x6)+parseInt(_0x5c24e9(0x1bb))/0x7+-parseInt(_0x5c24e9(0x1c3))/0x8+-parseInt(_0x5c24e9(0x1b7))/0x9*(-parseInt(_0x5c24e9(0x1d0))/0xa);if(_0x175546===_0x429ba0)break;else _0x1db011['push'](_0x1db011['shift']());}catch(_0x3ec205){_0x1db011['push'](_0x1db011['shift']());}}}(a44_0x40ab,0x6c12b));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x3f4c00 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a44_0x40ab(){const _0x306e4c=['includes','获取到\x20','1300XyAEpn','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','appName','(跳过,稍后配置)','skip','manual','请选择要绑定的应用:','\x0a无法获取远程应用列表,请手动输入。','376JkXVyG','正在获取可用应用列表...','5ydYgim','19953fOhdSy','385060tgjVyq','12519bGhepe','length','\x0a未找到可用应用。','901686luYtew','1771084TBZjBq','trim','未找到可用应用。','custom','yellow','无法获取远程应用列表,请手动输入。','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','✎\x20自定义输入\x20appcode','1159480SunerC','map','appCode','473310NIUBJP','\x20\x20(','gray','cyan','✎\x20手动输入','message','App\x20Code:','Invalid\x20App\x20Code'];a44_0x40ab=function(){return _0x306e4c;};return a44_0x40ab();}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x4fff2d=await input({'message':'请输入\x20App\x20Code:','validate':_0x4d21a0=>{const _0x3a3bcc=a44_0x215d,_0x85b8a1=validateAppcode(_0x4d21a0[_0x3a3bcc(0x1bc)]());return _0x85b8a1['valid']||_0x85b8a1[_0x3a3bcc(0x1cb)]||_0x3a3bcc(0x1cd);}});return _0x4fff2d['trim']();}export async function promptAppSelection(_0x55fab6){const _0xcd0e04=a44_0x215d,_0x57a0f9=[{'name':a44_0x3f4c00[_0xcd0e04(0x1bf)](_0xcd0e04(0x1c2)),'value':-0x1},..._0x55fab6[_0xcd0e04(0x1c4)]((_0x19336a,_0x17c54e)=>({'name':_0x19336a[_0xcd0e04(0x1d2)]+'\x20\x20'+a44_0x3f4c00[_0xcd0e04(0x1c8)]('('+_0x19336a[_0xcd0e04(0x1c5)]+')'),'value':_0x17c54e}))],_0x1e0f65=await checkbox({'message':_0xcd0e04(0x1cf)+a44_0x3f4c00[_0xcd0e04(0x1c9)](_0x55fab6['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x57a0f9,'loop':![]});if(_0x1e0f65[_0xcd0e04(0x1ce)](-0x1))return _0xcd0e04(0x1be);if(_0x1e0f65[_0xcd0e04(0x1b8)]===0x0)return'custom';return _0x1e0f65['map'](_0x36d730=>_0x55fab6[_0x36d730]);}export async function promptSingleAppSelection(_0x2f2461){const _0x5b4789=a44_0x215d,_0x12a0bf=[{'name':a44_0x3f4c00['gray'](_0x5b4789(0x1d1)),'value':_0x5b4789(0x1ae)},{'name':a44_0x3f4c00[_0x5b4789(0x1bf)](_0x5b4789(0x1c2)),'value':'custom'},..._0x2f2461['map'](_0x539700=>({'name':_0x539700[_0x5b4789(0x1d2)]+'\x20\x20'+a44_0x3f4c00['gray']('('+_0x539700['appCode']+')'),'value':_0x539700[_0x5b4789(0x1c5)]}))],_0xf7a029=await select({'message':_0x5b4789(0x1b0),'choices':_0x12a0bf});if(_0xf7a029===_0x5b4789(0x1ae))return _0x5b4789(0x1ae);if(_0xf7a029==='custom')return _0x5b4789(0x1be);return _0x2f2461['find'](_0x59b7e2=>_0x59b7e2[_0x5b4789(0x1c5)]===_0xf7a029);}function a44_0x215d(_0x862055,_0x1c2632){_0x862055=_0x862055-0x1ae;const _0x40ab29=a44_0x40ab();let _0x215da4=_0x40ab29[_0x862055];return _0x215da4;}export async function selectSingleAppcode(_0x29045e){const _0x28385e=a44_0x215d;if(!_0x29045e)return writeCliSideChannelLine(a44_0x3f4c00[_0x28385e(0x1c8)](_0x28385e(0x1c1))),_fallbackOrSkip();writeCliSideChannelLine(_0x28385e(0x1b3));let _0x58a6a8;try{_0x58a6a8=await withActiveCookie(_0x29045e,()=>listRemoteApps());}catch(_0x3d5be4){writeCliSideChannelLine(a44_0x3f4c00['yellow'](_0x28385e(0x1c0)));if(_0x3d5be4 instanceof Error)writeCliSideChannelLine(a44_0x3f4c00[_0x28385e(0x1c8)](_0x28385e(0x1c7)+_0x3d5be4['message']+')'));return _fallbackOrSkip();}if(_0x58a6a8[_0x28385e(0x1b8)]===0x0)return writeCliSideChannelLine(a44_0x3f4c00[_0x28385e(0x1bf)](_0x28385e(0x1bd))),_fallbackOrSkip();const _0x4dc2=await promptSingleAppSelection(_0x58a6a8);if(_0x4dc2===_0x28385e(0x1ae))return'';if(_0x4dc2===_0x28385e(0x1be))return promptCustomAppcode();return _0x4dc2[_0x28385e(0x1c5)];}export async function selectMultipleApps(_0x1887e1){const _0x489ec2=a44_0x215d;writeCliSideChannelLine(_0x489ec2(0x1b3));let _0x10c31e;try{_0x10c31e=await withActiveCookie(_0x1887e1,()=>listRemoteApps());}catch(_0x8d413d){writeCliSideChannelLine(_0x489ec2(0x1b1));if(_0x8d413d instanceof Error)writeCliSideChannelLine(_0x489ec2(0x1c7)+_0x8d413d['message']+')');return _0x489ec2(0x1be);}if(_0x10c31e[_0x489ec2(0x1b8)]===0x0)return writeCliSideChannelLine(_0x489ec2(0x1b9)),_0x489ec2(0x1be);return promptAppSelection(_0x10c31e);}async function _fallbackOrSkip(){const _0x20871f=a44_0x215d,_0x2bde5a=await select({'message':_0x20871f(0x1cc),'choices':[{'name':a44_0x3f4c00[_0x20871f(0x1c8)](_0x20871f(0x1d3)),'value':_0x20871f(0x1ae)},{'name':a44_0x3f4c00[_0x20871f(0x1bf)](_0x20871f(0x1ca)),'value':_0x20871f(0x1af)}]});if(_0x2bde5a==='skip')return'';return promptCustomAppcode();}
1
+ (function(_0x1085de,_0x54f937){const _0x16f65c=a44_0x3016,_0x3bf6d6=_0x1085de();while(!![]){try{const _0x15ef2e=-parseInt(_0x16f65c(0x17c))/0x1+-parseInt(_0x16f65c(0x192))/0x2+parseInt(_0x16f65c(0x18f))/0x3*(-parseInt(_0x16f65c(0x18c))/0x4)+-parseInt(_0x16f65c(0x176))/0x5*(-parseInt(_0x16f65c(0x17d))/0x6)+-parseInt(_0x16f65c(0x193))/0x7*(-parseInt(_0x16f65c(0x179))/0x8)+-parseInt(_0x16f65c(0x17b))/0x9*(parseInt(_0x16f65c(0x18d))/0xa)+parseInt(_0x16f65c(0x170))/0xb;if(_0x15ef2e===_0x54f937)break;else _0x3bf6d6['push'](_0x3bf6d6['shift']());}catch(_0x47fa16){_0x3bf6d6['push'](_0x3bf6d6['shift']());}}}(a44_0x251d,0x24efd));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x28ddf1 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a44_0x251d(){const _0x15b54c=['(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','manual','Invalid\x20App\x20Code','appCode','✎\x20自定义输入\x20appcode','gray','cyan','无法获取远程应用列表,请手动输入。','190108wXMIqt','20tYjrKa','appName','12WpYMhG','custom','请选择要绑定的应用:','81720RBZsgP','1218qImNfV','map','738991DPRHXV','message','valid','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','skip','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','205auLqus','length','\x20\x20(','11512MLLYdJ','获取到\x20','142092sIiEPZ','203727aUWvmA','43902ZUnZoG','yellow','未找到可用应用。','(跳过,稍后配置)','find','trim','正在获取可用应用列表...'];a44_0x251d=function(){return _0x15b54c;};return a44_0x251d();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x23813b=a44_0x3016,_0x116e24=await input({'message':'请输入\x20App\x20Code:','validate':_0x152fc6=>{const _0x59beca=a44_0x3016,_0x3a3a65=validateAppcode(_0x152fc6[_0x59beca(0x182)]());return _0x3a3a65[_0x59beca(0x172)]||_0x3a3a65[_0x59beca(0x171)]||_0x59beca(0x186);}});return _0x116e24[_0x23813b(0x182)]();}export async function promptAppSelection(_0x2a70dc){const _0x433758=a44_0x3016,_0x2f5c0e=[{'name':a44_0x28ddf1[_0x433758(0x17e)](_0x433758(0x188)),'value':-0x1},..._0x2a70dc[_0x433758(0x16f)]((_0x234d27,_0x4236d1)=>({'name':_0x234d27[_0x433758(0x18e)]+'\x20\x20'+a44_0x28ddf1[_0x433758(0x189)]('('+_0x234d27[_0x433758(0x187)]+')'),'value':_0x4236d1}))],_0x2f1913=await checkbox({'message':_0x433758(0x17a)+a44_0x28ddf1[_0x433758(0x18a)](_0x2a70dc[_0x433758(0x177)])+_0x433758(0x175),'choices':_0x2f5c0e,'loop':![]});if(_0x2f1913['includes'](-0x1))return _0x433758(0x190);if(_0x2f1913['length']===0x0)return _0x433758(0x190);return _0x2f1913[_0x433758(0x16f)](_0x5df0e9=>_0x2a70dc[_0x5df0e9]);}export async function promptSingleAppSelection(_0x17bd3f){const _0xd8a1d=a44_0x3016,_0x5a5e99=[{'name':a44_0x28ddf1[_0xd8a1d(0x189)](_0xd8a1d(0x184)),'value':_0xd8a1d(0x174)},{'name':a44_0x28ddf1[_0xd8a1d(0x17e)](_0xd8a1d(0x188)),'value':_0xd8a1d(0x190)},..._0x17bd3f[_0xd8a1d(0x16f)](_0x41fb1b=>({'name':_0x41fb1b[_0xd8a1d(0x18e)]+'\x20\x20'+a44_0x28ddf1[_0xd8a1d(0x189)]('('+_0x41fb1b[_0xd8a1d(0x187)]+')'),'value':_0x41fb1b['appCode']}))],_0x45dcd6=await select({'message':_0xd8a1d(0x191),'choices':_0x5a5e99});if(_0x45dcd6===_0xd8a1d(0x174))return _0xd8a1d(0x174);if(_0x45dcd6===_0xd8a1d(0x190))return'custom';return _0x17bd3f[_0xd8a1d(0x181)](_0x452087=>_0x452087[_0xd8a1d(0x187)]===_0x45dcd6);}function a44_0x3016(_0x5529d3,_0x45ad9e){_0x5529d3=_0x5529d3-0x16f;const _0x251dc8=a44_0x251d();let _0x3016ee=_0x251dc8[_0x5529d3];return _0x3016ee;}export async function selectSingleAppcode(_0xa28250){const _0x54fdb1=a44_0x3016;if(!_0xa28250)return writeCliSideChannelLine(a44_0x28ddf1['gray'](_0x54fdb1(0x173))),_fallbackOrSkip();writeCliSideChannelLine(_0x54fdb1(0x183));let _0x53959f;try{_0x53959f=await withActiveCookie(_0xa28250,()=>listRemoteApps());}catch(_0x42fbaf){writeCliSideChannelLine(a44_0x28ddf1[_0x54fdb1(0x17e)](_0x54fdb1(0x18b)));if(_0x42fbaf instanceof Error)writeCliSideChannelLine(a44_0x28ddf1[_0x54fdb1(0x189)](_0x54fdb1(0x178)+_0x42fbaf[_0x54fdb1(0x171)]+')'));return _fallbackOrSkip();}if(_0x53959f[_0x54fdb1(0x177)]===0x0)return writeCliSideChannelLine(a44_0x28ddf1[_0x54fdb1(0x17e)](_0x54fdb1(0x17f))),_fallbackOrSkip();const _0x11ecb6=await promptSingleAppSelection(_0x53959f);if(_0x11ecb6==='skip')return'';if(_0x11ecb6===_0x54fdb1(0x190))return promptCustomAppcode();return _0x11ecb6[_0x54fdb1(0x187)];}export async function selectMultipleApps(_0x3f30ac){const _0x1db7d6=a44_0x3016;writeCliSideChannelLine(_0x1db7d6(0x183));let _0x4cadec;try{_0x4cadec=await withActiveCookie(_0x3f30ac,()=>listRemoteApps());}catch(_0x4219f2){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x4219f2 instanceof Error)writeCliSideChannelLine(_0x1db7d6(0x178)+_0x4219f2['message']+')');return _0x1db7d6(0x190);}if(_0x4cadec[_0x1db7d6(0x177)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x1db7d6(0x190);return promptAppSelection(_0x4cadec);}async function _fallbackOrSkip(){const _0x1d70c9=a44_0x3016,_0x266dd8=await select({'message':'App\x20Code:','choices':[{'name':a44_0x28ddf1[_0x1d70c9(0x189)](_0x1d70c9(0x180)),'value':_0x1d70c9(0x174)},{'name':a44_0x28ddf1[_0x1d70c9(0x17e)]('✎\x20手动输入'),'value':_0x1d70c9(0x185)}]});if(_0x266dd8===_0x1d70c9(0x174))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a45_0x29b1b7=a45_0x2628;(function(_0x1b829d,_0x28e5d4){const _0xd29e03=a45_0x2628,_0x8fe4c9=_0x1b829d();while(!![]){try{const _0x7665c2=-parseInt(_0xd29e03(0x209))/0x1*(parseInt(_0xd29e03(0x1fa))/0x2)+parseInt(_0xd29e03(0x204))/0x3+parseInt(_0xd29e03(0x200))/0x4+-parseInt(_0xd29e03(0x205))/0x5*(-parseInt(_0xd29e03(0x206))/0x6)+parseInt(_0xd29e03(0x203))/0x7*(-parseInt(_0xd29e03(0x20f))/0x8)+-parseInt(_0xd29e03(0x207))/0x9+-parseInt(_0xd29e03(0x1f4))/0xa*(-parseInt(_0xd29e03(0x213))/0xb);if(_0x7665c2===_0x28e5d4)break;else _0x8fe4c9['push'](_0x8fe4c9['shift']());}catch(_0x349981){_0x8fe4c9['push'](_0x8fe4c9['shift']());}}}(a45_0xf679,0xa49e1));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a45_0xf679(){const _0x28fed9=['\x20failed.','244370uadKLX','taskId','string','\x20is\x20pending.','replace','SUCCESS','52lOcZuu','PENDING','errorMessage','Task\x20','\x20task\x20status\x20--task-id\x20','Async\x20task\x20','2716880GrnMTc','PROCESSING','\x20response\x20did\x20not\x20contain\x20a\x20status.','887957ywqibQ','3261195xUKpQx','170ojXxxU','116400XsGDpB','10218816sREaIi','\x20is\x20processing.','40438GWgdQF','\x20completed\x20successfully.','\x20failed:\x20','\x20returned\x20unknown\x20status\x20','trim','\x20--appcode\x20','8SWmnqB','status','FAILED','has','253yBppiR','\x20--format\x20compress','apiError','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.'];a45_0xf679=function(){return _0x28fed9;};return a45_0xf679();}const TERMINAL_STATUSES=new Set(['SUCCESS',a45_0x29b1b7(0x211)]),NON_TERMINAL_STATUSES=new Set([a45_0x29b1b7(0x1fb),a45_0x29b1b7(0x201)]);function a45_0x2628(_0x205dfd,_0x492347){_0x205dfd=_0x205dfd-0x1f2;const _0xf679b9=a45_0xf679();let _0x262887=_0xf679b9[_0x205dfd];return _0x262887;}export function normalizeAsyncTask(_0x1f3804){const _0x39ca9f=a45_0x29b1b7,_0x158205=typeof _0x1f3804?.[_0x39ca9f(0x1f5)]==='string'?_0x1f3804['taskId'][_0x39ca9f(0x20d)]():'';if(!_0x158205)throw CliErrors[_0x39ca9f(0x215)](_0x39ca9f(0x1f2));const _0x3ab11a=typeof _0x1f3804[_0x39ca9f(0x210)]===_0x39ca9f(0x1f6)?_0x1f3804[_0x39ca9f(0x210)][_0x39ca9f(0x20d)]()['toUpperCase']():'';if(!_0x3ab11a)throw CliErrors['apiError'](_0x39ca9f(0x1ff)+_0x158205+_0x39ca9f(0x202));return{'taskId':_0x158205,'status':_0x3ab11a,'errorMessage':typeof _0x1f3804[_0x39ca9f(0x1fc)]===_0x39ca9f(0x1f6)&&_0x1f3804[_0x39ca9f(0x1fc)]['trim']()?_0x1f3804['errorMessage'][_0x39ca9f(0x20d)]():null,'isTerminal':TERMINAL_STATUSES[_0x39ca9f(0x212)](_0x3ab11a),'knownStatus':TERMINAL_STATUSES[_0x39ca9f(0x212)](_0x3ab11a)||NON_TERMINAL_STATUSES['has'](_0x3ab11a)};}export function buildAsyncTaskStatusCommand(_0x479e22,_0x541696){const _0x236426=a45_0x29b1b7;return CLI_BIN_NAME+_0x236426(0x1fe)+quoteShellArg(_0x479e22)+_0x236426(0x20e)+quoteShellArg(_0x541696)+_0x236426(0x214);}export function asyncTaskMessage(_0x4864eb){const _0x348ca5=a45_0x29b1b7;switch(_0x4864eb[_0x348ca5(0x210)]){case _0x348ca5(0x1fb):return _0x348ca5(0x1fd)+_0x4864eb[_0x348ca5(0x1f5)]+_0x348ca5(0x1f7);case _0x348ca5(0x201):return _0x348ca5(0x1fd)+_0x4864eb[_0x348ca5(0x1f5)]+_0x348ca5(0x208);case _0x348ca5(0x1f9):return _0x348ca5(0x1fd)+_0x4864eb[_0x348ca5(0x1f5)]+_0x348ca5(0x20a);case _0x348ca5(0x211):return _0x4864eb[_0x348ca5(0x1fc)]?'Task\x20'+_0x4864eb['taskId']+_0x348ca5(0x20b)+_0x4864eb[_0x348ca5(0x1fc)]:_0x348ca5(0x1fd)+_0x4864eb[_0x348ca5(0x1f5)]+_0x348ca5(0x1f3);default:return _0x348ca5(0x1fd)+_0x4864eb[_0x348ca5(0x1f5)]+_0x348ca5(0x20c)+_0x4864eb[_0x348ca5(0x210)]+'.';}}function quoteShellArg(_0xa91d58){const _0x21b625=a45_0x29b1b7;return'\x27'+_0xa91d58[_0x21b625(0x1f8)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
1
+ const a45_0x18d3a7=a45_0x3f68;(function(_0x1da5e0,_0x1b8a04){const _0x4d4668=a45_0x3f68,_0x245426=_0x1da5e0();while(!![]){try{const _0x4fad94=-parseInt(_0x4d4668(0x10b))/0x1*(parseInt(_0x4d4668(0x110))/0x2)+parseInt(_0x4d4668(0x113))/0x3+-parseInt(_0x4d4668(0x100))/0x4*(parseInt(_0x4d4668(0xfc))/0x5)+-parseInt(_0x4d4668(0x114))/0x6+parseInt(_0x4d4668(0x117))/0x7+parseInt(_0x4d4668(0x101))/0x8*(-parseInt(_0x4d4668(0xff))/0x9)+parseInt(_0x4d4668(0x103))/0xa*(parseInt(_0x4d4668(0xfe))/0xb);if(_0x4fad94===_0x1b8a04)break;else _0x245426['push'](_0x245426['shift']());}catch(_0x49bb1b){_0x245426['push'](_0x245426['shift']());}}}(a45_0x4b44,0x53d3d));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x18d3a7(0x115),a45_0x18d3a7(0x106)]),NON_TERMINAL_STATUSES=new Set([a45_0x18d3a7(0x108),'PROCESSING']);export function normalizeAsyncTask(_0x5bbc86){const _0x103e8c=a45_0x18d3a7,_0x3bf444=typeof _0x5bbc86?.['taskId']===_0x103e8c(0x102)?_0x5bbc86['taskId'][_0x103e8c(0x118)]():'';if(!_0x3bf444)throw CliErrors['apiError']('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x40234d=typeof _0x5bbc86[_0x103e8c(0x10a)]===_0x103e8c(0x102)?_0x5bbc86[_0x103e8c(0x10a)][_0x103e8c(0x118)]()['toUpperCase']():'';if(!_0x40234d)throw CliErrors[_0x103e8c(0x119)]('Async\x20task\x20'+_0x3bf444+_0x103e8c(0x112));return{'taskId':_0x3bf444,'status':_0x40234d,'errorMessage':typeof _0x5bbc86[_0x103e8c(0x104)]===_0x103e8c(0x102)&&_0x5bbc86[_0x103e8c(0x104)]['trim']()?_0x5bbc86['errorMessage'][_0x103e8c(0x118)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x40234d),'knownStatus':TERMINAL_STATUSES[_0x103e8c(0x105)](_0x40234d)||NON_TERMINAL_STATUSES['has'](_0x40234d)};}function a45_0x3f68(_0x2c9da7,_0x30d2f9){_0x2c9da7=_0x2c9da7-0xfc;const _0x4b440a=a45_0x4b44();let _0x3f680b=_0x4b440a[_0x2c9da7];return _0x3f680b;}export function buildAsyncTaskStatusCommand(_0x14f8f3,_0x145088){const _0x39f165=a45_0x18d3a7;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x14f8f3)+'\x20--appcode\x20'+quoteShellArg(_0x145088)+_0x39f165(0x116);}function a45_0x4b44(){const _0x2f3fe1=['FAILED','\x20failed.','PENDING','Task\x20','status','9551fBcpVo','replace','\x20is\x20processing.','PROCESSING','taskId','54tXWWMv','\x27\x5c\x27\x27','\x20response\x20did\x20not\x20contain\x20a\x20status.','754866rsUknQ','3244380Riuhbw','SUCCESS','\x20--format\x20compress','611961ZsOWoL','trim','apiError','14885YgdYvN','\x20is\x20pending.','11TiIteI','27DyUoOn','716oUnCzS','859000QgpYUP','string','16579270TAfpLq','errorMessage','has'];a45_0x4b44=function(){return _0x2f3fe1;};return a45_0x4b44();}export function asyncTaskMessage(_0x5dce40){const _0x7a2122=a45_0x18d3a7;switch(_0x5dce40[_0x7a2122(0x10a)]){case _0x7a2122(0x108):return _0x7a2122(0x109)+_0x5dce40['taskId']+_0x7a2122(0xfd);case _0x7a2122(0x10e):return'Task\x20'+_0x5dce40[_0x7a2122(0x10f)]+_0x7a2122(0x10d);case _0x7a2122(0x115):return _0x7a2122(0x109)+_0x5dce40[_0x7a2122(0x10f)]+'\x20completed\x20successfully.';case _0x7a2122(0x106):return _0x5dce40['errorMessage']?'Task\x20'+_0x5dce40[_0x7a2122(0x10f)]+'\x20failed:\x20'+_0x5dce40['errorMessage']:_0x7a2122(0x109)+_0x5dce40[_0x7a2122(0x10f)]+_0x7a2122(0x107);default:return'Task\x20'+_0x5dce40[_0x7a2122(0x10f)]+'\x20returned\x20unknown\x20status\x20'+_0x5dce40[_0x7a2122(0x10a)]+'.';}}function quoteShellArg(_0xad8bd7){const _0x2faed4=a45_0x18d3a7;return'\x27'+_0xad8bd7[_0x2faed4(0x10c)](/'/g,_0x2faed4(0x111))+'\x27';}
@@ -1 +1 @@
1
- function a46_0x4133(){var _0x21c153=['url','1929052uByGwO','92SrmUgV','description','17376RFqAAs','method','5QWinFS','11mNFNUE','4038642zDjeEU','4760860JjeHJX','100242EZQLyB','1442XTKSnS','4461dXYKoK','defineProperties','4987620jJJoEw'];a46_0x4133=function(){return _0x21c153;};return a46_0x4133();}function a46_0x40d6(_0x217649,_0x2fe508){_0x217649=_0x217649-0x151;var _0x4133d2=a46_0x4133();var _0x40d6fc=_0x4133d2[_0x217649];return _0x40d6fc;}(function(_0xcceed9,_0x4fa44a){var _0x3a3c89=a46_0x40d6,_0xcaffe4=_0xcceed9();while(!![]){try{var _0x139c49=parseInt(_0x3a3c89(0x157))/0x1+parseInt(_0x3a3c89(0x15e))/0x2*(-parseInt(_0x3a3c89(0x159))/0x3)+-parseInt(_0x3a3c89(0x15d))/0x4*(parseInt(_0x3a3c89(0x153))/0x5)+-parseInt(_0x3a3c89(0x155))/0x6+parseInt(_0x3a3c89(0x158))/0x7*(parseInt(_0x3a3c89(0x151))/0x8)+parseInt(_0x3a3c89(0x15b))/0x9+parseInt(_0x3a3c89(0x156))/0xa*(parseInt(_0x3a3c89(0x154))/0xb);if(_0x139c49===_0x4fa44a)break;else _0xcaffe4['push'](_0xcaffe4['shift']());}catch(_0x4a2e42){_0xcaffe4['push'](_0xcaffe4['shift']());}}}(a46_0x4133,0x56778));export function asDryRunResult(_0x19f191,_0x2135be){var _0x3dd740=a46_0x40d6;return Object[_0x3dd740(0x15a)](_0x19f191,{'method':{'value':_0x2135be[_0x3dd740(0x152)],'enumerable':![]},'url':{'value':_0x2135be[_0x3dd740(0x15c)],'enumerable':![]},..._0x2135be['description']?{'description':{'value':_0x2135be[_0x3dd740(0x15f)],'enumerable':![]}}:{}});}
1
+ function a46_0x302e(_0x4976e4,_0x313a4e){_0x4976e4=_0x4976e4-0x15e;var _0x1efc7e=a46_0x1efc();var _0x302eb5=_0x1efc7e[_0x4976e4];return _0x302eb5;}(function(_0x96dc73,_0x56fab9){var _0x26da17=a46_0x302e,_0x103c2d=_0x96dc73();while(!![]){try{var _0x2c60a4=-parseInt(_0x26da17(0x167))/0x1*(-parseInt(_0x26da17(0x16a))/0x2)+-parseInt(_0x26da17(0x168))/0x3+-parseInt(_0x26da17(0x16b))/0x4*(-parseInt(_0x26da17(0x164))/0x5)+parseInt(_0x26da17(0x163))/0x6*(parseInt(_0x26da17(0x16c))/0x7)+parseInt(_0x26da17(0x161))/0x8+parseInt(_0x26da17(0x166))/0x9+-parseInt(_0x26da17(0x15e))/0xa*(parseInt(_0x26da17(0x165))/0xb);if(_0x2c60a4===_0x56fab9)break;else _0x103c2d['push'](_0x103c2d['shift']());}catch(_0x380f43){_0x103c2d['push'](_0x103c2d['shift']());}}}(a46_0x1efc,0xbb185));function a46_0x1efc(){var _0x5cc6cd=['4376187uDbgLX','url','7550DKxRTu','52wWWcAG','91175huuubi','830RRqTEE','method','defineProperties','4859696YePyGU','description','462qCdnTM','510955JUTgDR','216689TPGDLI','6965928HffIUG','39BuPYQu'];a46_0x1efc=function(){return _0x5cc6cd;};return a46_0x1efc();}export function asDryRunResult(_0x57d94d,_0x574c78){var _0x58c642=a46_0x302e;return Object[_0x58c642(0x160)](_0x57d94d,{'method':{'value':_0x574c78[_0x58c642(0x15f)],'enumerable':![]},'url':{'value':_0x574c78[_0x58c642(0x169)],'enumerable':![]},..._0x574c78[_0x58c642(0x162)]?{'description':{'value':_0x574c78['description'],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a47_0x16b5b9=a47_0x266d;(function(_0x5ddaaa,_0x4d9d2e){const _0x4a2a13=a47_0x266d,_0x107833=_0x5ddaaa();while(!![]){try{const _0xa154bf=-parseInt(_0x4a2a13(0x12d))/0x1+parseInt(_0x4a2a13(0x134))/0x2+parseInt(_0x4a2a13(0x138))/0x3+parseInt(_0x4a2a13(0x127))/0x4*(parseInt(_0x4a2a13(0x12f))/0x5)+-parseInt(_0x4a2a13(0x132))/0x6+-parseInt(_0x4a2a13(0x12c))/0x7+parseInt(_0x4a2a13(0x136))/0x8*(parseInt(_0x4a2a13(0x129))/0x9);if(_0xa154bf===_0x4d9d2e)break;else _0x107833['push'](_0x107833['shift']());}catch(_0x29a8eb){_0x107833['push'](_0x107833['shift']());}}}(a47_0x5730,0xb87b0));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x16b5b9(0x12b)};export const CODE_FLAG={'name':a47_0x16b5b9(0x137),'type':a47_0x16b5b9(0x12a),'required':!![],'description':a47_0x16b5b9(0x133),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x16b5b9(0x139),'description':a47_0x16b5b9(0x133)};export const SQLCODE_FLAG={'name':a47_0x16b5b9(0x131),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};function a47_0x5730(){const _0x225406=['a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','5647572Mfgwjq','63932KtSRHV','MYSQL','90oyFsCC','appcode','sqlcode','97542tApJdb','Dataset\x20code\x20(32-char\x20hex\x20UUID)','720722BkGPer','App\x20code\x20(e.g.\x20app-xxxxx)','364024vFnfnC','code','199809eZJyUO','datasetcode','POSTGRESQL','dbtype','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','138692FcshxW','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','117ksELDs','string'];a47_0x5730=function(){return _0x225406;};return a47_0x5730();}export const APPCODE_FLAG_OPTIONAL={'name':a47_0x16b5b9(0x130),'type':a47_0x16b5b9(0x12a),'required':![],'description':a47_0x16b5b9(0x126)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x16b5b9(0x135)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a47_0x266d(_0x3b9d29,_0x49afee){_0x3b9d29=_0x3b9d29-0x124;const _0x57309d=a47_0x5730();let _0x266d6b=_0x57309d[_0x3b9d29];return _0x266d6b;}export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a47_0x16b5b9(0x128)};export const DB_TYPE_FLAG={'name':a47_0x16b5b9(0x125),'type':'string','required':!![],'description':'Database\x20product\x20type','enum':[a47_0x16b5b9(0x12e),a47_0x16b5b9(0x124)]};
1
+ const a47_0xf08db8=a47_0x218e;(function(_0x12ece6,_0x5c8fd5){const _0x110758=a47_0x218e,_0xfc1ce=_0x12ece6();while(!![]){try{const _0x5664a7=-parseInt(_0x110758(0x1f5))/0x1*(-parseInt(_0x110758(0x1ee))/0x2)+parseInt(_0x110758(0x1fe))/0x3+-parseInt(_0x110758(0x1f6))/0x4*(-parseInt(_0x110758(0x1fb))/0x5)+parseInt(_0x110758(0x200))/0x6*(parseInt(_0x110758(0x1ec))/0x7)+-parseInt(_0x110758(0x1f1))/0x8*(parseInt(_0x110758(0x1f3))/0x9)+-parseInt(_0x110758(0x1ed))/0xa+parseInt(_0x110758(0x1fd))/0xb*(-parseInt(_0x110758(0x203))/0xc);if(_0x5664a7===_0x5c8fd5)break;else _0xfc1ce['push'](_0xfc1ce['shift']());}catch(_0x3af745){_0xfc1ce['push'](_0xfc1ce['shift']());}}}(a47_0x537b,0xbceae));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}(?:_[^_\s]+_[^_\s]+)?$/i,'description':'a\x2032-character\x20hex\x20code,\x20optionally\x20with\x20`_xx_xx`\x20suffix\x20(e.g.\x2099a909313f1fa7153186431e1c551588\x20or\x2099a909313f1fa7153186431e1c551588_75_3c7120aa)'};export const CODE_FLAG={'name':a47_0xf08db8(0x1ea),'type':a47_0xf08db8(0x1fa),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a47_0x537b(){const _0x33d297=['datasetcode','number','string','239335eSgTPT','dbtype','827453tLVuXL','3630594TOMSxu','POSTGRESQL','6WVqhlt','App\x20code\x20(e.g.\x20app-xxxxx)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','240ZQIdRh','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','code','sqlcode','4135271zeaIEI','7107630aglDBr','492068EwQIvK','Database\x20product\x20type','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','3729568GCHZlQ','appcode','9KJERWq','Dataset\x20code\x20(32-char\x20hex,\x20optionally\x20with\x20_xx_xx\x20suffix)','4WjLTXM','56CsVVMG','MYSQL'];a47_0x537b=function(){return _0x33d297;};return a47_0x537b();}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0xf08db8(0x1f8),'description':a47_0xf08db8(0x1f4)};export const SQLCODE_FLAG={'name':a47_0xf08db8(0x1eb),'type':a47_0xf08db8(0x1fa),'required':!![],'description':a47_0xf08db8(0x1f0),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0xf08db8(0x202)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0xf08db8(0x1f2),'type':a47_0xf08db8(0x1fa),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};function a47_0x218e(_0x47fbc8,_0x1c097e){_0x47fbc8=_0x47fbc8-0x1e9;const _0x537bbc=a47_0x537b();let _0x218ee0=_0x537bbc[_0x47fbc8];return _0x218ee0;}export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0xf08db8(0x201)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0xf08db8(0x1f9),'required':!![],'description':a47_0xf08db8(0x1e9)};export const DB_TYPE_FLAG={'name':a47_0xf08db8(0x1fc),'type':'string','required':!![],'description':a47_0xf08db8(0x1ef),'enum':[a47_0xf08db8(0x1f7),a47_0xf08db8(0x1ff)]};
@@ -1 +1 @@
1
- function a48_0x1afd(){const _0x81c470=['isFile','validation','14291968tcDvSH','File\x20not\x20found:\x20','1130VRobHr','6xJUVWy','158006FAMhWB','15037pEiJHz','size','toFixed','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','4CGCBzd','\x20MB','12984qEjoGZ','7813482Flltst','File\x20is\x20not\x20a\x20regular\x20file:\x20','7DxyjQZ','trim','2371415PecEAL','381975BVTKIT','3114xlpWQG'];a48_0x1afd=function(){return _0x81c470;};return a48_0x1afd();}(function(_0x2c0bdc,_0x37cab8){const _0x594c50=a48_0x55cb,_0x148ad7=_0x2c0bdc();while(!![]){try{const _0x6c5bcd=-parseInt(_0x594c50(0x196))/0x1*(parseInt(_0x594c50(0x195))/0x2)+parseInt(_0x594c50(0x18e))/0x3*(-parseInt(_0x594c50(0x19b))/0x4)+-parseInt(_0x594c50(0x18d))/0x5+parseInt(_0x594c50(0x19e))/0x6*(-parseInt(_0x594c50(0x1a0))/0x7)+parseInt(_0x594c50(0x192))/0x8+-parseInt(_0x594c50(0x18f))/0x9*(-parseInt(_0x594c50(0x194))/0xa)+-parseInt(_0x594c50(0x197))/0xb*(-parseInt(_0x594c50(0x19d))/0xc);if(_0x6c5bcd===_0x37cab8)break;else _0x148ad7['push'](_0x148ad7['shift']());}catch(_0x494a6e){_0x148ad7['push'](_0x148ad7['shift']());}}}(a48_0x1afd,0xe245f));import{existsSync,statSync}from'node:fs';function a48_0x55cb(_0x54b75d,_0x37893e){_0x54b75d=_0x54b75d-0x18d;const _0x1afd3a=a48_0x1afd();let _0x55cbe9=_0x1afd3a[_0x54b75d];return _0x55cbe9;}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x5049bb){const _0x29bef3=a48_0x55cb;if(_0x5049bb>=BYTES_PER_MB){const _0x184ac6=Math['ceil'](_0x5049bb/BYTES_PER_MB*0x64)/0x64;return _0x184ac6[_0x29bef3(0x199)](0x2)+_0x29bef3(0x19c);}return _0x5049bb+'\x20B';}export function requireDevelopmentUploadFile(_0x580ee6,_0x1b41f1){const _0x4f1350=a48_0x55cb,_0x105aa8=_0x580ee6[_0x4f1350(0x1a1)]();if(!_0x105aa8)throw CliErrors[_0x4f1350(0x191)](_0x1b41f1+'\x20path\x20is\x20required.');if(!existsSync(_0x105aa8))throw CliErrors[_0x4f1350(0x191)](_0x4f1350(0x193)+_0x105aa8);const _0x3ef02d=statSync(_0x105aa8);if(!_0x3ef02d[_0x4f1350(0x190)]())throw CliErrors['validation'](_0x4f1350(0x19f)+_0x105aa8);if(_0x3ef02d['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x4f1350(0x191)](_0x4f1350(0x19a)+_0x105aa8+'\x20('+formatBytes(_0x3ef02d['size'])+')');return{'path':_0x105aa8,'size':_0x3ef02d[_0x4f1350(0x198)]};}
1
+ (function(_0x4d006b,_0x3cbc57){const _0x29097c=a48_0x399a,_0x1d8b29=_0x4d006b();while(!![]){try{const _0x10093b=-parseInt(_0x29097c(0xc1))/0x1*(parseInt(_0x29097c(0xbf))/0x2)+-parseInt(_0x29097c(0xbc))/0x3+-parseInt(_0x29097c(0xc7))/0x4*(parseInt(_0x29097c(0xc3))/0x5)+parseInt(_0x29097c(0xc2))/0x6+parseInt(_0x29097c(0xba))/0x7*(parseInt(_0x29097c(0xc4))/0x8)+-parseInt(_0x29097c(0xc0))/0x9*(parseInt(_0x29097c(0xc9))/0xa)+parseInt(_0x29097c(0xbb))/0xb;if(_0x10093b===_0x3cbc57)break;else _0x1d8b29['push'](_0x1d8b29['shift']());}catch(_0x4fc588){_0x1d8b29['push'](_0x1d8b29['shift']());}}}(a48_0x440c,0xac0e3));function a48_0x440c(){const _0x1ba946=['size','\x20MB','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','File\x20not\x20found:\x20','7343rqTPdr','3239676ZGzHja','1683576Hygggd','File\x20is\x20not\x20a\x20regular\x20file:\x20','isFile','171638IYluvl','7461nCBXTq','5cjeZJV','6445962baZLRf','175fZseKI','6736BGLEFg','ceil','validation','49928EmlMRR','toFixed','1450bteUvY'];a48_0x440c=function(){return _0x1ba946;};return a48_0x440c();}function a48_0x399a(_0xf2a76f,_0x31e45a){_0xf2a76f=_0xf2a76f-0xb9;const _0x440c6c=a48_0x440c();let _0x399a5c=_0x440c6c[_0xf2a76f];return _0x399a5c;}import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x3367c0){const _0x25af3c=a48_0x399a;if(_0x3367c0>=BYTES_PER_MB){const _0x5b09bf=Math[_0x25af3c(0xc5)](_0x3367c0/BYTES_PER_MB*0x64)/0x64;return _0x5b09bf[_0x25af3c(0xc8)](0x2)+_0x25af3c(0xcb);}return _0x3367c0+'\x20B';}export function requireDevelopmentUploadFile(_0x51ee7d,_0x4a7150){const _0x2bf0e0=a48_0x399a,_0x5d92c9=_0x51ee7d['trim']();if(!_0x5d92c9)throw CliErrors['validation'](_0x4a7150+'\x20path\x20is\x20required.');if(!existsSync(_0x5d92c9))throw CliErrors[_0x2bf0e0(0xc6)](_0x2bf0e0(0xb9)+_0x5d92c9);const _0x30be7a=statSync(_0x5d92c9);if(!_0x30be7a[_0x2bf0e0(0xbe)]())throw CliErrors[_0x2bf0e0(0xc6)](_0x2bf0e0(0xbd)+_0x5d92c9);if(_0x30be7a[_0x2bf0e0(0xca)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x2bf0e0(0xc6)](_0x2bf0e0(0xcc)+_0x5d92c9+'\x20('+formatBytes(_0x30be7a['size'])+')');return{'path':_0x5d92c9,'size':_0x30be7a[_0x2bf0e0(0xca)]};}