@lovrabet/rabetbase-cli 2.5.2-beta.7 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-restore.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/deployment/index.js +1 -1
  99. package/lib/commands/deployment/sync-all.js +1 -1
  100. package/lib/commands/deployment/sync-jobs.js +1 -1
  101. package/lib/commands/deployment/sync-status.js +1 -1
  102. package/lib/commands/doctor.js +1 -1
  103. package/lib/commands/file/index.js +1 -1
  104. package/lib/commands/instant-api-policy/current.js +1 -1
  105. package/lib/commands/instant-api-policy/index.js +1 -1
  106. package/lib/commands/instant-api-policy/init.js +1 -1
  107. package/lib/commands/instant-api-policy/publish.js +1 -1
  108. package/lib/commands/instant-api-policy/pull.js +1 -1
  109. package/lib/commands/instant-api-policy/revision.js +1 -1
  110. package/lib/commands/instant-api-policy/revisions.js +1 -1
  111. package/lib/commands/instant-api-policy/rollback.js +1 -1
  112. package/lib/commands/instant-api-policy/shared.js +1 -1
  113. package/lib/commands/instant-api-policy/validate.js +1 -1
  114. package/lib/commands/issue/index.js +1 -1
  115. package/lib/commands/issue/nudge.js +1 -1
  116. package/lib/commands/issue/report.js +1 -1
  117. package/lib/commands/issue/shared.js +1 -1
  118. package/lib/commands/kb/create.js +1 -1
  119. package/lib/commands/kb/delete.js +1 -1
  120. package/lib/commands/kb/detail.js +1 -1
  121. package/lib/commands/kb/index.js +1 -1
  122. package/lib/commands/kb/list.js +1 -1
  123. package/lib/commands/kb/search.js +1 -1
  124. package/lib/commands/kb/shared.js +1 -1
  125. package/lib/commands/kb/update.js +1 -1
  126. package/lib/commands/logs/index.js +1 -1
  127. package/lib/commands/menu/asset-update.js +1 -1
  128. package/lib/commands/menu/delete.js +1 -1
  129. package/lib/commands/menu/external-link-create.js +1 -1
  130. package/lib/commands/menu/external-link-update.js +1 -1
  131. package/lib/commands/menu/group-create.js +1 -1
  132. package/lib/commands/menu/group-update.js +1 -1
  133. package/lib/commands/menu/index.js +1 -1
  134. package/lib/commands/menu/list.js +1 -1
  135. package/lib/commands/menu/move.js +1 -1
  136. package/lib/commands/menu/regroup-start.js +1 -1
  137. package/lib/commands/menu/rename.js +1 -1
  138. package/lib/commands/menu/shared/compare-table.js +1 -1
  139. package/lib/commands/menu/shared/delete-plan.js +1 -1
  140. package/lib/commands/menu/shared/facts.js +1 -1
  141. package/lib/commands/menu/shared/index.js +1 -1
  142. package/lib/commands/menu/shared/inquirer.js +1 -1
  143. package/lib/commands/menu/shared/local-pages.js +1 -1
  144. package/lib/commands/menu/shared/logic.js +1 -1
  145. package/lib/commands/menu/shared/mutations.js +1 -1
  146. package/lib/commands/menu/shared/service.js +1 -1
  147. package/lib/commands/menu/shared/sync-core.js +1 -1
  148. package/lib/commands/menu/shared/update-core.js +1 -1
  149. package/lib/commands/menu/shared/valid-url.js +1 -1
  150. package/lib/commands/menu/sync.js +1 -1
  151. package/lib/commands/menu/visibility-update.js +1 -1
  152. package/lib/commands/notification/config-create.js +1 -1
  153. package/lib/commands/notification/config-delete.js +1 -1
  154. package/lib/commands/notification/config-list.js +1 -1
  155. package/lib/commands/notification/config-update.js +1 -1
  156. package/lib/commands/notification/index.js +1 -1
  157. package/lib/commands/notification/shared.js +1 -1
  158. package/lib/commands/ocr/index.js +1 -1
  159. package/lib/commands/page/create.js +1 -1
  160. package/lib/commands/page/custom/detail.js +1 -1
  161. package/lib/commands/page/custom/list.js +1 -1
  162. package/lib/commands/page/custom/publish.js +1 -1
  163. package/lib/commands/page/custom/shared.js +1 -1
  164. package/lib/commands/page/custom/syntax.js +1 -1
  165. package/lib/commands/page/custom/update.js +1 -1
  166. package/lib/commands/page/data-list-status.js +1 -1
  167. package/lib/commands/page/generate-start.js +1 -1
  168. package/lib/commands/page/generate-status.js +1 -1
  169. package/lib/commands/page/index.js +1 -1
  170. package/lib/commands/page/pull.js +1 -1
  171. package/lib/commands/page/push.js +1 -1
  172. package/lib/commands/page/relation-audit.js +1 -1
  173. package/lib/commands/page/restore.js +1 -1
  174. package/lib/commands/page/shared.js +1 -1
  175. package/lib/commands/page/sync.js +1 -1
  176. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  177. package/lib/commands/project/create/format-elapsed.js +1 -1
  178. package/lib/commands/project/create/main.js +1 -1
  179. package/lib/commands/project/create/materialize-project-template.js +1 -1
  180. package/lib/commands/project/create/project-name.js +1 -1
  181. package/lib/commands/project/create/project-template-archive.js +1 -1
  182. package/lib/commands/project/create/project-template-path.js +1 -1
  183. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  184. package/lib/commands/project/create/use-format-code.js +1 -1
  185. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  186. package/lib/commands/project/domain-routing-sync.js +1 -1
  187. package/lib/commands/project/index.js +1 -1
  188. package/lib/commands/project/upgrade.js +1 -1
  189. package/lib/commands/registry.js +1 -1
  190. package/lib/commands/role/delete.js +1 -1
  191. package/lib/commands/role/detail.js +1 -1
  192. package/lib/commands/role/index.js +1 -1
  193. package/lib/commands/role/list.js +1 -1
  194. package/lib/commands/role/shared.js +1 -1
  195. package/lib/commands/role/update.js +1 -1
  196. package/lib/commands/role/user-add.js +1 -1
  197. package/lib/commands/role/user-remove.js +1 -1
  198. package/lib/commands/role/user-resolve.js +1 -1
  199. package/lib/commands/rule/get.js +1 -1
  200. package/lib/commands/rule/index.js +1 -1
  201. package/lib/commands/rule/list.js +1 -1
  202. package/lib/commands/rule/set.js +1 -1
  203. package/lib/commands/rule/shared.js +1 -1
  204. package/lib/commands/run/index.js +1 -1
  205. package/lib/commands/schema.js +1 -1
  206. package/lib/commands/sql/create.js +1 -1
  207. package/lib/commands/sql/delete.js +1 -1
  208. package/lib/commands/sql/detail.js +1 -1
  209. package/lib/commands/sql/exec.js +1 -1
  210. package/lib/commands/sql/index.js +1 -1
  211. package/lib/commands/sql/list.js +1 -1
  212. package/lib/commands/sql/pull.js +1 -1
  213. package/lib/commands/sql/push.js +1 -1
  214. package/lib/commands/sql/shared.js +1 -1
  215. package/lib/commands/sql/status.js +1 -1
  216. package/lib/commands/sql/validate.js +1 -1
  217. package/lib/commands/task/index.js +1 -1
  218. package/lib/commands/task/status.js +1 -1
  219. package/lib/commands/tenant/index.js +1 -1
  220. package/lib/commands/tenant/members-list.js +1 -1
  221. package/lib/commands/tenant/shared.js +1 -1
  222. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  223. package/lib/commands/user-account/index.js +1 -1
  224. package/lib/commands/workspace/add.js +1 -1
  225. package/lib/commands/workspace/index.js +1 -1
  226. package/lib/commands/workspace/remove.js +1 -1
  227. package/lib/config/domain-config.js +1 -1
  228. package/lib/config/project-domain-routing.js +1 -1
  229. package/lib/config/schema.js +1 -1
  230. package/lib/constant/cdn.js +1 -1
  231. package/lib/constant/cli.js +1 -1
  232. package/lib/constant/defaults.js +1 -1
  233. package/lib/constant/domain.js +1 -1
  234. package/lib/constant/env.js +1 -1
  235. package/lib/constant/output.js +1 -1
  236. package/lib/constant/paths.js +1 -1
  237. package/lib/constant/region.js +1 -1
  238. package/lib/constant/risk.js +1 -1
  239. package/lib/constant/routing-profile.js +1 -1
  240. package/lib/context/app-resolver.js +1 -1
  241. package/lib/context/auth-resolver.js +1 -1
  242. package/lib/context/config-loader.js +1 -1
  243. package/lib/context.js +1 -1
  244. package/lib/core/alias-resolver.js +1 -1
  245. package/lib/core/api-client.js +1 -1
  246. package/lib/core/bff/config.js +1 -1
  247. package/lib/core/bff/file-system.js +1 -1
  248. package/lib/core/bff/hash.js +1 -1
  249. package/lib/core/bff/lock.js +1 -1
  250. package/lib/core/bff/utils.js +1 -1
  251. package/lib/core/db-resolver.js +1 -1
  252. package/lib/core/instant-api-policy/config.js +1 -1
  253. package/lib/core/kb-search-client.js +1 -1
  254. package/lib/core/page/file-system.js +1 -1
  255. package/lib/core/page/hash.js +1 -1
  256. package/lib/core/page/lock.js +1 -1
  257. package/lib/core/sql-index-auditor.js +1 -1
  258. package/lib/core/sql-sync/config.js +1 -1
  259. package/lib/core/sql-sync/file-system.js +1 -1
  260. package/lib/core/sql-sync/hash.js +1 -1
  261. package/lib/core/sql-sync/lock.js +1 -1
  262. package/lib/core/sql-sync/utils.js +1 -1
  263. package/lib/core/sql-validator.js +1 -1
  264. package/lib/errors.js +1 -1
  265. package/lib/framework/build-all-flags.js +1 -1
  266. package/lib/framework/error-output.js +1 -1
  267. package/lib/framework/explicit-yes.js +1 -1
  268. package/lib/framework/flags.js +1 -1
  269. package/lib/framework/help.js +1 -1
  270. package/lib/framework/index.js +1 -1
  271. package/lib/framework/output.js +1 -1
  272. package/lib/framework/response.js +1 -1
  273. package/lib/framework/runner-alias.js +1 -1
  274. package/lib/framework/runner.js +1 -1
  275. package/lib/framework/schema-export.js +1 -1
  276. package/lib/framework/supported-flags.js +1 -1
  277. package/lib/framework/types.js +1 -1
  278. package/lib/generated/build-info.d.ts +4 -4
  279. package/lib/generated/build-info.js +1 -1
  280. package/lib/generated/official-routing.js +1 -1
  281. package/lib/generated/routing-contract.js +1 -1
  282. package/lib/help.js +1 -1
  283. package/lib/postinstall.js +1 -1
  284. package/lib/runtime/confirmation.js +1 -1
  285. package/lib/runtime/event.js +1 -1
  286. package/lib/runtime/index.js +1 -1
  287. package/lib/runtime/queue.js +1 -1
  288. package/lib/runtime/resolve.js +1 -1
  289. package/lib/skills/builtin-skill.js +1 -1
  290. package/lib/skills/main.js +1 -1
  291. package/lib/skills/npx-skills-add.js +1 -1
  292. package/lib/skills/skill-presence.js +1 -1
  293. package/lib/telemetry/cli-command-trace.js +1 -1
  294. package/lib/telemetry/cli-help-trace.js +1 -1
  295. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  296. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  297. package/lib/telemetry/send-cli-trace-log.js +1 -1
  298. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  299. package/lib/utils/ai_config.js +1 -1
  300. package/lib/utils/apply-jq-filter.js +1 -1
  301. package/lib/utils/cdn-config.js +1 -1
  302. package/lib/utils/check-sdk-version.js +1 -1
  303. package/lib/utils/cli-version-check.js +1 -1
  304. package/lib/utils/cli-version-policy.js +1 -1
  305. package/lib/utils/config.js +1 -1
  306. package/lib/utils/entity-with-id.js +1 -1
  307. package/lib/utils/file-utils.js +1 -1
  308. package/lib/utils/guides-cdn.js +1 -1
  309. package/lib/utils/http-client.js +1 -1
  310. package/lib/utils/is-non-interactive.js +1 -1
  311. package/lib/utils/logger.js +1 -1
  312. package/lib/utils/params.js +1 -1
  313. package/lib/utils/platform.js +1 -1
  314. package/lib/utils/sleep.js +1 -1
  315. package/lib/utils/template-replacer.js +1 -1
  316. package/lib/utils/update-notice.js +1 -1
  317. package/lib/utils/version.js +1 -1
  318. package/lib/utils/with-active-cookie.js +1 -1
  319. package/lib/utils/write-cli-side-channel.js +1 -1
  320. package/package.json +1 -1
  321. package/skills/rabetbase/SKILL.md +1 -1
  322. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a18_0x3da9(){const _0x28c44f=['110faycqs','2920126ldGtQf','6aPuIVr','selectedAppName','length','project','global','963536ugIUmw','filter','merged','47103LjaRlL','85332oMVgce','8395875FyYtTb','18LunaIx','2611710lANNmu','720LYnauO','validation','1675230UaDrFC','App\x20\x22','join','bool','name'];a18_0x3da9=function(){return _0x28c44f;};return a18_0x3da9();}(function(_0x48c89f,_0x10201d){const _0x33011d=a18_0xc781,_0x4f97e8=_0x48c89f();while(!![]){try{const _0x24ed04=-parseInt(_0x33011d(0xf0))/0x1*(-parseInt(_0x33011d(0xe3))/0x2)+parseInt(_0x33011d(0xe6))/0x3+-parseInt(_0x33011d(0xdf))/0x4+-parseInt(_0x33011d(0xe9))/0x5*(-parseInt(_0x33011d(0xe5))/0x6)+-parseInt(_0x33011d(0xe2))/0x7*(-parseInt(_0x33011d(0xe7))/0x8)+parseInt(_0x33011d(0xe4))/0x9+parseInt(_0x33011d(0xee))/0xa*(-parseInt(_0x33011d(0xef))/0xb);if(_0x24ed04===_0x10201d)break;else _0x4f97e8['push'](_0x4f97e8['shift']());}catch(_0x519f0f){_0x4f97e8['push'](_0x4f97e8['shift']());}}}(a18_0x3da9,0x7c4fb));import{getMultiAppConfigs}from'../../utils/config.js';function a18_0xc781(_0x4e76e7,_0x192cac){_0x4e76e7=_0x4e76e7-0xdf;const _0x3da993=a18_0x3da9();let _0xc78159=_0x3da993[_0x4e76e7];return _0xc78159;}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x2f8763,_0x62ed3e){const _0x498e39=a18_0xc781;if(_0x62ed3e)return null;const _0x4cd07f=_0x2f8763[_0x498e39(0xec)](_0x498e39(0xf4))?_0x498e39(0xe1):_0x498e39(0xf3);let _0x3090ae=getMultiAppConfigs(_0x4cd07f);if(!_0x3090ae||_0x3090ae[_0x498e39(0xf2)]===0x0)return null;if(_0x2f8763['selectedAppName']){const _0xa18d2f=_0x3090ae[_0x498e39(0xe0)](_0x4de74f=>_0x4de74f[_0x498e39(0xed)]===_0x2f8763['selectedAppName']);if(_0xa18d2f[_0x498e39(0xf2)]===0x0){const _0x410f80=_0x3090ae['map'](_0x41d28=>_0x41d28['name'])[_0x498e39(0xeb)](',\x20');throw CliErrors[_0x498e39(0xe8)](_0x498e39(0xea)+_0x2f8763[_0x498e39(0xf1)]+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x410f80);}_0x3090ae=_0xa18d2f;}return _0x3090ae;}
1
+ (function(_0x3e0ccd,_0x54309e){const _0x16ad92=a18_0x217a,_0x5eb883=_0x3e0ccd();while(!![]){try{const _0x3f5168=-parseInt(_0x16ad92(0x96))/0x1*(parseInt(_0x16ad92(0x93))/0x2)+parseInt(_0x16ad92(0x9e))/0x3*(parseInt(_0x16ad92(0x97))/0x4)+parseInt(_0x16ad92(0x99))/0x5+parseInt(_0x16ad92(0x95))/0x6+parseInt(_0x16ad92(0xa3))/0x7*(-parseInt(_0x16ad92(0x9c))/0x8)+-parseInt(_0x16ad92(0x94))/0x9+-parseInt(_0x16ad92(0x98))/0xa*(parseInt(_0x16ad92(0x9a))/0xb);if(_0x3f5168===_0x54309e)break;else _0x5eb883['push'](_0x5eb883['shift']());}catch(_0x14f667){_0x5eb883['push'](_0x5eb883['shift']());}}}(a18_0x12c2,0xb0d03));function a18_0x12c2(){const _0x524c01=['3789018MwFBJc','1wXjKXb','4AqOTNY','3830HlLloE','5844275snhSsL','10087kdyhti','App\x20\x22','8992iKTnqf','map','3711633QhBJbL','project','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','filter','bool','2317uVUUam','validation','length','name','selectedAppName','global','join','2038034QOGwtf','5139630gNjGCG'];a18_0x12c2=function(){return _0x524c01;};return a18_0x12c2();}import{getMultiAppConfigs}from'../../utils/config.js';function a18_0x217a(_0x14ed1c,_0x4fb7a9){_0x14ed1c=_0x14ed1c-0x8e;const _0x12c20d=a18_0x12c2();let _0x217a76=_0x12c20d[_0x14ed1c];return _0x217a76;}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x581cf7,_0x5dea02){const _0x3ddbb9=a18_0x217a;if(_0x5dea02)return null;const _0x3a1c89=_0x581cf7[_0x3ddbb9(0xa2)](_0x3ddbb9(0x91))?'merged':_0x3ddbb9(0x9f);let _0x5d1bf3=getMultiAppConfigs(_0x3a1c89);if(!_0x5d1bf3||_0x5d1bf3[_0x3ddbb9(0x8e)]===0x0)return null;if(_0x581cf7['selectedAppName']){const _0x28373d=_0x5d1bf3[_0x3ddbb9(0xa1)](_0x30261b=>_0x30261b[_0x3ddbb9(0x8f)]===_0x581cf7[_0x3ddbb9(0x90)]);if(_0x28373d[_0x3ddbb9(0x8e)]===0x0){const _0x5b419c=_0x5d1bf3[_0x3ddbb9(0x9d)](_0xbd0771=>_0xbd0771['name'])[_0x3ddbb9(0x92)](',\x20');throw CliErrors[_0x3ddbb9(0xa4)](_0x3ddbb9(0x9b)+_0x581cf7['selectedAppName']+_0x3ddbb9(0xa0)+_0x5b419c);}_0x5d1bf3=_0x28373d;}return _0x5d1bf3;}
@@ -1 +1 @@
1
- function a19_0x1744(_0x1329be,_0x5f0c20){_0x1329be=_0x1329be-0x1da;const _0x20e8b7=a19_0x20e8();let _0x174483=_0x20e8b7[_0x1329be];return _0x174483;}(function(_0x197ddf,_0x279a18){const _0x100fa0=a19_0x1744,_0x52b07f=_0x197ddf();while(!![]){try{const _0x323b77=-parseInt(_0x100fa0(0x1da))/0x1+-parseInt(_0x100fa0(0x1dd))/0x2*(-parseInt(_0x100fa0(0x1e3))/0x3)+parseInt(_0x100fa0(0x1db))/0x4*(-parseInt(_0x100fa0(0x1dc))/0x5)+parseInt(_0x100fa0(0x1e0))/0x6+parseInt(_0x100fa0(0x1e2))/0x7+parseInt(_0x100fa0(0x1df))/0x8+parseInt(_0x100fa0(0x1e1))/0x9*(-parseInt(_0x100fa0(0x1de))/0xa);if(_0x323b77===_0x279a18)break;else _0x52b07f['push'](_0x52b07f['shift']());}catch(_0xf67d79){_0x52b07f['push'](_0x52b07f['shift']());}}}(a19_0x20e8,0x6f72e));import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';function a19_0x20e8(){const _0x39b53b=['2620056duIisY','9RatdFT','3717371OqxlrO','459777orSLXm','717126QdEXEG','4BDZRtG','2656670SgRvGs','6lGyGIe','2027420qtYZjf','3841520mlmjXZ'];a19_0x20e8=function(){return _0x39b53b;};return a19_0x20e8();}export const appDefinitions=[appListDefinition,appMembersListDefinition];
1
+ (function(_0x50fd50,_0x38e9bc){const _0x453fb4=a19_0x3e56,_0x55bc0a=_0x50fd50();while(!![]){try{const _0x3d6525=-parseInt(_0x453fb4(0x184))/0x1*(-parseInt(_0x453fb4(0x187))/0x2)+-parseInt(_0x453fb4(0x17e))/0x3+parseInt(_0x453fb4(0x17f))/0x4*(-parseInt(_0x453fb4(0x185))/0x5)+parseInt(_0x453fb4(0x181))/0x6+parseInt(_0x453fb4(0x17d))/0x7*(-parseInt(_0x453fb4(0x183))/0x8)+-parseInt(_0x453fb4(0x182))/0x9+parseInt(_0x453fb4(0x186))/0xa*(parseInt(_0x453fb4(0x180))/0xb);if(_0x3d6525===_0x38e9bc)break;else _0x55bc0a['push'](_0x55bc0a['shift']());}catch(_0x1b2de0){_0x55bc0a['push'](_0x55bc0a['shift']());}}}(a19_0x3922,0x68a67));function a19_0x3e56(_0x206cca,_0x370e5b){_0x206cca=_0x206cca-0x17d;const _0x3922b1=a19_0x3922();let _0x3e564e=_0x3922b1[_0x206cca];return _0x3e564e;}function a19_0x3922(){const _0x5eecfb=['69021LltxoW','4QazqnU','11dowCKa','1515072VUdRAX','7692561pYxIzl','2408sGAmcf','1GuKlXT','3929305WpXIni','20666740aCHHwt','601422zXURYh','12271hquYmx'];a19_0x3922=function(){return _0x5eecfb;};return a19_0x3922();}import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';export const appDefinitions=[appListDefinition,appMembersListDefinition];
@@ -1 +1 @@
1
- const a20_0x4a89fd=a20_0x3e73;(function(_0x617d58,_0x239a12){const _0x540522=a20_0x3e73,_0x67aa51=_0x617d58();while(!![]){try{const _0x106842=-parseInt(_0x540522(0x89))/0x1+parseInt(_0x540522(0xa4))/0x2+parseInt(_0x540522(0x93))/0x3+parseInt(_0x540522(0x8c))/0x4*(parseInt(_0x540522(0x96))/0x5)+-parseInt(_0x540522(0x98))/0x6+parseInt(_0x540522(0xa3))/0x7+-parseInt(_0x540522(0xab))/0x8;if(_0x106842===_0x239a12)break;else _0x67aa51['push'](_0x67aa51['shift']());}catch(_0x337548){_0x67aa51['push'](_0x67aa51['shift']());}}}(a20_0x3e21,0x6441b));function a20_0x3e21(){const _0x73ed2d=['projectConfig','6787072LXFnLh','map','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','push','projectPath','validation','boolean','301633jBaPyZ','optional','object','48gKFgKd','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','entries','global','bool','length','merged','2251026GIvkXU','remote','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','195515LUinOQ','isCurrent','4517088uiyCei','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','\x20config','keys','list','defaultApp','globalConfig','app','read','appcode','mergedCli','3778957XYKCdJ','1108174pzhIRQ','find','project','.\x20Use\x20`','apps','globalPath'];a20_0x3e21=function(){return _0x73ed2d;};return a20_0x3e21();}import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x5e9f41,_0xf24287){const _0x417760=a20_0x3e73,_0x1a4f7b=[],_0x2def81=_0x5e9f41['apps']&&typeof _0x5e9f41['apps']==='object'?_0x5e9f41[_0x417760(0xa8)]:{},_0x226e24=_0x5e9f41[_0x417760(0x9d)]||undefined,_0x54f158=_0x226e24??(Object['keys'](_0x2def81)[_0x417760(0x91)]===0x1?Object[_0x417760(0x9b)](_0x2def81)[0x0]:undefined);for(const [_0x387e20,_0x3f0b49]of Object[_0x417760(0x8e)](_0x2def81)){if(!_0x3f0b49||typeof _0x3f0b49!==_0x417760(0x8b)||!_0x3f0b49[_0x417760(0xa1)])continue;_0x1a4f7b[_0x417760(0x85)]({'name':_0x387e20,'appcode':_0x3f0b49[_0x417760(0xa1)],'named':!![],'definedIn':_0xf24287,'isDefault':_0x387e20===_0x54f158,...buildAppProfileListFields(_0x3f0b49)});}return _0x1a4f7b;}function buildMergedItems(_0x340d79,_0x5a0801){const _0x542d43=a20_0x3e73,{apps:apps={}}=_0x340d79,_0x521f34=_0x340d79['defaultApp'],_0x335e36=_0x521f34??(Object['keys'](apps)[_0x542d43(0x91)]===0x1?Object['keys'](apps)[0x0]:undefined),_0x377972=_0x5a0801[_0x542d43(0x9e)][_0x542d43(0xa8)]&&typeof _0x5a0801[_0x542d43(0x9e)][_0x542d43(0xa8)]===_0x542d43(0x8b)?_0x5a0801[_0x542d43(0x9e)]['apps']:{},_0x2faa2f=_0x5a0801[_0x542d43(0xaa)][_0x542d43(0xa8)]&&typeof _0x5a0801[_0x542d43(0xaa)]['apps']===_0x542d43(0x8b)?_0x5a0801[_0x542d43(0xaa)]['apps']:{},_0x1c45fd=Object[_0x542d43(0x8e)](apps),_0x19b8f8=_0x1c45fd[_0x542d43(0xac)](([_0x20f8d4,_0x17b5a8])=>({'name':_0x20f8d4,'appcode':_0x17b5a8[_0x542d43(0xa1)],'named':!![],'definedIn':appDefinedIn(_0x20f8d4,_0x377972,_0x2faa2f),'isDefault':_0x20f8d4===_0x335e36,...buildAppProfileListFields(_0x17b5a8)}));return _0x19b8f8;}function validateAppListFlags(_0x24001b){const _0x3f0640=a20_0x3e73;if(!_0x24001b['bool'](_0x3f0640(0x94)))return;if(!_0x24001b[_0x3f0640(0x90)](_0x3f0640(0x8f))&&!_0x24001b[_0x3f0640(0x90)](_0x3f0640(0xa6)))return;throw CliErrors[_0x3f0640(0x87)]('`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.',_0x3f0640(0xad));}async function execute(_0x37d320){const _0x1ec0f4=a20_0x3e73;validateAppListFlags(_0x37d320);if(_0x37d320[_0x1ec0f4(0x90)](_0x1ec0f4(0x94)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x37d320)};const _0x35df12=_0x37d320[_0x1ec0f4(0x90)](_0x1ec0f4(0x8f)),_0x290c3e=_0x37d320[_0x1ec0f4(0x90)](_0x1ec0f4(0xa6)),_0x81afcb=_0x35df12?_0x1ec0f4(0x8f):_0x290c3e?'project':_0x1ec0f4(0x92),{config:_0x21093e,layers:_0x899ece}=readRawConfigWithLayers(),_0x5285fb=resolveDefaultAppSource(_0x899ece),{defaultApp:_0x4de897}=_0x21093e;let _0x238ed0,_0x51fa64;switch(_0x81afcb){case _0x1ec0f4(0x8f):_0x238ed0=buildItemsFromLayer(_0x899ece[_0x1ec0f4(0x9e)],_0x1ec0f4(0x8f)),_0x51fa64=_0x899ece['globalPath'];break;case _0x1ec0f4(0xa6):_0x238ed0=buildItemsFromLayer(_0x899ece[_0x1ec0f4(0xaa)],_0x1ec0f4(0xa6)),_0x51fa64=_0x899ece[_0x1ec0f4(0x86)];break;default:_0x238ed0=buildMergedItems(_0x21093e,_0x899ece);break;}enrichAppListItemsWithMergedSelection(_0x238ed0,_0x37d320[_0x1ec0f4(0xa2)]);if(_0x238ed0[_0x1ec0f4(0x91)]===0x0){const _0x50eda5=_0x81afcb===_0x1ec0f4(0x92)?'':'\x20in\x20'+_0x81afcb+_0x1ec0f4(0x9a);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x50eda5+_0x1ec0f4(0xa7)+CLI_BIN_NAME+_0x1ec0f4(0x95)};}const _0x122b5f=_0x238ed0[_0x1ec0f4(0xa5)](_0x2ff072=>_0x2ff072[_0x1ec0f4(0x97)]===!![]),_0x5c8b20=_0x4de897??_0x122b5f?.['name']??null,_0x1e929e=_0x81afcb===_0x1ec0f4(0x92)?{'globalPath':_0x899ece[_0x1ec0f4(0xa9)]??null,'projectPath':_0x899ece[_0x1ec0f4(0x86)]??null,'defaultApp':_0x5c8b20,'defaultAppSource':_0x4de897!=null?_0x5285fb:null}:{'scope':_0x81afcb,'configPath':_0x51fa64??null};return{'ok':!![],'data':{'items':_0x238ed0,'meta':_0x1e929e}};}function a20_0x3e73(_0x3e789c,_0x11de1e){_0x3e789c=_0x3e789c-0x85;const _0x3e218d=a20_0x3e21();let _0x3e7349=_0x3e218d[_0x3e789c];return _0x3e7349;}export const appListDefinition={'service':a20_0x4a89fd(0x9f),'command':a20_0x4a89fd(0x9c),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x4a89fd(0xa0),'auth':a20_0x4a89fd(0x8a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x4a89fd(0x94),'type':a20_0x4a89fd(0x88),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a20_0x4a89fd(0x8f),'type':a20_0x4a89fd(0x88),'description':a20_0x4a89fd(0x99),'default':![]},{'name':a20_0x4a89fd(0xa6),'type':a20_0x4a89fd(0x88),'description':a20_0x4a89fd(0x8d),'default':![]}],async 'validate'(_0x244476){validateAppListFlags(_0x244476);},'execute':execute};
1
+ const a20_0x33c370=a20_0x235f;(function(_0x5e339c,_0x4b8493){const _0x4f720e=a20_0x235f,_0x37eb18=_0x5e339c();while(!![]){try{const _0x2b5df5=-parseInt(_0x4f720e(0x186))/0x1+parseInt(_0x4f720e(0x1a9))/0x2*(-parseInt(_0x4f720e(0x187))/0x3)+parseInt(_0x4f720e(0x1a3))/0x4+parseInt(_0x4f720e(0x1a7))/0x5*(parseInt(_0x4f720e(0x192))/0x6)+-parseInt(_0x4f720e(0x1a4))/0x7*(parseInt(_0x4f720e(0x198))/0x8)+-parseInt(_0x4f720e(0x18f))/0x9*(-parseInt(_0x4f720e(0x1ab))/0xa)+parseInt(_0x4f720e(0x18e))/0xb;if(_0x2b5df5===_0x4b8493)break;else _0x37eb18['push'](_0x37eb18['shift']());}catch(_0x5236a8){_0x37eb18['push'](_0x37eb18['shift']());}}}(a20_0x4e59,0x99dd2));import{readRawConfigWithLayers}from'../../context.js';function a20_0x235f(_0x10578f,_0x731223){_0x10578f=_0x10578f-0x186;const _0x4e59dc=a20_0x4e59();let _0x235fd4=_0x4e59dc[_0x10578f];return _0x235fd4;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a20_0x4e59(){const _0x32e465=['global','object','mergedCli','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','appcode','map','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','read','find','3569692ZePtir','285138XLKLXV','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','defaultApp','10WTNACr','keys','2518258diLVKA','name','210edyvje','projectConfig','app','No\x20apps\x20configured','length','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','bool','merged','boolean','globalPath','373776Utykjq','3QaMDwp','entries','remote','push','.\x20Use\x20`','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','projectPath','18850139AtfIeF','93555PHnPUC','list','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','882534ULEXbe','project','isCurrent','apps','globalConfig','\x20config','168FjmBdd','\x20in\x20'];a20_0x4e59=function(){return _0x32e465;};return a20_0x4e59();}import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x3e9ecc,_0x3c3cf4){const _0x21a062=a20_0x235f,_0xa5298b=[],_0x41cbfa=_0x3e9ecc[_0x21a062(0x195)]&&typeof _0x3e9ecc[_0x21a062(0x195)]===_0x21a062(0x19b)?_0x3e9ecc[_0x21a062(0x195)]:{},_0x1fe6ab=_0x3e9ecc['defaultApp']||undefined,_0x1d0893=_0x1fe6ab??(Object[_0x21a062(0x1a8)](_0x41cbfa)[_0x21a062(0x1af)]===0x1?Object['keys'](_0x41cbfa)[0x0]:undefined);for(const [_0x486df0,_0x4f30d7]of Object[_0x21a062(0x188)](_0x41cbfa)){if(!_0x4f30d7||typeof _0x4f30d7!==_0x21a062(0x19b)||!_0x4f30d7[_0x21a062(0x19e)])continue;_0xa5298b[_0x21a062(0x18a)]({'name':_0x486df0,'appcode':_0x4f30d7[_0x21a062(0x19e)],'named':!![],'definedIn':_0x3c3cf4,'isDefault':_0x486df0===_0x1d0893,...buildAppProfileListFields(_0x4f30d7)});}return _0xa5298b;}function buildMergedItems(_0x489250,_0x281c70){const _0x18c200=a20_0x235f,{apps:apps={}}=_0x489250,_0x48665d=_0x489250[_0x18c200(0x1a6)],_0x198001=_0x48665d??(Object[_0x18c200(0x1a8)](apps)[_0x18c200(0x1af)]===0x1?Object[_0x18c200(0x1a8)](apps)[0x0]:undefined),_0xca4146=_0x281c70[_0x18c200(0x196)]['apps']&&typeof _0x281c70[_0x18c200(0x196)][_0x18c200(0x195)]===_0x18c200(0x19b)?_0x281c70['globalConfig']['apps']:{},_0x25c079=_0x281c70[_0x18c200(0x1ac)]['apps']&&typeof _0x281c70[_0x18c200(0x1ac)][_0x18c200(0x195)]===_0x18c200(0x19b)?_0x281c70['projectConfig'][_0x18c200(0x195)]:{},_0x36d86c=Object[_0x18c200(0x188)](apps),_0x3aaab4=_0x36d86c[_0x18c200(0x19f)](([_0x1d851d,_0x50097c])=>({'name':_0x1d851d,'appcode':_0x50097c[_0x18c200(0x19e)],'named':!![],'definedIn':appDefinedIn(_0x1d851d,_0xca4146,_0x25c079),'isDefault':_0x1d851d===_0x198001,...buildAppProfileListFields(_0x50097c)}));return _0x3aaab4;}function validateAppListFlags(_0x5ba64f){const _0x497172=a20_0x235f;if(!_0x5ba64f[_0x497172(0x1b1)](_0x497172(0x189)))return;if(!_0x5ba64f[_0x497172(0x1b1)](_0x497172(0x19a))&&!_0x5ba64f[_0x497172(0x1b1)](_0x497172(0x193)))return;throw CliErrors['validation'](_0x497172(0x1a0),_0x497172(0x1a5));}async function execute(_0x27f20c){const _0x9639e9=a20_0x235f;validateAppListFlags(_0x27f20c);if(_0x27f20c[_0x9639e9(0x1b1)](_0x9639e9(0x189)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x27f20c)};const _0x5050dc=_0x27f20c[_0x9639e9(0x1b1)]('global'),_0x5af2d6=_0x27f20c['bool']('project'),_0x373b6c=_0x5050dc?_0x9639e9(0x19a):_0x5af2d6?_0x9639e9(0x193):'merged',{config:_0x5dc7a5,layers:_0x2f1e1d}=readRawConfigWithLayers(),_0x2a3cb2=resolveDefaultAppSource(_0x2f1e1d),{defaultApp:_0x2f0c60}=_0x5dc7a5;let _0x2f8b6c,_0x2221b1;switch(_0x373b6c){case'global':_0x2f8b6c=buildItemsFromLayer(_0x2f1e1d[_0x9639e9(0x196)],_0x9639e9(0x19a)),_0x2221b1=_0x2f1e1d[_0x9639e9(0x1b4)];break;case _0x9639e9(0x193):_0x2f8b6c=buildItemsFromLayer(_0x2f1e1d[_0x9639e9(0x1ac)],_0x9639e9(0x193)),_0x2221b1=_0x2f1e1d['projectPath'];break;default:_0x2f8b6c=buildMergedItems(_0x5dc7a5,_0x2f1e1d);break;}enrichAppListItemsWithMergedSelection(_0x2f8b6c,_0x27f20c[_0x9639e9(0x19c)]);if(_0x2f8b6c['length']===0x0){const _0x1c4e61=_0x373b6c===_0x9639e9(0x1b2)?'':_0x9639e9(0x199)+_0x373b6c+_0x9639e9(0x197);return{'ok':!![],'data':[],'message':_0x9639e9(0x1ae)+_0x1c4e61+_0x9639e9(0x18b)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x4c1169=_0x2f8b6c[_0x9639e9(0x1a2)](_0xe99639=>_0xe99639[_0x9639e9(0x194)]===!![]),_0x4881c8=_0x2f0c60??_0x4c1169?.[_0x9639e9(0x1aa)]??null,_0xbaeb38=_0x373b6c==='merged'?{'globalPath':_0x2f1e1d['globalPath']??null,'projectPath':_0x2f1e1d[_0x9639e9(0x18d)]??null,'defaultApp':_0x4881c8,'defaultAppSource':_0x2f0c60!=null?_0x2a3cb2:null}:{'scope':_0x373b6c,'configPath':_0x2221b1??null};return{'ok':!![],'data':{'items':_0x2f8b6c,'meta':_0xbaeb38}};}export const appListDefinition={'service':a20_0x33c370(0x1ad),'command':a20_0x33c370(0x190),'description':a20_0x33c370(0x19d),'risk':a20_0x33c370(0x1a1),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x33c370(0x189),'type':a20_0x33c370(0x1b3),'description':a20_0x33c370(0x191),'default':![]},{'name':a20_0x33c370(0x19a),'type':'boolean','description':a20_0x33c370(0x1b0),'default':![]},{'name':a20_0x33c370(0x193),'type':a20_0x33c370(0x1b3),'description':a20_0x33c370(0x18c),'default':![]}],async 'validate'(_0x5bb3a3){validateAppListFlags(_0x5bb3a3);},'execute':execute};
@@ -1 +1 @@
1
- const a21_0x52f685=a21_0x4930;function a21_0x3d6a(){const _0x19ba47=['1611847ptyTKF','7fNxbUV','read','5hXctwi','10QIrego','1141528mDhOPZ','app','928320ZtBSct','length','1693455yODunz','appCode','11501289RvXkiE','2007668UyOZBx','5769726maskMF'];a21_0x3d6a=function(){return _0x19ba47;};return a21_0x3d6a();}(function(_0x17ffb0,_0x5d4804){const _0x1fc175=a21_0x4930,_0x10beb1=_0x17ffb0();while(!![]){try{const _0x482a38=parseInt(_0x1fc175(0x97))/0x1+parseInt(_0x1fc175(0x9e))/0x2+-parseInt(_0x1fc175(0xa0))/0x3+-parseInt(_0x1fc175(0x95))/0x4+-parseInt(_0x1fc175(0x9a))/0x5*(-parseInt(_0x1fc175(0x96))/0x6)+parseInt(_0x1fc175(0x98))/0x7*(parseInt(_0x1fc175(0x9c))/0x8)+-parseInt(_0x1fc175(0x94))/0x9*(parseInt(_0x1fc175(0x9b))/0xa);if(_0x482a38===_0x5d4804)break;else _0x10beb1['push'](_0x10beb1['shift']());}catch(_0x49692d){_0x10beb1['push'](_0x10beb1['shift']());}}}(a21_0x3d6a,0xcc19c));function a21_0x4930(_0x5cd96f,_0x49ecf7){_0x5cd96f=_0x5cd96f-0x94;const _0x3d6a72=a21_0x3d6a();let _0x493016=_0x3d6a72[_0x5cd96f];return _0x493016;}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_0x52f685(0x9d),'command':'members-list','description':'List\x20application\x20members\x20with\x20their\x20role\x20memberships','risk':a21_0x52f685(0x99),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5a2aac){const _0x44c7fa=a21_0x52f685,_0x1ea569=projectAppMembers(await listRoleUsers(_0x5a2aac[_0x44c7fa(0xa1)]));return{'ok':!![],'data':{'appCode':_0x5a2aac[_0x44c7fa(0xa1)],'items':_0x1ea569,'totalCount':_0x1ea569[_0x44c7fa(0x9f)]},'message':'Found\x20'+_0x1ea569[_0x44c7fa(0x9f)]+'\x20application\x20member(s)'};}};
1
+ function a21_0x315f(){const _0x53f0bc=['read','length','24QAkUrX','appCode','\x20application\x20member(s)','5469ftpNEl','2Etnnuc','26EQWAcq','1873428GNWBRS','members-list','1395486EvSpiH','40wGSIhI','88wnqmRa','1781153baCNXb','25528BBAlGK','Found\x20','21354XudmNy','1458600iLEqKw','1519YNjdhC'];a21_0x315f=function(){return _0x53f0bc;};return a21_0x315f();}const a21_0x51f838=a21_0x46a6;(function(_0x43e4b7,_0x478295){const _0x47080f=a21_0x46a6,_0xcd3f17=_0x43e4b7();while(!![]){try{const _0x129bb2=parseInt(_0x47080f(0xb0))/0x1*(-parseInt(_0x47080f(0xa8))/0x2)+-parseInt(_0x47080f(0xa7))/0x3*(-parseInt(_0x47080f(0xae))/0x4)+parseInt(_0x47080f(0xa0))/0x5+parseInt(_0x47080f(0xb2))/0x6*(parseInt(_0x47080f(0xa1))/0x7)+-parseInt(_0x47080f(0xa4))/0x8*(-parseInt(_0x47080f(0xac))/0x9)+parseInt(_0x47080f(0xad))/0xa*(-parseInt(_0x47080f(0xaf))/0xb)+-parseInt(_0x47080f(0xaa))/0xc*(parseInt(_0x47080f(0xa9))/0xd);if(_0x129bb2===_0x478295)break;else _0xcd3f17['push'](_0xcd3f17['shift']());}catch(_0xc6b6da){_0xcd3f17['push'](_0xcd3f17['shift']());}}}(a21_0x315f,0x8e899));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';function a21_0x46a6(_0xf3c262,_0x676438){_0xf3c262=_0xf3c262-0xa0;const _0x315f72=a21_0x315f();let _0x46a678=_0x315f72[_0xf3c262];return _0x46a678;}export const appMembersListDefinition={'service':'app','command':a21_0x51f838(0xab),'description':'List\x20application\x20members\x20with\x20their\x20role\x20memberships','risk':a21_0x51f838(0xa2),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3c6051){const _0x18b55c=a21_0x51f838,_0x5de6fd=projectAppMembers(await listRoleUsers(_0x3c6051['appCode']));return{'ok':!![],'data':{'appCode':_0x3c6051[_0x18b55c(0xa5)],'items':_0x5de6fd,'totalCount':_0x5de6fd[_0x18b55c(0xa3)]},'message':_0x18b55c(0xb1)+_0x5de6fd['length']+_0x18b55c(0xa6)};}};
@@ -1 +1 @@
1
- (function(_0x40c15f,_0x37f27f){const _0x21acfc=a22_0x4382,_0x2ad690=_0x40c15f();while(!![]){try{const _0xf0ffdd=-parseInt(_0x21acfc(0x13c))/0x1*(-parseInt(_0x21acfc(0x13a))/0x2)+-parseInt(_0x21acfc(0x13b))/0x3+parseInt(_0x21acfc(0x137))/0x4*(parseInt(_0x21acfc(0x139))/0x5)+-parseInt(_0x21acfc(0x138))/0x6+parseInt(_0x21acfc(0x12f))/0x7*(parseInt(_0x21acfc(0x132))/0x8)+parseInt(_0x21acfc(0x131))/0x9*(-parseInt(_0x21acfc(0x12e))/0xa)+parseInt(_0x21acfc(0x130))/0xb*(parseInt(_0x21acfc(0x134))/0xc);if(_0xf0ffdd===_0x37f27f)break;else _0x2ad690['push'](_0x2ad690['shift']());}catch(_0x160e4b){_0x2ad690['push'](_0x2ad690['shift']());}}}(a22_0x3d05,0x87489));function a22_0x3d05(){const _0x4e4abb=['2233ASoQUH','943481LfkVRs','315QzMRkh','264yXcHHs','platform','48bgTToR','appName','authRequired','28UcHOMm','2353518ScuZSm','559035ZeqFGX','38hfhHBO','998052WPXPCJ','55217HGMYzf','appDesc','258950eCNEvC'];a22_0x3d05=function(){return _0x4e4abb;};return a22_0x3d05();}import{listRemoteApps}from'../../core/api-client.js';function a22_0x4382(_0x15d5d8,_0x52d6cf){_0x15d5d8=_0x15d5d8-0x12d;const _0x3d0595=a22_0x3d05();let _0x438280=_0x3d0595[_0x15d5d8];return _0x438280;}import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x38f876){const _0x73a481=a22_0x4382,_0x5e95ff=_0x38f876['cookie']||getCookie();if(!_0x5e95ff)throw CliErrors[_0x73a481(0x136)]();return _0x5e95ff;}export async function listRemoteAppDirectory(_0x37b7aa){const _0x433a9b=a22_0x4382,_0x428f15=await withActiveCookie(resolveCookie(_0x37b7aa),()=>listRemoteApps());return{'items':_0x428f15['map'](_0xcd3d28=>({..._0xcd3d28['id']!=null?{'id':_0xcd3d28['id']}:{},'appCode':_0xcd3d28['appCode'],'appName':_0xcd3d28[_0x433a9b(0x135)],..._0xcd3d28['appDesc']!=null?{'appDesc':_0xcd3d28[_0x433a9b(0x12d)]}:{}})),'meta':{'source':_0x433a9b(0x133)}};}
1
+ (function(_0x211d30,_0xa1329e){const _0x25a0a4=a22_0x4b2e,_0x598df4=_0x211d30();while(!![]){try{const _0x2ebd5a=parseInt(_0x25a0a4(0xe1))/0x1+-parseInt(_0x25a0a4(0xe8))/0x2*(-parseInt(_0x25a0a4(0xdd))/0x3)+-parseInt(_0x25a0a4(0xe6))/0x4*(parseInt(_0x25a0a4(0xe4))/0x5)+parseInt(_0x25a0a4(0xe5))/0x6+parseInt(_0x25a0a4(0xde))/0x7+parseInt(_0x25a0a4(0xdc))/0x8+-parseInt(_0x25a0a4(0xe7))/0x9;if(_0x2ebd5a===_0xa1329e)break;else _0x598df4['push'](_0x598df4['shift']());}catch(_0x8ab48e){_0x598df4['push'](_0x598df4['shift']());}}}(a22_0x29a0,0x734a1));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a22_0x4b2e(_0x4d4f1a,_0x3366cb){_0x4d4f1a=_0x4d4f1a-0xda;const _0x29a0b3=a22_0x29a0();let _0x4b2e63=_0x29a0b3[_0x4d4f1a];return _0x4b2e63;}import{withActiveCookie}from'../../utils/with-active-cookie.js';function a22_0x29a0(){const _0x11f0bd=['cookie','appCode','527112VFCkMS','appDesc','appName','18485oBxniB','1275246OKhjXW','540iJICyd','5991894ymxxhZ','2SoNJKp','map','platform','authRequired','1724408XQHhKQ','791481AMRpQn','2926385MqUfUY'];a22_0x29a0=function(){return _0x11f0bd;};return a22_0x29a0();}function resolveCookie(_0x55dd86){const _0x31e285=a22_0x4b2e,_0x5e2019=_0x55dd86[_0x31e285(0xdf)]||getCookie();if(!_0x5e2019)throw CliErrors[_0x31e285(0xdb)]();return _0x5e2019;}export async function listRemoteAppDirectory(_0x5808dc){const _0x4b7ab6=a22_0x4b2e,_0x3448ad=await withActiveCookie(resolveCookie(_0x5808dc),()=>listRemoteApps());return{'items':_0x3448ad[_0x4b7ab6(0xe9)](_0x5a1a9f=>({..._0x5a1a9f['id']!=null?{'id':_0x5a1a9f['id']}:{},'appCode':_0x5a1a9f[_0x4b7ab6(0xe0)],'appName':_0x5a1a9f[_0x4b7ab6(0xe3)],..._0x5a1a9f['appDesc']!=null?{'appDesc':_0x5a1a9f[_0x4b7ab6(0xe2)]}:{}})),'meta':{'source':_0x4b7ab6(0xda)}};}
@@ -1 +1 @@
1
- (function(_0x466e53,_0xdf55ba){const _0x3238e4=a23_0x2f28,_0x1ca646=_0x466e53();while(!![]){try{const _0x29636f=parseInt(_0x3238e4(0xd5))/0x1+-parseInt(_0x3238e4(0xd6))/0x2+-parseInt(_0x3238e4(0x104))/0x3+-parseInt(_0x3238e4(0xfa))/0x4*(parseInt(_0x3238e4(0xd4))/0x5)+parseInt(_0x3238e4(0xda))/0x6+-parseInt(_0x3238e4(0xf5))/0x7+parseInt(_0x3238e4(0xeb))/0x8;if(_0x29636f===_0xdf55ba)break;else _0x1ca646['push'](_0x1ca646['shift']());}catch(_0x29cdfd){_0x1ca646['push'](_0x1ca646['shift']());}}}(a23_0x944a,0xa572a));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x4ed300){const _0x2ad5b4=_0x4ed300?.['trim']();return _0x2ad5b4?_0x2ad5b4:null;}export function projectAppMembers(_0x4bbead){const _0x5eb2e0=a23_0x2f28,_0x317ce3=new Map(),_0x326fbc=[..._0x4bbead][_0x5eb2e0(0x103)]((_0x84e88e,_0x369f27)=>_0x84e88e['id']-_0x369f27['id']),_0x2e4922=(_0x48ea83,_0x57e76b,_0x3b1acf)=>{const _0x478201=_0x5eb2e0;for(const _0x45d4c1 of _0x57e76b){const _0x126941=Number(_0x45d4c1[_0x478201(0xf7)]);if(!Number[_0x478201(0x102)](_0x126941)||_0x126941<=0x0)continue;let _0x422ea0=_0x317ce3[_0x478201(0xec)](_0x126941);if(!_0x422ea0)_0x422ea0={'userId':_0x126941,'username':nullableText(_0x45d4c1[_0x478201(0xef)]),'displayName':nullableText(_0x45d4c1[_0x478201(0xf8)]),'status':_0x3b1acf,'roles':[],'roleKeys':new Set()},_0x317ce3[_0x478201(0xe6)](_0x126941,_0x422ea0);else{_0x422ea0['username']??=nullableText(_0x45d4c1[_0x478201(0xef)]),_0x422ea0[_0x478201(0xf1)]??=nullableText(_0x45d4c1[_0x478201(0xf8)]);if(_0x3b1acf===_0x478201(0xd2))_0x422ea0[_0x478201(0xe4)]=_0x478201(0xd2);}const _0x4cbfbd=_0x48ea83['id']+':'+_0x3b1acf;if(_0x422ea0[_0x478201(0xd8)][_0x478201(0x100)](_0x4cbfbd))continue;_0x422ea0[_0x478201(0xd8)][_0x478201(0xe1)](_0x4cbfbd),_0x422ea0[_0x478201(0x101)][_0x478201(0xfe)]({'roleId':_0x48ea83['id'],'roleCode':_0x48ea83[_0x478201(0xf9)],'roleName':nullableText(_0x48ea83[_0x478201(0xf4)]),'roleType':nullableText(_0x48ea83[_0x478201(0xe9)]),'membershipStatus':_0x3b1acf});}};for(const _0x55d96b of _0x326fbc){_0x2e4922(_0x55d96b,_0x55d96b['userList']??[],_0x5eb2e0(0xd2)),_0x2e4922(_0x55d96b,_0x55d96b[_0x5eb2e0(0xfb)]??[],_0x5eb2e0(0xfc));}return[..._0x317ce3[_0x5eb2e0(0xe7)]()][_0x5eb2e0(0xff)](_0x246474=>({'userId':_0x246474[_0x5eb2e0(0xf7)],'username':_0x246474[_0x5eb2e0(0xef)],'displayName':_0x246474[_0x5eb2e0(0xf1)],'status':_0x246474[_0x5eb2e0(0xe4)],'roles':_0x246474[_0x5eb2e0(0x101)]['sort']((_0x499c15,_0x1acfea)=>_0x499c15['roleId']-_0x1acfea['roleId']||(_0x499c15['membershipStatus']===_0x1acfea[_0x5eb2e0(0xe0)]?0x0:_0x499c15['membershipStatus']===_0x5eb2e0(0xd2)?-0x1:0x1))}))['sort']((_0xb03d1b,_0x5e0855)=>_0xb03d1b[_0x5eb2e0(0xf7)]-_0x5e0855[_0x5eb2e0(0xf7)]);}export function enrichAppListItemsWithMergedSelection(_0x1b7dfa,_0x430bcb){const _0x3c5863=a23_0x2f28;if(!_0x430bcb)return;const _0x43c1fc=_0x430bcb[_0x3c5863(0xdc)]&&typeof _0x430bcb[_0x3c5863(0xdc)]==='object'?_0x430bcb['apps']:{},_0x182386=Object[_0x3c5863(0xee)](_0x43c1fc)['length']>0x0;for(const _0x5e01f7 of _0x1b7dfa){_0x5e01f7[_0x3c5863(0xf2)]=![];}const _0x312c3c=_0x430bcb[_0x3c5863(0xe2)]!=null?String(_0x430bcb[_0x3c5863(0xe2)])['trim']():'';if(_0x182386){const _0x5242cb=_0x430bcb[_0x3c5863(0xf6)]??_0x430bcb[_0x3c5863(0xe8)];if(_0x5242cb)for(const _0x2b5808 of _0x1b7dfa){_0x2b5808[_0x3c5863(0xdd)]===!![]&&_0x2b5808['name']===_0x5242cb&&(_0x2b5808[_0x3c5863(0xf2)]=!![]);}for(const _0x10985d of _0x1b7dfa){if(_0x10985d[_0x3c5863(0xdd)]!==![])continue;if(_0x430bcb[_0x3c5863(0xe8)])continue;_0x312c3c&&String(_0x10985d[_0x3c5863(0xfd)]??'')[_0x3c5863(0xd3)]()===_0x312c3c&&(_0x10985d[_0x3c5863(0xf2)]=!![]);}return;}if(!_0x312c3c)return;for(const _0x342d64 of _0x1b7dfa){String(_0x342d64['appcode']??'')[_0x3c5863(0xd3)]()===_0x312c3c&&(_0x342d64[_0x3c5863(0xf2)]=!![]);}}function a23_0x2f28(_0x1a1f16,_0x3e1991){_0x1a1f16=_0x1a1f16-0xd2;const _0x944a31=a23_0x944a();let _0x2f284d=_0x944a31[_0x1a1f16];return _0x2f284d;}export function resolveAppScopeForWrite(_0x545b51,_0x1f0882,_0x385dc6){const _0x4140b7=a23_0x2f28;if(_0x1f0882)return _0x4140b7(0xdf);const _0x3fe264=_0x385dc6[_0x4140b7(0xf0)][_0x4140b7(0xdc)]&&typeof _0x385dc6[_0x4140b7(0xf0)][_0x4140b7(0xdc)]===_0x4140b7(0xea)?_0x385dc6[_0x4140b7(0xf0)][_0x4140b7(0xdc)]:{},_0x27f39=_0x385dc6[_0x4140b7(0xed)][_0x4140b7(0xdc)]&&typeof _0x385dc6[_0x4140b7(0xed)][_0x4140b7(0xdc)]===_0x4140b7(0xea)?_0x385dc6[_0x4140b7(0xed)]['apps']:{};if(Object[_0x4140b7(0xd7)][_0x4140b7(0xf3)][_0x4140b7(0xd9)](_0x3fe264,_0x545b51))return _0x4140b7(0xde);if(Object['prototype'][_0x4140b7(0xf3)][_0x4140b7(0xd9)](_0x27f39,_0x545b51))return _0x4140b7(0xdf);return'project';}export function appDefinedIn(_0x330d62,_0x2c22e5,_0x447f9b){const _0x177ce6=a23_0x2f28,_0x23eca9=Object[_0x177ce6(0xd7)][_0x177ce6(0xf3)]['call'](_0x2c22e5,_0x330d62),_0x19f39c=Object['prototype'][_0x177ce6(0xf3)][_0x177ce6(0xd9)](_0x447f9b,_0x330d62);if(_0x23eca9&&_0x19f39c)return _0x177ce6(0xe3);if(_0x19f39c)return'project';return _0x177ce6(0xdf);}export function resolveDefaultAppSource(_0x413e6a){const _0x3ab258=a23_0x2f28,_0x5504f9=_0x413e6a['projectConfig'][_0x3ab258(0xdc)]&&typeof _0x413e6a['projectConfig']['apps']===_0x3ab258(0xea)?_0x413e6a[_0x3ab258(0xf0)][_0x3ab258(0xdc)]:{};if(_0x3ab258(0xe8)in _0x413e6a['projectConfig'])return _0x3ab258(0xde);if(Object[_0x3ab258(0xee)](_0x5504f9)[_0x3ab258(0xe5)]>0x0)return _0x3ab258(0xde);if(Object[_0x3ab258(0xee)](_0x413e6a[_0x3ab258(0xf0)])[_0x3ab258(0xe5)]===0x0&&_0x413e6a['globalConfig'][_0x3ab258(0xe8)])return _0x3ab258(0xdf);return null;}export function getConfigPath(_0x359f66={}){const _0x19f699=a23_0x2f28,_0xb783c0=_0x359f66[_0x19f699(0xdf)]?_0x19f699(0xdf):_0x19f699(0xde);return resolveWriteConfigPath(_0xb783c0);}export function readConfig(_0x519eb1={}){return readConfigFile(getConfigPath(_0x519eb1));}function a23_0x944a(){const _0x3ac4ff=['values','defaultApp','roleType','object','14079208fdbkkw','get','globalConfig','keys','username','projectConfig','displayName','isCurrent','hasOwnProperty','roleName','8009169lVoMUX','currentApp','userId','nickname','roleCode','312420SqohVN','applyUserList','PENDING','appcode','push','map','has','roles','isFinite','sort','1518429OXVpYk','ACTIVE','trim','15zzhGgQ','570958BwmySI','1698714YCyUap','prototype','roleKeys','call','6484782itSWoH','\x20(global)','apps','named','project','global','membershipStatus','add','appCode','both','status','length','set'];a23_0x944a=function(){return _0x3ac4ff;};return a23_0x944a();}export function writeConfig(_0xc0aa64,_0x58f35b={}){writeConfigFile(getConfigPath(_0x58f35b),_0xc0aa64);}export function scopeLabel(_0x23b917){const _0x26c2ba=a23_0x2f28;return _0x23b917['global']?_0x26c2ba(0xdb):'';}
1
+ (function(_0x4d9e1d,_0x48d0fa){const _0x38948f=a23_0x21c9,_0x277eab=_0x4d9e1d();while(!![]){try{const _0x5bea01=parseInt(_0x38948f(0x100))/0x1+-parseInt(_0x38948f(0xdc))/0x2+parseInt(_0x38948f(0xed))/0x3+parseInt(_0x38948f(0xf2))/0x4+-parseInt(_0x38948f(0xdb))/0x5*(-parseInt(_0x38948f(0x107))/0x6)+-parseInt(_0x38948f(0xf9))/0x7+parseInt(_0x38948f(0xf8))/0x8*(-parseInt(_0x38948f(0xf3))/0x9);if(_0x5bea01===_0x48d0fa)break;else _0x277eab['push'](_0x277eab['shift']());}catch(_0x5c43e0){_0x277eab['push'](_0x277eab['shift']());}}}(a23_0x38d4,0x8d58b));function a23_0x21c9(_0x302f1e,_0x171c99){_0x302f1e=_0x302f1e-0xd8;const _0x38d40a=a23_0x38d4();let _0x21c9e7=_0x38d40a[_0x302f1e];return _0x21c9e7;}import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x2ff31e){const _0x4b3639=_0x2ff31e?.['trim']();return _0x4b3639?_0x4b3639:null;}function a23_0x38d4(){const _0x260f11=['object','336304HZCMSA','status','isFinite','ACTIVE','appcode','sort','nickname','2806638tuMjmq','named','defaultApp','keys','10jtDLox','1457516BEJGWH','has','length','username','map','trim','prototype','values','appCode','projectConfig','roleId','push','membershipStatus','isCurrent','roleType','currentApp','displayName','1063389xQfsmL','roles','project','hasOwnProperty','call','2392036TkNSdJ','2205261ZXSaKv','userId','name','roleName','roleKeys','8VPlayX','4701060pCcrpg','applyUserList','globalConfig','get','global','apps'];a23_0x38d4=function(){return _0x260f11;};return a23_0x38d4();}export function projectAppMembers(_0x1a5228){const _0x4c3241=a23_0x21c9,_0x2a2c84=new Map(),_0x3337b1=[..._0x1a5228][_0x4c3241(0x105)]((_0xc45d83,_0x5c2871)=>_0xc45d83['id']-_0x5c2871['id']),_0x338c98=(_0xca5fbe,_0xf0b5bb,_0x3422af)=>{const _0x34cbe7=_0x4c3241;for(const _0x319df3 of _0xf0b5bb){const _0x3c9827=Number(_0x319df3[_0x34cbe7(0xf4)]);if(!Number[_0x34cbe7(0x102)](_0x3c9827)||_0x3c9827<=0x0)continue;let _0x12a49c=_0x2a2c84[_0x34cbe7(0xfc)](_0x3c9827);if(!_0x12a49c)_0x12a49c={'userId':_0x3c9827,'username':nullableText(_0x319df3[_0x34cbe7(0xdf)]),'displayName':nullableText(_0x319df3[_0x34cbe7(0x106)]),'status':_0x3422af,'roles':[],'roleKeys':new Set()},_0x2a2c84['set'](_0x3c9827,_0x12a49c);else{_0x12a49c[_0x34cbe7(0xdf)]??=nullableText(_0x319df3[_0x34cbe7(0xdf)]),_0x12a49c[_0x34cbe7(0xec)]??=nullableText(_0x319df3[_0x34cbe7(0x106)]);if(_0x3422af==='ACTIVE')_0x12a49c[_0x34cbe7(0x101)]='ACTIVE';}const _0x4ad9a6=_0xca5fbe['id']+':'+_0x3422af;if(_0x12a49c[_0x34cbe7(0xf7)][_0x34cbe7(0xdd)](_0x4ad9a6))continue;_0x12a49c['roleKeys']['add'](_0x4ad9a6),_0x12a49c['roles'][_0x34cbe7(0xe7)]({'roleId':_0xca5fbe['id'],'roleCode':_0xca5fbe['roleCode'],'roleName':nullableText(_0xca5fbe[_0x34cbe7(0xf6)]),'roleType':nullableText(_0xca5fbe[_0x34cbe7(0xea)]),'membershipStatus':_0x3422af});}};for(const _0x1d09ec of _0x3337b1){_0x338c98(_0x1d09ec,_0x1d09ec['userList']??[],'ACTIVE'),_0x338c98(_0x1d09ec,_0x1d09ec[_0x4c3241(0xfa)]??[],'PENDING');}return[..._0x2a2c84[_0x4c3241(0xe3)]()][_0x4c3241(0xe0)](_0x3e5fdb=>({'userId':_0x3e5fdb[_0x4c3241(0xf4)],'username':_0x3e5fdb[_0x4c3241(0xdf)],'displayName':_0x3e5fdb[_0x4c3241(0xec)],'status':_0x3e5fdb[_0x4c3241(0x101)],'roles':_0x3e5fdb[_0x4c3241(0xee)][_0x4c3241(0x105)]((_0x4402c3,_0x481751)=>_0x4402c3[_0x4c3241(0xe6)]-_0x481751[_0x4c3241(0xe6)]||(_0x4402c3[_0x4c3241(0xe8)]===_0x481751[_0x4c3241(0xe8)]?0x0:_0x4402c3[_0x4c3241(0xe8)]===_0x4c3241(0x103)?-0x1:0x1))}))[_0x4c3241(0x105)]((_0x4e7323,_0x4d4ba7)=>_0x4e7323['userId']-_0x4d4ba7['userId']);}export function enrichAppListItemsWithMergedSelection(_0x1c9720,_0x246993){const _0x5e29a5=a23_0x21c9;if(!_0x246993)return;const _0x167436=_0x246993[_0x5e29a5(0xfe)]&&typeof _0x246993['apps']===_0x5e29a5(0xff)?_0x246993[_0x5e29a5(0xfe)]:{},_0x4b35c9=Object[_0x5e29a5(0xda)](_0x167436)[_0x5e29a5(0xde)]>0x0;for(const _0x5a2a5b of _0x1c9720){_0x5a2a5b['isCurrent']=![];}const _0x3ed03a=_0x246993[_0x5e29a5(0xe4)]!=null?String(_0x246993[_0x5e29a5(0xe4)])[_0x5e29a5(0xe1)]():'';if(_0x4b35c9){const _0x13f386=_0x246993[_0x5e29a5(0xeb)]??_0x246993[_0x5e29a5(0xd9)];if(_0x13f386)for(const _0xc0ae79 of _0x1c9720){_0xc0ae79[_0x5e29a5(0xd8)]===!![]&&_0xc0ae79[_0x5e29a5(0xf5)]===_0x13f386&&(_0xc0ae79[_0x5e29a5(0xe9)]=!![]);}for(const _0x386fcc of _0x1c9720){if(_0x386fcc[_0x5e29a5(0xd8)]!==![])continue;if(_0x246993[_0x5e29a5(0xd9)])continue;_0x3ed03a&&String(_0x386fcc[_0x5e29a5(0x104)]??'')[_0x5e29a5(0xe1)]()===_0x3ed03a&&(_0x386fcc[_0x5e29a5(0xe9)]=!![]);}return;}if(!_0x3ed03a)return;for(const _0xc0adae of _0x1c9720){String(_0xc0adae['appcode']??'')[_0x5e29a5(0xe1)]()===_0x3ed03a&&(_0xc0adae[_0x5e29a5(0xe9)]=!![]);}}export function resolveAppScopeForWrite(_0x2b5e8b,_0x5c4546,_0x46b708){const _0x44c9e6=a23_0x21c9;if(_0x5c4546)return'global';const _0x16ac59=_0x46b708[_0x44c9e6(0xe5)][_0x44c9e6(0xfe)]&&typeof _0x46b708['projectConfig'][_0x44c9e6(0xfe)]==='object'?_0x46b708[_0x44c9e6(0xe5)][_0x44c9e6(0xfe)]:{},_0xb7f0c5=_0x46b708['globalConfig'][_0x44c9e6(0xfe)]&&typeof _0x46b708[_0x44c9e6(0xfb)]['apps']==='object'?_0x46b708[_0x44c9e6(0xfb)]['apps']:{};if(Object[_0x44c9e6(0xe2)]['hasOwnProperty'][_0x44c9e6(0xf1)](_0x16ac59,_0x2b5e8b))return'project';if(Object[_0x44c9e6(0xe2)]['hasOwnProperty'][_0x44c9e6(0xf1)](_0xb7f0c5,_0x2b5e8b))return _0x44c9e6(0xfd);return'project';}export function appDefinedIn(_0x5c418c,_0x184075,_0x44cf22){const _0x115a35=a23_0x21c9,_0x2aa910=Object[_0x115a35(0xe2)]['hasOwnProperty']['call'](_0x184075,_0x5c418c),_0x1737b7=Object['prototype'][_0x115a35(0xf0)][_0x115a35(0xf1)](_0x44cf22,_0x5c418c);if(_0x2aa910&&_0x1737b7)return'both';if(_0x1737b7)return _0x115a35(0xef);return'global';}export function resolveDefaultAppSource(_0x22beaa){const _0x30d9e9=a23_0x21c9,_0x5d48a1=_0x22beaa[_0x30d9e9(0xe5)]['apps']&&typeof _0x22beaa[_0x30d9e9(0xe5)][_0x30d9e9(0xfe)]===_0x30d9e9(0xff)?_0x22beaa['projectConfig'][_0x30d9e9(0xfe)]:{};if(_0x30d9e9(0xd9)in _0x22beaa[_0x30d9e9(0xe5)])return'project';if(Object[_0x30d9e9(0xda)](_0x5d48a1)[_0x30d9e9(0xde)]>0x0)return _0x30d9e9(0xef);if(Object[_0x30d9e9(0xda)](_0x22beaa[_0x30d9e9(0xe5)])[_0x30d9e9(0xde)]===0x0&&_0x22beaa['globalConfig'][_0x30d9e9(0xd9)])return _0x30d9e9(0xfd);return null;}export function getConfigPath(_0x46d1b7={}){const _0x5e2e8d=a23_0x21c9,_0x5ee53c=_0x46d1b7[_0x5e2e8d(0xfd)]?_0x5e2e8d(0xfd):_0x5e2e8d(0xef);return resolveWriteConfigPath(_0x5ee53c);}export function readConfig(_0x3c90ba={}){return readConfigFile(getConfigPath(_0x3c90ba));}export function writeConfig(_0x523b07,_0x2a4ad3={}){writeConfigFile(getConfigPath(_0x2a4ad3),_0x523b07);}export function scopeLabel(_0x145b74){const _0x13aac1=a23_0x21c9;return _0x145b74[_0x13aac1(0xfd)]?'\x20(global)':'';}
@@ -1 +1 @@
1
- const a24_0x4b6c59=a24_0x28bb;(function(_0x4560f9,_0x26c55f){const _0x253841=a24_0x28bb,_0x89e678=_0x4560f9();while(!![]){try{const _0x3fc2c7=parseInt(_0x253841(0x92))/0x1+-parseInt(_0x253841(0x98))/0x2*(parseInt(_0x253841(0xaa))/0x3)+-parseInt(_0x253841(0xa2))/0x4*(-parseInt(_0x253841(0xa9))/0x5)+-parseInt(_0x253841(0xa6))/0x6+parseInt(_0x253841(0x99))/0x7*(-parseInt(_0x253841(0x9e))/0x8)+-parseInt(_0x253841(0x95))/0x9*(-parseInt(_0x253841(0x9b))/0xa)+parseInt(_0x253841(0x9c))/0xb;if(_0x3fc2c7===_0x26c55f)break;else _0x89e678['push'](_0x89e678['shift']());}catch(_0x2bab4e){_0x89e678['push'](_0x89e678['shift']());}}}(a24_0x51a7,0x72da2));function a24_0x51a7(){const _0x3146bd=['high-risk-write','isFinite','949257RriRdZ',',\x20appCode=','delete','836SVQYYm','4116189ZBxtqE','Delete\x20one\x20runtime\x20app-config\x20key','50bvjDyc','2056692vrpKnx','apiError','8pQvBTl','/smartapi/app-config/delete','appCode','validation','2644AYXYHo','App\x20config\x20key\x20not\x20found:\x20','number','App\x20config\x20server\x20id\x20missing\x20for\x20key=','2241324OXgXFv','app-config','get','2190qvHEch','165oonTdZ','451150niaGXh'];a24_0x51a7=function(){return _0x3146bd;};return a24_0x51a7();}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_0x28bb(_0x4a4d6b,_0x2f3eea){_0x4a4d6b=_0x4a4d6b-0x92;const _0x51a709=a24_0x51a7();let _0x28bb4c=_0x51a709[_0x4a4d6b];return _0x28bb4c;}const DELETE_PATH=a24_0x4b6c59(0x9f);export const appConfigDelete={'service':a24_0x4b6c59(0xa7),'command':a24_0x4b6c59(0x97),'description':a24_0x4b6c59(0x9a),'risk':a24_0x4b6c59(0x93),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1542a7){readKeyArg(_0x1542a7);},async 'dryRun'(_0x32baf4){const _0x41a099=a24_0x4b6c59,_0x4c4306=readKeyArg(_0x32baf4),_0x2fe05d=await mustGetByKey(_0x32baf4['appCode'],_0x4c4306);return asAppConfigDryRunResult(buildMutationData({'operation':_0x41a099(0x97),'appCode':_0x32baf4['appCode'],'key':_0x4c4306,'before':projectAppConfig(_0x2fe05d),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x468a29){const _0x2f0d13=a24_0x4b6c59,_0x588cb5=readKeyArg(_0x468a29),_0x2f6b3e=await mustGetByKey(_0x468a29[_0x2f0d13(0xa0)],_0x588cb5);return await withAppConfigApiBoundary(_0x2f0d13(0x97),{'appCode':_0x468a29[_0x2f0d13(0xa0)],'key':_0x588cb5},()=>deleteAppConfig({'appCode':_0x468a29[_0x2f0d13(0xa0)],'id':requireAppConfigId(_0x2f6b3e,_0x588cb5,_0x468a29[_0x2f0d13(0xa0)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x468a29[_0x2f0d13(0xa0)],'key':_0x588cb5,'before':projectAppConfig(_0x2f6b3e),'after':null,'dryRun':![]}),'message':'Deleted\x20app\x20config\x20'+_0x588cb5};}};async function mustGetByKey(_0x356320,_0x59949b){const _0x1703a3=a24_0x4b6c59,_0x308e97=await withAppConfigApiBoundary(_0x1703a3(0xa8),{'appCode':_0x356320,'key':_0x59949b},()=>getAppConfigByKey(_0x356320,_0x59949b));if(!_0x308e97)throw CliErrors[_0x1703a3(0xa1)](_0x1703a3(0xa3)+_0x59949b,'appCode:\x20'+_0x356320);return _0x308e97;}function requireAppConfigId(_0x329a3f,_0xd7f0d8,_0x420fe6){const _0x22f5b9=a24_0x4b6c59;if(typeof _0x329a3f['id']===_0x22f5b9(0xa4)&&Number[_0x22f5b9(0x94)](_0x329a3f['id'])&&_0x329a3f['id']>0x0)return _0x329a3f['id'];throw CliErrors[_0x22f5b9(0x9d)](_0x22f5b9(0xa5)+_0xd7f0d8+_0x22f5b9(0x96)+_0x420fe6);}
1
+ const a24_0x45578a=a24_0x2963;(function(_0xce5f68,_0x302809){const _0x5e5e45=a24_0x2963,_0x5ed367=_0xce5f68();while(!![]){try{const _0x12f2d7=-parseInt(_0x5e5e45(0x193))/0x1+-parseInt(_0x5e5e45(0x18e))/0x2*(-parseInt(_0x5e5e45(0x191))/0x3)+parseInt(_0x5e5e45(0x187))/0x4+parseInt(_0x5e5e45(0x185))/0x5+-parseInt(_0x5e5e45(0x192))/0x6+-parseInt(_0x5e5e45(0x17f))/0x7+parseInt(_0x5e5e45(0x181))/0x8*(parseInt(_0x5e5e45(0x190))/0x9);if(_0x12f2d7===_0x302809)break;else _0x5ed367['push'](_0x5ed367['shift']());}catch(_0x21458f){_0x5ed367['push'](_0x5ed367['shift']());}}}(a24_0x5d7a,0x3a8f5));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0x2963(_0x2a80ad,_0x52c70a){_0x2a80ad=_0x2a80ad-0x17f;const _0x5d7a8e=a24_0x5d7a();let _0x2963f2=_0x5d7a8e[_0x2a80ad];return _0x2963f2;}import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x45578a(0x18b);export const appConfigDelete={'service':a24_0x45578a(0x184),'command':a24_0x45578a(0x18d),'description':a24_0x45578a(0x18f),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x30de09){readKeyArg(_0x30de09);},async 'dryRun'(_0x388ba7){const _0x233230=a24_0x45578a,_0x3e6505=readKeyArg(_0x388ba7),_0x560861=await mustGetByKey(_0x388ba7[_0x233230(0x195)],_0x3e6505);return asAppConfigDryRunResult(buildMutationData({'operation':_0x233230(0x18d),'appCode':_0x388ba7[_0x233230(0x195)],'key':_0x3e6505,'before':projectAppConfig(_0x560861),'after':null,'dryRun':!![]}),{'method':_0x233230(0x194),'url':DELETE_PATH});},async 'execute'(_0x576e57){const _0x4e97ce=a24_0x45578a,_0x349e69=readKeyArg(_0x576e57),_0x3b7a8f=await mustGetByKey(_0x576e57[_0x4e97ce(0x195)],_0x349e69);return await withAppConfigApiBoundary(_0x4e97ce(0x18d),{'appCode':_0x576e57[_0x4e97ce(0x195)],'key':_0x349e69},()=>deleteAppConfig({'appCode':_0x576e57[_0x4e97ce(0x195)],'id':requireAppConfigId(_0x3b7a8f,_0x349e69,_0x576e57[_0x4e97ce(0x195)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x576e57[_0x4e97ce(0x195)],'key':_0x349e69,'before':projectAppConfig(_0x3b7a8f),'after':null,'dryRun':![]}),'message':_0x4e97ce(0x196)+_0x349e69};}};async function mustGetByKey(_0x3a695,_0x4a07c8){const _0x374c65=a24_0x45578a,_0x5f48e4=await withAppConfigApiBoundary('get',{'appCode':_0x3a695,'key':_0x4a07c8},()=>getAppConfigByKey(_0x3a695,_0x4a07c8));if(!_0x5f48e4)throw CliErrors[_0x374c65(0x183)](_0x374c65(0x18a)+_0x4a07c8,_0x374c65(0x188)+_0x3a695);return _0x5f48e4;}function a24_0x5d7a(){const _0x3e160b=['2245278biacpV','apiError','80IYCAGX',',\x20appCode=','validation','app-config','162715lZGsvw','App\x20config\x20server\x20id\x20missing\x20for\x20key=','1551156GMPTPF','appCode:\x20','number','App\x20config\x20key\x20not\x20found:\x20','/smartapi/app-config/delete','isFinite','delete','322YfDEpF','Delete\x20one\x20runtime\x20app-config\x20key','447075URBkib','5994ekjtrs','2024418RFRDCu','340742DtJiWP','POST','appCode','Deleted\x20app\x20config\x20'];a24_0x5d7a=function(){return _0x3e160b;};return a24_0x5d7a();}function requireAppConfigId(_0x4735f1,_0x58f704,_0x476c05){const _0x3eb6de=a24_0x45578a;if(typeof _0x4735f1['id']===_0x3eb6de(0x189)&&Number[_0x3eb6de(0x18c)](_0x4735f1['id'])&&_0x4735f1['id']>0x0)return _0x4735f1['id'];throw CliErrors[_0x3eb6de(0x180)](_0x3eb6de(0x186)+_0x58f704+_0x3eb6de(0x182)+_0x476c05);}
@@ -1 +1 @@
1
- const a25_0x20a0a8=a25_0x36bf;(function(_0x4186a5,_0x4a6090){const _0x45e4cb=a25_0x36bf,_0x1f1854=_0x4186a5();while(!![]){try{const _0x3bd278=parseInt(_0x45e4cb(0x131))/0x1+-parseInt(_0x45e4cb(0x135))/0x2*(parseInt(_0x45e4cb(0x145))/0x3)+parseInt(_0x45e4cb(0x141))/0x4*(parseInt(_0x45e4cb(0x13f))/0x5)+-parseInt(_0x45e4cb(0x132))/0x6+-parseInt(_0x45e4cb(0x140))/0x7+parseInt(_0x45e4cb(0x139))/0x8+parseInt(_0x45e4cb(0x137))/0x9;if(_0x3bd278===_0x4a6090)break;else _0x1f1854['push'](_0x1f1854['shift']());}catch(_0x4d66c7){_0x1f1854['push'](_0x1f1854['shift']());}}}(a25_0x581d,0xb0cae));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a25_0x36bf(_0x2a732b,_0x1b7029){_0x2a732b=_0x2a732b-0x131;const _0x581db5=a25_0x581d();let _0x36bfb0=_0x581db5[_0x2a732b];return _0x36bfb0;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x20a0a8(0x133),'command':'get','description':a25_0x20a0a8(0x144),'risk':a25_0x20a0a8(0x13b),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x2bc5b1){readKeyArg(_0x2bc5b1);},async 'execute'(_0xdffe12){const _0x5d4610=a25_0x20a0a8,_0x13f005=readKeyArg(_0xdffe12),_0x292b9f=await withAppConfigApiBoundary('get',{'appCode':_0xdffe12[_0x5d4610(0x134)],'key':_0x13f005},()=>getAppConfigByKey(_0xdffe12[_0x5d4610(0x134)],_0x13f005));if(!_0x292b9f)throw CliErrors[_0x5d4610(0x142)](_0x5d4610(0x13e)+_0x13f005,_0x5d4610(0x13d)+_0xdffe12[_0x5d4610(0x134)]);const _0x39bd66=projectAppConfig(_0x292b9f,{'reveal':_0xdffe12['bool'](_0x5d4610(0x143))});return{'ok':!![],'data':{'config':_0x39bd66},'message':_0xdffe12[_0x5d4610(0x136)](_0x5d4610(0x143))?_0x5d4610(0x13c)+_0x13f005+_0x5d4610(0x138):'Loaded\x20app\x20config\x20'+_0x13f005+_0x5d4610(0x13a)};}};function a25_0x581d(){const _0x48131a=['bool','22123233DcKdXU','\x20with\x20value\x20revealed','3237912mPWqOg','\x20with\x20value\x20redacted','read','Loaded\x20app\x20config\x20','appCode:\x20','App\x20config\x20key\x20not\x20found:\x20','5BmAVqS','7905135WvaVIk','248656VftgYx','validation','reveal','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','2931SxfJFi','912188uZgLPx','6087582DIpWNC','app-config','appCode','1984UyKdXO'];a25_0x581d=function(){return _0x48131a;};return a25_0x581d();}
1
+ const a25_0x5d0546=a25_0x1e51;(function(_0x397cae,_0x298420){const _0x4f89b9=a25_0x1e51,_0x37fa40=_0x397cae();while(!![]){try{const _0x1065d8=-parseInt(_0x4f89b9(0x17b))/0x1*(parseInt(_0x4f89b9(0x18a))/0x2)+parseInt(_0x4f89b9(0x186))/0x3+parseInt(_0x4f89b9(0x185))/0x4*(-parseInt(_0x4f89b9(0x17e))/0x5)+-parseInt(_0x4f89b9(0x182))/0x6*(-parseInt(_0x4f89b9(0x179))/0x7)+-parseInt(_0x4f89b9(0x183))/0x8+-parseInt(_0x4f89b9(0x17a))/0x9*(-parseInt(_0x4f89b9(0x177))/0xa)+-parseInt(_0x4f89b9(0x184))/0xb;if(_0x1065d8===_0x298420)break;else _0x37fa40['push'](_0x37fa40['shift']());}catch(_0x1996b5){_0x37fa40['push'](_0x37fa40['shift']());}}}(a25_0x4d0a,0x870d6));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a25_0x1e51(_0x1daf28,_0x57f14a){_0x1daf28=_0x1daf28-0x175;const _0x4d0a94=a25_0x4d0a();let _0x1e5174=_0x4d0a94[_0x1daf28];return _0x1e5174;}function a25_0x4d0a(){const _0x4f1fdb=['appCode:\x20','6JquAoa','7643576tlSjOR','6035029GzzfHK','32NYMgpu','2986614ICPQLg','bool','reveal','app-config','1094974SIFOwx','validation','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','get','572180fkjrZN','read','4323851oiNemY','162sioSlA','1lobWuO','\x20with\x20value\x20revealed','appCode','24005MNXGgC','App\x20config\x20key\x20not\x20found:\x20','Loaded\x20app\x20config\x20'];a25_0x4d0a=function(){return _0x4f1fdb;};return a25_0x4d0a();}import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x5d0546(0x189),'command':a25_0x5d0546(0x176),'description':a25_0x5d0546(0x175),'risk':a25_0x5d0546(0x178),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x502ace){readKeyArg(_0x502ace);},async 'execute'(_0x5c9f78){const _0x48f7bd=a25_0x5d0546,_0x287abc=readKeyArg(_0x5c9f78),_0x493140=await withAppConfigApiBoundary(_0x48f7bd(0x176),{'appCode':_0x5c9f78[_0x48f7bd(0x17d)],'key':_0x287abc},()=>getAppConfigByKey(_0x5c9f78['appCode'],_0x287abc));if(!_0x493140)throw CliErrors[_0x48f7bd(0x18b)](_0x48f7bd(0x17f)+_0x287abc,_0x48f7bd(0x181)+_0x5c9f78[_0x48f7bd(0x17d)]);const _0x4a1300=projectAppConfig(_0x493140,{'reveal':_0x5c9f78[_0x48f7bd(0x187)](_0x48f7bd(0x188))});return{'ok':!![],'data':{'config':_0x4a1300},'message':_0x5c9f78[_0x48f7bd(0x187)](_0x48f7bd(0x188))?_0x48f7bd(0x180)+_0x287abc+_0x48f7bd(0x17c):_0x48f7bd(0x180)+_0x287abc+'\x20with\x20value\x20redacted'};}};
@@ -1 +1 @@
1
- function a26_0x5947(){const _0x4c22e9=['30TxTkXV','4108056keBTak','18092gBnjbh','6zQgfOF','1022910zdpeOl','1109101fCCTNg','719243WQxYbp','2007428Doczua','5275647kkakAZ'];a26_0x5947=function(){return _0x4c22e9;};return a26_0x5947();}(function(_0x461965,_0x24f972){const _0x40a4ce=a26_0x19b3,_0x4e9485=_0x461965();while(!![]){try{const _0x100a42=-parseInt(_0x40a4ce(0xfe))/0x1+parseInt(_0x40a4ce(0xfa))/0x2*(parseInt(_0x40a4ce(0xfb))/0x3)+parseInt(_0x40a4ce(0xff))/0x4+-parseInt(_0x40a4ce(0xfc))/0x5+-parseInt(_0x40a4ce(0xf8))/0x6*(-parseInt(_0x40a4ce(0xfd))/0x7)+-parseInt(_0x40a4ce(0xf9))/0x8+parseInt(_0x40a4ce(0x100))/0x9;if(_0x100a42===_0x24f972)break;else _0x4e9485['push'](_0x4e9485['shift']());}catch(_0x57af87){_0x4e9485['push'](_0x4e9485['shift']());}}}(a26_0x5947,0x708d7));function a26_0x19b3(_0x5e2cf3,_0x46dccf){_0x5e2cf3=_0x5e2cf3-0xf8;const _0x5947e0=a26_0x5947();let _0x19b3be=_0x5947e0[_0x5e2cf3];return _0x19b3be;}import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
1
+ (function(_0x526e3c,_0x64e39f){const _0x3126ca=a26_0x2b0a,_0x4cd087=_0x526e3c();while(!![]){try{const _0x4f015f=-parseInt(_0x3126ca(0x192))/0x1+-parseInt(_0x3126ca(0x190))/0x2+parseInt(_0x3126ca(0x18f))/0x3*(parseInt(_0x3126ca(0x18e))/0x4)+-parseInt(_0x3126ca(0x18c))/0x5+parseInt(_0x3126ca(0x18b))/0x6+parseInt(_0x3126ca(0x18a))/0x7*(-parseInt(_0x3126ca(0x191))/0x8)+parseInt(_0x3126ca(0x18d))/0x9;if(_0x4f015f===_0x64e39f)break;else _0x4cd087['push'](_0x4cd087['shift']());}catch(_0x57533d){_0x4cd087['push'](_0x4cd087['shift']());}}}(a26_0x1dab,0x3cb79));import{appConfigList}from'../../commands/app-config/list.js';function a26_0x1dab(){const _0x5930b1=['531qtVtdi','491738KWDYoc','896rYTiiu','177642SWjmXr','23730DiFnsC','2781102vVuNLq','1698170vXLoXv','7934679VGJGih','1048zcWKjZ'];a26_0x1dab=function(){return _0x5930b1;};return a26_0x1dab();}import{appConfigGet}from'../../commands/app-config/get.js';function a26_0x2b0a(_0x3b76bc,_0x30f590){_0x3b76bc=_0x3b76bc-0x18a;const _0x1dab97=a26_0x1dab();let _0x2b0a02=_0x1dab97[_0x3b76bc];return _0x2b0a02;}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_0x2ecc65=a27_0x2406;(function(_0x2096f0,_0x3b28c8){const _0x4c5d9d=a27_0x2406,_0x1e3a89=_0x2096f0();while(!![]){try{const _0xca3ae3=-parseInt(_0x4c5d9d(0x100))/0x1+parseInt(_0x4c5d9d(0x102))/0x2*(parseInt(_0x4c5d9d(0x10c))/0x3)+-parseInt(_0x4c5d9d(0xfb))/0x4*(-parseInt(_0x4c5d9d(0x10a))/0x5)+parseInt(_0x4c5d9d(0x101))/0x6+-parseInt(_0x4c5d9d(0x105))/0x7+-parseInt(_0x4c5d9d(0x10e))/0x8*(parseInt(_0x4c5d9d(0x109))/0x9)+-parseInt(_0x4c5d9d(0x10d))/0xa;if(_0xca3ae3===_0x3b28c8)break;else _0x1e3a89['push'](_0x1e3a89['shift']());}catch(_0xe759db){_0x1e3a89['push'](_0x1e3a89['shift']());}}}(a27_0x225d,0x7f679));function a27_0x225d(){const _0x422c9d=['762LazMfw','app-config','Found\x20','3500763HRNAtJ','string','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','length','207gCMObb','414985QFrTlY','trim','5361gqgWTK','2396000oXrmIR','15856eYgUqC','list','\x20app\x20config(s)','read','24NfFqLh','str','key','map','appCode','572148UNLOmm','4202778igADNQ'];a27_0x225d=function(){return _0x422c9d;};return a27_0x225d();}function a27_0x2406(_0x1950ed,_0x369583){_0x1950ed=_0x1950ed-0xf9;const _0x225db7=a27_0x225d();let _0x240622=_0x225db7[_0x1950ed];return _0x240622;}import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x2ecc65(0x103),'command':'list','description':a27_0x2ecc65(0x107),'risk':a27_0x2ecc65(0xfa),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x2ecc65(0xfd),'type':a27_0x2ecc65(0x106),'description':'Filter\x20by\x20exact\x20config\x20key'},TAGS_FLAG],async 'validate'(_0x4d89fe){const _0x25b03e=a27_0x2ecc65,_0x10684e=_0x4d89fe[_0x25b03e(0xfc)](_0x25b03e(0xfd))['trim']();if(_0x10684e)validateKey(_0x10684e);readOptionalTags(_0x4d89fe);},async 'execute'(_0x2f9479){const _0x468e62=a27_0x2ecc65,_0x5b8a86=_0x2f9479[_0x468e62(0xfc)]('key')[_0x468e62(0x10b)]()||undefined,_0x31c268=readOptionalTags(_0x2f9479),_0x46c79d=await withAppConfigApiBoundary(_0x468e62(0x10f),{'appCode':_0x2f9479[_0x468e62(0xff)]},()=>listAppConfigs(_0x2f9479[_0x468e62(0xff)],{'key':_0x5b8a86,'tags':_0x31c268})),_0x56f651=_0x46c79d[_0x468e62(0xfe)](_0x379899=>projectAppConfig(_0x379899));return{'ok':!![],'data':{'appCode':_0x2f9479[_0x468e62(0xff)],'count':_0x56f651[_0x468e62(0x108)],'configs':_0x56f651},'message':_0x468e62(0x104)+_0x56f651[_0x468e62(0x108)]+_0x468e62(0xf9)};}};
1
+ const a27_0x3f4169=a27_0x6539;(function(_0x3a54a1,_0x20c430){const _0x43b10b=a27_0x6539,_0x230f0d=_0x3a54a1();while(!![]){try{const _0x337e72=-parseInt(_0x43b10b(0x19b))/0x1*(parseInt(_0x43b10b(0x198))/0x2)+-parseInt(_0x43b10b(0x19e))/0x3+parseInt(_0x43b10b(0x18d))/0x4*(-parseInt(_0x43b10b(0x197))/0x5)+-parseInt(_0x43b10b(0x18f))/0x6+-parseInt(_0x43b10b(0x18b))/0x7*(-parseInt(_0x43b10b(0x195))/0x8)+parseInt(_0x43b10b(0x196))/0x9+-parseInt(_0x43b10b(0x19c))/0xa*(-parseInt(_0x43b10b(0x18c))/0xb);if(_0x337e72===_0x20c430)break;else _0x230f0d['push'](_0x230f0d['shift']());}catch(_0x1143e0){_0x230f0d['push'](_0x230f0d['shift']());}}}(a27_0x5635,0x8ffbc));import{listAppConfigs}from'../../core/api-client.js';function a27_0x6539(_0x503092,_0x1743da){_0x503092=_0x503092-0x189;const _0x563526=a27_0x5635();let _0x653915=_0x563526[_0x503092];return _0x653915;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':'app-config','command':'list','description':a27_0x3f4169(0x19f),'risk':a27_0x3f4169(0x19a),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x3f4169(0x191),'type':a27_0x3f4169(0x18e),'description':a27_0x3f4169(0x199)},TAGS_FLAG],async 'validate'(_0x21eca2){const _0x3123e9=a27_0x3f4169,_0x3a26a3=_0x21eca2[_0x3123e9(0x193)]('key')[_0x3123e9(0x18a)]();if(_0x3a26a3)validateKey(_0x3a26a3);readOptionalTags(_0x21eca2);},async 'execute'(_0x312c5e){const _0xe865a4=a27_0x3f4169,_0x41b3d2=_0x312c5e[_0xe865a4(0x193)](_0xe865a4(0x191))[_0xe865a4(0x18a)]()||undefined,_0x9e270d=readOptionalTags(_0x312c5e),_0x53d6f0=await withAppConfigApiBoundary(_0xe865a4(0x1a0),{'appCode':_0x312c5e[_0xe865a4(0x189)]},()=>listAppConfigs(_0x312c5e[_0xe865a4(0x189)],{'key':_0x41b3d2,'tags':_0x9e270d})),_0x3c2458=_0x53d6f0[_0xe865a4(0x192)](_0x53e756=>projectAppConfig(_0x53e756));return{'ok':!![],'data':{'appCode':_0x312c5e['appCode'],'count':_0x3c2458[_0xe865a4(0x19d)],'configs':_0x3c2458},'message':_0xe865a4(0x194)+_0x3c2458[_0xe865a4(0x19d)]+_0xe865a4(0x190)};}};function a27_0x5635(){const _0x2e03c7=['list','appCode','trim','1075557PrVfzn','744689DWrcxZ','160ttcFpH','string','3194538dRfkZq','\x20app\x20config(s)','key','map','str','Found\x20','8yppDln','6401592yzlxIn','108925hygoBF','73442jWdQTg','Filter\x20by\x20exact\x20config\x20key','read','26xvaBRy','310TBATSq','length','45849NehnJH','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values'];a27_0x5635=function(){return _0x2e03c7;};return a27_0x5635();}
@@ -1 +1 @@
1
- const a28_0x28cd20=a28_0x5472;function a28_0x5472(_0x4857aa,_0x17486c){_0x4857aa=_0x4857aa-0xe3;const _0x239ca0=a28_0x239c();let _0x547272=_0x239ca0[_0x4857aa];return _0x547272;}(function(_0x99d73c,_0x3b1a0c){const _0xe8a74=a28_0x5472,_0x419aa8=_0x99d73c();while(!![]){try{const _0x5ac901=parseInt(_0xe8a74(0xf4))/0x1*(-parseInt(_0xe8a74(0xe5))/0x2)+-parseInt(_0xe8a74(0xe7))/0x3+parseInt(_0xe8a74(0xe6))/0x4*(parseInt(_0xe8a74(0xfd))/0x5)+parseInt(_0xe8a74(0xf8))/0x6+parseInt(_0xe8a74(0xfe))/0x7+-parseInt(_0xe8a74(0xea))/0x8+-parseInt(_0xe8a74(0xec))/0x9;if(_0x5ac901===_0x3b1a0c)break;else _0x419aa8['push'](_0x419aa8['shift']());}catch(_0x3792f7){_0x419aa8['push'](_0x419aa8['shift']());}}}(a28_0x239c,0x62200));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_0x239c(){const _0x30542f=['get','37405nWSbVA','5029920sIhoDY','tags','app-config','App\x20config\x20server\x20id\x20missing\x20for\x20key=','15076sSBYRw','356LkJBba','367575TDxlSd','Read\x20config\x20value\x20from\x20file','apiError','5829456XhiVMo','file','2759886mQUjjp','/smartapi/app-config/update','\x20app\x20config\x20','Updated','isFinite','update','string','set','75fAMsBc','create','appCode','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','4444572PbGskZ',',\x20appCode=','number','write'];a28_0x239c=function(){return _0x30542f;};return a28_0x239c();}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_0x28cd20(0xed);export const appConfigSet={'service':a28_0x28cd20(0xe3),'command':a28_0x28cd20(0xf3),'description':a28_0x28cd20(0xf7),'risk':a28_0x28cd20(0xfb),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x28cd20(0xeb),'type':a28_0x28cd20(0xf2),'description':a28_0x28cd20(0xe8)}],async 'validate'(_0x52dfa9){readKeyArg(_0x52dfa9),readOptionalTags(_0x52dfa9),assertSingleValueSource(_0x52dfa9);},async 'dryRun'(_0x57fd35){const _0x1035b0=a28_0x28cd20,_0x1ab126=readKeyArg(_0x57fd35),_0x18b4cb=readOptionalTags(_0x57fd35),_0x4ded04=assertSingleValueSource(_0x57fd35);await assertValueSourceReadable(_0x4ded04);const _0x2d250e=await withAppConfigApiBoundary('get',{'appCode':_0x57fd35['appCode'],'key':_0x1ab126},()=>getAppConfigByKey(_0x57fd35[_0x1035b0(0xf6)],_0x1ab126)),_0x7b40e=_0x2d250e?_0x1035b0(0xf1):_0x1035b0(0xf5),_0x4a9247=_0x2d250e?projectAppConfig(_0x2d250e):null,_0xf953f8=plannedAppConfig({'appCode':_0x57fd35[_0x1035b0(0xf6)],'key':_0x1ab126,'tags':_0x18b4cb??_0x2d250e?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x7b40e,'appCode':_0x57fd35[_0x1035b0(0xf6)],'key':_0x1ab126,'before':_0x4a9247,'after':_0xf953f8,'dryRun':!![]}),{'method':'POST','url':_0x7b40e===_0x1035b0(0xf1)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x1bd52b){const _0x1ec6be=a28_0x28cd20,_0x5d1f0b=readKeyArg(_0x1bd52b),_0x5c1d8f=readOptionalTags(_0x1bd52b),_0x59a5c5=await withAppConfigApiBoundary('get',{'appCode':_0x1bd52b[_0x1ec6be(0xf6)],'key':_0x5d1f0b},()=>getAppConfigByKey(_0x1bd52b[_0x1ec6be(0xf6)],_0x5d1f0b)),_0x2af6ff=_0x59a5c5?projectAppConfig(_0x59a5c5):null,_0x20a9ab=_0x59a5c5?_0x1ec6be(0xf1):_0x1ec6be(0xf5),{value:_0x5bd613,warnings:_0x133848}=await readAppConfigValue(_0x1bd52b),_0x528bc8={'appCode':_0x1bd52b['appCode'],'key':_0x5d1f0b,'value':_0x5bd613,'tags':_0x5c1d8f??_0x59a5c5?.[_0x1ec6be(0xff)]??undefined};await withAppConfigApiBoundary(_0x20a9ab,{'appCode':_0x1bd52b[_0x1ec6be(0xf6)],'key':_0x5d1f0b},async()=>{const _0x146caa=_0x1ec6be;_0x59a5c5?await updateAppConfig({..._0x528bc8,'id':requireAppConfigId(_0x59a5c5,_0x5d1f0b,_0x1bd52b[_0x146caa(0xf6)])}):await createAppConfig(_0x528bc8);});const _0xbe96ff=await withAppConfigApiBoundary(_0x1ec6be(0xfc),{'appCode':_0x1bd52b[_0x1ec6be(0xf6)],'key':_0x5d1f0b},()=>getAppConfigByKey(_0x1bd52b[_0x1ec6be(0xf6)],_0x5d1f0b)),_0x4f63be=_0xbe96ff?projectAppConfig(_0xbe96ff):plannedAppConfig({'appCode':_0x1bd52b[_0x1ec6be(0xf6)],'key':_0x5d1f0b,'tags':_0x528bc8[_0x1ec6be(0xff)],'hasValue':_0x5bd613!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x20a9ab,'appCode':_0x1bd52b[_0x1ec6be(0xf6)],'key':_0x5d1f0b,'before':_0x2af6ff,'after':_0x4f63be,'dryRun':![],'warnings':_0x133848}),'message':(_0x20a9ab==='update'?_0x1ec6be(0xef):'Created')+_0x1ec6be(0xee)+_0x5d1f0b};}};function requireAppConfigId(_0x2c5bcc,_0x2f2e0f,_0xa4cd3d){const _0x2c97b0=a28_0x28cd20;if(typeof _0x2c5bcc['id']===_0x2c97b0(0xfa)&&Number[_0x2c97b0(0xf0)](_0x2c5bcc['id'])&&_0x2c5bcc['id']>0x0)return _0x2c5bcc['id'];throw CliErrors[_0x2c97b0(0xe9)](_0x2c97b0(0xe4)+_0x2f2e0f+_0x2c97b0(0xf9)+_0xa4cd3d);}
1
+ const a28_0xdef08=a28_0x273e;(function(_0x33ef74,_0x4e7328){const _0x3a9ff9=a28_0x273e,_0x415f41=_0x33ef74();while(!![]){try{const _0x513303=-parseInt(_0x3a9ff9(0x184))/0x1*(-parseInt(_0x3a9ff9(0x16a))/0x2)+-parseInt(_0x3a9ff9(0x181))/0x3+parseInt(_0x3a9ff9(0x17d))/0x4*(-parseInt(_0x3a9ff9(0x17c))/0x5)+-parseInt(_0x3a9ff9(0x17e))/0x6+parseInt(_0x3a9ff9(0x172))/0x7+parseInt(_0x3a9ff9(0x176))/0x8+parseInt(_0x3a9ff9(0x178))/0x9;if(_0x513303===_0x4e7328)break;else _0x415f41['push'](_0x415f41['shift']());}catch(_0x37b844){_0x415f41['push'](_0x415f41['shift']());}}}(a28_0x2c17,0x8f525));function a28_0x2c17(){const _0x874de4=['2649640ZUiDCU','number','3108222fbwSUB','create','app-config','get','1599355Wklisy','4LCPYkx','976596iSrAdF','string','\x20app\x20config\x20','2169618WSJtWt','set',',\x20appCode=','188rTslFe','tags','426zxCBUv','update','POST','/smartapi/app-config/create','appCode','isFinite','Read\x20config\x20value\x20from\x20file','file','7533967HNvuvX','apiError','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','App\x20config\x20server\x20id\x20missing\x20for\x20key='];a28_0x2c17=function(){return _0x874de4;};return a28_0x2c17();}function a28_0x273e(_0x32ca97,_0x45319f){_0x32ca97=_0x32ca97-0x169;const _0x2c17f3=a28_0x2c17();let _0x273e45=_0x2c17f3[_0x32ca97];return _0x273e45;}import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0xdef08(0x16d),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0xdef08(0x17a),'command':a28_0xdef08(0x182),'description':a28_0xdef08(0x174),'risk':'write','args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0xdef08(0x171),'type':a28_0xdef08(0x17f),'description':a28_0xdef08(0x170)}],async 'validate'(_0x4bffd7){readKeyArg(_0x4bffd7),readOptionalTags(_0x4bffd7),assertSingleValueSource(_0x4bffd7);},async 'dryRun'(_0xf75de){const _0x37b8ef=a28_0xdef08,_0x4fd7a5=readKeyArg(_0xf75de),_0x3d8219=readOptionalTags(_0xf75de),_0x365fe0=assertSingleValueSource(_0xf75de);await assertValueSourceReadable(_0x365fe0);const _0x8c30ed=await withAppConfigApiBoundary(_0x37b8ef(0x17b),{'appCode':_0xf75de[_0x37b8ef(0x16e)],'key':_0x4fd7a5},()=>getAppConfigByKey(_0xf75de[_0x37b8ef(0x16e)],_0x4fd7a5)),_0x37189c=_0x8c30ed?_0x37b8ef(0x16b):_0x37b8ef(0x179),_0x393cdf=_0x8c30ed?projectAppConfig(_0x8c30ed):null,_0x40c6ff=plannedAppConfig({'appCode':_0xf75de[_0x37b8ef(0x16e)],'key':_0x4fd7a5,'tags':_0x3d8219??_0x8c30ed?.[_0x37b8ef(0x169)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x37189c,'appCode':_0xf75de['appCode'],'key':_0x4fd7a5,'before':_0x393cdf,'after':_0x40c6ff,'dryRun':!![]}),{'method':_0x37b8ef(0x16c),'url':_0x37189c===_0x37b8ef(0x16b)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x4a7257){const _0x239a4b=a28_0xdef08,_0x45981b=readKeyArg(_0x4a7257),_0x567bc6=readOptionalTags(_0x4a7257),_0x3bb5fb=await withAppConfigApiBoundary(_0x239a4b(0x17b),{'appCode':_0x4a7257['appCode'],'key':_0x45981b},()=>getAppConfigByKey(_0x4a7257[_0x239a4b(0x16e)],_0x45981b)),_0x1bdd46=_0x3bb5fb?projectAppConfig(_0x3bb5fb):null,_0x392191=_0x3bb5fb?_0x239a4b(0x16b):'create',{value:_0x148598,warnings:_0x4f1136}=await readAppConfigValue(_0x4a7257),_0x12fada={'appCode':_0x4a7257[_0x239a4b(0x16e)],'key':_0x45981b,'value':_0x148598,'tags':_0x567bc6??_0x3bb5fb?.['tags']??undefined};await withAppConfigApiBoundary(_0x392191,{'appCode':_0x4a7257['appCode'],'key':_0x45981b},async()=>{const _0x42c57a=_0x239a4b;_0x3bb5fb?await updateAppConfig({..._0x12fada,'id':requireAppConfigId(_0x3bb5fb,_0x45981b,_0x4a7257[_0x42c57a(0x16e)])}):await createAppConfig(_0x12fada);});const _0x254ec5=await withAppConfigApiBoundary(_0x239a4b(0x17b),{'appCode':_0x4a7257['appCode'],'key':_0x45981b},()=>getAppConfigByKey(_0x4a7257['appCode'],_0x45981b)),_0x4a4e24=_0x254ec5?projectAppConfig(_0x254ec5):plannedAppConfig({'appCode':_0x4a7257[_0x239a4b(0x16e)],'key':_0x45981b,'tags':_0x12fada[_0x239a4b(0x169)],'hasValue':_0x148598!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x392191,'appCode':_0x4a7257[_0x239a4b(0x16e)],'key':_0x45981b,'before':_0x1bdd46,'after':_0x4a4e24,'dryRun':![],'warnings':_0x4f1136}),'message':(_0x392191===_0x239a4b(0x16b)?'Updated':'Created')+_0x239a4b(0x180)+_0x45981b};}};function requireAppConfigId(_0x40a903,_0x361b46,_0x2eaf64){const _0x302434=a28_0xdef08;if(typeof _0x40a903['id']===_0x302434(0x177)&&Number[_0x302434(0x16f)](_0x40a903['id'])&&_0x40a903['id']>0x0)return _0x40a903['id'];throw CliErrors[_0x302434(0x173)](_0x302434(0x175)+_0x361b46+_0x302434(0x183)+_0x2eaf64);}
@@ -1 +1 @@
1
- const a29_0x1b2bd3=a29_0x2edc;(function(_0x5d878,_0x1f435a){const _0xaba202=a29_0x2edc,_0xf2b7f3=_0x5d878();while(!![]){try{const _0x1f33a9=-parseInt(_0xaba202(0x1bb))/0x1*(parseInt(_0xaba202(0x1df))/0x2)+parseInt(_0xaba202(0x1cc))/0x3+parseInt(_0xaba202(0x1bd))/0x4+-parseInt(_0xaba202(0x1c6))/0x5*(-parseInt(_0xaba202(0x1c0))/0x6)+-parseInt(_0xaba202(0x1dc))/0x7*(-parseInt(_0xaba202(0x1a5))/0x8)+parseInt(_0xaba202(0x1d0))/0x9+-parseInt(_0xaba202(0x1a7))/0xa;if(_0x1f33a9===_0x1f435a)break;else _0xf2b7f3['push'](_0xf2b7f3['shift']());}catch(_0x101115){_0xf2b7f3['push'](_0xf2b7f3['shift']());}}}(a29_0x401d,0xc6f29));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x1b2bd3(0x1b4),'description':a29_0x1b2bd3(0x1c4),'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_0x1b2bd3(0x1c9),'type':a29_0x1b2bd3(0x1d5),'description':a29_0x1b2bd3(0x1b8)};export const STDIN_FLAG={'name':'stdin','type':a29_0x1b2bd3(0x1b9),'description':a29_0x1b2bd3(0x1b1),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x1b2bd3(0x1d9),'type':'string','description':a29_0x1b2bd3(0x1cb)};export const REVEAL_FLAG={'name':'reveal','type':a29_0x1b2bd3(0x1b9),'description':a29_0x1b2bd3(0x1cd),'default':![]};export function readKeyArg(_0x4a4a3f){const _0x39125b=a29_0x1b2bd3,_0x12d093=_0x4a4a3f[_0x39125b(0x1ae)][0x0]?.[_0x39125b(0x1af)]()??'';return validateKey(_0x12d093),_0x12d093;}export function readOptionalTags(_0x25675a){const _0x2b74f4=a29_0x1b2bd3,_0x485c93=_0x25675a[_0x2b74f4(0x1bc)]('tags')[_0x2b74f4(0x1af)]();if(!_0x485c93)return undefined;if(_0x485c93[_0x2b74f4(0x1da)]>0x20)throw CliErrors['validation'](_0x2b74f4(0x1b3));return _0x485c93;}export function validateKey(_0x2b7da3){const _0xcc603b=a29_0x1b2bd3;if(!_0x2b7da3)throw CliErrors[_0xcc603b(0x1ca)](_0xcc603b(0x1b0));if(_0x2b7da3[_0xcc603b(0x1da)]>0x100)throw CliErrors[_0xcc603b(0x1ca)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x5d2868,_0x4bfd14){const _0x1aa382=a29_0x1b2bd3,_0x30b738=_0x5d2868[_0x1aa382(0x1aa)]!==undefined&&_0x5d2868['value']!==null&&_0x5d2868[_0x1aa382(0x1aa)]!=='',_0x2d6f8d={'appCode':_0x5d2868['appCode'],'key':_0x5d2868[_0x1aa382(0x1b4)],'tags':_0x5d2868[_0x1aa382(0x1c9)]??undefined,'hasValue':_0x30b738,'valueRedacted':_0x30b738&&!_0x4bfd14?.[_0x1aa382(0x1a9)],'gmtCreate':_0x5d2868[_0x1aa382(0x1a2)],'gmtModified':_0x5d2868['gmtModified']};return _0x4bfd14?.[_0x1aa382(0x1a9)]&&(_0x2d6f8d[_0x1aa382(0x1aa)]=_0x5d2868[_0x1aa382(0x1aa)]??'',_0x2d6f8d[_0x1aa382(0x1cf)]=![]),_0x2d6f8d;}function a29_0x2edc(_0x2408cf,_0x4b0732){_0x2408cf=_0x2408cf-0x1a1;const _0x401d4d=a29_0x401d();let _0x2edca5=_0x401d4d[_0x2408cf];return _0x2edca5;}export function plannedAppConfig(_0x1d40df){const _0x182de5=a29_0x1b2bd3,_0x272c79=_0x1d40df[_0x182de5(0x1ac)]??!![];return{'appCode':_0x1d40df['appCode'],'key':_0x1d40df[_0x182de5(0x1b4)],'tags':_0x1d40df[_0x182de5(0x1c9)]??undefined,'hasValue':_0x272c79,'valueRedacted':_0x272c79};}export function buildMutationData(_0x1d3c65){const _0x515774=a29_0x1b2bd3;return{'operation':_0x1d3c65[_0x515774(0x1ad)],'selector':{'appCode':_0x1d3c65[_0x515774(0x1a3)],'key':_0x1d3c65[_0x515774(0x1b4)]},'before':_0x1d3c65[_0x515774(0x1c7)],'after':_0x1d3c65[_0x515774(0x1e1)],'dryRun':_0x1d3c65[_0x515774(0x1a4)],'warnings':_0x1d3c65[_0x515774(0x1c5)]??[]};}export async function withAppConfigApiBoundary(_0x2adb24,_0x19547d,_0x33983a){const _0x1de802=a29_0x1b2bd3;try{return await _0x33983a();}catch{const _0x39207d=[_0x1de802(0x1d7)+_0x19547d[_0x1de802(0x1a3)]];if(_0x19547d[_0x1de802(0x1b4)])_0x39207d[_0x1de802(0x1c2)](_0x1de802(0x1d3)+_0x19547d[_0x1de802(0x1b4)]);_0x39207d[_0x1de802(0x1c2)](_0x1de802(0x1d6));throw CliErrors['apiError'](_0x1de802(0x1db)+_0x2adb24+_0x1de802(0x1d2),_0x39207d[_0x1de802(0x1a1)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x32aa80,_0x365d15){const _0x1100f2=a29_0x1b2bd3;return Object['defineProperties'](_0x32aa80,{'method':{'value':_0x365d15[_0x1100f2(0x1dd)],'enumerable':![]},'url':{'value':_0x365d15[_0x1100f2(0x1c3)],'enumerable':![]}});}export function assertSingleValueSource(_0x5195a6){const _0x3c85c1=a29_0x1b2bd3,_0x521714=[];_0x5195a6[_0x3c85c1(0x1ae)][_0x3c85c1(0x1da)]>0x1&&_0x521714[_0x3c85c1(0x1c2)]({'kind':'argument','value':_0x5195a6['args'][_0x3c85c1(0x1d4)](0x1)[_0x3c85c1(0x1a1)]('\x20')});const _0x51c58b=_0x5195a6[_0x3c85c1(0x1ba)](_0x3c85c1(0x1aa));_0x51c58b!==undefined&&_0x51c58b!==null&&_0x521714['push']({'kind':_0x3c85c1(0x1a8),'value':String(_0x51c58b)});_0x5195a6[_0x3c85c1(0x1ab)](_0x3c85c1(0x1a6))&&_0x521714[_0x3c85c1(0x1c2)]({'kind':_0x3c85c1(0x1a6)});const _0x4878cb=_0x5195a6[_0x3c85c1(0x1bc)](_0x3c85c1(0x1d9))[_0x3c85c1(0x1af)]();_0x4878cb&&_0x521714['push']({'kind':'env','name':_0x4878cb});const _0x1e9f89=_0x5195a6[_0x3c85c1(0x1bc)](_0x3c85c1(0x1be))[_0x3c85c1(0x1af)]();_0x1e9f89&&_0x521714[_0x3c85c1(0x1c2)]({'kind':_0x3c85c1(0x1be),'path':_0x1e9f89});if(_0x521714[_0x3c85c1(0x1da)]===0x0)throw CliErrors[_0x3c85c1(0x1ca)]('Missing\x20app-config\x20value\x20source.','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x521714[_0x3c85c1(0x1da)]>0x1)throw CliErrors[_0x3c85c1(0x1ca)](_0x3c85c1(0x1b6),_0x3c85c1(0x1ce));return _0x521714[0x0];}export async function assertValueSourceReadable(_0x4f1ce4){const _0x592593=a29_0x1b2bd3;if(_0x4f1ce4[_0x592593(0x1bf)]===_0x592593(0x1d1)&&!(_0x4f1ce4[_0x592593(0x1de)]in process.env))throw CliErrors['validation'](_0x592593(0x1b5)+_0x4f1ce4[_0x592593(0x1de)]);if(_0x4f1ce4[_0x592593(0x1bf)]===_0x592593(0x1be))try{await access(_0x4f1ce4[_0x592593(0x1c8)]);}catch{throw CliErrors[_0x592593(0x1ca)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0x4f1ce4[_0x592593(0x1c8)]);}}export async function readAppConfigValue(_0x529e0c){const _0x161eb4=a29_0x1b2bd3,_0xb13eef=assertSingleValueSource(_0x529e0c),_0x20c519=[];if(_0xb13eef[_0x161eb4(0x1bf)]===_0x161eb4(0x1a8))return _0x20c519[_0x161eb4(0x1c2)](_0x161eb4(0x1d8)),{'value':_0xb13eef[_0x161eb4(0x1aa)]??'','source':_0xb13eef[_0x161eb4(0x1bf)],'warnings':_0x20c519};if(_0xb13eef['kind']===_0x161eb4(0x1a6))return{'value':await readStdin(),'source':_0xb13eef['kind'],'warnings':_0x20c519};if(_0xb13eef['kind']===_0x161eb4(0x1d1)){if(!(_0xb13eef[_0x161eb4(0x1de)]in process.env))throw CliErrors[_0x161eb4(0x1ca)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0xb13eef[_0x161eb4(0x1de)]);return{'value':process.env[_0xb13eef.name]??'','source':_0xb13eef['kind'],'warnings':_0x20c519};}return{'value':await readFile(_0xb13eef[_0x161eb4(0x1c8)],'utf8'),'source':_0xb13eef[_0x161eb4(0x1bf)],'warnings':_0x20c519};}function a29_0x401d(){const _0x592513=['kind','12Fqwneh','end','push','url','Runtime\x20app-config\x20key','warnings','3335935bAHyiZ','before','path','tags','validation','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','900669csgOCc','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','valueRedacted','354510pbNWKE','env','\x20app\x20config.','key:\x20','slice','string','value\x20is\x20redacted','appCode:\x20','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','from-env','length','Failed\x20to\x20','99708caJGmU','method','name','136cggZyr','setEncoding','after','join','gmtCreate','appCode','dryRun','64kRIWTY','stdin','17427520HgQEZe','argument','reveal','value','bool','hasValue','operation','args','trim','Missing\x20app-config\x20key.','Read\x20config\x20value\x20from\x20stdin','data','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','key','Environment\x20variable\x20is\x20not\x20set:\x20','App\x20config\x20value\x20source\x20is\x20ambiguous.','error','Config\x20tags\x20for\x20filtering/display\x20metadata','boolean','flag','10834OgIrfJ','str','6025656vKUSqz','file'];a29_0x401d=function(){return _0x592513;};return a29_0x401d();}function readStdin(){return new Promise((_0x38e539,_0x15283f)=>{const _0x2e7045=a29_0x2edc;let _0x3c86b2='';process[_0x2e7045(0x1a6)][_0x2e7045(0x1e0)]('utf8'),process['stdin']['on'](_0x2e7045(0x1b2),_0x578990=>{_0x3c86b2+=_0x578990;}),process['stdin']['once'](_0x2e7045(0x1c1),()=>_0x38e539(_0x3c86b2)),process[_0x2e7045(0x1a6)]['once'](_0x2e7045(0x1b7),_0x15283f);});}
1
+ const a29_0x216bf5=a29_0x10f2;(function(_0x165dcf,_0x87e76){const _0xf8993a=a29_0x10f2,_0x27d410=_0x165dcf();while(!![]){try{const _0x28fe0e=-parseInt(_0xf8993a(0x145))/0x1*(-parseInt(_0xf8993a(0x154))/0x2)+-parseInt(_0xf8993a(0x159))/0x3+-parseInt(_0xf8993a(0x155))/0x4*(-parseInt(_0xf8993a(0x14d))/0x5)+-parseInt(_0xf8993a(0x15f))/0x6*(parseInt(_0xf8993a(0x13d))/0x7)+parseInt(_0xf8993a(0x14b))/0x8+parseInt(_0xf8993a(0x147))/0x9*(parseInt(_0xf8993a(0x134))/0xa)+parseInt(_0xf8993a(0x131))/0xb*(-parseInt(_0xf8993a(0x12c))/0xc);if(_0x28fe0e===_0x87e76)break;else _0x27d410['push'](_0x27d410['shift']());}catch(_0x55ac9e){_0x27d410['push'](_0x27d410['shift']());}}}(a29_0x57f4,0x7370d));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x216bf5(0x146),'description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':a29_0x216bf5(0x11d),'description':a29_0x216bf5(0x11f),'required':![]};export const TAGS_FLAG={'name':'tags','type':a29_0x216bf5(0x152),'description':a29_0x216bf5(0x135)};export const STDIN_FLAG={'name':a29_0x216bf5(0x133),'type':a29_0x216bf5(0x15b),'description':'Read\x20config\x20value\x20from\x20stdin','default':![]};function a29_0x57f4(){const _0x4702c5=['1789605TZtPsd','length','boolean','warnings','apiError','Failed\x20to\x20','6ZiQUEh','gmtModified','join','value\x20is\x20redacted','value','kind','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','error','argument','url','Missing\x20app-config\x20key.','data','validation','key:\x20','\x20app\x20config.','env','App\x20config\x20value\x20source\x20is\x20ambiguous.','slice','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','7908lcoLzh','end','utf8','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Environment\x20variable\x20is\x20not\x20set:\x20','5665Eolqdf','tags','stdin','190AFvLhh','Config\x20tags\x20for\x20filtering/display\x20metadata','method','appCode:\x20','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','trim','push','args','hasValue','3213994qzbdIt','operation','valueRedacted','Value\x20file\x20is\x20not\x20readable:\x20','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','setEncoding','once','after','2VCxasV','key','253224MULtcc','before','bool','str','7298368JRDSNP','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','7495gWqEMC','file','from-env','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','path','string','name','5804OCZvAi','1108iPMbNs','appCode','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','gmtCreate'];a29_0x57f4=function(){return _0x4702c5;};return a29_0x57f4();}export const FROM_ENV_FLAG={'name':a29_0x216bf5(0x14f),'type':a29_0x216bf5(0x152),'description':a29_0x216bf5(0x14c)};export const REVEAL_FLAG={'name':'reveal','type':a29_0x216bf5(0x15b),'description':a29_0x216bf5(0x12b),'default':![]};export function readKeyArg(_0x4fc324){const _0x44226c=a29_0x216bf5,_0xe0ef4b=_0x4fc324[_0x44226c(0x13b)][0x0]?.[_0x44226c(0x139)]()??'';return validateKey(_0xe0ef4b),_0xe0ef4b;}export function readOptionalTags(_0x9778d6){const _0x247dda=a29_0x216bf5,_0x128a9a=_0x9778d6[_0x247dda(0x14a)]('tags')['trim']();if(!_0x128a9a)return undefined;if(_0x128a9a[_0x247dda(0x15a)]>0x20)throw CliErrors[_0x247dda(0x125)](_0x247dda(0x150));return _0x128a9a;}function a29_0x10f2(_0x40e0ff,_0xc121e3){_0x40e0ff=_0x40e0ff-0x11b;const _0x57f424=a29_0x57f4();let _0x10f2ef=_0x57f424[_0x40e0ff];return _0x10f2ef;}export function validateKey(_0x46c171){const _0xce7dd6=a29_0x216bf5;if(!_0x46c171)throw CliErrors[_0xce7dd6(0x125)](_0xce7dd6(0x123));if(_0x46c171['length']>0x100)throw CliErrors[_0xce7dd6(0x125)](_0xce7dd6(0x157));}export function projectAppConfig(_0x378529,_0x875e7a){const _0x30f2ce=a29_0x216bf5,_0x3de64a=_0x378529[_0x30f2ce(0x11d)]!==undefined&&_0x378529[_0x30f2ce(0x11d)]!==null&&_0x378529[_0x30f2ce(0x11d)]!=='',_0xa9520d={'appCode':_0x378529[_0x30f2ce(0x156)],'key':_0x378529[_0x30f2ce(0x146)],'tags':_0x378529[_0x30f2ce(0x132)]??undefined,'hasValue':_0x3de64a,'valueRedacted':_0x3de64a&&!_0x875e7a?.['reveal'],'gmtCreate':_0x378529[_0x30f2ce(0x158)],'gmtModified':_0x378529[_0x30f2ce(0x160)]};return _0x875e7a?.['reveal']&&(_0xa9520d['value']=_0x378529[_0x30f2ce(0x11d)]??'',_0xa9520d[_0x30f2ce(0x13f)]=![]),_0xa9520d;}export function plannedAppConfig(_0x58c9a9){const _0x46a7fd=a29_0x216bf5,_0x227075=_0x58c9a9[_0x46a7fd(0x13c)]??!![];return{'appCode':_0x58c9a9[_0x46a7fd(0x156)],'key':_0x58c9a9[_0x46a7fd(0x146)],'tags':_0x58c9a9[_0x46a7fd(0x132)]??undefined,'hasValue':_0x227075,'valueRedacted':_0x227075};}export function buildMutationData(_0x1410f7){const _0x5bcfa8=a29_0x216bf5;return{'operation':_0x1410f7[_0x5bcfa8(0x13e)],'selector':{'appCode':_0x1410f7[_0x5bcfa8(0x156)],'key':_0x1410f7['key']},'before':_0x1410f7[_0x5bcfa8(0x148)],'after':_0x1410f7[_0x5bcfa8(0x144)],'dryRun':_0x1410f7['dryRun'],'warnings':_0x1410f7[_0x5bcfa8(0x15c)]??[]};}export async function withAppConfigApiBoundary(_0x31d8a0,_0x3c313d,_0x4d2038){const _0x94a48e=a29_0x216bf5;try{return await _0x4d2038();}catch{const _0x10d5c6=[_0x94a48e(0x137)+_0x3c313d[_0x94a48e(0x156)]];if(_0x3c313d[_0x94a48e(0x146)])_0x10d5c6[_0x94a48e(0x13a)](_0x94a48e(0x126)+_0x3c313d[_0x94a48e(0x146)]);_0x10d5c6['push'](_0x94a48e(0x11c));throw CliErrors[_0x94a48e(0x15d)](_0x94a48e(0x15e)+_0x31d8a0+_0x94a48e(0x127),_0x10d5c6[_0x94a48e(0x11b)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x2eb948,_0x1b8535){const _0x496fba=a29_0x216bf5;return Object['defineProperties'](_0x2eb948,{'method':{'value':_0x1b8535[_0x496fba(0x136)],'enumerable':![]},'url':{'value':_0x1b8535[_0x496fba(0x122)],'enumerable':![]}});}export function assertSingleValueSource(_0x562c19){const _0x5778c2=a29_0x216bf5,_0xcd917f=[];_0x562c19[_0x5778c2(0x13b)]['length']>0x1&&_0xcd917f[_0x5778c2(0x13a)]({'kind':_0x5778c2(0x121),'value':_0x562c19[_0x5778c2(0x13b)][_0x5778c2(0x12a)](0x1)[_0x5778c2(0x11b)]('\x20')});const _0x393664=_0x562c19['flag'](_0x5778c2(0x11d));_0x393664!==undefined&&_0x393664!==null&&_0xcd917f[_0x5778c2(0x13a)]({'kind':_0x5778c2(0x121),'value':String(_0x393664)});_0x562c19[_0x5778c2(0x149)](_0x5778c2(0x133))&&_0xcd917f[_0x5778c2(0x13a)]({'kind':_0x5778c2(0x133)});const _0x35ece3=_0x562c19[_0x5778c2(0x14a)](_0x5778c2(0x14f))['trim']();_0x35ece3&&_0xcd917f[_0x5778c2(0x13a)]({'kind':'env','name':_0x35ece3});const _0x23bf40=_0x562c19[_0x5778c2(0x14a)](_0x5778c2(0x14e))['trim']();_0x23bf40&&_0xcd917f[_0x5778c2(0x13a)]({'kind':'file','path':_0x23bf40});if(_0xcd917f[_0x5778c2(0x15a)]===0x0)throw CliErrors['validation']('Missing\x20app-config\x20value\x20source.',_0x5778c2(0x138));if(_0xcd917f[_0x5778c2(0x15a)]>0x1)throw CliErrors['validation'](_0x5778c2(0x129),_0x5778c2(0x12f));return _0xcd917f[0x0];}export async function assertValueSourceReadable(_0x44a502){const _0x30784=a29_0x216bf5;if(_0x44a502['kind']===_0x30784(0x128)&&!(_0x44a502['name']in process.env))throw CliErrors[_0x30784(0x125)](_0x30784(0x130)+_0x44a502[_0x30784(0x153)]);if(_0x44a502[_0x30784(0x11e)]===_0x30784(0x14e))try{await access(_0x44a502[_0x30784(0x151)]);}catch{throw CliErrors['validation'](_0x30784(0x140)+_0x44a502[_0x30784(0x151)]);}}export async function readAppConfigValue(_0xc91709){const _0x5c9cce=a29_0x216bf5,_0x3143d8=assertSingleValueSource(_0xc91709),_0x10ca41=[];if(_0x3143d8['kind']===_0x5c9cce(0x121))return _0x10ca41[_0x5c9cce(0x13a)](_0x5c9cce(0x141)),{'value':_0x3143d8[_0x5c9cce(0x11d)]??'','source':_0x3143d8[_0x5c9cce(0x11e)],'warnings':_0x10ca41};if(_0x3143d8['kind']==='stdin')return{'value':await readStdin(),'source':_0x3143d8[_0x5c9cce(0x11e)],'warnings':_0x10ca41};if(_0x3143d8[_0x5c9cce(0x11e)]===_0x5c9cce(0x128)){if(!(_0x3143d8[_0x5c9cce(0x153)]in process.env))throw CliErrors['validation'](_0x5c9cce(0x130)+_0x3143d8[_0x5c9cce(0x153)]);return{'value':process.env[_0x3143d8.name]??'','source':_0x3143d8[_0x5c9cce(0x11e)],'warnings':_0x10ca41};}return{'value':await readFile(_0x3143d8[_0x5c9cce(0x151)],_0x5c9cce(0x12e)),'source':_0x3143d8[_0x5c9cce(0x11e)],'warnings':_0x10ca41};}function readStdin(){return new Promise((_0x578d70,_0x2998bc)=>{const _0x55ac80=a29_0x10f2;let _0xb67ec2='';process['stdin'][_0x55ac80(0x142)](_0x55ac80(0x12e)),process[_0x55ac80(0x133)]['on'](_0x55ac80(0x124),_0x2d11f3=>{_0xb67ec2+=_0x2d11f3;}),process['stdin'][_0x55ac80(0x143)](_0x55ac80(0x12d),()=>_0x578d70(_0xb67ec2)),process[_0x55ac80(0x133)]['once'](_0x55ac80(0x120),_0x2998bc);});}
@@ -1 +1 @@
1
- const a30_0x4f91be=a30_0x8840;(function(_0x314e5e,_0x219418){const _0x14dc0f=a30_0x8840,_0x2b3611=_0x314e5e();while(!![]){try{const _0x4265f5=parseInt(_0x14dc0f(0x11f))/0x1*(parseInt(_0x14dc0f(0x129))/0x2)+-parseInt(_0x14dc0f(0x127))/0x3*(parseInt(_0x14dc0f(0x123))/0x4)+parseInt(_0x14dc0f(0x130))/0x5*(-parseInt(_0x14dc0f(0x125))/0x6)+-parseInt(_0x14dc0f(0x126))/0x7*(parseInt(_0x14dc0f(0x12e))/0x8)+-parseInt(_0x14dc0f(0x117))/0x9+-parseInt(_0x14dc0f(0x11c))/0xa*(parseInt(_0x14dc0f(0x12d))/0xb)+-parseInt(_0x14dc0f(0x121))/0xc*(-parseInt(_0x14dc0f(0x120))/0xd);if(_0x4265f5===_0x219418)break;else _0x2b3611['push'](_0x2b3611['shift']());}catch(_0x4aa482){_0x2b3611['push'](_0x2b3611['shift']());}}}(a30_0x55f0,0x95bd2));function a30_0x55f0(){const _0x1b9970=['login','4ONlhLx','auth','1517574pzNoUs','1857877cBJmmD','1330386BQBzts','../../auth/auth-server-ui.js','12638rqbXZJ','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','boolean','bool','627oZIyZn','24eNTUsR','Clear\x20login\x20session','20qiTamj','Login\x20via\x20browser','5921847TFCEcX','log','!\x20Not\x20logged\x20in','nonInteractive','yes','142610WvdSFz','✓\x20Logged\x20out','write','43HBKmxq','2431yVaEmC','260784pFPcIe'];a30_0x55f0=function(){return _0x1b9970;};return a30_0x55f0();}import{unlinkSync,existsSync}from'node:fs';function a30_0x8840(_0x4ceb20,_0x2e037a){_0x4ceb20=_0x4ceb20-0x117;const _0x55f09b=a30_0x55f0();let _0x8840cb=_0x55f09b[_0x4ceb20];return _0x8840cb;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x4f91be(0x124),'command':a30_0x4f91be(0x122),'description':a30_0x4f91be(0x131),'risk':a30_0x4f91be(0x11e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x4f91be(0x11b),'type':a30_0x4f91be(0x12b),'description':a30_0x4f91be(0x12a),'default':![]}],async 'execute'(_0x384fd6){const _0x154d6a=a30_0x4f91be,{runAuthServer:_0x51ad8e}=await import(_0x154d6a(0x128));return await _0x51ad8e({'autoYes':_0x384fd6[_0x154d6a(0x12c)](_0x154d6a(0x11b)),'nonInteractive':_0x384fd6[_0x154d6a(0x11a)]}),{'ok':!![]};}},{'service':a30_0x4f91be(0x124),'command':'logout','description':a30_0x4f91be(0x12f),'risk':a30_0x4f91be(0x11e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x797b9c){const _0x447083=a30_0x4f91be;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x447083(0x118)](_0x447083(0x11d))):console['log'](_0x447083(0x119)),{'ok':!![]};}}];
1
+ function a30_0x3ab6(_0x38ac4c,_0x5d01a2){_0x38ac4c=_0x38ac4c-0x11f;const _0xcb5a0b=a30_0xcb5a();let _0x3ab618=_0xcb5a0b[_0x38ac4c];return _0x3ab618;}const a30_0x11125d=a30_0x3ab6;(function(_0x4b3fa3,_0x11cf80){const _0xae5a09=a30_0x3ab6,_0x5928e7=_0x4b3fa3();while(!![]){try{const _0xd068d2=-parseInt(_0xae5a09(0x127))/0x1*(parseInt(_0xae5a09(0x120))/0x2)+parseInt(_0xae5a09(0x123))/0x3+-parseInt(_0xae5a09(0x12f))/0x4*(parseInt(_0xae5a09(0x128))/0x5)+parseInt(_0xae5a09(0x12a))/0x6+parseInt(_0xae5a09(0x12e))/0x7*(parseInt(_0xae5a09(0x12d))/0x8)+-parseInt(_0xae5a09(0x12b))/0x9+parseInt(_0xae5a09(0x11f))/0xa*(-parseInt(_0xae5a09(0x124))/0xb);if(_0xd068d2===_0x11cf80)break;else _0x5928e7['push'](_0x5928e7['shift']());}catch(_0xa2819d){_0x5928e7['push'](_0x5928e7['shift']());}}}(a30_0xcb5a,0x88ad2));import{unlinkSync,existsSync}from'node:fs';function a30_0xcb5a(){const _0x1ba578=['logout','5800770KPyUno','5410962ynhweW','auth','7384928EhfGFr','7syiAme','276PqnsjV','✓\x20Logged\x20out','login','yes','log','488310VCiUzr','17518EAUhrK','nonInteractive','../../auth/auth-server-ui.js','2612589YzksFT','11xVabAq','write','Clear\x20login\x20session','107fYPPGv','44470XNVTOQ'];a30_0xcb5a=function(){return _0x1ba578;};return a30_0xcb5a();}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a30_0x11125d(0x131),'description':'Login\x20via\x20browser','risk':a30_0x11125d(0x125),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x11125d(0x132),'type':'boolean','description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x5aed47){const _0x579f40=a30_0x11125d,{runAuthServer:_0x464db9}=await import(_0x579f40(0x122));return await _0x464db9({'autoYes':_0x5aed47['bool']('yes'),'nonInteractive':_0x5aed47[_0x579f40(0x121)]}),{'ok':!![]};}},{'service':a30_0x11125d(0x12c),'command':a30_0x11125d(0x129),'description':a30_0x11125d(0x126),'risk':a30_0x11125d(0x125),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3da09d){const _0x38fea5=a30_0x11125d;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x38fea5(0x133)](_0x38fea5(0x130))):console['log']('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a31_0x29cb16=a31_0x373d;function a31_0x58f7(){const _0x10bd8b=['#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','datasetcode','\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','2KORpjJ','type','\x22\x20not\x20found.\x20','修改后的请求参数','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','Operation\x20type\x20\x22','4524741PhMOhU','743655NkyTNE','Available:\x20','961276TPTLeE','Script\x20description','/**\x0a\x20*\x20','isInteger','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','str','.js','No\x20api.ts\x20found.\x20Run\x20`','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','当前请求参数','stderr','Invalid\x20function\x20name\x20\x22','code','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','Available\x20aliases:\x20','修改后的响应结果','\x22,\x20params\x20})\x0a','222mcnOeW','File\x20already\x20exists:\x20','No\x20datasets\x20found\x20for\x20this\x20app.','Invalid\x20dataset\x20selection.','length','HOOK','after','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','question','/data/dataset/','appCode','alias','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','scriptsRootDir','33754BOXvql','close','find','operationType','before','Select\x20dataset:','source','No\x20operation\x20types\x20found\x20for\x20dataset\x20','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','\x20api\x20pull`\x20to\x20refresh.','function-node','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','\x0a\x20*\x20[平台配置]\x20','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','map','utf8',']\x20(','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','3242344RBheoQ','apiDir','string','operation-type','validation','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20请求参数\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20TODO:\x20补充返回数据结构\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','datasetId','当前响应结果','\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','/ENDPOINT/','COMMON','Created\x20','join','description','.js\x0a\x20*\x20[触发节点]\x20','functionNode','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','.js\x0a','Script\x20type','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','ENDPOINT','\x20function:\x20','73188SMvkmp','trim','nonInteractive','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','create','Function\x20name\x20(valid\x20JS\x20identifier)','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Select\x20trigger\x20node:','name','Operation\x20type\x20(HOOK\x20only)','datasetCode','561147HdJCxQ','includes','write'];a31_0x58f7=function(){return _0x10bd8b;};return a31_0x58f7();}(function(_0x23f3e9,_0x370951){const _0x2b4178=a31_0x373d,_0x4c40c6=_0x23f3e9();while(!![]){try{const _0x1b76a8=-parseInt(_0x2b4178(0x18c))/0x1+-parseInt(_0x2b4178(0x19d))/0x2*(-parseInt(_0x2b4178(0x197))/0x3)+parseInt(_0x2b4178(0x1a7))/0x4+-parseInt(_0x2b4178(0x1a5))/0x5+-parseInt(_0x2b4178(0x1b8))/0x6*(-parseInt(_0x2b4178(0x1c6))/0x7)+parseInt(_0x2b4178(0x174))/0x8+-parseInt(_0x2b4178(0x1a4))/0x9;if(_0x1b76a8===_0x370951)break;else _0x4c40c6['push'](_0x4c40c6['shift']());}catch(_0x3d7ed5){_0x4c40c6['push'](_0x4c40c6['shift']());}}}(a31_0x58f7,0x45ec7));function a31_0x373d(_0xe1a24d,_0x6625fc){_0xe1a24d=_0xe1a24d-0x174;const _0x58f74e=a31_0x58f7();let _0x373d63=_0x58f74e[_0xe1a24d];return _0x373d63;}import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':'bff','command':a31_0x29cb16(0x190),'description':'Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','risk':'read','flags':[{'name':a31_0x29cb16(0x19e),'type':a31_0x29cb16(0x176),'required':!![],'enum':['COMMON',a31_0x29cb16(0x18a),a31_0x29cb16(0x1bd)],'description':a31_0x29cb16(0x188)},{'name':a31_0x29cb16(0x194),'type':a31_0x29cb16(0x176),'required':!![],'description':a31_0x29cb16(0x191)},{'name':'description','type':'string','description':a31_0x29cb16(0x1a8)},{'name':a31_0x29cb16(0x1c3),'type':a31_0x29cb16(0x176),'description':a31_0x29cb16(0x192)},{'name':a31_0x29cb16(0x19b),'type':a31_0x29cb16(0x176),'description':a31_0x29cb16(0x1ce)},{'name':a31_0x29cb16(0x177),'type':a31_0x29cb16(0x176),'description':a31_0x29cb16(0x195)},{'name':a31_0x29cb16(0x1d0),'type':'string','description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a31_0x29cb16(0x1ca),'after']}],async 'validate'(_0x15941d){const _0x28da3d=a31_0x29cb16,_0x5c50b1=_0x15941d['str'](_0x28da3d(0x194));if(!isValidBffFunctionName(_0x5c50b1))throw CliErrors[_0x28da3d(0x178)](_0x28da3d(0x1b2)+_0x5c50b1+_0x28da3d(0x1bf));},async 'execute'(_0x51b0a8){const _0x1a8fa3=a31_0x29cb16,_0xa74ed6=loadBffProjectConfig(_0x51b0a8['appCode']),_0x248553=_0x51b0a8[_0x1a8fa3(0x1ac)](_0x1a8fa3(0x19e)),_0x32ff03=_0x51b0a8[_0x1a8fa3(0x1ac)](_0x1a8fa3(0x194)),_0x263b01=_0x51b0a8['str']('description')||undefined,_0x5f4f5e=_0x248553===_0x1a8fa3(0x1bd)?await resolveHookOptions(_0xa74ed6,_0x51b0a8):undefined,_0x24b9ac=buildFilePath(_0xa74ed6,_0x248553,_0x32ff03,_0x5f4f5e);if(await fileExists(_0x24b9ac))throw CliErrors['validation'](_0x1a8fa3(0x1b9)+_0x24b9ac);await mkdir(dirname(_0x24b9ac),{'recursive':!![]});const _0x49ec36=generateTemplate(_0x248553,_0x32ff03,_0x51b0a8[_0x1a8fa3(0x1c2)],_0x263b01,_0x5f4f5e);await writeFile(_0x24b9ac,_0x49ec36,_0x1a8fa3(0x1d5));const _0x5a0345={'type':_0x248553,'name':_0x32ff03,'path':_0x24b9ac};if(_0x263b01)_0x5a0345[_0x1a8fa3(0x183)]=_0x263b01;if(_0x5f4f5e){if(_0x5f4f5e[_0x1a8fa3(0x1c3)])_0x5a0345[_0x1a8fa3(0x1c3)]=_0x5f4f5e[_0x1a8fa3(0x1c3)];_0x5a0345['datasetCode']=_0x5f4f5e[_0x1a8fa3(0x196)],_0x5a0345[_0x1a8fa3(0x1c9)]=_0x5f4f5e[_0x1a8fa3(0x1c9)],_0x5a0345['functionNode']=_0x5f4f5e[_0x1a8fa3(0x185)];}return{'ok':!![],'data':_0x5a0345,'message':_0x1a8fa3(0x181)+_0x248553+_0x1a8fa3(0x18b)+_0x32ff03};}};async function resolveHookOptions(_0x3ebc62,_0x25a123){const _0x162c63=a31_0x29cb16,_0x1d22bb=loadAliasMap(_0x25a123[_0x162c63(0x175)],undefined,resolveApiFilePath(_0x25a123[_0x162c63(0x175)],_0x25a123[_0x162c63(0x1c2)])),_0x119a23=_0x1d22bb[_0x162c63(0x1bc)]>0x0;let _0x5e38d6,_0x575733,_0x5a7388;const _0x1c32f0=_0x25a123[_0x162c63(0x1ac)](_0x162c63(0x1c3)),_0xc797b0=_0x25a123[_0x162c63(0x1ac)](_0x162c63(0x19b));if(_0x1c32f0){const _0x22996a=resolveAlias(_0x25a123[_0x162c63(0x175)],_0x1c32f0,undefined,resolveApiFilePath(_0x25a123['apiDir'],_0x25a123['appCode']));if(!_0x22996a){const _0x2593c5=_0x119a23?_0x162c63(0x1b5)+_0x1d22bb[_0x162c63(0x1d4)](_0x38a7b7=>_0x38a7b7[_0x162c63(0x1c3)])[_0x162c63(0x182)](',\x20'):_0x162c63(0x1ae)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x162c63(0x178)]('Alias\x20\x22'+_0x1c32f0+_0x162c63(0x19f)+_0x2593c5);}_0x5e38d6=_0x1c32f0,_0x575733=_0x22996a;}else{if(_0xc797b0){_0x575733=_0xc797b0;const _0x19d61f=_0x1d22bb[_0x162c63(0x1c8)](_0x1edc9e=>_0x1edc9e[_0x162c63(0x196)]===_0xc797b0);_0x5e38d6=_0x19d61f?.[_0x162c63(0x1c3)];}else{if(_0x25a123[_0x162c63(0x18e)])throw CliErrors[_0x162c63(0x178)](_0x162c63(0x1c4));else{if(_0x119a23){const _0x3afed3=_0x1d22bb[_0x162c63(0x1d4)](_0x9e0e34=>_0x9e0e34['alias']+'\x20('+_0x9e0e34['tableName']+')'),_0x5448c1=await promptSelect('Select\x20dataset:',_0x3afed3),_0x17691d=_0x1d22bb[_0x5448c1];if(!_0x17691d)throw CliErrors[_0x162c63(0x178)](_0x162c63(0x1bb));_0x5e38d6=_0x17691d[_0x162c63(0x1c3)],_0x575733=_0x17691d[_0x162c63(0x196)];}else{const _0x42528d=await listDatasets(_0x25a123[_0x162c63(0x1c2)]);if(_0x42528d[_0x162c63(0x1bc)]===0x0)throw CliErrors['validation'](_0x162c63(0x1ba));const _0x3034b1=_0x42528d[_0x162c63(0x1d4)](_0x279e33=>_0x279e33['name']+'\x20['+(_0x279e33[_0x162c63(0x1cc)]??'UNKNOWN')+_0x162c63(0x1d6)+_0x279e33[_0x162c63(0x1b3)]+')'),_0x280735=await promptSelect(_0x162c63(0x1cb),_0x3034b1),_0x5ca1a3=_0x42528d[_0x280735];if(!_0x5ca1a3)throw CliErrors[_0x162c63(0x178)]('Invalid\x20dataset\x20selection.');_0x575733=_0x5ca1a3[_0x162c63(0x1b3)],_0x5e38d6=undefined;}}}}const _0x20694d=await listDatasets(_0x25a123[_0x162c63(0x1c2)]),_0xb18a07=_0x20694d['find'](_0x258b39=>_0x258b39[_0x162c63(0x1b3)]===_0x575733);if(!_0xb18a07)throw CliErrors[_0x162c63(0x178)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x575733+'\x22.\x20'+(_0x5e38d6?_0x162c63(0x1af)+CLI_BIN_NAME+_0x162c63(0x1cf):''));_0x5a7388=_0xb18a07['id'];const _0xa92b90=_0x5e38d6??_0x575733,_0x14e953=await listBffDatasetOperations(_0x25a123['appCode'],_0x5a7388),_0x57dd8e=_0x14e953?Object['keys'](_0x14e953):[];if(_0x57dd8e['length']===0x0)throw CliErrors[_0x162c63(0x178)](_0x162c63(0x1cd)+_0xa92b90+'.');let _0x22651d;const _0x30438c=_0x25a123[_0x162c63(0x1ac)]('operation-type');if(_0x30438c){if(!_0x57dd8e[_0x162c63(0x198)](_0x30438c))throw CliErrors[_0x162c63(0x178)](_0x162c63(0x1a3)+_0x30438c+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0xa92b90+'.\x20'+(_0x162c63(0x1a6)+_0x57dd8e[_0x162c63(0x182)](',\x20')));_0x22651d=_0x30438c;}else{if(_0x25a123[_0x162c63(0x18e)])throw CliErrors[_0x162c63(0x178)](_0x162c63(0x1d7));const _0x58b4db=await promptSelect('Select\x20operation\x20type:',_0x57dd8e);_0x22651d=_0x57dd8e[_0x58b4db]??_0x57dd8e[0x0];}let _0x52314e=normalizeHookFunctionNode(_0x25a123[_0x162c63(0x1ac)](_0x162c63(0x1d0)));if(!_0x52314e){if(_0x25a123[_0x162c63(0x1ac)](_0x162c63(0x1d0)))throw CliErrors['validation'](_0x162c63(0x1d1));if(_0x25a123[_0x162c63(0x18e)])throw CliErrors[_0x162c63(0x178)](_0x162c63(0x189));const _0x952275=await promptSelect(_0x162c63(0x193),[_0x162c63(0x1ca),'after']);_0x52314e=[_0x162c63(0x1ca),_0x162c63(0x1be)][_0x952275]??_0x162c63(0x1ca);}return{'alias':_0x5e38d6,'datasetCode':_0x575733,'datasetId':_0x5a7388,'operationType':_0x22651d,'functionNode':_0x52314e};}async function promptSelect(_0x392237,_0x5e7491){const _0x17872b=a31_0x29cb16;if(_0x5e7491['length']===0x1)return 0x0;for(const [_0xa4ceef,_0x1faad2]of _0x5e7491['entries']()){process[_0x17872b(0x1b1)][_0x17872b(0x199)]('\x20\x20'+(_0xa4ceef+0x1)+'.\x20'+_0x1faad2+'\x0a');}const _0x789423=createInterface({'input':process['stdin'],'output':process[_0x17872b(0x1b1)]});while(!![]){const _0x3c049f=await new Promise(_0xba2d70=>{const _0x40c91e=_0x17872b;_0x789423[_0x40c91e(0x1c0)](_0x392237+'\x20',_0xba2d70);}),_0x4dbb3a=Number['parseInt'](_0x3c049f[_0x17872b(0x18d)](),0xa);if(Number[_0x17872b(0x1aa)](_0x4dbb3a)&&_0x4dbb3a>=0x1&&_0x4dbb3a<=_0x5e7491[_0x17872b(0x1bc)])return _0x789423[_0x17872b(0x1c7)](),_0x4dbb3a-0x1;process[_0x17872b(0x1b1)][_0x17872b(0x199)](_0x17872b(0x1ab)+_0x5e7491[_0x17872b(0x1bc)]+'.\x0a');}}function buildFilePath(_0x3f9297,_0x2b5439,_0x29e395,_0x3e31df){const _0xf0fd68=a31_0x29cb16;if(_0x2b5439===_0xf0fd68(0x1bd)){if(!_0x3e31df)throw CliErrors[_0xf0fd68(0x178)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0xde638e=_0x3e31df[_0xf0fd68(0x1c3)]??_0x3e31df['datasetCode'];return join(_0x3f9297[_0xf0fd68(0x1c5)],_0xf0fd68(0x1bd),_0xde638e,_0x3e31df[_0xf0fd68(0x1c9)],_0x3e31df['functionNode'],_0x29e395+'.js');}return join(_0x3f9297[_0xf0fd68(0x1c5)],_0x2b5439,_0x29e395+_0xf0fd68(0x1ad));}export function generateTemplate(_0x3d9ea9,_0x3caa8d,_0x373a7a,_0x205681,_0x52ecb9){const _0x139cae=a31_0x29cb16,_0x3b571b=_0x205681?.[_0x139cae(0x18d)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x354e38=getAppBaseUrl(_0x373a7a),_0x2a1e6a='\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)';if(_0x3d9ea9===_0x139cae(0x180))return _0x139cae(0x1a9)+_0x3b571b+_0x139cae(0x186)+_0x3caa8d+_0x139cae(0x1d2)+_0x354e38+_0x139cae(0x1d3)+_0x373a7a+'/COMMON/'+_0x3caa8d+_0x139cae(0x17b)+_0x3caa8d+_0x139cae(0x1b7)+_0x2a1e6a+_0x139cae(0x17a)+_0x3caa8d+_0x139cae(0x18f);if(_0x3d9ea9===_0x139cae(0x18a))return'/**\x0a\x20*\x20'+_0x3b571b+_0x139cae(0x1a2)+_0x3caa8d+_0x139cae(0x179)+_0x373a7a+'/'+_0x3caa8d+_0x139cae(0x1d2)+_0x354e38+_0x139cae(0x1d3)+_0x373a7a+_0x139cae(0x17f)+_0x3caa8d+_0x139cae(0x187)+_0x2a1e6a+_0x139cae(0x19c)+_0x3caa8d+_0x139cae(0x18f);if(!_0x52ecb9)throw CliErrors['validation'](_0x139cae(0x1a1));const _0xf243c6=_0x52ecb9[_0x139cae(0x1c3)]??_0x52ecb9[_0x139cae(0x196)],_0x4af008=_0x52ecb9['functionNode']==='before'?_0x139cae(0x1b0):_0x139cae(0x17d),_0x2bcb5d=_0x52ecb9[_0x139cae(0x185)]===_0x139cae(0x1ca)?_0x139cae(0x1a0):_0x139cae(0x1b6);return'/**\x0a\x20*\x20'+_0x3b571b+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20'+_0x3caa8d+_0x139cae(0x1b4)+_0x373a7a+'/'+_0x52ecb9['datasetCode']+'/'+_0x52ecb9[_0x139cae(0x1c9)]+_0x139cae(0x1d2)+_0x354e38+_0x139cae(0x1c1)+_0x52ecb9[_0x139cae(0x17c)]+_0x139cae(0x19a)+_0x373a7a+'/HOOK/'+_0xf243c6+'/'+_0x52ecb9[_0x139cae(0x1c9)]+'/'+_0x52ecb9['functionNode']+'/'+_0x3caa8d+_0x139cae(0x184)+_0x52ecb9[_0x139cae(0x185)]+'\x0a'+_0x2a1e6a+'\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20'+_0x4af008+'\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20'+_0x2bcb5d+_0x139cae(0x17e)+_0x3caa8d+_0x139cae(0x18f);}
1
+ const a31_0x1b12c2=a31_0x1c57;(function(_0x2e7e2c,_0x1d1222){const _0x18b1f6=a31_0x1c57,_0x3c3284=_0x2e7e2c();while(!![]){try{const _0x4c086b=-parseInt(_0x18b1f6(0x12f))/0x1+parseInt(_0x18b1f6(0x127))/0x2+-parseInt(_0x18b1f6(0x148))/0x3*(parseInt(_0x18b1f6(0x153))/0x4)+-parseInt(_0x18b1f6(0x144))/0x5*(-parseInt(_0x18b1f6(0x115))/0x6)+-parseInt(_0x18b1f6(0x10a))/0x7*(parseInt(_0x18b1f6(0x132))/0x8)+-parseInt(_0x18b1f6(0x164))/0x9*(parseInt(_0x18b1f6(0x13b))/0xa)+parseInt(_0x18b1f6(0x149))/0xb;if(_0x4c086b===_0x1d1222)break;else _0x3c3284['push'](_0x3c3284['shift']());}catch(_0x24862f){_0x3c3284['push'](_0x3c3284['shift']());}}}(a31_0xe08c,0x341d8));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';function a31_0xe08c(){const _0x4d9a1a=['apiDir','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','/**\x0a\x20*\x20','Trigger\x20node\x20(HOOK\x20only)','\x20function:\x20','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','20jJTZDK','before','No\x20api.ts\x20found.\x20Run\x20`','alias','558537YhtGyb','9519411vCZNwT','validation','COMMON','operation-type','code','Function\x20name\x20(valid\x20JS\x20identifier)','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','Invalid\x20dataset\x20selection.','map','question','4HdnRoG','join','Available:\x20','/ENDPOINT/','keys','修改后的响应结果','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','operationType','Operation\x20type\x20(HOOK\x20only)','/HOOK/','type','source','read','entries','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Script\x20description','Alias\x20\x22','13653IHrJEt','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','ENDPOINT','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','stderr','Select\x20operation\x20type:','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','str','parseInt','/COMMON/','.js','stdin','No\x20operation\x20types\x20found\x20for\x20dataset\x20','appCode','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','11662eswjOr','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','includes','name','datasetCode','isInteger','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','修改后的请求参数','\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','314958WqoxRP','datasetcode','\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','nonInteractive','trim','\x0a\x20*\x20[平台配置]\x20','Select\x20dataset:','HOOK\x20requires\x20alias/operation/node\x20options.','scriptsRootDir','UNKNOWN','bff','Select\x20trigger\x20node:','Operation\x20type\x20\x22','\x22\x20not\x20found.\x20','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','datasetId','No\x20datasets\x20found\x20for\x20this\x20app.','\x22,\x20params\x20})\x0a','108382uHZcAG','Invalid\x20function\x20name\x20\x22','\x22.\x20','HOOK','after','write','create','description','212068RrZtZS','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','\x20api\x20pull`\x20to\x20refresh.','600wSvLth','functionNode','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','string','Available\x20aliases:\x20','File\x20already\x20exists:\x20','length','\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','close','2590CgWPCr','find'];a31_0xe08c=function(){return _0x4d9a1a;};return a31_0xe08c();}import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a31_0x1c57(_0x278511,_0x42d1ed){_0x278511=_0x278511-0x108;const _0xe08cf7=a31_0xe08c();let _0x1c5747=_0xe08cf7[_0x278511];return _0x1c5747;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':a31_0x1b12c2(0x11f),'command':a31_0x1b12c2(0x12d),'description':a31_0x1b12c2(0x123),'risk':a31_0x1b12c2(0x15f),'flags':[{'name':a31_0x1b12c2(0x15d),'type':'string','required':!![],'enum':[a31_0x1b12c2(0x14b),'ENDPOINT',a31_0x1b12c2(0x12a)],'description':'Script\x20type'},{'name':a31_0x1b12c2(0x10f),'type':a31_0x1b12c2(0x135),'required':!![],'description':a31_0x1b12c2(0x14e)},{'name':a31_0x1b12c2(0x12e),'type':a31_0x1b12c2(0x135),'description':a31_0x1b12c2(0x162)},{'name':a31_0x1b12c2(0x147),'type':a31_0x1b12c2(0x135),'description':a31_0x1b12c2(0x10d)},{'name':a31_0x1b12c2(0x116),'type':a31_0x1b12c2(0x135),'description':a31_0x1b12c2(0x108)},{'name':a31_0x1b12c2(0x14c),'type':'string','description':a31_0x1b12c2(0x15b)},{'name':'function-node','type':a31_0x1b12c2(0x135),'description':a31_0x1b12c2(0x140),'enum':[a31_0x1b12c2(0x145),'after']}],async 'validate'(_0x42af51){const _0x28a0f2=a31_0x1b12c2,_0x4b8cc4=_0x42af51[_0x28a0f2(0x16b)](_0x28a0f2(0x10f));if(!isValidBffFunctionName(_0x4b8cc4))throw CliErrors[_0x28a0f2(0x14a)](_0x28a0f2(0x128)+_0x4b8cc4+_0x28a0f2(0x13e));},async 'execute'(_0x36cefd){const _0x4fde60=a31_0x1b12c2,_0xd6aec4=loadBffProjectConfig(_0x36cefd[_0x4fde60(0x171)]),_0x6993ef=_0x36cefd[_0x4fde60(0x16b)](_0x4fde60(0x15d)),_0x4d8980=_0x36cefd['str'](_0x4fde60(0x10f)),_0x4c59fc=_0x36cefd[_0x4fde60(0x16b)](_0x4fde60(0x12e))||undefined,_0x24854c=_0x6993ef===_0x4fde60(0x12a)?await resolveHookOptions(_0xd6aec4,_0x36cefd):undefined,_0x5cc879=buildFilePath(_0xd6aec4,_0x6993ef,_0x4d8980,_0x24854c);if(await fileExists(_0x5cc879))throw CliErrors[_0x4fde60(0x14a)](_0x4fde60(0x137)+_0x5cc879);await mkdir(dirname(_0x5cc879),{'recursive':!![]});const _0x5033f8=generateTemplate(_0x6993ef,_0x4d8980,_0x36cefd['appCode'],_0x4c59fc,_0x24854c);await writeFile(_0x5cc879,_0x5033f8,'utf8');const _0x3c80a3={'type':_0x6993ef,'name':_0x4d8980,'path':_0x5cc879};if(_0x4c59fc)_0x3c80a3['description']=_0x4c59fc;if(_0x24854c){if(_0x24854c[_0x4fde60(0x147)])_0x3c80a3[_0x4fde60(0x147)]=_0x24854c[_0x4fde60(0x147)];_0x3c80a3[_0x4fde60(0x110)]=_0x24854c[_0x4fde60(0x110)],_0x3c80a3['operationType']=_0x24854c[_0x4fde60(0x15a)],_0x3c80a3[_0x4fde60(0x133)]=_0x24854c[_0x4fde60(0x133)];}return{'ok':!![],'data':_0x3c80a3,'message':'Created\x20'+_0x6993ef+_0x4fde60(0x141)+_0x4d8980};}};async function resolveHookOptions(_0x19a100,_0x20b800){const _0x471928=a31_0x1b12c2,_0x14afcd=loadAliasMap(_0x20b800[_0x471928(0x13d)],undefined,resolveApiFilePath(_0x20b800['apiDir'],_0x20b800['appCode'])),_0xdd1e65=_0x14afcd[_0x471928(0x138)]>0x0;let _0x510352,_0x165f1a,_0x300a7c;const _0x3cec52=_0x20b800[_0x471928(0x16b)](_0x471928(0x147)),_0x38b227=_0x20b800['str'](_0x471928(0x116));if(_0x3cec52){const _0x1f2776=resolveAlias(_0x20b800[_0x471928(0x13d)],_0x3cec52,undefined,resolveApiFilePath(_0x20b800[_0x471928(0x13d)],_0x20b800[_0x471928(0x171)]));if(!_0x1f2776){const _0x559332=_0xdd1e65?_0x471928(0x136)+_0x14afcd[_0x471928(0x151)](_0x933509=>_0x933509[_0x471928(0x147)])[_0x471928(0x154)](',\x20'):_0x471928(0x146)+CLI_BIN_NAME+_0x471928(0x109);throw CliErrors[_0x471928(0x14a)](_0x471928(0x163)+_0x3cec52+_0x471928(0x122)+_0x559332);}_0x510352=_0x3cec52,_0x165f1a=_0x1f2776;}else{if(_0x38b227){_0x165f1a=_0x38b227;const _0x2142a7=_0x14afcd[_0x471928(0x13c)](_0x50cdd0=>_0x50cdd0['datasetCode']===_0x38b227);_0x510352=_0x2142a7?.['alias'];}else{if(_0x20b800['nonInteractive'])throw CliErrors[_0x471928(0x14a)](_0x471928(0x10b));else{if(_0xdd1e65){const _0x35150e=_0x14afcd[_0x471928(0x151)](_0x519a4e=>_0x519a4e[_0x471928(0x147)]+'\x20('+_0x519a4e['tableName']+')'),_0x209eb2=await promptSelect(_0x471928(0x11b),_0x35150e),_0x564ed2=_0x14afcd[_0x209eb2];if(!_0x564ed2)throw CliErrors[_0x471928(0x14a)](_0x471928(0x150));_0x510352=_0x564ed2[_0x471928(0x147)],_0x165f1a=_0x564ed2[_0x471928(0x110)];}else{const _0x5d8573=await listDatasets(_0x20b800[_0x471928(0x171)]);if(_0x5d8573[_0x471928(0x138)]===0x0)throw CliErrors[_0x471928(0x14a)](_0x471928(0x125));const _0x200402=_0x5d8573['map'](_0x1df676=>_0x1df676[_0x471928(0x10f)]+'\x20['+(_0x1df676[_0x471928(0x15e)]??_0x471928(0x11e))+']\x20('+_0x1df676['code']+')'),_0x38e214=await promptSelect(_0x471928(0x11b),_0x200402),_0x3d5bd2=_0x5d8573[_0x38e214];if(!_0x3d5bd2)throw CliErrors[_0x471928(0x14a)](_0x471928(0x150));_0x165f1a=_0x3d5bd2[_0x471928(0x14d)],_0x510352=undefined;}}}}const _0x14da91=await listDatasets(_0x20b800[_0x471928(0x171)]),_0x3b3779=_0x14da91[_0x471928(0x13c)](_0x11fe7d=>_0x11fe7d[_0x471928(0x14d)]===_0x165f1a);if(!_0x3b3779)throw CliErrors[_0x471928(0x14a)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x165f1a+_0x471928(0x129)+(_0x510352?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+_0x471928(0x131):''));_0x300a7c=_0x3b3779['id'];const _0x1067ef=_0x510352??_0x165f1a,_0x5e2376=await listBffDatasetOperations(_0x20b800['appCode'],_0x300a7c),_0x14a8a6=_0x5e2376?Object[_0x471928(0x157)](_0x5e2376):[];if(_0x14a8a6['length']===0x0)throw CliErrors['validation'](_0x471928(0x170)+_0x1067ef+'.');let _0x16c4e5;const _0x1029a2=_0x20b800[_0x471928(0x16b)](_0x471928(0x14c));if(_0x1029a2){if(!_0x14a8a6[_0x471928(0x10e)](_0x1029a2))throw CliErrors[_0x471928(0x14a)](_0x471928(0x121)+_0x1029a2+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x1067ef+'.\x20'+(_0x471928(0x155)+_0x14a8a6[_0x471928(0x154)](',\x20')));_0x16c4e5=_0x1029a2;}else{if(_0x20b800[_0x471928(0x118)])throw CliErrors['validation']('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x5cc998=await promptSelect(_0x471928(0x169),_0x14a8a6);_0x16c4e5=_0x14a8a6[_0x5cc998]??_0x14a8a6[0x0];}let _0x52d016=normalizeHookFunctionNode(_0x20b800[_0x471928(0x16b)]('function-node'));if(!_0x52d016){if(_0x20b800[_0x471928(0x16b)]('function-node'))throw CliErrors[_0x471928(0x14a)](_0x471928(0x130));if(_0x20b800[_0x471928(0x118)])throw CliErrors[_0x471928(0x14a)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0xb8e143=await promptSelect(_0x471928(0x120),[_0x471928(0x145),_0x471928(0x12b)]);_0x52d016=[_0x471928(0x145),_0x471928(0x12b)][_0xb8e143]??_0x471928(0x145);}return{'alias':_0x510352,'datasetCode':_0x165f1a,'datasetId':_0x300a7c,'operationType':_0x16c4e5,'functionNode':_0x52d016};}async function promptSelect(_0x1ea826,_0x20145d){const _0x174a24=a31_0x1b12c2;if(_0x20145d['length']===0x1)return 0x0;for(const [_0x2a3430,_0x29db00]of _0x20145d[_0x174a24(0x160)]()){process['stderr'][_0x174a24(0x12c)]('\x20\x20'+(_0x2a3430+0x1)+'.\x20'+_0x29db00+'\x0a');}const _0x41dc68=createInterface({'input':process[_0x174a24(0x16f)],'output':process[_0x174a24(0x168)]});while(!![]){const _0x20dbf7=await new Promise(_0x2d56fc=>{const _0x28478c=_0x174a24;_0x41dc68[_0x28478c(0x152)](_0x1ea826+'\x20',_0x2d56fc);}),_0x53c483=Number[_0x174a24(0x16c)](_0x20dbf7[_0x174a24(0x119)](),0xa);if(Number[_0x174a24(0x111)](_0x53c483)&&_0x53c483>=0x1&&_0x53c483<=_0x20145d[_0x174a24(0x138)])return _0x41dc68[_0x174a24(0x13a)](),_0x53c483-0x1;process[_0x174a24(0x168)][_0x174a24(0x12c)]('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x20145d[_0x174a24(0x138)]+'.\x0a');}}function buildFilePath(_0x1917b3,_0x3601d9,_0x54a594,_0x5a5fa2){const _0x5b3f30=a31_0x1b12c2;if(_0x3601d9===_0x5b3f30(0x12a)){if(!_0x5a5fa2)throw CliErrors[_0x5b3f30(0x14a)](_0x5b3f30(0x11c));const _0x2f8f57=_0x5a5fa2['alias']??_0x5a5fa2[_0x5b3f30(0x110)];return join(_0x1917b3['scriptsRootDir'],_0x5b3f30(0x12a),_0x2f8f57,_0x5a5fa2['operationType'],_0x5a5fa2[_0x5b3f30(0x133)],_0x54a594+_0x5b3f30(0x16e));}return join(_0x1917b3[_0x5b3f30(0x11d)],_0x3601d9,_0x54a594+_0x5b3f30(0x16e));}export function generateTemplate(_0x58ba7b,_0x57bd42,_0x11373c,_0x42a4e9,_0xd34750){const _0x382a50=a31_0x1b12c2,_0x1c2a2d=_0x42a4e9?.['trim']()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x469181=getAppBaseUrl(_0x11373c),_0x780e03=_0x382a50(0x16a);if(_0x58ba7b===_0x382a50(0x14b))return'/**\x0a\x20*\x20'+_0x1c2a2d+_0x382a50(0x10c)+_0x57bd42+_0x382a50(0x11a)+_0x469181+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x11373c+_0x382a50(0x16d)+_0x57bd42+_0x382a50(0x143)+_0x57bd42+_0x382a50(0x126)+_0x780e03+_0x382a50(0x114)+_0x57bd42+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x58ba7b===_0x382a50(0x166))return'/**\x0a\x20*\x20'+_0x1c2a2d+_0x382a50(0x165)+_0x57bd42+_0x382a50(0x167)+_0x11373c+'/'+_0x57bd42+_0x382a50(0x11a)+_0x469181+_0x382a50(0x112)+_0x11373c+_0x382a50(0x156)+_0x57bd42+'.js\x0a'+_0x780e03+_0x382a50(0x117)+_0x57bd42+_0x382a50(0x161);if(!_0xd34750)throw CliErrors[_0x382a50(0x14a)](_0x382a50(0x159));const _0x4bda5c=_0xd34750[_0x382a50(0x147)]??_0xd34750[_0x382a50(0x110)],_0x12fbeb=_0xd34750[_0x382a50(0x133)]===_0x382a50(0x145)?'当前请求参数':'当前响应结果',_0x4f9e8e=_0xd34750['functionNode']===_0x382a50(0x145)?_0x382a50(0x113):_0x382a50(0x158);return _0x382a50(0x13f)+_0x1c2a2d+_0x382a50(0x142)+_0x57bd42+_0x382a50(0x134)+_0x11373c+'/'+_0xd34750[_0x382a50(0x110)]+'/'+_0xd34750['operationType']+_0x382a50(0x11a)+_0x469181+'/data/dataset/'+_0xd34750[_0x382a50(0x124)]+_0x382a50(0x14f)+_0x11373c+_0x382a50(0x15c)+_0x4bda5c+'/'+_0xd34750['operationType']+'/'+_0xd34750['functionNode']+'/'+_0x57bd42+'.js\x0a\x20*\x20[触发节点]\x20'+_0xd34750[_0x382a50(0x133)]+'\x0a'+_0x780e03+'\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20'+_0x12fbeb+'\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20'+_0x4f9e8e+_0x382a50(0x139)+_0x57bd42+_0x382a50(0x161);}
@@ -1 +1 @@
1
- const a32_0x573b2e=a32_0x2824;(function(_0x57835b,_0x22bd11){const _0x4fb627=a32_0x2824,_0x3c770=_0x57835b();while(!![]){try{const _0x493b3a=parseInt(_0x4fb627(0x179))/0x1+parseInt(_0x4fb627(0x160))/0x2+parseInt(_0x4fb627(0x170))/0x3*(-parseInt(_0x4fb627(0x180))/0x4)+parseInt(_0x4fb627(0x15e))/0x5+parseInt(_0x4fb627(0x186))/0x6*(parseInt(_0x4fb627(0x16e))/0x7)+-parseInt(_0x4fb627(0x166))/0x8+-parseInt(_0x4fb627(0x169))/0x9;if(_0x493b3a===_0x22bd11)break;else _0x3c770['push'](_0x3c770['shift']());}catch(_0x55c0a6){_0x3c770['push'](_0x3c770['shift']());}}}(a32_0x1042,0x436ba));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';function a32_0x2824(_0x480ff1,_0x3dfd70){_0x480ff1=_0x480ff1-0x15e;const _0x10424b=a32_0x1042();let _0x282422=_0x10424b[_0x480ff1];return _0x282422;}import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x573b2e(0x182),'command':a32_0x573b2e(0x16f),'description':a32_0x573b2e(0x177),'risk':'high-risk-write','flags':[{'name':'target','type':a32_0x573b2e(0x16b),'required':!![],'description':a32_0x573b2e(0x175)}],async 'validate'(_0x10257c){const _0x5aede0=a32_0x573b2e,_0x47186a=loadBffProjectConfig(_0x10257c[_0x5aede0(0x17c)]),_0x164659=await readBffLockFile(_0x47186a[_0x5aede0(0x178)]);if(!_0x164659)throw CliErrors['validation'](_0x5aede0(0x18b));},async 'dryRun'(_0x40de10){const _0x23b826=a32_0x573b2e,_0x5de24d=loadBffProjectConfig(_0x40de10['appCode']),_0x40e385=await readBffLockFile(_0x5de24d[_0x23b826(0x178)]);if(!_0x40e385)throw CliErrors['validation'](_0x23b826(0x15f));const {appLock:_0x426fd9}=ensureLockScope(_0x40e385,_0x40de10[_0x23b826(0x17c)],_0x5de24d['scriptsRoot'],_0x23b826(0x16f)),_0x3766ca=_0x40de10['str'](_0x23b826(0x17a)),_0x1ae3bf=Object['keys'](_0x426fd9[_0x23b826(0x185)]),_0x301b8b=resolveDeleteTarget(_0x3766ca,_0x1ae3bf),_0x344cce=_0x426fd9[_0x23b826(0x185)][_0x301b8b];if(!_0x344cce)throw CliErrors[_0x23b826(0x171)](_0x23b826(0x16a)+_0x301b8b+'\x22.');const _0x205dd3=resolveLocalFilePathFromLockKey(_0x5de24d,_0x301b8b),_0x3105e0=relative(_0x5de24d['projectRoot'],_0x205dd3),_0x3ca81e=join(_0x5de24d[_0x23b826(0x187)],_0x23b826(0x161),_0x3105e0);return{'method':_0x23b826(0x168),'url':_0x23b826(0x16c),'body':{'appCode':_0x40de10[_0x23b826(0x17c)],'target':_0x301b8b,'remoteId':_0x344cce[_0x23b826(0x183)],'localFilePath':_0x205dd3,'trashedPath':_0x3ca81e},'description':_0x23b826(0x173)+_0x301b8b+_0x23b826(0x165)};},async 'execute'(_0xd80449){const _0x3e8442=a32_0x573b2e,_0x219f64=loadBffProjectConfig(_0xd80449[_0x3e8442(0x17c)]),_0x8ebb51=await readBffLockFile(_0x219f64[_0x3e8442(0x178)]);if(!_0x8ebb51)throw CliErrors[_0x3e8442(0x171)](_0x3e8442(0x15f));const {lockData:_0x56ed9e,appLock:_0x2f9bd0}=ensureLockScope(_0x8ebb51,_0xd80449[_0x3e8442(0x17c)],_0x219f64[_0x3e8442(0x174)],_0x3e8442(0x16f)),_0x756fc7=JSON['parse'](JSON[_0x3e8442(0x189)](_0x56ed9e)),_0x44b430=_0x756fc7[_0x3e8442(0x18d)][_0xd80449[_0x3e8442(0x17c)]];if(!_0x44b430)throw new Error(_0x3e8442(0x188)+_0xd80449[_0x3e8442(0x17c)]+_0x3e8442(0x162));const _0x412577=_0xd80449[_0x3e8442(0x18e)](_0x3e8442(0x17a)),_0x33b52f=Object['keys'](_0x44b430[_0x3e8442(0x185)]),_0x16bf27=resolveDeleteTarget(_0x412577,_0x33b52f),_0x1fe6de=_0x44b430[_0x3e8442(0x185)][_0x16bf27];if(!_0x1fe6de)throw CliErrors[_0x3e8442(0x171)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x16bf27+'\x22.');await deleteBffScript(_0x1fe6de[_0x3e8442(0x183)]),delete _0x44b430[_0x3e8442(0x185)][_0x16bf27],_0x44b430['lastSync']=new Date()[_0x3e8442(0x18a)](),await writeBffLockFile(_0x219f64['lockFilePath'],_0x756fc7);const _0x405c05=resolveLocalFilePathFromLockKey(_0x219f64,_0x16bf27);let _0x1484af;await fileExists(_0x405c05)&&(_0x1484af=await moveToTrash(_0x219f64[_0x3e8442(0x172)],_0x219f64['trashDir'],_0x405c05),await cleanupEmptyDirectories(dirname(_0x405c05),_0x219f64[_0x3e8442(0x17d)]));await waitForDeleteSettlement(_0x219f64[_0x3e8442(0x178)],_0xd80449['appCode'],_0x16bf27,_0x405c05),await sleep(0x96);const _0x2794cc={'deleted':_0x16bf27,'remoteId':_0x1fe6de[_0x3e8442(0x183)]};if(_0x1484af)_0x2794cc['trashedTo']=_0x1484af;return{'ok':!![],'data':_0x2794cc,'message':_0x3e8442(0x17f)+_0x16bf27+(_0x1484af?_0x3e8442(0x18c):'')};}};function resolveDeleteTarget(_0x2d8890,_0x40a9ae){const _0x413b1f=a32_0x573b2e;if(_0x2d8890['includes']('/')){const _0x464e25=_0x40a9ae[_0x413b1f(0x16d)](_0x45b7f6=>_0x45b7f6===_0x2d8890);if(!_0x464e25)throw CliErrors[_0x413b1f(0x171)]('Function\x20not\x20found:\x20'+_0x2d8890);return _0x464e25;}const _0xa6c8f6=_0x40a9ae[_0x413b1f(0x17e)](_0x300b80=>_0x300b80['split']('/')['at'](-0x1)===_0x2d8890);if(_0xa6c8f6[_0x413b1f(0x163)]===0x0)throw CliErrors[_0x413b1f(0x171)]('Function\x20not\x20found:\x20'+_0x2d8890);if(_0xa6c8f6['length']>0x1)throw CliErrors['validation'](_0x413b1f(0x184)+_0x2d8890+_0x413b1f(0x181)+_0xa6c8f6['map'](_0x341bfb=>'\x20\x20-\x20'+_0x341bfb)[_0x413b1f(0x167)]('\x0a'));return _0xa6c8f6[0x0];}async function moveToTrash(_0x38fa49,_0x4264e1,_0x4652a8){const _0x4f2e17=a32_0x573b2e,_0x2f9479=new Date()[_0x4f2e17(0x18a)]()[_0x4f2e17(0x164)](/[:.]/g,'-'),_0x15720a=relative(_0x38fa49,_0x4652a8),_0x37e9df=join(_0x4264e1,_0x2f9479,_0x15720a);return await mkdir(dirname(_0x37e9df),{'recursive':!![]}),await rename(_0x4652a8,_0x37e9df),_0x37e9df;}async function cleanupEmptyDirectories(_0x47069d,_0x54da0a){const _0x46fefa=a32_0x573b2e;let _0x52e40b=resolve(_0x47069d);const _0x5303ae=resolve(_0x54da0a);while(_0x52e40b[_0x46fefa(0x176)](''+_0x5303ae+sep)||_0x52e40b===_0x5303ae){if(_0x52e40b===_0x5303ae)return;try{const _0x3322e0=await readdir(_0x52e40b);if(_0x3322e0[_0x46fefa(0x163)]>0x0)return;await rmdir(_0x52e40b);}catch{return;}_0x52e40b=dirname(_0x52e40b);}}function a32_0x1042(){const _0x350755=['Backend\x20Function\x20lock\x20file\x20not\x20found.','904932fPuCif','<timestamp>','\x22\x20not\x20found\x20after\x20ensureLockScope.','length','replace','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','3282496CPhPeW','join','POST','5743026yvRxXs','No\x20lock\x20entry\x20found\x20for\x20\x22','string','/api/management/library/scripts/delete','find','35KOBFDL','delete','3jPzmda','validation','projectRoot','Would\x20delete\x20','scriptsRoot','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','startsWith','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','lockFilePath','491191QIQTfb','target','Local\x20delete\x20not\x20settled\x20for\x20','appCode','scriptsRootDir','filter','Deleted\x20','825596XMiTuY','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','bff','remoteId','Multiple\x20functions\x20match\x20\x22','functions','235092WYuJup','trashDir','Lock\x20scope\x20for\x20app\x20\x22','stringify','toISOString','Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','\x20(local\x20file\x20moved\x20to\x20trash)','apps','str','1957060VmYHep'];a32_0x1042=function(){return _0x350755;};return a32_0x1042();}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x5c42b7,_0x1fa139,_0x4f15a8,_0x5b610e){const _0x456ecb=a32_0x573b2e;for(let _0x35cbe4=0x0;_0x35cbe4<DELETE_SETTLE_RETRY_COUNT;_0x35cbe4+=0x1){const _0x491815=await readBffLockFile(_0x5c42b7),_0x40308e=!!_0x491815?.[_0x456ecb(0x18d)]?.[_0x1fa139]?.['functions']?.[_0x4f15a8],_0x56076b=await fileExists(_0x5b610e);if(!_0x40308e&&!_0x56076b)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x456ecb(0x17b)+_0x4f15a8+'.');}
1
+ const a32_0x322b92=a32_0x3a17;function a32_0x3a17(_0x309d94,_0x3508c7){_0x309d94=_0x309d94-0x10c;const _0x3f531c=a32_0x3f53();let _0x3a17fb=_0x3f531c[_0x309d94];return _0x3a17fb;}(function(_0x3a0c4b,_0x2853ef){const _0x54a4df=a32_0x3a17,_0x435aed=_0x3a0c4b();while(!![]){try{const _0x1086f0=-parseInt(_0x54a4df(0x117))/0x1+parseInt(_0x54a4df(0x128))/0x2+parseInt(_0x54a4df(0x130))/0x3+-parseInt(_0x54a4df(0x125))/0x4+-parseInt(_0x54a4df(0x10f))/0x5+parseInt(_0x54a4df(0x13d))/0x6+-parseInt(_0x54a4df(0x113))/0x7*(-parseInt(_0x54a4df(0x122))/0x8);if(_0x1086f0===_0x2853ef)break;else _0x435aed['push'](_0x435aed['shift']());}catch(_0x3a535b){_0x435aed['push'](_0x435aed['shift']());}}}(a32_0x3f53,0xb8959));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a32_0x3f53(){const _0x27ba40=['\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','appCode','Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','string','target','/api/management/library/scripts/delete','No\x20lock\x20entry\x20found\x20for\x20\x22','scriptsRootDir','35976SggQxS','filter','bff','4553840tRbvru','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','\x22\x20not\x20found\x20after\x20ensureLockScope.','1136350KpTUVm','str','projectRoot','map','high-risk-write','\x20\x20-\x20','length','replace','3407121BoSgUB','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','keys','Backend\x20Function\x20lock\x20file\x20not\x20found.','validation','Function\x20not\x20found:\x20','toISOString','functions','Lock\x20scope\x20for\x20app\x20\x22','delete','find','trashDir','apps','3674268LJGmcx','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','stringify','Deleted\x20','remoteId','4995015VQIqru','Multiple\x20functions\x20match\x20\x22','Local\x20delete\x20not\x20settled\x20for\x20','Would\x20delete\x20','1288rquitZ','lockFilePath','scriptsRoot','includes','250188zwmDZD','parse','split'];a32_0x3f53=function(){return _0x27ba40;};return a32_0x3f53();}import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x322b92(0x124),'command':'delete','description':a32_0x322b92(0x13e),'risk':a32_0x322b92(0x12c),'flags':[{'name':a32_0x322b92(0x11e),'type':a32_0x322b92(0x11d),'required':!![],'description':a32_0x322b92(0x131)}],async 'validate'(_0x18a3ec){const _0x27e204=a32_0x322b92,_0x133463=loadBffProjectConfig(_0x18a3ec[_0x27e204(0x11b)]),_0x53cfd2=await readBffLockFile(_0x133463['lockFilePath']);if(!_0x53cfd2)throw CliErrors[_0x27e204(0x134)](_0x27e204(0x11c));},async 'dryRun'(_0x237efb){const _0x256fc7=a32_0x322b92,_0xf860af=loadBffProjectConfig(_0x237efb[_0x256fc7(0x11b)]),_0x11d3c6=await readBffLockFile(_0xf860af[_0x256fc7(0x114)]);if(!_0x11d3c6)throw CliErrors[_0x256fc7(0x134)]('Backend\x20Function\x20lock\x20file\x20not\x20found.');const {appLock:_0x392114}=ensureLockScope(_0x11d3c6,_0x237efb[_0x256fc7(0x11b)],_0xf860af['scriptsRoot'],_0x256fc7(0x139)),_0x1dabcf=_0x237efb[_0x256fc7(0x129)]('target'),_0x329055=Object[_0x256fc7(0x132)](_0x392114[_0x256fc7(0x137)]),_0x149e61=resolveDeleteTarget(_0x1dabcf,_0x329055),_0x150c47=_0x392114[_0x256fc7(0x137)][_0x149e61];if(!_0x150c47)throw CliErrors[_0x256fc7(0x134)](_0x256fc7(0x120)+_0x149e61+'\x22.');const _0x5c2f0e=resolveLocalFilePathFromLockKey(_0xf860af,_0x149e61),_0xe95eea=relative(_0xf860af[_0x256fc7(0x12a)],_0x5c2f0e),_0x8acff=join(_0xf860af[_0x256fc7(0x13b)],'<timestamp>',_0xe95eea);return{'method':'POST','url':_0x256fc7(0x11f),'body':{'appCode':_0x237efb[_0x256fc7(0x11b)],'target':_0x149e61,'remoteId':_0x150c47[_0x256fc7(0x10e)],'localFilePath':_0x5c2f0e,'trashedPath':_0x8acff},'description':_0x256fc7(0x112)+_0x149e61+_0x256fc7(0x11a)};},async 'execute'(_0x9cd6e9){const _0x3e4f95=a32_0x322b92,_0x1f2a6f=loadBffProjectConfig(_0x9cd6e9[_0x3e4f95(0x11b)]),_0x25bd88=await readBffLockFile(_0x1f2a6f['lockFilePath']);if(!_0x25bd88)throw CliErrors['validation'](_0x3e4f95(0x133));const {lockData:_0x59d401,appLock:_0xe57ea}=ensureLockScope(_0x25bd88,_0x9cd6e9[_0x3e4f95(0x11b)],_0x1f2a6f[_0x3e4f95(0x115)],_0x3e4f95(0x139)),_0x359dea=JSON[_0x3e4f95(0x118)](JSON[_0x3e4f95(0x10c)](_0x59d401)),_0x30a2d7=_0x359dea['apps'][_0x9cd6e9[_0x3e4f95(0x11b)]];if(!_0x30a2d7)throw new Error(_0x3e4f95(0x138)+_0x9cd6e9[_0x3e4f95(0x11b)]+_0x3e4f95(0x127));const _0x42f6c2=_0x9cd6e9['str'](_0x3e4f95(0x11e)),_0x360227=Object[_0x3e4f95(0x132)](_0x30a2d7[_0x3e4f95(0x137)]),_0x5bcdc5=resolveDeleteTarget(_0x42f6c2,_0x360227),_0x4c54bf=_0x30a2d7[_0x3e4f95(0x137)][_0x5bcdc5];if(!_0x4c54bf)throw CliErrors[_0x3e4f95(0x134)](_0x3e4f95(0x120)+_0x5bcdc5+'\x22.');await deleteBffScript(_0x4c54bf['remoteId']),delete _0x30a2d7[_0x3e4f95(0x137)][_0x5bcdc5],_0x30a2d7['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x1f2a6f['lockFilePath'],_0x359dea);const _0x570dd9=resolveLocalFilePathFromLockKey(_0x1f2a6f,_0x5bcdc5);let _0x1736fe;await fileExists(_0x570dd9)&&(_0x1736fe=await moveToTrash(_0x1f2a6f[_0x3e4f95(0x12a)],_0x1f2a6f[_0x3e4f95(0x13b)],_0x570dd9),await cleanupEmptyDirectories(dirname(_0x570dd9),_0x1f2a6f[_0x3e4f95(0x121)]));await waitForDeleteSettlement(_0x1f2a6f[_0x3e4f95(0x114)],_0x9cd6e9[_0x3e4f95(0x11b)],_0x5bcdc5,_0x570dd9),await sleep(0x96);const _0x1cf6ed={'deleted':_0x5bcdc5,'remoteId':_0x4c54bf[_0x3e4f95(0x10e)]};if(_0x1736fe)_0x1cf6ed['trashedTo']=_0x1736fe;return{'ok':!![],'data':_0x1cf6ed,'message':_0x3e4f95(0x10d)+_0x5bcdc5+(_0x1736fe?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x4a0012,_0x48508c){const _0x21d45d=a32_0x322b92;if(_0x4a0012[_0x21d45d(0x116)]('/')){const _0x598ee2=_0x48508c[_0x21d45d(0x13a)](_0x3b03d8=>_0x3b03d8===_0x4a0012);if(!_0x598ee2)throw CliErrors[_0x21d45d(0x134)](_0x21d45d(0x135)+_0x4a0012);return _0x598ee2;}const _0x36f8e7=_0x48508c[_0x21d45d(0x123)](_0x3c7d1a=>_0x3c7d1a[_0x21d45d(0x119)]('/')['at'](-0x1)===_0x4a0012);if(_0x36f8e7['length']===0x0)throw CliErrors['validation'](_0x21d45d(0x135)+_0x4a0012);if(_0x36f8e7['length']>0x1)throw CliErrors[_0x21d45d(0x134)](_0x21d45d(0x110)+_0x4a0012+_0x21d45d(0x126)+_0x36f8e7[_0x21d45d(0x12b)](_0x56f7e7=>_0x21d45d(0x12d)+_0x56f7e7)['join']('\x0a'));return _0x36f8e7[0x0];}async function moveToTrash(_0x46a403,_0x507d9e,_0x1fdb97){const _0x8c8d2=a32_0x322b92,_0x55c1a1=new Date()[_0x8c8d2(0x136)]()[_0x8c8d2(0x12f)](/[:.]/g,'-'),_0x56771e=relative(_0x46a403,_0x1fdb97),_0x2f6c54=join(_0x507d9e,_0x55c1a1,_0x56771e);return await mkdir(dirname(_0x2f6c54),{'recursive':!![]}),await rename(_0x1fdb97,_0x2f6c54),_0x2f6c54;}async function cleanupEmptyDirectories(_0x42658a,_0x2bf953){const _0x285fed=a32_0x322b92;let _0x9b331a=resolve(_0x42658a);const _0x38b4a9=resolve(_0x2bf953);while(_0x9b331a['startsWith'](''+_0x38b4a9+sep)||_0x9b331a===_0x38b4a9){if(_0x9b331a===_0x38b4a9)return;try{const _0x1824da=await readdir(_0x9b331a);if(_0x1824da[_0x285fed(0x12e)]>0x0)return;await rmdir(_0x9b331a);}catch{return;}_0x9b331a=dirname(_0x9b331a);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x58325e,_0x39d10e,_0x1c5b84,_0x40954f){const _0x3fa82b=a32_0x322b92;for(let _0xa21a62=0x0;_0xa21a62<DELETE_SETTLE_RETRY_COUNT;_0xa21a62+=0x1){const _0xd72456=await readBffLockFile(_0x58325e),_0x5ee775=!!_0xd72456?.[_0x3fa82b(0x13c)]?.[_0x39d10e]?.[_0x3fa82b(0x137)]?.[_0x1c5b84],_0x4dc1bf=await fileExists(_0x40954f);if(!_0x5ee775&&!_0x4dc1bf)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x3fa82b(0x111)+_0x1c5b84+'.');}