@lovrabet/rabetbase-cli 2.5.0-beta.6 → 2.5.1-beta.1

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 (312) 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.d.ts +7 -0
  7. package/lib/auth/auth-server.js +1 -1
  8. package/lib/auth/constant.js +1 -1
  9. package/lib/auth/get-cookie.js +1 -1
  10. package/lib/auth/get-session-user.js +1 -1
  11. package/lib/auth/is-session-valid.js +1 -1
  12. package/lib/auth/login-success-html.js +1 -1
  13. package/lib/auth/logout.js +1 -1
  14. package/lib/cli-flags.js +1 -1
  15. package/lib/cli.js +1 -1
  16. package/lib/commands/api/generate.js +1 -1
  17. package/lib/commands/api/index.js +1 -1
  18. package/lib/commands/api/list.js +1 -1
  19. package/lib/commands/api/pull.js +1 -1
  20. package/lib/commands/api/shared.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/members-list.js +1 -1
  24. package/lib/commands/app/remote-directory.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/delete.js +1 -1
  54. package/lib/commands/config/get.js +1 -1
  55. package/lib/commands/config/index.js +1 -1
  56. package/lib/commands/config/init.d.ts +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/business-groups.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.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/doctor.js +1 -1
  99. package/lib/commands/file/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/search.js +1 -1
  110. package/lib/commands/kb/shared.js +1 -1
  111. package/lib/commands/kb/update.js +1 -1
  112. package/lib/commands/logs/index.js +1 -1
  113. package/lib/commands/menu/asset-update.js +1 -1
  114. package/lib/commands/menu/delete.js +1 -1
  115. package/lib/commands/menu/external-link-create.js +1 -1
  116. package/lib/commands/menu/external-link-update.js +1 -1
  117. package/lib/commands/menu/group-create.js +1 -1
  118. package/lib/commands/menu/group-update.js +1 -1
  119. package/lib/commands/menu/index.js +1 -1
  120. package/lib/commands/menu/list.js +1 -1
  121. package/lib/commands/menu/move.js +1 -1
  122. package/lib/commands/menu/regroup-start.js +1 -1
  123. package/lib/commands/menu/rename.js +1 -1
  124. package/lib/commands/menu/shared/compare-table.js +1 -1
  125. package/lib/commands/menu/shared/delete-plan.js +1 -1
  126. package/lib/commands/menu/shared/facts.js +1 -1
  127. package/lib/commands/menu/shared/index.js +1 -1
  128. package/lib/commands/menu/shared/inquirer.js +1 -1
  129. package/lib/commands/menu/shared/local-pages.js +1 -1
  130. package/lib/commands/menu/shared/logic.js +1 -1
  131. package/lib/commands/menu/shared/mutations.js +1 -1
  132. package/lib/commands/menu/shared/service.js +1 -1
  133. package/lib/commands/menu/shared/sync-core.js +1 -1
  134. package/lib/commands/menu/shared/update-core.js +1 -1
  135. package/lib/commands/menu/shared/valid-url.js +1 -1
  136. package/lib/commands/menu/sync.js +1 -1
  137. package/lib/commands/menu/visibility-update.js +1 -1
  138. package/lib/commands/notification/config-create.js +1 -1
  139. package/lib/commands/notification/config-delete.js +1 -1
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.js +1 -1
  142. package/lib/commands/notification/index.js +1 -1
  143. package/lib/commands/notification/shared.js +1 -1
  144. package/lib/commands/ocr/index.js +1 -1
  145. package/lib/commands/page/create.js +1 -1
  146. package/lib/commands/page/custom/detail.js +1 -1
  147. package/lib/commands/page/custom/list.js +1 -1
  148. package/lib/commands/page/custom/publish.js +1 -1
  149. package/lib/commands/page/custom/shared.js +1 -1
  150. package/lib/commands/page/custom/syntax.js +1 -1
  151. package/lib/commands/page/custom/template.js +1 -1
  152. package/lib/commands/page/custom/update.js +1 -1
  153. package/lib/commands/page/data-list-status.js +1 -1
  154. package/lib/commands/page/generate-start.js +1 -1
  155. package/lib/commands/page/generate-status.js +1 -1
  156. package/lib/commands/page/index.js +1 -1
  157. package/lib/commands/page/pull.js +1 -1
  158. package/lib/commands/page/push.js +1 -1
  159. package/lib/commands/page/relation-audit.js +1 -1
  160. package/lib/commands/page/restore.js +1 -1
  161. package/lib/commands/page/shared.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  164. package/lib/commands/project/create/format-elapsed.js +1 -1
  165. package/lib/commands/project/create/main.js +1 -1
  166. package/lib/commands/project/create/materialize-project-template.js +1 -1
  167. package/lib/commands/project/create/project-name.js +1 -1
  168. package/lib/commands/project/create/project-template-archive.js +1 -1
  169. package/lib/commands/project/create/project-template-path.js +1 -1
  170. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  171. package/lib/commands/project/create/use-format-code.js +1 -1
  172. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  173. package/lib/commands/project/index.js +1 -1
  174. package/lib/commands/project/upgrade.js +1 -1
  175. package/lib/commands/registry.js +1 -1
  176. package/lib/commands/role/delete.js +1 -1
  177. package/lib/commands/role/detail.js +1 -1
  178. package/lib/commands/role/index.js +1 -1
  179. package/lib/commands/role/list.js +1 -1
  180. package/lib/commands/role/shared.js +1 -1
  181. package/lib/commands/role/update.js +1 -1
  182. package/lib/commands/role/user-add.js +1 -1
  183. package/lib/commands/role/user-remove.js +1 -1
  184. package/lib/commands/role/user-resolve.js +1 -1
  185. package/lib/commands/run/index.js +1 -1
  186. package/lib/commands/schema.js +1 -1
  187. package/lib/commands/sql/create.js +1 -1
  188. package/lib/commands/sql/delete.js +1 -1
  189. package/lib/commands/sql/detail.js +1 -1
  190. package/lib/commands/sql/exec.js +1 -1
  191. package/lib/commands/sql/index.js +1 -1
  192. package/lib/commands/sql/list.js +1 -1
  193. package/lib/commands/sql/pull.js +1 -1
  194. package/lib/commands/sql/push.js +1 -1
  195. package/lib/commands/sql/shared.js +1 -1
  196. package/lib/commands/sql/status.js +1 -1
  197. package/lib/commands/sql/validate.js +1 -1
  198. package/lib/commands/task/index.js +1 -1
  199. package/lib/commands/task/status.js +1 -1
  200. package/lib/commands/tenant/index.js +1 -1
  201. package/lib/commands/tenant/members-list.js +1 -1
  202. package/lib/commands/tenant/shared.js +1 -1
  203. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  204. package/lib/commands/user-account/index.js +1 -1
  205. package/lib/commands/workspace/add.js +1 -1
  206. package/lib/commands/workspace/index.js +1 -1
  207. package/lib/commands/workspace/remove.js +1 -1
  208. package/lib/config/domain-config.d.ts +1 -1
  209. package/lib/config/domain-config.js +1 -1
  210. package/lib/config/project-routing.d.ts +30 -0
  211. package/lib/config/project-routing.js +1 -0
  212. package/lib/config/schema.d.ts +1 -1
  213. package/lib/config/schema.js +1 -1
  214. package/lib/constant/cdn.js +1 -1
  215. package/lib/constant/cli.js +1 -1
  216. package/lib/constant/defaults.js +1 -1
  217. package/lib/constant/domain.d.ts +7 -2
  218. package/lib/constant/domain.js +1 -1
  219. package/lib/constant/env.js +1 -1
  220. package/lib/constant/output.js +1 -1
  221. package/lib/constant/paths.js +1 -1
  222. package/lib/constant/region.d.ts +2 -2
  223. package/lib/constant/region.js +1 -1
  224. package/lib/constant/risk.js +1 -1
  225. package/lib/constant/routing-profile.d.ts +115 -0
  226. package/lib/constant/routing-profile.js +1 -0
  227. package/lib/context/app-resolver.js +1 -1
  228. package/lib/context/auth-resolver.js +1 -1
  229. package/lib/context/config-loader.js +1 -1
  230. package/lib/context.js +1 -1
  231. package/lib/core/alias-resolver.js +1 -1
  232. package/lib/core/api-client.js +1 -1
  233. package/lib/core/bff/config.js +1 -1
  234. package/lib/core/bff/file-system.js +1 -1
  235. package/lib/core/bff/hash.js +1 -1
  236. package/lib/core/bff/lock.js +1 -1
  237. package/lib/core/bff/utils.js +1 -1
  238. package/lib/core/db-resolver.js +1 -1
  239. package/lib/core/page/file-system.js +1 -1
  240. package/lib/core/page/hash.js +1 -1
  241. package/lib/core/page/lock.js +1 -1
  242. package/lib/core/sql-index-auditor.js +1 -1
  243. package/lib/core/sql-sync/config.js +1 -1
  244. package/lib/core/sql-sync/file-system.js +1 -1
  245. package/lib/core/sql-sync/hash.js +1 -1
  246. package/lib/core/sql-sync/lock.js +1 -1
  247. package/lib/core/sql-sync/utils.js +1 -1
  248. package/lib/core/sql-validator.js +1 -1
  249. package/lib/errors.js +1 -1
  250. package/lib/framework/build-all-flags.js +1 -1
  251. package/lib/framework/error-output.js +1 -1
  252. package/lib/framework/explicit-yes.js +1 -1
  253. package/lib/framework/flags.js +1 -1
  254. package/lib/framework/help.js +1 -1
  255. package/lib/framework/index.js +1 -1
  256. package/lib/framework/output.js +1 -1
  257. package/lib/framework/response.js +1 -1
  258. package/lib/framework/runner-alias.js +1 -1
  259. package/lib/framework/runner.js +1 -1
  260. package/lib/framework/schema-export.js +1 -1
  261. package/lib/framework/types.js +1 -1
  262. package/lib/generated/build-info.d.ts +4 -4
  263. package/lib/generated/build-info.js +1 -1
  264. package/lib/help.js +1 -1
  265. package/lib/postinstall.js +1 -1
  266. package/lib/runtime/confirmation.js +1 -1
  267. package/lib/runtime/event.js +1 -1
  268. package/lib/runtime/index.js +1 -1
  269. package/lib/runtime/queue.js +1 -1
  270. package/lib/runtime/resolve.js +1 -1
  271. package/lib/skills/builtin-skill.js +1 -1
  272. package/lib/skills/main.js +1 -1
  273. package/lib/skills/npx-skills-add.js +1 -1
  274. package/lib/skills/skill-presence.js +1 -1
  275. package/lib/telemetry/cli-command-trace.js +1 -1
  276. package/lib/telemetry/cli-help-trace.js +1 -1
  277. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  278. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  279. package/lib/telemetry/send-cli-trace-log.js +1 -1
  280. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  281. package/lib/utils/ai_config.js +1 -1
  282. package/lib/utils/apply-jq-filter.js +1 -1
  283. package/lib/utils/cdn-config.js +1 -1
  284. package/lib/utils/check-sdk-version.js +1 -1
  285. package/lib/utils/cli-version-check.js +1 -1
  286. package/lib/utils/cli-version-policy.js +1 -1
  287. package/lib/utils/config.js +1 -1
  288. package/lib/utils/entity-with-id.js +1 -1
  289. package/lib/utils/file-utils.js +1 -1
  290. package/lib/utils/guides-cdn.js +1 -1
  291. package/lib/utils/http-client.js +1 -1
  292. package/lib/utils/is-non-interactive.js +1 -1
  293. package/lib/utils/logger.js +1 -1
  294. package/lib/utils/params.js +1 -1
  295. package/lib/utils/platform.js +1 -1
  296. package/lib/utils/sleep.js +1 -1
  297. package/lib/utils/template-replacer.js +1 -1
  298. package/lib/utils/update-notice.js +1 -1
  299. package/lib/utils/version.js +1 -1
  300. package/lib/utils/with-active-cookie.js +1 -1
  301. package/lib/utils/write-cli-side-channel.js +1 -1
  302. package/package.json +1 -2
  303. package/skills/rabetbase/SKILL.md +10 -5
  304. package/skills/rabetbase/guides/frontend-development.md +2 -0
  305. package/skills/rabetbase/guides/sdk-client-generation.md +3 -2
  306. package/skills/rabetbase/guides/typescript-sdk.md +42 -0
  307. package/skills/rabetbase/references/rabetbase-api-pull.md +5 -3
  308. package/skills/rabetbase/references/rabetbase-config.md +9 -5
  309. package/skills/rabetbase/references/rabetbase-init.md +11 -5
  310. package/skills/rabetbase/references/rabetbase-project-create.md +6 -5
  311. package/skills/rabetbase.manifest.json +3 -3
  312. package/templates/README.md +13 -17
@@ -1 +1 @@
1
- (function(_0x691a6a,_0x1a802e){const _0x5bccc9=a19_0xdeda,_0x3ce8f7=_0x691a6a();while(!![]){try{const _0x4de496=parseInt(_0x5bccc9(0x7d))/0x1*(-parseInt(_0x5bccc9(0x7b))/0x2)+parseInt(_0x5bccc9(0x76))/0x3+-parseInt(_0x5bccc9(0x77))/0x4+parseInt(_0x5bccc9(0x7c))/0x5*(-parseInt(_0x5bccc9(0x7a))/0x6)+parseInt(_0x5bccc9(0x79))/0x7+-parseInt(_0x5bccc9(0x78))/0x8+parseInt(_0x5bccc9(0x75))/0x9;if(_0x4de496===_0x1a802e)break;else _0x3ce8f7['push'](_0x3ce8f7['shift']());}catch(_0x50879a){_0x3ce8f7['push'](_0x3ce8f7['shift']());}}}(a19_0x34b4,0x6b343));import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';function a19_0xdeda(_0x1be8d0,_0x597833){_0x1be8d0=_0x1be8d0-0x75;const _0x34b44b=a19_0x34b4();let _0xdeda8b=_0x34b44b[_0x1be8d0];return _0xdeda8b;}export const appDefinitions=[appListDefinition,appMembersListDefinition];function a19_0x34b4(){const _0x1695b1=['358MGuRpT','1073365vazaKJ','983StuMfw','6219693HsjuTx','1350771VXGWHy','1997396GaJuNs','4321832dJoZCI','5095867KhcDfY','6XDcOKY'];a19_0x34b4=function(){return _0x1695b1;};return a19_0x34b4();}
1
+ function a19_0x5073(_0x170474,_0x503caf){_0x170474=_0x170474-0x1b7;const _0x5a82a0=a19_0x5a82();let _0x507335=_0x5a82a0[_0x170474];return _0x507335;}(function(_0xc761aa,_0x23ccae){const _0x17cbe0=a19_0x5073,_0x8419cc=_0xc761aa();while(!![]){try{const _0x1f6d5d=-parseInt(_0x17cbe0(0x1bc))/0x1*(-parseInt(_0x17cbe0(0x1c3))/0x2)+parseInt(_0x17cbe0(0x1b8))/0x3*(-parseInt(_0x17cbe0(0x1c1))/0x4)+-parseInt(_0x17cbe0(0x1bd))/0x5*(-parseInt(_0x17cbe0(0x1b7))/0x6)+-parseInt(_0x17cbe0(0x1b9))/0x7*(parseInt(_0x17cbe0(0x1c0))/0x8)+parseInt(_0x17cbe0(0x1bf))/0x9*(parseInt(_0x17cbe0(0x1ba))/0xa)+-parseInt(_0x17cbe0(0x1c2))/0xb*(-parseInt(_0x17cbe0(0x1be))/0xc)+-parseInt(_0x17cbe0(0x1bb))/0xd;if(_0x1f6d5d===_0x23ccae)break;else _0x8419cc['push'](_0x8419cc['shift']());}catch(_0xd5a706){_0x8419cc['push'](_0x8419cc['shift']());}}}(a19_0x5a82,0x30023));import{appListDefinition}from'../../commands/app/list.js';import{appMembersListDefinition}from'../../commands/app/members-list.js';export const appDefinitions=[appListDefinition,appMembersListDefinition];function a19_0x5a82(){const _0x3088e6=['558GsqaDB','1694552nlGfLP','134580eFOjCx','728079BpDmGH','4qeEiWA','6fTWGbm','6zIcsRF','7OEjvlE','1070XjPTEY','2935842UJCXJM','145019HzNSEH','369845zcFxbK','60JZdMVM'];a19_0x5a82=function(){return _0x3088e6;};return a19_0x5a82();}
@@ -1 +1 @@
1
- const a20_0xaa4699=a20_0x29aa;(function(_0x39a465,_0x1dadf4){const _0x504e96=a20_0x29aa,_0x2c5a3c=_0x39a465();while(!![]){try{const _0x4198ea=parseInt(_0x504e96(0x1c6))/0x1*(-parseInt(_0x504e96(0x1ad))/0x2)+parseInt(_0x504e96(0x1b9))/0x3+parseInt(_0x504e96(0x1b7))/0x4+-parseInt(_0x504e96(0x1ba))/0x5*(parseInt(_0x504e96(0x1b2))/0x6)+-parseInt(_0x504e96(0x1a5))/0x7+parseInt(_0x504e96(0x1c5))/0x8*(parseInt(_0x504e96(0x19c))/0x9)+parseInt(_0x504e96(0x1be))/0xa*(parseInt(_0x504e96(0x1b0))/0xb);if(_0x4198ea===_0x1dadf4)break;else _0x2c5a3c['push'](_0x2c5a3c['shift']());}catch(_0x26e2ca){_0x2c5a3c['push'](_0x2c5a3c['shift']());}}}(a20_0x1679,0xd6dc1));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a20_0x1679(){const _0x2a1801=['app','235965gZKpHB','776985LRflUO','merged','read','.\x20Use\x20`','1885430xTKswj','keys','entries','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','\x20config','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','mergedCli','1544456YdFwRM','29UFJCOJ','63pUIhzw','length','list','find','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','boolean','global','remote','globalConfig','8787254LEVtUC','bool','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','defaultApp','apps','globalPath','\x20in\x20','project','34796WQVmMY','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','appcode','143NhSHZm','object','54oQyTOl','optional','map','projectConfig','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','629556VYVkoD'];a20_0x1679=function(){return _0x2a1801;};return a20_0x1679();}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(_0x5e6fee,_0x476cf4){const _0x2eb48e=a20_0x29aa,_0x2b1369=[],_0xdc62f3=_0x5e6fee[_0x2eb48e(0x1a9)]&&typeof _0x5e6fee[_0x2eb48e(0x1a9)]===_0x2eb48e(0x1b1)?_0x5e6fee[_0x2eb48e(0x1a9)]:{},_0x5a9052=_0x5e6fee[_0x2eb48e(0x1a8)]||undefined,_0x4d7255=_0x5a9052??(Object[_0x2eb48e(0x1bf)](_0xdc62f3)[_0x2eb48e(0x19d)]===0x1?Object[_0x2eb48e(0x1bf)](_0xdc62f3)[0x0]:undefined);for(const [_0x5cc57,_0xe26d45]of Object[_0x2eb48e(0x1c0)](_0xdc62f3)){if(!_0xe26d45||typeof _0xe26d45!=='object'||!_0xe26d45[_0x2eb48e(0x1af)])continue;_0x2b1369['push']({'name':_0x5cc57,'appcode':_0xe26d45[_0x2eb48e(0x1af)],'named':!![],'definedIn':_0x476cf4,'isDefault':_0x5cc57===_0x4d7255,...buildAppProfileListFields(_0xe26d45)});}return _0x2b1369;}function buildMergedItems(_0x12a450,_0x38566d){const _0x295edc=a20_0x29aa,{apps:apps={}}=_0x12a450,_0x5e3d5c=_0x12a450[_0x295edc(0x1a8)],_0x18f33f=_0x5e3d5c??(Object[_0x295edc(0x1bf)](apps)[_0x295edc(0x19d)]===0x1?Object[_0x295edc(0x1bf)](apps)[0x0]:undefined),_0x5b4523=_0x38566d[_0x295edc(0x1a4)]['apps']&&typeof _0x38566d[_0x295edc(0x1a4)]['apps']==='object'?_0x38566d['globalConfig']['apps']:{},_0x53ae19=_0x38566d[_0x295edc(0x1b5)][_0x295edc(0x1a9)]&&typeof _0x38566d[_0x295edc(0x1b5)][_0x295edc(0x1a9)]===_0x295edc(0x1b1)?_0x38566d['projectConfig'][_0x295edc(0x1a9)]:{},_0x5c793d=Object[_0x295edc(0x1c0)](apps),_0x2849be=_0x5c793d[_0x295edc(0x1b4)](([_0x4ea511,_0x2489b0])=>({'name':_0x4ea511,'appcode':_0x2489b0[_0x295edc(0x1af)],'named':!![],'definedIn':appDefinedIn(_0x4ea511,_0x5b4523,_0x53ae19),'isDefault':_0x4ea511===_0x18f33f,...buildAppProfileListFields(_0x2489b0)}));return _0x2849be;}function validateAppListFlags(_0xb98efa){const _0x240ea7=a20_0x29aa;if(!_0xb98efa['bool'](_0x240ea7(0x1a3)))return;if(!_0xb98efa[_0x240ea7(0x1a6)]('global')&&!_0xb98efa[_0x240ea7(0x1a6)](_0x240ea7(0x1ac)))return;throw CliErrors['validation'](_0x240ea7(0x1ae),_0x240ea7(0x1a7));}function a20_0x29aa(_0x251e7a,_0x149625){_0x251e7a=_0x251e7a-0x19c;const _0x167988=a20_0x1679();let _0x29aa89=_0x167988[_0x251e7a];return _0x29aa89;}async function execute(_0x3c1911){const _0x250f99=a20_0x29aa;validateAppListFlags(_0x3c1911);if(_0x3c1911[_0x250f99(0x1a6)](_0x250f99(0x1a3)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x3c1911)};const _0x509251=_0x3c1911[_0x250f99(0x1a6)](_0x250f99(0x1a2)),_0x47b793=_0x3c1911['bool'](_0x250f99(0x1ac)),_0x1ea237=_0x509251?'global':_0x47b793?_0x250f99(0x1ac):_0x250f99(0x1bb),{config:_0x50850b,layers:_0x4664cf}=readRawConfigWithLayers(),_0x2fdf82=resolveDefaultAppSource(_0x4664cf),{defaultApp:_0x1f5d48}=_0x50850b;let _0x1a0c9a,_0x5f303c;switch(_0x1ea237){case _0x250f99(0x1a2):_0x1a0c9a=buildItemsFromLayer(_0x4664cf[_0x250f99(0x1a4)],'global'),_0x5f303c=_0x4664cf[_0x250f99(0x1aa)];break;case _0x250f99(0x1ac):_0x1a0c9a=buildItemsFromLayer(_0x4664cf['projectConfig'],_0x250f99(0x1ac)),_0x5f303c=_0x4664cf['projectPath'];break;default:_0x1a0c9a=buildMergedItems(_0x50850b,_0x4664cf);break;}enrichAppListItemsWithMergedSelection(_0x1a0c9a,_0x3c1911[_0x250f99(0x1c4)]);if(_0x1a0c9a['length']===0x0){const _0x5ee8e7=_0x1ea237==='merged'?'':_0x250f99(0x1ab)+_0x1ea237+_0x250f99(0x1c2);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x5ee8e7+_0x250f99(0x1bd)+CLI_BIN_NAME+_0x250f99(0x1b6)};}const _0x3fcffe=_0x1a0c9a[_0x250f99(0x19f)](_0x1832a5=>_0x1832a5['isCurrent']===!![]),_0x56794f=_0x1f5d48??_0x3fcffe?.['name']??null,_0x30dde0=_0x1ea237===_0x250f99(0x1bb)?{'globalPath':_0x4664cf[_0x250f99(0x1aa)]??null,'projectPath':_0x4664cf['projectPath']??null,'defaultApp':_0x56794f,'defaultAppSource':_0x1f5d48!=null?_0x2fdf82:null}:{'scope':_0x1ea237,'configPath':_0x5f303c??null};return{'ok':!![],'data':{'items':_0x1a0c9a,'meta':_0x30dde0}};}export const appListDefinition={'service':a20_0xaa4699(0x1b8),'command':a20_0xaa4699(0x19e),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0xaa4699(0x1bc),'auth':a20_0xaa4699(0x1b3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'remote','type':'boolean','description':a20_0xaa4699(0x1a0),'default':![]},{'name':a20_0xaa4699(0x1a2),'type':'boolean','description':a20_0xaa4699(0x1c1),'default':![]},{'name':'project','type':a20_0xaa4699(0x1a1),'description':a20_0xaa4699(0x1c3),'default':![]}],async 'validate'(_0x294200){validateAppListFlags(_0x294200);},'execute':execute};
1
+ const a20_0x447f2a=a20_0x152d;(function(_0x22e324,_0x520e52){const _0x3b4704=a20_0x152d,_0x572161=_0x22e324();while(!![]){try{const _0x246935=parseInt(_0x3b4704(0x16a))/0x1+parseInt(_0x3b4704(0x167))/0x2+-parseInt(_0x3b4704(0x189))/0x3+-parseInt(_0x3b4704(0x162))/0x4*(-parseInt(_0x3b4704(0x166))/0x5)+-parseInt(_0x3b4704(0x173))/0x6+-parseInt(_0x3b4704(0x18b))/0x7*(-parseInt(_0x3b4704(0x186))/0x8)+parseInt(_0x3b4704(0x17a))/0x9*(-parseInt(_0x3b4704(0x185))/0xa);if(_0x246935===_0x520e52)break;else _0x572161['push'](_0x572161['shift']());}catch(_0x19eba8){_0x572161['push'](_0x572161['shift']());}}}(a20_0x3a48,0x6041d));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(_0x41b191,_0x47ab57){const _0x35a1cb=a20_0x152d,_0x3bba14=[],_0xaf0755=_0x41b191[_0x35a1cb(0x17e)]&&typeof _0x41b191['apps']===_0x35a1cb(0x170)?_0x41b191[_0x35a1cb(0x17e)]:{},_0x1fb816=_0x41b191[_0x35a1cb(0x17d)]||undefined,_0x1f51ea=_0x1fb816??(Object[_0x35a1cb(0x179)](_0xaf0755)[_0x35a1cb(0x160)]===0x1?Object[_0x35a1cb(0x179)](_0xaf0755)[0x0]:undefined);for(const [_0x45bbc2,_0x19acf2]of Object[_0x35a1cb(0x16b)](_0xaf0755)){if(!_0x19acf2||typeof _0x19acf2!==_0x35a1cb(0x170)||!_0x19acf2['appcode'])continue;_0x3bba14[_0x35a1cb(0x16c)]({'name':_0x45bbc2,'appcode':_0x19acf2[_0x35a1cb(0x180)],'named':!![],'definedIn':_0x47ab57,'isDefault':_0x45bbc2===_0x1f51ea,...buildAppProfileListFields(_0x19acf2)});}return _0x3bba14;}function buildMergedItems(_0x32e646,_0xe88cb6){const _0x659c4f=a20_0x152d,{apps:apps={}}=_0x32e646,_0x44dfc=_0x32e646[_0x659c4f(0x17d)],_0x19622d=_0x44dfc??(Object['keys'](apps)[_0x659c4f(0x160)]===0x1?Object[_0x659c4f(0x179)](apps)[0x0]:undefined),_0x3aa9fa=_0xe88cb6[_0x659c4f(0x164)][_0x659c4f(0x17e)]&&typeof _0xe88cb6[_0x659c4f(0x164)][_0x659c4f(0x17e)]===_0x659c4f(0x170)?_0xe88cb6[_0x659c4f(0x164)]['apps']:{},_0x2a04db=_0xe88cb6[_0x659c4f(0x165)][_0x659c4f(0x17e)]&&typeof _0xe88cb6[_0x659c4f(0x165)]['apps']===_0x659c4f(0x170)?_0xe88cb6[_0x659c4f(0x165)][_0x659c4f(0x17e)]:{},_0x2f7c25=Object['entries'](apps),_0xc33439=_0x2f7c25['map'](([_0x1357f0,_0x20fef4])=>({'name':_0x1357f0,'appcode':_0x20fef4['appcode'],'named':!![],'definedIn':appDefinedIn(_0x1357f0,_0x3aa9fa,_0x2a04db),'isDefault':_0x1357f0===_0x19622d,...buildAppProfileListFields(_0x20fef4)}));return _0xc33439;}function validateAppListFlags(_0xdf25a){const _0x1fa156=a20_0x152d;if(!_0xdf25a['bool'](_0x1fa156(0x17b)))return;if(!_0xdf25a['bool'](_0x1fa156(0x174))&&!_0xdf25a['bool']('project'))return;throw CliErrors[_0x1fa156(0x187)](_0x1fa156(0x163),_0x1fa156(0x184));}function a20_0x3a48(){const _0x9448d4=['remote','merged','defaultApp','apps','\x20config','appcode','boolean','bool','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','23090gAgfCc','1442864vKKoMA','validation','find','1149246oKrGoH','project','7YrCJRB','read','length','isCurrent','6112sVKxeZ','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','globalConfig','projectConfig','1535sFTmAT','1131770COlDku','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','mergedCli','144201GltEIG','entries','push','No\x20apps\x20configured','list','.\x20Use\x20`','object','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','3188346rWEgDk','global','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','app','globalPath','projectPath','keys','198SaVuls'];a20_0x3a48=function(){return _0x9448d4;};return a20_0x3a48();}async function execute(_0x53a7f6){const _0x12fc27=a20_0x152d;validateAppListFlags(_0x53a7f6);if(_0x53a7f6[_0x12fc27(0x182)](_0x12fc27(0x17b)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x53a7f6)};const _0x5e3c72=_0x53a7f6[_0x12fc27(0x182)](_0x12fc27(0x174)),_0x482270=_0x53a7f6[_0x12fc27(0x182)](_0x12fc27(0x18a)),_0x4eef63=_0x5e3c72?_0x12fc27(0x174):_0x482270?_0x12fc27(0x18a):_0x12fc27(0x17c),{config:_0x1f2d96,layers:_0x445073}=readRawConfigWithLayers(),_0x11d8ea=resolveDefaultAppSource(_0x445073),{defaultApp:_0x4eb501}=_0x1f2d96;let _0xbb0349,_0x363aa9;switch(_0x4eef63){case _0x12fc27(0x174):_0xbb0349=buildItemsFromLayer(_0x445073['globalConfig'],'global'),_0x363aa9=_0x445073[_0x12fc27(0x177)];break;case'project':_0xbb0349=buildItemsFromLayer(_0x445073['projectConfig'],_0x12fc27(0x18a)),_0x363aa9=_0x445073[_0x12fc27(0x178)];break;default:_0xbb0349=buildMergedItems(_0x1f2d96,_0x445073);break;}enrichAppListItemsWithMergedSelection(_0xbb0349,_0x53a7f6[_0x12fc27(0x169)]);if(_0xbb0349['length']===0x0){const _0x3ef080=_0x4eef63===_0x12fc27(0x17c)?'':'\x20in\x20'+_0x4eef63+_0x12fc27(0x17f);return{'ok':!![],'data':[],'message':_0x12fc27(0x16d)+_0x3ef080+_0x12fc27(0x16f)+CLI_BIN_NAME+_0x12fc27(0x172)};}const _0x32dafe=_0xbb0349[_0x12fc27(0x188)](_0x533e46=>_0x533e46[_0x12fc27(0x161)]===!![]),_0x52531b=_0x4eb501??_0x32dafe?.['name']??null,_0xb722ca=_0x4eef63===_0x12fc27(0x17c)?{'globalPath':_0x445073[_0x12fc27(0x177)]??null,'projectPath':_0x445073['projectPath']??null,'defaultApp':_0x52531b,'defaultAppSource':_0x4eb501!=null?_0x11d8ea:null}:{'scope':_0x4eef63,'configPath':_0x363aa9??null};return{'ok':!![],'data':{'items':_0xbb0349,'meta':_0xb722ca}};}function a20_0x152d(_0x3f0280,_0x3140ac){_0x3f0280=_0x3f0280-0x15f;const _0x3a48ec=a20_0x3a48();let _0x152d43=_0x3a48ec[_0x3f0280];return _0x152d43;}export const appListDefinition={'service':a20_0x447f2a(0x176),'command':a20_0x447f2a(0x16e),'description':a20_0x447f2a(0x183),'risk':a20_0x447f2a(0x15f),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x447f2a(0x17b),'type':a20_0x447f2a(0x181),'description':a20_0x447f2a(0x175),'default':![]},{'name':a20_0x447f2a(0x174),'type':'boolean','description':a20_0x447f2a(0x171),'default':![]},{'name':a20_0x447f2a(0x18a),'type':a20_0x447f2a(0x181),'description':a20_0x447f2a(0x168),'default':![]}],async 'validate'(_0x18e6f8){validateAppListFlags(_0x18e6f8);},'execute':execute};
@@ -1 +1 @@
1
- const a21_0x58f9d0=a21_0x3b06;function a21_0x2f46(){const _0x5f1ac8=['length','Found\x20','396qCOLZm','170394fWbVJL','appCode','3722140mAgjKY','271355wHKcQB','members-list','List\x20application\x20members\x20with\x20their\x20role\x20memberships','150yXMsbP','\x20application\x20member(s)','4ToBGqG','2OojhkQ','3975900TmkEfD','1083431XPzRvN','read','22053328mTFDKW','110784liaqPy'];a21_0x2f46=function(){return _0x5f1ac8;};return a21_0x2f46();}function a21_0x3b06(_0x254872,_0x5d37c7){_0x254872=_0x254872-0x16d;const _0x2f46e3=a21_0x2f46();let _0x3b061f=_0x2f46e3[_0x254872];return _0x3b061f;}(function(_0x61b64f,_0x2be280){const _0x493bda=a21_0x3b06,_0x37e3d5=_0x61b64f();while(!![]){try{const _0x47f72c=-parseInt(_0x493bda(0x172))/0x1*(-parseInt(_0x493bda(0x170))/0x2)+parseInt(_0x493bda(0x179))/0x3+parseInt(_0x493bda(0x16f))/0x4*(parseInt(_0x493bda(0x17b))/0x5)+parseInt(_0x493bda(0x16d))/0x6*(parseInt(_0x493bda(0x17c))/0x7)+-parseInt(_0x493bda(0x175))/0x8*(parseInt(_0x493bda(0x178))/0x9)+parseInt(_0x493bda(0x171))/0xa+-parseInt(_0x493bda(0x174))/0xb;if(_0x47f72c===_0x2be280)break;else _0x37e3d5['push'](_0x37e3d5['shift']());}catch(_0x37537b){_0x37e3d5['push'](_0x37e3d5['shift']());}}}(a21_0x2f46,0x9b91c));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':'app','command':a21_0x58f9d0(0x17d),'description':a21_0x58f9d0(0x17e),'risk':a21_0x58f9d0(0x173),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x750b02){const _0x5254b0=a21_0x58f9d0,_0x21b941=projectAppMembers(await listRoleUsers(_0x750b02[_0x5254b0(0x17a)]));return{'ok':!![],'data':{'appCode':_0x750b02[_0x5254b0(0x17a)],'items':_0x21b941,'totalCount':_0x21b941[_0x5254b0(0x176)]},'message':_0x5254b0(0x177)+_0x21b941[_0x5254b0(0x176)]+_0x5254b0(0x16e)};}};
1
+ const a21_0x4f46f7=a21_0x243e;(function(_0xf98dfd,_0x323ddb){const _0x279c87=a21_0x243e,_0x70df85=_0xf98dfd();while(!![]){try{const _0x41cc81=-parseInt(_0x279c87(0x1e6))/0x1*(parseInt(_0x279c87(0x1dd))/0x2)+-parseInt(_0x279c87(0x1df))/0x3+parseInt(_0x279c87(0x1dc))/0x4*(-parseInt(_0x279c87(0x1e2))/0x5)+parseInt(_0x279c87(0x1e0))/0x6+parseInt(_0x279c87(0x1db))/0x7+parseInt(_0x279c87(0x1da))/0x8+-parseInt(_0x279c87(0x1e3))/0x9*(-parseInt(_0x279c87(0x1e7))/0xa);if(_0x41cc81===_0x323ddb)break;else _0x70df85['push'](_0x70df85['shift']());}catch(_0x264569){_0x70df85['push'](_0x70df85['shift']());}}}(a21_0x1e90,0x19512));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a21_0x1e90(){const _0x347b6a=['665586FLpqJb','List\x20application\x20members\x20with\x20their\x20role\x20memberships','5zBIEXR','9dTnfCd','\x20application\x20member(s)','Found\x20','108587rYBKPM','1650650agoDEC','length','read','331832dIizwB','714630nyUZVc','798316zLFoPu','2hTDcyJ','members-list','23103CiIGdk'];a21_0x1e90=function(){return _0x347b6a;};return a21_0x1e90();}import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';function a21_0x243e(_0x32a0cc,_0x3487f3){_0x32a0cc=_0x32a0cc-0x1da;const _0x1e90d7=a21_0x1e90();let _0x243eff=_0x1e90d7[_0x32a0cc];return _0x243eff;}export const appMembersListDefinition={'service':'app','command':a21_0x4f46f7(0x1de),'description':a21_0x4f46f7(0x1e1),'risk':a21_0x4f46f7(0x1e9),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x299788){const _0x3e33cf=a21_0x4f46f7,_0x482eac=projectAppMembers(await listRoleUsers(_0x299788['appCode']));return{'ok':!![],'data':{'appCode':_0x299788['appCode'],'items':_0x482eac,'totalCount':_0x482eac[_0x3e33cf(0x1e8)]},'message':_0x3e33cf(0x1e5)+_0x482eac[_0x3e33cf(0x1e8)]+_0x3e33cf(0x1e4)};}};
@@ -1 +1 @@
1
- function a22_0x6e3f(_0x1ce409,_0x52c5f4){_0x1ce409=_0x1ce409-0x14c;const _0x540998=a22_0x5409();let _0x6e3ffb=_0x540998[_0x1ce409];return _0x6e3ffb;}(function(_0x3e08ef,_0x30fc75){const _0x29601e=a22_0x6e3f,_0x16732c=_0x3e08ef();while(!![]){try{const _0x37b6eb=parseInt(_0x29601e(0x14c))/0x1*(parseInt(_0x29601e(0x156))/0x2)+parseInt(_0x29601e(0x154))/0x3*(-parseInt(_0x29601e(0x14f))/0x4)+parseInt(_0x29601e(0x15d))/0x5*(parseInt(_0x29601e(0x159))/0x6)+parseInt(_0x29601e(0x151))/0x7*(parseInt(_0x29601e(0x153))/0x8)+-parseInt(_0x29601e(0x157))/0x9*(parseInt(_0x29601e(0x14d))/0xa)+-parseInt(_0x29601e(0x14e))/0xb+parseInt(_0x29601e(0x15c))/0xc*(parseInt(_0x29601e(0x15b))/0xd);if(_0x37b6eb===_0x30fc75)break;else _0x16732c['push'](_0x16732c['shift']());}catch(_0x186aa8){_0x16732c['push'](_0x16732c['shift']());}}}(a22_0x5409,0x997b6));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x4ddb81){const _0x1fdbc6=a22_0x6e3f,_0x1ba2eb=_0x4ddb81[_0x1fdbc6(0x150)]||getCookie();if(!_0x1ba2eb)throw CliErrors[_0x1fdbc6(0x158)]();return _0x1ba2eb;}function a22_0x5409(){const _0x4faf33=['map','7022oNFItN','99891UhBdia','authRequired','35022TsuHYk','appName','519311eFIbwB','420bVlnoc','355lSArNq','platform','24ZIDZJQ','390ThVZdV','10234389OVefNO','147356UIbnrS','cookie','7QXonVy','appDesc','3413096XzMDfV','27oQdhmb'];a22_0x5409=function(){return _0x4faf33;};return a22_0x5409();}export async function listRemoteAppDirectory(_0x119fbb){const _0x2d1929=a22_0x6e3f,_0x430885=await withActiveCookie(resolveCookie(_0x119fbb),()=>listRemoteApps());return{'items':_0x430885[_0x2d1929(0x155)](_0x20a0f2=>({..._0x20a0f2['id']!=null?{'id':_0x20a0f2['id']}:{},'appCode':_0x20a0f2['appCode'],'appName':_0x20a0f2[_0x2d1929(0x15a)],..._0x20a0f2[_0x2d1929(0x152)]!=null?{'appDesc':_0x20a0f2['appDesc']}:{}})),'meta':{'source':_0x2d1929(0x15e)}};}
1
+ (function(_0xfcd6e9,_0x5a039c){const _0x2b1710=a22_0x1c41,_0x52aac1=_0xfcd6e9();while(!![]){try{const _0x2264af=-parseInt(_0x2b1710(0x1a3))/0x1+-parseInt(_0x2b1710(0x1ad))/0x2+-parseInt(_0x2b1710(0x1ac))/0x3*(-parseInt(_0x2b1710(0x1ae))/0x4)+parseInt(_0x2b1710(0x1a2))/0x5+parseInt(_0x2b1710(0x1aa))/0x6*(parseInt(_0x2b1710(0x1ab))/0x7)+-parseInt(_0x2b1710(0x1a8))/0x8+-parseInt(_0x2b1710(0x1a6))/0x9*(-parseInt(_0x2b1710(0x1a4))/0xa);if(_0x2264af===_0x5a039c)break;else _0x52aac1['push'](_0x52aac1['shift']());}catch(_0x191921){_0x52aac1['push'](_0x52aac1['shift']());}}}(a22_0x4a03,0x864e7));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x2d333f){const _0x42453f=a22_0x1c41,_0x47da0b=_0x2d333f['cookie']||getCookie();if(!_0x47da0b)throw CliErrors[_0x42453f(0x1a7)]();return _0x47da0b;}function a22_0x1c41(_0x3c15da,_0x3cd862){_0x3c15da=_0x3c15da-0x1a1;const _0x4a03e1=a22_0x4a03();let _0x1c4103=_0x4a03e1[_0x3c15da];return _0x1c4103;}export async function listRemoteAppDirectory(_0x136e17){const _0x13bf7c=a22_0x1c41,_0x28d66c=await withActiveCookie(resolveCookie(_0x136e17),()=>listRemoteApps());return{'items':_0x28d66c['map'](_0x586ff9=>({..._0x586ff9['id']!=null?{'id':_0x586ff9['id']}:{},'appCode':_0x586ff9[_0x13bf7c(0x1af)],'appName':_0x586ff9[_0x13bf7c(0x1a1)],..._0x586ff9[_0x13bf7c(0x1a5)]!=null?{'appDesc':_0x586ff9['appDesc']}:{}})),'meta':{'source':_0x13bf7c(0x1a9)}};}function a22_0x4a03(){const _0xc89b28=['appCode','appName','43585VdtxTH','225508uvTzZN','187730GEPKww','appDesc','171WLJiMt','authRequired','3864016RgrgBC','platform','145758aPOYtr','105IKklSI','838455LBLBvq','60280bGokND','8ejRXoI'];a22_0x4a03=function(){return _0xc89b28;};return a22_0x4a03();}
@@ -1 +1 @@
1
- (function(_0x4b26a8,_0x1846eb){const _0xb89686=a23_0x26f2,_0x2b9306=_0x4b26a8();while(!![]){try{const _0x41ad84=parseInt(_0xb89686(0x85))/0x1*(parseInt(_0xb89686(0x71))/0x2)+-parseInt(_0xb89686(0xa1))/0x3+-parseInt(_0xb89686(0xa2))/0x4*(-parseInt(_0xb89686(0x9b))/0x5)+-parseInt(_0xb89686(0x86))/0x6*(parseInt(_0xb89686(0x88))/0x7)+parseInt(_0xb89686(0x8e))/0x8*(-parseInt(_0xb89686(0x6e))/0x9)+-parseInt(_0xb89686(0x9d))/0xa*(-parseInt(_0xb89686(0x7e))/0xb)+parseInt(_0xb89686(0x94))/0xc;if(_0x41ad84===_0x1846eb)break;else _0x2b9306['push'](_0x2b9306['shift']());}catch(_0x1acd29){_0x2b9306['push'](_0x2b9306['shift']());}}}(a23_0x444d,0xc7119));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x4423ab){const _0x2910ef=_0x4423ab?.['trim']();return _0x2910ef?_0x2910ef:null;}export function projectAppMembers(_0x3ba5c6){const _0x58ee17=a23_0x26f2,_0x10b885=new Map(),_0x15115c=[..._0x3ba5c6][_0x58ee17(0x99)]((_0x1fecc2,_0x148fc5)=>_0x1fecc2['id']-_0x148fc5['id']),_0x58ac70=(_0x13dbab,_0x10ac97,_0x3ddd79)=>{const _0x57e640=_0x58ee17;for(const _0x102f3d of _0x10ac97){const _0x4f1449=Number(_0x102f3d[_0x57e640(0x7b)]);if(!Number[_0x57e640(0x8d)](_0x4f1449)||_0x4f1449<=0x0)continue;let _0x40ac92=_0x10b885[_0x57e640(0xa0)](_0x4f1449);if(!_0x40ac92)_0x40ac92={'userId':_0x4f1449,'username':nullableText(_0x102f3d[_0x57e640(0x7d)]),'displayName':nullableText(_0x102f3d[_0x57e640(0x80)]),'status':_0x3ddd79,'roles':[],'roleKeys':new Set()},_0x10b885['set'](_0x4f1449,_0x40ac92);else{_0x40ac92['username']??=nullableText(_0x102f3d[_0x57e640(0x7d)]),_0x40ac92[_0x57e640(0x89)]??=nullableText(_0x102f3d['nickname']);if(_0x3ddd79==='ACTIVE')_0x40ac92[_0x57e640(0x75)]='ACTIVE';}const _0xaffd34=_0x13dbab['id']+':'+_0x3ddd79;if(_0x40ac92[_0x57e640(0x7f)][_0x57e640(0x73)](_0xaffd34))continue;_0x40ac92['roleKeys'][_0x57e640(0x9e)](_0xaffd34),_0x40ac92[_0x57e640(0x8a)][_0x57e640(0x91)]({'roleId':_0x13dbab['id'],'roleName':nullableText(_0x13dbab['roleName']),'roleType':nullableText(_0x13dbab['roleType']),'membershipStatus':_0x3ddd79});}};for(const _0x58c1b5 of _0x15115c){_0x58ac70(_0x58c1b5,_0x58c1b5[_0x58ee17(0x87)]??[],_0x58ee17(0x9c)),_0x58ac70(_0x58c1b5,_0x58c1b5[_0x58ee17(0x7c)]??[],_0x58ee17(0x93));}return[..._0x10b885['values']()][_0x58ee17(0x84)](_0x18a2b4=>({'userId':_0x18a2b4[_0x58ee17(0x7b)],'username':_0x18a2b4['username'],'displayName':_0x18a2b4[_0x58ee17(0x89)],'status':_0x18a2b4[_0x58ee17(0x75)],'roles':_0x18a2b4[_0x58ee17(0x8a)][_0x58ee17(0x99)]((_0x4be45f,_0x40eb92)=>_0x4be45f[_0x58ee17(0x96)]-_0x40eb92[_0x58ee17(0x96)]||(_0x4be45f[_0x58ee17(0x7a)]===_0x40eb92['membershipStatus']?0x0:_0x4be45f[_0x58ee17(0x7a)]===_0x58ee17(0x9c)?-0x1:0x1))}))[_0x58ee17(0x99)]((_0x2ea9ef,_0x139a46)=>_0x2ea9ef['userId']-_0x139a46[_0x58ee17(0x7b)]);}export function enrichAppListItemsWithMergedSelection(_0x335536,_0xc4af62){const _0x144a7b=a23_0x26f2;if(!_0xc4af62)return;const _0x35153c=_0xc4af62[_0x144a7b(0x83)]&&typeof _0xc4af62[_0x144a7b(0x83)]===_0x144a7b(0x8b)?_0xc4af62[_0x144a7b(0x83)]:{},_0x659403=Object[_0x144a7b(0x8f)](_0x35153c)[_0x144a7b(0x82)]>0x0;for(const _0x5f5a38 of _0x335536){_0x5f5a38[_0x144a7b(0x72)]=![];}const _0x3ff716=_0xc4af62[_0x144a7b(0x6f)]!=null?String(_0xc4af62['appCode'])[_0x144a7b(0x9f)]():'';if(_0x659403){const _0x4f9b66=_0xc4af62[_0x144a7b(0x92)]??_0xc4af62[_0x144a7b(0x98)];if(_0x4f9b66)for(const _0x4dc2c4 of _0x335536){_0x4dc2c4[_0x144a7b(0x90)]===!![]&&_0x4dc2c4[_0x144a7b(0x76)]===_0x4f9b66&&(_0x4dc2c4[_0x144a7b(0x72)]=!![]);}for(const _0x40a837 of _0x335536){if(_0x40a837[_0x144a7b(0x90)]!==![])continue;if(_0xc4af62[_0x144a7b(0x98)])continue;_0x3ff716&&String(_0x40a837[_0x144a7b(0x79)]??'')[_0x144a7b(0x9f)]()===_0x3ff716&&(_0x40a837['isCurrent']=!![]);}return;}if(!_0x3ff716)return;for(const _0x4d85b9 of _0x335536){String(_0x4d85b9[_0x144a7b(0x79)]??'')[_0x144a7b(0x9f)]()===_0x3ff716&&(_0x4d85b9[_0x144a7b(0x72)]=!![]);}}export function resolveAppScopeForWrite(_0x3f481f,_0x205d73,_0x29f92e){const _0xc680a5=a23_0x26f2;if(_0x205d73)return _0xc680a5(0x81);const _0x1760a0=_0x29f92e[_0xc680a5(0x77)][_0xc680a5(0x83)]&&typeof _0x29f92e[_0xc680a5(0x77)][_0xc680a5(0x83)]==='object'?_0x29f92e[_0xc680a5(0x77)][_0xc680a5(0x83)]:{},_0x5f371d=_0x29f92e[_0xc680a5(0x8c)][_0xc680a5(0x83)]&&typeof _0x29f92e['globalConfig'][_0xc680a5(0x83)]===_0xc680a5(0x8b)?_0x29f92e[_0xc680a5(0x8c)][_0xc680a5(0x83)]:{};if(Object[_0xc680a5(0x9a)][_0xc680a5(0x97)][_0xc680a5(0x78)](_0x1760a0,_0x3f481f))return _0xc680a5(0x70);if(Object['prototype']['hasOwnProperty'][_0xc680a5(0x78)](_0x5f371d,_0x3f481f))return _0xc680a5(0x81);return _0xc680a5(0x70);}export function appDefinedIn(_0xcef202,_0x33c3a2,_0x267ec7){const _0x59e8a9=a23_0x26f2,_0xea9ffe=Object[_0x59e8a9(0x9a)]['hasOwnProperty'][_0x59e8a9(0x78)](_0x33c3a2,_0xcef202),_0x4c5dce=Object[_0x59e8a9(0x9a)][_0x59e8a9(0x97)][_0x59e8a9(0x78)](_0x267ec7,_0xcef202);if(_0xea9ffe&&_0x4c5dce)return _0x59e8a9(0x95);if(_0x4c5dce)return _0x59e8a9(0x70);return _0x59e8a9(0x81);}function a23_0x444d(){const _0x2ca159=['has','\x20(global)','status','name','projectConfig','call','appcode','membershipStatus','userId','applyUserList','username','18205Facowb','roleKeys','nickname','global','length','apps','map','4OQeroE','786eautnp','userList','71386aixtOi','displayName','roles','object','globalConfig','isFinite','152wwXujB','keys','named','push','currentApp','PENDING','7947096zznpfc','both','roleId','hasOwnProperty','defaultApp','sort','prototype','5OIDtwV','ACTIVE','4210IOMqjh','add','trim','get','2422740FsRVzw','5498396lFGmfY','130851sXQFPQ','appCode','project','250766QFkNFq','isCurrent'];a23_0x444d=function(){return _0x2ca159;};return a23_0x444d();}export function resolveDefaultAppSource(_0x3bdfbb){const _0x2296e3=a23_0x26f2,_0x7b08c1=_0x3bdfbb[_0x2296e3(0x77)][_0x2296e3(0x83)]&&typeof _0x3bdfbb[_0x2296e3(0x77)][_0x2296e3(0x83)]==='object'?_0x3bdfbb[_0x2296e3(0x77)]['apps']:{};if(_0x2296e3(0x98)in _0x3bdfbb[_0x2296e3(0x77)])return _0x2296e3(0x70);if(Object[_0x2296e3(0x8f)](_0x7b08c1)[_0x2296e3(0x82)]>0x0)return _0x2296e3(0x70);if(Object['keys'](_0x3bdfbb[_0x2296e3(0x77)])[_0x2296e3(0x82)]===0x0&&_0x3bdfbb['globalConfig'][_0x2296e3(0x98)])return _0x2296e3(0x81);return null;}export function getConfigPath(_0x5d73ad={}){const _0x23c4e2=a23_0x26f2,_0x4624b1=_0x5d73ad[_0x23c4e2(0x81)]?_0x23c4e2(0x81):'project';return resolveWriteConfigPath(_0x4624b1);}function a23_0x26f2(_0x475765,_0x54516b){_0x475765=_0x475765-0x6e;const _0x444d49=a23_0x444d();let _0x26f2d2=_0x444d49[_0x475765];return _0x26f2d2;}export function readConfig(_0x20d859={}){return readConfigFile(getConfigPath(_0x20d859));}export function writeConfig(_0x48e382,_0x3b0010={}){writeConfigFile(getConfigPath(_0x3b0010),_0x48e382);}export function scopeLabel(_0x3508f8){const _0x941c7=a23_0x26f2;return _0x3508f8[_0x941c7(0x81)]?_0x941c7(0x74):'';}
1
+ (function(_0x2d3389,_0x11415d){const _0x218b48=a23_0x3760,_0x1ae29c=_0x2d3389();while(!![]){try{const _0x19e3fc=-parseInt(_0x218b48(0x160))/0x1+-parseInt(_0x218b48(0x161))/0x2*(parseInt(_0x218b48(0x172))/0x3)+-parseInt(_0x218b48(0x157))/0x4+parseInt(_0x218b48(0x168))/0x5+-parseInt(_0x218b48(0x16c))/0x6+parseInt(_0x218b48(0x148))/0x7+parseInt(_0x218b48(0x146))/0x8;if(_0x19e3fc===_0x11415d)break;else _0x1ae29c['push'](_0x1ae29c['shift']());}catch(_0x1fc854){_0x1ae29c['push'](_0x1ae29c['shift']());}}}(a23_0xf4f8,0x20be1));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x173919){const _0x450114=_0x173919?.['trim']();return _0x450114?_0x450114:null;}export function projectAppMembers(_0x267934){const _0x2d4cc9=a23_0x3760,_0x343b72=new Map(),_0x510f41=[..._0x267934][_0x2d4cc9(0x169)]((_0x3c9891,_0x52f645)=>_0x3c9891['id']-_0x52f645['id']),_0x47fd6e=(_0x2cda71,_0x3e889e,_0x398a39)=>{const _0x139fb0=_0x2d4cc9;for(const _0x8692f9 of _0x3e889e){const _0x418109=Number(_0x8692f9['userId']);if(!Number[_0x139fb0(0x16f)](_0x418109)||_0x418109<=0x0)continue;let _0xff0f03=_0x343b72[_0x139fb0(0x14c)](_0x418109);if(!_0xff0f03)_0xff0f03={'userId':_0x418109,'username':nullableText(_0x8692f9['username']),'displayName':nullableText(_0x8692f9[_0x139fb0(0x164)]),'status':_0x398a39,'roles':[],'roleKeys':new Set()},_0x343b72['set'](_0x418109,_0xff0f03);else{_0xff0f03[_0x139fb0(0x170)]??=nullableText(_0x8692f9['username']),_0xff0f03[_0x139fb0(0x162)]??=nullableText(_0x8692f9[_0x139fb0(0x164)]);if(_0x398a39==='ACTIVE')_0xff0f03[_0x139fb0(0x151)]=_0x139fb0(0x16b);}const _0x54a56f=_0x2cda71['id']+':'+_0x398a39;if(_0xff0f03[_0x139fb0(0x16a)][_0x139fb0(0x147)](_0x54a56f))continue;_0xff0f03[_0x139fb0(0x16a)][_0x139fb0(0x15c)](_0x54a56f),_0xff0f03[_0x139fb0(0x167)][_0x139fb0(0x15b)]({'roleId':_0x2cda71['id'],'roleName':nullableText(_0x2cda71['roleName']),'roleType':nullableText(_0x2cda71[_0x139fb0(0x163)]),'membershipStatus':_0x398a39});}};for(const _0x185f59 of _0x510f41){_0x47fd6e(_0x185f59,_0x185f59['userList']??[],_0x2d4cc9(0x16b)),_0x47fd6e(_0x185f59,_0x185f59[_0x2d4cc9(0x159)]??[],'PENDING');}return[..._0x343b72['values']()][_0x2d4cc9(0x14e)](_0x3e949c=>({'userId':_0x3e949c['userId'],'username':_0x3e949c['username'],'displayName':_0x3e949c['displayName'],'status':_0x3e949c[_0x2d4cc9(0x151)],'roles':_0x3e949c[_0x2d4cc9(0x167)][_0x2d4cc9(0x169)]((_0x37cf40,_0x1e9a43)=>_0x37cf40[_0x2d4cc9(0x156)]-_0x1e9a43[_0x2d4cc9(0x156)]||(_0x37cf40[_0x2d4cc9(0x14d)]===_0x1e9a43[_0x2d4cc9(0x14d)]?0x0:_0x37cf40[_0x2d4cc9(0x14d)]===_0x2d4cc9(0x16b)?-0x1:0x1))}))[_0x2d4cc9(0x169)]((_0x1c0936,_0x301e88)=>_0x1c0936[_0x2d4cc9(0x149)]-_0x301e88[_0x2d4cc9(0x149)]);}export function enrichAppListItemsWithMergedSelection(_0x14f6be,_0x20c447){const _0x4493a4=a23_0x3760;if(!_0x20c447)return;const _0x1bbddb=_0x20c447[_0x4493a4(0x154)]&&typeof _0x20c447[_0x4493a4(0x154)]===_0x4493a4(0x16d)?_0x20c447[_0x4493a4(0x154)]:{},_0x172195=Object[_0x4493a4(0x155)](_0x1bbddb)[_0x4493a4(0x153)]>0x0;for(const _0x3b4e1d of _0x14f6be){_0x3b4e1d[_0x4493a4(0x158)]=![];}const _0x411610=_0x20c447[_0x4493a4(0x15f)]!=null?String(_0x20c447[_0x4493a4(0x15f)])['trim']():'';if(_0x172195){const _0x12144c=_0x20c447[_0x4493a4(0x16e)]??_0x20c447['defaultApp'];if(_0x12144c)for(const _0x13bafa of _0x14f6be){_0x13bafa[_0x4493a4(0x152)]===!![]&&_0x13bafa['name']===_0x12144c&&(_0x13bafa[_0x4493a4(0x158)]=!![]);}for(const _0x57fbee of _0x14f6be){if(_0x57fbee[_0x4493a4(0x152)]!==![])continue;if(_0x20c447[_0x4493a4(0x14b)])continue;_0x411610&&String(_0x57fbee[_0x4493a4(0x166)]??'')[_0x4493a4(0x14a)]()===_0x411610&&(_0x57fbee[_0x4493a4(0x158)]=!![]);}return;}if(!_0x411610)return;for(const _0x1b0e2c of _0x14f6be){String(_0x1b0e2c[_0x4493a4(0x166)]??'')[_0x4493a4(0x14a)]()===_0x411610&&(_0x1b0e2c[_0x4493a4(0x158)]=!![]);}}export function resolveAppScopeForWrite(_0x18e45c,_0x367164,_0x2c18d4){const _0x21d40a=a23_0x3760;if(_0x367164)return _0x21d40a(0x15d);const _0x33180c=_0x2c18d4[_0x21d40a(0x165)][_0x21d40a(0x154)]&&typeof _0x2c18d4[_0x21d40a(0x165)][_0x21d40a(0x154)]===_0x21d40a(0x16d)?_0x2c18d4['projectConfig'][_0x21d40a(0x154)]:{},_0x2716ad=_0x2c18d4[_0x21d40a(0x171)]['apps']&&typeof _0x2c18d4['globalConfig'][_0x21d40a(0x154)]===_0x21d40a(0x16d)?_0x2c18d4[_0x21d40a(0x171)][_0x21d40a(0x154)]:{};if(Object[_0x21d40a(0x15a)]['hasOwnProperty']['call'](_0x33180c,_0x18e45c))return _0x21d40a(0x173);if(Object[_0x21d40a(0x15a)][_0x21d40a(0x14f)]['call'](_0x2716ad,_0x18e45c))return _0x21d40a(0x15d);return _0x21d40a(0x173);}function a23_0x3760(_0x2fb481,_0x56a008){_0x2fb481=_0x2fb481-0x146;const _0xf4f86c=a23_0xf4f8();let _0x3760cc=_0xf4f86c[_0x2fb481];return _0x3760cc;}export function appDefinedIn(_0x4aecd0,_0x4ab2d6,_0x37533f){const _0xf7ec5c=a23_0x3760,_0x75cc9c=Object[_0xf7ec5c(0x15a)][_0xf7ec5c(0x14f)][_0xf7ec5c(0x15e)](_0x4ab2d6,_0x4aecd0),_0x4d5680=Object[_0xf7ec5c(0x15a)][_0xf7ec5c(0x14f)][_0xf7ec5c(0x15e)](_0x37533f,_0x4aecd0);if(_0x75cc9c&&_0x4d5680)return'both';if(_0x4d5680)return'project';return _0xf7ec5c(0x15d);}export function resolveDefaultAppSource(_0x2d7764){const _0x550294=a23_0x3760,_0x1b64c7=_0x2d7764[_0x550294(0x165)][_0x550294(0x154)]&&typeof _0x2d7764[_0x550294(0x165)][_0x550294(0x154)]===_0x550294(0x16d)?_0x2d7764[_0x550294(0x165)]['apps']:{};if(_0x550294(0x14b)in _0x2d7764['projectConfig'])return'project';if(Object[_0x550294(0x155)](_0x1b64c7)[_0x550294(0x153)]>0x0)return _0x550294(0x173);if(Object[_0x550294(0x155)](_0x2d7764[_0x550294(0x165)])[_0x550294(0x153)]===0x0&&_0x2d7764[_0x550294(0x171)]['defaultApp'])return'global';return null;}export function getConfigPath(_0x4c91f0={}){const _0x7966d1=a23_0x3760,_0x3f08a1=_0x4c91f0[_0x7966d1(0x15d)]?_0x7966d1(0x15d):_0x7966d1(0x173);return resolveWriteConfigPath(_0x3f08a1);}export function readConfig(_0x117448={}){return readConfigFile(getConfigPath(_0x117448));}function a23_0xf4f8(){const _0x5517fa=['219265xlsROT','2ESUtId','displayName','roleType','nickname','projectConfig','appcode','roles','564975CBNmJt','sort','roleKeys','ACTIVE','765474KkSdbu','object','currentApp','isFinite','username','globalConfig','137217GwrRIX','project','2787424vSHtII','has','1563751xYWfjq','userId','trim','defaultApp','get','membershipStatus','map','hasOwnProperty','\x20(global)','status','named','length','apps','keys','roleId','632480bGTQoy','isCurrent','applyUserList','prototype','push','add','global','call','appCode'];a23_0xf4f8=function(){return _0x5517fa;};return a23_0xf4f8();}export function writeConfig(_0x91471c,_0xb622f0={}){writeConfigFile(getConfigPath(_0xb622f0),_0x91471c);}export function scopeLabel(_0x1b49ac){const _0x5aa001=a23_0x3760;return _0x1b49ac[_0x5aa001(0x15d)]?_0x5aa001(0x150):'';}
@@ -1 +1 @@
1
- function a24_0x5b0b(_0x2854f4,_0x29333d){_0x2854f4=_0x2854f4-0x192;const _0x15931c=a24_0x1593();let _0x5b0b9b=_0x15931c[_0x2854f4];return _0x5b0b9b;}const a24_0x3d21f5=a24_0x5b0b;(function(_0x128cd9,_0x28e348){const _0x5981ba=a24_0x5b0b,_0x4a8416=_0x128cd9();while(!![]){try{const _0xb1d66c=parseInt(_0x5981ba(0x197))/0x1+parseInt(_0x5981ba(0x196))/0x2+parseInt(_0x5981ba(0x1a3))/0x3*(-parseInt(_0x5981ba(0x19a))/0x4)+-parseInt(_0x5981ba(0x192))/0x5+parseInt(_0x5981ba(0x194))/0x6+parseInt(_0x5981ba(0x19f))/0x7+parseInt(_0x5981ba(0x1a0))/0x8*(-parseInt(_0x5981ba(0x1a1))/0x9);if(_0xb1d66c===_0x28e348)break;else _0x4a8416['push'](_0x4a8416['shift']());}catch(_0x5765fb){_0x4a8416['push'](_0x4a8416['shift']());}}}(a24_0x1593,0x21159));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH='/smartapi/app-config/delete';export const appConfigDelete={'service':'app-config','command':a24_0x3d21f5(0x195),'description':a24_0x3d21f5(0x1a5),'risk':a24_0x3d21f5(0x19b),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0xc8b55a){readKeyArg(_0xc8b55a);},async 'dryRun'(_0x41251d){const _0x1c415d=a24_0x3d21f5,_0x395f11=readKeyArg(_0x41251d),_0x396af3=await mustGetByKey(_0x41251d[_0x1c415d(0x19d)],_0x395f11);return asAppConfigDryRunResult(buildMutationData({'operation':_0x1c415d(0x195),'appCode':_0x41251d[_0x1c415d(0x19d)],'key':_0x395f11,'before':projectAppConfig(_0x396af3),'after':null,'dryRun':!![]}),{'method':_0x1c415d(0x1a6),'url':DELETE_PATH});},async 'execute'(_0x3715c7){const _0x516c26=a24_0x3d21f5,_0x2e4275=readKeyArg(_0x3715c7),_0x1e3e0e=await mustGetByKey(_0x3715c7[_0x516c26(0x19d)],_0x2e4275);return await withAppConfigApiBoundary(_0x516c26(0x195),{'appCode':_0x3715c7[_0x516c26(0x19d)],'key':_0x2e4275},()=>deleteAppConfig({'appCode':_0x3715c7['appCode'],'id':requireAppConfigId(_0x1e3e0e,_0x2e4275,_0x3715c7[_0x516c26(0x19d)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x3715c7['appCode'],'key':_0x2e4275,'before':projectAppConfig(_0x1e3e0e),'after':null,'dryRun':![]}),'message':_0x516c26(0x198)+_0x2e4275};}};function a24_0x1593(){const _0x4708c9=['745388BohJLp','568NsVgKf','25821zxAlTV','App\x20config\x20key\x20not\x20found:\x20','9OktaOS','isFinite','Delete\x20one\x20runtime\x20app-config\x20key','POST','841380CefRjD',',\x20appCode=','972258JxLMDZ','delete','361192Kdvzlg','92199PtGZWd','Deleted\x20app\x20config\x20','validation','45112vVUatQ','high-risk-write','apiError','appCode','get'];a24_0x1593=function(){return _0x4708c9;};return a24_0x1593();}async function mustGetByKey(_0x434155,_0x1307cf){const _0x1c8d98=a24_0x3d21f5,_0x5c03c1=await withAppConfigApiBoundary(_0x1c8d98(0x19e),{'appCode':_0x434155,'key':_0x1307cf},()=>getAppConfigByKey(_0x434155,_0x1307cf));if(!_0x5c03c1)throw CliErrors[_0x1c8d98(0x199)](_0x1c8d98(0x1a2)+_0x1307cf,'appCode:\x20'+_0x434155);return _0x5c03c1;}function requireAppConfigId(_0x5179b0,_0x714b0b,_0x2daa9c){const _0xd579c8=a24_0x3d21f5;if(typeof _0x5179b0['id']==='number'&&Number[_0xd579c8(0x1a4)](_0x5179b0['id'])&&_0x5179b0['id']>0x0)return _0x5179b0['id'];throw CliErrors[_0xd579c8(0x19c)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x714b0b+_0xd579c8(0x193)+_0x2daa9c);}
1
+ function a24_0x9926(){const _0x26f0f4=['294YWSevL','number','validation','POST','get','isFinite','delete','Deleted\x20app\x20config\x20','149832SNLdvD','appCode','high-risk-write','2NplpvQ','1570485xfpIvp','147760yUNaiS','1342908GyCPYh','111973posSyW','614530mdhmnB','/smartapi/app-config/delete','App\x20config\x20server\x20id\x20missing\x20for\x20key=','appCode:\x20','app-config','16364GPtIJc',',\x20appCode=','Delete\x20one\x20runtime\x20app-config\x20key'];a24_0x9926=function(){return _0x26f0f4;};return a24_0x9926();}const a24_0x3b9ef5=a24_0x1d41;(function(_0xa9100a,_0x3f6d58){const _0x29eb8f=a24_0x1d41,_0x484ccd=_0xa9100a();while(!![]){try{const _0x3bf78f=-parseInt(_0x29eb8f(0x153))/0x1*(parseInt(_0x29eb8f(0x14f))/0x2)+parseInt(_0x29eb8f(0x15c))/0x3*(parseInt(_0x29eb8f(0x159))/0x4)+-parseInt(_0x29eb8f(0x154))/0x5+-parseInt(_0x29eb8f(0x152))/0x6+parseInt(_0x29eb8f(0x150))/0x7+parseInt(_0x29eb8f(0x151))/0x8+parseInt(_0x29eb8f(0x164))/0x9;if(_0x3bf78f===_0x3f6d58)break;else _0x484ccd['push'](_0x484ccd['shift']());}catch(_0x14cd86){_0x484ccd['push'](_0x484ccd['shift']());}}}(a24_0x9926,0x313de));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x3b9ef5(0x155);function a24_0x1d41(_0x3cfac9,_0x45493c){_0x3cfac9=_0x3cfac9-0x14d;const _0x9926fd=a24_0x9926();let _0x1d4189=_0x9926fd[_0x3cfac9];return _0x1d4189;}export const appConfigDelete={'service':a24_0x3b9ef5(0x158),'command':a24_0x3b9ef5(0x162),'description':a24_0x3b9ef5(0x15b),'risk':a24_0x3b9ef5(0x14e),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x340756){readKeyArg(_0x340756);},async 'dryRun'(_0x56b799){const _0x11b0d3=a24_0x3b9ef5,_0x184205=readKeyArg(_0x56b799),_0x21b748=await mustGetByKey(_0x56b799['appCode'],_0x184205);return asAppConfigDryRunResult(buildMutationData({'operation':_0x11b0d3(0x162),'appCode':_0x56b799['appCode'],'key':_0x184205,'before':projectAppConfig(_0x21b748),'after':null,'dryRun':!![]}),{'method':_0x11b0d3(0x15f),'url':DELETE_PATH});},async 'execute'(_0x56c82b){const _0x4d2203=a24_0x3b9ef5,_0x10c7d5=readKeyArg(_0x56c82b),_0x960172=await mustGetByKey(_0x56c82b['appCode'],_0x10c7d5);return await withAppConfigApiBoundary('delete',{'appCode':_0x56c82b[_0x4d2203(0x14d)],'key':_0x10c7d5},()=>deleteAppConfig({'appCode':_0x56c82b['appCode'],'id':requireAppConfigId(_0x960172,_0x10c7d5,_0x56c82b[_0x4d2203(0x14d)])})),{'ok':!![],'data':buildMutationData({'operation':_0x4d2203(0x162),'appCode':_0x56c82b['appCode'],'key':_0x10c7d5,'before':projectAppConfig(_0x960172),'after':null,'dryRun':![]}),'message':_0x4d2203(0x163)+_0x10c7d5};}};async function mustGetByKey(_0x1ef5e0,_0x30d5f1){const _0x18ceb4=a24_0x3b9ef5,_0x3a4ef0=await withAppConfigApiBoundary(_0x18ceb4(0x160),{'appCode':_0x1ef5e0,'key':_0x30d5f1},()=>getAppConfigByKey(_0x1ef5e0,_0x30d5f1));if(!_0x3a4ef0)throw CliErrors[_0x18ceb4(0x15e)]('App\x20config\x20key\x20not\x20found:\x20'+_0x30d5f1,_0x18ceb4(0x157)+_0x1ef5e0);return _0x3a4ef0;}function requireAppConfigId(_0x10d970,_0x4a9e2a,_0x1b2e47){const _0x57556a=a24_0x3b9ef5;if(typeof _0x10d970['id']===_0x57556a(0x15d)&&Number[_0x57556a(0x161)](_0x10d970['id'])&&_0x10d970['id']>0x0)return _0x10d970['id'];throw CliErrors['apiError'](_0x57556a(0x156)+_0x4a9e2a+_0x57556a(0x15a)+_0x1b2e47);}
@@ -1 +1 @@
1
- const a25_0xb78f64=a25_0x9849;(function(_0x22cdc2,_0x25bbbf){const _0x35518f=a25_0x9849,_0x198596=_0x22cdc2();while(!![]){try{const _0x3d6aac=-parseInt(_0x35518f(0x129))/0x1*(parseInt(_0x35518f(0x13b))/0x2)+parseInt(_0x35518f(0x12d))/0x3+-parseInt(_0x35518f(0x131))/0x4*(parseInt(_0x35518f(0x13c))/0x5)+-parseInt(_0x35518f(0x139))/0x6*(-parseInt(_0x35518f(0x12e))/0x7)+parseInt(_0x35518f(0x134))/0x8+parseInt(_0x35518f(0x12f))/0x9+-parseInt(_0x35518f(0x133))/0xa;if(_0x3d6aac===_0x25bbbf)break;else _0x198596['push'](_0x198596['shift']());}catch(_0x33dc69){_0x198596['push'](_0x198596['shift']());}}}(a25_0x189d,0x5f5dc));import{getAppConfigByKey}from'../../core/api-client.js';function a25_0x9849(_0x2a6d0d,_0x3c837e){_0x2a6d0d=_0x2a6d0d-0x128;const _0x189d4a=a25_0x189d();let _0x984998=_0x189d4a[_0x2a6d0d];return _0x984998;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a25_0x189d(){const _0x2127f9=['bool','\x20with\x20value\x20revealed','read','1791381ehWwOQ','7XrAVym','2433681DvqEEl','Loaded\x20app\x20config\x20','4FvOWwL','validation','7862360HFTVON','2859664rHafuz','App\x20config\x20key\x20not\x20found:\x20','\x20with\x20value\x20redacted','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','get','4643946vJMzrp','reveal','2wBqTyX','1178785PnogLj','app-config','586372RPTQkY'];a25_0x189d=function(){return _0x2127f9;};return a25_0x189d();}import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0xb78f64(0x128),'command':a25_0xb78f64(0x138),'description':a25_0xb78f64(0x137),'risk':a25_0xb78f64(0x12c),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x35ae23){readKeyArg(_0x35ae23);},async 'execute'(_0x29129e){const _0x1cc6f3=a25_0xb78f64,_0x1e3bf7=readKeyArg(_0x29129e),_0x4c4ae0=await withAppConfigApiBoundary(_0x1cc6f3(0x138),{'appCode':_0x29129e['appCode'],'key':_0x1e3bf7},()=>getAppConfigByKey(_0x29129e['appCode'],_0x1e3bf7));if(!_0x4c4ae0)throw CliErrors[_0x1cc6f3(0x132)](_0x1cc6f3(0x135)+_0x1e3bf7,'appCode:\x20'+_0x29129e['appCode']);const _0x385321=projectAppConfig(_0x4c4ae0,{'reveal':_0x29129e[_0x1cc6f3(0x12a)](_0x1cc6f3(0x13a))});return{'ok':!![],'data':{'config':_0x385321},'message':_0x29129e[_0x1cc6f3(0x12a)](_0x1cc6f3(0x13a))?_0x1cc6f3(0x130)+_0x1e3bf7+_0x1cc6f3(0x12b):'Loaded\x20app\x20config\x20'+_0x1e3bf7+_0x1cc6f3(0x136)};}};
1
+ function a25_0x41ef(_0xb5aa4e,_0x493cfd){_0xb5aa4e=_0xb5aa4e-0x68;const _0x1b1583=a25_0x1b15();let _0x41ef1a=_0x1b1583[_0xb5aa4e];return _0x41ef1a;}const a25_0x38db33=a25_0x41ef;(function(_0x2f8966,_0x507933){const _0x58d58a=a25_0x41ef,_0xf583fc=_0x2f8966();while(!![]){try{const _0x2ebbb9=-parseInt(_0x58d58a(0x6d))/0x1+parseInt(_0x58d58a(0x76))/0x2+parseInt(_0x58d58a(0x7a))/0x3*(-parseInt(_0x58d58a(0x6a))/0x4)+parseInt(_0x58d58a(0x6b))/0x5*(-parseInt(_0x58d58a(0x69))/0x6)+-parseInt(_0x58d58a(0x72))/0x7+-parseInt(_0x58d58a(0x71))/0x8+-parseInt(_0x58d58a(0x68))/0x9*(-parseInt(_0x58d58a(0x74))/0xa);if(_0x2ebbb9===_0x507933)break;else _0xf583fc['push'](_0xf583fc['shift']());}catch(_0xb75fe0){_0xf583fc['push'](_0xf583fc['shift']());}}}(a25_0x1b15,0xbb882));function a25_0x1b15(){const _0x204785=['app-config','11848768PJqjJV','2371397KGMGuK','reveal','15194770VbWJOq','App\x20config\x20key\x20not\x20found:\x20','608254HHRoJt','read','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','appCode:\x20','3XPYctV','appCode','27DQSfzL','768TfskjM','5466764iTSZPu','8810omgVob','Loaded\x20app\x20config\x20','682334eqdTmy','bool','get'];a25_0x1b15=function(){return _0x204785;};return a25_0x1b15();}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x38db33(0x70),'command':a25_0x38db33(0x6f),'description':a25_0x38db33(0x78),'risk':a25_0x38db33(0x77),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x3a9763){readKeyArg(_0x3a9763);},async 'execute'(_0x5ba1d0){const _0x547ce3=a25_0x38db33,_0x2f097b=readKeyArg(_0x5ba1d0),_0x398d27=await withAppConfigApiBoundary(_0x547ce3(0x6f),{'appCode':_0x5ba1d0[_0x547ce3(0x7b)],'key':_0x2f097b},()=>getAppConfigByKey(_0x5ba1d0[_0x547ce3(0x7b)],_0x2f097b));if(!_0x398d27)throw CliErrors['validation'](_0x547ce3(0x75)+_0x2f097b,_0x547ce3(0x79)+_0x5ba1d0['appCode']);const _0x5ecdfc=projectAppConfig(_0x398d27,{'reveal':_0x5ba1d0['bool'](_0x547ce3(0x73))});return{'ok':!![],'data':{'config':_0x5ecdfc},'message':_0x5ba1d0[_0x547ce3(0x6e)]('reveal')?_0x547ce3(0x6c)+_0x2f097b+'\x20with\x20value\x20revealed':_0x547ce3(0x6c)+_0x2f097b+'\x20with\x20value\x20redacted'};}};
@@ -1 +1 @@
1
- function a26_0x2e78(_0x4f3ab9,_0x3e6946){_0x4f3ab9=_0x4f3ab9-0x11f;const _0xe3a3dc=a26_0xe3a3();let _0x2e78f0=_0xe3a3dc[_0x4f3ab9];return _0x2e78f0;}(function(_0x2976f5,_0x1888c8){const _0x3820ea=a26_0x2e78,_0x224a05=_0x2976f5();while(!![]){try{const _0x58138a=-parseInt(_0x3820ea(0x120))/0x1+-parseInt(_0x3820ea(0x124))/0x2*(-parseInt(_0x3820ea(0x129))/0x3)+-parseInt(_0x3820ea(0x123))/0x4*(-parseInt(_0x3820ea(0x12b))/0x5)+parseInt(_0x3820ea(0x11f))/0x6*(parseInt(_0x3820ea(0x125))/0x7)+-parseInt(_0x3820ea(0x126))/0x8*(-parseInt(_0x3820ea(0x122))/0x9)+-parseInt(_0x3820ea(0x127))/0xa*(parseInt(_0x3820ea(0x128))/0xb)+-parseInt(_0x3820ea(0x12a))/0xc*(-parseInt(_0x3820ea(0x121))/0xd);if(_0x58138a===_0x1888c8)break;else _0x224a05['push'](_0x224a05['shift']());}catch(_0xea2750){_0x224a05['push'](_0x224a05['shift']());}}}(a26_0xe3a3,0xcc059));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';function a26_0xe3a3(){const _0x37533e=['20lFhmlq','7409567KzPICf','2651781HpzQIJ','6864252BLuyrP','4885AjALvQ','1494QSSNCk','1263293XNKidK','13TKVQXp','9suLQow','4896adDuki','2iOjaTn','8183kblPtu','4026264yUEacC'];a26_0xe3a3=function(){return _0x37533e;};return a26_0xe3a3();}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
1
+ function a26_0x45c2(){const _0x3cfc7e=['64317SAaOFB','1628kQcjOr','108DteRtl','100ZMZqKN','15516EBATlT','3991ysdUph','678559jRSARg','136ORJSDn','4494VcHBcg','28086boGeLs','30824QtkzSx','490HZlhzG','1235RJkahO'];a26_0x45c2=function(){return _0x3cfc7e;};return a26_0x45c2();}(function(_0xf657c0,_0x18db4f){const _0x5b7dde=a26_0x27a8,_0x4f729c=_0xf657c0();while(!![]){try{const _0x273048=-parseInt(_0x5b7dde(0x125))/0x1*(-parseInt(_0x5b7dde(0x12b))/0x2)+-parseInt(_0x5b7dde(0x12d))/0x3*(-parseInt(_0x5b7dde(0x127))/0x4)+parseInt(_0x5b7dde(0x123))/0x5*(-parseInt(_0x5b7dde(0x12c))/0x6)+parseInt(_0x5b7dde(0x12a))/0x7+-parseInt(_0x5b7dde(0x12e))/0x8*(-parseInt(_0x5b7dde(0x126))/0x9)+-parseInt(_0x5b7dde(0x12f))/0xa*(-parseInt(_0x5b7dde(0x124))/0xb)+parseInt(_0x5b7dde(0x128))/0xc*(-parseInt(_0x5b7dde(0x129))/0xd);if(_0x273048===_0x18db4f)break;else _0x4f729c['push'](_0x4f729c['shift']());}catch(_0x3b5fe9){_0x4f729c['push'](_0x4f729c['shift']());}}}(a26_0x45c2,0x2efdc));import{appConfigList}from'../../commands/app-config/list.js';function a26_0x27a8(_0x32569a,_0x578d1d){_0x32569a=_0x32569a-0x123;const _0x45c2dc=a26_0x45c2();let _0x27a8e5=_0x45c2dc[_0x32569a];return _0x27a8e5;}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 +1 @@
1
- const a27_0x28b2df=a27_0x3be8;(function(_0x1b60ba,_0x41f002){const _0x510ea9=a27_0x3be8,_0x537e09=_0x1b60ba();while(!![]){try{const _0x8a82c4=parseInt(_0x510ea9(0x8b))/0x1*(parseInt(_0x510ea9(0x94))/0x2)+parseInt(_0x510ea9(0x8c))/0x3*(-parseInt(_0x510ea9(0x97))/0x4)+parseInt(_0x510ea9(0x90))/0x5+parseInt(_0x510ea9(0x9b))/0x6+parseInt(_0x510ea9(0x8e))/0x7*(parseInt(_0x510ea9(0x8d))/0x8)+-parseInt(_0x510ea9(0x91))/0x9*(-parseInt(_0x510ea9(0x9a))/0xa)+-parseInt(_0x510ea9(0xa0))/0xb*(parseInt(_0x510ea9(0x98))/0xc);if(_0x8a82c4===_0x41f002)break;else _0x537e09['push'](_0x537e09['shift']());}catch(_0x38981e){_0x537e09['push'](_0x537e09['shift']());}}}(a27_0x2310,0x4e84f));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x3be8(_0x34fe08,_0x39deb9){_0x34fe08=_0x34fe08-0x8a;const _0x231084=a27_0x2310();let _0x3be8ca=_0x231084[_0x34fe08];return _0x3be8ca;}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':'app-config','command':a27_0x28b2df(0x9d),'description':a27_0x28b2df(0x8f),'risk':a27_0x28b2df(0x9e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x28b2df(0x93),'type':'string','description':a27_0x28b2df(0x9f)},TAGS_FLAG],async 'validate'(_0x5c81b2){const _0x24da9d=a27_0x28b2df,_0x175c71=_0x5c81b2[_0x24da9d(0x9c)]('key')[_0x24da9d(0x96)]();if(_0x175c71)validateKey(_0x175c71);readOptionalTags(_0x5c81b2);},async 'execute'(_0x4990a9){const _0x98da91=a27_0x28b2df,_0xeeb3bf=_0x4990a9['str']('key')[_0x98da91(0x96)]()||undefined,_0xd1aa5f=readOptionalTags(_0x4990a9),_0x3b4e30=await withAppConfigApiBoundary(_0x98da91(0x9d),{'appCode':_0x4990a9['appCode']},()=>listAppConfigs(_0x4990a9[_0x98da91(0x8a)],{'key':_0xeeb3bf,'tags':_0xd1aa5f})),_0x48cf0c=_0x3b4e30[_0x98da91(0x99)](_0xe8756a=>projectAppConfig(_0xe8756a));return{'ok':!![],'data':{'appCode':_0x4990a9[_0x98da91(0x8a)],'count':_0x48cf0c['length'],'configs':_0x48cf0c},'message':_0x98da91(0x95)+_0x48cf0c[_0x98da91(0x92)]+'\x20app\x20config(s)'};}};function a27_0x2310(){const _0xf696c8=['trim','1100oNJBAu','8184516wsJHhm','map','170BbmnbR','1444596NtYVVI','str','list','read','Filter\x20by\x20exact\x20config\x20key','11ERgvsA','appCode','171923ZQlrhV','2721aXpzFH','8KwBiyU','3314087VxkHwg','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','833125sKKvoo','106056Jhfqfw','length','key','2nCozow','Found\x20'];a27_0x2310=function(){return _0xf696c8;};return a27_0x2310();}
1
+ const a27_0x2cda4d=a27_0x46d2;(function(_0x1e4bba,_0x5be20d){const _0x4897b0=a27_0x46d2,_0x407b08=_0x1e4bba();while(!![]){try{const _0x551692=-parseInt(_0x4897b0(0x138))/0x1+parseInt(_0x4897b0(0x12d))/0x2*(parseInt(_0x4897b0(0x136))/0x3)+-parseInt(_0x4897b0(0x139))/0x4*(parseInt(_0x4897b0(0x137))/0x5)+-parseInt(_0x4897b0(0x12f))/0x6+-parseInt(_0x4897b0(0x141))/0x7+-parseInt(_0x4897b0(0x12e))/0x8*(-parseInt(_0x4897b0(0x13f))/0x9)+parseInt(_0x4897b0(0x132))/0xa*(parseInt(_0x4897b0(0x13b))/0xb);if(_0x551692===_0x5be20d)break;else _0x407b08['push'](_0x407b08['shift']());}catch(_0x3dca7f){_0x407b08['push'](_0x407b08['shift']());}}}(a27_0x20ea,0x2e73d));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a27_0x46d2(_0x488fa0,_0x1b854a){_0x488fa0=_0x488fa0-0x12b;const _0x20ea3a=a27_0x20ea();let _0x46d26d=_0x20ea3a[_0x488fa0];return _0x46d26d;}function a27_0x20ea(){const _0x32b15b=['app-config','51sRBMYz','173465kwLAkB','65140nhaJrf','4eMYulF','appCode','851719HNHZqp','key','str','\x20app\x20config(s)','183231qkVywZ','trim','2638363RxgnHf','string','map','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','Found\x20','43028JewdAx','136AtXUvn','733554zRzItQ','list','read','10ndFEuo','length','Filter\x20by\x20exact\x20config\x20key'];a27_0x20ea=function(){return _0x32b15b;};return a27_0x20ea();}export const appConfigList={'service':a27_0x2cda4d(0x135),'command':a27_0x2cda4d(0x130),'description':a27_0x2cda4d(0x12b),'risk':a27_0x2cda4d(0x131),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x2cda4d(0x13c),'type':a27_0x2cda4d(0x142),'description':a27_0x2cda4d(0x134)},TAGS_FLAG],async 'validate'(_0x147b75){const _0x58f472=a27_0x2cda4d,_0x1b14fb=_0x147b75[_0x58f472(0x13d)](_0x58f472(0x13c))[_0x58f472(0x140)]();if(_0x1b14fb)validateKey(_0x1b14fb);readOptionalTags(_0x147b75);},async 'execute'(_0x14d9fd){const _0x53b96a=a27_0x2cda4d,_0x545746=_0x14d9fd[_0x53b96a(0x13d)](_0x53b96a(0x13c))[_0x53b96a(0x140)]()||undefined,_0x2c7045=readOptionalTags(_0x14d9fd),_0x83327b=await withAppConfigApiBoundary('list',{'appCode':_0x14d9fd[_0x53b96a(0x13a)]},()=>listAppConfigs(_0x14d9fd[_0x53b96a(0x13a)],{'key':_0x545746,'tags':_0x2c7045})),_0x2cde12=_0x83327b[_0x53b96a(0x143)](_0x56a1e2=>projectAppConfig(_0x56a1e2));return{'ok':!![],'data':{'appCode':_0x14d9fd['appCode'],'count':_0x2cde12[_0x53b96a(0x133)],'configs':_0x2cde12},'message':_0x53b96a(0x12c)+_0x2cde12[_0x53b96a(0x133)]+_0x53b96a(0x13e)};}};
@@ -1 +1 @@
1
- const a28_0x1d9591=a28_0x1e5b;(function(_0x1b89dd,_0x38f58e){const _0x546eb1=a28_0x1e5b,_0x2eafa9=_0x1b89dd();while(!![]){try{const _0x3ba65c=parseInt(_0x546eb1(0x177))/0x1+-parseInt(_0x546eb1(0x174))/0x2*(parseInt(_0x546eb1(0x182))/0x3)+-parseInt(_0x546eb1(0x175))/0x4*(-parseInt(_0x546eb1(0x18c))/0x5)+parseInt(_0x546eb1(0x18d))/0x6*(parseInt(_0x546eb1(0x17e))/0x7)+-parseInt(_0x546eb1(0x187))/0x8+-parseInt(_0x546eb1(0x18e))/0x9*(parseInt(_0x546eb1(0x180))/0xa)+parseInt(_0x546eb1(0x176))/0xb;if(_0x3ba65c===_0x38f58e)break;else _0x2eafa9['push'](_0x2eafa9['shift']());}catch(_0x72549c){_0x2eafa9['push'](_0x2eafa9['shift']());}}}(a28_0x39c6,0x7d64c));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a28_0x39c6(){const _0x3bad80=['update','225izCodO','4573596FCiPJQ','27bZBiLl','appCode','write','200920QTOuNe','17576YJwRzW','1858945ejkAAu','937957xEMtbY','Updated','tags','apiError','Read\x20config\x20value\x20from\x20file','app-config','file','7mwalvv','string','1935850iRhivE',',\x20appCode=','18maqOFX','/smartapi/app-config/create','Created','isFinite','set','2958568IjuhaD','create','\x20app\x20config\x20','get'];a28_0x39c6=function(){return _0x3bad80;};return a28_0x39c6();}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_0x1d9591(0x183),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0x1d9591(0x17c),'command':a28_0x1d9591(0x186),'description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0x1d9591(0x173),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x1d9591(0x17d),'type':a28_0x1d9591(0x17f),'description':a28_0x1d9591(0x17b)}],async 'validate'(_0xc68cfa){readKeyArg(_0xc68cfa),readOptionalTags(_0xc68cfa),assertSingleValueSource(_0xc68cfa);},async 'dryRun'(_0xe2b9bf){const _0x22ccd4=a28_0x1d9591,_0x381c19=readKeyArg(_0xe2b9bf),_0x362105=readOptionalTags(_0xe2b9bf),_0x457e16=assertSingleValueSource(_0xe2b9bf);await assertValueSourceReadable(_0x457e16);const _0x424695=await withAppConfigApiBoundary(_0x22ccd4(0x18a),{'appCode':_0xe2b9bf[_0x22ccd4(0x172)],'key':_0x381c19},()=>getAppConfigByKey(_0xe2b9bf['appCode'],_0x381c19)),_0x17467d=_0x424695?_0x22ccd4(0x18b):'create',_0x36ffce=_0x424695?projectAppConfig(_0x424695):null,_0x4b6aa6=plannedAppConfig({'appCode':_0xe2b9bf[_0x22ccd4(0x172)],'key':_0x381c19,'tags':_0x362105??_0x424695?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x17467d,'appCode':_0xe2b9bf[_0x22ccd4(0x172)],'key':_0x381c19,'before':_0x36ffce,'after':_0x4b6aa6,'dryRun':!![]}),{'method':'POST','url':_0x17467d===_0x22ccd4(0x18b)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x1d2852){const _0x2f1a4a=a28_0x1d9591,_0x4a925a=readKeyArg(_0x1d2852),_0x36173d=readOptionalTags(_0x1d2852),_0x3f0ca5=await withAppConfigApiBoundary('get',{'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a},()=>getAppConfigByKey(_0x1d2852[_0x2f1a4a(0x172)],_0x4a925a)),_0xc9a5f=_0x3f0ca5?projectAppConfig(_0x3f0ca5):null,_0x227d8f=_0x3f0ca5?'update':_0x2f1a4a(0x188),{value:_0x96bc19,warnings:_0x38c038}=await readAppConfigValue(_0x1d2852),_0x109d0f={'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a,'value':_0x96bc19,'tags':_0x36173d??_0x3f0ca5?.[_0x2f1a4a(0x179)]??undefined};await withAppConfigApiBoundary(_0x227d8f,{'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a},async()=>{const _0x5da86a=_0x2f1a4a;_0x3f0ca5?await updateAppConfig({..._0x109d0f,'id':requireAppConfigId(_0x3f0ca5,_0x4a925a,_0x1d2852[_0x5da86a(0x172)])}):await createAppConfig(_0x109d0f);});const _0x55de5a=await withAppConfigApiBoundary(_0x2f1a4a(0x18a),{'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a},()=>getAppConfigByKey(_0x1d2852[_0x2f1a4a(0x172)],_0x4a925a)),_0x155ec4=_0x55de5a?projectAppConfig(_0x55de5a):plannedAppConfig({'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a,'tags':_0x109d0f[_0x2f1a4a(0x179)],'hasValue':_0x96bc19!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x227d8f,'appCode':_0x1d2852['appCode'],'key':_0x4a925a,'before':_0xc9a5f,'after':_0x155ec4,'dryRun':![],'warnings':_0x38c038}),'message':(_0x227d8f==='update'?_0x2f1a4a(0x178):_0x2f1a4a(0x184))+_0x2f1a4a(0x189)+_0x4a925a};}};function a28_0x1e5b(_0x7d1f4b,_0x4d50db){_0x7d1f4b=_0x7d1f4b-0x172;const _0x39c692=a28_0x39c6();let _0x1e5bc8=_0x39c692[_0x7d1f4b];return _0x1e5bc8;}function requireAppConfigId(_0x5f0d90,_0xd44e8c,_0x7bbfba){const _0x5de50f=a28_0x1d9591;if(typeof _0x5f0d90['id']==='number'&&Number[_0x5de50f(0x185)](_0x5f0d90['id'])&&_0x5f0d90['id']>0x0)return _0x5f0d90['id'];throw CliErrors[_0x5de50f(0x17a)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0xd44e8c+_0x5de50f(0x181)+_0x7bbfba);}
1
+ const a28_0x3c5c30=a28_0x4e8d;(function(_0x164637,_0x3a37ce){const _0x17509f=a28_0x4e8d,_0x5d4582=_0x164637();while(!![]){try{const _0x13b583=parseInt(_0x17509f(0x124))/0x1*(-parseInt(_0x17509f(0x138))/0x2)+-parseInt(_0x17509f(0x13b))/0x3*(parseInt(_0x17509f(0x135))/0x4)+-parseInt(_0x17509f(0x13d))/0x5*(parseInt(_0x17509f(0x133))/0x6)+-parseInt(_0x17509f(0x12a))/0x7*(parseInt(_0x17509f(0x139))/0x8)+-parseInt(_0x17509f(0x12e))/0x9+-parseInt(_0x17509f(0x129))/0xa+parseInt(_0x17509f(0x120))/0xb;if(_0x13b583===_0x3a37ce)break;else _0x5d4582['push'](_0x5d4582['shift']());}catch(_0x4034a4){_0x5d4582['push'](_0x5d4582['shift']());}}}(a28_0xfe10,0x8e7ba));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_0x3c5c30(0x127),UPDATE_PATH=a28_0x3c5c30(0x123);export const appConfigSet={'service':a28_0x3c5c30(0x136),'command':a28_0x3c5c30(0x125),'description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0x3c5c30(0x121),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x3c5c30(0x134),'description':a28_0x3c5c30(0x122)}],async 'validate'(_0x1f2e51){readKeyArg(_0x1f2e51),readOptionalTags(_0x1f2e51),assertSingleValueSource(_0x1f2e51);},async 'dryRun'(_0x177dc7){const _0xfe9b40=a28_0x3c5c30,_0x691ad0=readKeyArg(_0x177dc7),_0x47d904=readOptionalTags(_0x177dc7),_0x172758=assertSingleValueSource(_0x177dc7);await assertValueSourceReadable(_0x172758);const _0x58b9c2=await withAppConfigApiBoundary('get',{'appCode':_0x177dc7['appCode'],'key':_0x691ad0},()=>getAppConfigByKey(_0x177dc7['appCode'],_0x691ad0)),_0x2e4b72=_0x58b9c2?_0xfe9b40(0x12d):_0xfe9b40(0x12c),_0x16f47b=_0x58b9c2?projectAppConfig(_0x58b9c2):null,_0x3416f0=plannedAppConfig({'appCode':_0x177dc7[_0xfe9b40(0x126)],'key':_0x691ad0,'tags':_0x47d904??_0x58b9c2?.[_0xfe9b40(0x12b)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x2e4b72,'appCode':_0x177dc7[_0xfe9b40(0x126)],'key':_0x691ad0,'before':_0x16f47b,'after':_0x3416f0,'dryRun':!![]}),{'method':_0xfe9b40(0x131),'url':_0x2e4b72===_0xfe9b40(0x12d)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x385bfb){const _0x127007=a28_0x3c5c30,_0x4aa8f2=readKeyArg(_0x385bfb),_0x371c63=readOptionalTags(_0x385bfb),_0x288a57=await withAppConfigApiBoundary(_0x127007(0x128),{'appCode':_0x385bfb[_0x127007(0x126)],'key':_0x4aa8f2},()=>getAppConfigByKey(_0x385bfb[_0x127007(0x126)],_0x4aa8f2)),_0x28e63e=_0x288a57?projectAppConfig(_0x288a57):null,_0x5f4b5b=_0x288a57?_0x127007(0x12d):_0x127007(0x12c),{value:_0x4a4650,warnings:_0x83aab8}=await readAppConfigValue(_0x385bfb),_0x387588={'appCode':_0x385bfb[_0x127007(0x126)],'key':_0x4aa8f2,'value':_0x4a4650,'tags':_0x371c63??_0x288a57?.['tags']??undefined};await withAppConfigApiBoundary(_0x5f4b5b,{'appCode':_0x385bfb['appCode'],'key':_0x4aa8f2},async()=>{const _0x4bab89=_0x127007;_0x288a57?await updateAppConfig({..._0x387588,'id':requireAppConfigId(_0x288a57,_0x4aa8f2,_0x385bfb[_0x4bab89(0x126)])}):await createAppConfig(_0x387588);});const _0x2d8bd2=await withAppConfigApiBoundary(_0x127007(0x128),{'appCode':_0x385bfb['appCode'],'key':_0x4aa8f2},()=>getAppConfigByKey(_0x385bfb[_0x127007(0x126)],_0x4aa8f2)),_0x32dd22=_0x2d8bd2?projectAppConfig(_0x2d8bd2):plannedAppConfig({'appCode':_0x385bfb[_0x127007(0x126)],'key':_0x4aa8f2,'tags':_0x387588[_0x127007(0x12b)],'hasValue':_0x4a4650!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x5f4b5b,'appCode':_0x385bfb[_0x127007(0x126)],'key':_0x4aa8f2,'before':_0x28e63e,'after':_0x32dd22,'dryRun':![],'warnings':_0x83aab8}),'message':(_0x5f4b5b==='update'?_0x127007(0x137):'Created')+_0x127007(0x132)+_0x4aa8f2};}};function a28_0xfe10(){const _0x3e1a36=['27526wSxPcm','83656nxCEtI','isFinite','219UeUCAw','number','5145kJqojY','37986619hPapHw','write','Read\x20config\x20value\x20from\x20file','/smartapi/app-config/update','51DCqzTs','set','appCode','/smartapi/app-config/create','get','3228610EDduOm','371UeDJYJ','tags','create','update','8651061eCdSaN',',\x20appCode=','App\x20config\x20server\x20id\x20missing\x20for\x20key=','POST','\x20app\x20config\x20','1854bzbOdC','string','632IKJiVn','app-config','Updated'];a28_0xfe10=function(){return _0x3e1a36;};return a28_0xfe10();}function a28_0x4e8d(_0xdb90b8,_0x5a1c15){_0xdb90b8=_0xdb90b8-0x120;const _0xfe1040=a28_0xfe10();let _0x4e8d2d=_0xfe1040[_0xdb90b8];return _0x4e8d2d;}function requireAppConfigId(_0x1218aa,_0x33ab08,_0x7196d8){const _0x4f3c13=a28_0x3c5c30;if(typeof _0x1218aa['id']===_0x4f3c13(0x13c)&&Number[_0x4f3c13(0x13a)](_0x1218aa['id'])&&_0x1218aa['id']>0x0)return _0x1218aa['id'];throw CliErrors['apiError'](_0x4f3c13(0x130)+_0x33ab08+_0x4f3c13(0x12f)+_0x7196d8);}
@@ -1 +1 @@
1
- const a29_0x49386f=a29_0x5ae2;(function(_0x4488e4,_0x3268ea){const _0x3770f9=a29_0x5ae2,_0xef4a5f=_0x4488e4();while(!![]){try{const _0x3faf1e=parseInt(_0x3770f9(0x1c0))/0x1+-parseInt(_0x3770f9(0x194))/0x2*(-parseInt(_0x3770f9(0x1b1))/0x3)+-parseInt(_0x3770f9(0x1a3))/0x4*(-parseInt(_0x3770f9(0x19a))/0x5)+-parseInt(_0x3770f9(0x1a2))/0x6*(-parseInt(_0x3770f9(0x1b3))/0x7)+parseInt(_0x3770f9(0x193))/0x8*(parseInt(_0x3770f9(0x1d2))/0x9)+parseInt(_0x3770f9(0x1b6))/0xa+-parseInt(_0x3770f9(0x1b0))/0xb;if(_0x3faf1e===_0x3268ea)break;else _0xef4a5f['push'](_0xef4a5f['shift']());}catch(_0x2601cd){_0xef4a5f['push'](_0xef4a5f['shift']());}}}(a29_0x5996,0x7becc));function a29_0x5ae2(_0x24fec0,_0x4d3aba){_0x24fec0=_0x24fec0-0x18f;const _0x599674=a29_0x5996();let _0x5ae21c=_0x599674[_0x24fec0];return _0x5ae21c;}import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';function a29_0x5996(){const _0x221875=['Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Value\x20file\x20is\x20not\x20readable:\x20','validation','705519UrXzzJ','trim','Environment\x20variable\x20is\x20not\x20set:\x20','flag','name','Failed\x20to\x20','8HaHDju','4FatcOa','string','\x20app\x20config.','kind','data','utf8','10eEaQGZ','str','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','bool','value','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','path','file','44628EeNKLW','714404RXHKMX','hasValue','end','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','defineProperties','Runtime\x20app-config\x20key','dryRun','from-env','valueRedacted','length','slice','stdin','error','23100495HiPGXB','1091019CizoZP','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','553OjVCHq','gmtCreate','App\x20config\x20value\x20source\x20is\x20ambiguous.','6625990nFGzCI','after','warnings','url','push','method','before','tags','key:\x20','apiError','194501JUGZox','Read\x20config\x20value\x20from\x20stdin','value\x20is\x20redacted','env','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','join','Config\x20tags\x20for\x20filtering/display\x20metadata','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','key','args','argument','appCode','Missing\x20app-config\x20key.','reveal','once'];a29_0x5996=function(){return _0x221875;};return a29_0x5996();}export const KEY_ARG={'name':a29_0x49386f(0x1c8),'description':a29_0x49386f(0x1a8),'required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x49386f(0x1c4),'required':![]};export const TAGS_FLAG={'name':a29_0x49386f(0x1bd),'type':a29_0x49386f(0x195),'description':a29_0x49386f(0x1c6)};export const STDIN_FLAG={'name':'stdin','type':'boolean','description':a29_0x49386f(0x1c1),'default':![]};export const FROM_ENV_FLAG={'name':'from-env','type':a29_0x49386f(0x195),'description':a29_0x49386f(0x19f)};export const REVEAL_FLAG={'name':'reveal','type':'boolean','description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};export function readKeyArg(_0x24ec3a){const _0x6d7890=a29_0x49386f,_0x99175d=_0x24ec3a[_0x6d7890(0x1c9)][0x0]?.[_0x6d7890(0x1d3)]()??'';return validateKey(_0x99175d),_0x99175d;}export function readOptionalTags(_0x5ec3c6){const _0x3b27e2=a29_0x49386f,_0x5f38d6=_0x5ec3c6[_0x3b27e2(0x19b)](_0x3b27e2(0x1bd))[_0x3b27e2(0x1d3)]();if(!_0x5f38d6)return undefined;if(_0x5f38d6[_0x3b27e2(0x1ac)]>0x20)throw CliErrors['validation'](_0x3b27e2(0x1a6));return _0x5f38d6;}export function validateKey(_0x30da6e){const _0x355f7a=a29_0x49386f;if(!_0x30da6e)throw CliErrors['validation'](_0x355f7a(0x1cc));if(_0x30da6e[_0x355f7a(0x1ac)]>0x100)throw CliErrors['validation'](_0x355f7a(0x1b2));}export function projectAppConfig(_0x2451ef,_0x5a5c1f){const _0xc306c=a29_0x49386f,_0x28f66f=_0x2451ef['value']!==undefined&&_0x2451ef[_0xc306c(0x19e)]!==null&&_0x2451ef[_0xc306c(0x19e)]!=='',_0x513519={'appCode':_0x2451ef[_0xc306c(0x1cb)],'key':_0x2451ef[_0xc306c(0x1c8)],'tags':_0x2451ef[_0xc306c(0x1bd)]??undefined,'hasValue':_0x28f66f,'valueRedacted':_0x28f66f&&!_0x5a5c1f?.[_0xc306c(0x1cd)],'gmtCreate':_0x2451ef[_0xc306c(0x1b4)],'gmtModified':_0x2451ef['gmtModified']};return _0x5a5c1f?.[_0xc306c(0x1cd)]&&(_0x513519[_0xc306c(0x19e)]=_0x2451ef[_0xc306c(0x19e)]??'',_0x513519[_0xc306c(0x1ab)]=![]),_0x513519;}export function plannedAppConfig(_0x105773){const _0x38e30e=a29_0x49386f,_0x368799=_0x105773[_0x38e30e(0x1a4)]??!![];return{'appCode':_0x105773[_0x38e30e(0x1cb)],'key':_0x105773[_0x38e30e(0x1c8)],'tags':_0x105773['tags']??undefined,'hasValue':_0x368799,'valueRedacted':_0x368799};}export function buildMutationData(_0x326967){const _0x27d8e1=a29_0x49386f;return{'operation':_0x326967['operation'],'selector':{'appCode':_0x326967[_0x27d8e1(0x1cb)],'key':_0x326967[_0x27d8e1(0x1c8)]},'before':_0x326967[_0x27d8e1(0x1bc)],'after':_0x326967[_0x27d8e1(0x1b7)],'dryRun':_0x326967[_0x27d8e1(0x1a9)],'warnings':_0x326967[_0x27d8e1(0x1b8)]??[]};}export async function withAppConfigApiBoundary(_0x5dfa14,_0x109fed,_0x2bde22){const _0x13ba97=a29_0x49386f;try{return await _0x2bde22();}catch{const _0xdaaf68=['appCode:\x20'+_0x109fed[_0x13ba97(0x1cb)]];if(_0x109fed[_0x13ba97(0x1c8)])_0xdaaf68['push'](_0x13ba97(0x1be)+_0x109fed[_0x13ba97(0x1c8)]);_0xdaaf68[_0x13ba97(0x1ba)](_0x13ba97(0x1c2));throw CliErrors[_0x13ba97(0x1bf)](_0x13ba97(0x192)+_0x5dfa14+_0x13ba97(0x196),_0xdaaf68[_0x13ba97(0x1c5)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x348525,_0x2c25cd){const _0xa8dd6e=a29_0x49386f;return Object[_0xa8dd6e(0x1a7)](_0x348525,{'method':{'value':_0x2c25cd[_0xa8dd6e(0x1bb)],'enumerable':![]},'url':{'value':_0x2c25cd[_0xa8dd6e(0x1b9)],'enumerable':![]}});}export function assertSingleValueSource(_0x262554){const _0x2b07fb=a29_0x49386f,_0x4a2788=[];_0x262554['args'][_0x2b07fb(0x1ac)]>0x1&&_0x4a2788['push']({'kind':_0x2b07fb(0x1ca),'value':_0x262554['args'][_0x2b07fb(0x1ad)](0x1)['join']('\x20')});const _0x79e18=_0x262554[_0x2b07fb(0x190)]('value');_0x79e18!==undefined&&_0x79e18!==null&&_0x4a2788[_0x2b07fb(0x1ba)]({'kind':_0x2b07fb(0x1ca),'value':String(_0x79e18)});_0x262554[_0x2b07fb(0x19d)]('stdin')&&_0x4a2788[_0x2b07fb(0x1ba)]({'kind':_0x2b07fb(0x1ae)});const _0x57bfb4=_0x262554[_0x2b07fb(0x19b)](_0x2b07fb(0x1aa))[_0x2b07fb(0x1d3)]();_0x57bfb4&&_0x4a2788['push']({'kind':_0x2b07fb(0x1c3),'name':_0x57bfb4});const _0x2fd91d=_0x262554[_0x2b07fb(0x19b)](_0x2b07fb(0x1a1))[_0x2b07fb(0x1d3)]();_0x2fd91d&&_0x4a2788[_0x2b07fb(0x1ba)]({'kind':_0x2b07fb(0x1a1),'path':_0x2fd91d});if(_0x4a2788[_0x2b07fb(0x1ac)]===0x0)throw CliErrors[_0x2b07fb(0x1d1)]('Missing\x20app-config\x20value\x20source.',_0x2b07fb(0x19c));if(_0x4a2788[_0x2b07fb(0x1ac)]>0x1)throw CliErrors[_0x2b07fb(0x1d1)](_0x2b07fb(0x1b5),_0x2b07fb(0x1c7));return _0x4a2788[0x0];}export async function assertValueSourceReadable(_0x4b1021){const _0x1edd21=a29_0x49386f;if(_0x4b1021[_0x1edd21(0x197)]==='env'&&!(_0x4b1021['name']in process.env))throw CliErrors[_0x1edd21(0x1d1)](_0x1edd21(0x18f)+_0x4b1021[_0x1edd21(0x191)]);if(_0x4b1021[_0x1edd21(0x197)]==='file')try{await access(_0x4b1021[_0x1edd21(0x1a0)]);}catch{throw CliErrors[_0x1edd21(0x1d1)](_0x1edd21(0x1d0)+_0x4b1021[_0x1edd21(0x1a0)]);}}export async function readAppConfigValue(_0x28545){const _0xf4e9a9=a29_0x49386f,_0x58ba71=assertSingleValueSource(_0x28545),_0x5beeec=[];if(_0x58ba71[_0xf4e9a9(0x197)]===_0xf4e9a9(0x1ca))return _0x5beeec[_0xf4e9a9(0x1ba)](_0xf4e9a9(0x1cf)),{'value':_0x58ba71[_0xf4e9a9(0x19e)]??'','source':_0x58ba71[_0xf4e9a9(0x197)],'warnings':_0x5beeec};if(_0x58ba71[_0xf4e9a9(0x197)]==='stdin')return{'value':await readStdin(),'source':_0x58ba71['kind'],'warnings':_0x5beeec};if(_0x58ba71[_0xf4e9a9(0x197)]===_0xf4e9a9(0x1c3)){if(!(_0x58ba71[_0xf4e9a9(0x191)]in process.env))throw CliErrors[_0xf4e9a9(0x1d1)](_0xf4e9a9(0x18f)+_0x58ba71['name']);return{'value':process.env[_0x58ba71.name]??'','source':_0x58ba71[_0xf4e9a9(0x197)],'warnings':_0x5beeec};}return{'value':await readFile(_0x58ba71[_0xf4e9a9(0x1a0)],'utf8'),'source':_0x58ba71[_0xf4e9a9(0x197)],'warnings':_0x5beeec};}function readStdin(){return new Promise((_0x57f3a7,_0x5cd19d)=>{const _0x274ef6=a29_0x5ae2;let _0x4f8ab1='';process[_0x274ef6(0x1ae)]['setEncoding'](_0x274ef6(0x199)),process[_0x274ef6(0x1ae)]['on'](_0x274ef6(0x198),_0x287aa6=>{_0x4f8ab1+=_0x287aa6;}),process[_0x274ef6(0x1ae)][_0x274ef6(0x1ce)](_0x274ef6(0x1a5),()=>_0x57f3a7(_0x4f8ab1)),process[_0x274ef6(0x1ae)]['once'](_0x274ef6(0x1af),_0x5cd19d);});}
1
+ const a29_0x34ac7c=a29_0x1470;(function(_0x4a9c50,_0x55fb8c){const _0x6643ed=a29_0x1470,_0x411979=_0x4a9c50();while(!![]){try{const _0x1e5f59=-parseInt(_0x6643ed(0x1fa))/0x1+-parseInt(_0x6643ed(0x1f1))/0x2+parseInt(_0x6643ed(0x200))/0x3*(-parseInt(_0x6643ed(0x1f4))/0x4)+parseInt(_0x6643ed(0x1ec))/0x5+parseInt(_0x6643ed(0x1ea))/0x6+-parseInt(_0x6643ed(0x1fd))/0x7+parseInt(_0x6643ed(0x1f9))/0x8;if(_0x1e5f59===_0x55fb8c)break;else _0x411979['push'](_0x411979['shift']());}catch(_0x5463a9){_0x411979['push'](_0x411979['shift']());}}}(a29_0x46bb,0x73a5d));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x34ac7c(0x1e9),'description':a29_0x34ac7c(0x209),'required':!![]};export const VALUE_ARG={'name':a29_0x34ac7c(0x1f3),'description':a29_0x34ac7c(0x1f7),'required':![]};export const TAGS_FLAG={'name':a29_0x34ac7c(0x218),'type':a29_0x34ac7c(0x1e5),'description':a29_0x34ac7c(0x1e4)};export const STDIN_FLAG={'name':a29_0x34ac7c(0x1fb),'type':a29_0x34ac7c(0x212),'description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a29_0x34ac7c(0x20e),'type':a29_0x34ac7c(0x1e5),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':'reveal','type':a29_0x34ac7c(0x212),'description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};export function readKeyArg(_0x78fe4f){const _0xcd05c7=a29_0x34ac7c,_0x2a82d9=_0x78fe4f[_0xcd05c7(0x1de)][0x0]?.['trim']()??'';return validateKey(_0x2a82d9),_0x2a82d9;}export function readOptionalTags(_0x589b0d){const _0x39da41=a29_0x34ac7c,_0x1647c0=_0x589b0d[_0x39da41(0x1ee)](_0x39da41(0x218))['trim']();if(!_0x1647c0)return undefined;if(_0x1647c0['length']>0x20)throw CliErrors['validation'](_0x39da41(0x20f));return _0x1647c0;}function a29_0x1470(_0x2781c2,_0x540aaa){_0x2781c2=_0x2781c2-0x1dd;const _0x46bb20=a29_0x46bb();let _0x147063=_0x46bb20[_0x2781c2];return _0x147063;}export function validateKey(_0x503e2e){const _0x32ace5=a29_0x34ac7c;if(!_0x503e2e)throw CliErrors[_0x32ace5(0x1e6)]('Missing\x20app-config\x20key.');if(_0x503e2e[_0x32ace5(0x205)]>0x100)throw CliErrors[_0x32ace5(0x1e6)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x5b1507,_0x439e64){const _0x1cc11f=a29_0x34ac7c,_0xa5581a=_0x5b1507['value']!==undefined&&_0x5b1507[_0x1cc11f(0x1f3)]!==null&&_0x5b1507[_0x1cc11f(0x1f3)]!=='',_0x3534cc={'appCode':_0x5b1507['appCode'],'key':_0x5b1507[_0x1cc11f(0x1e9)],'tags':_0x5b1507['tags']??undefined,'hasValue':_0xa5581a,'valueRedacted':_0xa5581a&&!_0x439e64?.['reveal'],'gmtCreate':_0x5b1507[_0x1cc11f(0x1ef)],'gmtModified':_0x5b1507[_0x1cc11f(0x213)]};return _0x439e64?.[_0x1cc11f(0x1f2)]&&(_0x3534cc[_0x1cc11f(0x1f3)]=_0x5b1507['value']??'',_0x3534cc[_0x1cc11f(0x202)]=![]),_0x3534cc;}export function plannedAppConfig(_0x3557ec){const _0x533a6d=a29_0x34ac7c,_0x2b3668=_0x3557ec[_0x533a6d(0x1df)]??!![];return{'appCode':_0x3557ec['appCode'],'key':_0x3557ec['key'],'tags':_0x3557ec['tags']??undefined,'hasValue':_0x2b3668,'valueRedacted':_0x2b3668};}export function buildMutationData(_0x428f5a){const _0x515bbd=a29_0x34ac7c;return{'operation':_0x428f5a[_0x515bbd(0x1fe)],'selector':{'appCode':_0x428f5a[_0x515bbd(0x210)],'key':_0x428f5a[_0x515bbd(0x1e9)]},'before':_0x428f5a[_0x515bbd(0x1e1)],'after':_0x428f5a[_0x515bbd(0x217)],'dryRun':_0x428f5a['dryRun'],'warnings':_0x428f5a['warnings']??[]};}export async function withAppConfigApiBoundary(_0x4bb6a0,_0x22982e,_0xc239aa){const _0x35e19b=a29_0x34ac7c;try{return await _0xc239aa();}catch{const _0x4f1a15=[_0x35e19b(0x203)+_0x22982e[_0x35e19b(0x210)]];if(_0x22982e[_0x35e19b(0x1e9)])_0x4f1a15[_0x35e19b(0x1dd)](_0x35e19b(0x1e8)+_0x22982e[_0x35e19b(0x1e9)]);_0x4f1a15[_0x35e19b(0x1dd)](_0x35e19b(0x1e0));throw CliErrors[_0x35e19b(0x1f8)]('Failed\x20to\x20'+_0x4bb6a0+_0x35e19b(0x1f5),_0x4f1a15[_0x35e19b(0x204)](';\x20')+'.');}}function a29_0x46bb(){const _0xde41cd=['12PygkSy','\x20app\x20config.','end','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','apiError','5210920zKcJCz','492970iInVLS','stdin','name','366268cxmxpq','operation','utf8','587658VlNSlZ','error','valueRedacted','appCode:\x20','join','length','env','data','file','Runtime\x20app-config\x20key','Missing\x20app-config\x20value\x20source.','Value\x20file\x20is\x20not\x20readable:\x20','flag','trim','from-env','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','appCode','url','boolean','gmtModified','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','kind','Environment\x20variable\x20is\x20not\x20set:\x20','after','tags','push','args','hasValue','value\x20is\x20redacted','before','argument','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Config\x20tags\x20for\x20filtering/display\x20metadata','string','validation','App\x20config\x20value\x20source\x20is\x20ambiguous.','key:\x20','key','1019532bpIoac','once','4352765xUQjUs','setEncoding','str','gmtCreate','path','170390euufxz','reveal','value'];a29_0x46bb=function(){return _0xde41cd;};return a29_0x46bb();}export function asAppConfigDryRunResult(_0x444c49,_0x724c7f){const _0x4da180=a29_0x34ac7c;return Object['defineProperties'](_0x444c49,{'method':{'value':_0x724c7f['method'],'enumerable':![]},'url':{'value':_0x724c7f[_0x4da180(0x211)],'enumerable':![]}});}export function assertSingleValueSource(_0x1c5e05){const _0x6f2640=a29_0x34ac7c,_0x19d07e=[];_0x1c5e05['args'][_0x6f2640(0x205)]>0x1&&_0x19d07e[_0x6f2640(0x1dd)]({'kind':_0x6f2640(0x1e2),'value':_0x1c5e05[_0x6f2640(0x1de)]['slice'](0x1)[_0x6f2640(0x204)]('\x20')});const _0x447ce0=_0x1c5e05[_0x6f2640(0x20c)](_0x6f2640(0x1f3));_0x447ce0!==undefined&&_0x447ce0!==null&&_0x19d07e['push']({'kind':_0x6f2640(0x1e2),'value':String(_0x447ce0)});_0x1c5e05['bool'](_0x6f2640(0x1fb))&&_0x19d07e['push']({'kind':_0x6f2640(0x1fb)});const _0x13208f=_0x1c5e05[_0x6f2640(0x1ee)](_0x6f2640(0x20e))[_0x6f2640(0x20d)]();_0x13208f&&_0x19d07e[_0x6f2640(0x1dd)]({'kind':_0x6f2640(0x206),'name':_0x13208f});const _0x4cb5f8=_0x1c5e05[_0x6f2640(0x1ee)](_0x6f2640(0x208))[_0x6f2640(0x20d)]();_0x4cb5f8&&_0x19d07e[_0x6f2640(0x1dd)]({'kind':_0x6f2640(0x208),'path':_0x4cb5f8});if(_0x19d07e[_0x6f2640(0x205)]===0x0)throw CliErrors[_0x6f2640(0x1e6)](_0x6f2640(0x20a),_0x6f2640(0x214));if(_0x19d07e['length']>0x1)throw CliErrors[_0x6f2640(0x1e6)](_0x6f2640(0x1e7),_0x6f2640(0x1e3));return _0x19d07e[0x0];}export async function assertValueSourceReadable(_0x4c745a){const _0x98a0dd=a29_0x34ac7c;if(_0x4c745a[_0x98a0dd(0x215)]==='env'&&!(_0x4c745a[_0x98a0dd(0x1fc)]in process.env))throw CliErrors[_0x98a0dd(0x1e6)](_0x98a0dd(0x216)+_0x4c745a[_0x98a0dd(0x1fc)]);if(_0x4c745a[_0x98a0dd(0x215)]==='file')try{await access(_0x4c745a[_0x98a0dd(0x1f0)]);}catch{throw CliErrors[_0x98a0dd(0x1e6)](_0x98a0dd(0x20b)+_0x4c745a[_0x98a0dd(0x1f0)]);}}export async function readAppConfigValue(_0xe79489){const _0xc95b77=a29_0x34ac7c,_0xf63667=assertSingleValueSource(_0xe79489),_0x13a9b7=[];if(_0xf63667[_0xc95b77(0x215)]===_0xc95b77(0x1e2))return _0x13a9b7['push']('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0xf63667[_0xc95b77(0x1f3)]??'','source':_0xf63667[_0xc95b77(0x215)],'warnings':_0x13a9b7};if(_0xf63667[_0xc95b77(0x215)]==='stdin')return{'value':await readStdin(),'source':_0xf63667[_0xc95b77(0x215)],'warnings':_0x13a9b7};if(_0xf63667[_0xc95b77(0x215)]===_0xc95b77(0x206)){if(!(_0xf63667[_0xc95b77(0x1fc)]in process.env))throw CliErrors['validation'](_0xc95b77(0x216)+_0xf63667['name']);return{'value':process.env[_0xf63667.name]??'','source':_0xf63667[_0xc95b77(0x215)],'warnings':_0x13a9b7};}return{'value':await readFile(_0xf63667[_0xc95b77(0x1f0)],_0xc95b77(0x1ff)),'source':_0xf63667[_0xc95b77(0x215)],'warnings':_0x13a9b7};}function readStdin(){return new Promise((_0x5b1f63,_0x113dd0)=>{const _0x2fb69f=a29_0x1470;let _0xe8fb5b='';process[_0x2fb69f(0x1fb)][_0x2fb69f(0x1ed)](_0x2fb69f(0x1ff)),process[_0x2fb69f(0x1fb)]['on'](_0x2fb69f(0x207),_0x1ab61f=>{_0xe8fb5b+=_0x1ab61f;}),process['stdin'][_0x2fb69f(0x1eb)](_0x2fb69f(0x1f6),()=>_0x5b1f63(_0xe8fb5b)),process['stdin'][_0x2fb69f(0x1eb)](_0x2fb69f(0x201),_0x113dd0);});}
@@ -1 +1 @@
1
- const a30_0x2a1591=a30_0x5b4c;(function(_0x1d367f,_0x1ffb90){const _0x46cf51=a30_0x5b4c,_0xa81f58=_0x1d367f();while(!![]){try{const _0x2de425=-parseInt(_0x46cf51(0x1d7))/0x1+parseInt(_0x46cf51(0x1d9))/0x2*(-parseInt(_0x46cf51(0x1ca))/0x3)+parseInt(_0x46cf51(0x1d4))/0x4+parseInt(_0x46cf51(0x1cb))/0x5*(parseInt(_0x46cf51(0x1d6))/0x6)+parseInt(_0x46cf51(0x1d3))/0x7*(-parseInt(_0x46cf51(0x1d8))/0x8)+parseInt(_0x46cf51(0x1d5))/0x9+parseInt(_0x46cf51(0x1dc))/0xa;if(_0x2de425===_0x1ffb90)break;else _0xa81f58['push'](_0xa81f58['shift']());}catch(_0x2fc3b0){_0xa81f58['push'](_0xa81f58['shift']());}}}(a30_0x519f,0xc9dc0));import{unlinkSync,existsSync}from'node:fs';function a30_0x5b4c(_0x103cac,_0x412358){_0x103cac=_0x103cac-0x1c8;const _0x519fea=a30_0x519f();let _0x5b4ce7=_0x519fea[_0x103cac];return _0x5b4ce7;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x2a1591(0x1d2),'command':a30_0x2a1591(0x1d0),'description':a30_0x2a1591(0x1cd),'risk':a30_0x2a1591(0x1d1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x2a1591(0x1c8),'type':'boolean','description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x5533ca){const _0x303214=a30_0x2a1591,{runAuthServer:_0xc35fbd}=await import(_0x303214(0x1da));return await _0xc35fbd({'autoYes':_0x5533ca[_0x303214(0x1de)](_0x303214(0x1c8)),'nonInteractive':_0x5533ca[_0x303214(0x1cc)]}),{'ok':!![]};}},{'service':'auth','command':a30_0x2a1591(0x1cf),'description':a30_0x2a1591(0x1ce),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xa944ba){const _0x14b3fe=a30_0x2a1591;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x14b3fe(0x1db)](_0x14b3fe(0x1c9))):console[_0x14b3fe(0x1db)](_0x14b3fe(0x1dd)),{'ok':!![]};}}];function a30_0x519f(){const _0x2447f9=['log','13558470KOMBuq','!\x20Not\x20logged\x20in','bool','yes','✓\x20Logged\x20out','1773LJPGAK','515rxjhEC','nonInteractive','Login\x20via\x20browser','Clear\x20login\x20session','logout','login','write','auth','245721ycYWiH','5331260GbuASE','7504344BafUXk','59802pUPybi','1568386iPWNkX','272RawfLO','3250UpIwVr','../../auth/auth-server-ui.js'];a30_0x519f=function(){return _0x2447f9;};return a30_0x519f();}
1
+ const a30_0x258d0e=a30_0x2878;(function(_0x41a8a2,_0x54000e){const _0x50de4b=a30_0x2878,_0x43ec40=_0x41a8a2();while(!![]){try{const _0x133231=-parseInt(_0x50de4b(0x19a))/0x1*(parseInt(_0x50de4b(0x195))/0x2)+-parseInt(_0x50de4b(0x18a))/0x3+-parseInt(_0x50de4b(0x192))/0x4+parseInt(_0x50de4b(0x18b))/0x5*(parseInt(_0x50de4b(0x19e))/0x6)+parseInt(_0x50de4b(0x189))/0x7+parseInt(_0x50de4b(0x18c))/0x8*(parseInt(_0x50de4b(0x18d))/0x9)+-parseInt(_0x50de4b(0x188))/0xa*(-parseInt(_0x50de4b(0x19b))/0xb);if(_0x133231===_0x54000e)break;else _0x43ec40['push'](_0x43ec40['shift']());}catch(_0x146c93){_0x43ec40['push'](_0x43ec40['shift']());}}}(a30_0x572f,0x8d801));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';function a30_0x2878(_0x50ed95,_0x47b603){_0x50ed95=_0x50ed95-0x188;const _0x572fe2=a30_0x572f();let _0x28781f=_0x572fe2[_0x50ed95];return _0x28781f;}export const authDefinitions=[{'service':a30_0x258d0e(0x18e),'command':a30_0x258d0e(0x197),'description':a30_0x258d0e(0x191),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x258d0e(0x198),'type':a30_0x258d0e(0x19d),'description':a30_0x258d0e(0x19f),'default':![]}],async 'execute'(_0x1a0688){const _0x521940=a30_0x258d0e,{runAuthServer:_0x2207d2}=await import(_0x521940(0x196));return await _0x2207d2({'autoYes':_0x1a0688[_0x521940(0x18f)]('yes'),'nonInteractive':_0x1a0688[_0x521940(0x194)]}),{'ok':!![]};}},{'service':'auth','command':'logout','description':a30_0x258d0e(0x193),'risk':a30_0x258d0e(0x19c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x17505f){const _0x7e9759=a30_0x258d0e;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x7e9759(0x199)]('✓\x20Logged\x20out')):console[_0x7e9759(0x199)](_0x7e9759(0x190)),{'ok':!![]};}}];function a30_0x572f(){const _0x43fe30=['../../auth/auth-server-ui.js','login','yes','log','154286qCXzCg','2563165jqsvKQ','write','boolean','18246IdFKdP','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','70eErOSJ','589918xlZDLg','1615065gPCjJZ','970qfhFrB','1384BIFWAY','4041KDEIKK','auth','bool','!\x20Not\x20logged\x20in','Login\x20via\x20browser','1974560QegAuD','Clear\x20login\x20session','nonInteractive','10QCRdkY'];a30_0x572f=function(){return _0x43fe30;};return a30_0x572f();}
@@ -1 +1 @@
1
- const a31_0x4fb490=a31_0x881a;(function(_0x4fdcc3,_0x47f576){const _0x5d0b87=a31_0x881a,_0x3871a2=_0x4fdcc3();while(!![]){try{const _0x3867ad=parseInt(_0x5d0b87(0xee))/0x1*(-parseInt(_0x5d0b87(0xfb))/0x2)+-parseInt(_0x5d0b87(0xd2))/0x3+parseInt(_0x5d0b87(0xb9))/0x4*(-parseInt(_0x5d0b87(0xa7))/0x5)+parseInt(_0x5d0b87(0xe2))/0x6*(parseInt(_0x5d0b87(0xaa))/0x7)+-parseInt(_0x5d0b87(0xe1))/0x8+-parseInt(_0x5d0b87(0xac))/0x9*(-parseInt(_0x5d0b87(0xea))/0xa)+-parseInt(_0x5d0b87(0xe3))/0xb*(-parseInt(_0x5d0b87(0xf5))/0xc);if(_0x3867ad===_0x47f576)break;else _0x3871a2['push'](_0x3871a2['shift']());}catch(_0x189893){_0x3871a2['push'](_0x3871a2['shift']());}}}(a31_0x37fc,0x20584));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';function a31_0x881a(_0x35f4f0,_0x537bce){_0x35f4f0=_0x35f4f0-0x95;const _0x37fc75=a31_0x37fc();let _0x881a16=_0x37fc75[_0x35f4f0];return _0x881a16;}import{getAppBaseUrl}from'../../constant/domain.js';function a31_0x37fc(){const _0x420072=['scriptsRootDir','当前响应结果','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','utf8','before','.js\x0a\x20*\x20[触发节点]\x20','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','No\x20operation\x20types\x20found\x20for\x20dataset\x20','1518yKPWmS','join','Trigger\x20node\x20(HOOK\x20only)','COMMON','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','Created\x20','Select\x20dataset:','Operation\x20type\x20(HOOK\x20only)','appCode','keys','/ENDPOINT/','str','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','.js\x0a','map','887576HOVZAI','6uOxWzY','11nlHCVx','/**\x0a\x20*\x20','Invalid\x20dataset\x20selection.','operationType','HOOK\x20requires\x20alias/operation/node\x20options.','parseInt','after','41630UDIccP','create',']\x20(','\x22.\x20','10856tZoIIv','修改后的请求参数','includes','operation-type','No\x20api.ts\x20found.\x20Run\x20`','source','type','4909572iIGOOm','description','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','length','trim','name','24KlWHmu','close','当前请求参数','/HOOK/','write','\x0a\x20*\x20[平台配置]\x20','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','datasetCode','/data/dataset/','find','function-node','apiDir','Select\x20operation\x20type:','.js','alias','nonInteractive','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','functionNode','\x22\x20not\x20found\x20for\x20dataset\x20','Dataset\x20not\x20found\x20for\x20code\x20\x22','ENDPOINT','tableName','10zXeakp','Available\x20aliases:\x20','No\x20datasets\x20found\x20for\x20this\x20app.','124061uvEhJk','Script\x20description','297xjDxFe','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','\x22,\x20params\x20})\x0a','Available:\x20','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','\x22\x20not\x20found.\x20','bff','Function\x20name\x20(valid\x20JS\x20identifier)','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','Select\x20trigger\x20node:','stderr','\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','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','380048LNfncU','validation','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','datasetcode','stdin','Operation\x20type\x20\x22','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','Invalid\x20function\x20name\x20\x22','string','Script\x20type','code','entries','HOOK','isInteger','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.'];a31_0x37fc=function(){return _0x420072;};return a31_0x37fc();}export const bffCreate={'service':a31_0x4fb490(0xb2),'command':a31_0x4fb490(0xeb),'description':a31_0x4fb490(0x97),'risk':'read','flags':[{'name':a31_0x4fb490(0xf4),'type':a31_0x4fb490(0xc1),'required':!![],'enum':[a31_0x4fb490(0xd5),a31_0x4fb490(0xa5),a31_0x4fb490(0xc5)],'description':a31_0x4fb490(0xc2)},{'name':a31_0x4fb490(0xfa),'type':a31_0x4fb490(0xc1),'required':!![],'description':a31_0x4fb490(0xb3)},{'name':'description','type':a31_0x4fb490(0xc1),'description':a31_0x4fb490(0xab)},{'name':a31_0x4fb490(0x9f),'type':'string','description':a31_0x4fb490(0xb0)},{'name':a31_0x4fb490(0xbc),'type':a31_0x4fb490(0xc1),'description':'Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)'},{'name':'operation-type','type':'string','description':a31_0x4fb490(0xd9)},{'name':a31_0x4fb490(0x9b),'type':'string','description':a31_0x4fb490(0xd4),'enum':[a31_0x4fb490(0xce),a31_0x4fb490(0xe9)]}],async 'validate'(_0x362066){const _0x28e25e=a31_0x4fb490,_0x35aae4=_0x362066[_0x28e25e(0xdd)](_0x28e25e(0xfa));if(!isValidBffFunctionName(_0x35aae4))throw CliErrors[_0x28e25e(0xba)](_0x28e25e(0xc0)+_0x35aae4+_0x28e25e(0xad));},async 'execute'(_0x143312){const _0x419e04=a31_0x4fb490,_0x1cf5d9=loadBffProjectConfig(_0x143312[_0x419e04(0xda)]),_0x59de53=_0x143312[_0x419e04(0xdd)](_0x419e04(0xf4)),_0x4ec27a=_0x143312['str']('name'),_0x36a384=_0x143312['str'](_0x419e04(0xf6))||undefined,_0x5248ef=_0x59de53===_0x419e04(0xc5)?await resolveHookOptions(_0x1cf5d9,_0x143312):undefined,_0x5b9d14=buildFilePath(_0x1cf5d9,_0x59de53,_0x4ec27a,_0x5248ef);if(await fileExists(_0x5b9d14))throw CliErrors[_0x419e04(0xba)]('File\x20already\x20exists:\x20'+_0x5b9d14);await mkdir(dirname(_0x5b9d14),{'recursive':!![]});const _0x287f70=generateTemplate(_0x59de53,_0x4ec27a,_0x143312[_0x419e04(0xda)],_0x36a384,_0x5248ef);await writeFile(_0x5b9d14,_0x287f70,_0x419e04(0xcd));const _0x5bea5c={'type':_0x59de53,'name':_0x4ec27a,'path':_0x5b9d14};if(_0x36a384)_0x5bea5c[_0x419e04(0xf6)]=_0x36a384;if(_0x5248ef){if(_0x5248ef[_0x419e04(0x9f)])_0x5bea5c[_0x419e04(0x9f)]=_0x5248ef[_0x419e04(0x9f)];_0x5bea5c[_0x419e04(0x98)]=_0x5248ef[_0x419e04(0x98)],_0x5bea5c['operationType']=_0x5248ef[_0x419e04(0xe6)],_0x5bea5c[_0x419e04(0xa2)]=_0x5248ef[_0x419e04(0xa2)];}return{'ok':!![],'data':_0x5bea5c,'message':_0x419e04(0xd7)+_0x59de53+'\x20function:\x20'+_0x4ec27a};}};async function resolveHookOptions(_0x15fb2c,_0x2268d5){const _0x183e84=a31_0x4fb490,_0x5107ef=loadAliasMap(_0x2268d5[_0x183e84(0x9c)],undefined,resolveApiFilePath(_0x2268d5[_0x183e84(0x9c)],_0x2268d5[_0x183e84(0xda)])),_0x40bf28=_0x5107ef['length']>0x0;let _0x293489,_0x17b3b3,_0x50b297;const _0x10084b=_0x2268d5[_0x183e84(0xdd)](_0x183e84(0x9f)),_0x536e98=_0x2268d5[_0x183e84(0xdd)](_0x183e84(0xbc));if(_0x10084b){const _0x2ae99d=resolveAlias(_0x2268d5['apiDir'],_0x10084b,undefined,resolveApiFilePath(_0x2268d5['apiDir'],_0x2268d5[_0x183e84(0xda)]));if(!_0x2ae99d){const _0x1d7391=_0x40bf28?_0x183e84(0xa8)+_0x5107ef[_0x183e84(0xe0)](_0x501ada=>_0x501ada[_0x183e84(0x9f)])[_0x183e84(0xd3)](',\x20'):_0x183e84(0xf2)+CLI_BIN_NAME+_0x183e84(0xc9);throw CliErrors[_0x183e84(0xba)]('Alias\x20\x22'+_0x10084b+_0x183e84(0xb1)+_0x1d7391);}_0x293489=_0x10084b,_0x17b3b3=_0x2ae99d;}else{if(_0x536e98){_0x17b3b3=_0x536e98;const _0x10c3f2=_0x5107ef['find'](_0x1a3ec4=>_0x1a3ec4[_0x183e84(0x98)]===_0x536e98);_0x293489=_0x10c3f2?.[_0x183e84(0x9f)];}else{if(_0x2268d5['nonInteractive'])throw CliErrors[_0x183e84(0xba)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x40bf28){const _0x442706=_0x5107ef['map'](_0x2ba527=>_0x2ba527[_0x183e84(0x9f)]+'\x20('+_0x2ba527[_0x183e84(0xa6)]+')'),_0xdec1ba=await promptSelect(_0x183e84(0xd8),_0x442706),_0x2a6c53=_0x5107ef[_0xdec1ba];if(!_0x2a6c53)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xe5));_0x293489=_0x2a6c53['alias'],_0x17b3b3=_0x2a6c53[_0x183e84(0x98)];}else{const _0x3c2b0d=await listDatasets(_0x2268d5['appCode']);if(_0x3c2b0d[_0x183e84(0xf8)]===0x0)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xa9));const _0x1dfa91=_0x3c2b0d['map'](_0x1dde46=>_0x1dde46[_0x183e84(0xfa)]+'\x20['+(_0x1dde46[_0x183e84(0xf3)]??'UNKNOWN')+_0x183e84(0xec)+_0x1dde46[_0x183e84(0xc3)]+')'),_0x4eaafc=await promptSelect(_0x183e84(0xd8),_0x1dfa91),_0x32546b=_0x3c2b0d[_0x4eaafc];if(!_0x32546b)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xe5));_0x17b3b3=_0x32546b[_0x183e84(0xc3)],_0x293489=undefined;}}}}const _0x52c027=await listDatasets(_0x2268d5['appCode']),_0x3a6805=_0x52c027[_0x183e84(0x9a)](_0x47183a=>_0x47183a[_0x183e84(0xc3)]===_0x17b3b3);if(!_0x3a6805)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xa4)+_0x17b3b3+_0x183e84(0xed)+(_0x293489?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x50b297=_0x3a6805['id'];const _0x4cd67f=_0x293489??_0x17b3b3,_0x43395a=await listBffDatasetOperations(_0x2268d5['appCode'],_0x50b297),_0x371616=_0x43395a?Object[_0x183e84(0xdb)](_0x43395a):[];if(_0x371616['length']===0x0)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xd1)+_0x4cd67f+'.');let _0x5c2463;const _0x34f38e=_0x2268d5[_0x183e84(0xdd)](_0x183e84(0xf1));if(_0x34f38e){if(!_0x371616[_0x183e84(0xf0)](_0x34f38e))throw CliErrors[_0x183e84(0xba)](_0x183e84(0xbe)+_0x34f38e+_0x183e84(0xa3)+_0x4cd67f+'.\x20'+(_0x183e84(0xaf)+_0x371616[_0x183e84(0xd3)](',\x20')));_0x5c2463=_0x34f38e;}else{if(_0x2268d5['nonInteractive'])throw CliErrors[_0x183e84(0xba)](_0x183e84(0xc7));const _0x247701=await promptSelect(_0x183e84(0x9d),_0x371616);_0x5c2463=_0x371616[_0x247701]??_0x371616[0x0];}let _0x572c11=normalizeHookFunctionNode(_0x2268d5['str'](_0x183e84(0x9b)));if(!_0x572c11){if(_0x2268d5[_0x183e84(0xdd)](_0x183e84(0x9b)))throw CliErrors[_0x183e84(0xba)](_0x183e84(0xcc));if(_0x2268d5[_0x183e84(0xa0)])throw CliErrors['validation'](_0x183e84(0xc8));const _0x38638d=await promptSelect(_0x183e84(0xb5),['before',_0x183e84(0xe9)]);_0x572c11=[_0x183e84(0xce),_0x183e84(0xe9)][_0x38638d]??_0x183e84(0xce);}return{'alias':_0x293489,'datasetCode':_0x17b3b3,'datasetId':_0x50b297,'operationType':_0x5c2463,'functionNode':_0x572c11};}async function promptSelect(_0x9b2b08,_0x5a9205){const _0x4a87c4=a31_0x4fb490;if(_0x5a9205[_0x4a87c4(0xf8)]===0x1)return 0x0;for(const [_0x1c1ed8,_0x44f74f]of _0x5a9205[_0x4a87c4(0xc4)]()){process[_0x4a87c4(0xb6)][_0x4a87c4(0x95)]('\x20\x20'+(_0x1c1ed8+0x1)+'.\x20'+_0x44f74f+'\x0a');}const _0x2b39ba=createInterface({'input':process[_0x4a87c4(0xbd)],'output':process['stderr']});while(!![]){const _0x5ea869=await new Promise(_0x333ede=>{_0x2b39ba['question'](_0x9b2b08+'\x20',_0x333ede);}),_0x96f31e=Number[_0x4a87c4(0xe8)](_0x5ea869[_0x4a87c4(0xf9)](),0xa);if(Number[_0x4a87c4(0xc6)](_0x96f31e)&&_0x96f31e>=0x1&&_0x96f31e<=_0x5a9205['length'])return _0x2b39ba[_0x4a87c4(0xfc)](),_0x96f31e-0x1;process['stderr'][_0x4a87c4(0x95)]('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x5a9205[_0x4a87c4(0xf8)]+'.\x0a');}}function buildFilePath(_0x51692a,_0x59f611,_0x52515e,_0x3c44d4){const _0x2435a6=a31_0x4fb490;if(_0x59f611==='HOOK'){if(!_0x3c44d4)throw CliErrors[_0x2435a6(0xba)](_0x2435a6(0xe7));const _0x1ae3c4=_0x3c44d4[_0x2435a6(0x9f)]??_0x3c44d4[_0x2435a6(0x98)];return join(_0x51692a[_0x2435a6(0xca)],_0x2435a6(0xc5),_0x1ae3c4,_0x3c44d4[_0x2435a6(0xe6)],_0x3c44d4[_0x2435a6(0xa2)],_0x52515e+_0x2435a6(0x9e));}return join(_0x51692a['scriptsRootDir'],_0x59f611,_0x52515e+_0x2435a6(0x9e));}export function generateTemplate(_0x2e5c94,_0x1d7ae1,_0x27001a,_0x1eda3b,_0x17392d){const _0x519f15=a31_0x4fb490,_0x367f36=_0x1eda3b?.[_0x519f15(0xf9)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0xddf32d=getAppBaseUrl(_0x27001a),_0x35dc84='\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(_0x2e5c94==='COMMON')return _0x519f15(0xe4)+_0x367f36+_0x519f15(0xa1)+_0x1d7ae1+_0x519f15(0x96)+_0xddf32d+_0x519f15(0xd0)+_0x27001a+'/COMMON/'+_0x1d7ae1+_0x519f15(0xd6)+_0x1d7ae1+_0x519f15(0xae)+_0x35dc84+'\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'+_0x1d7ae1+_0x519f15(0xf7);if(_0x2e5c94===_0x519f15(0xa5))return _0x519f15(0xe4)+_0x367f36+_0x519f15(0xb8)+_0x1d7ae1+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/'+_0x27001a+'/'+_0x1d7ae1+_0x519f15(0x96)+_0xddf32d+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x27001a+_0x519f15(0xdc)+_0x1d7ae1+_0x519f15(0xdf)+_0x35dc84+_0x519f15(0xb7)+_0x1d7ae1+_0x519f15(0xf7);if(!_0x17392d)throw CliErrors[_0x519f15(0xba)](_0x519f15(0xb4));const _0x2432fd=_0x17392d[_0x519f15(0x9f)]??_0x17392d[_0x519f15(0x98)],_0x59b163=_0x17392d[_0x519f15(0xa2)]===_0x519f15(0xce)?_0x519f15(0xfd):_0x519f15(0xcb),_0x409e62=_0x17392d[_0x519f15(0xa2)]===_0x519f15(0xce)?_0x519f15(0xef):'修改后的响应结果';return _0x519f15(0xe4)+_0x367f36+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20'+_0x1d7ae1+_0x519f15(0xde)+_0x27001a+'/'+_0x17392d['datasetCode']+'/'+_0x17392d[_0x519f15(0xe6)]+_0x519f15(0x96)+_0xddf32d+_0x519f15(0x99)+_0x17392d['datasetId']+_0x519f15(0xbb)+_0x27001a+_0x519f15(0xfe)+_0x2432fd+'/'+_0x17392d[_0x519f15(0xe6)]+'/'+_0x17392d[_0x519f15(0xa2)]+'/'+_0x1d7ae1+_0x519f15(0xcf)+_0x17392d['functionNode']+'\x0a'+_0x35dc84+_0x519f15(0xbf)+_0x59b163+'\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20'+_0x409e62+'\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x1d7ae1+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
1
+ const a31_0x164465=a31_0x48d1;(function(_0x1de471,_0x564cfb){const _0x278747=a31_0x48d1,_0x323836=_0x1de471();while(!![]){try{const _0xee872d=parseInt(_0x278747(0x178))/0x1+parseInt(_0x278747(0x146))/0x2*(parseInt(_0x278747(0x180))/0x3)+parseInt(_0x278747(0x1a1))/0x4*(parseInt(_0x278747(0x18f))/0x5)+parseInt(_0x278747(0x17e))/0x6*(parseInt(_0x278747(0x161))/0x7)+parseInt(_0x278747(0x188))/0x8*(-parseInt(_0x278747(0x13b))/0x9)+-parseInt(_0x278747(0x196))/0xa+-parseInt(_0x278747(0x143))/0xb;if(_0xee872d===_0x564cfb)break;else _0x323836['push'](_0x323836['shift']());}catch(_0x4c5638){_0x323836['push'](_0x323836['shift']());}}}(a31_0x5333,0xbd1c3));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';function a31_0x5333(){const _0x182083=['type','Select\x20dataset:','Dataset\x20not\x20found\x20for\x20code\x20\x22','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','before','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','\x22.\x20','apiDir','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','\x20function:\x20','1172109bROMYb','\x22\x20not\x20found.\x20','/data/dataset/','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20','join','3372oQzkzQ','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','1987053jOCBkO','Available\x20aliases:\x20','.js\x0a','Script\x20description','keys','当前响应结果','map','appCode','112VPLhea','Available:\x20','HOOK','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','write','/ENDPOINT/','source','4685CgsWqu','create','\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','当前请求参数','HOOK\x20requires\x20alias/operation/node\x20options.','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','/**\x0a\x20*\x20','4193940QBHLhx','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','nonInteractive','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','File\x20already\x20exists:\x20','close','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','Function\x20name\x20(valid\x20JS\x20identifier)','Alias\x20\x22','Trigger\x20node\x20(HOOK\x20only)','5228iBhMPM','Select\x20trigger\x20node:','103257jhuPLM','string','ENDPOINT','stderr','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','str','Invalid\x20function\x20name\x20\x22','functionNode','20499094lGvyBG','description','name','2rIoNSK','COMMON','UNKNOWN','scriptsRootDir','\x0a\x20*\x20[平台配置]\x20','Operation\x20type\x20\x22','Invalid\x20dataset\x20selection.','operation-type','alias','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','length','修改后的请求参数','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','\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','utf8','parseInt','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','operationType','includes','question','find','datasetcode','修改后的响应结果','validation','datasetCode','Select\x20operation\x20type:','function-node','1981yzSaOy','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','No\x20api.ts\x20found.\x20Run\x20`','stdin','trim','\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','\x20api\x20pull`\x20to\x20refresh.','/COMMON/','Created\x20','code','after','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'];a31_0x5333=function(){return _0x182083;};return a31_0x5333();}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_0x164465(0x190),'description':a31_0x164465(0x152),'risk':'read','flags':[{'name':a31_0x164465(0x16d),'type':a31_0x164465(0x13c),'required':!![],'enum':[a31_0x164465(0x147),a31_0x164465(0x13d),a31_0x164465(0x18a)],'description':'Script\x20type'},{'name':'name','type':a31_0x164465(0x13c),'required':!![],'description':a31_0x164465(0x19e)},{'name':a31_0x164465(0x144),'type':a31_0x164465(0x13c),'description':a31_0x164465(0x183)},{'name':'alias','type':'string','description':a31_0x164465(0x162)},{'name':a31_0x164465(0x15b),'type':a31_0x164465(0x13c),'description':a31_0x164465(0x199)},{'name':a31_0x164465(0x14d),'type':a31_0x164465(0x13c),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a31_0x164465(0x160),'type':'string','description':a31_0x164465(0x1a0),'enum':[a31_0x164465(0x171),a31_0x164465(0x16b)]}],async 'validate'(_0x4ba163){const _0x222ac2=a31_0x164465,_0x411ae0=_0x4ba163[_0x222ac2(0x140)](_0x222ac2(0x145));if(!isValidBffFunctionName(_0x411ae0))throw CliErrors[_0x222ac2(0x15d)](_0x222ac2(0x141)+_0x411ae0+_0x222ac2(0x14f));},async 'execute'(_0x56b326){const _0x355d40=a31_0x164465,_0x237eb2=loadBffProjectConfig(_0x56b326[_0x355d40(0x187)]),_0x3f427d=_0x56b326[_0x355d40(0x140)](_0x355d40(0x16d)),_0x615e1=_0x56b326[_0x355d40(0x140)](_0x355d40(0x145)),_0xe9b99f=_0x56b326['str'](_0x355d40(0x144))||undefined,_0x5b5ce8=_0x3f427d==='HOOK'?await resolveHookOptions(_0x237eb2,_0x56b326):undefined,_0x360659=buildFilePath(_0x237eb2,_0x3f427d,_0x615e1,_0x5b5ce8);if(await fileExists(_0x360659))throw CliErrors[_0x355d40(0x15d)](_0x355d40(0x19b)+_0x360659);await mkdir(dirname(_0x360659),{'recursive':!![]});const _0x6ca54a=generateTemplate(_0x3f427d,_0x615e1,_0x56b326[_0x355d40(0x187)],_0xe9b99f,_0x5b5ce8);await writeFile(_0x360659,_0x6ca54a,_0x355d40(0x154));const _0xa7859b={'type':_0x3f427d,'name':_0x615e1,'path':_0x360659};if(_0xe9b99f)_0xa7859b[_0x355d40(0x144)]=_0xe9b99f;if(_0x5b5ce8){if(_0x5b5ce8[_0x355d40(0x14e)])_0xa7859b[_0x355d40(0x14e)]=_0x5b5ce8[_0x355d40(0x14e)];_0xa7859b[_0x355d40(0x15e)]=_0x5b5ce8['datasetCode'],_0xa7859b[_0x355d40(0x157)]=_0x5b5ce8[_0x355d40(0x157)],_0xa7859b['functionNode']=_0x5b5ce8[_0x355d40(0x142)];}return{'ok':!![],'data':_0xa7859b,'message':_0x355d40(0x169)+_0x3f427d+_0x355d40(0x177)+_0x615e1};}};async function resolveHookOptions(_0x19ef39,_0x79f6b0){const _0x557999=a31_0x164465,_0x32eee3=loadAliasMap(_0x79f6b0[_0x557999(0x175)],undefined,resolveApiFilePath(_0x79f6b0[_0x557999(0x175)],_0x79f6b0[_0x557999(0x187)])),_0x591c58=_0x32eee3[_0x557999(0x150)]>0x0;let _0x29ca73,_0x6c806d,_0x4a6684;const _0x33f537=_0x79f6b0['str'](_0x557999(0x14e)),_0x515980=_0x79f6b0[_0x557999(0x140)]('datasetcode');if(_0x33f537){const _0x2468e4=resolveAlias(_0x79f6b0[_0x557999(0x175)],_0x33f537,undefined,resolveApiFilePath(_0x79f6b0[_0x557999(0x175)],_0x79f6b0[_0x557999(0x187)]));if(!_0x2468e4){const _0x1cf6db=_0x591c58?_0x557999(0x181)+_0x32eee3[_0x557999(0x186)](_0x38e4be=>_0x38e4be['alias'])['join'](',\x20'):_0x557999(0x163)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x557999(0x15d)](_0x557999(0x19f)+_0x33f537+_0x557999(0x179)+_0x1cf6db);}_0x29ca73=_0x33f537,_0x6c806d=_0x2468e4;}else{if(_0x515980){_0x6c806d=_0x515980;const _0x1a011e=_0x32eee3[_0x557999(0x15a)](_0x419f3b=>_0x419f3b[_0x557999(0x15e)]===_0x515980);_0x29ca73=_0x1a011e?.[_0x557999(0x14e)];}else{if(_0x79f6b0['nonInteractive'])throw CliErrors[_0x557999(0x15d)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x591c58){const _0x4d32bd=_0x32eee3['map'](_0x2c8026=>_0x2c8026[_0x557999(0x14e)]+'\x20('+_0x2c8026['tableName']+')'),_0x29dbd9=await promptSelect(_0x557999(0x16e),_0x4d32bd),_0x51cff0=_0x32eee3[_0x29dbd9];if(!_0x51cff0)throw CliErrors[_0x557999(0x15d)](_0x557999(0x14c));_0x29ca73=_0x51cff0[_0x557999(0x14e)],_0x6c806d=_0x51cff0['datasetCode'];}else{const _0x1706d8=await listDatasets(_0x79f6b0[_0x557999(0x187)]);if(_0x1706d8[_0x557999(0x150)]===0x0)throw CliErrors['validation']('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x557aa9=_0x1706d8[_0x557999(0x186)](_0x261547=>_0x261547[_0x557999(0x145)]+'\x20['+(_0x261547[_0x557999(0x18e)]??_0x557999(0x148))+']\x20('+_0x261547['code']+')'),_0x46c10a=await promptSelect(_0x557999(0x16e),_0x557aa9),_0x55953a=_0x1706d8[_0x46c10a];if(!_0x55953a)throw CliErrors['validation']('Invalid\x20dataset\x20selection.');_0x6c806d=_0x55953a[_0x557999(0x16a)],_0x29ca73=undefined;}}}}const _0x30ddec=await listDatasets(_0x79f6b0[_0x557999(0x187)]),_0x5e8714=_0x30ddec[_0x557999(0x15a)](_0xebf3c7=>_0xebf3c7[_0x557999(0x16a)]===_0x6c806d);if(!_0x5e8714)throw CliErrors[_0x557999(0x15d)](_0x557999(0x16f)+_0x6c806d+_0x557999(0x174)+(_0x29ca73?_0x557999(0x16c)+CLI_BIN_NAME+_0x557999(0x167):''));_0x4a6684=_0x5e8714['id'];const _0x305c0c=_0x29ca73??_0x6c806d,_0x92eb9c=await listBffDatasetOperations(_0x79f6b0[_0x557999(0x187)],_0x4a6684),_0x2745fa=_0x92eb9c?Object[_0x557999(0x184)](_0x92eb9c):[];if(_0x2745fa['length']===0x0)throw CliErrors[_0x557999(0x15d)]('No\x20operation\x20types\x20found\x20for\x20dataset\x20'+_0x305c0c+'.');let _0x485758;const _0x2a4e04=_0x79f6b0['str']('operation-type');if(_0x2a4e04){if(!_0x2745fa[_0x557999(0x158)](_0x2a4e04))throw CliErrors['validation'](_0x557999(0x14b)+_0x2a4e04+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x305c0c+'.\x20'+(_0x557999(0x189)+_0x2745fa[_0x557999(0x17d)](',\x20')));_0x485758=_0x2a4e04;}else{if(_0x79f6b0[_0x557999(0x198)])throw CliErrors[_0x557999(0x15d)](_0x557999(0x13f));const _0x4d6580=await promptSelect(_0x557999(0x15f),_0x2745fa);_0x485758=_0x2745fa[_0x4d6580]??_0x2745fa[0x0];}let _0x54fa44=normalizeHookFunctionNode(_0x79f6b0[_0x557999(0x140)](_0x557999(0x160)));if(!_0x54fa44){if(_0x79f6b0[_0x557999(0x140)](_0x557999(0x160)))throw CliErrors[_0x557999(0x15d)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x79f6b0['nonInteractive'])throw CliErrors[_0x557999(0x15d)](_0x557999(0x170));const _0x57eb69=await promptSelect(_0x557999(0x13a),[_0x557999(0x171),_0x557999(0x16b)]);_0x54fa44=[_0x557999(0x171),_0x557999(0x16b)][_0x57eb69]??_0x557999(0x171);}return{'alias':_0x29ca73,'datasetCode':_0x6c806d,'datasetId':_0x4a6684,'operationType':_0x485758,'functionNode':_0x54fa44};}async function promptSelect(_0x2892a7,_0x2408c4){const _0x537b23=a31_0x164465;if(_0x2408c4[_0x537b23(0x150)]===0x1)return 0x0;for(const [_0x4843eb,_0x4894d2]of _0x2408c4['entries']()){process['stderr'][_0x537b23(0x18c)]('\x20\x20'+(_0x4843eb+0x1)+'.\x20'+_0x4894d2+'\x0a');}const _0x5b27fa=createInterface({'input':process[_0x537b23(0x164)],'output':process['stderr']});while(!![]){const _0x1e6bd8=await new Promise(_0x4eeba3=>{const _0x1360bb=_0x537b23;_0x5b27fa[_0x1360bb(0x159)](_0x2892a7+'\x20',_0x4eeba3);}),_0x3b7525=Number[_0x537b23(0x155)](_0x1e6bd8[_0x537b23(0x165)](),0xa);if(Number['isInteger'](_0x3b7525)&&_0x3b7525>=0x1&&_0x3b7525<=_0x2408c4[_0x537b23(0x150)])return _0x5b27fa[_0x537b23(0x19c)](),_0x3b7525-0x1;process[_0x537b23(0x13e)][_0x537b23(0x18c)](_0x537b23(0x17b)+_0x2408c4[_0x537b23(0x150)]+'.\x0a');}}function a31_0x48d1(_0x3610d7,_0x1db8a8){_0x3610d7=_0x3610d7-0x13a;const _0x533368=a31_0x5333();let _0x48d1fd=_0x533368[_0x3610d7];return _0x48d1fd;}function buildFilePath(_0x30becd,_0x3ff8f3,_0x1e5371,_0x5cc519){const _0x4f39de=a31_0x164465;if(_0x3ff8f3===_0x4f39de(0x18a)){if(!_0x5cc519)throw CliErrors['validation'](_0x4f39de(0x193));const _0x19fc72=_0x5cc519[_0x4f39de(0x14e)]??_0x5cc519[_0x4f39de(0x15e)];return join(_0x30becd['scriptsRootDir'],_0x4f39de(0x18a),_0x19fc72,_0x5cc519[_0x4f39de(0x157)],_0x5cc519[_0x4f39de(0x142)],_0x1e5371+'.js');}return join(_0x30becd[_0x4f39de(0x149)],_0x3ff8f3,_0x1e5371+'.js');}export function generateTemplate(_0x2e4246,_0x51cdc4,_0x6435e2,_0x31e9bf,_0x1753d3){const _0x10cd75=a31_0x164465,_0x2d1a13=_0x31e9bf?.['trim']()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x212560=getAppBaseUrl(_0x6435e2),_0x16d877=_0x10cd75(0x17f);if(_0x2e4246===_0x10cd75(0x147))return'/**\x0a\x20*\x20'+_0x2d1a13+_0x10cd75(0x156)+_0x51cdc4+'\x0a\x20*\x20[平台配置]\x20'+_0x212560+_0x10cd75(0x197)+_0x6435e2+_0x10cd75(0x168)+_0x51cdc4+_0x10cd75(0x194)+_0x51cdc4+'\x22,\x20params\x20})\x0a'+_0x16d877+_0x10cd75(0x153)+_0x51cdc4+_0x10cd75(0x19a);if(_0x2e4246==='ENDPOINT')return _0x10cd75(0x195)+_0x2d1a13+_0x10cd75(0x18b)+_0x51cdc4+_0x10cd75(0x19d)+_0x6435e2+'/'+_0x51cdc4+_0x10cd75(0x14a)+_0x212560+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x6435e2+_0x10cd75(0x18d)+_0x51cdc4+_0x10cd75(0x182)+_0x16d877+_0x10cd75(0x166)+_0x51cdc4+_0x10cd75(0x19a);if(!_0x1753d3)throw CliErrors[_0x10cd75(0x15d)]('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');const _0x184d16=_0x1753d3[_0x10cd75(0x14e)]??_0x1753d3[_0x10cd75(0x15e)],_0x351772=_0x1753d3[_0x10cd75(0x142)]==='before'?_0x10cd75(0x192):_0x10cd75(0x185),_0x32024f=_0x1753d3[_0x10cd75(0x142)]==='before'?_0x10cd75(0x151):_0x10cd75(0x15c);return _0x10cd75(0x195)+_0x2d1a13+_0x10cd75(0x17c)+_0x51cdc4+_0x10cd75(0x172)+_0x6435e2+'/'+_0x1753d3[_0x10cd75(0x15e)]+'/'+_0x1753d3[_0x10cd75(0x157)]+_0x10cd75(0x14a)+_0x212560+_0x10cd75(0x17a)+_0x1753d3['datasetId']+'#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x6435e2+'/HOOK/'+_0x184d16+'/'+_0x1753d3[_0x10cd75(0x157)]+'/'+_0x1753d3[_0x10cd75(0x142)]+'/'+_0x51cdc4+'.js\x0a\x20*\x20[触发节点]\x20'+_0x1753d3[_0x10cd75(0x142)]+'\x0a'+_0x16d877+_0x10cd75(0x173)+_0x351772+_0x10cd75(0x176)+_0x32024f+_0x10cd75(0x191)+_0x51cdc4+_0x10cd75(0x19a);}
@@ -1 +1 @@
1
- const a32_0x5323ec=a32_0x1545;(function(_0x35dee2,_0x2388dd){const _0x55ed6c=a32_0x1545,_0x5d4812=_0x35dee2();while(!![]){try{const _0x575485=-parseInt(_0x55ed6c(0x13e))/0x1+-parseInt(_0x55ed6c(0x144))/0x2+-parseInt(_0x55ed6c(0x121))/0x3*(-parseInt(_0x55ed6c(0x131))/0x4)+parseInt(_0x55ed6c(0x12c))/0x5+-parseInt(_0x55ed6c(0x145))/0x6*(-parseInt(_0x55ed6c(0x12d))/0x7)+parseInt(_0x55ed6c(0x125))/0x8*(-parseInt(_0x55ed6c(0x11f))/0x9)+parseInt(_0x55ed6c(0x13f))/0xa*(-parseInt(_0x55ed6c(0x12f))/0xb);if(_0x575485===_0x2388dd)break;else _0x5d4812['push'](_0x5d4812['shift']());}catch(_0x4b4f12){_0x5d4812['push'](_0x5d4812['shift']());}}}(a32_0x5bb1,0x4a212));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a32_0x1545(_0x23ab36,_0x438646){_0x23ab36=_0x23ab36-0x112;const _0x5bb12e=a32_0x5bb1();let _0x15453d=_0x5bb12e[_0x23ab36];return _0x15453d;}function a32_0x5bb1(){const _0x505da6=['2980760caCCDf','7tQjDcA','Function\x20not\x20found:\x20','99OWQWwV','Backend\x20Function\x20lock\x20file\x20not\x20found.','76FySsiR','Multiple\x20functions\x20match\x20\x22','apps','target','replace','split','Local\x20delete\x20not\x20settled\x20for\x20','length','Deleted\x20','toISOString','string','remoteId','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','62651jOwqtZ','308050SFIGhE','str','\x20\x20-\x20','scriptsRootDir','parse','151908CPdClg','1525728hdVyTR','filter','delete','trashedTo','map','functions','lockFilePath','/api/management/library/scripts/delete','bff','includes','No\x20lock\x20entry\x20found\x20for\x20\x22','find','join','projectRoot','1449aDCgxc','Would\x20delete\x20','13209RksWFf','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','scriptsRoot','<timestamp>','10664clIHxL','\x22\x20not\x20found\x20after\x20ensureLockScope.','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','\x20(local\x20file\x20moved\x20to\x20trash)','appCode','validation','trashDir'];a32_0x5bb1=function(){return _0x505da6;};return a32_0x5bb1();}import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x5323ec(0x119),'command':a32_0x5323ec(0x113),'description':a32_0x5323ec(0x122),'risk':'high-risk-write','flags':[{'name':a32_0x5323ec(0x134),'type':a32_0x5323ec(0x13b),'required':!![],'description':a32_0x5323ec(0x127)}],async 'validate'(_0x50ad54){const _0x5e1873=a32_0x5323ec,_0x41954e=loadBffProjectConfig(_0x50ad54['appCode']),_0x4ba7d4=await readBffLockFile(_0x41954e['lockFilePath']);if(!_0x4ba7d4)throw CliErrors[_0x5e1873(0x12a)]('Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x16bd2b){const _0x2eef2e=a32_0x5323ec,_0x22585b=loadBffProjectConfig(_0x16bd2b['appCode']),_0x541e9f=await readBffLockFile(_0x22585b[_0x2eef2e(0x117)]);if(!_0x541e9f)throw CliErrors[_0x2eef2e(0x12a)](_0x2eef2e(0x130));const {appLock:_0x55ea9d}=ensureLockScope(_0x541e9f,_0x16bd2b['appCode'],_0x22585b[_0x2eef2e(0x123)],_0x2eef2e(0x113)),_0xc27bc5=_0x16bd2b[_0x2eef2e(0x140)](_0x2eef2e(0x134)),_0x43bb98=Object['keys'](_0x55ea9d['functions']),_0x57b2dd=resolveDeleteTarget(_0xc27bc5,_0x43bb98),_0x431556=_0x55ea9d[_0x2eef2e(0x116)][_0x57b2dd];if(!_0x431556)throw CliErrors['validation'](_0x2eef2e(0x11b)+_0x57b2dd+'\x22.');const _0x502c3a=resolveLocalFilePathFromLockKey(_0x22585b,_0x57b2dd),_0x14bb92=relative(_0x22585b[_0x2eef2e(0x11e)],_0x502c3a),_0x4154f1=join(_0x22585b[_0x2eef2e(0x12b)],_0x2eef2e(0x124),_0x14bb92);return{'method':'POST','url':_0x2eef2e(0x118),'body':{'appCode':_0x16bd2b['appCode'],'target':_0x57b2dd,'remoteId':_0x431556[_0x2eef2e(0x13c)],'localFilePath':_0x502c3a,'trashedPath':_0x4154f1},'description':_0x2eef2e(0x120)+_0x57b2dd+_0x2eef2e(0x13d)};},async 'execute'(_0x510d78){const _0x147103=a32_0x5323ec,_0x1124e4=loadBffProjectConfig(_0x510d78['appCode']),_0x234540=await readBffLockFile(_0x1124e4[_0x147103(0x117)]);if(!_0x234540)throw CliErrors[_0x147103(0x12a)](_0x147103(0x130));const {lockData:_0x282cba,appLock:_0x25a01c}=ensureLockScope(_0x234540,_0x510d78[_0x147103(0x129)],_0x1124e4[_0x147103(0x123)],_0x147103(0x113)),_0xe5c6fd=JSON[_0x147103(0x143)](JSON['stringify'](_0x282cba)),_0x19f28e=_0xe5c6fd[_0x147103(0x133)][_0x510d78[_0x147103(0x129)]];if(!_0x19f28e)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x510d78[_0x147103(0x129)]+_0x147103(0x126));const _0x3ef3bf=_0x510d78[_0x147103(0x140)](_0x147103(0x134)),_0x54f026=Object['keys'](_0x19f28e[_0x147103(0x116)]),_0x3db0b3=resolveDeleteTarget(_0x3ef3bf,_0x54f026),_0x33b783=_0x19f28e[_0x147103(0x116)][_0x3db0b3];if(!_0x33b783)throw CliErrors[_0x147103(0x12a)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x3db0b3+'\x22.');await deleteBffScript(_0x33b783[_0x147103(0x13c)]),delete _0x19f28e['functions'][_0x3db0b3],_0x19f28e['lastSync']=new Date()[_0x147103(0x13a)](),await writeBffLockFile(_0x1124e4[_0x147103(0x117)],_0xe5c6fd);const _0x4c60b9=resolveLocalFilePathFromLockKey(_0x1124e4,_0x3db0b3);let _0xf69e16;await fileExists(_0x4c60b9)&&(_0xf69e16=await moveToTrash(_0x1124e4[_0x147103(0x11e)],_0x1124e4[_0x147103(0x12b)],_0x4c60b9),await cleanupEmptyDirectories(dirname(_0x4c60b9),_0x1124e4[_0x147103(0x142)]));await waitForDeleteSettlement(_0x1124e4[_0x147103(0x117)],_0x510d78[_0x147103(0x129)],_0x3db0b3,_0x4c60b9),await sleep(0x96);const _0xd9e206={'deleted':_0x3db0b3,'remoteId':_0x33b783[_0x147103(0x13c)]};if(_0xf69e16)_0xd9e206[_0x147103(0x114)]=_0xf69e16;return{'ok':!![],'data':_0xd9e206,'message':_0x147103(0x139)+_0x3db0b3+(_0xf69e16?_0x147103(0x128):'')};}};function resolveDeleteTarget(_0x2769ce,_0x595e82){const _0x5d046e=a32_0x5323ec;if(_0x2769ce[_0x5d046e(0x11a)]('/')){const _0x595a25=_0x595e82[_0x5d046e(0x11c)](_0x23ad4c=>_0x23ad4c===_0x2769ce);if(!_0x595a25)throw CliErrors[_0x5d046e(0x12a)](_0x5d046e(0x12e)+_0x2769ce);return _0x595a25;}const _0x363f54=_0x595e82[_0x5d046e(0x112)](_0x3d7345=>_0x3d7345[_0x5d046e(0x136)]('/')['at'](-0x1)===_0x2769ce);if(_0x363f54[_0x5d046e(0x138)]===0x0)throw CliErrors[_0x5d046e(0x12a)](_0x5d046e(0x12e)+_0x2769ce);if(_0x363f54['length']>0x1)throw CliErrors[_0x5d046e(0x12a)](_0x5d046e(0x132)+_0x2769ce+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x363f54[_0x5d046e(0x115)](_0x136f2e=>_0x5d046e(0x141)+_0x136f2e)[_0x5d046e(0x11d)]('\x0a'));return _0x363f54[0x0];}async function moveToTrash(_0xbadce5,_0x594484,_0x57bb76){const _0x5aa240=a32_0x5323ec,_0x27a51e=new Date()[_0x5aa240(0x13a)]()[_0x5aa240(0x135)](/[:.]/g,'-'),_0x2a83bf=relative(_0xbadce5,_0x57bb76),_0x51e3de=join(_0x594484,_0x27a51e,_0x2a83bf);return await mkdir(dirname(_0x51e3de),{'recursive':!![]}),await rename(_0x57bb76,_0x51e3de),_0x51e3de;}async function cleanupEmptyDirectories(_0x2b2064,_0x440305){const _0x1df921=a32_0x5323ec;let _0x53e310=resolve(_0x2b2064);const _0x5db62d=resolve(_0x440305);while(_0x53e310['startsWith'](''+_0x5db62d+sep)||_0x53e310===_0x5db62d){if(_0x53e310===_0x5db62d)return;try{const _0x1ad3e3=await readdir(_0x53e310);if(_0x1ad3e3[_0x1df921(0x138)]>0x0)return;await rmdir(_0x53e310);}catch{return;}_0x53e310=dirname(_0x53e310);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x2cd30a,_0x1e7af9,_0xe81ab6,_0x3afb83){const _0x4ffcd3=a32_0x5323ec;for(let _0x4bdd58=0x0;_0x4bdd58<DELETE_SETTLE_RETRY_COUNT;_0x4bdd58+=0x1){const _0x5f0a9a=await readBffLockFile(_0x2cd30a),_0xe80cc5=!!_0x5f0a9a?.[_0x4ffcd3(0x133)]?.[_0x1e7af9]?.['functions']?.[_0xe81ab6],_0x4d49d9=await fileExists(_0x3afb83);if(!_0xe80cc5&&!_0x4d49d9)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x4ffcd3(0x137)+_0xe81ab6+'.');}
1
+ function a32_0x54c0(){const _0x3a8667=['1058526RuEGyF','functions','length','validation','filter','\x22\x20not\x20found\x20after\x20ensureLockScope.','join','trashedTo','scriptsRootDir','lastSync','map','697862VARWyI','1640MqMzXt','appCode','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','string','bff','150kkiLbb','Local\x20delete\x20not\x20settled\x20for\x20','Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','No\x20lock\x20entry\x20found\x20for\x20\x22','25zbbCDx','parse','272164ibnRrR','Backend\x20Function\x20lock\x20file\x20not\x20found.','929385FvBBcW','find','delete','576qgiaRD','lockFilePath','Deleted\x20','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','high-risk-write','apps','Function\x20not\x20found:\x20','/api/management/library/scripts/delete','target','remoteId','Lock\x20scope\x20for\x20app\x20\x22','186KoGFoP','trashDir','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','1014702ilntCN','\x20(local\x20file\x20moved\x20to\x20trash)','keys','toISOString','stringify','startsWith','POST','scriptsRoot','projectRoot','77189ktfGRd'];a32_0x54c0=function(){return _0x3a8667;};return a32_0x54c0();}const a32_0x2c1379=a32_0x5b15;(function(_0x13b9eb,_0x21ef6a){const _0x3251ee=a32_0x5b15,_0x501ef7=_0x13b9eb();while(!![]){try{const _0x450c4f=parseInt(_0x3251ee(0x16a))/0x1+-parseInt(_0x3251ee(0x185))/0x2+-parseInt(_0x3251ee(0x17b))/0x3+parseInt(_0x3251ee(0x168))/0x4*(parseInt(_0x3251ee(0x166))/0x5)+-parseInt(_0x3251ee(0x178))/0x6*(parseInt(_0x3251ee(0x184))/0x7)+-parseInt(_0x3251ee(0x191))/0x8*(parseInt(_0x3251ee(0x16d))/0x9)+parseInt(_0x3251ee(0x162))/0xa*(parseInt(_0x3251ee(0x190))/0xb);if(_0x450c4f===_0x21ef6a)break;else _0x501ef7['push'](_0x501ef7['shift']());}catch(_0x2abca8){_0x501ef7['push'](_0x501ef7['shift']());}}}(a32_0x54c0,0xf3d6e));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';function a32_0x5b15(_0x65223a,_0x54f138){_0x65223a=_0x65223a-0x15f;const _0x54c047=a32_0x54c0();let _0x5b1568=_0x54c047[_0x65223a];return _0x5b1568;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x2c1379(0x161),'command':a32_0x2c1379(0x16c),'description':'Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','risk':a32_0x2c1379(0x171),'flags':[{'name':a32_0x2c1379(0x175),'type':a32_0x2c1379(0x160),'required':!![],'description':a32_0x2c1379(0x17a)}],async 'validate'(_0x4ff79d){const _0x35eea0=a32_0x2c1379,_0xf3f445=loadBffProjectConfig(_0x4ff79d['appCode']),_0x30e51e=await readBffLockFile(_0xf3f445[_0x35eea0(0x16e)]);if(!_0x30e51e)throw CliErrors[_0x35eea0(0x188)](_0x35eea0(0x164));},async 'dryRun'(_0x1e1469){const _0x2a217e=a32_0x2c1379,_0x3b991b=loadBffProjectConfig(_0x1e1469[_0x2a217e(0x192)]),_0x15ee1b=await readBffLockFile(_0x3b991b[_0x2a217e(0x16e)]);if(!_0x15ee1b)throw CliErrors[_0x2a217e(0x188)](_0x2a217e(0x169));const {appLock:_0x33dc0c}=ensureLockScope(_0x15ee1b,_0x1e1469[_0x2a217e(0x192)],_0x3b991b[_0x2a217e(0x182)],_0x2a217e(0x16c)),_0x3c6d1c=_0x1e1469['str'](_0x2a217e(0x175)),_0x1ce5e8=Object[_0x2a217e(0x17d)](_0x33dc0c[_0x2a217e(0x186)]),_0x460a98=resolveDeleteTarget(_0x3c6d1c,_0x1ce5e8),_0x273884=_0x33dc0c[_0x2a217e(0x186)][_0x460a98];if(!_0x273884)throw CliErrors['validation'](_0x2a217e(0x165)+_0x460a98+'\x22.');const _0x366369=resolveLocalFilePathFromLockKey(_0x3b991b,_0x460a98),_0x192fcc=relative(_0x3b991b[_0x2a217e(0x183)],_0x366369),_0x4fb8ff=join(_0x3b991b['trashDir'],'<timestamp>',_0x192fcc);return{'method':_0x2a217e(0x181),'url':_0x2a217e(0x174),'body':{'appCode':_0x1e1469['appCode'],'target':_0x460a98,'remoteId':_0x273884['remoteId'],'localFilePath':_0x366369,'trashedPath':_0x4fb8ff},'description':'Would\x20delete\x20'+_0x460a98+_0x2a217e(0x170)};},async 'execute'(_0x2445df){const _0xb35923=a32_0x2c1379,_0x1dc589=loadBffProjectConfig(_0x2445df[_0xb35923(0x192)]),_0x2b8a32=await readBffLockFile(_0x1dc589[_0xb35923(0x16e)]);if(!_0x2b8a32)throw CliErrors[_0xb35923(0x188)](_0xb35923(0x169));const {lockData:_0x3c50c0,appLock:_0x3c224d}=ensureLockScope(_0x2b8a32,_0x2445df[_0xb35923(0x192)],_0x1dc589[_0xb35923(0x182)],_0xb35923(0x16c)),_0x21bab4=JSON[_0xb35923(0x167)](JSON[_0xb35923(0x17f)](_0x3c50c0)),_0x1910ce=_0x21bab4[_0xb35923(0x172)][_0x2445df[_0xb35923(0x192)]];if(!_0x1910ce)throw new Error(_0xb35923(0x177)+_0x2445df['appCode']+_0xb35923(0x18a));const _0x627e39=_0x2445df['str'](_0xb35923(0x175)),_0x5d2db1=Object['keys'](_0x1910ce[_0xb35923(0x186)]),_0x1eba23=resolveDeleteTarget(_0x627e39,_0x5d2db1),_0x5dc50d=_0x1910ce[_0xb35923(0x186)][_0x1eba23];if(!_0x5dc50d)throw CliErrors[_0xb35923(0x188)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x1eba23+'\x22.');await deleteBffScript(_0x5dc50d[_0xb35923(0x176)]),delete _0x1910ce[_0xb35923(0x186)][_0x1eba23],_0x1910ce[_0xb35923(0x18e)]=new Date()['toISOString'](),await writeBffLockFile(_0x1dc589[_0xb35923(0x16e)],_0x21bab4);const _0x407e59=resolveLocalFilePathFromLockKey(_0x1dc589,_0x1eba23);let _0x1ac64f;await fileExists(_0x407e59)&&(_0x1ac64f=await moveToTrash(_0x1dc589[_0xb35923(0x183)],_0x1dc589[_0xb35923(0x179)],_0x407e59),await cleanupEmptyDirectories(dirname(_0x407e59),_0x1dc589[_0xb35923(0x18d)]));await waitForDeleteSettlement(_0x1dc589[_0xb35923(0x16e)],_0x2445df[_0xb35923(0x192)],_0x1eba23,_0x407e59),await sleep(0x96);const _0x25f9ce={'deleted':_0x1eba23,'remoteId':_0x5dc50d[_0xb35923(0x176)]};if(_0x1ac64f)_0x25f9ce[_0xb35923(0x18c)]=_0x1ac64f;return{'ok':!![],'data':_0x25f9ce,'message':_0xb35923(0x16f)+_0x1eba23+(_0x1ac64f?_0xb35923(0x17c):'')};}};function resolveDeleteTarget(_0x18a479,_0x3e8cd4){const _0x1d0ffe=a32_0x2c1379;if(_0x18a479['includes']('/')){const _0x120856=_0x3e8cd4[_0x1d0ffe(0x16b)](_0x5cf3cc=>_0x5cf3cc===_0x18a479);if(!_0x120856)throw CliErrors[_0x1d0ffe(0x188)]('Function\x20not\x20found:\x20'+_0x18a479);return _0x120856;}const _0x5dd822=_0x3e8cd4[_0x1d0ffe(0x189)](_0x5d79a4=>_0x5d79a4['split']('/')['at'](-0x1)===_0x18a479);if(_0x5dd822[_0x1d0ffe(0x187)]===0x0)throw CliErrors[_0x1d0ffe(0x188)](_0x1d0ffe(0x173)+_0x18a479);if(_0x5dd822[_0x1d0ffe(0x187)]>0x1)throw CliErrors['validation']('Multiple\x20functions\x20match\x20\x22'+_0x18a479+_0x1d0ffe(0x15f)+_0x5dd822[_0x1d0ffe(0x18f)](_0x38c536=>'\x20\x20-\x20'+_0x38c536)[_0x1d0ffe(0x18b)]('\x0a'));return _0x5dd822[0x0];}async function moveToTrash(_0x42617f,_0x1cded9,_0x54facf){const _0x98cec2=a32_0x2c1379,_0x324bce=new Date()[_0x98cec2(0x17e)]()['replace'](/[:.]/g,'-'),_0x4fcd93=relative(_0x42617f,_0x54facf),_0x190cbb=join(_0x1cded9,_0x324bce,_0x4fcd93);return await mkdir(dirname(_0x190cbb),{'recursive':!![]}),await rename(_0x54facf,_0x190cbb),_0x190cbb;}async function cleanupEmptyDirectories(_0x3238fb,_0xc30a82){const _0x24ada6=a32_0x2c1379;let _0x407417=resolve(_0x3238fb);const _0xd1ac9e=resolve(_0xc30a82);while(_0x407417[_0x24ada6(0x180)](''+_0xd1ac9e+sep)||_0x407417===_0xd1ac9e){if(_0x407417===_0xd1ac9e)return;try{const _0x5235a3=await readdir(_0x407417);if(_0x5235a3[_0x24ada6(0x187)]>0x0)return;await rmdir(_0x407417);}catch{return;}_0x407417=dirname(_0x407417);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x18bb48,_0x39e0c9,_0x5bdf24,_0x3788fe){const _0x964198=a32_0x2c1379;for(let _0x2fe645=0x0;_0x2fe645<DELETE_SETTLE_RETRY_COUNT;_0x2fe645+=0x1){const _0x58f40c=await readBffLockFile(_0x18bb48),_0x47bd69=!!_0x58f40c?.[_0x964198(0x172)]?.[_0x39e0c9]?.[_0x964198(0x186)]?.[_0x5bdf24],_0x570eae=await fileExists(_0x3788fe);if(!_0x47bd69&&!_0x570eae)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x964198(0x163)+_0x5bdf24+'.');}
@@ -1 +1 @@
1
- const a33_0x2addab=a33_0x22e1;function a33_0x4f29(){const _0x30472e=['Return\x20full\x20raw\x20script\x20object','33RDzBnW','8nvXRrs','updatedTime','2131125zgwkaz','238750otZIzG','4mlsCDG','bff','verbose','num','Get\x20Backend\x20Function\x20script\x20details\x20by\x20ID','read','7517503QkAEfP','1600278yLMWzy','updateUserName','appCode','version','boolean','Script\x20ID','687496RqvKhB','10767015WznjeM','scriptContent','2606220wDtjBc','2XzZlPw','detail','scriptType','bool'];a33_0x4f29=function(){return _0x30472e;};return a33_0x4f29();}function a33_0x22e1(_0x261853,_0x55d398){_0x261853=_0x261853-0x1bc;const _0x4f291c=a33_0x4f29();let _0x22e1b9=_0x4f291c[_0x261853];return _0x22e1b9;}(function(_0x1a3fa6,_0x116249){const _0x39ee14=a33_0x22e1,_0x29f108=_0x1a3fa6();while(!![]){try{const _0x35e75c=-parseInt(_0x39ee14(0x1d1))/0x1*(parseInt(_0x39ee14(0x1d5))/0x2)+parseInt(_0x39ee14(0x1d4))/0x3+parseInt(_0x39ee14(0x1c4))/0x4*(parseInt(_0x39ee14(0x1c2))/0x5)+parseInt(_0x39ee14(0x1cb))/0x6+parseInt(_0x39ee14(0x1ca))/0x7+parseInt(_0x39ee14(0x1c0))/0x8*(-parseInt(_0x39ee14(0x1d2))/0x9)+-parseInt(_0x39ee14(0x1c3))/0xa*(parseInt(_0x39ee14(0x1bf))/0xb);if(_0x35e75c===_0x116249)break;else _0x29f108['push'](_0x29f108['shift']());}catch(_0x50d570){_0x29f108['push'](_0x29f108['shift']());}}}(a33_0x4f29,0xa60d7));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x2addab(0x1c5),'command':a33_0x2addab(0x1d6),'description':a33_0x2addab(0x1c8),'risk':a33_0x2addab(0x1c9),'flags':[{'name':'id','type':'number','required':!![],'description':a33_0x2addab(0x1d0)},{'name':a33_0x2addab(0x1c6),'type':a33_0x2addab(0x1cf),'description':a33_0x2addab(0x1be)}],async 'execute'(_0x158298){const _0x3af3b0=a33_0x2addab,_0x3187ff=await getBffScriptInfo(_0x158298[_0x3af3b0(0x1c7)]('id')),_0x52efa2=_0x158298[_0x3af3b0(0x1bd)](_0x3af3b0(0x1c6));if(_0x52efa2)return{'ok':!![],'data':_0x3187ff};return{'ok':!![],'data':{'id':_0x3187ff['id'],'functionName':_0x3187ff['functionName']??'','version':_0x3187ff[_0x3af3b0(0x1ce)]??'','updateUserName':_0x3187ff[_0x3af3b0(0x1cc)]??'','appCode':_0x3187ff[_0x3af3b0(0x1cd)],'scriptType':_0x3187ff[_0x3af3b0(0x1bc)],'description':_0x3187ff['description']||'(none)','createdTime':_0x3187ff['createdTime']??'','updatedTime':_0x3187ff[_0x3af3b0(0x1c1)]??'','scriptContent':_0x3187ff[_0x3af3b0(0x1d3)]??''}};}};
1
+ function a33_0x3713(){const _0x1d55da=['num','2713707YKOjkE','767120nfnjEz','appCode','192CvzBLt','5334833WfylWH','(none)','boolean','description','createdTime','number','12VTPeAA','1098308sDSMWn','updatedTime','detail','bool','bff','Get\x20Backend\x20Function\x20script\x20details\x20by\x20ID','130cPjLCj','read','1441202subsqS','2VLNTDX','36657HkwbkK','updateUserName','verbose','functionName','version','Return\x20full\x20raw\x20script\x20object','scriptContent','342738SBESJU'];a33_0x3713=function(){return _0x1d55da;};return a33_0x3713();}const a33_0x5165e5=a33_0x570b;function a33_0x570b(_0x501e82,_0x293ede){_0x501e82=_0x501e82-0x1ed;const _0x371322=a33_0x3713();let _0x570b8a=_0x371322[_0x501e82];return _0x570b8a;}(function(_0x1de406,_0x4c40eb){const _0x51733d=a33_0x570b,_0x272de5=_0x1de406();while(!![]){try{const _0x11fd5d=-parseInt(_0x51733d(0x1f3))/0x1*(-parseInt(_0x51733d(0x1f2))/0x2)+-parseInt(_0x51733d(0x1fd))/0x3+-parseInt(_0x51733d(0x208))/0x4+-parseInt(_0x51733d(0x1fe))/0x5*(-parseInt(_0x51733d(0x207))/0x6)+parseInt(_0x51733d(0x201))/0x7+parseInt(_0x51733d(0x200))/0x8*(-parseInt(_0x51733d(0x1f4))/0x9)+parseInt(_0x51733d(0x1f0))/0xa*(-parseInt(_0x51733d(0x1fb))/0xb);if(_0x11fd5d===_0x4c40eb)break;else _0x272de5['push'](_0x272de5['shift']());}catch(_0x4966e1){_0x272de5['push'](_0x272de5['shift']());}}}(a33_0x3713,0xca339));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x5165e5(0x1ee),'command':a33_0x5165e5(0x20a),'description':a33_0x5165e5(0x1ef),'risk':a33_0x5165e5(0x1f1),'flags':[{'name':'id','type':a33_0x5165e5(0x206),'required':!![],'description':'Script\x20ID'},{'name':a33_0x5165e5(0x1f6),'type':a33_0x5165e5(0x203),'description':a33_0x5165e5(0x1f9)}],async 'execute'(_0x3ea7d5){const _0x1bfce9=a33_0x5165e5,_0x3ade79=await getBffScriptInfo(_0x3ea7d5[_0x1bfce9(0x1fc)]('id')),_0x4a807c=_0x3ea7d5[_0x1bfce9(0x1ed)](_0x1bfce9(0x1f6));if(_0x4a807c)return{'ok':!![],'data':_0x3ade79};return{'ok':!![],'data':{'id':_0x3ade79['id'],'functionName':_0x3ade79[_0x1bfce9(0x1f7)]??'','version':_0x3ade79[_0x1bfce9(0x1f8)]??'','updateUserName':_0x3ade79[_0x1bfce9(0x1f5)]??'','appCode':_0x3ade79[_0x1bfce9(0x1ff)],'scriptType':_0x3ade79['scriptType'],'description':_0x3ade79[_0x1bfce9(0x204)]||_0x1bfce9(0x202),'createdTime':_0x3ade79[_0x1bfce9(0x205)]??'','updatedTime':_0x3ade79[_0x1bfce9(0x209)]??'','scriptContent':_0x3ade79[_0x1bfce9(0x1fa)]??''}};}};