@lovrabet/rabetbase-cli 2.4.7 → 2.5.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.d.ts +13 -3
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.d.ts +7 -0
  6. package/lib/api/generate-sdk-config-file.js +1 -0
  7. package/lib/auth/auth-server-ui.js +1 -1
  8. package/lib/auth/auth-server.js +1 -1
  9. package/lib/auth/constant.js +1 -1
  10. package/lib/auth/get-cookie.js +1 -1
  11. package/lib/auth/get-session-user.js +1 -1
  12. package/lib/auth/is-session-valid.js +1 -1
  13. package/lib/auth/login-success-html.js +1 -1
  14. package/lib/auth/logout.js +1 -1
  15. package/lib/cli-flags.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/commands/api/generate.js +1 -1
  18. package/lib/commands/api/index.js +1 -1
  19. package/lib/commands/api/list.js +1 -1
  20. package/lib/commands/api/pull.js +1 -1
  21. package/lib/commands/api/shared.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/members-list.js +1 -1
  25. package/lib/commands/app/remote-directory.js +1 -1
  26. package/lib/commands/app/shared.d.ts +2 -5
  27. package/lib/commands/app/shared.js +1 -1
  28. package/lib/commands/app-config/delete.js +1 -1
  29. package/lib/commands/app-config/get.js +1 -1
  30. package/lib/commands/app-config/index.js +1 -1
  31. package/lib/commands/app-config/list.js +1 -1
  32. package/lib/commands/app-config/set.js +1 -1
  33. package/lib/commands/app-config/shared.js +1 -1
  34. package/lib/commands/auth/index.js +1 -1
  35. package/lib/commands/bff/create.js +1 -1
  36. package/lib/commands/bff/delete.js +1 -1
  37. package/lib/commands/bff/detail.js +1 -1
  38. package/lib/commands/bff/index.js +1 -1
  39. package/lib/commands/bff/list.js +1 -1
  40. package/lib/commands/bff/pull.js +1 -1
  41. package/lib/commands/bff/push.js +1 -1
  42. package/lib/commands/bff/status.js +1 -1
  43. package/lib/commands/cli-skill/index.js +1 -1
  44. package/lib/commands/cli-update.js +1 -1
  45. package/lib/commands/codegen/index.js +1 -1
  46. package/lib/commands/codegen/sdk.js +1 -1
  47. package/lib/commands/codegen/sql.js +1 -1
  48. package/lib/commands/common/app-registry.js +1 -1
  49. package/lib/commands/common/app-selector.js +1 -1
  50. package/lib/commands/common/async-task.js +1 -1
  51. package/lib/commands/common/dry-run.js +1 -1
  52. package/lib/commands/common/flags.js +1 -1
  53. package/lib/commands/common/local-file.js +1 -1
  54. package/lib/commands/common/validate.js +1 -1
  55. package/lib/commands/config/delete.d.ts +5 -0
  56. package/lib/commands/config/delete.js +1 -0
  57. package/lib/commands/config/get.js +1 -1
  58. package/lib/commands/config/index.js +1 -1
  59. package/lib/commands/config/init.d.ts +12 -0
  60. package/lib/commands/config/init.js +1 -0
  61. package/lib/commands/config/list.js +1 -1
  62. package/lib/commands/config/set.js +1 -1
  63. package/lib/commands/config/shared.js +1 -1
  64. package/lib/commands/dataset/business-group-update.js +1 -1
  65. package/lib/commands/dataset/business-groups.js +1 -1
  66. package/lib/commands/dataset/capability.js +1 -1
  67. package/lib/commands/dataset/delete.js +1 -1
  68. package/lib/commands/dataset/detail.js +1 -1
  69. package/lib/commands/dataset/extend-update.js +1 -1
  70. package/lib/commands/dataset/field-update.js +1 -1
  71. package/lib/commands/dataset/generate.js +1 -1
  72. package/lib/commands/dataset/index.js +1 -1
  73. package/lib/commands/dataset/list.js +1 -1
  74. package/lib/commands/dataset/operations.js +1 -1
  75. package/lib/commands/dataset/relation-audit.js +1 -1
  76. package/lib/commands/dataset/relation-create.js +1 -1
  77. package/lib/commands/dataset/relation-delete.js +1 -1
  78. package/lib/commands/dataset/relation-shared.js +1 -1
  79. package/lib/commands/dataset/relation-update.js +1 -1
  80. package/lib/commands/dataset/relations.js +1 -1
  81. package/lib/commands/dataset/rename.js +1 -1
  82. package/lib/commands/dataset/restore.js +1 -1
  83. package/lib/commands/db/analysis-batching.js +1 -1
  84. package/lib/commands/db/analyze-batch-plan.js +1 -1
  85. package/lib/commands/db/analyze-cancel.js +1 -1
  86. package/lib/commands/db/analyze-start.js +1 -1
  87. package/lib/commands/db/analyze-status.js +1 -1
  88. package/lib/commands/db/create.js +1 -1
  89. package/lib/commands/db/delete.js +1 -1
  90. package/lib/commands/db/detail.js +1 -1
  91. package/lib/commands/db/diff-refresh-start.js +1 -1
  92. package/lib/commands/db/diff-refresh-status.js +1 -1
  93. package/lib/commands/db/diff.js +1 -1
  94. package/lib/commands/db/index.js +1 -1
  95. package/lib/commands/db/list.js +1 -1
  96. package/lib/commands/db/shared.js +1 -1
  97. package/lib/commands/db/tables.js +1 -1
  98. package/lib/commands/db/test.js +1 -1
  99. package/lib/commands/db/update.js +1 -1
  100. package/lib/commands/doctor.js +1 -1
  101. package/lib/commands/file/index.js +1 -1
  102. package/lib/commands/issue/index.js +1 -1
  103. package/lib/commands/issue/nudge.js +1 -1
  104. package/lib/commands/issue/report.js +1 -1
  105. package/lib/commands/issue/shared.js +1 -1
  106. package/lib/commands/kb/create.js +1 -1
  107. package/lib/commands/kb/delete.js +1 -1
  108. package/lib/commands/kb/detail.js +1 -1
  109. package/lib/commands/kb/index.js +1 -1
  110. package/lib/commands/kb/list.js +1 -1
  111. package/lib/commands/kb/search.js +1 -1
  112. package/lib/commands/kb/shared.js +1 -1
  113. package/lib/commands/kb/update.js +1 -1
  114. package/lib/commands/logs/index.js +1 -1
  115. package/lib/commands/menu/asset-update.js +1 -1
  116. package/lib/commands/menu/delete.js +1 -1
  117. package/lib/commands/menu/external-link-create.js +1 -1
  118. package/lib/commands/menu/external-link-update.js +1 -1
  119. package/lib/commands/menu/group-create.js +1 -1
  120. package/lib/commands/menu/group-update.js +1 -1
  121. package/lib/commands/menu/index.js +1 -1
  122. package/lib/commands/menu/list.js +1 -1
  123. package/lib/commands/menu/move.js +1 -1
  124. package/lib/commands/menu/regroup-start.js +1 -1
  125. package/lib/commands/menu/rename.js +1 -1
  126. package/lib/commands/menu/shared/compare-table.js +1 -1
  127. package/lib/commands/menu/shared/delete-plan.js +1 -1
  128. package/lib/commands/menu/shared/facts.js +1 -1
  129. package/lib/commands/menu/shared/index.js +1 -1
  130. package/lib/commands/menu/shared/inquirer.js +1 -1
  131. package/lib/commands/menu/shared/local-pages.js +1 -1
  132. package/lib/commands/menu/shared/logic.js +1 -1
  133. package/lib/commands/menu/shared/mutations.js +1 -1
  134. package/lib/commands/menu/shared/service.js +1 -1
  135. package/lib/commands/menu/shared/sync-core.js +1 -1
  136. package/lib/commands/menu/shared/update-core.js +1 -1
  137. package/lib/commands/menu/shared/valid-url.js +1 -1
  138. package/lib/commands/menu/sync.js +1 -1
  139. package/lib/commands/menu/visibility-update.js +1 -1
  140. package/lib/commands/notification/config-create.js +1 -1
  141. package/lib/commands/notification/config-delete.js +1 -1
  142. package/lib/commands/notification/config-list.js +1 -1
  143. package/lib/commands/notification/config-update.js +1 -1
  144. package/lib/commands/notification/index.js +1 -1
  145. package/lib/commands/notification/shared.js +1 -1
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/create.js +1 -1
  148. package/lib/commands/page/custom/detail.js +1 -1
  149. package/lib/commands/page/custom/list.js +1 -1
  150. package/lib/commands/page/custom/publish.js +1 -1
  151. package/lib/commands/page/custom/shared.js +1 -1
  152. package/lib/commands/page/custom/syntax.js +1 -1
  153. package/lib/commands/page/custom/template.js +1 -1
  154. package/lib/commands/page/custom/update.js +1 -1
  155. package/lib/commands/page/data-list-status.js +1 -1
  156. package/lib/commands/page/generate-start.js +1 -1
  157. package/lib/commands/page/generate-status.js +1 -1
  158. package/lib/commands/page/index.js +1 -1
  159. package/lib/commands/page/pull.js +1 -1
  160. package/lib/commands/page/push.js +1 -1
  161. package/lib/commands/page/relation-audit.js +1 -1
  162. package/lib/commands/page/restore.js +1 -1
  163. package/lib/commands/page/shared.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  166. package/lib/commands/project/create/format-elapsed.js +1 -1
  167. package/lib/commands/project/create/main.d.ts +1 -0
  168. package/lib/commands/project/create/main.js +1 -1
  169. package/lib/commands/project/create/materialize-project-template.d.ts +6 -2
  170. package/lib/commands/project/create/materialize-project-template.js +1 -1
  171. package/lib/commands/project/create/project-name.js +1 -1
  172. package/lib/commands/project/create/project-template-archive.js +1 -1
  173. package/lib/commands/project/create/project-template-path.js +1 -1
  174. package/lib/commands/project/create/use-copy-project-template.d.ts +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.d.ts +2 -2
  181. package/lib/commands/registry.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.d.ts +1 -1
  187. package/lib/commands/role/shared.js +1 -1
  188. package/lib/commands/role/update.js +1 -1
  189. package/lib/commands/role/user-add.js +1 -1
  190. package/lib/commands/role/user-remove.js +1 -1
  191. package/lib/commands/role/user-resolve.js +1 -1
  192. package/lib/commands/run/index.js +1 -1
  193. package/lib/commands/schema.js +1 -1
  194. package/lib/commands/sql/create.js +1 -1
  195. package/lib/commands/sql/delete.js +1 -1
  196. package/lib/commands/sql/detail.js +1 -1
  197. package/lib/commands/sql/exec.js +1 -1
  198. package/lib/commands/sql/index.js +1 -1
  199. package/lib/commands/sql/list.js +1 -1
  200. package/lib/commands/sql/pull.js +1 -1
  201. package/lib/commands/sql/push.js +1 -1
  202. package/lib/commands/sql/shared.js +1 -1
  203. package/lib/commands/sql/status.js +1 -1
  204. package/lib/commands/sql/validate.js +1 -1
  205. package/lib/commands/task/index.js +1 -1
  206. package/lib/commands/task/status.js +1 -1
  207. package/lib/commands/tenant/index.js +1 -1
  208. package/lib/commands/tenant/members-list.js +1 -1
  209. package/lib/commands/tenant/shared.js +1 -1
  210. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  211. package/lib/commands/user-account/index.js +1 -1
  212. package/lib/commands/workspace/add.js +1 -1
  213. package/lib/commands/workspace/index.js +1 -1
  214. package/lib/commands/workspace/remove.js +1 -1
  215. package/lib/config/domain-config.d.ts +10 -0
  216. package/lib/config/domain-config.js +1 -0
  217. package/lib/config/schema.d.ts +3 -1
  218. package/lib/config/schema.js +1 -1
  219. package/lib/constant/cdn.js +1 -1
  220. package/lib/constant/cli.js +1 -1
  221. package/lib/constant/defaults.js +1 -1
  222. package/lib/constant/domain.d.ts +23 -1
  223. package/lib/constant/domain.js +1 -1
  224. package/lib/constant/env.js +1 -1
  225. package/lib/constant/output.js +1 -1
  226. package/lib/constant/paths.js +1 -1
  227. package/lib/constant/region.d.ts +9 -0
  228. package/lib/constant/region.js +1 -0
  229. package/lib/constant/risk.js +1 -1
  230. package/lib/context/app-resolver.js +1 -1
  231. package/lib/context/auth-resolver.js +1 -1
  232. package/lib/context/config-loader.d.ts +4 -6
  233. package/lib/context/config-loader.js +1 -1
  234. package/lib/context.d.ts +2 -2
  235. package/lib/context.js +1 -1
  236. package/lib/core/alias-resolver.js +1 -1
  237. package/lib/core/api-client.d.ts +2 -0
  238. package/lib/core/api-client.js +1 -1
  239. package/lib/core/bff/config.js +1 -1
  240. package/lib/core/bff/file-system.js +1 -1
  241. package/lib/core/bff/hash.js +1 -1
  242. package/lib/core/bff/lock.js +1 -1
  243. package/lib/core/bff/utils.js +1 -1
  244. package/lib/core/db-resolver.js +1 -1
  245. package/lib/core/page/file-system.js +1 -1
  246. package/lib/core/page/hash.js +1 -1
  247. package/lib/core/page/lock.js +1 -1
  248. package/lib/core/sql-index-auditor.js +1 -1
  249. package/lib/core/sql-sync/config.js +1 -1
  250. package/lib/core/sql-sync/file-system.js +1 -1
  251. package/lib/core/sql-sync/hash.js +1 -1
  252. package/lib/core/sql-sync/lock.js +1 -1
  253. package/lib/core/sql-sync/utils.js +1 -1
  254. package/lib/core/sql-validator.js +1 -1
  255. package/lib/errors.d.ts +11 -1
  256. package/lib/errors.js +1 -1
  257. package/lib/framework/build-all-flags.js +1 -1
  258. package/lib/framework/error-output.js +1 -1
  259. package/lib/framework/explicit-yes.js +1 -1
  260. package/lib/framework/flags.js +1 -1
  261. package/lib/framework/help.d.ts +2 -2
  262. package/lib/framework/help.js +1 -1
  263. package/lib/framework/index.js +1 -1
  264. package/lib/framework/output.js +1 -1
  265. package/lib/framework/response.js +1 -1
  266. package/lib/framework/runner-alias.js +1 -1
  267. package/lib/framework/runner.js +1 -1
  268. package/lib/framework/schema-export.js +1 -1
  269. package/lib/framework/types.js +1 -1
  270. package/lib/generated/build-info.d.ts +4 -4
  271. package/lib/generated/build-info.js +1 -1
  272. package/lib/help.js +1 -1
  273. package/lib/postinstall.js +1 -1
  274. package/lib/runtime/confirmation.js +1 -1
  275. package/lib/runtime/event.js +1 -1
  276. package/lib/runtime/index.js +1 -1
  277. package/lib/runtime/queue.js +1 -1
  278. package/lib/runtime/resolve.js +1 -1
  279. package/lib/skills/builtin-skill.js +1 -1
  280. package/lib/skills/main.js +1 -1
  281. package/lib/skills/npx-skills-add.js +1 -1
  282. package/lib/skills/skill-presence.js +1 -1
  283. package/lib/telemetry/cli-command-trace.js +1 -1
  284. package/lib/telemetry/cli-help-trace.js +1 -1
  285. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  286. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  287. package/lib/telemetry/send-cli-trace-log.js +1 -1
  288. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  289. package/lib/types/index.d.ts +28 -0
  290. package/lib/utils/ai_config.d.ts +1 -2
  291. package/lib/utils/ai_config.js +1 -1
  292. package/lib/utils/apply-jq-filter.js +1 -1
  293. package/lib/utils/cdn-config.js +1 -1
  294. package/lib/utils/check-sdk-version.js +1 -1
  295. package/lib/utils/cli-version-check.js +1 -1
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/sleep.js +1 -1
  307. package/lib/utils/template-replacer.js +1 -1
  308. package/lib/utils/update-notice.js +1 -1
  309. package/lib/utils/version.js +1 -1
  310. package/lib/utils/with-active-cookie.js +1 -1
  311. package/lib/utils/write-cli-side-channel.js +1 -1
  312. package/package.json +1 -3
  313. package/skills/rabetbase/SKILL.md +33 -28
  314. package/skills/rabetbase/guides/backend-function.md +41 -12
  315. package/skills/rabetbase/guides/bff-creation-workflow.md +6 -4
  316. package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
  317. package/skills/rabetbase/guides/data-api-guidelines.md +8 -8
  318. package/skills/rabetbase/guides/database-connection-workflow.md +8 -16
  319. package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +1 -6
  320. package/skills/rabetbase/guides/sdk-client-generation.md +146 -0
  321. package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
  322. package/skills/rabetbase/guides/troubleshooting.md +1 -1
  323. package/skills/rabetbase/guides/typescript-sdk.md +46 -10
  324. package/skills/rabetbase/references/rabetbase-api-list.md +4 -4
  325. package/skills/rabetbase/references/rabetbase-api-pull.md +44 -29
  326. package/skills/rabetbase/references/rabetbase-app-list.md +2 -2
  327. package/skills/rabetbase/references/rabetbase-auth-login.md +4 -2
  328. package/skills/rabetbase/references/rabetbase-bff-push.md +3 -1
  329. package/skills/rabetbase/references/rabetbase-codegen-sql.md +3 -1
  330. package/skills/rabetbase/references/rabetbase-config.md +75 -30
  331. package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +17 -6
  332. package/skills/rabetbase/references/rabetbase-dataset-detail.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-db-analyze.md +3 -3
  334. package/skills/rabetbase/references/rabetbase-db-detail.md +2 -2
  335. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -4
  336. package/skills/rabetbase/references/rabetbase-db-diff.md +6 -9
  337. package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
  338. package/skills/rabetbase/references/rabetbase-init.md +57 -51
  339. package/skills/rabetbase/references/rabetbase-kb.md +2 -0
  340. package/skills/rabetbase/references/rabetbase-page-create.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-page-custom-detail.md +3 -3
  342. package/skills/rabetbase/references/rabetbase-page-custom-list.md +2 -2
  343. package/skills/rabetbase/references/rabetbase-project-create.md +12 -3
  344. package/skills/rabetbase/references/rabetbase-project-upgrade.md +2 -2
  345. package/skills/rabetbase/references/rabetbase-role-user-resolve.md +2 -2
  346. package/skills/rabetbase/references/rabetbase-user-account.md +1 -1
  347. package/skills/rabetbase/references/rabetbase-workspace.md +6 -6
  348. package/skills/rabetbase.manifest.json +4 -3
  349. package/templates/README.md +17 -28
  350. package/templates/generate-api/api.ts.tpl +3 -3
  351. package/templates/generate-api/client.ts.tpl +10 -37
  352. package/lib/commands/data/filter.d.ts +0 -7
  353. package/lib/commands/data/filter.js +0 -1
  354. package/lib/commands/data/getOne.d.ts +0 -7
  355. package/lib/commands/data/getOne.js +0 -1
  356. package/lib/commands/data/index.d.ts +0 -8
  357. package/lib/commands/data/index.js +0 -1
  358. package/lib/commands/data/shared.d.ts +0 -33
  359. package/lib/commands/data/shared.js +0 -1
  360. package/lib/commands/init/index.d.ts +0 -11
  361. package/lib/commands/init/index.js +0 -1
  362. package/lib/utils/rules-cdn.d.ts +0 -38
  363. package/lib/utils/rules-cdn.js +0 -1
  364. package/templates/rules/lovrabet_rules.mdc.tpl +0 -893
  365. package/templates/skill/SKILL.md.tpl +0 -120
@@ -1 +1 @@
1
- (function(_0x1b1fca,_0x1250e1){const _0x103e0a=a18_0x2bbd,_0x36763e=_0x1b1fca();while(!![]){try{const _0x4ae6d9=-parseInt(_0x103e0a(0x147))/0x1*(parseInt(_0x103e0a(0x14d))/0x2)+parseInt(_0x103e0a(0x143))/0x3*(parseInt(_0x103e0a(0x144))/0x4)+-parseInt(_0x103e0a(0x14b))/0x5*(-parseInt(_0x103e0a(0x14c))/0x6)+-parseInt(_0x103e0a(0x141))/0x7+parseInt(_0x103e0a(0x142))/0x8*(parseInt(_0x103e0a(0x14a))/0x9)+-parseInt(_0x103e0a(0x145))/0xa*(-parseInt(_0x103e0a(0x146))/0xb)+-parseInt(_0x103e0a(0x148))/0xc*(parseInt(_0x103e0a(0x149))/0xd);if(_0x4ae6d9===_0x1250e1)break;else _0x36763e['push'](_0x36763e['shift']());}catch(_0x1c3380){_0x36763e['push'](_0x36763e['shift']());}}}(a18_0x472e,0xb4275));import{appListDefinition}from'../../commands/app/list.js';function a18_0x472e(){const _0x1950df=['20WsmoMh','5911928szQmLb','89tmORxn','708DOOZfM','231699rCXlme','696537XtWuMf','806875LonWvK','6bFvDPC','18466rTpXGH','5904808dkLkkz','88SdjUkl','4101459VdNayV','4VNSaBJ'];a18_0x472e=function(){return _0x1950df;};return a18_0x472e();}import{appMembersListDefinition}from'../../commands/app/members-list.js';function a18_0x2bbd(_0x5a3565,_0x2ee52b){_0x5a3565=_0x5a3565-0x141;const _0x472e14=a18_0x472e();let _0x2bbd25=_0x472e14[_0x5a3565];return _0x2bbd25;}export const appDefinitions=[appListDefinition,appMembersListDefinition];
1
+ (function(_0x4b07a9,_0x51258d){const _0x2225cd=a19_0x39a7,_0x4ce75a=_0x4b07a9();while(!![]){try{const _0x3386d1=-parseInt(_0x2225cd(0x131))/0x1+parseInt(_0x2225cd(0x135))/0x2+parseInt(_0x2225cd(0x134))/0x3*(-parseInt(_0x2225cd(0x130))/0x4)+-parseInt(_0x2225cd(0x132))/0x5*(parseInt(_0x2225cd(0x137))/0x6)+-parseInt(_0x2225cd(0x12f))/0x7+parseInt(_0x2225cd(0x136))/0x8+parseInt(_0x2225cd(0x133))/0x9;if(_0x3386d1===_0x51258d)break;else _0x4ce75a['push'](_0x4ce75a['shift']());}catch(_0x3e0455){_0x4ce75a['push'](_0x4ce75a['shift']());}}}(a19_0x2141,0x8e3a3));function a19_0x39a7(_0x3656bd,_0xe6bd8f){_0x3656bd=_0x3656bd-0x12f;const _0x21412d=a19_0x2141();let _0x39a76a=_0x21412d[_0x3656bd];return _0x39a76a;}function a19_0x2141(){const _0x47b6d9=['6159681lJlThX','57AdmfLL','2059876ZTdHit','4367576VbPQxR','72KsRbVn','940387FSSLqf','153392JvDYXF','370934LKSQjH','184935iVObXx'];a19_0x2141=function(){return _0x47b6d9;};return a19_0x2141();}import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';export const appDefinitions=[appListDefinition,appMembersListDefinition];
@@ -1 +1 @@
1
- const a19_0x483586=a19_0x3a1f;(function(_0x107743,_0x28d288){const _0x22af52=a19_0x3a1f,_0x2ce87e=_0x107743();while(!![]){try{const _0x8dcb78=-parseInt(_0x22af52(0x14c))/0x1*(-parseInt(_0x22af52(0x129))/0x2)+-parseInt(_0x22af52(0x128))/0x3+-parseInt(_0x22af52(0x12f))/0x4*(parseInt(_0x22af52(0x131))/0x5)+-parseInt(_0x22af52(0x14a))/0x6+-parseInt(_0x22af52(0x14b))/0x7+parseInt(_0x22af52(0x13b))/0x8+parseInt(_0x22af52(0x137))/0x9*(parseInt(_0x22af52(0x12e))/0xa);if(_0x8dcb78===_0x28d288)break;else _0x2ce87e['push'](_0x2ce87e['shift']());}catch(_0xd64b43){_0x2ce87e['push'](_0x2ce87e['shift']());}}}(a19_0x923d,0xc3322));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a19_0x3a1f(_0x10da4d,_0x46c4ba){_0x10da4d=_0x10da4d-0x125;const _0x923d83=a19_0x923d();let _0x3a1f43=_0x923d83[_0x10da4d];return _0x3a1f43;}import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x4564cb,_0x285cd8){const _0x32a5e4=a19_0x3a1f,_0x1e0656=[],_0x5a6c41=_0x4564cb['apps']&&typeof _0x4564cb[_0x32a5e4(0x146)]===_0x32a5e4(0x132)?_0x4564cb[_0x32a5e4(0x146)]:{},_0x404d54=_0x4564cb['defaultApp']||undefined;for(const [_0x4b7546,_0x1ed077]of Object[_0x32a5e4(0x125)](_0x5a6c41)){if(!_0x1ed077||typeof _0x1ed077!=='object'||!_0x1ed077[_0x32a5e4(0x13f)])continue;_0x1e0656[_0x32a5e4(0x134)]({'name':_0x4b7546,'appcode':_0x1ed077['appcode'],'named':!![],'definedIn':_0x285cd8,'isDefault':_0x4b7546===_0x404d54,...buildAppProfileListFields(_0x1ed077)});}return _0x1e0656;}function a19_0x923d(){const _0x53e538=['appcode','remote','mergedCli','list','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','find','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','apps','validation','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','9427890cMWsEU','5054980ORFAcp','88519sfZiIa','bool','length','global','entries','boolean','.\x20Use\x20`','2803473wBncma','6RAqqBT','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','projectConfig','read','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','30100XQaikp','4hjGcHV','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','3465910xkkVwF','object','globalPath','push','\x20in\x20','isCurrent','9378RqbZrO','projectPath','\x20config','No\x20apps\x20configured','10549384VrnbAO','globalConfig','project','map'];a19_0x923d=function(){return _0x53e538;};return a19_0x923d();}function buildMergedItems(_0x221547,_0x3c277b){const _0xc7ce83=a19_0x3a1f,{apps:apps={},defaultApp:_0x36d89d}=_0x221547,_0xdbc963=_0x3c277b[_0xc7ce83(0x13c)][_0xc7ce83(0x146)]&&typeof _0x3c277b[_0xc7ce83(0x13c)][_0xc7ce83(0x146)]===_0xc7ce83(0x132)?_0x3c277b[_0xc7ce83(0x13c)][_0xc7ce83(0x146)]:{},_0x44d072=_0x3c277b[_0xc7ce83(0x12b)]['apps']&&typeof _0x3c277b['projectConfig'][_0xc7ce83(0x146)]==='object'?_0x3c277b[_0xc7ce83(0x12b)][_0xc7ce83(0x146)]:{},_0xa682e2=_0x3c277b[_0xc7ce83(0x12b)]['inherit']===![],_0x75f003=Object['entries'](apps),_0x37e5c0=_0x75f003[_0xc7ce83(0x13e)](([_0x37d736,_0x559914])=>({'name':_0x37d736,'appcode':_0x559914[_0xc7ce83(0x13f)],'named':!![],'definedIn':appDefinedIn(_0x37d736,_0xdbc963,_0x44d072,_0xa682e2),'isDefault':_0x37d736===_0x36d89d,...buildAppProfileListFields(_0x559914)}));return _0x37e5c0;}function validateAppListFlags(_0xc56937){const _0x109a66=a19_0x3a1f;if(!_0xc56937[_0x109a66(0x14d)]('remote'))return;if(!_0xc56937['bool']('global')&&!_0xc56937[_0x109a66(0x14d)](_0x109a66(0x13d)))return;throw CliErrors[_0x109a66(0x147)](_0x109a66(0x12d),_0x109a66(0x149));}async function execute(_0x4e970f){const _0x2a9c55=a19_0x3a1f;validateAppListFlags(_0x4e970f);if(_0x4e970f[_0x2a9c55(0x14d)](_0x2a9c55(0x140)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x4e970f)};const _0x384284=_0x4e970f[_0x2a9c55(0x14d)](_0x2a9c55(0x14f)),_0x472f1a=_0x4e970f[_0x2a9c55(0x14d)](_0x2a9c55(0x13d)),_0x2e999a=_0x384284?_0x2a9c55(0x14f):_0x472f1a?_0x2a9c55(0x13d):'merged',{config:_0x4761b8,layers:_0x219589}=readRawConfigWithLayers(),_0x27777d=resolveDefaultAppSource(_0x219589),{defaultApp:_0x3ff6d9}=_0x4761b8;let _0xb70539,_0x4fefa9;switch(_0x2e999a){case _0x2a9c55(0x14f):_0xb70539=buildItemsFromLayer(_0x219589['globalConfig'],_0x2a9c55(0x14f)),_0x4fefa9=_0x219589[_0x2a9c55(0x133)];break;case _0x2a9c55(0x13d):_0xb70539=buildItemsFromLayer(_0x219589['projectConfig'],_0x2a9c55(0x13d)),_0x4fefa9=_0x219589[_0x2a9c55(0x138)];break;default:_0xb70539=buildMergedItems(_0x4761b8,_0x219589);break;}enrichAppListItemsWithMergedSelection(_0xb70539,_0x4e970f[_0x2a9c55(0x141)]);if(_0xb70539[_0x2a9c55(0x14e)]===0x0){const _0x59c2bc=_0x2e999a==='merged'?'':_0x2a9c55(0x135)+_0x2e999a+_0x2a9c55(0x139);return{'ok':!![],'data':[],'message':_0x2a9c55(0x13a)+_0x59c2bc+_0x2a9c55(0x127)+CLI_BIN_NAME+_0x2a9c55(0x143)};}const _0x493161=_0xb70539[_0x2a9c55(0x144)](_0x4d2003=>_0x4d2003[_0x2a9c55(0x136)]===!![]),_0x521f25=_0x3ff6d9??_0x493161?.[_0x2a9c55(0x13f)]??null,_0x584941=_0x2e999a==='merged'?{'globalPath':_0x219589[_0x2a9c55(0x133)]??null,'projectPath':_0x219589[_0x2a9c55(0x138)]??null,'defaultApp':_0x521f25,'defaultAppSource':_0x3ff6d9!=null?_0x27777d:null}:{'scope':_0x2e999a,'configPath':_0x4fefa9??null};return{'ok':!![],'data':{'items':_0xb70539,'meta':_0x584941}};}export const appListDefinition={'service':'app','command':a19_0x483586(0x142),'description':a19_0x483586(0x12a),'risk':a19_0x483586(0x12c),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'remote','type':a19_0x483586(0x126),'description':a19_0x483586(0x145),'default':![]},{'name':a19_0x483586(0x14f),'type':'boolean','description':a19_0x483586(0x148),'default':![]},{'name':'project','type':a19_0x483586(0x126),'description':a19_0x483586(0x130),'default':![]}],async 'validate'(_0x42dda9){validateAppListFlags(_0x42dda9);},'execute':execute};
1
+ const a20_0x5365a=a20_0x2bdb;(function(_0x2ff658,_0x1152e0){const _0x237d1d=a20_0x2bdb,_0x1e47bf=_0x2ff658();while(!![]){try{const _0x4b01da=parseInt(_0x237d1d(0xb5))/0x1*(-parseInt(_0x237d1d(0xc3))/0x2)+parseInt(_0x237d1d(0xd4))/0x3+parseInt(_0x237d1d(0xd5))/0x4+-parseInt(_0x237d1d(0xc6))/0x5*(-parseInt(_0x237d1d(0xe1))/0x6)+parseInt(_0x237d1d(0xd7))/0x7+-parseInt(_0x237d1d(0xd0))/0x8*(-parseInt(_0x237d1d(0xd6))/0x9)+parseInt(_0x237d1d(0xb3))/0xa*(-parseInt(_0x237d1d(0xbf))/0xb);if(_0x4b01da===_0x1152e0)break;else _0x1e47bf['push'](_0x1e47bf['shift']());}catch(_0x5d50b7){_0x1e47bf['push'](_0x1e47bf['shift']());}}}(a20_0x532f,0xc6e35));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function a20_0x2bdb(_0x4e7099,_0x54da5d){_0x4e7099=_0x4e7099-0xb3;const _0x532f98=a20_0x532f();let _0x2bdb67=_0x532f98[_0x4e7099];return _0x2bdb67;}function buildItemsFromLayer(_0x2da467,_0x518328){const _0x257592=a20_0x2bdb,_0x4581a6=[],_0x1c0e19=_0x2da467[_0x257592(0xdc)]&&typeof _0x2da467[_0x257592(0xdc)]===_0x257592(0xb8)?_0x2da467[_0x257592(0xdc)]:{},_0x2202dc=_0x2da467[_0x257592(0xd8)]||undefined,_0x52a101=_0x2202dc??(Object[_0x257592(0xbc)](_0x1c0e19)[_0x257592(0xc4)]===0x1?Object[_0x257592(0xbc)](_0x1c0e19)[0x0]:undefined);for(const [_0x1d16be,_0xcb662a]of Object[_0x257592(0xc7)](_0x1c0e19)){if(!_0xcb662a||typeof _0xcb662a!=='object'||!_0xcb662a[_0x257592(0xba)])continue;_0x4581a6[_0x257592(0xcf)]({'name':_0x1d16be,'appcode':_0xcb662a[_0x257592(0xba)],'named':!![],'definedIn':_0x518328,'isDefault':_0x1d16be===_0x52a101,...buildAppProfileListFields(_0xcb662a)});}return _0x4581a6;}function buildMergedItems(_0x3a19a1,_0x4c41f4){const _0x2cc579=a20_0x2bdb,{apps:apps={}}=_0x3a19a1,_0x167864=_0x3a19a1[_0x2cc579(0xd8)],_0x1f16b1=_0x167864??(Object['keys'](apps)[_0x2cc579(0xc4)]===0x1?Object[_0x2cc579(0xbc)](apps)[0x0]:undefined),_0x208bed=_0x4c41f4[_0x2cc579(0xb4)][_0x2cc579(0xdc)]&&typeof _0x4c41f4['globalConfig']['apps']===_0x2cc579(0xb8)?_0x4c41f4[_0x2cc579(0xb4)]['apps']:{},_0x59ed53=_0x4c41f4['projectConfig'][_0x2cc579(0xdc)]&&typeof _0x4c41f4[_0x2cc579(0xcc)][_0x2cc579(0xdc)]==='object'?_0x4c41f4[_0x2cc579(0xcc)][_0x2cc579(0xdc)]:{},_0x94fcc7=Object[_0x2cc579(0xc7)](apps),_0x2d2d6a=_0x94fcc7[_0x2cc579(0xda)](([_0x1e8832,_0x26c594])=>({'name':_0x1e8832,'appcode':_0x26c594[_0x2cc579(0xba)],'named':!![],'definedIn':appDefinedIn(_0x1e8832,_0x208bed,_0x59ed53),'isDefault':_0x1e8832===_0x1f16b1,...buildAppProfileListFields(_0x26c594)}));return _0x2d2d6a;}function validateAppListFlags(_0x56ccbe){const _0x36ed3d=a20_0x2bdb;if(!_0x56ccbe[_0x36ed3d(0xd2)](_0x36ed3d(0xc1)))return;if(!_0x56ccbe[_0x36ed3d(0xd2)](_0x36ed3d(0xcd))&&!_0x56ccbe[_0x36ed3d(0xd2)]('project'))return;throw CliErrors[_0x36ed3d(0xca)](_0x36ed3d(0xbe),'Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.');}async function execute(_0x4f28a4){const _0x58d758=a20_0x2bdb;validateAppListFlags(_0x4f28a4);if(_0x4f28a4[_0x58d758(0xd2)](_0x58d758(0xc1)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x4f28a4)};const _0x459323=_0x4f28a4[_0x58d758(0xd2)]('global'),_0x333afd=_0x4f28a4[_0x58d758(0xd2)]('project'),_0x488076=_0x459323?_0x58d758(0xcd):_0x333afd?_0x58d758(0xd9):_0x58d758(0xc9),{config:_0x543415,layers:_0x30f058}=readRawConfigWithLayers(),_0x2d745c=resolveDefaultAppSource(_0x30f058),{defaultApp:_0xcc744b}=_0x543415;let _0x506824,_0x21a6bf;switch(_0x488076){case'global':_0x506824=buildItemsFromLayer(_0x30f058[_0x58d758(0xb4)],'global'),_0x21a6bf=_0x30f058[_0x58d758(0xdb)];break;case _0x58d758(0xd9):_0x506824=buildItemsFromLayer(_0x30f058[_0x58d758(0xcc)],_0x58d758(0xd9)),_0x21a6bf=_0x30f058[_0x58d758(0xdf)];break;default:_0x506824=buildMergedItems(_0x543415,_0x30f058);break;}enrichAppListItemsWithMergedSelection(_0x506824,_0x4f28a4[_0x58d758(0xbb)]);if(_0x506824[_0x58d758(0xc4)]===0x0){const _0x347394=_0x488076==='merged'?'':_0x58d758(0xd1)+_0x488076+_0x58d758(0xbd);return{'ok':!![],'data':[],'message':_0x58d758(0xc2)+_0x347394+_0x58d758(0xdd)+CLI_BIN_NAME+_0x58d758(0xce)};}const _0x30786d=_0x506824['find'](_0x339bb1=>_0x339bb1[_0x58d758(0xe0)]===!![]),_0x4c69fd=_0xcc744b??_0x30786d?.[_0x58d758(0xb6)]??null,_0x144184=_0x488076===_0x58d758(0xc9)?{'globalPath':_0x30f058['globalPath']??null,'projectPath':_0x30f058[_0x58d758(0xdf)]??null,'defaultApp':_0x4c69fd,'defaultAppSource':_0xcc744b!=null?_0x2d745c:null}:{'scope':_0x488076,'configPath':_0x21a6bf??null};return{'ok':!![],'data':{'items':_0x506824,'meta':_0x144184}};}function a20_0x532f(){const _0x1d727d=['4382210GTcDcK','defaultApp','project','map','globalPath','apps','.\x20Use\x20`','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','projectPath','isCurrent','210JGouJz','2170910rNNcQu','globalConfig','127LVxeCg','name','optional','object','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','appcode','mergedCli','keys','\x20config','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','121SuXcbX','list','remote','No\x20apps\x20configured','10186wvRdHW','length','read','6830ZEgohe','entries','boolean','merged','validation','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','projectConfig','global','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','push','40NFXTuv','\x20in\x20','bool','app','3608823fdMPaC','3846964jqaFFh','1819683nCeEDb'];a20_0x532f=function(){return _0x1d727d;};return a20_0x532f();}export const appListDefinition={'service':a20_0x5365a(0xd3),'command':a20_0x5365a(0xc0),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x5365a(0xc5),'auth':a20_0x5365a(0xb7),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x5365a(0xc1),'type':a20_0x5365a(0xc8),'description':a20_0x5365a(0xcb),'default':![]},{'name':a20_0x5365a(0xcd),'type':a20_0x5365a(0xc8),'description':a20_0x5365a(0xde),'default':![]},{'name':a20_0x5365a(0xd9),'type':a20_0x5365a(0xc8),'description':a20_0x5365a(0xb9),'default':![]}],async 'validate'(_0x39d730){validateAppListFlags(_0x39d730);},'execute':execute};
@@ -1 +1 @@
1
- function a20_0x12e9(){const _0x3b0e60=['members-list','1493469QdOwAC','5284937YVoBJy','840SAJKPg','6610612SxSqyD','List\x20application\x20members\x20with\x20their\x20role\x20memberships','20yocnGZ','read','8220399HyheNT','length','9349050AREceb','6JLPSyV','1iXqKzo','app','2522924zNEqQd','\x20application\x20member(s)','93357zRowZW','appCode'];a20_0x12e9=function(){return _0x3b0e60;};return a20_0x12e9();}const a20_0x4a75d4=a20_0x2832;(function(_0x19a63b,_0x33cb8c){const _0x4420bc=a20_0x2832,_0x5dadd0=_0x19a63b();while(!![]){try{const _0x2057bc=parseInt(_0x4420bc(0x1de))/0x1*(parseInt(_0x4420bc(0x1e0))/0x2)+-parseInt(_0x4420bc(0x1e5))/0x3+parseInt(_0x4420bc(0x1e8))/0x4+parseInt(_0x4420bc(0x1ee))/0x5+parseInt(_0x4420bc(0x1ef))/0x6*(-parseInt(_0x4420bc(0x1e6))/0x7)+parseInt(_0x4420bc(0x1e7))/0x8*(-parseInt(_0x4420bc(0x1e2))/0x9)+-parseInt(_0x4420bc(0x1ea))/0xa*(parseInt(_0x4420bc(0x1ec))/0xb);if(_0x2057bc===_0x33cb8c)break;else _0x5dadd0['push'](_0x5dadd0['shift']());}catch(_0x5c0022){_0x5dadd0['push'](_0x5dadd0['shift']());}}}(a20_0x12e9,0xe7480));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a20_0x2832(_0x46958f,_0x2380bc){_0x46958f=_0x46958f-0x1de;const _0x12e950=a20_0x12e9();let _0x28326e=_0x12e950[_0x46958f];return _0x28326e;}import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':a20_0x4a75d4(0x1df),'command':a20_0x4a75d4(0x1e4),'description':a20_0x4a75d4(0x1e9),'risk':a20_0x4a75d4(0x1eb),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x149077){const _0x21ec6c=a20_0x4a75d4,_0x48ba81=projectAppMembers(await listRoleUsers(_0x149077[_0x21ec6c(0x1e3)]));return{'ok':!![],'data':{'appCode':_0x149077['appCode'],'items':_0x48ba81,'totalCount':_0x48ba81[_0x21ec6c(0x1ed)]},'message':'Found\x20'+_0x48ba81[_0x21ec6c(0x1ed)]+_0x21ec6c(0x1e1)};}};
1
+ const a21_0x3e5ad9=a21_0x4e2d;(function(_0x47d07a,_0x5dbbee){const _0x493c73=a21_0x4e2d,_0xf7e116=_0x47d07a();while(!![]){try{const _0x1c5296=parseInt(_0x493c73(0xd7))/0x1+-parseInt(_0x493c73(0xd5))/0x2+parseInt(_0x493c73(0xdf))/0x3+parseInt(_0x493c73(0xd8))/0x4*(parseInt(_0x493c73(0xe3))/0x5)+parseInt(_0x493c73(0xe0))/0x6+parseInt(_0x493c73(0xd9))/0x7*(parseInt(_0x493c73(0xe1))/0x8)+-parseInt(_0x493c73(0xdc))/0x9;if(_0x1c5296===_0x5dbbee)break;else _0xf7e116['push'](_0xf7e116['shift']());}catch(_0x352441){_0xf7e116['push'](_0xf7e116['shift']());}}}(a21_0x355c,0x7adfd));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';function a21_0x4e2d(_0x443e7b,_0x3ff5a7){_0x443e7b=_0x443e7b-0xd5;const _0x355c5d=a21_0x355c();let _0x4e2df2=_0x355c5d[_0x443e7b];return _0x4e2df2;}export const appMembersListDefinition={'service':'app','command':a21_0x3e5ad9(0xda),'description':a21_0x3e5ad9(0xdd),'risk':a21_0x3e5ad9(0xd6),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x244bf9){const _0x35ffea=a21_0x3e5ad9,_0x51d574=projectAppMembers(await listRoleUsers(_0x244bf9['appCode']));return{'ok':!![],'data':{'appCode':_0x244bf9['appCode'],'items':_0x51d574,'totalCount':_0x51d574[_0x35ffea(0xde)]},'message':_0x35ffea(0xdb)+_0x51d574[_0x35ffea(0xde)]+_0x35ffea(0xe2)};}};function a21_0x355c(){const _0x490387=['4BrjTBv','434IJDKvb','members-list','Found\x20','27525159qjtzmS','List\x20application\x20members\x20with\x20their\x20role\x20memberships','length','1853988GIwRJg','5881752dJcZdk','49352ftTnwT','\x20application\x20member(s)','4502885qZoHGf','537236btbtRF','read','948919AYmrua'];a21_0x355c=function(){return _0x490387;};return a21_0x355c();}
@@ -1 +1 @@
1
- (function(_0x48df8a,_0x3849f6){const _0x2b3f4d=a21_0x3cf1,_0x1e1a41=_0x48df8a();while(!![]){try{const _0x5e7a6e=-parseInt(_0x2b3f4d(0x13b))/0x1*(parseInt(_0x2b3f4d(0x142))/0x2)+-parseInt(_0x2b3f4d(0x13d))/0x3*(parseInt(_0x2b3f4d(0x136))/0x4)+parseInt(_0x2b3f4d(0x13e))/0x5+-parseInt(_0x2b3f4d(0x141))/0x6*(parseInt(_0x2b3f4d(0x13c))/0x7)+-parseInt(_0x2b3f4d(0x140))/0x8+-parseInt(_0x2b3f4d(0x139))/0x9*(-parseInt(_0x2b3f4d(0x135))/0xa)+parseInt(_0x2b3f4d(0x134))/0xb*(parseInt(_0x2b3f4d(0x137))/0xc);if(_0x5e7a6e===_0x3849f6)break;else _0x1e1a41['push'](_0x1e1a41['shift']());}catch(_0x3d6ab4){_0x1e1a41['push'](_0x1e1a41['shift']());}}}(a21_0x44d5,0x2bd30));function a21_0x44d5(){const _0xc02e90=['982528gzEyDl','138wklVsq','51978wagKKU','authRequired','682374GmloFS','10smAlpq','9188dBFEMr','156mPSWOH','appName','1169928fsooBW','appCode','6fXnUKa','105623fqNOsU','255CaNRzF','320560YwWRij','appDesc'];a21_0x44d5=function(){return _0xc02e90;};return a21_0x44d5();}function a21_0x3cf1(_0x3ba9e6,_0x3ff24f){_0x3ba9e6=_0x3ba9e6-0x133;const _0x44d595=a21_0x44d5();let _0x3cf115=_0x44d595[_0x3ba9e6];return _0x3cf115;}import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x5828a2){const _0x20c6a3=a21_0x3cf1,_0x9c0142=_0x5828a2['cookie']||getCookie();if(!_0x9c0142)throw CliErrors[_0x20c6a3(0x133)]();return _0x9c0142;}export async function listRemoteAppDirectory(_0x15f43e){const _0x26214b=a21_0x3cf1,_0x3df3cb=await withActiveCookie(resolveCookie(_0x15f43e),()=>listRemoteApps());return{'items':_0x3df3cb['map'](_0x52fd96=>({..._0x52fd96['id']!=null?{'id':_0x52fd96['id']}:{},'appCode':_0x52fd96[_0x26214b(0x13a)],'appName':_0x52fd96[_0x26214b(0x138)],..._0x52fd96[_0x26214b(0x13f)]!=null?{'appDesc':_0x52fd96[_0x26214b(0x13f)]}:{}})),'meta':{'source':'platform'}};}
1
+ (function(_0xc0e91a,_0x5f4ee7){const _0x3e641b=a22_0x2977,_0x24c3a0=_0xc0e91a();while(!![]){try{const _0x45d5a1=parseInt(_0x3e641b(0x8f))/0x1*(-parseInt(_0x3e641b(0x93))/0x2)+-parseInt(_0x3e641b(0x90))/0x3+-parseInt(_0x3e641b(0x8d))/0x4+parseInt(_0x3e641b(0x87))/0x5*(parseInt(_0x3e641b(0x84))/0x6)+-parseInt(_0x3e641b(0x8b))/0x7+-parseInt(_0x3e641b(0x85))/0x8*(parseInt(_0x3e641b(0x91))/0x9)+parseInt(_0x3e641b(0x86))/0xa;if(_0x45d5a1===_0x5f4ee7)break;else _0x24c3a0['push'](_0x24c3a0['shift']());}catch(_0x1c42da){_0x24c3a0['push'](_0x24c3a0['shift']());}}}(a22_0x53c9,0xd0ed3));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a22_0x53c9(){const _0x414c59=['46778300YzYHjf','535HUAbIM','authRequired','appCode','cookie','2824703uvxIiH','appDesc','3437476wXINsP','map','315089aZUSsp','4395069fjpBzm','198MPpuOG','appName','6jyElPa','platform','67242llJkBb','490192wswgAr'];a22_0x53c9=function(){return _0x414c59;};return a22_0x53c9();}import{withActiveCookie}from'../../utils/with-active-cookie.js';function a22_0x2977(_0x46a4ca,_0x4b8a30){_0x46a4ca=_0x46a4ca-0x84;const _0x53c988=a22_0x53c9();let _0x2977a3=_0x53c988[_0x46a4ca];return _0x2977a3;}function resolveCookie(_0x3f4d19){const _0x430a25=a22_0x2977,_0x159e49=_0x3f4d19[_0x430a25(0x8a)]||getCookie();if(!_0x159e49)throw CliErrors[_0x430a25(0x88)]();return _0x159e49;}export async function listRemoteAppDirectory(_0x3c8181){const _0x161fc8=a22_0x2977,_0x41f623=await withActiveCookie(resolveCookie(_0x3c8181),()=>listRemoteApps());return{'items':_0x41f623[_0x161fc8(0x8e)](_0x22c33e=>({..._0x22c33e['id']!=null?{'id':_0x22c33e['id']}:{},'appCode':_0x22c33e[_0x161fc8(0x89)],'appName':_0x22c33e[_0x161fc8(0x92)],..._0x22c33e[_0x161fc8(0x8c)]!=null?{'appDesc':_0x22c33e[_0x161fc8(0x8c)]}:{}})),'meta':{'source':_0x161fc8(0x94)}};}
@@ -30,11 +30,8 @@ export declare function enrichAppListItemsWithMergedSelection(items: Record<stri
30
30
  * --global 为 true 时始终写全局;否则项目 apps 含该名 → 项目优先;否则仅全局含该名 → 全局。
31
31
  */
32
32
  export declare function resolveAppScopeForWrite(name: string, explicitGlobal: boolean, layers: RawConfigLayers): "project" | "global";
33
- /**
34
- * app 定义在哪一层配置文件中。
35
- * `ignoreGlobalMerge`:项目 `inherit: false` 时传 `true`,不把全局 apps 参与「both」判定。
36
- */
37
- export declare function appDefinedIn(name: string, globalApps: Record<string, unknown>, projectApps: Record<string, unknown>, ignoreGlobalMerge?: boolean): "global" | "project" | "both";
33
+ /** app 定义在哪一层配置文件中。 */
34
+ export declare function appDefinedIn(name: string, globalApps: Record<string, unknown>, projectApps: Record<string, unknown>): "global" | "project" | "both";
38
35
  /**
39
36
  * defaultApp 解析来源:与 mergeRawConfigLayers 中 defaultApp 策略一致。
40
37
  * 供 app list / workspace use 标注写盘位置参考。
@@ -1 +1 @@
1
- (function(_0x5e7003,_0x5a763f){const _0x3bb882=a22_0x2e29,_0x3bb77e=_0x5e7003();while(!![]){try{const _0x5d7aae=parseInt(_0x3bb882(0x9b))/0x1+parseInt(_0x3bb882(0x79))/0x2+parseInt(_0x3bb882(0x91))/0x3+parseInt(_0x3bb882(0x94))/0x4*(parseInt(_0x3bb882(0x7e))/0x5)+-parseInt(_0x3bb882(0x77))/0x6*(-parseInt(_0x3bb882(0x7f))/0x7)+-parseInt(_0x3bb882(0x90))/0x8+-parseInt(_0x3bb882(0x9a))/0x9*(parseInt(_0x3bb882(0x92))/0xa);if(_0x5d7aae===_0x5a763f)break;else _0x3bb77e['push'](_0x3bb77e['shift']());}catch(_0x58610c){_0x3bb77e['push'](_0x3bb77e['shift']());}}}(a22_0x819a,0x7d83b));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x1aed6c){const _0x32cc72=a22_0x2e29,_0x5f2bfe=_0x1aed6c?.[_0x32cc72(0x89)]();return _0x5f2bfe?_0x5f2bfe:null;}export function projectAppMembers(_0x4d472c){const _0x39f4cb=a22_0x2e29,_0x44307d=new Map(),_0x591674=[..._0x4d472c][_0x39f4cb(0x78)]((_0x26ca11,_0x472c4b)=>_0x26ca11['id']-_0x472c4b['id']),_0x1f9b5e=(_0x4bebae,_0x1f23ee,_0xcf0414)=>{const _0x226954=_0x39f4cb;for(const _0x5b1bd8 of _0x1f23ee){const _0x534ef4=Number(_0x5b1bd8[_0x226954(0x8c)]);if(!Number['isFinite'](_0x534ef4)||_0x534ef4<=0x0)continue;let _0x39277c=_0x44307d[_0x226954(0x99)](_0x534ef4);if(!_0x39277c)_0x39277c={'userId':_0x534ef4,'username':nullableText(_0x5b1bd8['username']),'displayName':nullableText(_0x5b1bd8[_0x226954(0x93)]),'status':_0xcf0414,'roles':[],'roleKeys':new Set()},_0x44307d[_0x226954(0x74)](_0x534ef4,_0x39277c);else{_0x39277c['username']??=nullableText(_0x5b1bd8['username']),_0x39277c[_0x226954(0x88)]??=nullableText(_0x5b1bd8[_0x226954(0x93)]);if(_0xcf0414===_0x226954(0x7b))_0x39277c['status']=_0x226954(0x7b);}const _0x568786=_0x4bebae['id']+':'+_0xcf0414;if(_0x39277c[_0x226954(0x80)][_0x226954(0xa1)](_0x568786))continue;_0x39277c[_0x226954(0x80)]['add'](_0x568786),_0x39277c[_0x226954(0x7c)][_0x226954(0x82)]({'roleId':_0x4bebae['id'],'roleName':nullableText(_0x4bebae[_0x226954(0x8b)]),'roleType':nullableText(_0x4bebae[_0x226954(0x8f)]),'membershipStatus':_0xcf0414});}};for(const _0x48b73c of _0x591674){_0x1f9b5e(_0x48b73c,_0x48b73c[_0x39f4cb(0x97)]??[],'ACTIVE'),_0x1f9b5e(_0x48b73c,_0x48b73c[_0x39f4cb(0x8e)]??[],'PENDING');}return[..._0x44307d['values']()][_0x39f4cb(0x84)](_0x505ad9=>({'userId':_0x505ad9['userId'],'username':_0x505ad9[_0x39f4cb(0xa0)],'displayName':_0x505ad9['displayName'],'status':_0x505ad9[_0x39f4cb(0xa3)],'roles':_0x505ad9[_0x39f4cb(0x7c)][_0x39f4cb(0x78)]((_0x47832a,_0x437e99)=>_0x47832a[_0x39f4cb(0x73)]-_0x437e99[_0x39f4cb(0x73)]||(_0x47832a[_0x39f4cb(0x9e)]===_0x437e99[_0x39f4cb(0x9e)]?0x0:_0x47832a[_0x39f4cb(0x9e)]===_0x39f4cb(0x7b)?-0x1:0x1))}))[_0x39f4cb(0x78)]((_0x166e01,_0x31b4a3)=>_0x166e01[_0x39f4cb(0x8c)]-_0x31b4a3['userId']);}export function enrichAppListItemsWithMergedSelection(_0x565fe1,_0x526fea){const _0x342bd6=a22_0x2e29;if(!_0x526fea)return;const _0x380e8e=_0x526fea[_0x342bd6(0x98)]&&typeof _0x526fea[_0x342bd6(0x98)]===_0x342bd6(0x86)?_0x526fea[_0x342bd6(0x98)]:{},_0x1fced4=Object[_0x342bd6(0x96)](_0x380e8e)['length']>0x0;for(const _0x2f0452 of _0x565fe1){_0x2f0452[_0x342bd6(0x7a)]=![];}const _0x568c30=_0x526fea[_0x342bd6(0xa2)]!=null?String(_0x526fea[_0x342bd6(0xa2)])[_0x342bd6(0x89)]():'';if(_0x1fced4){const _0x2989e2=_0x526fea[_0x342bd6(0x76)]??_0x526fea[_0x342bd6(0x8a)];if(_0x2989e2)for(const _0x8a077 of _0x565fe1){_0x8a077[_0x342bd6(0xa4)]===!![]&&_0x8a077['name']===_0x2989e2&&(_0x8a077[_0x342bd6(0x7a)]=!![]);}for(const _0x383436 of _0x565fe1){if(_0x383436['named']!==![])continue;if(_0x526fea[_0x342bd6(0x8a)])continue;_0x568c30&&String(_0x383436['appcode']??'')[_0x342bd6(0x89)]()===_0x568c30&&(_0x383436[_0x342bd6(0x7a)]=!![]);}return;}if(!_0x568c30)return;for(const _0x27507c of _0x565fe1){String(_0x27507c['appcode']??'')[_0x342bd6(0x89)]()===_0x568c30&&(_0x27507c[_0x342bd6(0x7a)]=!![]);}}function a22_0x819a(){const _0x49407c=['projectConfig','username','has','appCode','status','named','roleId','set','inherit','currentApp','5273076sEadyJ','sort','269378EJXJvO','isCurrent','ACTIVE','roles','call','70RadKsN','7KATIcF','roleKeys','project','push','globalConfig','map','prototype','object','both','displayName','trim','defaultApp','roleName','userId','hasOwnProperty','applyUserList','roleType','7798152fPVfIf','1259547bFYecN','294740xGddEt','nickname','140540izHcIb','\x20(global)','keys','userList','apps','get','153kppwQb','64660poUUpH','global','length','membershipStatus'];a22_0x819a=function(){return _0x49407c;};return a22_0x819a();}function a22_0x2e29(_0x43b309,_0x235aa8){_0x43b309=_0x43b309-0x73;const _0x819a79=a22_0x819a();let _0x2e295c=_0x819a79[_0x43b309];return _0x2e295c;}export function resolveAppScopeForWrite(_0x1aa0a6,_0x12b1cc,_0x2d1a04){const _0x3a4a9c=a22_0x2e29;if(_0x12b1cc)return _0x3a4a9c(0x9c);const _0x3d9b95=_0x2d1a04[_0x3a4a9c(0x9f)][_0x3a4a9c(0x98)]&&typeof _0x2d1a04[_0x3a4a9c(0x9f)][_0x3a4a9c(0x98)]===_0x3a4a9c(0x86)?_0x2d1a04[_0x3a4a9c(0x9f)][_0x3a4a9c(0x98)]:{},_0x124559=_0x2d1a04[_0x3a4a9c(0x83)]['apps']&&typeof _0x2d1a04[_0x3a4a9c(0x83)][_0x3a4a9c(0x98)]===_0x3a4a9c(0x86)?_0x2d1a04[_0x3a4a9c(0x83)][_0x3a4a9c(0x98)]:{};if(Object[_0x3a4a9c(0x85)][_0x3a4a9c(0x8d)][_0x3a4a9c(0x7d)](_0x3d9b95,_0x1aa0a6))return'project';if(Object[_0x3a4a9c(0x85)][_0x3a4a9c(0x8d)][_0x3a4a9c(0x7d)](_0x124559,_0x1aa0a6))return _0x3a4a9c(0x9c);return _0x3a4a9c(0x81);}export function appDefinedIn(_0x940b8f,_0x5f2477,_0x180bd8,_0x362dd0){const _0x181c97=a22_0x2e29;if(_0x362dd0)return Object[_0x181c97(0x85)][_0x181c97(0x8d)][_0x181c97(0x7d)](_0x180bd8,_0x940b8f)?'project':_0x181c97(0x9c);const _0x67713d=Object[_0x181c97(0x85)][_0x181c97(0x8d)][_0x181c97(0x7d)](_0x5f2477,_0x940b8f),_0x1f53b7=Object['prototype'][_0x181c97(0x8d)][_0x181c97(0x7d)](_0x180bd8,_0x940b8f);if(_0x67713d&&_0x1f53b7)return _0x181c97(0x87);if(_0x1f53b7)return'project';return'global';}export function resolveDefaultAppSource(_0x385b9){const _0x296814=a22_0x2e29,_0x30fe74=_0x385b9[_0x296814(0x9f)][_0x296814(0x98)]&&typeof _0x385b9['projectConfig'][_0x296814(0x98)]===_0x296814(0x86)?_0x385b9['projectConfig'][_0x296814(0x98)]:{};if(_0x296814(0x8a)in _0x385b9['projectConfig'])return _0x296814(0x81);if(Object['keys'](_0x30fe74)[_0x296814(0x9d)]>0x0)return _0x296814(0x81);if(_0x385b9[_0x296814(0x9f)][_0x296814(0x75)]===![])return null;if(_0x385b9[_0x296814(0x83)][_0x296814(0x8a)])return _0x296814(0x9c);return null;}export function getConfigPath(_0x24b9ef={}){const _0x5e8ea7=a22_0x2e29,_0x14ee7f=_0x24b9ef[_0x5e8ea7(0x9c)]?_0x5e8ea7(0x9c):'project';return resolveWriteConfigPath(_0x14ee7f);}export function readConfig(_0x5437fb={}){return readConfigFile(getConfigPath(_0x5437fb));}export function writeConfig(_0x419942,_0x3055cf={}){writeConfigFile(getConfigPath(_0x3055cf),_0x419942);}export function scopeLabel(_0x5ac5c3){const _0x454403=a22_0x2e29;return _0x5ac5c3['global']?_0x454403(0x95):'';}
1
+ (function(_0x55d744,_0x346f8e){const _0x3e9b07=a23_0x1d12,_0x2f5c43=_0x55d744();while(!![]){try{const _0x1b2988=-parseInt(_0x3e9b07(0x143))/0x1+-parseInt(_0x3e9b07(0x128))/0x2+parseInt(_0x3e9b07(0x124))/0x3*(-parseInt(_0x3e9b07(0x141))/0x4)+-parseInt(_0x3e9b07(0x130))/0x5*(parseInt(_0x3e9b07(0x14c))/0x6)+-parseInt(_0x3e9b07(0x13f))/0x7+parseInt(_0x3e9b07(0x14b))/0x8*(-parseInt(_0x3e9b07(0x11f))/0x9)+-parseInt(_0x3e9b07(0x137))/0xa*(-parseInt(_0x3e9b07(0x122))/0xb);if(_0x1b2988===_0x346f8e)break;else _0x2f5c43['push'](_0x2f5c43['shift']());}catch(_0xc11861){_0x2f5c43['push'](_0x2f5c43['shift']());}}}(a23_0x1b14,0xacf42));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x27b080){const _0x48ab17=a23_0x1d12,_0x5e0001=_0x27b080?.[_0x48ab17(0x12e)]();return _0x5e0001?_0x5e0001:null;}export function projectAppMembers(_0x4c1585){const _0x441289=a23_0x1d12,_0x11c340=new Map(),_0x44e30d=[..._0x4c1585][_0x441289(0x142)]((_0x21cc52,_0x1616e7)=>_0x21cc52['id']-_0x1616e7['id']),_0x1cb44c=(_0x9bb71d,_0x361481,_0x192a33)=>{const _0x51196f=_0x441289;for(const _0x1ffa42 of _0x361481){const _0x521502=Number(_0x1ffa42[_0x51196f(0x12f)]);if(!Number[_0x51196f(0x13e)](_0x521502)||_0x521502<=0x0)continue;let _0x4d0693=_0x11c340[_0x51196f(0x11c)](_0x521502);if(!_0x4d0693)_0x4d0693={'userId':_0x521502,'username':nullableText(_0x1ffa42[_0x51196f(0x12d)]),'displayName':nullableText(_0x1ffa42[_0x51196f(0x12c)]),'status':_0x192a33,'roles':[],'roleKeys':new Set()},_0x11c340[_0x51196f(0x12a)](_0x521502,_0x4d0693);else{_0x4d0693[_0x51196f(0x12d)]??=nullableText(_0x1ffa42['username']),_0x4d0693[_0x51196f(0x147)]??=nullableText(_0x1ffa42[_0x51196f(0x12c)]);if(_0x192a33==='ACTIVE')_0x4d0693[_0x51196f(0x131)]=_0x51196f(0x13d);}const _0x1db847=_0x9bb71d['id']+':'+_0x192a33;if(_0x4d0693['roleKeys'][_0x51196f(0x148)](_0x1db847))continue;_0x4d0693[_0x51196f(0x134)]['add'](_0x1db847),_0x4d0693['roles'][_0x51196f(0x135)]({'roleId':_0x9bb71d['id'],'roleName':nullableText(_0x9bb71d[_0x51196f(0x129)]),'roleType':nullableText(_0x9bb71d['roleType']),'membershipStatus':_0x192a33});}};for(const _0x1bf038 of _0x44e30d){_0x1cb44c(_0x1bf038,_0x1bf038[_0x441289(0x11b)]??[],_0x441289(0x13d)),_0x1cb44c(_0x1bf038,_0x1bf038[_0x441289(0x140)]??[],_0x441289(0x138));}return[..._0x11c340[_0x441289(0x145)]()]['map'](_0x2c5965=>({'userId':_0x2c5965[_0x441289(0x12f)],'username':_0x2c5965['username'],'displayName':_0x2c5965[_0x441289(0x147)],'status':_0x2c5965['status'],'roles':_0x2c5965[_0x441289(0x11d)][_0x441289(0x142)]((_0x319fe4,_0x1d5539)=>_0x319fe4[_0x441289(0x139)]-_0x1d5539[_0x441289(0x139)]||(_0x319fe4[_0x441289(0x123)]===_0x1d5539['membershipStatus']?0x0:_0x319fe4[_0x441289(0x123)]==='ACTIVE'?-0x1:0x1))}))[_0x441289(0x142)]((_0x215f3c,_0x4cdcb6)=>_0x215f3c[_0x441289(0x12f)]-_0x4cdcb6[_0x441289(0x12f)]);}export function enrichAppListItemsWithMergedSelection(_0xa897a,_0x50370d){const _0x2e3ebe=a23_0x1d12;if(!_0x50370d)return;const _0xa16bba=_0x50370d[_0x2e3ebe(0x13b)]&&typeof _0x50370d[_0x2e3ebe(0x13b)]===_0x2e3ebe(0x11a)?_0x50370d['apps']:{},_0x49644f=Object[_0x2e3ebe(0x11e)](_0xa16bba)[_0x2e3ebe(0x14a)]>0x0;for(const _0x1f4305 of _0xa897a){_0x1f4305['isCurrent']=![];}const _0x272fd5=_0x50370d[_0x2e3ebe(0x144)]!=null?String(_0x50370d['appCode'])[_0x2e3ebe(0x12e)]():'';if(_0x49644f){const _0x29a962=_0x50370d['currentApp']??_0x50370d[_0x2e3ebe(0x133)];if(_0x29a962)for(const _0x284b of _0xa897a){_0x284b[_0x2e3ebe(0x149)]===!![]&&_0x284b[_0x2e3ebe(0x132)]===_0x29a962&&(_0x284b['isCurrent']=!![]);}for(const _0x1b4115 of _0xa897a){if(_0x1b4115[_0x2e3ebe(0x149)]!==![])continue;if(_0x50370d[_0x2e3ebe(0x133)])continue;_0x272fd5&&String(_0x1b4115[_0x2e3ebe(0x120)]??'')['trim']()===_0x272fd5&&(_0x1b4115[_0x2e3ebe(0x121)]=!![]);}return;}if(!_0x272fd5)return;for(const _0x65ec25 of _0xa897a){String(_0x65ec25[_0x2e3ebe(0x120)]??'')[_0x2e3ebe(0x12e)]()===_0x272fd5&&(_0x65ec25[_0x2e3ebe(0x121)]=!![]);}}export function resolveAppScopeForWrite(_0x5b69d4,_0x2948e6,_0x4ac00d){const _0x46829f=a23_0x1d12;if(_0x2948e6)return _0x46829f(0x13c);const _0x5ee689=_0x4ac00d[_0x46829f(0x146)]['apps']&&typeof _0x4ac00d[_0x46829f(0x146)]['apps']===_0x46829f(0x11a)?_0x4ac00d[_0x46829f(0x146)][_0x46829f(0x13b)]:{},_0x4ffc3d=_0x4ac00d['globalConfig'][_0x46829f(0x13b)]&&typeof _0x4ac00d[_0x46829f(0x125)][_0x46829f(0x13b)]===_0x46829f(0x11a)?_0x4ac00d['globalConfig']['apps']:{};if(Object[_0x46829f(0x13a)][_0x46829f(0x127)][_0x46829f(0x136)](_0x5ee689,_0x5b69d4))return'project';if(Object[_0x46829f(0x13a)]['hasOwnProperty']['call'](_0x4ffc3d,_0x5b69d4))return _0x46829f(0x13c);return'project';}function a23_0x1b14(){const _0x18eca2=['\x20(global)','object','userList','get','roles','keys','18bnvMsF','appcode','isCurrent','66BUFadk','membershipStatus','6atGyJT','globalConfig','project','hasOwnProperty','2292058DstkzP','roleName','set','both','nickname','username','trim','userId','5665ZLoqpV','status','name','defaultApp','roleKeys','push','call','6234270QvUIqT','PENDING','roleId','prototype','apps','global','ACTIVE','isFinite','2255001NJtydu','applyUserList','613628pibsOx','sort','85307TGRnUl','appCode','values','projectConfig','displayName','has','named','length','1320128fIbJGN','4458MtSxsc'];a23_0x1b14=function(){return _0x18eca2;};return a23_0x1b14();}export function appDefinedIn(_0x8e9ac5,_0x47aee9,_0x4d9fd6){const _0x4e9a3f=a23_0x1d12,_0x3936a6=Object[_0x4e9a3f(0x13a)]['hasOwnProperty'][_0x4e9a3f(0x136)](_0x47aee9,_0x8e9ac5),_0x333ac2=Object['prototype']['hasOwnProperty'][_0x4e9a3f(0x136)](_0x4d9fd6,_0x8e9ac5);if(_0x3936a6&&_0x333ac2)return _0x4e9a3f(0x12b);if(_0x333ac2)return _0x4e9a3f(0x126);return _0x4e9a3f(0x13c);}export function resolveDefaultAppSource(_0xe5b02a){const _0x461a36=a23_0x1d12,_0x16af4e=_0xe5b02a['projectConfig'][_0x461a36(0x13b)]&&typeof _0xe5b02a['projectConfig'][_0x461a36(0x13b)]===_0x461a36(0x11a)?_0xe5b02a[_0x461a36(0x146)][_0x461a36(0x13b)]:{};if('defaultApp'in _0xe5b02a[_0x461a36(0x146)])return _0x461a36(0x126);if(Object[_0x461a36(0x11e)](_0x16af4e)['length']>0x0)return _0x461a36(0x126);if(Object['keys'](_0xe5b02a['projectConfig'])[_0x461a36(0x14a)]===0x0&&_0xe5b02a['globalConfig']['defaultApp'])return _0x461a36(0x13c);return null;}export function getConfigPath(_0x4b7d49={}){const _0x18feb3=a23_0x1d12,_0x79aac6=_0x4b7d49['global']?_0x18feb3(0x13c):_0x18feb3(0x126);return resolveWriteConfigPath(_0x79aac6);}export function readConfig(_0x25fe4e={}){return readConfigFile(getConfigPath(_0x25fe4e));}function a23_0x1d12(_0xd37ff3,_0x598eb9){_0xd37ff3=_0xd37ff3-0x119;const _0x1b1439=a23_0x1b14();let _0x1d121b=_0x1b1439[_0xd37ff3];return _0x1d121b;}export function writeConfig(_0x2b4f3b,_0x22cbf7={}){writeConfigFile(getConfigPath(_0x22cbf7),_0x2b4f3b);}export function scopeLabel(_0x1a67f1){const _0x23d055=a23_0x1d12;return _0x1a67f1[_0x23d055(0x13c)]?_0x23d055(0x119):'';}
@@ -1 +1 @@
1
- const a23_0x325e0f=a23_0x58cb;(function(_0xec47e9,_0x254cf0){const _0x4ad3c2=a23_0x58cb,_0x50a7bb=_0xec47e9();while(!![]){try{const _0x3af054=-parseInt(_0x4ad3c2(0x11c))/0x1*(-parseInt(_0x4ad3c2(0x116))/0x2)+-parseInt(_0x4ad3c2(0x108))/0x3+parseInt(_0x4ad3c2(0x10e))/0x4*(parseInt(_0x4ad3c2(0x109))/0x5)+parseInt(_0x4ad3c2(0x114))/0x6*(parseInt(_0x4ad3c2(0x10c))/0x7)+-parseInt(_0x4ad3c2(0x117))/0x8+parseInt(_0x4ad3c2(0x107))/0x9*(-parseInt(_0x4ad3c2(0x105))/0xa)+-parseInt(_0x4ad3c2(0x110))/0xb*(-parseInt(_0x4ad3c2(0x11b))/0xc);if(_0x3af054===_0x254cf0)break;else _0x50a7bb['push'](_0x50a7bb['shift']());}catch(_0x3bc429){_0x50a7bb['push'](_0x50a7bb['shift']());}}}(a23_0x4807,0x6dc2e));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a23_0x325e0f(0x115);export const appConfigDelete={'service':'app-config','command':a23_0x325e0f(0x104),'description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':a23_0x325e0f(0x10a),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x7d447d){readKeyArg(_0x7d447d);},async 'dryRun'(_0x5d0baa){const _0x4f2a9e=a23_0x325e0f,_0x217d3b=readKeyArg(_0x5d0baa),_0x2accdf=await mustGetByKey(_0x5d0baa['appCode'],_0x217d3b);return asAppConfigDryRunResult(buildMutationData({'operation':'delete','appCode':_0x5d0baa[_0x4f2a9e(0x10b)],'key':_0x217d3b,'before':projectAppConfig(_0x2accdf),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x5ba6e5){const _0x1921fe=a23_0x325e0f,_0x244bb8=readKeyArg(_0x5ba6e5),_0x3bde6d=await mustGetByKey(_0x5ba6e5[_0x1921fe(0x10b)],_0x244bb8);return await withAppConfigApiBoundary(_0x1921fe(0x104),{'appCode':_0x5ba6e5['appCode'],'key':_0x244bb8},()=>deleteAppConfig({'appCode':_0x5ba6e5[_0x1921fe(0x10b)],'id':requireAppConfigId(_0x3bde6d,_0x244bb8,_0x5ba6e5[_0x1921fe(0x10b)])})),{'ok':!![],'data':buildMutationData({'operation':_0x1921fe(0x104),'appCode':_0x5ba6e5['appCode'],'key':_0x244bb8,'before':projectAppConfig(_0x3bde6d),'after':null,'dryRun':![]}),'message':_0x1921fe(0x119)+_0x244bb8};}};function a23_0x4807(){const _0x2f5050=['App\x20config\x20server\x20id\x20missing\x20for\x20key=','3476484DgHZhn','appCode:\x20','number',',\x20appCode=','2867694yMnTXL','/smartapi/app-config/delete','106lMGtsj','6288824BOhCMf','apiError','Deleted\x20app\x20config\x20','App\x20config\x20key\x20not\x20found:\x20','36FBYZOs','11101AUYZRA','delete','40JeNHAE','isFinite','1518174uXdrXt','2352534PoNpzR','261605gCFKjG','high-risk-write','appCode','7epOUyu','validation','52dsMteq'];a23_0x4807=function(){return _0x2f5050;};return a23_0x4807();}function a23_0x58cb(_0x56150b,_0x3b1b6e){_0x56150b=_0x56150b-0x104;const _0x480790=a23_0x4807();let _0x58cb10=_0x480790[_0x56150b];return _0x58cb10;}async function mustGetByKey(_0x3b3204,_0x2a4afe){const _0x148b66=a23_0x325e0f,_0x5b3c66=await withAppConfigApiBoundary('get',{'appCode':_0x3b3204,'key':_0x2a4afe},()=>getAppConfigByKey(_0x3b3204,_0x2a4afe));if(!_0x5b3c66)throw CliErrors[_0x148b66(0x10d)](_0x148b66(0x11a)+_0x2a4afe,_0x148b66(0x111)+_0x3b3204);return _0x5b3c66;}function requireAppConfigId(_0xa64bd0,_0x573444,_0x5a0d73){const _0x128a3c=a23_0x325e0f;if(typeof _0xa64bd0['id']===_0x128a3c(0x112)&&Number[_0x128a3c(0x106)](_0xa64bd0['id'])&&_0xa64bd0['id']>0x0)return _0xa64bd0['id'];throw CliErrors[_0x128a3c(0x118)](_0x128a3c(0x10f)+_0x573444+_0x128a3c(0x113)+_0x5a0d73);}
1
+ function a24_0x2e18(){const _0x22dc74=['2148564HuDYgG','Deleted\x20app\x20config\x20','get','7202tGsImK','POST','63riikjw','Delete\x20one\x20runtime\x20app-config\x20key','validation','729824JwShUz','apiError','14562uKzkng','isFinite','appCode','504RfTIeo','/smartapi/app-config/delete','147256jKqdWR','24438TXthxS','2336ftNGkh','App\x20config\x20key\x20not\x20found:\x20','number','delete','11574FQRXNy','20RKlXsv','38340FawPGF',',\x20appCode=','App\x20config\x20server\x20id\x20missing\x20for\x20key=','10rBjfIx'];a24_0x2e18=function(){return _0x22dc74;};return a24_0x2e18();}const a24_0x466d4d=a24_0x37e1;(function(_0xfdcfe8,_0x5ac494){const _0x2e7dcb=a24_0x37e1,_0x1118a3=_0xfdcfe8();while(!![]){try{const _0x556ac1=parseInt(_0x2e7dcb(0x15e))/0x1+parseInt(_0x2e7dcb(0x15f))/0x2*(-parseInt(_0x2e7dcb(0x16f))/0x3)+-parseInt(_0x2e7dcb(0x172))/0x4*(parseInt(_0x2e7dcb(0x169))/0x5)+parseInt(_0x2e7dcb(0x164))/0x6*(-parseInt(_0x2e7dcb(0x15c))/0x7)+-parseInt(_0x2e7dcb(0x160))/0x8*(parseInt(_0x2e7dcb(0x174))/0x9)+-parseInt(_0x2e7dcb(0x165))/0xa*(parseInt(_0x2e7dcb(0x16a))/0xb)+parseInt(_0x2e7dcb(0x166))/0xc*(parseInt(_0x2e7dcb(0x16d))/0xd);if(_0x556ac1===_0x5ac494)break;else _0x1118a3['push'](_0x1118a3['shift']());}catch(_0x43ecc8){_0x1118a3['push'](_0x1118a3['shift']());}}}(a24_0x2e18,0x47b97));function a24_0x37e1(_0xe63a5c,_0x4c9037){_0xe63a5c=_0xe63a5c-0x15c;const _0x2e186f=a24_0x2e18();let _0x37e179=_0x2e186f[_0xe63a5c];return _0x37e179;}import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x466d4d(0x15d);export const appConfigDelete={'service':'app-config','command':a24_0x466d4d(0x163),'description':a24_0x466d4d(0x170),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x14f9ab){readKeyArg(_0x14f9ab);},async 'dryRun'(_0x2ba5b8){const _0x332d72=a24_0x466d4d,_0x1e754c=readKeyArg(_0x2ba5b8),_0x58379f=await mustGetByKey(_0x2ba5b8[_0x332d72(0x176)],_0x1e754c);return asAppConfigDryRunResult(buildMutationData({'operation':_0x332d72(0x163),'appCode':_0x2ba5b8['appCode'],'key':_0x1e754c,'before':projectAppConfig(_0x58379f),'after':null,'dryRun':!![]}),{'method':_0x332d72(0x16e),'url':DELETE_PATH});},async 'execute'(_0x3637ea){const _0x377a98=a24_0x466d4d,_0x2daa2a=readKeyArg(_0x3637ea),_0x3eff1b=await mustGetByKey(_0x3637ea['appCode'],_0x2daa2a);return await withAppConfigApiBoundary(_0x377a98(0x163),{'appCode':_0x3637ea[_0x377a98(0x176)],'key':_0x2daa2a},()=>deleteAppConfig({'appCode':_0x3637ea[_0x377a98(0x176)],'id':requireAppConfigId(_0x3eff1b,_0x2daa2a,_0x3637ea[_0x377a98(0x176)])})),{'ok':!![],'data':buildMutationData({'operation':_0x377a98(0x163),'appCode':_0x3637ea[_0x377a98(0x176)],'key':_0x2daa2a,'before':projectAppConfig(_0x3eff1b),'after':null,'dryRun':![]}),'message':_0x377a98(0x16b)+_0x2daa2a};}};async function mustGetByKey(_0x17644b,_0x2e862c){const _0x5c9410=a24_0x466d4d,_0x4f7c80=await withAppConfigApiBoundary(_0x5c9410(0x16c),{'appCode':_0x17644b,'key':_0x2e862c},()=>getAppConfigByKey(_0x17644b,_0x2e862c));if(!_0x4f7c80)throw CliErrors[_0x5c9410(0x171)](_0x5c9410(0x161)+_0x2e862c,'appCode:\x20'+_0x17644b);return _0x4f7c80;}function requireAppConfigId(_0x33c3f4,_0x1f9be3,_0x223152){const _0x26979d=a24_0x466d4d;if(typeof _0x33c3f4['id']===_0x26979d(0x162)&&Number[_0x26979d(0x175)](_0x33c3f4['id'])&&_0x33c3f4['id']>0x0)return _0x33c3f4['id'];throw CliErrors[_0x26979d(0x173)](_0x26979d(0x168)+_0x1f9be3+_0x26979d(0x167)+_0x223152);}
@@ -1 +1 @@
1
- const a24_0x15b479=a24_0x3974;(function(_0x3d3c49,_0x91d8d0){const _0x45f6a5=a24_0x3974,_0x36dcd7=_0x3d3c49();while(!![]){try{const _0x205319=parseInt(_0x45f6a5(0x80))/0x1*(-parseInt(_0x45f6a5(0x7a))/0x2)+parseInt(_0x45f6a5(0x75))/0x3*(parseInt(_0x45f6a5(0x7c))/0x4)+parseInt(_0x45f6a5(0x72))/0x5*(parseInt(_0x45f6a5(0x6c))/0x6)+-parseInt(_0x45f6a5(0x70))/0x7+parseInt(_0x45f6a5(0x7d))/0x8*(-parseInt(_0x45f6a5(0x81))/0x9)+parseInt(_0x45f6a5(0x76))/0xa*(parseInt(_0x45f6a5(0x79))/0xb)+parseInt(_0x45f6a5(0x77))/0xc;if(_0x205319===_0x91d8d0)break;else _0x36dcd7['push'](_0x36dcd7['shift']());}catch(_0x23cf62){_0x36dcd7['push'](_0x36dcd7['shift']());}}}(a24_0x3fb6,0x820bf));function a24_0x3974(_0x3202da,_0x495775){_0x3202da=_0x3202da-0x6c;const _0x3fb678=a24_0x3fb6();let _0x397425=_0x3fb678[_0x3202da];return _0x397425;}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a24_0x15b479(0x6f),'command':a24_0x15b479(0x7b),'description':'Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','risk':a24_0x15b479(0x6d),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x2d02a0){readKeyArg(_0x2d02a0);},async 'execute'(_0x52e94f){const _0x5320b6=a24_0x15b479,_0x377570=readKeyArg(_0x52e94f),_0xbe0017=await withAppConfigApiBoundary('get',{'appCode':_0x52e94f[_0x5320b6(0x6e)],'key':_0x377570},()=>getAppConfigByKey(_0x52e94f[_0x5320b6(0x6e)],_0x377570));if(!_0xbe0017)throw CliErrors[_0x5320b6(0x74)](_0x5320b6(0x78)+_0x377570,_0x5320b6(0x7f)+_0x52e94f[_0x5320b6(0x6e)]);const _0x3d64e8=projectAppConfig(_0xbe0017,{'reveal':_0x52e94f[_0x5320b6(0x82)](_0x5320b6(0x7e))});return{'ok':!![],'data':{'config':_0x3d64e8},'message':_0x52e94f[_0x5320b6(0x82)](_0x5320b6(0x7e))?_0x5320b6(0x71)+_0x377570+_0x5320b6(0x73):_0x5320b6(0x71)+_0x377570+'\x20with\x20value\x20redacted'};}};function a24_0x3fb6(){const _0x117891=['1kcGIyQ','6471Mmxrdl','bool','342894VnocAw','read','appCode','app-config','3254265ZxPbts','Loaded\x20app\x20config\x20','25xHWkeW','\x20with\x20value\x20revealed','validation','35979fSlYcr','495610lnSdJt','16865196iAYqQO','App\x20config\x20key\x20not\x20found:\x20','11PIbyez','800486MNDQUm','get','212oTodUF','10888BEZWDZ','reveal','appCode:\x20'];a24_0x3fb6=function(){return _0x117891;};return a24_0x3fb6();}
1
+ const a25_0x5e3542=a25_0x1277;function a25_0x1277(_0x2bcd37,_0x1242c5){_0x2bcd37=_0x2bcd37-0xa4;const _0x59d68c=a25_0x59d6();let _0x1277ab=_0x59d68c[_0x2bcd37];return _0x1277ab;}(function(_0x1b677a,_0x5aa1b8){const _0x3de445=a25_0x1277,_0x197d3c=_0x1b677a();while(!![]){try{const _0x40328e=parseInt(_0x3de445(0xb0))/0x1*(parseInt(_0x3de445(0xaa))/0x2)+parseInt(_0x3de445(0xad))/0x3*(-parseInt(_0x3de445(0xa8))/0x4)+-parseInt(_0x3de445(0xb7))/0x5*(parseInt(_0x3de445(0xb1))/0x6)+parseInt(_0x3de445(0xae))/0x7+-parseInt(_0x3de445(0xaf))/0x8+parseInt(_0x3de445(0xb2))/0x9*(parseInt(_0x3de445(0xb4))/0xa)+parseInt(_0x3de445(0xa7))/0xb*(parseInt(_0x3de445(0xa9))/0xc);if(_0x40328e===_0x5aa1b8)break;else _0x197d3c['push'](_0x197d3c['shift']());}catch(_0x94f1a9){_0x197d3c['push'](_0x197d3c['shift']());}}}(a25_0x59d6,0x5ef6d));function a25_0x59d6(){const _0x2596b6=['read','318285kiGyNY','276244qGubqA','12YcoBWm','865496ofTOBi','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','validation','30osKlWi','5104022XwgXse','3690528PZyqhw','1DFidVT','234gDDAvP','12339jHaNAa','bool','4040lsAncS','get','\x20with\x20value\x20revealed','26130udjEfS','Loaded\x20app\x20config\x20','reveal','appCode','appCode:\x20'];a25_0x59d6=function(){return _0x2596b6;};return a25_0x59d6();}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':a25_0x5e3542(0xb5),'description':a25_0x5e3542(0xab),'risk':a25_0x5e3542(0xa6),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x39012b){readKeyArg(_0x39012b);},async 'execute'(_0x59690d){const _0x70d2c=a25_0x5e3542,_0x65cf39=readKeyArg(_0x59690d),_0x913fe1=await withAppConfigApiBoundary(_0x70d2c(0xb5),{'appCode':_0x59690d['appCode'],'key':_0x65cf39},()=>getAppConfigByKey(_0x59690d[_0x70d2c(0xa4)],_0x65cf39));if(!_0x913fe1)throw CliErrors[_0x70d2c(0xac)]('App\x20config\x20key\x20not\x20found:\x20'+_0x65cf39,_0x70d2c(0xa5)+_0x59690d['appCode']);const _0x144ce2=projectAppConfig(_0x913fe1,{'reveal':_0x59690d['bool'](_0x70d2c(0xb9))});return{'ok':!![],'data':{'config':_0x144ce2},'message':_0x59690d[_0x70d2c(0xb3)]('reveal')?'Loaded\x20app\x20config\x20'+_0x65cf39+_0x70d2c(0xb6):_0x70d2c(0xb8)+_0x65cf39+'\x20with\x20value\x20redacted'};}};
@@ -1 +1 @@
1
- function a25_0x2d51(_0x39b96d,_0x41a32c){_0x39b96d=_0x39b96d-0x92;const _0x4e2adf=a25_0x4e2a();let _0x2d5161=_0x4e2adf[_0x39b96d];return _0x2d5161;}(function(_0x2be450,_0x34c357){const _0x57da75=a25_0x2d51,_0x119bf5=_0x2be450();while(!![]){try{const _0x25e531=parseInt(_0x57da75(0x95))/0x1+-parseInt(_0x57da75(0x92))/0x2*(-parseInt(_0x57da75(0x96))/0x3)+parseInt(_0x57da75(0x99))/0x4+parseInt(_0x57da75(0x93))/0x5+parseInt(_0x57da75(0x97))/0x6+parseInt(_0x57da75(0x9a))/0x7*(-parseInt(_0x57da75(0x94))/0x8)+-parseInt(_0x57da75(0x98))/0x9;if(_0x25e531===_0x34c357)break;else _0x119bf5['push'](_0x119bf5['shift']());}catch(_0x4e0db){_0x119bf5['push'](_0x119bf5['shift']());}}}(a25_0x4e2a,0x23807));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];function a25_0x4e2a(){const _0x265a9d=['1842Gblfyq','523092Uououm','3918339qARCCa','536448nmhAAv','24962jWcoXi','142FbwiJG','1315840AketVt','104uvWxfA','99088PgPssx'];a25_0x4e2a=function(){return _0x265a9d;};return a25_0x4e2a();}
1
+ (function(_0x1a1c01,_0x14b463){const _0x391d1b=a26_0x3952,_0x53b58c=_0x1a1c01();while(!![]){try{const _0x13f6b2=-parseInt(_0x391d1b(0x1f2))/0x1*(parseInt(_0x391d1b(0x1ea))/0x2)+parseInt(_0x391d1b(0x1ec))/0x3+parseInt(_0x391d1b(0x1ef))/0x4+-parseInt(_0x391d1b(0x1ee))/0x5+-parseInt(_0x391d1b(0x1f0))/0x6+-parseInt(_0x391d1b(0x1eb))/0x7*(-parseInt(_0x391d1b(0x1f1))/0x8)+parseInt(_0x391d1b(0x1ed))/0x9;if(_0x13f6b2===_0x14b463)break;else _0x53b58c['push'](_0x53b58c['shift']());}catch(_0x588be7){_0x53b58c['push'](_0x53b58c['shift']());}}}(a26_0x406d,0x82b77));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';function a26_0x3952(_0x46767a,_0x3bfa63){_0x46767a=_0x46767a-0x1ea;const _0x406d15=a26_0x406d();let _0x395250=_0x406d15[_0x46767a];return _0x395250;}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];function a26_0x406d(){const _0x36fa99=['906642zUrEOj','3352TjDBBy','4WEJTLM','31090RKVVuD','3752YZgoAe','1665744HdOITT','1647999uYQlYI','3312335FBMocM','1792904VNGdRy'];a26_0x406d=function(){return _0x36fa99;};return a26_0x406d();}
@@ -1 +1 @@
1
- function a26_0x5de9(){const _0x42de26=['40668QmuoSP','str','length','list','string','803QsaLVl','4IfUrOM','read','map','964SmwNDk','919ZJaCyV','Filter\x20by\x20exact\x20config\x20key','1615266pzgANC','3774980wswrss','appCode','18ayWJJg','5252136MaNRYs','159635nZOzov','112ZnFnnf','Found\x20','key','81775iRoQdf','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','trim'];a26_0x5de9=function(){return _0x42de26;};return a26_0x5de9();}const a26_0x310577=a26_0x392d;(function(_0x432188,_0x30e234){const _0x4a3367=a26_0x392d,_0x599b3f=_0x432188();while(!![]){try{const _0x232393=parseInt(_0x4a3367(0x1ce))/0x1*(parseInt(_0x4a3367(0x1cd))/0x2)+parseInt(_0x4a3367(0x1d0))/0x3+parseInt(_0x4a3367(0x1ca))/0x4*(-parseInt(_0x4a3367(0x1c1))/0x5)+parseInt(_0x4a3367(0x1d4))/0x6+-parseInt(_0x4a3367(0x1d5))/0x7*(parseInt(_0x4a3367(0x1d6))/0x8)+parseInt(_0x4a3367(0x1d3))/0x9*(-parseInt(_0x4a3367(0x1d1))/0xa)+-parseInt(_0x4a3367(0x1c9))/0xb*(parseInt(_0x4a3367(0x1c4))/0xc);if(_0x232393===_0x30e234)break;else _0x599b3f['push'](_0x599b3f['shift']());}catch(_0x2358bb){_0x599b3f['push'](_0x599b3f['shift']());}}}(a26_0x5de9,0x7ea3e));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a26_0x392d(_0x28df24,_0x421521){_0x28df24=_0x28df24-0x1c1;const _0x5de905=a26_0x5de9();let _0x392dca=_0x5de905[_0x28df24];return _0x392dca;}export const appConfigList={'service':'app-config','command':a26_0x310577(0x1c7),'description':a26_0x310577(0x1c2),'risk':a26_0x310577(0x1cb),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a26_0x310577(0x1d8),'type':a26_0x310577(0x1c8),'description':a26_0x310577(0x1cf)},TAGS_FLAG],async 'validate'(_0x5165a1){const _0x2aee93=a26_0x310577,_0x165a2b=_0x5165a1['str'](_0x2aee93(0x1d8))['trim']();if(_0x165a2b)validateKey(_0x165a2b);readOptionalTags(_0x5165a1);},async 'execute'(_0x45dc76){const _0x1582d1=a26_0x310577,_0x2c2d49=_0x45dc76[_0x1582d1(0x1c5)](_0x1582d1(0x1d8))[_0x1582d1(0x1c3)]()||undefined,_0x3c2236=readOptionalTags(_0x45dc76),_0x286671=await withAppConfigApiBoundary(_0x1582d1(0x1c7),{'appCode':_0x45dc76[_0x1582d1(0x1d2)]},()=>listAppConfigs(_0x45dc76[_0x1582d1(0x1d2)],{'key':_0x2c2d49,'tags':_0x3c2236})),_0x132aa1=_0x286671[_0x1582d1(0x1cc)](_0x399644=>projectAppConfig(_0x399644));return{'ok':!![],'data':{'appCode':_0x45dc76[_0x1582d1(0x1d2)],'count':_0x132aa1[_0x1582d1(0x1c6)],'configs':_0x132aa1},'message':_0x1582d1(0x1d7)+_0x132aa1['length']+'\x20app\x20config(s)'};}};
1
+ const a27_0x4e986a=a27_0x1596;function a27_0x1596(_0x26f289,_0x4b4142){_0x26f289=_0x26f289-0x1c4;const _0x5ea8b9=a27_0x5ea8();let _0x1596dc=_0x5ea8b9[_0x26f289];return _0x1596dc;}function a27_0x5ea8(){const _0x5c8f=['36564gEgYMi','length','appCode','21051WIWRkf','str','key','12aXmVfu','2696RmiLKu','Found\x20','trim','3716867IkxZWn','string','929015pIzgWZ','Filter\x20by\x20exact\x20config\x20key','88lDKbai','10502990wwyMAb','list','read','12BWUHpc','4469689VORQuf','\x20app\x20config(s)','14LijHgX','app-config','81660omvukM'];a27_0x5ea8=function(){return _0x5c8f;};return a27_0x5ea8();}(function(_0x2effe5,_0x4ceb95){const _0x5652ae=a27_0x1596,_0x302637=_0x2effe5();while(!![]){try{const _0xfbf106=-parseInt(_0x5652ae(0x1da))/0x1*(parseInt(_0x5652ae(0x1c5))/0x2)+-parseInt(_0x5652ae(0x1c4))/0x3*(-parseInt(_0x5652ae(0x1d3))/0x4)+parseInt(_0x5652ae(0x1d1))/0x5*(parseInt(_0x5652ae(0x1d7))/0x6)+-parseInt(_0x5652ae(0x1d8))/0x7+-parseInt(_0x5652ae(0x1cc))/0x8*(parseInt(_0x5652ae(0x1c8))/0x9)+parseInt(_0x5652ae(0x1d4))/0xa+parseInt(_0x5652ae(0x1cf))/0xb*(parseInt(_0x5652ae(0x1cb))/0xc);if(_0xfbf106===_0x4ceb95)break;else _0x302637['push'](_0x302637['shift']());}catch(_0x762eee){_0x302637['push'](_0x302637['shift']());}}}(a27_0x5ea8,0xa5054));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x4e986a(0x1db),'command':'list','description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0x4e986a(0x1d6),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x4e986a(0x1ca),'type':a27_0x4e986a(0x1d0),'description':a27_0x4e986a(0x1d2)},TAGS_FLAG],async 'validate'(_0x30ac3d){const _0x4c09a7=a27_0x4e986a,_0x2472f6=_0x30ac3d[_0x4c09a7(0x1c9)]('key')['trim']();if(_0x2472f6)validateKey(_0x2472f6);readOptionalTags(_0x30ac3d);},async 'execute'(_0x4e8abc){const _0x477fa2=a27_0x4e986a,_0x2745ac=_0x4e8abc[_0x477fa2(0x1c9)](_0x477fa2(0x1ca))[_0x477fa2(0x1ce)]()||undefined,_0x35c700=readOptionalTags(_0x4e8abc),_0x27aa87=await withAppConfigApiBoundary(_0x477fa2(0x1d5),{'appCode':_0x4e8abc[_0x477fa2(0x1c7)]},()=>listAppConfigs(_0x4e8abc['appCode'],{'key':_0x2745ac,'tags':_0x35c700})),_0x37f1ab=_0x27aa87['map'](_0x286da2=>projectAppConfig(_0x286da2));return{'ok':!![],'data':{'appCode':_0x4e8abc[_0x477fa2(0x1c7)],'count':_0x37f1ab['length'],'configs':_0x37f1ab},'message':_0x477fa2(0x1cd)+_0x37f1ab[_0x477fa2(0x1c6)]+_0x477fa2(0x1d9)};}};
@@ -1 +1 @@
1
- const a27_0x1fc23f=a27_0x331d;function a27_0x331d(_0x350d5a,_0x27bbef){_0x350d5a=_0x350d5a-0x137;const _0x2ec080=a27_0x2ec0();let _0x331dc2=_0x2ec080[_0x350d5a];return _0x331dc2;}(function(_0x31d016,_0x2d5055){const _0x3fc2aa=a27_0x331d,_0x11e589=_0x31d016();while(!![]){try{const _0x59fd3d=parseInt(_0x3fc2aa(0x13d))/0x1*(-parseInt(_0x3fc2aa(0x13c))/0x2)+parseInt(_0x3fc2aa(0x13b))/0x3+-parseInt(_0x3fc2aa(0x149))/0x4+-parseInt(_0x3fc2aa(0x146))/0x5+-parseInt(_0x3fc2aa(0x13f))/0x6+-parseInt(_0x3fc2aa(0x14d))/0x7*(-parseInt(_0x3fc2aa(0x142))/0x8)+parseInt(_0x3fc2aa(0x141))/0x9*(parseInt(_0x3fc2aa(0x13a))/0xa);if(_0x59fd3d===_0x2d5055)break;else _0x11e589['push'](_0x11e589['shift']());}catch(_0x4f03c4){_0x11e589['push'](_0x11e589['shift']());}}}(a27_0x2ec0,0x3e8e6));function a27_0x2ec0(){const _0x34919c=['166058EcHVkl','1sejOtl','create','891018RfEIUX','tags','9eEVBAZ','168nGgJvN','number','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','set','1715910seJvpp','appCode','App\x20config\x20server\x20id\x20missing\x20for\x20key=','386380LmFAbd','POST','apiError','Created','40271ihCRos','get','isFinite','update','Read\x20config\x20value\x20from\x20file','app-config','write','4737070mmbgkB','999057VayVlS'];a27_0x2ec0=function(){return _0x34919c;};return a27_0x2ec0();}import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH='/smartapi/app-config/create',UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a27_0x1fc23f(0x138),'command':a27_0x1fc23f(0x145),'description':a27_0x1fc23f(0x144),'risk':a27_0x1fc23f(0x139),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':'string','description':a27_0x1fc23f(0x137)}],async 'validate'(_0xed6bc9){readKeyArg(_0xed6bc9),readOptionalTags(_0xed6bc9),assertSingleValueSource(_0xed6bc9);},async 'dryRun'(_0x4f8abc){const _0x20fd49=a27_0x1fc23f,_0x4da9b1=readKeyArg(_0x4f8abc),_0x4370d6=readOptionalTags(_0x4f8abc),_0x16b849=assertSingleValueSource(_0x4f8abc);await assertValueSourceReadable(_0x16b849);const _0x1e5a24=await withAppConfigApiBoundary(_0x20fd49(0x14e),{'appCode':_0x4f8abc['appCode'],'key':_0x4da9b1},()=>getAppConfigByKey(_0x4f8abc[_0x20fd49(0x147)],_0x4da9b1)),_0x52a658=_0x1e5a24?_0x20fd49(0x150):'create',_0x162d38=_0x1e5a24?projectAppConfig(_0x1e5a24):null,_0x50e628=plannedAppConfig({'appCode':_0x4f8abc[_0x20fd49(0x147)],'key':_0x4da9b1,'tags':_0x4370d6??_0x1e5a24?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x52a658,'appCode':_0x4f8abc['appCode'],'key':_0x4da9b1,'before':_0x162d38,'after':_0x50e628,'dryRun':!![]}),{'method':_0x20fd49(0x14a),'url':_0x52a658===_0x20fd49(0x150)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x3fd6ff){const _0x62c611=a27_0x1fc23f,_0x3e1c1c=readKeyArg(_0x3fd6ff),_0x4df3fb=readOptionalTags(_0x3fd6ff),_0x94f56a=await withAppConfigApiBoundary('get',{'appCode':_0x3fd6ff[_0x62c611(0x147)],'key':_0x3e1c1c},()=>getAppConfigByKey(_0x3fd6ff[_0x62c611(0x147)],_0x3e1c1c)),_0x226d62=_0x94f56a?projectAppConfig(_0x94f56a):null,_0x3975c3=_0x94f56a?'update':_0x62c611(0x13e),{value:_0x45f185,warnings:_0xcd9678}=await readAppConfigValue(_0x3fd6ff),_0x1aad8d={'appCode':_0x3fd6ff[_0x62c611(0x147)],'key':_0x3e1c1c,'value':_0x45f185,'tags':_0x4df3fb??_0x94f56a?.[_0x62c611(0x140)]??undefined};await withAppConfigApiBoundary(_0x3975c3,{'appCode':_0x3fd6ff[_0x62c611(0x147)],'key':_0x3e1c1c},async()=>{const _0x472bc0=_0x62c611;_0x94f56a?await updateAppConfig({..._0x1aad8d,'id':requireAppConfigId(_0x94f56a,_0x3e1c1c,_0x3fd6ff[_0x472bc0(0x147)])}):await createAppConfig(_0x1aad8d);});const _0x99bd54=await withAppConfigApiBoundary(_0x62c611(0x14e),{'appCode':_0x3fd6ff[_0x62c611(0x147)],'key':_0x3e1c1c},()=>getAppConfigByKey(_0x3fd6ff[_0x62c611(0x147)],_0x3e1c1c)),_0x3b8462=_0x99bd54?projectAppConfig(_0x99bd54):plannedAppConfig({'appCode':_0x3fd6ff[_0x62c611(0x147)],'key':_0x3e1c1c,'tags':_0x1aad8d['tags'],'hasValue':_0x45f185!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x3975c3,'appCode':_0x3fd6ff[_0x62c611(0x147)],'key':_0x3e1c1c,'before':_0x226d62,'after':_0x3b8462,'dryRun':![],'warnings':_0xcd9678}),'message':(_0x3975c3==='update'?'Updated':_0x62c611(0x14c))+'\x20app\x20config\x20'+_0x3e1c1c};}};function requireAppConfigId(_0x1078ca,_0x4231cb,_0x45ea24){const _0x33f40d=a27_0x1fc23f;if(typeof _0x1078ca['id']===_0x33f40d(0x143)&&Number[_0x33f40d(0x14f)](_0x1078ca['id'])&&_0x1078ca['id']>0x0)return _0x1078ca['id'];throw CliErrors[_0x33f40d(0x14b)](_0x33f40d(0x148)+_0x4231cb+',\x20appCode='+_0x45ea24);}
1
+ const a28_0x10f3db=a28_0x5e1c;(function(_0x18d7b8,_0x4c20b7){const _0x41e8bb=a28_0x5e1c,_0x1ae694=_0x18d7b8();while(!![]){try{const _0x1a630d=parseInt(_0x41e8bb(0xe7))/0x1*(-parseInt(_0x41e8bb(0xf3))/0x2)+-parseInt(_0x41e8bb(0xde))/0x3*(parseInt(_0x41e8bb(0xef))/0x4)+-parseInt(_0x41e8bb(0xe0))/0x5*(parseInt(_0x41e8bb(0xf5))/0x6)+parseInt(_0x41e8bb(0xe6))/0x7+-parseInt(_0x41e8bb(0xe2))/0x8*(parseInt(_0x41e8bb(0xf9))/0x9)+-parseInt(_0x41e8bb(0xea))/0xa*(-parseInt(_0x41e8bb(0xdc))/0xb)+-parseInt(_0x41e8bb(0xf6))/0xc*(-parseInt(_0x41e8bb(0xe9))/0xd);if(_0x1a630d===_0x4c20b7)break;else _0x1ae694['push'](_0x1ae694['shift']());}catch(_0x60c6c2){_0x1ae694['push'](_0x1ae694['shift']());}}}(a28_0x3ae4,0x9ac7f));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a28_0x5e1c(_0x12374f,_0x1b2fe8){_0x12374f=_0x12374f-0xdc;const _0x3ae449=a28_0x3ae4();let _0x5e1cac=_0x3ae449[_0x12374f];return _0x5e1cac;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a28_0x3ae4(){const _0x2a4959=['isFinite','Read\x20config\x20value\x20from\x20file','2132QXGBTq','get','6MwfTUH','132wFtvPI','apiError','number','8418267qGGoAy','tags','11Ynjefx','Updated','6HTZyYj','appCode','1978785ufUqoK','create','8nexLcz','POST','update','/smartapi/app-config/update','5286715bJoQqo','31wEvyKq','write','1704209AXIkxG','706630GykXXF','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','App\x20config\x20server\x20id\x20missing\x20for\x20key=','/smartapi/app-config/create','set','539564kMDglF','Created'];a28_0x3ae4=function(){return _0x2a4959;};return a28_0x3ae4();}const CREATE_PATH=a28_0x10f3db(0xed),UPDATE_PATH=a28_0x10f3db(0xe5);export const appConfigSet={'service':'app-config','command':a28_0x10f3db(0xee),'description':a28_0x10f3db(0xeb),'risk':a28_0x10f3db(0xe8),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':'string','description':a28_0x10f3db(0xf2)}],async 'validate'(_0x5e2a56){readKeyArg(_0x5e2a56),readOptionalTags(_0x5e2a56),assertSingleValueSource(_0x5e2a56);},async 'dryRun'(_0xb3a636){const _0x4eef1e=a28_0x10f3db,_0x3fb749=readKeyArg(_0xb3a636),_0x18447b=readOptionalTags(_0xb3a636),_0x2a5d79=assertSingleValueSource(_0xb3a636);await assertValueSourceReadable(_0x2a5d79);const _0x436b7b=await withAppConfigApiBoundary(_0x4eef1e(0xf4),{'appCode':_0xb3a636['appCode'],'key':_0x3fb749},()=>getAppConfigByKey(_0xb3a636[_0x4eef1e(0xdf)],_0x3fb749)),_0x572b5b=_0x436b7b?_0x4eef1e(0xe4):_0x4eef1e(0xe1),_0x57a607=_0x436b7b?projectAppConfig(_0x436b7b):null,_0x4270fd=plannedAppConfig({'appCode':_0xb3a636[_0x4eef1e(0xdf)],'key':_0x3fb749,'tags':_0x18447b??_0x436b7b?.[_0x4eef1e(0xfa)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x572b5b,'appCode':_0xb3a636['appCode'],'key':_0x3fb749,'before':_0x57a607,'after':_0x4270fd,'dryRun':!![]}),{'method':_0x4eef1e(0xe3),'url':_0x572b5b===_0x4eef1e(0xe4)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x5ca634){const _0xa9bc0d=a28_0x10f3db,_0x1a05db=readKeyArg(_0x5ca634),_0x32b5cc=readOptionalTags(_0x5ca634),_0x4323a8=await withAppConfigApiBoundary(_0xa9bc0d(0xf4),{'appCode':_0x5ca634['appCode'],'key':_0x1a05db},()=>getAppConfigByKey(_0x5ca634[_0xa9bc0d(0xdf)],_0x1a05db)),_0x37a4bf=_0x4323a8?projectAppConfig(_0x4323a8):null,_0x35e990=_0x4323a8?_0xa9bc0d(0xe4):_0xa9bc0d(0xe1),{value:_0x4f3c54,warnings:_0x3724f6}=await readAppConfigValue(_0x5ca634),_0x5f1d1a={'appCode':_0x5ca634[_0xa9bc0d(0xdf)],'key':_0x1a05db,'value':_0x4f3c54,'tags':_0x32b5cc??_0x4323a8?.['tags']??undefined};await withAppConfigApiBoundary(_0x35e990,{'appCode':_0x5ca634[_0xa9bc0d(0xdf)],'key':_0x1a05db},async()=>{const _0x1a0a1c=_0xa9bc0d;_0x4323a8?await updateAppConfig({..._0x5f1d1a,'id':requireAppConfigId(_0x4323a8,_0x1a05db,_0x5ca634[_0x1a0a1c(0xdf)])}):await createAppConfig(_0x5f1d1a);});const _0x10df6a=await withAppConfigApiBoundary(_0xa9bc0d(0xf4),{'appCode':_0x5ca634['appCode'],'key':_0x1a05db},()=>getAppConfigByKey(_0x5ca634[_0xa9bc0d(0xdf)],_0x1a05db)),_0x46b785=_0x10df6a?projectAppConfig(_0x10df6a):plannedAppConfig({'appCode':_0x5ca634[_0xa9bc0d(0xdf)],'key':_0x1a05db,'tags':_0x5f1d1a[_0xa9bc0d(0xfa)],'hasValue':_0x4f3c54!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x35e990,'appCode':_0x5ca634[_0xa9bc0d(0xdf)],'key':_0x1a05db,'before':_0x37a4bf,'after':_0x46b785,'dryRun':![],'warnings':_0x3724f6}),'message':(_0x35e990===_0xa9bc0d(0xe4)?_0xa9bc0d(0xdd):_0xa9bc0d(0xf0))+'\x20app\x20config\x20'+_0x1a05db};}};function requireAppConfigId(_0x3bdfbe,_0x35295a,_0x3345ac){const _0x1b91c9=a28_0x10f3db;if(typeof _0x3bdfbe['id']===_0x1b91c9(0xf8)&&Number[_0x1b91c9(0xf1)](_0x3bdfbe['id'])&&_0x3bdfbe['id']>0x0)return _0x3bdfbe['id'];throw CliErrors[_0x1b91c9(0xf7)](_0x1b91c9(0xec)+_0x35295a+',\x20appCode='+_0x3345ac);}
@@ -1 +1 @@
1
- const a28_0x28b65a=a28_0x1c5f;(function(_0x8c6411,_0x104569){const _0x580c63=a28_0x1c5f,_0x37dd96=_0x8c6411();while(!![]){try{const _0xf42d1e=parseInt(_0x580c63(0x116))/0x1+-parseInt(_0x580c63(0x109))/0x2+-parseInt(_0x580c63(0xf6))/0x3+-parseInt(_0x580c63(0xf5))/0x4+-parseInt(_0x580c63(0xf4))/0x5*(parseInt(_0x580c63(0xdd))/0x6)+parseInt(_0x580c63(0xf2))/0x7*(parseInt(_0x580c63(0xf7))/0x8)+-parseInt(_0x580c63(0xe7))/0x9*(-parseInt(_0x580c63(0x105))/0xa);if(_0xf42d1e===_0x104569)break;else _0x37dd96['push'](_0x37dd96['shift']());}catch(_0x4306f8){_0x37dd96['push'](_0x37dd96['shift']());}}}(a28_0xb33a,0xc065c));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a28_0x28b65a(0x110),'description':a28_0x28b65a(0xfe),'required':!![]};export const VALUE_ARG={'name':'value','description':a28_0x28b65a(0x108),'required':![]};export const TAGS_FLAG={'name':a28_0x28b65a(0xe8),'type':a28_0x28b65a(0xdc),'description':'Config\x20tags\x20for\x20filtering/display\x20metadata'};export const STDIN_FLAG={'name':a28_0x28b65a(0xe6),'type':'boolean','description':a28_0x28b65a(0xf3),'default':![]};export const FROM_ENV_FLAG={'name':'from-env','type':a28_0x28b65a(0xdc),'description':a28_0x28b65a(0xd7)};export const REVEAL_FLAG={'name':a28_0x28b65a(0xf9),'type':a28_0x28b65a(0xfb),'description':a28_0x28b65a(0x102),'default':![]};export function readKeyArg(_0x532b9e){const _0x5567ce=a28_0x28b65a,_0x52c14d=_0x532b9e['args'][0x0]?.[_0x5567ce(0xda)]()??'';return validateKey(_0x52c14d),_0x52c14d;}export function readOptionalTags(_0x1771d2){const _0x47931e=a28_0x28b65a,_0x3c7ced=_0x1771d2[_0x47931e(0x10b)]('tags')[_0x47931e(0xda)]();if(!_0x3c7ced)return undefined;if(_0x3c7ced[_0x47931e(0xd9)]>0x20)throw CliErrors[_0x47931e(0xfa)](_0x47931e(0xe4));return _0x3c7ced;}export function validateKey(_0x182544){const _0x296ef8=a28_0x28b65a;if(!_0x182544)throw CliErrors[_0x296ef8(0xfa)](_0x296ef8(0x10d));if(_0x182544[_0x296ef8(0xd9)]>0x100)throw CliErrors['validation'](_0x296ef8(0x10e));}export function projectAppConfig(_0xf133ef,_0x1cf1d2){const _0x263432=a28_0x28b65a,_0x41836c=_0xf133ef[_0x263432(0x106)]!==undefined&&_0xf133ef[_0x263432(0x106)]!==null&&_0xf133ef[_0x263432(0x106)]!=='',_0x347f3a={'appCode':_0xf133ef[_0x263432(0xf0)],'key':_0xf133ef[_0x263432(0x110)],'tags':_0xf133ef['tags']??undefined,'hasValue':_0x41836c,'valueRedacted':_0x41836c&&!_0x1cf1d2?.[_0x263432(0xf9)],'gmtCreate':_0xf133ef['gmtCreate'],'gmtModified':_0xf133ef['gmtModified']};return _0x1cf1d2?.['reveal']&&(_0x347f3a['value']=_0xf133ef[_0x263432(0x106)]??'',_0x347f3a[_0x263432(0xde)]=![]),_0x347f3a;}export function plannedAppConfig(_0x26e83c){const _0x50d0b4=a28_0x28b65a,_0x256175=_0x26e83c['hasValue']??!![];return{'appCode':_0x26e83c['appCode'],'key':_0x26e83c[_0x50d0b4(0x110)],'tags':_0x26e83c[_0x50d0b4(0xe8)]??undefined,'hasValue':_0x256175,'valueRedacted':_0x256175};}export function buildMutationData(_0x9d1896){const _0x456c7f=a28_0x28b65a;return{'operation':_0x9d1896[_0x456c7f(0x10a)],'selector':{'appCode':_0x9d1896[_0x456c7f(0xf0)],'key':_0x9d1896[_0x456c7f(0x110)]},'before':_0x9d1896[_0x456c7f(0xfc)],'after':_0x9d1896[_0x456c7f(0x10c)],'dryRun':_0x9d1896[_0x456c7f(0x112)],'warnings':_0x9d1896[_0x456c7f(0xe1)]??[]};}export async function withAppConfigApiBoundary(_0x35a73a,_0x1f6062,_0x3ec5b4){const _0x14797f=a28_0x28b65a;try{return await _0x3ec5b4();}catch{const _0x358d42=[_0x14797f(0x115)+_0x1f6062[_0x14797f(0xf0)]];if(_0x1f6062[_0x14797f(0x110)])_0x358d42[_0x14797f(0xfd)](_0x14797f(0x100)+_0x1f6062[_0x14797f(0x110)]);_0x358d42[_0x14797f(0xfd)](_0x14797f(0x10f));throw CliErrors[_0x14797f(0xe3)](_0x14797f(0x103)+_0x35a73a+'\x20app\x20config.',_0x358d42[_0x14797f(0xeb)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x445815,_0x4a733b){const _0x44e4b8=a28_0x28b65a;return Object['defineProperties'](_0x445815,{'method':{'value':_0x4a733b[_0x44e4b8(0x111)],'enumerable':![]},'url':{'value':_0x4a733b['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x31a25){const _0x521e6f=a28_0x28b65a,_0x4bdef9=[];_0x31a25[_0x521e6f(0x117)][_0x521e6f(0xd9)]>0x1&&_0x4bdef9[_0x521e6f(0xfd)]({'kind':'argument','value':_0x31a25[_0x521e6f(0x117)]['slice'](0x1)[_0x521e6f(0xeb)]('\x20')});const _0x580b84=_0x31a25[_0x521e6f(0xec)]('value');_0x580b84!==undefined&&_0x580b84!==null&&_0x4bdef9['push']({'kind':_0x521e6f(0xe5),'value':String(_0x580b84)});_0x31a25[_0x521e6f(0x113)]('stdin')&&_0x4bdef9[_0x521e6f(0xfd)]({'kind':_0x521e6f(0xe6)});const _0x4d1a16=_0x31a25[_0x521e6f(0x10b)](_0x521e6f(0x104))[_0x521e6f(0xda)]();_0x4d1a16&&_0x4bdef9['push']({'kind':_0x521e6f(0xdf),'name':_0x4d1a16});const _0x252d9f=_0x31a25['str'](_0x521e6f(0xef))['trim']();_0x252d9f&&_0x4bdef9[_0x521e6f(0xfd)]({'kind':_0x521e6f(0xef),'path':_0x252d9f});if(_0x4bdef9[_0x521e6f(0xd9)]===0x0)throw CliErrors[_0x521e6f(0xfa)]('Missing\x20app-config\x20value\x20source.',_0x521e6f(0x114));if(_0x4bdef9['length']>0x1)throw CliErrors[_0x521e6f(0xfa)](_0x521e6f(0xed),_0x521e6f(0xdb));return _0x4bdef9[0x0];}export async function assertValueSourceReadable(_0x1f830d){const _0x247e43=a28_0x28b65a;if(_0x1f830d[_0x247e43(0xe2)]==='env'&&!(_0x1f830d['name']in process.env))throw CliErrors['validation'](_0x247e43(0x101)+_0x1f830d['name']);if(_0x1f830d[_0x247e43(0xe2)]===_0x247e43(0xef))try{await access(_0x1f830d['path']);}catch{throw CliErrors['validation'](_0x247e43(0xf1)+_0x1f830d[_0x247e43(0xee)]);}}export async function readAppConfigValue(_0x47c9ad){const _0x531a97=a28_0x28b65a,_0x32c0cd=assertSingleValueSource(_0x47c9ad),_0x5ea7a3=[];if(_0x32c0cd[_0x531a97(0xe2)]===_0x531a97(0xe5))return _0x5ea7a3[_0x531a97(0xfd)](_0x531a97(0xff)),{'value':_0x32c0cd[_0x531a97(0x106)]??'','source':_0x32c0cd['kind'],'warnings':_0x5ea7a3};if(_0x32c0cd[_0x531a97(0xe2)]===_0x531a97(0xe6))return{'value':await readStdin(),'source':_0x32c0cd['kind'],'warnings':_0x5ea7a3};if(_0x32c0cd[_0x531a97(0xe2)]==='env'){if(!(_0x32c0cd[_0x531a97(0xe0)]in process.env))throw CliErrors['validation'](_0x531a97(0x101)+_0x32c0cd[_0x531a97(0xe0)]);return{'value':process.env[_0x32c0cd.name]??'','source':_0x32c0cd['kind'],'warnings':_0x5ea7a3};}return{'value':await readFile(_0x32c0cd[_0x531a97(0xee)],_0x531a97(0xe9)),'source':_0x32c0cd[_0x531a97(0xe2)],'warnings':_0x5ea7a3};}function a28_0xb33a(){const _0x2f7711=['value','once','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','437900JGLzTP','operation','str','after','Missing\x20app-config\x20key.','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','value\x20is\x20redacted','key','method','dryRun','bool','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','appCode:\x20','602906tnnaqi','args','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','error','length','trim','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','string','18FuHUdA','valueRedacted','env','name','warnings','kind','apiError','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','argument','stdin','311490CnDsoz','tags','utf8','data','join','flag','App\x20config\x20value\x20source\x20is\x20ambiguous.','path','file','appCode','Value\x20file\x20is\x20not\x20readable:\x20','1183blgGse','Read\x20config\x20value\x20from\x20stdin','154355fbvtiP','3174732HqtUot','1894158PAneFU','71312mLjVNe','setEncoding','reveal','validation','boolean','before','push','Runtime\x20app-config\x20key','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','key:\x20','Environment\x20variable\x20is\x20not\x20set:\x20','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','Failed\x20to\x20','from-env','120CJeiMG'];a28_0xb33a=function(){return _0x2f7711;};return a28_0xb33a();}function a28_0x1c5f(_0x1c99df,_0x1853e6){_0x1c99df=_0x1c99df-0xd7;const _0xb33ac3=a28_0xb33a();let _0x1c5f7b=_0xb33ac3[_0x1c99df];return _0x1c5f7b;}function readStdin(){return new Promise((_0x33018e,_0x4d065e)=>{const _0x4c6742=a28_0x1c5f;let _0x409a3a='';process[_0x4c6742(0xe6)][_0x4c6742(0xf8)](_0x4c6742(0xe9)),process[_0x4c6742(0xe6)]['on'](_0x4c6742(0xea),_0x33d05d=>{_0x409a3a+=_0x33d05d;}),process[_0x4c6742(0xe6)][_0x4c6742(0x107)]('end',()=>_0x33018e(_0x409a3a)),process[_0x4c6742(0xe6)][_0x4c6742(0x107)](_0x4c6742(0xd8),_0x4d065e);});}
1
+ const a29_0x238e62=a29_0x305e;(function(_0xa8e552,_0x4ff629){const _0x2687ea=a29_0x305e,_0x413bc5=_0xa8e552();while(!![]){try{const _0x145a2f=-parseInt(_0x2687ea(0x75))/0x1*(-parseInt(_0x2687ea(0x98))/0x2)+parseInt(_0x2687ea(0x6a))/0x3+-parseInt(_0x2687ea(0x69))/0x4+-parseInt(_0x2687ea(0x95))/0x5+parseInt(_0x2687ea(0x87))/0x6*(-parseInt(_0x2687ea(0x96))/0x7)+-parseInt(_0x2687ea(0x91))/0x8+parseInt(_0x2687ea(0x77))/0x9*(parseInt(_0x2687ea(0x8f))/0xa);if(_0x145a2f===_0x4ff629)break;else _0x413bc5['push'](_0x413bc5['shift']());}catch(_0x12fb72){_0x413bc5['push'](_0x413bc5['shift']());}}}(a29_0x7fb4,0x66e84));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x238e62(0x6d),'description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':a29_0x238e62(0xa0),'description':a29_0x238e62(0x8e),'required':![]};function a29_0x7fb4(){const _0x2bb6de=['App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','argument','reveal','dryRun','7JMsFhw','str','57087JyXabF','validation','gmtModified','kind','boolean','defineProperties','name','url','path','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','Missing\x20app-config\x20key.','string','Failed\x20to\x20','once','from-env','warnings','2076AWZMCg','push','length','valueRedacted','env','stdin','args','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','1650mUtrzR','App\x20config\x20value\x20source\x20is\x20ambiguous.','1948728UXPIqa','Environment\x20variable\x20is\x20not\x20set:\x20','Config\x20tags\x20for\x20filtering/display\x20metadata','trim','4034620xvxMMo','3255SzkGAF','file','208778xibCye','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','join','error','Value\x20file\x20is\x20not\x20readable:\x20','flag','appCode','bool','value','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','setEncoding','slice','method','1149992bjWvDX','429279NpGIie','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','tags','key','Missing\x20app-config\x20value\x20source.','operation','utf8'];a29_0x7fb4=function(){return _0x2bb6de;};return a29_0x7fb4();}export const TAGS_FLAG={'name':a29_0x238e62(0x6c),'type':a29_0x238e62(0x82),'description':a29_0x238e62(0x93)};export const STDIN_FLAG={'name':'stdin','type':a29_0x238e62(0x7b),'description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a29_0x238e62(0x85),'type':a29_0x238e62(0x82),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0x238e62(0x73),'type':'boolean','description':a29_0x238e62(0x80),'default':![]};export function readKeyArg(_0x32d10a){const _0x9dce6=a29_0x238e62,_0x339b9f=_0x32d10a[_0x9dce6(0x8d)][0x0]?.[_0x9dce6(0x94)]()??'';return validateKey(_0x339b9f),_0x339b9f;}export function readOptionalTags(_0x3ba4e5){const _0x3959ef=a29_0x238e62,_0x8d8f27=_0x3ba4e5[_0x3959ef(0x76)](_0x3959ef(0x6c))['trim']();if(!_0x8d8f27)return undefined;if(_0x8d8f27[_0x3959ef(0x89)]>0x20)throw CliErrors[_0x3959ef(0x78)](_0x3959ef(0x99));return _0x8d8f27;}function a29_0x305e(_0x37b06c,_0x40c8ab){_0x37b06c=_0x37b06c-0x69;const _0x7fb473=a29_0x7fb4();let _0x305e1f=_0x7fb473[_0x37b06c];return _0x305e1f;}export function validateKey(_0x5d6a3d){const _0x11537b=a29_0x238e62;if(!_0x5d6a3d)throw CliErrors['validation'](_0x11537b(0x81));if(_0x5d6a3d[_0x11537b(0x89)]>0x100)throw CliErrors[_0x11537b(0x78)](_0x11537b(0x71));}export function projectAppConfig(_0x50e166,_0x258f11){const _0x177558=a29_0x238e62,_0xccf86=_0x50e166['value']!==undefined&&_0x50e166[_0x177558(0xa0)]!==null&&_0x50e166[_0x177558(0xa0)]!=='',_0x3d0afc={'appCode':_0x50e166['appCode'],'key':_0x50e166[_0x177558(0x6d)],'tags':_0x50e166[_0x177558(0x6c)]??undefined,'hasValue':_0xccf86,'valueRedacted':_0xccf86&&!_0x258f11?.['reveal'],'gmtCreate':_0x50e166['gmtCreate'],'gmtModified':_0x50e166[_0x177558(0x79)]};return _0x258f11?.[_0x177558(0x73)]&&(_0x3d0afc[_0x177558(0xa0)]=_0x50e166[_0x177558(0xa0)]??'',_0x3d0afc[_0x177558(0x8a)]=![]),_0x3d0afc;}export function plannedAppConfig(_0x567597){const _0x5976db=a29_0x238e62,_0x417502=_0x567597['hasValue']??!![];return{'appCode':_0x567597[_0x5976db(0x9e)],'key':_0x567597[_0x5976db(0x6d)],'tags':_0x567597[_0x5976db(0x6c)]??undefined,'hasValue':_0x417502,'valueRedacted':_0x417502};}export function buildMutationData(_0xdb30c){const _0x530222=a29_0x238e62;return{'operation':_0xdb30c[_0x530222(0x6f)],'selector':{'appCode':_0xdb30c[_0x530222(0x9e)],'key':_0xdb30c[_0x530222(0x6d)]},'before':_0xdb30c['before'],'after':_0xdb30c['after'],'dryRun':_0xdb30c[_0x530222(0x74)],'warnings':_0xdb30c[_0x530222(0x86)]??[]};}export async function withAppConfigApiBoundary(_0x3dcc15,_0x1de64c,_0x167ccd){const _0x1f6920=a29_0x238e62;try{return await _0x167ccd();}catch{const _0x36fece=['appCode:\x20'+_0x1de64c[_0x1f6920(0x9e)]];if(_0x1de64c[_0x1f6920(0x6d)])_0x36fece[_0x1f6920(0x88)]('key:\x20'+_0x1de64c[_0x1f6920(0x6d)]);_0x36fece[_0x1f6920(0x88)]('value\x20is\x20redacted');throw CliErrors['apiError'](_0x1f6920(0x83)+_0x3dcc15+'\x20app\x20config.',_0x36fece[_0x1f6920(0x9a)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x595fcd,_0x2a2a29){const _0x3dcbbb=a29_0x238e62;return Object[_0x3dcbbb(0x7c)](_0x595fcd,{'method':{'value':_0x2a2a29[_0x3dcbbb(0xa4)],'enumerable':![]},'url':{'value':_0x2a2a29[_0x3dcbbb(0x7e)],'enumerable':![]}});}export function assertSingleValueSource(_0x49d3c5){const _0x3ed846=a29_0x238e62,_0x212f2f=[];_0x49d3c5['args'][_0x3ed846(0x89)]>0x1&&_0x212f2f[_0x3ed846(0x88)]({'kind':'argument','value':_0x49d3c5['args'][_0x3ed846(0xa3)](0x1)[_0x3ed846(0x9a)]('\x20')});const _0x423709=_0x49d3c5[_0x3ed846(0x9d)](_0x3ed846(0xa0));_0x423709!==undefined&&_0x423709!==null&&_0x212f2f[_0x3ed846(0x88)]({'kind':_0x3ed846(0x72),'value':String(_0x423709)});_0x49d3c5[_0x3ed846(0x9f)](_0x3ed846(0x8c))&&_0x212f2f[_0x3ed846(0x88)]({'kind':_0x3ed846(0x8c)});const _0x20d6ee=_0x49d3c5[_0x3ed846(0x76)]('from-env')[_0x3ed846(0x94)]();_0x20d6ee&&_0x212f2f['push']({'kind':_0x3ed846(0x8b),'name':_0x20d6ee});const _0x9bfb6e=_0x49d3c5['str'](_0x3ed846(0x97))[_0x3ed846(0x94)]();_0x9bfb6e&&_0x212f2f[_0x3ed846(0x88)]({'kind':_0x3ed846(0x97),'path':_0x9bfb6e});if(_0x212f2f[_0x3ed846(0x89)]===0x0)throw CliErrors[_0x3ed846(0x78)](_0x3ed846(0x6e),'Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x212f2f[_0x3ed846(0x89)]>0x1)throw CliErrors[_0x3ed846(0x78)](_0x3ed846(0x90),_0x3ed846(0x6b));return _0x212f2f[0x0];}export async function assertValueSourceReadable(_0x44913c){const _0x2ff4f4=a29_0x238e62;if(_0x44913c[_0x2ff4f4(0x7a)]===_0x2ff4f4(0x8b)&&!(_0x44913c['name']in process.env))throw CliErrors[_0x2ff4f4(0x78)](_0x2ff4f4(0x92)+_0x44913c[_0x2ff4f4(0x7d)]);if(_0x44913c[_0x2ff4f4(0x7a)]===_0x2ff4f4(0x97))try{await access(_0x44913c[_0x2ff4f4(0x7f)]);}catch{throw CliErrors[_0x2ff4f4(0x78)](_0x2ff4f4(0x9c)+_0x44913c[_0x2ff4f4(0x7f)]);}}export async function readAppConfigValue(_0x3111e6){const _0x57b7b6=a29_0x238e62,_0x58dfde=assertSingleValueSource(_0x3111e6),_0x5ad104=[];if(_0x58dfde[_0x57b7b6(0x7a)]===_0x57b7b6(0x72))return _0x5ad104[_0x57b7b6(0x88)](_0x57b7b6(0xa1)),{'value':_0x58dfde[_0x57b7b6(0xa0)]??'','source':_0x58dfde[_0x57b7b6(0x7a)],'warnings':_0x5ad104};if(_0x58dfde['kind']===_0x57b7b6(0x8c))return{'value':await readStdin(),'source':_0x58dfde[_0x57b7b6(0x7a)],'warnings':_0x5ad104};if(_0x58dfde[_0x57b7b6(0x7a)]===_0x57b7b6(0x8b)){if(!(_0x58dfde[_0x57b7b6(0x7d)]in process.env))throw CliErrors['validation'](_0x57b7b6(0x92)+_0x58dfde['name']);return{'value':process.env[_0x58dfde.name]??'','source':_0x58dfde['kind'],'warnings':_0x5ad104};}return{'value':await readFile(_0x58dfde['path'],_0x57b7b6(0x70)),'source':_0x58dfde[_0x57b7b6(0x7a)],'warnings':_0x5ad104};}function readStdin(){return new Promise((_0x19ccc0,_0x4db90a)=>{const _0x441490=a29_0x305e;let _0x2ce42f='';process['stdin'][_0x441490(0xa2)]('utf8'),process['stdin']['on']('data',_0x12d037=>{_0x2ce42f+=_0x12d037;}),process[_0x441490(0x8c)][_0x441490(0x84)]('end',()=>_0x19ccc0(_0x2ce42f)),process['stdin']['once'](_0x441490(0x9b),_0x4db90a);});}
@@ -1 +1 @@
1
- const a29_0x227b32=a29_0x4831;function a29_0x2d04(){const _0x1ba3f7=['2AaZZXj','Login\x20via\x20browser','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','boolean','568BUAPri','4652940MlVsdM','4673352JONirx','646481kbebQT','527895qcEHZQ','86805EBABGg','yes','Clear\x20login\x20session','70YimfLy','4tOTVhh','4308381jVssma','bool','660891OGUcLL','auth','read','log','login','nonInteractive'];a29_0x2d04=function(){return _0x1ba3f7;};return a29_0x2d04();}(function(_0x3102aa,_0x4e07ad){const _0x3432ea=a29_0x4831,_0x5a3892=_0x3102aa();while(!![]){try{const _0x21b337=-parseInt(_0x3432ea(0x153))/0x1*(-parseInt(_0x3432ea(0x14c))/0x2)+-parseInt(_0x3432ea(0x151))/0x3*(-parseInt(_0x3432ea(0x159))/0x4)+-parseInt(_0x3432ea(0x154))/0x5+-parseInt(_0x3432ea(0x152))/0x6+parseInt(_0x3432ea(0x15a))/0x7+-parseInt(_0x3432ea(0x150))/0x8*(parseInt(_0x3432ea(0x155))/0x9)+-parseInt(_0x3432ea(0x158))/0xa*(parseInt(_0x3432ea(0x15c))/0xb);if(_0x21b337===_0x4e07ad)break;else _0x5a3892['push'](_0x5a3892['shift']());}catch(_0x128dc0){_0x5a3892['push'](_0x5a3892['shift']());}}}(a29_0x2d04,0xc8f47));function a29_0x4831(_0x4e2739,_0x3208da){_0x4e2739=_0x4e2739-0x149;const _0x2d0410=a29_0x2d04();let _0x4831b7=_0x2d0410[_0x4e2739];return _0x4831b7;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a29_0x227b32(0x15d),'command':a29_0x227b32(0x14a),'description':a29_0x227b32(0x14d),'risk':a29_0x227b32(0x15e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'yes','type':a29_0x227b32(0x14f),'description':a29_0x227b32(0x14e),'default':![]}],async 'execute'(_0x260ffb){const _0x3c03ef=a29_0x227b32,{runAuthServer:_0x36295e}=await import('../../auth/auth-server-ui.js');return await _0x36295e({'autoYes':_0x260ffb[_0x3c03ef(0x15b)](_0x3c03ef(0x156)),'nonInteractive':_0x260ffb[_0x3c03ef(0x14b)]}),{'ok':!![]};}},{'service':a29_0x227b32(0x15d),'command':'logout','description':a29_0x227b32(0x157),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2a6ae2){const _0x3ec4cb=a29_0x227b32;return existsSync(cookieFile)?(unlinkSync(cookieFile),console['log']('✓\x20Logged\x20out')):console[_0x3ec4cb(0x149)]('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
1
+ const a30_0x1fdfaf=a30_0x5eea;function a30_0x5c10(){const _0x1e0176=['auth','bool','!\x20Not\x20logged\x20in','5054595GwjqEx','yes','boolean','log','110432zlutcL','✓\x20Logged\x20out','1099845oQYGWJ','write','12030792fobuei','22nwgeBg','Login\x20via\x20browser','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','61303lmCfjr','4182282FioNIb','5245464MEREYP','logout'];a30_0x5c10=function(){return _0x1e0176;};return a30_0x5c10();}(function(_0x60b8fa,_0x36a619){const _0x527ff0=a30_0x5eea,_0x4dc581=_0x60b8fa();while(!![]){try{const _0x8f396c=parseInt(_0x527ff0(0x1e8))/0x1*(parseInt(_0x527ff0(0x1e5))/0x2)+parseInt(_0x527ff0(0x1f5))/0x3+parseInt(_0x527ff0(0x1f3))/0x4+parseInt(_0x527ff0(0x1ef))/0x5+parseInt(_0x527ff0(0x1e9))/0x6+-parseInt(_0x527ff0(0x1ea))/0x7+-parseInt(_0x527ff0(0x1e4))/0x8;if(_0x8f396c===_0x36a619)break;else _0x4dc581['push'](_0x4dc581['shift']());}catch(_0x3e683b){_0x4dc581['push'](_0x4dc581['shift']());}}}(a30_0x5c10,0x7fc39));function a30_0x5eea(_0x7cf8d8,_0x43374c){_0x7cf8d8=_0x7cf8d8-0x1e3;const _0x5c10bc=a30_0x5c10();let _0x5eea38=_0x5c10bc[_0x7cf8d8];return _0x5eea38;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x1fdfaf(0x1ec),'command':'login','description':a30_0x1fdfaf(0x1e6),'risk':a30_0x1fdfaf(0x1e3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'yes','type':a30_0x1fdfaf(0x1f1),'description':a30_0x1fdfaf(0x1e7),'default':![]}],async 'execute'(_0x2c1534){const _0x32b817=a30_0x1fdfaf,{runAuthServer:_0x197825}=await import('../../auth/auth-server-ui.js');return await _0x197825({'autoYes':_0x2c1534[_0x32b817(0x1ed)](_0x32b817(0x1f0)),'nonInteractive':_0x2c1534['nonInteractive']}),{'ok':!![]};}},{'service':a30_0x1fdfaf(0x1ec),'command':a30_0x1fdfaf(0x1eb),'description':'Clear\x20login\x20session','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x574bb4){const _0x4dd628=a30_0x1fdfaf;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x4dd628(0x1f2)](_0x4dd628(0x1f4))):console[_0x4dd628(0x1f2)](_0x4dd628(0x1ee)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a30_0x139da6=a30_0x364a;(function(_0x42958d,_0xf1d4cf){const _0x5abcca=a30_0x364a,_0x13dd92=_0x42958d();while(!![]){try{const _0x30982f=parseInt(_0x5abcca(0x16e))/0x1*(-parseInt(_0x5abcca(0x163))/0x2)+-parseInt(_0x5abcca(0x174))/0x3+-parseInt(_0x5abcca(0x191))/0x4*(-parseInt(_0x5abcca(0x1b8))/0x5)+parseInt(_0x5abcca(0x1bc))/0x6+parseInt(_0x5abcca(0x1b6))/0x7*(-parseInt(_0x5abcca(0x16f))/0x8)+parseInt(_0x5abcca(0x1a5))/0x9+parseInt(_0x5abcca(0x18b))/0xa;if(_0x30982f===_0xf1d4cf)break;else _0x13dd92['push'](_0x13dd92['shift']());}catch(_0xc51bda){_0x13dd92['push'](_0x13dd92['shift']());}}}(a30_0x4367,0x1dc5b));import{createInterface}from'node:readline';function a30_0x364a(_0x432628,_0x4c4a2f){_0x432628=_0x432628-0x156;const _0x436720=a30_0x4367();let _0x364a17=_0x436720[_0x432628];return _0x364a17;}import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';function a30_0x4367(){const _0x216698=['type','/ENDPOINT/','Alias\x20\x22','No\x20datasets\x20found\x20for\x20this\x20app.','after','function-node','ENDPOINT','Script\x20description','修改后的响应结果','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','\x0a\x20*\x20[平台配置]\x20','.js\x0a','nonInteractive','Created\x20','isInteger','1414xIXWyn','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','110785huUYMH','datasetCode','Select\x20dataset:','operationType','503172fGCwkf','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','File\x20already\x20exists:\x20','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','/**\x0a\x20*\x20','description','Script\x20type','alias','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','datasetId','str','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20','name','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','find','map','2kolSEW','当前响应结果','COMMON','\x22\x20not\x20found.\x20','apiDir','scriptsRootDir','stdin','修改后的请求参数','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Select\x20operation\x20type:','UNKNOWN','93089COhFWB','520nHKhUM','\x22.\x20','Select\x20trigger\x20node:','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','694836KfdwVw','validation','/COMMON/','string','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','appCode','stderr','tableName','bff','length','No\x20api.ts\x20found.\x20Run\x20`','Operation\x20type\x20\x22','functionNode','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','write','datasetcode','Available\x20aliases:\x20','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','.js','当前请求参数','/HOOK/','close','trim','972800WnXcXV','source','read','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','create','Function\x20name\x20(valid\x20JS\x20identifier)','36wabjlo','entries','Available:\x20','\x20api\x20pull`\x20to\x20refresh.','HOOK','operation-type','No\x20operation\x20types\x20found\x20for\x20dataset\x20','\x20function:\x20','code','Invalid\x20dataset\x20selection.','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20请求参数\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20TODO:\x20补充返回数据结构\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','\x0a\x20*\x20[参数字段]\x20按实际请求体为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20HTTP\x20请求体参数\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20TODO:\x20补充业务返回数据结构\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','\x20*\x20[依赖数据集]\x20无(如有依赖,填写数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20类型与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','Dataset\x20not\x20found\x20for\x20code\x20\x22','before','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','join','713007pkVqeo'];a30_0x4367=function(){return _0x216698;};return a30_0x4367();}import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':a30_0x139da6(0x17c),'command':a30_0x139da6(0x18f),'description':a30_0x139da6(0x1be),'risk':a30_0x139da6(0x18d),'flags':[{'name':a30_0x139da6(0x1a6),'type':a30_0x139da6(0x177),'required':!![],'enum':['COMMON',a30_0x139da6(0x1ac),a30_0x139da6(0x195)],'description':a30_0x139da6(0x158)},{'name':a30_0x139da6(0x15f),'type':a30_0x139da6(0x177),'required':!![],'description':a30_0x139da6(0x190)},{'name':a30_0x139da6(0x157),'type':a30_0x139da6(0x177),'description':a30_0x139da6(0x1ad)},{'name':a30_0x139da6(0x159),'type':'string','description':a30_0x139da6(0x160)},{'name':a30_0x139da6(0x183),'type':a30_0x139da6(0x177),'description':'Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)'},{'name':a30_0x139da6(0x196),'type':a30_0x139da6(0x177),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':'function-node','type':'string','description':'Trigger\x20node\x20(HOOK\x20only)','enum':['before',a30_0x139da6(0x1aa)]}],async 'validate'(_0x33efc5){const _0x2c4d51=a30_0x139da6,_0x3615b2=_0x33efc5[_0x2c4d51(0x15d)](_0x2c4d51(0x15f));if(!isValidBffFunctionName(_0x3615b2))throw CliErrors[_0x2c4d51(0x175)]('Invalid\x20function\x20name\x20\x22'+_0x3615b2+_0x2c4d51(0x178));},async 'execute'(_0x180ddf){const _0x38a261=a30_0x139da6,_0x4c67e3=loadBffProjectConfig(_0x180ddf['appCode']),_0x59a3dd=_0x180ddf[_0x38a261(0x15d)]('type'),_0x45793d=_0x180ddf[_0x38a261(0x15d)]('name'),_0x4b7584=_0x180ddf[_0x38a261(0x15d)]('description')||undefined,_0x5564d9=_0x59a3dd===_0x38a261(0x195)?await resolveHookOptions(_0x4c67e3,_0x180ddf):undefined,_0x54af10=buildFilePath(_0x4c67e3,_0x59a3dd,_0x45793d,_0x5564d9);if(await fileExists(_0x54af10))throw CliErrors[_0x38a261(0x175)](_0x38a261(0x1bf)+_0x54af10);await mkdir(dirname(_0x54af10),{'recursive':!![]});const _0x2a170b=generateTemplate(_0x59a3dd,_0x45793d,_0x180ddf[_0x38a261(0x179)],_0x4b7584,_0x5564d9);await writeFile(_0x54af10,_0x2a170b,'utf8');const _0x118e76={'type':_0x59a3dd,'name':_0x45793d,'path':_0x54af10};if(_0x4b7584)_0x118e76['description']=_0x4b7584;if(_0x5564d9){if(_0x5564d9[_0x38a261(0x159)])_0x118e76['alias']=_0x5564d9[_0x38a261(0x159)];_0x118e76['datasetCode']=_0x5564d9[_0x38a261(0x1b9)],_0x118e76[_0x38a261(0x1bb)]=_0x5564d9[_0x38a261(0x1bb)],_0x118e76[_0x38a261(0x180)]=_0x5564d9[_0x38a261(0x180)];}return{'ok':!![],'data':_0x118e76,'message':_0x38a261(0x1b4)+_0x59a3dd+_0x38a261(0x198)+_0x45793d};}};async function resolveHookOptions(_0x29cea3,_0x33d448){const _0x47e6bc=a30_0x139da6,_0x43922f=loadAliasMap(_0x33d448[_0x47e6bc(0x167)],undefined,resolveApiFilePath(_0x33d448[_0x47e6bc(0x167)],_0x33d448[_0x47e6bc(0x179)])),_0x1c2614=_0x43922f[_0x47e6bc(0x17d)]>0x0;let _0x4fad0d,_0x1ccf59,_0x4f97e0;const _0x555c15=_0x33d448[_0x47e6bc(0x15d)](_0x47e6bc(0x159)),_0x33d43c=_0x33d448['str'](_0x47e6bc(0x183));if(_0x555c15){const _0x521c37=resolveAlias(_0x33d448[_0x47e6bc(0x167)],_0x555c15,undefined,resolveApiFilePath(_0x33d448[_0x47e6bc(0x167)],_0x33d448[_0x47e6bc(0x179)]));if(!_0x521c37){const _0x4167c5=_0x1c2614?_0x47e6bc(0x184)+_0x43922f[_0x47e6bc(0x162)](_0x2b7618=>_0x2b7618[_0x47e6bc(0x159)])[_0x47e6bc(0x1a4)](',\x20'):_0x47e6bc(0x17e)+CLI_BIN_NAME+_0x47e6bc(0x1bd);throw CliErrors[_0x47e6bc(0x175)](_0x47e6bc(0x1a8)+_0x555c15+_0x47e6bc(0x166)+_0x4167c5);}_0x4fad0d=_0x555c15,_0x1ccf59=_0x521c37;}else{if(_0x33d43c){_0x1ccf59=_0x33d43c;const _0x3231da=_0x43922f[_0x47e6bc(0x161)](_0x3cfc42=>_0x3cfc42['datasetCode']===_0x33d43c);_0x4fad0d=_0x3231da?.['alias'];}else{if(_0x33d448[_0x47e6bc(0x1b3)])throw CliErrors[_0x47e6bc(0x175)](_0x47e6bc(0x19e));else{if(_0x1c2614){const _0x4aad67=_0x43922f['map'](_0x1da85e=>_0x1da85e['alias']+'\x20('+_0x1da85e[_0x47e6bc(0x17b)]+')'),_0x39d2c7=await promptSelect(_0x47e6bc(0x1ba),_0x4aad67),_0x4b75cc=_0x43922f[_0x39d2c7];if(!_0x4b75cc)throw CliErrors['validation'](_0x47e6bc(0x19a));_0x4fad0d=_0x4b75cc['alias'],_0x1ccf59=_0x4b75cc[_0x47e6bc(0x1b9)];}else{const _0xee0558=await listDatasets(_0x33d448['appCode']);if(_0xee0558[_0x47e6bc(0x17d)]===0x0)throw CliErrors['validation'](_0x47e6bc(0x1a9));const _0x5f572d=_0xee0558[_0x47e6bc(0x162)](_0x37a3ca=>_0x37a3ca['name']+'\x20['+(_0x37a3ca[_0x47e6bc(0x18c)]??_0x47e6bc(0x16d))+']\x20('+_0x37a3ca[_0x47e6bc(0x199)]+')'),_0xdf6a91=await promptSelect(_0x47e6bc(0x1ba),_0x5f572d),_0x398d63=_0xee0558[_0xdf6a91];if(!_0x398d63)throw CliErrors[_0x47e6bc(0x175)](_0x47e6bc(0x19a));_0x1ccf59=_0x398d63[_0x47e6bc(0x199)],_0x4fad0d=undefined;}}}}const _0x93cb45=await listDatasets(_0x33d448[_0x47e6bc(0x179)]),_0x566870=_0x93cb45[_0x47e6bc(0x161)](_0x165e14=>_0x165e14[_0x47e6bc(0x199)]===_0x1ccf59);if(!_0x566870)throw CliErrors['validation'](_0x47e6bc(0x1a1)+_0x1ccf59+_0x47e6bc(0x170)+(_0x4fad0d?_0x47e6bc(0x185)+CLI_BIN_NAME+_0x47e6bc(0x194):''));_0x4f97e0=_0x566870['id'];const _0x10cd12=_0x4fad0d??_0x1ccf59,_0x4401c5=await listBffDatasetOperations(_0x33d448[_0x47e6bc(0x179)],_0x4f97e0),_0x36b8a3=_0x4401c5?Object['keys'](_0x4401c5):[];if(_0x36b8a3[_0x47e6bc(0x17d)]===0x0)throw CliErrors['validation'](_0x47e6bc(0x197)+_0x10cd12+'.');let _0x46c16f;const _0x52d338=_0x33d448['str'](_0x47e6bc(0x196));if(_0x52d338){if(!_0x36b8a3['includes'](_0x52d338))throw CliErrors[_0x47e6bc(0x175)](_0x47e6bc(0x17f)+_0x52d338+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x10cd12+'.\x20'+(_0x47e6bc(0x193)+_0x36b8a3[_0x47e6bc(0x1a4)](',\x20')));_0x46c16f=_0x52d338;}else{if(_0x33d448[_0x47e6bc(0x1b3)])throw CliErrors[_0x47e6bc(0x175)](_0x47e6bc(0x1c0));const _0x4a53d0=await promptSelect(_0x47e6bc(0x16c),_0x36b8a3);_0x46c16f=_0x36b8a3[_0x4a53d0]??_0x36b8a3[0x0];}let _0x57be6b=normalizeHookFunctionNode(_0x33d448['str'](_0x47e6bc(0x1ab)));if(!_0x57be6b){if(_0x33d448[_0x47e6bc(0x15d)](_0x47e6bc(0x1ab)))throw CliErrors[_0x47e6bc(0x175)](_0x47e6bc(0x15a));if(_0x33d448[_0x47e6bc(0x1b3)])throw CliErrors[_0x47e6bc(0x175)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x282c1f=await promptSelect(_0x47e6bc(0x171),['before','after']);_0x57be6b=['before',_0x47e6bc(0x1aa)][_0x282c1f]??'before';}return{'alias':_0x4fad0d,'datasetCode':_0x1ccf59,'datasetId':_0x4f97e0,'operationType':_0x46c16f,'functionNode':_0x57be6b};}async function promptSelect(_0x2fcdf8,_0x1f782a){const _0x43bbea=a30_0x139da6;if(_0x1f782a['length']===0x1)return 0x0;for(const [_0x440936,_0x54848b]of _0x1f782a[_0x43bbea(0x192)]()){process['stderr']['write']('\x20\x20'+(_0x440936+0x1)+'.\x20'+_0x54848b+'\x0a');}const _0x1a4549=createInterface({'input':process[_0x43bbea(0x169)],'output':process[_0x43bbea(0x17a)]});while(!![]){const _0xaacf52=await new Promise(_0x4a3b08=>{_0x1a4549['question'](_0x2fcdf8+'\x20',_0x4a3b08);}),_0x3dac05=Number['parseInt'](_0xaacf52[_0x43bbea(0x18a)](),0xa);if(Number[_0x43bbea(0x1b5)](_0x3dac05)&&_0x3dac05>=0x1&&_0x3dac05<=_0x1f782a[_0x43bbea(0x17d)])return _0x1a4549[_0x43bbea(0x189)](),_0x3dac05-0x1;process[_0x43bbea(0x17a)][_0x43bbea(0x182)](_0x43bbea(0x1b7)+_0x1f782a[_0x43bbea(0x17d)]+'.\x0a');}}function buildFilePath(_0x157ca0,_0x5400b0,_0x25f0db,_0x3f9ff4){const _0x2e2749=a30_0x139da6;if(_0x5400b0===_0x2e2749(0x195)){if(!_0x3f9ff4)throw CliErrors[_0x2e2749(0x175)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x4a62af=_0x3f9ff4[_0x2e2749(0x159)]??_0x3f9ff4[_0x2e2749(0x1b9)];return join(_0x157ca0['scriptsRootDir'],_0x2e2749(0x195),_0x4a62af,_0x3f9ff4[_0x2e2749(0x1bb)],_0x3f9ff4['functionNode'],_0x25f0db+_0x2e2749(0x186));}return join(_0x157ca0[_0x2e2749(0x168)],_0x5400b0,_0x25f0db+_0x2e2749(0x186));}export function generateTemplate(_0x2d7c30,_0x572f7d,_0x5f556a,_0x1d1501,_0x3f749a){const _0x2eac84=a30_0x139da6,_0x51281d=_0x1d1501?.[_0x2eac84(0x18a)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x7d6dd4=getAppBaseUrl(_0x5f556a),_0xd459e7=_0x2eac84(0x1a0);if(_0x2d7c30===_0x2eac84(0x165))return _0x2eac84(0x156)+_0x51281d+_0x2eac84(0x1af)+_0x572f7d+_0x2eac84(0x1b1)+_0x7d6dd4+_0x2eac84(0x18e)+_0x5f556a+_0x2eac84(0x176)+_0x572f7d+_0x2eac84(0x19c)+_0x572f7d+'\x22,\x20params\x20})\x0a'+_0xd459e7+_0x2eac84(0x19b)+_0x572f7d+_0x2eac84(0x16b);if(_0x2d7c30==='ENDPOINT')return _0x2eac84(0x156)+_0x51281d+_0x2eac84(0x19f)+_0x572f7d+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/'+_0x5f556a+'/'+_0x572f7d+_0x2eac84(0x1b1)+_0x7d6dd4+_0x2eac84(0x18e)+_0x5f556a+_0x2eac84(0x1a7)+_0x572f7d+_0x2eac84(0x1b2)+_0xd459e7+_0x2eac84(0x19d)+_0x572f7d+_0x2eac84(0x16b);if(!_0x3f749a)throw CliErrors[_0x2eac84(0x175)](_0x2eac84(0x181));const _0x59b440=_0x3f749a[_0x2eac84(0x159)]??_0x3f749a[_0x2eac84(0x1b9)],_0x2037ea=_0x3f749a['functionNode']===_0x2eac84(0x1a2)?_0x2eac84(0x187):_0x2eac84(0x164),_0x482231=_0x3f749a[_0x2eac84(0x180)]==='before'?_0x2eac84(0x16a):_0x2eac84(0x1ae);return _0x2eac84(0x156)+_0x51281d+_0x2eac84(0x15e)+_0x572f7d+_0x2eac84(0x173)+_0x5f556a+'/'+_0x3f749a[_0x2eac84(0x1b9)]+'/'+_0x3f749a['operationType']+_0x2eac84(0x1b1)+_0x7d6dd4+'/data/dataset/'+_0x3f749a[_0x2eac84(0x15c)]+_0x2eac84(0x172)+_0x5f556a+_0x2eac84(0x188)+_0x59b440+'/'+_0x3f749a[_0x2eac84(0x1bb)]+'/'+_0x3f749a['functionNode']+'/'+_0x572f7d+'.js\x0a\x20*\x20[触发节点]\x20'+_0x3f749a[_0x2eac84(0x180)]+'\x0a'+_0xd459e7+_0x2eac84(0x15b)+_0x2037ea+_0x2eac84(0x1a3)+_0x482231+_0x2eac84(0x1b0)+_0x572f7d+_0x2eac84(0x16b);}
1
+ const a31_0x373629=a31_0x2048;(function(_0x114411,_0x56d153){const _0x44c734=a31_0x2048,_0x4372fa=_0x114411();while(!![]){try{const _0xa1e3c0=-parseInt(_0x44c734(0xfa))/0x1*(parseInt(_0x44c734(0xf3))/0x2)+-parseInt(_0x44c734(0xe5))/0x3+parseInt(_0x44c734(0xd5))/0x4+-parseInt(_0x44c734(0xe3))/0x5*(parseInt(_0x44c734(0x10f))/0x6)+-parseInt(_0x44c734(0xd7))/0x7*(parseInt(_0x44c734(0xcf))/0x8)+parseInt(_0x44c734(0x11c))/0x9*(parseInt(_0x44c734(0xe1))/0xa)+parseInt(_0x44c734(0xe4))/0xb;if(_0xa1e3c0===_0x56d153)break;else _0x4372fa['push'](_0x4372fa['shift']());}catch(_0x2b3d04){_0x4372fa['push'](_0x4372fa['shift']());}}}(a31_0x14ce,0xab276));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';function a31_0x2048(_0x269ef6,_0x37ffd5){_0x269ef6=_0x269ef6-0xc4;const _0x14cef1=a31_0x14ce();let _0x20485f=_0x14cef1[_0x269ef6];return _0x20485f;}import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':a31_0x373629(0xee),'command':a31_0x373629(0xde),'description':a31_0x373629(0xd4),'risk':'read','flags':[{'name':a31_0x373629(0x105),'type':a31_0x373629(0x122),'required':!![],'enum':['COMMON','ENDPOINT',a31_0x373629(0xcb)],'description':a31_0x373629(0xfc)},{'name':a31_0x373629(0xeb),'type':'string','required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0x373629(0xc7),'type':a31_0x373629(0x122),'description':a31_0x373629(0x109)},{'name':a31_0x373629(0x113),'type':a31_0x373629(0x122),'description':a31_0x373629(0xd0)},{'name':a31_0x373629(0x10b),'type':a31_0x373629(0x122),'description':a31_0x373629(0xd1)},{'name':'operation-type','type':a31_0x373629(0x122),'description':a31_0x373629(0x117)},{'name':a31_0x373629(0xf5),'type':'string','description':a31_0x373629(0x124),'enum':['before',a31_0x373629(0x118)]}],async 'validate'(_0x1efadd){const _0x14a1f7=a31_0x373629,_0x27ffd3=_0x1efadd[_0x14a1f7(0x116)](_0x14a1f7(0xeb));if(!isValidBffFunctionName(_0x27ffd3))throw CliErrors['validation'](_0x14a1f7(0xd3)+_0x27ffd3+_0x14a1f7(0x129));},async 'execute'(_0x33c273){const _0x373977=a31_0x373629,_0x1c4526=loadBffProjectConfig(_0x33c273['appCode']),_0x2b8cd5=_0x33c273[_0x373977(0x116)](_0x373977(0x105)),_0x4156be=_0x33c273[_0x373977(0x116)]('name'),_0x357fce=_0x33c273[_0x373977(0x116)](_0x373977(0xc7))||undefined,_0x271d31=_0x2b8cd5===_0x373977(0xcb)?await resolveHookOptions(_0x1c4526,_0x33c273):undefined,_0x3edb0a=buildFilePath(_0x1c4526,_0x2b8cd5,_0x4156be,_0x271d31);if(await fileExists(_0x3edb0a))throw CliErrors['validation']('File\x20already\x20exists:\x20'+_0x3edb0a);await mkdir(dirname(_0x3edb0a),{'recursive':!![]});const _0x40b668=generateTemplate(_0x2b8cd5,_0x4156be,_0x33c273[_0x373977(0xda)],_0x357fce,_0x271d31);await writeFile(_0x3edb0a,_0x40b668,_0x373977(0x12d));const _0x89a3d8={'type':_0x2b8cd5,'name':_0x4156be,'path':_0x3edb0a};if(_0x357fce)_0x89a3d8[_0x373977(0xc7)]=_0x357fce;if(_0x271d31){if(_0x271d31[_0x373977(0x113)])_0x89a3d8['alias']=_0x271d31[_0x373977(0x113)];_0x89a3d8[_0x373977(0x12a)]=_0x271d31[_0x373977(0x12a)],_0x89a3d8[_0x373977(0xe9)]=_0x271d31['operationType'],_0x89a3d8[_0x373977(0xce)]=_0x271d31[_0x373977(0xce)];}return{'ok':!![],'data':_0x89a3d8,'message':_0x373977(0xf4)+_0x2b8cd5+_0x373977(0xc8)+_0x4156be};}};async function resolveHookOptions(_0x509a93,_0x3b23ca){const _0x3e5c63=a31_0x373629,_0x179745=loadAliasMap(_0x3b23ca[_0x3e5c63(0xd6)],undefined,resolveApiFilePath(_0x3b23ca[_0x3e5c63(0xd6)],_0x3b23ca[_0x3e5c63(0xda)])),_0x5c6c31=_0x179745['length']>0x0;let _0x2ac5d6,_0x33ca8c,_0x12cd58;const _0x38ce32=_0x3b23ca[_0x3e5c63(0x116)]('alias'),_0x1cc02c=_0x3b23ca[_0x3e5c63(0x116)]('datasetcode');if(_0x38ce32){const _0xd39305=resolveAlias(_0x3b23ca['apiDir'],_0x38ce32,undefined,resolveApiFilePath(_0x3b23ca[_0x3e5c63(0xd6)],_0x3b23ca['appCode']));if(!_0xd39305){const _0x59307a=_0x5c6c31?_0x3e5c63(0x11e)+_0x179745[_0x3e5c63(0xcc)](_0x13b8ed=>_0x13b8ed['alias'])['join'](',\x20'):_0x3e5c63(0x126)+CLI_BIN_NAME+_0x3e5c63(0xe7);throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0xea)+_0x38ce32+'\x22\x20not\x20found.\x20'+_0x59307a);}_0x2ac5d6=_0x38ce32,_0x33ca8c=_0xd39305;}else{if(_0x1cc02c){_0x33ca8c=_0x1cc02c;const _0x2257dc=_0x179745[_0x3e5c63(0xf9)](_0x1dcdbf=>_0x1dcdbf[_0x3e5c63(0x12a)]===_0x1cc02c);_0x2ac5d6=_0x2257dc?.['alias'];}else{if(_0x3b23ca[_0x3e5c63(0x12b)])throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0xdd));else{if(_0x5c6c31){const _0x3d12dd=_0x179745[_0x3e5c63(0xcc)](_0x57aac5=>_0x57aac5[_0x3e5c63(0x113)]+'\x20('+_0x57aac5['tableName']+')'),_0x39bd7d=await promptSelect(_0x3e5c63(0x108),_0x3d12dd),_0x34696a=_0x179745[_0x39bd7d];if(!_0x34696a)throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x120));_0x2ac5d6=_0x34696a['alias'],_0x33ca8c=_0x34696a[_0x3e5c63(0x12a)];}else{const _0x48000b=await listDatasets(_0x3b23ca['appCode']);if(_0x48000b[_0x3e5c63(0x114)]===0x0)throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x101));const _0x24b48f=_0x48000b['map'](_0x390b97=>_0x390b97['name']+'\x20['+(_0x390b97[_0x3e5c63(0xd2)]??'UNKNOWN')+_0x3e5c63(0xe0)+_0x390b97[_0x3e5c63(0x100)]+')'),_0x332f7b=await promptSelect(_0x3e5c63(0x108),_0x24b48f),_0x363a2c=_0x48000b[_0x332f7b];if(!_0x363a2c)throw CliErrors['validation'](_0x3e5c63(0x120));_0x33ca8c=_0x363a2c[_0x3e5c63(0x100)],_0x2ac5d6=undefined;}}}}const _0x417ba9=await listDatasets(_0x3b23ca[_0x3e5c63(0xda)]),_0x1fd672=_0x417ba9[_0x3e5c63(0xf9)](_0x46577b=>_0x46577b[_0x3e5c63(0x100)]===_0x33ca8c);if(!_0x1fd672)throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0xd8)+_0x33ca8c+'\x22.\x20'+(_0x2ac5d6?_0x3e5c63(0xc6)+CLI_BIN_NAME+_0x3e5c63(0xff):''));_0x12cd58=_0x1fd672['id'];const _0x106038=_0x2ac5d6??_0x33ca8c,_0x2c2b5e=await listBffDatasetOperations(_0x3b23ca[_0x3e5c63(0xda)],_0x12cd58),_0x1287f1=_0x2c2b5e?Object[_0x3e5c63(0xf8)](_0x2c2b5e):[];if(_0x1287f1[_0x3e5c63(0x114)]===0x0)throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x10e)+_0x106038+'.');let _0x3e9a1e;const _0x598823=_0x3b23ca[_0x3e5c63(0x116)](_0x3e5c63(0xc9));if(_0x598823){if(!_0x1287f1[_0x3e5c63(0x12c)](_0x598823))throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x127)+_0x598823+_0x3e5c63(0xed)+_0x106038+'.\x20'+('Available:\x20'+_0x1287f1[_0x3e5c63(0xe2)](',\x20')));_0x3e9a1e=_0x598823;}else{if(_0x3b23ca['nonInteractive'])throw CliErrors['validation'](_0x3e5c63(0xe6));const _0x4727a5=await promptSelect('Select\x20operation\x20type:',_0x1287f1);_0x3e9a1e=_0x1287f1[_0x4727a5]??_0x1287f1[0x0];}let _0x51b89e=normalizeHookFunctionNode(_0x3b23ca[_0x3e5c63(0x116)]('function-node'));if(!_0x51b89e){if(_0x3b23ca['str'](_0x3e5c63(0xf5)))throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x11f));if(_0x3b23ca[_0x3e5c63(0x12b)])throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0xcd));const _0x5e7caf=await promptSelect('Select\x20trigger\x20node:',[_0x3e5c63(0x112),_0x3e5c63(0x118)]);_0x51b89e=['before',_0x3e5c63(0x118)][_0x5e7caf]??_0x3e5c63(0x112);}return{'alias':_0x2ac5d6,'datasetCode':_0x33ca8c,'datasetId':_0x12cd58,'operationType':_0x3e9a1e,'functionNode':_0x51b89e};}async function promptSelect(_0x4b9eac,_0x20a9dd){const _0x48b64d=a31_0x373629;if(_0x20a9dd[_0x48b64d(0x114)]===0x1)return 0x0;for(const [_0x5eef09,_0x498edc]of _0x20a9dd[_0x48b64d(0x104)]()){process[_0x48b64d(0x128)]['write']('\x20\x20'+(_0x5eef09+0x1)+'.\x20'+_0x498edc+'\x0a');}const _0x21ec2b=createInterface({'input':process[_0x48b64d(0xf6)],'output':process[_0x48b64d(0x128)]});while(!![]){const _0x4a3a9a=await new Promise(_0x273f39=>{const _0x36365c=_0x48b64d;_0x21ec2b[_0x36365c(0x107)](_0x4b9eac+'\x20',_0x273f39);}),_0x45a3e3=Number[_0x48b64d(0x125)](_0x4a3a9a['trim'](),0xa);if(Number[_0x48b64d(0xf7)](_0x45a3e3)&&_0x45a3e3>=0x1&&_0x45a3e3<=_0x20a9dd[_0x48b64d(0x114)])return _0x21ec2b[_0x48b64d(0xfe)](),_0x45a3e3-0x1;process['stderr'][_0x48b64d(0xc5)](_0x48b64d(0x11b)+_0x20a9dd[_0x48b64d(0x114)]+'.\x0a');}}function buildFilePath(_0x4ba772,_0x316d6c,_0x59cc54,_0x9139f){const _0x2fb2f6=a31_0x373629;if(_0x316d6c==='HOOK'){if(!_0x9139f)throw CliErrors[_0x2fb2f6(0xfb)](_0x2fb2f6(0x103));const _0x26d13b=_0x9139f[_0x2fb2f6(0x113)]??_0x9139f[_0x2fb2f6(0x12a)];return join(_0x4ba772[_0x2fb2f6(0xe8)],'HOOK',_0x26d13b,_0x9139f['operationType'],_0x9139f[_0x2fb2f6(0xce)],_0x59cc54+'.js');}return join(_0x4ba772[_0x2fb2f6(0xe8)],_0x316d6c,_0x59cc54+_0x2fb2f6(0x10a));}function a31_0x14ce(){const _0xceac7c=['.js\x0a','appCode','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','create','ENDPOINT',']\x20(','10xbCPvx','join','544150mPKror','13834953qRScxK','1749375vyrgDH','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','scriptsRootDir','operationType','Alias\x20\x22','name','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','\x22\x20not\x20found\x20for\x20dataset\x20','bff','/HOOK/','\x0a\x20*\x20[参数字段]\x20按实际请求体为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20HTTP\x20请求体参数\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20TODO:\x20补充业务返回数据结构\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','/ENDPOINT/','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20','2TDwdbP','Created\x20','function-node','stdin','isInteger','keys','find','962222CjzeoI','validation','Script\x20type','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','close','\x20api\x20pull`\x20to\x20refresh.','code','No\x20datasets\x20found\x20for\x20this\x20app.','当前响应结果','HOOK\x20requires\x20alias/operation/node\x20options.','entries','type','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','question','Select\x20dataset:','Script\x20description','.js','datasetcode','当前请求参数','.js\x0a\x20*\x20[触发节点]\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','30GvRFQj','\x0a\x20*\x20[平台配置]\x20','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','before','alias','length','\x22,\x20params\x20})\x0a','str','Operation\x20type\x20(HOOK\x20only)','after','修改后的响应结果','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','7143678xqVrAF','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Available\x20aliases:\x20','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','Invalid\x20dataset\x20selection.','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','string','COMMON','Trigger\x20node\x20(HOOK\x20only)','parseInt','No\x20api.ts\x20found.\x20Run\x20`','Operation\x20type\x20\x22','stderr','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','datasetCode','nonInteractive','includes','utf8','/**\x0a\x20*\x20','write','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','description','\x20function:\x20','operation-type','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20请求参数\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20TODO:\x20补充返回数据结构\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','HOOK','map','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','functionNode','17776GEvpsx','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','source','Invalid\x20function\x20name\x20\x22','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','3329608YacvRQ','apiDir','294WYRTyh','Dataset\x20not\x20found\x20for\x20code\x20\x22'];a31_0x14ce=function(){return _0xceac7c;};return a31_0x14ce();}export function generateTemplate(_0x3c74a2,_0x55d293,_0x3c46c1,_0x5f5443,_0x23735e){const _0x3b5b5c=a31_0x373629,_0x3ca1bf=_0x5f5443?.['trim']()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x52d041=getAppBaseUrl(_0x3c46c1),_0x1766d6='\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)';if(_0x3c74a2===_0x3b5b5c(0x123))return _0x3b5b5c(0xc4)+_0x3ca1bf+_0x3b5b5c(0xfd)+_0x55d293+_0x3b5b5c(0x110)+_0x52d041+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x3c46c1+'/COMMON/'+_0x55d293+_0x3b5b5c(0xdb)+_0x55d293+_0x3b5b5c(0x115)+_0x1766d6+_0x3b5b5c(0xca)+_0x55d293+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x3c74a2===_0x3b5b5c(0xdf))return _0x3b5b5c(0xc4)+_0x3ca1bf+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20'+_0x55d293+_0x3b5b5c(0xdc)+_0x3c46c1+'/'+_0x55d293+'\x0a\x20*\x20[平台配置]\x20'+_0x52d041+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x3c46c1+_0x3b5b5c(0xf1)+_0x55d293+_0x3b5b5c(0xd9)+_0x1766d6+_0x3b5b5c(0xf0)+_0x55d293+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x23735e)throw CliErrors[_0x3b5b5c(0xfb)](_0x3b5b5c(0xec));const _0x4765bd=_0x23735e[_0x3b5b5c(0x113)]??_0x23735e[_0x3b5b5c(0x12a)],_0x4e839e=_0x23735e[_0x3b5b5c(0xce)]==='before'?_0x3b5b5c(0x10c):_0x3b5b5c(0x102),_0x3d5f28=_0x23735e[_0x3b5b5c(0xce)]===_0x3b5b5c(0x112)?'修改后的请求参数':_0x3b5b5c(0x119);return _0x3b5b5c(0xc4)+_0x3ca1bf+_0x3b5b5c(0xf2)+_0x55d293+_0x3b5b5c(0x121)+_0x3c46c1+'/'+_0x23735e[_0x3b5b5c(0x12a)]+'/'+_0x23735e['operationType']+_0x3b5b5c(0x110)+_0x52d041+'/data/dataset/'+_0x23735e['datasetId']+_0x3b5b5c(0x111)+_0x3c46c1+_0x3b5b5c(0xef)+_0x4765bd+'/'+_0x23735e['operationType']+'/'+_0x23735e[_0x3b5b5c(0xce)]+'/'+_0x55d293+_0x3b5b5c(0x10d)+_0x23735e['functionNode']+'\x0a'+_0x1766d6+_0x3b5b5c(0x106)+_0x4e839e+_0x3b5b5c(0x11a)+_0x3d5f28+'\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x55d293+_0x3b5b5c(0x11d);}
@@ -1 +1 @@
1
- const a31_0x59a7ad=a31_0xbb24;(function(_0x1b1c59,_0x1f7619){const _0x3a6188=a31_0xbb24,_0x59fb1d=_0x1b1c59();while(!![]){try{const _0x44e796=parseInt(_0x3a6188(0x105))/0x1*(parseInt(_0x3a6188(0x10c))/0x2)+-parseInt(_0x3a6188(0x107))/0x3+-parseInt(_0x3a6188(0xe9))/0x4*(parseInt(_0x3a6188(0x111))/0x5)+parseInt(_0x3a6188(0x10d))/0x6*(parseInt(_0x3a6188(0xfd))/0x7)+-parseInt(_0x3a6188(0xee))/0x8+-parseInt(_0x3a6188(0xeb))/0x9*(parseInt(_0x3a6188(0xe7))/0xa)+parseInt(_0x3a6188(0xf0))/0xb;if(_0x44e796===_0x1f7619)break;else _0x59fb1d['push'](_0x59fb1d['shift']());}catch(_0x25617a){_0x59fb1d['push'](_0x59fb1d['shift']());}}}(a31_0x2c7b,0xa572f));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a31_0x2c7b(){const _0x4bd284=['functions','41259075GadxMx','high-risk-write','Multiple\x20functions\x20match\x20\x22','str','split','apps','length','stringify','remoteId','validation','startsWith','find','Function\x20not\x20found:\x20','192759SwfpeZ','scriptsRootDir','keys','/api/management/library/scripts/delete','POST','\x22\x20not\x20found\x20after\x20ensureLockScope.','appCode','includes','1VGrqkW','No\x20lock\x20entry\x20found\x20for\x20\x22','3420951iFoHMr','\x20(local\x20file\x20moved\x20to\x20trash)','delete','toISOString','trashDir','610754WpOEiG','42TCLTwj','projectRoot','target','trashedTo','4378515wloPSc','parse','lockFilePath','Local\x20delete\x20not\x20settled\x20for\x20','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','replace','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','1263050fSHphJ','scriptsRoot','4nheUsA','string','63hLyLnX','\x20\x20-\x20','<timestamp>','5369016CsbWrv'];a31_0x2c7b=function(){return _0x4bd284;};return a31_0x2c7b();}import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':'bff','command':a31_0x59a7ad(0x109),'description':a31_0x59a7ad(0x115),'risk':a31_0x59a7ad(0xf1),'flags':[{'name':a31_0x59a7ad(0x10f),'type':a31_0x59a7ad(0xea),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0x44dbe1){const _0x4d618a=a31_0x59a7ad,_0x4deb38=loadBffProjectConfig(_0x44dbe1['appCode']),_0x5c9ebe=await readBffLockFile(_0x4deb38[_0x4d618a(0x113)]);if(!_0x5c9ebe)throw CliErrors[_0x4d618a(0xf9)]('Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x471ee5){const _0x350838=a31_0x59a7ad,_0x12ea0a=loadBffProjectConfig(_0x471ee5['appCode']),_0x2a934c=await readBffLockFile(_0x12ea0a[_0x350838(0x113)]);if(!_0x2a934c)throw CliErrors[_0x350838(0xf9)]('Backend\x20Function\x20lock\x20file\x20not\x20found.');const {appLock:_0x269055}=ensureLockScope(_0x2a934c,_0x471ee5[_0x350838(0x103)],_0x12ea0a[_0x350838(0xe8)],_0x350838(0x109)),_0x13c41c=_0x471ee5[_0x350838(0xf3)](_0x350838(0x10f)),_0x4290cf=Object[_0x350838(0xff)](_0x269055[_0x350838(0xef)]),_0x140137=resolveDeleteTarget(_0x13c41c,_0x4290cf),_0x35d75a=_0x269055['functions'][_0x140137];if(!_0x35d75a)throw CliErrors['validation']('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x140137+'\x22.');const _0x52d111=resolveLocalFilePathFromLockKey(_0x12ea0a,_0x140137),_0x4262b6=relative(_0x12ea0a[_0x350838(0x10e)],_0x52d111),_0x25a940=join(_0x12ea0a[_0x350838(0x10b)],_0x350838(0xed),_0x4262b6);return{'method':_0x350838(0x101),'url':_0x350838(0x100),'body':{'appCode':_0x471ee5[_0x350838(0x103)],'target':_0x140137,'remoteId':_0x35d75a[_0x350838(0xf8)],'localFilePath':_0x52d111,'trashedPath':_0x25a940},'description':'Would\x20delete\x20'+_0x140137+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x108ceb){const _0x442a98=a31_0x59a7ad,_0x1ff97a=loadBffProjectConfig(_0x108ceb[_0x442a98(0x103)]),_0x2a5f12=await readBffLockFile(_0x1ff97a[_0x442a98(0x113)]);if(!_0x2a5f12)throw CliErrors[_0x442a98(0xf9)]('Backend\x20Function\x20lock\x20file\x20not\x20found.');const {lockData:_0x433ac0,appLock:_0x3dec23}=ensureLockScope(_0x2a5f12,_0x108ceb['appCode'],_0x1ff97a[_0x442a98(0xe8)],_0x442a98(0x109)),_0x1cfb4b=JSON[_0x442a98(0x112)](JSON[_0x442a98(0xf7)](_0x433ac0)),_0x25ac01=_0x1cfb4b[_0x442a98(0xf5)][_0x108ceb['appCode']];if(!_0x25ac01)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x108ceb['appCode']+_0x442a98(0x102));const _0x5c5526=_0x108ceb['str'](_0x442a98(0x10f)),_0x2b9f5f=Object[_0x442a98(0xff)](_0x25ac01[_0x442a98(0xef)]),_0x3160d9=resolveDeleteTarget(_0x5c5526,_0x2b9f5f),_0x8e68f7=_0x25ac01['functions'][_0x3160d9];if(!_0x8e68f7)throw CliErrors[_0x442a98(0xf9)](_0x442a98(0x106)+_0x3160d9+'\x22.');await deleteBffScript(_0x8e68f7[_0x442a98(0xf8)]),delete _0x25ac01[_0x442a98(0xef)][_0x3160d9],_0x25ac01['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x1ff97a[_0x442a98(0x113)],_0x1cfb4b);const _0x5968df=resolveLocalFilePathFromLockKey(_0x1ff97a,_0x3160d9);let _0x330bc2;await fileExists(_0x5968df)&&(_0x330bc2=await moveToTrash(_0x1ff97a[_0x442a98(0x10e)],_0x1ff97a[_0x442a98(0x10b)],_0x5968df),await cleanupEmptyDirectories(dirname(_0x5968df),_0x1ff97a[_0x442a98(0xfe)]));await waitForDeleteSettlement(_0x1ff97a[_0x442a98(0x113)],_0x108ceb[_0x442a98(0x103)],_0x3160d9,_0x5968df),await sleep(0x96);const _0x2d0d9f={'deleted':_0x3160d9,'remoteId':_0x8e68f7[_0x442a98(0xf8)]};if(_0x330bc2)_0x2d0d9f[_0x442a98(0x110)]=_0x330bc2;return{'ok':!![],'data':_0x2d0d9f,'message':'Deleted\x20'+_0x3160d9+(_0x330bc2?_0x442a98(0x108):'')};}};function a31_0xbb24(_0x2876bc,_0x299a61){_0x2876bc=_0x2876bc-0xe7;const _0x2c7b5e=a31_0x2c7b();let _0xbb2466=_0x2c7b5e[_0x2876bc];return _0xbb2466;}function resolveDeleteTarget(_0x938ecb,_0x986515){const _0x36ebf5=a31_0x59a7ad;if(_0x938ecb[_0x36ebf5(0x104)]('/')){const _0x1b4e61=_0x986515[_0x36ebf5(0xfb)](_0x5bea64=>_0x5bea64===_0x938ecb);if(!_0x1b4e61)throw CliErrors[_0x36ebf5(0xf9)]('Function\x20not\x20found:\x20'+_0x938ecb);return _0x1b4e61;}const _0x381672=_0x986515['filter'](_0x2f589d=>_0x2f589d[_0x36ebf5(0xf4)]('/')['at'](-0x1)===_0x938ecb);if(_0x381672['length']===0x0)throw CliErrors[_0x36ebf5(0xf9)](_0x36ebf5(0xfc)+_0x938ecb);if(_0x381672[_0x36ebf5(0xf6)]>0x1)throw CliErrors['validation'](_0x36ebf5(0xf2)+_0x938ecb+_0x36ebf5(0x117)+_0x381672['map'](_0x4636f8=>_0x36ebf5(0xec)+_0x4636f8)['join']('\x0a'));return _0x381672[0x0];}async function moveToTrash(_0x204d9a,_0x1df3b3,_0x3f1937){const _0x21bcf3=a31_0x59a7ad,_0x1a0492=new Date()[_0x21bcf3(0x10a)]()[_0x21bcf3(0x116)](/[:.]/g,'-'),_0x4639fc=relative(_0x204d9a,_0x3f1937),_0x5b3b23=join(_0x1df3b3,_0x1a0492,_0x4639fc);return await mkdir(dirname(_0x5b3b23),{'recursive':!![]}),await rename(_0x3f1937,_0x5b3b23),_0x5b3b23;}async function cleanupEmptyDirectories(_0x357bfb,_0x577060){const _0x24eec6=a31_0x59a7ad;let _0xb7920e=resolve(_0x357bfb);const _0x2da06a=resolve(_0x577060);while(_0xb7920e[_0x24eec6(0xfa)](''+_0x2da06a+sep)||_0xb7920e===_0x2da06a){if(_0xb7920e===_0x2da06a)return;try{const _0x1477d7=await readdir(_0xb7920e);if(_0x1477d7[_0x24eec6(0xf6)]>0x0)return;await rmdir(_0xb7920e);}catch{return;}_0xb7920e=dirname(_0xb7920e);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x53d5c0,_0x19a6a2,_0x3f5c54,_0x402380){const _0x2983cc=a31_0x59a7ad;for(let _0x14361a=0x0;_0x14361a<DELETE_SETTLE_RETRY_COUNT;_0x14361a+=0x1){const _0x3811fa=await readBffLockFile(_0x53d5c0),_0x14911f=!!_0x3811fa?.[_0x2983cc(0xf5)]?.[_0x19a6a2]?.['functions']?.[_0x3f5c54],_0x136256=await fileExists(_0x402380);if(!_0x14911f&&!_0x136256)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x2983cc(0x114)+_0x3f5c54+'.');}
1
+ const a32_0xde8518=a32_0x2bd1;(function(_0x52ab1b,_0x16ffb6){const _0xed858d=a32_0x2bd1,_0x128ade=_0x52ab1b();while(!![]){try{const _0x5d95b8=parseInt(_0xed858d(0x1e0))/0x1+parseInt(_0xed858d(0x1c6))/0x2*(parseInt(_0xed858d(0x1d7))/0x3)+-parseInt(_0xed858d(0x1d1))/0x4+-parseInt(_0xed858d(0x1bc))/0x5+-parseInt(_0xed858d(0x1cb))/0x6*(parseInt(_0xed858d(0x1c3))/0x7)+-parseInt(_0xed858d(0x1bd))/0x8*(parseInt(_0xed858d(0x1de))/0x9)+parseInt(_0xed858d(0x1dc))/0xa;if(_0x5d95b8===_0x16ffb6)break;else _0x128ade['push'](_0x128ade['shift']());}catch(_0x1343e6){_0x128ade['push'](_0x128ade['shift']());}}}(a32_0x1f08,0x2c7fe));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';function a32_0x2bd1(_0x44c868,_0x1408b2){_0x44c868=_0x44c868-0x1b6;const _0x1f084a=a32_0x1f08();let _0x2bd143=_0x1f084a[_0x44c868];return _0x2bd143;}export const bffDelete={'service':'bff','command':'delete','description':a32_0xde8518(0x1e5),'risk':a32_0xde8518(0x1e2),'flags':[{'name':a32_0xde8518(0x1d9),'type':a32_0xde8518(0x1b8),'required':!![],'description':a32_0xde8518(0x1c9)}],async 'validate'(_0x11f2ce){const _0x97e4b4=a32_0xde8518,_0x1112d2=loadBffProjectConfig(_0x11f2ce[_0x97e4b4(0x1c8)]),_0x534a89=await readBffLockFile(_0x1112d2['lockFilePath']);if(!_0x534a89)throw CliErrors[_0x97e4b4(0x1b7)](_0x97e4b4(0x1d4));},async 'dryRun'(_0x49e74d){const _0x5f47c8=a32_0xde8518,_0x3746a3=loadBffProjectConfig(_0x49e74d[_0x5f47c8(0x1c8)]),_0x6a729c=await readBffLockFile(_0x3746a3[_0x5f47c8(0x1d6)]);if(!_0x6a729c)throw CliErrors[_0x5f47c8(0x1b7)](_0x5f47c8(0x1cc));const {appLock:_0x5ad893}=ensureLockScope(_0x6a729c,_0x49e74d[_0x5f47c8(0x1c8)],_0x3746a3[_0x5f47c8(0x1df)],_0x5f47c8(0x1b6)),_0x16705b=_0x49e74d[_0x5f47c8(0x1e3)](_0x5f47c8(0x1d9)),_0x19389e=Object[_0x5f47c8(0x1d2)](_0x5ad893['functions']),_0x5a075d=resolveDeleteTarget(_0x16705b,_0x19389e),_0x4d93f1=_0x5ad893['functions'][_0x5a075d];if(!_0x4d93f1)throw CliErrors[_0x5f47c8(0x1b7)](_0x5f47c8(0x1d8)+_0x5a075d+'\x22.');const _0x5dc006=resolveLocalFilePathFromLockKey(_0x3746a3,_0x5a075d),_0xdb166a=relative(_0x3746a3['projectRoot'],_0x5dc006),_0x4610b8=join(_0x3746a3['trashDir'],_0x5f47c8(0x1c7),_0xdb166a);return{'method':_0x5f47c8(0x1e6),'url':_0x5f47c8(0x1be),'body':{'appCode':_0x49e74d[_0x5f47c8(0x1c8)],'target':_0x5a075d,'remoteId':_0x4d93f1[_0x5f47c8(0x1e9)],'localFilePath':_0x5dc006,'trashedPath':_0x4610b8},'description':'Would\x20delete\x20'+_0x5a075d+_0x5f47c8(0x1c5)};},async 'execute'(_0x1401e8){const _0x19e1e1=a32_0xde8518,_0x58ab57=loadBffProjectConfig(_0x1401e8[_0x19e1e1(0x1c8)]),_0x2c0742=await readBffLockFile(_0x58ab57[_0x19e1e1(0x1d6)]);if(!_0x2c0742)throw CliErrors[_0x19e1e1(0x1b7)](_0x19e1e1(0x1cc));const {lockData:_0x41d5e9,appLock:_0x1908d8}=ensureLockScope(_0x2c0742,_0x1401e8[_0x19e1e1(0x1c8)],_0x58ab57[_0x19e1e1(0x1df)],'delete'),_0x427bb2=JSON[_0x19e1e1(0x1da)](JSON[_0x19e1e1(0x1dd)](_0x41d5e9)),_0x4a8bc2=_0x427bb2[_0x19e1e1(0x1bf)][_0x1401e8['appCode']];if(!_0x4a8bc2)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x1401e8[_0x19e1e1(0x1c8)]+_0x19e1e1(0x1bb));const _0x4628c5=_0x1401e8[_0x19e1e1(0x1e3)]('target'),_0x26ba40=Object['keys'](_0x4a8bc2[_0x19e1e1(0x1c2)]),_0x474e7c=resolveDeleteTarget(_0x4628c5,_0x26ba40),_0xe2ed70=_0x4a8bc2['functions'][_0x474e7c];if(!_0xe2ed70)throw CliErrors[_0x19e1e1(0x1b7)](_0x19e1e1(0x1d8)+_0x474e7c+'\x22.');await deleteBffScript(_0xe2ed70['remoteId']),delete _0x4a8bc2[_0x19e1e1(0x1c2)][_0x474e7c],_0x4a8bc2[_0x19e1e1(0x1e7)]=new Date()[_0x19e1e1(0x1e4)](),await writeBffLockFile(_0x58ab57[_0x19e1e1(0x1d6)],_0x427bb2);const _0x2a1996=resolveLocalFilePathFromLockKey(_0x58ab57,_0x474e7c);let _0x1a24cd;await fileExists(_0x2a1996)&&(_0x1a24cd=await moveToTrash(_0x58ab57['projectRoot'],_0x58ab57[_0x19e1e1(0x1e8)],_0x2a1996),await cleanupEmptyDirectories(dirname(_0x2a1996),_0x58ab57['scriptsRootDir']));await waitForDeleteSettlement(_0x58ab57['lockFilePath'],_0x1401e8[_0x19e1e1(0x1c8)],_0x474e7c,_0x2a1996),await sleep(0x96);const _0x8fc3d8={'deleted':_0x474e7c,'remoteId':_0xe2ed70[_0x19e1e1(0x1e9)]};if(_0x1a24cd)_0x8fc3d8['trashedTo']=_0x1a24cd;return{'ok':!![],'data':_0x8fc3d8,'message':_0x19e1e1(0x1db)+_0x474e7c+(_0x1a24cd?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x55e311,_0x3ca99f){const _0x2950ce=a32_0xde8518;if(_0x55e311[_0x2950ce(0x1ca)]('/')){const _0x82e474=_0x3ca99f[_0x2950ce(0x1d5)](_0x5c925d=>_0x5c925d===_0x55e311);if(!_0x82e474)throw CliErrors[_0x2950ce(0x1b7)](_0x2950ce(0x1cd)+_0x55e311);return _0x82e474;}const _0x239a18=_0x3ca99f[_0x2950ce(0x1e1)](_0x1e5f7d=>_0x1e5f7d[_0x2950ce(0x1ea)]('/')['at'](-0x1)===_0x55e311);if(_0x239a18[_0x2950ce(0x1b9)]===0x0)throw CliErrors[_0x2950ce(0x1b7)](_0x2950ce(0x1cd)+_0x55e311);if(_0x239a18['length']>0x1)throw CliErrors[_0x2950ce(0x1b7)](_0x2950ce(0x1ba)+_0x55e311+_0x2950ce(0x1d3)+_0x239a18[_0x2950ce(0x1c1)](_0x5ef45b=>_0x2950ce(0x1d0)+_0x5ef45b)[_0x2950ce(0x1c4)]('\x0a'));return _0x239a18[0x0];}async function moveToTrash(_0x2dfb97,_0x4ebeaf,_0x27bf96){const _0x5b07e3=a32_0xde8518,_0x4ff739=new Date()['toISOString']()[_0x5b07e3(0x1c0)](/[:.]/g,'-'),_0x2e20c8=relative(_0x2dfb97,_0x27bf96),_0x41f7e7=join(_0x4ebeaf,_0x4ff739,_0x2e20c8);return await mkdir(dirname(_0x41f7e7),{'recursive':!![]}),await rename(_0x27bf96,_0x41f7e7),_0x41f7e7;}async function cleanupEmptyDirectories(_0x39e77a,_0x3e7406){const _0x379ee4=a32_0xde8518;let _0x1d1271=resolve(_0x39e77a);const _0x45c946=resolve(_0x3e7406);while(_0x1d1271[_0x379ee4(0x1ce)](''+_0x45c946+sep)||_0x1d1271===_0x45c946){if(_0x1d1271===_0x45c946)return;try{const _0x1ca3e5=await readdir(_0x1d1271);if(_0x1ca3e5[_0x379ee4(0x1b9)]>0x0)return;await rmdir(_0x1d1271);}catch{return;}_0x1d1271=dirname(_0x1d1271);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;function a32_0x1f08(){const _0x293a9f=['toISOString','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','POST','lastSync','trashDir','remoteId','split','delete','validation','string','length','Multiple\x20functions\x20match\x20\x22','\x22\x20not\x20found\x20after\x20ensureLockScope.','883460eMgRKr','478872zAJCVD','/api/management/library/scripts/delete','apps','replace','map','functions','294OUiRTU','join','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','7442QkeWXo','<timestamp>','appCode','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','includes','35616adWNOH','Backend\x20Function\x20lock\x20file\x20not\x20found.','Function\x20not\x20found:\x20','startsWith','Local\x20delete\x20not\x20settled\x20for\x20','\x20\x20-\x20','279668ZYoNlV','keys','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','find','lockFilePath','213CigLDF','No\x20lock\x20entry\x20found\x20for\x20\x22','target','parse','Deleted\x20','2907380OITQUJ','stringify','36WwkTWp','scriptsRoot','362698ApgBkH','filter','high-risk-write','str'];a32_0x1f08=function(){return _0x293a9f;};return a32_0x1f08();}async function waitForDeleteSettlement(_0x4bd7e6,_0x12dc05,_0x12883c,_0x1bdf8a){const _0x4c2117=a32_0xde8518;for(let _0x584c3f=0x0;_0x584c3f<DELETE_SETTLE_RETRY_COUNT;_0x584c3f+=0x1){const _0x21c0c6=await readBffLockFile(_0x4bd7e6),_0x466973=!!_0x21c0c6?.[_0x4c2117(0x1bf)]?.[_0x12dc05]?.[_0x4c2117(0x1c2)]?.[_0x12883c],_0x491670=await fileExists(_0x1bdf8a);if(!_0x466973&&!_0x491670)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x4c2117(0x1cf)+_0x12883c+'.');}