@lovrabet/rabetbase-cli 2.5.0-beta.5 → 2.5.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.js +1 -1
  87. package/lib/commands/db/diff-refresh-status.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/table-diff-shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/kb/create.js +1 -1
  103. package/lib/commands/kb/delete.js +1 -1
  104. package/lib/commands/kb/detail.js +1 -1
  105. package/lib/commands/kb/index.js +1 -1
  106. package/lib/commands/kb/list.js +1 -1
  107. package/lib/commands/kb/search.js +1 -1
  108. package/lib/commands/kb/shared.js +1 -1
  109. package/lib/commands/kb/update.js +1 -1
  110. package/lib/commands/logs/index.js +1 -1
  111. package/lib/commands/menu/asset-update.js +1 -1
  112. package/lib/commands/menu/delete.js +1 -1
  113. package/lib/commands/menu/external-link-create.js +1 -1
  114. package/lib/commands/menu/external-link-update.js +1 -1
  115. package/lib/commands/menu/group-create.js +1 -1
  116. package/lib/commands/menu/group-update.js +1 -1
  117. package/lib/commands/menu/index.js +1 -1
  118. package/lib/commands/menu/list.js +1 -1
  119. package/lib/commands/menu/move.js +1 -1
  120. package/lib/commands/menu/regroup-start.js +1 -1
  121. package/lib/commands/menu/rename.js +1 -1
  122. package/lib/commands/menu/shared/compare-table.js +1 -1
  123. package/lib/commands/menu/shared/delete-plan.js +1 -1
  124. package/lib/commands/menu/shared/facts.js +1 -1
  125. package/lib/commands/menu/shared/index.js +1 -1
  126. package/lib/commands/menu/shared/inquirer.js +1 -1
  127. package/lib/commands/menu/shared/local-pages.js +1 -1
  128. package/lib/commands/menu/shared/logic.js +1 -1
  129. package/lib/commands/menu/shared/mutations.js +1 -1
  130. package/lib/commands/menu/shared/service.js +1 -1
  131. package/lib/commands/menu/shared/sync-core.js +1 -1
  132. package/lib/commands/menu/shared/update-core.js +1 -1
  133. package/lib/commands/menu/shared/valid-url.js +1 -1
  134. package/lib/commands/menu/sync.js +1 -1
  135. package/lib/commands/menu/visibility-update.js +1 -1
  136. package/lib/commands/notification/config-create.js +1 -1
  137. package/lib/commands/notification/config-delete.js +1 -1
  138. package/lib/commands/notification/config-list.js +1 -1
  139. package/lib/commands/notification/config-update.js +1 -1
  140. package/lib/commands/notification/index.js +1 -1
  141. package/lib/commands/notification/shared.js +1 -1
  142. package/lib/commands/ocr/index.js +1 -1
  143. package/lib/commands/page/create.js +1 -1
  144. package/lib/commands/page/custom/detail.js +1 -1
  145. package/lib/commands/page/custom/list.js +1 -1
  146. package/lib/commands/page/custom/publish.js +1 -1
  147. package/lib/commands/page/custom/shared.js +1 -1
  148. package/lib/commands/page/custom/syntax.js +1 -1
  149. package/lib/commands/page/custom/template.js +1 -1
  150. package/lib/commands/page/custom/update.js +1 -1
  151. package/lib/commands/page/data-list-status.js +1 -1
  152. package/lib/commands/page/generate-start.js +1 -1
  153. package/lib/commands/page/generate-status.js +1 -1
  154. package/lib/commands/page/index.js +1 -1
  155. package/lib/commands/page/pull.js +1 -1
  156. package/lib/commands/page/push.js +1 -1
  157. package/lib/commands/page/relation-audit.js +1 -1
  158. package/lib/commands/page/restore.js +1 -1
  159. package/lib/commands/page/shared.js +1 -1
  160. package/lib/commands/page/sync.js +1 -1
  161. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  162. package/lib/commands/project/create/format-elapsed.js +1 -1
  163. package/lib/commands/project/create/main.js +1 -1
  164. package/lib/commands/project/create/materialize-project-template.js +1 -1
  165. package/lib/commands/project/create/project-name.js +1 -1
  166. package/lib/commands/project/create/project-template-archive.js +1 -1
  167. package/lib/commands/project/create/project-template-path.js +1 -1
  168. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  169. package/lib/commands/project/create/use-format-code.js +1 -1
  170. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  171. package/lib/commands/project/index.js +1 -1
  172. package/lib/commands/project/upgrade.js +1 -1
  173. package/lib/commands/registry.js +1 -1
  174. package/lib/commands/role/delete.js +1 -1
  175. package/lib/commands/role/detail.js +1 -1
  176. package/lib/commands/role/index.js +1 -1
  177. package/lib/commands/role/list.js +1 -1
  178. package/lib/commands/role/shared.js +1 -1
  179. package/lib/commands/role/update.js +1 -1
  180. package/lib/commands/role/user-add.js +1 -1
  181. package/lib/commands/role/user-remove.js +1 -1
  182. package/lib/commands/role/user-resolve.js +1 -1
  183. package/lib/commands/run/index.js +1 -1
  184. package/lib/commands/schema.js +1 -1
  185. package/lib/commands/sql/create.js +1 -1
  186. package/lib/commands/sql/delete.js +1 -1
  187. package/lib/commands/sql/detail.js +1 -1
  188. package/lib/commands/sql/exec.js +1 -1
  189. package/lib/commands/sql/index.js +1 -1
  190. package/lib/commands/sql/list.js +1 -1
  191. package/lib/commands/sql/pull.js +1 -1
  192. package/lib/commands/sql/push.js +1 -1
  193. package/lib/commands/sql/shared.js +1 -1
  194. package/lib/commands/sql/status.js +1 -1
  195. package/lib/commands/sql/validate.js +1 -1
  196. package/lib/commands/task/index.js +1 -1
  197. package/lib/commands/task/status.js +1 -1
  198. package/lib/commands/tenant/index.js +1 -1
  199. package/lib/commands/tenant/members-list.js +1 -1
  200. package/lib/commands/tenant/shared.js +1 -1
  201. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  202. package/lib/commands/user-account/index.js +1 -1
  203. package/lib/commands/workspace/add.js +1 -1
  204. package/lib/commands/workspace/index.js +1 -1
  205. package/lib/commands/workspace/remove.js +1 -1
  206. package/lib/config/domain-config.js +1 -1
  207. package/lib/config/schema.js +1 -1
  208. package/lib/constant/cdn.js +1 -1
  209. package/lib/constant/cli.js +1 -1
  210. package/lib/constant/defaults.js +1 -1
  211. package/lib/constant/domain.js +1 -1
  212. package/lib/constant/env.js +1 -1
  213. package/lib/constant/output.js +1 -1
  214. package/lib/constant/paths.js +1 -1
  215. package/lib/constant/region.js +1 -1
  216. package/lib/constant/risk.js +1 -1
  217. package/lib/context/app-resolver.js +1 -1
  218. package/lib/context/auth-resolver.js +1 -1
  219. package/lib/context/config-loader.js +1 -1
  220. package/lib/context.js +1 -1
  221. package/lib/core/alias-resolver.js +1 -1
  222. package/lib/core/api-client.js +1 -1
  223. package/lib/core/bff/config.js +1 -1
  224. package/lib/core/bff/file-system.js +1 -1
  225. package/lib/core/bff/hash.js +1 -1
  226. package/lib/core/bff/lock.js +1 -1
  227. package/lib/core/bff/utils.js +1 -1
  228. package/lib/core/db-resolver.js +1 -1
  229. package/lib/core/page/file-system.js +1 -1
  230. package/lib/core/page/hash.js +1 -1
  231. package/lib/core/page/lock.js +1 -1
  232. package/lib/core/sql-index-auditor.js +1 -1
  233. package/lib/core/sql-sync/config.js +1 -1
  234. package/lib/core/sql-sync/file-system.js +1 -1
  235. package/lib/core/sql-sync/hash.js +1 -1
  236. package/lib/core/sql-sync/lock.js +1 -1
  237. package/lib/core/sql-sync/utils.js +1 -1
  238. package/lib/core/sql-validator.js +1 -1
  239. package/lib/errors.js +1 -1
  240. package/lib/framework/build-all-flags.js +1 -1
  241. package/lib/framework/error-output.js +1 -1
  242. package/lib/framework/explicit-yes.js +1 -1
  243. package/lib/framework/flags.js +1 -1
  244. package/lib/framework/help.js +1 -1
  245. package/lib/framework/index.js +1 -1
  246. package/lib/framework/output.js +1 -1
  247. package/lib/framework/response.js +1 -1
  248. package/lib/framework/runner-alias.js +1 -1
  249. package/lib/framework/runner.js +1 -1
  250. package/lib/framework/schema-export.js +1 -1
  251. package/lib/framework/types.js +1 -1
  252. package/lib/generated/build-info.d.ts +4 -4
  253. package/lib/generated/build-info.js +1 -1
  254. package/lib/help.js +1 -1
  255. package/lib/postinstall.js +1 -1
  256. package/lib/runtime/confirmation.js +1 -1
  257. package/lib/runtime/event.js +1 -1
  258. package/lib/runtime/index.js +1 -1
  259. package/lib/runtime/queue.js +1 -1
  260. package/lib/runtime/resolve.js +1 -1
  261. package/lib/skills/builtin-skill.js +1 -1
  262. package/lib/skills/main.js +1 -1
  263. package/lib/skills/npx-skills-add.js +1 -1
  264. package/lib/skills/skill-presence.js +1 -1
  265. package/lib/telemetry/cli-command-trace.js +1 -1
  266. package/lib/telemetry/cli-help-trace.js +1 -1
  267. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  268. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  269. package/lib/telemetry/send-cli-trace-log.js +1 -1
  270. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  271. package/lib/utils/ai_config.js +1 -1
  272. package/lib/utils/apply-jq-filter.js +1 -1
  273. package/lib/utils/cdn-config.js +1 -1
  274. package/lib/utils/check-sdk-version.js +1 -1
  275. package/lib/utils/cli-version-check.js +1 -1
  276. package/lib/utils/cli-version-policy.js +1 -1
  277. package/lib/utils/config.js +1 -1
  278. package/lib/utils/entity-with-id.js +1 -1
  279. package/lib/utils/file-utils.js +1 -1
  280. package/lib/utils/guides-cdn.js +1 -1
  281. package/lib/utils/http-client.js +1 -1
  282. package/lib/utils/is-non-interactive.js +1 -1
  283. package/lib/utils/logger.js +1 -1
  284. package/lib/utils/params.js +1 -1
  285. package/lib/utils/platform.js +1 -1
  286. package/lib/utils/sleep.js +1 -1
  287. package/lib/utils/template-replacer.js +1 -1
  288. package/lib/utils/update-notice.js +1 -1
  289. package/lib/utils/version.js +1 -1
  290. package/lib/utils/with-active-cookie.js +1 -1
  291. package/lib/utils/write-cli-side-channel.js +1 -1
  292. package/package.json +1 -1
  293. package/skills/rabetbase/SKILL.md +2 -2
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a20_0x35dc54=a20_0x4514;(function(_0x37a906,_0x3d797b){const _0x439a88=a20_0x4514,_0x5bd7a8=_0x37a906();while(!![]){try{const _0x4c7b35=parseInt(_0x439a88(0x13e))/0x1+parseInt(_0x439a88(0x126))/0x2*(parseInt(_0x439a88(0x136))/0x3)+-parseInt(_0x439a88(0x13d))/0x4*(-parseInt(_0x439a88(0x14d))/0x5)+parseInt(_0x439a88(0x131))/0x6+-parseInt(_0x439a88(0x139))/0x7*(-parseInt(_0x439a88(0x14f))/0x8)+parseInt(_0x439a88(0x144))/0x9+-parseInt(_0x439a88(0x129))/0xa;if(_0x4c7b35===_0x3d797b)break;else _0x5bd7a8['push'](_0x5bd7a8['shift']());}catch(_0x1918a7){_0x5bd7a8['push'](_0x5bd7a8['shift']());}}}(a20_0x2993,0x7d139));function a20_0x4514(_0x526871,_0x11ab7e){_0x526871=_0x526871-0x126;const _0x29930b=a20_0x2993();let _0x4514b8=_0x29930b[_0x526871];return _0x4514b8;}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(_0x39e401,_0x362870){const _0x7650d7=a20_0x4514,_0x15569d=[],_0xf304e0=_0x39e401[_0x7650d7(0x14c)]&&typeof _0x39e401[_0x7650d7(0x14c)]===_0x7650d7(0x138)?_0x39e401[_0x7650d7(0x14c)]:{},_0x4fb02e=_0x39e401[_0x7650d7(0x134)]||undefined,_0x921f03=_0x4fb02e??(Object['keys'](_0xf304e0)[_0x7650d7(0x132)]===0x1?Object[_0x7650d7(0x148)](_0xf304e0)[0x0]:undefined);for(const [_0x836e19,_0x172fd8]of Object['entries'](_0xf304e0)){if(!_0x172fd8||typeof _0x172fd8!==_0x7650d7(0x138)||!_0x172fd8[_0x7650d7(0x12e)])continue;_0x15569d[_0x7650d7(0x13b)]({'name':_0x836e19,'appcode':_0x172fd8[_0x7650d7(0x12e)],'named':!![],'definedIn':_0x362870,'isDefault':_0x836e19===_0x921f03,...buildAppProfileListFields(_0x172fd8)});}return _0x15569d;}function buildMergedItems(_0x348999,_0x4a1f02){const _0x2220b2=a20_0x4514,{apps:apps={}}=_0x348999,_0x43b2d5=_0x348999[_0x2220b2(0x134)],_0x43aeb2=_0x43b2d5??(Object[_0x2220b2(0x148)](apps)[_0x2220b2(0x132)]===0x1?Object[_0x2220b2(0x148)](apps)[0x0]:undefined),_0x5a17e7=_0x4a1f02['globalConfig'][_0x2220b2(0x14c)]&&typeof _0x4a1f02[_0x2220b2(0x133)]['apps']===_0x2220b2(0x138)?_0x4a1f02[_0x2220b2(0x133)][_0x2220b2(0x14c)]:{},_0x56ccf4=_0x4a1f02[_0x2220b2(0x14e)][_0x2220b2(0x14c)]&&typeof _0x4a1f02[_0x2220b2(0x14e)][_0x2220b2(0x14c)]===_0x2220b2(0x138)?_0x4a1f02[_0x2220b2(0x14e)]['apps']:{},_0x25ee46=Object['entries'](apps),_0x223989=_0x25ee46[_0x2220b2(0x12b)](([_0x2ea93d,_0x3b7e26])=>({'name':_0x2ea93d,'appcode':_0x3b7e26[_0x2220b2(0x12e)],'named':!![],'definedIn':appDefinedIn(_0x2ea93d,_0x5a17e7,_0x56ccf4),'isDefault':_0x2ea93d===_0x43aeb2,...buildAppProfileListFields(_0x3b7e26)}));return _0x223989;}function validateAppListFlags(_0x199cbe){const _0x316dc0=a20_0x4514;if(!_0x199cbe[_0x316dc0(0x140)](_0x316dc0(0x13a)))return;if(!_0x199cbe[_0x316dc0(0x140)](_0x316dc0(0x12f))&&!_0x199cbe['bool']('project'))return;throw CliErrors[_0x316dc0(0x130)](_0x316dc0(0x142),_0x316dc0(0x145));}async function execute(_0xffa9b0){const _0xc2535b=a20_0x4514;validateAppListFlags(_0xffa9b0);if(_0xffa9b0[_0xc2535b(0x140)](_0xc2535b(0x13a)))return{'ok':!![],'data':await listRemoteAppDirectory(_0xffa9b0)};const _0x412a74=_0xffa9b0[_0xc2535b(0x140)]('global'),_0x74b3b0=_0xffa9b0[_0xc2535b(0x140)](_0xc2535b(0x146)),_0x46b78b=_0x412a74?_0xc2535b(0x12f):_0x74b3b0?_0xc2535b(0x146):_0xc2535b(0x149),{config:_0x47f538,layers:_0xcad55c}=readRawConfigWithLayers(),_0xded4cd=resolveDefaultAppSource(_0xcad55c),{defaultApp:_0x42788d}=_0x47f538;let _0xe78d3a,_0x32ea5f;switch(_0x46b78b){case'global':_0xe78d3a=buildItemsFromLayer(_0xcad55c[_0xc2535b(0x133)],_0xc2535b(0x12f)),_0x32ea5f=_0xcad55c[_0xc2535b(0x137)];break;case _0xc2535b(0x146):_0xe78d3a=buildItemsFromLayer(_0xcad55c['projectConfig'],_0xc2535b(0x146)),_0x32ea5f=_0xcad55c[_0xc2535b(0x13c)];break;default:_0xe78d3a=buildMergedItems(_0x47f538,_0xcad55c);break;}enrichAppListItemsWithMergedSelection(_0xe78d3a,_0xffa9b0['mergedCli']);if(_0xe78d3a[_0xc2535b(0x132)]===0x0){const _0x5d7857=_0x46b78b===_0xc2535b(0x149)?'':_0xc2535b(0x14a)+_0x46b78b+_0xc2535b(0x150);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x5d7857+_0xc2535b(0x141)+CLI_BIN_NAME+_0xc2535b(0x151)};}const _0x47c6bd=_0xe78d3a[_0xc2535b(0x12d)](_0x1ecb81=>_0x1ecb81[_0xc2535b(0x12a)]===!![]),_0x394f8b=_0x42788d??_0x47c6bd?.[_0xc2535b(0x13f)]??null,_0x24529e=_0x46b78b==='merged'?{'globalPath':_0xcad55c['globalPath']??null,'projectPath':_0xcad55c[_0xc2535b(0x13c)]??null,'defaultApp':_0x394f8b,'defaultAppSource':_0x42788d!=null?_0xded4cd:null}:{'scope':_0x46b78b,'configPath':_0x32ea5f??null};return{'ok':!![],'data':{'items':_0xe78d3a,'meta':_0x24529e}};}function a20_0x2993(){const _0x261885=['global','validation','5977788GblbEK','length','globalConfig','defaultApp','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','3RfUPpn','globalPath','object','14287jasSFi','remote','push','projectPath','16000aaKQxv','739367zeyQBb','name','bool','.\x20Use\x20`','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','list','1299447VkZycH','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','project','optional','keys','merged','\x20in\x20','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','apps','335kpybqa','projectConfig','3976CuUjBH','\x20config','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','read','565798mfhxXt','app','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','29330110YLdhrb','isCurrent','map','boolean','find','appcode'];a20_0x2993=function(){return _0x261885;};return a20_0x2993();}export const appListDefinition={'service':a20_0x35dc54(0x127),'command':a20_0x35dc54(0x143),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x35dc54(0x152),'auth':a20_0x35dc54(0x147),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'remote','type':'boolean','description':a20_0x35dc54(0x135),'default':![]},{'name':a20_0x35dc54(0x12f),'type':a20_0x35dc54(0x12c),'description':a20_0x35dc54(0x14b),'default':![]},{'name':a20_0x35dc54(0x146),'type':a20_0x35dc54(0x12c),'description':a20_0x35dc54(0x128),'default':![]}],async 'validate'(_0x28dafb){validateAppListFlags(_0x28dafb);},'execute':execute};
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 +1 @@
1
- function a21_0x4834(_0x168cda,_0x491d78){_0x168cda=_0x168cda-0xdb;const _0x2fada8=a21_0x2fad();let _0x483455=_0x2fada8[_0x168cda];return _0x483455;}function a21_0x2fad(){const _0x4af157=['1306197nQybdt','4831128kvDhZj','329792Zemmet','Found\x20','1842cGGKYW','\x20application\x20member(s)','48740wOTFCY','length','15646464CnqEnT','6vPljQF','members-list','141793WQWMnL','4ENkoyt','List\x20application\x20members\x20with\x20their\x20role\x20memberships','10445KyqUas','245sKWavZ','1276kZnhLw','read','app','appCode'];a21_0x2fad=function(){return _0x4af157;};return a21_0x2fad();}const a21_0x24429d=a21_0x4834;(function(_0x4a63f9,_0x7b357){const _0x1d6445=a21_0x4834,_0x1eb76f=_0x4a63f9();while(!![]){try{const _0x2ffeb4=-parseInt(_0x1d6445(0xe6))/0x1*(-parseInt(_0x1d6445(0xe4))/0x2)+-parseInt(_0x1d6445(0xdb))/0x3*(parseInt(_0x1d6445(0xe7))/0x4)+-parseInt(_0x1d6445(0xe9))/0x5*(-parseInt(_0x1d6445(0xdf))/0x6)+-parseInt(_0x1d6445(0xea))/0x7*(-parseInt(_0x1d6445(0xdd))/0x8)+-parseInt(_0x1d6445(0xdc))/0x9+-parseInt(_0x1d6445(0xe1))/0xa*(-parseInt(_0x1d6445(0xeb))/0xb)+-parseInt(_0x1d6445(0xe3))/0xc;if(_0x2ffeb4===_0x7b357)break;else _0x1eb76f['push'](_0x1eb76f['shift']());}catch(_0x2e75da){_0x1eb76f['push'](_0x1eb76f['shift']());}}}(a21_0x2fad,0xc308f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':a21_0x24429d(0xed),'command':a21_0x24429d(0xe5),'description':a21_0x24429d(0xe8),'risk':a21_0x24429d(0xec),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x128834){const _0x1d225a=a21_0x24429d,_0x564068=projectAppMembers(await listRoleUsers(_0x128834[_0x1d225a(0xee)]));return{'ok':!![],'data':{'appCode':_0x128834[_0x1d225a(0xee)],'items':_0x564068,'totalCount':_0x564068[_0x1d225a(0xe2)]},'message':_0x1d225a(0xde)+_0x564068[_0x1d225a(0xe2)]+_0x1d225a(0xe0)};}};
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 +1 @@
1
- function a22_0x2834(){const _0x301897=['2018648GzPqMb','1879119dtbvKH','map','52yFpfUQ','2164372CSurbT','129523thMmEP','appName','cookie','37932nnbQhI','platform','983690FSAIUE','5SfcsQO','499506sqxbml','appDesc'];a22_0x2834=function(){return _0x301897;};return a22_0x2834();}(function(_0x4e1285,_0x2b591a){const _0x2693aa=a22_0x402f,_0x1d6614=_0x4e1285();while(!![]){try{const _0x37dfe7=parseInt(_0x2693aa(0x152))/0x1+parseInt(_0x2693aa(0x149))/0x2+parseInt(_0x2693aa(0x155))/0x3*(-parseInt(_0x2693aa(0x150))/0x4)+-parseInt(_0x2693aa(0x14a))/0x5*(-parseInt(_0x2693aa(0x14b))/0x6)+-parseInt(_0x2693aa(0x151))/0x7+parseInt(_0x2693aa(0x14d))/0x8+-parseInt(_0x2693aa(0x14e))/0x9;if(_0x37dfe7===_0x2b591a)break;else _0x1d6614['push'](_0x1d6614['shift']());}catch(_0x444c1f){_0x1d6614['push'](_0x1d6614['shift']());}}}(a22_0x2834,0x4309f));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a22_0x402f(_0x3f57ef,_0xf1d7bf){_0x3f57ef=_0x3f57ef-0x148;const _0x2834b1=a22_0x2834();let _0x402fed=_0x2834b1[_0x3f57ef];return _0x402fed;}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x8ea60a){const _0x405da8=a22_0x402f,_0x3d9443=_0x8ea60a[_0x405da8(0x154)]||getCookie();if(!_0x3d9443)throw CliErrors['authRequired']();return _0x3d9443;}export async function listRemoteAppDirectory(_0x5b5512){const _0x565284=a22_0x402f,_0xeefba4=await withActiveCookie(resolveCookie(_0x5b5512),()=>listRemoteApps());return{'items':_0xeefba4[_0x565284(0x14f)](_0x5461ed=>({..._0x5461ed['id']!=null?{'id':_0x5461ed['id']}:{},'appCode':_0x5461ed['appCode'],'appName':_0x5461ed[_0x565284(0x153)],..._0x5461ed[_0x565284(0x14c)]!=null?{'appDesc':_0x5461ed['appDesc']}:{}})),'meta':{'source':_0x565284(0x148)}};}
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 +1 @@
1
- (function(_0x9ea66a,_0x22d15a){const _0xc87d1a=a23_0x1af9,_0x4ae990=_0x9ea66a();while(!![]){try{const _0x4a8b76=-parseInt(_0xc87d1a(0xe8))/0x1*(-parseInt(_0xc87d1a(0xd0))/0x2)+parseInt(_0xc87d1a(0xdd))/0x3+-parseInt(_0xc87d1a(0xce))/0x4*(parseInt(_0xc87d1a(0xef))/0x5)+-parseInt(_0xc87d1a(0xe5))/0x6+parseInt(_0xc87d1a(0xfe))/0x7*(parseInt(_0xc87d1a(0xf6))/0x8)+parseInt(_0xc87d1a(0xf2))/0x9+parseInt(_0xc87d1a(0xe4))/0xa*(-parseInt(_0xc87d1a(0xd6))/0xb);if(_0x4a8b76===_0x22d15a)break;else _0x4ae990['push'](_0x4ae990['shift']());}catch(_0x395eda){_0x4ae990['push'](_0x4ae990['shift']());}}}(a23_0x3768,0xa5638));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x549849){const _0x47c971=a23_0x1af9,_0x1b5df4=_0x549849?.[_0x47c971(0xeb)]();return _0x1b5df4?_0x1b5df4:null;}export function projectAppMembers(_0x1c9a38){const _0x2e6477=a23_0x1af9,_0x1da74c=new Map(),_0x25f2e0=[..._0x1c9a38][_0x2e6477(0xd3)]((_0x31f0df,_0x50480e)=>_0x31f0df['id']-_0x50480e['id']),_0x417f3d=(_0x413723,_0x58811a,_0x2e3b1e)=>{const _0x13dbd3=_0x2e6477;for(const _0x1d0f36 of _0x58811a){const _0x41fbae=Number(_0x1d0f36[_0x13dbd3(0xe6)]);if(!Number['isFinite'](_0x41fbae)||_0x41fbae<=0x0)continue;let _0x356167=_0x1da74c['get'](_0x41fbae);if(!_0x356167)_0x356167={'userId':_0x41fbae,'username':nullableText(_0x1d0f36[_0x13dbd3(0xd1)]),'displayName':nullableText(_0x1d0f36['nickname']),'status':_0x2e3b1e,'roles':[],'roleKeys':new Set()},_0x1da74c[_0x13dbd3(0xee)](_0x41fbae,_0x356167);else{_0x356167[_0x13dbd3(0xd1)]??=nullableText(_0x1d0f36['username']),_0x356167['displayName']??=nullableText(_0x1d0f36[_0x13dbd3(0xd7)]);if(_0x2e3b1e===_0x13dbd3(0xcc))_0x356167[_0x13dbd3(0xdf)]='ACTIVE';}const _0x3a87f3=_0x413723['id']+':'+_0x2e3b1e;if(_0x356167['roleKeys'][_0x13dbd3(0xcf)](_0x3a87f3))continue;_0x356167[_0x13dbd3(0xd5)][_0x13dbd3(0xd2)](_0x3a87f3),_0x356167[_0x13dbd3(0xfb)]['push']({'roleId':_0x413723['id'],'roleName':nullableText(_0x413723['roleName']),'roleType':nullableText(_0x413723[_0x13dbd3(0xea)]),'membershipStatus':_0x2e3b1e});}};for(const _0x4ae526 of _0x25f2e0){_0x417f3d(_0x4ae526,_0x4ae526[_0x2e6477(0xf3)]??[],_0x2e6477(0xcc)),_0x417f3d(_0x4ae526,_0x4ae526[_0x2e6477(0xe9)]??[],_0x2e6477(0xdb));}return[..._0x1da74c[_0x2e6477(0xfa)]()][_0x2e6477(0xed)](_0x11aff8=>({'userId':_0x11aff8[_0x2e6477(0xe6)],'username':_0x11aff8[_0x2e6477(0xd1)],'displayName':_0x11aff8[_0x2e6477(0xdc)],'status':_0x11aff8[_0x2e6477(0xdf)],'roles':_0x11aff8['roles'][_0x2e6477(0xd3)]((_0x3f4a08,_0x1787b5)=>_0x3f4a08[_0x2e6477(0xe3)]-_0x1787b5[_0x2e6477(0xe3)]||(_0x3f4a08['membershipStatus']===_0x1787b5[_0x2e6477(0xf7)]?0x0:_0x3f4a08[_0x2e6477(0xf7)]===_0x2e6477(0xcc)?-0x1:0x1))}))[_0x2e6477(0xd3)]((_0x5ebdc5,_0x43d542)=>_0x5ebdc5[_0x2e6477(0xe6)]-_0x43d542[_0x2e6477(0xe6)]);}export function enrichAppListItemsWithMergedSelection(_0x2e8d68,_0x494fc6){const _0x41eca1=a23_0x1af9;if(!_0x494fc6)return;const _0x5e7daf=_0x494fc6[_0x41eca1(0xf1)]&&typeof _0x494fc6[_0x41eca1(0xf1)]==='object'?_0x494fc6[_0x41eca1(0xf1)]:{},_0xf00219=Object['keys'](_0x5e7daf)[_0x41eca1(0xec)]>0x0;for(const _0xd22950 of _0x2e8d68){_0xd22950[_0x41eca1(0xd9)]=![];}const _0x5a1649=_0x494fc6['appCode']!=null?String(_0x494fc6[_0x41eca1(0xe7)])['trim']():'';if(_0xf00219){const _0x51ecfa=_0x494fc6[_0x41eca1(0xf4)]??_0x494fc6['defaultApp'];if(_0x51ecfa)for(const _0x3043fe of _0x2e8d68){_0x3043fe[_0x41eca1(0xde)]===!![]&&_0x3043fe[_0x41eca1(0xe1)]===_0x51ecfa&&(_0x3043fe['isCurrent']=!![]);}for(const _0x116e30 of _0x2e8d68){if(_0x116e30[_0x41eca1(0xde)]!==![])continue;if(_0x494fc6[_0x41eca1(0xf0)])continue;_0x5a1649&&String(_0x116e30[_0x41eca1(0xda)]??'')[_0x41eca1(0xeb)]()===_0x5a1649&&(_0x116e30['isCurrent']=!![]);}return;}if(!_0x5a1649)return;for(const _0x4e7ac9 of _0x2e8d68){String(_0x4e7ac9[_0x41eca1(0xda)]??'')[_0x41eca1(0xeb)]()===_0x5a1649&&(_0x4e7ac9[_0x41eca1(0xd9)]=!![]);}}export function resolveAppScopeForWrite(_0x520644,_0x165264,_0x5090fc){const _0xb13d9f=a23_0x1af9;if(_0x165264)return _0xb13d9f(0xf9);const _0x278f70=_0x5090fc[_0xb13d9f(0xfd)]['apps']&&typeof _0x5090fc[_0xb13d9f(0xfd)][_0xb13d9f(0xf1)]==='object'?_0x5090fc[_0xb13d9f(0xfd)][_0xb13d9f(0xf1)]:{},_0x3490f0=_0x5090fc[_0xb13d9f(0xf5)]['apps']&&typeof _0x5090fc[_0xb13d9f(0xf5)][_0xb13d9f(0xf1)]===_0xb13d9f(0xcd)?_0x5090fc[_0xb13d9f(0xf5)][_0xb13d9f(0xf1)]:{};if(Object[_0xb13d9f(0xe2)]['hasOwnProperty'][_0xb13d9f(0xfc)](_0x278f70,_0x520644))return'project';if(Object[_0xb13d9f(0xe2)][_0xb13d9f(0xe0)][_0xb13d9f(0xfc)](_0x3490f0,_0x520644))return _0xb13d9f(0xf9);return'project';}export function appDefinedIn(_0xa28f22,_0x4de30c,_0x13fb20){const _0x89efb6=a23_0x1af9,_0x1f1129=Object[_0x89efb6(0xe2)][_0x89efb6(0xe0)][_0x89efb6(0xfc)](_0x4de30c,_0xa28f22),_0x2c15dc=Object[_0x89efb6(0xe2)][_0x89efb6(0xe0)][_0x89efb6(0xfc)](_0x13fb20,_0xa28f22);if(_0x1f1129&&_0x2c15dc)return _0x89efb6(0xd4);if(_0x2c15dc)return'project';return _0x89efb6(0xf9);}export function resolveDefaultAppSource(_0x3a2957){const _0x5126f0=a23_0x1af9,_0x26123b=_0x3a2957['projectConfig'][_0x5126f0(0xf1)]&&typeof _0x3a2957[_0x5126f0(0xfd)][_0x5126f0(0xf1)]==='object'?_0x3a2957[_0x5126f0(0xfd)][_0x5126f0(0xf1)]:{};if('defaultApp'in _0x3a2957[_0x5126f0(0xfd)])return _0x5126f0(0xf8);if(Object[_0x5126f0(0xd8)](_0x26123b)[_0x5126f0(0xec)]>0x0)return _0x5126f0(0xf8);if(Object['keys'](_0x3a2957[_0x5126f0(0xfd)])[_0x5126f0(0xec)]===0x0&&_0x3a2957[_0x5126f0(0xf5)][_0x5126f0(0xf0)])return'global';return null;}export function getConfigPath(_0xcb6393={}){const _0x2be74b=a23_0x1af9,_0x1c3516=_0xcb6393[_0x2be74b(0xf9)]?_0x2be74b(0xf9):_0x2be74b(0xf8);return resolveWriteConfigPath(_0x1c3516);}export function readConfig(_0x25e300={}){return readConfigFile(getConfigPath(_0x25e300));}function a23_0x1af9(_0x5813e2,_0x1ab74e){_0x5813e2=_0x5813e2-0xcc;const _0x376855=a23_0x3768();let _0x1af917=_0x376855[_0x5813e2];return _0x1af917;}export function writeConfig(_0x2f1a04,_0x567d66={}){writeConfigFile(getConfigPath(_0x567d66),_0x2f1a04);}function a23_0x3768(){const _0x24383c=['status','hasOwnProperty','name','prototype','roleId','30RFSkuD','4689174vypqOL','userId','appCode','690143ZHhJjp','applyUserList','roleType','trim','length','map','set','265nWSoDY','defaultApp','apps','8450820amAtAc','userList','currentApp','globalConfig','8eAqxaa','membershipStatus','project','global','values','roles','call','projectConfig','855799LjDiwl','ACTIVE','object','11188hsFPkW','has','2AVWIDg','username','add','sort','both','roleKeys','4926757pKwWuE','nickname','keys','isCurrent','appcode','PENDING','displayName','3598449ikToYL','named'];a23_0x3768=function(){return _0x24383c;};return a23_0x3768();}export function scopeLabel(_0xa44c5c){return _0xa44c5c['global']?'\x20(global)':'';}
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 +1 @@
1
- const a24_0x16028c=a24_0x6613;(function(_0x41b231,_0x4de065){const _0x58bfb2=a24_0x6613,_0x5ba4fa=_0x41b231();while(!![]){try{const _0x27152d=-parseInt(_0x58bfb2(0x92))/0x1+-parseInt(_0x58bfb2(0x80))/0x2+parseInt(_0x58bfb2(0x84))/0x3*(parseInt(_0x58bfb2(0x85))/0x4)+parseInt(_0x58bfb2(0x82))/0x5+-parseInt(_0x58bfb2(0x88))/0x6+-parseInt(_0x58bfb2(0x7e))/0x7+parseInt(_0x58bfb2(0x8b))/0x8;if(_0x27152d===_0x4de065)break;else _0x5ba4fa['push'](_0x5ba4fa['shift']());}catch(_0xd8f7bc){_0x5ba4fa['push'](_0x5ba4fa['shift']());}}}(a24_0x4b82,0x2e436));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';function a24_0x6613(_0x2388be,_0x113416){_0x2388be=_0x2388be-0x7c;const _0x4b8282=a24_0x4b82();let _0x661378=_0x4b8282[_0x2388be];return _0x661378;}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_0x16028c(0x8c);export const appConfigDelete={'service':'app-config','command':'delete','description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':a24_0x16028c(0x7c),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x52837e){readKeyArg(_0x52837e);},async 'dryRun'(_0x5081be){const _0xa3b81a=a24_0x16028c,_0x46a84a=readKeyArg(_0x5081be),_0x287b04=await mustGetByKey(_0x5081be[_0xa3b81a(0x7d)],_0x46a84a);return asAppConfigDryRunResult(buildMutationData({'operation':_0xa3b81a(0x90),'appCode':_0x5081be[_0xa3b81a(0x7d)],'key':_0x46a84a,'before':projectAppConfig(_0x287b04),'after':null,'dryRun':!![]}),{'method':_0xa3b81a(0x83),'url':DELETE_PATH});},async 'execute'(_0x492a17){const _0x110050=a24_0x16028c,_0x186b98=readKeyArg(_0x492a17),_0x337193=await mustGetByKey(_0x492a17['appCode'],_0x186b98);return await withAppConfigApiBoundary(_0x110050(0x90),{'appCode':_0x492a17['appCode'],'key':_0x186b98},()=>deleteAppConfig({'appCode':_0x492a17['appCode'],'id':requireAppConfigId(_0x337193,_0x186b98,_0x492a17[_0x110050(0x7d)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x492a17[_0x110050(0x7d)],'key':_0x186b98,'before':projectAppConfig(_0x337193),'after':null,'dryRun':![]}),'message':_0x110050(0x81)+_0x186b98};}};async function mustGetByKey(_0x19d89e,_0xd01240){const _0xf7e240=a24_0x16028c,_0x5b3f53=await withAppConfigApiBoundary(_0xf7e240(0x8d),{'appCode':_0x19d89e,'key':_0xd01240},()=>getAppConfigByKey(_0x19d89e,_0xd01240));if(!_0x5b3f53)throw CliErrors[_0xf7e240(0x89)](_0xf7e240(0x87)+_0xd01240,_0xf7e240(0x8a)+_0x19d89e);return _0x5b3f53;}function a24_0x4b82(){const _0x2a90da=['App\x20config\x20server\x20id\x20missing\x20for\x20key=','474298rQHTKU','Deleted\x20app\x20config\x20','189220LghMUZ','POST','228639EjHNuh','4ZKdvot','number','App\x20config\x20key\x20not\x20found:\x20','1248912puzOIW','validation','appCode:\x20','6960952rCnRgt','/smartapi/app-config/delete','get',',\x20appCode=','isFinite','delete','apiError','287273oFnZxu','high-risk-write','appCode','434756jaNjFN'];a24_0x4b82=function(){return _0x2a90da;};return a24_0x4b82();}function requireAppConfigId(_0x55d7dc,_0x92fa92,_0x136003){const _0xd46db9=a24_0x16028c;if(typeof _0x55d7dc['id']===_0xd46db9(0x86)&&Number[_0xd46db9(0x8f)](_0x55d7dc['id'])&&_0x55d7dc['id']>0x0)return _0x55d7dc['id'];throw CliErrors[_0xd46db9(0x91)](_0xd46db9(0x7f)+_0x92fa92+_0xd46db9(0x8e)+_0x136003);}
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 +1 @@
1
- const a25_0x4e021a=a25_0x266e;(function(_0x499d1e,_0x36ede6){const _0x3f383c=a25_0x266e,_0x25d1f5=_0x499d1e();while(!![]){try{const _0x540bdf=parseInt(_0x3f383c(0x173))/0x1+-parseInt(_0x3f383c(0x166))/0x2*(-parseInt(_0x3f383c(0x16a))/0x3)+-parseInt(_0x3f383c(0x169))/0x4+-parseInt(_0x3f383c(0x174))/0x5*(-parseInt(_0x3f383c(0x172))/0x6)+-parseInt(_0x3f383c(0x16e))/0x7+parseInt(_0x3f383c(0x16b))/0x8+-parseInt(_0x3f383c(0x16d))/0x9*(parseInt(_0x3f383c(0x16f))/0xa);if(_0x540bdf===_0x36ede6)break;else _0x25d1f5['push'](_0x25d1f5['shift']());}catch(_0x58f219){_0x25d1f5['push'](_0x25d1f5['shift']());}}}(a25_0x24c7,0x55744));import{getAppConfigByKey}from'../../core/api-client.js';function a25_0x266e(_0x4c4011,_0x269fc3){_0x4c4011=_0x4c4011-0x166;const _0x24c796=a25_0x24c7();let _0x266ee2=_0x24c796[_0x4c4011];return _0x266ee2;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a25_0x24c7(){const _0x10f9da=['138HaUIxL','4623000HpfuGy','reveal','5564826Ekqytw','1881726tQjwHA','10vrKjsL','\x20with\x20value\x20redacted','validation','1442424kgonfG','470620AGBVgF','5nyKrFK','get','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','\x20with\x20value\x20revealed','appCode','read','9070FKYKdS','app-config','App\x20config\x20key\x20not\x20found:\x20','1041428qkvAeu'];a25_0x24c7=function(){return _0x10f9da;};return a25_0x24c7();}import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x4e021a(0x167),'command':'get','description':a25_0x4e021a(0x176),'risk':a25_0x4e021a(0x179),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x5f523d){readKeyArg(_0x5f523d);},async 'execute'(_0x462830){const _0x46ae7d=a25_0x4e021a,_0x3c00d9=readKeyArg(_0x462830),_0x5cc8f5=await withAppConfigApiBoundary(_0x46ae7d(0x175),{'appCode':_0x462830[_0x46ae7d(0x178)],'key':_0x3c00d9},()=>getAppConfigByKey(_0x462830['appCode'],_0x3c00d9));if(!_0x5cc8f5)throw CliErrors[_0x46ae7d(0x171)](_0x46ae7d(0x168)+_0x3c00d9,'appCode:\x20'+_0x462830['appCode']);const _0x52a035=projectAppConfig(_0x5cc8f5,{'reveal':_0x462830['bool'](_0x46ae7d(0x16c))});return{'ok':!![],'data':{'config':_0x52a035},'message':_0x462830['bool'](_0x46ae7d(0x16c))?'Loaded\x20app\x20config\x20'+_0x3c00d9+_0x46ae7d(0x177):'Loaded\x20app\x20config\x20'+_0x3c00d9+_0x46ae7d(0x170)};}};
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 +1 @@
1
- (function(_0xaf1add,_0x272fff){const _0x3902f0=a26_0xe1b2,_0x148abf=_0xaf1add();while(!![]){try{const _0x3e7e09=parseInt(_0x3902f0(0x113))/0x1*(parseInt(_0x3902f0(0x110))/0x2)+parseInt(_0x3902f0(0x111))/0x3*(-parseInt(_0x3902f0(0x10c))/0x4)+-parseInt(_0x3902f0(0x10f))/0x5*(parseInt(_0x3902f0(0x10b))/0x6)+-parseInt(_0x3902f0(0x112))/0x7+parseInt(_0x3902f0(0x10d))/0x8+-parseInt(_0x3902f0(0x10e))/0x9+-parseInt(_0x3902f0(0x114))/0xa*(-parseInt(_0x3902f0(0x10a))/0xb);if(_0x3e7e09===_0x272fff)break;else _0x148abf['push'](_0x148abf['shift']());}catch(_0x3a223d){_0x148abf['push'](_0x148abf['shift']());}}}(a26_0xbe74,0x6f3f3));function a26_0xbe74(){const _0x24a4ec=['5386766BznNpq','255475DwwQnQ','18060mFFeKS','13431EMKCqe','66yecmhV','24nQaZjp','2701728hlEjbS','4119768MKTiVD','338990qlKSyK','2AvKKmQ','184791oINZxu'];a26_0xbe74=function(){return _0x24a4ec;};return a26_0xbe74();}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_0xe1b2(_0x21053f,_0x7ca8d5){_0x21053f=_0x21053f-0x10a;const _0xbe7450=a26_0xbe74();let _0xe1b26e=_0xbe7450[_0x21053f];return _0xe1b26e;}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
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 +1 @@
1
- const a27_0x50102a=a27_0x35a9;function a27_0x4815(){const _0x54ccfc=['1253RtIKlF','7132908KYpUez','8618985xvOnZz','length','416nyIUWp','trim','12550308PBuvDX','appCode','app-config','576NhQQqm','map','Found\x20','11692VerIAu','key','171389BQsGAU','str','37340yHjuha','Filter\x20by\x20exact\x20config\x20key','10NAhOqn','31952MAyJMN','list','read','22ZDNBQl'];a27_0x4815=function(){return _0x54ccfc;};return a27_0x4815();}(function(_0x924627,_0x8c9f14){const _0x499865=a27_0x35a9,_0xdde824=_0x924627();while(!![]){try{const _0x15bb92=parseInt(_0x499865(0x11f))/0x1+parseInt(_0x499865(0x11d))/0x2*(-parseInt(_0x499865(0x131))/0x3)+-parseInt(_0x499865(0x12c))/0x4*(-parseInt(_0x499865(0x121))/0x5)+-parseInt(_0x499865(0x129))/0x6+parseInt(_0x499865(0x128))/0x7*(-parseInt(_0x499865(0x124))/0x8)+-parseInt(_0x499865(0x12a))/0x9*(-parseInt(_0x499865(0x123))/0xa)+-parseInt(_0x499865(0x127))/0xb*(-parseInt(_0x499865(0x12e))/0xc);if(_0x15bb92===_0x8c9f14)break;else _0xdde824['push'](_0xdde824['shift']());}catch(_0x44cf05){_0xdde824['push'](_0xdde824['shift']());}}}(a27_0x4815,0xed204));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_0x35a9(_0x39c2fd,_0x10ea16){_0x39c2fd=_0x39c2fd-0x11d;const _0x481546=a27_0x4815();let _0x35a9a6=_0x481546[_0x39c2fd];return _0x35a9a6;}export const appConfigList={'service':a27_0x50102a(0x130),'command':a27_0x50102a(0x125),'description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0x50102a(0x126),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x50102a(0x11e),'type':'string','description':a27_0x50102a(0x122)},TAGS_FLAG],async 'validate'(_0x9e715){const _0x4c0c0f=a27_0x50102a,_0x3f4498=_0x9e715[_0x4c0c0f(0x120)]('key')[_0x4c0c0f(0x12d)]();if(_0x3f4498)validateKey(_0x3f4498);readOptionalTags(_0x9e715);},async 'execute'(_0x470e49){const _0x1f403d=a27_0x50102a,_0x6ae03f=_0x470e49[_0x1f403d(0x120)](_0x1f403d(0x11e))['trim']()||undefined,_0x312fca=readOptionalTags(_0x470e49),_0x228516=await withAppConfigApiBoundary(_0x1f403d(0x125),{'appCode':_0x470e49['appCode']},()=>listAppConfigs(_0x470e49[_0x1f403d(0x12f)],{'key':_0x6ae03f,'tags':_0x312fca})),_0x308088=_0x228516[_0x1f403d(0x132)](_0x32930c=>projectAppConfig(_0x32930c));return{'ok':!![],'data':{'appCode':_0x470e49[_0x1f403d(0x12f)],'count':_0x308088[_0x1f403d(0x12b)],'configs':_0x308088},'message':_0x1f403d(0x133)+_0x308088[_0x1f403d(0x12b)]+'\x20app\x20config(s)'};}};
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 +1 @@
1
- const a28_0xe00e65=a28_0x2b4a;(function(_0x59662c,_0x3e2b3a){const _0x2838cf=a28_0x2b4a,_0x31a075=_0x59662c();while(!![]){try{const _0x29815c=parseInt(_0x2838cf(0x12e))/0x1+parseInt(_0x2838cf(0x137))/0x2*(parseInt(_0x2838cf(0x139))/0x3)+parseInt(_0x2838cf(0x125))/0x4*(parseInt(_0x2838cf(0x122))/0x5)+parseInt(_0x2838cf(0x135))/0x6+parseInt(_0x2838cf(0x129))/0x7+-parseInt(_0x2838cf(0x121))/0x8*(-parseInt(_0x2838cf(0x12c))/0x9)+parseInt(_0x2838cf(0x120))/0xa*(-parseInt(_0x2838cf(0x128))/0xb);if(_0x29815c===_0x3e2b3a)break;else _0x31a075['push'](_0x31a075['shift']());}catch(_0x2e89f9){_0x31a075['push'](_0x31a075['shift']());}}}(a28_0x47ca,0x5a0b7));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a28_0x47ca(){const _0x2f7c75=['/smartapi/app-config/create','15267604mvAyrA','12026UYKqkm','tags','get','104697CaIObY','Updated','528628QtPkub','Read\x20config\x20value\x20from\x20file','App\x20config\x20server\x20id\x20missing\x20for\x20key=','string','POST','appCode','file','1049844ASerQi',',\x20appCode=','33578tcHjHb','set','117CjzqBc','/smartapi/app-config/update','\x20app\x20config\x20','write','apiError','isFinite','10HZZaNS','56SSccCl','425tKQcPr','update','create','14836WiQWYu','Created'];a28_0x47ca=function(){return _0x2f7c75;};return a28_0x47ca();}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_0xe00e65(0x127),UPDATE_PATH=a28_0xe00e65(0x11b);function a28_0x2b4a(_0x52973b,_0x401d5d){_0x52973b=_0x52973b-0x11b;const _0x47cafe=a28_0x47ca();let _0x2b4a98=_0x47cafe[_0x52973b];return _0x2b4a98;}export const appConfigSet={'service':'app-config','command':a28_0xe00e65(0x138),'description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0xe00e65(0x11d),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0xe00e65(0x134),'type':a28_0xe00e65(0x131),'description':a28_0xe00e65(0x12f)}],async 'validate'(_0x5b6f95){readKeyArg(_0x5b6f95),readOptionalTags(_0x5b6f95),assertSingleValueSource(_0x5b6f95);},async 'dryRun'(_0x46fbed){const _0x107194=a28_0xe00e65,_0x57e2ad=readKeyArg(_0x46fbed),_0x36ec06=readOptionalTags(_0x46fbed),_0x36ed5b=assertSingleValueSource(_0x46fbed);await assertValueSourceReadable(_0x36ed5b);const _0x4e3f6d=await withAppConfigApiBoundary(_0x107194(0x12b),{'appCode':_0x46fbed[_0x107194(0x133)],'key':_0x57e2ad},()=>getAppConfigByKey(_0x46fbed['appCode'],_0x57e2ad)),_0x2ef997=_0x4e3f6d?_0x107194(0x123):'create',_0xf4268a=_0x4e3f6d?projectAppConfig(_0x4e3f6d):null,_0x44f179=plannedAppConfig({'appCode':_0x46fbed['appCode'],'key':_0x57e2ad,'tags':_0x36ec06??_0x4e3f6d?.[_0x107194(0x12a)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x2ef997,'appCode':_0x46fbed[_0x107194(0x133)],'key':_0x57e2ad,'before':_0xf4268a,'after':_0x44f179,'dryRun':!![]}),{'method':_0x107194(0x132),'url':_0x2ef997===_0x107194(0x123)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x527727){const _0x3d651b=a28_0xe00e65,_0x5ee183=readKeyArg(_0x527727),_0x116cb8=readOptionalTags(_0x527727),_0x10b507=await withAppConfigApiBoundary(_0x3d651b(0x12b),{'appCode':_0x527727[_0x3d651b(0x133)],'key':_0x5ee183},()=>getAppConfigByKey(_0x527727[_0x3d651b(0x133)],_0x5ee183)),_0xb5a3ec=_0x10b507?projectAppConfig(_0x10b507):null,_0x461176=_0x10b507?_0x3d651b(0x123):_0x3d651b(0x124),{value:_0x4ecf8d,warnings:_0x7181f1}=await readAppConfigValue(_0x527727),_0x2077e1={'appCode':_0x527727['appCode'],'key':_0x5ee183,'value':_0x4ecf8d,'tags':_0x116cb8??_0x10b507?.[_0x3d651b(0x12a)]??undefined};await withAppConfigApiBoundary(_0x461176,{'appCode':_0x527727[_0x3d651b(0x133)],'key':_0x5ee183},async()=>{const _0x3333b3=_0x3d651b;_0x10b507?await updateAppConfig({..._0x2077e1,'id':requireAppConfigId(_0x10b507,_0x5ee183,_0x527727[_0x3333b3(0x133)])}):await createAppConfig(_0x2077e1);});const _0x47fb0f=await withAppConfigApiBoundary(_0x3d651b(0x12b),{'appCode':_0x527727[_0x3d651b(0x133)],'key':_0x5ee183},()=>getAppConfigByKey(_0x527727[_0x3d651b(0x133)],_0x5ee183)),_0x33d29a=_0x47fb0f?projectAppConfig(_0x47fb0f):plannedAppConfig({'appCode':_0x527727[_0x3d651b(0x133)],'key':_0x5ee183,'tags':_0x2077e1[_0x3d651b(0x12a)],'hasValue':_0x4ecf8d!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x461176,'appCode':_0x527727[_0x3d651b(0x133)],'key':_0x5ee183,'before':_0xb5a3ec,'after':_0x33d29a,'dryRun':![],'warnings':_0x7181f1}),'message':(_0x461176===_0x3d651b(0x123)?_0x3d651b(0x12d):_0x3d651b(0x126))+_0x3d651b(0x11c)+_0x5ee183};}};function requireAppConfigId(_0x276270,_0x34ebfd,_0x2e6270){const _0x378b71=a28_0xe00e65;if(typeof _0x276270['id']==='number'&&Number[_0x378b71(0x11f)](_0x276270['id'])&&_0x276270['id']>0x0)return _0x276270['id'];throw CliErrors[_0x378b71(0x11e)](_0x378b71(0x130)+_0x34ebfd+_0x378b71(0x136)+_0x2e6270);}
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 +1 @@
1
- const a29_0x13b7b4=a29_0x2527;(function(_0x39b777,_0x2733fe){const _0xb468cf=a29_0x2527,_0x592a09=_0x39b777();while(!![]){try{const _0x410cd5=parseInt(_0xb468cf(0x1de))/0x1+-parseInt(_0xb468cf(0x1db))/0x2*(-parseInt(_0xb468cf(0x1e2))/0x3)+parseInt(_0xb468cf(0x1e1))/0x4+-parseInt(_0xb468cf(0x1d0))/0x5*(-parseInt(_0xb468cf(0x1f2))/0x6)+parseInt(_0xb468cf(0x1fe))/0x7*(-parseInt(_0xb468cf(0x1eb))/0x8)+parseInt(_0xb468cf(0x1fa))/0x9+-parseInt(_0xb468cf(0x1cf))/0xa*(parseInt(_0xb468cf(0x1d2))/0xb);if(_0x410cd5===_0x2733fe)break;else _0x592a09['push'](_0x592a09['shift']());}catch(_0x29810b){_0x592a09['push'](_0x592a09['shift']());}}}(a29_0x1854,0x1975d));import{access,readFile}from'node:fs/promises';function a29_0x1854(){const _0x2e3b5b=['Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','152549bkHsec','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','792504imlDAR','3aVoUOH','flag','validation','trim','boolean','setEncoding','appCode:\x20','Failed\x20to\x20','Environment\x20variable\x20is\x20not\x20set:\x20','8ztkScR','argument','App\x20config\x20value\x20source\x20is\x20ambiguous.','gmtCreate','tags','kind','file','1050XfpXXC','slice','path','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','before','value\x20is\x20redacted','after','push','578601DQzDtC','gmtModified','length','end','765002htuzHE','args','operation','name','appCode','once','stdin','defineProperties','string','bool','utf8','reveal','valueRedacted','apiError','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','\x20app\x20config.','Read\x20config\x20value\x20from\x20stdin','140YAXyQr','2580JtuoLR','from-env','390775sDwbqj','method','value','str','key','join','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','warnings','env','411314MHvcKX','key:\x20'];a29_0x1854=function(){return _0x2e3b5b;};return a29_0x1854();}import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x13b7b4(0x1d6),'description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':a29_0x13b7b4(0x1d4),'description':a29_0x13b7b4(0x1d8),'required':![]};function a29_0x2527(_0x166eec,_0x37e1ea){_0x166eec=_0x166eec-0x1c9;const _0x1854f9=a29_0x1854();let _0x252711=_0x1854f9[_0x166eec];return _0x252711;}export const TAGS_FLAG={'name':a29_0x13b7b4(0x1ef),'type':'string','description':'Config\x20tags\x20for\x20filtering/display\x20metadata'};export const STDIN_FLAG={'name':a29_0x13b7b4(0x204),'type':'boolean','description':a29_0x13b7b4(0x1ce),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x13b7b4(0x1d1),'type':a29_0x13b7b4(0x206),'description':a29_0x13b7b4(0x1f5)};export const REVEAL_FLAG={'name':'reveal','type':a29_0x13b7b4(0x1e6),'description':a29_0x13b7b4(0x1e0),'default':![]};export function readKeyArg(_0x165431){const _0x2ad6c7=_0x165431['args'][0x0]?.['trim']()??'';return validateKey(_0x2ad6c7),_0x2ad6c7;}export function readOptionalTags(_0x5e7380){const _0x4fa338=a29_0x13b7b4,_0x4188ca=_0x5e7380['str'](_0x4fa338(0x1ef))[_0x4fa338(0x1e5)]();if(!_0x4188ca)return undefined;if(_0x4188ca[_0x4fa338(0x1fc)]>0x20)throw CliErrors['validation']('App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.');return _0x4188ca;}export function validateKey(_0xeb6b26){const _0x58082b=a29_0x13b7b4;if(!_0xeb6b26)throw CliErrors['validation']('Missing\x20app-config\x20key.');if(_0xeb6b26['length']>0x100)throw CliErrors[_0x58082b(0x1e4)](_0x58082b(0x1cc));}export function projectAppConfig(_0x4e86c8,_0x5f46b9){const _0x54f43c=a29_0x13b7b4,_0x4f3053=_0x4e86c8['value']!==undefined&&_0x4e86c8[_0x54f43c(0x1d4)]!==null&&_0x4e86c8[_0x54f43c(0x1d4)]!=='',_0x386e1f={'appCode':_0x4e86c8[_0x54f43c(0x202)],'key':_0x4e86c8[_0x54f43c(0x1d6)],'tags':_0x4e86c8[_0x54f43c(0x1ef)]??undefined,'hasValue':_0x4f3053,'valueRedacted':_0x4f3053&&!_0x5f46b9?.[_0x54f43c(0x1c9)],'gmtCreate':_0x4e86c8[_0x54f43c(0x1ee)],'gmtModified':_0x4e86c8[_0x54f43c(0x1fb)]};return _0x5f46b9?.[_0x54f43c(0x1c9)]&&(_0x386e1f[_0x54f43c(0x1d4)]=_0x4e86c8[_0x54f43c(0x1d4)]??'',_0x386e1f[_0x54f43c(0x1ca)]=![]),_0x386e1f;}export function plannedAppConfig(_0x104882){const _0x5c3cce=a29_0x13b7b4,_0x37be2a=_0x104882['hasValue']??!![];return{'appCode':_0x104882[_0x5c3cce(0x202)],'key':_0x104882['key'],'tags':_0x104882[_0x5c3cce(0x1ef)]??undefined,'hasValue':_0x37be2a,'valueRedacted':_0x37be2a};}export function buildMutationData(_0x34c599){const _0x28e62f=a29_0x13b7b4;return{'operation':_0x34c599[_0x28e62f(0x200)],'selector':{'appCode':_0x34c599[_0x28e62f(0x202)],'key':_0x34c599['key']},'before':_0x34c599[_0x28e62f(0x1f6)],'after':_0x34c599[_0x28e62f(0x1f8)],'dryRun':_0x34c599['dryRun'],'warnings':_0x34c599[_0x28e62f(0x1d9)]??[]};}export async function withAppConfigApiBoundary(_0x475c16,_0x4c034f,_0x35dd96){const _0x1f5623=a29_0x13b7b4;try{return await _0x35dd96();}catch{const _0x4ae492=[_0x1f5623(0x1e8)+_0x4c034f['appCode']];if(_0x4c034f[_0x1f5623(0x1d6)])_0x4ae492[_0x1f5623(0x1f9)](_0x1f5623(0x1dc)+_0x4c034f['key']);_0x4ae492[_0x1f5623(0x1f9)](_0x1f5623(0x1f7));throw CliErrors[_0x1f5623(0x1cb)](_0x1f5623(0x1e9)+_0x475c16+_0x1f5623(0x1cd),_0x4ae492[_0x1f5623(0x1d7)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x51cbd1,_0x3596e0){const _0x5221d2=a29_0x13b7b4;return Object[_0x5221d2(0x205)](_0x51cbd1,{'method':{'value':_0x3596e0[_0x5221d2(0x1d3)],'enumerable':![]},'url':{'value':_0x3596e0['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x189b50){const _0x48670f=a29_0x13b7b4,_0x669f88=[];_0x189b50[_0x48670f(0x1ff)][_0x48670f(0x1fc)]>0x1&&_0x669f88[_0x48670f(0x1f9)]({'kind':_0x48670f(0x1ec),'value':_0x189b50[_0x48670f(0x1ff)][_0x48670f(0x1f3)](0x1)[_0x48670f(0x1d7)]('\x20')});const _0x64576=_0x189b50[_0x48670f(0x1e3)]('value');_0x64576!==undefined&&_0x64576!==null&&_0x669f88['push']({'kind':_0x48670f(0x1ec),'value':String(_0x64576)});_0x189b50[_0x48670f(0x207)](_0x48670f(0x204))&&_0x669f88[_0x48670f(0x1f9)]({'kind':'stdin'});const _0x3cc109=_0x189b50[_0x48670f(0x1d5)](_0x48670f(0x1d1))[_0x48670f(0x1e5)]();_0x3cc109&&_0x669f88[_0x48670f(0x1f9)]({'kind':'env','name':_0x3cc109});const _0x46a498=_0x189b50['str'](_0x48670f(0x1f1))['trim']();_0x46a498&&_0x669f88[_0x48670f(0x1f9)]({'kind':_0x48670f(0x1f1),'path':_0x46a498});if(_0x669f88['length']===0x0)throw CliErrors['validation']('Missing\x20app-config\x20value\x20source.',_0x48670f(0x1dd));if(_0x669f88[_0x48670f(0x1fc)]>0x1)throw CliErrors[_0x48670f(0x1e4)](_0x48670f(0x1ed),_0x48670f(0x1df));return _0x669f88[0x0];}export async function assertValueSourceReadable(_0x54c31a){const _0x504e9a=a29_0x13b7b4;if(_0x54c31a[_0x504e9a(0x1f0)]===_0x504e9a(0x1da)&&!(_0x54c31a[_0x504e9a(0x201)]in process.env))throw CliErrors[_0x504e9a(0x1e4)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x54c31a[_0x504e9a(0x201)]);if(_0x54c31a[_0x504e9a(0x1f0)]===_0x504e9a(0x1f1))try{await access(_0x54c31a['path']);}catch{throw CliErrors[_0x504e9a(0x1e4)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0x54c31a[_0x504e9a(0x1f4)]);}}export async function readAppConfigValue(_0x5dd612){const _0x2d9b8a=a29_0x13b7b4,_0xef1719=assertSingleValueSource(_0x5dd612),_0x2a403a=[];if(_0xef1719[_0x2d9b8a(0x1f0)]===_0x2d9b8a(0x1ec))return _0x2a403a[_0x2d9b8a(0x1f9)]('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0xef1719['value']??'','source':_0xef1719[_0x2d9b8a(0x1f0)],'warnings':_0x2a403a};if(_0xef1719[_0x2d9b8a(0x1f0)]===_0x2d9b8a(0x204))return{'value':await readStdin(),'source':_0xef1719[_0x2d9b8a(0x1f0)],'warnings':_0x2a403a};if(_0xef1719[_0x2d9b8a(0x1f0)]==='env'){if(!(_0xef1719[_0x2d9b8a(0x201)]in process.env))throw CliErrors[_0x2d9b8a(0x1e4)](_0x2d9b8a(0x1ea)+_0xef1719[_0x2d9b8a(0x201)]);return{'value':process.env[_0xef1719.name]??'','source':_0xef1719[_0x2d9b8a(0x1f0)],'warnings':_0x2a403a};}return{'value':await readFile(_0xef1719[_0x2d9b8a(0x1f4)],_0x2d9b8a(0x208)),'source':_0xef1719[_0x2d9b8a(0x1f0)],'warnings':_0x2a403a};}function readStdin(){return new Promise((_0x4f8418,_0x24e465)=>{const _0x345681=a29_0x2527;let _0x106fb2='';process[_0x345681(0x204)][_0x345681(0x1e7)](_0x345681(0x208)),process[_0x345681(0x204)]['on']('data',_0x303c5f=>{_0x106fb2+=_0x303c5f;}),process[_0x345681(0x204)]['once'](_0x345681(0x1fd),()=>_0x4f8418(_0x106fb2)),process[_0x345681(0x204)][_0x345681(0x203)]('error',_0x24e465);});}
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 +1 @@
1
- function a30_0xbdc9(_0x343fa4,_0x2a3722){_0x343fa4=_0x343fa4-0xce;const _0x39923a=a30_0x3992();let _0xbdc9d6=_0x39923a[_0x343fa4];return _0xbdc9d6;}const a30_0x78b56e=a30_0xbdc9;(function(_0x333378,_0x4ad8ac){const _0x438d17=a30_0xbdc9,_0x5b4b00=_0x333378();while(!![]){try{const _0x332d9f=parseInt(_0x438d17(0xd7))/0x1+parseInt(_0x438d17(0xd8))/0x2*(-parseInt(_0x438d17(0xd6))/0x3)+-parseInt(_0x438d17(0xd2))/0x4+parseInt(_0x438d17(0xd4))/0x5*(parseInt(_0x438d17(0xd0))/0x6)+-parseInt(_0x438d17(0xdf))/0x7+parseInt(_0x438d17(0xe3))/0x8*(parseInt(_0x438d17(0xe1))/0x9)+parseInt(_0x438d17(0xce))/0xa;if(_0x332d9f===_0x4ad8ac)break;else _0x5b4b00['push'](_0x5b4b00['shift']());}catch(_0x539b38){_0x5b4b00['push'](_0x5b4b00['shift']());}}}(a30_0x3992,0x5751a));function a30_0x3992(){const _0x5b4f92=['6936870ZPHfkL','!\x20Not\x20logged\x20in','6852INyWVG','logout','2108160knkzCX','yes','2130neRBek','../../auth/auth-server-ui.js','19956DgtHBK','481508qiDJsg','200LxgoGf','nonInteractive','auth','write','log','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','Login\x20via\x20browser','4389280nupkvc','login','4637259VnWxPq','Clear\x20login\x20session','8XppkdN'];a30_0x3992=function(){return _0x5b4f92;};return a30_0x3992();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a30_0x78b56e(0xe0),'description':a30_0x78b56e(0xde),'risk':a30_0x78b56e(0xdb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x78b56e(0xd3),'type':'boolean','description':a30_0x78b56e(0xdd),'default':![]}],async 'execute'(_0x430866){const _0x50594c=a30_0x78b56e,{runAuthServer:_0x25a25f}=await import(_0x50594c(0xd5));return await _0x25a25f({'autoYes':_0x430866['bool'](_0x50594c(0xd3)),'nonInteractive':_0x430866[_0x50594c(0xd9)]}),{'ok':!![]};}},{'service':a30_0x78b56e(0xda),'command':a30_0x78b56e(0xd1),'description':a30_0x78b56e(0xe2),'risk':a30_0x78b56e(0xdb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x990cae){const _0x50ec60=a30_0x78b56e;return existsSync(cookieFile)?(unlinkSync(cookieFile),console['log']('✓\x20Logged\x20out')):console[_0x50ec60(0xdc)](_0x50ec60(0xcf)),{'ok':!![]};}}];
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 +1 @@
1
- function a31_0x2e5e(_0x30a515,_0x38612a){_0x30a515=_0x30a515-0x1c6;const _0x1ea9ab=a31_0x1ea9();let _0x2e5ebb=_0x1ea9ab[_0x30a515];return _0x2e5ebb;}const a31_0x51863f=a31_0x2e5e;(function(_0x127173,_0x56fb59){const _0xafc6fd=a31_0x2e5e,_0x4d359e=_0x127173();while(!![]){try{const _0x487440=parseInt(_0xafc6fd(0x1d9))/0x1*(parseInt(_0xafc6fd(0x227))/0x2)+parseInt(_0xafc6fd(0x20e))/0x3*(parseInt(_0xafc6fd(0x20f))/0x4)+-parseInt(_0xafc6fd(0x1e4))/0x5*(-parseInt(_0xafc6fd(0x1d8))/0x6)+parseInt(_0xafc6fd(0x21e))/0x7*(-parseInt(_0xafc6fd(0x221))/0x8)+-parseInt(_0xafc6fd(0x1e0))/0x9*(parseInt(_0xafc6fd(0x1d6))/0xa)+parseInt(_0xafc6fd(0x1ff))/0xb+-parseInt(_0xafc6fd(0x1c6))/0xc*(parseInt(_0xafc6fd(0x1f7))/0xd);if(_0x487440===_0x56fb59)break;else _0x4d359e['push'](_0x4d359e['shift']());}catch(_0x5c236a){_0x4d359e['push'](_0x4d359e['shift']());}}}(a31_0x1ea9,0xda789));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';function a31_0x1ea9(){const _0x2306db=['functionNode','80925EKlKee','stdin','before','appCode','code','function-node','after','COMMON','17236197gHCJty','\x22\x20not\x20found\x20for\x20dataset\x20','datasetId','Operation\x20type\x20(HOOK\x20only)','Available\x20aliases:\x20','\x22,\x20params\x20})\x0a','Select\x20trigger\x20node:','scriptsRootDir','.js','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','operationType','name','Dataset\x20not\x20found\x20for\x20code\x20\x22','No\x20operation\x20types\x20found\x20for\x20dataset\x20','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','388791RDlnRv','40qURhny','datasetcode','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','validation','修改后的响应结果','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','Operation\x20type\x20\x22','/ENDPOINT/','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','Invalid\x20dataset\x20selection.','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','Select\x20operation\x20type:','question','entries','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','2445583lOoLkH','apiDir','修改后的请求参数','24JdPmlA','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','string','tableName','.js\x0a\x20*\x20[触发节点]\x20','1148rFRftl','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','\x20function:\x20','/HOOK/','nonInteractive','No\x20api.ts\x20found.\x20Run\x20`','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x22\x20not\x20found.\x20','stderr','length','\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','3228vCohBS','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','write','Script\x20description','/**\x0a\x20*\x20','str','isInteger','map','No\x20datasets\x20found\x20for\x20this\x20app.','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','HOOK','parseInt','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','Invalid\x20function\x20name\x20\x22','operation-type','read','2935340BfBYQd','\x0a\x20*\x20[平台配置]\x20','46236srbbaW','2086hoBWUR','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','Created\x20','ENDPOINT','source','\x20api\x20pull`\x20to\x20refresh.','.js\x0a','45EENPIc','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','当前请求参数','\x0a\x20*\x20[参数字段]\x20按实际请求体为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20HTTP\x20请求体参数\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20TODO:\x20补充业务返回数据结构\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','665OsYFIc','description','keys','\x22.\x20','close','alias','Available:\x20','join','type','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','find','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','当前响应结果',']\x20(','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','datasetCode','Alias\x20\x22','UNKNOWN'];a31_0x1ea9=function(){return _0x2306db;};return a31_0x1ea9();}import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':'bff','command':'create','description':'Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','risk':a31_0x51863f(0x1d5),'flags':[{'name':a31_0x51863f(0x1ec),'type':a31_0x51863f(0x224),'required':!![],'enum':[a31_0x51863f(0x1fe),a31_0x51863f(0x1dc),a31_0x51863f(0x1d0)],'description':'Script\x20type'},{'name':a31_0x51863f(0x20a),'type':a31_0x51863f(0x224),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0x51863f(0x1e5),'type':a31_0x51863f(0x224),'description':a31_0x51863f(0x1c9)},{'name':a31_0x51863f(0x1e9),'type':a31_0x51863f(0x224),'description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a31_0x51863f(0x210),'type':a31_0x51863f(0x224),'description':a31_0x51863f(0x208)},{'name':a31_0x51863f(0x1d4),'type':a31_0x51863f(0x224),'description':a31_0x51863f(0x202)},{'name':a31_0x51863f(0x1fc),'type':a31_0x51863f(0x224),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a31_0x51863f(0x1f9),a31_0x51863f(0x1fd)]}],async 'validate'(_0x5875fa){const _0x2f48b5=a31_0x51863f,_0x208a8d=_0x5875fa['str'](_0x2f48b5(0x20a));if(!isValidBffFunctionName(_0x208a8d))throw CliErrors['validation'](_0x2f48b5(0x1d3)+_0x208a8d+_0x2f48b5(0x21d));},async 'execute'(_0x53316d){const _0xdd2fee=a31_0x51863f,_0x2b7e34=loadBffProjectConfig(_0x53316d[_0xdd2fee(0x1fa)]),_0x720717=_0x53316d[_0xdd2fee(0x1cb)](_0xdd2fee(0x1ec)),_0x42390b=_0x53316d[_0xdd2fee(0x1cb)](_0xdd2fee(0x20a)),_0x5c9bc0=_0x53316d['str'](_0xdd2fee(0x1e5))||undefined,_0x14f3e7=_0x720717===_0xdd2fee(0x1d0)?await resolveHookOptions(_0x2b7e34,_0x53316d):undefined,_0x6abb87=buildFilePath(_0x2b7e34,_0x720717,_0x42390b,_0x14f3e7);if(await fileExists(_0x6abb87))throw CliErrors[_0xdd2fee(0x212)]('File\x20already\x20exists:\x20'+_0x6abb87);await mkdir(dirname(_0x6abb87),{'recursive':!![]});const _0x5c5d43=generateTemplate(_0x720717,_0x42390b,_0x53316d['appCode'],_0x5c9bc0,_0x14f3e7);await writeFile(_0x6abb87,_0x5c5d43,'utf8');const _0x3628a8={'type':_0x720717,'name':_0x42390b,'path':_0x6abb87};if(_0x5c9bc0)_0x3628a8[_0xdd2fee(0x1e5)]=_0x5c9bc0;if(_0x14f3e7){if(_0x14f3e7[_0xdd2fee(0x1e9)])_0x3628a8[_0xdd2fee(0x1e9)]=_0x14f3e7[_0xdd2fee(0x1e9)];_0x3628a8[_0xdd2fee(0x1f3)]=_0x14f3e7[_0xdd2fee(0x1f3)],_0x3628a8['operationType']=_0x14f3e7[_0xdd2fee(0x209)],_0x3628a8[_0xdd2fee(0x1f6)]=_0x14f3e7['functionNode'];}return{'ok':!![],'data':_0x3628a8,'message':_0xdd2fee(0x1db)+_0x720717+_0xdd2fee(0x229)+_0x42390b};}};async function resolveHookOptions(_0xa773af,_0x27c6db){const _0x214d4b=a31_0x51863f,_0x2b20fa=loadAliasMap(_0x27c6db['apiDir'],undefined,resolveApiFilePath(_0x27c6db[_0x214d4b(0x21f)],_0x27c6db['appCode'])),_0x3978df=_0x2b20fa['length']>0x0;let _0x328ac3,_0x33aa17,_0x45b06d;const _0x3a9878=_0x27c6db[_0x214d4b(0x1cb)](_0x214d4b(0x1e9)),_0x59cce1=_0x27c6db[_0x214d4b(0x1cb)](_0x214d4b(0x210));if(_0x3a9878){const _0xfdc0c=resolveAlias(_0x27c6db[_0x214d4b(0x21f)],_0x3a9878,undefined,resolveApiFilePath(_0x27c6db[_0x214d4b(0x21f)],_0x27c6db[_0x214d4b(0x1fa)]));if(!_0xfdc0c){const _0x5efc93=_0x3978df?_0x214d4b(0x203)+_0x2b20fa[_0x214d4b(0x1cd)](_0x1ec527=>_0x1ec527[_0x214d4b(0x1e9)])[_0x214d4b(0x1eb)](',\x20'):_0x214d4b(0x22c)+CLI_BIN_NAME+_0x214d4b(0x1cf);throw CliErrors[_0x214d4b(0x212)](_0x214d4b(0x1f4)+_0x3a9878+_0x214d4b(0x22e)+_0x5efc93);}_0x328ac3=_0x3a9878,_0x33aa17=_0xfdc0c;}else{if(_0x59cce1){_0x33aa17=_0x59cce1;const _0x32b8f5=_0x2b20fa['find'](_0x4f2e71=>_0x4f2e71[_0x214d4b(0x1f3)]===_0x59cce1);_0x328ac3=_0x32b8f5?.[_0x214d4b(0x1e9)];}else{if(_0x27c6db[_0x214d4b(0x22b)])throw CliErrors[_0x214d4b(0x212)](_0x214d4b(0x1c7));else{if(_0x3978df){const _0x5a8a11=_0x2b20fa['map'](_0x265ec4=>_0x265ec4[_0x214d4b(0x1e9)]+'\x20('+_0x265ec4[_0x214d4b(0x225)]+')'),_0x4b83a8=await promptSelect('Select\x20dataset:',_0x5a8a11),_0x56b9ec=_0x2b20fa[_0x4b83a8];if(!_0x56b9ec)throw CliErrors['validation'](_0x214d4b(0x218));_0x328ac3=_0x56b9ec[_0x214d4b(0x1e9)],_0x33aa17=_0x56b9ec[_0x214d4b(0x1f3)];}else{const _0x4692be=await listDatasets(_0x27c6db['appCode']);if(_0x4692be[_0x214d4b(0x230)]===0x0)throw CliErrors[_0x214d4b(0x212)](_0x214d4b(0x1ce));const _0x214dd3=_0x4692be[_0x214d4b(0x1cd)](_0x496d90=>_0x496d90[_0x214d4b(0x20a)]+'\x20['+(_0x496d90[_0x214d4b(0x1dd)]??_0x214d4b(0x1f5))+_0x214d4b(0x1f1)+_0x496d90[_0x214d4b(0x1fb)]+')'),_0x12b7cf=await promptSelect('Select\x20dataset:',_0x214dd3),_0x45924a=_0x4692be[_0x12b7cf];if(!_0x45924a)throw CliErrors[_0x214d4b(0x212)](_0x214d4b(0x218));_0x33aa17=_0x45924a['code'],_0x328ac3=undefined;}}}}const _0x4b15cf=await listDatasets(_0x27c6db['appCode']),_0x3342df=_0x4b15cf[_0x214d4b(0x1ee)](_0x5c13c5=>_0x5c13c5[_0x214d4b(0x1fb)]===_0x33aa17);if(!_0x3342df)throw CliErrors[_0x214d4b(0x212)](_0x214d4b(0x20b)+_0x33aa17+_0x214d4b(0x1e7)+(_0x328ac3?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+_0x214d4b(0x1de):''));_0x45b06d=_0x3342df['id'];const _0x421541=_0x328ac3??_0x33aa17,_0x3954c8=await listBffDatasetOperations(_0x27c6db['appCode'],_0x45b06d),_0xa6ad19=_0x3954c8?Object[_0x214d4b(0x1e6)](_0x3954c8):[];if(_0xa6ad19[_0x214d4b(0x230)]===0x0)throw CliErrors[_0x214d4b(0x212)](_0x214d4b(0x20c)+_0x421541+'.');let _0xcd8250;const _0x19c6d1=_0x27c6db[_0x214d4b(0x1cb)](_0x214d4b(0x1d4));if(_0x19c6d1){if(!_0xa6ad19['includes'](_0x19c6d1))throw CliErrors[_0x214d4b(0x212)](_0x214d4b(0x215)+_0x19c6d1+_0x214d4b(0x200)+_0x421541+'.\x20'+(_0x214d4b(0x1ea)+_0xa6ad19[_0x214d4b(0x1eb)](',\x20')));_0xcd8250=_0x19c6d1;}else{if(_0x27c6db[_0x214d4b(0x22b)])throw CliErrors[_0x214d4b(0x212)]('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x100d0e=await promptSelect(_0x214d4b(0x21a),_0xa6ad19);_0xcd8250=_0xa6ad19[_0x100d0e]??_0xa6ad19[0x0];}let _0x47f82d=normalizeHookFunctionNode(_0x27c6db[_0x214d4b(0x1cb)](_0x214d4b(0x1fc)));if(!_0x47f82d){if(_0x27c6db[_0x214d4b(0x1cb)](_0x214d4b(0x1fc)))throw CliErrors['validation'](_0x214d4b(0x217));if(_0x27c6db[_0x214d4b(0x22b)])throw CliErrors[_0x214d4b(0x212)](_0x214d4b(0x22d));const _0x4350de=await promptSelect(_0x214d4b(0x205),[_0x214d4b(0x1f9),_0x214d4b(0x1fd)]);_0x47f82d=['before','after'][_0x4350de]??'before';}return{'alias':_0x328ac3,'datasetCode':_0x33aa17,'datasetId':_0x45b06d,'operationType':_0xcd8250,'functionNode':_0x47f82d};}async function promptSelect(_0x5c6f25,_0x2c5522){const _0x59bb30=a31_0x51863f;if(_0x2c5522['length']===0x1)return 0x0;for(const [_0x25e60f,_0x1c5692]of _0x2c5522[_0x59bb30(0x21c)]()){process['stderr'][_0x59bb30(0x1c8)]('\x20\x20'+(_0x25e60f+0x1)+'.\x20'+_0x1c5692+'\x0a');}const _0x15d2cc=createInterface({'input':process[_0x59bb30(0x1f8)],'output':process[_0x59bb30(0x22f)]});while(!![]){const _0x4b9a0=await new Promise(_0x55d603=>{const _0x555ccc=_0x59bb30;_0x15d2cc[_0x555ccc(0x21b)](_0x5c6f25+'\x20',_0x55d603);}),_0x5ac5b7=Number[_0x59bb30(0x1d1)](_0x4b9a0['trim'](),0xa);if(Number[_0x59bb30(0x1cc)](_0x5ac5b7)&&_0x5ac5b7>=0x1&&_0x5ac5b7<=_0x2c5522[_0x59bb30(0x230)])return _0x15d2cc[_0x59bb30(0x1e8)](),_0x5ac5b7-0x1;process['stderr'][_0x59bb30(0x1c8)](_0x59bb30(0x1e1)+_0x2c5522[_0x59bb30(0x230)]+'.\x0a');}}function buildFilePath(_0x456bf8,_0x1430c2,_0x1d6cd9,_0xfa6a7){const _0x381ae3=a31_0x51863f;if(_0x1430c2===_0x381ae3(0x1d0)){if(!_0xfa6a7)throw CliErrors['validation']('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x1e39a5=_0xfa6a7[_0x381ae3(0x1e9)]??_0xfa6a7[_0x381ae3(0x1f3)];return join(_0x456bf8[_0x381ae3(0x206)],_0x381ae3(0x1d0),_0x1e39a5,_0xfa6a7[_0x381ae3(0x209)],_0xfa6a7[_0x381ae3(0x1f6)],_0x1d6cd9+_0x381ae3(0x207));}return join(_0x456bf8[_0x381ae3(0x206)],_0x1430c2,_0x1d6cd9+_0x381ae3(0x207));}export function generateTemplate(_0xe3d58f,_0x1244a9,_0xd88fc0,_0x3073f8,_0x350dbc){const _0x5c022f=a31_0x51863f,_0x4815bd=_0x3073f8?.['trim']()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x346a0b=getAppBaseUrl(_0xd88fc0),_0x35ea03=_0x5c022f(0x20d);if(_0xe3d58f===_0x5c022f(0x1fe))return'/**\x0a\x20*\x20'+_0x4815bd+_0x5c022f(0x1d2)+_0x1244a9+_0x5c022f(0x1d7)+_0x346a0b+_0x5c022f(0x228)+_0xd88fc0+'/COMMON/'+_0x1244a9+_0x5c022f(0x214)+_0x1244a9+_0x5c022f(0x204)+_0x35ea03+_0x5c022f(0x231)+_0x1244a9+_0x5c022f(0x223);if(_0xe3d58f==='ENDPOINT')return _0x5c022f(0x1ca)+_0x4815bd+_0x5c022f(0x1ed)+_0x1244a9+_0x5c022f(0x1ef)+_0xd88fc0+'/'+_0x1244a9+_0x5c022f(0x1d7)+_0x346a0b+_0x5c022f(0x228)+_0xd88fc0+_0x5c022f(0x216)+_0x1244a9+_0x5c022f(0x1df)+_0x35ea03+_0x5c022f(0x1e3)+_0x1244a9+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x350dbc)throw CliErrors[_0x5c022f(0x212)](_0x5c022f(0x211));const _0x54cb3=_0x350dbc[_0x5c022f(0x1e9)]??_0x350dbc[_0x5c022f(0x1f3)],_0xf88e3d=_0x350dbc[_0x5c022f(0x1f6)]==='before'?_0x5c022f(0x1e2):_0x5c022f(0x1f0),_0x1a5773=_0x350dbc[_0x5c022f(0x1f6)]===_0x5c022f(0x1f9)?_0x5c022f(0x220):_0x5c022f(0x213);return _0x5c022f(0x1ca)+_0x4815bd+_0x5c022f(0x222)+_0x1244a9+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0xd88fc0+'/'+_0x350dbc['datasetCode']+'/'+_0x350dbc[_0x5c022f(0x209)]+_0x5c022f(0x1d7)+_0x346a0b+'/data/dataset/'+_0x350dbc[_0x5c022f(0x201)]+_0x5c022f(0x1f2)+_0xd88fc0+_0x5c022f(0x22a)+_0x54cb3+'/'+_0x350dbc[_0x5c022f(0x209)]+'/'+_0x350dbc[_0x5c022f(0x1f6)]+'/'+_0x1244a9+_0x5c022f(0x226)+_0x350dbc[_0x5c022f(0x1f6)]+'\x0a'+_0x35ea03+_0x5c022f(0x1da)+_0xf88e3d+_0x5c022f(0x219)+_0x1a5773+'\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x1244a9+_0x5c022f(0x223);}
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 +1 @@
1
- const a32_0x59fbc0=a32_0xdb2d;(function(_0x404d1f,_0xd017d5){const _0x3ac58e=a32_0xdb2d,_0x533fbc=_0x404d1f();while(!![]){try{const _0x1692a1=parseInt(_0x3ac58e(0x206))/0x1+-parseInt(_0x3ac58e(0x21e))/0x2*(-parseInt(_0x3ac58e(0x1f2))/0x3)+parseInt(_0x3ac58e(0x21c))/0x4*(parseInt(_0x3ac58e(0x1ee))/0x5)+parseInt(_0x3ac58e(0x1ef))/0x6*(parseInt(_0x3ac58e(0x218))/0x7)+parseInt(_0x3ac58e(0x1f1))/0x8*(parseInt(_0x3ac58e(0x1fc))/0x9)+-parseInt(_0x3ac58e(0x1f5))/0xa+-parseInt(_0x3ac58e(0x203))/0xb;if(_0x1692a1===_0xd017d5)break;else _0x533fbc['push'](_0x533fbc['shift']());}catch(_0x450604){_0x533fbc['push'](_0x533fbc['shift']());}}}(a32_0x538b,0x7f3ff));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';function a32_0xdb2d(_0x1c20fd,_0x2e9e26){_0x1c20fd=_0x1c20fd-0x1e7;const _0x538b6a=a32_0x538b();let _0xdb2d90=_0x538b6a[_0x1c20fd];return _0xdb2d90;}import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a32_0x538b(){const _0x4f8fd7=['validation','find','2234130vXRgEA','Function\x20not\x20found:\x20','appCode','scriptsRootDir','filter','Would\x20delete\x20','join','254034FvSwzH','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','map','length','/api/management/library/scripts/delete','target','string','25045592FQsRao','projectRoot','str','45696KotryI','lastSync','functions','No\x20lock\x20entry\x20found\x20for\x20\x22','trashedTo','split','keys','Local\x20delete\x20not\x20settled\x20for\x20','trashDir','\x22\x20not\x20found\x20after\x20ensureLockScope.','replace','Multiple\x20functions\x20match\x20\x22','scriptsRoot','toISOString','bff','startsWith','lockFilePath','Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','63aCBgvw','<timestamp>','apps','high-risk-write','8OnXDub','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','46rFjNFS','remoteId','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','stringify','includes','\x20(local\x20file\x20moved\x20to\x20trash)','parse','Backend\x20Function\x20lock\x20file\x20not\x20found.','Deleted\x20','2173515zCzGpO','327210jvWjED','delete','248zvtJZd','96597rboJeI'];a32_0x538b=function(){return _0x4f8fd7;};return a32_0x538b();}import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x59fbc0(0x214),'command':'delete','description':a32_0x59fbc0(0x1fd),'risk':a32_0x59fbc0(0x21b),'flags':[{'name':a32_0x59fbc0(0x201),'type':a32_0x59fbc0(0x202),'required':!![],'description':a32_0x59fbc0(0x1e7)}],async 'validate'(_0x4ac8b1){const _0xdcff17=a32_0x59fbc0,_0x5e30d9=loadBffProjectConfig(_0x4ac8b1[_0xdcff17(0x1f7)]),_0x5f455c=await readBffLockFile(_0x5e30d9[_0xdcff17(0x216)]);if(!_0x5f455c)throw CliErrors[_0xdcff17(0x1f3)](_0xdcff17(0x217));},async 'dryRun'(_0x1c513b){const _0x135161=a32_0x59fbc0,_0xc61ce9=loadBffProjectConfig(_0x1c513b[_0x135161(0x1f7)]),_0x72354a=await readBffLockFile(_0xc61ce9[_0x135161(0x216)]);if(!_0x72354a)throw CliErrors['validation'](_0x135161(0x1ec));const {appLock:_0x4cba17}=ensureLockScope(_0x72354a,_0x1c513b['appCode'],_0xc61ce9[_0x135161(0x212)],_0x135161(0x1f0)),_0x288e1e=_0x1c513b[_0x135161(0x205)](_0x135161(0x201)),_0x1688a2=Object[_0x135161(0x20c)](_0x4cba17[_0x135161(0x208)]),_0x53293c=resolveDeleteTarget(_0x288e1e,_0x1688a2),_0x146bbf=_0x4cba17[_0x135161(0x208)][_0x53293c];if(!_0x146bbf)throw CliErrors[_0x135161(0x1f3)](_0x135161(0x209)+_0x53293c+'\x22.');const _0x15b382=resolveLocalFilePathFromLockKey(_0xc61ce9,_0x53293c),_0x4fa6b9=relative(_0xc61ce9[_0x135161(0x204)],_0x15b382),_0x5d85b7=join(_0xc61ce9[_0x135161(0x20e)],_0x135161(0x219),_0x4fa6b9);return{'method':'POST','url':_0x135161(0x200),'body':{'appCode':_0x1c513b[_0x135161(0x1f7)],'target':_0x53293c,'remoteId':_0x146bbf[_0x135161(0x21f)],'localFilePath':_0x15b382,'trashedPath':_0x5d85b7},'description':_0x135161(0x1fa)+_0x53293c+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x2c2063){const _0x551972=a32_0x59fbc0,_0x3ac073=loadBffProjectConfig(_0x2c2063[_0x551972(0x1f7)]),_0x8a207b=await readBffLockFile(_0x3ac073[_0x551972(0x216)]);if(!_0x8a207b)throw CliErrors['validation']('Backend\x20Function\x20lock\x20file\x20not\x20found.');const {lockData:_0x429df4,appLock:_0x40460}=ensureLockScope(_0x8a207b,_0x2c2063[_0x551972(0x1f7)],_0x3ac073[_0x551972(0x212)],_0x551972(0x1f0)),_0x5bcd2a=JSON[_0x551972(0x1eb)](JSON[_0x551972(0x1e8)](_0x429df4)),_0x464109=_0x5bcd2a['apps'][_0x2c2063[_0x551972(0x1f7)]];if(!_0x464109)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x2c2063[_0x551972(0x1f7)]+_0x551972(0x20f));const _0x14b9d1=_0x2c2063[_0x551972(0x205)]('target'),_0x531639=Object[_0x551972(0x20c)](_0x464109[_0x551972(0x208)]),_0x467a34=resolveDeleteTarget(_0x14b9d1,_0x531639),_0x6316cb=_0x464109[_0x551972(0x208)][_0x467a34];if(!_0x6316cb)throw CliErrors[_0x551972(0x1f3)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x467a34+'\x22.');await deleteBffScript(_0x6316cb[_0x551972(0x21f)]),delete _0x464109[_0x551972(0x208)][_0x467a34],_0x464109[_0x551972(0x207)]=new Date()[_0x551972(0x213)](),await writeBffLockFile(_0x3ac073[_0x551972(0x216)],_0x5bcd2a);const _0x1c90db=resolveLocalFilePathFromLockKey(_0x3ac073,_0x467a34);let _0x4e1a9d;await fileExists(_0x1c90db)&&(_0x4e1a9d=await moveToTrash(_0x3ac073[_0x551972(0x204)],_0x3ac073[_0x551972(0x20e)],_0x1c90db),await cleanupEmptyDirectories(dirname(_0x1c90db),_0x3ac073[_0x551972(0x1f8)]));await waitForDeleteSettlement(_0x3ac073[_0x551972(0x216)],_0x2c2063[_0x551972(0x1f7)],_0x467a34,_0x1c90db),await sleep(0x96);const _0x13d273={'deleted':_0x467a34,'remoteId':_0x6316cb['remoteId']};if(_0x4e1a9d)_0x13d273[_0x551972(0x20a)]=_0x4e1a9d;return{'ok':!![],'data':_0x13d273,'message':_0x551972(0x1ed)+_0x467a34+(_0x4e1a9d?_0x551972(0x1ea):'')};}};function resolveDeleteTarget(_0x77b370,_0x574767){const _0x353363=a32_0x59fbc0;if(_0x77b370[_0x353363(0x1e9)]('/')){const _0x49e993=_0x574767[_0x353363(0x1f4)](_0x20d7de=>_0x20d7de===_0x77b370);if(!_0x49e993)throw CliErrors[_0x353363(0x1f3)](_0x353363(0x1f6)+_0x77b370);return _0x49e993;}const _0x190ea6=_0x574767[_0x353363(0x1f9)](_0x318fb4=>_0x318fb4[_0x353363(0x20b)]('/')['at'](-0x1)===_0x77b370);if(_0x190ea6[_0x353363(0x1ff)]===0x0)throw CliErrors[_0x353363(0x1f3)](_0x353363(0x1f6)+_0x77b370);if(_0x190ea6[_0x353363(0x1ff)]>0x1)throw CliErrors['validation'](_0x353363(0x211)+_0x77b370+_0x353363(0x21d)+_0x190ea6[_0x353363(0x1fe)](_0x57077e=>'\x20\x20-\x20'+_0x57077e)[_0x353363(0x1fb)]('\x0a'));return _0x190ea6[0x0];}async function moveToTrash(_0x2fb527,_0x38251d,_0x2e70ea){const _0x1a4c57=a32_0x59fbc0,_0x126074=new Date()['toISOString']()[_0x1a4c57(0x210)](/[:.]/g,'-'),_0x368512=relative(_0x2fb527,_0x2e70ea),_0xe18dcf=join(_0x38251d,_0x126074,_0x368512);return await mkdir(dirname(_0xe18dcf),{'recursive':!![]}),await rename(_0x2e70ea,_0xe18dcf),_0xe18dcf;}async function cleanupEmptyDirectories(_0x2da3db,_0x59fd9f){const _0x6c6b98=a32_0x59fbc0;let _0xdcec3c=resolve(_0x2da3db);const _0x4ddbd8=resolve(_0x59fd9f);while(_0xdcec3c[_0x6c6b98(0x215)](''+_0x4ddbd8+sep)||_0xdcec3c===_0x4ddbd8){if(_0xdcec3c===_0x4ddbd8)return;try{const _0x385791=await readdir(_0xdcec3c);if(_0x385791[_0x6c6b98(0x1ff)]>0x0)return;await rmdir(_0xdcec3c);}catch{return;}_0xdcec3c=dirname(_0xdcec3c);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0xa6e843,_0x5e33ad,_0x156f3f,_0x43970a){const _0x5926f7=a32_0x59fbc0;for(let _0x25fb8d=0x0;_0x25fb8d<DELETE_SETTLE_RETRY_COUNT;_0x25fb8d+=0x1){const _0x54c3b8=await readBffLockFile(_0xa6e843),_0x33433b=!!_0x54c3b8?.[_0x5926f7(0x21a)]?.[_0x5e33ad]?.[_0x5926f7(0x208)]?.[_0x156f3f],_0x3c0dab=await fileExists(_0x43970a);if(!_0x33433b&&!_0x3c0dab)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x5926f7(0x20d)+_0x156f3f+'.');}
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 +1 @@
1
- const a33_0x4c8bb1=a33_0x359e;(function(_0x4caeac,_0x553bdd){const _0x3dea65=a33_0x359e,_0x37acd6=_0x4caeac();while(!![]){try{const _0x2aeac3=-parseInt(_0x3dea65(0x153))/0x1*(-parseInt(_0x3dea65(0x141))/0x2)+parseInt(_0x3dea65(0x13d))/0x3+parseInt(_0x3dea65(0x155))/0x4+-parseInt(_0x3dea65(0x14e))/0x5+parseInt(_0x3dea65(0x147))/0x6+-parseInt(_0x3dea65(0x13f))/0x7*(parseInt(_0x3dea65(0x145))/0x8)+-parseInt(_0x3dea65(0x146))/0x9*(-parseInt(_0x3dea65(0x157))/0xa);if(_0x2aeac3===_0x553bdd)break;else _0x37acd6['push'](_0x37acd6['shift']());}catch(_0x51a09d){_0x37acd6['push'](_0x37acd6['shift']());}}}(a33_0x2b3b,0x2dc49));import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x2b3b(){const _0x48fc7e=['bool','343850ypSnIa','updateUserName','7860HpCEVX','read','6419KCKwjF','(none)','10aBrkTB','functionName','detail','appCode','632hazNBC','45QjZnin','309990XuylIk','scriptType','scriptContent','Script\x20ID','updatedTime','version','Return\x20full\x20raw\x20script\x20object','480285ZavNDJ','verbose','Get\x20Backend\x20Function\x20script\x20details\x20by\x20ID','boolean','description','12829TUtIRJ','num','262440btPHbc'];a33_0x2b3b=function(){return _0x48fc7e;};return a33_0x2b3b();}function a33_0x359e(_0x57bc77,_0x2143b1){_0x57bc77=_0x57bc77-0x13c;const _0x2b3bc0=a33_0x2b3b();let _0x359e54=_0x2b3bc0[_0x57bc77];return _0x359e54;}export const bffDetail={'service':'bff','command':a33_0x4c8bb1(0x143),'description':a33_0x4c8bb1(0x150),'risk':a33_0x4c8bb1(0x13e),'flags':[{'name':'id','type':'number','required':!![],'description':a33_0x4c8bb1(0x14a)},{'name':a33_0x4c8bb1(0x14f),'type':a33_0x4c8bb1(0x151),'description':a33_0x4c8bb1(0x14d)}],async 'execute'(_0x4fb9cb){const _0xcfffc=a33_0x4c8bb1,_0x471ad2=await getBffScriptInfo(_0x4fb9cb[_0xcfffc(0x154)]('id')),_0x529fef=_0x4fb9cb[_0xcfffc(0x156)](_0xcfffc(0x14f));if(_0x529fef)return{'ok':!![],'data':_0x471ad2};return{'ok':!![],'data':{'id':_0x471ad2['id'],'functionName':_0x471ad2[_0xcfffc(0x142)]??'','version':_0x471ad2[_0xcfffc(0x14c)]??'','updateUserName':_0x471ad2[_0xcfffc(0x13c)]??'','appCode':_0x471ad2[_0xcfffc(0x144)],'scriptType':_0x471ad2[_0xcfffc(0x148)],'description':_0x471ad2[_0xcfffc(0x152)]||_0xcfffc(0x140),'createdTime':_0x471ad2['createdTime']??'','updatedTime':_0x471ad2[_0xcfffc(0x14b)]??'','scriptContent':_0x471ad2[_0xcfffc(0x149)]??''}};}};
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)]??''}};}};