@lovrabet/rabetbase-cli 2.5.1-beta.3 → 2.5.1-beta.5

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 (346) 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 +3 -1
  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 +38 -2
  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 -6
  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 +37 -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/page/file-system.js +1 -1
  263. package/lib/core/page/hash.js +1 -1
  264. package/lib/core/page/lock.js +1 -1
  265. package/lib/core/sql-index-auditor.js +1 -1
  266. package/lib/core/sql-sync/config.js +1 -1
  267. package/lib/core/sql-sync/file-system.js +1 -1
  268. package/lib/core/sql-sync/hash.js +1 -1
  269. package/lib/core/sql-sync/lock.js +1 -1
  270. package/lib/core/sql-sync/utils.js +1 -1
  271. package/lib/core/sql-validator.js +1 -1
  272. package/lib/errors.js +1 -1
  273. package/lib/framework/build-all-flags.js +1 -1
  274. package/lib/framework/error-output.js +1 -1
  275. package/lib/framework/explicit-yes.js +1 -1
  276. package/lib/framework/flags.js +1 -1
  277. package/lib/framework/help.js +1 -1
  278. package/lib/framework/index.js +1 -1
  279. package/lib/framework/output.js +1 -1
  280. package/lib/framework/response.js +1 -1
  281. package/lib/framework/runner-alias.js +1 -1
  282. package/lib/framework/runner.js +1 -1
  283. package/lib/framework/schema-export.js +1 -1
  284. package/lib/framework/types.d.ts +0 -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 +16 -13
  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 -6
  336. package/skills/rabetbase/references/rabetbase-doctor.md +2 -1
  337. package/skills/rabetbase/references/rabetbase-init.md +32 -10
  338. package/skills/rabetbase/references/rabetbase-kb.md +7 -7
  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 +49 -0
  342. package/skills/rabetbase.manifest.json +5 -3
  343. package/lib/config/project-routing.d.ts +0 -30
  344. package/lib/config/project-routing.js +0 -1
  345. package/lib/core/kb-search-client.d.ts +0 -30
  346. package/lib/core/kb-search-client.js +0 -1
@@ -1 +1 @@
1
- const a17_0x2bbfa2=a17_0x1e2d;(function(_0x61d598,_0x4e7126){const _0x455942=a17_0x1e2d,_0x2c6b21=_0x61d598();while(!![]){try{const _0x97a417=-parseInt(_0x455942(0xea))/0x1+parseInt(_0x455942(0xe7))/0x2+parseInt(_0x455942(0xcd))/0x3+-parseInt(_0x455942(0xbc))/0x4*(-parseInt(_0x455942(0xcb))/0x5)+-parseInt(_0x455942(0xe4))/0x6*(parseInt(_0x455942(0xd3))/0x7)+-parseInt(_0x455942(0xc7))/0x8+-parseInt(_0x455942(0xc9))/0x9*(-parseInt(_0x455942(0xdd))/0xa);if(_0x97a417===_0x4e7126)break;else _0x2c6b21['push'](_0x2c6b21['shift']());}catch(_0x511398){_0x2c6b21['push'](_0x2c6b21['shift']());}}}(a17_0x1038,0x30517));import a17_0x3007c8 from'ora';function a17_0x1038(){const _0x4d4e23=['str','455038TXomuw','\x20dataset(s),\x20wrote\x20scaffold\x20with\x20','string','64373xCzMXq','fail','\x20model(s)','slice','Pulling\x20API\x20config\x20for\x20','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','sdkRouting','Failed:\x20','configName','pull','20vCpOjz','env','sdkConfigPath','succeed','apiFilePath','cookie','apiDir','boolean','\x20\x20•\x20','rawFlags','needsAgentMerge','1444864TFzCcV','isDefault','78471vTHMKp','split','223030grcTjD','read','50025OSbOyP','appcode','name','Pulling\x20','api','isDefaultConfig','443317BLzlUY','clientFilePath','...','\x20succeeded,\x20','files','Merge\x20data.models\x20into\x20existing\x20TypeScript\x20(see\x20skills/rabetbase/guides/sdk-client-generation.md).\x20Do\x20not\x20treat\x20a\x20partial\x20scaffold\x20as\x20complete.','modelCount','\x20app(s)\x20failed','Done:\x20','global','190klSstb','start','appCode','push','\x20dataset(s),\x20refreshed\x20sdk-config.ts.\x20','Pulled\x20','models','18tNVolb','join'];a17_0x1038=function(){return _0x4d4e23;};return a17_0x1038();}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{findProjectRootDirectory}from'../../context/config-loader.js';import{writeProjectRoutingManifest}from'../../config/project-routing.js';const EXISTING_TS_HINT=a17_0x2bbfa2(0xd8);function toPullData(_0x5e4465){const _0x169388=a17_0x2bbfa2;return{'appCode':_0x5e4465[_0x169388(0xdf)],'configName':_0x5e4465[_0x169388(0xba)],'isDefaultConfig':_0x5e4465[_0x169388(0xd2)],'models':_0x5e4465[_0x169388(0xe3)],'sdkRouting':_0x5e4465[_0x169388(0xb8)],'files':_0x5e4465[_0x169388(0xd7)],'needsAgentMerge':_0x5e4465['needsAgentMerge'],'apiFilePath':_0x5e4465[_0x169388(0xc0)],'clientFilePath':_0x5e4465[_0x169388(0xd4)],'sdkConfigPath':_0x5e4465[_0x169388(0xbe)],'datasetCount':_0x5e4465[_0x169388(0xd9)],'modelCount':_0x5e4465['modelCount']};}function describePull(_0x16dc65){const _0x499952=a17_0x2bbfa2;if(_0x16dc65[_0x499952(0xc6)])return _0x499952(0xe2)+_0x16dc65[_0x499952(0xd9)]+_0x499952(0xe1)+EXISTING_TS_HINT;return _0x499952(0xe2)+_0x16dc65[_0x499952(0xd9)]+_0x499952(0xe8)+_0x16dc65[_0x499952(0xd9)]+_0x499952(0xec);}function a17_0x1e2d(_0x21ae54,_0xfe4669){_0x21ae54=_0x21ae54-0xb5;const _0x1038b9=a17_0x1038();let _0x1e2d37=_0x1038b9[_0x21ae54];return _0x1e2d37;}export const apiPull={'service':a17_0x2bbfa2(0xd1),'command':a17_0x2bbfa2(0xbb),'description':'Pull\x20dataset\x20facts,\x20refresh\x20sdk-config.ts,\x20and\x20write\x20API\x20scaffold\x20if\x20missing\x20('+DEFAULT_API_DIR+'/)','risk':a17_0x2bbfa2(0xcc),'requiresAppCode':!![],'hasFormat':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':a17_0x2bbfa2(0xe9),'description':'Output\x20directory\x20(default:\x20'+DEFAULT_API_DIR+'/)'},{'name':a17_0x2bbfa2(0xdc),'type':a17_0x2bbfa2(0xc3),'description':a17_0x2bbfa2(0xb7),'default':![]}],async 'execute'(_0x2b3f07){const _0x584875=a17_0x2bbfa2,_0x3578c3=writeProjectRoutingManifest(findProjectRootDirectory()),_0x4dd803=_0x2b3f07[_0x584875(0xc5)][_0x584875(0xce)]?String(_0x2b3f07[_0x584875(0xc5)][_0x584875(0xce)]):undefined,_0x569192=_0x2b3f07[_0x584875(0xe6)]('output')||undefined,_0x539366=resolveTargetApps(_0x2b3f07,_0x4dd803);if(_0x539366){let _0x4a3822=0x0,_0x82ed0b=0x0;const _0x46f45d=[];for(const _0x54daa8 of _0x539366){const _0x1389a6=_0x54daa8[_0x584875(0xc1)]||_0x2b3f07['cookie'],_0x140eb7=_0x54daa8[_0x584875(0xbd)]||'production';initEnv(_0x140eb7);const _0x28122d=_0x54daa8[_0x584875(0xc2)]||_0x569192||_0x2b3f07[_0x584875(0xc2)]||DEFAULT_API_DIR,_0x30c8bf=_0x54daa8[_0x584875(0xc8)]?'':_0x54daa8[_0x584875(0xcf)]||_0x54daa8['appcode'],_0x21971a=a17_0x3007c8(_0x584875(0xd0)+_0x54daa8['name']+'\x20('+_0x54daa8[_0x584875(0xce)]+')...')[_0x584875(0xde)]();try{const {configArray:_0x435675}=await fetchModelList(_0x54daa8['appcode'],_0x1389a6),_0x2676f2=await generateApiFile(_0x435675,_0x30c8bf,_0x54daa8[_0x584875(0xce)],_0x54daa8[_0x584875(0xc8)],_0x140eb7,_0x28122d,_0x54daa8[_0x584875(0xcf)],getSdkClientRoutingConfig());_0x21971a[_0x584875(0xbf)](_0x54daa8[_0x584875(0xcf)]+':\x20'+describePull(_0x2676f2)),writeCliSideChannelLine(_0x584875(0xc4)+_0x2676f2['sdkConfigPath']),writeCliSideChannelLine('\x20\x20•\x20'+_0x2676f2[_0x584875(0xc0)]),writeCliSideChannelLine(_0x584875(0xc4)+_0x2676f2[_0x584875(0xd4)]),_0x46f45d[_0x584875(0xe0)](toPullData(_0x2676f2)),_0x4a3822++;}catch(_0x510062){_0x21971a['fail'](_0x54daa8[_0x584875(0xcf)]+':\x20'+(_0x510062 instanceof Error?_0x510062['message']:String(_0x510062))),_0x82ed0b++;}}writeCliSideChannelLine('');if(_0x82ed0b>0x0)writeCliSideChannelLine('!\x20'+_0x82ed0b+_0x584875(0xda));return{'ok':_0x82ed0b===0x0,'message':_0x584875(0xdb)+_0x4a3822+_0x584875(0xd6)+_0x82ed0b+'\x20failed','data':{'apps':_0x46f45d,'succeeded':_0x4a3822,'failed':_0x82ed0b,'projectRouting':_0x3578c3}};}const _0x488cb8=_0x4dd803&&_0x4dd803['includes']('-')?_0x4dd803[_0x584875(0xca)]('-')[_0x584875(0xb5)](0x1)[_0x584875(0xe5)]('-'):'',_0x141402=_0x569192||_0x2b3f07['apiDir']||DEFAULT_API_DIR,_0x5e59e7=!_0x4dd803,_0x37bf07=a17_0x3007c8(_0x584875(0xb6)+_0x2b3f07[_0x584875(0xdf)]+_0x584875(0xd5))[_0x584875(0xde)]();try{const {configArray:_0x46d566}=await fetchModelList(_0x2b3f07[_0x584875(0xdf)],_0x2b3f07[_0x584875(0xc1)]),_0x1f7005=await generateApiFile(_0x46d566,_0x488cb8,_0x2b3f07[_0x584875(0xdf)],_0x5e59e7,getEnv(),_0x141402,undefined,getSdkClientRoutingConfig());return _0x37bf07[_0x584875(0xbf)](describePull(_0x1f7005)),writeCliSideChannelLine('\x20\x20•\x20'+_0x1f7005[_0x584875(0xbe)]),writeCliSideChannelLine(_0x584875(0xc4)+_0x1f7005[_0x584875(0xc0)]),writeCliSideChannelLine('\x20\x20•\x20'+_0x1f7005[_0x584875(0xd4)]),{'ok':!![],'message':describePull(_0x1f7005),'data':{...toPullData(_0x1f7005),'projectRouting':_0x3578c3}};}catch(_0x2ff7fc){_0x37bf07[_0x584875(0xeb)](_0x584875(0xb9)+(_0x2ff7fc instanceof Error?_0x2ff7fc['message']:String(_0x2ff7fc)));throw _0x2ff7fc;}}};
1
+ const a17_0x19e3ec=a17_0x1514;(function(_0x4ce5e2,_0x431997){const _0x37306d=a17_0x1514,_0xf415d2=_0x4ce5e2();while(!![]){try{const _0x2fa24f=-parseInt(_0x37306d(0x181))/0x1*(-parseInt(_0x37306d(0x17a))/0x2)+parseInt(_0x37306d(0x18a))/0x3+-parseInt(_0x37306d(0x182))/0x4+parseInt(_0x37306d(0x187))/0x5+parseInt(_0x37306d(0x19e))/0x6+-parseInt(_0x37306d(0x18e))/0x7*(-parseInt(_0x37306d(0x193))/0x8)+-parseInt(_0x37306d(0x1b0))/0x9*(parseInt(_0x37306d(0x18c))/0xa);if(_0x2fa24f===_0x431997)break;else _0xf415d2['push'](_0xf415d2['shift']());}catch(_0x8ea8f1){_0xf415d2['push'](_0xf415d2['shift']());}}}(a17_0x1f84,0x26088));import a17_0x21328a from'ora';import{initEnv,getEnv}from'../../constant/env.js';function a17_0x1f84(){const _0x60b716=['needsAgentMerge','Pulling\x20',')...','Resolve\x20apps\x20from\x20merged\x20global+project\x20config\x20(default:\x20project\x20apps\x20only)','files','fail','1601652AQlfxS','\x20\x20•\x20','models','production','client','Pull\x20dataset\x20facts,\x20refresh\x20sdk-config.ts,\x20and\x20write\x20API\x20scaffold\x20if\x20missing\x20(','api','str','overwritten','configName','appCode','\x20app(s)\x20failed','env','split','message','\x20model(s)','force','rawFlags','81VELNoq','boolean','Fetched\x20','clientFilePath','Review\x20local\x20customizations,\x20then\x20rerun\x20with\x20--force\x20--yes.','sdkConfigPath','isDefaultConfig','output','\x20dataset\x20fact(s)\x20and\x20wrote\x20a\x20scaffold\x20with\x20','appcode','30524AEaZID','--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20existing\x20api.ts\x20and\x20client.ts.','\x20dataset\x20fact(s)\x20and\x20replaced\x20the\x20TypeScript\x20scaffold\x20with\x20','action','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.','apiDir','Failed:\x20','4WUYAmY','486372tsSFnY','...','modelCount','apiFilePath','start','147605XXUUYh','succeed','string','699651heAyXP','\x20succeeded,\x20','348760otUmam','Output\x20directory\x20(default:\x20','91uVCEek','cookie','name','Replace\x20existing\x20api.ts\x20and\x20client.ts;\x20requires\x20--yes\x20and\x20discards\x20local\x20customizations','bool','328IvAwcW','read','includes','\x20failed','isDefault'];a17_0x1f84=function(){return _0x60b716;};return a17_0x1f84();}function a17_0x1514(_0x196ce8,_0x2adaa6){_0x196ce8=_0x196ce8-0x176;const _0x1f841e=a17_0x1f84();let _0x1514ad=_0x1f841e[_0x196ce8];return _0x1514ad;}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_0x19e3ec(0x17e);function toPullData(_0x13ebf9){const _0x13bdc0=a17_0x19e3ec;return{'appCode':_0x13ebf9[_0x13bdc0(0x1a8)],'configName':_0x13ebf9[_0x13bdc0(0x1a7)],'isDefaultConfig':_0x13ebf9[_0x13bdc0(0x176)],'models':_0x13ebf9[_0x13bdc0(0x1a0)],'sdkRouting':_0x13ebf9['sdkRouting'],'files':_0x13ebf9['files'],'needsAgentMerge':_0x13ebf9['needsAgentMerge'],'apiFilePath':_0x13ebf9['apiFilePath'],'clientFilePath':_0x13ebf9[_0x13bdc0(0x1b3)],'sdkConfigPath':_0x13ebf9[_0x13bdc0(0x1b5)],'datasetCount':_0x13ebf9[_0x13bdc0(0x184)],'modelCount':_0x13ebf9[_0x13bdc0(0x184)]};}function describePull(_0x2df98d){const _0x23bf88=a17_0x19e3ec;if(_0x2df98d[_0x23bf88(0x198)])return _0x23bf88(0x1b2)+_0x2df98d['modelCount']+'\x20dataset\x20fact(s)\x20and\x20refreshed\x20sdk-config.ts.\x20'+EXISTING_TS_HINT;if(_0x2df98d[_0x23bf88(0x19c)][_0x23bf88(0x1a4)][_0x23bf88(0x17d)]===_0x23bf88(0x1a6)||_0x2df98d[_0x23bf88(0x19c)][_0x23bf88(0x1a2)][_0x23bf88(0x17d)]===_0x23bf88(0x1a6))return _0x23bf88(0x1b2)+_0x2df98d[_0x23bf88(0x184)]+_0x23bf88(0x17c)+_0x2df98d[_0x23bf88(0x184)]+_0x23bf88(0x1ad);return _0x23bf88(0x1b2)+_0x2df98d[_0x23bf88(0x184)]+_0x23bf88(0x178)+_0x2df98d['modelCount']+'\x20model(s)';}export const apiPull={'service':a17_0x19e3ec(0x1a4),'command':'pull','description':a17_0x19e3ec(0x1a3)+DEFAULT_API_DIR+'/)','risk':a17_0x19e3ec(0x194),'requiresAppCode':!![],'hasFormat':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':'output','type':a17_0x19e3ec(0x189),'description':a17_0x19e3ec(0x18d)+DEFAULT_API_DIR+'/)'},{'name':'global','type':a17_0x19e3ec(0x1b1),'description':a17_0x19e3ec(0x19b),'default':![]},{'name':a17_0x19e3ec(0x1ae),'type':a17_0x19e3ec(0x1b1),'description':a17_0x19e3ec(0x191),'default':![]}],async 'validate'(_0x2dc703){const _0x1f3324=a17_0x19e3ec;if(_0x2dc703[_0x1f3324(0x192)](_0x1f3324(0x1ae))&&!_0x2dc703[_0x1f3324(0x192)]('yes'))throw CliErrors['validation'](_0x1f3324(0x17b),_0x1f3324(0x1b4));},async 'execute'(_0x2ac727){const _0x1cd034=a17_0x19e3ec,_0x3c843c=_0x2ac727[_0x1cd034(0x1af)][_0x1cd034(0x179)]?String(_0x2ac727[_0x1cd034(0x1af)][_0x1cd034(0x179)]):undefined,_0x40f1be=_0x2ac727[_0x1cd034(0x1a5)](_0x1cd034(0x177))||undefined,_0x1a585f=_0x2ac727['bool']('force'),_0xe17a6a=resolveTargetApps(_0x2ac727,_0x3c843c);if(_0xe17a6a){let _0x322f02=0x0,_0x4ae56b=0x0;const _0x48e4ac=[];for(const _0x1e5925 of _0xe17a6a){const _0x2b9393=_0x1e5925[_0x1cd034(0x18f)]||_0x2ac727[_0x1cd034(0x18f)],_0x5a6eda=_0x1e5925[_0x1cd034(0x1aa)]||_0x1cd034(0x1a1);initEnv(_0x5a6eda);const _0xeee161=_0x1e5925[_0x1cd034(0x17f)]||_0x40f1be||_0x2ac727[_0x1cd034(0x17f)]||DEFAULT_API_DIR,_0xf06062=_0x1e5925[_0x1cd034(0x197)]?'':_0x1e5925['name']||_0x1e5925[_0x1cd034(0x179)],_0x423e7c=a17_0x21328a(_0x1cd034(0x199)+_0x1e5925[_0x1cd034(0x190)]+'\x20('+_0x1e5925[_0x1cd034(0x179)]+_0x1cd034(0x19a))['start']();try{const {configArray:_0x2d65ce}=await fetchModelList(_0x1e5925['appcode'],_0x2b9393),_0x40c33c=await generateApiFile(_0x2d65ce,_0xf06062,_0x1e5925[_0x1cd034(0x179)],_0x1e5925[_0x1cd034(0x197)],_0x5a6eda,_0xeee161,_0x1e5925[_0x1cd034(0x190)],getSdkClientRoutingConfig(),{'overwriteTypescript':_0x1a585f});_0x423e7c[_0x1cd034(0x188)](_0x1e5925['name']+':\x20'+describePull(_0x40c33c)),writeCliSideChannelLine(_0x1cd034(0x19f)+_0x40c33c[_0x1cd034(0x1b5)]),writeCliSideChannelLine('\x20\x20•\x20'+_0x40c33c[_0x1cd034(0x185)]),writeCliSideChannelLine('\x20\x20•\x20'+_0x40c33c['clientFilePath']),_0x48e4ac['push'](toPullData(_0x40c33c)),_0x322f02++;}catch(_0x1a4b95){_0x423e7c[_0x1cd034(0x19d)](_0x1e5925[_0x1cd034(0x190)]+':\x20'+(_0x1a4b95 instanceof Error?_0x1a4b95[_0x1cd034(0x1ac)]:String(_0x1a4b95))),_0x4ae56b++;}}writeCliSideChannelLine('');if(_0x4ae56b>0x0)writeCliSideChannelLine('!\x20'+_0x4ae56b+_0x1cd034(0x1a9));return{'ok':_0x4ae56b===0x0,'message':'Done:\x20'+_0x322f02+_0x1cd034(0x18b)+_0x4ae56b+_0x1cd034(0x196),'data':{'apps':_0x48e4ac,'succeeded':_0x322f02,'failed':_0x4ae56b}};}const _0x1846bb=_0x3c843c&&_0x3c843c[_0x1cd034(0x195)]('-')?_0x3c843c[_0x1cd034(0x1ab)]('-')['slice'](0x1)['join']('-'):'',_0x30daf0=_0x40f1be||_0x2ac727['apiDir']||DEFAULT_API_DIR,_0x3ffe27=!_0x3c843c,_0x18f25a=a17_0x21328a('Pulling\x20API\x20config\x20for\x20'+_0x2ac727[_0x1cd034(0x1a8)]+_0x1cd034(0x183))[_0x1cd034(0x186)]();try{const {configArray:_0x56fa86}=await fetchModelList(_0x2ac727[_0x1cd034(0x1a8)],_0x2ac727[_0x1cd034(0x18f)]),_0x15c394=await generateApiFile(_0x56fa86,_0x1846bb,_0x2ac727[_0x1cd034(0x1a8)],_0x3ffe27,getEnv(),_0x30daf0,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':_0x1a585f});return _0x18f25a[_0x1cd034(0x188)](describePull(_0x15c394)),writeCliSideChannelLine(_0x1cd034(0x19f)+_0x15c394['sdkConfigPath']),writeCliSideChannelLine('\x20\x20•\x20'+_0x15c394[_0x1cd034(0x185)]),writeCliSideChannelLine(_0x1cd034(0x19f)+_0x15c394[_0x1cd034(0x1b3)]),{'ok':!![],'message':describePull(_0x15c394),'data':toPullData(_0x15c394)};}catch(_0x587cc4){_0x18f25a[_0x1cd034(0x19d)](_0x1cd034(0x180)+(_0x587cc4 instanceof Error?_0x587cc4['message']:String(_0x587cc4)));throw _0x587cc4;}}};
@@ -1 +1 @@
1
- (function(_0x5c6b15,_0x5f54ae){const _0x122f80=a18_0x519a,_0x1097a5=_0x5c6b15();while(!![]){try{const _0x183fa1=parseInt(_0x122f80(0xe4))/0x1+parseInt(_0x122f80(0xf2))/0x2+-parseInt(_0x122f80(0xeb))/0x3*(parseInt(_0x122f80(0xf0))/0x4)+-parseInt(_0x122f80(0xe2))/0x5*(-parseInt(_0x122f80(0xe8))/0x6)+parseInt(_0x122f80(0xe3))/0x7+parseInt(_0x122f80(0xe7))/0x8*(parseInt(_0x122f80(0xee))/0x9)+-parseInt(_0x122f80(0xea))/0xa*(parseInt(_0x122f80(0xf3))/0xb);if(_0x183fa1===_0x5f54ae)break;else _0x1097a5['push'](_0x1097a5['shift']());}catch(_0x132a5e){_0x1097a5['push'](_0x1097a5['shift']());}}}(a18_0x1366,0x7383d));import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';function a18_0x519a(_0x45228b,_0x32597f){_0x45228b=_0x45228b-0xde;const _0x136672=a18_0x1366();let _0x519a76=_0x136672[_0x45228b];return _0x519a76;}export function resolveTargetApps(_0x52fbc9,_0x4d0791){const _0x4f88fe=a18_0x519a;if(_0x4d0791)return null;const _0x3a75c7=_0x52fbc9[_0x4f88fe(0xed)](_0x4f88fe(0xde))?'merged':_0x4f88fe(0xe1);let _0x135adb=getMultiAppConfigs(_0x3a75c7);if(!_0x135adb||_0x135adb[_0x4f88fe(0xe6)]===0x0)return null;if(_0x52fbc9['selectedAppName']){const _0x501968=_0x135adb[_0x4f88fe(0xec)](_0x106c91=>_0x106c91[_0x4f88fe(0xe5)]===_0x52fbc9[_0x4f88fe(0xe9)]);if(_0x501968[_0x4f88fe(0xe6)]===0x0){const _0x489f0a=_0x135adb[_0x4f88fe(0xf1)](_0x550e89=>_0x550e89[_0x4f88fe(0xe5)])[_0x4f88fe(0xdf)](',\x20');throw CliErrors[_0x4f88fe(0xe0)](_0x4f88fe(0xef)+_0x52fbc9[_0x4f88fe(0xe9)]+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x489f0a);}_0x135adb=_0x501968;}return _0x135adb;}function a18_0x1366(){const _0x354070=['bool','315sSMZfN','App\x20\x22','8QgjurH','map','1268496qYegxa','6127uhGdGN','global','join','validation','project','15CoEPGF','853314pMNDMF','226884UqzPUa','name','length','158624DglSiS','1761996hNRHWD','selectedAppName','31610QxIEYd','486279VqUtMe','filter'];a18_0x1366=function(){return _0x354070;};return a18_0x1366();}
1
+ function a18_0x5c10(_0x321aa1,_0x3a674a){_0x321aa1=_0x321aa1-0x112;const _0x164580=a18_0x1645();let _0x5c103a=_0x164580[_0x321aa1];return _0x5c103a;}function a18_0x1645(){const _0x1b39c1=['project','5336601PAlnaj','7chmpKN','length','selectedAppName','filter','8452290Bzxhmi','map','126786wVHhte','135536kuMtnb','name','266IHxrkj','global','445476NZPJmz','App\x20\x22','2507640RvmeBt','merged','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','43065855GMiRhv','bool'];a18_0x1645=function(){return _0x1b39c1;};return a18_0x1645();}(function(_0xbb9390,_0x17eadf){const _0x422d03=a18_0x5c10,_0x2dba85=_0xbb9390();while(!![]){try{const _0x58c2a0=parseInt(_0x422d03(0x120))/0x1*(-parseInt(_0x422d03(0x117))/0x2)+-parseInt(_0x422d03(0x11f))/0x3+parseInt(_0x422d03(0x113))/0x4+-parseInt(_0x422d03(0x124))/0x5+-parseInt(_0x422d03(0x112))/0x6*(-parseInt(_0x422d03(0x115))/0x7)+parseInt(_0x422d03(0x119))/0x8+parseInt(_0x422d03(0x11c))/0x9;if(_0x58c2a0===_0x17eadf)break;else _0x2dba85['push'](_0x2dba85['shift']());}catch(_0xe15ab2){_0x2dba85['push'](_0x2dba85['shift']());}}}(a18_0x1645,0xdd6a9));import{getMultiAppConfigs}from'../../utils/config.js';import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x553006,_0x36677f){const _0xc55642=a18_0x5c10;if(_0x36677f)return null;const _0x4fdd64=_0x553006[_0xc55642(0x11d)](_0xc55642(0x116))?_0xc55642(0x11a):_0xc55642(0x11e);let _0x32cab0=getMultiAppConfigs(_0x4fdd64);if(!_0x32cab0||_0x32cab0[_0xc55642(0x121)]===0x0)return null;if(_0x553006[_0xc55642(0x122)]){const _0x598d5c=_0x32cab0[_0xc55642(0x123)](_0x13f2ad=>_0x13f2ad[_0xc55642(0x114)]===_0x553006[_0xc55642(0x122)]);if(_0x598d5c[_0xc55642(0x121)]===0x0){const _0x1f876b=_0x32cab0[_0xc55642(0x125)](_0x87e424=>_0x87e424[_0xc55642(0x114)])['join'](',\x20');throw CliErrors['validation'](_0xc55642(0x118)+_0x553006[_0xc55642(0x122)]+_0xc55642(0x11b)+_0x1f876b);}_0x32cab0=_0x598d5c;}return _0x32cab0;}
@@ -1 +1 @@
1
- (function(_0x59fce7,_0x1137ac){const _0x58e72b=a19_0x3a9d,_0x39e7bd=_0x59fce7();while(!![]){try{const _0x2bc432=-parseInt(_0x58e72b(0xfa))/0x1+parseInt(_0x58e72b(0xfb))/0x2*(-parseInt(_0x58e72b(0xf7))/0x3)+-parseInt(_0x58e72b(0xf1))/0x4*(parseInt(_0x58e72b(0xf2))/0x5)+parseInt(_0x58e72b(0xf4))/0x6+parseInt(_0x58e72b(0xf6))/0x7+-parseInt(_0x58e72b(0xf5))/0x8*(-parseInt(_0x58e72b(0xf8))/0x9)+-parseInt(_0x58e72b(0xf9))/0xa*(-parseInt(_0x58e72b(0xf3))/0xb);if(_0x2bc432===_0x1137ac)break;else _0x39e7bd['push'](_0x39e7bd['shift']());}catch(_0x5ade40){_0x39e7bd['push'](_0x39e7bd['shift']());}}}(a19_0x25c4,0xad5af));import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';function a19_0x3a9d(_0x499fd1,_0x5672d2){_0x499fd1=_0x499fd1-0xf1;const _0x25c431=a19_0x25c4();let _0x3a9dc8=_0x25c431[_0x499fd1];return _0x3a9dc8;}function a19_0x25c4(){const _0x3f756d=['27qzPlRJ','65260FzoOSn','307578XPuXGF','1858834ZgFkhv','67948wnwJhG','255TWnkmx','77TMHUOP','7897152DUcCOc','998584EiFjfS','7539364CCYqgM','3EcJJMU'];a19_0x25c4=function(){return _0x3f756d;};return a19_0x25c4();}export const appDefinitions=[appListDefinition,appMembersListDefinition];
1
+ (function(_0x1419f7,_0x31bba7){const _0x2ed7cf=a19_0x1df8,_0xed16d8=_0x1419f7();while(!![]){try{const _0x490b9d=-parseInt(_0x2ed7cf(0x100))/0x1*(-parseInt(_0x2ed7cf(0xff))/0x2)+-parseInt(_0x2ed7cf(0x108))/0x3*(parseInt(_0x2ed7cf(0x103))/0x4)+-parseInt(_0x2ed7cf(0x102))/0x5+-parseInt(_0x2ed7cf(0x105))/0x6*(parseInt(_0x2ed7cf(0x104))/0x7)+-parseInt(_0x2ed7cf(0x106))/0x8*(parseInt(_0x2ed7cf(0x101))/0x9)+parseInt(_0x2ed7cf(0x109))/0xa+parseInt(_0x2ed7cf(0x107))/0xb;if(_0x490b9d===_0x31bba7)break;else _0xed16d8['push'](_0xed16d8['shift']());}catch(_0x52ca21){_0xed16d8['push'](_0xed16d8['shift']());}}}(a19_0x2403,0x9005d));import{appListDefinition}from'../../commands/app/list.js';function a19_0x1df8(_0xdab8c4,_0x7f5bef){_0xdab8c4=_0xdab8c4-0xff;const _0x2403cb=a19_0x2403();let _0x1df8c1=_0x2403cb[_0xdab8c4];return _0x1df8c1;}import{appMembersListDefinition}from'../../commands/app/members-list.js';function a19_0x2403(){const _0x1d2e93=['351510kbuGGd','8662120gshtRO','2lgJshw','246615YxMFxu','267993CSIogZ','1850765lgbHup','12TitNeD','268779arnPAO','144vJacDK','296hJYioB','24442330oSmRvu'];a19_0x2403=function(){return _0x1d2e93;};return a19_0x2403();}export const appDefinitions=[appListDefinition,appMembersListDefinition];
@@ -1 +1 @@
1
- const a20_0x5d11e1=a20_0x2d24;function a20_0x4e9e(){const _0x514b2b=['remote','merged','20VNGTuJ','globalConfig','isCurrent','71718ZHGwsF','projectPath','10TMzjGp','3236589nzpnWC','3097523aNWpEW','entries','list','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','app','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','project','bool','1593606JoBklo','name','keys','validation','appcode','globalPath','length','defaultApp','optional','apps','220312ITxjBo','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','global','boolean','\x20config','6kQcaeG','object','map','projectConfig','read','1930828hDnlna','693444TzDFbv','.\x20Use\x20`','push','119OVQWir'];a20_0x4e9e=function(){return _0x514b2b;};return a20_0x4e9e();}(function(_0x2198ab,_0x2ddb97){const _0x4bda63=a20_0x2d24,_0xf7093f=_0x2198ab();while(!![]){try{const _0x14fa93=-parseInt(_0x4bda63(0xdc))/0x1*(-parseInt(_0x4bda63(0xf7))/0x2)+parseInt(_0x4bda63(0xe8))/0x3+-parseInt(_0x4bda63(0xfc))/0x4+parseInt(_0x4bda63(0xd9))/0x5*(-parseInt(_0x4bda63(0xfd))/0x6)+-parseInt(_0x4bda63(0xd6))/0x7*(-parseInt(_0x4bda63(0xf2))/0x8)+-parseInt(_0x4bda63(0xdf))/0x9*(-parseInt(_0x4bda63(0xde))/0xa)+-parseInt(_0x4bda63(0xe0))/0xb;if(_0x14fa93===_0x2ddb97)break;else _0xf7093f['push'](_0xf7093f['shift']());}catch(_0x4535ee){_0xf7093f['push'](_0xf7093f['shift']());}}}(a20_0x4e9e,0x54d98));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';function a20_0x2d24(_0xf2a7cf,_0x441f8c){_0xf2a7cf=_0xf2a7cf-0xd6;const _0x4e9e55=a20_0x4e9e();let _0x2d24da=_0x4e9e55[_0xf2a7cf];return _0x2d24da;}import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x4dca9b,_0x13c73d){const _0x434838=a20_0x2d24,_0x4c7315=[],_0x3a79ca=_0x4dca9b['apps']&&typeof _0x4dca9b[_0x434838(0xf1)]===_0x434838(0xf8)?_0x4dca9b[_0x434838(0xf1)]:{},_0x5cf33e=_0x4dca9b['defaultApp']||undefined,_0x1628fc=_0x5cf33e??(Object[_0x434838(0xea)](_0x3a79ca)[_0x434838(0xee)]===0x1?Object[_0x434838(0xea)](_0x3a79ca)[0x0]:undefined);for(const [_0x554863,_0x72b9b0]of Object[_0x434838(0xe1)](_0x3a79ca)){if(!_0x72b9b0||typeof _0x72b9b0!==_0x434838(0xf8)||!_0x72b9b0['appcode'])continue;_0x4c7315[_0x434838(0xff)]({'name':_0x554863,'appcode':_0x72b9b0[_0x434838(0xec)],'named':!![],'definedIn':_0x13c73d,'isDefault':_0x554863===_0x1628fc,...buildAppProfileListFields(_0x72b9b0)});}return _0x4c7315;}function buildMergedItems(_0x24dfbc,_0x4e0fbe){const _0x308b77=a20_0x2d24,{apps:apps={}}=_0x24dfbc,_0x10e151=_0x24dfbc[_0x308b77(0xef)],_0x1b94e8=_0x10e151??(Object[_0x308b77(0xea)](apps)[_0x308b77(0xee)]===0x1?Object[_0x308b77(0xea)](apps)[0x0]:undefined),_0x355faa=_0x4e0fbe[_0x308b77(0xda)]['apps']&&typeof _0x4e0fbe[_0x308b77(0xda)]['apps']===_0x308b77(0xf8)?_0x4e0fbe['globalConfig'][_0x308b77(0xf1)]:{},_0x24324a=_0x4e0fbe[_0x308b77(0xfa)][_0x308b77(0xf1)]&&typeof _0x4e0fbe['projectConfig'][_0x308b77(0xf1)]===_0x308b77(0xf8)?_0x4e0fbe['projectConfig'][_0x308b77(0xf1)]:{},_0x1596bf=Object['entries'](apps),_0x4d3b92=_0x1596bf[_0x308b77(0xf9)](([_0x874bf0,_0x3fe6d0])=>({'name':_0x874bf0,'appcode':_0x3fe6d0[_0x308b77(0xec)],'named':!![],'definedIn':appDefinedIn(_0x874bf0,_0x355faa,_0x24324a),'isDefault':_0x874bf0===_0x1b94e8,...buildAppProfileListFields(_0x3fe6d0)}));return _0x4d3b92;}function validateAppListFlags(_0x2cc7f9){const _0xc309ab=a20_0x2d24;if(!_0x2cc7f9[_0xc309ab(0xe7)](_0xc309ab(0xd7)))return;if(!_0x2cc7f9[_0xc309ab(0xe7)](_0xc309ab(0xf4))&&!_0x2cc7f9[_0xc309ab(0xe7)](_0xc309ab(0xe6)))return;throw CliErrors[_0xc309ab(0xeb)](_0xc309ab(0xe5),_0xc309ab(0xe3));}async function execute(_0x2a105a){const _0x90df1d=a20_0x2d24;validateAppListFlags(_0x2a105a);if(_0x2a105a[_0x90df1d(0xe7)](_0x90df1d(0xd7)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x2a105a)};const _0x2f8aff=_0x2a105a[_0x90df1d(0xe7)](_0x90df1d(0xf4)),_0x4fdaf6=_0x2a105a[_0x90df1d(0xe7)](_0x90df1d(0xe6)),_0x11aa78=_0x2f8aff?_0x90df1d(0xf4):_0x4fdaf6?_0x90df1d(0xe6):_0x90df1d(0xd8),{config:_0x1377be,layers:_0x5a32a2}=readRawConfigWithLayers(),_0x2e3d7e=resolveDefaultAppSource(_0x5a32a2),{defaultApp:_0x35e41b}=_0x1377be;let _0x284db5,_0x1a404a;switch(_0x11aa78){case _0x90df1d(0xf4):_0x284db5=buildItemsFromLayer(_0x5a32a2['globalConfig'],_0x90df1d(0xf4)),_0x1a404a=_0x5a32a2['globalPath'];break;case _0x90df1d(0xe6):_0x284db5=buildItemsFromLayer(_0x5a32a2['projectConfig'],_0x90df1d(0xe6)),_0x1a404a=_0x5a32a2[_0x90df1d(0xdd)];break;default:_0x284db5=buildMergedItems(_0x1377be,_0x5a32a2);break;}enrichAppListItemsWithMergedSelection(_0x284db5,_0x2a105a['mergedCli']);if(_0x284db5[_0x90df1d(0xee)]===0x0){const _0x45031b=_0x11aa78===_0x90df1d(0xd8)?'':'\x20in\x20'+_0x11aa78+_0x90df1d(0xf6);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x45031b+_0x90df1d(0xfe)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x252139=_0x284db5['find'](_0x409e4d=>_0x409e4d[_0x90df1d(0xdb)]===!![]),_0xc27b79=_0x35e41b??_0x252139?.[_0x90df1d(0xe9)]??null,_0x389240=_0x11aa78===_0x90df1d(0xd8)?{'globalPath':_0x5a32a2[_0x90df1d(0xed)]??null,'projectPath':_0x5a32a2[_0x90df1d(0xdd)]??null,'defaultApp':_0xc27b79,'defaultAppSource':_0x35e41b!=null?_0x2e3d7e:null}:{'scope':_0x11aa78,'configPath':_0x1a404a??null};return{'ok':!![],'data':{'items':_0x284db5,'meta':_0x389240}};}export const appListDefinition={'service':a20_0x5d11e1(0xe4),'command':a20_0x5d11e1(0xe2),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x5d11e1(0xfb),'auth':a20_0x5d11e1(0xf0),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x5d11e1(0xd7),'type':a20_0x5d11e1(0xf5),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a20_0x5d11e1(0xf4),'type':a20_0x5d11e1(0xf5),'description':a20_0x5d11e1(0xf3),'default':![]},{'name':'project','type':a20_0x5d11e1(0xf5),'description':'Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','default':![]}],async 'validate'(_0x1638ce){validateAppListFlags(_0x1638ce);},'execute':execute};
1
+ const a20_0x148e6f=a20_0x3532;(function(_0x4e7d9f,_0x3c958a){const _0x459c6e=a20_0x3532,_0x1d2e30=_0x4e7d9f();while(!![]){try{const _0x5c11f1=parseInt(_0x459c6e(0x1e1))/0x1*(-parseInt(_0x459c6e(0x1de))/0x2)+-parseInt(_0x459c6e(0x1bd))/0x3*(parseInt(_0x459c6e(0x1e0))/0x4)+parseInt(_0x459c6e(0x1db))/0x5*(parseInt(_0x459c6e(0x1c9))/0x6)+-parseInt(_0x459c6e(0x1d0))/0x7+parseInt(_0x459c6e(0x1bc))/0x8*(-parseInt(_0x459c6e(0x1d9))/0x9)+-parseInt(_0x459c6e(0x1e3))/0xa+parseInt(_0x459c6e(0x1df))/0xb;if(_0x5c11f1===_0x3c958a)break;else _0x1d2e30['push'](_0x1d2e30['shift']());}catch(_0x24bc98){_0x1d2e30['push'](_0x1d2e30['shift']());}}}(a20_0x5992,0x789d4));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a20_0x3532(_0x4a862b,_0x49e71d){_0x4a862b=_0x4a862b-0x1bb;const _0x5992f3=a20_0x5992();let _0x3532dd=_0x5992f3[_0x4a862b];return _0x3532dd;}import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function a20_0x5992(){const _0x15dd3b=['projectPath','appcode','optional','defaultApp','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','project','30EGDOsS','keys','boolean','merged','projectConfig','bool','.\x20Use\x20`','3113677krAtnv','mergedCli','entries','push','length','list','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','object','remote','107478YZBpwe','globalPath','464115qfjaZe','global','map','42uwPRfr','33172711mcFXoq','44fmPDhP','15279EmSatO','apps','9413700VGqWQu','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','328Mwvcru','215214cZjFXj','find','No\x20apps\x20configured','globalConfig','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','\x20in\x20'];a20_0x5992=function(){return _0x15dd3b;};return a20_0x5992();}function buildItemsFromLayer(_0xb95f79,_0x335321){const _0x364f16=a20_0x3532,_0x48628d=[],_0x383601=_0xb95f79[_0x364f16(0x1e2)]&&typeof _0xb95f79[_0x364f16(0x1e2)]===_0x364f16(0x1d7)?_0xb95f79[_0x364f16(0x1e2)]:{},_0x39a072=_0xb95f79[_0x364f16(0x1c6)]||undefined,_0x4d9bf2=_0x39a072??(Object['keys'](_0x383601)['length']===0x1?Object[_0x364f16(0x1ca)](_0x383601)[0x0]:undefined);for(const [_0x3ab326,_0x14bc4b]of Object[_0x364f16(0x1d2)](_0x383601)){if(!_0x14bc4b||typeof _0x14bc4b!=='object'||!_0x14bc4b[_0x364f16(0x1c4)])continue;_0x48628d[_0x364f16(0x1d3)]({'name':_0x3ab326,'appcode':_0x14bc4b[_0x364f16(0x1c4)],'named':!![],'definedIn':_0x335321,'isDefault':_0x3ab326===_0x4d9bf2,...buildAppProfileListFields(_0x14bc4b)});}return _0x48628d;}function buildMergedItems(_0x598f6f,_0x38f1fa){const _0xd0b4f1=a20_0x3532,{apps:apps={}}=_0x598f6f,_0x2d46bf=_0x598f6f[_0xd0b4f1(0x1c6)],_0x21d7c2=_0x2d46bf??(Object[_0xd0b4f1(0x1ca)](apps)[_0xd0b4f1(0x1d4)]===0x1?Object['keys'](apps)[0x0]:undefined),_0x58b0fd=_0x38f1fa[_0xd0b4f1(0x1c0)][_0xd0b4f1(0x1e2)]&&typeof _0x38f1fa['globalConfig'][_0xd0b4f1(0x1e2)]===_0xd0b4f1(0x1d7)?_0x38f1fa[_0xd0b4f1(0x1c0)][_0xd0b4f1(0x1e2)]:{},_0x5ea388=_0x38f1fa[_0xd0b4f1(0x1cd)][_0xd0b4f1(0x1e2)]&&typeof _0x38f1fa[_0xd0b4f1(0x1cd)]['apps']===_0xd0b4f1(0x1d7)?_0x38f1fa[_0xd0b4f1(0x1cd)][_0xd0b4f1(0x1e2)]:{},_0x12ad8e=Object['entries'](apps),_0x41563f=_0x12ad8e[_0xd0b4f1(0x1dd)](([_0x44dc79,_0x3a0860])=>({'name':_0x44dc79,'appcode':_0x3a0860[_0xd0b4f1(0x1c4)],'named':!![],'definedIn':appDefinedIn(_0x44dc79,_0x58b0fd,_0x5ea388),'isDefault':_0x44dc79===_0x21d7c2,...buildAppProfileListFields(_0x3a0860)}));return _0x41563f;}function validateAppListFlags(_0x347f08){const _0x52a68d=a20_0x3532;if(!_0x347f08[_0x52a68d(0x1ce)](_0x52a68d(0x1d8)))return;if(!_0x347f08[_0x52a68d(0x1ce)](_0x52a68d(0x1dc))&&!_0x347f08[_0x52a68d(0x1ce)](_0x52a68d(0x1c8)))return;throw CliErrors['validation']('`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.',_0x52a68d(0x1c7));}async function execute(_0x571bb4){const _0x1c4be9=a20_0x3532;validateAppListFlags(_0x571bb4);if(_0x571bb4['bool']('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x571bb4)};const _0x5aed56=_0x571bb4[_0x1c4be9(0x1ce)](_0x1c4be9(0x1dc)),_0x347d46=_0x571bb4[_0x1c4be9(0x1ce)]('project'),_0x2e6310=_0x5aed56?_0x1c4be9(0x1dc):_0x347d46?_0x1c4be9(0x1c8):'merged',{config:_0x25feb5,layers:_0x25f10f}=readRawConfigWithLayers(),_0x518956=resolveDefaultAppSource(_0x25f10f),{defaultApp:_0x5bcf54}=_0x25feb5;let _0x4a3334,_0x1be737;switch(_0x2e6310){case _0x1c4be9(0x1dc):_0x4a3334=buildItemsFromLayer(_0x25f10f['globalConfig'],_0x1c4be9(0x1dc)),_0x1be737=_0x25f10f[_0x1c4be9(0x1da)];break;case _0x1c4be9(0x1c8):_0x4a3334=buildItemsFromLayer(_0x25f10f['projectConfig'],_0x1c4be9(0x1c8)),_0x1be737=_0x25f10f[_0x1c4be9(0x1c3)];break;default:_0x4a3334=buildMergedItems(_0x25feb5,_0x25f10f);break;}enrichAppListItemsWithMergedSelection(_0x4a3334,_0x571bb4[_0x1c4be9(0x1d1)]);if(_0x4a3334['length']===0x0){const _0x3d8621=_0x2e6310===_0x1c4be9(0x1cc)?'':_0x1c4be9(0x1c2)+_0x2e6310+'\x20config';return{'ok':!![],'data':[],'message':_0x1c4be9(0x1bf)+_0x3d8621+_0x1c4be9(0x1cf)+CLI_BIN_NAME+_0x1c4be9(0x1bb)};}const _0x523d2e=_0x4a3334[_0x1c4be9(0x1be)](_0x18ebac=>_0x18ebac['isCurrent']===!![]),_0x2e4438=_0x5bcf54??_0x523d2e?.['name']??null,_0x2ac6b9=_0x2e6310===_0x1c4be9(0x1cc)?{'globalPath':_0x25f10f['globalPath']??null,'projectPath':_0x25f10f[_0x1c4be9(0x1c3)]??null,'defaultApp':_0x2e4438,'defaultAppSource':_0x5bcf54!=null?_0x518956:null}:{'scope':_0x2e6310,'configPath':_0x1be737??null};return{'ok':!![],'data':{'items':_0x4a3334,'meta':_0x2ac6b9}};}export const appListDefinition={'service':'app','command':a20_0x148e6f(0x1d5),'description':a20_0x148e6f(0x1d6),'risk':'read','auth':a20_0x148e6f(0x1c5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x148e6f(0x1d8),'type':a20_0x148e6f(0x1cb),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':'global','type':a20_0x148e6f(0x1cb),'description':a20_0x148e6f(0x1c1),'default':![]},{'name':'project','type':a20_0x148e6f(0x1cb),'description':'Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','default':![]}],async 'validate'(_0x1ab4c5){validateAppListFlags(_0x1ab4c5);},'execute':execute};
@@ -1 +1 @@
1
- const a21_0x4772ff=a21_0x3441;(function(_0x1f4ba2,_0x39f5eb){const _0x1b4abc=a21_0x3441,_0x3e1c3e=_0x1f4ba2();while(!![]){try{const _0x14dbd4=parseInt(_0x1b4abc(0x1ee))/0x1+parseInt(_0x1b4abc(0x1f9))/0x2+-parseInt(_0x1b4abc(0x1f4))/0x3*(parseInt(_0x1b4abc(0x1ef))/0x4)+-parseInt(_0x1b4abc(0x1f7))/0x5*(parseInt(_0x1b4abc(0x1f8))/0x6)+-parseInt(_0x1b4abc(0x1f3))/0x7*(parseInt(_0x1b4abc(0x1f1))/0x8)+-parseInt(_0x1b4abc(0x1f6))/0x9+parseInt(_0x1b4abc(0x1eb))/0xa*(parseInt(_0x1b4abc(0x1ea))/0xb);if(_0x14dbd4===_0x39f5eb)break;else _0x3e1c3e['push'](_0x3e1c3e['shift']());}catch(_0x3593a3){_0x3e1c3e['push'](_0x3e1c3e['shift']());}}}(a21_0x2923,0x4ae13));function a21_0x3441(_0xadf76b,_0x2f389b){_0xadf76b=_0xadf76b-0x1ea;const _0x2923f7=a21_0x2923();let _0x344148=_0x2923f7[_0xadf76b];return _0x344148;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';function a21_0x2923(){const _0x53149a=['app','appCode','438882JaJyZD','4htQamV','Found\x20','5272RHIaNX','length','1099owyfog','250161sWNuAi','read','4219011ucJFvg','30LLYxfV','153822fNdcQF','210870zXJAhJ','6290251GgINMo','10QGkRHO'];a21_0x2923=function(){return _0x53149a;};return a21_0x2923();}import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':a21_0x4772ff(0x1ec),'command':'members-list','description':'List\x20application\x20members\x20with\x20their\x20role\x20memberships','risk':a21_0x4772ff(0x1f5),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4f3bf5){const _0x12f969=a21_0x4772ff,_0x55a5b4=projectAppMembers(await listRoleUsers(_0x4f3bf5[_0x12f969(0x1ed)]));return{'ok':!![],'data':{'appCode':_0x4f3bf5[_0x12f969(0x1ed)],'items':_0x55a5b4,'totalCount':_0x55a5b4[_0x12f969(0x1f2)]},'message':_0x12f969(0x1f0)+_0x55a5b4['length']+'\x20application\x20member(s)'};}};
1
+ const a21_0x26ff1c=a21_0x5607;(function(_0x16396e,_0x22f063){const _0x3c8268=a21_0x5607,_0x23b48e=_0x16396e();while(!![]){try{const _0x5df12e=-parseInt(_0x3c8268(0xa4))/0x1+parseInt(_0x3c8268(0xa0))/0x2+-parseInt(_0x3c8268(0xa7))/0x3+-parseInt(_0x3c8268(0x9e))/0x4+-parseInt(_0x3c8268(0x9c))/0x5*(-parseInt(_0x3c8268(0x99))/0x6)+-parseInt(_0x3c8268(0xa8))/0x7+parseInt(_0x3c8268(0x9f))/0x8;if(_0x5df12e===_0x22f063)break;else _0x23b48e['push'](_0x23b48e['shift']());}catch(_0x3f22be){_0x23b48e['push'](_0x23b48e['shift']());}}}(a21_0x2216,0x8adfe));function a21_0x5607(_0x5c5775,_0x48db65){_0x5c5775=_0x5c5775-0x99;const _0x221653=a21_0x2216();let _0x56078a=_0x221653[_0x5c5775];return _0x56078a;}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_0x26ff1c(0x9d),'command':a21_0x26ff1c(0x9a),'description':a21_0x26ff1c(0xa3),'risk':a21_0x26ff1c(0xa1),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x7e436c){const _0x10c5ff=a21_0x26ff1c,_0x2182f4=projectAppMembers(await listRoleUsers(_0x7e436c[_0x10c5ff(0xa5)]));return{'ok':!![],'data':{'appCode':_0x7e436c[_0x10c5ff(0xa5)],'items':_0x2182f4,'totalCount':_0x2182f4[_0x10c5ff(0x9b)]},'message':_0x10c5ff(0xa6)+_0x2182f4['length']+_0x10c5ff(0xa2)};}};function a21_0x2216(){const _0x132ed4=['List\x20application\x20members\x20with\x20their\x20role\x20memberships','614925JiIeir','appCode','Found\x20','1779354JbRWRC','2037644ngMEXA','308820ARnNXG','members-list','length','85CFmnbV','app','1814028BoZdHc','8361872moAkyb','1202496ctcIcD','read','\x20application\x20member(s)'];a21_0x2216=function(){return _0x132ed4;};return a21_0x2216();}
@@ -1 +1 @@
1
- (function(_0x394546,_0x3832ea){const _0x5100e9=a22_0x3368,_0x2c30bf=_0x394546();while(!![]){try{const _0x2ae98d=parseInt(_0x5100e9(0x8d))/0x1*(-parseInt(_0x5100e9(0x88))/0x2)+parseInt(_0x5100e9(0x84))/0x3+parseInt(_0x5100e9(0x83))/0x4*(parseInt(_0x5100e9(0x8c))/0x5)+-parseInt(_0x5100e9(0x82))/0x6*(-parseInt(_0x5100e9(0x7f))/0x7)+-parseInt(_0x5100e9(0x8f))/0x8+-parseInt(_0x5100e9(0x87))/0x9*(parseInt(_0x5100e9(0x89))/0xa)+-parseInt(_0x5100e9(0x80))/0xb*(parseInt(_0x5100e9(0x7e))/0xc);if(_0x2ae98d===_0x3832ea)break;else _0x2c30bf['push'](_0x2c30bf['shift']());}catch(_0x369f43){_0x2c30bf['push'](_0x2c30bf['shift']());}}}(a22_0x8915,0xd059f));function a22_0x8915(){const _0x5f0ab8=['1547949ZbRyvq','platform','map','14808186jiotdI','1084814VDEUDe','10DPxDdW','authRequired','appDesc','145TZWxPS','1baUoYa','cookie','5231960DTXMEw','4404zIaZFn','28mzsqBV','4103SPXLsp','appCode','2492214TNTaNr','228220VEPngX'];a22_0x8915=function(){return _0x5f0ab8;};return a22_0x8915();}import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a22_0x3368(_0x30bc2b,_0x349a87){_0x30bc2b=_0x30bc2b-0x7e;const _0x89151e=a22_0x8915();let _0x33683f=_0x89151e[_0x30bc2b];return _0x33683f;}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x5abc3b){const _0x4131e2=a22_0x3368,_0x17d989=_0x5abc3b[_0x4131e2(0x8e)]||getCookie();if(!_0x17d989)throw CliErrors[_0x4131e2(0x8a)]();return _0x17d989;}export async function listRemoteAppDirectory(_0x456220){const _0x40bc91=a22_0x3368,_0x5bca4d=await withActiveCookie(resolveCookie(_0x456220),()=>listRemoteApps());return{'items':_0x5bca4d[_0x40bc91(0x86)](_0x1b8d66=>({..._0x1b8d66['id']!=null?{'id':_0x1b8d66['id']}:{},'appCode':_0x1b8d66[_0x40bc91(0x81)],'appName':_0x1b8d66['appName'],..._0x1b8d66['appDesc']!=null?{'appDesc':_0x1b8d66[_0x40bc91(0x8b)]}:{}})),'meta':{'source':_0x40bc91(0x85)}};}
1
+ function a22_0x3c45(_0x5419e8,_0x16941e){_0x5419e8=_0x5419e8-0x11f;const _0x48ff5c=a22_0x48ff();let _0x3c451f=_0x48ff5c[_0x5419e8];return _0x3c451f;}(function(_0x26b8de,_0x55fc87){const _0x3a8542=a22_0x3c45,_0x2a8187=_0x26b8de();while(!![]){try{const _0x94777a=-parseInt(_0x3a8542(0x126))/0x1*(parseInt(_0x3a8542(0x122))/0x2)+parseInt(_0x3a8542(0x123))/0x3*(parseInt(_0x3a8542(0x12f))/0x4)+parseInt(_0x3a8542(0x12b))/0x5*(-parseInt(_0x3a8542(0x12e))/0x6)+parseInt(_0x3a8542(0x11f))/0x7*(-parseInt(_0x3a8542(0x120))/0x8)+-parseInt(_0x3a8542(0x12a))/0x9+parseInt(_0x3a8542(0x124))/0xa*(parseInt(_0x3a8542(0x12d))/0xb)+-parseInt(_0x3a8542(0x12c))/0xc*(-parseInt(_0x3a8542(0x129))/0xd);if(_0x94777a===_0x55fc87)break;else _0x2a8187['push'](_0x2a8187['shift']());}catch(_0x4837fe){_0x2a8187['push'](_0x2a8187['shift']());}}}(a22_0x48ff,0x28f7a));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 a22_0x48ff(){const _0x11871c=['11EAxRMT','18zNhKsJ','1048fGCHUL','map','14tqlvnn','924552CcTPyJ','appCode','6ntBwiK','1659SEDWDO','1843910daCizT','cookie','85223sybCDt','appName','appDesc','845XxNmMd','2311398KtEjOK','493435yzmmYP','162132PSuBlf'];a22_0x48ff=function(){return _0x11871c;};return a22_0x48ff();}function resolveCookie(_0x506530){const _0x156024=a22_0x3c45,_0x5bc795=_0x506530[_0x156024(0x125)]||getCookie();if(!_0x5bc795)throw CliErrors['authRequired']();return _0x5bc795;}export async function listRemoteAppDirectory(_0x475146){const _0x323d4d=a22_0x3c45,_0x10a33b=await withActiveCookie(resolveCookie(_0x475146),()=>listRemoteApps());return{'items':_0x10a33b[_0x323d4d(0x130)](_0xd773e9=>({..._0xd773e9['id']!=null?{'id':_0xd773e9['id']}:{},'appCode':_0xd773e9[_0x323d4d(0x121)],'appName':_0xd773e9[_0x323d4d(0x127)],..._0xd773e9['appDesc']!=null?{'appDesc':_0xd773e9[_0x323d4d(0x128)]}:{}})),'meta':{'source':'platform'}};}
@@ -1 +1 @@
1
- (function(_0xe0d031,_0x521105){const _0x47dff8=a23_0x34d9,_0x478917=_0xe0d031();while(!![]){try{const _0x463c18=parseInt(_0x47dff8(0x1ec))/0x1*(-parseInt(_0x47dff8(0x212))/0x2)+-parseInt(_0x47dff8(0x1ee))/0x3+parseInt(_0x47dff8(0x213))/0x4*(parseInt(_0x47dff8(0x1e9))/0x5)+-parseInt(_0x47dff8(0x1fe))/0x6+-parseInt(_0x47dff8(0x1fa))/0x7+parseInt(_0x47dff8(0x203))/0x8*(-parseInt(_0x47dff8(0x1ed))/0x9)+-parseInt(_0x47dff8(0x1f8))/0xa*(-parseInt(_0x47dff8(0x204))/0xb);if(_0x463c18===_0x521105)break;else _0x478917['push'](_0x478917['shift']());}catch(_0x46f537){_0x478917['push'](_0x478917['shift']());}}}(a23_0x2816,0x8a13d));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x68c2b1){const _0x3c08c5=a23_0x34d9,_0x5b19cb=_0x68c2b1?.[_0x3c08c5(0x1f4)]();return _0x5b19cb?_0x5b19cb:null;}export function projectAppMembers(_0x39c392){const _0x2d3170=a23_0x34d9,_0x22a988=new Map(),_0x313fd5=[..._0x39c392]['sort']((_0x1a133e,_0x687c0c)=>_0x1a133e['id']-_0x687c0c['id']),_0x5d919b=(_0x18cd98,_0x47816e,_0x4d6782)=>{const _0x4f8c16=a23_0x34d9;for(const _0x206e35 of _0x47816e){const _0x35b43e=Number(_0x206e35[_0x4f8c16(0x20b)]);if(!Number[_0x4f8c16(0x214)](_0x35b43e)||_0x35b43e<=0x0)continue;let _0x4627fb=_0x22a988[_0x4f8c16(0x20c)](_0x35b43e);if(!_0x4627fb)_0x4627fb={'userId':_0x35b43e,'username':nullableText(_0x206e35[_0x4f8c16(0x20f)]),'displayName':nullableText(_0x206e35[_0x4f8c16(0x201)]),'status':_0x4d6782,'roles':[],'roleKeys':new Set()},_0x22a988['set'](_0x35b43e,_0x4627fb);else{_0x4627fb[_0x4f8c16(0x20f)]??=nullableText(_0x206e35[_0x4f8c16(0x20f)]),_0x4627fb[_0x4f8c16(0x1fb)]??=nullableText(_0x206e35['nickname']);if(_0x4d6782===_0x4f8c16(0x207))_0x4627fb[_0x4f8c16(0x20d)]=_0x4f8c16(0x207);}const _0x438c15=_0x18cd98['id']+':'+_0x4d6782;if(_0x4627fb[_0x4f8c16(0x1f5)]['has'](_0x438c15))continue;_0x4627fb[_0x4f8c16(0x1f5)][_0x4f8c16(0x20a)](_0x438c15),_0x4627fb['roles']['push']({'roleId':_0x18cd98['id'],'roleName':nullableText(_0x18cd98['roleName']),'roleType':nullableText(_0x18cd98[_0x4f8c16(0x202)]),'membershipStatus':_0x4d6782});}};for(const _0x45b6a5 of _0x313fd5){_0x5d919b(_0x45b6a5,_0x45b6a5[_0x2d3170(0x1fd)]??[],_0x2d3170(0x207)),_0x5d919b(_0x45b6a5,_0x45b6a5['applyUserList']??[],_0x2d3170(0x1f3));}return[..._0x22a988['values']()]['map'](_0x3485b1=>({'userId':_0x3485b1['userId'],'username':_0x3485b1[_0x2d3170(0x20f)],'displayName':_0x3485b1['displayName'],'status':_0x3485b1[_0x2d3170(0x20d)],'roles':_0x3485b1[_0x2d3170(0x20e)][_0x2d3170(0x200)]((_0x141787,_0x2bb8c9)=>_0x141787[_0x2d3170(0x1f0)]-_0x2bb8c9[_0x2d3170(0x1f0)]||(_0x141787[_0x2d3170(0x1ef)]===_0x2bb8c9[_0x2d3170(0x1ef)]?0x0:_0x141787[_0x2d3170(0x1ef)]===_0x2d3170(0x207)?-0x1:0x1))}))[_0x2d3170(0x200)]((_0x4f6275,_0x53c034)=>_0x4f6275[_0x2d3170(0x20b)]-_0x53c034['userId']);}export function enrichAppListItemsWithMergedSelection(_0x202c80,_0x1fb9ff){const _0x230b83=a23_0x34d9;if(!_0x1fb9ff)return;const _0x483877=_0x1fb9ff['apps']&&typeof _0x1fb9ff[_0x230b83(0x1fc)]===_0x230b83(0x206)?_0x1fb9ff['apps']:{},_0x5975a8=Object[_0x230b83(0x211)](_0x483877)['length']>0x0;for(const _0x3bda6e of _0x202c80){_0x3bda6e['isCurrent']=![];}const _0x2e9eca=_0x1fb9ff['appCode']!=null?String(_0x1fb9ff['appCode'])['trim']():'';if(_0x5975a8){const _0x3d1e8f=_0x1fb9ff['currentApp']??_0x1fb9ff[_0x230b83(0x209)];if(_0x3d1e8f)for(const _0x493adb of _0x202c80){_0x493adb['named']===!![]&&_0x493adb[_0x230b83(0x1eb)]===_0x3d1e8f&&(_0x493adb[_0x230b83(0x1f7)]=!![]);}for(const _0x2cb894 of _0x202c80){if(_0x2cb894['named']!==![])continue;if(_0x1fb9ff[_0x230b83(0x209)])continue;_0x2e9eca&&String(_0x2cb894[_0x230b83(0x1ff)]??'')['trim']()===_0x2e9eca&&(_0x2cb894[_0x230b83(0x1f7)]=!![]);}return;}if(!_0x2e9eca)return;for(const _0x41050a of _0x202c80){String(_0x41050a['appcode']??'')[_0x230b83(0x1f4)]()===_0x2e9eca&&(_0x41050a['isCurrent']=!![]);}}export function resolveAppScopeForWrite(_0x59bbec,_0x4928d7,_0x11bece){const _0x1004bd=a23_0x34d9;if(_0x4928d7)return _0x1004bd(0x1f9);const _0x132a50=_0x11bece['projectConfig'][_0x1004bd(0x1fc)]&&typeof _0x11bece['projectConfig']['apps']==='object'?_0x11bece[_0x1004bd(0x210)][_0x1004bd(0x1fc)]:{},_0x5030c4=_0x11bece[_0x1004bd(0x208)][_0x1004bd(0x1fc)]&&typeof _0x11bece['globalConfig'][_0x1004bd(0x1fc)]===_0x1004bd(0x206)?_0x11bece[_0x1004bd(0x208)][_0x1004bd(0x1fc)]:{};if(Object[_0x1004bd(0x1ea)][_0x1004bd(0x1f2)][_0x1004bd(0x1e8)](_0x132a50,_0x59bbec))return _0x1004bd(0x205);if(Object[_0x1004bd(0x1ea)][_0x1004bd(0x1f2)][_0x1004bd(0x1e8)](_0x5030c4,_0x59bbec))return _0x1004bd(0x1f9);return _0x1004bd(0x205);}export function appDefinedIn(_0x1b884e,_0x58453d,_0x1a5af2){const _0x3a231e=a23_0x34d9,_0x54d7da=Object[_0x3a231e(0x1ea)][_0x3a231e(0x1f2)][_0x3a231e(0x1e8)](_0x58453d,_0x1b884e),_0x5ec18e=Object[_0x3a231e(0x1ea)]['hasOwnProperty'][_0x3a231e(0x1e8)](_0x1a5af2,_0x1b884e);if(_0x54d7da&&_0x5ec18e)return'both';if(_0x5ec18e)return _0x3a231e(0x205);return _0x3a231e(0x1f9);}export function resolveDefaultAppSource(_0xd4d18b){const _0x5613aa=a23_0x34d9,_0x3681c9=_0xd4d18b[_0x5613aa(0x210)][_0x5613aa(0x1fc)]&&typeof _0xd4d18b[_0x5613aa(0x210)]['apps']==='object'?_0xd4d18b['projectConfig']['apps']:{};if(_0x5613aa(0x209)in _0xd4d18b['projectConfig'])return _0x5613aa(0x205);if(Object[_0x5613aa(0x211)](_0x3681c9)[_0x5613aa(0x1f1)]>0x0)return _0x5613aa(0x205);if(Object['keys'](_0xd4d18b['projectConfig'])[_0x5613aa(0x1f1)]===0x0&&_0xd4d18b[_0x5613aa(0x208)][_0x5613aa(0x209)])return _0x5613aa(0x1f9);return null;}export function getConfigPath(_0xb50af={}){const _0x18fe3e=a23_0x34d9,_0xa22c61=_0xb50af[_0x18fe3e(0x1f9)]?_0x18fe3e(0x1f9):_0x18fe3e(0x205);return resolveWriteConfigPath(_0xa22c61);}function a23_0x34d9(_0xb25f7c,_0x3a827b){_0xb25f7c=_0xb25f7c-0x1e8;const _0x281644=a23_0x2816();let _0x34d9e5=_0x281644[_0xb25f7c];return _0x34d9e5;}function a23_0x2816(){const _0x3a6461=['displayName','apps','userList','3389892rekgjm','appcode','sort','nickname','roleType','248ofhDmi','6007276WtXtFE','project','object','ACTIVE','globalConfig','defaultApp','add','userId','get','status','roles','username','projectConfig','keys','194dqetNs','4RoYXdS','isFinite','call','2198885Pakshw','prototype','name','1525RmrbwV','45729kpNaGL','3248214XZPBVq','membershipStatus','roleId','length','hasOwnProperty','PENDING','trim','roleKeys','\x20(global)','isCurrent','50TMnOYa','global','4561452xbceRW'];a23_0x2816=function(){return _0x3a6461;};return a23_0x2816();}export function readConfig(_0x42083c={}){return readConfigFile(getConfigPath(_0x42083c));}export function writeConfig(_0x4b5daf,_0x574ff6={}){writeConfigFile(getConfigPath(_0x574ff6),_0x4b5daf);}export function scopeLabel(_0x548e06){const _0x447bb7=a23_0x34d9;return _0x548e06[_0x447bb7(0x1f9)]?_0x447bb7(0x1f6):'';}
1
+ (function(_0x47733e,_0x2dd622){const _0x12b1ba=a23_0x3c3d,_0x2c9fb1=_0x47733e();while(!![]){try{const _0x5e55a3=parseInt(_0x12b1ba(0x1e8))/0x1+-parseInt(_0x12b1ba(0x1ed))/0x2*(parseInt(_0x12b1ba(0x1df))/0x3)+parseInt(_0x12b1ba(0x1f8))/0x4*(-parseInt(_0x12b1ba(0x1d4))/0x5)+parseInt(_0x12b1ba(0x1dd))/0x6+-parseInt(_0x12b1ba(0x1cb))/0x7+parseInt(_0x12b1ba(0x1e4))/0x8+-parseInt(_0x12b1ba(0x1f4))/0x9*(parseInt(_0x12b1ba(0x1e9))/0xa);if(_0x5e55a3===_0x2dd622)break;else _0x2c9fb1['push'](_0x2c9fb1['shift']());}catch(_0x593ef6){_0x2c9fb1['push'](_0x2c9fb1['shift']());}}}(a23_0x1212,0xb8418));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a23_0x3c3d(_0x351ff7,_0x484a29){_0x351ff7=_0x351ff7-0x1ca;const _0x121282=a23_0x1212();let _0x3c3d5a=_0x121282[_0x351ff7];return _0x3c3d5a;}function nullableText(_0x164f94){const _0xa8396d=a23_0x3c3d,_0x45303a=_0x164f94?.[_0xa8396d(0x1e5)]();return _0x45303a?_0x45303a:null;}export function projectAppMembers(_0x371822){const _0x59c415=a23_0x3c3d,_0x4bd02c=new Map(),_0x5a2f65=[..._0x371822][_0x59c415(0x1de)]((_0x238bb5,_0x387a84)=>_0x238bb5['id']-_0x387a84['id']),_0x42ead0=(_0x1c79c0,_0xf21cb1,_0x4b0f45)=>{const _0x3d318f=_0x59c415;for(const _0x15a207 of _0xf21cb1){const _0x25cecd=Number(_0x15a207[_0x3d318f(0x1d9)]);if(!Number['isFinite'](_0x25cecd)||_0x25cecd<=0x0)continue;let _0x2a8cff=_0x4bd02c[_0x3d318f(0x1d5)](_0x25cecd);if(!_0x2a8cff)_0x2a8cff={'userId':_0x25cecd,'username':nullableText(_0x15a207[_0x3d318f(0x1e7)]),'displayName':nullableText(_0x15a207['nickname']),'status':_0x4b0f45,'roles':[],'roleKeys':new Set()},_0x4bd02c[_0x3d318f(0x1ea)](_0x25cecd,_0x2a8cff);else{_0x2a8cff['username']??=nullableText(_0x15a207[_0x3d318f(0x1e7)]),_0x2a8cff[_0x3d318f(0x1d6)]??=nullableText(_0x15a207[_0x3d318f(0x1ef)]);if(_0x4b0f45===_0x3d318f(0x1f1))_0x2a8cff[_0x3d318f(0x1d3)]=_0x3d318f(0x1f1);}const _0x31708e=_0x1c79c0['id']+':'+_0x4b0f45;if(_0x2a8cff[_0x3d318f(0x1ec)][_0x3d318f(0x1e6)](_0x31708e))continue;_0x2a8cff[_0x3d318f(0x1ec)][_0x3d318f(0x1db)](_0x31708e),_0x2a8cff[_0x3d318f(0x1cf)][_0x3d318f(0x1eb)]({'roleId':_0x1c79c0['id'],'roleName':nullableText(_0x1c79c0['roleName']),'roleType':nullableText(_0x1c79c0['roleType']),'membershipStatus':_0x4b0f45});}};for(const _0x267fc8 of _0x5a2f65){_0x42ead0(_0x267fc8,_0x267fc8[_0x59c415(0x1d7)]??[],_0x59c415(0x1f1)),_0x42ead0(_0x267fc8,_0x267fc8[_0x59c415(0x1f5)]??[],'PENDING');}return[..._0x4bd02c[_0x59c415(0x1d0)]()][_0x59c415(0x1d2)](_0x3c3c44=>({'userId':_0x3c3c44[_0x59c415(0x1d9)],'username':_0x3c3c44['username'],'displayName':_0x3c3c44['displayName'],'status':_0x3c3c44[_0x59c415(0x1d3)],'roles':_0x3c3c44[_0x59c415(0x1cf)][_0x59c415(0x1de)]((_0x1bbaf8,_0x3f648a)=>_0x1bbaf8[_0x59c415(0x1fb)]-_0x3f648a[_0x59c415(0x1fb)]||(_0x1bbaf8[_0x59c415(0x1f0)]===_0x3f648a['membershipStatus']?0x0:_0x1bbaf8[_0x59c415(0x1f0)]==='ACTIVE'?-0x1:0x1))}))['sort']((_0x9224b3,_0x1a42e2)=>_0x9224b3[_0x59c415(0x1d9)]-_0x1a42e2['userId']);}export function enrichAppListItemsWithMergedSelection(_0x482f87,_0x5ec533){const _0xc31ce6=a23_0x3c3d;if(!_0x5ec533)return;const _0x1a5188=_0x5ec533[_0xc31ce6(0x1fa)]&&typeof _0x5ec533[_0xc31ce6(0x1fa)]===_0xc31ce6(0x1cd)?_0x5ec533[_0xc31ce6(0x1fa)]:{},_0x4c8265=Object[_0xc31ce6(0x1d8)](_0x1a5188)[_0xc31ce6(0x1f7)]>0x0;for(const _0x20eabd of _0x482f87){_0x20eabd['isCurrent']=![];}const _0x3ed1e0=_0x5ec533[_0xc31ce6(0x1ee)]!=null?String(_0x5ec533[_0xc31ce6(0x1ee)])[_0xc31ce6(0x1e5)]():'';if(_0x4c8265){const _0x4357c4=_0x5ec533[_0xc31ce6(0x1e0)]??_0x5ec533[_0xc31ce6(0x1e1)];if(_0x4357c4)for(const _0x3326e0 of _0x482f87){_0x3326e0[_0xc31ce6(0x1ca)]===!![]&&_0x3326e0[_0xc31ce6(0x1da)]===_0x4357c4&&(_0x3326e0[_0xc31ce6(0x1ce)]=!![]);}for(const _0x5c8bed of _0x482f87){if(_0x5c8bed[_0xc31ce6(0x1ca)]!==![])continue;if(_0x5ec533[_0xc31ce6(0x1e1)])continue;_0x3ed1e0&&String(_0x5c8bed[_0xc31ce6(0x1cc)]??'')[_0xc31ce6(0x1e5)]()===_0x3ed1e0&&(_0x5c8bed[_0xc31ce6(0x1ce)]=!![]);}return;}if(!_0x3ed1e0)return;for(const _0x55ae3c of _0x482f87){String(_0x55ae3c['appcode']??'')[_0xc31ce6(0x1e5)]()===_0x3ed1e0&&(_0x55ae3c[_0xc31ce6(0x1ce)]=!![]);}}export function resolveAppScopeForWrite(_0x2a3999,_0xbf4be4,_0x57fbf8){const _0x4caf57=a23_0x3c3d;if(_0xbf4be4)return _0x4caf57(0x1f6);const _0x385002=_0x57fbf8[_0x4caf57(0x1d1)][_0x4caf57(0x1fa)]&&typeof _0x57fbf8[_0x4caf57(0x1d1)]['apps']===_0x4caf57(0x1cd)?_0x57fbf8[_0x4caf57(0x1d1)]['apps']:{},_0x1b17b0=_0x57fbf8[_0x4caf57(0x1f3)][_0x4caf57(0x1fa)]&&typeof _0x57fbf8['globalConfig']['apps']===_0x4caf57(0x1cd)?_0x57fbf8['globalConfig'][_0x4caf57(0x1fa)]:{};if(Object[_0x4caf57(0x1e3)][_0x4caf57(0x1dc)]['call'](_0x385002,_0x2a3999))return _0x4caf57(0x1f2);if(Object['prototype'][_0x4caf57(0x1dc)]['call'](_0x1b17b0,_0x2a3999))return _0x4caf57(0x1f6);return _0x4caf57(0x1f2);}export function appDefinedIn(_0x49f06d,_0x4f0603,_0x599728){const _0x4141d5=a23_0x3c3d,_0x39020d=Object[_0x4141d5(0x1e3)]['hasOwnProperty'][_0x4141d5(0x1e2)](_0x4f0603,_0x49f06d),_0x29cccf=Object[_0x4141d5(0x1e3)][_0x4141d5(0x1dc)]['call'](_0x599728,_0x49f06d);if(_0x39020d&&_0x29cccf)return'both';if(_0x29cccf)return _0x4141d5(0x1f2);return _0x4141d5(0x1f6);}export function resolveDefaultAppSource(_0x3a503f){const _0x26e724=a23_0x3c3d,_0x39817a=_0x3a503f[_0x26e724(0x1d1)][_0x26e724(0x1fa)]&&typeof _0x3a503f['projectConfig']['apps']==='object'?_0x3a503f['projectConfig'][_0x26e724(0x1fa)]:{};if(_0x26e724(0x1e1)in _0x3a503f[_0x26e724(0x1d1)])return _0x26e724(0x1f2);if(Object['keys'](_0x39817a)[_0x26e724(0x1f7)]>0x0)return _0x26e724(0x1f2);if(Object[_0x26e724(0x1d8)](_0x3a503f[_0x26e724(0x1d1)])[_0x26e724(0x1f7)]===0x0&&_0x3a503f[_0x26e724(0x1f3)][_0x26e724(0x1e1)])return _0x26e724(0x1f6);return null;}export function getConfigPath(_0xe234d1={}){const _0x363653=a23_0x3c3d,_0x25fbd4=_0xe234d1[_0x363653(0x1f6)]?_0x363653(0x1f6):_0x363653(0x1f2);return resolveWriteConfigPath(_0x25fbd4);}export function readConfig(_0x423db1={}){return readConfigFile(getConfigPath(_0x423db1));}export function writeConfig(_0x556b0b,_0x34774e={}){writeConfigFile(getConfigPath(_0x34774e),_0x556b0b);}function a23_0x1212(){const _0x245a71=['20NSPMKG','get','displayName','userList','keys','userId','name','add','hasOwnProperty','4656846NelTFU','sort','1797762xHOGsa','currentApp','defaultApp','call','prototype','9146880PdbNJK','trim','has','username','566637OvmWLY','20420iXSuuA','set','push','roleKeys','2BdycIF','appCode','nickname','membershipStatus','ACTIVE','project','globalConfig','153TqtGjN','applyUserList','global','length','91496RWVKLc','\x20(global)','apps','roleId','named','7041734DgIsaN','appcode','object','isCurrent','roles','values','projectConfig','map','status'];a23_0x1212=function(){return _0x245a71;};return a23_0x1212();}export function scopeLabel(_0x28096b){const _0x3fc6bb=a23_0x3c3d;return _0x28096b[_0x3fc6bb(0x1f6)]?_0x3fc6bb(0x1f9):'';}
@@ -1 +1 @@
1
- const a24_0x54de43=a24_0x4496;(function(_0x118766,_0x2c3853){const _0x54f14a=a24_0x4496,_0x163ce7=_0x118766();while(!![]){try{const _0x1766c1=parseInt(_0x54f14a(0xcb))/0x1*(-parseInt(_0x54f14a(0xd0))/0x2)+-parseInt(_0x54f14a(0xce))/0x3+-parseInt(_0x54f14a(0xca))/0x4+parseInt(_0x54f14a(0xd4))/0x5+-parseInt(_0x54f14a(0xdc))/0x6+-parseInt(_0x54f14a(0xda))/0x7*(-parseInt(_0x54f14a(0xcc))/0x8)+parseInt(_0x54f14a(0xd7))/0x9;if(_0x1766c1===_0x2c3853)break;else _0x163ce7['push'](_0x163ce7['shift']());}catch(_0x52dfa6){_0x163ce7['push'](_0x163ce7['shift']());}}}(a24_0x5e5c,0x8660f));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH='/smartapi/app-config/delete';export const appConfigDelete={'service':'app-config','command':a24_0x54de43(0xdb),'description':a24_0x54de43(0xd6),'risk':a24_0x54de43(0xc9),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x291fb3){readKeyArg(_0x291fb3);},async 'dryRun'(_0x198359){const _0x431435=a24_0x54de43,_0x240a0a=readKeyArg(_0x198359),_0x1d2469=await mustGetByKey(_0x198359[_0x431435(0xcf)],_0x240a0a);return asAppConfigDryRunResult(buildMutationData({'operation':_0x431435(0xdb),'appCode':_0x198359[_0x431435(0xcf)],'key':_0x240a0a,'before':projectAppConfig(_0x1d2469),'after':null,'dryRun':!![]}),{'method':_0x431435(0xcd),'url':DELETE_PATH});},async 'execute'(_0x56842b){const _0x2ced7=a24_0x54de43,_0x58effd=readKeyArg(_0x56842b),_0x586413=await mustGetByKey(_0x56842b[_0x2ced7(0xcf)],_0x58effd);return await withAppConfigApiBoundary('delete',{'appCode':_0x56842b[_0x2ced7(0xcf)],'key':_0x58effd},()=>deleteAppConfig({'appCode':_0x56842b['appCode'],'id':requireAppConfigId(_0x586413,_0x58effd,_0x56842b[_0x2ced7(0xcf)])})),{'ok':!![],'data':buildMutationData({'operation':_0x2ced7(0xdb),'appCode':_0x56842b[_0x2ced7(0xcf)],'key':_0x58effd,'before':projectAppConfig(_0x586413),'after':null,'dryRun':![]}),'message':'Deleted\x20app\x20config\x20'+_0x58effd};}};function a24_0x5e5c(){const _0x1714ca=['appCode','1795340GDAJDO','number',',\x20appCode=','appCode:\x20','1149130HrcGwD','get','Delete\x20one\x20runtime\x20app-config\x20key','21129156gmuEJh','isFinite','validation','7JEvwiY','delete','1239828bXeuZf','high-risk-write','4112752Jgqoow','1TngyGF','2327408Zaikhf','POST','556575RzavwG'];a24_0x5e5c=function(){return _0x1714ca;};return a24_0x5e5c();}async function mustGetByKey(_0x4742d1,_0x11e796){const _0x13db3d=a24_0x54de43,_0x28faa3=await withAppConfigApiBoundary(_0x13db3d(0xd5),{'appCode':_0x4742d1,'key':_0x11e796},()=>getAppConfigByKey(_0x4742d1,_0x11e796));if(!_0x28faa3)throw CliErrors[_0x13db3d(0xd9)]('App\x20config\x20key\x20not\x20found:\x20'+_0x11e796,_0x13db3d(0xd3)+_0x4742d1);return _0x28faa3;}function a24_0x4496(_0x13a81e,_0x4d5d13){_0x13a81e=_0x13a81e-0xc9;const _0x5e5c29=a24_0x5e5c();let _0x449614=_0x5e5c29[_0x13a81e];return _0x449614;}function requireAppConfigId(_0x582fe6,_0x1d260c,_0x148c92){const _0x550c38=a24_0x54de43;if(typeof _0x582fe6['id']===_0x550c38(0xd1)&&Number[_0x550c38(0xd8)](_0x582fe6['id'])&&_0x582fe6['id']>0x0)return _0x582fe6['id'];throw CliErrors['apiError']('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x1d260c+_0x550c38(0xd2)+_0x148c92);}
1
+ const a24_0x38d54f=a24_0x1e0d;(function(_0x19d3aa,_0x5626d5){const _0x48380d=a24_0x1e0d,_0x25f78a=_0x19d3aa();while(!![]){try{const _0x1b1256=-parseInt(_0x48380d(0x144))/0x1+-parseInt(_0x48380d(0x13e))/0x2+-parseInt(_0x48380d(0x143))/0x3+-parseInt(_0x48380d(0x145))/0x4*(parseInt(_0x48380d(0x14f))/0x5)+-parseInt(_0x48380d(0x148))/0x6+parseInt(_0x48380d(0x14b))/0x7*(-parseInt(_0x48380d(0x14d))/0x8)+parseInt(_0x48380d(0x13c))/0x9*(parseInt(_0x48380d(0x149))/0xa);if(_0x1b1256===_0x5626d5)break;else _0x25f78a['push'](_0x25f78a['shift']());}catch(_0x3250ad){_0x25f78a['push'](_0x25f78a['shift']());}}}(a24_0x4152,0x7cf94));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a24_0x1e0d(_0x103746,_0x2a191b){_0x103746=_0x103746-0x13c;const _0x41525b=a24_0x4152();let _0x1e0dce=_0x41525b[_0x103746];return _0x1e0dce;}const DELETE_PATH=a24_0x38d54f(0x150);export const appConfigDelete={'service':a24_0x38d54f(0x14e),'command':a24_0x38d54f(0x141),'description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':a24_0x38d54f(0x13f),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x937b39){readKeyArg(_0x937b39);},async 'dryRun'(_0x45ef18){const _0x32da60=a24_0x38d54f,_0x2f4feb=readKeyArg(_0x45ef18),_0x19c2c6=await mustGetByKey(_0x45ef18[_0x32da60(0x140)],_0x2f4feb);return asAppConfigDryRunResult(buildMutationData({'operation':_0x32da60(0x141),'appCode':_0x45ef18[_0x32da60(0x140)],'key':_0x2f4feb,'before':projectAppConfig(_0x19c2c6),'after':null,'dryRun':!![]}),{'method':_0x32da60(0x13d),'url':DELETE_PATH});},async 'execute'(_0x2a3418){const _0x4f6918=a24_0x38d54f,_0x3ddc85=readKeyArg(_0x2a3418),_0x5aa2d3=await mustGetByKey(_0x2a3418[_0x4f6918(0x140)],_0x3ddc85);return await withAppConfigApiBoundary(_0x4f6918(0x141),{'appCode':_0x2a3418['appCode'],'key':_0x3ddc85},()=>deleteAppConfig({'appCode':_0x2a3418['appCode'],'id':requireAppConfigId(_0x5aa2d3,_0x3ddc85,_0x2a3418[_0x4f6918(0x140)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x2a3418['appCode'],'key':_0x3ddc85,'before':projectAppConfig(_0x5aa2d3),'after':null,'dryRun':![]}),'message':_0x4f6918(0x146)+_0x3ddc85};}};async function mustGetByKey(_0x31aa28,_0x26793e){const _0x1e1fa4=a24_0x38d54f,_0x6b2954=await withAppConfigApiBoundary('get',{'appCode':_0x31aa28,'key':_0x26793e},()=>getAppConfigByKey(_0x31aa28,_0x26793e));if(!_0x6b2954)throw CliErrors['validation'](_0x1e1fa4(0x151)+_0x26793e,_0x1e1fa4(0x142)+_0x31aa28);return _0x6b2954;}function requireAppConfigId(_0x572bc5,_0x26497c,_0x5ca96d){const _0x16f0ce=a24_0x38d54f;if(typeof _0x572bc5['id']===_0x16f0ce(0x14c)&&Number[_0x16f0ce(0x14a)](_0x572bc5['id'])&&_0x572bc5['id']>0x0)return _0x572bc5['id'];throw CliErrors[_0x16f0ce(0x153)](_0x16f0ce(0x152)+_0x26497c+_0x16f0ce(0x147)+_0x5ca96d);}function a24_0x4152(){const _0x46d2a3=['appCode:\x20','868800oLYeGY','627352IHRdkM','4zmrzxt','Deleted\x20app\x20config\x20',',\x20appCode=','4765224qYZLCc','10mTmWrj','isFinite','7smTvlC','number','3585928mznjCd','app-config','4369645DeuGPC','/smartapi/app-config/delete','App\x20config\x20key\x20not\x20found:\x20','App\x20config\x20server\x20id\x20missing\x20for\x20key=','apiError','36940077EuVhCR','POST','1118470QyPxOa','high-risk-write','appCode','delete'];a24_0x4152=function(){return _0x46d2a3;};return a24_0x4152();}
@@ -1 +1 @@
1
- const a25_0x3da284=a25_0x19fa;function a25_0x5a8e(){const _0x3357f5=['1426512AVgcIy','Loaded\x20app\x20config\x20','\x20with\x20value\x20revealed','appCode','14egGVWF','973332SzCWMq','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','App\x20config\x20key\x20not\x20found:\x20','appCode:\x20','124356XPQlZc','338640OMCulQ','get','11342853nMXfnU','8CuBmUR','10QAkkOM','reveal','\x20with\x20value\x20redacted','2063244XCXAYG','342183GNGfhE'];a25_0x5a8e=function(){return _0x3357f5;};return a25_0x5a8e();}(function(_0x5c4cd0,_0x1ce000){const _0x296669=a25_0x19fa,_0x7e9597=_0x5c4cd0();while(!![]){try{const _0x4fe921=parseInt(_0x296669(0x91))/0x1+-parseInt(_0x296669(0x8c))/0x2*(parseInt(_0x296669(0x88))/0x3)+-parseInt(_0x296669(0x97))/0x4+-parseInt(_0x296669(0x89))/0x5+-parseInt(_0x296669(0x90))/0x6+parseInt(_0x296669(0x96))/0x7*(-parseInt(_0x296669(0x92))/0x8)+-parseInt(_0x296669(0x8b))/0x9*(-parseInt(_0x296669(0x8d))/0xa);if(_0x4fe921===_0x1ce000)break;else _0x7e9597['push'](_0x7e9597['shift']());}catch(_0x2ebecc){_0x7e9597['push'](_0x7e9597['shift']());}}}(a25_0x5a8e,0x67ca9));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a25_0x19fa(_0x27d2e0,_0x30b54f){_0x27d2e0=_0x27d2e0-0x87;const _0x5a8ea5=a25_0x5a8e();let _0x19fafe=_0x5a8ea5[_0x27d2e0];return _0x19fafe;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':a25_0x3da284(0x8a),'description':a25_0x3da284(0x98),'risk':'read','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x229a19){readKeyArg(_0x229a19);},async 'execute'(_0x5eed7c){const _0x3414c9=a25_0x3da284,_0x4c2ece=readKeyArg(_0x5eed7c),_0x2d633=await withAppConfigApiBoundary(_0x3414c9(0x8a),{'appCode':_0x5eed7c['appCode'],'key':_0x4c2ece},()=>getAppConfigByKey(_0x5eed7c[_0x3414c9(0x95)],_0x4c2ece));if(!_0x2d633)throw CliErrors['validation'](_0x3414c9(0x99)+_0x4c2ece,_0x3414c9(0x87)+_0x5eed7c['appCode']);const _0x596184=projectAppConfig(_0x2d633,{'reveal':_0x5eed7c['bool'](_0x3414c9(0x8e))});return{'ok':!![],'data':{'config':_0x596184},'message':_0x5eed7c['bool'](_0x3414c9(0x8e))?_0x3414c9(0x93)+_0x4c2ece+_0x3414c9(0x94):_0x3414c9(0x93)+_0x4c2ece+_0x3414c9(0x8f)};}};
1
+ const a25_0x1c398b=a25_0x1b3a;(function(_0x42223f,_0x288ebc){const _0x473ae0=a25_0x1b3a,_0x28df06=_0x42223f();while(!![]){try{const _0x1b1a9e=parseInt(_0x473ae0(0x88))/0x1*(-parseInt(_0x473ae0(0x8f))/0x2)+-parseInt(_0x473ae0(0x83))/0x3*(parseInt(_0x473ae0(0x8a))/0x4)+-parseInt(_0x473ae0(0x8d))/0x5*(-parseInt(_0x473ae0(0x90))/0x6)+-parseInt(_0x473ae0(0x91))/0x7*(-parseInt(_0x473ae0(0x81))/0x8)+parseInt(_0x473ae0(0x8b))/0x9+-parseInt(_0x473ae0(0x86))/0xa+-parseInt(_0x473ae0(0x7b))/0xb*(-parseInt(_0x473ae0(0x8e))/0xc);if(_0x1b1a9e===_0x288ebc)break;else _0x28df06['push'](_0x28df06['shift']());}catch(_0x4f1e9e){_0x28df06['push'](_0x28df06['shift']());}}}(a25_0xf160,0xd8e5d));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a25_0xf160(){const _0x4f4e21=['2733798yKdzlu','\x20with\x20value\x20redacted','App\x20config\x20key\x20not\x20found:\x20','3561860ViIvfG','get','2UeZUdx','app-config','4GmjTbC','8451261ubQZPA','reveal','2121865dLBmCj','19524GAIcfl','1223654mBnpBu','6EOphQt','658sSJbId','3817iuuxeB','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','appCode','validation','bool','appCode:\x20','123536fVVRiZ','read'];a25_0xf160=function(){return _0x4f4e21;};return a25_0xf160();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a25_0x1b3a(_0xb156b9,_0x381d17){_0xb156b9=_0xb156b9-0x7b;const _0xf1603=a25_0xf160();let _0x1b3a5b=_0xf1603[_0xb156b9];return _0x1b3a5b;}import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x1c398b(0x89),'command':'get','description':a25_0x1c398b(0x7c),'risk':a25_0x1c398b(0x82),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x4a4378){readKeyArg(_0x4a4378);},async 'execute'(_0x4f8d8c){const _0xa6e4d7=a25_0x1c398b,_0x5e3e2c=readKeyArg(_0x4f8d8c),_0x428879=await withAppConfigApiBoundary(_0xa6e4d7(0x87),{'appCode':_0x4f8d8c[_0xa6e4d7(0x7d)],'key':_0x5e3e2c},()=>getAppConfigByKey(_0x4f8d8c[_0xa6e4d7(0x7d)],_0x5e3e2c));if(!_0x428879)throw CliErrors[_0xa6e4d7(0x7e)](_0xa6e4d7(0x85)+_0x5e3e2c,_0xa6e4d7(0x80)+_0x4f8d8c[_0xa6e4d7(0x7d)]);const _0x16f18d=projectAppConfig(_0x428879,{'reveal':_0x4f8d8c[_0xa6e4d7(0x7f)]('reveal')});return{'ok':!![],'data':{'config':_0x16f18d},'message':_0x4f8d8c[_0xa6e4d7(0x7f)](_0xa6e4d7(0x8c))?'Loaded\x20app\x20config\x20'+_0x5e3e2c+'\x20with\x20value\x20revealed':'Loaded\x20app\x20config\x20'+_0x5e3e2c+_0xa6e4d7(0x84)};}};
@@ -1 +1 @@
1
- (function(_0x31ee2b,_0x437078){const _0x2f9b5e=a26_0x124f,_0x134f99=_0x31ee2b();while(!![]){try{const _0xaec603=-parseInt(_0x2f9b5e(0x115))/0x1+parseInt(_0x2f9b5e(0x113))/0x2+-parseInt(_0x2f9b5e(0x110))/0x3+parseInt(_0x2f9b5e(0x111))/0x4+-parseInt(_0x2f9b5e(0x112))/0x5*(-parseInt(_0x2f9b5e(0x117))/0x6)+-parseInt(_0x2f9b5e(0x116))/0x7+parseInt(_0x2f9b5e(0x114))/0x8;if(_0xaec603===_0x437078)break;else _0x134f99['push'](_0x134f99['shift']());}catch(_0x325431){_0x134f99['push'](_0x134f99['shift']());}}}(a26_0x36f5,0xe5064));function a26_0x124f(_0x3b214f,_0x4c4d18){_0x3b214f=_0x3b214f-0x110;const _0x36f5dc=a26_0x36f5();let _0x124f6d=_0x36f5dc[_0x3b214f];return _0x124f6d;}import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';function a26_0x36f5(){const _0x5da1b9=['4191916WGpNfm','6105EZvLop','1985400WpWVvx','5218216RXdgPF','425267aIkaUx','6913235EmOdkp','4836knKgNo','3978378scSLFt'];a26_0x36f5=function(){return _0x5da1b9;};return a26_0x36f5();}import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
1
+ function a26_0x5e8e(){const _0x420604=['5ciWXsS','4256814kRZMTA','2383400tHSzOn','305901twwuhr','14162553stuBXV','6905610mrjejq','1uHirkU','7991102dxODsB','8sHZQYM','2757662qKVhfa'];a26_0x5e8e=function(){return _0x420604;};return a26_0x5e8e();}(function(_0x50837d,_0xf5dcfb){const _0x39961c=a26_0xed36,_0x9e68b5=_0x50837d();while(!![]){try{const _0x397c48=parseInt(_0x39961c(0xbb))/0x1*(-parseInt(_0x39961c(0xbe))/0x2)+parseInt(_0x39961c(0xb8))/0x3+-parseInt(_0x39961c(0xb7))/0x4+-parseInt(_0x39961c(0xbf))/0x5*(-parseInt(_0x39961c(0xc0))/0x6)+-parseInt(_0x39961c(0xbc))/0x7*(-parseInt(_0x39961c(0xbd))/0x8)+parseInt(_0x39961c(0xb9))/0x9+-parseInt(_0x39961c(0xba))/0xa;if(_0x397c48===_0xf5dcfb)break;else _0x9e68b5['push'](_0x9e68b5['shift']());}catch(_0x35f764){_0x9e68b5['push'](_0x9e68b5['shift']());}}}(a26_0x5e8e,0xd24d5));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';function a26_0xed36(_0x51541e,_0x2a0fc2){_0x51541e=_0x51541e-0xb7;const _0x5e8e7f=a26_0x5e8e();let _0xed362d=_0x5e8e7f[_0x51541e];return _0xed362d;}import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
@@ -1 +1 @@
1
- const a27_0x4aa402=a27_0x166d;function a27_0x166d(_0x324718,_0x2390c8){_0x324718=_0x324718-0x13e;const _0x11cc21=a27_0x11cc();let _0x166d6c=_0x11cc21[_0x324718];return _0x166d6c;}(function(_0x1bfae2,_0x3f9cf8){const _0x48cd3b=a27_0x166d,_0x59a286=_0x1bfae2();while(!![]){try{const _0x14e452=parseInt(_0x48cd3b(0x152))/0x1+parseInt(_0x48cd3b(0x146))/0x2+parseInt(_0x48cd3b(0x142))/0x3*(-parseInt(_0x48cd3b(0x14d))/0x4)+parseInt(_0x48cd3b(0x149))/0x5+parseInt(_0x48cd3b(0x14c))/0x6+-parseInt(_0x48cd3b(0x141))/0x7+parseInt(_0x48cd3b(0x148))/0x8*(-parseInt(_0x48cd3b(0x151))/0x9);if(_0x14e452===_0x3f9cf8)break;else _0x59a286['push'](_0x59a286['shift']());}catch(_0x21b5d1){_0x59a286['push'](_0x59a286['shift']());}}}(a27_0x11cc,0x236f9));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_0x11cc(){const _0x3c864e=['282299hgFpaj','string','length','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','key','1149463XFyzcC','741REfDxx','Filter\x20by\x20exact\x20config\x20key','read','app-config','4838qqLSgY','list','49208lnSXjH','306985gtTNoT','trim','\x20app\x20config(s)','1361202DfCBCZ','3572vJYcCv','map','Found\x20','appCode','63uOeReu'];a27_0x11cc=function(){return _0x3c864e;};return a27_0x11cc();}export const appConfigList={'service':a27_0x4aa402(0x145),'command':a27_0x4aa402(0x147),'description':a27_0x4aa402(0x13f),'risk':a27_0x4aa402(0x144),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x4aa402(0x140),'type':a27_0x4aa402(0x153),'description':a27_0x4aa402(0x143)},TAGS_FLAG],async 'validate'(_0xed14f4){const _0x503562=a27_0x4aa402,_0x4ca6f0=_0xed14f4['str'](_0x503562(0x140))[_0x503562(0x14a)]();if(_0x4ca6f0)validateKey(_0x4ca6f0);readOptionalTags(_0xed14f4);},async 'execute'(_0x4a451a){const _0x15fdf7=a27_0x4aa402,_0x1c51c4=_0x4a451a['str'](_0x15fdf7(0x140))[_0x15fdf7(0x14a)]()||undefined,_0x47baef=readOptionalTags(_0x4a451a),_0x3d85e8=await withAppConfigApiBoundary(_0x15fdf7(0x147),{'appCode':_0x4a451a['appCode']},()=>listAppConfigs(_0x4a451a[_0x15fdf7(0x150)],{'key':_0x1c51c4,'tags':_0x47baef})),_0x52c65d=_0x3d85e8[_0x15fdf7(0x14e)](_0x3f10ed=>projectAppConfig(_0x3f10ed));return{'ok':!![],'data':{'appCode':_0x4a451a[_0x15fdf7(0x150)],'count':_0x52c65d[_0x15fdf7(0x13e)],'configs':_0x52c65d},'message':_0x15fdf7(0x14f)+_0x52c65d[_0x15fdf7(0x13e)]+_0x15fdf7(0x14b)};}};
1
+ const a27_0x4325ae=a27_0x1303;(function(_0xbcbbb5,_0x1c30e8){const _0x158e3e=a27_0x1303,_0x3a480a=_0xbcbbb5();while(!![]){try{const _0x41abf8=parseInt(_0x158e3e(0x1a3))/0x1*(parseInt(_0x158e3e(0x1a1))/0x2)+parseInt(_0x158e3e(0x190))/0x3*(parseInt(_0x158e3e(0x19d))/0x4)+parseInt(_0x158e3e(0x19c))/0x5*(parseInt(_0x158e3e(0x1a2))/0x6)+-parseInt(_0x158e3e(0x18f))/0x7*(parseInt(_0x158e3e(0x19f))/0x8)+parseInt(_0x158e3e(0x19e))/0x9+parseInt(_0x158e3e(0x19b))/0xa+-parseInt(_0x158e3e(0x194))/0xb;if(_0x41abf8===_0x1c30e8)break;else _0x3a480a['push'](_0x3a480a['shift']());}catch(_0x525448){_0x3a480a['push'](_0x3a480a['shift']());}}}(a27_0xde41,0xe2b2a));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0xde41(){const _0x53a18f=['appCode','8WvGYwB','90jyjSxP','233850buvilW','35FOPfHp','1203JFcHCx','app-config','read','trim','27640019Ihgtgg','list','Found\x20','map','length','key','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','9146970ghIqZQ','279975yOLigZ','11636LnuIFF','2262798XpPouo','1066672wIicls'];a27_0xde41=function(){return _0x53a18f;};return a27_0xde41();}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a27_0x1303(_0x3d0cc4,_0x463433){_0x3d0cc4=_0x3d0cc4-0x18f;const _0xde41cc=a27_0xde41();let _0x1303d0=_0xde41cc[_0x3d0cc4];return _0x1303d0;}export const appConfigList={'service':a27_0x4325ae(0x191),'command':a27_0x4325ae(0x195),'description':a27_0x4325ae(0x19a),'risk':a27_0x4325ae(0x192),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x4325ae(0x199),'type':'string','description':'Filter\x20by\x20exact\x20config\x20key'},TAGS_FLAG],async 'validate'(_0x2baade){const _0x2890f4=a27_0x4325ae,_0xa76630=_0x2baade['str'](_0x2890f4(0x199))[_0x2890f4(0x193)]();if(_0xa76630)validateKey(_0xa76630);readOptionalTags(_0x2baade);},async 'execute'(_0x5b9bb6){const _0xf34369=a27_0x4325ae,_0x3ac53e=_0x5b9bb6['str'](_0xf34369(0x199))['trim']()||undefined,_0x333a66=readOptionalTags(_0x5b9bb6),_0x3c64d8=await withAppConfigApiBoundary('list',{'appCode':_0x5b9bb6[_0xf34369(0x1a0)]},()=>listAppConfigs(_0x5b9bb6[_0xf34369(0x1a0)],{'key':_0x3ac53e,'tags':_0x333a66})),_0x155c4a=_0x3c64d8[_0xf34369(0x197)](_0xcf41e5=>projectAppConfig(_0xcf41e5));return{'ok':!![],'data':{'appCode':_0x5b9bb6[_0xf34369(0x1a0)],'count':_0x155c4a['length'],'configs':_0x155c4a},'message':_0xf34369(0x196)+_0x155c4a[_0xf34369(0x198)]+'\x20app\x20config(s)'};}};
@@ -1 +1 @@
1
- const a28_0x5d21e8=a28_0x1c40;(function(_0x39de10,_0x11af47){const _0x304420=a28_0x1c40,_0x72a3a1=_0x39de10();while(!![]){try{const _0x1f5a6d=parseInt(_0x304420(0xc4))/0x1+parseInt(_0x304420(0xc2))/0x2+-parseInt(_0x304420(0xc3))/0x3+parseInt(_0x304420(0xc7))/0x4+-parseInt(_0x304420(0xbf))/0x5*(parseInt(_0x304420(0xba))/0x6)+-parseInt(_0x304420(0xb8))/0x7*(parseInt(_0x304420(0xb6))/0x8)+parseInt(_0x304420(0xbc))/0x9;if(_0x1f5a6d===_0x11af47)break;else _0x72a3a1['push'](_0x72a3a1['shift']());}catch(_0x278387){_0x72a3a1['push'](_0x72a3a1['shift']());}}}(a28_0x528c,0xa8977));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';function a28_0x1c40(_0x5cd1c9,_0xcfbc85){_0x5cd1c9=_0x5cd1c9-0xb4;const _0x528cdf=a28_0x528c();let _0x1c408f=_0x528cdf[_0x5cd1c9];return _0x1c408f;}import{CliErrors}from'../../errors.js';function a28_0x528c(){const _0x5ca69e=['3455988oNapjX','289737EJkRuw','App\x20config\x20server\x20id\x20missing\x20for\x20key=',',\x20appCode=','4162788FxGJuh','set','/smartapi/app-config/update','get','tags','POST','Created','string','number','8TgPllQ','app-config','5038369rLTIrs','Updated','186nrcgxy','create','9133290CueMQc','file','update','65885TJmcZd','appCode','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','1251114fMLeCG'];a28_0x528c=function(){return _0x5ca69e;};return a28_0x528c();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH='/smartapi/app-config/create',UPDATE_PATH=a28_0x5d21e8(0xc9);export const appConfigSet={'service':a28_0x5d21e8(0xb7),'command':a28_0x5d21e8(0xc8),'description':a28_0x5d21e8(0xc1),'risk':'write','args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x5d21e8(0xbd),'type':a28_0x5d21e8(0xb4),'description':'Read\x20config\x20value\x20from\x20file'}],async 'validate'(_0xbf54c8){readKeyArg(_0xbf54c8),readOptionalTags(_0xbf54c8),assertSingleValueSource(_0xbf54c8);},async 'dryRun'(_0x2954f8){const _0x388e3d=a28_0x5d21e8,_0x26771b=readKeyArg(_0x2954f8),_0x4bf22b=readOptionalTags(_0x2954f8),_0x1983ea=assertSingleValueSource(_0x2954f8);await assertValueSourceReadable(_0x1983ea);const _0x1b33ee=await withAppConfigApiBoundary(_0x388e3d(0xca),{'appCode':_0x2954f8[_0x388e3d(0xc0)],'key':_0x26771b},()=>getAppConfigByKey(_0x2954f8[_0x388e3d(0xc0)],_0x26771b)),_0x3eb276=_0x1b33ee?'update':_0x388e3d(0xbb),_0x327fb0=_0x1b33ee?projectAppConfig(_0x1b33ee):null,_0x691bfa=plannedAppConfig({'appCode':_0x2954f8[_0x388e3d(0xc0)],'key':_0x26771b,'tags':_0x4bf22b??_0x1b33ee?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x3eb276,'appCode':_0x2954f8[_0x388e3d(0xc0)],'key':_0x26771b,'before':_0x327fb0,'after':_0x691bfa,'dryRun':!![]}),{'method':_0x388e3d(0xcc),'url':_0x3eb276===_0x388e3d(0xbe)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x4a9e00){const _0xd726fb=a28_0x5d21e8,_0x3c99a1=readKeyArg(_0x4a9e00),_0x32cb62=readOptionalTags(_0x4a9e00),_0x70503=await withAppConfigApiBoundary('get',{'appCode':_0x4a9e00[_0xd726fb(0xc0)],'key':_0x3c99a1},()=>getAppConfigByKey(_0x4a9e00[_0xd726fb(0xc0)],_0x3c99a1)),_0x38387c=_0x70503?projectAppConfig(_0x70503):null,_0x25cca9=_0x70503?_0xd726fb(0xbe):_0xd726fb(0xbb),{value:_0x29247a,warnings:_0x3cc983}=await readAppConfigValue(_0x4a9e00),_0x386a92={'appCode':_0x4a9e00[_0xd726fb(0xc0)],'key':_0x3c99a1,'value':_0x29247a,'tags':_0x32cb62??_0x70503?.[_0xd726fb(0xcb)]??undefined};await withAppConfigApiBoundary(_0x25cca9,{'appCode':_0x4a9e00[_0xd726fb(0xc0)],'key':_0x3c99a1},async()=>{const _0xbba183=_0xd726fb;_0x70503?await updateAppConfig({..._0x386a92,'id':requireAppConfigId(_0x70503,_0x3c99a1,_0x4a9e00[_0xbba183(0xc0)])}):await createAppConfig(_0x386a92);});const _0x464068=await withAppConfigApiBoundary(_0xd726fb(0xca),{'appCode':_0x4a9e00['appCode'],'key':_0x3c99a1},()=>getAppConfigByKey(_0x4a9e00[_0xd726fb(0xc0)],_0x3c99a1)),_0x57b09e=_0x464068?projectAppConfig(_0x464068):plannedAppConfig({'appCode':_0x4a9e00[_0xd726fb(0xc0)],'key':_0x3c99a1,'tags':_0x386a92[_0xd726fb(0xcb)],'hasValue':_0x29247a!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x25cca9,'appCode':_0x4a9e00[_0xd726fb(0xc0)],'key':_0x3c99a1,'before':_0x38387c,'after':_0x57b09e,'dryRun':![],'warnings':_0x3cc983}),'message':(_0x25cca9==='update'?_0xd726fb(0xb9):_0xd726fb(0xcd))+'\x20app\x20config\x20'+_0x3c99a1};}};function requireAppConfigId(_0x2261e9,_0x1ba348,_0x5b4647){const _0x4d2cd4=a28_0x5d21e8;if(typeof _0x2261e9['id']===_0x4d2cd4(0xb5)&&Number['isFinite'](_0x2261e9['id'])&&_0x2261e9['id']>0x0)return _0x2261e9['id'];throw CliErrors['apiError'](_0x4d2cd4(0xc5)+_0x1ba348+_0x4d2cd4(0xc6)+_0x5b4647);}
1
+ const a28_0x563009=a28_0x4292;function a28_0x4292(_0x301372,_0x57baa6){_0x301372=_0x301372-0x81;const _0xd360a9=a28_0xd360();let _0x4292d0=_0xd360a9[_0x301372];return _0x4292d0;}(function(_0x1e8cb5,_0x48e87f){const _0x5f531f=a28_0x4292,_0x5d795a=_0x1e8cb5();while(!![]){try{const _0x27ec56=parseInt(_0x5f531f(0x84))/0x1*(-parseInt(_0x5f531f(0x93))/0x2)+-parseInt(_0x5f531f(0x97))/0x3+-parseInt(_0x5f531f(0x8c))/0x4+parseInt(_0x5f531f(0x89))/0x5+-parseInt(_0x5f531f(0x82))/0x6+-parseInt(_0x5f531f(0x8e))/0x7*(-parseInt(_0x5f531f(0x86))/0x8)+parseInt(_0x5f531f(0x90))/0x9;if(_0x27ec56===_0x48e87f)break;else _0x5d795a['push'](_0x5d795a['shift']());}catch(_0x5d9cc6){_0x5d795a['push'](_0x5d795a['shift']());}}}(a28_0xd360,0xce2f3));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a28_0xd360(){const _0x132ace=['app-config','5419704JxOqpm','Created','144zQDCiY','/smartapi/app-config/create','8TAMZiS','get','file','7778225xvlZXi','apiError','tags','6376372HfwlmJ','/smartapi/app-config/update','2939209amoHLh','create','23964444QSBwqm','appCode','string','5906HdwfyT','write','Updated','\x20app\x20config\x20','2613324zNQvuu','update','number','set'];a28_0xd360=function(){return _0x132ace;};return a28_0xd360();}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_0x563009(0x85),UPDATE_PATH=a28_0x563009(0x8d);export const appConfigSet={'service':a28_0x563009(0x81),'command':a28_0x563009(0x9a),'description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0x563009(0x94),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x563009(0x88),'type':a28_0x563009(0x92),'description':'Read\x20config\x20value\x20from\x20file'}],async 'validate'(_0x1d570c){readKeyArg(_0x1d570c),readOptionalTags(_0x1d570c),assertSingleValueSource(_0x1d570c);},async 'dryRun'(_0xb8f183){const _0x174a59=a28_0x563009,_0x7d2135=readKeyArg(_0xb8f183),_0x408c2e=readOptionalTags(_0xb8f183),_0x5bbe5f=assertSingleValueSource(_0xb8f183);await assertValueSourceReadable(_0x5bbe5f);const _0x2b9015=await withAppConfigApiBoundary(_0x174a59(0x87),{'appCode':_0xb8f183['appCode'],'key':_0x7d2135},()=>getAppConfigByKey(_0xb8f183[_0x174a59(0x91)],_0x7d2135)),_0x126732=_0x2b9015?'update':_0x174a59(0x8f),_0x23a113=_0x2b9015?projectAppConfig(_0x2b9015):null,_0x8b359d=plannedAppConfig({'appCode':_0xb8f183[_0x174a59(0x91)],'key':_0x7d2135,'tags':_0x408c2e??_0x2b9015?.[_0x174a59(0x8b)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x126732,'appCode':_0xb8f183['appCode'],'key':_0x7d2135,'before':_0x23a113,'after':_0x8b359d,'dryRun':!![]}),{'method':'POST','url':_0x126732===_0x174a59(0x98)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x1a077d){const _0x3f3cd3=a28_0x563009,_0x13207e=readKeyArg(_0x1a077d),_0x6cc538=readOptionalTags(_0x1a077d),_0x3cd5d5=await withAppConfigApiBoundary(_0x3f3cd3(0x87),{'appCode':_0x1a077d['appCode'],'key':_0x13207e},()=>getAppConfigByKey(_0x1a077d[_0x3f3cd3(0x91)],_0x13207e)),_0x16d6f8=_0x3cd5d5?projectAppConfig(_0x3cd5d5):null,_0x5330c6=_0x3cd5d5?_0x3f3cd3(0x98):_0x3f3cd3(0x8f),{value:_0x4c3d67,warnings:_0x3a7539}=await readAppConfigValue(_0x1a077d),_0x2e7d45={'appCode':_0x1a077d['appCode'],'key':_0x13207e,'value':_0x4c3d67,'tags':_0x6cc538??_0x3cd5d5?.[_0x3f3cd3(0x8b)]??undefined};await withAppConfigApiBoundary(_0x5330c6,{'appCode':_0x1a077d[_0x3f3cd3(0x91)],'key':_0x13207e},async()=>{const _0xaf5da2=_0x3f3cd3;_0x3cd5d5?await updateAppConfig({..._0x2e7d45,'id':requireAppConfigId(_0x3cd5d5,_0x13207e,_0x1a077d[_0xaf5da2(0x91)])}):await createAppConfig(_0x2e7d45);});const _0x14e698=await withAppConfigApiBoundary(_0x3f3cd3(0x87),{'appCode':_0x1a077d['appCode'],'key':_0x13207e},()=>getAppConfigByKey(_0x1a077d[_0x3f3cd3(0x91)],_0x13207e)),_0x14047f=_0x14e698?projectAppConfig(_0x14e698):plannedAppConfig({'appCode':_0x1a077d[_0x3f3cd3(0x91)],'key':_0x13207e,'tags':_0x2e7d45[_0x3f3cd3(0x8b)],'hasValue':_0x4c3d67!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x5330c6,'appCode':_0x1a077d[_0x3f3cd3(0x91)],'key':_0x13207e,'before':_0x16d6f8,'after':_0x14047f,'dryRun':![],'warnings':_0x3a7539}),'message':(_0x5330c6===_0x3f3cd3(0x98)?_0x3f3cd3(0x95):_0x3f3cd3(0x83))+_0x3f3cd3(0x96)+_0x13207e};}};function requireAppConfigId(_0x10632c,_0x290df7,_0x3453f7){const _0x176bc1=a28_0x563009;if(typeof _0x10632c['id']===_0x176bc1(0x99)&&Number['isFinite'](_0x10632c['id'])&&_0x10632c['id']>0x0)return _0x10632c['id'];throw CliErrors[_0x176bc1(0x8a)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x290df7+',\x20appCode='+_0x3453f7);}
@@ -1 +1 @@
1
- const a29_0x12d039=a29_0x327c;(function(_0x199d6e,_0x2d2b6f){const _0x1a3607=a29_0x327c,_0x126311=_0x199d6e();while(!![]){try{const _0x593a16=parseInt(_0x1a3607(0x193))/0x1*(parseInt(_0x1a3607(0x18e))/0x2)+parseInt(_0x1a3607(0x178))/0x3*(parseInt(_0x1a3607(0x172))/0x4)+-parseInt(_0x1a3607(0x1a7))/0x5+-parseInt(_0x1a3607(0x19e))/0x6*(-parseInt(_0x1a3607(0x183))/0x7)+parseInt(_0x1a3607(0x185))/0x8+parseInt(_0x1a3607(0x173))/0x9*(parseInt(_0x1a3607(0x1a0))/0xa)+parseInt(_0x1a3607(0x1a4))/0xb*(-parseInt(_0x1a3607(0x1a3))/0xc);if(_0x593a16===_0x2d2b6f)break;else _0x126311['push'](_0x126311['shift']());}catch(_0xdc0ae7){_0x126311['push'](_0x126311['shift']());}}}(a29_0x57be,0x724be));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':'value','description':'Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','required':![]};export const TAGS_FLAG={'name':a29_0x12d039(0x17a),'type':a29_0x12d039(0x194),'description':a29_0x12d039(0x17d)};export const STDIN_FLAG={'name':'stdin','type':'boolean','description':a29_0x12d039(0x187),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x12d039(0x177),'type':a29_0x12d039(0x194),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0x12d039(0x199),'type':a29_0x12d039(0x1a2),'description':a29_0x12d039(0x196),'default':![]};export function readKeyArg(_0x44a515){const _0x5587b1=a29_0x12d039,_0x593b2b=_0x44a515[_0x5587b1(0x171)][0x0]?.[_0x5587b1(0x1a5)]()??'';return validateKey(_0x593b2b),_0x593b2b;}export function readOptionalTags(_0x2bcb54){const _0x16ee0f=a29_0x12d039,_0x55fa4f=_0x2bcb54[_0x16ee0f(0x181)]('tags')[_0x16ee0f(0x1a5)]();if(!_0x55fa4f)return undefined;if(_0x55fa4f[_0x16ee0f(0x180)]>0x20)throw CliErrors[_0x16ee0f(0x18a)](_0x16ee0f(0x198));return _0x55fa4f;}export function validateKey(_0x54fa69){const _0x5d4723=a29_0x12d039;if(!_0x54fa69)throw CliErrors[_0x5d4723(0x18a)](_0x5d4723(0x19d));if(_0x54fa69['length']>0x100)throw CliErrors[_0x5d4723(0x18a)](_0x5d4723(0x18c));}function a29_0x327c(_0x5f5952,_0xada8ba){_0x5f5952=_0x5f5952-0x16d;const _0x57bed8=a29_0x57be();let _0x327cd6=_0x57bed8[_0x5f5952];return _0x327cd6;}export function projectAppConfig(_0x4ade06,_0x2d08b7){const _0x59930a=a29_0x12d039,_0x540a7f=_0x4ade06[_0x59930a(0x186)]!==undefined&&_0x4ade06[_0x59930a(0x186)]!==null&&_0x4ade06[_0x59930a(0x186)]!=='',_0x23eaaf={'appCode':_0x4ade06['appCode'],'key':_0x4ade06[_0x59930a(0x17b)],'tags':_0x4ade06['tags']??undefined,'hasValue':_0x540a7f,'valueRedacted':_0x540a7f&&!_0x2d08b7?.[_0x59930a(0x199)],'gmtCreate':_0x4ade06[_0x59930a(0x182)],'gmtModified':_0x4ade06['gmtModified']};return _0x2d08b7?.[_0x59930a(0x199)]&&(_0x23eaaf[_0x59930a(0x186)]=_0x4ade06[_0x59930a(0x186)]??'',_0x23eaaf[_0x59930a(0x197)]=![]),_0x23eaaf;}export function plannedAppConfig(_0x475c03){const _0x47d9a4=a29_0x12d039,_0x3d10dd=_0x475c03[_0x47d9a4(0x19f)]??!![];return{'appCode':_0x475c03[_0x47d9a4(0x192)],'key':_0x475c03['key'],'tags':_0x475c03[_0x47d9a4(0x17a)]??undefined,'hasValue':_0x3d10dd,'valueRedacted':_0x3d10dd};}export function buildMutationData(_0x3d0a68){const _0x4da424=a29_0x12d039;return{'operation':_0x3d0a68[_0x4da424(0x174)],'selector':{'appCode':_0x3d0a68[_0x4da424(0x192)],'key':_0x3d0a68['key']},'before':_0x3d0a68[_0x4da424(0x16f)],'after':_0x3d0a68[_0x4da424(0x195)],'dryRun':_0x3d0a68[_0x4da424(0x191)],'warnings':_0x3d0a68['warnings']??[]};}export async function withAppConfigApiBoundary(_0xb112a,_0xb3b7d8,_0x369118){const _0x19c3a5=a29_0x12d039;try{return await _0x369118();}catch{const _0x19ad54=['appCode:\x20'+_0xb3b7d8['appCode']];if(_0xb3b7d8[_0x19c3a5(0x17b)])_0x19ad54['push'](_0x19c3a5(0x17e)+_0xb3b7d8[_0x19c3a5(0x17b)]);_0x19ad54['push']('value\x20is\x20redacted');throw CliErrors[_0x19c3a5(0x18d)](_0x19c3a5(0x175)+_0xb112a+_0x19c3a5(0x188),_0x19ad54[_0x19c3a5(0x179)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x32dbd7,_0xd5e76c){return Object['defineProperties'](_0x32dbd7,{'method':{'value':_0xd5e76c['method'],'enumerable':![]},'url':{'value':_0xd5e76c['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x2a8b01){const _0x415fa5=a29_0x12d039,_0x1cceb3=[];_0x2a8b01[_0x415fa5(0x171)][_0x415fa5(0x180)]>0x1&&_0x1cceb3[_0x415fa5(0x1a8)]({'kind':'argument','value':_0x2a8b01[_0x415fa5(0x171)][_0x415fa5(0x189)](0x1)['join']('\x20')});const _0x17d917=_0x2a8b01[_0x415fa5(0x19b)](_0x415fa5(0x186));_0x17d917!==undefined&&_0x17d917!==null&&_0x1cceb3[_0x415fa5(0x1a8)]({'kind':'argument','value':String(_0x17d917)});_0x2a8b01[_0x415fa5(0x19a)](_0x415fa5(0x19c))&&_0x1cceb3['push']({'kind':'stdin'});const _0x5975a4=_0x2a8b01[_0x415fa5(0x181)]('from-env')[_0x415fa5(0x1a5)]();_0x5975a4&&_0x1cceb3[_0x415fa5(0x1a8)]({'kind':_0x415fa5(0x176),'name':_0x5975a4});const _0x4378f3=_0x2a8b01[_0x415fa5(0x181)]('file')[_0x415fa5(0x1a5)]();_0x4378f3&&_0x1cceb3['push']({'kind':_0x415fa5(0x17f),'path':_0x4378f3});if(_0x1cceb3[_0x415fa5(0x180)]===0x0)throw CliErrors[_0x415fa5(0x18a)]('Missing\x20app-config\x20value\x20source.',_0x415fa5(0x184));if(_0x1cceb3[_0x415fa5(0x180)]>0x1)throw CliErrors[_0x415fa5(0x18a)](_0x415fa5(0x1a6),_0x415fa5(0x170));return _0x1cceb3[0x0];}function a29_0x57be(){const _0x11925c=['App\x20config\x20value\x20source\x20is\x20ambiguous.','4172695tWenLK','push','kind','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','name','once','error','before','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','args','12156PYRWga','24741SEDVDq','operation','Failed\x20to\x20','env','from-env','153pQHYxE','join','tags','key','utf8','Config\x20tags\x20for\x20filtering/display\x20metadata','key:\x20','file','length','str','gmtCreate','189uwvQNr','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','5217056YmbdyQ','value','Read\x20config\x20value\x20from\x20stdin','\x20app\x20config.','slice','validation','end','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','apiError','1238RDifWE','path','argument','dryRun','appCode','1507zLyyJR','string','after','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','valueRedacted','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','reveal','bool','flag','stdin','Missing\x20app-config\x20key.','116334bnSWFf','hasValue','1540iiteMG','Environment\x20variable\x20is\x20not\x20set:\x20','boolean','16609272dLgSMs','11QlwrqY','trim'];a29_0x57be=function(){return _0x11925c;};return a29_0x57be();}export async function assertValueSourceReadable(_0x48e93c){const _0x564f30=a29_0x12d039;if(_0x48e93c['kind']===_0x564f30(0x176)&&!(_0x48e93c['name']in process.env))throw CliErrors['validation'](_0x564f30(0x1a1)+_0x48e93c[_0x564f30(0x1ab)]);if(_0x48e93c[_0x564f30(0x1a9)]===_0x564f30(0x17f))try{await access(_0x48e93c[_0x564f30(0x18f)]);}catch{throw CliErrors[_0x564f30(0x18a)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0x48e93c['path']);}}export async function readAppConfigValue(_0xc33945){const _0x2b6bfb=a29_0x12d039,_0x55c234=assertSingleValueSource(_0xc33945),_0x46be69=[];if(_0x55c234[_0x2b6bfb(0x1a9)]===_0x2b6bfb(0x190))return _0x46be69['push'](_0x2b6bfb(0x1aa)),{'value':_0x55c234[_0x2b6bfb(0x186)]??'','source':_0x55c234[_0x2b6bfb(0x1a9)],'warnings':_0x46be69};if(_0x55c234[_0x2b6bfb(0x1a9)]===_0x2b6bfb(0x19c))return{'value':await readStdin(),'source':_0x55c234[_0x2b6bfb(0x1a9)],'warnings':_0x46be69};if(_0x55c234[_0x2b6bfb(0x1a9)]===_0x2b6bfb(0x176)){if(!(_0x55c234[_0x2b6bfb(0x1ab)]in process.env))throw CliErrors[_0x2b6bfb(0x18a)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x55c234[_0x2b6bfb(0x1ab)]);return{'value':process.env[_0x55c234.name]??'','source':_0x55c234[_0x2b6bfb(0x1a9)],'warnings':_0x46be69};}return{'value':await readFile(_0x55c234[_0x2b6bfb(0x18f)],_0x2b6bfb(0x17c)),'source':_0x55c234[_0x2b6bfb(0x1a9)],'warnings':_0x46be69};}function readStdin(){return new Promise((_0x3e2c4f,_0x4a248e)=>{const _0x3116b8=a29_0x327c;let _0xc22a3a='';process[_0x3116b8(0x19c)]['setEncoding'](_0x3116b8(0x17c)),process[_0x3116b8(0x19c)]['on']('data',_0x10b9ad=>{_0xc22a3a+=_0x10b9ad;}),process[_0x3116b8(0x19c)][_0x3116b8(0x16d)](_0x3116b8(0x18b),()=>_0x3e2c4f(_0xc22a3a)),process['stdin'][_0x3116b8(0x16d)](_0x3116b8(0x16e),_0x4a248e);});}
1
+ const a29_0x27feca=a29_0x3166;(function(_0x33d0b2,_0x400a1c){const _0x500b3b=a29_0x3166,_0x5770ec=_0x33d0b2();while(!![]){try{const _0x7d1fd6=parseInt(_0x500b3b(0x1e2))/0x1+-parseInt(_0x500b3b(0x212))/0x2+-parseInt(_0x500b3b(0x1eb))/0x3*(parseInt(_0x500b3b(0x207))/0x4)+-parseInt(_0x500b3b(0x1f3))/0x5*(-parseInt(_0x500b3b(0x208))/0x6)+parseInt(_0x500b3b(0x1db))/0x7+-parseInt(_0x500b3b(0x1e5))/0x8*(-parseInt(_0x500b3b(0x1fc))/0x9)+-parseInt(_0x500b3b(0x20c))/0xa;if(_0x7d1fd6===_0x400a1c)break;else _0x5770ec['push'](_0x5770ec['shift']());}catch(_0x43eb67){_0x5770ec['push'](_0x5770ec['shift']());}}}(a29_0x4f65,0x72730));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x27feca(0x1e9),'description':a29_0x27feca(0x1e6),'required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x27feca(0x1d4),'required':![]};export const TAGS_FLAG={'name':a29_0x27feca(0x1e4),'type':a29_0x27feca(0x1de),'description':'Config\x20tags\x20for\x20filtering/display\x20metadata'};export const STDIN_FLAG={'name':a29_0x27feca(0x1f0),'type':a29_0x27feca(0x210),'description':a29_0x27feca(0x1ea),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x27feca(0x213),'type':a29_0x27feca(0x1de),'description':a29_0x27feca(0x1ef)};export const REVEAL_FLAG={'name':a29_0x27feca(0x216),'type':a29_0x27feca(0x210),'description':a29_0x27feca(0x1f6),'default':![]};export function readKeyArg(_0x367f34){const _0x55db38=_0x367f34['args'][0x0]?.['trim']()??'';return validateKey(_0x55db38),_0x55db38;}export function readOptionalTags(_0x396ab9){const _0x46bda5=a29_0x27feca,_0x465fac=_0x396ab9[_0x46bda5(0x1d6)](_0x46bda5(0x1e4))[_0x46bda5(0x1d7)]();if(!_0x465fac)return undefined;if(_0x465fac['length']>0x20)throw CliErrors[_0x46bda5(0x20b)](_0x46bda5(0x206));return _0x465fac;}export function validateKey(_0x89fe00){const _0x5cc0f9=a29_0x27feca;if(!_0x89fe00)throw CliErrors[_0x5cc0f9(0x20b)](_0x5cc0f9(0x1fd));if(_0x89fe00[_0x5cc0f9(0x1fa)]>0x100)throw CliErrors['validation'](_0x5cc0f9(0x1f5));}export function projectAppConfig(_0x173f98,_0x2a8540){const _0xd6e293=a29_0x27feca,_0x37800d=_0x173f98[_0xd6e293(0x203)]!==undefined&&_0x173f98[_0xd6e293(0x203)]!==null&&_0x173f98['value']!=='',_0x43438a={'appCode':_0x173f98[_0xd6e293(0x211)],'key':_0x173f98[_0xd6e293(0x1e9)],'tags':_0x173f98[_0xd6e293(0x1e4)]??undefined,'hasValue':_0x37800d,'valueRedacted':_0x37800d&&!_0x2a8540?.['reveal'],'gmtCreate':_0x173f98[_0xd6e293(0x20a)],'gmtModified':_0x173f98[_0xd6e293(0x1ed)]};return _0x2a8540?.[_0xd6e293(0x216)]&&(_0x43438a[_0xd6e293(0x203)]=_0x173f98[_0xd6e293(0x203)]??'',_0x43438a[_0xd6e293(0x1ec)]=![]),_0x43438a;}export function plannedAppConfig(_0x1558a2){const _0x4ddc04=a29_0x27feca,_0x41b0d0=_0x1558a2[_0x4ddc04(0x205)]??!![];return{'appCode':_0x1558a2['appCode'],'key':_0x1558a2[_0x4ddc04(0x1e9)],'tags':_0x1558a2[_0x4ddc04(0x1e4)]??undefined,'hasValue':_0x41b0d0,'valueRedacted':_0x41b0d0};}export function buildMutationData(_0x1695a3){const _0x351e73=a29_0x27feca;return{'operation':_0x1695a3[_0x351e73(0x1e3)],'selector':{'appCode':_0x1695a3['appCode'],'key':_0x1695a3['key']},'before':_0x1695a3['before'],'after':_0x1695a3[_0x351e73(0x1fb)],'dryRun':_0x1695a3[_0x351e73(0x1d5)],'warnings':_0x1695a3[_0x351e73(0x215)]??[]};}function a29_0x4f65(){const _0x570b56=['Missing\x20app-config\x20key.','once','env','appCode:\x20','method','name','value','key:\x20','hasValue','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','20mqlIwJ','3433596caGmcr','Environment\x20variable\x20is\x20not\x20set:\x20','gmtCreate','validation','438050ZETcmA','setEncoding','end','path','boolean','appCode','1700396YkPdVj','from-env','file','warnings','reveal','data','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','dryRun','str','trim','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','App\x20config\x20value\x20source\x20is\x20ambiguous.','args','4463830nJvxbu','argument','slice','string','kind','value\x20is\x20redacted','bool','121035QyuXmi','operation','tags','1648808DTyKav','Runtime\x20app-config\x20key','error','push','key','Read\x20config\x20value\x20from\x20stdin','104583tOwESA','valueRedacted','gmtModified','\x20app\x20config.','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','stdin','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Value\x20file\x20is\x20not\x20readable:\x20','5pOXNmB','flag','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','utf8','apiError','defineProperties','length','after','9dWFRNo'];a29_0x4f65=function(){return _0x570b56;};return a29_0x4f65();}export async function withAppConfigApiBoundary(_0xabdf88,_0x45011e,_0x571cb8){const _0x252e8c=a29_0x27feca;try{return await _0x571cb8();}catch{const _0x5662dd=[_0x252e8c(0x200)+_0x45011e[_0x252e8c(0x211)]];if(_0x45011e[_0x252e8c(0x1e9)])_0x5662dd['push'](_0x252e8c(0x204)+_0x45011e['key']);_0x5662dd['push'](_0x252e8c(0x1e0));throw CliErrors[_0x252e8c(0x1f8)]('Failed\x20to\x20'+_0xabdf88+_0x252e8c(0x1ee),_0x5662dd['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x4a9be9,_0x555e11){const _0x1920d5=a29_0x27feca;return Object[_0x1920d5(0x1f9)](_0x4a9be9,{'method':{'value':_0x555e11[_0x1920d5(0x201)],'enumerable':![]},'url':{'value':_0x555e11['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x195948){const _0x4eea99=a29_0x27feca,_0x5b3dba=[];_0x195948[_0x4eea99(0x1da)][_0x4eea99(0x1fa)]>0x1&&_0x5b3dba[_0x4eea99(0x1e8)]({'kind':_0x4eea99(0x1dc),'value':_0x195948[_0x4eea99(0x1da)][_0x4eea99(0x1dd)](0x1)['join']('\x20')});const _0x2a8703=_0x195948[_0x4eea99(0x1f4)](_0x4eea99(0x203));_0x2a8703!==undefined&&_0x2a8703!==null&&_0x5b3dba[_0x4eea99(0x1e8)]({'kind':_0x4eea99(0x1dc),'value':String(_0x2a8703)});_0x195948[_0x4eea99(0x1e1)]('stdin')&&_0x5b3dba['push']({'kind':_0x4eea99(0x1f0)});const _0x3d1f43=_0x195948[_0x4eea99(0x1d6)](_0x4eea99(0x213))[_0x4eea99(0x1d7)]();_0x3d1f43&&_0x5b3dba['push']({'kind':'env','name':_0x3d1f43});const _0x36cc74=_0x195948[_0x4eea99(0x1d6)](_0x4eea99(0x214))[_0x4eea99(0x1d7)]();_0x36cc74&&_0x5b3dba[_0x4eea99(0x1e8)]({'kind':_0x4eea99(0x214),'path':_0x36cc74});if(_0x5b3dba[_0x4eea99(0x1fa)]===0x0)throw CliErrors[_0x4eea99(0x20b)]('Missing\x20app-config\x20value\x20source.','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x5b3dba[_0x4eea99(0x1fa)]>0x1)throw CliErrors[_0x4eea99(0x20b)](_0x4eea99(0x1d9),_0x4eea99(0x1f1));return _0x5b3dba[0x0];}export async function assertValueSourceReadable(_0x2a0380){const _0x19373a=a29_0x27feca;if(_0x2a0380[_0x19373a(0x1df)]==='env'&&!(_0x2a0380['name']in process.env))throw CliErrors[_0x19373a(0x20b)](_0x19373a(0x209)+_0x2a0380[_0x19373a(0x202)]);if(_0x2a0380[_0x19373a(0x1df)]===_0x19373a(0x214))try{await access(_0x2a0380[_0x19373a(0x20f)]);}catch{throw CliErrors[_0x19373a(0x20b)](_0x19373a(0x1f2)+_0x2a0380[_0x19373a(0x20f)]);}}function a29_0x3166(_0x141435,_0x27d8aa){_0x141435=_0x141435-0x1d3;const _0x4f657b=a29_0x4f65();let _0x3166e1=_0x4f657b[_0x141435];return _0x3166e1;}export async function readAppConfigValue(_0x5c1bd3){const _0x287388=a29_0x27feca,_0x335c87=assertSingleValueSource(_0x5c1bd3),_0x59716b=[];if(_0x335c87[_0x287388(0x1df)]===_0x287388(0x1dc))return _0x59716b['push'](_0x287388(0x1d8)),{'value':_0x335c87[_0x287388(0x203)]??'','source':_0x335c87['kind'],'warnings':_0x59716b};if(_0x335c87[_0x287388(0x1df)]==='stdin')return{'value':await readStdin(),'source':_0x335c87[_0x287388(0x1df)],'warnings':_0x59716b};if(_0x335c87['kind']===_0x287388(0x1ff)){if(!(_0x335c87['name']in process.env))throw CliErrors['validation'](_0x287388(0x209)+_0x335c87[_0x287388(0x202)]);return{'value':process.env[_0x335c87.name]??'','source':_0x335c87['kind'],'warnings':_0x59716b};}return{'value':await readFile(_0x335c87['path'],_0x287388(0x1f7)),'source':_0x335c87[_0x287388(0x1df)],'warnings':_0x59716b};}function readStdin(){return new Promise((_0x46a0e5,_0x2dd73a)=>{const _0x463013=a29_0x3166;let _0x4f1238='';process[_0x463013(0x1f0)][_0x463013(0x20d)](_0x463013(0x1f7)),process[_0x463013(0x1f0)]['on'](_0x463013(0x1d3),_0x38fda6=>{_0x4f1238+=_0x38fda6;}),process[_0x463013(0x1f0)][_0x463013(0x1fe)](_0x463013(0x20e),()=>_0x46a0e5(_0x4f1238)),process[_0x463013(0x1f0)][_0x463013(0x1fe)](_0x463013(0x1e7),_0x2dd73a);});}
@@ -1 +1 @@
1
- const a30_0xab4dab=a30_0x15cb;function a30_0x15cb(_0x2bf4cf,_0xe254e6){_0x2bf4cf=_0x2bf4cf-0x7d;const _0x45638b=a30_0x4563();let _0x15cb21=_0x45638b[_0x2bf4cf];return _0x15cb21;}(function(_0x14f63b,_0x3d3a22){const _0xa8f51b=a30_0x15cb,_0x4bb554=_0x14f63b();while(!![]){try{const _0x3c7940=-parseInt(_0xa8f51b(0x90))/0x1*(parseInt(_0xa8f51b(0x8d))/0x2)+parseInt(_0xa8f51b(0x80))/0x3+-parseInt(_0xa8f51b(0x7d))/0x4*(-parseInt(_0xa8f51b(0x7e))/0x5)+-parseInt(_0xa8f51b(0x87))/0x6+-parseInt(_0xa8f51b(0x86))/0x7+-parseInt(_0xa8f51b(0x85))/0x8*(parseInt(_0xa8f51b(0x83))/0x9)+parseInt(_0xa8f51b(0x81))/0xa;if(_0x3c7940===_0x3d3a22)break;else _0x4bb554['push'](_0x4bb554['shift']());}catch(_0x501983){_0x4bb554['push'](_0x4bb554['shift']());}}}(a30_0x4563,0xa2a18));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0xab4dab(0x8f),'command':'login','description':'Login\x20via\x20browser','risk':a30_0xab4dab(0x7f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0xab4dab(0x8b),'type':a30_0xab4dab(0x8e),'description':a30_0xab4dab(0x91),'default':![]}],async 'execute'(_0x1a5849){const _0x2f95be=a30_0xab4dab,{runAuthServer:_0x575342}=await import(_0x2f95be(0x8a));return await _0x575342({'autoYes':_0x1a5849['bool']('yes'),'nonInteractive':_0x1a5849[_0x2f95be(0x89)]}),{'ok':!![]};}},{'service':a30_0xab4dab(0x8f),'command':'logout','description':a30_0xab4dab(0x88),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5064af){const _0x3bd007=a30_0xab4dab;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x3bd007(0x84)](_0x3bd007(0x8c))):console['log'](_0x3bd007(0x82)),{'ok':!![]};}}];function a30_0x4563(){const _0x463534=['Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','498356DfGzfB','25AJOSAN','write','3166866KZTwvt','14273120tmHcfH','!\x20Not\x20logged\x20in','2887461aiVdCD','log','16pPJFZL','2621885lqZmgK','1981356dEMvdQ','Clear\x20login\x20session','nonInteractive','../../auth/auth-server-ui.js','yes','✓\x20Logged\x20out','32156ncoSvf','boolean','auth','68DoAFan'];a30_0x4563=function(){return _0x463534;};return a30_0x4563();}
1
+ function a30_0x2a99(){const _0x22c3a3=['login','../../auth/auth-server-ui.js','6tlYldy','4fyTTBp','✓\x20Logged\x20out','1358319KGutzB','log','nonInteractive','48744lcYMPY','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','27fmZvoG','Login\x20via\x20browser','boolean','Clear\x20login\x20session','675035aiaASn','yes','write','bool','466945AZXCln','2931334GHiyKB','778910dCcmyj','840758SrBGcv','auth'];a30_0x2a99=function(){return _0x22c3a3;};return a30_0x2a99();}const a30_0x5f08ef=a30_0x17b7;(function(_0xc9e6fb,_0x2fbf17){const _0x3e8a90=a30_0x17b7,_0x35f0bc=_0xc9e6fb();while(!![]){try{const _0x19a689=parseInt(_0x3e8a90(0x13b))/0x1+parseInt(_0x3e8a90(0x13e))/0x2+parseInt(_0x3e8a90(0x12e))/0x3*(-parseInt(_0x3e8a90(0x12c))/0x4)+parseInt(_0x3e8a90(0x137))/0x5+parseInt(_0x3e8a90(0x12b))/0x6*(-parseInt(_0x3e8a90(0x13c))/0x7)+-parseInt(_0x3e8a90(0x131))/0x8*(-parseInt(_0x3e8a90(0x133))/0x9)+parseInt(_0x3e8a90(0x13d))/0xa;if(_0x19a689===_0x2fbf17)break;else _0x35f0bc['push'](_0x35f0bc['shift']());}catch(_0x4572ea){_0x35f0bc['push'](_0x35f0bc['shift']());}}}(a30_0x2a99,0x3c4b6));function a30_0x17b7(_0x48f7fd,_0xb506bf){_0x48f7fd=_0x48f7fd-0x12b;const _0x2a9936=a30_0x2a99();let _0x17b7f6=_0x2a9936[_0x48f7fd];return _0x17b7f6;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a30_0x5f08ef(0x140),'description':a30_0x5f08ef(0x134),'risk':a30_0x5f08ef(0x139),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x5f08ef(0x138),'type':a30_0x5f08ef(0x135),'description':a30_0x5f08ef(0x132),'default':![]}],async 'execute'(_0xc0a1cf){const _0xdf3519=a30_0x5f08ef,{runAuthServer:_0x40806d}=await import(_0xdf3519(0x141));return await _0x40806d({'autoYes':_0xc0a1cf[_0xdf3519(0x13a)](_0xdf3519(0x138)),'nonInteractive':_0xc0a1cf[_0xdf3519(0x130)]}),{'ok':!![]};}},{'service':a30_0x5f08ef(0x13f),'command':'logout','description':a30_0x5f08ef(0x136),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x41c94e){const _0x3c5242=a30_0x5f08ef;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x3c5242(0x12f)](_0x3c5242(0x12d))):console[_0x3c5242(0x12f)]('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a31_0x5a4fff=a31_0x2662;(function(_0x27e86a,_0x2b8de2){const _0x300de2=a31_0x2662,_0x199425=_0x27e86a();while(!![]){try{const _0x56561a=-parseInt(_0x300de2(0x12b))/0x1*(-parseInt(_0x300de2(0x121))/0x2)+parseInt(_0x300de2(0x10c))/0x3+-parseInt(_0x300de2(0xfe))/0x4*(-parseInt(_0x300de2(0x131))/0x5)+parseInt(_0x300de2(0x13c))/0x6+-parseInt(_0x300de2(0x11e))/0x7*(-parseInt(_0x300de2(0x138))/0x8)+parseInt(_0x300de2(0x14e))/0x9+-parseInt(_0x300de2(0x117))/0xa;if(_0x56561a===_0x2b8de2)break;else _0x199425['push'](_0x199425['shift']());}catch(_0x4c617d){_0x199425['push'](_0x199425['shift']());}}}(a31_0x1003,0x3399e));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';function a31_0x2662(_0x1801ea,_0x32594f){_0x1801ea=_0x1801ea-0xf6;const _0x1003fe=a31_0x1003();let _0x266227=_0x1003fe[_0x1801ea];return _0x266227;}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';function a31_0x1003(){const _0x59165a=['Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','write','length','operation-type','map','1103247JMIZkC','/HOOK/','trim','File\x20already\x20exists:\x20','\x22,\x20params\x20})\x0a','datasetCode','No\x20operation\x20types\x20found\x20for\x20dataset\x20','stdin','appCode','HOOK','\x20api\x20pull`\x20to\x20refresh.',']\x20(','Available\x20aliases:\x20','44utERcJ','datasetcode','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','str','Script\x20description','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','Operation\x20type\x20\x22','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','Invalid\x20dataset\x20selection.','join','keys','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','288999knEWuE','parseInt','description','\x22.\x20','.js','Function\x20name\x20(valid\x20JS\x20identifier)','tableName','scriptsRootDir','/COMMON/','Dataset\x20not\x20found\x20for\x20code\x20\x22','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','5286310MQpdnx','nonInteractive','string','find','isInteger','修改后的请求参数','ENDPOINT','16219FDWZUb','Created\x20','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','58nzMdlu','当前请求参数','type','Operation\x20type\x20(HOOK\x20only)','source','Select\x20dataset:','No\x20datasets\x20found\x20for\x20this\x20app.','\x22\x20not\x20found\x20for\x20dataset\x20','after','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','3041szoKNm','No\x20api.ts\x20found.\x20Run\x20`','/ENDPOINT/','Available:\x20','close','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','163330ajogzh','当前响应结果','stderr','question','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','function-node','64AoxlYx','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','code','alias','330132VZvoKj','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','functionNode','validation','Alias\x20\x22','apiDir','/**\x0a\x20*\x20','includes','operationType','name','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','修改后的响应结果','before'];a31_0x1003=function(){return _0x59165a;};return a31_0x1003();}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':'bff','command':'create','description':a31_0x5a4fff(0x149),'risk':'read','flags':[{'name':'type','type':a31_0x5a4fff(0x119),'required':!![],'enum':['COMMON',a31_0x5a4fff(0x11d),'HOOK'],'description':'Script\x20type'},{'name':a31_0x5a4fff(0x145),'type':'string','required':!![],'description':a31_0x5a4fff(0x111)},{'name':a31_0x5a4fff(0x10e),'type':a31_0x5a4fff(0x119),'description':a31_0x5a4fff(0x102)},{'name':a31_0x5a4fff(0x13b),'type':a31_0x5a4fff(0x119),'description':a31_0x5a4fff(0x100)},{'name':'datasetcode','type':a31_0x5a4fff(0x119),'description':a31_0x5a4fff(0x139)},{'name':a31_0x5a4fff(0x14c),'type':'string','description':a31_0x5a4fff(0x124)},{'name':a31_0x5a4fff(0x137),'type':a31_0x5a4fff(0x119),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a31_0x5a4fff(0x148),a31_0x5a4fff(0x129)]}],async 'validate'(_0x2db68e){const _0x567578=a31_0x5a4fff,_0x5752ec=_0x2db68e['str'](_0x567578(0x145));if(!isValidBffFunctionName(_0x5752ec))throw CliErrors[_0x567578(0x13f)]('Invalid\x20function\x20name\x20\x22'+_0x5752ec+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x3a067c){const _0x4840d4=a31_0x5a4fff,_0xf1eefc=loadBffProjectConfig(_0x3a067c[_0x4840d4(0xf9)]),_0x2bae6c=_0x3a067c[_0x4840d4(0x101)](_0x4840d4(0x123)),_0x38118c=_0x3a067c[_0x4840d4(0x101)](_0x4840d4(0x145)),_0x1238e8=_0x3a067c['str'](_0x4840d4(0x10e))||undefined,_0x2630d8=_0x2bae6c===_0x4840d4(0xfa)?await resolveHookOptions(_0xf1eefc,_0x3a067c):undefined,_0xb73e74=buildFilePath(_0xf1eefc,_0x2bae6c,_0x38118c,_0x2630d8);if(await fileExists(_0xb73e74))throw CliErrors[_0x4840d4(0x13f)](_0x4840d4(0x151)+_0xb73e74);await mkdir(dirname(_0xb73e74),{'recursive':!![]});const _0x432598=generateTemplate(_0x2bae6c,_0x38118c,_0x3a067c[_0x4840d4(0xf9)],_0x1238e8,_0x2630d8);await writeFile(_0xb73e74,_0x432598,'utf8');const _0x5b3d1e={'type':_0x2bae6c,'name':_0x38118c,'path':_0xb73e74};if(_0x1238e8)_0x5b3d1e[_0x4840d4(0x10e)]=_0x1238e8;if(_0x2630d8){if(_0x2630d8[_0x4840d4(0x13b)])_0x5b3d1e[_0x4840d4(0x13b)]=_0x2630d8['alias'];_0x5b3d1e[_0x4840d4(0xf6)]=_0x2630d8[_0x4840d4(0xf6)],_0x5b3d1e[_0x4840d4(0x144)]=_0x2630d8['operationType'],_0x5b3d1e[_0x4840d4(0x13e)]=_0x2630d8[_0x4840d4(0x13e)];}return{'ok':!![],'data':_0x5b3d1e,'message':_0x4840d4(0x11f)+_0x2bae6c+'\x20function:\x20'+_0x38118c};}};async function resolveHookOptions(_0x243b4c,_0x581015){const _0x4beace=a31_0x5a4fff,_0x562c42=loadAliasMap(_0x581015['apiDir'],undefined,resolveApiFilePath(_0x581015[_0x4beace(0x141)],_0x581015['appCode'])),_0x4cd85e=_0x562c42['length']>0x0;let _0x8d4aec,_0x1db7f5,_0x1dde39;const _0x36805a=_0x581015[_0x4beace(0x101)](_0x4beace(0x13b)),_0x3c4316=_0x581015[_0x4beace(0x101)](_0x4beace(0xff));if(_0x36805a){const _0x5b41cf=resolveAlias(_0x581015[_0x4beace(0x141)],_0x36805a,undefined,resolveApiFilePath(_0x581015[_0x4beace(0x141)],_0x581015[_0x4beace(0xf9)]));if(!_0x5b41cf){const _0x506bfc=_0x4cd85e?_0x4beace(0xfd)+_0x562c42[_0x4beace(0x14d)](_0xefece=>_0xefece[_0x4beace(0x13b)])['join'](',\x20'):_0x4beace(0x12c)+CLI_BIN_NAME+_0x4beace(0x146);throw CliErrors[_0x4beace(0x13f)](_0x4beace(0x140)+_0x36805a+'\x22\x20not\x20found.\x20'+_0x506bfc);}_0x8d4aec=_0x36805a,_0x1db7f5=_0x5b41cf;}else{if(_0x3c4316){_0x1db7f5=_0x3c4316;const _0x34a286=_0x562c42[_0x4beace(0x11a)](_0x416b81=>_0x416b81[_0x4beace(0xf6)]===_0x3c4316);_0x8d4aec=_0x34a286?.[_0x4beace(0x13b)];}else{if(_0x581015[_0x4beace(0x118)])throw CliErrors[_0x4beace(0x13f)](_0x4beace(0x130));else{if(_0x4cd85e){const _0x4fa1ad=_0x562c42[_0x4beace(0x14d)](_0x3ff17a=>_0x3ff17a[_0x4beace(0x13b)]+'\x20('+_0x3ff17a[_0x4beace(0x112)]+')'),_0x34610f=await promptSelect(_0x4beace(0x126),_0x4fa1ad),_0x209efa=_0x562c42[_0x34610f];if(!_0x209efa)throw CliErrors['validation'](_0x4beace(0x108));_0x8d4aec=_0x209efa[_0x4beace(0x13b)],_0x1db7f5=_0x209efa[_0x4beace(0xf6)];}else{const _0x281486=await listDatasets(_0x581015['appCode']);if(_0x281486[_0x4beace(0x14b)]===0x0)throw CliErrors['validation'](_0x4beace(0x127));const _0x371c42=_0x281486[_0x4beace(0x14d)](_0x310ad7=>_0x310ad7['name']+'\x20['+(_0x310ad7[_0x4beace(0x125)]??'UNKNOWN')+_0x4beace(0xfc)+_0x310ad7[_0x4beace(0x13a)]+')'),_0x153367=await promptSelect(_0x4beace(0x126),_0x371c42),_0x2680d2=_0x281486[_0x153367];if(!_0x2680d2)throw CliErrors[_0x4beace(0x13f)](_0x4beace(0x108));_0x1db7f5=_0x2680d2['code'],_0x8d4aec=undefined;}}}}const _0x31fe68=await listDatasets(_0x581015[_0x4beace(0xf9)]),_0x5883b8=_0x31fe68[_0x4beace(0x11a)](_0x2fba55=>_0x2fba55[_0x4beace(0x13a)]===_0x1db7f5);if(!_0x5883b8)throw CliErrors[_0x4beace(0x13f)](_0x4beace(0x115)+_0x1db7f5+_0x4beace(0x10f)+(_0x8d4aec?_0x4beace(0x12a)+CLI_BIN_NAME+_0x4beace(0xfb):''));_0x1dde39=_0x5883b8['id'];const _0x59ba1d=_0x8d4aec??_0x1db7f5,_0x3135aa=await listBffDatasetOperations(_0x581015[_0x4beace(0xf9)],_0x1dde39),_0x5e2d8b=_0x3135aa?Object[_0x4beace(0x10a)](_0x3135aa):[];if(_0x5e2d8b[_0x4beace(0x14b)]===0x0)throw CliErrors[_0x4beace(0x13f)](_0x4beace(0xf7)+_0x59ba1d+'.');let _0x234fb1;const _0x3f9f6e=_0x581015[_0x4beace(0x101)]('operation-type');if(_0x3f9f6e){if(!_0x5e2d8b[_0x4beace(0x143)](_0x3f9f6e))throw CliErrors[_0x4beace(0x13f)](_0x4beace(0x104)+_0x3f9f6e+_0x4beace(0x128)+_0x59ba1d+'.\x20'+(_0x4beace(0x12e)+_0x5e2d8b[_0x4beace(0x109)](',\x20')));_0x234fb1=_0x3f9f6e;}else{if(_0x581015['nonInteractive'])throw CliErrors[_0x4beace(0x13f)](_0x4beace(0x105));const _0x412e12=await promptSelect('Select\x20operation\x20type:',_0x5e2d8b);_0x234fb1=_0x5e2d8b[_0x412e12]??_0x5e2d8b[0x0];}let _0x4af42=normalizeHookFunctionNode(_0x581015[_0x4beace(0x101)](_0x4beace(0x137)));if(!_0x4af42){if(_0x581015[_0x4beace(0x101)]('function-node'))throw CliErrors[_0x4beace(0x13f)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x581015[_0x4beace(0x118)])throw CliErrors[_0x4beace(0x13f)](_0x4beace(0x10b));const _0x2c8bcb=await promptSelect('Select\x20trigger\x20node:',['before','after']);_0x4af42=['before',_0x4beace(0x129)][_0x2c8bcb]??_0x4beace(0x148);}return{'alias':_0x8d4aec,'datasetCode':_0x1db7f5,'datasetId':_0x1dde39,'operationType':_0x234fb1,'functionNode':_0x4af42};}async function promptSelect(_0x320858,_0x59b804){const _0x3f0288=a31_0x5a4fff;if(_0x59b804['length']===0x1)return 0x0;for(const [_0x4d50db,_0x21c601]of _0x59b804['entries']()){process[_0x3f0288(0x133)]['write']('\x20\x20'+(_0x4d50db+0x1)+'.\x20'+_0x21c601+'\x0a');}const _0x41d43f=createInterface({'input':process[_0x3f0288(0xf8)],'output':process['stderr']});while(!![]){const _0x508a15=await new Promise(_0xb42776=>{const _0x1159c9=_0x3f0288;_0x41d43f[_0x1159c9(0x134)](_0x320858+'\x20',_0xb42776);}),_0x5088fe=Number[_0x3f0288(0x10d)](_0x508a15['trim'](),0xa);if(Number[_0x3f0288(0x11b)](_0x5088fe)&&_0x5088fe>=0x1&&_0x5088fe<=_0x59b804[_0x3f0288(0x14b)])return _0x41d43f[_0x3f0288(0x12f)](),_0x5088fe-0x1;process[_0x3f0288(0x133)][_0x3f0288(0x14a)]('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x59b804[_0x3f0288(0x14b)]+'.\x0a');}}function buildFilePath(_0x3ac30a,_0x993900,_0x7a0e8f,_0x5c42be){const _0x5cc104=a31_0x5a4fff;if(_0x993900===_0x5cc104(0xfa)){if(!_0x5c42be)throw CliErrors[_0x5cc104(0x13f)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x3092fa=_0x5c42be['alias']??_0x5c42be[_0x5cc104(0xf6)];return join(_0x3ac30a[_0x5cc104(0x113)],_0x5cc104(0xfa),_0x3092fa,_0x5c42be[_0x5cc104(0x144)],_0x5c42be[_0x5cc104(0x13e)],_0x7a0e8f+_0x5cc104(0x110));}return join(_0x3ac30a[_0x5cc104(0x113)],_0x993900,_0x7a0e8f+_0x5cc104(0x110));}export function generateTemplate(_0x5e5ace,_0x4e3bab,_0x58c933,_0x16d5cc,_0x3054db){const _0x32bdbd=a31_0x5a4fff,_0x162708=_0x16d5cc?.[_0x32bdbd(0x150)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x7d5fd8=getAppBaseUrl(_0x58c933),_0x30cf18=_0x32bdbd(0x106);if(_0x5e5ace==='COMMON')return _0x32bdbd(0x142)+_0x162708+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20'+_0x4e3bab+'\x0a\x20*\x20[平台配置]\x20'+_0x7d5fd8+_0x32bdbd(0x116)+_0x58c933+_0x32bdbd(0x114)+_0x4e3bab+_0x32bdbd(0x107)+_0x4e3bab+_0x32bdbd(0x152)+_0x30cf18+'\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'+_0x4e3bab+_0x32bdbd(0x13d);if(_0x5e5ace===_0x32bdbd(0x11d))return _0x32bdbd(0x142)+_0x162708+_0x32bdbd(0x120)+_0x4e3bab+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/'+_0x58c933+'/'+_0x4e3bab+'\x0a\x20*\x20[平台配置]\x20'+_0x7d5fd8+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x58c933+_0x32bdbd(0x12d)+_0x4e3bab+'.js\x0a'+_0x30cf18+'\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'+_0x4e3bab+_0x32bdbd(0x13d);if(!_0x3054db)throw CliErrors['validation'](_0x32bdbd(0x136));const _0x5615f0=_0x3054db['alias']??_0x3054db[_0x32bdbd(0xf6)],_0x4186c7=_0x3054db[_0x32bdbd(0x13e)]===_0x32bdbd(0x148)?_0x32bdbd(0x122):_0x32bdbd(0x132),_0xb31407=_0x3054db['functionNode']==='before'?_0x32bdbd(0x11c):_0x32bdbd(0x147);return _0x32bdbd(0x142)+_0x162708+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20'+_0x4e3bab+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x58c933+'/'+_0x3054db[_0x32bdbd(0xf6)]+'/'+_0x3054db['operationType']+'\x0a\x20*\x20[平台配置]\x20'+_0x7d5fd8+'/data/dataset/'+_0x3054db['datasetId']+_0x32bdbd(0x135)+_0x58c933+_0x32bdbd(0x14f)+_0x5615f0+'/'+_0x3054db[_0x32bdbd(0x144)]+'/'+_0x3054db['functionNode']+'/'+_0x4e3bab+'.js\x0a\x20*\x20[触发节点]\x20'+_0x3054db['functionNode']+'\x0a'+_0x30cf18+'\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20'+_0x4186c7+_0x32bdbd(0x103)+_0xb31407+'\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x4e3bab+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
1
+ const a31_0x21d038=a31_0x1fff;(function(_0x2cefb7,_0x2c3e41){const _0x1b375f=a31_0x1fff,_0x22ba77=_0x2cefb7();while(!![]){try{const _0x25f060=parseInt(_0x1b375f(0x125))/0x1*(-parseInt(_0x1b375f(0x134))/0x2)+-parseInt(_0x1b375f(0x151))/0x3*(-parseInt(_0x1b375f(0x143))/0x4)+-parseInt(_0x1b375f(0x144))/0x5*(parseInt(_0x1b375f(0x135))/0x6)+-parseInt(_0x1b375f(0x123))/0x7+parseInt(_0x1b375f(0x158))/0x8*(-parseInt(_0x1b375f(0x16a))/0x9)+parseInt(_0x1b375f(0x118))/0xa+-parseInt(_0x1b375f(0x142))/0xb*(-parseInt(_0x1b375f(0x12c))/0xc);if(_0x25f060===_0x2c3e41)break;else _0x22ba77['push'](_0x22ba77['shift']());}catch(_0x4d26cc){_0x22ba77['push'](_0x22ba77['shift']());}}}(a31_0x575a,0x1ad08));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';function a31_0x575a(){const _0x3b8475=['927XsvNug','/ENDPOINT/','当前请求参数','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','type','Available:\x20','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','Invalid\x20dataset\x20selection.','Select\x20operation\x20type:','Select\x20trigger\x20node:','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\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','trim','\x0a\x20*\x20[平台配置]\x20','after','No\x20datasets\x20found\x20for\x20this\x20app.','修改后的请求参数','Created\x20','HOOK\x20requires\x20alias/operation/node\x20options.','stdin','read','\x22.\x20','datasetId','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','code','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','string','.js','Alias\x20\x22','208130FpOMmr','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20','No\x20api.ts\x20found.\x20Run\x20`','HOOK','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','appCode','/COMMON/','validation','File\x20already\x20exists:\x20','900676WYGejn','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','2oWjQrK','\x22\x20not\x20found.\x20','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','.js\x0a\x20*\x20[触发节点]\x20','datasetcode','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','entries','102636JdrxbJ','write','Available\x20aliases:\x20','Dataset\x20not\x20found\x20for\x20code\x20\x22','Script\x20type','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','apiDir','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','158564dhttCF','6PhIvcB','/HOOK/','nonInteractive','utf8','datasetCode','name','operation-type','keys','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','find','\x20api\x20pull`\x20to\x20refresh.','stderr','description','473roWDrf','372yzlCGY','399790IFshax','isInteger','join','functionNode','Function\x20name\x20(valid\x20JS\x20identifier)','ENDPOINT','function-node','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','bff','COMMON','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','\x22\x20not\x20found\x20for\x20dataset\x20','scriptsRootDir','3753kyywRA','question','UNKNOWN','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','operationType','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','includes','2168cHzxEk','map','parseInt',']\x20(','before','str','/**\x0a\x20*\x20','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','length','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','Operation\x20type\x20\x22','修改后的响应结果','/data/dataset/','当前响应结果','Operation\x20type\x20(HOOK\x20only)','alias','Select\x20dataset:','Script\x20description'];a31_0x575a=function(){return _0x3b8475;};return a31_0x575a();}import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';function a31_0x1fff(_0x3789bb,_0x559f52){_0x3789bb=_0x3789bb-0x10c;const _0x575abc=a31_0x575a();let _0x1ffff1=_0x575abc[_0x3789bb];return _0x1ffff1;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':a31_0x21d038(0x14c),'command':'create','description':'Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','risk':a31_0x21d038(0x10f),'flags':[{'name':a31_0x21d038(0x16e),'type':a31_0x21d038(0x115),'required':!![],'enum':[a31_0x21d038(0x14d),a31_0x21d038(0x149),a31_0x21d038(0x11b)],'description':a31_0x21d038(0x130)},{'name':a31_0x21d038(0x13a),'type':a31_0x21d038(0x115),'required':!![],'description':a31_0x21d038(0x148)},{'name':'description','type':a31_0x21d038(0x115),'description':a31_0x21d038(0x169)},{'name':'alias','type':a31_0x21d038(0x115),'description':a31_0x21d038(0x131)},{'name':a31_0x21d038(0x129),'type':a31_0x21d038(0x115),'description':a31_0x21d038(0x16d)},{'name':a31_0x21d038(0x13b),'type':a31_0x21d038(0x115),'description':a31_0x21d038(0x166)},{'name':a31_0x21d038(0x14a),'type':a31_0x21d038(0x115),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a31_0x21d038(0x15c),a31_0x21d038(0x178)]}],async 'validate'(_0x27715d){const _0x3aa98d=a31_0x21d038,_0x573e48=_0x27715d['str'](_0x3aa98d(0x13a));if(!isValidBffFunctionName(_0x573e48))throw CliErrors[_0x3aa98d(0x121)]('Invalid\x20function\x20name\x20\x22'+_0x573e48+_0x3aa98d(0x12a));},async 'execute'(_0x339af9){const _0x1fd0ec=a31_0x21d038,_0xbf8f5a=loadBffProjectConfig(_0x339af9['appCode']),_0x291612=_0x339af9['str'](_0x1fd0ec(0x16e)),_0x384d3a=_0x339af9['str'](_0x1fd0ec(0x13a)),_0x26643b=_0x339af9[_0x1fd0ec(0x15d)](_0x1fd0ec(0x141))||undefined,_0xba5820=_0x291612===_0x1fd0ec(0x11b)?await resolveHookOptions(_0xbf8f5a,_0x339af9):undefined,_0x4f54be=buildFilePath(_0xbf8f5a,_0x291612,_0x384d3a,_0xba5820);if(await fileExists(_0x4f54be))throw CliErrors[_0x1fd0ec(0x121)](_0x1fd0ec(0x122)+_0x4f54be);await mkdir(dirname(_0x4f54be),{'recursive':!![]});const _0x2c242f=generateTemplate(_0x291612,_0x384d3a,_0x339af9[_0x1fd0ec(0x11f)],_0x26643b,_0xba5820);await writeFile(_0x4f54be,_0x2c242f,_0x1fd0ec(0x138));const _0x38089a={'type':_0x291612,'name':_0x384d3a,'path':_0x4f54be};if(_0x26643b)_0x38089a['description']=_0x26643b;if(_0xba5820){if(_0xba5820[_0x1fd0ec(0x167)])_0x38089a[_0x1fd0ec(0x167)]=_0xba5820[_0x1fd0ec(0x167)];_0x38089a[_0x1fd0ec(0x139)]=_0xba5820['datasetCode'],_0x38089a[_0x1fd0ec(0x155)]=_0xba5820['operationType'],_0x38089a[_0x1fd0ec(0x147)]=_0xba5820[_0x1fd0ec(0x147)];}return{'ok':!![],'data':_0x38089a,'message':_0x1fd0ec(0x10c)+_0x291612+'\x20function:\x20'+_0x384d3a};}};async function resolveHookOptions(_0x453e44,_0x32c0a1){const _0x3deb0d=a31_0x21d038,_0x493b02=loadAliasMap(_0x32c0a1['apiDir'],undefined,resolveApiFilePath(_0x32c0a1[_0x3deb0d(0x132)],_0x32c0a1[_0x3deb0d(0x11f)])),_0x377467=_0x493b02[_0x3deb0d(0x160)]>0x0;let _0x566a82,_0x1400b5,_0x3eb280;const _0x6512df=_0x32c0a1['str'](_0x3deb0d(0x167)),_0x4fa310=_0x32c0a1[_0x3deb0d(0x15d)](_0x3deb0d(0x129));if(_0x6512df){const _0x3c81a1=resolveAlias(_0x32c0a1[_0x3deb0d(0x132)],_0x6512df,undefined,resolveApiFilePath(_0x32c0a1['apiDir'],_0x32c0a1[_0x3deb0d(0x11f)]));if(!_0x3c81a1){const _0x1ac483=_0x377467?_0x3deb0d(0x12e)+_0x493b02[_0x3deb0d(0x159)](_0x55b3dd=>_0x55b3dd['alias'])[_0x3deb0d(0x146)](',\x20'):_0x3deb0d(0x11a)+CLI_BIN_NAME+_0x3deb0d(0x11e);throw CliErrors[_0x3deb0d(0x121)](_0x3deb0d(0x117)+_0x6512df+_0x3deb0d(0x126)+_0x1ac483);}_0x566a82=_0x6512df,_0x1400b5=_0x3c81a1;}else{if(_0x4fa310){_0x1400b5=_0x4fa310;const _0x289f32=_0x493b02[_0x3deb0d(0x13e)](_0x523c38=>_0x523c38['datasetCode']===_0x4fa310);_0x566a82=_0x289f32?.['alias'];}else{if(_0x32c0a1[_0x3deb0d(0x137)])throw CliErrors[_0x3deb0d(0x121)](_0x3deb0d(0x174));else{if(_0x377467){const _0x41fe19=_0x493b02[_0x3deb0d(0x159)](_0x8c2f52=>_0x8c2f52[_0x3deb0d(0x167)]+'\x20('+_0x8c2f52['tableName']+')'),_0x5abdbf=await promptSelect(_0x3deb0d(0x168),_0x41fe19),_0x4be192=_0x493b02[_0x5abdbf];if(!_0x4be192)throw CliErrors[_0x3deb0d(0x121)](_0x3deb0d(0x171));_0x566a82=_0x4be192[_0x3deb0d(0x167)],_0x1400b5=_0x4be192[_0x3deb0d(0x139)];}else{const _0x451af6=await listDatasets(_0x32c0a1[_0x3deb0d(0x11f)]);if(_0x451af6[_0x3deb0d(0x160)]===0x0)throw CliErrors['validation'](_0x3deb0d(0x179));const _0x116478=_0x451af6[_0x3deb0d(0x159)](_0x1e36c6=>_0x1e36c6[_0x3deb0d(0x13a)]+'\x20['+(_0x1e36c6['source']??_0x3deb0d(0x153))+_0x3deb0d(0x15b)+_0x1e36c6['code']+')'),_0x556d72=await promptSelect(_0x3deb0d(0x168),_0x116478),_0x299e5e=_0x451af6[_0x556d72];if(!_0x299e5e)throw CliErrors[_0x3deb0d(0x121)](_0x3deb0d(0x171));_0x1400b5=_0x299e5e[_0x3deb0d(0x113)],_0x566a82=undefined;}}}}const _0x741272=await listDatasets(_0x32c0a1[_0x3deb0d(0x11f)]),_0x381a0f=_0x741272[_0x3deb0d(0x13e)](_0x5ea4d1=>_0x5ea4d1[_0x3deb0d(0x113)]===_0x1400b5);if(!_0x381a0f)throw CliErrors['validation'](_0x3deb0d(0x12f)+_0x1400b5+_0x3deb0d(0x110)+(_0x566a82?_0x3deb0d(0x170)+CLI_BIN_NAME+_0x3deb0d(0x13f):''));_0x3eb280=_0x381a0f['id'];const _0x5c0477=_0x566a82??_0x1400b5,_0x402dbd=await listBffDatasetOperations(_0x32c0a1[_0x3deb0d(0x11f)],_0x3eb280),_0xa3ad88=_0x402dbd?Object[_0x3deb0d(0x13c)](_0x402dbd):[];if(_0xa3ad88['length']===0x0)throw CliErrors[_0x3deb0d(0x121)]('No\x20operation\x20types\x20found\x20for\x20dataset\x20'+_0x5c0477+'.');let _0x34bfd1;const _0x17ae03=_0x32c0a1['str'](_0x3deb0d(0x13b));if(_0x17ae03){if(!_0xa3ad88[_0x3deb0d(0x157)](_0x17ae03))throw CliErrors[_0x3deb0d(0x121)](_0x3deb0d(0x162)+_0x17ae03+_0x3deb0d(0x14f)+_0x5c0477+'.\x20'+(_0x3deb0d(0x16f)+_0xa3ad88[_0x3deb0d(0x146)](',\x20')));_0x34bfd1=_0x17ae03;}else{if(_0x32c0a1['nonInteractive'])throw CliErrors[_0x3deb0d(0x121)](_0x3deb0d(0x127));const _0xeddd21=await promptSelect(_0x3deb0d(0x172),_0xa3ad88);_0x34bfd1=_0xa3ad88[_0xeddd21]??_0xa3ad88[0x0];}let _0x4b19c3=normalizeHookFunctionNode(_0x32c0a1[_0x3deb0d(0x15d)](_0x3deb0d(0x14a)));if(!_0x4b19c3){if(_0x32c0a1[_0x3deb0d(0x15d)]('function-node'))throw CliErrors[_0x3deb0d(0x121)](_0x3deb0d(0x15f));if(_0x32c0a1[_0x3deb0d(0x137)])throw CliErrors[_0x3deb0d(0x121)](_0x3deb0d(0x14b));const _0x521438=await promptSelect(_0x3deb0d(0x173),[_0x3deb0d(0x15c),_0x3deb0d(0x178)]);_0x4b19c3=['before',_0x3deb0d(0x178)][_0x521438]??'before';}return{'alias':_0x566a82,'datasetCode':_0x1400b5,'datasetId':_0x3eb280,'operationType':_0x34bfd1,'functionNode':_0x4b19c3};}async function promptSelect(_0x4c5e7d,_0xc65de8){const _0x3b1f30=a31_0x21d038;if(_0xc65de8[_0x3b1f30(0x160)]===0x1)return 0x0;for(const [_0x1e01ea,_0x4c16c6]of _0xc65de8[_0x3b1f30(0x12b)]()){process[_0x3b1f30(0x140)][_0x3b1f30(0x12d)]('\x20\x20'+(_0x1e01ea+0x1)+'.\x20'+_0x4c16c6+'\x0a');}const _0x337541=createInterface({'input':process[_0x3b1f30(0x10e)],'output':process[_0x3b1f30(0x140)]});while(!![]){const _0x5a27b9=await new Promise(_0x361cc3=>{const _0x1c37f4=_0x3b1f30;_0x337541[_0x1c37f4(0x152)](_0x4c5e7d+'\x20',_0x361cc3);}),_0xd68817=Number[_0x3b1f30(0x15a)](_0x5a27b9[_0x3b1f30(0x176)](),0xa);if(Number[_0x3b1f30(0x145)](_0xd68817)&&_0xd68817>=0x1&&_0xd68817<=_0xc65de8[_0x3b1f30(0x160)])return _0x337541['close'](),_0xd68817-0x1;process['stderr'][_0x3b1f30(0x12d)]('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0xc65de8[_0x3b1f30(0x160)]+'.\x0a');}}function buildFilePath(_0x587641,_0x4ae4a9,_0x253bf1,_0x20bda3){const _0x3eaa96=a31_0x21d038;if(_0x4ae4a9===_0x3eaa96(0x11b)){if(!_0x20bda3)throw CliErrors[_0x3eaa96(0x121)](_0x3eaa96(0x10d));const _0x2f63ec=_0x20bda3['alias']??_0x20bda3[_0x3eaa96(0x139)];return join(_0x587641[_0x3eaa96(0x150)],_0x3eaa96(0x11b),_0x2f63ec,_0x20bda3[_0x3eaa96(0x155)],_0x20bda3[_0x3eaa96(0x147)],_0x253bf1+_0x3eaa96(0x116));}return join(_0x587641[_0x3eaa96(0x150)],_0x4ae4a9,_0x253bf1+_0x3eaa96(0x116));}export function generateTemplate(_0x828223,_0x3cd909,_0xab55e4,_0x4ab1be,_0x55afa3){const _0x4d2108=a31_0x21d038,_0x279a1d=_0x4ab1be?.[_0x4d2108(0x176)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x1b2f3b=getAppBaseUrl(_0xab55e4),_0x11f458=_0x4d2108(0x154);if(_0x828223===_0x4d2108(0x14d))return _0x4d2108(0x15e)+_0x279a1d+_0x4d2108(0x161)+_0x3cd909+_0x4d2108(0x177)+_0x1b2f3b+_0x4d2108(0x11c)+_0xab55e4+_0x4d2108(0x120)+_0x3cd909+_0x4d2108(0x14e)+_0x3cd909+'\x22,\x20params\x20})\x0a'+_0x11f458+'\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'+_0x3cd909+_0x4d2108(0x133);if(_0x828223==='ENDPOINT')return'/**\x0a\x20*\x20'+_0x279a1d+_0x4d2108(0x114)+_0x3cd909+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/'+_0xab55e4+'/'+_0x3cd909+_0x4d2108(0x177)+_0x1b2f3b+_0x4d2108(0x11c)+_0xab55e4+_0x4d2108(0x16b)+_0x3cd909+'.js\x0a'+_0x11f458+_0x4d2108(0x175)+_0x3cd909+_0x4d2108(0x133);if(!_0x55afa3)throw CliErrors[_0x4d2108(0x121)](_0x4d2108(0x156));const _0x35ce97=_0x55afa3[_0x4d2108(0x167)]??_0x55afa3[_0x4d2108(0x139)],_0x4c2069=_0x55afa3[_0x4d2108(0x147)]===_0x4d2108(0x15c)?_0x4d2108(0x16c):_0x4d2108(0x165),_0x204a18=_0x55afa3[_0x4d2108(0x147)]===_0x4d2108(0x15c)?_0x4d2108(0x17a):_0x4d2108(0x163);return'/**\x0a\x20*\x20'+_0x279a1d+_0x4d2108(0x119)+_0x3cd909+_0x4d2108(0x124)+_0xab55e4+'/'+_0x55afa3[_0x4d2108(0x139)]+'/'+_0x55afa3['operationType']+_0x4d2108(0x177)+_0x1b2f3b+_0x4d2108(0x164)+_0x55afa3[_0x4d2108(0x111)]+_0x4d2108(0x112)+_0xab55e4+_0x4d2108(0x136)+_0x35ce97+'/'+_0x55afa3[_0x4d2108(0x155)]+'/'+_0x55afa3[_0x4d2108(0x147)]+'/'+_0x3cd909+_0x4d2108(0x128)+_0x55afa3['functionNode']+'\x0a'+_0x11f458+_0x4d2108(0x13d)+_0x4c2069+_0x4d2108(0x11d)+_0x204a18+'\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x3cd909+_0x4d2108(0x133);}