@lovrabet/rabetbase-cli 2.5.3-beta.1 → 2.5.3-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 (374) 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.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/logs.d.ts +7 -0
  38. package/lib/commands/bff/logs.js +1 -0
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.js +1 -1
  52. package/lib/commands/common/local-file.js +1 -1
  53. package/lib/commands/common/validate.js +1 -1
  54. package/lib/commands/config/delete.js +1 -1
  55. package/lib/commands/config/get.js +1 -1
  56. package/lib/commands/config/index.js +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/batch-design.d.ts +21 -0
  62. package/lib/commands/dataset/batch-design.js +1 -0
  63. package/lib/commands/dataset/business-group-update.js +1 -1
  64. package/lib/commands/dataset/business-groups.js +1 -1
  65. package/lib/commands/dataset/capability.js +1 -1
  66. package/lib/commands/dataset/delete.js +1 -1
  67. package/lib/commands/dataset/detail.js +1 -1
  68. package/lib/commands/dataset/extend-update.js +1 -1
  69. package/lib/commands/dataset/field-restore.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/dataset/user-deleted-field-list.js +1 -1
  84. package/lib/commands/db/analysis-batching.js +1 -1
  85. package/lib/commands/db/analyze-batch-plan.js +1 -1
  86. package/lib/commands/db/analyze-cancel.js +1 -1
  87. package/lib/commands/db/analyze-start.js +1 -1
  88. package/lib/commands/db/analyze-status.js +1 -1
  89. package/lib/commands/db/create.js +1 -1
  90. package/lib/commands/db/delete.js +1 -1
  91. package/lib/commands/db/detail.js +1 -1
  92. package/lib/commands/db/diff-refresh-start.js +1 -1
  93. package/lib/commands/db/diff-refresh-status.js +1 -1
  94. package/lib/commands/db/diff.js +1 -1
  95. package/lib/commands/db/index.js +1 -1
  96. package/lib/commands/db/list.js +1 -1
  97. package/lib/commands/db/shared.js +1 -1
  98. package/lib/commands/db/table-diff-shared.js +1 -1
  99. package/lib/commands/db/tables.js +1 -1
  100. package/lib/commands/db/test.js +1 -1
  101. package/lib/commands/db/update.js +1 -1
  102. package/lib/commands/deployment/index.js +1 -1
  103. package/lib/commands/deployment/sync-all.js +1 -1
  104. package/lib/commands/deployment/sync-jobs.js +1 -1
  105. package/lib/commands/deployment/sync-status.js +1 -1
  106. package/lib/commands/doctor.js +1 -1
  107. package/lib/commands/file/index.js +1 -1
  108. package/lib/commands/flow/create.d.ts +2 -0
  109. package/lib/commands/flow/create.js +1 -0
  110. package/lib/commands/flow/detail.d.ts +2 -0
  111. package/lib/commands/flow/detail.js +1 -0
  112. package/lib/commands/flow/index.d.ts +3 -0
  113. package/lib/commands/flow/index.js +1 -0
  114. package/lib/commands/flow/list.d.ts +2 -0
  115. package/lib/commands/flow/list.js +1 -0
  116. package/lib/commands/flow/publish.d.ts +2 -0
  117. package/lib/commands/flow/publish.js +1 -0
  118. package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
  119. package/lib/commands/flow/runtime-resources-shared.js +1 -0
  120. package/lib/commands/flow/runtime-role-list.d.ts +2 -0
  121. package/lib/commands/flow/runtime-role-list.js +1 -0
  122. package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -0
  124. package/lib/commands/flow/runtime-user-search.d.ts +2 -0
  125. package/lib/commands/flow/runtime-user-search.js +1 -0
  126. package/lib/commands/flow/shared.d.ts +41 -0
  127. package/lib/commands/flow/shared.js +1 -0
  128. package/lib/commands/flow/update.d.ts +2 -0
  129. package/lib/commands/flow/update.js +1 -0
  130. package/lib/commands/flow/validate.d.ts +3 -0
  131. package/lib/commands/flow/validate.js +1 -0
  132. package/lib/commands/instant-api-policy/current.js +1 -1
  133. package/lib/commands/instant-api-policy/index.js +1 -1
  134. package/lib/commands/instant-api-policy/init.js +1 -1
  135. package/lib/commands/instant-api-policy/publish.js +1 -1
  136. package/lib/commands/instant-api-policy/pull.js +1 -1
  137. package/lib/commands/instant-api-policy/revision.js +1 -1
  138. package/lib/commands/instant-api-policy/revisions.js +1 -1
  139. package/lib/commands/instant-api-policy/rollback.js +1 -1
  140. package/lib/commands/instant-api-policy/shared.js +1 -1
  141. package/lib/commands/instant-api-policy/validate.js +1 -1
  142. package/lib/commands/issue/index.js +1 -1
  143. package/lib/commands/issue/nudge.js +1 -1
  144. package/lib/commands/issue/report.js +1 -1
  145. package/lib/commands/issue/shared.js +1 -1
  146. package/lib/commands/kb/create.js +1 -1
  147. package/lib/commands/kb/delete.js +1 -1
  148. package/lib/commands/kb/detail.js +1 -1
  149. package/lib/commands/kb/index.js +1 -1
  150. package/lib/commands/kb/list.js +1 -1
  151. package/lib/commands/kb/search.js +1 -1
  152. package/lib/commands/kb/shared.js +1 -1
  153. package/lib/commands/kb/update.js +1 -1
  154. package/lib/commands/logs/index.js +1 -1
  155. package/lib/commands/menu/asset-update.js +1 -1
  156. package/lib/commands/menu/delete.js +1 -1
  157. package/lib/commands/menu/external-link-create.js +1 -1
  158. package/lib/commands/menu/external-link-update.js +1 -1
  159. package/lib/commands/menu/group-create.js +1 -1
  160. package/lib/commands/menu/group-update.js +1 -1
  161. package/lib/commands/menu/index.js +1 -1
  162. package/lib/commands/menu/list.js +1 -1
  163. package/lib/commands/menu/move.js +1 -1
  164. package/lib/commands/menu/regroup-start.js +1 -1
  165. package/lib/commands/menu/rename.js +1 -1
  166. package/lib/commands/menu/shared/compare-table.js +1 -1
  167. package/lib/commands/menu/shared/delete-plan.js +1 -1
  168. package/lib/commands/menu/shared/facts.js +1 -1
  169. package/lib/commands/menu/shared/index.js +1 -1
  170. package/lib/commands/menu/shared/inquirer.js +1 -1
  171. package/lib/commands/menu/shared/local-pages.js +1 -1
  172. package/lib/commands/menu/shared/logic.js +1 -1
  173. package/lib/commands/menu/shared/mutations.js +1 -1
  174. package/lib/commands/menu/shared/service.js +1 -1
  175. package/lib/commands/menu/shared/sync-core.js +1 -1
  176. package/lib/commands/menu/shared/update-core.js +1 -1
  177. package/lib/commands/menu/shared/valid-url.js +1 -1
  178. package/lib/commands/menu/sync.js +1 -1
  179. package/lib/commands/menu/visibility-update.js +1 -1
  180. package/lib/commands/notification/config-create.js +1 -1
  181. package/lib/commands/notification/config-delete.js +1 -1
  182. package/lib/commands/notification/config-list.js +1 -1
  183. package/lib/commands/notification/config-update.js +1 -1
  184. package/lib/commands/notification/index.js +1 -1
  185. package/lib/commands/notification/shared.js +1 -1
  186. package/lib/commands/ocr/index.js +1 -1
  187. package/lib/commands/page/create.js +1 -1
  188. package/lib/commands/page/custom/detail.js +1 -1
  189. package/lib/commands/page/custom/list.js +1 -1
  190. package/lib/commands/page/custom/publish.js +1 -1
  191. package/lib/commands/page/custom/shared.js +1 -1
  192. package/lib/commands/page/custom/syntax.js +1 -1
  193. package/lib/commands/page/custom/update.js +1 -1
  194. package/lib/commands/page/data-list-status.js +1 -1
  195. package/lib/commands/page/generate-start.js +1 -1
  196. package/lib/commands/page/generate-status.js +1 -1
  197. package/lib/commands/page/index.js +1 -1
  198. package/lib/commands/page/pull.js +1 -1
  199. package/lib/commands/page/push.js +1 -1
  200. package/lib/commands/page/relation-audit.js +1 -1
  201. package/lib/commands/page/restore.js +1 -1
  202. package/lib/commands/page/shared.js +1 -1
  203. package/lib/commands/page/sync.js +1 -1
  204. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  205. package/lib/commands/project/create/format-elapsed.js +1 -1
  206. package/lib/commands/project/create/main.js +1 -1
  207. package/lib/commands/project/create/materialize-project-template.js +1 -1
  208. package/lib/commands/project/create/project-name.js +1 -1
  209. package/lib/commands/project/create/project-template-archive.js +1 -1
  210. package/lib/commands/project/create/project-template-path.js +1 -1
  211. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  212. package/lib/commands/project/create/use-format-code.js +1 -1
  213. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  214. package/lib/commands/project/domain-routing-sync.js +1 -1
  215. package/lib/commands/project/index.js +1 -1
  216. package/lib/commands/project/upgrade.js +1 -1
  217. package/lib/commands/registry.js +1 -1
  218. package/lib/commands/role/delete.js +1 -1
  219. package/lib/commands/role/detail.js +1 -1
  220. package/lib/commands/role/index.js +1 -1
  221. package/lib/commands/role/list.js +1 -1
  222. package/lib/commands/role/shared.js +1 -1
  223. package/lib/commands/role/update.js +1 -1
  224. package/lib/commands/role/user-add.js +1 -1
  225. package/lib/commands/role/user-remove.js +1 -1
  226. package/lib/commands/role/user-resolve.js +1 -1
  227. package/lib/commands/rule/get.js +1 -1
  228. package/lib/commands/rule/index.js +1 -1
  229. package/lib/commands/rule/list.js +1 -1
  230. package/lib/commands/rule/set.js +1 -1
  231. package/lib/commands/rule/shared.js +1 -1
  232. package/lib/commands/run/index.js +1 -1
  233. package/lib/commands/schema.js +1 -1
  234. package/lib/commands/sql/create.js +1 -1
  235. package/lib/commands/sql/delete.js +1 -1
  236. package/lib/commands/sql/detail.js +1 -1
  237. package/lib/commands/sql/exec.js +1 -1
  238. package/lib/commands/sql/index.js +1 -1
  239. package/lib/commands/sql/list.js +1 -1
  240. package/lib/commands/sql/pull.js +1 -1
  241. package/lib/commands/sql/push.js +1 -1
  242. package/lib/commands/sql/shared.js +1 -1
  243. package/lib/commands/sql/status.js +1 -1
  244. package/lib/commands/sql/validate.js +1 -1
  245. package/lib/commands/task/index.js +1 -1
  246. package/lib/commands/task/status.js +1 -1
  247. package/lib/commands/tenant/index.js +1 -1
  248. package/lib/commands/tenant/members-list.js +1 -1
  249. package/lib/commands/tenant/shared.js +1 -1
  250. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  251. package/lib/commands/user-account/index.js +1 -1
  252. package/lib/commands/workspace/add.js +1 -1
  253. package/lib/commands/workspace/index.js +1 -1
  254. package/lib/commands/workspace/remove.js +1 -1
  255. package/lib/config/domain-config.js +1 -1
  256. package/lib/config/project-domain-routing.js +1 -1
  257. package/lib/config/region-config.js +1 -1
  258. package/lib/config/schema.js +1 -1
  259. package/lib/constant/cdn.js +1 -1
  260. package/lib/constant/cli.js +1 -1
  261. package/lib/constant/defaults.js +1 -1
  262. package/lib/constant/domain.js +1 -1
  263. package/lib/constant/env.js +1 -1
  264. package/lib/constant/output.js +1 -1
  265. package/lib/constant/paths.js +1 -1
  266. package/lib/constant/region.js +1 -1
  267. package/lib/constant/risk.js +1 -1
  268. package/lib/constant/routing-profile.js +1 -1
  269. package/lib/context/app-resolver.js +1 -1
  270. package/lib/context/auth-resolver.js +1 -1
  271. package/lib/context/config-loader.js +1 -1
  272. package/lib/context.js +1 -1
  273. package/lib/core/alias-resolver.js +1 -1
  274. package/lib/core/api-client.d.ts +170 -1
  275. package/lib/core/api-client.js +1 -1
  276. package/lib/core/bff/config.js +1 -1
  277. package/lib/core/bff/file-system.js +1 -1
  278. package/lib/core/bff/hash.js +1 -1
  279. package/lib/core/bff/hook-directory.d.ts +55 -0
  280. package/lib/core/bff/hook-directory.js +1 -0
  281. package/lib/core/bff/lock.js +1 -1
  282. package/lib/core/bff/types.d.ts +15 -0
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/db-resolver.js +1 -1
  285. package/lib/core/flow-config.d.ts +628 -0
  286. package/lib/core/flow-config.js +1 -0
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +22 -4
  358. package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
  359. package/skills/rabetbase/guides/backend-function.md +19 -9
  360. package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
  361. package/skills/rabetbase/guides/conflict-detection.md +2 -0
  362. package/skills/rabetbase/guides/sdk-client-generation.md +1 -0
  363. package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
  364. package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
  365. package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
  366. package/skills/rabetbase/references/rabetbase-bff-pull.md +7 -3
  367. package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
  368. package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
  369. package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
  370. package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
  371. package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
  372. package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
  373. package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
  374. package/skills/rabetbase.manifest.json +9 -3
@@ -1 +1 @@
1
- (function(_0x1cf977,_0x585e75){const _0x1318e3=a19_0xd840,_0x5daf6e=_0x1cf977();while(!![]){try{const _0xc0eba3=parseInt(_0x1318e3(0xc7))/0x1*(parseInt(_0x1318e3(0xcd))/0x2)+-parseInt(_0x1318e3(0xc9))/0x3+parseInt(_0x1318e3(0xcc))/0x4+parseInt(_0x1318e3(0xcb))/0x5*(parseInt(_0x1318e3(0xca))/0x6)+-parseInt(_0x1318e3(0xc5))/0x7+-parseInt(_0x1318e3(0xc6))/0x8*(parseInt(_0x1318e3(0xc8))/0x9)+parseInt(_0x1318e3(0xce))/0xa;if(_0xc0eba3===_0x585e75)break;else _0x5daf6e['push'](_0x5daf6e['shift']());}catch(_0x5355f6){_0x5daf6e['push'](_0x5daf6e['shift']());}}}(a19_0x2b21,0xb8bb1));import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';function a19_0xd840(_0x24df0c,_0x52ed1c){_0x24df0c=_0x24df0c-0xc5;const _0x2b214e=a19_0x2b21();let _0xd8403f=_0x2b214e[_0x24df0c];return _0xd8403f;}function a19_0x2b21(){const _0x2e2549=['83022hwpGef','305CmrBon','5499940zbTWCa','448TBFRcw','12715990oAurns','7155575Rcnczo','1696rbguqq','4277TJHTLu','62631fihapZ','3583497jYYuAI'];a19_0x2b21=function(){return _0x2e2549;};return a19_0x2b21();}export const appDefinitions=[appListDefinition,appMembersListDefinition];
1
+ function a19_0x25c7(_0x6db29c,_0x33c88f){_0x6db29c=_0x6db29c-0x184;const _0x256c39=a19_0x256c();let _0x25c735=_0x256c39[_0x6db29c];return _0x25c735;}function a19_0x256c(){const _0x46639e=['17qOpWEy','2703DcsrDq','70922ubXXAe','220pQppHC','3690RJsBGa','12lVxaBM','130zXGEQb','717036CSKFCt','1008snVLlw','1464270gfAhci','224280WCSTZY','24wKHNwd','4113263ZRkWLp'];a19_0x256c=function(){return _0x46639e;};return a19_0x256c();}(function(_0x1c5497,_0x41a350){const _0x4ad8f4=a19_0x25c7,_0x32d4c9=_0x1c5497();while(!![]){try{const _0xeac57f=parseInt(_0x4ad8f4(0x184))/0x1*(parseInt(_0x4ad8f4(0x186))/0x2)+-parseInt(_0x4ad8f4(0x185))/0x3*(-parseInt(_0x4ad8f4(0x187))/0x4)+-parseInt(_0x4ad8f4(0x18d))/0x5*(parseInt(_0x4ad8f4(0x189))/0x6)+-parseInt(_0x4ad8f4(0x18e))/0x7*(-parseInt(_0x4ad8f4(0x18f))/0x8)+parseInt(_0x4ad8f4(0x18c))/0x9*(-parseInt(_0x4ad8f4(0x188))/0xa)+-parseInt(_0x4ad8f4(0x190))/0xb+parseInt(_0x4ad8f4(0x18b))/0xc*(parseInt(_0x4ad8f4(0x18a))/0xd);if(_0xeac57f===_0x41a350)break;else _0x32d4c9['push'](_0x32d4c9['shift']());}catch(_0x62160b){_0x32d4c9['push'](_0x32d4c9['shift']());}}}(a19_0x256c,0x543f1));import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';export const appDefinitions=[appListDefinition,appMembersListDefinition];
@@ -1 +1 @@
1
- const a20_0x4b78f9=a20_0x1f24;(function(_0x38146d,_0x3333dd){const _0x443fbb=a20_0x1f24,_0x8147fa=_0x38146d();while(!![]){try{const _0x310f66=parseInt(_0x443fbb(0x9f))/0x1+parseInt(_0x443fbb(0x9e))/0x2*(-parseInt(_0x443fbb(0xc4))/0x3)+parseInt(_0x443fbb(0xa6))/0x4*(parseInt(_0x443fbb(0xcc))/0x5)+-parseInt(_0x443fbb(0xb5))/0x6*(-parseInt(_0x443fbb(0xbc))/0x7)+-parseInt(_0x443fbb(0xa5))/0x8+-parseInt(_0x443fbb(0xa9))/0x9+parseInt(_0x443fbb(0xc0))/0xa;if(_0x310f66===_0x3333dd)break;else _0x8147fa['push'](_0x8147fa['shift']());}catch(_0x40b540){_0x8147fa['push'](_0x8147fa['shift']());}}}(a20_0x3a0b,0x332e1));import{readRawConfigWithLayers}from'../../context.js';function a20_0x3a0b(){const _0x2f9cc6=['Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','277587IjKPFR','source','appcode','apps','project','validation','name','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','1262435PVNcsB','defaultApp','6unBrzi','114517yYGntD','length','list','isCurrent','projectConfig','hasOwnProperty','716680HMuNME','4Krkpxq','prototype','region','496584bBjlLG','No\x20apps\x20configured','\x20config','find','map','bool','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','boolean','entries','remote','merged','globalConfig','6EekZSN','globalPath','app','read','object','optional','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','617085pivvyV','global','keys','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','1768220RWeeyZ','\x20in\x20','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.'];a20_0x3a0b=function(){return _0x2f9cc6;};return a20_0x3a0b();}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';import{resolveEffectiveRegion}from'../../config/region-config.js';function a20_0x1f24(_0x2d209d,_0x516069){_0x2d209d=_0x2d209d-0x9e;const _0x3a0b0=a20_0x3a0b();let _0x1f244c=_0x3a0b0[_0x2d209d];return _0x1f244c;}function buildItemsFromLayer(_0x341aca,_0x56ef99,_0x360830){const _0x46e112=a20_0x1f24,_0x38c63f=[],_0x2f0a5a=_0x341aca['apps']&&typeof _0x341aca['apps']===_0x46e112(0xb9)?_0x341aca[_0x46e112(0xc7)]:{},_0x451860=_0x341aca[_0x46e112(0xcd)]||undefined,_0x35e982=_0x451860??(Object[_0x46e112(0xbe)](_0x2f0a5a)[_0x46e112(0xa0)]===0x1?Object['keys'](_0x2f0a5a)[0x0]:undefined);for(const [_0x31fb84,_0x268d67]of Object['entries'](_0x2f0a5a)){if(!_0x268d67||typeof _0x268d67!=='object'||!_0x268d67[_0x46e112(0xc6)])continue;const _0x1bec57=resolveEffectiveRegion({'appRegion':_0x268d67['region'],'projectRegion':_0x56ef99===_0x46e112(0xc8)?_0x341aca[_0x46e112(0xa8)]:undefined,'globalRegion':_0x56ef99===_0x46e112(0xbd)?_0x341aca[_0x46e112(0xa8)]:_0x360830,'appName':_0x31fb84});_0x38c63f['push']({'name':_0x31fb84,'appcode':_0x268d67['appcode'],'named':!![],'definedIn':_0x56ef99,'isDefault':_0x31fb84===_0x35e982,...buildAppProfileListFields(_0x268d67),'effectiveRegion':_0x1bec57[_0x46e112(0xa8)],'regionSource':_0x1bec57[_0x46e112(0xc5)]});}return _0x38c63f;}function buildMergedItems(_0x2d9e31,_0xe03d9a){const _0x1cf58f=a20_0x1f24,{apps:apps={}}=_0x2d9e31,_0x502dfe=_0x2d9e31[_0x1cf58f(0xcd)],_0x4be5a5=_0x502dfe??(Object[_0x1cf58f(0xbe)](apps)[_0x1cf58f(0xa0)]===0x1?Object[_0x1cf58f(0xbe)](apps)[0x0]:undefined),_0x4dd6d1=_0xe03d9a[_0x1cf58f(0xb4)][_0x1cf58f(0xc7)]&&typeof _0xe03d9a[_0x1cf58f(0xb4)]['apps']==='object'?_0xe03d9a[_0x1cf58f(0xb4)][_0x1cf58f(0xc7)]:{},_0x4c9578=_0xe03d9a['projectConfig'][_0x1cf58f(0xc7)]&&typeof _0xe03d9a['projectConfig']['apps']===_0x1cf58f(0xb9)?_0xe03d9a['projectConfig']['apps']:{},_0x5b754d=Object[_0x1cf58f(0xb1)](apps),_0x15f206=_0x5b754d[_0x1cf58f(0xad)](([_0x2c930b,_0x180f53])=>{const _0xbfef62=_0x1cf58f,_0x4c5813=appDefinedIn(_0x2c930b,_0x4dd6d1,_0x4c9578),_0x5556bf=Object[_0xbfef62(0xa7)][_0xbfef62(0xa4)]['call'](_0x4c9578,_0x2c930b),_0x3ef18f=resolveEffectiveRegion({'appRegion':_0x180f53[_0xbfef62(0xa8)],'projectRegion':_0x5556bf?_0xe03d9a['projectConfig'][_0xbfef62(0xa8)]:undefined,'globalRegion':_0xe03d9a[_0xbfef62(0xb4)][_0xbfef62(0xa8)],'mergedRegion':_0x2d9e31[_0xbfef62(0xa8)],'appName':_0x2c930b});return{'name':_0x2c930b,'appcode':_0x180f53[_0xbfef62(0xc6)],'named':!![],'definedIn':_0x4c5813,'isDefault':_0x2c930b===_0x4be5a5,...buildAppProfileListFields(_0x180f53),'effectiveRegion':_0x3ef18f['region'],'regionSource':_0x3ef18f[_0xbfef62(0xc5)]};});return _0x15f206;}function validateAppListFlags(_0x4ed15b){const _0x167a6a=a20_0x1f24;if(!_0x4ed15b[_0x167a6a(0xae)](_0x167a6a(0xb2)))return;if(!_0x4ed15b[_0x167a6a(0xae)](_0x167a6a(0xbd))&&!_0x4ed15b[_0x167a6a(0xae)](_0x167a6a(0xc8)))return;throw CliErrors[_0x167a6a(0xc9)](_0x167a6a(0xbb),_0x167a6a(0xc2));}async function execute(_0x34b6ab){const _0x85aec0=a20_0x1f24;validateAppListFlags(_0x34b6ab);if(_0x34b6ab[_0x85aec0(0xae)](_0x85aec0(0xb2)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x34b6ab)};const _0x2247be=_0x34b6ab[_0x85aec0(0xae)](_0x85aec0(0xbd)),_0x4a78ac=_0x34b6ab[_0x85aec0(0xae)]('project'),_0x458a99=_0x2247be?_0x85aec0(0xbd):_0x4a78ac?_0x85aec0(0xc8):'merged',{config:_0x456287,layers:_0x2c2873}=readRawConfigWithLayers(),_0x2183b1=resolveDefaultAppSource(_0x2c2873),{defaultApp:_0x469d1e}=_0x456287;let _0xacabf6,_0xe880d0;switch(_0x458a99){case _0x85aec0(0xbd):_0xacabf6=buildItemsFromLayer(_0x2c2873[_0x85aec0(0xb4)],_0x85aec0(0xbd)),_0xe880d0=_0x2c2873[_0x85aec0(0xb6)];break;case _0x85aec0(0xc8):_0xacabf6=buildItemsFromLayer(_0x2c2873[_0x85aec0(0xa3)],_0x85aec0(0xc8),_0x2c2873[_0x85aec0(0xb4)]['region']),_0xe880d0=_0x2c2873['projectPath'];break;default:_0xacabf6=buildMergedItems(_0x456287,_0x2c2873);break;}enrichAppListItemsWithMergedSelection(_0xacabf6,_0x34b6ab['mergedCli']);if(_0xacabf6[_0x85aec0(0xa0)]===0x0){const _0x231a70=_0x458a99===_0x85aec0(0xb3)?'':_0x85aec0(0xc1)+_0x458a99+_0x85aec0(0xab);return{'ok':!![],'data':[],'message':_0x85aec0(0xaa)+_0x231a70+'.\x20Use\x20`'+CLI_BIN_NAME+_0x85aec0(0xcb)};}const _0x4f77c1=_0xacabf6[_0x85aec0(0xac)](_0x91213c=>_0x91213c[_0x85aec0(0xa2)]===!![]),_0x493eb8=_0x469d1e??_0x4f77c1?.[_0x85aec0(0xca)]??null,_0x374922=_0x458a99===_0x85aec0(0xb3)?{'globalPath':_0x2c2873[_0x85aec0(0xb6)]??null,'projectPath':_0x2c2873['projectPath']??null,'defaultApp':_0x493eb8,'defaultAppSource':_0x469d1e!=null?_0x2183b1:null}:{'scope':_0x458a99,'configPath':_0xe880d0??null};return{'ok':!![],'data':{'items':_0xacabf6,'meta':_0x374922}};}export const appListDefinition={'service':a20_0x4b78f9(0xb7),'command':a20_0x4b78f9(0xa1),'description':a20_0x4b78f9(0xbf),'risk':a20_0x4b78f9(0xb8),'auth':a20_0x4b78f9(0xba),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'remote','type':a20_0x4b78f9(0xb0),'description':a20_0x4b78f9(0xaf),'default':![]},{'name':'global','type':a20_0x4b78f9(0xb0),'description':a20_0x4b78f9(0xc3),'default':![]},{'name':a20_0x4b78f9(0xc8),'type':'boolean','description':'Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','default':![]}],async 'validate'(_0x2e718c){validateAppListFlags(_0x2e718c);},'execute':execute};
1
+ const a20_0x5ec4d7=a20_0x4906;(function(_0x340486,_0x476163){const _0x93ecdf=a20_0x4906,_0x1aa9d4=_0x340486();while(!![]){try{const _0x262f72=-parseInt(_0x93ecdf(0x87))/0x1*(-parseInt(_0x93ecdf(0x94))/0x2)+parseInt(_0x93ecdf(0xa3))/0x3+parseInt(_0x93ecdf(0x7f))/0x4*(parseInt(_0x93ecdf(0x9e))/0x5)+parseInt(_0x93ecdf(0xa1))/0x6+-parseInt(_0x93ecdf(0x95))/0x7*(parseInt(_0x93ecdf(0x90))/0x8)+parseInt(_0x93ecdf(0x80))/0x9*(-parseInt(_0x93ecdf(0x97))/0xa)+-parseInt(_0x93ecdf(0x93))/0xb*(parseInt(_0x93ecdf(0x9c))/0xc);if(_0x262f72===_0x476163)break;else _0x1aa9d4['push'](_0x1aa9d4['shift']());}catch(_0x167e0b){_0x1aa9d4['push'](_0x1aa9d4['shift']());}}}(a20_0x1526,0xe5f81));import{readRawConfigWithLayers}from'../../context.js';function a20_0x4906(_0xc41d85,_0x3a0fd5){_0xc41d85=_0xc41d85-0x7f;const _0x152664=a20_0x1526();let _0x4906f8=_0x152664[_0xc41d85];return _0x4906f8;}import{CLI_BIN_NAME}from'../../constant/cli.js';function a20_0x1526(){const _0x4219e6=['2358oVMklT','\x20config','merged','push','length','globalConfig','projectConfig','appcode','global','48EicjYY','globalPath','mergedCli','130141hRzTTn','526nZCmkk','18431PAXbEa','find','60KxVozz','region','apps','project','keys','2172DOwLNH','map','4951410mmwnOh','object','list','8664288cQBBgw','app','3986592YosPFm','boolean','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','entries','\x20in\x20','name','projectPath','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','No\x20apps\x20configured','4WYXIxH','1926279aWYdRV','isCurrent','remote','source','defaultApp','read','bool'];a20_0x1526=function(){return _0x4219e6;};return a20_0x1526();}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';import{resolveEffectiveRegion}from'../../config/region-config.js';function buildItemsFromLayer(_0xfd497c,_0x4d49cd,_0x101ee8){const _0x380e8a=a20_0x4906,_0x17a295=[],_0x430193=_0xfd497c['apps']&&typeof _0xfd497c[_0x380e8a(0x99)]==='object'?_0xfd497c[_0x380e8a(0x99)]:{},_0x21261d=_0xfd497c[_0x380e8a(0x84)]||undefined,_0x5e44f2=_0x21261d??(Object[_0x380e8a(0x9b)](_0x430193)[_0x380e8a(0x8b)]===0x1?Object[_0x380e8a(0x9b)](_0x430193)[0x0]:undefined);for(const [_0x4dd966,_0x1c5483]of Object['entries'](_0x430193)){if(!_0x1c5483||typeof _0x1c5483!=='object'||!_0x1c5483[_0x380e8a(0x8e)])continue;const _0x1affeb=resolveEffectiveRegion({'appRegion':_0x1c5483['region'],'projectRegion':_0x4d49cd===_0x380e8a(0x9a)?_0xfd497c['region']:undefined,'globalRegion':_0x4d49cd===_0x380e8a(0x8f)?_0xfd497c[_0x380e8a(0x98)]:_0x101ee8,'appName':_0x4dd966});_0x17a295[_0x380e8a(0x8a)]({'name':_0x4dd966,'appcode':_0x1c5483[_0x380e8a(0x8e)],'named':!![],'definedIn':_0x4d49cd,'isDefault':_0x4dd966===_0x5e44f2,...buildAppProfileListFields(_0x1c5483),'effectiveRegion':_0x1affeb[_0x380e8a(0x98)],'regionSource':_0x1affeb['source']});}return _0x17a295;}function buildMergedItems(_0x561680,_0x547361){const _0x58781a=a20_0x4906,{apps:apps={}}=_0x561680,_0x11d93f=_0x561680['defaultApp'],_0x3f83fc=_0x11d93f??(Object[_0x58781a(0x9b)](apps)['length']===0x1?Object[_0x58781a(0x9b)](apps)[0x0]:undefined),_0x3d7a6e=_0x547361[_0x58781a(0x8c)][_0x58781a(0x99)]&&typeof _0x547361['globalConfig'][_0x58781a(0x99)]===_0x58781a(0x9f)?_0x547361['globalConfig']['apps']:{},_0x515477=_0x547361[_0x58781a(0x8d)][_0x58781a(0x99)]&&typeof _0x547361[_0x58781a(0x8d)][_0x58781a(0x99)]==='object'?_0x547361['projectConfig']['apps']:{},_0x5989c2=Object[_0x58781a(0xa6)](apps),_0x163fcd=_0x5989c2[_0x58781a(0x9d)](([_0x106e40,_0x29612a])=>{const _0x196a7c=_0x58781a,_0x579121=appDefinedIn(_0x106e40,_0x3d7a6e,_0x515477),_0x2ed71e=Object['prototype']['hasOwnProperty']['call'](_0x515477,_0x106e40),_0x411b55=resolveEffectiveRegion({'appRegion':_0x29612a[_0x196a7c(0x98)],'projectRegion':_0x2ed71e?_0x547361['projectConfig'][_0x196a7c(0x98)]:undefined,'globalRegion':_0x547361[_0x196a7c(0x8c)][_0x196a7c(0x98)],'mergedRegion':_0x561680['region'],'appName':_0x106e40});return{'name':_0x106e40,'appcode':_0x29612a[_0x196a7c(0x8e)],'named':!![],'definedIn':_0x579121,'isDefault':_0x106e40===_0x3f83fc,...buildAppProfileListFields(_0x29612a),'effectiveRegion':_0x411b55['region'],'regionSource':_0x411b55[_0x196a7c(0x83)]};});return _0x163fcd;}function validateAppListFlags(_0x4fefe7){const _0x9ff947=a20_0x4906;if(!_0x4fefe7[_0x9ff947(0x86)](_0x9ff947(0x82)))return;if(!_0x4fefe7['bool'](_0x9ff947(0x8f))&&!_0x4fefe7['bool'](_0x9ff947(0x9a)))return;throw CliErrors['validation'](_0x9ff947(0xa5),'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(_0x54e703){const _0x5a58a1=a20_0x4906;validateAppListFlags(_0x54e703);if(_0x54e703[_0x5a58a1(0x86)]('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x54e703)};const _0x7f5476=_0x54e703[_0x5a58a1(0x86)](_0x5a58a1(0x8f)),_0x5863bd=_0x54e703['bool'](_0x5a58a1(0x9a)),_0x357fb9=_0x7f5476?'global':_0x5863bd?_0x5a58a1(0x9a):_0x5a58a1(0x89),{config:_0x3048bd,layers:_0x13ee84}=readRawConfigWithLayers(),_0x23e1e2=resolveDefaultAppSource(_0x13ee84),{defaultApp:_0x527053}=_0x3048bd;let _0x3553ef,_0x3ac511;switch(_0x357fb9){case _0x5a58a1(0x8f):_0x3553ef=buildItemsFromLayer(_0x13ee84[_0x5a58a1(0x8c)],_0x5a58a1(0x8f)),_0x3ac511=_0x13ee84['globalPath'];break;case _0x5a58a1(0x9a):_0x3553ef=buildItemsFromLayer(_0x13ee84[_0x5a58a1(0x8d)],_0x5a58a1(0x9a),_0x13ee84[_0x5a58a1(0x8c)][_0x5a58a1(0x98)]),_0x3ac511=_0x13ee84['projectPath'];break;default:_0x3553ef=buildMergedItems(_0x3048bd,_0x13ee84);break;}enrichAppListItemsWithMergedSelection(_0x3553ef,_0x54e703[_0x5a58a1(0x92)]);if(_0x3553ef[_0x5a58a1(0x8b)]===0x0){const _0x50ded1=_0x357fb9==='merged'?'':_0x5a58a1(0xa7)+_0x357fb9+_0x5a58a1(0x88);return{'ok':!![],'data':[],'message':_0x5a58a1(0xab)+_0x50ded1+'.\x20Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x266d11=_0x3553ef[_0x5a58a1(0x96)](_0x48a8e9=>_0x48a8e9[_0x5a58a1(0x81)]===!![]),_0x594f62=_0x527053??_0x266d11?.[_0x5a58a1(0xa8)]??null,_0x46d2ec=_0x357fb9===_0x5a58a1(0x89)?{'globalPath':_0x13ee84[_0x5a58a1(0x91)]??null,'projectPath':_0x13ee84[_0x5a58a1(0xa9)]??null,'defaultApp':_0x594f62,'defaultAppSource':_0x527053!=null?_0x23e1e2:null}:{'scope':_0x357fb9,'configPath':_0x3ac511??null};return{'ok':!![],'data':{'items':_0x3553ef,'meta':_0x46d2ec}};}export const appListDefinition={'service':a20_0x5ec4d7(0xa2),'command':a20_0x5ec4d7(0xa0),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x5ec4d7(0x85),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x5ec4d7(0x82),'type':'boolean','description':a20_0x5ec4d7(0xaa),'default':![]},{'name':a20_0x5ec4d7(0x8f),'type':'boolean','description':'Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','default':![]},{'name':a20_0x5ec4d7(0x9a),'type':a20_0x5ec4d7(0xa4),'description':'Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','default':![]}],async 'validate'(_0x200e63){validateAppListFlags(_0x200e63);},'execute':execute};
@@ -1 +1 @@
1
- const a21_0x61e700=a21_0x7559;function a21_0x2d04(){const _0x45c76c=['length','498NypEmC','appCode','18IFCNrr','1396384giQshM','\x20application\x20member(s)','List\x20application\x20members\x20with\x20their\x20role\x20memberships','members-list','1ymcanp','6989140elVxNH','477140pmeBhO','1007150gRnlYx','read','52164YExDOS','2129104ddhKGL','1599411lbrwZN'];a21_0x2d04=function(){return _0x45c76c;};return a21_0x2d04();}(function(_0x5abe5b,_0x2ef5ff){const _0x189c62=a21_0x7559,_0x49ea97=_0x5abe5b();while(!![]){try{const _0x182057=parseInt(_0x189c62(0x161))/0x1*(parseInt(_0x189c62(0x164))/0x2)+-parseInt(_0x189c62(0x158))/0x3+-parseInt(_0x189c62(0x15d))/0x4+-parseInt(_0x189c62(0x163))/0x5+-parseInt(_0x189c62(0x15a))/0x6*(-parseInt(_0x189c62(0x166))/0x7)+-parseInt(_0x189c62(0x157))/0x8*(parseInt(_0x189c62(0x15c))/0x9)+parseInt(_0x189c62(0x162))/0xa;if(_0x182057===_0x2ef5ff)break;else _0x49ea97['push'](_0x49ea97['shift']());}catch(_0x455ed1){_0x49ea97['push'](_0x49ea97['shift']());}}}(a21_0x2d04,0x4bf1c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';function a21_0x7559(_0x502e26,_0x7b339b){_0x502e26=_0x502e26-0x157;const _0x2d04c3=a21_0x2d04();let _0x755915=_0x2d04c3[_0x502e26];return _0x755915;}import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':'app','command':a21_0x61e700(0x160),'description':a21_0x61e700(0x15f),'risk':a21_0x61e700(0x165),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x123b30){const _0x32113e=a21_0x61e700,_0x47c888=projectAppMembers(await listRoleUsers(_0x123b30[_0x32113e(0x15b)]));return{'ok':!![],'data':{'appCode':_0x123b30['appCode'],'items':_0x47c888,'totalCount':_0x47c888[_0x32113e(0x159)]},'message':'Found\x20'+_0x47c888[_0x32113e(0x159)]+_0x32113e(0x15e)};}};
1
+ const a21_0x1f862d=a21_0x15e9;(function(_0x135c77,_0x308149){const _0xa561ad=a21_0x15e9,_0x127c8b=_0x135c77();while(!![]){try{const _0x58a7ff=parseInt(_0xa561ad(0x1ed))/0x1*(parseInt(_0xa561ad(0x1f3))/0x2)+parseInt(_0xa561ad(0x1f1))/0x3*(parseInt(_0xa561ad(0x1f6))/0x4)+-parseInt(_0xa561ad(0x1f2))/0x5*(parseInt(_0xa561ad(0x1ec))/0x6)+parseInt(_0xa561ad(0x1f5))/0x7+-parseInt(_0xa561ad(0x1e8))/0x8*(-parseInt(_0xa561ad(0x1f0))/0x9)+parseInt(_0xa561ad(0x1eb))/0xa+-parseInt(_0xa561ad(0x1f4))/0xb;if(_0x58a7ff===_0x308149)break;else _0x127c8b['push'](_0x127c8b['shift']());}catch(_0x6f8af0){_0x127c8b['push'](_0x127c8b['shift']());}}}(a21_0x5dec,0xc0d15));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';function a21_0x5dec(){const _0x4e58c4=['281504ZbckvU','appCode','List\x20application\x20members\x20with\x20their\x20role\x20memberships','1642120eZRmbk','2445426HVERDI','114820OCNZns','length','Found\x20','36qCDWkV','3vjmoSm','10yowakg','14PJvbGw','26105178azzkbY','10981796VMclsU','5202356xliGCh'];a21_0x5dec=function(){return _0x4e58c4;};return a21_0x5dec();}function a21_0x15e9(_0x57c7e6,_0x2a918f){_0x57c7e6=_0x57c7e6-0x1e8;const _0x5decb7=a21_0x5dec();let _0x15e98a=_0x5decb7[_0x57c7e6];return _0x15e98a;}import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':'app','command':'members-list','description':a21_0x1f862d(0x1ea),'risk':'read','requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x20751b){const _0x147634=a21_0x1f862d,_0x4f4615=projectAppMembers(await listRoleUsers(_0x20751b['appCode']));return{'ok':!![],'data':{'appCode':_0x20751b[_0x147634(0x1e9)],'items':_0x4f4615,'totalCount':_0x4f4615[_0x147634(0x1ee)]},'message':_0x147634(0x1ef)+_0x4f4615[_0x147634(0x1ee)]+'\x20application\x20member(s)'};}};
@@ -1 +1 @@
1
- (function(_0x5a9cb1,_0x59dbee){const _0xb64375=a22_0x5d03,_0x1ceb56=_0x5a9cb1();while(!![]){try{const _0x254e3f=parseInt(_0xb64375(0x148))/0x1+parseInt(_0xb64375(0x14b))/0x2+-parseInt(_0xb64375(0x14e))/0x3*(-parseInt(_0xb64375(0x146))/0x4)+-parseInt(_0xb64375(0x14d))/0x5+-parseInt(_0xb64375(0x14f))/0x6*(-parseInt(_0xb64375(0x150))/0x7)+parseInt(_0xb64375(0x145))/0x8+parseInt(_0xb64375(0x147))/0x9*(-parseInt(_0xb64375(0x14c))/0xa);if(_0x254e3f===_0x59dbee)break;else _0x1ceb56['push'](_0x1ceb56['shift']());}catch(_0x5afb3b){_0x1ceb56['push'](_0x1ceb56['shift']());}}}(a22_0x3b62,0x6674b));function a22_0x5d03(_0x4e7607,_0x5beae4){_0x4e7607=_0x4e7607-0x144;const _0x3b620f=a22_0x3b62();let _0x5d03f7=_0x3b620f[_0x4e7607];return _0x5d03f7;}function a22_0x3b62(){const _0x5e430b=['24190740AaZPFW','153350VyofWF','879ypLzxZ','1350fASmiM','24997KMQtrA','map','platform','5453464GtrTtW','8716lqbxcx','9Noipbu','75089wkbyVL','appName','appDesc','1341418WUYVOx'];a22_0x3b62=function(){return _0x5e430b;};return a22_0x3b62();}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(_0x1a8319){const _0x4be212=_0x1a8319['cookie']||getCookie();if(!_0x4be212)throw CliErrors['authRequired']();return _0x4be212;}export async function listRemoteAppDirectory(_0x16dedc){const _0x58dd4a=a22_0x5d03,_0x1dc594=await withActiveCookie(resolveCookie(_0x16dedc),()=>listRemoteApps());return{'items':_0x1dc594[_0x58dd4a(0x151)](_0x434fe1=>({..._0x434fe1['id']!=null?{'id':_0x434fe1['id']}:{},'appCode':_0x434fe1['appCode'],'appName':_0x434fe1[_0x58dd4a(0x149)],..._0x434fe1['appDesc']!=null?{'appDesc':_0x434fe1[_0x58dd4a(0x14a)]}:{}})),'meta':{'source':_0x58dd4a(0x144)}};}
1
+ (function(_0x52c140,_0x5c5bab){const _0x1e5b10=a22_0x1754,_0x27fdb8=_0x52c140();while(!![]){try{const _0x332422=parseInt(_0x1e5b10(0x120))/0x1*(parseInt(_0x1e5b10(0x11f))/0x2)+parseInt(_0x1e5b10(0x12b))/0x3*(-parseInt(_0x1e5b10(0x123))/0x4)+-parseInt(_0x1e5b10(0x12a))/0x5+parseInt(_0x1e5b10(0x124))/0x6+parseInt(_0x1e5b10(0x125))/0x7*(-parseInt(_0x1e5b10(0x122))/0x8)+-parseInt(_0x1e5b10(0x126))/0x9+parseInt(_0x1e5b10(0x129))/0xa;if(_0x332422===_0x5c5bab)break;else _0x27fdb8['push'](_0x27fdb8['shift']());}catch(_0x5245bf){_0x27fdb8['push'](_0x27fdb8['shift']());}}}(a22_0x497c,0xc6578));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';function a22_0x497c(){const _0x1c45b1=['32tlJfLA','105324HYigbT','2136216ABCABL','553861XtggyT','6784227fNBhWw','platform','authRequired','22389180KfDwWB','6067965PajMpL','75hRmEFL','appCode','cookie','map','186tYUBAQ','12469xzYpQd','appName'];a22_0x497c=function(){return _0x1c45b1;};return a22_0x497c();}import{CliErrors}from'../../errors.js';function a22_0x1754(_0x569769,_0x4bc870){_0x569769=_0x569769-0x11f;const _0x497cbd=a22_0x497c();let _0x175424=_0x497cbd[_0x569769];return _0x175424;}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x16b141){const _0x3e8aa9=a22_0x1754,_0x485be3=_0x16b141[_0x3e8aa9(0x12d)]||getCookie();if(!_0x485be3)throw CliErrors[_0x3e8aa9(0x128)]();return _0x485be3;}export async function listRemoteAppDirectory(_0x2d83cc){const _0x205f9e=a22_0x1754,_0x3df71e=await withActiveCookie(resolveCookie(_0x2d83cc),()=>listRemoteApps());return{'items':_0x3df71e[_0x205f9e(0x12e)](_0x3b1348=>({..._0x3b1348['id']!=null?{'id':_0x3b1348['id']}:{},'appCode':_0x3b1348[_0x205f9e(0x12c)],'appName':_0x3b1348[_0x205f9e(0x121)],..._0x3b1348['appDesc']!=null?{'appDesc':_0x3b1348['appDesc']}:{}})),'meta':{'source':_0x205f9e(0x127)}};}
@@ -1 +1 @@
1
- (function(_0x15d705,_0x453afd){const _0x41f51a=a23_0x38df,_0x3ec231=_0x15d705();while(!![]){try{const _0x4c2d98=parseInt(_0x41f51a(0xa5))/0x1*(-parseInt(_0x41f51a(0xad))/0x2)+-parseInt(_0x41f51a(0xbb))/0x3+parseInt(_0x41f51a(0xaf))/0x4*(-parseInt(_0x41f51a(0x96))/0x5)+-parseInt(_0x41f51a(0xb8))/0x6+-parseInt(_0x41f51a(0xbf))/0x7+-parseInt(_0x41f51a(0xa8))/0x8*(-parseInt(_0x41f51a(0xc0))/0x9)+-parseInt(_0x41f51a(0x9f))/0xa*(-parseInt(_0x41f51a(0xaa))/0xb);if(_0x4c2d98===_0x453afd)break;else _0x3ec231['push'](_0x3ec231['shift']());}catch(_0x401df1){_0x3ec231['push'](_0x3ec231['shift']());}}}(a23_0x3be6,0xee715));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x2bc4c4){const _0x5a52ce=_0x2bc4c4?.['trim']();return _0x5a52ce?_0x5a52ce:null;}export function projectAppMembers(_0xc55b84){const _0x1513eb=a23_0x38df,_0x456810=new Map(),_0x39c1fe=[..._0xc55b84][_0x1513eb(0xb2)]((_0x138ab6,_0x34953a)=>_0x138ab6['id']-_0x34953a['id']),_0x5a6193=(_0x127cb8,_0x5b4766,_0x5a8364)=>{const _0x53a9b1=_0x1513eb;for(const _0x3b52f6 of _0x5b4766){const _0x2aff04=Number(_0x3b52f6[_0x53a9b1(0xbe)]);if(!Number['isFinite'](_0x2aff04)||_0x2aff04<=0x0)continue;let _0x4f8669=_0x456810[_0x53a9b1(0xc7)](_0x2aff04);if(!_0x4f8669)_0x4f8669={'userId':_0x2aff04,'username':nullableText(_0x3b52f6[_0x53a9b1(0x98)]),'displayName':nullableText(_0x3b52f6[_0x53a9b1(0xc3)]),'status':_0x5a8364,'roles':[],'roleKeys':new Set()},_0x456810['set'](_0x2aff04,_0x4f8669);else{_0x4f8669['username']??=nullableText(_0x3b52f6[_0x53a9b1(0x98)]),_0x4f8669[_0x53a9b1(0xb9)]??=nullableText(_0x3b52f6[_0x53a9b1(0xc3)]);if(_0x5a8364===_0x53a9b1(0xa2))_0x4f8669['status']='ACTIVE';}const _0x3b2caf=_0x127cb8['id']+':'+_0x5a8364;if(_0x4f8669[_0x53a9b1(0xae)][_0x53a9b1(0xb0)](_0x3b2caf))continue;_0x4f8669[_0x53a9b1(0xae)][_0x53a9b1(0xa3)](_0x3b2caf),_0x4f8669[_0x53a9b1(0xba)][_0x53a9b1(0xac)]({'roleId':_0x127cb8['id'],'roleCode':_0x127cb8[_0x53a9b1(0x9e)],'roleName':nullableText(_0x127cb8[_0x53a9b1(0x99)]),'roleType':nullableText(_0x127cb8[_0x53a9b1(0xbd)]),'membershipStatus':_0x5a8364});}};for(const _0x2e7f02 of _0x39c1fe){_0x5a6193(_0x2e7f02,_0x2e7f02[_0x1513eb(0x97)]??[],_0x1513eb(0xa2)),_0x5a6193(_0x2e7f02,_0x2e7f02['applyUserList']??[],_0x1513eb(0xc6));}return[..._0x456810[_0x1513eb(0x9d)]()]['map'](_0xc2e5ad=>({'userId':_0xc2e5ad[_0x1513eb(0xbe)],'username':_0xc2e5ad[_0x1513eb(0x98)],'displayName':_0xc2e5ad[_0x1513eb(0xb9)],'status':_0xc2e5ad[_0x1513eb(0xa7)],'roles':_0xc2e5ad['roles']['sort']((_0x3cf4a8,_0x13dc99)=>_0x3cf4a8[_0x1513eb(0xb6)]-_0x13dc99[_0x1513eb(0xb6)]||(_0x3cf4a8[_0x1513eb(0xc4)]===_0x13dc99[_0x1513eb(0xc4)]?0x0:_0x3cf4a8[_0x1513eb(0xc4)]==='ACTIVE'?-0x1:0x1))}))[_0x1513eb(0xb2)]((_0x1eb45c,_0x40672a)=>_0x1eb45c[_0x1513eb(0xbe)]-_0x40672a[_0x1513eb(0xbe)]);}export function enrichAppListItemsWithMergedSelection(_0x137327,_0x4a690f){const _0x9d85ae=a23_0x38df;if(!_0x4a690f)return;const _0xae193d=_0x4a690f[_0x9d85ae(0xb4)]&&typeof _0x4a690f[_0x9d85ae(0xb4)]==='object'?_0x4a690f[_0x9d85ae(0xb4)]:{},_0x5137e6=Object[_0x9d85ae(0xbc)](_0xae193d)[_0x9d85ae(0xab)]>0x0;for(const _0x2fe2db of _0x137327){_0x2fe2db[_0x9d85ae(0xa0)]=![];}const _0x42aa0a=_0x4a690f[_0x9d85ae(0xa9)]!=null?String(_0x4a690f[_0x9d85ae(0xa9)])[_0x9d85ae(0xa1)]():'';if(_0x5137e6){const _0x33d1e4=_0x4a690f[_0x9d85ae(0xb7)]??_0x4a690f[_0x9d85ae(0x9b)];if(_0x33d1e4)for(const _0x314673 of _0x137327){_0x314673[_0x9d85ae(0xc2)]===!![]&&_0x314673[_0x9d85ae(0xb5)]===_0x33d1e4&&(_0x314673[_0x9d85ae(0xa0)]=!![]);}for(const _0x102dd8 of _0x137327){if(_0x102dd8['named']!==![])continue;if(_0x4a690f[_0x9d85ae(0x9b)])continue;_0x42aa0a&&String(_0x102dd8[_0x9d85ae(0xa4)]??'')[_0x9d85ae(0xa1)]()===_0x42aa0a&&(_0x102dd8[_0x9d85ae(0xa0)]=!![]);}return;}if(!_0x42aa0a)return;for(const _0x340f6c of _0x137327){String(_0x340f6c[_0x9d85ae(0xa4)]??'')[_0x9d85ae(0xa1)]()===_0x42aa0a&&(_0x340f6c[_0x9d85ae(0xa0)]=!![]);}}export function resolveAppScopeForWrite(_0x1c6238,_0x484b3c,_0x20a78f){const _0x49b911=a23_0x38df;if(_0x484b3c)return _0x49b911(0xb1);const _0x7a03c=_0x20a78f[_0x49b911(0xc9)][_0x49b911(0xb4)]&&typeof _0x20a78f[_0x49b911(0xc9)][_0x49b911(0xb4)]==='object'?_0x20a78f[_0x49b911(0xc9)][_0x49b911(0xb4)]:{},_0x4bc012=_0x20a78f[_0x49b911(0x9a)][_0x49b911(0xb4)]&&typeof _0x20a78f['globalConfig'][_0x49b911(0xb4)]===_0x49b911(0xa6)?_0x20a78f[_0x49b911(0x9a)][_0x49b911(0xb4)]:{};if(Object[_0x49b911(0x9c)][_0x49b911(0xc1)][_0x49b911(0xc5)](_0x7a03c,_0x1c6238))return _0x49b911(0xb3);if(Object[_0x49b911(0x9c)]['hasOwnProperty']['call'](_0x4bc012,_0x1c6238))return _0x49b911(0xb1);return _0x49b911(0xb3);}function a23_0x38df(_0x4e89a0,_0x7c3870){_0x4e89a0=_0x4e89a0-0x96;const _0x3be625=a23_0x3be6();let _0x38dfbd=_0x3be625[_0x4e89a0];return _0x38dfbd;}export function appDefinedIn(_0x11ac1b,_0x3c61bf,_0x5f0d17){const _0x11c7ce=a23_0x38df,_0x4dea93=Object[_0x11c7ce(0x9c)][_0x11c7ce(0xc1)][_0x11c7ce(0xc5)](_0x3c61bf,_0x11ac1b),_0x22972a=Object['prototype']['hasOwnProperty']['call'](_0x5f0d17,_0x11ac1b);if(_0x4dea93&&_0x22972a)return'both';if(_0x22972a)return'project';return _0x11c7ce(0xb1);}export function resolveDefaultAppSource(_0x6d18b6){const _0x5a16ce=a23_0x38df,_0x493884=_0x6d18b6['projectConfig'][_0x5a16ce(0xb4)]&&typeof _0x6d18b6[_0x5a16ce(0xc9)][_0x5a16ce(0xb4)]===_0x5a16ce(0xa6)?_0x6d18b6[_0x5a16ce(0xc9)]['apps']:{};if('defaultApp'in _0x6d18b6[_0x5a16ce(0xc9)])return _0x5a16ce(0xb3);if(Object['keys'](_0x493884)['length']>0x0)return _0x5a16ce(0xb3);if(Object[_0x5a16ce(0xbc)](_0x6d18b6[_0x5a16ce(0xc9)])[_0x5a16ce(0xab)]===0x0&&_0x6d18b6['globalConfig'][_0x5a16ce(0x9b)])return'global';return null;}export function getConfigPath(_0x16e6f8={}){const _0x4461da=a23_0x38df,_0x3e8d76=_0x16e6f8[_0x4461da(0xb1)]?_0x4461da(0xb1):_0x4461da(0xb3);return resolveWriteConfigPath(_0x3e8d76);}function a23_0x3be6(){const _0x582277=['named','nickname','membershipStatus','call','PENDING','get','\x20(global)','projectConfig','160bGHONM','userList','username','roleName','globalConfig','defaultApp','prototype','values','roleCode','90XyuWiw','isCurrent','trim','ACTIVE','add','appcode','3FwIxXO','object','status','2676976QKWugD','appCode','7736091tRcbLA','length','push','1070838HBqguu','roleKeys','151896jgBbex','has','global','sort','project','apps','name','roleId','currentApp','2394696icKSGN','displayName','roles','2262474JVdkON','keys','roleType','userId','11989537IvbsUf','9mkwhrU','hasOwnProperty'];a23_0x3be6=function(){return _0x582277;};return a23_0x3be6();}export function readConfig(_0x13eaef={}){return readConfigFile(getConfigPath(_0x13eaef));}export function writeConfig(_0x3a7b3d,_0x4a867f={}){writeConfigFile(getConfigPath(_0x4a867f),_0x3a7b3d);}export function scopeLabel(_0x53b1c1){const _0x275954=a23_0x38df;return _0x53b1c1[_0x275954(0xb1)]?_0x275954(0xc8):'';}
1
+ (function(_0x515252,_0x239681){const _0x59de48=a23_0x214a,_0x377068=_0x515252();while(!![]){try{const _0x4d8bdb=-parseInt(_0x59de48(0x19d))/0x1+parseInt(_0x59de48(0x19f))/0x2*(-parseInt(_0x59de48(0x197))/0x3)+parseInt(_0x59de48(0x18f))/0x4*(-parseInt(_0x59de48(0x183))/0x5)+parseInt(_0x59de48(0x1a0))/0x6+parseInt(_0x59de48(0x187))/0x7+parseInt(_0x59de48(0x18b))/0x8*(-parseInt(_0x59de48(0x17c))/0x9)+parseInt(_0x59de48(0x184))/0xa;if(_0x4d8bdb===_0x239681)break;else _0x377068['push'](_0x377068['shift']());}catch(_0x524ce4){_0x377068['push'](_0x377068['shift']());}}}(a23_0x4674,0x91931));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x36629e){const _0x4ff645=a23_0x214a,_0x3b9489=_0x36629e?.[_0x4ff645(0x189)]();return _0x3b9489?_0x3b9489:null;}export function projectAppMembers(_0x2d8d75){const _0xdb7b65=a23_0x214a,_0x4f4aef=new Map(),_0x2471d2=[..._0x2d8d75]['sort']((_0x2bf70b,_0x50fb38)=>_0x2bf70b['id']-_0x50fb38['id']),_0x142ad8=(_0x1a6b02,_0xf3b7f,_0x5448c2)=>{const _0x4ff5d3=a23_0x214a;for(const _0x22229f of _0xf3b7f){const _0x46f464=Number(_0x22229f['userId']);if(!Number[_0x4ff5d3(0x1a2)](_0x46f464)||_0x46f464<=0x0)continue;let _0x4999de=_0x4f4aef['get'](_0x46f464);if(!_0x4999de)_0x4999de={'userId':_0x46f464,'username':nullableText(_0x22229f[_0x4ff5d3(0x191)]),'displayName':nullableText(_0x22229f['nickname']),'status':_0x5448c2,'roles':[],'roleKeys':new Set()},_0x4f4aef[_0x4ff5d3(0x1ac)](_0x46f464,_0x4999de);else{_0x4999de['username']??=nullableText(_0x22229f[_0x4ff5d3(0x191)]),_0x4999de[_0x4ff5d3(0x19a)]??=nullableText(_0x22229f[_0x4ff5d3(0x194)]);if(_0x5448c2===_0x4ff5d3(0x188))_0x4999de[_0x4ff5d3(0x19e)]=_0x4ff5d3(0x188);}const _0x43bed1=_0x1a6b02['id']+':'+_0x5448c2;if(_0x4999de[_0x4ff5d3(0x190)]['has'](_0x43bed1))continue;_0x4999de[_0x4ff5d3(0x190)]['add'](_0x43bed1),_0x4999de['roles'][_0x4ff5d3(0x196)]({'roleId':_0x1a6b02['id'],'roleCode':_0x1a6b02[_0x4ff5d3(0x181)],'roleName':nullableText(_0x1a6b02[_0x4ff5d3(0x1a4)]),'roleType':nullableText(_0x1a6b02[_0x4ff5d3(0x198)]),'membershipStatus':_0x5448c2});}};for(const _0x27a906 of _0x2471d2){_0x142ad8(_0x27a906,_0x27a906[_0xdb7b65(0x192)]??[],'ACTIVE'),_0x142ad8(_0x27a906,_0x27a906[_0xdb7b65(0x1aa)]??[],_0xdb7b65(0x1a7));}return[..._0x4f4aef[_0xdb7b65(0x17d)]()][_0xdb7b65(0x17b)](_0x495645=>({'userId':_0x495645['userId'],'username':_0x495645[_0xdb7b65(0x191)],'displayName':_0x495645[_0xdb7b65(0x19a)],'status':_0x495645[_0xdb7b65(0x19e)],'roles':_0x495645[_0xdb7b65(0x18e)][_0xdb7b65(0x19c)]((_0x4aed4a,_0x539e2f)=>_0x4aed4a[_0xdb7b65(0x18c)]-_0x539e2f[_0xdb7b65(0x18c)]||(_0x4aed4a[_0xdb7b65(0x180)]===_0x539e2f['membershipStatus']?0x0:_0x4aed4a[_0xdb7b65(0x180)]===_0xdb7b65(0x188)?-0x1:0x1))}))[_0xdb7b65(0x19c)]((_0x309977,_0xbc34a5)=>_0x309977['userId']-_0xbc34a5[_0xdb7b65(0x19b)]);}export function enrichAppListItemsWithMergedSelection(_0x7807b4,_0xb93c7c){const _0x379d7d=a23_0x214a;if(!_0xb93c7c)return;const _0x4b3b33=_0xb93c7c[_0x379d7d(0x18a)]&&typeof _0xb93c7c[_0x379d7d(0x18a)]===_0x379d7d(0x1a8)?_0xb93c7c[_0x379d7d(0x18a)]:{},_0x1397ac=Object[_0x379d7d(0x193)](_0x4b3b33)[_0x379d7d(0x17f)]>0x0;for(const _0x529b66 of _0x7807b4){_0x529b66[_0x379d7d(0x186)]=![];}const _0x396d30=_0xb93c7c[_0x379d7d(0x17a)]!=null?String(_0xb93c7c['appCode'])[_0x379d7d(0x189)]():'';if(_0x1397ac){const _0x21c731=_0xb93c7c[_0x379d7d(0x18d)]??_0xb93c7c[_0x379d7d(0x199)];if(_0x21c731)for(const _0x259385 of _0x7807b4){_0x259385[_0x379d7d(0x1a1)]===!![]&&_0x259385[_0x379d7d(0x1a3)]===_0x21c731&&(_0x259385[_0x379d7d(0x186)]=!![]);}for(const _0xbc6ae7 of _0x7807b4){if(_0xbc6ae7[_0x379d7d(0x1a1)]!==![])continue;if(_0xb93c7c[_0x379d7d(0x199)])continue;_0x396d30&&String(_0xbc6ae7['appcode']??'')[_0x379d7d(0x189)]()===_0x396d30&&(_0xbc6ae7[_0x379d7d(0x186)]=!![]);}return;}if(!_0x396d30)return;for(const _0x13dc70 of _0x7807b4){String(_0x13dc70[_0x379d7d(0x1a5)]??'')[_0x379d7d(0x189)]()===_0x396d30&&(_0x13dc70['isCurrent']=!![]);}}export function resolveAppScopeForWrite(_0x24e640,_0x4300d5,_0x3167b5){const _0x2472d=a23_0x214a;if(_0x4300d5)return'global';const _0x5c4684=_0x3167b5[_0x2472d(0x17e)]['apps']&&typeof _0x3167b5[_0x2472d(0x17e)][_0x2472d(0x18a)]==='object'?_0x3167b5[_0x2472d(0x17e)][_0x2472d(0x18a)]:{},_0x128e09=_0x3167b5[_0x2472d(0x179)]['apps']&&typeof _0x3167b5['globalConfig'][_0x2472d(0x18a)]===_0x2472d(0x1a8)?_0x3167b5[_0x2472d(0x179)][_0x2472d(0x18a)]:{};if(Object['prototype']['hasOwnProperty'][_0x2472d(0x1ab)](_0x5c4684,_0x24e640))return'project';if(Object['prototype']['hasOwnProperty']['call'](_0x128e09,_0x24e640))return'global';return _0x2472d(0x185);}export function appDefinedIn(_0x493fe4,_0x3b0f2c,_0x4f7f31){const _0x5dd1ed=a23_0x214a,_0x30e868=Object['prototype'][_0x5dd1ed(0x1a9)][_0x5dd1ed(0x1ab)](_0x3b0f2c,_0x493fe4),_0x2bd41f=Object[_0x5dd1ed(0x195)][_0x5dd1ed(0x1a9)][_0x5dd1ed(0x1ab)](_0x4f7f31,_0x493fe4);if(_0x30e868&&_0x2bd41f)return _0x5dd1ed(0x182);if(_0x2bd41f)return _0x5dd1ed(0x185);return _0x5dd1ed(0x1a6);}function a23_0x4674(){const _0x5def7c=['apps','48088KUaLjz','roleId','currentApp','roles','112ToGLVV','roleKeys','username','userList','keys','nickname','prototype','push','1266378SGHtil','roleType','defaultApp','displayName','userId','sort','1043312tFvMMe','status','2KvKBNg','2189550kDswST','named','isFinite','name','roleName','appcode','global','PENDING','object','hasOwnProperty','applyUserList','call','set','globalConfig','appCode','map','27qwbrNt','values','projectConfig','length','membershipStatus','roleCode','both','35925ixbwQo','17181540AWPIrb','project','isCurrent','1384915bjbIlZ','ACTIVE','trim'];a23_0x4674=function(){return _0x5def7c;};return a23_0x4674();}export function resolveDefaultAppSource(_0x225eba){const _0x169a99=a23_0x214a,_0x5e1e17=_0x225eba['projectConfig'][_0x169a99(0x18a)]&&typeof _0x225eba[_0x169a99(0x17e)][_0x169a99(0x18a)]==='object'?_0x225eba['projectConfig'][_0x169a99(0x18a)]:{};if('defaultApp'in _0x225eba[_0x169a99(0x17e)])return _0x169a99(0x185);if(Object['keys'](_0x5e1e17)[_0x169a99(0x17f)]>0x0)return _0x169a99(0x185);if(Object[_0x169a99(0x193)](_0x225eba[_0x169a99(0x17e)])[_0x169a99(0x17f)]===0x0&&_0x225eba['globalConfig'][_0x169a99(0x199)])return'global';return null;}function a23_0x214a(_0x3807bc,_0x1872bf){_0x3807bc=_0x3807bc-0x179;const _0x467434=a23_0x4674();let _0x214a57=_0x467434[_0x3807bc];return _0x214a57;}export function getConfigPath(_0x25c012={}){const _0x41b2a9=a23_0x214a,_0xa6a273=_0x25c012['global']?_0x41b2a9(0x1a6):_0x41b2a9(0x185);return resolveWriteConfigPath(_0xa6a273);}export function readConfig(_0x435db4={}){return readConfigFile(getConfigPath(_0x435db4));}export function writeConfig(_0xf04c52,_0x15e3d5={}){writeConfigFile(getConfigPath(_0x15e3d5),_0xf04c52);}export function scopeLabel(_0x4ea63e){const _0x54ded7=a23_0x214a;return _0x4ea63e[_0x54ded7(0x1a6)]?'\x20(global)':'';}
@@ -1 +1 @@
1
- const a24_0x2b36eb=a24_0x1878;(function(_0xc4c37c,_0x2d50ab){const _0x2b7c38=a24_0x1878,_0x3a8392=_0xc4c37c();while(!![]){try{const _0x4ee63b=parseInt(_0x2b7c38(0x148))/0x1+-parseInt(_0x2b7c38(0x150))/0x2+parseInt(_0x2b7c38(0x14b))/0x3+-parseInt(_0x2b7c38(0x14f))/0x4*(parseInt(_0x2b7c38(0x149))/0x5)+-parseInt(_0x2b7c38(0x15e))/0x6*(parseInt(_0x2b7c38(0x158))/0x7)+parseInt(_0x2b7c38(0x15c))/0x8+-parseInt(_0x2b7c38(0x14d))/0x9*(parseInt(_0x2b7c38(0x14a))/0xa);if(_0x4ee63b===_0x2d50ab)break;else _0x3a8392['push'](_0x3a8392['shift']());}catch(_0x50c214){_0x3a8392['push'](_0x3a8392['shift']());}}}(a24_0xc23d,0xa3b2d));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_0x2b36eb(0x151);function a24_0x1878(_0xbd9f3d,_0x231698){_0xbd9f3d=_0xbd9f3d-0x147;const _0xc23d4e=a24_0xc23d();let _0x18786a=_0xc23d4e[_0xbd9f3d];return _0x18786a;}export const appConfigDelete={'service':a24_0x2b36eb(0x15b),'command':'delete','description':a24_0x2b36eb(0x15d),'risk':a24_0x2b36eb(0x14e),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5da1e7){readKeyArg(_0x5da1e7);},async 'dryRun'(_0x280397){const _0x340e0e=a24_0x2b36eb,_0x242e9a=readKeyArg(_0x280397),_0x407593=await mustGetByKey(_0x280397['appCode'],_0x242e9a);return asAppConfigDryRunResult(buildMutationData({'operation':_0x340e0e(0x15f),'appCode':_0x280397[_0x340e0e(0x14c)],'key':_0x242e9a,'before':projectAppConfig(_0x407593),'after':null,'dryRun':!![]}),{'method':_0x340e0e(0x152),'url':DELETE_PATH});},async 'execute'(_0x121eab){const _0x546949=a24_0x2b36eb,_0x30a9c3=readKeyArg(_0x121eab),_0x9f5e77=await mustGetByKey(_0x121eab[_0x546949(0x14c)],_0x30a9c3);return await withAppConfigApiBoundary(_0x546949(0x15f),{'appCode':_0x121eab[_0x546949(0x14c)],'key':_0x30a9c3},()=>deleteAppConfig({'appCode':_0x121eab[_0x546949(0x14c)],'id':requireAppConfigId(_0x9f5e77,_0x30a9c3,_0x121eab['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x121eab[_0x546949(0x14c)],'key':_0x30a9c3,'before':projectAppConfig(_0x9f5e77),'after':null,'dryRun':![]}),'message':_0x546949(0x155)+_0x30a9c3};}};async function mustGetByKey(_0x12c859,_0x4c32ff){const _0x17d6d4=a24_0x2b36eb,_0x4bab28=await withAppConfigApiBoundary(_0x17d6d4(0x153),{'appCode':_0x12c859,'key':_0x4c32ff},()=>getAppConfigByKey(_0x12c859,_0x4c32ff));if(!_0x4bab28)throw CliErrors[_0x17d6d4(0x157)]('App\x20config\x20key\x20not\x20found:\x20'+_0x4c32ff,_0x17d6d4(0x160)+_0x12c859);return _0x4bab28;}function requireAppConfigId(_0x42c44c,_0x1c3e3c,_0x426b8b){const _0x363f79=a24_0x2b36eb;if(typeof _0x42c44c['id']===_0x363f79(0x154)&&Number[_0x363f79(0x156)](_0x42c44c['id'])&&_0x42c44c['id']>0x0)return _0x42c44c['id'];throw CliErrors[_0x363f79(0x159)](_0x363f79(0x147)+_0x1c3e3c+_0x363f79(0x15a)+_0x426b8b);}function a24_0xc23d(){const _0x531beb=['/smartapi/app-config/delete','POST','get','number','Deleted\x20app\x20config\x20','isFinite','validation','57295nOXgfc','apiError',',\x20appCode=','app-config','7218880BdtpwA','Delete\x20one\x20runtime\x20app-config\x20key','6STesaD','delete','appCode:\x20','App\x20config\x20server\x20id\x20missing\x20for\x20key=','1000281JkhGCP','10rDTCbJ','1495910NiTWSX','3014610ayHnZK','appCode','9ZsCNEM','high-risk-write','2222252vZViYJ','1936200dutnRs'];a24_0xc23d=function(){return _0x531beb;};return a24_0xc23d();}
1
+ const a24_0x4763bf=a24_0x16fd;function a24_0x16fd(_0x43cd90,_0xb4b21a){_0x43cd90=_0x43cd90-0xe6;const _0x4de1a5=a24_0x4de1();let _0x16fd82=_0x4de1a5[_0x43cd90];return _0x16fd82;}(function(_0x5da98d,_0x3281d4){const _0x9ecc68=a24_0x16fd,_0x1d79a3=_0x5da98d();while(!![]){try{const _0x462815=-parseInt(_0x9ecc68(0xfb))/0x1*(-parseInt(_0x9ecc68(0xee))/0x2)+parseInt(_0x9ecc68(0xe8))/0x3+parseInt(_0x9ecc68(0xf4))/0x4*(parseInt(_0x9ecc68(0xe9))/0x5)+parseInt(_0x9ecc68(0xea))/0x6+-parseInt(_0x9ecc68(0xf3))/0x7+parseInt(_0x9ecc68(0xfa))/0x8*(parseInt(_0x9ecc68(0xef))/0x9)+-parseInt(_0x9ecc68(0xf5))/0xa;if(_0x462815===_0x3281d4)break;else _0x1d79a3['push'](_0x1d79a3['shift']());}catch(_0x42b6a1){_0x1d79a3['push'](_0x1d79a3['shift']());}}}(a24_0x4de1,0x5bde1));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0x4de1(){const _0x3e9b83=['Delete\x20one\x20runtime\x20app-config\x20key','App\x20config\x20server\x20id\x20missing\x20for\x20key=','app-config','2504hRKjOh','691lEdOUe','appCode:\x20','delete','POST','720081bYxygK','35FuMAou','4304904dnNIDS','get',',\x20appCode=','high-risk-write','194bpoTUW','8208isvJYg','appCode','number','apiError','2209284DaXsHl','43876NWcYxE','6948760QUBFEx','validation'];a24_0x4de1=function(){return _0x3e9b83;};return a24_0x4de1();}import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH='/smartapi/app-config/delete';export const appConfigDelete={'service':a24_0x4763bf(0xf9),'command':a24_0x4763bf(0xe6),'description':a24_0x4763bf(0xf7),'risk':a24_0x4763bf(0xed),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x172356){readKeyArg(_0x172356);},async 'dryRun'(_0x13364a){const _0x54fd39=a24_0x4763bf,_0x5d3b3e=readKeyArg(_0x13364a),_0x3454ed=await mustGetByKey(_0x13364a['appCode'],_0x5d3b3e);return asAppConfigDryRunResult(buildMutationData({'operation':_0x54fd39(0xe6),'appCode':_0x13364a[_0x54fd39(0xf0)],'key':_0x5d3b3e,'before':projectAppConfig(_0x3454ed),'after':null,'dryRun':!![]}),{'method':_0x54fd39(0xe7),'url':DELETE_PATH});},async 'execute'(_0x4cbad1){const _0x984ae6=a24_0x4763bf,_0xbab04=readKeyArg(_0x4cbad1),_0x12561c=await mustGetByKey(_0x4cbad1[_0x984ae6(0xf0)],_0xbab04);return await withAppConfigApiBoundary(_0x984ae6(0xe6),{'appCode':_0x4cbad1[_0x984ae6(0xf0)],'key':_0xbab04},()=>deleteAppConfig({'appCode':_0x4cbad1['appCode'],'id':requireAppConfigId(_0x12561c,_0xbab04,_0x4cbad1[_0x984ae6(0xf0)])})),{'ok':!![],'data':buildMutationData({'operation':_0x984ae6(0xe6),'appCode':_0x4cbad1[_0x984ae6(0xf0)],'key':_0xbab04,'before':projectAppConfig(_0x12561c),'after':null,'dryRun':![]}),'message':'Deleted\x20app\x20config\x20'+_0xbab04};}};async function mustGetByKey(_0xb093f7,_0x53fbe6){const _0x10045d=a24_0x4763bf,_0x22e8b5=await withAppConfigApiBoundary(_0x10045d(0xeb),{'appCode':_0xb093f7,'key':_0x53fbe6},()=>getAppConfigByKey(_0xb093f7,_0x53fbe6));if(!_0x22e8b5)throw CliErrors[_0x10045d(0xf6)]('App\x20config\x20key\x20not\x20found:\x20'+_0x53fbe6,_0x10045d(0xfc)+_0xb093f7);return _0x22e8b5;}function requireAppConfigId(_0x70d342,_0x2573ad,_0x2d0a44){const _0x253231=a24_0x4763bf;if(typeof _0x70d342['id']===_0x253231(0xf1)&&Number['isFinite'](_0x70d342['id'])&&_0x70d342['id']>0x0)return _0x70d342['id'];throw CliErrors[_0x253231(0xf2)](_0x253231(0xf8)+_0x2573ad+_0x253231(0xec)+_0x2d0a44);}
@@ -1 +1 @@
1
- const a25_0xe36777=a25_0x3bf8;(function(_0x4f7d9f,_0x3e7c74){const _0x52a82e=a25_0x3bf8,_0x4255de=_0x4f7d9f();while(!![]){try{const _0x5b3561=-parseInt(_0x52a82e(0x140))/0x1+parseInt(_0x52a82e(0x144))/0x2+-parseInt(_0x52a82e(0x13c))/0x3+-parseInt(_0x52a82e(0x13e))/0x4+-parseInt(_0x52a82e(0x137))/0x5+parseInt(_0x52a82e(0x13b))/0x6+parseInt(_0x52a82e(0x132))/0x7*(parseInt(_0x52a82e(0x136))/0x8);if(_0x5b3561===_0x3e7c74)break;else _0x4255de['push'](_0x4255de['shift']());}catch(_0x674b63){_0x4255de['push'](_0x4255de['shift']());}}}(a25_0x4386,0xd4431));import{getAppConfigByKey}from'../../core/api-client.js';function a25_0x4386(){const _0x44d1ed=['get','validation','4307718Jqnivl','205056lRLULH','bool','6810472oLnUOZ','Loaded\x20app\x20config\x20','772012yrcUvo','read','\x20with\x20value\x20revealed','appCode:\x20','2944168JhmLOJ','\x20with\x20value\x20redacted','6807388tmxNuZ','appCode','app-config','reveal','24ujVYoX','8475410VPXmCz','App\x20config\x20key\x20not\x20found:\x20'];a25_0x4386=function(){return _0x44d1ed;};return a25_0x4386();}function a25_0x3bf8(_0x42b92f,_0x4c1502){_0x42b92f=_0x42b92f-0x132;const _0x4386b9=a25_0x4386();let _0x3bf8f7=_0x4386b9[_0x42b92f];return _0x3bf8f7;}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':a25_0xe36777(0x134),'command':a25_0xe36777(0x139),'description':'Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','risk':a25_0xe36777(0x141),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x1c2dee){readKeyArg(_0x1c2dee);},async 'execute'(_0x25e676){const _0x3bbf21=a25_0xe36777,_0x5b6894=readKeyArg(_0x25e676),_0x170b6a=await withAppConfigApiBoundary(_0x3bbf21(0x139),{'appCode':_0x25e676[_0x3bbf21(0x133)],'key':_0x5b6894},()=>getAppConfigByKey(_0x25e676[_0x3bbf21(0x133)],_0x5b6894));if(!_0x170b6a)throw CliErrors[_0x3bbf21(0x13a)](_0x3bbf21(0x138)+_0x5b6894,_0x3bbf21(0x143)+_0x25e676[_0x3bbf21(0x133)]);const _0x31dcc7=projectAppConfig(_0x170b6a,{'reveal':_0x25e676[_0x3bbf21(0x13d)](_0x3bbf21(0x135))});return{'ok':!![],'data':{'config':_0x31dcc7},'message':_0x25e676[_0x3bbf21(0x13d)]('reveal')?_0x3bbf21(0x13f)+_0x5b6894+_0x3bbf21(0x142):_0x3bbf21(0x13f)+_0x5b6894+_0x3bbf21(0x145)};}};
1
+ function a25_0x34bb(){const _0x1941f3=['appCode:\x20','get','bool','49110QohVaJ','read','1131038MhwUAf','\x20with\x20value\x20revealed','181912RLbeXO','72YcchCl','reveal','Loaded\x20app\x20config\x20','1vNquRr','validation','2994990vxMoSa','app-config','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','8892366hUXbed','2908014ogxGnu','84dwxgrc','\x20with\x20value\x20redacted','6190808eTEuFs','appCode'];a25_0x34bb=function(){return _0x1941f3;};return a25_0x34bb();}const a25_0x17bec7=a25_0x2e16;function a25_0x2e16(_0x5593dc,_0x395f65){_0x5593dc=_0x5593dc-0x147;const _0x34bbf1=a25_0x34bb();let _0x2e1624=_0x34bbf1[_0x5593dc];return _0x2e1624;}(function(_0x5f11f9,_0x33705a){const _0x48a501=a25_0x2e16,_0x5997ab=_0x5f11f9();while(!![]){try{const _0x10821f=-parseInt(_0x48a501(0x148))/0x1*(parseInt(_0x48a501(0x158))/0x2)+parseInt(_0x48a501(0x14e))/0x3+parseInt(_0x48a501(0x151))/0x4+-parseInt(_0x48a501(0x156))/0x5*(-parseInt(_0x48a501(0x14f))/0x6)+-parseInt(_0x48a501(0x14d))/0x7+parseInt(_0x48a501(0x15a))/0x8*(-parseInt(_0x48a501(0x15b))/0x9)+parseInt(_0x48a501(0x14a))/0xa;if(_0x10821f===_0x33705a)break;else _0x5997ab['push'](_0x5997ab['shift']());}catch(_0x1b93be){_0x5997ab['push'](_0x5997ab['shift']());}}}(a25_0x34bb,0xe4956));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':a25_0x17bec7(0x14b),'command':a25_0x17bec7(0x154),'description':a25_0x17bec7(0x14c),'risk':a25_0x17bec7(0x157),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x52393d){readKeyArg(_0x52393d);},async 'execute'(_0x4c6832){const _0x8cc59=a25_0x17bec7,_0x35331d=readKeyArg(_0x4c6832),_0x43ff77=await withAppConfigApiBoundary(_0x8cc59(0x154),{'appCode':_0x4c6832[_0x8cc59(0x152)],'key':_0x35331d},()=>getAppConfigByKey(_0x4c6832[_0x8cc59(0x152)],_0x35331d));if(!_0x43ff77)throw CliErrors[_0x8cc59(0x149)]('App\x20config\x20key\x20not\x20found:\x20'+_0x35331d,_0x8cc59(0x153)+_0x4c6832[_0x8cc59(0x152)]);const _0x445061=projectAppConfig(_0x43ff77,{'reveal':_0x4c6832['bool'](_0x8cc59(0x15c))});return{'ok':!![],'data':{'config':_0x445061},'message':_0x4c6832[_0x8cc59(0x155)]('reveal')?_0x8cc59(0x147)+_0x35331d+_0x8cc59(0x159):_0x8cc59(0x147)+_0x35331d+_0x8cc59(0x150)};}};
@@ -1 +1 @@
1
- (function(_0x2aa682,_0x348b9f){const _0x446c50=a26_0x2e7c,_0x697d5e=_0x2aa682();while(!![]){try{const _0x779959=-parseInt(_0x446c50(0xf7))/0x1+parseInt(_0x446c50(0xf8))/0x2+-parseInt(_0x446c50(0xf5))/0x3+parseInt(_0x446c50(0xfa))/0x4*(-parseInt(_0x446c50(0xf6))/0x5)+parseInt(_0x446c50(0xfd))/0x6*(parseInt(_0x446c50(0xf9))/0x7)+parseInt(_0x446c50(0xfc))/0x8*(parseInt(_0x446c50(0xf4))/0x9)+parseInt(_0x446c50(0xfb))/0xa;if(_0x779959===_0x348b9f)break;else _0x697d5e['push'](_0x697d5e['shift']());}catch(_0x305cee){_0x697d5e['push'](_0x697d5e['shift']());}}}(a26_0x4a73,0x4ab23));function a26_0x2e7c(_0x804d59,_0x235f64){_0x804d59=_0x804d59-0xf4;const _0x4a73a0=a26_0x4a73();let _0x2e7cb3=_0x4a73a0[_0x804d59];return _0x2e7cb3;}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 a26_0x4a73(){const _0x5cca39=['229397aTkfGO','716smpEhR','2240350abBJbl','448JUCcFj','36zEIyBh','63675EXYcuM','47280kJrrkq','7985ucBamj','444219HGBAzK','469872zEYTkw'];a26_0x4a73=function(){return _0x5cca39;};return a26_0x4a73();}
1
+ (function(_0x29ef43,_0x3419d5){const _0x180b4a=a26_0x1d7c,_0x41b291=_0x29ef43();while(!![]){try{const _0xc81568=-parseInt(_0x180b4a(0x196))/0x1+parseInt(_0x180b4a(0x198))/0x2+parseInt(_0x180b4a(0x195))/0x3*(-parseInt(_0x180b4a(0x19a))/0x4)+-parseInt(_0x180b4a(0x19c))/0x5*(-parseInt(_0x180b4a(0x193))/0x6)+parseInt(_0x180b4a(0x19b))/0x7+-parseInt(_0x180b4a(0x199))/0x8*(-parseInt(_0x180b4a(0x197))/0x9)+-parseInt(_0x180b4a(0x194))/0xa;if(_0xc81568===_0x3419d5)break;else _0x41b291['push'](_0x41b291['shift']());}catch(_0x221678){_0x41b291['push'](_0x41b291['shift']());}}}(a26_0xb709,0x83697));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 a26_0x1d7c(_0x3abe7c,_0x2150a8){_0x3abe7c=_0x3abe7c-0x193;const _0xb709dc=a26_0xb709();let _0x1d7c3c=_0xb709dc[_0x3abe7c];return _0x1d7c3c;}function a26_0xb709(){const _0x59cedf=['8wFOtSx','419672eBpOEi','5910723EiNdZK','325kgALFh','62820NbPPeb','11662870FhZnqo','21VPuBlz','73299qCQIVa','6255351lqQmjq','584594PLigYm'];a26_0xb709=function(){return _0x59cedf;};return a26_0xb709();}
@@ -1 +1 @@
1
- const a27_0x261e1b=a27_0x4de7;function a27_0x45f8(){const _0x46d9b5=['4973140ImoRAi','Found\x20','2746944nfTvEj','trim','657102bEHDgN','\x20app\x20config(s)','Filter\x20by\x20exact\x20config\x20key','15KKFLxv','2531658Vzycxd','key','4546880wzWZHC','appCode','map','22DbpKmB','1742cYTZiW','list','str','161IIhbAO','631816eeJVdE','length','1958Grirgw'];a27_0x45f8=function(){return _0x46d9b5;};return a27_0x45f8();}(function(_0x2fadd0,_0x169d95){const _0x3ed004=a27_0x4de7,_0x566bda=_0x2fadd0();while(!![]){try{const _0x4f209f=-parseInt(_0x3ed004(0xa4))/0x1*(-parseInt(_0x3ed004(0xaa))/0x2)+parseInt(_0x3ed004(0xaf))/0x3+-parseInt(_0x3ed004(0xb5))/0x4+-parseInt(_0x3ed004(0xb2))/0x5*(-parseInt(_0x3ed004(0xb3))/0x6)+parseInt(_0x3ed004(0xa7))/0x7*(-parseInt(_0x3ed004(0xa8))/0x8)+-parseInt(_0x3ed004(0xad))/0x9+-parseInt(_0x3ed004(0xab))/0xa*(-parseInt(_0x3ed004(0xa3))/0xb);if(_0x4f209f===_0x169d95)break;else _0x566bda['push'](_0x566bda['shift']());}catch(_0x5a12d3){_0x566bda['push'](_0x566bda['shift']());}}}(a27_0x45f8,0xe2326));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 a27_0x4de7(_0xfb0547,_0x2db3a7){_0xfb0547=_0xfb0547-0xa3;const _0x45f888=a27_0x45f8();let _0x4de7a4=_0x45f888[_0xfb0547];return _0x4de7a4;}export const appConfigList={'service':'app-config','command':a27_0x261e1b(0xa5),'description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'key','type':'string','description':a27_0x261e1b(0xb1)},TAGS_FLAG],async 'validate'(_0x548c5a){const _0x155e8b=a27_0x261e1b,_0x472f26=_0x548c5a['str'](_0x155e8b(0xb4))[_0x155e8b(0xae)]();if(_0x472f26)validateKey(_0x472f26);readOptionalTags(_0x548c5a);},async 'execute'(_0x17588e){const _0x33c124=a27_0x261e1b,_0x4a18bd=_0x17588e[_0x33c124(0xa6)](_0x33c124(0xb4))[_0x33c124(0xae)]()||undefined,_0x3f6aeb=readOptionalTags(_0x17588e),_0x2602ca=await withAppConfigApiBoundary(_0x33c124(0xa5),{'appCode':_0x17588e[_0x33c124(0xb6)]},()=>listAppConfigs(_0x17588e[_0x33c124(0xb6)],{'key':_0x4a18bd,'tags':_0x3f6aeb})),_0x56dbfd=_0x2602ca[_0x33c124(0xb7)](_0x1ecae7=>projectAppConfig(_0x1ecae7));return{'ok':!![],'data':{'appCode':_0x17588e['appCode'],'count':_0x56dbfd[_0x33c124(0xa9)],'configs':_0x56dbfd},'message':_0x33c124(0xac)+_0x56dbfd[_0x33c124(0xa9)]+_0x33c124(0xb0)};}};
1
+ function a27_0x4b4b(){const _0x259edc=['length','3YmXeTR','3738916ZBJxJE','str','10vmwqgc','2304395wWXlSF','Found\x20','appCode','key','app-config','122058kgGcSI','7108568JXwXdz','Filter\x20by\x20exact\x20config\x20key','3861154QLRrlp','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','map','\x20app\x20config(s)','170bwyfZK','list','trim','64035jKjlgz','60cgqlHF','323407oLQOVE'];a27_0x4b4b=function(){return _0x259edc;};return a27_0x4b4b();}const a27_0x103f11=a27_0x1abe;(function(_0x2842d7,_0x5a404c){const _0x449714=a27_0x1abe,_0x2930b0=_0x2842d7();while(!![]){try{const _0x1ae6af=parseInt(_0x449714(0x6f))/0x1*(-parseInt(_0x449714(0x69))/0x2)+parseInt(_0x449714(0x7d))/0x3*(-parseInt(_0x449714(0x67))/0x4)+parseInt(_0x449714(0x6a))/0x5+parseInt(_0x449714(0x7a))/0x6*(parseInt(_0x449714(0x7b))/0x7)+parseInt(_0x449714(0x70))/0x8+parseInt(_0x449714(0x79))/0x9*(-parseInt(_0x449714(0x76))/0xa)+parseInt(_0x449714(0x72))/0xb;if(_0x1ae6af===_0x5a404c)break;else _0x2930b0['push'](_0x2930b0['shift']());}catch(_0x114679){_0x2930b0['push'](_0x2930b0['shift']());}}}(a27_0x4b4b,0x79374));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x1abe(_0x1d1b4f,_0x3a3641){_0x1d1b4f=_0x1d1b4f-0x67;const _0x4b4b4d=a27_0x4b4b();let _0x1abe39=_0x4b4b4d[_0x1d1b4f];return _0x1abe39;}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x103f11(0x6e),'command':a27_0x103f11(0x77),'description':a27_0x103f11(0x73),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x103f11(0x6d),'type':'string','description':a27_0x103f11(0x71)},TAGS_FLAG],async 'validate'(_0x198393){const _0x27de2b=a27_0x103f11,_0x1171ea=_0x198393['str'](_0x27de2b(0x6d))[_0x27de2b(0x78)]();if(_0x1171ea)validateKey(_0x1171ea);readOptionalTags(_0x198393);},async 'execute'(_0x281e8a){const _0x408c5a=a27_0x103f11,_0x4cc14c=_0x281e8a[_0x408c5a(0x68)]('key')[_0x408c5a(0x78)]()||undefined,_0x31fb1d=readOptionalTags(_0x281e8a),_0x49dd24=await withAppConfigApiBoundary(_0x408c5a(0x77),{'appCode':_0x281e8a['appCode']},()=>listAppConfigs(_0x281e8a[_0x408c5a(0x6c)],{'key':_0x4cc14c,'tags':_0x31fb1d})),_0x24af78=_0x49dd24[_0x408c5a(0x74)](_0x568b05=>projectAppConfig(_0x568b05));return{'ok':!![],'data':{'appCode':_0x281e8a[_0x408c5a(0x6c)],'count':_0x24af78['length'],'configs':_0x24af78},'message':_0x408c5a(0x6b)+_0x24af78[_0x408c5a(0x7c)]+_0x408c5a(0x75)};}};
@@ -1 +1 @@
1
- const a28_0x17273f=a28_0x4499;(function(_0x5ac33a,_0x1c8484){const _0x4de31e=a28_0x4499,_0xef4690=_0x5ac33a();while(!![]){try{const _0x522ef8=-parseInt(_0x4de31e(0x141))/0x1+parseInt(_0x4de31e(0x142))/0x2*(parseInt(_0x4de31e(0x13e))/0x3)+-parseInt(_0x4de31e(0x147))/0x4+-parseInt(_0x4de31e(0x151))/0x5*(-parseInt(_0x4de31e(0x140))/0x6)+parseInt(_0x4de31e(0x13b))/0x7+parseInt(_0x4de31e(0x13d))/0x8+-parseInt(_0x4de31e(0x143))/0x9;if(_0x522ef8===_0x1c8484)break;else _0xef4690['push'](_0xef4690['shift']());}catch(_0x8c99db){_0xef4690['push'](_0xef4690['shift']());}}}(a28_0x2a20,0x2bb7b));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a28_0x4499(_0x5ebba8,_0x18e17e){_0x5ebba8=_0x5ebba8-0x139;const _0x2a200e=a28_0x2a20();let _0x449904=_0x2a200e[_0x5ebba8];return _0x449904;}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_0x2a20(){const _0x4e9377=['1430032GFUdng','Read\x20config\x20value\x20from\x20file','Updated','get','write','create','/smartapi/app-config/create','update','tags','isFinite','1019640vrGocS','appCode','POST','set','app-config','App\x20config\x20server\x20id\x20missing\x20for\x20key=','\x20app\x20config\x20','887474RQuaIj','apiError','1599928dPylRx','36scQyGo','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','6ydkKVr','12086QNFhFh','51396WBVrAW','2613744BPfOpS','number',',\x20appCode=','Created'];a28_0x2a20=function(){return _0x4e9377;};return a28_0x2a20();}const CREATE_PATH=a28_0x17273f(0x14d),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0x17273f(0x155),'command':a28_0x17273f(0x154),'description':a28_0x17273f(0x13f),'risk':a28_0x17273f(0x14b),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':'string','description':a28_0x17273f(0x148)}],async 'validate'(_0x27d8ab){readKeyArg(_0x27d8ab),readOptionalTags(_0x27d8ab),assertSingleValueSource(_0x27d8ab);},async 'dryRun'(_0x550de){const _0x164a8a=a28_0x17273f,_0x57e653=readKeyArg(_0x550de),_0x179fda=readOptionalTags(_0x550de),_0x2bb1b7=assertSingleValueSource(_0x550de);await assertValueSourceReadable(_0x2bb1b7);const _0x5a4980=await withAppConfigApiBoundary(_0x164a8a(0x14a),{'appCode':_0x550de[_0x164a8a(0x152)],'key':_0x57e653},()=>getAppConfigByKey(_0x550de[_0x164a8a(0x152)],_0x57e653)),_0x4d2eb1=_0x5a4980?_0x164a8a(0x14e):_0x164a8a(0x14c),_0x34d64b=_0x5a4980?projectAppConfig(_0x5a4980):null,_0x58a4b0=plannedAppConfig({'appCode':_0x550de[_0x164a8a(0x152)],'key':_0x57e653,'tags':_0x179fda??_0x5a4980?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x4d2eb1,'appCode':_0x550de[_0x164a8a(0x152)],'key':_0x57e653,'before':_0x34d64b,'after':_0x58a4b0,'dryRun':!![]}),{'method':_0x164a8a(0x153),'url':_0x4d2eb1==='update'?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x4e23f1){const _0x21b38c=a28_0x17273f,_0x1f88d2=readKeyArg(_0x4e23f1),_0x1a18cc=readOptionalTags(_0x4e23f1),_0x1542fe=await withAppConfigApiBoundary(_0x21b38c(0x14a),{'appCode':_0x4e23f1[_0x21b38c(0x152)],'key':_0x1f88d2},()=>getAppConfigByKey(_0x4e23f1[_0x21b38c(0x152)],_0x1f88d2)),_0x17413c=_0x1542fe?projectAppConfig(_0x1542fe):null,_0xb61f5a=_0x1542fe?_0x21b38c(0x14e):_0x21b38c(0x14c),{value:_0x576b89,warnings:_0x437f48}=await readAppConfigValue(_0x4e23f1),_0x49320a={'appCode':_0x4e23f1[_0x21b38c(0x152)],'key':_0x1f88d2,'value':_0x576b89,'tags':_0x1a18cc??_0x1542fe?.[_0x21b38c(0x14f)]??undefined};await withAppConfigApiBoundary(_0xb61f5a,{'appCode':_0x4e23f1['appCode'],'key':_0x1f88d2},async()=>{_0x1542fe?await updateAppConfig({..._0x49320a,'id':requireAppConfigId(_0x1542fe,_0x1f88d2,_0x4e23f1['appCode'])}):await createAppConfig(_0x49320a);});const _0x2dd118=await withAppConfigApiBoundary(_0x21b38c(0x14a),{'appCode':_0x4e23f1[_0x21b38c(0x152)],'key':_0x1f88d2},()=>getAppConfigByKey(_0x4e23f1[_0x21b38c(0x152)],_0x1f88d2)),_0x36a9d9=_0x2dd118?projectAppConfig(_0x2dd118):plannedAppConfig({'appCode':_0x4e23f1[_0x21b38c(0x152)],'key':_0x1f88d2,'tags':_0x49320a[_0x21b38c(0x14f)],'hasValue':_0x576b89!==''});return{'ok':!![],'data':buildMutationData({'operation':_0xb61f5a,'appCode':_0x4e23f1[_0x21b38c(0x152)],'key':_0x1f88d2,'before':_0x17413c,'after':_0x36a9d9,'dryRun':![],'warnings':_0x437f48}),'message':(_0xb61f5a==='update'?_0x21b38c(0x149):_0x21b38c(0x146))+_0x21b38c(0x13a)+_0x1f88d2};}};function requireAppConfigId(_0x4bac5e,_0x2d821f,_0x2283f5){const _0xb7b8b6=a28_0x17273f;if(typeof _0x4bac5e['id']===_0xb7b8b6(0x144)&&Number[_0xb7b8b6(0x150)](_0x4bac5e['id'])&&_0x4bac5e['id']>0x0)return _0x4bac5e['id'];throw CliErrors[_0xb7b8b6(0x13c)](_0xb7b8b6(0x139)+_0x2d821f+_0xb7b8b6(0x145)+_0x2283f5);}
1
+ const a28_0x2ef4bf=a28_0xa071;(function(_0x4d5c5b,_0x3543dc){const _0x4b1694=a28_0xa071,_0x31966a=_0x4d5c5b();while(!![]){try{const _0x15ffff=-parseInt(_0x4b1694(0x1cb))/0x1*(parseInt(_0x4b1694(0x1d0))/0x2)+-parseInt(_0x4b1694(0x1db))/0x3*(parseInt(_0x4b1694(0x1df))/0x4)+parseInt(_0x4b1694(0x1ce))/0x5+parseInt(_0x4b1694(0x1e6))/0x6+-parseInt(_0x4b1694(0x1d3))/0x7+-parseInt(_0x4b1694(0x1d2))/0x8+parseInt(_0x4b1694(0x1d4))/0x9;if(_0x15ffff===_0x3543dc)break;else _0x31966a['push'](_0x31966a['shift']());}catch(_0x57001e){_0x31966a['push'](_0x31966a['shift']());}}}(a28_0x27d6,0xb5a4c));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a28_0xa071(_0x1eecc5,_0x21f752){_0x1eecc5=_0x1eecc5-0x1cb;const _0x27d61e=a28_0x27d6();let _0xa071ef=_0x27d61e[_0x1eecc5];return _0xa071ef;}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':a28_0x2ef4bf(0x1cd),'command':a28_0x2ef4bf(0x1e5),'description':a28_0x2ef4bf(0x1e4),'risk':a28_0x2ef4bf(0x1d1),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x2ef4bf(0x1d5),'type':'string','description':a28_0x2ef4bf(0x1dd)}],async 'validate'(_0x3558a9){readKeyArg(_0x3558a9),readOptionalTags(_0x3558a9),assertSingleValueSource(_0x3558a9);},async 'dryRun'(_0x4c68f3){const _0x4bf345=a28_0x2ef4bf,_0x10ed76=readKeyArg(_0x4c68f3),_0x24fec2=readOptionalTags(_0x4c68f3),_0x1324b4=assertSingleValueSource(_0x4c68f3);await assertValueSourceReadable(_0x1324b4);const _0x5af97e=await withAppConfigApiBoundary(_0x4bf345(0x1d8),{'appCode':_0x4c68f3[_0x4bf345(0x1e0)],'key':_0x10ed76},()=>getAppConfigByKey(_0x4c68f3[_0x4bf345(0x1e0)],_0x10ed76)),_0x19909b=_0x5af97e?_0x4bf345(0x1d7):'create',_0x463e9f=_0x5af97e?projectAppConfig(_0x5af97e):null,_0x1eb334=plannedAppConfig({'appCode':_0x4c68f3['appCode'],'key':_0x10ed76,'tags':_0x24fec2??_0x5af97e?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x19909b,'appCode':_0x4c68f3[_0x4bf345(0x1e0)],'key':_0x10ed76,'before':_0x463e9f,'after':_0x1eb334,'dryRun':!![]}),{'method':_0x4bf345(0x1e2),'url':_0x19909b===_0x4bf345(0x1d7)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x2bbf93){const _0x54a0b5=a28_0x2ef4bf,_0x4e458c=readKeyArg(_0x2bbf93),_0x4fecb9=readOptionalTags(_0x2bbf93),_0x222699=await withAppConfigApiBoundary(_0x54a0b5(0x1d8),{'appCode':_0x2bbf93['appCode'],'key':_0x4e458c},()=>getAppConfigByKey(_0x2bbf93['appCode'],_0x4e458c)),_0x4bc303=_0x222699?projectAppConfig(_0x222699):null,_0x31cff6=_0x222699?_0x54a0b5(0x1d7):_0x54a0b5(0x1dc),{value:_0x22a298,warnings:_0x2af5f}=await readAppConfigValue(_0x2bbf93),_0x1c412f={'appCode':_0x2bbf93['appCode'],'key':_0x4e458c,'value':_0x22a298,'tags':_0x4fecb9??_0x222699?.[_0x54a0b5(0x1cf)]??undefined};await withAppConfigApiBoundary(_0x31cff6,{'appCode':_0x2bbf93[_0x54a0b5(0x1e0)],'key':_0x4e458c},async()=>{const _0x304e0f=_0x54a0b5;_0x222699?await updateAppConfig({..._0x1c412f,'id':requireAppConfigId(_0x222699,_0x4e458c,_0x2bbf93[_0x304e0f(0x1e0)])}):await createAppConfig(_0x1c412f);});const _0x2b41a3=await withAppConfigApiBoundary('get',{'appCode':_0x2bbf93['appCode'],'key':_0x4e458c},()=>getAppConfigByKey(_0x2bbf93[_0x54a0b5(0x1e0)],_0x4e458c)),_0x44279=_0x2b41a3?projectAppConfig(_0x2b41a3):plannedAppConfig({'appCode':_0x2bbf93[_0x54a0b5(0x1e0)],'key':_0x4e458c,'tags':_0x1c412f['tags'],'hasValue':_0x22a298!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x31cff6,'appCode':_0x2bbf93[_0x54a0b5(0x1e0)],'key':_0x4e458c,'before':_0x4bc303,'after':_0x44279,'dryRun':![],'warnings':_0x2af5f}),'message':(_0x31cff6===_0x54a0b5(0x1d7)?_0x54a0b5(0x1da):_0x54a0b5(0x1e3))+_0x54a0b5(0x1d6)+_0x4e458c};}};function requireAppConfigId(_0x3aefb,_0x2e8ad2,_0x49405a){const _0x222a67=a28_0x2ef4bf;if(typeof _0x3aefb['id']===_0x222a67(0x1de)&&Number[_0x222a67(0x1e1)](_0x3aefb['id'])&&_0x3aefb['id']>0x0)return _0x3aefb['id'];throw CliErrors[_0x222a67(0x1cc)](_0x222a67(0x1d9)+_0x2e8ad2+',\x20appCode='+_0x49405a);}function a28_0x27d6(){const _0x35c6a7=['number','4ppJgpK','appCode','isFinite','POST','Created','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','set','8803188AUmlCD','2JbFEzl','apiError','app-config','2932430OlIhZu','tags','166932cJpWMg','write','10326504OLXnMB','3215443KHfxpb','14845365zEhlac','file','\x20app\x20config\x20','update','get','App\x20config\x20server\x20id\x20missing\x20for\x20key=','Updated','3126189NCmLKG','create','Read\x20config\x20value\x20from\x20file'];a28_0x27d6=function(){return _0x35c6a7;};return a28_0x27d6();}
@@ -1 +1 @@
1
- const a29_0x335365=a29_0x582f;(function(_0x4ede35,_0x115ef3){const _0x24ad61=a29_0x582f,_0x22b0ba=_0x4ede35();while(!![]){try{const _0x3bcd79=-parseInt(_0x24ad61(0x1f6))/0x1+-parseInt(_0x24ad61(0x1d2))/0x2*(-parseInt(_0x24ad61(0x1f9))/0x3)+-parseInt(_0x24ad61(0x1f7))/0x4*(-parseInt(_0x24ad61(0x1e0))/0x5)+-parseInt(_0x24ad61(0x1de))/0x6*(-parseInt(_0x24ad61(0x201))/0x7)+parseInt(_0x24ad61(0x1c5))/0x8+-parseInt(_0x24ad61(0x1cd))/0x9*(parseInt(_0x24ad61(0x1c1))/0xa)+parseInt(_0x24ad61(0x1cb))/0xb*(-parseInt(_0x24ad61(0x1c9))/0xc);if(_0x3bcd79===_0x115ef3)break;else _0x22b0ba['push'](_0x22b0ba['shift']());}catch(_0x42874c){_0x22b0ba['push'](_0x22b0ba['shift']());}}}(a29_0x5d39,0x80866));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x335365(0x200),'description':a29_0x335365(0x1fc),'required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x335365(0x1d4),'required':![]};export const TAGS_FLAG={'name':'tags','type':a29_0x335365(0x1cc),'description':a29_0x335365(0x1ef)};export const STDIN_FLAG={'name':a29_0x335365(0x1d6),'type':a29_0x335365(0x1e7),'description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':'from-env','type':'string','description':a29_0x335365(0x1c2)};export const REVEAL_FLAG={'name':a29_0x335365(0x1bf),'type':'boolean','description':a29_0x335365(0x1f4),'default':![]};export function readKeyArg(_0x2f4d76){const _0xcd19ce=a29_0x335365,_0x58689e=_0x2f4d76[_0xcd19ce(0x1f2)][0x0]?.[_0xcd19ce(0x1e1)]()??'';return validateKey(_0x58689e),_0x58689e;}export function readOptionalTags(_0xed8530){const _0xf1af25=a29_0x335365,_0x3e444c=_0xed8530[_0xf1af25(0x1f5)](_0xf1af25(0x1c3))[_0xf1af25(0x1e1)]();if(!_0x3e444c)return undefined;if(_0x3e444c[_0xf1af25(0x1fe)]>0x20)throw CliErrors[_0xf1af25(0x1e8)](_0xf1af25(0x1e9));return _0x3e444c;}export function validateKey(_0xf3880c){const _0x34127e=a29_0x335365;if(!_0xf3880c)throw CliErrors['validation'](_0x34127e(0x1d0));if(_0xf3880c[_0x34127e(0x1fe)]>0x100)throw CliErrors[_0x34127e(0x1e8)](_0x34127e(0x1c7));}export function projectAppConfig(_0x476bb6,_0x28ba97){const _0x240221=a29_0x335365,_0x1eaf0e=_0x476bb6[_0x240221(0x1df)]!==undefined&&_0x476bb6[_0x240221(0x1df)]!==null&&_0x476bb6[_0x240221(0x1df)]!=='',_0x23cf77={'appCode':_0x476bb6['appCode'],'key':_0x476bb6['key'],'tags':_0x476bb6[_0x240221(0x1c3)]??undefined,'hasValue':_0x1eaf0e,'valueRedacted':_0x1eaf0e&&!_0x28ba97?.['reveal'],'gmtCreate':_0x476bb6[_0x240221(0x1e6)],'gmtModified':_0x476bb6[_0x240221(0x1f8)]};return _0x28ba97?.[_0x240221(0x1bf)]&&(_0x23cf77[_0x240221(0x1df)]=_0x476bb6[_0x240221(0x1df)]??'',_0x23cf77[_0x240221(0x1cf)]=![]),_0x23cf77;}export function plannedAppConfig(_0x3241be){const _0x51e9ce=a29_0x335365,_0x135503=_0x3241be[_0x51e9ce(0x1d5)]??!![];return{'appCode':_0x3241be[_0x51e9ce(0x1f3)],'key':_0x3241be['key'],'tags':_0x3241be[_0x51e9ce(0x1c3)]??undefined,'hasValue':_0x135503,'valueRedacted':_0x135503};}export function buildMutationData(_0x11641a){const _0x5c6a58=a29_0x335365;return{'operation':_0x11641a['operation'],'selector':{'appCode':_0x11641a[_0x5c6a58(0x1f3)],'key':_0x11641a[_0x5c6a58(0x200)]},'before':_0x11641a[_0x5c6a58(0x1ec)],'after':_0x11641a[_0x5c6a58(0x1c6)],'dryRun':_0x11641a['dryRun'],'warnings':_0x11641a[_0x5c6a58(0x1e3)]??[]};}export async function withAppConfigApiBoundary(_0x4475f8,_0x2688c8,_0x4d8eb0){const _0x2b45da=a29_0x335365;try{return await _0x4d8eb0();}catch{const _0x17c9a2=[_0x2b45da(0x202)+_0x2688c8[_0x2b45da(0x1f3)]];if(_0x2688c8[_0x2b45da(0x200)])_0x17c9a2['push'](_0x2b45da(0x1fb)+_0x2688c8[_0x2b45da(0x200)]);_0x17c9a2[_0x2b45da(0x1f1)](_0x2b45da(0x1ed));throw CliErrors[_0x2b45da(0x1d9)]('Failed\x20to\x20'+_0x4475f8+'\x20app\x20config.',_0x17c9a2[_0x2b45da(0x1ca)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x2282e5,_0x3f6d8d){const _0x3ad301=a29_0x335365;return Object['defineProperties'](_0x2282e5,{'method':{'value':_0x3f6d8d[_0x3ad301(0x1f0)],'enumerable':![]},'url':{'value':_0x3f6d8d[_0x3ad301(0x1eb)],'enumerable':![]}});}function a29_0x5d39(){const _0x458fdc=['value','145jjgBjt','trim','file','warnings','path','name','gmtCreate','boolean','validation','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','env','url','before','value\x20is\x20redacted','flag','Config\x20tags\x20for\x20filtering/display\x20metadata','method','push','args','appCode','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','str','53366KBdhjK','143236rbmXiy','gmtModified','3ieyvVe','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','key:\x20','Runtime\x20app-config\x20key','utf8','length','argument','key','791ixRUPo','appCode:\x20','reveal','slice','10FOZqUr','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','tags','setEncoding','7860856xQdzcv','after','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','end','26661108OslNPV','join','11NuABJJ','string','4022577vYwaag','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','valueRedacted','Missing\x20app-config\x20key.','Environment\x20variable\x20is\x20not\x20set:\x20','2041090XWLslq','error','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','hasValue','stdin','data','bool','apiError','kind','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','from-env','Missing\x20app-config\x20value\x20source.','10986MnEboO'];a29_0x5d39=function(){return _0x458fdc;};return a29_0x5d39();}export function assertSingleValueSource(_0x3bef75){const _0x3fc21b=a29_0x335365,_0x5b1ce2=[];_0x3bef75[_0x3fc21b(0x1f2)][_0x3fc21b(0x1fe)]>0x1&&_0x5b1ce2['push']({'kind':_0x3fc21b(0x1ff),'value':_0x3bef75[_0x3fc21b(0x1f2)][_0x3fc21b(0x1c0)](0x1)['join']('\x20')});const _0x22cd0b=_0x3bef75[_0x3fc21b(0x1ee)](_0x3fc21b(0x1df));_0x22cd0b!==undefined&&_0x22cd0b!==null&&_0x5b1ce2[_0x3fc21b(0x1f1)]({'kind':'argument','value':String(_0x22cd0b)});_0x3bef75[_0x3fc21b(0x1d8)](_0x3fc21b(0x1d6))&&_0x5b1ce2[_0x3fc21b(0x1f1)]({'kind':'stdin'});const _0x10878d=_0x3bef75[_0x3fc21b(0x1f5)](_0x3fc21b(0x1dc))['trim']();_0x10878d&&_0x5b1ce2['push']({'kind':'env','name':_0x10878d});const _0x12d8e0=_0x3bef75[_0x3fc21b(0x1f5)](_0x3fc21b(0x1e2))[_0x3fc21b(0x1e1)]();_0x12d8e0&&_0x5b1ce2[_0x3fc21b(0x1f1)]({'kind':_0x3fc21b(0x1e2),'path':_0x12d8e0});if(_0x5b1ce2['length']===0x0)throw CliErrors[_0x3fc21b(0x1e8)](_0x3fc21b(0x1dd),_0x3fc21b(0x1ce));if(_0x5b1ce2['length']>0x1)throw CliErrors[_0x3fc21b(0x1e8)]('App\x20config\x20value\x20source\x20is\x20ambiguous.',_0x3fc21b(0x1db));return _0x5b1ce2[0x0];}function a29_0x582f(_0x5365a4,_0x2d0373){_0x5365a4=_0x5365a4-0x1bf;const _0x5d393a=a29_0x5d39();let _0x582fb8=_0x5d393a[_0x5365a4];return _0x582fb8;}export async function assertValueSourceReadable(_0x121593){const _0x4b5e26=a29_0x335365;if(_0x121593['kind']===_0x4b5e26(0x1ea)&&!(_0x121593['name']in process.env))throw CliErrors[_0x4b5e26(0x1e8)](_0x4b5e26(0x1d1)+_0x121593[_0x4b5e26(0x1e5)]);if(_0x121593['kind']===_0x4b5e26(0x1e2))try{await access(_0x121593[_0x4b5e26(0x1e4)]);}catch{throw CliErrors[_0x4b5e26(0x1e8)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0x121593[_0x4b5e26(0x1e4)]);}}export async function readAppConfigValue(_0x1e8c8e){const _0x2a922f=a29_0x335365,_0x29d78b=assertSingleValueSource(_0x1e8c8e),_0x260cf4=[];if(_0x29d78b[_0x2a922f(0x1da)]===_0x2a922f(0x1ff))return _0x260cf4[_0x2a922f(0x1f1)](_0x2a922f(0x1fa)),{'value':_0x29d78b[_0x2a922f(0x1df)]??'','source':_0x29d78b['kind'],'warnings':_0x260cf4};if(_0x29d78b[_0x2a922f(0x1da)]==='stdin')return{'value':await readStdin(),'source':_0x29d78b[_0x2a922f(0x1da)],'warnings':_0x260cf4};if(_0x29d78b[_0x2a922f(0x1da)]===_0x2a922f(0x1ea)){if(!(_0x29d78b[_0x2a922f(0x1e5)]in process.env))throw CliErrors[_0x2a922f(0x1e8)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x29d78b['name']);return{'value':process.env[_0x29d78b.name]??'','source':_0x29d78b['kind'],'warnings':_0x260cf4};}return{'value':await readFile(_0x29d78b[_0x2a922f(0x1e4)],_0x2a922f(0x1fd)),'source':_0x29d78b[_0x2a922f(0x1da)],'warnings':_0x260cf4};}function readStdin(){return new Promise((_0x578eab,_0x4282c5)=>{const _0x2f1ea8=a29_0x582f;let _0x4bbe2c='';process['stdin'][_0x2f1ea8(0x1c4)](_0x2f1ea8(0x1fd)),process[_0x2f1ea8(0x1d6)]['on'](_0x2f1ea8(0x1d7),_0x1b750b=>{_0x4bbe2c+=_0x1b750b;}),process['stdin']['once'](_0x2f1ea8(0x1c8),()=>_0x578eab(_0x4bbe2c)),process[_0x2f1ea8(0x1d6)]['once'](_0x2f1ea8(0x1d3),_0x4282c5);});}
1
+ function a29_0x1a98(){const _0x680690=['slice','6255iEnGEW','setEncoding','448180pVxUvh','before','args','url','method','env','Environment\x20variable\x20is\x20not\x20set:\x20','Value\x20file\x20is\x20not\x20readable:\x20','length','from-env','Runtime\x20app-config\x20key','reveal','value','kind','key:\x20','stdin','data','name','boolean','appCode','argument','str','Missing\x20app-config\x20value\x20source.','846VHhxlo','push','3356223lUlqgn','utf8','3818576lHpWJZ','App\x20config\x20value\x20source\x20is\x20ambiguous.','gmtModified','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','string','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','validation','5556cHzlDy','6670195xCCQZo','trim','error','gmtCreate','path','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','bool','after','flag','tags','Config\x20tags\x20for\x20filtering/display\x20metadata','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','key','1294484bEzDJN','appCode:\x20','Failed\x20to\x20','Missing\x20app-config\x20key.','7053904skwplz','1cJxrOI','file','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'];a29_0x1a98=function(){return _0x680690;};return a29_0x1a98();}const a29_0x45e249=a29_0x4c6c;(function(_0x5a5c31,_0x2d8f95){const _0x5c8464=a29_0x4c6c,_0x1b2ede=_0x5a5c31();while(!![]){try{const _0x47f72b=parseInt(_0x5c8464(0x6f))/0x1*(-parseInt(_0x5c8464(0x6a))/0x2)+parseInt(_0x5c8464(0x8e))/0x3+-parseInt(_0x5c8464(0x90))/0x4+-parseInt(_0x5c8464(0x73))/0x5*(parseInt(_0x5c8464(0x98))/0x6)+-parseInt(_0x5c8464(0x99))/0x7+-parseInt(_0x5c8464(0x6e))/0x8+-parseInt(_0x5c8464(0x8c))/0x9*(-parseInt(_0x5c8464(0x75))/0xa);if(_0x47f72b===_0x2d8f95)break;else _0x1b2ede['push'](_0x1b2ede['shift']());}catch(_0xc7f908){_0x1b2ede['push'](_0x1b2ede['shift']());}}}(a29_0x1a98,0xb3dba));import{access,readFile}from'node:fs/promises';function a29_0x4c6c(_0x877266,_0x3fc9d1){_0x877266=_0x877266-0x66;const _0x1a98b2=a29_0x1a98();let _0x4c6c2b=_0x1a98b2[_0x877266];return _0x4c6c2b;}import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x45e249(0x69),'description':a29_0x45e249(0x7f),'required':!![]};export const VALUE_ARG={'name':'value','description':'Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','required':![]};export const TAGS_FLAG={'name':'tags','type':a29_0x45e249(0x95),'description':a29_0x45e249(0x67)};export const STDIN_FLAG={'name':a29_0x45e249(0x84),'type':'boolean','description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a29_0x45e249(0x7e),'type':a29_0x45e249(0x95),'description':a29_0x45e249(0x71)};export const REVEAL_FLAG={'name':a29_0x45e249(0x80),'type':a29_0x45e249(0x87),'description':a29_0x45e249(0x9f),'default':![]};export function readKeyArg(_0x19096a){const _0x2104bc=a29_0x45e249,_0x64540=_0x19096a[_0x2104bc(0x77)][0x0]?.['trim']()??'';return validateKey(_0x64540),_0x64540;}export function readOptionalTags(_0x4e53a7){const _0x2647ae=a29_0x45e249,_0x272566=_0x4e53a7['str'](_0x2647ae(0x66))[_0x2647ae(0x9a)]();if(!_0x272566)return undefined;if(_0x272566[_0x2647ae(0x7d)]>0x20)throw CliErrors[_0x2647ae(0x97)](_0x2647ae(0x93));return _0x272566;}export function validateKey(_0x41c0de){const _0x21618c=a29_0x45e249;if(!_0x41c0de)throw CliErrors['validation'](_0x21618c(0x6d));if(_0x41c0de['length']>0x100)throw CliErrors['validation'](_0x21618c(0x9e));}export function projectAppConfig(_0x4170f8,_0x33a6c7){const _0x3820ce=a29_0x45e249,_0x39620f=_0x4170f8['value']!==undefined&&_0x4170f8[_0x3820ce(0x81)]!==null&&_0x4170f8[_0x3820ce(0x81)]!=='',_0x1ad027={'appCode':_0x4170f8[_0x3820ce(0x88)],'key':_0x4170f8[_0x3820ce(0x69)],'tags':_0x4170f8[_0x3820ce(0x66)]??undefined,'hasValue':_0x39620f,'valueRedacted':_0x39620f&&!_0x33a6c7?.[_0x3820ce(0x80)],'gmtCreate':_0x4170f8[_0x3820ce(0x9c)],'gmtModified':_0x4170f8[_0x3820ce(0x92)]};return _0x33a6c7?.[_0x3820ce(0x80)]&&(_0x1ad027[_0x3820ce(0x81)]=_0x4170f8['value']??'',_0x1ad027['valueRedacted']=![]),_0x1ad027;}export function plannedAppConfig(_0x573291){const _0x20dc55=a29_0x45e249,_0xca0296=_0x573291['hasValue']??!![];return{'appCode':_0x573291['appCode'],'key':_0x573291['key'],'tags':_0x573291[_0x20dc55(0x66)]??undefined,'hasValue':_0xca0296,'valueRedacted':_0xca0296};}export function buildMutationData(_0x510138){const _0x346c15=a29_0x45e249;return{'operation':_0x510138['operation'],'selector':{'appCode':_0x510138[_0x346c15(0x88)],'key':_0x510138[_0x346c15(0x69)]},'before':_0x510138[_0x346c15(0x76)],'after':_0x510138[_0x346c15(0xa1)],'dryRun':_0x510138['dryRun'],'warnings':_0x510138['warnings']??[]};}export async function withAppConfigApiBoundary(_0x339870,_0x42b82e,_0x1980ba){const _0x31e049=a29_0x45e249;try{return await _0x1980ba();}catch{const _0x500432=[_0x31e049(0x6b)+_0x42b82e[_0x31e049(0x88)]];if(_0x42b82e['key'])_0x500432[_0x31e049(0x8d)](_0x31e049(0x83)+_0x42b82e[_0x31e049(0x69)]);_0x500432[_0x31e049(0x8d)]('value\x20is\x20redacted');throw CliErrors['apiError'](_0x31e049(0x6c)+_0x339870+'\x20app\x20config.',_0x500432['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x40454e,_0x187093){const _0x511483=a29_0x45e249;return Object['defineProperties'](_0x40454e,{'method':{'value':_0x187093[_0x511483(0x79)],'enumerable':![]},'url':{'value':_0x187093[_0x511483(0x78)],'enumerable':![]}});}export function assertSingleValueSource(_0x46530c){const _0x5dadbf=a29_0x45e249,_0x2cb9f5=[];_0x46530c[_0x5dadbf(0x77)]['length']>0x1&&_0x2cb9f5['push']({'kind':_0x5dadbf(0x89),'value':_0x46530c[_0x5dadbf(0x77)][_0x5dadbf(0x72)](0x1)['join']('\x20')});const _0x591f93=_0x46530c[_0x5dadbf(0xa2)](_0x5dadbf(0x81));_0x591f93!==undefined&&_0x591f93!==null&&_0x2cb9f5[_0x5dadbf(0x8d)]({'kind':_0x5dadbf(0x89),'value':String(_0x591f93)});_0x46530c[_0x5dadbf(0xa0)](_0x5dadbf(0x84))&&_0x2cb9f5[_0x5dadbf(0x8d)]({'kind':'stdin'});const _0x7e1b49=_0x46530c[_0x5dadbf(0x8a)]('from-env')['trim']();_0x7e1b49&&_0x2cb9f5[_0x5dadbf(0x8d)]({'kind':_0x5dadbf(0x7a),'name':_0x7e1b49});const _0x435f33=_0x46530c['str']('file')[_0x5dadbf(0x9a)]();_0x435f33&&_0x2cb9f5[_0x5dadbf(0x8d)]({'kind':_0x5dadbf(0x70),'path':_0x435f33});if(_0x2cb9f5[_0x5dadbf(0x7d)]===0x0)throw CliErrors[_0x5dadbf(0x97)](_0x5dadbf(0x8b),_0x5dadbf(0x94));if(_0x2cb9f5['length']>0x1)throw CliErrors[_0x5dadbf(0x97)](_0x5dadbf(0x91),_0x5dadbf(0x96));return _0x2cb9f5[0x0];}export async function assertValueSourceReadable(_0x5341c3){const _0x2e8686=a29_0x45e249;if(_0x5341c3[_0x2e8686(0x82)]==='env'&&!(_0x5341c3[_0x2e8686(0x86)]in process.env))throw CliErrors['validation'](_0x2e8686(0x7b)+_0x5341c3[_0x2e8686(0x86)]);if(_0x5341c3['kind']==='file')try{await access(_0x5341c3['path']);}catch{throw CliErrors[_0x2e8686(0x97)](_0x2e8686(0x7c)+_0x5341c3[_0x2e8686(0x9d)]);}}export async function readAppConfigValue(_0x54abba){const _0x187ef3=a29_0x45e249,_0xf420c4=assertSingleValueSource(_0x54abba),_0x2f1106=[];if(_0xf420c4[_0x187ef3(0x82)]===_0x187ef3(0x89))return _0x2f1106[_0x187ef3(0x8d)](_0x187ef3(0x68)),{'value':_0xf420c4[_0x187ef3(0x81)]??'','source':_0xf420c4[_0x187ef3(0x82)],'warnings':_0x2f1106};if(_0xf420c4[_0x187ef3(0x82)]===_0x187ef3(0x84))return{'value':await readStdin(),'source':_0xf420c4[_0x187ef3(0x82)],'warnings':_0x2f1106};if(_0xf420c4['kind']==='env'){if(!(_0xf420c4[_0x187ef3(0x86)]in process.env))throw CliErrors[_0x187ef3(0x97)](_0x187ef3(0x7b)+_0xf420c4[_0x187ef3(0x86)]);return{'value':process.env[_0xf420c4.name]??'','source':_0xf420c4[_0x187ef3(0x82)],'warnings':_0x2f1106};}return{'value':await readFile(_0xf420c4['path'],_0x187ef3(0x8f)),'source':_0xf420c4[_0x187ef3(0x82)],'warnings':_0x2f1106};}function readStdin(){return new Promise((_0x1a9a49,_0x2f7263)=>{const _0x452d36=a29_0x4c6c;let _0xc59609='';process[_0x452d36(0x84)][_0x452d36(0x74)](_0x452d36(0x8f)),process[_0x452d36(0x84)]['on'](_0x452d36(0x85),_0x3ad8cc=>{_0xc59609+=_0x3ad8cc;}),process[_0x452d36(0x84)]['once']('end',()=>_0x1a9a49(_0xc59609)),process['stdin']['once'](_0x452d36(0x9b),_0x2f7263);});}
@@ -1 +1 @@
1
- const a30_0x281baa=a30_0x238b;(function(_0x427bc0,_0xa5d5f6){const _0x243cd8=a30_0x238b,_0x473f9c=_0x427bc0();while(!![]){try{const _0x49cba1=parseInt(_0x243cd8(0x164))/0x1*(-parseInt(_0x243cd8(0x15b))/0x2)+parseInt(_0x243cd8(0x15c))/0x3+-parseInt(_0x243cd8(0x16e))/0x4*(parseInt(_0x243cd8(0x15a))/0x5)+-parseInt(_0x243cd8(0x15f))/0x6*(-parseInt(_0x243cd8(0x159))/0x7)+parseInt(_0x243cd8(0x170))/0x8*(parseInt(_0x243cd8(0x162))/0x9)+-parseInt(_0x243cd8(0x163))/0xa+-parseInt(_0x243cd8(0x161))/0xb*(-parseInt(_0x243cd8(0x166))/0xc);if(_0x49cba1===_0xa5d5f6)break;else _0x473f9c['push'](_0x473f9c['shift']());}catch(_0x523119){_0x473f9c['push'](_0x473f9c['shift']());}}}(a30_0x59a2,0x1bb6e));import{unlinkSync,existsSync}from'node:fs';function a30_0x59a2(){const _0x54eb8b=['156316VWOgSb','225582xOgikV','bool','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','260448djHOYi','log','1133vAdodF','36mJBKUU','560150sHlbRm','1gWjOtF','nonInteractive','3516QKbDcV','✓\x20Logged\x20out','!\x20Not\x20logged\x20in','Login\x20via\x20browser','yes','Clear\x20login\x20session','boolean','login','4dGuoYo','../../auth/auth-server-ui.js','156888fIkCWH','logout','write','auth','35HIxaRb','765830MGskLS'];a30_0x59a2=function(){return _0x54eb8b;};return a30_0x59a2();}function a30_0x238b(_0x2f3dfc,_0x41c69e){_0x2f3dfc=_0x2f3dfc-0x158;const _0x59a2bd=a30_0x59a2();let _0x238b83=_0x59a2bd[_0x2f3dfc];return _0x238b83;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x281baa(0x158),'command':a30_0x281baa(0x16d),'description':a30_0x281baa(0x169),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x281baa(0x16a),'type':a30_0x281baa(0x16c),'description':a30_0x281baa(0x15e),'default':![]}],async 'execute'(_0x1fc4a4){const _0x4313f6=a30_0x281baa,{runAuthServer:_0x233c4b}=await import(_0x4313f6(0x16f));return await _0x233c4b({'autoYes':_0x1fc4a4[_0x4313f6(0x15d)](_0x4313f6(0x16a)),'nonInteractive':_0x1fc4a4[_0x4313f6(0x165)]}),{'ok':!![]};}},{'service':a30_0x281baa(0x158),'command':a30_0x281baa(0x171),'description':a30_0x281baa(0x16b),'risk':a30_0x281baa(0x172),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2f85f3){const _0x18cf2f=a30_0x281baa;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x18cf2f(0x160)](_0x18cf2f(0x167))):console['log'](_0x18cf2f(0x168)),{'ok':!![]};}}];
1
+ const a30_0x5d7cee=a30_0x120a;function a30_0x120a(_0x5ac96c,_0x388fa1){_0x5ac96c=_0x5ac96c-0x1e1;const _0x3581ac=a30_0x3581();let _0x120a7f=_0x3581ac[_0x5ac96c];return _0x120a7f;}function a30_0x3581(){const _0x148ec9=['11Cmrvbz','1967382ZUcikq','574400bAcsvp','268352XoAHVw','731820KhiwNF','1211pDQTJf','../../auth/auth-server-ui.js','22MCmejZ','32792uCXTBD','!\x20Not\x20logged\x20in','5qMBRwF','auth','nonInteractive','bool','Clear\x20login\x20session','boolean','Login\x20via\x20browser','write','log','login','54561ckWqeM','yes','3486324lFqJVl'];a30_0x3581=function(){return _0x148ec9;};return a30_0x3581();}(function(_0x5d90f2,_0x22fb39){const _0x73af0a=a30_0x120a,_0x32c84c=_0x5d90f2();while(!![]){try{const _0xf5a6af=parseInt(_0x73af0a(0x1ec))/0x1+-parseInt(_0x73af0a(0x1f1))/0x2*(-parseInt(_0x73af0a(0x1e7))/0x3)+-parseInt(_0x73af0a(0x1ed))/0x4+parseInt(_0x73af0a(0x1f4))/0x5*(parseInt(_0x73af0a(0x1e9))/0x6)+-parseInt(_0x73af0a(0x1ef))/0x7*(parseInt(_0x73af0a(0x1f2))/0x8)+-parseInt(_0x73af0a(0x1eb))/0x9+-parseInt(_0x73af0a(0x1ee))/0xa*(-parseInt(_0x73af0a(0x1ea))/0xb);if(_0xf5a6af===_0x22fb39)break;else _0x32c84c['push'](_0x32c84c['shift']());}catch(_0x2861f9){_0x32c84c['push'](_0x32c84c['shift']());}}}(a30_0x3581,0x69ed8));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x5d7cee(0x1f5),'command':a30_0x5d7cee(0x1e6),'description':a30_0x5d7cee(0x1e3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'yes','type':a30_0x5d7cee(0x1e2),'description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x14d37c){const _0x2fbca0=a30_0x5d7cee,{runAuthServer:_0x24d9e6}=await import(_0x2fbca0(0x1f0));return await _0x24d9e6({'autoYes':_0x14d37c[_0x2fbca0(0x1f7)](_0x2fbca0(0x1e8)),'nonInteractive':_0x14d37c[_0x2fbca0(0x1f6)]}),{'ok':!![]};}},{'service':a30_0x5d7cee(0x1f5),'command':'logout','description':a30_0x5d7cee(0x1e1),'risk':a30_0x5d7cee(0x1e4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x127d8e){const _0x40c0a4=a30_0x5d7cee;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x40c0a4(0x1e5)]('✓\x20Logged\x20out')):console[_0x40c0a4(0x1e5)](_0x40c0a4(0x1f3)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a31_0x101808=a31_0x3f4f;(function(_0x33ee71,_0x354f19){const _0x10bfab=a31_0x3f4f,_0x229c64=_0x33ee71();while(!![]){try{const _0x123cc5=parseInt(_0x10bfab(0x1cb))/0x1+-parseInt(_0x10bfab(0x208))/0x2+parseInt(_0x10bfab(0x210))/0x3+-parseInt(_0x10bfab(0x1ee))/0x4*(parseInt(_0x10bfab(0x202))/0x5)+-parseInt(_0x10bfab(0x207))/0x6*(-parseInt(_0x10bfab(0x1e0))/0x7)+-parseInt(_0x10bfab(0x203))/0x8*(-parseInt(_0x10bfab(0x227))/0x9)+parseInt(_0x10bfab(0x223))/0xa;if(_0x123cc5===_0x354f19)break;else _0x229c64['push'](_0x229c64['shift']());}catch(_0x412745){_0x229c64['push'](_0x229c64['shift']());}}}(a31_0x5b7b,0xd13de));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';function a31_0x3f4f(_0xa10033,_0x5434c1){_0xa10033=_0xa10033-0x1c1;const _0x5b7b09=a31_0x5b7b();let _0x3f4fa8=_0x5b7b09[_0xa10033];return _0x3f4fa8;}function a31_0x5b7b(){const _0x14931b=['string','\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','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','Invalid\x20dataset\x20selection.','Script\x20description','/**\x0a\x20*\x20','当前请求参数','before','\x22.\x20','description','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','stderr','329fflXQf','scriptsRootDir','find','function-node','HOOK\x20requires\x20alias/operation/node\x20options.','utf8','create','.js\x0a','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','stdin','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','Select\x20trigger\x20node:','trim','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','5648BJQATQ','type','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20',']\x20(','alias','File\x20already\x20exists:\x20','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','\x22\x20not\x20found.\x20','keys','ENDPOINT','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','Operation\x20type\x20(HOOK\x20only)','修改后的响应结果','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x0a\x20*\x20[平台配置]\x20','code','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','4820ZvDlEg','16CDsRux','/COMMON/','name','apiDir','5514kLFuWk','2168064SEKzXk','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','map','\x22\x20not\x20found\x20for\x20dataset\x20','Function\x20name\x20(valid\x20JS\x20identifier)','nonInteractive','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','.js','3819261rNfALx','\x22,\x20params\x20})\x0a','str','isInteger','No\x20operation\x20types\x20found\x20for\x20dataset\x20','Available:\x20','\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','length','write','Alias\x20\x22','No\x20api.ts\x20found.\x20Run\x20`','bff','Select\x20dataset:','Dataset\x20not\x20found\x20for\x20code\x20\x22','question','source','Script\x20type','datasetcode','close','6044120Qunhoq','COMMON','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','No\x20datasets\x20found\x20for\x20this\x20app.','4545999pgabEr','functionNode','operation-type','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Trigger\x20node\x20(HOOK\x20only)','\x20api\x20pull`\x20to\x20refresh.','修改后的请求参数','UNKNOWN','当前响应结果','operationType','appCode','after','371340oixrga','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Invalid\x20function\x20name\x20\x22','HOOK','datasetCode','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','parseInt','validation','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20'];a31_0x5b7b=function(){return _0x14931b;};return a31_0x5b7b();}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_0x101808(0x21b),'command':a31_0x101808(0x1e6),'description':'Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','risk':'read','flags':[{'name':a31_0x101808(0x1ef),'type':a31_0x101808(0x1d4),'required':!![],'enum':[a31_0x101808(0x224),a31_0x101808(0x1f7),a31_0x101808(0x1ce)],'description':a31_0x101808(0x220)},{'name':a31_0x101808(0x205),'type':a31_0x101808(0x1d4),'required':!![],'description':a31_0x101808(0x20c)},{'name':'description','type':a31_0x101808(0x1d4),'description':a31_0x101808(0x1d8)},{'name':a31_0x101808(0x1f2),'type':a31_0x101808(0x1d4),'description':a31_0x101808(0x1c2)},{'name':a31_0x101808(0x221),'type':a31_0x101808(0x1d4),'description':a31_0x101808(0x20e)},{'name':a31_0x101808(0x1c1),'type':'string','description':a31_0x101808(0x1fc)},{'name':a31_0x101808(0x1e3),'type':'string','description':a31_0x101808(0x1c3),'enum':[a31_0x101808(0x1db),a31_0x101808(0x1ca)]}],async 'validate'(_0x3f1a10){const _0x23530a=a31_0x101808,_0x59a517=_0x3f1a10[_0x23530a(0x212)](_0x23530a(0x205));if(!isValidBffFunctionName(_0x59a517))throw CliErrors[_0x23530a(0x1d2)](_0x23530a(0x1cd)+_0x59a517+_0x23530a(0x1d6));},async 'execute'(_0x32acbc){const _0xcebd53=a31_0x101808,_0x219706=loadBffProjectConfig(_0x32acbc['appCode']),_0x36e2c8=_0x32acbc[_0xcebd53(0x212)](_0xcebd53(0x1ef)),_0x29e873=_0x32acbc[_0xcebd53(0x212)]('name'),_0x32dc8c=_0x32acbc[_0xcebd53(0x212)](_0xcebd53(0x1dd))||undefined,_0xb1812f=_0x36e2c8===_0xcebd53(0x1ce)?await resolveHookOptions(_0x219706,_0x32acbc):undefined,_0x24c042=buildFilePath(_0x219706,_0x36e2c8,_0x29e873,_0xb1812f);if(await fileExists(_0x24c042))throw CliErrors['validation'](_0xcebd53(0x1f3)+_0x24c042);await mkdir(dirname(_0x24c042),{'recursive':!![]});const _0x34bcb8=generateTemplate(_0x36e2c8,_0x29e873,_0x32acbc[_0xcebd53(0x1c9)],_0x32dc8c,_0xb1812f);await writeFile(_0x24c042,_0x34bcb8,_0xcebd53(0x1e5));const _0xc36852={'type':_0x36e2c8,'name':_0x29e873,'path':_0x24c042};if(_0x32dc8c)_0xc36852[_0xcebd53(0x1dd)]=_0x32dc8c;if(_0xb1812f){if(_0xb1812f[_0xcebd53(0x1f2)])_0xc36852['alias']=_0xb1812f[_0xcebd53(0x1f2)];_0xc36852['datasetCode']=_0xb1812f[_0xcebd53(0x1cf)],_0xc36852[_0xcebd53(0x1c8)]=_0xb1812f[_0xcebd53(0x1c8)],_0xc36852[_0xcebd53(0x228)]=_0xb1812f[_0xcebd53(0x228)];}return{'ok':!![],'data':_0xc36852,'message':'Created\x20'+_0x36e2c8+'\x20function:\x20'+_0x29e873};}};async function resolveHookOptions(_0x54ba0f,_0x181626){const _0x1a4bb1=a31_0x101808,_0x583a59=loadAliasMap(_0x181626[_0x1a4bb1(0x206)],undefined,resolveApiFilePath(_0x181626[_0x1a4bb1(0x206)],_0x181626['appCode'])),_0x1a8a88=_0x583a59[_0x1a4bb1(0x217)]>0x0;let _0x5e0923,_0x2f05f4,_0x1d1d7b;const _0x39abd2=_0x181626[_0x1a4bb1(0x212)](_0x1a4bb1(0x1f2)),_0x3a8475=_0x181626['str'](_0x1a4bb1(0x221));if(_0x39abd2){const _0x36cd46=resolveAlias(_0x181626[_0x1a4bb1(0x206)],_0x39abd2,undefined,resolveApiFilePath(_0x181626[_0x1a4bb1(0x206)],_0x181626[_0x1a4bb1(0x1c9)]));if(!_0x36cd46){const _0x2bb621=_0x1a8a88?'Available\x20aliases:\x20'+_0x583a59[_0x1a4bb1(0x20a)](_0x10d66c=>_0x10d66c[_0x1a4bb1(0x1f2)])['join'](',\x20'):_0x1a4bb1(0x21a)+CLI_BIN_NAME+_0x1a4bb1(0x1fa);throw CliErrors[_0x1a4bb1(0x1d2)](_0x1a4bb1(0x219)+_0x39abd2+_0x1a4bb1(0x1f5)+_0x2bb621);}_0x5e0923=_0x39abd2,_0x2f05f4=_0x36cd46;}else{if(_0x3a8475){_0x2f05f4=_0x3a8475;const _0x2c160d=_0x583a59[_0x1a4bb1(0x1e2)](_0x1d5470=>_0x1d5470[_0x1a4bb1(0x1cf)]===_0x3a8475);_0x5e0923=_0x2c160d?.[_0x1a4bb1(0x1f2)];}else{if(_0x181626[_0x1a4bb1(0x20d)])throw CliErrors['validation'](_0x1a4bb1(0x1d0));else{if(_0x1a8a88){const _0x27b6e0=_0x583a59[_0x1a4bb1(0x20a)](_0x562804=>_0x562804[_0x1a4bb1(0x1f2)]+'\x20('+_0x562804['tableName']+')'),_0x2849f3=await promptSelect(_0x1a4bb1(0x21c),_0x27b6e0),_0x5b84cc=_0x583a59[_0x2849f3];if(!_0x5b84cc)throw CliErrors[_0x1a4bb1(0x1d2)]('Invalid\x20dataset\x20selection.');_0x5e0923=_0x5b84cc[_0x1a4bb1(0x1f2)],_0x2f05f4=_0x5b84cc[_0x1a4bb1(0x1cf)];}else{const _0x99cc7a=await listDatasets(_0x181626[_0x1a4bb1(0x1c9)]);if(_0x99cc7a[_0x1a4bb1(0x217)]===0x0)throw CliErrors[_0x1a4bb1(0x1d2)](_0x1a4bb1(0x226));const _0x5d9534=_0x99cc7a['map'](_0x53f72c=>_0x53f72c['name']+'\x20['+(_0x53f72c[_0x1a4bb1(0x21f)]??_0x1a4bb1(0x1c6))+_0x1a4bb1(0x1f1)+_0x53f72c[_0x1a4bb1(0x200)]+')'),_0x21a0b6=await promptSelect('Select\x20dataset:',_0x5d9534),_0x29e674=_0x99cc7a[_0x21a0b6];if(!_0x29e674)throw CliErrors[_0x1a4bb1(0x1d2)](_0x1a4bb1(0x1d7));_0x2f05f4=_0x29e674[_0x1a4bb1(0x200)],_0x5e0923=undefined;}}}}const _0x2373dd=await listDatasets(_0x181626['appCode']),_0x391819=_0x2373dd[_0x1a4bb1(0x1e2)](_0x1976c6=>_0x1976c6['code']===_0x2f05f4);if(!_0x391819)throw CliErrors[_0x1a4bb1(0x1d2)](_0x1a4bb1(0x21d)+_0x2f05f4+_0x1a4bb1(0x1dc)+(_0x5e0923?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+_0x1a4bb1(0x1c4):''));_0x1d1d7b=_0x391819['id'];const _0x470bcd=_0x5e0923??_0x2f05f4,_0x57b2ce=await listBffDatasetOperations(_0x181626[_0x1a4bb1(0x1c9)],_0x1d1d7b),_0x876317=_0x57b2ce?Object[_0x1a4bb1(0x1f6)](_0x57b2ce):[];if(_0x876317[_0x1a4bb1(0x217)]===0x0)throw CliErrors[_0x1a4bb1(0x1d2)](_0x1a4bb1(0x214)+_0x470bcd+'.');let _0x2dfdcd;const _0x377820=_0x181626[_0x1a4bb1(0x212)](_0x1a4bb1(0x1c1));if(_0x377820){if(!_0x876317['includes'](_0x377820))throw CliErrors['validation']('Operation\x20type\x20\x22'+_0x377820+_0x1a4bb1(0x20b)+_0x470bcd+'.\x20'+(_0x1a4bb1(0x215)+_0x876317['join'](',\x20')));_0x2dfdcd=_0x377820;}else{if(_0x181626[_0x1a4bb1(0x20d)])throw CliErrors['validation'](_0x1a4bb1(0x209));const _0xcde24c=await promptSelect('Select\x20operation\x20type:',_0x876317);_0x2dfdcd=_0x876317[_0xcde24c]??_0x876317[0x0];}let _0x44ad66=normalizeHookFunctionNode(_0x181626[_0x1a4bb1(0x212)]('function-node'));if(!_0x44ad66){if(_0x181626[_0x1a4bb1(0x212)](_0x1a4bb1(0x1e3)))throw CliErrors[_0x1a4bb1(0x1d2)](_0x1a4bb1(0x1ed));if(_0x181626[_0x1a4bb1(0x20d)])throw CliErrors[_0x1a4bb1(0x1d2)](_0x1a4bb1(0x1fe));const _0x285cfb=await promptSelect(_0x1a4bb1(0x1eb),[_0x1a4bb1(0x1db),_0x1a4bb1(0x1ca)]);_0x44ad66=[_0x1a4bb1(0x1db),_0x1a4bb1(0x1ca)][_0x285cfb]??_0x1a4bb1(0x1db);}return{'alias':_0x5e0923,'datasetCode':_0x2f05f4,'datasetId':_0x1d1d7b,'operationType':_0x2dfdcd,'functionNode':_0x44ad66};}async function promptSelect(_0x308645,_0x1e97f2){const _0x264a1c=a31_0x101808;if(_0x1e97f2[_0x264a1c(0x217)]===0x1)return 0x0;for(const [_0x413b67,_0x2a576d]of _0x1e97f2['entries']()){process[_0x264a1c(0x1df)]['write']('\x20\x20'+(_0x413b67+0x1)+'.\x20'+_0x2a576d+'\x0a');}const _0x353bd4=createInterface({'input':process[_0x264a1c(0x1e9)],'output':process[_0x264a1c(0x1df)]});while(!![]){const _0x3cf501=await new Promise(_0x43a154=>{const _0x121afb=_0x264a1c;_0x353bd4[_0x121afb(0x21e)](_0x308645+'\x20',_0x43a154);}),_0x581457=Number[_0x264a1c(0x1d1)](_0x3cf501[_0x264a1c(0x1ec)](),0xa);if(Number[_0x264a1c(0x213)](_0x581457)&&_0x581457>=0x1&&_0x581457<=_0x1e97f2[_0x264a1c(0x217)])return _0x353bd4[_0x264a1c(0x222)](),_0x581457-0x1;process[_0x264a1c(0x1df)][_0x264a1c(0x218)](_0x264a1c(0x1f0)+_0x1e97f2[_0x264a1c(0x217)]+'.\x0a');}}function buildFilePath(_0x159a4a,_0x319c78,_0x1a7ceb,_0xa379db){const _0x2c6473=a31_0x101808;if(_0x319c78===_0x2c6473(0x1ce)){if(!_0xa379db)throw CliErrors[_0x2c6473(0x1d2)](_0x2c6473(0x1e4));const _0x5bab1c=_0xa379db['alias']??_0xa379db[_0x2c6473(0x1cf)];return join(_0x159a4a[_0x2c6473(0x1e1)],'HOOK',_0x5bab1c,_0xa379db['operationType'],_0xa379db['functionNode'],_0x1a7ceb+'.js');}return join(_0x159a4a[_0x2c6473(0x1e1)],_0x319c78,_0x1a7ceb+_0x2c6473(0x20f));}export function generateTemplate(_0x237e4a,_0x2605f3,_0x5a16b3,_0x26b9f4,_0x3b91cf){const _0x5e09c9=a31_0x101808,_0x215f2d=_0x26b9f4?.[_0x5e09c9(0x1ec)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0xd9106f=getAppBaseUrl(_0x5a16b3),_0x5dc466=_0x5e09c9(0x1f8);if(_0x237e4a==='COMMON')return _0x5e09c9(0x1d9)+_0x215f2d+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20'+_0x2605f3+_0x5e09c9(0x1ff)+_0xd9106f+_0x5e09c9(0x201)+_0x5a16b3+_0x5e09c9(0x204)+_0x2605f3+_0x5e09c9(0x225)+_0x2605f3+_0x5e09c9(0x211)+_0x5dc466+_0x5e09c9(0x1d5)+_0x2605f3+_0x5e09c9(0x1cc);if(_0x237e4a===_0x5e09c9(0x1f7))return _0x5e09c9(0x1d9)+_0x215f2d+_0x5e09c9(0x1fb)+_0x2605f3+_0x5e09c9(0x1e8)+_0x5a16b3+'/'+_0x2605f3+_0x5e09c9(0x1ff)+_0xd9106f+_0x5e09c9(0x201)+_0x5a16b3+'/ENDPOINT/'+_0x2605f3+_0x5e09c9(0x1e7)+_0x5dc466+_0x5e09c9(0x216)+_0x2605f3+_0x5e09c9(0x1cc);if(!_0x3b91cf)throw CliErrors[_0x5e09c9(0x1d2)]('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');const _0x568e5c=_0x3b91cf[_0x5e09c9(0x1f2)]??_0x3b91cf[_0x5e09c9(0x1cf)],_0x567704=_0x3b91cf[_0x5e09c9(0x228)]===_0x5e09c9(0x1db)?_0x5e09c9(0x1da):_0x5e09c9(0x1c7),_0x4587b1=_0x3b91cf[_0x5e09c9(0x228)]===_0x5e09c9(0x1db)?_0x5e09c9(0x1c5):_0x5e09c9(0x1fd);return _0x5e09c9(0x1d9)+_0x215f2d+_0x5e09c9(0x1f9)+_0x2605f3+_0x5e09c9(0x1de)+_0x5a16b3+'/'+_0x3b91cf['datasetCode']+'/'+_0x3b91cf[_0x5e09c9(0x1c8)]+_0x5e09c9(0x1ff)+_0xd9106f+'/data/dataset/'+_0x3b91cf['datasetId']+_0x5e09c9(0x1ea)+_0x5a16b3+'/HOOK/'+_0x568e5c+'/'+_0x3b91cf[_0x5e09c9(0x1c8)]+'/'+_0x3b91cf[_0x5e09c9(0x228)]+'/'+_0x2605f3+'.js\x0a\x20*\x20[触发节点]\x20'+_0x3b91cf['functionNode']+'\x0a'+_0x5dc466+_0x5e09c9(0x1f4)+_0x567704+_0x5e09c9(0x1d3)+_0x4587b1+'\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x2605f3+_0x5e09c9(0x1cc);}
1
+ const a31_0x4ac471=a31_0x5487;(function(_0x5ade3f,_0x12ce3f){const _0xdf3bcd=a31_0x5487,_0x57b33b=_0x5ade3f();while(!![]){try{const _0x179b27=-parseInt(_0xdf3bcd(0x13c))/0x1*(parseInt(_0xdf3bcd(0x16d))/0x2)+-parseInt(_0xdf3bcd(0x126))/0x3+-parseInt(_0xdf3bcd(0x15f))/0x4*(parseInt(_0xdf3bcd(0x159))/0x5)+-parseInt(_0xdf3bcd(0x171))/0x6+-parseInt(_0xdf3bcd(0x15d))/0x7+-parseInt(_0xdf3bcd(0x11c))/0x8+parseInt(_0xdf3bcd(0x128))/0x9;if(_0x179b27===_0x12ce3f)break;else _0x57b33b['push'](_0x57b33b['shift']());}catch(_0x1e68fa){_0x57b33b['push'](_0x57b33b['shift']());}}}(a31_0xeafb,0x5fd7b));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';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_0x4ac471(0x160),'command':a31_0x4ac471(0x16a),'description':a31_0x4ac471(0x129),'risk':a31_0x4ac471(0x12b),'flags':[{'name':'type','type':'string','required':!![],'enum':[a31_0x4ac471(0x13d),a31_0x4ac471(0x17e),a31_0x4ac471(0x17d)],'description':a31_0x4ac471(0x143)},{'name':a31_0x4ac471(0x158),'type':a31_0x4ac471(0x12c),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0x4ac471(0x153),'type':'string','description':a31_0x4ac471(0x125)},{'name':a31_0x4ac471(0x164),'type':a31_0x4ac471(0x12c),'description':a31_0x4ac471(0x124)},{'name':a31_0x4ac471(0x16f),'type':a31_0x4ac471(0x12c),'description':a31_0x4ac471(0x11e)},{'name':a31_0x4ac471(0x13b),'type':'string','description':a31_0x4ac471(0x145)},{'name':'function-node','type':'string','description':a31_0x4ac471(0x123),'enum':[a31_0x4ac471(0x139),a31_0x4ac471(0x12d)]}],async 'validate'(_0x1d5aca){const _0x3d02e1=a31_0x4ac471,_0x2b98f1=_0x1d5aca[_0x3d02e1(0x135)](_0x3d02e1(0x158));if(!isValidBffFunctionName(_0x2b98f1))throw CliErrors[_0x3d02e1(0x13e)](_0x3d02e1(0x147)+_0x2b98f1+_0x3d02e1(0x168));},async 'execute'(_0x32e4b3){const _0x4c944c=a31_0x4ac471,_0x411fd0=loadBffProjectConfig(_0x32e4b3[_0x4c944c(0x14b)]),_0x581405=_0x32e4b3[_0x4c944c(0x135)]('type'),_0x3c9600=_0x32e4b3[_0x4c944c(0x135)](_0x4c944c(0x158)),_0x4c89e7=_0x32e4b3[_0x4c944c(0x135)](_0x4c944c(0x153))||undefined,_0x47077f=_0x581405===_0x4c944c(0x17d)?await resolveHookOptions(_0x411fd0,_0x32e4b3):undefined,_0x55a10e=buildFilePath(_0x411fd0,_0x581405,_0x3c9600,_0x47077f);if(await fileExists(_0x55a10e))throw CliErrors[_0x4c944c(0x13e)](_0x4c944c(0x155)+_0x55a10e);await mkdir(dirname(_0x55a10e),{'recursive':!![]});const _0x42996d=generateTemplate(_0x581405,_0x3c9600,_0x32e4b3[_0x4c944c(0x14b)],_0x4c89e7,_0x47077f);await writeFile(_0x55a10e,_0x42996d,'utf8');const _0xfde8ad={'type':_0x581405,'name':_0x3c9600,'path':_0x55a10e};if(_0x4c89e7)_0xfde8ad[_0x4c944c(0x153)]=_0x4c89e7;if(_0x47077f){if(_0x47077f[_0x4c944c(0x164)])_0xfde8ad[_0x4c944c(0x164)]=_0x47077f['alias'];_0xfde8ad[_0x4c944c(0x140)]=_0x47077f[_0x4c944c(0x140)],_0xfde8ad[_0x4c944c(0x17a)]=_0x47077f[_0x4c944c(0x17a)],_0xfde8ad['functionNode']=_0x47077f['functionNode'];}return{'ok':!![],'data':_0xfde8ad,'message':_0x4c944c(0x14d)+_0x581405+_0x4c944c(0x120)+_0x3c9600};}};function a31_0x5487(_0x1d1bfe,_0x6c6b3d){_0x1d1bfe=_0x1d1bfe-0x11a;const _0xeafbab=a31_0xeafb();let _0x5487c8=_0xeafbab[_0x1d1bfe];return _0x5487c8;}async function resolveHookOptions(_0x4296c5,_0x19ecfa){const _0x5aea4e=a31_0x4ac471,_0x43cf1a=loadAliasMap(_0x19ecfa[_0x5aea4e(0x122)],undefined,resolveApiFilePath(_0x19ecfa[_0x5aea4e(0x122)],_0x19ecfa['appCode'])),_0x1de279=_0x43cf1a[_0x5aea4e(0x142)]>0x0;let _0x13962e,_0x2e9bc4,_0x4eb0dd;const _0x9d205b=_0x19ecfa[_0x5aea4e(0x135)](_0x5aea4e(0x164)),_0x1dc31e=_0x19ecfa[_0x5aea4e(0x135)]('datasetcode');if(_0x9d205b){const _0x453636=resolveAlias(_0x19ecfa['apiDir'],_0x9d205b,undefined,resolveApiFilePath(_0x19ecfa[_0x5aea4e(0x122)],_0x19ecfa['appCode']));if(!_0x453636){const _0x3d13dc=_0x1de279?_0x5aea4e(0x121)+_0x43cf1a['map'](_0x45daf7=>_0x45daf7[_0x5aea4e(0x164)])[_0x5aea4e(0x152)](',\x20'):_0x5aea4e(0x13f)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x5aea4e(0x13e)]('Alias\x20\x22'+_0x9d205b+_0x5aea4e(0x167)+_0x3d13dc);}_0x13962e=_0x9d205b,_0x2e9bc4=_0x453636;}else{if(_0x1dc31e){_0x2e9bc4=_0x1dc31e;const _0x1bf59b=_0x43cf1a['find'](_0x589f26=>_0x589f26[_0x5aea4e(0x140)]===_0x1dc31e);_0x13962e=_0x1bf59b?.[_0x5aea4e(0x164)];}else{if(_0x19ecfa[_0x5aea4e(0x162)])throw CliErrors[_0x5aea4e(0x13e)](_0x5aea4e(0x175));else{if(_0x1de279){const _0x3fb155=_0x43cf1a[_0x5aea4e(0x12a)](_0x72a23=>_0x72a23[_0x5aea4e(0x164)]+'\x20('+_0x72a23[_0x5aea4e(0x11b)]+')'),_0x277b28=await promptSelect('Select\x20dataset:',_0x3fb155),_0x176761=_0x43cf1a[_0x277b28];if(!_0x176761)throw CliErrors[_0x5aea4e(0x13e)](_0x5aea4e(0x172));_0x13962e=_0x176761[_0x5aea4e(0x164)],_0x2e9bc4=_0x176761[_0x5aea4e(0x140)];}else{const _0x26134a=await listDatasets(_0x19ecfa['appCode']);if(_0x26134a[_0x5aea4e(0x142)]===0x0)throw CliErrors[_0x5aea4e(0x13e)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x7301c8=_0x26134a['map'](_0x3d2d44=>_0x3d2d44[_0x5aea4e(0x158)]+'\x20['+(_0x3d2d44[_0x5aea4e(0x131)]??_0x5aea4e(0x15a))+_0x5aea4e(0x15b)+_0x3d2d44[_0x5aea4e(0x132)]+')'),_0x322ad3=await promptSelect('Select\x20dataset:',_0x7301c8),_0x26849d=_0x26134a[_0x322ad3];if(!_0x26849d)throw CliErrors[_0x5aea4e(0x13e)](_0x5aea4e(0x172));_0x2e9bc4=_0x26849d[_0x5aea4e(0x132)],_0x13962e=undefined;}}}}const _0x5b6f64=await listDatasets(_0x19ecfa['appCode']),_0x1c346c=_0x5b6f64[_0x5aea4e(0x149)](_0x29236b=>_0x29236b[_0x5aea4e(0x132)]===_0x2e9bc4);if(!_0x1c346c)throw CliErrors[_0x5aea4e(0x13e)](_0x5aea4e(0x161)+_0x2e9bc4+_0x5aea4e(0x136)+(_0x13962e?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x4eb0dd=_0x1c346c['id'];const _0x4db4f9=_0x13962e??_0x2e9bc4,_0x42971d=await listBffDatasetOperations(_0x19ecfa[_0x5aea4e(0x14b)],_0x4eb0dd),_0xa7b317=_0x42971d?Object[_0x5aea4e(0x154)](_0x42971d):[];if(_0xa7b317[_0x5aea4e(0x142)]===0x0)throw CliErrors[_0x5aea4e(0x13e)]('No\x20operation\x20types\x20found\x20for\x20dataset\x20'+_0x4db4f9+'.');let _0x3b6efa;const _0x5685ee=_0x19ecfa[_0x5aea4e(0x135)](_0x5aea4e(0x13b));if(_0x5685ee){if(!_0xa7b317[_0x5aea4e(0x173)](_0x5685ee))throw CliErrors[_0x5aea4e(0x13e)](_0x5aea4e(0x174)+_0x5685ee+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x4db4f9+'.\x20'+(_0x5aea4e(0x163)+_0xa7b317['join'](',\x20')));_0x3b6efa=_0x5685ee;}else{if(_0x19ecfa[_0x5aea4e(0x162)])throw CliErrors[_0x5aea4e(0x13e)](_0x5aea4e(0x11f));const _0x2fd9d3=await promptSelect('Select\x20operation\x20type:',_0xa7b317);_0x3b6efa=_0xa7b317[_0x2fd9d3]??_0xa7b317[0x0];}let _0x2714bd=normalizeHookFunctionNode(_0x19ecfa[_0x5aea4e(0x135)](_0x5aea4e(0x146)));if(!_0x2714bd){if(_0x19ecfa['str'](_0x5aea4e(0x146)))throw CliErrors[_0x5aea4e(0x13e)](_0x5aea4e(0x148));if(_0x19ecfa[_0x5aea4e(0x162)])throw CliErrors[_0x5aea4e(0x13e)](_0x5aea4e(0x138));const _0x8aa6fd=await promptSelect('Select\x20trigger\x20node:',[_0x5aea4e(0x139),_0x5aea4e(0x12d)]);_0x2714bd=['before',_0x5aea4e(0x12d)][_0x8aa6fd]??'before';}return{'alias':_0x13962e,'datasetCode':_0x2e9bc4,'datasetId':_0x4eb0dd,'operationType':_0x3b6efa,'functionNode':_0x2714bd};}async function promptSelect(_0xdaed20,_0x2d3960){const _0x304178=a31_0x4ac471;if(_0x2d3960['length']===0x1)return 0x0;for(const [_0x1b6588,_0x28009f]of _0x2d3960['entries']()){process[_0x304178(0x141)][_0x304178(0x178)]('\x20\x20'+(_0x1b6588+0x1)+'.\x20'+_0x28009f+'\x0a');}const _0x3dc73b=createInterface({'input':process[_0x304178(0x17b)],'output':process['stderr']});while(!![]){const _0x55ebbf=await new Promise(_0x437311=>{const _0x3db0a5=_0x304178;_0x3dc73b[_0x3db0a5(0x12e)](_0xdaed20+'\x20',_0x437311);}),_0x37bf65=Number['parseInt'](_0x55ebbf[_0x304178(0x14c)](),0xa);if(Number[_0x304178(0x151)](_0x37bf65)&&_0x37bf65>=0x1&&_0x37bf65<=_0x2d3960['length'])return _0x3dc73b[_0x304178(0x15e)](),_0x37bf65-0x1;process['stderr'][_0x304178(0x178)](_0x304178(0x130)+_0x2d3960[_0x304178(0x142)]+'.\x0a');}}function buildFilePath(_0x2c786c,_0x2e1930,_0x5e3215,_0x5f15a1){const _0x45c0a9=a31_0x4ac471;if(_0x2e1930===_0x45c0a9(0x17d)){if(!_0x5f15a1)throw CliErrors['validation'](_0x45c0a9(0x170));const _0x109ea3=_0x5f15a1[_0x45c0a9(0x164)]??_0x5f15a1[_0x45c0a9(0x140)];return join(_0x2c786c['scriptsRootDir'],_0x45c0a9(0x17d),_0x109ea3,_0x5f15a1[_0x45c0a9(0x17a)],_0x5f15a1['functionNode'],_0x5e3215+_0x45c0a9(0x133));}return join(_0x2c786c['scriptsRootDir'],_0x2e1930,_0x5e3215+_0x45c0a9(0x133));}function a31_0xeafb(){const _0x303bac=['172PlRgfD','COMMON','validation','No\x20api.ts\x20found.\x20Run\x20`','datasetCode','stderr','length','Script\x20type','functionNode','Operation\x20type\x20(HOOK\x20only)','function-node','Invalid\x20function\x20name\x20\x22','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','find','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','appCode','trim','Created\x20','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','\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','/COMMON/','isInteger','join','description','keys','File\x20already\x20exists:\x20','datasetId','/HOOK/','name','5WUrySF','UNKNOWN',']\x20(','\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','5351255swxbnz','close','60596JokMoc','bff','Dataset\x20not\x20found\x20for\x20code\x20\x22','nonInteractive','Available:\x20','alias','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','.js\x0a','\x22\x20not\x20found.\x20','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','create','\x22,\x20params\x20})\x0a','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','8684mSwkCy','/ENDPOINT/','datasetcode','HOOK\x20requires\x20alias/operation/node\x20options.','4046682scobfg','Invalid\x20dataset\x20selection.','includes','Operation\x20type\x20\x22','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20','write','\x0a\x20*\x20[平台配置]\x20','operationType','stdin','.js\x0a\x20*\x20[触发节点]\x20','HOOK','ENDPOINT','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','tableName','5524904nCoTvJ','/data/dataset/','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20function:\x20','Available\x20aliases:\x20','apiDir','Trigger\x20node\x20(HOOK\x20only)','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Script\x20description','679452RRAiRl','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','31594977JmnskS','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','map','read','string','after','question','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','source','code','.js','/**\x0a\x20*\x20','str','\x22.\x20','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','before','当前响应结果','operation-type'];a31_0xeafb=function(){return _0x303bac;};return a31_0xeafb();}export function generateTemplate(_0x4d16c5,_0xba5b5c,_0x757594,_0x1fe7ea,_0x7f5be6){const _0x46ce79=a31_0x4ac471,_0x95d73c=_0x1fe7ea?.[_0x46ce79(0x14c)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x3cd8b2=getAppBaseUrl(_0x757594),_0x192baa=_0x46ce79(0x12f);if(_0x4d16c5==='COMMON')return _0x46ce79(0x134)+_0x95d73c+_0x46ce79(0x14e)+_0xba5b5c+'\x0a\x20*\x20[平台配置]\x20'+_0x3cd8b2+_0x46ce79(0x127)+_0x757594+_0x46ce79(0x150)+_0xba5b5c+_0x46ce79(0x165)+_0xba5b5c+_0x46ce79(0x16b)+_0x192baa+_0x46ce79(0x14f)+_0xba5b5c+_0x46ce79(0x11a);if(_0x4d16c5===_0x46ce79(0x17e))return _0x46ce79(0x134)+_0x95d73c+_0x46ce79(0x14a)+_0xba5b5c+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/'+_0x757594+'/'+_0xba5b5c+_0x46ce79(0x179)+_0x3cd8b2+_0x46ce79(0x127)+_0x757594+_0x46ce79(0x16e)+_0xba5b5c+_0x46ce79(0x166)+_0x192baa+_0x46ce79(0x15c)+_0xba5b5c+_0x46ce79(0x11a);if(!_0x7f5be6)throw CliErrors[_0x46ce79(0x13e)](_0x46ce79(0x16c));const _0x39d637=_0x7f5be6[_0x46ce79(0x164)]??_0x7f5be6[_0x46ce79(0x140)],_0x2923bf=_0x7f5be6[_0x46ce79(0x144)]===_0x46ce79(0x139)?'当前请求参数':_0x46ce79(0x13a),_0x2a0727=_0x7f5be6[_0x46ce79(0x144)]==='before'?'修改后的请求参数':'修改后的响应结果';return _0x46ce79(0x134)+_0x95d73c+_0x46ce79(0x177)+_0xba5b5c+_0x46ce79(0x176)+_0x757594+'/'+_0x7f5be6[_0x46ce79(0x140)]+'/'+_0x7f5be6[_0x46ce79(0x17a)]+_0x46ce79(0x179)+_0x3cd8b2+_0x46ce79(0x11d)+_0x7f5be6[_0x46ce79(0x156)]+_0x46ce79(0x169)+_0x757594+_0x46ce79(0x157)+_0x39d637+'/'+_0x7f5be6[_0x46ce79(0x17a)]+'/'+_0x7f5be6['functionNode']+'/'+_0xba5b5c+_0x46ce79(0x17c)+_0x7f5be6['functionNode']+'\x0a'+_0x192baa+'\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20'+_0x2923bf+_0x46ce79(0x137)+_0x2a0727+'\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0xba5b5c+_0x46ce79(0x11a);}
@@ -1 +1 @@
1
- const a32_0x517e9a=a32_0x36d5;(function(_0x147ccd,_0x142363){const _0x1f3443=a32_0x36d5,_0xbb922e=_0x147ccd();while(!![]){try{const _0x226499=parseInt(_0x1f3443(0xb3))/0x1+parseInt(_0x1f3443(0x98))/0x2*(parseInt(_0x1f3443(0xa3))/0x3)+parseInt(_0x1f3443(0xb7))/0x4*(-parseInt(_0x1f3443(0xc0))/0x5)+parseInt(_0x1f3443(0xbc))/0x6+-parseInt(_0x1f3443(0x9f))/0x7+parseInt(_0x1f3443(0xbe))/0x8+-parseInt(_0x1f3443(0x9d))/0x9*(parseInt(_0x1f3443(0xb2))/0xa);if(_0x226499===_0x142363)break;else _0xbb922e['push'](_0xbb922e['shift']());}catch(_0x96dcc2){_0xbb922e['push'](_0xbb922e['shift']());}}}(a32_0x23b7,0x55cdf));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 a32_0x23b7(){const _0x32f799=['2700EYUtvg','428196vDAtBG','delete','keys','No\x20lock\x20entry\x20found\x20for\x20\x22','360268BFhlVR','bff','Local\x20delete\x20not\x20settled\x20for\x20','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x20\x20-\x20','403176zOwvEJ','length','2862192WXqAuB','target','5FihsDe','str','Would\x20delete\x20','join','POST','toISOString','scriptsRootDir','find','remoteId','Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','lockFilePath','scriptsRoot','40464ALsGdp','stringify','projectRoot','Multiple\x20functions\x20match\x20\x22','/api/management/library/scripts/delete','7542WOxnpc','functions','2572304WxhvDw','appCode','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','validation','27orStKH','Lock\x20scope\x20for\x20app\x20\x22','split','high-risk-write','string','filter','Backend\x20Function\x20lock\x20file\x20not\x20found.','\x20(local\x20file\x20moved\x20to\x20trash)','trashedTo','apps','replace','lastSync','Function\x20not\x20found:\x20','map','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'];a32_0x23b7=function(){return _0x32f799;};return a32_0x23b7();}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':a32_0x517e9a(0xb8),'command':a32_0x517e9a(0xb4),'description':'Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','risk':a32_0x517e9a(0xa6),'flags':[{'name':a32_0x517e9a(0xbf),'type':a32_0x517e9a(0xa7),'required':!![],'description':a32_0x517e9a(0xb1)}],async 'validate'(_0x42c7e0){const _0x54dc22=a32_0x517e9a,_0x14412d=loadBffProjectConfig(_0x42c7e0[_0x54dc22(0xa0)]),_0x3e145b=await readBffLockFile(_0x14412d[_0x54dc22(0x96)]);if(!_0x3e145b)throw CliErrors['validation'](_0x54dc22(0x95));},async 'dryRun'(_0x270cf5){const _0x5f426a=a32_0x517e9a,_0xdccfe0=loadBffProjectConfig(_0x270cf5[_0x5f426a(0xa0)]),_0x29317b=await readBffLockFile(_0xdccfe0[_0x5f426a(0x96)]);if(!_0x29317b)throw CliErrors[_0x5f426a(0xa2)](_0x5f426a(0xa9));const {appLock:_0x1173b0}=ensureLockScope(_0x29317b,_0x270cf5[_0x5f426a(0xa0)],_0xdccfe0[_0x5f426a(0x97)],'delete'),_0x4c6eff=_0x270cf5[_0x5f426a(0xc1)](_0x5f426a(0xbf)),_0x1c1a63=Object[_0x5f426a(0xb5)](_0x1173b0[_0x5f426a(0x9e)]),_0x5c73bc=resolveDeleteTarget(_0x4c6eff,_0x1c1a63),_0x487e8e=_0x1173b0['functions'][_0x5c73bc];if(!_0x487e8e)throw CliErrors[_0x5f426a(0xa2)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x5c73bc+'\x22.');const _0x5b0882=resolveLocalFilePathFromLockKey(_0xdccfe0,_0x5c73bc),_0x32c23a=relative(_0xdccfe0[_0x5f426a(0x9a)],_0x5b0882),_0x5a5da1=join(_0xdccfe0['trashDir'],'<timestamp>',_0x32c23a);return{'method':_0x5f426a(0xc4),'url':_0x5f426a(0x9c),'body':{'appCode':_0x270cf5[_0x5f426a(0xa0)],'target':_0x5c73bc,'remoteId':_0x487e8e[_0x5f426a(0x94)],'localFilePath':_0x5b0882,'trashedPath':_0x5a5da1},'description':_0x5f426a(0xc2)+_0x5c73bc+_0x5f426a(0xa1)};},async 'execute'(_0x15bed0){const _0x4a69a5=a32_0x517e9a,_0x22fbd7=loadBffProjectConfig(_0x15bed0[_0x4a69a5(0xa0)]),_0x363dfe=await readBffLockFile(_0x22fbd7[_0x4a69a5(0x96)]);if(!_0x363dfe)throw CliErrors[_0x4a69a5(0xa2)](_0x4a69a5(0xa9));const {lockData:_0x5705d3,appLock:_0x247cd2}=ensureLockScope(_0x363dfe,_0x15bed0[_0x4a69a5(0xa0)],_0x22fbd7[_0x4a69a5(0x97)],_0x4a69a5(0xb4)),_0x2cc57f=JSON['parse'](JSON[_0x4a69a5(0x99)](_0x5705d3)),_0x2e1e3a=_0x2cc57f[_0x4a69a5(0xac)][_0x15bed0[_0x4a69a5(0xa0)]];if(!_0x2e1e3a)throw new Error(_0x4a69a5(0xa4)+_0x15bed0[_0x4a69a5(0xa0)]+_0x4a69a5(0xba));const _0x3bd22c=_0x15bed0[_0x4a69a5(0xc1)](_0x4a69a5(0xbf)),_0x5da522=Object[_0x4a69a5(0xb5)](_0x2e1e3a[_0x4a69a5(0x9e)]),_0x39fdf0=resolveDeleteTarget(_0x3bd22c,_0x5da522),_0x5c0984=_0x2e1e3a[_0x4a69a5(0x9e)][_0x39fdf0];if(!_0x5c0984)throw CliErrors['validation'](_0x4a69a5(0xb6)+_0x39fdf0+'\x22.');await deleteBffScript(_0x5c0984[_0x4a69a5(0x94)]),delete _0x2e1e3a[_0x4a69a5(0x9e)][_0x39fdf0],_0x2e1e3a[_0x4a69a5(0xae)]=new Date()[_0x4a69a5(0x91)](),await writeBffLockFile(_0x22fbd7[_0x4a69a5(0x96)],_0x2cc57f);const _0x1dc5b5=resolveLocalFilePathFromLockKey(_0x22fbd7,_0x39fdf0);let _0x57a9f4;await fileExists(_0x1dc5b5)&&(_0x57a9f4=await moveToTrash(_0x22fbd7[_0x4a69a5(0x9a)],_0x22fbd7['trashDir'],_0x1dc5b5),await cleanupEmptyDirectories(dirname(_0x1dc5b5),_0x22fbd7[_0x4a69a5(0x92)]));await waitForDeleteSettlement(_0x22fbd7[_0x4a69a5(0x96)],_0x15bed0['appCode'],_0x39fdf0,_0x1dc5b5),await sleep(0x96);const _0x52810d={'deleted':_0x39fdf0,'remoteId':_0x5c0984[_0x4a69a5(0x94)]};if(_0x57a9f4)_0x52810d[_0x4a69a5(0xab)]=_0x57a9f4;return{'ok':!![],'data':_0x52810d,'message':'Deleted\x20'+_0x39fdf0+(_0x57a9f4?_0x4a69a5(0xaa):'')};}};function resolveDeleteTarget(_0x49df88,_0x39478e){const _0x1d59ac=a32_0x517e9a;if(_0x49df88['includes']('/')){const _0x7e77aa=_0x39478e[_0x1d59ac(0x93)](_0xa4b357=>_0xa4b357===_0x49df88);if(!_0x7e77aa)throw CliErrors['validation'](_0x1d59ac(0xaf)+_0x49df88);return _0x7e77aa;}const _0x52a372=_0x39478e[_0x1d59ac(0xa8)](_0x8b775c=>_0x8b775c[_0x1d59ac(0xa5)]('/')['at'](-0x1)===_0x49df88);if(_0x52a372[_0x1d59ac(0xbd)]===0x0)throw CliErrors[_0x1d59ac(0xa2)](_0x1d59ac(0xaf)+_0x49df88);if(_0x52a372['length']>0x1)throw CliErrors[_0x1d59ac(0xa2)](_0x1d59ac(0x9b)+_0x49df88+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x52a372[_0x1d59ac(0xb0)](_0x4f9049=>_0x1d59ac(0xbb)+_0x4f9049)[_0x1d59ac(0xc3)]('\x0a'));return _0x52a372[0x0];}function a32_0x36d5(_0xa1a36b,_0x2ae7ee){_0xa1a36b=_0xa1a36b-0x91;const _0x23b751=a32_0x23b7();let _0x36d592=_0x23b751[_0xa1a36b];return _0x36d592;}async function moveToTrash(_0x50de11,_0x5cb579,_0xa9f50b){const _0x5adb0d=a32_0x517e9a,_0x368eb8=new Date()[_0x5adb0d(0x91)]()[_0x5adb0d(0xad)](/[:.]/g,'-'),_0x50cf74=relative(_0x50de11,_0xa9f50b),_0x36b3d9=join(_0x5cb579,_0x368eb8,_0x50cf74);return await mkdir(dirname(_0x36b3d9),{'recursive':!![]}),await rename(_0xa9f50b,_0x36b3d9),_0x36b3d9;}async function cleanupEmptyDirectories(_0xa11f0e,_0x3c26f7){const _0xc3e33d=a32_0x517e9a;let _0x22463c=resolve(_0xa11f0e);const _0x98e95f=resolve(_0x3c26f7);while(_0x22463c['startsWith'](''+_0x98e95f+sep)||_0x22463c===_0x98e95f){if(_0x22463c===_0x98e95f)return;try{const _0x579c80=await readdir(_0x22463c);if(_0x579c80[_0xc3e33d(0xbd)]>0x0)return;await rmdir(_0x22463c);}catch{return;}_0x22463c=dirname(_0x22463c);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x537a6a,_0x29b1e3,_0x54cec3,_0x395e66){const _0x3d39cd=a32_0x517e9a;for(let _0x5bda7c=0x0;_0x5bda7c<DELETE_SETTLE_RETRY_COUNT;_0x5bda7c+=0x1){const _0x564cd6=await readBffLockFile(_0x537a6a),_0x31623c=!!_0x564cd6?.[_0x3d39cd(0xac)]?.[_0x29b1e3]?.[_0x3d39cd(0x9e)]?.[_0x54cec3],_0x3ec624=await fileExists(_0x395e66);if(!_0x31623c&&!_0x3ec624)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x3d39cd(0xb9)+_0x54cec3+'.');}
1
+ const a32_0x32af4f=a32_0x3139;(function(_0x57297a,_0x28e51d){const _0xe04cc4=a32_0x3139,_0x1a3de4=_0x57297a();while(!![]){try{const _0x42d5bb=parseInt(_0xe04cc4(0x159))/0x1+-parseInt(_0xe04cc4(0x15e))/0x2+-parseInt(_0xe04cc4(0x143))/0x3*(-parseInt(_0xe04cc4(0x170))/0x4)+parseInt(_0xe04cc4(0x16b))/0x5*(parseInt(_0xe04cc4(0x14e))/0x6)+-parseInt(_0xe04cc4(0x161))/0x7*(-parseInt(_0xe04cc4(0x175))/0x8)+-parseInt(_0xe04cc4(0x165))/0x9*(-parseInt(_0xe04cc4(0x142))/0xa)+parseInt(_0xe04cc4(0x177))/0xb*(-parseInt(_0xe04cc4(0x174))/0xc);if(_0x42d5bb===_0x28e51d)break;else _0x1a3de4['push'](_0x1a3de4['shift']());}catch(_0x2ddd80){_0x1a3de4['push'](_0x1a3de4['shift']());}}}(a32_0x4001,0x630be));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 a32_0x3139(_0x2e0962,_0x592b07){_0x2e0962=_0x2e0962-0x142;const _0x4001f6=a32_0x4001();let _0x3139d6=_0x4001f6[_0x2e0962];return _0x3139d6;}function a32_0x4001(){const _0x181709=['Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','1539016RIyGck','\x20(local\x20file\x20moved\x20to\x20trash)','map','10829AASkMW','find','functions','stringify','45LDaGVt','keys','\x20\x20-\x20','validation','No\x20lock\x20entry\x20found\x20for\x20\x22','startsWith','1467705PTjaXQ','target','split','Function\x20not\x20found:\x20','filter','4CQHioN','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','/api/management/library/scripts/delete','scriptsRootDir','7536bDCbxd','3704JDdEqt','trashDir','26708sNUzDZ','scriptsRoot','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','1360460nctSFS','632013prfVCL','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','toISOString','POST','trashedTo','join','replace','remoteId','delete','high-risk-write','string','12RNqHug','appCode','str','apps','length','parse','Would\x20delete\x20','Multiple\x20functions\x20match\x20\x22','Lock\x20scope\x20for\x20app\x20\x22','Backend\x20Function\x20lock\x20file\x20not\x20found.','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','505742elTBPl','projectRoot','lockFilePath','bff'];a32_0x4001=function(){return _0x181709;};return a32_0x4001();}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':a32_0x32af4f(0x15c),'command':a32_0x32af4f(0x14b),'description':a32_0x32af4f(0x144),'risk':a32_0x32af4f(0x14c),'flags':[{'name':'target','type':a32_0x32af4f(0x14d),'required':!![],'description':a32_0x32af4f(0x171)}],async 'validate'(_0xb9588d){const _0x27663b=a32_0x32af4f,_0x126e02=loadBffProjectConfig(_0xb9588d[_0x27663b(0x14f)]),_0x3848db=await readBffLockFile(_0x126e02['lockFilePath']);if(!_0x3848db)throw CliErrors[_0x27663b(0x168)](_0x27663b(0x15d));},async 'dryRun'(_0x4ef389){const _0x5af110=a32_0x32af4f,_0xcab1b1=loadBffProjectConfig(_0x4ef389['appCode']),_0x39592e=await readBffLockFile(_0xcab1b1[_0x5af110(0x15b)]);if(!_0x39592e)throw CliErrors[_0x5af110(0x168)](_0x5af110(0x157));const {appLock:_0x1b466d}=ensureLockScope(_0x39592e,_0x4ef389[_0x5af110(0x14f)],_0xcab1b1['scriptsRoot'],_0x5af110(0x14b)),_0x2d22e1=_0x4ef389[_0x5af110(0x150)](_0x5af110(0x16c)),_0x3e5b8d=Object[_0x5af110(0x166)](_0x1b466d[_0x5af110(0x163)]),_0x452660=resolveDeleteTarget(_0x2d22e1,_0x3e5b8d),_0x4445e7=_0x1b466d['functions'][_0x452660];if(!_0x4445e7)throw CliErrors[_0x5af110(0x168)](_0x5af110(0x169)+_0x452660+'\x22.');const _0x4e76b4=resolveLocalFilePathFromLockKey(_0xcab1b1,_0x452660),_0x120e4e=relative(_0xcab1b1[_0x5af110(0x15a)],_0x4e76b4),_0x55cc72=join(_0xcab1b1[_0x5af110(0x176)],'<timestamp>',_0x120e4e);return{'method':_0x5af110(0x146),'url':_0x5af110(0x172),'body':{'appCode':_0x4ef389['appCode'],'target':_0x452660,'remoteId':_0x4445e7[_0x5af110(0x14a)],'localFilePath':_0x4e76b4,'trashedPath':_0x55cc72},'description':_0x5af110(0x154)+_0x452660+_0x5af110(0x179)};},async 'execute'(_0xf43c7d){const _0x591c9a=a32_0x32af4f,_0xaa0da5=loadBffProjectConfig(_0xf43c7d[_0x591c9a(0x14f)]),_0x33c727=await readBffLockFile(_0xaa0da5['lockFilePath']);if(!_0x33c727)throw CliErrors[_0x591c9a(0x168)](_0x591c9a(0x157));const {lockData:_0x5c68b0,appLock:_0x4e0c30}=ensureLockScope(_0x33c727,_0xf43c7d[_0x591c9a(0x14f)],_0xaa0da5[_0x591c9a(0x178)],_0x591c9a(0x14b)),_0x27f179=JSON[_0x591c9a(0x153)](JSON[_0x591c9a(0x164)](_0x5c68b0)),_0x2b4bef=_0x27f179[_0x591c9a(0x151)][_0xf43c7d[_0x591c9a(0x14f)]];if(!_0x2b4bef)throw new Error(_0x591c9a(0x156)+_0xf43c7d[_0x591c9a(0x14f)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x55e2db=_0xf43c7d['str'](_0x591c9a(0x16c)),_0x3009c5=Object[_0x591c9a(0x166)](_0x2b4bef['functions']),_0x141846=resolveDeleteTarget(_0x55e2db,_0x3009c5),_0x1bb261=_0x2b4bef[_0x591c9a(0x163)][_0x141846];if(!_0x1bb261)throw CliErrors[_0x591c9a(0x168)](_0x591c9a(0x169)+_0x141846+'\x22.');await deleteBffScript(_0x1bb261[_0x591c9a(0x14a)]),delete _0x2b4bef[_0x591c9a(0x163)][_0x141846],_0x2b4bef['lastSync']=new Date()[_0x591c9a(0x145)](),await writeBffLockFile(_0xaa0da5[_0x591c9a(0x15b)],_0x27f179);const _0x56b7e5=resolveLocalFilePathFromLockKey(_0xaa0da5,_0x141846);let _0x5b022c;await fileExists(_0x56b7e5)&&(_0x5b022c=await moveToTrash(_0xaa0da5[_0x591c9a(0x15a)],_0xaa0da5[_0x591c9a(0x176)],_0x56b7e5),await cleanupEmptyDirectories(dirname(_0x56b7e5),_0xaa0da5[_0x591c9a(0x173)]));await waitForDeleteSettlement(_0xaa0da5[_0x591c9a(0x15b)],_0xf43c7d[_0x591c9a(0x14f)],_0x141846,_0x56b7e5),await sleep(0x96);const _0x4eef80={'deleted':_0x141846,'remoteId':_0x1bb261[_0x591c9a(0x14a)]};if(_0x5b022c)_0x4eef80[_0x591c9a(0x147)]=_0x5b022c;return{'ok':!![],'data':_0x4eef80,'message':'Deleted\x20'+_0x141846+(_0x5b022c?_0x591c9a(0x15f):'')};}};function resolveDeleteTarget(_0x525e31,_0x4a3e85){const _0x234f5e=a32_0x32af4f;if(_0x525e31['includes']('/')){const _0x1568a7=_0x4a3e85[_0x234f5e(0x162)](_0x549d7e=>_0x549d7e===_0x525e31);if(!_0x1568a7)throw CliErrors['validation'](_0x234f5e(0x16e)+_0x525e31);return _0x1568a7;}const _0x34ea38=_0x4a3e85[_0x234f5e(0x16f)](_0x4ac6a2=>_0x4ac6a2[_0x234f5e(0x16d)]('/')['at'](-0x1)===_0x525e31);if(_0x34ea38[_0x234f5e(0x152)]===0x0)throw CliErrors[_0x234f5e(0x168)]('Function\x20not\x20found:\x20'+_0x525e31);if(_0x34ea38['length']>0x1)throw CliErrors[_0x234f5e(0x168)](_0x234f5e(0x155)+_0x525e31+_0x234f5e(0x158)+_0x34ea38[_0x234f5e(0x160)](_0x44dfd6=>_0x234f5e(0x167)+_0x44dfd6)[_0x234f5e(0x148)]('\x0a'));return _0x34ea38[0x0];}async function moveToTrash(_0x3a44a7,_0x12ca74,_0x2946cf){const _0xb26f76=a32_0x32af4f,_0x10d4ee=new Date()[_0xb26f76(0x145)]()[_0xb26f76(0x149)](/[:.]/g,'-'),_0x31825d=relative(_0x3a44a7,_0x2946cf),_0x30f124=join(_0x12ca74,_0x10d4ee,_0x31825d);return await mkdir(dirname(_0x30f124),{'recursive':!![]}),await rename(_0x2946cf,_0x30f124),_0x30f124;}async function cleanupEmptyDirectories(_0x1db6f7,_0x55f3a5){const _0x1a9369=a32_0x32af4f;let _0x425b01=resolve(_0x1db6f7);const _0x47c846=resolve(_0x55f3a5);while(_0x425b01[_0x1a9369(0x16a)](''+_0x47c846+sep)||_0x425b01===_0x47c846){if(_0x425b01===_0x47c846)return;try{const _0x429b93=await readdir(_0x425b01);if(_0x429b93[_0x1a9369(0x152)]>0x0)return;await rmdir(_0x425b01);}catch{return;}_0x425b01=dirname(_0x425b01);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x3dd83b,_0x1b40a7,_0x2173ec,_0x1d7fd0){const _0x8a11e8=a32_0x32af4f;for(let _0x513ef0=0x0;_0x513ef0<DELETE_SETTLE_RETRY_COUNT;_0x513ef0+=0x1){const _0x49ed84=await readBffLockFile(_0x3dd83b),_0x528978=!!_0x49ed84?.[_0x8a11e8(0x151)]?.[_0x1b40a7]?.[_0x8a11e8(0x163)]?.[_0x2173ec],_0x5ab59c=await fileExists(_0x1d7fd0);if(!_0x528978&&!_0x5ab59c)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error('Local\x20delete\x20not\x20settled\x20for\x20'+_0x2173ec+'.');}