@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.6

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 (344) hide show
  1. package/README.md +75 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.d.ts +0 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/auth/auth-server-ui.js +1 -1
  8. package/lib/auth/auth-server.js +1 -1
  9. package/lib/auth/constant.js +1 -1
  10. package/lib/auth/get-cookie.js +1 -1
  11. package/lib/auth/get-session-user.js +1 -1
  12. package/lib/auth/is-session-valid.js +1 -1
  13. package/lib/auth/login-success-html.js +1 -1
  14. package/lib/auth/logout.js +1 -1
  15. package/lib/cli-flags.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/commands/api/generate.js +1 -1
  18. package/lib/commands/api/index.js +1 -1
  19. package/lib/commands/api/list.js +1 -1
  20. package/lib/commands/api/pull.js +1 -1
  21. package/lib/commands/api/shared.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/members-list.js +1 -1
  25. package/lib/commands/app/remote-directory.js +1 -1
  26. package/lib/commands/app/shared.js +1 -1
  27. package/lib/commands/app-config/delete.js +1 -1
  28. package/lib/commands/app-config/get.js +1 -1
  29. package/lib/commands/app-config/index.js +1 -1
  30. package/lib/commands/app-config/list.js +1 -1
  31. package/lib/commands/app-config/set.js +1 -1
  32. package/lib/commands/app-config/shared.js +1 -1
  33. package/lib/commands/auth/index.js +1 -1
  34. package/lib/commands/bff/create.js +1 -1
  35. package/lib/commands/bff/delete.js +1 -1
  36. package/lib/commands/bff/detail.js +1 -1
  37. package/lib/commands/bff/index.js +1 -1
  38. package/lib/commands/bff/list.js +1 -1
  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.d.ts +2 -0
  52. package/lib/commands/common/flags.js +1 -1
  53. package/lib/commands/common/local-file.js +1 -1
  54. package/lib/commands/common/validate.js +1 -1
  55. package/lib/commands/config/delete.js +1 -1
  56. package/lib/commands/config/get.js +1 -1
  57. package/lib/commands/config/index.js +1 -1
  58. package/lib/commands/config/init.d.ts +2 -0
  59. package/lib/commands/config/init.js +1 -1
  60. package/lib/commands/config/list.js +1 -1
  61. package/lib/commands/config/set.js +1 -1
  62. package/lib/commands/config/shared.js +1 -1
  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/auto-sync.js +1 -1
  103. package/lib/commands/deployment/index.js +1 -1
  104. package/lib/commands/deployment/sync.js +1 -1
  105. package/lib/commands/doctor.js +1 -1
  106. package/lib/commands/file/index.js +1 -1
  107. package/lib/commands/issue/index.js +1 -1
  108. package/lib/commands/issue/nudge.js +1 -1
  109. package/lib/commands/issue/report.js +1 -1
  110. package/lib/commands/issue/shared.js +1 -1
  111. package/lib/commands/kb/create.js +1 -1
  112. package/lib/commands/kb/delete.js +1 -1
  113. package/lib/commands/kb/detail.js +1 -1
  114. package/lib/commands/kb/index.js +1 -1
  115. package/lib/commands/kb/list.js +1 -1
  116. package/lib/commands/kb/search.js +1 -1
  117. package/lib/commands/kb/shared.js +1 -1
  118. package/lib/commands/kb/update.js +1 -1
  119. package/lib/commands/logs/index.js +1 -1
  120. package/lib/commands/menu/asset-update.js +1 -1
  121. package/lib/commands/menu/delete.js +1 -1
  122. package/lib/commands/menu/external-link-create.js +1 -1
  123. package/lib/commands/menu/external-link-update.js +1 -1
  124. package/lib/commands/menu/group-create.js +1 -1
  125. package/lib/commands/menu/group-update.js +1 -1
  126. package/lib/commands/menu/index.js +1 -1
  127. package/lib/commands/menu/list.js +1 -1
  128. package/lib/commands/menu/move.js +1 -1
  129. package/lib/commands/menu/regroup-start.js +1 -1
  130. package/lib/commands/menu/rename.js +1 -1
  131. package/lib/commands/menu/shared/compare-table.js +1 -1
  132. package/lib/commands/menu/shared/delete-plan.js +1 -1
  133. package/lib/commands/menu/shared/facts.js +1 -1
  134. package/lib/commands/menu/shared/index.js +1 -1
  135. package/lib/commands/menu/shared/inquirer.js +1 -1
  136. package/lib/commands/menu/shared/local-pages.js +1 -1
  137. package/lib/commands/menu/shared/logic.js +1 -1
  138. package/lib/commands/menu/shared/mutations.js +1 -1
  139. package/lib/commands/menu/shared/service.js +1 -1
  140. package/lib/commands/menu/shared/sync-core.js +1 -1
  141. package/lib/commands/menu/shared/update-core.js +1 -1
  142. package/lib/commands/menu/shared/valid-url.js +1 -1
  143. package/lib/commands/menu/sync.js +1 -1
  144. package/lib/commands/menu/visibility-update.js +1 -1
  145. package/lib/commands/notification/config-create.js +1 -1
  146. package/lib/commands/notification/config-delete.js +1 -1
  147. package/lib/commands/notification/config-list.js +1 -1
  148. package/lib/commands/notification/config-update.js +1 -1
  149. package/lib/commands/notification/index.js +1 -1
  150. package/lib/commands/notification/shared.js +1 -1
  151. package/lib/commands/ocr/index.js +1 -1
  152. package/lib/commands/page/create.js +1 -1
  153. package/lib/commands/page/custom/detail.js +1 -1
  154. package/lib/commands/page/custom/list.js +1 -1
  155. package/lib/commands/page/custom/publish.js +1 -1
  156. package/lib/commands/page/custom/shared.js +1 -1
  157. package/lib/commands/page/custom/syntax.js +1 -1
  158. package/lib/commands/page/custom/template.js +1 -1
  159. package/lib/commands/page/custom/update.js +1 -1
  160. package/lib/commands/page/data-list-status.js +1 -1
  161. package/lib/commands/page/generate-start.js +1 -1
  162. package/lib/commands/page/generate-status.js +1 -1
  163. package/lib/commands/page/index.js +1 -1
  164. package/lib/commands/page/pull.js +1 -1
  165. package/lib/commands/page/push.js +1 -1
  166. package/lib/commands/page/relation-audit.js +1 -1
  167. package/lib/commands/page/restore.js +1 -1
  168. package/lib/commands/page/shared.js +1 -1
  169. package/lib/commands/page/sync.js +1 -1
  170. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  171. package/lib/commands/project/create/format-elapsed.js +1 -1
  172. package/lib/commands/project/create/main.d.ts +1 -0
  173. package/lib/commands/project/create/main.js +1 -1
  174. package/lib/commands/project/create/materialize-project-template.js +1 -1
  175. package/lib/commands/project/create/project-name.js +1 -1
  176. package/lib/commands/project/create/project-template-archive.js +1 -1
  177. package/lib/commands/project/create/project-template-path.js +1 -1
  178. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  179. package/lib/commands/project/create/use-format-code.js +1 -1
  180. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  181. package/lib/commands/project/domain-routing-sync.d.ts +2 -0
  182. package/lib/commands/project/domain-routing-sync.js +1 -0
  183. package/lib/commands/project/index.js +1 -1
  184. package/lib/commands/project/upgrade.js +1 -1
  185. package/lib/commands/registry.js +1 -1
  186. package/lib/commands/role/delete.js +1 -1
  187. package/lib/commands/role/detail.js +1 -1
  188. package/lib/commands/role/index.js +1 -1
  189. package/lib/commands/role/list.js +1 -1
  190. package/lib/commands/role/shared.js +1 -1
  191. package/lib/commands/role/update.js +1 -1
  192. package/lib/commands/role/user-add.js +1 -1
  193. package/lib/commands/role/user-remove.js +1 -1
  194. package/lib/commands/role/user-resolve.js +1 -1
  195. package/lib/commands/rule/get.d.ts +2 -0
  196. package/lib/commands/rule/get.js +1 -0
  197. package/lib/commands/rule/index.d.ts +2 -0
  198. package/lib/commands/rule/index.js +1 -0
  199. package/lib/commands/rule/list.d.ts +2 -0
  200. package/lib/commands/rule/list.js +1 -0
  201. package/lib/commands/rule/set.d.ts +2 -0
  202. package/lib/commands/rule/set.js +1 -0
  203. package/lib/commands/rule/shared.d.ts +43 -0
  204. package/lib/commands/rule/shared.js +1 -0
  205. package/lib/commands/run/index.js +1 -1
  206. package/lib/commands/schema.js +1 -1
  207. package/lib/commands/sql/create.js +1 -1
  208. package/lib/commands/sql/delete.js +1 -1
  209. package/lib/commands/sql/detail.js +1 -1
  210. package/lib/commands/sql/exec.js +1 -1
  211. package/lib/commands/sql/index.js +1 -1
  212. package/lib/commands/sql/list.js +1 -1
  213. package/lib/commands/sql/pull.js +1 -1
  214. package/lib/commands/sql/push.js +1 -1
  215. package/lib/commands/sql/shared.js +1 -1
  216. package/lib/commands/sql/status.js +1 -1
  217. package/lib/commands/sql/validate.js +1 -1
  218. package/lib/commands/task/index.js +1 -1
  219. package/lib/commands/task/status.js +1 -1
  220. package/lib/commands/tenant/index.js +1 -1
  221. package/lib/commands/tenant/members-list.js +1 -1
  222. package/lib/commands/tenant/shared.js +1 -1
  223. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  224. package/lib/commands/user-account/index.js +1 -1
  225. package/lib/commands/workspace/add.js +1 -1
  226. package/lib/commands/workspace/index.js +1 -1
  227. package/lib/commands/workspace/remove.js +1 -1
  228. package/lib/config/deployment-sync.js +1 -1
  229. package/lib/config/domain-config.d.ts +37 -1
  230. package/lib/config/domain-config.js +1 -1
  231. package/lib/config/project-domain-routing.d.ts +27 -0
  232. package/lib/config/project-domain-routing.js +1 -0
  233. package/lib/config/schema.d.ts +1 -1
  234. package/lib/config/schema.js +1 -1
  235. package/lib/constant/cdn.js +1 -1
  236. package/lib/constant/cli.js +1 -1
  237. package/lib/constant/defaults.js +1 -1
  238. package/lib/constant/domain.d.ts +10 -4
  239. package/lib/constant/domain.js +1 -1
  240. package/lib/constant/env.js +1 -1
  241. package/lib/constant/output.js +1 -1
  242. package/lib/constant/paths.js +1 -1
  243. package/lib/constant/region.d.ts +4 -1
  244. package/lib/constant/region.js +1 -1
  245. package/lib/constant/risk.js +1 -1
  246. package/lib/constant/routing-profile.d.ts +43 -49
  247. package/lib/constant/routing-profile.js +1 -1
  248. package/lib/context/app-resolver.js +1 -1
  249. package/lib/context/auth-resolver.js +1 -1
  250. package/lib/context/config-loader.js +1 -1
  251. package/lib/context.d.ts +2 -0
  252. package/lib/context.js +1 -1
  253. package/lib/core/alias-resolver.js +1 -1
  254. package/lib/core/api-client.d.ts +21 -0
  255. package/lib/core/api-client.js +1 -1
  256. package/lib/core/bff/config.js +1 -1
  257. package/lib/core/bff/file-system.js +1 -1
  258. package/lib/core/bff/hash.js +1 -1
  259. package/lib/core/bff/lock.js +1 -1
  260. package/lib/core/bff/utils.js +1 -1
  261. package/lib/core/db-resolver.js +1 -1
  262. package/lib/core/kb-search-client.js +1 -1
  263. package/lib/core/page/file-system.js +1 -1
  264. package/lib/core/page/hash.js +1 -1
  265. package/lib/core/page/lock.js +1 -1
  266. package/lib/core/sql-index-auditor.js +1 -1
  267. package/lib/core/sql-sync/config.js +1 -1
  268. package/lib/core/sql-sync/file-system.js +1 -1
  269. package/lib/core/sql-sync/hash.js +1 -1
  270. package/lib/core/sql-sync/lock.js +1 -1
  271. package/lib/core/sql-sync/utils.js +1 -1
  272. package/lib/core/sql-validator.js +1 -1
  273. package/lib/errors.js +1 -1
  274. package/lib/framework/build-all-flags.js +1 -1
  275. package/lib/framework/error-output.js +1 -1
  276. package/lib/framework/explicit-yes.js +1 -1
  277. package/lib/framework/flags.js +1 -1
  278. package/lib/framework/help.js +1 -1
  279. package/lib/framework/index.js +1 -1
  280. package/lib/framework/output.js +1 -1
  281. package/lib/framework/response.js +1 -1
  282. package/lib/framework/runner-alias.js +1 -1
  283. package/lib/framework/runner.js +1 -1
  284. package/lib/framework/schema-export.js +1 -1
  285. package/lib/framework/types.js +1 -1
  286. package/lib/generated/build-info.d.ts +4 -4
  287. package/lib/generated/build-info.js +1 -1
  288. package/lib/generated/official-routing.d.ts +83 -0
  289. package/lib/generated/official-routing.js +1 -0
  290. package/lib/generated/routing-contract.d.ts +9 -0
  291. package/lib/generated/routing-contract.js +1 -0
  292. package/lib/help.js +1 -1
  293. package/lib/postinstall.js +1 -1
  294. package/lib/runtime/confirmation.js +1 -1
  295. package/lib/runtime/event.js +1 -1
  296. package/lib/runtime/index.js +1 -1
  297. package/lib/runtime/queue.js +1 -1
  298. package/lib/runtime/resolve.js +1 -1
  299. package/lib/skills/builtin-skill.js +1 -1
  300. package/lib/skills/main.js +1 -1
  301. package/lib/skills/npx-skills-add.js +1 -1
  302. package/lib/skills/skill-presence.js +1 -1
  303. package/lib/telemetry/cli-command-trace.js +1 -1
  304. package/lib/telemetry/cli-help-trace.js +1 -1
  305. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  306. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  307. package/lib/telemetry/send-cli-trace-log.js +1 -1
  308. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  309. package/lib/types/index.d.ts +0 -1
  310. package/lib/utils/ai_config.js +1 -1
  311. package/lib/utils/apply-jq-filter.js +1 -1
  312. package/lib/utils/cdn-config.js +1 -1
  313. package/lib/utils/check-sdk-version.js +1 -1
  314. package/lib/utils/cli-version-check.js +1 -1
  315. package/lib/utils/cli-version-policy.js +1 -1
  316. package/lib/utils/config.js +1 -1
  317. package/lib/utils/entity-with-id.js +1 -1
  318. package/lib/utils/file-utils.js +1 -1
  319. package/lib/utils/guides-cdn.js +1 -1
  320. package/lib/utils/http-client.js +1 -1
  321. package/lib/utils/is-non-interactive.js +1 -1
  322. package/lib/utils/logger.js +1 -1
  323. package/lib/utils/params.js +1 -1
  324. package/lib/utils/platform.js +1 -1
  325. package/lib/utils/sleep.js +1 -1
  326. package/lib/utils/template-replacer.js +1 -1
  327. package/lib/utils/update-notice.js +1 -1
  328. package/lib/utils/version.js +1 -1
  329. package/lib/utils/with-active-cookie.js +1 -1
  330. package/lib/utils/write-cli-side-channel.js +1 -1
  331. package/package.json +2 -1
  332. package/skills/rabetbase/SKILL.md +15 -12
  333. package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
  334. package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
  335. package/skills/rabetbase/references/rabetbase-config.md +3 -3
  336. package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
  337. package/skills/rabetbase/references/rabetbase-doctor.md +1 -0
  338. package/skills/rabetbase/references/rabetbase-init.md +32 -8
  339. package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
  340. package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
  341. package/skills/rabetbase/references/rabetbase-rule.md +64 -0
  342. package/skills/rabetbase.manifest.json +6 -3
  343. package/lib/config/project-routing.d.ts +0 -30
  344. package/lib/config/project-routing.js +0 -1
@@ -1 +1 @@
1
- const a17_0x2059de=a17_0x60af;(function(_0x303021,_0x30d57e){const _0x1b2482=a17_0x60af,_0x4c7a41=_0x303021();while(!![]){try{const _0x61cd43=-parseInt(_0x1b2482(0x1a7))/0x1*(parseInt(_0x1b2482(0x19c))/0x2)+-parseInt(_0x1b2482(0x1ad))/0x3*(-parseInt(_0x1b2482(0x1b9))/0x4)+-parseInt(_0x1b2482(0x1a6))/0x5*(parseInt(_0x1b2482(0x1ac))/0x6)+-parseInt(_0x1b2482(0x1b5))/0x7+parseInt(_0x1b2482(0x1c9))/0x8*(-parseInt(_0x1b2482(0x1a4))/0x9)+-parseInt(_0x1b2482(0x1c2))/0xa+parseInt(_0x1b2482(0x1be))/0xb;if(_0x61cd43===_0x30d57e)break;else _0x4c7a41['push'](_0x4c7a41['shift']());}catch(_0x38fc9e){_0x4c7a41['push'](_0x4c7a41['shift']());}}}(a17_0x2cd8,0x90da0));import a17_0x15f643 from'ora';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../core/api-client.js';import{generateApiFile}from'../../api/generate-api-file.js';function a17_0x60af(_0x179c58,_0x563913){_0x179c58=_0x179c58-0x198;const _0x2cd839=a17_0x2cd8();let _0x60af7b=_0x2cd839[_0x179c58];return _0x60af7b;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a17_0x2cd8(){const _0x22c784=['\x20dataset(s),\x20refreshed\x20sdk-config.ts.\x20','isDefaultConfig',')...','slice','apiDir','start','appCode','\x20dataset(s),\x20wrote\x20scaffold\x20with\x20','api','2VwAzDT','Merge\x20data.models\x20into\x20existing\x20TypeScript\x20(see\x20skills/rabetbase/guides/sdk-client-generation.md).\x20Do\x20not\x20treat\x20a\x20partial\x20scaffold\x20as\x20complete.','...','global','boolean','join','files','needsAgentMerge','557343shKnIs','Failed:\x20','9215NAZUMv','649645KIVbDE','message','name','\x20\x20•\x20','isDefault','2424wFzUAK','2364wNfHaB','push','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','clientFilePath','Pulling\x20','sdkConfigPath','apiFilePath','\x20failed','4688243haNIqQ','Output\x20directory\x20(default:\x20','includes','production','1828YCGStn','output','Pulled\x20','Done:\x20','fail','43299311GEjeeh','\x20app(s)\x20failed','Pulling\x20API\x20config\x20for\x20','sdkRouting','4625260XYFOYc','read','succeed','appcode','\x20model(s)','modelCount','env','152ehsOJh','rawFlags','pull'];a17_0x2cd8=function(){return _0x22c784;};return a17_0x2cd8();}import{getSdkClientRoutingConfig}from'../../constant/domain.js';import{findProjectRootDirectory}from'../../context/config-loader.js';import{writeProjectRoutingManifest}from'../../config/project-routing.js';const EXISTING_TS_HINT=a17_0x2059de(0x19d);function toPullData(_0x33c55d){const _0x5a2375=a17_0x2059de;return{'appCode':_0x33c55d[_0x5a2375(0x199)],'configName':_0x33c55d['configName'],'isDefaultConfig':_0x33c55d[_0x5a2375(0x1cd)],'models':_0x33c55d['models'],'sdkRouting':_0x33c55d[_0x5a2375(0x1c1)],'files':_0x33c55d[_0x5a2375(0x1a2)],'needsAgentMerge':_0x33c55d[_0x5a2375(0x1a3)],'apiFilePath':_0x33c55d[_0x5a2375(0x1b3)],'clientFilePath':_0x33c55d[_0x5a2375(0x1b0)],'sdkConfigPath':_0x33c55d[_0x5a2375(0x1b2)],'datasetCount':_0x33c55d['modelCount'],'modelCount':_0x33c55d[_0x5a2375(0x1c7)]};}function describePull(_0x465b6a){const _0x59b2e1=a17_0x2059de;if(_0x465b6a[_0x59b2e1(0x1a3)])return _0x59b2e1(0x1bb)+_0x465b6a[_0x59b2e1(0x1c7)]+_0x59b2e1(0x1cc)+EXISTING_TS_HINT;return _0x59b2e1(0x1bb)+_0x465b6a[_0x59b2e1(0x1c7)]+_0x59b2e1(0x19a)+_0x465b6a[_0x59b2e1(0x1c7)]+_0x59b2e1(0x1c6);}export const apiPull={'service':a17_0x2059de(0x19b),'command':a17_0x2059de(0x1cb),'description':'Pull\x20dataset\x20facts,\x20refresh\x20sdk-config.ts,\x20and\x20write\x20API\x20scaffold\x20if\x20missing\x20('+DEFAULT_API_DIR+'/)','risk':a17_0x2059de(0x1c3),'requiresAppCode':!![],'hasFormat':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a17_0x2059de(0x1ba),'type':'string','description':a17_0x2059de(0x1b6)+DEFAULT_API_DIR+'/)'},{'name':a17_0x2059de(0x19f),'type':a17_0x2059de(0x1a0),'description':a17_0x2059de(0x1af),'default':![]}],async 'execute'(_0x9fc0b2){const _0x17a574=a17_0x2059de,_0x41e760=writeProjectRoutingManifest(findProjectRootDirectory()),_0x28d60b=_0x9fc0b2[_0x17a574(0x1ca)][_0x17a574(0x1c5)]?String(_0x9fc0b2[_0x17a574(0x1ca)][_0x17a574(0x1c5)]):undefined,_0x4f4e52=_0x9fc0b2['str'](_0x17a574(0x1ba))||undefined,_0x5f5b06=resolveTargetApps(_0x9fc0b2,_0x28d60b);if(_0x5f5b06){let _0x333ac1=0x0,_0x54b412=0x0;const _0x372d34=[];for(const _0x6bd63 of _0x5f5b06){const _0x21496c=_0x6bd63['cookie']||_0x9fc0b2['cookie'],_0x22c53a=_0x6bd63[_0x17a574(0x1c8)]||_0x17a574(0x1b8);initEnv(_0x22c53a);const _0x566987=_0x6bd63[_0x17a574(0x1d0)]||_0x4f4e52||_0x9fc0b2[_0x17a574(0x1d0)]||DEFAULT_API_DIR,_0x32d85a=_0x6bd63[_0x17a574(0x1ab)]?'':_0x6bd63['name']||_0x6bd63['appcode'],_0x5aca48=a17_0x15f643(_0x17a574(0x1b1)+_0x6bd63[_0x17a574(0x1a9)]+'\x20('+_0x6bd63[_0x17a574(0x1c5)]+_0x17a574(0x1ce))['start']();try{const {configArray:_0x44e37c}=await fetchModelList(_0x6bd63[_0x17a574(0x1c5)],_0x21496c),_0x3f6ea7=await generateApiFile(_0x44e37c,_0x32d85a,_0x6bd63['appcode'],_0x6bd63['isDefault'],_0x22c53a,_0x566987,_0x6bd63[_0x17a574(0x1a9)],getSdkClientRoutingConfig());_0x5aca48['succeed'](_0x6bd63[_0x17a574(0x1a9)]+':\x20'+describePull(_0x3f6ea7)),writeCliSideChannelLine(_0x17a574(0x1aa)+_0x3f6ea7[_0x17a574(0x1b2)]),writeCliSideChannelLine(_0x17a574(0x1aa)+_0x3f6ea7[_0x17a574(0x1b3)]),writeCliSideChannelLine(_0x17a574(0x1aa)+_0x3f6ea7[_0x17a574(0x1b0)]),_0x372d34[_0x17a574(0x1ae)](toPullData(_0x3f6ea7)),_0x333ac1++;}catch(_0x2f7fdb){_0x5aca48['fail'](_0x6bd63[_0x17a574(0x1a9)]+':\x20'+(_0x2f7fdb instanceof Error?_0x2f7fdb['message']:String(_0x2f7fdb))),_0x54b412++;}}writeCliSideChannelLine('');if(_0x54b412>0x0)writeCliSideChannelLine('!\x20'+_0x54b412+_0x17a574(0x1bf));return{'ok':_0x54b412===0x0,'message':_0x17a574(0x1bc)+_0x333ac1+'\x20succeeded,\x20'+_0x54b412+_0x17a574(0x1b4),'data':{'apps':_0x372d34,'succeeded':_0x333ac1,'failed':_0x54b412,'projectRouting':_0x41e760}};}const _0x2c3bd7=_0x28d60b&&_0x28d60b[_0x17a574(0x1b7)]('-')?_0x28d60b['split']('-')[_0x17a574(0x1cf)](0x1)[_0x17a574(0x1a1)]('-'):'',_0x56b2f0=_0x4f4e52||_0x9fc0b2['apiDir']||DEFAULT_API_DIR,_0x3b1c3f=!_0x28d60b,_0x5f2502=a17_0x15f643(_0x17a574(0x1c0)+_0x9fc0b2[_0x17a574(0x199)]+_0x17a574(0x19e))[_0x17a574(0x198)]();try{const {configArray:_0x1d2a27}=await fetchModelList(_0x9fc0b2[_0x17a574(0x199)],_0x9fc0b2['cookie']),_0x3618f4=await generateApiFile(_0x1d2a27,_0x2c3bd7,_0x9fc0b2[_0x17a574(0x199)],_0x3b1c3f,getEnv(),_0x56b2f0,undefined,getSdkClientRoutingConfig());return _0x5f2502[_0x17a574(0x1c4)](describePull(_0x3618f4)),writeCliSideChannelLine(_0x17a574(0x1aa)+_0x3618f4[_0x17a574(0x1b2)]),writeCliSideChannelLine(_0x17a574(0x1aa)+_0x3618f4[_0x17a574(0x1b3)]),writeCliSideChannelLine(_0x17a574(0x1aa)+_0x3618f4[_0x17a574(0x1b0)]),{'ok':!![],'message':describePull(_0x3618f4),'data':{...toPullData(_0x3618f4),'projectRouting':_0x41e760}};}catch(_0x3f16db){_0x5f2502[_0x17a574(0x1bd)](_0x17a574(0x1a5)+(_0x3f16db instanceof Error?_0x3f16db[_0x17a574(0x1a8)]:String(_0x3f16db)));throw _0x3f16db;}}};
1
+ const a17_0x5ddfd2=a17_0x751c;(function(_0x38e646,_0x42aae1){const _0x564b48=a17_0x751c,_0x92f587=_0x38e646();while(!![]){try{const _0x562499=-parseInt(_0x564b48(0x1fb))/0x1+parseInt(_0x564b48(0x1d5))/0x2*(-parseInt(_0x564b48(0x1c1))/0x3)+-parseInt(_0x564b48(0x1e3))/0x4+-parseInt(_0x564b48(0x1f1))/0x5+-parseInt(_0x564b48(0x1be))/0x6+-parseInt(_0x564b48(0x1cc))/0x7*(parseInt(_0x564b48(0x1c0))/0x8)+parseInt(_0x564b48(0x1f4))/0x9;if(_0x562499===_0x42aae1)break;else _0x92f587['push'](_0x92f587['shift']());}catch(_0x5cd921){_0x92f587['push'](_0x92f587['shift']());}}}(a17_0x4da2,0x5ac1b));import a17_0x41e8ce from'ora';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../core/api-client.js';import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{resolveTargetApps}from'../../commands/api/shared.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{getSdkClientRoutingConfig}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';const EXISTING_TS_HINT=a17_0x5ddfd2(0x1f3);function a17_0x4da2(){const _0x47b6dd=['fail','sdkConfigPath','\x20dataset\x20fact(s)\x20and\x20replaced\x20the\x20TypeScript\x20scaffold\x20with\x20','rawFlags','2pZDoOb','read','modelCount','production','env','Done:\x20','needsAgentMerge','message','apiFilePath','\x20app(s)\x20failed','sdkRouting','yes','Review\x20local\x20customizations,\x20then\x20rerun\x20with\x20--force\x20--yes.','string','457664JiXAar','--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20existing\x20api.ts\x20and\x20client.ts.','\x20model(s)','\x20dataset\x20fact(s)\x20and\x20wrote\x20a\x20scaffold\x20with\x20','files','appcode','\x20failed','apiDir','cookie','Pull\x20dataset\x20facts,\x20refresh\x20sdk-config.ts,\x20and\x20write\x20API\x20scaffold\x20if\x20missing\x20(','overwritten','start','...',')...','94180ZxIsOC','name','Existing\x20TypeScript\x20was\x20not\x20updated.\x20Merge\x20data.models\x20into\x20it\x20(see\x20skills/rabetbase/guides/sdk-client-generation.md),\x20or\x20rerun\x20with\x20--force\x20--yes\x20to\x20replace\x20api.ts\x20and\x20client.ts.','21394116yByGBG','bool','action','force','Output\x20directory\x20(default:\x20','Replace\x20existing\x20api.ts\x20and\x20client.ts;\x20requires\x20--yes\x20and\x20discards\x20local\x20customizations','appCode','353638symBiO','Pulling\x20','succeed','push','Fetched\x20','Pulling\x20API\x20config\x20for\x20','3289008SlJrHx','validation','56XTELmW','2024718SYJsUV','Failed:\x20','clientFilePath','client','\x20\x20•\x20','pull','str','includes','\x20succeeded,\x20','models','boolean','295421WjhHgH','output','configName','api','join'];a17_0x4da2=function(){return _0x47b6dd;};return a17_0x4da2();}function toPullData(_0x425250){const _0x21ea36=a17_0x5ddfd2;return{'appCode':_0x425250[_0x21ea36(0x1fa)],'configName':_0x425250[_0x21ea36(0x1ce)],'isDefaultConfig':_0x425250['isDefaultConfig'],'models':_0x425250[_0x21ea36(0x1ca)],'sdkRouting':_0x425250[_0x21ea36(0x1df)],'files':_0x425250[_0x21ea36(0x1e7)],'needsAgentMerge':_0x425250['needsAgentMerge'],'apiFilePath':_0x425250['apiFilePath'],'clientFilePath':_0x425250[_0x21ea36(0x1c3)],'sdkConfigPath':_0x425250[_0x21ea36(0x1d2)],'datasetCount':_0x425250[_0x21ea36(0x1d7)],'modelCount':_0x425250[_0x21ea36(0x1d7)]};}function a17_0x751c(_0x2457f1,_0x1c8a09){_0x2457f1=_0x2457f1-0x1bc;const _0x4da215=a17_0x4da2();let _0x751c2c=_0x4da215[_0x2457f1];return _0x751c2c;}function describePull(_0x60599){const _0x117754=a17_0x5ddfd2;if(_0x60599[_0x117754(0x1db)])return _0x117754(0x1bc)+_0x60599[_0x117754(0x1d7)]+'\x20dataset\x20fact(s)\x20and\x20refreshed\x20sdk-config.ts.\x20'+EXISTING_TS_HINT;if(_0x60599[_0x117754(0x1e7)][_0x117754(0x1cf)][_0x117754(0x1f6)]===_0x117754(0x1ed)||_0x60599[_0x117754(0x1e7)][_0x117754(0x1c4)][_0x117754(0x1f6)]===_0x117754(0x1ed))return'Fetched\x20'+_0x60599[_0x117754(0x1d7)]+_0x117754(0x1d3)+_0x60599['modelCount']+_0x117754(0x1e5);return _0x117754(0x1bc)+_0x60599[_0x117754(0x1d7)]+_0x117754(0x1e6)+_0x60599[_0x117754(0x1d7)]+'\x20model(s)';}export const apiPull={'service':a17_0x5ddfd2(0x1cf),'command':a17_0x5ddfd2(0x1c6),'description':a17_0x5ddfd2(0x1ec)+DEFAULT_API_DIR+'/)','risk':a17_0x5ddfd2(0x1d6),'requiresAppCode':!![],'hasFormat':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a17_0x5ddfd2(0x1cd),'type':a17_0x5ddfd2(0x1e2),'description':a17_0x5ddfd2(0x1f8)+DEFAULT_API_DIR+'/)'},{'name':'global','type':a17_0x5ddfd2(0x1cb),'description':'Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','default':![]},{'name':'force','type':a17_0x5ddfd2(0x1cb),'description':a17_0x5ddfd2(0x1f9),'default':![]}],async 'validate'(_0x11123a){const _0xe4c12=a17_0x5ddfd2;if(_0x11123a[_0xe4c12(0x1f5)](_0xe4c12(0x1f7))&&!_0x11123a[_0xe4c12(0x1f5)](_0xe4c12(0x1e0)))throw CliErrors[_0xe4c12(0x1bf)](_0xe4c12(0x1e4),_0xe4c12(0x1e1));},async 'execute'(_0x294eb1){const _0xddaefd=a17_0x5ddfd2,_0x10b3e6=_0x294eb1[_0xddaefd(0x1d4)][_0xddaefd(0x1e8)]?String(_0x294eb1[_0xddaefd(0x1d4)]['appcode']):undefined,_0x2554d6=_0x294eb1[_0xddaefd(0x1c7)](_0xddaefd(0x1cd))||undefined,_0x1ee205=_0x294eb1[_0xddaefd(0x1f5)](_0xddaefd(0x1f7)),_0x465490=resolveTargetApps(_0x294eb1,_0x10b3e6);if(_0x465490){let _0x349ed9=0x0,_0x421cb7=0x0;const _0x243bb2=[];for(const _0x31e6da of _0x465490){const _0x2c606b=_0x31e6da[_0xddaefd(0x1eb)]||_0x294eb1[_0xddaefd(0x1eb)],_0x27682b=_0x31e6da[_0xddaefd(0x1d9)]||_0xddaefd(0x1d8);initEnv(_0x27682b);const _0x203b7f=_0x31e6da[_0xddaefd(0x1ea)]||_0x2554d6||_0x294eb1['apiDir']||DEFAULT_API_DIR,_0x3c1190=_0x31e6da['isDefault']?'':_0x31e6da[_0xddaefd(0x1f2)]||_0x31e6da['appcode'],_0x1bb9cb=a17_0x41e8ce(_0xddaefd(0x1fc)+_0x31e6da[_0xddaefd(0x1f2)]+'\x20('+_0x31e6da['appcode']+_0xddaefd(0x1f0))[_0xddaefd(0x1ee)]();try{const {configArray:_0x500cf9}=await fetchModelList(_0x31e6da[_0xddaefd(0x1e8)],_0x2c606b),_0x59b706=await generateApiFile(_0x500cf9,_0x3c1190,_0x31e6da[_0xddaefd(0x1e8)],_0x31e6da['isDefault'],_0x27682b,_0x203b7f,_0x31e6da[_0xddaefd(0x1f2)],getSdkClientRoutingConfig(),{'overwriteTypescript':_0x1ee205});_0x1bb9cb[_0xddaefd(0x1fd)](_0x31e6da[_0xddaefd(0x1f2)]+':\x20'+describePull(_0x59b706)),writeCliSideChannelLine(_0xddaefd(0x1c5)+_0x59b706[_0xddaefd(0x1d2)]),writeCliSideChannelLine(_0xddaefd(0x1c5)+_0x59b706['apiFilePath']),writeCliSideChannelLine(_0xddaefd(0x1c5)+_0x59b706[_0xddaefd(0x1c3)]),_0x243bb2[_0xddaefd(0x1fe)](toPullData(_0x59b706)),_0x349ed9++;}catch(_0x33a4ba){_0x1bb9cb[_0xddaefd(0x1d1)](_0x31e6da['name']+':\x20'+(_0x33a4ba instanceof Error?_0x33a4ba[_0xddaefd(0x1dc)]:String(_0x33a4ba))),_0x421cb7++;}}writeCliSideChannelLine('');if(_0x421cb7>0x0)writeCliSideChannelLine('!\x20'+_0x421cb7+_0xddaefd(0x1de));return{'ok':_0x421cb7===0x0,'message':_0xddaefd(0x1da)+_0x349ed9+_0xddaefd(0x1c9)+_0x421cb7+_0xddaefd(0x1e9),'data':{'apps':_0x243bb2,'succeeded':_0x349ed9,'failed':_0x421cb7}};}const _0x13c949=_0x10b3e6&&_0x10b3e6[_0xddaefd(0x1c8)]('-')?_0x10b3e6['split']('-')['slice'](0x1)[_0xddaefd(0x1d0)]('-'):'',_0x239188=_0x2554d6||_0x294eb1['apiDir']||DEFAULT_API_DIR,_0x5111ec=!_0x10b3e6,_0xb661c2=a17_0x41e8ce(_0xddaefd(0x1bd)+_0x294eb1['appCode']+_0xddaefd(0x1ef))['start']();try{const {configArray:_0x4ffbc0}=await fetchModelList(_0x294eb1['appCode'],_0x294eb1[_0xddaefd(0x1eb)]),_0x5715f8=await generateApiFile(_0x4ffbc0,_0x13c949,_0x294eb1[_0xddaefd(0x1fa)],_0x5111ec,getEnv(),_0x239188,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':_0x1ee205});return _0xb661c2[_0xddaefd(0x1fd)](describePull(_0x5715f8)),writeCliSideChannelLine('\x20\x20•\x20'+_0x5715f8[_0xddaefd(0x1d2)]),writeCliSideChannelLine('\x20\x20•\x20'+_0x5715f8[_0xddaefd(0x1dd)]),writeCliSideChannelLine(_0xddaefd(0x1c5)+_0x5715f8[_0xddaefd(0x1c3)]),{'ok':!![],'message':describePull(_0x5715f8),'data':toPullData(_0x5715f8)};}catch(_0x3563c5){_0xb661c2[_0xddaefd(0x1d1)](_0xddaefd(0x1c2)+(_0x3563c5 instanceof Error?_0x3563c5[_0xddaefd(0x1dc)]:String(_0x3563c5)));throw _0x3563c5;}}};
@@ -1 +1 @@
1
- (function(_0x5d8376,_0x17bd1e){const _0x1f7fda=a18_0x4698,_0x38ad3a=_0x5d8376();while(!![]){try{const _0x46912d=-parseInt(_0x1f7fda(0xd1))/0x1+parseInt(_0x1f7fda(0xd4))/0x2+-parseInt(_0x1f7fda(0xcc))/0x3*(-parseInt(_0x1f7fda(0xc9))/0x4)+-parseInt(_0x1f7fda(0xd6))/0x5*(parseInt(_0x1f7fda(0xcf))/0x6)+parseInt(_0x1f7fda(0xcd))/0x7+parseInt(_0x1f7fda(0xd7))/0x8+parseInt(_0x1f7fda(0xce))/0x9*(-parseInt(_0x1f7fda(0xca))/0xa);if(_0x46912d===_0x17bd1e)break;else _0x38ad3a['push'](_0x38ad3a['shift']());}catch(_0x21fe92){_0x38ad3a['push'](_0x38ad3a['shift']());}}}(a18_0x2f25,0x70d73));function a18_0x4698(_0x47cdd4,_0x40d3b6){_0x47cdd4=_0x47cdd4-0xc7;const _0x2f25b3=a18_0x2f25();let _0x4698da=_0x2f25b3[_0x47cdd4];return _0x4698da;}function a18_0x2f25(){const _0x3f1a0a=['14854887cONKdc','913326DYvZYv','join','332316ojTeVr','merged','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','1039272azbMdF','map','5xRtNrB','6571248nIpKoH','App\x20\x22','selectedAppName','length','name','bool','global','project','76YqbMsG','10kRxGhu','validation','70437JXqYUO','5670924lOMAjL'];a18_0x2f25=function(){return _0x3f1a0a;};return a18_0x2f25();}import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x178293,_0x48bc59){const _0x246e14=a18_0x4698;if(_0x48bc59)return null;const _0x2023f0=_0x178293[_0x246e14(0xdc)](_0x246e14(0xc7))?_0x246e14(0xd2):_0x246e14(0xc8);let _0x3165a0=getMultiAppConfigs(_0x2023f0);if(!_0x3165a0||_0x3165a0[_0x246e14(0xda)]===0x0)return null;if(_0x178293[_0x246e14(0xd9)]){const _0x52008b=_0x3165a0['filter'](_0x2ac354=>_0x2ac354[_0x246e14(0xdb)]===_0x178293[_0x246e14(0xd9)]);if(_0x52008b[_0x246e14(0xda)]===0x0){const _0xefcb92=_0x3165a0[_0x246e14(0xd5)](_0x101e71=>_0x101e71[_0x246e14(0xdb)])[_0x246e14(0xd0)](',\x20');throw CliErrors[_0x246e14(0xcb)](_0x246e14(0xd8)+_0x178293[_0x246e14(0xd9)]+_0x246e14(0xd3)+_0xefcb92);}_0x3165a0=_0x52008b;}return _0x3165a0;}
1
+ (function(_0x1bde40,_0x3e4a21){const _0x95129a=a18_0x2385,_0x78119a=_0x1bde40();while(!![]){try{const _0x118fa9=parseInt(_0x95129a(0x1e4))/0x1*(parseInt(_0x95129a(0x1e5))/0x2)+parseInt(_0x95129a(0x1eb))/0x3*(-parseInt(_0x95129a(0x1db))/0x4)+parseInt(_0x95129a(0x1d5))/0x5*(parseInt(_0x95129a(0x1ea))/0x6)+-parseInt(_0x95129a(0x1e2))/0x7*(-parseInt(_0x95129a(0x1dd))/0x8)+-parseInt(_0x95129a(0x1d7))/0x9*(-parseInt(_0x95129a(0x1da))/0xa)+parseInt(_0x95129a(0x1d6))/0xb*(parseInt(_0x95129a(0x1e3))/0xc)+parseInt(_0x95129a(0x1d9))/0xd*(-parseInt(_0x95129a(0x1d8))/0xe);if(_0x118fa9===_0x3e4a21)break;else _0x78119a['push'](_0x78119a['shift']());}catch(_0x5f31a){_0x78119a['push'](_0x78119a['shift']());}}}(a18_0x49ab,0x736ad));function a18_0x49ab(){const _0x147053=['451308wClUGN','1sZjLBP','1683688hAVQRc','length','App\x20\x22','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','global','162KvCGBz','7302CzzZbA','selectedAppName','name','filter','53375qLaZhU','77hGwRbG','534456yemuWb','1585738qJxuqi','143seJsgm','130qBjWEE','736njnVeD','project','336kwxItR','merged','join','map','bool','203AIdxhm'];a18_0x49ab=function(){return _0x147053;};return a18_0x49ab();}import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';function a18_0x2385(_0x2f64f2,_0x3d8ccd){_0x2f64f2=_0x2f64f2-0x1d4;const _0x49abb9=a18_0x49ab();let _0x238547=_0x49abb9[_0x2f64f2];return _0x238547;}export function resolveTargetApps(_0x4cdd47,_0x7e7c09){const _0x22b7ae=a18_0x2385;if(_0x7e7c09)return null;const _0x2c9dd7=_0x4cdd47[_0x22b7ae(0x1e1)](_0x22b7ae(0x1e9))?_0x22b7ae(0x1de):_0x22b7ae(0x1dc);let _0x5291b2=getMultiAppConfigs(_0x2c9dd7);if(!_0x5291b2||_0x5291b2[_0x22b7ae(0x1e6)]===0x0)return null;if(_0x4cdd47[_0x22b7ae(0x1ec)]){const _0x18218f=_0x5291b2[_0x22b7ae(0x1d4)](_0x5070d6=>_0x5070d6['name']===_0x4cdd47[_0x22b7ae(0x1ec)]);if(_0x18218f['length']===0x0){const _0x474491=_0x5291b2[_0x22b7ae(0x1e0)](_0xa47a7=>_0xa47a7[_0x22b7ae(0x1ed)])[_0x22b7ae(0x1df)](',\x20');throw CliErrors['validation'](_0x22b7ae(0x1e7)+_0x4cdd47['selectedAppName']+_0x22b7ae(0x1e8)+_0x474491);}_0x5291b2=_0x18218f;}return _0x5291b2;}
@@ -1 +1 @@
1
- (function(_0x328ffd,_0x15608f){const _0x56255f=a19_0x5dc3,_0x168ea2=_0x328ffd();while(!![]){try{const _0x4ce895=parseInt(_0x56255f(0xcc))/0x1*(-parseInt(_0x56255f(0xc8))/0x2)+parseInt(_0x56255f(0xcd))/0x3+parseInt(_0x56255f(0xca))/0x4+parseInt(_0x56255f(0xc9))/0x5+-parseInt(_0x56255f(0xcb))/0x6+-parseInt(_0x56255f(0xc7))/0x7*(-parseInt(_0x56255f(0xcf))/0x8)+parseInt(_0x56255f(0xce))/0x9;if(_0x4ce895===_0x15608f)break;else _0x168ea2['push'](_0x168ea2['shift']());}catch(_0x33f14d){_0x168ea2['push'](_0x168ea2['shift']());}}}(a19_0x16cf,0x2211d));function a19_0x5dc3(_0x2a3658,_0x4244ce){_0x2a3658=_0x2a3658-0xc7;const _0x16cf5b=a19_0x16cf();let _0x5dc361=_0x16cf5b[_0x2a3658];return _0x5dc361;}import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';function a19_0x16cf(){const _0x441fbb=['875819WtHOZv','326670tqNKxq','12980wrUuHc','391528ysJLex','1513638jMlARL','1lSkLvH','320631jfkxjk','878112SYOXmJ','16LWIpBA'];a19_0x16cf=function(){return _0x441fbb;};return a19_0x16cf();}export const appDefinitions=[appListDefinition,appMembersListDefinition];
1
+ function a19_0x489a(_0x1d66ea,_0xd69fb1){_0x1d66ea=_0x1d66ea-0x144;const _0x2c3d96=a19_0x2c3d();let _0x489a56=_0x2c3d96[_0x1d66ea];return _0x489a56;}function a19_0x2c3d(){const _0x1f12a2=['35ukIKkK','4599HvORir','141NCfnuT','159003teQXBa','52295rBVjui','9048jqrtTi','66ZUGfGw','72876FqVVVU','2310972XDumRV','2539840rrsVne','104YQtier','12898AYMauR'];a19_0x2c3d=function(){return _0x1f12a2;};return a19_0x2c3d();}(function(_0x581a99,_0x30b89d){const _0x563220=a19_0x489a,_0x32c4c0=_0x581a99();while(!![]){try{const _0x55f0be=parseInt(_0x563220(0x148))/0x1+parseInt(_0x563220(0x144))/0x2*(-parseInt(_0x563220(0x147))/0x3)+parseInt(_0x563220(0x14f))/0x4*(-parseInt(_0x563220(0x149))/0x5)+parseInt(_0x563220(0x14c))/0x6*(-parseInt(_0x563220(0x145))/0x7)+parseInt(_0x563220(0x14a))/0x8*(-parseInt(_0x563220(0x146))/0x9)+parseInt(_0x563220(0x14e))/0xa+-parseInt(_0x563220(0x14b))/0xb*(-parseInt(_0x563220(0x14d))/0xc);if(_0x55f0be===_0x30b89d)break;else _0x32c4c0['push'](_0x32c4c0['shift']());}catch(_0x3ce204){_0x32c4c0['push'](_0x32c4c0['shift']());}}}(a19_0x2c3d,0x569cd));import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';export const appDefinitions=[appListDefinition,appMembersListDefinition];
@@ -1 +1 @@
1
- function a20_0x1746(){const _0x2c2052=['\x20in\x20','name','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','appcode','keys','\x20config','1201005PzHeNT','2628140LZTxLP','push','entries','global','apps','14502fjfQUS','1059592QFBhZG','find','validation','671gxEpdj','bool','list','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','boolean','No\x20apps\x20configured','projectPath','merged','93240mLqaBb','.\x20Use\x20`','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','14rDSSTC','216276KLshrC','projectConfig','2eWvZoZ','length','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','globalPath','mergedCli','project','object','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','remote','905XQOKoH','306121jOPdhH','app','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','9TpGsve','globalConfig','defaultApp'];a20_0x1746=function(){return _0x2c2052;};return a20_0x1746();}const a20_0x4ed8be=a20_0x5afe;(function(_0x23d4b5,_0x1b0687){const _0x400c73=a20_0x5afe,_0x31c811=_0x23d4b5();while(!![]){try{const _0xa32eca=-parseInt(_0x400c73(0x8a))/0x1*(parseInt(_0x400c73(0x80))/0x2)+parseInt(_0x400c73(0x96))/0x3+parseInt(_0x400c73(0x7a))/0x4+parseInt(_0x400c73(0x89))/0x5*(-parseInt(_0x400c73(0x9c))/0x6)+parseInt(_0x400c73(0x7d))/0x7*(-parseInt(_0x400c73(0x9d))/0x8)+-parseInt(_0x400c73(0x8d))/0x9*(parseInt(_0x400c73(0x97))/0xa)+-parseInt(_0x400c73(0x72))/0xb*(-parseInt(_0x400c73(0x7e))/0xc);if(_0xa32eca===_0x1b0687)break;else _0x31c811['push'](_0x31c811['shift']());}catch(_0x35fcaa){_0x31c811['push'](_0x31c811['shift']());}}}(a20_0x1746,0x3d75a));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x35ea13,_0x103fe9){const _0x8c9a88=a20_0x5afe,_0x431727=[],_0x34bd87=_0x35ea13[_0x8c9a88(0x9b)]&&typeof _0x35ea13['apps']==='object'?_0x35ea13['apps']:{},_0x860a74=_0x35ea13[_0x8c9a88(0x8f)]||undefined,_0x2e7271=_0x860a74??(Object[_0x8c9a88(0x94)](_0x34bd87)[_0x8c9a88(0x81)]===0x1?Object[_0x8c9a88(0x94)](_0x34bd87)[0x0]:undefined);for(const [_0x50bddc,_0x30457a]of Object['entries'](_0x34bd87)){if(!_0x30457a||typeof _0x30457a!==_0x8c9a88(0x86)||!_0x30457a[_0x8c9a88(0x93)])continue;_0x431727[_0x8c9a88(0x98)]({'name':_0x50bddc,'appcode':_0x30457a[_0x8c9a88(0x93)],'named':!![],'definedIn':_0x103fe9,'isDefault':_0x50bddc===_0x2e7271,...buildAppProfileListFields(_0x30457a)});}return _0x431727;}function buildMergedItems(_0x15e0ad,_0x5c610c){const _0x57c859=a20_0x5afe,{apps:apps={}}=_0x15e0ad,_0x5aac5a=_0x15e0ad[_0x57c859(0x8f)],_0x26fb65=_0x5aac5a??(Object[_0x57c859(0x94)](apps)['length']===0x1?Object['keys'](apps)[0x0]:undefined),_0x5e4db4=_0x5c610c[_0x57c859(0x8e)][_0x57c859(0x9b)]&&typeof _0x5c610c[_0x57c859(0x8e)][_0x57c859(0x9b)]===_0x57c859(0x86)?_0x5c610c[_0x57c859(0x8e)][_0x57c859(0x9b)]:{},_0x279319=_0x5c610c['projectConfig']['apps']&&typeof _0x5c610c[_0x57c859(0x7f)][_0x57c859(0x9b)]===_0x57c859(0x86)?_0x5c610c[_0x57c859(0x7f)][_0x57c859(0x9b)]:{},_0x1a1884=Object[_0x57c859(0x99)](apps),_0x78de24=_0x1a1884['map'](([_0x12671f,_0x30dd2e])=>({'name':_0x12671f,'appcode':_0x30dd2e[_0x57c859(0x93)],'named':!![],'definedIn':appDefinedIn(_0x12671f,_0x5e4db4,_0x279319),'isDefault':_0x12671f===_0x26fb65,...buildAppProfileListFields(_0x30dd2e)}));return _0x78de24;}function validateAppListFlags(_0x574119){const _0xbf1f9c=a20_0x5afe;if(!_0x574119[_0xbf1f9c(0x73)]('remote'))return;if(!_0x574119[_0xbf1f9c(0x73)](_0xbf1f9c(0x9a))&&!_0x574119[_0xbf1f9c(0x73)](_0xbf1f9c(0x85)))return;throw CliErrors[_0xbf1f9c(0x71)](_0xbf1f9c(0x7c),_0xbf1f9c(0x82));}function a20_0x5afe(_0x5affe6,_0x2ac866){_0x5affe6=_0x5affe6-0x70;const _0x17464e=a20_0x1746();let _0x5afe23=_0x17464e[_0x5affe6];return _0x5afe23;}async function execute(_0x9db262){const _0x554776=a20_0x5afe;validateAppListFlags(_0x9db262);if(_0x9db262[_0x554776(0x73)](_0x554776(0x88)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x9db262)};const _0x5b36f6=_0x9db262[_0x554776(0x73)]('global'),_0x4e6de2=_0x9db262[_0x554776(0x73)](_0x554776(0x85)),_0x43b1b8=_0x5b36f6?'global':_0x4e6de2?_0x554776(0x85):_0x554776(0x79),{config:_0x198316,layers:_0xe94d72}=readRawConfigWithLayers(),_0x33c0b5=resolveDefaultAppSource(_0xe94d72),{defaultApp:_0x317d4b}=_0x198316;let _0x10aa46,_0x4d2d61;switch(_0x43b1b8){case'global':_0x10aa46=buildItemsFromLayer(_0xe94d72['globalConfig'],_0x554776(0x9a)),_0x4d2d61=_0xe94d72[_0x554776(0x83)];break;case _0x554776(0x85):_0x10aa46=buildItemsFromLayer(_0xe94d72[_0x554776(0x7f)],_0x554776(0x85)),_0x4d2d61=_0xe94d72[_0x554776(0x78)];break;default:_0x10aa46=buildMergedItems(_0x198316,_0xe94d72);break;}enrichAppListItemsWithMergedSelection(_0x10aa46,_0x9db262[_0x554776(0x84)]);if(_0x10aa46[_0x554776(0x81)]===0x0){const _0x90cdc6=_0x43b1b8===_0x554776(0x79)?'':_0x554776(0x90)+_0x43b1b8+_0x554776(0x95);return{'ok':!![],'data':[],'message':_0x554776(0x77)+_0x90cdc6+_0x554776(0x7b)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x5efe48=_0x10aa46[_0x554776(0x70)](_0xc21a5f=>_0xc21a5f['isCurrent']===!![]),_0x53d5e9=_0x317d4b??_0x5efe48?.[_0x554776(0x91)]??null,_0x41f145=_0x43b1b8==='merged'?{'globalPath':_0xe94d72[_0x554776(0x83)]??null,'projectPath':_0xe94d72[_0x554776(0x78)]??null,'defaultApp':_0x53d5e9,'defaultAppSource':_0x317d4b!=null?_0x33c0b5:null}:{'scope':_0x43b1b8,'configPath':_0x4d2d61??null};return{'ok':!![],'data':{'items':_0x10aa46,'meta':_0x41f145}};}export const appListDefinition={'service':a20_0x4ed8be(0x8b),'command':a20_0x4ed8be(0x74),'description':a20_0x4ed8be(0x92),'risk':'read','auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x4ed8be(0x88),'type':'boolean','description':a20_0x4ed8be(0x8c),'default':![]},{'name':a20_0x4ed8be(0x9a),'type':a20_0x4ed8be(0x76),'description':a20_0x4ed8be(0x75),'default':![]},{'name':a20_0x4ed8be(0x85),'type':'boolean','description':a20_0x4ed8be(0x87),'default':![]}],async 'validate'(_0x5bf637){validateAppListFlags(_0x5bf637);},'execute':execute};
1
+ function a20_0x2141(_0x34ed2d,_0x1953d7){_0x34ed2d=_0x34ed2d-0x162;const _0x16c3a4=a20_0x16c3();let _0x21418e=_0x16c3a4[_0x34ed2d];return _0x21418e;}const a20_0x1d252c=a20_0x2141;(function(_0x44382d,_0x3798c8){const _0x11423b=a20_0x2141,_0x599e30=_0x44382d();while(!![]){try{const _0x310ff0=-parseInt(_0x11423b(0x16f))/0x1+-parseInt(_0x11423b(0x17b))/0x2+-parseInt(_0x11423b(0x18c))/0x3*(parseInt(_0x11423b(0x178))/0x4)+-parseInt(_0x11423b(0x188))/0x5*(parseInt(_0x11423b(0x182))/0x6)+-parseInt(_0x11423b(0x180))/0x7*(parseInt(_0x11423b(0x17c))/0x8)+-parseInt(_0x11423b(0x175))/0x9*(parseInt(_0x11423b(0x18e))/0xa)+parseInt(_0x11423b(0x183))/0xb;if(_0x310ff0===_0x3798c8)break;else _0x599e30['push'](_0x599e30['shift']());}catch(_0x257562){_0x599e30['push'](_0x599e30['shift']());}}}(a20_0x16c3,0x1e31a));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x6eba01,_0xc0ded0){const _0x2af4a0=a20_0x2141,_0x4422a1=[],_0x29e060=_0x6eba01[_0x2af4a0(0x184)]&&typeof _0x6eba01['apps']===_0x2af4a0(0x167)?_0x6eba01[_0x2af4a0(0x184)]:{},_0x1decfb=_0x6eba01['defaultApp']||undefined,_0x2380fd=_0x1decfb??(Object[_0x2af4a0(0x165)](_0x29e060)[_0x2af4a0(0x174)]===0x1?Object[_0x2af4a0(0x165)](_0x29e060)[0x0]:undefined);for(const [_0x41a10b,_0x5dfa1a]of Object[_0x2af4a0(0x164)](_0x29e060)){if(!_0x5dfa1a||typeof _0x5dfa1a!==_0x2af4a0(0x167)||!_0x5dfa1a[_0x2af4a0(0x18f)])continue;_0x4422a1[_0x2af4a0(0x162)]({'name':_0x41a10b,'appcode':_0x5dfa1a[_0x2af4a0(0x18f)],'named':!![],'definedIn':_0xc0ded0,'isDefault':_0x41a10b===_0x2380fd,...buildAppProfileListFields(_0x5dfa1a)});}return _0x4422a1;}function buildMergedItems(_0x32186a,_0x516d49){const _0x33e9a6=a20_0x2141,{apps:apps={}}=_0x32186a,_0x59180d=_0x32186a[_0x33e9a6(0x181)],_0x5ea338=_0x59180d??(Object[_0x33e9a6(0x165)](apps)[_0x33e9a6(0x174)]===0x1?Object[_0x33e9a6(0x165)](apps)[0x0]:undefined),_0x248939=_0x516d49[_0x33e9a6(0x17a)][_0x33e9a6(0x184)]&&typeof _0x516d49[_0x33e9a6(0x17a)][_0x33e9a6(0x184)]===_0x33e9a6(0x167)?_0x516d49[_0x33e9a6(0x17a)]['apps']:{},_0x172476=_0x516d49[_0x33e9a6(0x18b)][_0x33e9a6(0x184)]&&typeof _0x516d49['projectConfig'][_0x33e9a6(0x184)]===_0x33e9a6(0x167)?_0x516d49[_0x33e9a6(0x18b)][_0x33e9a6(0x184)]:{},_0x4def5b=Object[_0x33e9a6(0x164)](apps),_0x34ebd5=_0x4def5b[_0x33e9a6(0x166)](([_0x120a6c,_0x1805c5])=>({'name':_0x120a6c,'appcode':_0x1805c5[_0x33e9a6(0x18f)],'named':!![],'definedIn':appDefinedIn(_0x120a6c,_0x248939,_0x172476),'isDefault':_0x120a6c===_0x5ea338,...buildAppProfileListFields(_0x1805c5)}));return _0x34ebd5;}function validateAppListFlags(_0x1ffae9){const _0xa4fbe3=a20_0x2141;if(!_0x1ffae9['bool']('remote'))return;if(!_0x1ffae9[_0xa4fbe3(0x16d)](_0xa4fbe3(0x171))&&!_0x1ffae9[_0xa4fbe3(0x16d)]('project'))return;throw CliErrors[_0xa4fbe3(0x173)](_0xa4fbe3(0x179),_0xa4fbe3(0x18d));}async function execute(_0x4de353){const _0x6b8513=a20_0x2141;validateAppListFlags(_0x4de353);if(_0x4de353[_0x6b8513(0x16d)](_0x6b8513(0x16e)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x4de353)};const _0x245ee5=_0x4de353[_0x6b8513(0x16d)](_0x6b8513(0x171)),_0x1bb725=_0x4de353['bool'](_0x6b8513(0x17f)),_0xad7dac=_0x245ee5?_0x6b8513(0x171):_0x1bb725?_0x6b8513(0x17f):_0x6b8513(0x190),{config:_0x5d9b1e,layers:_0x3c3394}=readRawConfigWithLayers(),_0x488f89=resolveDefaultAppSource(_0x3c3394),{defaultApp:_0x15b352}=_0x5d9b1e;let _0x26e309,_0x38d066;switch(_0xad7dac){case'global':_0x26e309=buildItemsFromLayer(_0x3c3394['globalConfig'],'global'),_0x38d066=_0x3c3394['globalPath'];break;case _0x6b8513(0x17f):_0x26e309=buildItemsFromLayer(_0x3c3394[_0x6b8513(0x18b)],_0x6b8513(0x17f)),_0x38d066=_0x3c3394[_0x6b8513(0x16b)];break;default:_0x26e309=buildMergedItems(_0x5d9b1e,_0x3c3394);break;}enrichAppListItemsWithMergedSelection(_0x26e309,_0x4de353[_0x6b8513(0x177)]);if(_0x26e309['length']===0x0){const _0x47c76b=_0xad7dac==='merged'?'':'\x20in\x20'+_0xad7dac+'\x20config';return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x47c76b+_0x6b8513(0x189)+CLI_BIN_NAME+_0x6b8513(0x17d)};}const _0x3801ba=_0x26e309[_0x6b8513(0x172)](_0xf9751f=>_0xf9751f[_0x6b8513(0x16c)]===!![]),_0x5c5e61=_0x15b352??_0x3801ba?.[_0x6b8513(0x168)]??null,_0x7d381a=_0xad7dac==='merged'?{'globalPath':_0x3c3394[_0x6b8513(0x17e)]??null,'projectPath':_0x3c3394[_0x6b8513(0x16b)]??null,'defaultApp':_0x5c5e61,'defaultAppSource':_0x15b352!=null?_0x488f89:null}:{'scope':_0xad7dac,'configPath':_0x38d066??null};return{'ok':!![],'data':{'items':_0x26e309,'meta':_0x7d381a}};}function a20_0x16c3(){const _0x1013f0=['apps','optional','list','boolean','17965cjYbfo','.\x20Use\x20`','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','projectConfig','279DhjxVV','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','1430GoQaRQ','appcode','merged','push','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','entries','keys','map','object','name','app','read','projectPath','isCurrent','bool','remote','240335yIRCYC','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','global','find','validation','length','7929rAkmAf','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','mergedCli','2100MlEPpX','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','globalConfig','285674BsFlJk','1848vthsAL','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','globalPath','project','3031RPktRK','defaultApp','150KrKHBg','9586522XNgyyz'];a20_0x16c3=function(){return _0x1013f0;};return a20_0x16c3();}export const appListDefinition={'service':a20_0x1d252c(0x169),'command':a20_0x1d252c(0x186),'description':a20_0x1d252c(0x163),'risk':a20_0x1d252c(0x16a),'auth':a20_0x1d252c(0x185),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x1d252c(0x16e),'type':a20_0x1d252c(0x187),'description':a20_0x1d252c(0x18a),'default':![]},{'name':a20_0x1d252c(0x171),'type':a20_0x1d252c(0x187),'description':a20_0x1d252c(0x170),'default':![]},{'name':a20_0x1d252c(0x17f),'type':a20_0x1d252c(0x187),'description':a20_0x1d252c(0x176),'default':![]}],async 'validate'(_0x36658a){validateAppListFlags(_0x36658a);},'execute':execute};
@@ -1 +1 @@
1
- const a21_0x212496=a21_0x578a;(function(_0x31e9f3,_0x3f2e7e){const _0x554710=a21_0x578a,_0x51a424=_0x31e9f3();while(!![]){try{const _0x5d708e=-parseInt(_0x554710(0xda))/0x1+-parseInt(_0x554710(0xdb))/0x2+-parseInt(_0x554710(0xde))/0x3+-parseInt(_0x554710(0xcf))/0x4+parseInt(_0x554710(0xd7))/0x5+parseInt(_0x554710(0xd2))/0x6*(-parseInt(_0x554710(0xd6))/0x7)+parseInt(_0x554710(0xd8))/0x8;if(_0x5d708e===_0x3f2e7e)break;else _0x51a424['push'](_0x51a424['shift']());}catch(_0x5e5bae){_0x51a424['push'](_0x51a424['shift']());}}}(a21_0x20ca,0x96e6c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a21_0x578a(_0x4672f2,_0x4c1baa){_0x4672f2=_0x4672f2-0xcf;const _0x20caab=a21_0x20ca();let _0x578adf=_0x20caab[_0x4672f2];return _0x578adf;}function a21_0x20ca(){const _0x49131d=['2053653EkzQyl','632056FxCzeV','\x20application\x20member(s)','members-list','18jTgDGo','appCode','read','List\x20application\x20members\x20with\x20their\x20role\x20memberships','16576MLULkh','3983940HQLBBe','14462608JUgLvs','app','614729FAbVlE','1044248TfzgqH','Found\x20','length'];a21_0x20ca=function(){return _0x49131d;};return a21_0x20ca();}import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':a21_0x212496(0xd9),'command':a21_0x212496(0xd1),'description':a21_0x212496(0xd5),'risk':a21_0x212496(0xd4),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x376a9b){const _0x554706=a21_0x212496,_0x22b14d=projectAppMembers(await listRoleUsers(_0x376a9b[_0x554706(0xd3)]));return{'ok':!![],'data':{'appCode':_0x376a9b[_0x554706(0xd3)],'items':_0x22b14d,'totalCount':_0x22b14d[_0x554706(0xdd)]},'message':_0x554706(0xdc)+_0x22b14d['length']+_0x554706(0xd0)};}};
1
+ const a21_0x21455f=a21_0x61b1;function a21_0x181b(){const _0x13fbaf=['3qZlgMT','appCode','read','2815wHLlod','249302hMhSAL','9107ZdBtnV','\x20application\x20member(s)','app','6504fjvCOt','11780KNLWfD','3404744kmWMiv','18aECirR','935914FmgOtH','11792860nYPgYf','5269YjzbEh','Found\x20','7206HwOZVM','length'];a21_0x181b=function(){return _0x13fbaf;};return a21_0x181b();}(function(_0x222746,_0x6b000f){const _0x1033b5=a21_0x61b1,_0x22c934=_0x222746();while(!![]){try{const _0xb65913=parseInt(_0x1033b5(0xbe))/0x1+parseInt(_0x1033b5(0xc8))/0x2*(parseInt(_0x1033b5(0xc4))/0x3)+-parseInt(_0x1033b5(0xbb))/0x4*(parseInt(_0x1033b5(0xc7))/0x5)+parseInt(_0x1033b5(0xc2))/0x6*(parseInt(_0x1033b5(0xb7))/0x7)+-parseInt(_0x1033b5(0xbc))/0x8*(-parseInt(_0x1033b5(0xbd))/0x9)+-parseInt(_0x1033b5(0xbf))/0xa+parseInt(_0x1033b5(0xc0))/0xb*(parseInt(_0x1033b5(0xba))/0xc);if(_0xb65913===_0x6b000f)break;else _0x22c934['push'](_0x22c934['shift']());}catch(_0x4cd722){_0x22c934['push'](_0x22c934['shift']());}}}(a21_0x181b,0xdae25));function a21_0x61b1(_0x19ee71,_0x322fda){_0x19ee71=_0x19ee71-0xb7;const _0x181b4c=a21_0x181b();let _0x61b18c=_0x181b4c[_0x19ee71];return _0x61b18c;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':a21_0x21455f(0xb9),'command':'members-list','description':'List\x20application\x20members\x20with\x20their\x20role\x20memberships','risk':a21_0x21455f(0xc6),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4d56d1){const _0x439f3b=a21_0x21455f,_0x3e4265=projectAppMembers(await listRoleUsers(_0x4d56d1[_0x439f3b(0xc5)]));return{'ok':!![],'data':{'appCode':_0x4d56d1[_0x439f3b(0xc5)],'items':_0x3e4265,'totalCount':_0x3e4265[_0x439f3b(0xc3)]},'message':_0x439f3b(0xc1)+_0x3e4265['length']+_0x439f3b(0xb8)};}};
@@ -1 +1 @@
1
- function a22_0x41c6(){const _0x4cb467=['12sMqShu','25289077IEnitz','authRequired','cookie','52fmWCPc','772952RHIquW','6zDxVKQ','181360vfwgQL','51zbUyCe','map','617365QuEeYI','36klOixN','appDesc','platform','4508777OzsvhE','appCode','44958EGdLBu','13864740yvXIMA'];a22_0x41c6=function(){return _0x4cb467;};return a22_0x41c6();}(function(_0x470088,_0x1d466d){const _0x11f2a2=a22_0x1c63,_0x30338a=_0x470088();while(!![]){try{const _0x42e9b6=parseInt(_0x11f2a2(0x1f1))/0x1+parseInt(_0x11f2a2(0x1f7))/0x2*(-parseInt(_0x11f2a2(0x1ef))/0x3)+-parseInt(_0x11f2a2(0x1eb))/0x4*(-parseInt(_0x11f2a2(0x1ee))/0x5)+parseInt(_0x11f2a2(0x1ed))/0x6*(parseInt(_0x11f2a2(0x1f5))/0x7)+parseInt(_0x11f2a2(0x1ec))/0x8*(parseInt(_0x11f2a2(0x1f2))/0x9)+parseInt(_0x11f2a2(0x1f8))/0xa+parseInt(_0x11f2a2(0x1fa))/0xb*(-parseInt(_0x11f2a2(0x1f9))/0xc);if(_0x42e9b6===_0x1d466d)break;else _0x30338a['push'](_0x30338a['shift']());}catch(_0x447730){_0x30338a['push'](_0x30338a['shift']());}}}(a22_0x41c6,0xc95ec));function a22_0x1c63(_0x49fc6b,_0x2ea6cf){_0x49fc6b=_0x49fc6b-0x1e9;const _0x41c6a7=a22_0x41c6();let _0x1c63de=_0x41c6a7[_0x49fc6b];return _0x1c63de;}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(_0x568df2){const _0x266acb=a22_0x1c63,_0x4ea8c5=_0x568df2[_0x266acb(0x1ea)]||getCookie();if(!_0x4ea8c5)throw CliErrors[_0x266acb(0x1e9)]();return _0x4ea8c5;}export async function listRemoteAppDirectory(_0x509438){const _0x3fd2f5=a22_0x1c63,_0x23d866=await withActiveCookie(resolveCookie(_0x509438),()=>listRemoteApps());return{'items':_0x23d866[_0x3fd2f5(0x1f0)](_0x537756=>({..._0x537756['id']!=null?{'id':_0x537756['id']}:{},'appCode':_0x537756[_0x3fd2f5(0x1f6)],'appName':_0x537756['appName'],..._0x537756[_0x3fd2f5(0x1f3)]!=null?{'appDesc':_0x537756[_0x3fd2f5(0x1f3)]}:{}})),'meta':{'source':_0x3fd2f5(0x1f4)}};}
1
+ (function(_0x26c5f9,_0x57ac3b){const _0x3c611c=a22_0xc0f1,_0x271cc6=_0x26c5f9();while(!![]){try{const _0x3a6c3e=-parseInt(_0x3c611c(0x8b))/0x1*(parseInt(_0x3c611c(0x96))/0x2)+-parseInt(_0x3c611c(0x90))/0x3+parseInt(_0x3c611c(0x94))/0x4+parseInt(_0x3c611c(0x8f))/0x5+-parseInt(_0x3c611c(0x99))/0x6*(parseInt(_0x3c611c(0x91))/0x7)+-parseInt(_0x3c611c(0x9a))/0x8*(-parseInt(_0x3c611c(0x8c))/0x9)+parseInt(_0x3c611c(0x8e))/0xa;if(_0x3a6c3e===_0x57ac3b)break;else _0x271cc6['push'](_0x271cc6['shift']());}catch(_0x47bac8){_0x271cc6['push'](_0x271cc6['shift']());}}}(a22_0x5d03,0xbaae1));function a22_0xc0f1(_0xfc66be,_0x1b367e){_0xfc66be=_0xfc66be-0x8b;const _0x5d030b=a22_0x5d03();let _0xc0f1f=_0x5d030b[_0xfc66be];return _0xc0f1f;}import{listRemoteApps}from'../../core/api-client.js';function a22_0x5d03(){const _0x19413c=['10719VavmPP','appName','6212720oSUHos','7640945mRmXsO','4124319HmqwNQ','12579DPoqBC','appDesc','map','2709156bfxPqW','appCode','162XbcSYC','authRequired','platform','1758KqgXUi','2224LClLMS','6073RzNLmI'];a22_0x5d03=function(){return _0x19413c;};return a22_0x5d03();}import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x530795){const _0x30457b=a22_0xc0f1,_0x3f1e2d=_0x530795['cookie']||getCookie();if(!_0x3f1e2d)throw CliErrors[_0x30457b(0x97)]();return _0x3f1e2d;}export async function listRemoteAppDirectory(_0x159787){const _0x793178=a22_0xc0f1,_0x50221d=await withActiveCookie(resolveCookie(_0x159787),()=>listRemoteApps());return{'items':_0x50221d[_0x793178(0x93)](_0x2cb70a=>({..._0x2cb70a['id']!=null?{'id':_0x2cb70a['id']}:{},'appCode':_0x2cb70a[_0x793178(0x95)],'appName':_0x2cb70a[_0x793178(0x8d)],..._0x2cb70a[_0x793178(0x92)]!=null?{'appDesc':_0x2cb70a[_0x793178(0x92)]}:{}})),'meta':{'source':_0x793178(0x98)}};}
@@ -1 +1 @@
1
- (function(_0x13ac1b,_0x7267ba){const _0xf4eca2=a23_0x2e05,_0x2f6198=_0x13ac1b();while(!![]){try{const _0x3ed69b=parseInt(_0xf4eca2(0x1d1))/0x1*(parseInt(_0xf4eca2(0x1e2))/0x2)+parseInt(_0xf4eca2(0x1cd))/0x3*(-parseInt(_0xf4eca2(0x1e1))/0x4)+parseInt(_0xf4eca2(0x1ca))/0x5+-parseInt(_0xf4eca2(0x1ed))/0x6+-parseInt(_0xf4eca2(0x1f2))/0x7*(-parseInt(_0xf4eca2(0x1d6))/0x8)+parseInt(_0xf4eca2(0x1cc))/0x9*(parseInt(_0xf4eca2(0x1e9))/0xa)+-parseInt(_0xf4eca2(0x1d4))/0xb*(-parseInt(_0xf4eca2(0x1eb))/0xc);if(_0x3ed69b===_0x7267ba)break;else _0x2f6198['push'](_0x2f6198['shift']());}catch(_0x1bcab7){_0x2f6198['push'](_0x2f6198['shift']());}}}(a23_0x2920,0x9aff4));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x57b195){const _0xa26946=a23_0x2e05,_0x503582=_0x57b195?.[_0xa26946(0x1c2)]();return _0x503582?_0x503582:null;}function a23_0x2920(){const _0x3cf395=['trim','defaultApp','nickname','length','project','displayName','\x20(global)','globalConfig','4357650pvKbGC','PENDING','54WBmWdo','2338623Utouqo','named','has','username','1xObpmo','applyUserList','hasOwnProperty','110EMvsnI','sort','907096qwtVIf','values','roleName','global','appCode','roleType','userList','both','keys','membershipStatus','name','4pjPuIY','872358OXkukK','get','push','roleId','userId','projectConfig','roleKeys','305870OBMYFT','currentApp','220812amHBeP','roles','3605958shGDmi','isFinite','ACTIVE','prototype','add','21tWSVeL','appcode','object','status','apps','isCurrent','call'];a23_0x2920=function(){return _0x3cf395;};return a23_0x2920();}function a23_0x2e05(_0x2c2962,_0x4f9eba){_0x2c2962=_0x2c2962-0x1c2;const _0x2920fb=a23_0x2920();let _0x2e0598=_0x2920fb[_0x2c2962];return _0x2e0598;}export function projectAppMembers(_0x4ca1a1){const _0x1e0f44=a23_0x2e05,_0x146434=new Map(),_0x2be17d=[..._0x4ca1a1]['sort']((_0x5d94b7,_0x26f654)=>_0x5d94b7['id']-_0x26f654['id']),_0x183077=(_0x4342f4,_0x279a07,_0x17a6fb)=>{const _0x32a000=a23_0x2e05;for(const _0x5e71e4 of _0x279a07){const _0x18e835=Number(_0x5e71e4[_0x32a000(0x1e6)]);if(!Number[_0x32a000(0x1ee)](_0x18e835)||_0x18e835<=0x0)continue;let _0x2b7b3d=_0x146434[_0x32a000(0x1e3)](_0x18e835);if(!_0x2b7b3d)_0x2b7b3d={'userId':_0x18e835,'username':nullableText(_0x5e71e4[_0x32a000(0x1d0)]),'displayName':nullableText(_0x5e71e4[_0x32a000(0x1c4)]),'status':_0x17a6fb,'roles':[],'roleKeys':new Set()},_0x146434['set'](_0x18e835,_0x2b7b3d);else{_0x2b7b3d[_0x32a000(0x1d0)]??=nullableText(_0x5e71e4['username']),_0x2b7b3d[_0x32a000(0x1c7)]??=nullableText(_0x5e71e4[_0x32a000(0x1c4)]);if(_0x17a6fb===_0x32a000(0x1ef))_0x2b7b3d[_0x32a000(0x1f5)]='ACTIVE';}const _0x311200=_0x4342f4['id']+':'+_0x17a6fb;if(_0x2b7b3d[_0x32a000(0x1e8)][_0x32a000(0x1cf)](_0x311200))continue;_0x2b7b3d[_0x32a000(0x1e8)][_0x32a000(0x1f1)](_0x311200),_0x2b7b3d[_0x32a000(0x1ec)][_0x32a000(0x1e4)]({'roleId':_0x4342f4['id'],'roleName':nullableText(_0x4342f4[_0x32a000(0x1d8)]),'roleType':nullableText(_0x4342f4[_0x32a000(0x1db)]),'membershipStatus':_0x17a6fb});}};for(const _0x45cf48 of _0x2be17d){_0x183077(_0x45cf48,_0x45cf48[_0x1e0f44(0x1dc)]??[],_0x1e0f44(0x1ef)),_0x183077(_0x45cf48,_0x45cf48[_0x1e0f44(0x1d2)]??[],_0x1e0f44(0x1cb));}return[..._0x146434[_0x1e0f44(0x1d7)]()]['map'](_0x24e05c=>({'userId':_0x24e05c['userId'],'username':_0x24e05c['username'],'displayName':_0x24e05c[_0x1e0f44(0x1c7)],'status':_0x24e05c['status'],'roles':_0x24e05c[_0x1e0f44(0x1ec)]['sort']((_0x1ff26e,_0x32fcd9)=>_0x1ff26e['roleId']-_0x32fcd9[_0x1e0f44(0x1e5)]||(_0x1ff26e[_0x1e0f44(0x1df)]===_0x32fcd9[_0x1e0f44(0x1df)]?0x0:_0x1ff26e['membershipStatus']==='ACTIVE'?-0x1:0x1))}))[_0x1e0f44(0x1d5)]((_0x5bd2f7,_0x108571)=>_0x5bd2f7[_0x1e0f44(0x1e6)]-_0x108571[_0x1e0f44(0x1e6)]);}export function enrichAppListItemsWithMergedSelection(_0x215741,_0xceb9d3){const _0x16df9a=a23_0x2e05;if(!_0xceb9d3)return;const _0x1f1236=_0xceb9d3[_0x16df9a(0x1f6)]&&typeof _0xceb9d3[_0x16df9a(0x1f6)]==='object'?_0xceb9d3[_0x16df9a(0x1f6)]:{},_0x5487a9=Object[_0x16df9a(0x1de)](_0x1f1236)[_0x16df9a(0x1c5)]>0x0;for(const _0x27dff4 of _0x215741){_0x27dff4[_0x16df9a(0x1f7)]=![];}const _0x22d149=_0xceb9d3['appCode']!=null?String(_0xceb9d3[_0x16df9a(0x1da)])[_0x16df9a(0x1c2)]():'';if(_0x5487a9){const _0x55a3cd=_0xceb9d3[_0x16df9a(0x1ea)]??_0xceb9d3[_0x16df9a(0x1c3)];if(_0x55a3cd)for(const _0x383ae8 of _0x215741){_0x383ae8['named']===!![]&&_0x383ae8[_0x16df9a(0x1e0)]===_0x55a3cd&&(_0x383ae8[_0x16df9a(0x1f7)]=!![]);}for(const _0xab4a38 of _0x215741){if(_0xab4a38[_0x16df9a(0x1ce)]!==![])continue;if(_0xceb9d3[_0x16df9a(0x1c3)])continue;_0x22d149&&String(_0xab4a38[_0x16df9a(0x1f3)]??'')[_0x16df9a(0x1c2)]()===_0x22d149&&(_0xab4a38[_0x16df9a(0x1f7)]=!![]);}return;}if(!_0x22d149)return;for(const _0x444fb2 of _0x215741){String(_0x444fb2[_0x16df9a(0x1f3)]??'')[_0x16df9a(0x1c2)]()===_0x22d149&&(_0x444fb2[_0x16df9a(0x1f7)]=!![]);}}export function resolveAppScopeForWrite(_0x36301c,_0x52d46b,_0x5de5a6){const _0x1afbfb=a23_0x2e05;if(_0x52d46b)return _0x1afbfb(0x1d9);const _0x95b49e=_0x5de5a6[_0x1afbfb(0x1e7)][_0x1afbfb(0x1f6)]&&typeof _0x5de5a6[_0x1afbfb(0x1e7)][_0x1afbfb(0x1f6)]==='object'?_0x5de5a6[_0x1afbfb(0x1e7)][_0x1afbfb(0x1f6)]:{},_0x70fbb9=_0x5de5a6[_0x1afbfb(0x1c9)][_0x1afbfb(0x1f6)]&&typeof _0x5de5a6[_0x1afbfb(0x1c9)][_0x1afbfb(0x1f6)]==='object'?_0x5de5a6[_0x1afbfb(0x1c9)][_0x1afbfb(0x1f6)]:{};if(Object[_0x1afbfb(0x1f0)][_0x1afbfb(0x1d3)]['call'](_0x95b49e,_0x36301c))return _0x1afbfb(0x1c6);if(Object['prototype'][_0x1afbfb(0x1d3)]['call'](_0x70fbb9,_0x36301c))return _0x1afbfb(0x1d9);return _0x1afbfb(0x1c6);}export function appDefinedIn(_0x25869f,_0xed9a2d,_0x1601b4){const _0x2ba0bf=a23_0x2e05,_0x51cc68=Object[_0x2ba0bf(0x1f0)]['hasOwnProperty'][_0x2ba0bf(0x1f8)](_0xed9a2d,_0x25869f),_0x469993=Object[_0x2ba0bf(0x1f0)]['hasOwnProperty'][_0x2ba0bf(0x1f8)](_0x1601b4,_0x25869f);if(_0x51cc68&&_0x469993)return _0x2ba0bf(0x1dd);if(_0x469993)return _0x2ba0bf(0x1c6);return _0x2ba0bf(0x1d9);}export function resolveDefaultAppSource(_0x133b70){const _0x380cf5=a23_0x2e05,_0x240446=_0x133b70['projectConfig']['apps']&&typeof _0x133b70['projectConfig'][_0x380cf5(0x1f6)]===_0x380cf5(0x1f4)?_0x133b70[_0x380cf5(0x1e7)]['apps']:{};if(_0x380cf5(0x1c3)in _0x133b70[_0x380cf5(0x1e7)])return _0x380cf5(0x1c6);if(Object['keys'](_0x240446)[_0x380cf5(0x1c5)]>0x0)return _0x380cf5(0x1c6);if(Object[_0x380cf5(0x1de)](_0x133b70[_0x380cf5(0x1e7)])[_0x380cf5(0x1c5)]===0x0&&_0x133b70['globalConfig']['defaultApp'])return _0x380cf5(0x1d9);return null;}export function getConfigPath(_0x25fab6={}){const _0x58ef0c=a23_0x2e05,_0x416dd1=_0x25fab6[_0x58ef0c(0x1d9)]?_0x58ef0c(0x1d9):_0x58ef0c(0x1c6);return resolveWriteConfigPath(_0x416dd1);}export function readConfig(_0x222cf7={}){return readConfigFile(getConfigPath(_0x222cf7));}export function writeConfig(_0x1fd798,_0x979e8={}){writeConfigFile(getConfigPath(_0x979e8),_0x1fd798);}export function scopeLabel(_0x284e31){const _0x4d84bb=a23_0x2e05;return _0x284e31[_0x4d84bb(0x1d9)]?_0x4d84bb(0x1c8):'';}
1
+ function a23_0x18dc(_0x9759bf,_0x3345ff){_0x9759bf=_0x9759bf-0x171;const _0x180916=a23_0x1809();let _0x18dc62=_0x180916[_0x9759bf];return _0x18dc62;}(function(_0x3314b3,_0x220464){const _0x3087da=a23_0x18dc,_0x2ddce2=_0x3314b3();while(!![]){try{const _0x24114d=-parseInt(_0x3087da(0x18c))/0x1*(parseInt(_0x3087da(0x172))/0x2)+parseInt(_0x3087da(0x18d))/0x3*(-parseInt(_0x3087da(0x186))/0x4)+parseInt(_0x3087da(0x183))/0x5*(-parseInt(_0x3087da(0x171))/0x6)+parseInt(_0x3087da(0x191))/0x7+parseInt(_0x3087da(0x195))/0x8*(-parseInt(_0x3087da(0x17e))/0x9)+parseInt(_0x3087da(0x17d))/0xa*(parseInt(_0x3087da(0x1a1))/0xb)+parseInt(_0x3087da(0x192))/0xc;if(_0x24114d===_0x220464)break;else _0x2ddce2['push'](_0x2ddce2['shift']());}catch(_0x3bb68f){_0x2ddce2['push'](_0x2ddce2['shift']());}}}(a23_0x1809,0xd5b25));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x470037){const _0x1c74aa=_0x470037?.['trim']();return _0x1c74aa?_0x1c74aa:null;}export function projectAppMembers(_0x16bcb0){const _0x23b475=a23_0x18dc,_0x19b71=new Map(),_0x382143=[..._0x16bcb0][_0x23b475(0x194)]((_0x391953,_0x4290fe)=>_0x391953['id']-_0x4290fe['id']),_0x4afc76=(_0x32e40b,_0x5e7244,_0x2927de)=>{const _0x10981f=_0x23b475;for(const _0x2dae51 of _0x5e7244){const _0x5b210a=Number(_0x2dae51[_0x10981f(0x184)]);if(!Number[_0x10981f(0x19b)](_0x5b210a)||_0x5b210a<=0x0)continue;let _0x1b29da=_0x19b71['get'](_0x5b210a);if(!_0x1b29da)_0x1b29da={'userId':_0x5b210a,'username':nullableText(_0x2dae51[_0x10981f(0x182)]),'displayName':nullableText(_0x2dae51[_0x10981f(0x19a)]),'status':_0x2927de,'roles':[],'roleKeys':new Set()},_0x19b71[_0x10981f(0x189)](_0x5b210a,_0x1b29da);else{_0x1b29da[_0x10981f(0x182)]??=nullableText(_0x2dae51[_0x10981f(0x182)]),_0x1b29da['displayName']??=nullableText(_0x2dae51['nickname']);if(_0x2927de===_0x10981f(0x185))_0x1b29da[_0x10981f(0x19e)]=_0x10981f(0x185);}const _0x2e6489=_0x32e40b['id']+':'+_0x2927de;if(_0x1b29da[_0x10981f(0x176)][_0x10981f(0x19d)](_0x2e6489))continue;_0x1b29da[_0x10981f(0x176)][_0x10981f(0x18a)](_0x2e6489),_0x1b29da['roles']['push']({'roleId':_0x32e40b['id'],'roleName':nullableText(_0x32e40b['roleName']),'roleType':nullableText(_0x32e40b[_0x10981f(0x178)]),'membershipStatus':_0x2927de});}};for(const _0x4b98e6 of _0x382143){_0x4afc76(_0x4b98e6,_0x4b98e6[_0x23b475(0x193)]??[],_0x23b475(0x185)),_0x4afc76(_0x4b98e6,_0x4b98e6[_0x23b475(0x18f)]??[],_0x23b475(0x190));}return[..._0x19b71[_0x23b475(0x1a5)]()][_0x23b475(0x17a)](_0x1e2ee1=>({'userId':_0x1e2ee1[_0x23b475(0x184)],'username':_0x1e2ee1[_0x23b475(0x182)],'displayName':_0x1e2ee1[_0x23b475(0x197)],'status':_0x1e2ee1[_0x23b475(0x19e)],'roles':_0x1e2ee1[_0x23b475(0x188)]['sort']((_0x470eff,_0x1b55fa)=>_0x470eff['roleId']-_0x1b55fa[_0x23b475(0x175)]||(_0x470eff[_0x23b475(0x181)]===_0x1b55fa[_0x23b475(0x181)]?0x0:_0x470eff[_0x23b475(0x181)]===_0x23b475(0x185)?-0x1:0x1))}))[_0x23b475(0x194)]((_0x3c9841,_0x2dabcf)=>_0x3c9841['userId']-_0x2dabcf['userId']);}export function enrichAppListItemsWithMergedSelection(_0x3a42f8,_0x432242){const _0x4a03e6=a23_0x18dc;if(!_0x432242)return;const _0x25f23b=_0x432242[_0x4a03e6(0x17b)]&&typeof _0x432242[_0x4a03e6(0x17b)]===_0x4a03e6(0x199)?_0x432242['apps']:{},_0x38ae21=Object[_0x4a03e6(0x1a4)](_0x25f23b)[_0x4a03e6(0x198)]>0x0;for(const _0x3d861b of _0x3a42f8){_0x3d861b[_0x4a03e6(0x196)]=![];}const _0x1ffb34=_0x432242['appCode']!=null?String(_0x432242['appCode'])[_0x4a03e6(0x17f)]():'';if(_0x38ae21){const _0x41c79e=_0x432242[_0x4a03e6(0x179)]??_0x432242[_0x4a03e6(0x1a3)];if(_0x41c79e)for(const _0xac958f of _0x3a42f8){_0xac958f[_0x4a03e6(0x17c)]===!![]&&_0xac958f[_0x4a03e6(0x19f)]===_0x41c79e&&(_0xac958f['isCurrent']=!![]);}for(const _0x10339d of _0x3a42f8){if(_0x10339d[_0x4a03e6(0x17c)]!==![])continue;if(_0x432242[_0x4a03e6(0x1a3)])continue;_0x1ffb34&&String(_0x10339d[_0x4a03e6(0x177)]??'')['trim']()===_0x1ffb34&&(_0x10339d['isCurrent']=!![]);}return;}if(!_0x1ffb34)return;for(const _0x283331 of _0x3a42f8){String(_0x283331[_0x4a03e6(0x177)]??'')['trim']()===_0x1ffb34&&(_0x283331[_0x4a03e6(0x196)]=!![]);}}export function resolveAppScopeForWrite(_0x55338b,_0x210505,_0x1141f6){const _0x58fea8=a23_0x18dc;if(_0x210505)return _0x58fea8(0x187);const _0x27e054=_0x1141f6['projectConfig']['apps']&&typeof _0x1141f6[_0x58fea8(0x1a0)][_0x58fea8(0x17b)]==='object'?_0x1141f6['projectConfig']['apps']:{},_0x4d2cac=_0x1141f6['globalConfig'][_0x58fea8(0x17b)]&&typeof _0x1141f6[_0x58fea8(0x19c)][_0x58fea8(0x17b)]===_0x58fea8(0x199)?_0x1141f6[_0x58fea8(0x19c)][_0x58fea8(0x17b)]:{};if(Object['prototype'][_0x58fea8(0x18e)][_0x58fea8(0x173)](_0x27e054,_0x55338b))return _0x58fea8(0x174);if(Object[_0x58fea8(0x18b)]['hasOwnProperty'][_0x58fea8(0x173)](_0x4d2cac,_0x55338b))return _0x58fea8(0x187);return _0x58fea8(0x174);}export function appDefinedIn(_0x45d9b6,_0xe0ada2,_0x567cab){const _0x198e9d=a23_0x18dc,_0x1eba3a=Object[_0x198e9d(0x18b)][_0x198e9d(0x18e)]['call'](_0xe0ada2,_0x45d9b6),_0x362a44=Object[_0x198e9d(0x18b)]['hasOwnProperty']['call'](_0x567cab,_0x45d9b6);if(_0x1eba3a&&_0x362a44)return _0x198e9d(0x180);if(_0x362a44)return _0x198e9d(0x174);return _0x198e9d(0x187);}export function resolveDefaultAppSource(_0x53078e){const _0x21cd10=a23_0x18dc,_0x7e3c2e=_0x53078e[_0x21cd10(0x1a0)][_0x21cd10(0x17b)]&&typeof _0x53078e[_0x21cd10(0x1a0)][_0x21cd10(0x17b)]===_0x21cd10(0x199)?_0x53078e[_0x21cd10(0x1a0)][_0x21cd10(0x17b)]:{};if(_0x21cd10(0x1a3)in _0x53078e[_0x21cd10(0x1a0)])return _0x21cd10(0x174);if(Object[_0x21cd10(0x1a4)](_0x7e3c2e)[_0x21cd10(0x198)]>0x0)return'project';if(Object[_0x21cd10(0x1a4)](_0x53078e[_0x21cd10(0x1a0)])['length']===0x0&&_0x53078e[_0x21cd10(0x19c)][_0x21cd10(0x1a3)])return _0x21cd10(0x187);return null;}function a23_0x1809(){const _0x41e137=['ACTIVE','12WodrZe','global','roles','set','add','prototype','2729uLRAKP','634701XtVGIt','hasOwnProperty','applyUserList','PENDING','4730110NzEhbZ','20930940ZFjBwy','userList','sort','4780696Uuaejw','isCurrent','displayName','length','object','nickname','isFinite','globalConfig','has','status','name','projectConfig','10898756noHfis','\x20(global)','defaultApp','keys','values','7737222LrNPvk','10GKpJvx','call','project','roleId','roleKeys','appcode','roleType','currentApp','map','apps','named','10RrrwTM','9dTbJoK','trim','both','membershipStatus','username','5fcxgZs','userId'];a23_0x1809=function(){return _0x41e137;};return a23_0x1809();}export function getConfigPath(_0xc316c9={}){const _0x357ae7=a23_0x18dc,_0xf92684=_0xc316c9['global']?_0x357ae7(0x187):'project';return resolveWriteConfigPath(_0xf92684);}export function readConfig(_0x513261={}){return readConfigFile(getConfigPath(_0x513261));}export function writeConfig(_0x5cc66f,_0x4d698f={}){writeConfigFile(getConfigPath(_0x4d698f),_0x5cc66f);}export function scopeLabel(_0x4b310a){const _0x1ad8f5=a23_0x18dc;return _0x4b310a[_0x1ad8f5(0x187)]?_0x1ad8f5(0x1a2):'';}
@@ -1 +1 @@
1
- const a24_0x5611cf=a24_0x26dc;(function(_0x5e9e88,_0x5f43e6){const _0x2393b6=a24_0x26dc,_0x360763=_0x5e9e88();while(!![]){try{const _0x4d2928=parseInt(_0x2393b6(0x17d))/0x1*(-parseInt(_0x2393b6(0x176))/0x2)+parseInt(_0x2393b6(0x175))/0x3*(-parseInt(_0x2393b6(0x180))/0x4)+parseInt(_0x2393b6(0x182))/0x5*(-parseInt(_0x2393b6(0x18c))/0x6)+-parseInt(_0x2393b6(0x178))/0x7*(parseInt(_0x2393b6(0x17b))/0x8)+-parseInt(_0x2393b6(0x18a))/0x9*(-parseInt(_0x2393b6(0x188))/0xa)+-parseInt(_0x2393b6(0x185))/0xb+parseInt(_0x2393b6(0x17e))/0xc;if(_0x4d2928===_0x5f43e6)break;else _0x360763['push'](_0x360763['shift']());}catch(_0x55fada){_0x360763['push'](_0x360763['shift']());}}}(a24_0x465f,0x46723));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a24_0x26dc(_0x263fb1,_0x87932d){_0x263fb1=_0x263fb1-0x174;const _0x465f88=a24_0x465f();let _0x26dc38=_0x465f88[_0x263fb1];return _0x26dc38;}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_0x5611cf(0x187);export const appConfigDelete={'service':a24_0x5611cf(0x186),'command':a24_0x5611cf(0x17f),'description':a24_0x5611cf(0x179),'risk':a24_0x5611cf(0x17a),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4ff816){readKeyArg(_0x4ff816);},async 'dryRun'(_0x249687){const _0xa47286=a24_0x5611cf,_0x7402b6=readKeyArg(_0x249687),_0x271e7c=await mustGetByKey(_0x249687[_0xa47286(0x17c)],_0x7402b6);return asAppConfigDryRunResult(buildMutationData({'operation':_0xa47286(0x17f),'appCode':_0x249687['appCode'],'key':_0x7402b6,'before':projectAppConfig(_0x271e7c),'after':null,'dryRun':!![]}),{'method':_0xa47286(0x18b),'url':DELETE_PATH});},async 'execute'(_0x50d139){const _0x4df614=a24_0x5611cf,_0x5ab2da=readKeyArg(_0x50d139),_0x1b9389=await mustGetByKey(_0x50d139[_0x4df614(0x17c)],_0x5ab2da);return await withAppConfigApiBoundary(_0x4df614(0x17f),{'appCode':_0x50d139[_0x4df614(0x17c)],'key':_0x5ab2da},()=>deleteAppConfig({'appCode':_0x50d139[_0x4df614(0x17c)],'id':requireAppConfigId(_0x1b9389,_0x5ab2da,_0x50d139[_0x4df614(0x17c)])})),{'ok':!![],'data':buildMutationData({'operation':_0x4df614(0x17f),'appCode':_0x50d139[_0x4df614(0x17c)],'key':_0x5ab2da,'before':projectAppConfig(_0x1b9389),'after':null,'dryRun':![]}),'message':_0x4df614(0x174)+_0x5ab2da};}};async function mustGetByKey(_0x236157,_0x30cb37){const _0x3470dd=a24_0x5611cf,_0x5e6468=await withAppConfigApiBoundary('get',{'appCode':_0x236157,'key':_0x30cb37},()=>getAppConfigByKey(_0x236157,_0x30cb37));if(!_0x5e6468)throw CliErrors[_0x3470dd(0x183)]('App\x20config\x20key\x20not\x20found:\x20'+_0x30cb37,'appCode:\x20'+_0x236157);return _0x5e6468;}function requireAppConfigId(_0x5b5998,_0x5e8eca,_0x34510d){const _0x4ce4f5=a24_0x5611cf;if(typeof _0x5b5998['id']===_0x4ce4f5(0x184)&&Number[_0x4ce4f5(0x181)](_0x5b5998['id'])&&_0x5b5998['id']>0x0)return _0x5b5998['id'];throw CliErrors[_0x4ce4f5(0x189)](_0x4ce4f5(0x177)+_0x5e8eca+',\x20appCode='+_0x34510d);}function a24_0x465f(){const _0x4f7635=['validation','number','189233GLTFoN','app-config','/smartapi/app-config/delete','1420xdJcSi','apiError','29547gmjxnS','POST','5286LocGal','Deleted\x20app\x20config\x20','3BGLcmg','2YqhFyO','App\x20config\x20server\x20id\x20missing\x20for\x20key=','7IPzqSA','Delete\x20one\x20runtime\x20app-config\x20key','high-risk-write','1031144FtFHCX','appCode','576838JMYtzt','14191836XKykNv','delete','1883396jcTSoy','isFinite','945shJJAl'];a24_0x465f=function(){return _0x4f7635;};return a24_0x465f();}
1
+ const a24_0x46d549=a24_0x223b;(function(_0x2413ea,_0xd86c34){const _0xc85637=a24_0x223b,_0x13ce90=_0x2413ea();while(!![]){try{const _0x4933b4=-parseInt(_0xc85637(0x1e2))/0x1*(-parseInt(_0xc85637(0x1df))/0x2)+-parseInt(_0xc85637(0x1d8))/0x3+-parseInt(_0xc85637(0x1ce))/0x4+-parseInt(_0xc85637(0x1de))/0x5+parseInt(_0xc85637(0x1d9))/0x6+parseInt(_0xc85637(0x1cc))/0x7*(-parseInt(_0xc85637(0x1d5))/0x8)+parseInt(_0xc85637(0x1e1))/0x9*(parseInt(_0xc85637(0x1d0))/0xa);if(_0x4933b4===_0xd86c34)break;else _0x13ce90['push'](_0x13ce90['shift']());}catch(_0xeb0006){_0x13ce90['push'](_0x13ce90['shift']());}}}(a24_0x5ea4,0xb643d));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';function a24_0x223b(_0x3a4087,_0x273df2){_0x3a4087=_0x3a4087-0x1cc;const _0x5ea4bd=a24_0x5ea4();let _0x223be1=_0x5ea4bd[_0x3a4087];return _0x223be1;}function a24_0x5ea4(){const _0x2a3c45=['isFinite','1135184awvocU','appCode',',\x20appCode=','2591385ZlRdoo','5231196jieUfz','get','POST','validation','number','3326455KOVgBb','3992gdDfMU','/smartapi/app-config/delete','477IJoAkM','734coCnUO','app-config','56UbrFxT','Delete\x20one\x20runtime\x20app-config\x20key','5293384ERDUea','App\x20config\x20key\x20not\x20found:\x20','452310jSLwhT','delete','high-risk-write','appCode:\x20'];a24_0x5ea4=function(){return _0x2a3c45;};return a24_0x5ea4();}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_0x46d549(0x1e0);export const appConfigDelete={'service':a24_0x46d549(0x1e3),'command':'delete','description':a24_0x46d549(0x1cd),'risk':a24_0x46d549(0x1d2),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1a67f3){readKeyArg(_0x1a67f3);},async 'dryRun'(_0x1f18fd){const _0x6221ce=a24_0x46d549,_0x5222c3=readKeyArg(_0x1f18fd),_0x3876be=await mustGetByKey(_0x1f18fd[_0x6221ce(0x1d6)],_0x5222c3);return asAppConfigDryRunResult(buildMutationData({'operation':_0x6221ce(0x1d1),'appCode':_0x1f18fd[_0x6221ce(0x1d6)],'key':_0x5222c3,'before':projectAppConfig(_0x3876be),'after':null,'dryRun':!![]}),{'method':_0x6221ce(0x1db),'url':DELETE_PATH});},async 'execute'(_0x40c071){const _0x92a310=a24_0x46d549,_0x3a2c32=readKeyArg(_0x40c071),_0x1ff79a=await mustGetByKey(_0x40c071[_0x92a310(0x1d6)],_0x3a2c32);return await withAppConfigApiBoundary(_0x92a310(0x1d1),{'appCode':_0x40c071[_0x92a310(0x1d6)],'key':_0x3a2c32},()=>deleteAppConfig({'appCode':_0x40c071['appCode'],'id':requireAppConfigId(_0x1ff79a,_0x3a2c32,_0x40c071[_0x92a310(0x1d6)])})),{'ok':!![],'data':buildMutationData({'operation':_0x92a310(0x1d1),'appCode':_0x40c071[_0x92a310(0x1d6)],'key':_0x3a2c32,'before':projectAppConfig(_0x1ff79a),'after':null,'dryRun':![]}),'message':'Deleted\x20app\x20config\x20'+_0x3a2c32};}};async function mustGetByKey(_0x56089d,_0x51e2c8){const _0x22399d=a24_0x46d549,_0x2303f9=await withAppConfigApiBoundary(_0x22399d(0x1da),{'appCode':_0x56089d,'key':_0x51e2c8},()=>getAppConfigByKey(_0x56089d,_0x51e2c8));if(!_0x2303f9)throw CliErrors[_0x22399d(0x1dc)](_0x22399d(0x1cf)+_0x51e2c8,_0x22399d(0x1d3)+_0x56089d);return _0x2303f9;}function requireAppConfigId(_0x1c0724,_0x2a00f2,_0x293744){const _0x307082=a24_0x46d549;if(typeof _0x1c0724['id']===_0x307082(0x1dd)&&Number[_0x307082(0x1d4)](_0x1c0724['id'])&&_0x1c0724['id']>0x0)return _0x1c0724['id'];throw CliErrors['apiError']('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x2a00f2+_0x307082(0x1d7)+_0x293744);}
@@ -1 +1 @@
1
- const a25_0x4d815a=a25_0x53a0;(function(_0xd7b941,_0x14a625){const _0x288457=a25_0x53a0,_0x1712e5=_0xd7b941();while(!![]){try{const _0x4f5f83=-parseInt(_0x288457(0x1a0))/0x1+parseInt(_0x288457(0x19d))/0x2*(-parseInt(_0x288457(0x199))/0x3)+parseInt(_0x288457(0x1a2))/0x4+parseInt(_0x288457(0x19a))/0x5*(parseInt(_0x288457(0x196))/0x6)+parseInt(_0x288457(0x19f))/0x7+parseInt(_0x288457(0x19b))/0x8+-parseInt(_0x288457(0x198))/0x9*(parseInt(_0x288457(0x1a5))/0xa);if(_0x4f5f83===_0x14a625)break;else _0x1712e5['push'](_0x1712e5['shift']());}catch(_0x597956){_0x1712e5['push'](_0x1712e5['shift']());}}}(a25_0x89d3,0x65fd0));function a25_0x53a0(_0x1321a2,_0x3c7ba3){_0x1321a2=_0x1321a2-0x193;const _0x89d321=a25_0x89d3();let _0x53a0a0=_0x89d321[_0x1321a2];return _0x53a0a0;}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';function a25_0x89d3(){const _0x48aed6=['33156tCmJsJ','get','36459cWZGbI','9CbIusZ','415zSjsKM','81448WCTGkk','reveal','481014wjBlQX','appCode','1648878QOrbFG','228730jFNMBG','validation','2946080DFNNcZ','Loaded\x20app\x20config\x20','App\x20config\x20key\x20not\x20found:\x20','180xsJHmi','\x20with\x20value\x20revealed','bool','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used'];a25_0x89d3=function(){return _0x48aed6;};return a25_0x89d3();}export const appConfigGet={'service':'app-config','command':a25_0x4d815a(0x197),'description':a25_0x4d815a(0x195),'risk':'read','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x466ac5){readKeyArg(_0x466ac5);},async 'execute'(_0xe2d7d1){const _0xe9653e=a25_0x4d815a,_0x4cc134=readKeyArg(_0xe2d7d1),_0x48b7bc=await withAppConfigApiBoundary('get',{'appCode':_0xe2d7d1['appCode'],'key':_0x4cc134},()=>getAppConfigByKey(_0xe2d7d1['appCode'],_0x4cc134));if(!_0x48b7bc)throw CliErrors[_0xe9653e(0x1a1)](_0xe9653e(0x1a4)+_0x4cc134,'appCode:\x20'+_0xe2d7d1[_0xe9653e(0x19e)]);const _0x492b6f=projectAppConfig(_0x48b7bc,{'reveal':_0xe2d7d1[_0xe9653e(0x194)](_0xe9653e(0x19c))});return{'ok':!![],'data':{'config':_0x492b6f},'message':_0xe2d7d1[_0xe9653e(0x194)]('reveal')?_0xe9653e(0x1a3)+_0x4cc134+_0xe9653e(0x193):'Loaded\x20app\x20config\x20'+_0x4cc134+'\x20with\x20value\x20redacted'};}};
1
+ const a25_0x758387=a25_0x5b91;function a25_0x5b91(_0x412b76,_0x5c6f10){_0x412b76=_0x412b76-0x1e0;const _0x31aeb9=a25_0x31ae();let _0x5b91d4=_0x31aeb9[_0x412b76];return _0x5b91d4;}function a25_0x31ae(){const _0x3e51a2=['\x20with\x20value\x20revealed','8497rJfIYS','713240YqCglM','18995742hqdRah','validation','appCode','\x20with\x20value\x20redacted','136464rfQrKd','App\x20config\x20key\x20not\x20found:\x20','read','88WRcnTP','135OYeEtu','10993136UpSwVu','appCode:\x20','Loaded\x20app\x20config\x20','reveal','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','get','bool','5170884XwqJXa','3358377VhIgqy'];a25_0x31ae=function(){return _0x3e51a2;};return a25_0x31ae();}(function(_0xb27cce,_0xf74adf){const _0x49c9a0=a25_0x5b91,_0x106815=_0xb27cce();while(!![]){try{const _0x4d3111=-parseInt(_0x49c9a0(0x1ee))/0x1*(parseInt(_0x49c9a0(0x1e2))/0x2)+parseInt(_0x49c9a0(0x1ec))/0x3+parseInt(_0x49c9a0(0x1eb))/0x4+parseInt(_0x49c9a0(0x1e3))/0x5*(-parseInt(_0x49c9a0(0x1f4))/0x6)+parseInt(_0x49c9a0(0x1e4))/0x7+-parseInt(_0x49c9a0(0x1ef))/0x8+-parseInt(_0x49c9a0(0x1f0))/0x9;if(_0x4d3111===_0xf74adf)break;else _0x106815['push'](_0x106815['shift']());}catch(_0x16677a){_0x106815['push'](_0x106815['shift']());}}}(a25_0x31ae,0xc20ff));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':'get','description':a25_0x758387(0x1e8),'risk':a25_0x758387(0x1e1),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x5c17f2){readKeyArg(_0x5c17f2);},async 'execute'(_0x15f63a){const _0x22ea6b=a25_0x758387,_0x1f1ab9=readKeyArg(_0x15f63a),_0x5a02f5=await withAppConfigApiBoundary(_0x22ea6b(0x1e9),{'appCode':_0x15f63a[_0x22ea6b(0x1f2)],'key':_0x1f1ab9},()=>getAppConfigByKey(_0x15f63a[_0x22ea6b(0x1f2)],_0x1f1ab9));if(!_0x5a02f5)throw CliErrors[_0x22ea6b(0x1f1)](_0x22ea6b(0x1e0)+_0x1f1ab9,_0x22ea6b(0x1e5)+_0x15f63a[_0x22ea6b(0x1f2)]);const _0x23ca58=projectAppConfig(_0x5a02f5,{'reveal':_0x15f63a[_0x22ea6b(0x1ea)]('reveal')});return{'ok':!![],'data':{'config':_0x23ca58},'message':_0x15f63a['bool'](_0x22ea6b(0x1e7))?'Loaded\x20app\x20config\x20'+_0x1f1ab9+_0x22ea6b(0x1ed):_0x22ea6b(0x1e6)+_0x1f1ab9+_0x22ea6b(0x1f3)};}};
@@ -1 +1 @@
1
- function a26_0x42f5(_0x567aa5,_0x312ac3){_0x567aa5=_0x567aa5-0x15b;const _0x1042eb=a26_0x1042();let _0x42f59b=_0x1042eb[_0x567aa5];return _0x42f59b;}(function(_0x4725c2,_0x405856){const _0x147dc7=a26_0x42f5,_0x55dcb7=_0x4725c2();while(!![]){try{const _0x20f3ce=-parseInt(_0x147dc7(0x162))/0x1*(parseInt(_0x147dc7(0x161))/0x2)+parseInt(_0x147dc7(0x160))/0x3+parseInt(_0x147dc7(0x163))/0x4+parseInt(_0x147dc7(0x15d))/0x5*(-parseInt(_0x147dc7(0x164))/0x6)+parseInt(_0x147dc7(0x15b))/0x7+parseInt(_0x147dc7(0x15f))/0x8*(parseInt(_0x147dc7(0x165))/0x9)+parseInt(_0x147dc7(0x15e))/0xa*(parseInt(_0x147dc7(0x15c))/0xb);if(_0x20f3ce===_0x405856)break;else _0x55dcb7['push'](_0x55dcb7['shift']());}catch(_0x19d779){_0x55dcb7['push'](_0x55dcb7['shift']());}}}(a26_0x1042,0x5f57e));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';function a26_0x1042(){const _0x56bcc6=['326672SuBbRx','1034865cTEtEj','118QZQAQx','7617IDXIyu','127600jPlYRY','3551898HuKbIW','9JMYwgw','3424239RjCCmP','418cWDaJt','5aGBArq','138170pJMmAg'];a26_0x1042=function(){return _0x56bcc6;};return a26_0x1042();}import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
1
+ (function(_0x4b8f5a,_0x3e4694){const _0x2cc85c=a26_0x3229,_0x46aa4a=_0x4b8f5a();while(!![]){try{const _0x2d8b0a=parseInt(_0x2cc85c(0x1e9))/0x1+-parseInt(_0x2cc85c(0x1e6))/0x2+-parseInt(_0x2cc85c(0x1e8))/0x3+-parseInt(_0x2cc85c(0x1ec))/0x4*(parseInt(_0x2cc85c(0x1e7))/0x5)+parseInt(_0x2cc85c(0x1ea))/0x6+parseInt(_0x2cc85c(0x1e5))/0x7+parseInt(_0x2cc85c(0x1ed))/0x8*(parseInt(_0x2cc85c(0x1eb))/0x9);if(_0x2d8b0a===_0x3e4694)break;else _0x46aa4a['push'](_0x46aa4a['shift']());}catch(_0x1f90cd){_0x46aa4a['push'](_0x46aa4a['shift']());}}}(a26_0x1f35,0x783b5));import{appConfigList}from'../../commands/app-config/list.js';function a26_0x1f35(){const _0x531d18=['324094xePhhI','4244826JGFjSJ','297GJOapP','40SxEkba','26624QPeyxF','4800775sxMpmK','1613978npiATx','109290sNZPld','927528QSIjzn'];a26_0x1f35=function(){return _0x531d18;};return a26_0x1f35();}import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';function a26_0x3229(_0x15244a,_0x2c59a7){_0x15244a=_0x15244a-0x1e5;const _0x1f35e8=a26_0x1f35();let _0x3229f9=_0x1f35e8[_0x15244a];return _0x3229f9;}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
@@ -1 +1 @@
1
- function a27_0x1097(_0x40d831,_0x267057){_0x40d831=_0x40d831-0x162;const _0x3d0766=a27_0x3d07();let _0x10974d=_0x3d0766[_0x40d831];return _0x10974d;}const a27_0x156672=a27_0x1097;(function(_0x321547,_0x505973){const _0x232dfb=a27_0x1097,_0x58d297=_0x321547();while(!![]){try{const _0x10b28a=-parseInt(_0x232dfb(0x174))/0x1+-parseInt(_0x232dfb(0x16d))/0x2*(parseInt(_0x232dfb(0x169))/0x3)+-parseInt(_0x232dfb(0x168))/0x4*(-parseInt(_0x232dfb(0x175))/0x5)+parseInt(_0x232dfb(0x165))/0x6*(parseInt(_0x232dfb(0x176))/0x7)+-parseInt(_0x232dfb(0x16b))/0x8+-parseInt(_0x232dfb(0x166))/0x9*(parseInt(_0x232dfb(0x173))/0xa)+parseInt(_0x232dfb(0x16e))/0xb;if(_0x10b28a===_0x505973)break;else _0x58d297['push'](_0x58d297['shift']());}catch(_0x26bb9c){_0x58d297['push'](_0x58d297['shift']());}}}(a27_0x3d07,0xb3964));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_0x3d07(){const _0x58b16c=['\x20app\x20config(s)','length','6FPgNwR','81XkwXIM','Filter\x20by\x20exact\x20config\x20key','4YLYbph','9DUUfxl','trim','5891984fiZeTV','str','129992ZpErMI','25946492BxXwqU','read','appCode','map','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','708740uWDipm','1122728zpobNH','2395115TAdqdz','4129111CulaMl','string'];a27_0x3d07=function(){return _0x58b16c;};return a27_0x3d07();}export const appConfigList={'service':'app-config','command':'list','description':a27_0x156672(0x172),'risk':a27_0x156672(0x16f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'key','type':a27_0x156672(0x162),'description':a27_0x156672(0x167)},TAGS_FLAG],async 'validate'(_0x5291c7){const _0x4e1dc3=a27_0x156672,_0x1f3c90=_0x5291c7[_0x4e1dc3(0x16c)]('key')[_0x4e1dc3(0x16a)]();if(_0x1f3c90)validateKey(_0x1f3c90);readOptionalTags(_0x5291c7);},async 'execute'(_0x51fd94){const _0x10c3ae=a27_0x156672,_0x48767d=_0x51fd94[_0x10c3ae(0x16c)]('key')[_0x10c3ae(0x16a)]()||undefined,_0x5665a6=readOptionalTags(_0x51fd94),_0x288560=await withAppConfigApiBoundary('list',{'appCode':_0x51fd94[_0x10c3ae(0x170)]},()=>listAppConfigs(_0x51fd94[_0x10c3ae(0x170)],{'key':_0x48767d,'tags':_0x5665a6})),_0x5d15a8=_0x288560[_0x10c3ae(0x171)](_0x411338=>projectAppConfig(_0x411338));return{'ok':!![],'data':{'appCode':_0x51fd94[_0x10c3ae(0x170)],'count':_0x5d15a8[_0x10c3ae(0x164)],'configs':_0x5d15a8},'message':'Found\x20'+_0x5d15a8[_0x10c3ae(0x164)]+_0x10c3ae(0x163)};}};
1
+ function a27_0x1996(_0x57c7b1,_0x1eff84){_0x57c7b1=_0x57c7b1-0x184;const _0x3bb76c=a27_0x3bb7();let _0x199610=_0x3bb76c[_0x57c7b1];return _0x199610;}function a27_0x3bb7(){const _0x30cf3a=['Found\x20','list','trim','38678002wOLvow','map','160yuDZVG','29030NusxHY','appCode','read','3019392wOLUjg','340824EiVisg','Filter\x20by\x20exact\x20config\x20key','app-config','4707ASSwVC','string','203758KShKDY','key','length','\x20app\x20config(s)','13cYsSpt','str','11112qgmfjD','7896xNBnTN','3813816mxBYdG'];a27_0x3bb7=function(){return _0x30cf3a;};return a27_0x3bb7();}const a27_0x2d0b44=a27_0x1996;(function(_0x510133,_0xcb32e8){const _0x58393d=a27_0x1996,_0x25d85a=_0x510133();while(!![]){try{const _0x466168=parseInt(_0x58393d(0x186))/0x1*(-parseInt(_0x58393d(0x19a))/0x2)+parseInt(_0x58393d(0x194))/0x3+-parseInt(_0x58393d(0x18a))/0x4+-parseInt(_0x58393d(0x190))/0x5*(-parseInt(_0x58393d(0x195))/0x6)+-parseInt(_0x58393d(0x189))/0x7*(parseInt(_0x58393d(0x188))/0x8)+parseInt(_0x58393d(0x198))/0x9*(-parseInt(_0x58393d(0x191))/0xa)+parseInt(_0x58393d(0x18e))/0xb;if(_0x466168===_0xcb32e8)break;else _0x25d85a['push'](_0x25d85a['shift']());}catch(_0x35fc91){_0x25d85a['push'](_0x25d85a['shift']());}}}(a27_0x3bb7,0xeea18));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x2d0b44(0x197),'command':a27_0x2d0b44(0x18c),'description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0x2d0b44(0x193),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x2d0b44(0x19b),'type':a27_0x2d0b44(0x199),'description':a27_0x2d0b44(0x196)},TAGS_FLAG],async 'validate'(_0x2933ba){const _0x550442=a27_0x2d0b44,_0x102f99=_0x2933ba[_0x550442(0x187)]('key')[_0x550442(0x18d)]();if(_0x102f99)validateKey(_0x102f99);readOptionalTags(_0x2933ba);},async 'execute'(_0x2f2983){const _0x3a49b0=a27_0x2d0b44,_0xbae17a=_0x2f2983[_0x3a49b0(0x187)](_0x3a49b0(0x19b))[_0x3a49b0(0x18d)]()||undefined,_0x45ffbb=readOptionalTags(_0x2f2983),_0x67d264=await withAppConfigApiBoundary(_0x3a49b0(0x18c),{'appCode':_0x2f2983[_0x3a49b0(0x192)]},()=>listAppConfigs(_0x2f2983[_0x3a49b0(0x192)],{'key':_0xbae17a,'tags':_0x45ffbb})),_0x421b6d=_0x67d264[_0x3a49b0(0x18f)](_0x61354c=>projectAppConfig(_0x61354c));return{'ok':!![],'data':{'appCode':_0x2f2983['appCode'],'count':_0x421b6d[_0x3a49b0(0x184)],'configs':_0x421b6d},'message':_0x3a49b0(0x18b)+_0x421b6d['length']+_0x3a49b0(0x185)};}};
@@ -1 +1 @@
1
- const a28_0x31a406=a28_0x2947;function a28_0x2947(_0x5cfd39,_0x199e2a){_0x5cfd39=_0x5cfd39-0x71;const _0x141c2a=a28_0x141c();let _0x294766=_0x141c2a[_0x5cfd39];return _0x294766;}(function(_0x557af4,_0x41664d){const _0x8aa174=a28_0x2947,_0x40f0ee=_0x557af4();while(!![]){try{const _0x298038=parseInt(_0x8aa174(0x76))/0x1+parseInt(_0x8aa174(0x8c))/0x2*(-parseInt(_0x8aa174(0x8a))/0x3)+parseInt(_0x8aa174(0x75))/0x4*(-parseInt(_0x8aa174(0x82))/0x5)+parseInt(_0x8aa174(0x84))/0x6+parseInt(_0x8aa174(0x86))/0x7*(-parseInt(_0x8aa174(0x7d))/0x8)+parseInt(_0x8aa174(0x78))/0x9+parseInt(_0x8aa174(0x83))/0xa;if(_0x298038===_0x41664d)break;else _0x40f0ee['push'](_0x40f0ee['shift']());}catch(_0x312d83){_0x40f0ee['push'](_0x40f0ee['shift']());}}}(a28_0x141c,0xb2159));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0x31a406(0x88),UPDATE_PATH=a28_0x31a406(0x71);export const appConfigSet={'service':a28_0x31a406(0x7c),'command':'set','description':a28_0x31a406(0x77),'risk':a28_0x31a406(0x7e),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x31a406(0x73),'description':'Read\x20config\x20value\x20from\x20file'}],async 'validate'(_0x2634fd){readKeyArg(_0x2634fd),readOptionalTags(_0x2634fd),assertSingleValueSource(_0x2634fd);},async 'dryRun'(_0x1b4dcd){const _0x262140=a28_0x31a406,_0x4bdc90=readKeyArg(_0x1b4dcd),_0x4fda2a=readOptionalTags(_0x1b4dcd),_0x2d7aad=assertSingleValueSource(_0x1b4dcd);await assertValueSourceReadable(_0x2d7aad);const _0x33fdad=await withAppConfigApiBoundary(_0x262140(0x80),{'appCode':_0x1b4dcd[_0x262140(0x87)],'key':_0x4bdc90},()=>getAppConfigByKey(_0x1b4dcd[_0x262140(0x87)],_0x4bdc90)),_0xe4029b=_0x33fdad?_0x262140(0x7b):_0x262140(0x7f),_0x5e1a45=_0x33fdad?projectAppConfig(_0x33fdad):null,_0x6155a0=plannedAppConfig({'appCode':_0x1b4dcd[_0x262140(0x87)],'key':_0x4bdc90,'tags':_0x4fda2a??_0x33fdad?.[_0x262140(0x8b)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0xe4029b,'appCode':_0x1b4dcd[_0x262140(0x87)],'key':_0x4bdc90,'before':_0x5e1a45,'after':_0x6155a0,'dryRun':!![]}),{'method':_0x262140(0x7a),'url':_0xe4029b===_0x262140(0x7b)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x374f16){const _0x38b344=a28_0x31a406,_0x3aa516=readKeyArg(_0x374f16),_0x3f2372=readOptionalTags(_0x374f16),_0x3ed79f=await withAppConfigApiBoundary(_0x38b344(0x80),{'appCode':_0x374f16[_0x38b344(0x87)],'key':_0x3aa516},()=>getAppConfigByKey(_0x374f16[_0x38b344(0x87)],_0x3aa516)),_0x2f57c5=_0x3ed79f?projectAppConfig(_0x3ed79f):null,_0x4bfdfe=_0x3ed79f?'update':'create',{value:_0x58a876,warnings:_0x2684c5}=await readAppConfigValue(_0x374f16),_0x2d6361={'appCode':_0x374f16[_0x38b344(0x87)],'key':_0x3aa516,'value':_0x58a876,'tags':_0x3f2372??_0x3ed79f?.[_0x38b344(0x8b)]??undefined};await withAppConfigApiBoundary(_0x4bfdfe,{'appCode':_0x374f16['appCode'],'key':_0x3aa516},async()=>{const _0xb91d92=_0x38b344;_0x3ed79f?await updateAppConfig({..._0x2d6361,'id':requireAppConfigId(_0x3ed79f,_0x3aa516,_0x374f16[_0xb91d92(0x87)])}):await createAppConfig(_0x2d6361);});const _0x21f01a=await withAppConfigApiBoundary(_0x38b344(0x80),{'appCode':_0x374f16['appCode'],'key':_0x3aa516},()=>getAppConfigByKey(_0x374f16['appCode'],_0x3aa516)),_0x34e28d=_0x21f01a?projectAppConfig(_0x21f01a):plannedAppConfig({'appCode':_0x374f16[_0x38b344(0x87)],'key':_0x3aa516,'tags':_0x2d6361[_0x38b344(0x8b)],'hasValue':_0x58a876!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x4bfdfe,'appCode':_0x374f16[_0x38b344(0x87)],'key':_0x3aa516,'before':_0x2f57c5,'after':_0x34e28d,'dryRun':![],'warnings':_0x2684c5}),'message':(_0x4bfdfe==='update'?'Updated':_0x38b344(0x74))+_0x38b344(0x89)+_0x3aa516};}};function requireAppConfigId(_0x3d99c2,_0x26dac5,_0x294f0a){const _0x5816f2=a28_0x31a406;if(typeof _0x3d99c2['id']===_0x5816f2(0x79)&&Number['isFinite'](_0x3d99c2['id'])&&_0x3d99c2['id']>0x0)return _0x3d99c2['id'];throw CliErrors[_0x5816f2(0x81)](_0x5816f2(0x72)+_0x26dac5+_0x5816f2(0x85)+_0x294f0a);}function a28_0x141c(){const _0x3d6119=['update','app-config','8Hxqxld','write','create','get','apiError','391920JEMWcD','2794900RjDGmn','2159148YyqzXn',',\x20appCode=','6572153NWVTtV','appCode','/smartapi/app-config/create','\x20app\x20config\x20','3YxsGdX','tags','2346374lIvHBM','/smartapi/app-config/update','App\x20config\x20server\x20id\x20missing\x20for\x20key=','string','Created','16chYIAp','1092701SgaqGc','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','12806874CcmAEV','number','POST'];a28_0x141c=function(){return _0x3d6119;};return a28_0x141c();}
1
+ function a28_0x4a10(){const _0x2c78e5=['/smartapi/app-config/create','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','isFinite','app-config','number','set','create','tags','25VgANGo','get','5250160FcdPvI','string','77255YfHkQd','apiError','update','/smartapi/app-config/update','App\x20config\x20server\x20id\x20missing\x20for\x20key=','appCode','16693160EwvqQR','38001UlhWqt','7792IvTtxE','5532156vSDDpK','84IgmINv','\x20app\x20config\x20','write','307302yIExgm','14YqcXZm'];a28_0x4a10=function(){return _0x2c78e5;};return a28_0x4a10();}const a28_0x4012f8=a28_0x5278;function a28_0x5278(_0x29252f,_0x56c4b2){_0x29252f=_0x29252f-0x188;const _0x4a105e=a28_0x4a10();let _0x5278a6=_0x4a105e[_0x29252f];return _0x5278a6;}(function(_0x19a17f,_0x12a95c){const _0x4f9e33=a28_0x5278,_0x4e68c1=_0x19a17f();while(!![]){try{const _0x3ad40f=parseInt(_0x4f9e33(0x18e))/0x1*(-parseInt(_0x4f9e33(0x19c))/0x2)+-parseInt(_0x4f9e33(0x195))/0x3+-parseInt(_0x4f9e33(0x18c))/0x4+-parseInt(_0x4f9e33(0x18a))/0x5*(-parseInt(_0x4f9e33(0x19b))/0x6)+parseInt(_0x4f9e33(0x198))/0x7*(parseInt(_0x4f9e33(0x196))/0x8)+parseInt(_0x4f9e33(0x197))/0x9+parseInt(_0x4f9e33(0x194))/0xa;if(_0x3ad40f===_0x12a95c)break;else _0x4e68c1['push'](_0x4e68c1['shift']());}catch(_0x179b59){_0x4e68c1['push'](_0x4e68c1['shift']());}}}(a28_0x4a10,0xa76d5));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0x4012f8(0x19d),UPDATE_PATH=a28_0x4012f8(0x191);export const appConfigSet={'service':a28_0x4012f8(0x1a0),'command':a28_0x4012f8(0x1a2),'description':a28_0x4012f8(0x19e),'risk':a28_0x4012f8(0x19a),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x4012f8(0x18d),'description':'Read\x20config\x20value\x20from\x20file'}],async 'validate'(_0x5987c8){readKeyArg(_0x5987c8),readOptionalTags(_0x5987c8),assertSingleValueSource(_0x5987c8);},async 'dryRun'(_0x5a0abf){const _0x44334d=a28_0x4012f8,_0x1a256b=readKeyArg(_0x5a0abf),_0xa82af6=readOptionalTags(_0x5a0abf),_0x303da4=assertSingleValueSource(_0x5a0abf);await assertValueSourceReadable(_0x303da4);const _0x5d6c30=await withAppConfigApiBoundary(_0x44334d(0x18b),{'appCode':_0x5a0abf['appCode'],'key':_0x1a256b},()=>getAppConfigByKey(_0x5a0abf[_0x44334d(0x193)],_0x1a256b)),_0x105f12=_0x5d6c30?_0x44334d(0x190):_0x44334d(0x188),_0x5a6f35=_0x5d6c30?projectAppConfig(_0x5d6c30):null,_0x98eae6=plannedAppConfig({'appCode':_0x5a0abf[_0x44334d(0x193)],'key':_0x1a256b,'tags':_0xa82af6??_0x5d6c30?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x105f12,'appCode':_0x5a0abf[_0x44334d(0x193)],'key':_0x1a256b,'before':_0x5a6f35,'after':_0x98eae6,'dryRun':!![]}),{'method':'POST','url':_0x105f12===_0x44334d(0x190)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x3a8167){const _0x154da8=a28_0x4012f8,_0x4ee063=readKeyArg(_0x3a8167),_0x1f0368=readOptionalTags(_0x3a8167),_0x2bd07a=await withAppConfigApiBoundary(_0x154da8(0x18b),{'appCode':_0x3a8167[_0x154da8(0x193)],'key':_0x4ee063},()=>getAppConfigByKey(_0x3a8167[_0x154da8(0x193)],_0x4ee063)),_0x655c3c=_0x2bd07a?projectAppConfig(_0x2bd07a):null,_0x25c36e=_0x2bd07a?_0x154da8(0x190):_0x154da8(0x188),{value:_0x2bddf6,warnings:_0x2d1ed0}=await readAppConfigValue(_0x3a8167),_0x337a63={'appCode':_0x3a8167[_0x154da8(0x193)],'key':_0x4ee063,'value':_0x2bddf6,'tags':_0x1f0368??_0x2bd07a?.[_0x154da8(0x189)]??undefined};await withAppConfigApiBoundary(_0x25c36e,{'appCode':_0x3a8167['appCode'],'key':_0x4ee063},async()=>{const _0x3a933e=_0x154da8;_0x2bd07a?await updateAppConfig({..._0x337a63,'id':requireAppConfigId(_0x2bd07a,_0x4ee063,_0x3a8167[_0x3a933e(0x193)])}):await createAppConfig(_0x337a63);});const _0x201d9d=await withAppConfigApiBoundary('get',{'appCode':_0x3a8167[_0x154da8(0x193)],'key':_0x4ee063},()=>getAppConfigByKey(_0x3a8167[_0x154da8(0x193)],_0x4ee063)),_0x5efa01=_0x201d9d?projectAppConfig(_0x201d9d):plannedAppConfig({'appCode':_0x3a8167[_0x154da8(0x193)],'key':_0x4ee063,'tags':_0x337a63[_0x154da8(0x189)],'hasValue':_0x2bddf6!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x25c36e,'appCode':_0x3a8167['appCode'],'key':_0x4ee063,'before':_0x655c3c,'after':_0x5efa01,'dryRun':![],'warnings':_0x2d1ed0}),'message':(_0x25c36e===_0x154da8(0x190)?'Updated':'Created')+_0x154da8(0x199)+_0x4ee063};}};function requireAppConfigId(_0x196723,_0x1b9ea4,_0x36a6b0){const _0x5e8726=a28_0x4012f8;if(typeof _0x196723['id']===_0x5e8726(0x1a1)&&Number[_0x5e8726(0x19f)](_0x196723['id'])&&_0x196723['id']>0x0)return _0x196723['id'];throw CliErrors[_0x5e8726(0x18f)](_0x5e8726(0x192)+_0x1b9ea4+',\x20appCode='+_0x36a6b0);}
@@ -1 +1 @@
1
- const a29_0x46e815=a29_0xf71a;function a29_0x5eba(){const _0x29f776=['Read\x20config\x20value\x20from\x20stdin','length','reveal','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','utf8','Missing\x20app-config\x20value\x20source.','513552kSpbsz','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Runtime\x20app-config\x20key','kind','Config\x20tags\x20for\x20filtering/display\x20metadata','push','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Value\x20file\x20is\x20not\x20readable:\x20','data','779962GoONXW','tags','operation','join','boolean','Environment\x20variable\x20is\x20not\x20set:\x20','method','trim','name','file','error','env','from-env','valueRedacted','appCode:\x20','2050MZFkOv','901944LHFhZy','argument','slice','3436110TQnEuQ','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','35NwwneZ','dryRun','str','path','23967Duhhaq','url','gmtModified','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','once','value','string','args','key','gmtCreate','2880285reMkdd','stdin','31856RCcMYR','before','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','bool','apiError','appCode','value\x20is\x20redacted','end','201rFEXXt','key:\x20','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','validation','flag','hasValue','Failed\x20to\x20','\x20app\x20config.'];a29_0x5eba=function(){return _0x29f776;};return a29_0x5eba();}(function(_0x1bd3a2,_0x5e4efe){const _0x277c1f=a29_0xf71a,_0x3c032e=_0x1bd3a2();while(!![]){try{const _0x5020e0=-parseInt(_0x277c1f(0x16a))/0x1+parseInt(_0x277c1f(0x173))/0x2+parseInt(_0x277c1f(0x1a0))/0x3*(parseInt(_0x277c1f(0x198))/0x4)+-parseInt(_0x277c1f(0x196))/0x5+-parseInt(_0x277c1f(0x186))/0x6+-parseInt(_0x277c1f(0x188))/0x7*(-parseInt(_0x277c1f(0x183))/0x8)+-parseInt(_0x277c1f(0x18c))/0x9*(-parseInt(_0x277c1f(0x182))/0xa);if(_0x5020e0===_0x5e4efe)break;else _0x3c032e['push'](_0x3c032e['shift']());}catch(_0x71cd1f){_0x3c032e['push'](_0x3c032e['shift']());}}}(a29_0x5eba,0x5a8d9));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':a29_0x46e815(0x16c),'required':!![]};export const VALUE_ARG={'name':a29_0x46e815(0x191),'description':a29_0x46e815(0x167),'required':![]};export const TAGS_FLAG={'name':a29_0x46e815(0x174),'type':a29_0x46e815(0x192),'description':a29_0x46e815(0x16e)};export const STDIN_FLAG={'name':a29_0x46e815(0x197),'type':a29_0x46e815(0x177),'description':a29_0x46e815(0x164),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x46e815(0x17f),'type':a29_0x46e815(0x192),'description':a29_0x46e815(0x19a)};export const REVEAL_FLAG={'name':a29_0x46e815(0x166),'type':a29_0x46e815(0x177),'description':a29_0x46e815(0x18f),'default':![]};export function readKeyArg(_0x1879a6){const _0x5d59a7=a29_0x46e815,_0x5b563f=_0x1879a6[_0x5d59a7(0x193)][0x0]?.[_0x5d59a7(0x17a)]()??'';return validateKey(_0x5b563f),_0x5b563f;}export function readOptionalTags(_0x2b8bf1){const _0x2ffe86=a29_0x46e815,_0x2e1d95=_0x2b8bf1[_0x2ffe86(0x18a)](_0x2ffe86(0x174))[_0x2ffe86(0x17a)]();if(!_0x2e1d95)return undefined;if(_0x2e1d95[_0x2ffe86(0x165)]>0x20)throw CliErrors['validation'](_0x2ffe86(0x1a2));return _0x2e1d95;}export function validateKey(_0xf2b480){const _0x323d8b=a29_0x46e815;if(!_0xf2b480)throw CliErrors[_0x323d8b(0x1a3)]('Missing\x20app-config\x20key.');if(_0xf2b480[_0x323d8b(0x165)]>0x100)throw CliErrors['validation']('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x59a4ed,_0x11daf0){const _0x16f15e=a29_0x46e815,_0x441dc2=_0x59a4ed[_0x16f15e(0x191)]!==undefined&&_0x59a4ed[_0x16f15e(0x191)]!==null&&_0x59a4ed[_0x16f15e(0x191)]!=='',_0x2df14d={'appCode':_0x59a4ed['appCode'],'key':_0x59a4ed[_0x16f15e(0x194)],'tags':_0x59a4ed[_0x16f15e(0x174)]??undefined,'hasValue':_0x441dc2,'valueRedacted':_0x441dc2&&!_0x11daf0?.[_0x16f15e(0x166)],'gmtCreate':_0x59a4ed[_0x16f15e(0x195)],'gmtModified':_0x59a4ed[_0x16f15e(0x18e)]};return _0x11daf0?.[_0x16f15e(0x166)]&&(_0x2df14d['value']=_0x59a4ed[_0x16f15e(0x191)]??'',_0x2df14d[_0x16f15e(0x180)]=![]),_0x2df14d;}export function plannedAppConfig(_0x532600){const _0x5e3d9e=a29_0x46e815,_0x38b8d7=_0x532600[_0x5e3d9e(0x161)]??!![];return{'appCode':_0x532600['appCode'],'key':_0x532600[_0x5e3d9e(0x194)],'tags':_0x532600[_0x5e3d9e(0x174)]??undefined,'hasValue':_0x38b8d7,'valueRedacted':_0x38b8d7};}export function buildMutationData(_0x53169e){const _0x5f096b=a29_0x46e815;return{'operation':_0x53169e[_0x5f096b(0x175)],'selector':{'appCode':_0x53169e[_0x5f096b(0x19d)],'key':_0x53169e[_0x5f096b(0x194)]},'before':_0x53169e[_0x5f096b(0x199)],'after':_0x53169e['after'],'dryRun':_0x53169e[_0x5f096b(0x189)],'warnings':_0x53169e['warnings']??[]};}export async function withAppConfigApiBoundary(_0x1544dc,_0x1badb7,_0x4dac0e){const _0x428166=a29_0x46e815;try{return await _0x4dac0e();}catch{const _0x4fa6ff=[_0x428166(0x181)+_0x1badb7[_0x428166(0x19d)]];if(_0x1badb7[_0x428166(0x194)])_0x4fa6ff['push'](_0x428166(0x1a1)+_0x1badb7['key']);_0x4fa6ff[_0x428166(0x16f)](_0x428166(0x19e));throw CliErrors[_0x428166(0x19c)](_0x428166(0x162)+_0x1544dc+_0x428166(0x163),_0x4fa6ff['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x19935d,_0x4f47e4){const _0xdde049=a29_0x46e815;return Object['defineProperties'](_0x19935d,{'method':{'value':_0x4f47e4[_0xdde049(0x179)],'enumerable':![]},'url':{'value':_0x4f47e4[_0xdde049(0x18d)],'enumerable':![]}});}function a29_0xf71a(_0x174f34,_0x17cd1f){_0x174f34=_0x174f34-0x160;const _0x5ebaa0=a29_0x5eba();let _0xf71a01=_0x5ebaa0[_0x174f34];return _0xf71a01;}export function assertSingleValueSource(_0x568995){const _0x33a6f3=a29_0x46e815,_0x1f3272=[];_0x568995[_0x33a6f3(0x193)]['length']>0x1&&_0x1f3272[_0x33a6f3(0x16f)]({'kind':'argument','value':_0x568995['args'][_0x33a6f3(0x185)](0x1)[_0x33a6f3(0x176)]('\x20')});const _0x582e63=_0x568995[_0x33a6f3(0x160)](_0x33a6f3(0x191));_0x582e63!==undefined&&_0x582e63!==null&&_0x1f3272[_0x33a6f3(0x16f)]({'kind':_0x33a6f3(0x184),'value':String(_0x582e63)});_0x568995[_0x33a6f3(0x19b)](_0x33a6f3(0x197))&&_0x1f3272[_0x33a6f3(0x16f)]({'kind':'stdin'});const _0x32d209=_0x568995[_0x33a6f3(0x18a)]('from-env')['trim']();_0x32d209&&_0x1f3272[_0x33a6f3(0x16f)]({'kind':'env','name':_0x32d209});const _0x2b4119=_0x568995[_0x33a6f3(0x18a)](_0x33a6f3(0x17c))[_0x33a6f3(0x17a)]();_0x2b4119&&_0x1f3272[_0x33a6f3(0x16f)]({'kind':_0x33a6f3(0x17c),'path':_0x2b4119});if(_0x1f3272[_0x33a6f3(0x165)]===0x0)throw CliErrors[_0x33a6f3(0x1a3)](_0x33a6f3(0x169),_0x33a6f3(0x170));if(_0x1f3272[_0x33a6f3(0x165)]>0x1)throw CliErrors[_0x33a6f3(0x1a3)]('App\x20config\x20value\x20source\x20is\x20ambiguous.',_0x33a6f3(0x187));return _0x1f3272[0x0];}export async function assertValueSourceReadable(_0x713dc4){const _0x2182dc=a29_0x46e815;if(_0x713dc4[_0x2182dc(0x16d)]===_0x2182dc(0x17e)&&!(_0x713dc4[_0x2182dc(0x17b)]in process.env))throw CliErrors[_0x2182dc(0x1a3)](_0x2182dc(0x178)+_0x713dc4[_0x2182dc(0x17b)]);if(_0x713dc4['kind']===_0x2182dc(0x17c))try{await access(_0x713dc4[_0x2182dc(0x18b)]);}catch{throw CliErrors[_0x2182dc(0x1a3)](_0x2182dc(0x171)+_0x713dc4[_0x2182dc(0x18b)]);}}export async function readAppConfigValue(_0x4f241c){const _0x546ae2=a29_0x46e815,_0x203c7b=assertSingleValueSource(_0x4f241c),_0x2c3715=[];if(_0x203c7b[_0x546ae2(0x16d)]===_0x546ae2(0x184))return _0x2c3715[_0x546ae2(0x16f)](_0x546ae2(0x16b)),{'value':_0x203c7b[_0x546ae2(0x191)]??'','source':_0x203c7b['kind'],'warnings':_0x2c3715};if(_0x203c7b['kind']==='stdin')return{'value':await readStdin(),'source':_0x203c7b[_0x546ae2(0x16d)],'warnings':_0x2c3715};if(_0x203c7b[_0x546ae2(0x16d)]===_0x546ae2(0x17e)){if(!(_0x203c7b[_0x546ae2(0x17b)]in process.env))throw CliErrors[_0x546ae2(0x1a3)](_0x546ae2(0x178)+_0x203c7b['name']);return{'value':process.env[_0x203c7b.name]??'','source':_0x203c7b['kind'],'warnings':_0x2c3715};}return{'value':await readFile(_0x203c7b['path'],_0x546ae2(0x168)),'source':_0x203c7b[_0x546ae2(0x16d)],'warnings':_0x2c3715};}function readStdin(){return new Promise((_0x4171fd,_0x543860)=>{const _0xf1b3a=a29_0xf71a;let _0x1d5473='';process['stdin']['setEncoding'](_0xf1b3a(0x168)),process[_0xf1b3a(0x197)]['on'](_0xf1b3a(0x172),_0x2be7cf=>{_0x1d5473+=_0x2be7cf;}),process[_0xf1b3a(0x197)][_0xf1b3a(0x190)](_0xf1b3a(0x19f),()=>_0x4171fd(_0x1d5473)),process[_0xf1b3a(0x197)][_0xf1b3a(0x190)](_0xf1b3a(0x17d),_0x543860);});}
1
+ const a29_0x25d7b0=a29_0x1eb6;(function(_0x26bac2,_0x41d2eb){const _0x38c13b=a29_0x1eb6,_0x29470d=_0x26bac2();while(!![]){try{const _0x334cf0=parseInt(_0x38c13b(0x1ab))/0x1+-parseInt(_0x38c13b(0x1b6))/0x2+parseInt(_0x38c13b(0x1a2))/0x3*(-parseInt(_0x38c13b(0x188))/0x4)+-parseInt(_0x38c13b(0x18e))/0x5*(-parseInt(_0x38c13b(0x1b0))/0x6)+-parseInt(_0x38c13b(0x19a))/0x7*(parseInt(_0x38c13b(0x1b4))/0x8)+parseInt(_0x38c13b(0x1b8))/0x9+parseInt(_0x38c13b(0x191))/0xa*(parseInt(_0x38c13b(0x1af))/0xb);if(_0x334cf0===_0x41d2eb)break;else _0x29470d['push'](_0x29470d['shift']());}catch(_0x2d2d61){_0x29470d['push'](_0x29470d['shift']());}}}(a29_0x2150,0x92b6f));function a29_0x2150(){const _0x3ee100=['join','hasValue','args','gmtModified','21469Bcpuic','dryRun','kind','App\x20config\x20value\x20source\x20is\x20ambiguous.','boolean','file','Config\x20tags\x20for\x20filtering/display\x20metadata','once','45078ReVbin','path','apiError','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Missing\x20app-config\x20key.','key:\x20','value','str','key','162361QjVOIR','validation','Environment\x20variable\x20is\x20not\x20set:\x20','appCode','12158707jiOXqh','657894bvDYYP','name','Read\x20config\x20value\x20from\x20stdin','from-env','584RmxEth','error','1547100RiaDVz','bool','5911119ACJotu','method','before','flag','push','utf8','after','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','length','\x20app\x20config.','Value\x20file\x20is\x20not\x20readable:\x20','appCode:\x20','data','setEncoding','116JQFhEH','reveal','operation','value\x20is\x20redacted','slice','valueRedacted','5sqkpUv','tags','env','10PHzpVy','argument','trim','stdin','string'];a29_0x2150=function(){return _0x3ee100;};return a29_0x2150();}import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x25d7b0(0x1aa),'description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x25d7b0(0x1a5),'required':![]};export const TAGS_FLAG={'name':a29_0x25d7b0(0x18f),'type':a29_0x25d7b0(0x195),'description':a29_0x25d7b0(0x1a0)};export const STDIN_FLAG={'name':a29_0x25d7b0(0x194),'type':a29_0x25d7b0(0x19e),'description':a29_0x25d7b0(0x1b2),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x25d7b0(0x1b3),'type':a29_0x25d7b0(0x195),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0x25d7b0(0x189),'type':a29_0x25d7b0(0x19e),'description':a29_0x25d7b0(0x181),'default':![]};function a29_0x1eb6(_0x155f82,_0x3a86cb){_0x155f82=_0x155f82-0x180;const _0x215067=a29_0x2150();let _0x1eb62c=_0x215067[_0x155f82];return _0x1eb62c;}export function readKeyArg(_0x1de529){const _0x3c4e71=a29_0x25d7b0,_0x227e68=_0x1de529[_0x3c4e71(0x198)][0x0]?.[_0x3c4e71(0x193)]()??'';return validateKey(_0x227e68),_0x227e68;}export function readOptionalTags(_0x249fd9){const _0x43ae69=a29_0x25d7b0,_0x573433=_0x249fd9[_0x43ae69(0x1a9)](_0x43ae69(0x18f))[_0x43ae69(0x193)]();if(!_0x573433)return undefined;if(_0x573433['length']>0x20)throw CliErrors['validation']('App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.');return _0x573433;}export function validateKey(_0x408352){const _0x4f3573=a29_0x25d7b0;if(!_0x408352)throw CliErrors[_0x4f3573(0x1ac)](_0x4f3573(0x1a6));if(_0x408352['length']>0x100)throw CliErrors[_0x4f3573(0x1ac)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x40c420,_0x30dd38){const _0x2f49d0=a29_0x25d7b0,_0x1a4c27=_0x40c420[_0x2f49d0(0x1a8)]!==undefined&&_0x40c420[_0x2f49d0(0x1a8)]!==null&&_0x40c420['value']!=='',_0x52ea63={'appCode':_0x40c420[_0x2f49d0(0x1ae)],'key':_0x40c420[_0x2f49d0(0x1aa)],'tags':_0x40c420[_0x2f49d0(0x18f)]??undefined,'hasValue':_0x1a4c27,'valueRedacted':_0x1a4c27&&!_0x30dd38?.['reveal'],'gmtCreate':_0x40c420['gmtCreate'],'gmtModified':_0x40c420[_0x2f49d0(0x199)]};return _0x30dd38?.['reveal']&&(_0x52ea63[_0x2f49d0(0x1a8)]=_0x40c420[_0x2f49d0(0x1a8)]??'',_0x52ea63[_0x2f49d0(0x18d)]=![]),_0x52ea63;}export function plannedAppConfig(_0x238c3c){const _0x1052d3=a29_0x25d7b0,_0x34a285=_0x238c3c[_0x1052d3(0x197)]??!![];return{'appCode':_0x238c3c[_0x1052d3(0x1ae)],'key':_0x238c3c[_0x1052d3(0x1aa)],'tags':_0x238c3c['tags']??undefined,'hasValue':_0x34a285,'valueRedacted':_0x34a285};}export function buildMutationData(_0x2532e7){const _0x3fbbd5=a29_0x25d7b0;return{'operation':_0x2532e7[_0x3fbbd5(0x18a)],'selector':{'appCode':_0x2532e7['appCode'],'key':_0x2532e7['key']},'before':_0x2532e7[_0x3fbbd5(0x1ba)],'after':_0x2532e7[_0x3fbbd5(0x180)],'dryRun':_0x2532e7[_0x3fbbd5(0x19b)],'warnings':_0x2532e7['warnings']??[]};}export async function withAppConfigApiBoundary(_0x55a7fb,_0x332851,_0x2c42d9){const _0x338bf4=a29_0x25d7b0;try{return await _0x2c42d9();}catch{const _0x3d0d3a=[_0x338bf4(0x185)+_0x332851[_0x338bf4(0x1ae)]];if(_0x332851['key'])_0x3d0d3a['push'](_0x338bf4(0x1a7)+_0x332851[_0x338bf4(0x1aa)]);_0x3d0d3a['push'](_0x338bf4(0x18b));throw CliErrors[_0x338bf4(0x1a4)]('Failed\x20to\x20'+_0x55a7fb+_0x338bf4(0x183),_0x3d0d3a[_0x338bf4(0x196)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x7b5581,_0x532f23){const _0x416a56=a29_0x25d7b0;return Object['defineProperties'](_0x7b5581,{'method':{'value':_0x532f23[_0x416a56(0x1b9)],'enumerable':![]},'url':{'value':_0x532f23['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x4b540d){const _0x1ed5e7=a29_0x25d7b0,_0x1088a2=[];_0x4b540d[_0x1ed5e7(0x198)][_0x1ed5e7(0x182)]>0x1&&_0x1088a2['push']({'kind':_0x1ed5e7(0x192),'value':_0x4b540d[_0x1ed5e7(0x198)][_0x1ed5e7(0x18c)](0x1)['join']('\x20')});const _0x1b6437=_0x4b540d[_0x1ed5e7(0x1bb)](_0x1ed5e7(0x1a8));_0x1b6437!==undefined&&_0x1b6437!==null&&_0x1088a2['push']({'kind':_0x1ed5e7(0x192),'value':String(_0x1b6437)});_0x4b540d[_0x1ed5e7(0x1b7)](_0x1ed5e7(0x194))&&_0x1088a2[_0x1ed5e7(0x1bc)]({'kind':_0x1ed5e7(0x194)});const _0x3e7227=_0x4b540d['str'](_0x1ed5e7(0x1b3))[_0x1ed5e7(0x193)]();_0x3e7227&&_0x1088a2[_0x1ed5e7(0x1bc)]({'kind':_0x1ed5e7(0x190),'name':_0x3e7227});const _0x3151be=_0x4b540d['str'](_0x1ed5e7(0x19f))['trim']();_0x3151be&&_0x1088a2['push']({'kind':_0x1ed5e7(0x19f),'path':_0x3151be});if(_0x1088a2['length']===0x0)throw CliErrors['validation']('Missing\x20app-config\x20value\x20source.','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x1088a2['length']>0x1)throw CliErrors['validation'](_0x1ed5e7(0x19d),'Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');return _0x1088a2[0x0];}export async function assertValueSourceReadable(_0x1d3700){const _0x2e0fdc=a29_0x25d7b0;if(_0x1d3700[_0x2e0fdc(0x19c)]===_0x2e0fdc(0x190)&&!(_0x1d3700['name']in process.env))throw CliErrors[_0x2e0fdc(0x1ac)](_0x2e0fdc(0x1ad)+_0x1d3700[_0x2e0fdc(0x1b1)]);if(_0x1d3700['kind']===_0x2e0fdc(0x19f))try{await access(_0x1d3700[_0x2e0fdc(0x1a3)]);}catch{throw CliErrors[_0x2e0fdc(0x1ac)](_0x2e0fdc(0x184)+_0x1d3700[_0x2e0fdc(0x1a3)]);}}export async function readAppConfigValue(_0x23c1b2){const _0x5af12d=a29_0x25d7b0,_0x2004af=assertSingleValueSource(_0x23c1b2),_0x1bee15=[];if(_0x2004af[_0x5af12d(0x19c)]===_0x5af12d(0x192))return _0x1bee15['push']('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0x2004af['value']??'','source':_0x2004af[_0x5af12d(0x19c)],'warnings':_0x1bee15};if(_0x2004af[_0x5af12d(0x19c)]===_0x5af12d(0x194))return{'value':await readStdin(),'source':_0x2004af[_0x5af12d(0x19c)],'warnings':_0x1bee15};if(_0x2004af['kind']===_0x5af12d(0x190)){if(!(_0x2004af[_0x5af12d(0x1b1)]in process.env))throw CliErrors[_0x5af12d(0x1ac)](_0x5af12d(0x1ad)+_0x2004af[_0x5af12d(0x1b1)]);return{'value':process.env[_0x2004af.name]??'','source':_0x2004af[_0x5af12d(0x19c)],'warnings':_0x1bee15};}return{'value':await readFile(_0x2004af[_0x5af12d(0x1a3)],_0x5af12d(0x1bd)),'source':_0x2004af[_0x5af12d(0x19c)],'warnings':_0x1bee15};}function readStdin(){return new Promise((_0x370081,_0x1232b1)=>{const _0x850169=a29_0x1eb6;let _0x76f601='';process[_0x850169(0x194)][_0x850169(0x187)](_0x850169(0x1bd)),process[_0x850169(0x194)]['on'](_0x850169(0x186),_0x3783d8=>{_0x76f601+=_0x3783d8;}),process[_0x850169(0x194)][_0x850169(0x1a1)]('end',()=>_0x370081(_0x76f601)),process[_0x850169(0x194)]['once'](_0x850169(0x1b5),_0x1232b1);});}
@@ -1 +1 @@
1
- const a30_0x54f943=a30_0x3d90;(function(_0x4a2f81,_0x2d0833){const _0x4719e1=a30_0x3d90,_0x29efb5=_0x4a2f81();while(!![]){try{const _0x8554c9=-parseInt(_0x4719e1(0x98))/0x1*(-parseInt(_0x4719e1(0xa0))/0x2)+parseInt(_0x4719e1(0xa7))/0x3+-parseInt(_0x4719e1(0xa3))/0x4*(parseInt(_0x4719e1(0x9a))/0x5)+-parseInt(_0x4719e1(0x95))/0x6*(-parseInt(_0x4719e1(0x9b))/0x7)+parseInt(_0x4719e1(0xa5))/0x8*(parseInt(_0x4719e1(0x93))/0x9)+-parseInt(_0x4719e1(0x94))/0xa+-parseInt(_0x4719e1(0xa2))/0xb;if(_0x8554c9===_0x2d0833)break;else _0x29efb5['push'](_0x29efb5['shift']());}catch(_0x1500aa){_0x29efb5['push'](_0x29efb5['shift']());}}}(a30_0x5a44,0x97c7f));import{unlinkSync,existsSync}from'node:fs';function a30_0x3d90(_0x2a38a6,_0x48fb3e){_0x2a38a6=_0x2a38a6-0x91;const _0x5a4497=a30_0x5a44();let _0x3d90ce=_0x5a4497[_0x2a38a6];return _0x3d90ce;}function a30_0x5a44(){const _0x47c624=['5HJuqPg','13643gkaiEq','logout','boolean','log','nonInteractive','2yRnDQd','Clear\x20login\x20session','12767007hYnyCe','2168864FZFVSs','login','1375496aNJlKc','../../auth/auth-server-ui.js','2263575vpswQY','bool','yes','54rWJjgP','6136390KszkqV','2346jPNrxC','write','auth','389981IErwtt','Login\x20via\x20browser'];a30_0x5a44=function(){return _0x47c624;};return a30_0x5a44();}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x54f943(0x97),'command':a30_0x54f943(0xa4),'description':a30_0x54f943(0x99),'risk':a30_0x54f943(0x96),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x54f943(0x92),'type':a30_0x54f943(0x9d),'description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x1ed65a){const _0x47889b=a30_0x54f943,{runAuthServer:_0x169a64}=await import(_0x47889b(0xa6));return await _0x169a64({'autoYes':_0x1ed65a[_0x47889b(0x91)](_0x47889b(0x92)),'nonInteractive':_0x1ed65a[_0x47889b(0x9f)]}),{'ok':!![]};}},{'service':a30_0x54f943(0x97),'command':a30_0x54f943(0x9c),'description':a30_0x54f943(0xa1),'risk':a30_0x54f943(0x96),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2c9ffc){const _0x5dfc5f=a30_0x54f943;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x5dfc5f(0x9e)]('✓\x20Logged\x20out')):console[_0x5dfc5f(0x9e)]('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
1
+ const a30_0x39482b=a30_0x5493;(function(_0x5bad60,_0x5c4be7){const _0x1e640f=a30_0x5493,_0x331812=_0x5bad60();while(!![]){try{const _0x13bb74=parseInt(_0x1e640f(0x1a1))/0x1+parseInt(_0x1e640f(0x199))/0x2*(parseInt(_0x1e640f(0x1ac))/0x3)+parseInt(_0x1e640f(0x19b))/0x4*(-parseInt(_0x1e640f(0x1a7))/0x5)+-parseInt(_0x1e640f(0x197))/0x6*(parseInt(_0x1e640f(0x1a8))/0x7)+-parseInt(_0x1e640f(0x1a3))/0x8+-parseInt(_0x1e640f(0x19a))/0x9*(-parseInt(_0x1e640f(0x1a5))/0xa)+-parseInt(_0x1e640f(0x1a6))/0xb*(parseInt(_0x1e640f(0x1aa))/0xc);if(_0x13bb74===_0x5c4be7)break;else _0x331812['push'](_0x331812['shift']());}catch(_0x1773d7){_0x331812['push'](_0x331812['shift']());}}}(a30_0x465c,0x33c70));import{unlinkSync,existsSync}from'node:fs';function a30_0x5493(_0xadddfc,_0x455cf4){_0xadddfc=_0xadddfc-0x195;const _0x465cb8=a30_0x465c();let _0x5493d6=_0x465cb8[_0xadddfc];return _0x5493d6;}function a30_0x465c(){const _0x996779=['63IrGkzt','!\x20Not\x20logged\x20in','20820abwJeJ','login','573PqJWki','Login\x20via\x20browser','✓\x20Logged\x20out','logout','1908RqmDOj','bool','3946wWASaY','568791PxRBXo','353032UfDSRz','Clear\x20login\x20session','boolean','auth','write','yes','300435XkZenU','log','2885440tMvTBL','../../auth/auth-server-ui.js','30qLEKvs','1287vMdFCb','5ypQxUu'];a30_0x465c=function(){return _0x996779;};return a30_0x465c();}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a30_0x39482b(0x1ab),'description':a30_0x39482b(0x1ad),'risk':a30_0x39482b(0x19f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x39482b(0x1a0),'type':a30_0x39482b(0x19d),'description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x1acf8e){const _0x1a917b=a30_0x39482b,{runAuthServer:_0xd804d7}=await import(_0x1a917b(0x1a4));return await _0xd804d7({'autoYes':_0x1acf8e[_0x1a917b(0x198)](_0x1a917b(0x1a0)),'nonInteractive':_0x1acf8e['nonInteractive']}),{'ok':!![]};}},{'service':a30_0x39482b(0x19e),'command':a30_0x39482b(0x196),'description':a30_0x39482b(0x19c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x269655){const _0x139971=a30_0x39482b;return existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x139971(0x195))):console[_0x139971(0x1a2)](_0x139971(0x1a9)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a31_0x5d40a0=a31_0x29e0;(function(_0x9ec0a0,_0x155b22){const _0x2412c5=a31_0x29e0,_0x375895=_0x9ec0a0();while(!![]){try{const _0x142554=-parseInt(_0x2412c5(0x1d4))/0x1+parseInt(_0x2412c5(0x1e5))/0x2*(parseInt(_0x2412c5(0x1d0))/0x3)+parseInt(_0x2412c5(0x1bb))/0x4*(parseInt(_0x2412c5(0x1d1))/0x5)+parseInt(_0x2412c5(0x199))/0x6*(parseInt(_0x2412c5(0x195))/0x7)+-parseInt(_0x2412c5(0x1e8))/0x8*(-parseInt(_0x2412c5(0x1b2))/0x9)+parseInt(_0x2412c5(0x184))/0xa+parseInt(_0x2412c5(0x1c5))/0xb*(-parseInt(_0x2412c5(0x1c3))/0xc);if(_0x142554===_0x155b22)break;else _0x375895['push'](_0x375895['shift']());}catch(_0x3ce76f){_0x375895['push'](_0x375895['shift']());}}}(a31_0x50b2,0x9d2bf));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';function a31_0x50b2(){const _0x4c3d8d=['\x0a\x20*\x20[接口路径]\x20POST\x20/api/','alias','description','code','\x0a\x20*\x20[平台配置]\x20','functionNode','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','14kmpwpy','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','\x22.\x20','function-node','1508838XLWrMN','COMMON','apiDir','.js\x0a\x20*\x20[触发节点]\x20','length',']\x20(','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','/data/dataset/','No\x20operation\x20types\x20found\x20for\x20dataset\x20','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','当前请求参数','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','nonInteractive','.js','Invalid\x20dataset\x20selection.','修改后的响应结果','find','\x20function:\x20','File\x20already\x20exists:\x20','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','close','keys','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','datasetId','3236526SzeFHa','write','name','operationType','Select\x20trigger\x20node:','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','ENDPOINT','\x22\x20not\x20found\x20for\x20dataset\x20','No\x20api.ts\x20found.\x20Run\x20`','4NxHsAA','join','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','after','source','datasetcode','/COMMON/','Operation\x20type\x20(HOOK\x20only)','1980AWHkpl','/**\x0a\x20*\x20','33429VblhaP','当前响应结果','tableName','validation','datasetCode','map','scriptsRootDir','trim','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','question','includes','152133hrVbZl','5310890AIaQTF','HOOK\x20requires\x20alias/operation/node\x20options.','/ENDPOINT/','938536UrZCZn','\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','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','Script\x20type','Function\x20name\x20(valid\x20JS\x20identifier)','entries','operation-type','bff','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Dataset\x20not\x20found\x20for\x20code\x20\x22','\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','Created\x20','Alias\x20\x22','stdin','\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','修改后的请求参数','appCode','6nFgTDm','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','before','8YEbBDH','str','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','\x22,\x20params\x20})\x0a','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','Select\x20dataset:','parseInt','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','No\x20datasets\x20found\x20for\x20this\x20app.','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','68750ZYrdPE','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','\x20api\x20pull`\x20to\x20refresh.','Select\x20operation\x20type:','HOOK','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','string','Script\x20description','type','read'];a31_0x50b2=function(){return _0x4c3d8d;};return a31_0x50b2();}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';function a31_0x29e0(_0x305d4a,_0x75b856){_0x305d4a=_0x305d4a-0x17d;const _0x50b2b0=a31_0x50b2();let _0x29e009=_0x50b2b0[_0x305d4a];return _0x29e009;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':a31_0x5d40a0(0x1db),'command':'create','description':a31_0x5d40a0(0x17e),'risk':a31_0x5d40a0(0x18d),'flags':[{'name':a31_0x5d40a0(0x18c),'type':a31_0x5d40a0(0x18a),'required':!![],'enum':['COMMON','ENDPOINT',a31_0x5d40a0(0x188)],'description':a31_0x5d40a0(0x1d7)},{'name':a31_0x5d40a0(0x1b4),'type':a31_0x5d40a0(0x18a),'required':!![],'description':a31_0x5d40a0(0x1d8)},{'name':a31_0x5d40a0(0x190),'type':a31_0x5d40a0(0x18a),'description':a31_0x5d40a0(0x18b)},{'name':a31_0x5d40a0(0x18f),'type':a31_0x5d40a0(0x18a),'description':a31_0x5d40a0(0x1dc)},{'name':a31_0x5d40a0(0x1c0),'type':a31_0x5d40a0(0x18a),'description':a31_0x5d40a0(0x1b7)},{'name':a31_0x5d40a0(0x1da),'type':a31_0x5d40a0(0x18a),'description':a31_0x5d40a0(0x1c2)},{'name':a31_0x5d40a0(0x198),'type':a31_0x5d40a0(0x18a),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':['before',a31_0x5d40a0(0x1be)]}],async 'validate'(_0x2ce1ea){const _0x3c1c47=a31_0x5d40a0,_0x51ebbc=_0x2ce1ea[_0x3c1c47(0x1e9)](_0x3c1c47(0x1b4));if(!isValidBffFunctionName(_0x51ebbc))throw CliErrors[_0x3c1c47(0x1c8)]('Invalid\x20function\x20name\x20\x22'+_0x51ebbc+_0x3c1c47(0x1ad));},async 'execute'(_0x51fb3d){const _0x3eb2ad=a31_0x5d40a0,_0x19c2c7=loadBffProjectConfig(_0x51fb3d[_0x3eb2ad(0x1e4)]),_0x21103b=_0x51fb3d[_0x3eb2ad(0x1e9)](_0x3eb2ad(0x18c)),_0x4e7f6e=_0x51fb3d[_0x3eb2ad(0x1e9)]('name'),_0x17ecd6=_0x51fb3d[_0x3eb2ad(0x1e9)](_0x3eb2ad(0x190))||undefined,_0x17148c=_0x21103b===_0x3eb2ad(0x188)?await resolveHookOptions(_0x19c2c7,_0x51fb3d):undefined,_0x44892e=buildFilePath(_0x19c2c7,_0x21103b,_0x4e7f6e,_0x17148c);if(await fileExists(_0x44892e))throw CliErrors[_0x3eb2ad(0x1c8)](_0x3eb2ad(0x1ac)+_0x44892e);await mkdir(dirname(_0x44892e),{'recursive':!![]});const _0x123fa0=generateTemplate(_0x21103b,_0x4e7f6e,_0x51fb3d['appCode'],_0x17ecd6,_0x17148c);await writeFile(_0x44892e,_0x123fa0,'utf8');const _0xc20af4={'type':_0x21103b,'name':_0x4e7f6e,'path':_0x44892e};if(_0x17ecd6)_0xc20af4['description']=_0x17ecd6;if(_0x17148c){if(_0x17148c[_0x3eb2ad(0x18f)])_0xc20af4[_0x3eb2ad(0x18f)]=_0x17148c[_0x3eb2ad(0x18f)];_0xc20af4[_0x3eb2ad(0x1c9)]=_0x17148c[_0x3eb2ad(0x1c9)],_0xc20af4[_0x3eb2ad(0x1b5)]=_0x17148c[_0x3eb2ad(0x1b5)],_0xc20af4[_0x3eb2ad(0x193)]=_0x17148c[_0x3eb2ad(0x193)];}return{'ok':!![],'data':_0xc20af4,'message':_0x3eb2ad(0x1df)+_0x21103b+_0x3eb2ad(0x1ab)+_0x4e7f6e};}};async function resolveHookOptions(_0x5e1ac8,_0x5920b1){const _0x2ae0da=a31_0x5d40a0,_0x150f8d=loadAliasMap(_0x5920b1[_0x2ae0da(0x19b)],undefined,resolveApiFilePath(_0x5920b1[_0x2ae0da(0x19b)],_0x5920b1['appCode'])),_0x1bea34=_0x150f8d['length']>0x0;let _0x58cddf,_0x900855,_0x35de6e;const _0x10e889=_0x5920b1['str'](_0x2ae0da(0x18f)),_0x2a3367=_0x5920b1[_0x2ae0da(0x1e9)](_0x2ae0da(0x1c0));if(_0x10e889){const _0x4c01ee=resolveAlias(_0x5920b1['apiDir'],_0x10e889,undefined,resolveApiFilePath(_0x5920b1[_0x2ae0da(0x19b)],_0x5920b1[_0x2ae0da(0x1e4)]));if(!_0x4c01ee){const _0x3247be=_0x1bea34?'Available\x20aliases:\x20'+_0x150f8d[_0x2ae0da(0x1ca)](_0x269c7b=>_0x269c7b[_0x2ae0da(0x18f)])['join'](',\x20'):_0x2ae0da(0x1ba)+CLI_BIN_NAME+_0x2ae0da(0x19f);throw CliErrors[_0x2ae0da(0x1c8)](_0x2ae0da(0x1e0)+_0x10e889+'\x22\x20not\x20found.\x20'+_0x3247be);}_0x58cddf=_0x10e889,_0x900855=_0x4c01ee;}else{if(_0x2a3367){_0x900855=_0x2a3367;const _0x53a306=_0x150f8d[_0x2ae0da(0x1aa)](_0x5ab16c=>_0x5ab16c['datasetCode']===_0x2a3367);_0x58cddf=_0x53a306?.[_0x2ae0da(0x18f)];}else{if(_0x5920b1[_0x2ae0da(0x1a6)])throw CliErrors[_0x2ae0da(0x1c8)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x1bea34){const _0x14d085=_0x150f8d[_0x2ae0da(0x1ca)](_0x46e2c6=>_0x46e2c6[_0x2ae0da(0x18f)]+'\x20('+_0x46e2c6[_0x2ae0da(0x1c7)]+')'),_0x535a7f=await promptSelect('Select\x20dataset:',_0x14d085),_0x2b3d2d=_0x150f8d[_0x535a7f];if(!_0x2b3d2d)throw CliErrors[_0x2ae0da(0x1c8)](_0x2ae0da(0x1a8));_0x58cddf=_0x2b3d2d[_0x2ae0da(0x18f)],_0x900855=_0x2b3d2d['datasetCode'];}else{const _0x384b2a=await listDatasets(_0x5920b1[_0x2ae0da(0x1e4)]);if(_0x384b2a[_0x2ae0da(0x19d)]===0x0)throw CliErrors['validation'](_0x2ae0da(0x182));const _0x7ff0d5=_0x384b2a[_0x2ae0da(0x1ca)](_0x5305c1=>_0x5305c1[_0x2ae0da(0x1b4)]+'\x20['+(_0x5305c1[_0x2ae0da(0x1bf)]??'UNKNOWN')+_0x2ae0da(0x19e)+_0x5305c1[_0x2ae0da(0x191)]+')'),_0x33d31f=await promptSelect(_0x2ae0da(0x17f),_0x7ff0d5),_0xee183f=_0x384b2a[_0x33d31f];if(!_0xee183f)throw CliErrors[_0x2ae0da(0x1c8)]('Invalid\x20dataset\x20selection.');_0x900855=_0xee183f['code'],_0x58cddf=undefined;}}}}const _0x54e1b8=await listDatasets(_0x5920b1['appCode']),_0xba40e7=_0x54e1b8[_0x2ae0da(0x1aa)](_0x150834=>_0x150834['code']===_0x900855);if(!_0xba40e7)throw CliErrors[_0x2ae0da(0x1c8)](_0x2ae0da(0x1dd)+_0x900855+_0x2ae0da(0x197)+(_0x58cddf?_0x2ae0da(0x1a3)+CLI_BIN_NAME+_0x2ae0da(0x186):''));_0x35de6e=_0xba40e7['id'];const _0x36d69b=_0x58cddf??_0x900855,_0x57abdc=await listBffDatasetOperations(_0x5920b1['appCode'],_0x35de6e),_0x55a681=_0x57abdc?Object[_0x2ae0da(0x1af)](_0x57abdc):[];if(_0x55a681['length']===0x0)throw CliErrors[_0x2ae0da(0x1c8)](_0x2ae0da(0x1a1)+_0x36d69b+'.');let _0x1b048b;const _0x2fd9db=_0x5920b1[_0x2ae0da(0x1e9)](_0x2ae0da(0x1da));if(_0x2fd9db){if(!_0x55a681[_0x2ae0da(0x1cf)](_0x2fd9db))throw CliErrors[_0x2ae0da(0x1c8)]('Operation\x20type\x20\x22'+_0x2fd9db+_0x2ae0da(0x1b9)+_0x36d69b+'.\x20'+('Available:\x20'+_0x55a681[_0x2ae0da(0x1bc)](',\x20')));_0x1b048b=_0x2fd9db;}else{if(_0x5920b1[_0x2ae0da(0x1a6)])throw CliErrors[_0x2ae0da(0x1c8)](_0x2ae0da(0x1a2));const _0x1c4a45=await promptSelect(_0x2ae0da(0x187),_0x55a681);_0x1b048b=_0x55a681[_0x1c4a45]??_0x55a681[0x0];}let _0xf87548=normalizeHookFunctionNode(_0x5920b1[_0x2ae0da(0x1e9)](_0x2ae0da(0x198)));if(!_0xf87548){if(_0x5920b1[_0x2ae0da(0x1e9)]('function-node'))throw CliErrors['validation'](_0x2ae0da(0x1cd));if(_0x5920b1['nonInteractive'])throw CliErrors[_0x2ae0da(0x1c8)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x2a4339=await promptSelect(_0x2ae0da(0x1b6),['before','after']);_0xf87548=['before',_0x2ae0da(0x1be)][_0x2a4339]??_0x2ae0da(0x1e7);}return{'alias':_0x58cddf,'datasetCode':_0x900855,'datasetId':_0x35de6e,'operationType':_0x1b048b,'functionNode':_0xf87548};}async function promptSelect(_0x165f23,_0x3932ae){const _0x46b1ee=a31_0x5d40a0;if(_0x3932ae[_0x46b1ee(0x19d)]===0x1)return 0x0;for(const [_0x41e8d5,_0xceb16c]of _0x3932ae[_0x46b1ee(0x1d9)]()){process['stderr'][_0x46b1ee(0x1b3)]('\x20\x20'+(_0x41e8d5+0x1)+'.\x20'+_0xceb16c+'\x0a');}const _0xf560a8=createInterface({'input':process[_0x46b1ee(0x1e1)],'output':process['stderr']});while(!![]){const _0xa74060=await new Promise(_0x5c3394=>{const _0x34f85e=_0x46b1ee;_0xf560a8[_0x34f85e(0x1ce)](_0x165f23+'\x20',_0x5c3394);}),_0x868b2f=Number[_0x46b1ee(0x180)](_0xa74060['trim'](),0xa);if(Number['isInteger'](_0x868b2f)&&_0x868b2f>=0x1&&_0x868b2f<=_0x3932ae[_0x46b1ee(0x19d)])return _0xf560a8[_0x46b1ee(0x1ae)](),_0x868b2f-0x1;process['stderr']['write'](_0x46b1ee(0x189)+_0x3932ae[_0x46b1ee(0x19d)]+'.\x0a');}}function buildFilePath(_0x422639,_0x17c51e,_0x188020,_0x901aa8){const _0x15d410=a31_0x5d40a0;if(_0x17c51e===_0x15d410(0x188)){if(!_0x901aa8)throw CliErrors[_0x15d410(0x1c8)](_0x15d410(0x1d2));const _0x923418=_0x901aa8['alias']??_0x901aa8[_0x15d410(0x1c9)];return join(_0x422639[_0x15d410(0x1cb)],_0x15d410(0x188),_0x923418,_0x901aa8[_0x15d410(0x1b5)],_0x901aa8['functionNode'],_0x188020+_0x15d410(0x1a7));}return join(_0x422639[_0x15d410(0x1cb)],_0x17c51e,_0x188020+_0x15d410(0x1a7));}export function generateTemplate(_0x5af3d7,_0x2c4e66,_0x5912ea,_0x20fb55,_0xcfc1f9){const _0x19c62e=a31_0x5d40a0,_0x1f4d20=_0x20fb55?.[_0x19c62e(0x1cc)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x51bde4=getAppBaseUrl(_0x5912ea),_0x33171f=_0x19c62e(0x1ea);if(_0x5af3d7===_0x19c62e(0x19a))return _0x19c62e(0x1c4)+_0x1f4d20+_0x19c62e(0x1b0)+_0x2c4e66+_0x19c62e(0x192)+_0x51bde4+_0x19c62e(0x1a5)+_0x5912ea+_0x19c62e(0x1c1)+_0x2c4e66+_0x19c62e(0x185)+_0x2c4e66+_0x19c62e(0x17d)+_0x33171f+_0x19c62e(0x1d5)+_0x2c4e66+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x5af3d7===_0x19c62e(0x1b8))return'/**\x0a\x20*\x20'+_0x1f4d20+_0x19c62e(0x1d6)+_0x2c4e66+_0x19c62e(0x1e6)+_0x5912ea+'/'+_0x2c4e66+'\x0a\x20*\x20[平台配置]\x20'+_0x51bde4+_0x19c62e(0x1a5)+_0x5912ea+_0x19c62e(0x1d3)+_0x2c4e66+'.js\x0a'+_0x33171f+_0x19c62e(0x1e2)+_0x2c4e66+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0xcfc1f9)throw CliErrors[_0x19c62e(0x1c8)](_0x19c62e(0x1bd));const _0x9aa8bd=_0xcfc1f9[_0x19c62e(0x18f)]??_0xcfc1f9[_0x19c62e(0x1c9)],_0x2fd09c=_0xcfc1f9['functionNode']===_0x19c62e(0x1e7)?_0x19c62e(0x1a4):_0x19c62e(0x1c6),_0x53f891=_0xcfc1f9[_0x19c62e(0x193)]===_0x19c62e(0x1e7)?_0x19c62e(0x1e3):_0x19c62e(0x1a9);return _0x19c62e(0x1c4)+_0x1f4d20+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20'+_0x2c4e66+_0x19c62e(0x18e)+_0x5912ea+'/'+_0xcfc1f9[_0x19c62e(0x1c9)]+'/'+_0xcfc1f9[_0x19c62e(0x1b5)]+_0x19c62e(0x192)+_0x51bde4+_0x19c62e(0x1a0)+_0xcfc1f9[_0x19c62e(0x1b1)]+_0x19c62e(0x194)+_0x5912ea+'/HOOK/'+_0x9aa8bd+'/'+_0xcfc1f9[_0x19c62e(0x1b5)]+'/'+_0xcfc1f9['functionNode']+'/'+_0x2c4e66+_0x19c62e(0x19c)+_0xcfc1f9[_0x19c62e(0x193)]+'\x0a'+_0x33171f+_0x19c62e(0x183)+_0x2fd09c+_0x19c62e(0x196)+_0x53f891+_0x19c62e(0x1de)+_0x2c4e66+_0x19c62e(0x181);}
1
+ function a31_0x4d45(_0x298c6c,_0x11afb0){_0x298c6c=_0x298c6c-0x1eb;const _0x303202=a31_0x3032();let _0x4d4548=_0x303202[_0x298c6c];return _0x4d4548;}const a31_0x2bbac4=a31_0x4d45;function a31_0x3032(){const _0x43c92a=['\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','isInteger','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','HOOK','COMMON','\x20api\x20pull`\x20to\x20refresh.','.js','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','No\x20operation\x20types\x20found\x20for\x20dataset\x20','includes','after','scriptsRootDir','\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','join','datasetcode','bff','\x22,\x20params\x20})\x0a','File\x20already\x20exists:\x20','read','datasetId','Script\x20type','No\x20api.ts\x20found.\x20Run\x20`','name','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','4053623QhYbIW','/COMMON/','12xfjvdZ','\x0a\x20*\x20[平台配置]\x20','str','238395gOMMzV','992JuCRZR','type','string','functionNode','function-node','Created\x20','Select\x20operation\x20type:','.js\x0a','\x20function:\x20','map','Select\x20trigger\x20node:','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','create','Operation\x20type\x20\x22','Invalid\x20dataset\x20selection.','4334628eLgKEJ','4FUOFAY','trim','当前响应结果','appCode','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','2610aAZiEL','write','Available:\x20','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','datasetCode','Invalid\x20function\x20name\x20\x22','question','\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','34870BGgSkX','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','stderr','nonInteractive','alias','operationType','4780ydPpoA','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','1146772exNheh','Script\x20description','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','Available\x20aliases:\x20','1433859cromkE','/**\x0a\x20*\x20','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','stdin','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','13OdEHRy','\x22.\x20','当前请求参数','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','修改后的响应结果','HOOK\x20requires\x20alias/operation/node\x20options.','/HOOK/','code','修改后的请求参数','3apdWlX','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','description','validation','before','operation-type','Dataset\x20not\x20found\x20for\x20code\x20\x22','Function\x20name\x20(valid\x20JS\x20identifier)','No\x20datasets\x20found\x20for\x20this\x20app.','length','entries','find','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','UNKNOWN','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','close','apiDir'];a31_0x3032=function(){return _0x43c92a;};return a31_0x3032();}(function(_0x37faf7,_0x118fe0){const _0x20338=a31_0x4d45,_0x497c69=_0x37faf7();while(!![]){try{const _0x1bc3df=parseInt(_0x20338(0x223))/0x1+-parseInt(_0x20338(0x21f))/0x2*(parseInt(_0x20338(0x233))/0x3)+-parseInt(_0x20338(0x209))/0x4*(parseInt(_0x20338(0x1f8))/0x5)+parseInt(_0x20338(0x1f5))/0x6*(parseInt(_0x20338(0x1f3))/0x7)+-parseInt(_0x20338(0x1f9))/0x8*(-parseInt(_0x20338(0x20e))/0x9)+-parseInt(_0x20338(0x21c))/0xa*(parseInt(_0x20338(0x216))/0xb)+-parseInt(_0x20338(0x208))/0xc*(-parseInt(_0x20338(0x228))/0xd);if(_0x1bc3df===_0x118fe0)break;else _0x497c69['push'](_0x497c69['shift']());}catch(_0x57650c){_0x497c69['push'](_0x497c69['shift']());}}}(a31_0x3032,0xd039b));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_0x2bbac4(0x254),'command':a31_0x2bbac4(0x205),'description':a31_0x2bbac4(0x242),'risk':a31_0x2bbac4(0x1ed),'flags':[{'name':a31_0x2bbac4(0x1fa),'type':'string','required':!![],'enum':[a31_0x2bbac4(0x249),'ENDPOINT',a31_0x2bbac4(0x248)],'description':a31_0x2bbac4(0x1ef)},{'name':a31_0x2bbac4(0x1f1),'type':'string','required':!![],'description':a31_0x2bbac4(0x23a)},{'name':a31_0x2bbac4(0x235),'type':a31_0x2bbac4(0x1fb),'description':a31_0x2bbac4(0x220)},{'name':a31_0x2bbac4(0x21a),'type':a31_0x2bbac4(0x1fb),'description':a31_0x2bbac4(0x204)},{'name':a31_0x2bbac4(0x253),'type':a31_0x2bbac4(0x1fb),'description':a31_0x2bbac4(0x247)},{'name':a31_0x2bbac4(0x238),'type':'string','description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a31_0x2bbac4(0x1fd),'type':a31_0x2bbac4(0x1fb),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':['before',a31_0x2bbac4(0x24f)]}],async 'validate'(_0xe8567d){const _0x3e875b=a31_0x2bbac4,_0x501044=_0xe8567d['str'](_0x3e875b(0x1f1));if(!isValidBffFunctionName(_0x501044))throw CliErrors[_0x3e875b(0x236)](_0x3e875b(0x213)+_0x501044+_0x3e875b(0x245));},async 'execute'(_0x318a7b){const _0x23e4dc=a31_0x2bbac4,_0x2744b0=loadBffProjectConfig(_0x318a7b[_0x23e4dc(0x20c)]),_0x2eba59=_0x318a7b[_0x23e4dc(0x1f7)](_0x23e4dc(0x1fa)),_0x277889=_0x318a7b['str']('name'),_0x2dccec=_0x318a7b['str'](_0x23e4dc(0x235))||undefined,_0x4470d9=_0x2eba59===_0x23e4dc(0x248)?await resolveHookOptions(_0x2744b0,_0x318a7b):undefined,_0x45dd44=buildFilePath(_0x2744b0,_0x2eba59,_0x277889,_0x4470d9);if(await fileExists(_0x45dd44))throw CliErrors[_0x23e4dc(0x236)](_0x23e4dc(0x1ec)+_0x45dd44);await mkdir(dirname(_0x45dd44),{'recursive':!![]});const _0x5dfd77=generateTemplate(_0x2eba59,_0x277889,_0x318a7b['appCode'],_0x2dccec,_0x4470d9);await writeFile(_0x45dd44,_0x5dfd77,'utf8');const _0x525271={'type':_0x2eba59,'name':_0x277889,'path':_0x45dd44};if(_0x2dccec)_0x525271[_0x23e4dc(0x235)]=_0x2dccec;if(_0x4470d9){if(_0x4470d9[_0x23e4dc(0x21a)])_0x525271[_0x23e4dc(0x21a)]=_0x4470d9[_0x23e4dc(0x21a)];_0x525271['datasetCode']=_0x4470d9[_0x23e4dc(0x212)],_0x525271[_0x23e4dc(0x21b)]=_0x4470d9[_0x23e4dc(0x21b)],_0x525271[_0x23e4dc(0x1fc)]=_0x4470d9['functionNode'];}return{'ok':!![],'data':_0x525271,'message':_0x23e4dc(0x1fe)+_0x2eba59+_0x23e4dc(0x201)+_0x277889};}};async function resolveHookOptions(_0x122fe4,_0x482e28){const _0x3c48d2=a31_0x2bbac4,_0x3e4a5e=loadAliasMap(_0x482e28[_0x3c48d2(0x244)],undefined,resolveApiFilePath(_0x482e28[_0x3c48d2(0x244)],_0x482e28[_0x3c48d2(0x20c)])),_0x2728e9=_0x3e4a5e[_0x3c48d2(0x23c)]>0x0;let _0x59b6c5,_0x298709,_0x15fbb2;const _0x53497b=_0x482e28[_0x3c48d2(0x1f7)](_0x3c48d2(0x21a)),_0x1f34ff=_0x482e28[_0x3c48d2(0x1f7)](_0x3c48d2(0x253));if(_0x53497b){const _0x4f9acf=resolveAlias(_0x482e28[_0x3c48d2(0x244)],_0x53497b,undefined,resolveApiFilePath(_0x482e28[_0x3c48d2(0x244)],_0x482e28[_0x3c48d2(0x20c)]));if(!_0x4f9acf){const _0x38f879=_0x2728e9?_0x3c48d2(0x222)+_0x3e4a5e['map'](_0x6b1f34=>_0x6b1f34['alias'])[_0x3c48d2(0x252)](',\x20'):_0x3c48d2(0x1f0)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x3c48d2(0x236)]('Alias\x20\x22'+_0x53497b+'\x22\x20not\x20found.\x20'+_0x38f879);}_0x59b6c5=_0x53497b,_0x298709=_0x4f9acf;}else{if(_0x1f34ff){_0x298709=_0x1f34ff;const _0x1652c3=_0x3e4a5e[_0x3c48d2(0x23e)](_0x1ce40e=>_0x1ce40e[_0x3c48d2(0x212)]===_0x1f34ff);_0x59b6c5=_0x1652c3?.[_0x3c48d2(0x21a)];}else{if(_0x482e28[_0x3c48d2(0x219)])throw CliErrors[_0x3c48d2(0x236)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x2728e9){const _0x1cab24=_0x3e4a5e[_0x3c48d2(0x202)](_0x355a89=>_0x355a89[_0x3c48d2(0x21a)]+'\x20('+_0x355a89['tableName']+')'),_0x4a2862=await promptSelect('Select\x20dataset:',_0x1cab24),_0x1fa508=_0x3e4a5e[_0x4a2862];if(!_0x1fa508)throw CliErrors[_0x3c48d2(0x236)]('Invalid\x20dataset\x20selection.');_0x59b6c5=_0x1fa508['alias'],_0x298709=_0x1fa508[_0x3c48d2(0x212)];}else{const _0x1425c=await listDatasets(_0x482e28[_0x3c48d2(0x20c)]);if(_0x1425c[_0x3c48d2(0x23c)]===0x0)throw CliErrors[_0x3c48d2(0x236)](_0x3c48d2(0x23b));const _0x5c6407=_0x1425c[_0x3c48d2(0x202)](_0x2e8f80=>_0x2e8f80[_0x3c48d2(0x1f1)]+'\x20['+(_0x2e8f80['source']??_0x3c48d2(0x241))+']\x20('+_0x2e8f80[_0x3c48d2(0x231)]+')'),_0xa91889=await promptSelect('Select\x20dataset:',_0x5c6407),_0x55ac32=_0x1425c[_0xa91889];if(!_0x55ac32)throw CliErrors[_0x3c48d2(0x236)](_0x3c48d2(0x207));_0x298709=_0x55ac32[_0x3c48d2(0x231)],_0x59b6c5=undefined;}}}}const _0xab5b48=await listDatasets(_0x482e28['appCode']),_0x53bdbe=_0xab5b48[_0x3c48d2(0x23e)](_0x2484b5=>_0x2484b5['code']===_0x298709);if(!_0x53bdbe)throw CliErrors[_0x3c48d2(0x236)](_0x3c48d2(0x239)+_0x298709+_0x3c48d2(0x229)+(_0x59b6c5?_0x3c48d2(0x22c)+CLI_BIN_NAME+_0x3c48d2(0x24a):''));_0x15fbb2=_0x53bdbe['id'];const _0x3509e7=_0x59b6c5??_0x298709,_0x5c6bd6=await listBffDatasetOperations(_0x482e28['appCode'],_0x15fbb2),_0x20c11a=_0x5c6bd6?Object['keys'](_0x5c6bd6):[];if(_0x20c11a[_0x3c48d2(0x23c)]===0x0)throw CliErrors['validation'](_0x3c48d2(0x24d)+_0x3509e7+'.');let _0x53b428;const _0x157722=_0x482e28['str'](_0x3c48d2(0x238));if(_0x157722){if(!_0x20c11a[_0x3c48d2(0x24e)](_0x157722))throw CliErrors[_0x3c48d2(0x236)](_0x3c48d2(0x206)+_0x157722+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x3509e7+'.\x20'+(_0x3c48d2(0x210)+_0x20c11a['join'](',\x20')));_0x53b428=_0x157722;}else{if(_0x482e28[_0x3c48d2(0x219)])throw CliErrors[_0x3c48d2(0x236)](_0x3c48d2(0x22b));const _0x32883d=await promptSelect(_0x3c48d2(0x1ff),_0x20c11a);_0x53b428=_0x20c11a[_0x32883d]??_0x20c11a[0x0];}let _0x5df83a=normalizeHookFunctionNode(_0x482e28['str'](_0x3c48d2(0x1fd)));if(!_0x5df83a){if(_0x482e28[_0x3c48d2(0x1f7)](_0x3c48d2(0x1fd)))throw CliErrors[_0x3c48d2(0x236)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x482e28[_0x3c48d2(0x219)])throw CliErrors[_0x3c48d2(0x236)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x5707e6=await promptSelect(_0x3c48d2(0x203),[_0x3c48d2(0x237),'after']);_0x5df83a=[_0x3c48d2(0x237),_0x3c48d2(0x24f)][_0x5707e6]??'before';}return{'alias':_0x59b6c5,'datasetCode':_0x298709,'datasetId':_0x15fbb2,'operationType':_0x53b428,'functionNode':_0x5df83a};}async function promptSelect(_0x827d69,_0x1ade7d){const _0x2c2d33=a31_0x2bbac4;if(_0x1ade7d[_0x2c2d33(0x23c)]===0x1)return 0x0;for(const [_0x1b0511,_0x26e1ea]of _0x1ade7d[_0x2c2d33(0x23d)]()){process[_0x2c2d33(0x218)][_0x2c2d33(0x20f)]('\x20\x20'+(_0x1b0511+0x1)+'.\x20'+_0x26e1ea+'\x0a');}const _0x281fc2=createInterface({'input':process[_0x2c2d33(0x226)],'output':process[_0x2c2d33(0x218)]});while(!![]){const _0xd38f2=await new Promise(_0x32145a=>{const _0x35d9b1=_0x2c2d33;_0x281fc2[_0x35d9b1(0x214)](_0x827d69+'\x20',_0x32145a);}),_0x1d0612=Number['parseInt'](_0xd38f2[_0x2c2d33(0x20a)](),0xa);if(Number[_0x2c2d33(0x246)](_0x1d0612)&&_0x1d0612>=0x1&&_0x1d0612<=_0x1ade7d[_0x2c2d33(0x23c)])return _0x281fc2[_0x2c2d33(0x243)](),_0x1d0612-0x1;process[_0x2c2d33(0x218)]['write'](_0x2c2d33(0x1f2)+_0x1ade7d[_0x2c2d33(0x23c)]+'.\x0a');}}function buildFilePath(_0xd25372,_0x2d74ff,_0xe7a85d,_0x4189cd){const _0x9b611a=a31_0x2bbac4;if(_0x2d74ff===_0x9b611a(0x248)){if(!_0x4189cd)throw CliErrors['validation'](_0x9b611a(0x22f));const _0x2e9cee=_0x4189cd[_0x9b611a(0x21a)]??_0x4189cd['datasetCode'];return join(_0xd25372[_0x9b611a(0x250)],_0x9b611a(0x248),_0x2e9cee,_0x4189cd['operationType'],_0x4189cd['functionNode'],_0xe7a85d+_0x9b611a(0x24b));}return join(_0xd25372['scriptsRootDir'],_0x2d74ff,_0xe7a85d+_0x9b611a(0x24b));}export function generateTemplate(_0x207e89,_0x22a18d,_0x569d61,_0x49760e,_0x2424c3){const _0x85eac3=a31_0x2bbac4,_0x2df930=_0x49760e?.[_0x85eac3(0x20a)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x445f00=getAppBaseUrl(_0x569d61),_0x3e5ba7=_0x85eac3(0x24c);if(_0x207e89===_0x85eac3(0x249))return _0x85eac3(0x224)+_0x2df930+_0x85eac3(0x22d)+_0x22a18d+'\x0a\x20*\x20[平台配置]\x20'+_0x445f00+_0x85eac3(0x234)+_0x569d61+_0x85eac3(0x1f4)+_0x22a18d+_0x85eac3(0x211)+_0x22a18d+_0x85eac3(0x1eb)+_0x3e5ba7+_0x85eac3(0x215)+_0x22a18d+_0x85eac3(0x225);if(_0x207e89==='ENDPOINT')return _0x85eac3(0x224)+_0x2df930+_0x85eac3(0x21d)+_0x22a18d+_0x85eac3(0x21e)+_0x569d61+'/'+_0x22a18d+_0x85eac3(0x1f6)+_0x445f00+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x569d61+'/ENDPOINT/'+_0x22a18d+_0x85eac3(0x200)+_0x3e5ba7+_0x85eac3(0x251)+_0x22a18d+_0x85eac3(0x225);if(!_0x2424c3)throw CliErrors[_0x85eac3(0x236)](_0x85eac3(0x20d));const _0x4adb5b=_0x2424c3['alias']??_0x2424c3[_0x85eac3(0x212)],_0x354bf6=_0x2424c3[_0x85eac3(0x1fc)]===_0x85eac3(0x237)?_0x85eac3(0x22a):_0x85eac3(0x20b),_0x3ea22f=_0x2424c3[_0x85eac3(0x1fc)]===_0x85eac3(0x237)?_0x85eac3(0x232):_0x85eac3(0x22e);return _0x85eac3(0x224)+_0x2df930+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20'+_0x22a18d+_0x85eac3(0x23f)+_0x569d61+'/'+_0x2424c3[_0x85eac3(0x212)]+'/'+_0x2424c3[_0x85eac3(0x21b)]+'\x0a\x20*\x20[平台配置]\x20'+_0x445f00+'/data/dataset/'+_0x2424c3[_0x85eac3(0x1ee)]+_0x85eac3(0x227)+_0x569d61+_0x85eac3(0x230)+_0x4adb5b+'/'+_0x2424c3['operationType']+'/'+_0x2424c3[_0x85eac3(0x1fc)]+'/'+_0x22a18d+'.js\x0a\x20*\x20[触发节点]\x20'+_0x2424c3[_0x85eac3(0x1fc)]+'\x0a'+_0x3e5ba7+_0x85eac3(0x217)+_0x354bf6+_0x85eac3(0x221)+_0x3ea22f+_0x85eac3(0x240)+_0x22a18d+_0x85eac3(0x225);}