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

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 +1 -1
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a20_0xaa4699=a20_0x29aa;(function(_0x39a465,_0x1dadf4){const _0x504e96=a20_0x29aa,_0x2c5a3c=_0x39a465();while(!![]){try{const _0x4198ea=parseInt(_0x504e96(0x1c6))/0x1*(-parseInt(_0x504e96(0x1ad))/0x2)+parseInt(_0x504e96(0x1b9))/0x3+parseInt(_0x504e96(0x1b7))/0x4+-parseInt(_0x504e96(0x1ba))/0x5*(parseInt(_0x504e96(0x1b2))/0x6)+-parseInt(_0x504e96(0x1a5))/0x7+parseInt(_0x504e96(0x1c5))/0x8*(parseInt(_0x504e96(0x19c))/0x9)+parseInt(_0x504e96(0x1be))/0xa*(parseInt(_0x504e96(0x1b0))/0xb);if(_0x4198ea===_0x1dadf4)break;else _0x2c5a3c['push'](_0x2c5a3c['shift']());}catch(_0x26e2ca){_0x2c5a3c['push'](_0x2c5a3c['shift']());}}}(a20_0x1679,0xd6dc1));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a20_0x1679(){const _0x2a1801=['app','235965gZKpHB','776985LRflUO','merged','read','.\x20Use\x20`','1885430xTKswj','keys','entries','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','\x20config','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','mergedCli','1544456YdFwRM','29UFJCOJ','63pUIhzw','length','list','find','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','boolean','global','remote','globalConfig','8787254LEVtUC','bool','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','defaultApp','apps','globalPath','\x20in\x20','project','34796WQVmMY','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','appcode','143NhSHZm','object','54oQyTOl','optional','map','projectConfig','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','629556VYVkoD'];a20_0x1679=function(){return _0x2a1801;};return a20_0x1679();}import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x5e6fee,_0x476cf4){const _0x2eb48e=a20_0x29aa,_0x2b1369=[],_0xdc62f3=_0x5e6fee[_0x2eb48e(0x1a9)]&&typeof _0x5e6fee[_0x2eb48e(0x1a9)]===_0x2eb48e(0x1b1)?_0x5e6fee[_0x2eb48e(0x1a9)]:{},_0x5a9052=_0x5e6fee[_0x2eb48e(0x1a8)]||undefined,_0x4d7255=_0x5a9052??(Object[_0x2eb48e(0x1bf)](_0xdc62f3)[_0x2eb48e(0x19d)]===0x1?Object[_0x2eb48e(0x1bf)](_0xdc62f3)[0x0]:undefined);for(const [_0x5cc57,_0xe26d45]of Object[_0x2eb48e(0x1c0)](_0xdc62f3)){if(!_0xe26d45||typeof _0xe26d45!=='object'||!_0xe26d45[_0x2eb48e(0x1af)])continue;_0x2b1369['push']({'name':_0x5cc57,'appcode':_0xe26d45[_0x2eb48e(0x1af)],'named':!![],'definedIn':_0x476cf4,'isDefault':_0x5cc57===_0x4d7255,...buildAppProfileListFields(_0xe26d45)});}return _0x2b1369;}function buildMergedItems(_0x12a450,_0x38566d){const _0x295edc=a20_0x29aa,{apps:apps={}}=_0x12a450,_0x5e3d5c=_0x12a450[_0x295edc(0x1a8)],_0x18f33f=_0x5e3d5c??(Object[_0x295edc(0x1bf)](apps)[_0x295edc(0x19d)]===0x1?Object[_0x295edc(0x1bf)](apps)[0x0]:undefined),_0x5b4523=_0x38566d[_0x295edc(0x1a4)]['apps']&&typeof _0x38566d[_0x295edc(0x1a4)]['apps']==='object'?_0x38566d['globalConfig']['apps']:{},_0x53ae19=_0x38566d[_0x295edc(0x1b5)][_0x295edc(0x1a9)]&&typeof _0x38566d[_0x295edc(0x1b5)][_0x295edc(0x1a9)]===_0x295edc(0x1b1)?_0x38566d['projectConfig'][_0x295edc(0x1a9)]:{},_0x5c793d=Object[_0x295edc(0x1c0)](apps),_0x2849be=_0x5c793d[_0x295edc(0x1b4)](([_0x4ea511,_0x2489b0])=>({'name':_0x4ea511,'appcode':_0x2489b0[_0x295edc(0x1af)],'named':!![],'definedIn':appDefinedIn(_0x4ea511,_0x5b4523,_0x53ae19),'isDefault':_0x4ea511===_0x18f33f,...buildAppProfileListFields(_0x2489b0)}));return _0x2849be;}function validateAppListFlags(_0xb98efa){const _0x240ea7=a20_0x29aa;if(!_0xb98efa['bool'](_0x240ea7(0x1a3)))return;if(!_0xb98efa[_0x240ea7(0x1a6)]('global')&&!_0xb98efa[_0x240ea7(0x1a6)](_0x240ea7(0x1ac)))return;throw CliErrors['validation'](_0x240ea7(0x1ae),_0x240ea7(0x1a7));}function a20_0x29aa(_0x251e7a,_0x149625){_0x251e7a=_0x251e7a-0x19c;const _0x167988=a20_0x1679();let _0x29aa89=_0x167988[_0x251e7a];return _0x29aa89;}async function execute(_0x3c1911){const _0x250f99=a20_0x29aa;validateAppListFlags(_0x3c1911);if(_0x3c1911[_0x250f99(0x1a6)](_0x250f99(0x1a3)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x3c1911)};const _0x509251=_0x3c1911[_0x250f99(0x1a6)](_0x250f99(0x1a2)),_0x47b793=_0x3c1911['bool'](_0x250f99(0x1ac)),_0x1ea237=_0x509251?'global':_0x47b793?_0x250f99(0x1ac):_0x250f99(0x1bb),{config:_0x50850b,layers:_0x4664cf}=readRawConfigWithLayers(),_0x2fdf82=resolveDefaultAppSource(_0x4664cf),{defaultApp:_0x1f5d48}=_0x50850b;let _0x1a0c9a,_0x5f303c;switch(_0x1ea237){case _0x250f99(0x1a2):_0x1a0c9a=buildItemsFromLayer(_0x4664cf[_0x250f99(0x1a4)],'global'),_0x5f303c=_0x4664cf[_0x250f99(0x1aa)];break;case _0x250f99(0x1ac):_0x1a0c9a=buildItemsFromLayer(_0x4664cf['projectConfig'],_0x250f99(0x1ac)),_0x5f303c=_0x4664cf['projectPath'];break;default:_0x1a0c9a=buildMergedItems(_0x50850b,_0x4664cf);break;}enrichAppListItemsWithMergedSelection(_0x1a0c9a,_0x3c1911[_0x250f99(0x1c4)]);if(_0x1a0c9a['length']===0x0){const _0x5ee8e7=_0x1ea237==='merged'?'':_0x250f99(0x1ab)+_0x1ea237+_0x250f99(0x1c2);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x5ee8e7+_0x250f99(0x1bd)+CLI_BIN_NAME+_0x250f99(0x1b6)};}const _0x3fcffe=_0x1a0c9a[_0x250f99(0x19f)](_0x1832a5=>_0x1832a5['isCurrent']===!![]),_0x56794f=_0x1f5d48??_0x3fcffe?.['name']??null,_0x30dde0=_0x1ea237===_0x250f99(0x1bb)?{'globalPath':_0x4664cf[_0x250f99(0x1aa)]??null,'projectPath':_0x4664cf['projectPath']??null,'defaultApp':_0x56794f,'defaultAppSource':_0x1f5d48!=null?_0x2fdf82:null}:{'scope':_0x1ea237,'configPath':_0x5f303c??null};return{'ok':!![],'data':{'items':_0x1a0c9a,'meta':_0x30dde0}};}export const appListDefinition={'service':a20_0xaa4699(0x1b8),'command':a20_0xaa4699(0x19e),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0xaa4699(0x1bc),'auth':a20_0xaa4699(0x1b3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'remote','type':'boolean','description':a20_0xaa4699(0x1a0),'default':![]},{'name':a20_0xaa4699(0x1a2),'type':'boolean','description':a20_0xaa4699(0x1c1),'default':![]},{'name':'project','type':a20_0xaa4699(0x1a1),'description':a20_0xaa4699(0x1c3),'default':![]}],async 'validate'(_0x294200){validateAppListFlags(_0x294200);},'execute':execute};
1
+ const a20_0x5f1045=a20_0x27c5;(function(_0x29aab0,_0x2e3078){const _0x1f6aad=a20_0x27c5,_0x3eae48=_0x29aab0();while(!![]){try{const _0x20abb4=-parseInt(_0x1f6aad(0xc1))/0x1*(-parseInt(_0x1f6aad(0xb6))/0x2)+-parseInt(_0x1f6aad(0xca))/0x3+-parseInt(_0x1f6aad(0xb5))/0x4+parseInt(_0x1f6aad(0xc7))/0x5+parseInt(_0x1f6aad(0xac))/0x6*(-parseInt(_0x1f6aad(0xbd))/0x7)+-parseInt(_0x1f6aad(0xaf))/0x8*(parseInt(_0x1f6aad(0xa6))/0x9)+parseInt(_0x1f6aad(0xb0))/0xa;if(_0x20abb4===_0x2e3078)break;else _0x3eae48['push'](_0x3eae48['shift']());}catch(_0x2a6095){_0x3eae48['push'](_0x3eae48['shift']());}}}(a20_0x478f,0x7909d));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';function a20_0x478f(){const _0x5ad407=['List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','keys','globalConfig','length','6757173xaiiLg','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','mergedCli','globalPath','1374mVmCRy','list','optional','8ftLLVQ','24180970MLoItN','No\x20apps\x20configured','projectPath','object','apps','3152168xAiFyh','739176sMjPWP','\x20in\x20','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','validation','remote','merged','29533UpAnEr','bool','push','defaultApp','1RZbeft','boolean','name','projectConfig','project','find','1418225gbJZqb','.\x20Use\x20`','global','211701VnIPfC','app','appcode','read','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'];a20_0x478f=function(){return _0x5ad407;};return a20_0x478f();}import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function a20_0x27c5(_0x2367a2,_0x114831){_0x2367a2=_0x2367a2-0x9f;const _0x478f25=a20_0x478f();let _0x27c52e=_0x478f25[_0x2367a2];return _0x27c52e;}function buildItemsFromLayer(_0xa31724,_0x1d5d03){const _0x879dea=a20_0x27c5,_0x9e227c=[],_0x116aa4=_0xa31724[_0x879dea(0xb4)]&&typeof _0xa31724['apps']==='object'?_0xa31724[_0x879dea(0xb4)]:{},_0x2d352b=_0xa31724[_0x879dea(0xc0)]||undefined,_0x4b75f0=_0x2d352b??(Object[_0x879dea(0xa3)](_0x116aa4)[_0x879dea(0xa5)]===0x1?Object[_0x879dea(0xa3)](_0x116aa4)[0x0]:undefined);for(const [_0x546765,_0x33f1bb]of Object['entries'](_0x116aa4)){if(!_0x33f1bb||typeof _0x33f1bb!==_0x879dea(0xb3)||!_0x33f1bb[_0x879dea(0x9f)])continue;_0x9e227c[_0x879dea(0xbf)]({'name':_0x546765,'appcode':_0x33f1bb[_0x879dea(0x9f)],'named':!![],'definedIn':_0x1d5d03,'isDefault':_0x546765===_0x4b75f0,...buildAppProfileListFields(_0x33f1bb)});}return _0x9e227c;}function buildMergedItems(_0x386a90,_0x4844a9){const _0x3b6110=a20_0x27c5,{apps:apps={}}=_0x386a90,_0x2237cd=_0x386a90[_0x3b6110(0xc0)],_0x548ef2=_0x2237cd??(Object[_0x3b6110(0xa3)](apps)[_0x3b6110(0xa5)]===0x1?Object[_0x3b6110(0xa3)](apps)[0x0]:undefined),_0x5696ee=_0x4844a9['globalConfig']['apps']&&typeof _0x4844a9[_0x3b6110(0xa4)]['apps']===_0x3b6110(0xb3)?_0x4844a9[_0x3b6110(0xa4)]['apps']:{},_0xb478c9=_0x4844a9[_0x3b6110(0xc4)][_0x3b6110(0xb4)]&&typeof _0x4844a9[_0x3b6110(0xc4)][_0x3b6110(0xb4)]===_0x3b6110(0xb3)?_0x4844a9[_0x3b6110(0xc4)][_0x3b6110(0xb4)]:{},_0x236c65=Object['entries'](apps),_0x433683=_0x236c65['map'](([_0x41976f,_0x33af9d])=>({'name':_0x41976f,'appcode':_0x33af9d[_0x3b6110(0x9f)],'named':!![],'definedIn':appDefinedIn(_0x41976f,_0x5696ee,_0xb478c9),'isDefault':_0x41976f===_0x548ef2,...buildAppProfileListFields(_0x33af9d)}));return _0x433683;}function validateAppListFlags(_0x54df6c){const _0x292956=a20_0x27c5;if(!_0x54df6c[_0x292956(0xbe)](_0x292956(0xbb)))return;if(!_0x54df6c[_0x292956(0xbe)](_0x292956(0xc9))&&!_0x54df6c[_0x292956(0xbe)]('project'))return;throw CliErrors[_0x292956(0xba)](_0x292956(0xb9),_0x292956(0xa7));}async function execute(_0x731854){const _0x11e6a1=a20_0x27c5;validateAppListFlags(_0x731854);if(_0x731854[_0x11e6a1(0xbe)]('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x731854)};const _0x2bf531=_0x731854[_0x11e6a1(0xbe)]('global'),_0x2efc9a=_0x731854[_0x11e6a1(0xbe)](_0x11e6a1(0xc5)),_0x572db0=_0x2bf531?_0x11e6a1(0xc9):_0x2efc9a?_0x11e6a1(0xc5):'merged',{config:_0x105de9,layers:_0x1bfbc8}=readRawConfigWithLayers(),_0x5a6a4=resolveDefaultAppSource(_0x1bfbc8),{defaultApp:_0x308f85}=_0x105de9;let _0x229557,_0x2d2b14;switch(_0x572db0){case'global':_0x229557=buildItemsFromLayer(_0x1bfbc8[_0x11e6a1(0xa4)],_0x11e6a1(0xc9)),_0x2d2b14=_0x1bfbc8[_0x11e6a1(0xab)];break;case _0x11e6a1(0xc5):_0x229557=buildItemsFromLayer(_0x1bfbc8[_0x11e6a1(0xc4)],'project'),_0x2d2b14=_0x1bfbc8[_0x11e6a1(0xb2)];break;default:_0x229557=buildMergedItems(_0x105de9,_0x1bfbc8);break;}enrichAppListItemsWithMergedSelection(_0x229557,_0x731854[_0x11e6a1(0xaa)]);if(_0x229557[_0x11e6a1(0xa5)]===0x0){const _0x1b997a=_0x572db0===_0x11e6a1(0xbc)?'':_0x11e6a1(0xb7)+_0x572db0+'\x20config';return{'ok':!![],'data':[],'message':_0x11e6a1(0xb1)+_0x1b997a+_0x11e6a1(0xc8)+CLI_BIN_NAME+_0x11e6a1(0xa1)};}const _0x380559=_0x229557[_0x11e6a1(0xc6)](_0x1e8aaa=>_0x1e8aaa['isCurrent']===!![]),_0x291fa3=_0x308f85??_0x380559?.[_0x11e6a1(0xc3)]??null,_0xe33ade=_0x572db0===_0x11e6a1(0xbc)?{'globalPath':_0x1bfbc8[_0x11e6a1(0xab)]??null,'projectPath':_0x1bfbc8[_0x11e6a1(0xb2)]??null,'defaultApp':_0x291fa3,'defaultAppSource':_0x308f85!=null?_0x5a6a4:null}:{'scope':_0x572db0,'configPath':_0x2d2b14??null};return{'ok':!![],'data':{'items':_0x229557,'meta':_0xe33ade}};}export const appListDefinition={'service':a20_0x5f1045(0xcb),'command':a20_0x5f1045(0xad),'description':a20_0x5f1045(0xa2),'risk':a20_0x5f1045(0xa0),'auth':a20_0x5f1045(0xae),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x5f1045(0xbb),'type':a20_0x5f1045(0xc2),'description':a20_0x5f1045(0xa8),'default':![]},{'name':'global','type':a20_0x5f1045(0xc2),'description':a20_0x5f1045(0xb8),'default':![]},{'name':a20_0x5f1045(0xc5),'type':'boolean','description':a20_0x5f1045(0xa9),'default':![]}],async 'validate'(_0x435219){validateAppListFlags(_0x435219);},'execute':execute};
@@ -1 +1 @@
1
- const a21_0x58f9d0=a21_0x3b06;function a21_0x2f46(){const _0x5f1ac8=['length','Found\x20','396qCOLZm','170394fWbVJL','appCode','3722140mAgjKY','271355wHKcQB','members-list','List\x20application\x20members\x20with\x20their\x20role\x20memberships','150yXMsbP','\x20application\x20member(s)','4ToBGqG','2OojhkQ','3975900TmkEfD','1083431XPzRvN','read','22053328mTFDKW','110784liaqPy'];a21_0x2f46=function(){return _0x5f1ac8;};return a21_0x2f46();}function a21_0x3b06(_0x254872,_0x5d37c7){_0x254872=_0x254872-0x16d;const _0x2f46e3=a21_0x2f46();let _0x3b061f=_0x2f46e3[_0x254872];return _0x3b061f;}(function(_0x61b64f,_0x2be280){const _0x493bda=a21_0x3b06,_0x37e3d5=_0x61b64f();while(!![]){try{const _0x47f72c=-parseInt(_0x493bda(0x172))/0x1*(-parseInt(_0x493bda(0x170))/0x2)+parseInt(_0x493bda(0x179))/0x3+parseInt(_0x493bda(0x16f))/0x4*(parseInt(_0x493bda(0x17b))/0x5)+parseInt(_0x493bda(0x16d))/0x6*(parseInt(_0x493bda(0x17c))/0x7)+-parseInt(_0x493bda(0x175))/0x8*(parseInt(_0x493bda(0x178))/0x9)+parseInt(_0x493bda(0x171))/0xa+-parseInt(_0x493bda(0x174))/0xb;if(_0x47f72c===_0x2be280)break;else _0x37e3d5['push'](_0x37e3d5['shift']());}catch(_0x37537b){_0x37e3d5['push'](_0x37e3d5['shift']());}}}(a21_0x2f46,0x9b91c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':'app','command':a21_0x58f9d0(0x17d),'description':a21_0x58f9d0(0x17e),'risk':a21_0x58f9d0(0x173),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x750b02){const _0x5254b0=a21_0x58f9d0,_0x21b941=projectAppMembers(await listRoleUsers(_0x750b02[_0x5254b0(0x17a)]));return{'ok':!![],'data':{'appCode':_0x750b02[_0x5254b0(0x17a)],'items':_0x21b941,'totalCount':_0x21b941[_0x5254b0(0x176)]},'message':_0x5254b0(0x177)+_0x21b941[_0x5254b0(0x176)]+_0x5254b0(0x16e)};}};
1
+ function a21_0x42d1(_0x4f2a42,_0x1024d3){_0x4f2a42=_0x4f2a42-0x1bf;const _0x390bcc=a21_0x390b();let _0x42d182=_0x390bcc[_0x4f2a42];return _0x42d182;}const a21_0x5409fa=a21_0x42d1;function a21_0x390b(){const _0x4529fa=['19700EQIwYy','read','6877464FZQplJ','1624022jbwpRF','7448058piOGIh','\x20application\x20member(s)','5VsTUwW','members-list','310865TQoeOA','3LkcmAU','List\x20application\x20members\x20with\x20their\x20role\x20memberships','1760872nkXQcv','48twscyS','1672XZDgZR','appCode','3479gnadzP','6219wrjDIC','Found\x20','length'];a21_0x390b=function(){return _0x4529fa;};return a21_0x390b();}(function(_0x2bd0b2,_0x9c8f33){const _0x151a11=a21_0x42d1,_0x1c865f=_0x2bd0b2();while(!![]){try{const _0xe06ca9=parseInt(_0x151a11(0x1d1))/0x1+parseInt(_0x151a11(0x1cc))/0x2*(parseInt(_0x151a11(0x1bf))/0x3)+-parseInt(_0x151a11(0x1c1))/0x4+parseInt(_0x151a11(0x1cf))/0x5*(parseInt(_0x151a11(0x1cd))/0x6)+parseInt(_0x151a11(0x1c5))/0x7*(parseInt(_0x151a11(0x1c3))/0x8)+parseInt(_0x151a11(0x1c6))/0x9*(parseInt(_0x151a11(0x1c9))/0xa)+parseInt(_0x151a11(0x1cb))/0xb*(-parseInt(_0x151a11(0x1c2))/0xc);if(_0xe06ca9===_0x9c8f33)break;else _0x1c865f['push'](_0x1c865f['shift']());}catch(_0xcdfb8e){_0x1c865f['push'](_0x1c865f['shift']());}}}(a21_0x390b,0xd8db8));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_0x5409fa(0x1d0),'description':a21_0x5409fa(0x1c0),'risk':a21_0x5409fa(0x1ca),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x55b6b4){const _0x8fb5ee=a21_0x5409fa,_0x5e9dc7=projectAppMembers(await listRoleUsers(_0x55b6b4[_0x8fb5ee(0x1c4)]));return{'ok':!![],'data':{'appCode':_0x55b6b4[_0x8fb5ee(0x1c4)],'items':_0x5e9dc7,'totalCount':_0x5e9dc7[_0x8fb5ee(0x1c8)]},'message':_0x8fb5ee(0x1c7)+_0x5e9dc7[_0x8fb5ee(0x1c8)]+_0x8fb5ee(0x1ce)};}};
@@ -1 +1 @@
1
- function a22_0x6e3f(_0x1ce409,_0x52c5f4){_0x1ce409=_0x1ce409-0x14c;const _0x540998=a22_0x5409();let _0x6e3ffb=_0x540998[_0x1ce409];return _0x6e3ffb;}(function(_0x3e08ef,_0x30fc75){const _0x29601e=a22_0x6e3f,_0x16732c=_0x3e08ef();while(!![]){try{const _0x37b6eb=parseInt(_0x29601e(0x14c))/0x1*(parseInt(_0x29601e(0x156))/0x2)+parseInt(_0x29601e(0x154))/0x3*(-parseInt(_0x29601e(0x14f))/0x4)+parseInt(_0x29601e(0x15d))/0x5*(parseInt(_0x29601e(0x159))/0x6)+parseInt(_0x29601e(0x151))/0x7*(parseInt(_0x29601e(0x153))/0x8)+-parseInt(_0x29601e(0x157))/0x9*(parseInt(_0x29601e(0x14d))/0xa)+-parseInt(_0x29601e(0x14e))/0xb+parseInt(_0x29601e(0x15c))/0xc*(parseInt(_0x29601e(0x15b))/0xd);if(_0x37b6eb===_0x30fc75)break;else _0x16732c['push'](_0x16732c['shift']());}catch(_0x186aa8){_0x16732c['push'](_0x16732c['shift']());}}}(a22_0x5409,0x997b6));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x4ddb81){const _0x1fdbc6=a22_0x6e3f,_0x1ba2eb=_0x4ddb81[_0x1fdbc6(0x150)]||getCookie();if(!_0x1ba2eb)throw CliErrors[_0x1fdbc6(0x158)]();return _0x1ba2eb;}function a22_0x5409(){const _0x4faf33=['map','7022oNFItN','99891UhBdia','authRequired','35022TsuHYk','appName','519311eFIbwB','420bVlnoc','355lSArNq','platform','24ZIDZJQ','390ThVZdV','10234389OVefNO','147356UIbnrS','cookie','7QXonVy','appDesc','3413096XzMDfV','27oQdhmb'];a22_0x5409=function(){return _0x4faf33;};return a22_0x5409();}export async function listRemoteAppDirectory(_0x119fbb){const _0x2d1929=a22_0x6e3f,_0x430885=await withActiveCookie(resolveCookie(_0x119fbb),()=>listRemoteApps());return{'items':_0x430885[_0x2d1929(0x155)](_0x20a0f2=>({..._0x20a0f2['id']!=null?{'id':_0x20a0f2['id']}:{},'appCode':_0x20a0f2['appCode'],'appName':_0x20a0f2[_0x2d1929(0x15a)],..._0x20a0f2[_0x2d1929(0x152)]!=null?{'appDesc':_0x20a0f2['appDesc']}:{}})),'meta':{'source':_0x2d1929(0x15e)}};}
1
+ function a22_0x44b2(_0x45365e,_0x2786ce){_0x45365e=_0x45365e-0x12d;const _0x1e6c92=a22_0x1e6c();let _0x44b25d=_0x1e6c92[_0x45365e];return _0x44b25d;}(function(_0x2b4f36,_0x3f6787){const _0x378459=a22_0x44b2,_0x34e7e7=_0x2b4f36();while(!![]){try{const _0x3d9747=-parseInt(_0x378459(0x135))/0x1*(parseInt(_0x378459(0x130))/0x2)+-parseInt(_0x378459(0x13c))/0x3*(parseInt(_0x378459(0x140))/0x4)+parseInt(_0x378459(0x13a))/0x5*(-parseInt(_0x378459(0x136))/0x6)+parseInt(_0x378459(0x141))/0x7*(parseInt(_0x378459(0x13b))/0x8)+parseInt(_0x378459(0x13d))/0x9*(-parseInt(_0x378459(0x134))/0xa)+parseInt(_0x378459(0x12d))/0xb*(parseInt(_0x378459(0x12f))/0xc)+parseInt(_0x378459(0x13e))/0xd*(parseInt(_0x378459(0x12e))/0xe);if(_0x3d9747===_0x3f6787)break;else _0x34e7e7['push'](_0x34e7e7['shift']());}catch(_0x16ba3c){_0x34e7e7['push'](_0x34e7e7['shift']());}}}(a22_0x1e6c,0x80987));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a22_0x1e6c(){const _0x4c3713=['authRequired','2119595acwvwT','24yWVntL','1872879lOXMLb','54OfecIG','10327057OEsKdg','appName','4JMGMWc','1623097GAKEgV','11TsGHmB','42KAiFGP','6040044TfbJMP','2twUWNC','appCode','platform','appDesc','1114700QdoLvU','914439qSBWMn','12iwsOQR','map','cookie'];a22_0x1e6c=function(){return _0x4c3713;};return a22_0x1e6c();}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x1bf366){const _0x5c56c5=a22_0x44b2,_0xc48306=_0x1bf366[_0x5c56c5(0x138)]||getCookie();if(!_0xc48306)throw CliErrors[_0x5c56c5(0x139)]();return _0xc48306;}export async function listRemoteAppDirectory(_0x40a6d4){const _0x8a199d=a22_0x44b2,_0x23ee05=await withActiveCookie(resolveCookie(_0x40a6d4),()=>listRemoteApps());return{'items':_0x23ee05[_0x8a199d(0x137)](_0x5bf9d1=>({..._0x5bf9d1['id']!=null?{'id':_0x5bf9d1['id']}:{},'appCode':_0x5bf9d1[_0x8a199d(0x131)],'appName':_0x5bf9d1[_0x8a199d(0x13f)],..._0x5bf9d1[_0x8a199d(0x133)]!=null?{'appDesc':_0x5bf9d1['appDesc']}:{}})),'meta':{'source':_0x8a199d(0x132)}};}
@@ -1 +1 @@
1
- (function(_0x4b26a8,_0x1846eb){const _0xb89686=a23_0x26f2,_0x2b9306=_0x4b26a8();while(!![]){try{const _0x41ad84=parseInt(_0xb89686(0x85))/0x1*(parseInt(_0xb89686(0x71))/0x2)+-parseInt(_0xb89686(0xa1))/0x3+-parseInt(_0xb89686(0xa2))/0x4*(-parseInt(_0xb89686(0x9b))/0x5)+-parseInt(_0xb89686(0x86))/0x6*(parseInt(_0xb89686(0x88))/0x7)+parseInt(_0xb89686(0x8e))/0x8*(-parseInt(_0xb89686(0x6e))/0x9)+-parseInt(_0xb89686(0x9d))/0xa*(-parseInt(_0xb89686(0x7e))/0xb)+parseInt(_0xb89686(0x94))/0xc;if(_0x41ad84===_0x1846eb)break;else _0x2b9306['push'](_0x2b9306['shift']());}catch(_0x1acd29){_0x2b9306['push'](_0x2b9306['shift']());}}}(a23_0x444d,0xc7119));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x4423ab){const _0x2910ef=_0x4423ab?.['trim']();return _0x2910ef?_0x2910ef:null;}export function projectAppMembers(_0x3ba5c6){const _0x58ee17=a23_0x26f2,_0x10b885=new Map(),_0x15115c=[..._0x3ba5c6][_0x58ee17(0x99)]((_0x1fecc2,_0x148fc5)=>_0x1fecc2['id']-_0x148fc5['id']),_0x58ac70=(_0x13dbab,_0x10ac97,_0x3ddd79)=>{const _0x57e640=_0x58ee17;for(const _0x102f3d of _0x10ac97){const _0x4f1449=Number(_0x102f3d[_0x57e640(0x7b)]);if(!Number[_0x57e640(0x8d)](_0x4f1449)||_0x4f1449<=0x0)continue;let _0x40ac92=_0x10b885[_0x57e640(0xa0)](_0x4f1449);if(!_0x40ac92)_0x40ac92={'userId':_0x4f1449,'username':nullableText(_0x102f3d[_0x57e640(0x7d)]),'displayName':nullableText(_0x102f3d[_0x57e640(0x80)]),'status':_0x3ddd79,'roles':[],'roleKeys':new Set()},_0x10b885['set'](_0x4f1449,_0x40ac92);else{_0x40ac92['username']??=nullableText(_0x102f3d[_0x57e640(0x7d)]),_0x40ac92[_0x57e640(0x89)]??=nullableText(_0x102f3d['nickname']);if(_0x3ddd79==='ACTIVE')_0x40ac92[_0x57e640(0x75)]='ACTIVE';}const _0xaffd34=_0x13dbab['id']+':'+_0x3ddd79;if(_0x40ac92[_0x57e640(0x7f)][_0x57e640(0x73)](_0xaffd34))continue;_0x40ac92['roleKeys'][_0x57e640(0x9e)](_0xaffd34),_0x40ac92[_0x57e640(0x8a)][_0x57e640(0x91)]({'roleId':_0x13dbab['id'],'roleName':nullableText(_0x13dbab['roleName']),'roleType':nullableText(_0x13dbab['roleType']),'membershipStatus':_0x3ddd79});}};for(const _0x58c1b5 of _0x15115c){_0x58ac70(_0x58c1b5,_0x58c1b5[_0x58ee17(0x87)]??[],_0x58ee17(0x9c)),_0x58ac70(_0x58c1b5,_0x58c1b5[_0x58ee17(0x7c)]??[],_0x58ee17(0x93));}return[..._0x10b885['values']()][_0x58ee17(0x84)](_0x18a2b4=>({'userId':_0x18a2b4[_0x58ee17(0x7b)],'username':_0x18a2b4['username'],'displayName':_0x18a2b4[_0x58ee17(0x89)],'status':_0x18a2b4[_0x58ee17(0x75)],'roles':_0x18a2b4[_0x58ee17(0x8a)][_0x58ee17(0x99)]((_0x4be45f,_0x40eb92)=>_0x4be45f[_0x58ee17(0x96)]-_0x40eb92[_0x58ee17(0x96)]||(_0x4be45f[_0x58ee17(0x7a)]===_0x40eb92['membershipStatus']?0x0:_0x4be45f[_0x58ee17(0x7a)]===_0x58ee17(0x9c)?-0x1:0x1))}))[_0x58ee17(0x99)]((_0x2ea9ef,_0x139a46)=>_0x2ea9ef['userId']-_0x139a46[_0x58ee17(0x7b)]);}export function enrichAppListItemsWithMergedSelection(_0x335536,_0xc4af62){const _0x144a7b=a23_0x26f2;if(!_0xc4af62)return;const _0x35153c=_0xc4af62[_0x144a7b(0x83)]&&typeof _0xc4af62[_0x144a7b(0x83)]===_0x144a7b(0x8b)?_0xc4af62[_0x144a7b(0x83)]:{},_0x659403=Object[_0x144a7b(0x8f)](_0x35153c)[_0x144a7b(0x82)]>0x0;for(const _0x5f5a38 of _0x335536){_0x5f5a38[_0x144a7b(0x72)]=![];}const _0x3ff716=_0xc4af62[_0x144a7b(0x6f)]!=null?String(_0xc4af62['appCode'])[_0x144a7b(0x9f)]():'';if(_0x659403){const _0x4f9b66=_0xc4af62[_0x144a7b(0x92)]??_0xc4af62[_0x144a7b(0x98)];if(_0x4f9b66)for(const _0x4dc2c4 of _0x335536){_0x4dc2c4[_0x144a7b(0x90)]===!![]&&_0x4dc2c4[_0x144a7b(0x76)]===_0x4f9b66&&(_0x4dc2c4[_0x144a7b(0x72)]=!![]);}for(const _0x40a837 of _0x335536){if(_0x40a837[_0x144a7b(0x90)]!==![])continue;if(_0xc4af62[_0x144a7b(0x98)])continue;_0x3ff716&&String(_0x40a837[_0x144a7b(0x79)]??'')[_0x144a7b(0x9f)]()===_0x3ff716&&(_0x40a837['isCurrent']=!![]);}return;}if(!_0x3ff716)return;for(const _0x4d85b9 of _0x335536){String(_0x4d85b9[_0x144a7b(0x79)]??'')[_0x144a7b(0x9f)]()===_0x3ff716&&(_0x4d85b9[_0x144a7b(0x72)]=!![]);}}export function resolveAppScopeForWrite(_0x3f481f,_0x205d73,_0x29f92e){const _0xc680a5=a23_0x26f2;if(_0x205d73)return _0xc680a5(0x81);const _0x1760a0=_0x29f92e[_0xc680a5(0x77)][_0xc680a5(0x83)]&&typeof _0x29f92e[_0xc680a5(0x77)][_0xc680a5(0x83)]==='object'?_0x29f92e[_0xc680a5(0x77)][_0xc680a5(0x83)]:{},_0x5f371d=_0x29f92e[_0xc680a5(0x8c)][_0xc680a5(0x83)]&&typeof _0x29f92e['globalConfig'][_0xc680a5(0x83)]===_0xc680a5(0x8b)?_0x29f92e[_0xc680a5(0x8c)][_0xc680a5(0x83)]:{};if(Object[_0xc680a5(0x9a)][_0xc680a5(0x97)][_0xc680a5(0x78)](_0x1760a0,_0x3f481f))return _0xc680a5(0x70);if(Object['prototype']['hasOwnProperty'][_0xc680a5(0x78)](_0x5f371d,_0x3f481f))return _0xc680a5(0x81);return _0xc680a5(0x70);}export function appDefinedIn(_0xcef202,_0x33c3a2,_0x267ec7){const _0x59e8a9=a23_0x26f2,_0xea9ffe=Object[_0x59e8a9(0x9a)]['hasOwnProperty'][_0x59e8a9(0x78)](_0x33c3a2,_0xcef202),_0x4c5dce=Object[_0x59e8a9(0x9a)][_0x59e8a9(0x97)][_0x59e8a9(0x78)](_0x267ec7,_0xcef202);if(_0xea9ffe&&_0x4c5dce)return _0x59e8a9(0x95);if(_0x4c5dce)return _0x59e8a9(0x70);return _0x59e8a9(0x81);}function a23_0x444d(){const _0x2ca159=['has','\x20(global)','status','name','projectConfig','call','appcode','membershipStatus','userId','applyUserList','username','18205Facowb','roleKeys','nickname','global','length','apps','map','4OQeroE','786eautnp','userList','71386aixtOi','displayName','roles','object','globalConfig','isFinite','152wwXujB','keys','named','push','currentApp','PENDING','7947096zznpfc','both','roleId','hasOwnProperty','defaultApp','sort','prototype','5OIDtwV','ACTIVE','4210IOMqjh','add','trim','get','2422740FsRVzw','5498396lFGmfY','130851sXQFPQ','appCode','project','250766QFkNFq','isCurrent'];a23_0x444d=function(){return _0x2ca159;};return a23_0x444d();}export function resolveDefaultAppSource(_0x3bdfbb){const _0x2296e3=a23_0x26f2,_0x7b08c1=_0x3bdfbb[_0x2296e3(0x77)][_0x2296e3(0x83)]&&typeof _0x3bdfbb[_0x2296e3(0x77)][_0x2296e3(0x83)]==='object'?_0x3bdfbb[_0x2296e3(0x77)]['apps']:{};if(_0x2296e3(0x98)in _0x3bdfbb[_0x2296e3(0x77)])return _0x2296e3(0x70);if(Object[_0x2296e3(0x8f)](_0x7b08c1)[_0x2296e3(0x82)]>0x0)return _0x2296e3(0x70);if(Object['keys'](_0x3bdfbb[_0x2296e3(0x77)])[_0x2296e3(0x82)]===0x0&&_0x3bdfbb['globalConfig'][_0x2296e3(0x98)])return _0x2296e3(0x81);return null;}export function getConfigPath(_0x5d73ad={}){const _0x23c4e2=a23_0x26f2,_0x4624b1=_0x5d73ad[_0x23c4e2(0x81)]?_0x23c4e2(0x81):'project';return resolveWriteConfigPath(_0x4624b1);}function a23_0x26f2(_0x475765,_0x54516b){_0x475765=_0x475765-0x6e;const _0x444d49=a23_0x444d();let _0x26f2d2=_0x444d49[_0x475765];return _0x26f2d2;}export function readConfig(_0x20d859={}){return readConfigFile(getConfigPath(_0x20d859));}export function writeConfig(_0x48e382,_0x3b0010={}){writeConfigFile(getConfigPath(_0x3b0010),_0x48e382);}export function scopeLabel(_0x3508f8){const _0x941c7=a23_0x26f2;return _0x3508f8[_0x941c7(0x81)]?_0x941c7(0x74):'';}
1
+ (function(_0x245425,_0x262b56){const _0xc6a1fe=a23_0x1ac2,_0x570752=_0x245425();while(!![]){try{const _0x53254=-parseInt(_0xc6a1fe(0x82))/0x1*(-parseInt(_0xc6a1fe(0x7e))/0x2)+parseInt(_0xc6a1fe(0x96))/0x3*(-parseInt(_0xc6a1fe(0x81))/0x4)+-parseInt(_0xc6a1fe(0x7c))/0x5+parseInt(_0xc6a1fe(0x80))/0x6+parseInt(_0xc6a1fe(0x72))/0x7+parseInt(_0xc6a1fe(0x94))/0x8*(parseInt(_0xc6a1fe(0x92))/0x9)+-parseInt(_0xc6a1fe(0x8a))/0xa*(parseInt(_0xc6a1fe(0x75))/0xb);if(_0x53254===_0x262b56)break;else _0x570752['push'](_0x570752['shift']());}catch(_0x23e088){_0x570752['push'](_0x570752['shift']());}}}(a23_0x40a3,0xea688));function a23_0x1ac2(_0x7f5d51,_0x5c0550){_0x7f5d51=_0x7f5d51-0x6f;const _0x40a3fd=a23_0x40a3();let _0x1ac253=_0x40a3fd[_0x7f5d51];return _0x1ac253;}function a23_0x40a3(){const _0x2daeb6=['appcode','apps','nickname','call','defaultApp','ACTIVE','projectConfig','12960143oMiHoN','sort','globalConfig','33yCTcFP','global','username','displayName','roleKeys','isCurrent','membershipStatus','8900835aFzfFk','roleType','26bujXiZ','both','9713904reXcQu','4975244rnAMOU','82662uiSnTL','status','named','values','has','length','add','roleId','5528590TVrwci','isFinite','project','hasOwnProperty','object','set','trim','prototype','240948XZJNgZ','appCode','328DPPblX','keys','3STeijA','userId','roles'];a23_0x40a3=function(){return _0x2daeb6;};return a23_0x40a3();}import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x1fc0c3){const _0x135dcf=a23_0x1ac2,_0x3c9641=_0x1fc0c3?.[_0x135dcf(0x90)]();return _0x3c9641?_0x3c9641:null;}export function projectAppMembers(_0x1e6ab7){const _0x31e5dc=a23_0x1ac2,_0x28b40f=new Map(),_0x5b6704=[..._0x1e6ab7][_0x31e5dc(0x73)]((_0x16e579,_0x13c796)=>_0x16e579['id']-_0x13c796['id']),_0x41c527=(_0x52ef83,_0x1993e6,_0x32f327)=>{const _0x2b8b63=_0x31e5dc;for(const _0x1e12e2 of _0x1993e6){const _0x2bd523=Number(_0x1e12e2[_0x2b8b63(0x97)]);if(!Number[_0x2b8b63(0x8b)](_0x2bd523)||_0x2bd523<=0x0)continue;let _0x5f128c=_0x28b40f['get'](_0x2bd523);if(!_0x5f128c)_0x5f128c={'userId':_0x2bd523,'username':nullableText(_0x1e12e2[_0x2b8b63(0x77)]),'displayName':nullableText(_0x1e12e2[_0x2b8b63(0x9b)]),'status':_0x32f327,'roles':[],'roleKeys':new Set()},_0x28b40f[_0x2b8b63(0x8f)](_0x2bd523,_0x5f128c);else{_0x5f128c[_0x2b8b63(0x77)]??=nullableText(_0x1e12e2['username']),_0x5f128c[_0x2b8b63(0x78)]??=nullableText(_0x1e12e2[_0x2b8b63(0x9b)]);if(_0x32f327===_0x2b8b63(0x70))_0x5f128c[_0x2b8b63(0x83)]=_0x2b8b63(0x70);}const _0x5d0d87=_0x52ef83['id']+':'+_0x32f327;if(_0x5f128c['roleKeys'][_0x2b8b63(0x86)](_0x5d0d87))continue;_0x5f128c[_0x2b8b63(0x79)][_0x2b8b63(0x88)](_0x5d0d87),_0x5f128c[_0x2b8b63(0x98)]['push']({'roleId':_0x52ef83['id'],'roleName':nullableText(_0x52ef83['roleName']),'roleType':nullableText(_0x52ef83[_0x2b8b63(0x7d)]),'membershipStatus':_0x32f327});}};for(const _0x578615 of _0x5b6704){_0x41c527(_0x578615,_0x578615['userList']??[],_0x31e5dc(0x70)),_0x41c527(_0x578615,_0x578615['applyUserList']??[],'PENDING');}return[..._0x28b40f[_0x31e5dc(0x85)]()]['map'](_0x18d520=>({'userId':_0x18d520[_0x31e5dc(0x97)],'username':_0x18d520['username'],'displayName':_0x18d520['displayName'],'status':_0x18d520[_0x31e5dc(0x83)],'roles':_0x18d520[_0x31e5dc(0x98)][_0x31e5dc(0x73)]((_0x4fb042,_0x403a48)=>_0x4fb042[_0x31e5dc(0x89)]-_0x403a48['roleId']||(_0x4fb042[_0x31e5dc(0x7b)]===_0x403a48['membershipStatus']?0x0:_0x4fb042['membershipStatus']==='ACTIVE'?-0x1:0x1))}))[_0x31e5dc(0x73)]((_0x733fbe,_0x24a770)=>_0x733fbe[_0x31e5dc(0x97)]-_0x24a770[_0x31e5dc(0x97)]);}export function enrichAppListItemsWithMergedSelection(_0x1240fe,_0x5a7e87){const _0x2461da=a23_0x1ac2;if(!_0x5a7e87)return;const _0x3dcb50=_0x5a7e87[_0x2461da(0x9a)]&&typeof _0x5a7e87['apps']==='object'?_0x5a7e87[_0x2461da(0x9a)]:{},_0x3a9a80=Object[_0x2461da(0x95)](_0x3dcb50)[_0x2461da(0x87)]>0x0;for(const _0x36e114 of _0x1240fe){_0x36e114['isCurrent']=![];}const _0x4932d3=_0x5a7e87[_0x2461da(0x93)]!=null?String(_0x5a7e87[_0x2461da(0x93)])[_0x2461da(0x90)]():'';if(_0x3a9a80){const _0x11e8a0=_0x5a7e87['currentApp']??_0x5a7e87[_0x2461da(0x6f)];if(_0x11e8a0)for(const _0x2fd393 of _0x1240fe){_0x2fd393[_0x2461da(0x84)]===!![]&&_0x2fd393['name']===_0x11e8a0&&(_0x2fd393['isCurrent']=!![]);}for(const _0x2b129d of _0x1240fe){if(_0x2b129d[_0x2461da(0x84)]!==![])continue;if(_0x5a7e87[_0x2461da(0x6f)])continue;_0x4932d3&&String(_0x2b129d[_0x2461da(0x99)]??'')[_0x2461da(0x90)]()===_0x4932d3&&(_0x2b129d[_0x2461da(0x7a)]=!![]);}return;}if(!_0x4932d3)return;for(const _0x19f59e of _0x1240fe){String(_0x19f59e[_0x2461da(0x99)]??'')[_0x2461da(0x90)]()===_0x4932d3&&(_0x19f59e[_0x2461da(0x7a)]=!![]);}}export function resolveAppScopeForWrite(_0x1a2814,_0x307f24,_0x404dc0){const _0x24a08d=a23_0x1ac2;if(_0x307f24)return _0x24a08d(0x76);const _0x38e85a=_0x404dc0[_0x24a08d(0x71)][_0x24a08d(0x9a)]&&typeof _0x404dc0[_0x24a08d(0x71)][_0x24a08d(0x9a)]===_0x24a08d(0x8e)?_0x404dc0[_0x24a08d(0x71)][_0x24a08d(0x9a)]:{},_0x20fd0e=_0x404dc0['globalConfig'][_0x24a08d(0x9a)]&&typeof _0x404dc0['globalConfig'][_0x24a08d(0x9a)]==='object'?_0x404dc0[_0x24a08d(0x74)][_0x24a08d(0x9a)]:{};if(Object[_0x24a08d(0x91)]['hasOwnProperty'][_0x24a08d(0x9c)](_0x38e85a,_0x1a2814))return'project';if(Object['prototype'][_0x24a08d(0x8d)][_0x24a08d(0x9c)](_0x20fd0e,_0x1a2814))return _0x24a08d(0x76);return _0x24a08d(0x8c);}export function appDefinedIn(_0x4fb4dd,_0xfa6ffe,_0x133157){const _0x43a2aa=a23_0x1ac2,_0x38c054=Object['prototype']['hasOwnProperty'][_0x43a2aa(0x9c)](_0xfa6ffe,_0x4fb4dd),_0x5bbc19=Object['prototype'][_0x43a2aa(0x8d)]['call'](_0x133157,_0x4fb4dd);if(_0x38c054&&_0x5bbc19)return _0x43a2aa(0x7f);if(_0x5bbc19)return _0x43a2aa(0x8c);return _0x43a2aa(0x76);}export function resolveDefaultAppSource(_0x503cf6){const _0xf0e8bb=a23_0x1ac2,_0x4881e6=_0x503cf6[_0xf0e8bb(0x71)][_0xf0e8bb(0x9a)]&&typeof _0x503cf6[_0xf0e8bb(0x71)][_0xf0e8bb(0x9a)]===_0xf0e8bb(0x8e)?_0x503cf6[_0xf0e8bb(0x71)][_0xf0e8bb(0x9a)]:{};if(_0xf0e8bb(0x6f)in _0x503cf6['projectConfig'])return _0xf0e8bb(0x8c);if(Object[_0xf0e8bb(0x95)](_0x4881e6)[_0xf0e8bb(0x87)]>0x0)return'project';if(Object[_0xf0e8bb(0x95)](_0x503cf6[_0xf0e8bb(0x71)])[_0xf0e8bb(0x87)]===0x0&&_0x503cf6[_0xf0e8bb(0x74)][_0xf0e8bb(0x6f)])return _0xf0e8bb(0x76);return null;}export function getConfigPath(_0x5ae3c1={}){const _0x5e149d=a23_0x1ac2,_0x665a75=_0x5ae3c1['global']?'global':_0x5e149d(0x8c);return resolveWriteConfigPath(_0x665a75);}export function readConfig(_0x1ca1d9={}){return readConfigFile(getConfigPath(_0x1ca1d9));}export function writeConfig(_0x2e6f47,_0x51a7f0={}){writeConfigFile(getConfigPath(_0x51a7f0),_0x2e6f47);}export function scopeLabel(_0x25f346){return _0x25f346['global']?'\x20(global)':'';}
@@ -1 +1 @@
1
- function a24_0x5b0b(_0x2854f4,_0x29333d){_0x2854f4=_0x2854f4-0x192;const _0x15931c=a24_0x1593();let _0x5b0b9b=_0x15931c[_0x2854f4];return _0x5b0b9b;}const a24_0x3d21f5=a24_0x5b0b;(function(_0x128cd9,_0x28e348){const _0x5981ba=a24_0x5b0b,_0x4a8416=_0x128cd9();while(!![]){try{const _0xb1d66c=parseInt(_0x5981ba(0x197))/0x1+parseInt(_0x5981ba(0x196))/0x2+parseInt(_0x5981ba(0x1a3))/0x3*(-parseInt(_0x5981ba(0x19a))/0x4)+-parseInt(_0x5981ba(0x192))/0x5+parseInt(_0x5981ba(0x194))/0x6+parseInt(_0x5981ba(0x19f))/0x7+parseInt(_0x5981ba(0x1a0))/0x8*(-parseInt(_0x5981ba(0x1a1))/0x9);if(_0xb1d66c===_0x28e348)break;else _0x4a8416['push'](_0x4a8416['shift']());}catch(_0x5765fb){_0x4a8416['push'](_0x4a8416['shift']());}}}(a24_0x1593,0x21159));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH='/smartapi/app-config/delete';export const appConfigDelete={'service':'app-config','command':a24_0x3d21f5(0x195),'description':a24_0x3d21f5(0x1a5),'risk':a24_0x3d21f5(0x19b),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0xc8b55a){readKeyArg(_0xc8b55a);},async 'dryRun'(_0x41251d){const _0x1c415d=a24_0x3d21f5,_0x395f11=readKeyArg(_0x41251d),_0x396af3=await mustGetByKey(_0x41251d[_0x1c415d(0x19d)],_0x395f11);return asAppConfigDryRunResult(buildMutationData({'operation':_0x1c415d(0x195),'appCode':_0x41251d[_0x1c415d(0x19d)],'key':_0x395f11,'before':projectAppConfig(_0x396af3),'after':null,'dryRun':!![]}),{'method':_0x1c415d(0x1a6),'url':DELETE_PATH});},async 'execute'(_0x3715c7){const _0x516c26=a24_0x3d21f5,_0x2e4275=readKeyArg(_0x3715c7),_0x1e3e0e=await mustGetByKey(_0x3715c7[_0x516c26(0x19d)],_0x2e4275);return await withAppConfigApiBoundary(_0x516c26(0x195),{'appCode':_0x3715c7[_0x516c26(0x19d)],'key':_0x2e4275},()=>deleteAppConfig({'appCode':_0x3715c7['appCode'],'id':requireAppConfigId(_0x1e3e0e,_0x2e4275,_0x3715c7[_0x516c26(0x19d)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x3715c7['appCode'],'key':_0x2e4275,'before':projectAppConfig(_0x1e3e0e),'after':null,'dryRun':![]}),'message':_0x516c26(0x198)+_0x2e4275};}};function a24_0x1593(){const _0x4708c9=['745388BohJLp','568NsVgKf','25821zxAlTV','App\x20config\x20key\x20not\x20found:\x20','9OktaOS','isFinite','Delete\x20one\x20runtime\x20app-config\x20key','POST','841380CefRjD',',\x20appCode=','972258JxLMDZ','delete','361192Kdvzlg','92199PtGZWd','Deleted\x20app\x20config\x20','validation','45112vVUatQ','high-risk-write','apiError','appCode','get'];a24_0x1593=function(){return _0x4708c9;};return a24_0x1593();}async function mustGetByKey(_0x434155,_0x1307cf){const _0x1c8d98=a24_0x3d21f5,_0x5c03c1=await withAppConfigApiBoundary(_0x1c8d98(0x19e),{'appCode':_0x434155,'key':_0x1307cf},()=>getAppConfigByKey(_0x434155,_0x1307cf));if(!_0x5c03c1)throw CliErrors[_0x1c8d98(0x199)](_0x1c8d98(0x1a2)+_0x1307cf,'appCode:\x20'+_0x434155);return _0x5c03c1;}function requireAppConfigId(_0x5179b0,_0x714b0b,_0x2daa9c){const _0xd579c8=a24_0x3d21f5;if(typeof _0x5179b0['id']==='number'&&Number[_0xd579c8(0x1a4)](_0x5179b0['id'])&&_0x5179b0['id']>0x0)return _0x5179b0['id'];throw CliErrors[_0xd579c8(0x19c)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x714b0b+_0xd579c8(0x193)+_0x2daa9c);}
1
+ function a24_0x1ae9(){const _0x4b9a76=['4024808bLLcvv','/smartapi/app-config/delete','app-config','848700KhyAzO','high-risk-write','get','isFinite','Delete\x20one\x20runtime\x20app-config\x20key','App\x20config\x20key\x20not\x20found:\x20','1064144sfUhFA','1625396XtiuTe','5465950azEWEV','appCode','9754587XdCeAT','number','delete','1048719WjTrdU','5arXefE','Deleted\x20app\x20config\x20','App\x20config\x20server\x20id\x20missing\x20for\x20key=','2yMnKdw','appCode:\x20','validation','apiError',',\x20appCode='];a24_0x1ae9=function(){return _0x4b9a76;};return a24_0x1ae9();}const a24_0x24b412=a24_0x5801;(function(_0x5a3c41,_0x404f24){const _0x5e4712=a24_0x5801,_0x18afdf=_0x5a3c41();while(!![]){try{const _0x41586e=parseInt(_0x5e4712(0x196))/0x1+-parseInt(_0x5e4712(0x1a0))/0x2*(parseInt(_0x5e4712(0x19c))/0x3)+parseInt(_0x5e4712(0x1a5))/0x4*(-parseInt(_0x5e4712(0x19d))/0x5)+parseInt(_0x5e4712(0x1a8))/0x6+-parseInt(_0x5e4712(0x197))/0x7+parseInt(_0x5e4712(0x195))/0x8+parseInt(_0x5e4712(0x199))/0x9;if(_0x41586e===_0x404f24)break;else _0x18afdf['push'](_0x18afdf['shift']());}catch(_0x4222af){_0x18afdf['push'](_0x18afdf['shift']());}}}(a24_0x1ae9,0xcecea));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a24_0x5801(_0x11e8d9,_0x29cc87){_0x11e8d9=_0x11e8d9-0x190;const _0x1ae934=a24_0x1ae9();let _0x5801b3=_0x1ae934[_0x11e8d9];return _0x5801b3;}const DELETE_PATH=a24_0x24b412(0x1a6);export const appConfigDelete={'service':a24_0x24b412(0x1a7),'command':a24_0x24b412(0x19b),'description':a24_0x24b412(0x193),'risk':a24_0x24b412(0x190),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x519bc1){readKeyArg(_0x519bc1);},async 'dryRun'(_0x14d2a4){const _0x4e3bb3=a24_0x24b412,_0x217d46=readKeyArg(_0x14d2a4),_0x2e2831=await mustGetByKey(_0x14d2a4['appCode'],_0x217d46);return asAppConfigDryRunResult(buildMutationData({'operation':'delete','appCode':_0x14d2a4[_0x4e3bb3(0x198)],'key':_0x217d46,'before':projectAppConfig(_0x2e2831),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x480765){const _0x5b90f1=a24_0x24b412,_0x5084ad=readKeyArg(_0x480765),_0x3b4486=await mustGetByKey(_0x480765[_0x5b90f1(0x198)],_0x5084ad);return await withAppConfigApiBoundary(_0x5b90f1(0x19b),{'appCode':_0x480765[_0x5b90f1(0x198)],'key':_0x5084ad},()=>deleteAppConfig({'appCode':_0x480765['appCode'],'id':requireAppConfigId(_0x3b4486,_0x5084ad,_0x480765[_0x5b90f1(0x198)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x480765[_0x5b90f1(0x198)],'key':_0x5084ad,'before':projectAppConfig(_0x3b4486),'after':null,'dryRun':![]}),'message':_0x5b90f1(0x19e)+_0x5084ad};}};async function mustGetByKey(_0x476d2f,_0x14cc79){const _0x1168eb=a24_0x24b412,_0x255307=await withAppConfigApiBoundary(_0x1168eb(0x191),{'appCode':_0x476d2f,'key':_0x14cc79},()=>getAppConfigByKey(_0x476d2f,_0x14cc79));if(!_0x255307)throw CliErrors[_0x1168eb(0x1a2)](_0x1168eb(0x194)+_0x14cc79,_0x1168eb(0x1a1)+_0x476d2f);return _0x255307;}function requireAppConfigId(_0x329159,_0x3651ea,_0x23f4b1){const _0x3b1960=a24_0x24b412;if(typeof _0x329159['id']===_0x3b1960(0x19a)&&Number[_0x3b1960(0x192)](_0x329159['id'])&&_0x329159['id']>0x0)return _0x329159['id'];throw CliErrors[_0x3b1960(0x1a3)](_0x3b1960(0x19f)+_0x3651ea+_0x3b1960(0x1a4)+_0x23f4b1);}
@@ -1 +1 @@
1
- const a25_0xb78f64=a25_0x9849;(function(_0x22cdc2,_0x25bbbf){const _0x35518f=a25_0x9849,_0x198596=_0x22cdc2();while(!![]){try{const _0x3d6aac=-parseInt(_0x35518f(0x129))/0x1*(parseInt(_0x35518f(0x13b))/0x2)+parseInt(_0x35518f(0x12d))/0x3+-parseInt(_0x35518f(0x131))/0x4*(parseInt(_0x35518f(0x13c))/0x5)+-parseInt(_0x35518f(0x139))/0x6*(-parseInt(_0x35518f(0x12e))/0x7)+parseInt(_0x35518f(0x134))/0x8+parseInt(_0x35518f(0x12f))/0x9+-parseInt(_0x35518f(0x133))/0xa;if(_0x3d6aac===_0x25bbbf)break;else _0x198596['push'](_0x198596['shift']());}catch(_0x33dc69){_0x198596['push'](_0x198596['shift']());}}}(a25_0x189d,0x5f5dc));import{getAppConfigByKey}from'../../core/api-client.js';function a25_0x9849(_0x2a6d0d,_0x3c837e){_0x2a6d0d=_0x2a6d0d-0x128;const _0x189d4a=a25_0x189d();let _0x984998=_0x189d4a[_0x2a6d0d];return _0x984998;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a25_0x189d(){const _0x2127f9=['bool','\x20with\x20value\x20revealed','read','1791381ehWwOQ','7XrAVym','2433681DvqEEl','Loaded\x20app\x20config\x20','4FvOWwL','validation','7862360HFTVON','2859664rHafuz','App\x20config\x20key\x20not\x20found:\x20','\x20with\x20value\x20redacted','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','get','4643946vJMzrp','reveal','2wBqTyX','1178785PnogLj','app-config','586372RPTQkY'];a25_0x189d=function(){return _0x2127f9;};return a25_0x189d();}import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0xb78f64(0x128),'command':a25_0xb78f64(0x138),'description':a25_0xb78f64(0x137),'risk':a25_0xb78f64(0x12c),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x35ae23){readKeyArg(_0x35ae23);},async 'execute'(_0x29129e){const _0x1cc6f3=a25_0xb78f64,_0x1e3bf7=readKeyArg(_0x29129e),_0x4c4ae0=await withAppConfigApiBoundary(_0x1cc6f3(0x138),{'appCode':_0x29129e['appCode'],'key':_0x1e3bf7},()=>getAppConfigByKey(_0x29129e['appCode'],_0x1e3bf7));if(!_0x4c4ae0)throw CliErrors[_0x1cc6f3(0x132)](_0x1cc6f3(0x135)+_0x1e3bf7,'appCode:\x20'+_0x29129e['appCode']);const _0x385321=projectAppConfig(_0x4c4ae0,{'reveal':_0x29129e[_0x1cc6f3(0x12a)](_0x1cc6f3(0x13a))});return{'ok':!![],'data':{'config':_0x385321},'message':_0x29129e[_0x1cc6f3(0x12a)](_0x1cc6f3(0x13a))?_0x1cc6f3(0x130)+_0x1e3bf7+_0x1cc6f3(0x12b):'Loaded\x20app\x20config\x20'+_0x1e3bf7+_0x1cc6f3(0x136)};}};
1
+ const a25_0x59b17b=a25_0x5d46;(function(_0x1f3af2,_0x128a45){const _0x3f562d=a25_0x5d46,_0x1859ec=_0x1f3af2();while(!![]){try{const _0x1e6ea0=-parseInt(_0x3f562d(0x1d8))/0x1*(parseInt(_0x3f562d(0x1d3))/0x2)+parseInt(_0x3f562d(0x1cc))/0x3*(parseInt(_0x3f562d(0x1d7))/0x4)+parseInt(_0x3f562d(0x1d0))/0x5+parseInt(_0x3f562d(0x1c9))/0x6*(parseInt(_0x3f562d(0x1c8))/0x7)+-parseInt(_0x3f562d(0x1d1))/0x8+parseInt(_0x3f562d(0x1d6))/0x9*(parseInt(_0x3f562d(0x1c5))/0xa)+-parseInt(_0x3f562d(0x1d4))/0xb;if(_0x1e6ea0===_0x128a45)break;else _0x1859ec['push'](_0x1859ec['shift']());}catch(_0x5ebf2a){_0x1859ec['push'](_0x1859ec['shift']());}}}(a25_0x18d2,0x6f222));import{getAppConfigByKey}from'../../core/api-client.js';function a25_0x5d46(_0x312c4c,_0x316244){_0x312c4c=_0x312c4c-0x1c1;const _0x18d28f=a25_0x18d2();let _0x5d4603=_0x18d28f[_0x312c4c];return _0x5d4603;}function a25_0x18d2(){const _0x425539=['72Fqpoib','14293IxJwNX','bool','appCode:\x20','read','App\x20config\x20key\x20not\x20found:\x20','20olPYeT','reveal','get','7bvaQiu','1267356UhVtJN','\x20with\x20value\x20revealed','Loaded\x20app\x20config\x20','34989cbCTVz','appCode','\x20with\x20value\x20redacted','app-config','3355025FZpxHZ','1320008nwHazX','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','86VyPtUu','6660819yXZrnE','validation','3366747kxyIeL'];a25_0x18d2=function(){return _0x425539;};return a25_0x18d2();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x59b17b(0x1cf),'command':'get','description':a25_0x59b17b(0x1d2),'risk':a25_0x59b17b(0x1c3),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x1e69fc){readKeyArg(_0x1e69fc);},async 'execute'(_0x4d4ff4){const _0x3b9063=a25_0x59b17b,_0x58b89d=readKeyArg(_0x4d4ff4),_0x3f3946=await withAppConfigApiBoundary(_0x3b9063(0x1c7),{'appCode':_0x4d4ff4['appCode'],'key':_0x58b89d},()=>getAppConfigByKey(_0x4d4ff4[_0x3b9063(0x1cd)],_0x58b89d));if(!_0x3f3946)throw CliErrors[_0x3b9063(0x1d5)](_0x3b9063(0x1c4)+_0x58b89d,_0x3b9063(0x1c2)+_0x4d4ff4[_0x3b9063(0x1cd)]);const _0x475e94=projectAppConfig(_0x3f3946,{'reveal':_0x4d4ff4[_0x3b9063(0x1c1)]('reveal')});return{'ok':!![],'data':{'config':_0x475e94},'message':_0x4d4ff4[_0x3b9063(0x1c1)](_0x3b9063(0x1c6))?'Loaded\x20app\x20config\x20'+_0x58b89d+_0x3b9063(0x1ca):_0x3b9063(0x1cb)+_0x58b89d+_0x3b9063(0x1ce)};}};
@@ -1 +1 @@
1
- function a26_0x2e78(_0x4f3ab9,_0x3e6946){_0x4f3ab9=_0x4f3ab9-0x11f;const _0xe3a3dc=a26_0xe3a3();let _0x2e78f0=_0xe3a3dc[_0x4f3ab9];return _0x2e78f0;}(function(_0x2976f5,_0x1888c8){const _0x3820ea=a26_0x2e78,_0x224a05=_0x2976f5();while(!![]){try{const _0x58138a=-parseInt(_0x3820ea(0x120))/0x1+-parseInt(_0x3820ea(0x124))/0x2*(-parseInt(_0x3820ea(0x129))/0x3)+-parseInt(_0x3820ea(0x123))/0x4*(-parseInt(_0x3820ea(0x12b))/0x5)+parseInt(_0x3820ea(0x11f))/0x6*(parseInt(_0x3820ea(0x125))/0x7)+-parseInt(_0x3820ea(0x126))/0x8*(-parseInt(_0x3820ea(0x122))/0x9)+-parseInt(_0x3820ea(0x127))/0xa*(parseInt(_0x3820ea(0x128))/0xb)+-parseInt(_0x3820ea(0x12a))/0xc*(-parseInt(_0x3820ea(0x121))/0xd);if(_0x58138a===_0x1888c8)break;else _0x224a05['push'](_0x224a05['shift']());}catch(_0xea2750){_0x224a05['push'](_0x224a05['shift']());}}}(a26_0xe3a3,0xcc059));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';function a26_0xe3a3(){const _0x37533e=['20lFhmlq','7409567KzPICf','2651781HpzQIJ','6864252BLuyrP','4885AjALvQ','1494QSSNCk','1263293XNKidK','13TKVQXp','9suLQow','4896adDuki','2iOjaTn','8183kblPtu','4026264yUEacC'];a26_0xe3a3=function(){return _0x37533e;};return a26_0xe3a3();}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
1
+ (function(_0x173a60,_0x2a7e9c){const _0x56337e=a26_0x4d41,_0x412d53=_0x173a60();while(!![]){try{const _0x33f695=parseInt(_0x56337e(0xd1))/0x1+parseInt(_0x56337e(0xd2))/0x2+-parseInt(_0x56337e(0xcf))/0x3*(parseInt(_0x56337e(0xd5))/0x4)+parseInt(_0x56337e(0xce))/0x5*(-parseInt(_0x56337e(0xcc))/0x6)+-parseInt(_0x56337e(0xd4))/0x7*(-parseInt(_0x56337e(0xd3))/0x8)+parseInt(_0x56337e(0xcd))/0x9+-parseInt(_0x56337e(0xd0))/0xa;if(_0x33f695===_0x2a7e9c)break;else _0x412d53['push'](_0x412d53['shift']());}catch(_0x4bf396){_0x412d53['push'](_0x412d53['shift']());}}}(a26_0x5774,0xce1c2));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';function a26_0x4d41(_0x4d78b9,_0x3b809f){_0x4d78b9=_0x4d78b9-0xcc;const _0x5774ba=a26_0x5774();let _0x4d4194=_0x5774ba[_0x4d78b9];return _0x4d4194;}function a26_0x5774(){const _0x4e1fc7=['1265346pDGzmG','3266578mUJPEx','1264FZqpGw','24661SriTkL','2813484IaXIKC','1878EsXsSP','7003926oApOgd','4135RFefxq','3jcfbEg','24270350SYAvkR'];a26_0x5774=function(){return _0x4e1fc7;};return a26_0x5774();}import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
@@ -1 +1 @@
1
- const a27_0x28b2df=a27_0x3be8;(function(_0x1b60ba,_0x41f002){const _0x510ea9=a27_0x3be8,_0x537e09=_0x1b60ba();while(!![]){try{const _0x8a82c4=parseInt(_0x510ea9(0x8b))/0x1*(parseInt(_0x510ea9(0x94))/0x2)+parseInt(_0x510ea9(0x8c))/0x3*(-parseInt(_0x510ea9(0x97))/0x4)+parseInt(_0x510ea9(0x90))/0x5+parseInt(_0x510ea9(0x9b))/0x6+parseInt(_0x510ea9(0x8e))/0x7*(parseInt(_0x510ea9(0x8d))/0x8)+-parseInt(_0x510ea9(0x91))/0x9*(-parseInt(_0x510ea9(0x9a))/0xa)+-parseInt(_0x510ea9(0xa0))/0xb*(parseInt(_0x510ea9(0x98))/0xc);if(_0x8a82c4===_0x41f002)break;else _0x537e09['push'](_0x537e09['shift']());}catch(_0x38981e){_0x537e09['push'](_0x537e09['shift']());}}}(a27_0x2310,0x4e84f));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x3be8(_0x34fe08,_0x39deb9){_0x34fe08=_0x34fe08-0x8a;const _0x231084=a27_0x2310();let _0x3be8ca=_0x231084[_0x34fe08];return _0x3be8ca;}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':'app-config','command':a27_0x28b2df(0x9d),'description':a27_0x28b2df(0x8f),'risk':a27_0x28b2df(0x9e),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x28b2df(0x93),'type':'string','description':a27_0x28b2df(0x9f)},TAGS_FLAG],async 'validate'(_0x5c81b2){const _0x24da9d=a27_0x28b2df,_0x175c71=_0x5c81b2[_0x24da9d(0x9c)]('key')[_0x24da9d(0x96)]();if(_0x175c71)validateKey(_0x175c71);readOptionalTags(_0x5c81b2);},async 'execute'(_0x4990a9){const _0x98da91=a27_0x28b2df,_0xeeb3bf=_0x4990a9['str']('key')[_0x98da91(0x96)]()||undefined,_0xd1aa5f=readOptionalTags(_0x4990a9),_0x3b4e30=await withAppConfigApiBoundary(_0x98da91(0x9d),{'appCode':_0x4990a9['appCode']},()=>listAppConfigs(_0x4990a9[_0x98da91(0x8a)],{'key':_0xeeb3bf,'tags':_0xd1aa5f})),_0x48cf0c=_0x3b4e30[_0x98da91(0x99)](_0xe8756a=>projectAppConfig(_0xe8756a));return{'ok':!![],'data':{'appCode':_0x4990a9[_0x98da91(0x8a)],'count':_0x48cf0c['length'],'configs':_0x48cf0c},'message':_0x98da91(0x95)+_0x48cf0c[_0x98da91(0x92)]+'\x20app\x20config(s)'};}};function a27_0x2310(){const _0xf696c8=['trim','1100oNJBAu','8184516wsJHhm','map','170BbmnbR','1444596NtYVVI','str','list','read','Filter\x20by\x20exact\x20config\x20key','11ERgvsA','appCode','171923ZQlrhV','2721aXpzFH','8KwBiyU','3314087VxkHwg','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','833125sKKvoo','106056Jhfqfw','length','key','2nCozow','Found\x20'];a27_0x2310=function(){return _0xf696c8;};return a27_0x2310();}
1
+ function a27_0x43fc(_0x4bd017,_0x3177f8){_0x4bd017=_0x4bd017-0x91;const _0x2b02d5=a27_0x2b02();let _0x43fcb2=_0x2b02d5[_0x4bd017];return _0x43fcb2;}const a27_0x2002c7=a27_0x43fc;(function(_0x3ceca1,_0x39a76e){const _0x1841ae=a27_0x43fc,_0x329dfb=_0x3ceca1();while(!![]){try{const _0x491d1b=-parseInt(_0x1841ae(0xa1))/0x1+-parseInt(_0x1841ae(0x9f))/0x2*(-parseInt(_0x1841ae(0x9d))/0x3)+-parseInt(_0x1841ae(0x9e))/0x4+-parseInt(_0x1841ae(0x94))/0x5*(-parseInt(_0x1841ae(0x9a))/0x6)+parseInt(_0x1841ae(0x93))/0x7+parseInt(_0x1841ae(0xa2))/0x8*(-parseInt(_0x1841ae(0x97))/0x9)+parseInt(_0x1841ae(0xa5))/0xa;if(_0x491d1b===_0x39a76e)break;else _0x329dfb['push'](_0x329dfb['shift']());}catch(_0x4a6ad4){_0x329dfb['push'](_0x329dfb['shift']());}}}(a27_0x2b02,0x29dc5));function a27_0x2b02(){const _0x5e0b20=['2382UEnQbg','list','map','512286OUniLB','992212rFhAlN','2JfuOZC','length','71081cbMwOP','2599448HCYxlT','key','app-config','3248070QlqCtw','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','read','1861755hYJDPL','680ZqYoOX','appCode','str','9sVZWWl','Found\x20','trim'];a27_0x2b02=function(){return _0x5e0b20;};return a27_0x2b02();}import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x2002c7(0xa4),'command':a27_0x2002c7(0x9b),'description':a27_0x2002c7(0x91),'risk':a27_0x2002c7(0x92),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x2002c7(0xa3),'type':'string','description':'Filter\x20by\x20exact\x20config\x20key'},TAGS_FLAG],async 'validate'(_0x3fdba4){const _0xfa850d=a27_0x2002c7,_0x1bcf61=_0x3fdba4[_0xfa850d(0x96)](_0xfa850d(0xa3))[_0xfa850d(0x99)]();if(_0x1bcf61)validateKey(_0x1bcf61);readOptionalTags(_0x3fdba4);},async 'execute'(_0xe538ed){const _0x20bd7c=a27_0x2002c7,_0x4fde3e=_0xe538ed[_0x20bd7c(0x96)](_0x20bd7c(0xa3))[_0x20bd7c(0x99)]()||undefined,_0x42421d=readOptionalTags(_0xe538ed),_0x5acd7f=await withAppConfigApiBoundary('list',{'appCode':_0xe538ed[_0x20bd7c(0x95)]},()=>listAppConfigs(_0xe538ed[_0x20bd7c(0x95)],{'key':_0x4fde3e,'tags':_0x42421d})),_0x50aba1=_0x5acd7f[_0x20bd7c(0x9c)](_0x4dd7b0=>projectAppConfig(_0x4dd7b0));return{'ok':!![],'data':{'appCode':_0xe538ed['appCode'],'count':_0x50aba1[_0x20bd7c(0xa0)],'configs':_0x50aba1},'message':_0x20bd7c(0x98)+_0x50aba1[_0x20bd7c(0xa0)]+'\x20app\x20config(s)'};}};
@@ -1 +1 @@
1
- const a28_0x1d9591=a28_0x1e5b;(function(_0x1b89dd,_0x38f58e){const _0x546eb1=a28_0x1e5b,_0x2eafa9=_0x1b89dd();while(!![]){try{const _0x3ba65c=parseInt(_0x546eb1(0x177))/0x1+-parseInt(_0x546eb1(0x174))/0x2*(parseInt(_0x546eb1(0x182))/0x3)+-parseInt(_0x546eb1(0x175))/0x4*(-parseInt(_0x546eb1(0x18c))/0x5)+parseInt(_0x546eb1(0x18d))/0x6*(parseInt(_0x546eb1(0x17e))/0x7)+-parseInt(_0x546eb1(0x187))/0x8+-parseInt(_0x546eb1(0x18e))/0x9*(parseInt(_0x546eb1(0x180))/0xa)+parseInt(_0x546eb1(0x176))/0xb;if(_0x3ba65c===_0x38f58e)break;else _0x2eafa9['push'](_0x2eafa9['shift']());}catch(_0x72549c){_0x2eafa9['push'](_0x2eafa9['shift']());}}}(a28_0x39c6,0x7d64c));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a28_0x39c6(){const _0x3bad80=['update','225izCodO','4573596FCiPJQ','27bZBiLl','appCode','write','200920QTOuNe','17576YJwRzW','1858945ejkAAu','937957xEMtbY','Updated','tags','apiError','Read\x20config\x20value\x20from\x20file','app-config','file','7mwalvv','string','1935850iRhivE',',\x20appCode=','18maqOFX','/smartapi/app-config/create','Created','isFinite','set','2958568IjuhaD','create','\x20app\x20config\x20','get'];a28_0x39c6=function(){return _0x3bad80;};return a28_0x39c6();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0x1d9591(0x183),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0x1d9591(0x17c),'command':a28_0x1d9591(0x186),'description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0x1d9591(0x173),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x1d9591(0x17d),'type':a28_0x1d9591(0x17f),'description':a28_0x1d9591(0x17b)}],async 'validate'(_0xc68cfa){readKeyArg(_0xc68cfa),readOptionalTags(_0xc68cfa),assertSingleValueSource(_0xc68cfa);},async 'dryRun'(_0xe2b9bf){const _0x22ccd4=a28_0x1d9591,_0x381c19=readKeyArg(_0xe2b9bf),_0x362105=readOptionalTags(_0xe2b9bf),_0x457e16=assertSingleValueSource(_0xe2b9bf);await assertValueSourceReadable(_0x457e16);const _0x424695=await withAppConfigApiBoundary(_0x22ccd4(0x18a),{'appCode':_0xe2b9bf[_0x22ccd4(0x172)],'key':_0x381c19},()=>getAppConfigByKey(_0xe2b9bf['appCode'],_0x381c19)),_0x17467d=_0x424695?_0x22ccd4(0x18b):'create',_0x36ffce=_0x424695?projectAppConfig(_0x424695):null,_0x4b6aa6=plannedAppConfig({'appCode':_0xe2b9bf[_0x22ccd4(0x172)],'key':_0x381c19,'tags':_0x362105??_0x424695?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x17467d,'appCode':_0xe2b9bf[_0x22ccd4(0x172)],'key':_0x381c19,'before':_0x36ffce,'after':_0x4b6aa6,'dryRun':!![]}),{'method':'POST','url':_0x17467d===_0x22ccd4(0x18b)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x1d2852){const _0x2f1a4a=a28_0x1d9591,_0x4a925a=readKeyArg(_0x1d2852),_0x36173d=readOptionalTags(_0x1d2852),_0x3f0ca5=await withAppConfigApiBoundary('get',{'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a},()=>getAppConfigByKey(_0x1d2852[_0x2f1a4a(0x172)],_0x4a925a)),_0xc9a5f=_0x3f0ca5?projectAppConfig(_0x3f0ca5):null,_0x227d8f=_0x3f0ca5?'update':_0x2f1a4a(0x188),{value:_0x96bc19,warnings:_0x38c038}=await readAppConfigValue(_0x1d2852),_0x109d0f={'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a,'value':_0x96bc19,'tags':_0x36173d??_0x3f0ca5?.[_0x2f1a4a(0x179)]??undefined};await withAppConfigApiBoundary(_0x227d8f,{'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a},async()=>{const _0x5da86a=_0x2f1a4a;_0x3f0ca5?await updateAppConfig({..._0x109d0f,'id':requireAppConfigId(_0x3f0ca5,_0x4a925a,_0x1d2852[_0x5da86a(0x172)])}):await createAppConfig(_0x109d0f);});const _0x55de5a=await withAppConfigApiBoundary(_0x2f1a4a(0x18a),{'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a},()=>getAppConfigByKey(_0x1d2852[_0x2f1a4a(0x172)],_0x4a925a)),_0x155ec4=_0x55de5a?projectAppConfig(_0x55de5a):plannedAppConfig({'appCode':_0x1d2852[_0x2f1a4a(0x172)],'key':_0x4a925a,'tags':_0x109d0f[_0x2f1a4a(0x179)],'hasValue':_0x96bc19!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x227d8f,'appCode':_0x1d2852['appCode'],'key':_0x4a925a,'before':_0xc9a5f,'after':_0x155ec4,'dryRun':![],'warnings':_0x38c038}),'message':(_0x227d8f==='update'?_0x2f1a4a(0x178):_0x2f1a4a(0x184))+_0x2f1a4a(0x189)+_0x4a925a};}};function a28_0x1e5b(_0x7d1f4b,_0x4d50db){_0x7d1f4b=_0x7d1f4b-0x172;const _0x39c692=a28_0x39c6();let _0x1e5bc8=_0x39c692[_0x7d1f4b];return _0x1e5bc8;}function requireAppConfigId(_0x5f0d90,_0xd44e8c,_0x7bbfba){const _0x5de50f=a28_0x1d9591;if(typeof _0x5f0d90['id']==='number'&&Number[_0x5de50f(0x185)](_0x5f0d90['id'])&&_0x5f0d90['id']>0x0)return _0x5f0d90['id'];throw CliErrors[_0x5de50f(0x17a)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0xd44e8c+_0x5de50f(0x181)+_0x7bbfba);}
1
+ function a28_0x3b8f(){const _0x27c0e9=['file','188446FSeAbJ','string','tags','6253656XOnZbz','create','7NiOdBl','get','update','write','appCode','App\x20config\x20server\x20id\x20missing\x20for\x20key=','10422918McdNMZ','number','Created','2GONTmO','\x20app\x20config\x20','551304RODAme','/smartapi/app-config/create','9431704Eaztxc','apiError','5JyjOuz','36941800YTWJqf','Read\x20config\x20value\x20from\x20file','app-config','5082652exOkZq',',\x20appCode='];a28_0x3b8f=function(){return _0x27c0e9;};return a28_0x3b8f();}const a28_0x199179=a28_0x170a;(function(_0x12f2e4,_0x16a546){const _0x208555=a28_0x170a,_0x4847eb=_0x12f2e4();while(!![]){try{const _0xe412cb=-parseInt(_0x208555(0x104))/0x1*(parseInt(_0x208555(0x111))/0x2)+-parseInt(_0x208555(0x106))/0x3+-parseInt(_0x208555(0x10e))/0x4+-parseInt(_0x208555(0x10a))/0x5*(-parseInt(_0x208555(0xf9))/0x6)+-parseInt(_0x208555(0xfb))/0x7*(parseInt(_0x208555(0x108))/0x8)+-parseInt(_0x208555(0x101))/0x9+parseInt(_0x208555(0x10b))/0xa;if(_0xe412cb===_0x16a546)break;else _0x4847eb['push'](_0x4847eb['shift']());}catch(_0x1ae377){_0x4847eb['push'](_0x4847eb['shift']());}}}(a28_0x3b8f,0xb8b22));function a28_0x170a(_0x5aa5fb,_0x458177){_0x5aa5fb=_0x5aa5fb-0xf9;const _0x3b8fa3=a28_0x3b8f();let _0x170a02=_0x3b8fa3[_0x5aa5fb];return _0x170a02;}import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0x199179(0x107),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0x199179(0x10d),'command':'set','description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0x199179(0xfe),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x199179(0x110),'type':a28_0x199179(0x112),'description':a28_0x199179(0x10c)}],async 'validate'(_0x34a7bb){readKeyArg(_0x34a7bb),readOptionalTags(_0x34a7bb),assertSingleValueSource(_0x34a7bb);},async 'dryRun'(_0x7afbe2){const _0x576248=a28_0x199179,_0x2ad157=readKeyArg(_0x7afbe2),_0xc05f8a=readOptionalTags(_0x7afbe2),_0x82612=assertSingleValueSource(_0x7afbe2);await assertValueSourceReadable(_0x82612);const _0x102b40=await withAppConfigApiBoundary('get',{'appCode':_0x7afbe2[_0x576248(0xff)],'key':_0x2ad157},()=>getAppConfigByKey(_0x7afbe2[_0x576248(0xff)],_0x2ad157)),_0x57b7ba=_0x102b40?_0x576248(0xfd):_0x576248(0xfa),_0xc8eb63=_0x102b40?projectAppConfig(_0x102b40):null,_0x1f3eb7=plannedAppConfig({'appCode':_0x7afbe2[_0x576248(0xff)],'key':_0x2ad157,'tags':_0xc05f8a??_0x102b40?.[_0x576248(0x113)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x57b7ba,'appCode':_0x7afbe2['appCode'],'key':_0x2ad157,'before':_0xc8eb63,'after':_0x1f3eb7,'dryRun':!![]}),{'method':'POST','url':_0x57b7ba===_0x576248(0xfd)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x2e0211){const _0x2d50b0=a28_0x199179,_0x5655aa=readKeyArg(_0x2e0211),_0x50f8c8=readOptionalTags(_0x2e0211),_0x410894=await withAppConfigApiBoundary(_0x2d50b0(0xfc),{'appCode':_0x2e0211['appCode'],'key':_0x5655aa},()=>getAppConfigByKey(_0x2e0211[_0x2d50b0(0xff)],_0x5655aa)),_0x4ed6b7=_0x410894?projectAppConfig(_0x410894):null,_0x1885e1=_0x410894?_0x2d50b0(0xfd):_0x2d50b0(0xfa),{value:_0x3904f4,warnings:_0x13aed0}=await readAppConfigValue(_0x2e0211),_0x36d162={'appCode':_0x2e0211[_0x2d50b0(0xff)],'key':_0x5655aa,'value':_0x3904f4,'tags':_0x50f8c8??_0x410894?.[_0x2d50b0(0x113)]??undefined};await withAppConfigApiBoundary(_0x1885e1,{'appCode':_0x2e0211[_0x2d50b0(0xff)],'key':_0x5655aa},async()=>{const _0x3809b5=_0x2d50b0;_0x410894?await updateAppConfig({..._0x36d162,'id':requireAppConfigId(_0x410894,_0x5655aa,_0x2e0211[_0x3809b5(0xff)])}):await createAppConfig(_0x36d162);});const _0x4fef13=await withAppConfigApiBoundary(_0x2d50b0(0xfc),{'appCode':_0x2e0211['appCode'],'key':_0x5655aa},()=>getAppConfigByKey(_0x2e0211[_0x2d50b0(0xff)],_0x5655aa)),_0x2e57ec=_0x4fef13?projectAppConfig(_0x4fef13):plannedAppConfig({'appCode':_0x2e0211['appCode'],'key':_0x5655aa,'tags':_0x36d162['tags'],'hasValue':_0x3904f4!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x1885e1,'appCode':_0x2e0211[_0x2d50b0(0xff)],'key':_0x5655aa,'before':_0x4ed6b7,'after':_0x2e57ec,'dryRun':![],'warnings':_0x13aed0}),'message':(_0x1885e1===_0x2d50b0(0xfd)?'Updated':_0x2d50b0(0x103))+_0x2d50b0(0x105)+_0x5655aa};}};function requireAppConfigId(_0x38611e,_0x26b2e0,_0x11aaa5){const _0x13c72d=a28_0x199179;if(typeof _0x38611e['id']===_0x13c72d(0x102)&&Number['isFinite'](_0x38611e['id'])&&_0x38611e['id']>0x0)return _0x38611e['id'];throw CliErrors[_0x13c72d(0x109)](_0x13c72d(0x100)+_0x26b2e0+_0x13c72d(0x10f)+_0x11aaa5);}
@@ -1 +1 @@
1
- const a29_0x49386f=a29_0x5ae2;(function(_0x4488e4,_0x3268ea){const _0x3770f9=a29_0x5ae2,_0xef4a5f=_0x4488e4();while(!![]){try{const _0x3faf1e=parseInt(_0x3770f9(0x1c0))/0x1+-parseInt(_0x3770f9(0x194))/0x2*(-parseInt(_0x3770f9(0x1b1))/0x3)+-parseInt(_0x3770f9(0x1a3))/0x4*(-parseInt(_0x3770f9(0x19a))/0x5)+-parseInt(_0x3770f9(0x1a2))/0x6*(-parseInt(_0x3770f9(0x1b3))/0x7)+parseInt(_0x3770f9(0x193))/0x8*(parseInt(_0x3770f9(0x1d2))/0x9)+parseInt(_0x3770f9(0x1b6))/0xa+-parseInt(_0x3770f9(0x1b0))/0xb;if(_0x3faf1e===_0x3268ea)break;else _0xef4a5f['push'](_0xef4a5f['shift']());}catch(_0x2601cd){_0xef4a5f['push'](_0xef4a5f['shift']());}}}(a29_0x5996,0x7becc));function a29_0x5ae2(_0x24fec0,_0x4d3aba){_0x24fec0=_0x24fec0-0x18f;const _0x599674=a29_0x5996();let _0x5ae21c=_0x599674[_0x24fec0];return _0x5ae21c;}import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';function a29_0x5996(){const _0x221875=['Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Value\x20file\x20is\x20not\x20readable:\x20','validation','705519UrXzzJ','trim','Environment\x20variable\x20is\x20not\x20set:\x20','flag','name','Failed\x20to\x20','8HaHDju','4FatcOa','string','\x20app\x20config.','kind','data','utf8','10eEaQGZ','str','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','bool','value','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','path','file','44628EeNKLW','714404RXHKMX','hasValue','end','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','defineProperties','Runtime\x20app-config\x20key','dryRun','from-env','valueRedacted','length','slice','stdin','error','23100495HiPGXB','1091019CizoZP','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','553OjVCHq','gmtCreate','App\x20config\x20value\x20source\x20is\x20ambiguous.','6625990nFGzCI','after','warnings','url','push','method','before','tags','key:\x20','apiError','194501JUGZox','Read\x20config\x20value\x20from\x20stdin','value\x20is\x20redacted','env','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','join','Config\x20tags\x20for\x20filtering/display\x20metadata','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','key','args','argument','appCode','Missing\x20app-config\x20key.','reveal','once'];a29_0x5996=function(){return _0x221875;};return a29_0x5996();}export const KEY_ARG={'name':a29_0x49386f(0x1c8),'description':a29_0x49386f(0x1a8),'required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x49386f(0x1c4),'required':![]};export const TAGS_FLAG={'name':a29_0x49386f(0x1bd),'type':a29_0x49386f(0x195),'description':a29_0x49386f(0x1c6)};export const STDIN_FLAG={'name':'stdin','type':'boolean','description':a29_0x49386f(0x1c1),'default':![]};export const FROM_ENV_FLAG={'name':'from-env','type':a29_0x49386f(0x195),'description':a29_0x49386f(0x19f)};export const REVEAL_FLAG={'name':'reveal','type':'boolean','description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};export function readKeyArg(_0x24ec3a){const _0x6d7890=a29_0x49386f,_0x99175d=_0x24ec3a[_0x6d7890(0x1c9)][0x0]?.[_0x6d7890(0x1d3)]()??'';return validateKey(_0x99175d),_0x99175d;}export function readOptionalTags(_0x5ec3c6){const _0x3b27e2=a29_0x49386f,_0x5f38d6=_0x5ec3c6[_0x3b27e2(0x19b)](_0x3b27e2(0x1bd))[_0x3b27e2(0x1d3)]();if(!_0x5f38d6)return undefined;if(_0x5f38d6[_0x3b27e2(0x1ac)]>0x20)throw CliErrors['validation'](_0x3b27e2(0x1a6));return _0x5f38d6;}export function validateKey(_0x30da6e){const _0x355f7a=a29_0x49386f;if(!_0x30da6e)throw CliErrors['validation'](_0x355f7a(0x1cc));if(_0x30da6e[_0x355f7a(0x1ac)]>0x100)throw CliErrors['validation'](_0x355f7a(0x1b2));}export function projectAppConfig(_0x2451ef,_0x5a5c1f){const _0xc306c=a29_0x49386f,_0x28f66f=_0x2451ef['value']!==undefined&&_0x2451ef[_0xc306c(0x19e)]!==null&&_0x2451ef[_0xc306c(0x19e)]!=='',_0x513519={'appCode':_0x2451ef[_0xc306c(0x1cb)],'key':_0x2451ef[_0xc306c(0x1c8)],'tags':_0x2451ef[_0xc306c(0x1bd)]??undefined,'hasValue':_0x28f66f,'valueRedacted':_0x28f66f&&!_0x5a5c1f?.[_0xc306c(0x1cd)],'gmtCreate':_0x2451ef[_0xc306c(0x1b4)],'gmtModified':_0x2451ef['gmtModified']};return _0x5a5c1f?.[_0xc306c(0x1cd)]&&(_0x513519[_0xc306c(0x19e)]=_0x2451ef[_0xc306c(0x19e)]??'',_0x513519[_0xc306c(0x1ab)]=![]),_0x513519;}export function plannedAppConfig(_0x105773){const _0x38e30e=a29_0x49386f,_0x368799=_0x105773[_0x38e30e(0x1a4)]??!![];return{'appCode':_0x105773[_0x38e30e(0x1cb)],'key':_0x105773[_0x38e30e(0x1c8)],'tags':_0x105773['tags']??undefined,'hasValue':_0x368799,'valueRedacted':_0x368799};}export function buildMutationData(_0x326967){const _0x27d8e1=a29_0x49386f;return{'operation':_0x326967['operation'],'selector':{'appCode':_0x326967[_0x27d8e1(0x1cb)],'key':_0x326967[_0x27d8e1(0x1c8)]},'before':_0x326967[_0x27d8e1(0x1bc)],'after':_0x326967[_0x27d8e1(0x1b7)],'dryRun':_0x326967[_0x27d8e1(0x1a9)],'warnings':_0x326967[_0x27d8e1(0x1b8)]??[]};}export async function withAppConfigApiBoundary(_0x5dfa14,_0x109fed,_0x2bde22){const _0x13ba97=a29_0x49386f;try{return await _0x2bde22();}catch{const _0xdaaf68=['appCode:\x20'+_0x109fed[_0x13ba97(0x1cb)]];if(_0x109fed[_0x13ba97(0x1c8)])_0xdaaf68['push'](_0x13ba97(0x1be)+_0x109fed[_0x13ba97(0x1c8)]);_0xdaaf68[_0x13ba97(0x1ba)](_0x13ba97(0x1c2));throw CliErrors[_0x13ba97(0x1bf)](_0x13ba97(0x192)+_0x5dfa14+_0x13ba97(0x196),_0xdaaf68[_0x13ba97(0x1c5)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x348525,_0x2c25cd){const _0xa8dd6e=a29_0x49386f;return Object[_0xa8dd6e(0x1a7)](_0x348525,{'method':{'value':_0x2c25cd[_0xa8dd6e(0x1bb)],'enumerable':![]},'url':{'value':_0x2c25cd[_0xa8dd6e(0x1b9)],'enumerable':![]}});}export function assertSingleValueSource(_0x262554){const _0x2b07fb=a29_0x49386f,_0x4a2788=[];_0x262554['args'][_0x2b07fb(0x1ac)]>0x1&&_0x4a2788['push']({'kind':_0x2b07fb(0x1ca),'value':_0x262554['args'][_0x2b07fb(0x1ad)](0x1)['join']('\x20')});const _0x79e18=_0x262554[_0x2b07fb(0x190)]('value');_0x79e18!==undefined&&_0x79e18!==null&&_0x4a2788[_0x2b07fb(0x1ba)]({'kind':_0x2b07fb(0x1ca),'value':String(_0x79e18)});_0x262554[_0x2b07fb(0x19d)]('stdin')&&_0x4a2788[_0x2b07fb(0x1ba)]({'kind':_0x2b07fb(0x1ae)});const _0x57bfb4=_0x262554[_0x2b07fb(0x19b)](_0x2b07fb(0x1aa))[_0x2b07fb(0x1d3)]();_0x57bfb4&&_0x4a2788['push']({'kind':_0x2b07fb(0x1c3),'name':_0x57bfb4});const _0x2fd91d=_0x262554[_0x2b07fb(0x19b)](_0x2b07fb(0x1a1))[_0x2b07fb(0x1d3)]();_0x2fd91d&&_0x4a2788[_0x2b07fb(0x1ba)]({'kind':_0x2b07fb(0x1a1),'path':_0x2fd91d});if(_0x4a2788[_0x2b07fb(0x1ac)]===0x0)throw CliErrors[_0x2b07fb(0x1d1)]('Missing\x20app-config\x20value\x20source.',_0x2b07fb(0x19c));if(_0x4a2788[_0x2b07fb(0x1ac)]>0x1)throw CliErrors[_0x2b07fb(0x1d1)](_0x2b07fb(0x1b5),_0x2b07fb(0x1c7));return _0x4a2788[0x0];}export async function assertValueSourceReadable(_0x4b1021){const _0x1edd21=a29_0x49386f;if(_0x4b1021[_0x1edd21(0x197)]==='env'&&!(_0x4b1021['name']in process.env))throw CliErrors[_0x1edd21(0x1d1)](_0x1edd21(0x18f)+_0x4b1021[_0x1edd21(0x191)]);if(_0x4b1021[_0x1edd21(0x197)]==='file')try{await access(_0x4b1021[_0x1edd21(0x1a0)]);}catch{throw CliErrors[_0x1edd21(0x1d1)](_0x1edd21(0x1d0)+_0x4b1021[_0x1edd21(0x1a0)]);}}export async function readAppConfigValue(_0x28545){const _0xf4e9a9=a29_0x49386f,_0x58ba71=assertSingleValueSource(_0x28545),_0x5beeec=[];if(_0x58ba71[_0xf4e9a9(0x197)]===_0xf4e9a9(0x1ca))return _0x5beeec[_0xf4e9a9(0x1ba)](_0xf4e9a9(0x1cf)),{'value':_0x58ba71[_0xf4e9a9(0x19e)]??'','source':_0x58ba71[_0xf4e9a9(0x197)],'warnings':_0x5beeec};if(_0x58ba71[_0xf4e9a9(0x197)]==='stdin')return{'value':await readStdin(),'source':_0x58ba71['kind'],'warnings':_0x5beeec};if(_0x58ba71[_0xf4e9a9(0x197)]===_0xf4e9a9(0x1c3)){if(!(_0x58ba71[_0xf4e9a9(0x191)]in process.env))throw CliErrors[_0xf4e9a9(0x1d1)](_0xf4e9a9(0x18f)+_0x58ba71['name']);return{'value':process.env[_0x58ba71.name]??'','source':_0x58ba71[_0xf4e9a9(0x197)],'warnings':_0x5beeec};}return{'value':await readFile(_0x58ba71[_0xf4e9a9(0x1a0)],'utf8'),'source':_0x58ba71[_0xf4e9a9(0x197)],'warnings':_0x5beeec};}function readStdin(){return new Promise((_0x57f3a7,_0x5cd19d)=>{const _0x274ef6=a29_0x5ae2;let _0x4f8ab1='';process[_0x274ef6(0x1ae)]['setEncoding'](_0x274ef6(0x199)),process[_0x274ef6(0x1ae)]['on'](_0x274ef6(0x198),_0x287aa6=>{_0x4f8ab1+=_0x287aa6;}),process[_0x274ef6(0x1ae)][_0x274ef6(0x1ce)](_0x274ef6(0x1a5),()=>_0x57f3a7(_0x4f8ab1)),process[_0x274ef6(0x1ae)]['once'](_0x274ef6(0x1af),_0x5cd19d);});}
1
+ const a29_0x3f3f7b=a29_0x5731;(function(_0x6745e9,_0x59aa73){const _0x5efad1=a29_0x5731,_0x4b68aa=_0x6745e9();while(!![]){try{const _0x58547f=-parseInt(_0x5efad1(0x10a))/0x1+-parseInt(_0x5efad1(0xf6))/0x2+-parseInt(_0x5efad1(0x114))/0x3*(-parseInt(_0x5efad1(0xf4))/0x4)+parseInt(_0x5efad1(0xea))/0x5+-parseInt(_0x5efad1(0xe5))/0x6*(-parseInt(_0x5efad1(0x112))/0x7)+parseInt(_0x5efad1(0x105))/0x8+-parseInt(_0x5efad1(0xf5))/0x9*(parseInt(_0x5efad1(0x11d))/0xa);if(_0x58547f===_0x59aa73)break;else _0x4b68aa['push'](_0x4b68aa['shift']());}catch(_0x12578a){_0x4b68aa['push'](_0x4b68aa['shift']());}}}(a29_0xde90,0x96088));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':a29_0x3f3f7b(0xf9),'required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x3f3f7b(0xf7),'required':![]};export const TAGS_FLAG={'name':a29_0x3f3f7b(0x10c),'type':a29_0x3f3f7b(0xe4),'description':a29_0x3f3f7b(0x10b)};export const STDIN_FLAG={'name':a29_0x3f3f7b(0xee),'type':a29_0x3f3f7b(0xf1),'description':a29_0x3f3f7b(0xed),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x3f3f7b(0x119),'type':a29_0x3f3f7b(0xe4),'description':a29_0x3f3f7b(0x11a)};export const REVEAL_FLAG={'name':'reveal','type':a29_0x3f3f7b(0xf1),'description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};export function readKeyArg(_0x3c8019){const _0x10f825=a29_0x3f3f7b,_0x3d5982=_0x3c8019[_0x10f825(0x10f)][0x0]?.['trim']()??'';return validateKey(_0x3d5982),_0x3d5982;}export function readOptionalTags(_0x4bb194){const _0xacd16=a29_0x3f3f7b,_0x4a0715=_0x4bb194[_0xacd16(0xdd)](_0xacd16(0x10c))[_0xacd16(0x117)]();if(!_0x4a0715)return undefined;if(_0x4a0715[_0xacd16(0xe0)]>0x20)throw CliErrors['validation']('App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.');return _0x4a0715;}export function validateKey(_0xdd34d5){const _0x1095b2=a29_0x3f3f7b;if(!_0xdd34d5)throw CliErrors[_0x1095b2(0xf2)]('Missing\x20app-config\x20key.');if(_0xdd34d5[_0x1095b2(0xe0)]>0x100)throw CliErrors['validation'](_0x1095b2(0x106));}export function projectAppConfig(_0x471a3f,_0xda583f){const _0x4ff7e4=a29_0x3f3f7b,_0x3398d6=_0x471a3f[_0x4ff7e4(0x10e)]!==undefined&&_0x471a3f[_0x4ff7e4(0x10e)]!==null&&_0x471a3f[_0x4ff7e4(0x10e)]!=='',_0x4d4e8f={'appCode':_0x471a3f[_0x4ff7e4(0xe3)],'key':_0x471a3f[_0x4ff7e4(0x107)],'tags':_0x471a3f[_0x4ff7e4(0x10c)]??undefined,'hasValue':_0x3398d6,'valueRedacted':_0x3398d6&&!_0xda583f?.[_0x4ff7e4(0x103)],'gmtCreate':_0x471a3f[_0x4ff7e4(0x110)],'gmtModified':_0x471a3f[_0x4ff7e4(0xe2)]};return _0xda583f?.[_0x4ff7e4(0x103)]&&(_0x4d4e8f['value']=_0x471a3f['value']??'',_0x4d4e8f[_0x4ff7e4(0xff)]=![]),_0x4d4e8f;}function a29_0xde90(){const _0x1a86c3=['hasValue','bool','name','App\x20config\x20value\x20source\x20is\x20ambiguous.','2131155nKEFpp','flag','argument','Read\x20config\x20value\x20from\x20stdin','stdin','\x20app\x20config.','operation','boolean','validation','key:\x20','24lwQvFs','18304911LKMqXb','129470vGllDv','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','data','Runtime\x20app-config\x20key','error','Environment\x20variable\x20is\x20not\x20set:\x20','join','slice','once','valueRedacted','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','push','kind','reveal','end','6586784PkhxZx','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','key','utf8','Value\x20file\x20is\x20not\x20readable:\x20','349517PnqZTf','Config\x20tags\x20for\x20filtering/display\x20metadata','tags','path','value','args','gmtCreate','appCode:\x20','1064ftqZAG','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','325068epYTjQ','env','before','trim','Missing\x20app-config\x20value\x20source.','from-env','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','setEncoding','apiError','10QMUEWA','str','url','file','length','after','gmtModified','appCode','string','45906gnIaIv'];a29_0xde90=function(){return _0x1a86c3;};return a29_0xde90();}export function plannedAppConfig(_0x397dad){const _0x1ea437=a29_0x3f3f7b,_0x5c31e2=_0x397dad[_0x1ea437(0xe6)]??!![];return{'appCode':_0x397dad[_0x1ea437(0xe3)],'key':_0x397dad[_0x1ea437(0x107)],'tags':_0x397dad[_0x1ea437(0x10c)]??undefined,'hasValue':_0x5c31e2,'valueRedacted':_0x5c31e2};}export function buildMutationData(_0x1b62d5){const _0x4d2bb9=a29_0x3f3f7b;return{'operation':_0x1b62d5[_0x4d2bb9(0xf0)],'selector':{'appCode':_0x1b62d5[_0x4d2bb9(0xe3)],'key':_0x1b62d5['key']},'before':_0x1b62d5[_0x4d2bb9(0x116)],'after':_0x1b62d5[_0x4d2bb9(0xe1)],'dryRun':_0x1b62d5['dryRun'],'warnings':_0x1b62d5['warnings']??[]};}export async function withAppConfigApiBoundary(_0x2dae6a,_0x3c0fdc,_0x55a490){const _0x5e9ab0=a29_0x3f3f7b;try{return await _0x55a490();}catch{const _0x5be35b=[_0x5e9ab0(0x111)+_0x3c0fdc[_0x5e9ab0(0xe3)]];if(_0x3c0fdc[_0x5e9ab0(0x107)])_0x5be35b[_0x5e9ab0(0x101)](_0x5e9ab0(0xf3)+_0x3c0fdc[_0x5e9ab0(0x107)]);_0x5be35b[_0x5e9ab0(0x101)]('value\x20is\x20redacted');throw CliErrors[_0x5e9ab0(0x11c)]('Failed\x20to\x20'+_0x2dae6a+_0x5e9ab0(0xef),_0x5be35b[_0x5e9ab0(0xfc)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x2892df,_0x35e277){const _0x21d13f=a29_0x3f3f7b;return Object['defineProperties'](_0x2892df,{'method':{'value':_0x35e277['method'],'enumerable':![]},'url':{'value':_0x35e277[_0x21d13f(0xde)],'enumerable':![]}});}export function assertSingleValueSource(_0x1eecc6){const _0x5d1385=a29_0x3f3f7b,_0x5459e7=[];_0x1eecc6['args']['length']>0x1&&_0x5459e7[_0x5d1385(0x101)]({'kind':_0x5d1385(0xec),'value':_0x1eecc6[_0x5d1385(0x10f)][_0x5d1385(0xfd)](0x1)[_0x5d1385(0xfc)]('\x20')});const _0x31f4b7=_0x1eecc6[_0x5d1385(0xeb)](_0x5d1385(0x10e));_0x31f4b7!==undefined&&_0x31f4b7!==null&&_0x5459e7['push']({'kind':_0x5d1385(0xec),'value':String(_0x31f4b7)});_0x1eecc6[_0x5d1385(0xe7)](_0x5d1385(0xee))&&_0x5459e7['push']({'kind':_0x5d1385(0xee)});const _0x16dd37=_0x1eecc6[_0x5d1385(0xdd)]('from-env')[_0x5d1385(0x117)]();_0x16dd37&&_0x5459e7[_0x5d1385(0x101)]({'kind':_0x5d1385(0x115),'name':_0x16dd37});const _0x5f3165=_0x1eecc6[_0x5d1385(0xdd)](_0x5d1385(0xdf))[_0x5d1385(0x117)]();_0x5f3165&&_0x5459e7[_0x5d1385(0x101)]({'kind':_0x5d1385(0xdf),'path':_0x5f3165});if(_0x5459e7[_0x5d1385(0xe0)]===0x0)throw CliErrors[_0x5d1385(0xf2)](_0x5d1385(0x118),'Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x5459e7[_0x5d1385(0xe0)]>0x1)throw CliErrors[_0x5d1385(0xf2)](_0x5d1385(0xe9),_0x5d1385(0x100));return _0x5459e7[0x0];}function a29_0x5731(_0x50a4d3,_0x3e6a68){_0x50a4d3=_0x50a4d3-0xdd;const _0xde90b8=a29_0xde90();let _0x573140=_0xde90b8[_0x50a4d3];return _0x573140;}export async function assertValueSourceReadable(_0x2d1e9a){const _0x37a8c7=a29_0x3f3f7b;if(_0x2d1e9a[_0x37a8c7(0x102)]===_0x37a8c7(0x115)&&!(_0x2d1e9a[_0x37a8c7(0xe8)]in process.env))throw CliErrors[_0x37a8c7(0xf2)](_0x37a8c7(0xfb)+_0x2d1e9a['name']);if(_0x2d1e9a[_0x37a8c7(0x102)]==='file')try{await access(_0x2d1e9a['path']);}catch{throw CliErrors['validation'](_0x37a8c7(0x109)+_0x2d1e9a[_0x37a8c7(0x10d)]);}}export async function readAppConfigValue(_0x32070c){const _0x5d528a=a29_0x3f3f7b,_0x3be7a8=assertSingleValueSource(_0x32070c),_0x928e61=[];if(_0x3be7a8[_0x5d528a(0x102)]===_0x5d528a(0xec))return _0x928e61[_0x5d528a(0x101)](_0x5d528a(0x113)),{'value':_0x3be7a8['value']??'','source':_0x3be7a8[_0x5d528a(0x102)],'warnings':_0x928e61};if(_0x3be7a8['kind']===_0x5d528a(0xee))return{'value':await readStdin(),'source':_0x3be7a8[_0x5d528a(0x102)],'warnings':_0x928e61};if(_0x3be7a8[_0x5d528a(0x102)]===_0x5d528a(0x115)){if(!(_0x3be7a8[_0x5d528a(0xe8)]in process.env))throw CliErrors['validation'](_0x5d528a(0xfb)+_0x3be7a8[_0x5d528a(0xe8)]);return{'value':process.env[_0x3be7a8.name]??'','source':_0x3be7a8['kind'],'warnings':_0x928e61};}return{'value':await readFile(_0x3be7a8[_0x5d528a(0x10d)],_0x5d528a(0x108)),'source':_0x3be7a8[_0x5d528a(0x102)],'warnings':_0x928e61};}function readStdin(){return new Promise((_0x1031a5,_0x2a2f02)=>{const _0x568757=a29_0x5731;let _0x25341e='';process[_0x568757(0xee)][_0x568757(0x11b)](_0x568757(0x108)),process[_0x568757(0xee)]['on'](_0x568757(0xf8),_0x48381a=>{_0x25341e+=_0x48381a;}),process['stdin'][_0x568757(0xfe)](_0x568757(0x104),()=>_0x1031a5(_0x25341e)),process['stdin']['once'](_0x568757(0xfa),_0x2a2f02);});}
@@ -1 +1 @@
1
- const a30_0x2a1591=a30_0x5b4c;(function(_0x1d367f,_0x1ffb90){const _0x46cf51=a30_0x5b4c,_0xa81f58=_0x1d367f();while(!![]){try{const _0x2de425=-parseInt(_0x46cf51(0x1d7))/0x1+parseInt(_0x46cf51(0x1d9))/0x2*(-parseInt(_0x46cf51(0x1ca))/0x3)+parseInt(_0x46cf51(0x1d4))/0x4+parseInt(_0x46cf51(0x1cb))/0x5*(parseInt(_0x46cf51(0x1d6))/0x6)+parseInt(_0x46cf51(0x1d3))/0x7*(-parseInt(_0x46cf51(0x1d8))/0x8)+parseInt(_0x46cf51(0x1d5))/0x9+parseInt(_0x46cf51(0x1dc))/0xa;if(_0x2de425===_0x1ffb90)break;else _0xa81f58['push'](_0xa81f58['shift']());}catch(_0x2fc3b0){_0xa81f58['push'](_0xa81f58['shift']());}}}(a30_0x519f,0xc9dc0));import{unlinkSync,existsSync}from'node:fs';function a30_0x5b4c(_0x103cac,_0x412358){_0x103cac=_0x103cac-0x1c8;const _0x519fea=a30_0x519f();let _0x5b4ce7=_0x519fea[_0x103cac];return _0x5b4ce7;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x2a1591(0x1d2),'command':a30_0x2a1591(0x1d0),'description':a30_0x2a1591(0x1cd),'risk':a30_0x2a1591(0x1d1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x2a1591(0x1c8),'type':'boolean','description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x5533ca){const _0x303214=a30_0x2a1591,{runAuthServer:_0xc35fbd}=await import(_0x303214(0x1da));return await _0xc35fbd({'autoYes':_0x5533ca[_0x303214(0x1de)](_0x303214(0x1c8)),'nonInteractive':_0x5533ca[_0x303214(0x1cc)]}),{'ok':!![]};}},{'service':'auth','command':a30_0x2a1591(0x1cf),'description':a30_0x2a1591(0x1ce),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xa944ba){const _0x14b3fe=a30_0x2a1591;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x14b3fe(0x1db)](_0x14b3fe(0x1c9))):console[_0x14b3fe(0x1db)](_0x14b3fe(0x1dd)),{'ok':!![]};}}];function a30_0x519f(){const _0x2447f9=['log','13558470KOMBuq','!\x20Not\x20logged\x20in','bool','yes','✓\x20Logged\x20out','1773LJPGAK','515rxjhEC','nonInteractive','Login\x20via\x20browser','Clear\x20login\x20session','logout','login','write','auth','245721ycYWiH','5331260GbuASE','7504344BafUXk','59802pUPybi','1568386iPWNkX','272RawfLO','3250UpIwVr','../../auth/auth-server-ui.js'];a30_0x519f=function(){return _0x2447f9;};return a30_0x519f();}
1
+ function a30_0x25d2(){const _0x94558c=['yes','logout','log','bool','Login\x20via\x20browser','../../auth/auth-server-ui.js','2467764XMKzdT','15LJONJV','boolean','8623626EWmoSd','!\x20Not\x20logged\x20in','4WjiVwD','7WfvgPq','9826192vquxTf','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','Clear\x20login\x20session','write','auth','135561XCLLmS','37930997ICCfNA','1VuILGA','✓\x20Logged\x20out','nonInteractive','login','684952SVieYp','12uFKLoU','60atAaZH','283428vIPGUf'];a30_0x25d2=function(){return _0x94558c;};return a30_0x25d2();}const a30_0x5d747c=a30_0x4cdf;(function(_0x645a85,_0x488650){const _0x122865=a30_0x4cdf,_0xf20a28=_0x645a85();while(!![]){try{const _0x2f4442=parseInt(_0x122865(0x19e))/0x1*(-parseInt(_0x122865(0x1a2))/0x2)+parseInt(_0x122865(0x19c))/0x3*(parseInt(_0x122865(0x1b1))/0x4)+parseInt(_0x122865(0x1ad))/0x5*(-parseInt(_0x122865(0x1ac))/0x6)+parseInt(_0x122865(0x196))/0x7*(-parseInt(_0x122865(0x197))/0x8)+-parseInt(_0x122865(0x1a5))/0x9*(parseInt(_0x122865(0x1a4))/0xa)+parseInt(_0x122865(0x1af))/0xb+parseInt(_0x122865(0x1a3))/0xc*(parseInt(_0x122865(0x19d))/0xd);if(_0x2f4442===_0x488650)break;else _0xf20a28['push'](_0xf20a28['shift']());}catch(_0x5e2c55){_0xf20a28['push'](_0xf20a28['shift']());}}}(a30_0x25d2,0xb7eba));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';function a30_0x4cdf(_0x36b616,_0x314708){_0x36b616=_0x36b616-0x196;const _0x25d2d1=a30_0x25d2();let _0x4cdf05=_0x25d2d1[_0x36b616];return _0x4cdf05;}export const authDefinitions=[{'service':'auth','command':a30_0x5d747c(0x1a1),'description':a30_0x5d747c(0x1aa),'risk':a30_0x5d747c(0x19a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x5d747c(0x1a6),'type':a30_0x5d747c(0x1ae),'description':a30_0x5d747c(0x198),'default':![]}],async 'execute'(_0x341889){const _0x312cb0=a30_0x5d747c,{runAuthServer:_0x220478}=await import(_0x312cb0(0x1ab));return await _0x220478({'autoYes':_0x341889[_0x312cb0(0x1a9)]('yes'),'nonInteractive':_0x341889[_0x312cb0(0x1a0)]}),{'ok':!![]};}},{'service':a30_0x5d747c(0x19b),'command':a30_0x5d747c(0x1a7),'description':a30_0x5d747c(0x199),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xa53e41){const _0x422b06=a30_0x5d747c;return existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x422b06(0x19f))):console[_0x422b06(0x1a8)](_0x422b06(0x1b0)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a31_0x4fb490=a31_0x881a;(function(_0x4fdcc3,_0x47f576){const _0x5d0b87=a31_0x881a,_0x3871a2=_0x4fdcc3();while(!![]){try{const _0x3867ad=parseInt(_0x5d0b87(0xee))/0x1*(-parseInt(_0x5d0b87(0xfb))/0x2)+-parseInt(_0x5d0b87(0xd2))/0x3+parseInt(_0x5d0b87(0xb9))/0x4*(-parseInt(_0x5d0b87(0xa7))/0x5)+parseInt(_0x5d0b87(0xe2))/0x6*(parseInt(_0x5d0b87(0xaa))/0x7)+-parseInt(_0x5d0b87(0xe1))/0x8+-parseInt(_0x5d0b87(0xac))/0x9*(-parseInt(_0x5d0b87(0xea))/0xa)+-parseInt(_0x5d0b87(0xe3))/0xb*(-parseInt(_0x5d0b87(0xf5))/0xc);if(_0x3867ad===_0x47f576)break;else _0x3871a2['push'](_0x3871a2['shift']());}catch(_0x189893){_0x3871a2['push'](_0x3871a2['shift']());}}}(a31_0x37fc,0x20584));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a31_0x881a(_0x35f4f0,_0x537bce){_0x35f4f0=_0x35f4f0-0x95;const _0x37fc75=a31_0x37fc();let _0x881a16=_0x37fc75[_0x35f4f0];return _0x881a16;}import{getAppBaseUrl}from'../../constant/domain.js';function a31_0x37fc(){const _0x420072=['scriptsRootDir','当前响应结果','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','utf8','before','.js\x0a\x20*\x20[触发节点]\x20','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','No\x20operation\x20types\x20found\x20for\x20dataset\x20','1518yKPWmS','join','Trigger\x20node\x20(HOOK\x20only)','COMMON','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','Created\x20','Select\x20dataset:','Operation\x20type\x20(HOOK\x20only)','appCode','keys','/ENDPOINT/','str','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','.js\x0a','map','887576HOVZAI','6uOxWzY','11nlHCVx','/**\x0a\x20*\x20','Invalid\x20dataset\x20selection.','operationType','HOOK\x20requires\x20alias/operation/node\x20options.','parseInt','after','41630UDIccP','create',']\x20(','\x22.\x20','10856tZoIIv','修改后的请求参数','includes','operation-type','No\x20api.ts\x20found.\x20Run\x20`','source','type','4909572iIGOOm','description','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','length','trim','name','24KlWHmu','close','当前请求参数','/HOOK/','write','\x0a\x20*\x20[平台配置]\x20','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','datasetCode','/data/dataset/','find','function-node','apiDir','Select\x20operation\x20type:','.js','alias','nonInteractive','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','functionNode','\x22\x20not\x20found\x20for\x20dataset\x20','Dataset\x20not\x20found\x20for\x20code\x20\x22','ENDPOINT','tableName','10zXeakp','Available\x20aliases:\x20','No\x20datasets\x20found\x20for\x20this\x20app.','124061uvEhJk','Script\x20description','297xjDxFe','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','\x22,\x20params\x20})\x0a','Available:\x20','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','\x22\x20not\x20found.\x20','bff','Function\x20name\x20(valid\x20JS\x20identifier)','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','Select\x20trigger\x20node:','stderr','\x0a\x20*\x20[参数字段]\x20按实际请求体为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20HTTP\x20请求体参数\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20TODO:\x20补充业务返回数据结构\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','380048LNfncU','validation','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','datasetcode','stdin','Operation\x20type\x20\x22','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','Invalid\x20function\x20name\x20\x22','string','Script\x20type','code','entries','HOOK','isInteger','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.'];a31_0x37fc=function(){return _0x420072;};return a31_0x37fc();}export const bffCreate={'service':a31_0x4fb490(0xb2),'command':a31_0x4fb490(0xeb),'description':a31_0x4fb490(0x97),'risk':'read','flags':[{'name':a31_0x4fb490(0xf4),'type':a31_0x4fb490(0xc1),'required':!![],'enum':[a31_0x4fb490(0xd5),a31_0x4fb490(0xa5),a31_0x4fb490(0xc5)],'description':a31_0x4fb490(0xc2)},{'name':a31_0x4fb490(0xfa),'type':a31_0x4fb490(0xc1),'required':!![],'description':a31_0x4fb490(0xb3)},{'name':'description','type':a31_0x4fb490(0xc1),'description':a31_0x4fb490(0xab)},{'name':a31_0x4fb490(0x9f),'type':'string','description':a31_0x4fb490(0xb0)},{'name':a31_0x4fb490(0xbc),'type':a31_0x4fb490(0xc1),'description':'Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)'},{'name':'operation-type','type':'string','description':a31_0x4fb490(0xd9)},{'name':a31_0x4fb490(0x9b),'type':'string','description':a31_0x4fb490(0xd4),'enum':[a31_0x4fb490(0xce),a31_0x4fb490(0xe9)]}],async 'validate'(_0x362066){const _0x28e25e=a31_0x4fb490,_0x35aae4=_0x362066[_0x28e25e(0xdd)](_0x28e25e(0xfa));if(!isValidBffFunctionName(_0x35aae4))throw CliErrors[_0x28e25e(0xba)](_0x28e25e(0xc0)+_0x35aae4+_0x28e25e(0xad));},async 'execute'(_0x143312){const _0x419e04=a31_0x4fb490,_0x1cf5d9=loadBffProjectConfig(_0x143312[_0x419e04(0xda)]),_0x59de53=_0x143312[_0x419e04(0xdd)](_0x419e04(0xf4)),_0x4ec27a=_0x143312['str']('name'),_0x36a384=_0x143312['str'](_0x419e04(0xf6))||undefined,_0x5248ef=_0x59de53===_0x419e04(0xc5)?await resolveHookOptions(_0x1cf5d9,_0x143312):undefined,_0x5b9d14=buildFilePath(_0x1cf5d9,_0x59de53,_0x4ec27a,_0x5248ef);if(await fileExists(_0x5b9d14))throw CliErrors[_0x419e04(0xba)]('File\x20already\x20exists:\x20'+_0x5b9d14);await mkdir(dirname(_0x5b9d14),{'recursive':!![]});const _0x287f70=generateTemplate(_0x59de53,_0x4ec27a,_0x143312[_0x419e04(0xda)],_0x36a384,_0x5248ef);await writeFile(_0x5b9d14,_0x287f70,_0x419e04(0xcd));const _0x5bea5c={'type':_0x59de53,'name':_0x4ec27a,'path':_0x5b9d14};if(_0x36a384)_0x5bea5c[_0x419e04(0xf6)]=_0x36a384;if(_0x5248ef){if(_0x5248ef[_0x419e04(0x9f)])_0x5bea5c[_0x419e04(0x9f)]=_0x5248ef[_0x419e04(0x9f)];_0x5bea5c[_0x419e04(0x98)]=_0x5248ef[_0x419e04(0x98)],_0x5bea5c['operationType']=_0x5248ef[_0x419e04(0xe6)],_0x5bea5c[_0x419e04(0xa2)]=_0x5248ef[_0x419e04(0xa2)];}return{'ok':!![],'data':_0x5bea5c,'message':_0x419e04(0xd7)+_0x59de53+'\x20function:\x20'+_0x4ec27a};}};async function resolveHookOptions(_0x15fb2c,_0x2268d5){const _0x183e84=a31_0x4fb490,_0x5107ef=loadAliasMap(_0x2268d5[_0x183e84(0x9c)],undefined,resolveApiFilePath(_0x2268d5[_0x183e84(0x9c)],_0x2268d5[_0x183e84(0xda)])),_0x40bf28=_0x5107ef['length']>0x0;let _0x293489,_0x17b3b3,_0x50b297;const _0x10084b=_0x2268d5[_0x183e84(0xdd)](_0x183e84(0x9f)),_0x536e98=_0x2268d5[_0x183e84(0xdd)](_0x183e84(0xbc));if(_0x10084b){const _0x2ae99d=resolveAlias(_0x2268d5['apiDir'],_0x10084b,undefined,resolveApiFilePath(_0x2268d5['apiDir'],_0x2268d5[_0x183e84(0xda)]));if(!_0x2ae99d){const _0x1d7391=_0x40bf28?_0x183e84(0xa8)+_0x5107ef[_0x183e84(0xe0)](_0x501ada=>_0x501ada[_0x183e84(0x9f)])[_0x183e84(0xd3)](',\x20'):_0x183e84(0xf2)+CLI_BIN_NAME+_0x183e84(0xc9);throw CliErrors[_0x183e84(0xba)]('Alias\x20\x22'+_0x10084b+_0x183e84(0xb1)+_0x1d7391);}_0x293489=_0x10084b,_0x17b3b3=_0x2ae99d;}else{if(_0x536e98){_0x17b3b3=_0x536e98;const _0x10c3f2=_0x5107ef['find'](_0x1a3ec4=>_0x1a3ec4[_0x183e84(0x98)]===_0x536e98);_0x293489=_0x10c3f2?.[_0x183e84(0x9f)];}else{if(_0x2268d5['nonInteractive'])throw CliErrors[_0x183e84(0xba)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x40bf28){const _0x442706=_0x5107ef['map'](_0x2ba527=>_0x2ba527[_0x183e84(0x9f)]+'\x20('+_0x2ba527[_0x183e84(0xa6)]+')'),_0xdec1ba=await promptSelect(_0x183e84(0xd8),_0x442706),_0x2a6c53=_0x5107ef[_0xdec1ba];if(!_0x2a6c53)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xe5));_0x293489=_0x2a6c53['alias'],_0x17b3b3=_0x2a6c53[_0x183e84(0x98)];}else{const _0x3c2b0d=await listDatasets(_0x2268d5['appCode']);if(_0x3c2b0d[_0x183e84(0xf8)]===0x0)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xa9));const _0x1dfa91=_0x3c2b0d['map'](_0x1dde46=>_0x1dde46[_0x183e84(0xfa)]+'\x20['+(_0x1dde46[_0x183e84(0xf3)]??'UNKNOWN')+_0x183e84(0xec)+_0x1dde46[_0x183e84(0xc3)]+')'),_0x4eaafc=await promptSelect(_0x183e84(0xd8),_0x1dfa91),_0x32546b=_0x3c2b0d[_0x4eaafc];if(!_0x32546b)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xe5));_0x17b3b3=_0x32546b[_0x183e84(0xc3)],_0x293489=undefined;}}}}const _0x52c027=await listDatasets(_0x2268d5['appCode']),_0x3a6805=_0x52c027[_0x183e84(0x9a)](_0x47183a=>_0x47183a[_0x183e84(0xc3)]===_0x17b3b3);if(!_0x3a6805)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xa4)+_0x17b3b3+_0x183e84(0xed)+(_0x293489?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x50b297=_0x3a6805['id'];const _0x4cd67f=_0x293489??_0x17b3b3,_0x43395a=await listBffDatasetOperations(_0x2268d5['appCode'],_0x50b297),_0x371616=_0x43395a?Object[_0x183e84(0xdb)](_0x43395a):[];if(_0x371616['length']===0x0)throw CliErrors[_0x183e84(0xba)](_0x183e84(0xd1)+_0x4cd67f+'.');let _0x5c2463;const _0x34f38e=_0x2268d5[_0x183e84(0xdd)](_0x183e84(0xf1));if(_0x34f38e){if(!_0x371616[_0x183e84(0xf0)](_0x34f38e))throw CliErrors[_0x183e84(0xba)](_0x183e84(0xbe)+_0x34f38e+_0x183e84(0xa3)+_0x4cd67f+'.\x20'+(_0x183e84(0xaf)+_0x371616[_0x183e84(0xd3)](',\x20')));_0x5c2463=_0x34f38e;}else{if(_0x2268d5['nonInteractive'])throw CliErrors[_0x183e84(0xba)](_0x183e84(0xc7));const _0x247701=await promptSelect(_0x183e84(0x9d),_0x371616);_0x5c2463=_0x371616[_0x247701]??_0x371616[0x0];}let _0x572c11=normalizeHookFunctionNode(_0x2268d5['str'](_0x183e84(0x9b)));if(!_0x572c11){if(_0x2268d5[_0x183e84(0xdd)](_0x183e84(0x9b)))throw CliErrors[_0x183e84(0xba)](_0x183e84(0xcc));if(_0x2268d5[_0x183e84(0xa0)])throw CliErrors['validation'](_0x183e84(0xc8));const _0x38638d=await promptSelect(_0x183e84(0xb5),['before',_0x183e84(0xe9)]);_0x572c11=[_0x183e84(0xce),_0x183e84(0xe9)][_0x38638d]??_0x183e84(0xce);}return{'alias':_0x293489,'datasetCode':_0x17b3b3,'datasetId':_0x50b297,'operationType':_0x5c2463,'functionNode':_0x572c11};}async function promptSelect(_0x9b2b08,_0x5a9205){const _0x4a87c4=a31_0x4fb490;if(_0x5a9205[_0x4a87c4(0xf8)]===0x1)return 0x0;for(const [_0x1c1ed8,_0x44f74f]of _0x5a9205[_0x4a87c4(0xc4)]()){process[_0x4a87c4(0xb6)][_0x4a87c4(0x95)]('\x20\x20'+(_0x1c1ed8+0x1)+'.\x20'+_0x44f74f+'\x0a');}const _0x2b39ba=createInterface({'input':process[_0x4a87c4(0xbd)],'output':process['stderr']});while(!![]){const _0x5ea869=await new Promise(_0x333ede=>{_0x2b39ba['question'](_0x9b2b08+'\x20',_0x333ede);}),_0x96f31e=Number[_0x4a87c4(0xe8)](_0x5ea869[_0x4a87c4(0xf9)](),0xa);if(Number[_0x4a87c4(0xc6)](_0x96f31e)&&_0x96f31e>=0x1&&_0x96f31e<=_0x5a9205['length'])return _0x2b39ba[_0x4a87c4(0xfc)](),_0x96f31e-0x1;process['stderr'][_0x4a87c4(0x95)]('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x5a9205[_0x4a87c4(0xf8)]+'.\x0a');}}function buildFilePath(_0x51692a,_0x59f611,_0x52515e,_0x3c44d4){const _0x2435a6=a31_0x4fb490;if(_0x59f611==='HOOK'){if(!_0x3c44d4)throw CliErrors[_0x2435a6(0xba)](_0x2435a6(0xe7));const _0x1ae3c4=_0x3c44d4[_0x2435a6(0x9f)]??_0x3c44d4[_0x2435a6(0x98)];return join(_0x51692a[_0x2435a6(0xca)],_0x2435a6(0xc5),_0x1ae3c4,_0x3c44d4[_0x2435a6(0xe6)],_0x3c44d4[_0x2435a6(0xa2)],_0x52515e+_0x2435a6(0x9e));}return join(_0x51692a['scriptsRootDir'],_0x59f611,_0x52515e+_0x2435a6(0x9e));}export function generateTemplate(_0x2e5c94,_0x1d7ae1,_0x27001a,_0x1eda3b,_0x17392d){const _0x519f15=a31_0x4fb490,_0x367f36=_0x1eda3b?.[_0x519f15(0xf9)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0xddf32d=getAppBaseUrl(_0x27001a),_0x35dc84='\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)';if(_0x2e5c94==='COMMON')return _0x519f15(0xe4)+_0x367f36+_0x519f15(0xa1)+_0x1d7ae1+_0x519f15(0x96)+_0xddf32d+_0x519f15(0xd0)+_0x27001a+'/COMMON/'+_0x1d7ae1+_0x519f15(0xd6)+_0x1d7ae1+_0x519f15(0xae)+_0x35dc84+'\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20请求参数\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20TODO:\x20补充返回数据结构\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x1d7ae1+_0x519f15(0xf7);if(_0x2e5c94===_0x519f15(0xa5))return _0x519f15(0xe4)+_0x367f36+_0x519f15(0xb8)+_0x1d7ae1+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/'+_0x27001a+'/'+_0x1d7ae1+_0x519f15(0x96)+_0xddf32d+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x27001a+_0x519f15(0xdc)+_0x1d7ae1+_0x519f15(0xdf)+_0x35dc84+_0x519f15(0xb7)+_0x1d7ae1+_0x519f15(0xf7);if(!_0x17392d)throw CliErrors[_0x519f15(0xba)](_0x519f15(0xb4));const _0x2432fd=_0x17392d[_0x519f15(0x9f)]??_0x17392d[_0x519f15(0x98)],_0x59b163=_0x17392d[_0x519f15(0xa2)]===_0x519f15(0xce)?_0x519f15(0xfd):_0x519f15(0xcb),_0x409e62=_0x17392d[_0x519f15(0xa2)]===_0x519f15(0xce)?_0x519f15(0xef):'修改后的响应结果';return _0x519f15(0xe4)+_0x367f36+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20'+_0x1d7ae1+_0x519f15(0xde)+_0x27001a+'/'+_0x17392d['datasetCode']+'/'+_0x17392d[_0x519f15(0xe6)]+_0x519f15(0x96)+_0xddf32d+_0x519f15(0x99)+_0x17392d['datasetId']+_0x519f15(0xbb)+_0x27001a+_0x519f15(0xfe)+_0x2432fd+'/'+_0x17392d[_0x519f15(0xe6)]+'/'+_0x17392d[_0x519f15(0xa2)]+'/'+_0x1d7ae1+_0x519f15(0xcf)+_0x17392d['functionNode']+'\x0a'+_0x35dc84+_0x519f15(0xbf)+_0x59b163+'\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20'+_0x409e62+'\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x1d7ae1+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
1
+ const a31_0x50caba=a31_0x26df;(function(_0x479532,_0x40c860){const _0x105bac=a31_0x26df,_0x34aa5c=_0x479532();while(!![]){try{const _0x29c95f=parseInt(_0x105bac(0x18c))/0x1+parseInt(_0x105bac(0x18e))/0x2*(-parseInt(_0x105bac(0x198))/0x3)+parseInt(_0x105bac(0x195))/0x4+parseInt(_0x105bac(0x1b9))/0x5+-parseInt(_0x105bac(0x1a5))/0x6*(parseInt(_0x105bac(0x19d))/0x7)+-parseInt(_0x105bac(0x18d))/0x8*(-parseInt(_0x105bac(0x1dc))/0x9)+parseInt(_0x105bac(0x187))/0xa;if(_0x29c95f===_0x40c860)break;else _0x34aa5c['push'](_0x34aa5c['shift']());}catch(_0x5d69c4){_0x34aa5c['push'](_0x34aa5c['shift']());}}}(a31_0x1312,0x209d9));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';function a31_0x1312(){const _0x3e0872=['join','HOOK\x20requires\x20alias/operation/node\x20options.','.js\x0a\x20*\x20[触发节点]\x20','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','str','keys','No\x20datasets\x20found\x20for\x20this\x20app.','datasetId','390130PojfPM','map','/HOOK/','\x22.\x20','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','No\x20api.ts\x20found.\x20Run\x20`','nonInteractive','修改后的请求参数','appCode','Select\x20operation\x20type:','\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','trim','string','.js','after','Select\x20trigger\x20node:','question','length','stdin','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Invalid\x20dataset\x20selection.','validation','tableName','functionNode','\x20*\x20[依赖数据集]\x20无(如有依赖,DB_TABLE\x20填物理表名;METADATA\x20填数据集编码与用途)\x0a\x20*\x20[调用\x20BF]\x20无(如有调用,填写脚本名称与用途)\x0a\x20*\x20[执行\x20SQL]\x20无(如有执行,填写\x20SQL\x20名称与用途)\x0a\x20*\x20[副作用]\x20无(如有通知或外部调用,说明影响与失败策略)','/COMMON/','apiDir','Select\x20dataset:','isInteger','name','修改后的响应结果','utf8','No\x20operation\x20types\x20found\x20for\x20dataset\x20','418959OxUPAG','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','.js\x0a','stderr','close','before','当前响应结果','\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[平台配置]\x20','/data/dataset/','Operation\x20type\x20(HOOK\x20only)','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Trigger\x20node\x20(HOOK\x20only)','description','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','operation-type','alias','scriptsRootDir','write','1020160WqltbI','\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','\x22,\x20params\x20})\x0a','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20',']\x20(','194618dDCZaP','8mIJClO','2SIgDRg','COMMON','code','includes','\x20api\x20pull`\x20to\x20refresh.','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','222884CFMIow','Created\x20','bff','382191nHyJPx','/**\x0a\x20*\x20','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','operationType','ENDPOINT','7ZWlAxg','datasetCode','Alias\x20\x22','\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','type','\x22\x20not\x20found\x20for\x20dataset\x20','function-node','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','1295652WCLgKR','File\x20already\x20exists:\x20','Script\x20type','/ENDPOINT/','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','HOOK','Invalid\x20function\x20name\x20\x22','Dataset\x20not\x20found\x20for\x20code\x20\x22','Operation\x20type\x20\x22','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Script\x20description','find'];a31_0x1312=function(){return _0x3e0872;};return a31_0x1312();}import{resolveApiFilePath}from'../../context.js';function a31_0x26df(_0x8796a9,_0x9a2a36){_0x8796a9=_0x8796a9-0x176;const _0x131217=a31_0x1312();let _0x26df4c=_0x131217[_0x8796a9];return _0x26df4c;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':a31_0x50caba(0x197),'command':'create','description':a31_0x50caba(0x182),'risk':'read','flags':[{'name':a31_0x50caba(0x1a1),'type':a31_0x50caba(0x1c5),'required':!![],'enum':[a31_0x50caba(0x18f),a31_0x50caba(0x19c),a31_0x50caba(0x1aa)],'description':a31_0x50caba(0x1a7)},{'name':'name','type':a31_0x50caba(0x1c5),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0x50caba(0x181),'type':'string','description':a31_0x50caba(0x1af)},{'name':a31_0x50caba(0x184),'type':'string','description':a31_0x50caba(0x1a9)},{'name':'datasetcode','type':'string','description':a31_0x50caba(0x1b4)},{'name':a31_0x50caba(0x183),'type':'string','description':a31_0x50caba(0x17e)},{'name':'function-node','type':a31_0x50caba(0x1c5),'description':a31_0x50caba(0x180),'enum':[a31_0x50caba(0x179),a31_0x50caba(0x1c7)]}],async 'validate'(_0x1d2712){const _0x165444=a31_0x50caba,_0x58bc59=_0x1d2712['str'](_0x165444(0x1d8));if(!isValidBffFunctionName(_0x58bc59))throw CliErrors[_0x165444(0x1d0)](_0x165444(0x1ab)+_0x58bc59+_0x165444(0x193));},async 'execute'(_0x23bb61){const _0x369fd7=a31_0x50caba,_0x53161a=loadBffProjectConfig(_0x23bb61[_0x369fd7(0x1c1)]),_0xfa163f=_0x23bb61[_0x369fd7(0x1b5)](_0x369fd7(0x1a1)),_0x1e737d=_0x23bb61[_0x369fd7(0x1b5)](_0x369fd7(0x1d8)),_0x5d1ea1=_0x23bb61[_0x369fd7(0x1b5)](_0x369fd7(0x181))||undefined,_0x96d584=_0xfa163f===_0x369fd7(0x1aa)?await resolveHookOptions(_0x53161a,_0x23bb61):undefined,_0x5722a6=buildFilePath(_0x53161a,_0xfa163f,_0x1e737d,_0x96d584);if(await fileExists(_0x5722a6))throw CliErrors['validation'](_0x369fd7(0x1a6)+_0x5722a6);await mkdir(dirname(_0x5722a6),{'recursive':!![]});const _0x2e6e75=generateTemplate(_0xfa163f,_0x1e737d,_0x23bb61[_0x369fd7(0x1c1)],_0x5d1ea1,_0x96d584);await writeFile(_0x5722a6,_0x2e6e75,_0x369fd7(0x1da));const _0x2bf052={'type':_0xfa163f,'name':_0x1e737d,'path':_0x5722a6};if(_0x5d1ea1)_0x2bf052['description']=_0x5d1ea1;if(_0x96d584){if(_0x96d584['alias'])_0x2bf052['alias']=_0x96d584['alias'];_0x2bf052[_0x369fd7(0x19e)]=_0x96d584[_0x369fd7(0x19e)],_0x2bf052[_0x369fd7(0x19b)]=_0x96d584['operationType'],_0x2bf052[_0x369fd7(0x1d2)]=_0x96d584['functionNode'];}return{'ok':!![],'data':_0x2bf052,'message':_0x369fd7(0x196)+_0xfa163f+'\x20function:\x20'+_0x1e737d};}};async function resolveHookOptions(_0x5b471b,_0x1567ac){const _0x2ac6c7=a31_0x50caba,_0x410479=loadAliasMap(_0x1567ac['apiDir'],undefined,resolveApiFilePath(_0x1567ac[_0x2ac6c7(0x1d5)],_0x1567ac[_0x2ac6c7(0x1c1)])),_0x1f8436=_0x410479[_0x2ac6c7(0x1ca)]>0x0;let _0x55e6a2,_0x4f6d40,_0x13cee1;const _0x4c2613=_0x1567ac[_0x2ac6c7(0x1b5)](_0x2ac6c7(0x184)),_0x49acba=_0x1567ac[_0x2ac6c7(0x1b5)]('datasetcode');if(_0x4c2613){const _0x4bf6c4=resolveAlias(_0x1567ac[_0x2ac6c7(0x1d5)],_0x4c2613,undefined,resolveApiFilePath(_0x1567ac[_0x2ac6c7(0x1d5)],_0x1567ac['appCode']));if(!_0x4bf6c4){const _0x5356b8=_0x1f8436?'Available\x20aliases:\x20'+_0x410479['map'](_0x5a7d7e=>_0x5a7d7e[_0x2ac6c7(0x184)])[_0x2ac6c7(0x1b1)](',\x20'):_0x2ac6c7(0x1be)+CLI_BIN_NAME+_0x2ac6c7(0x19a);throw CliErrors[_0x2ac6c7(0x1d0)](_0x2ac6c7(0x19f)+_0x4c2613+'\x22\x20not\x20found.\x20'+_0x5356b8);}_0x55e6a2=_0x4c2613,_0x4f6d40=_0x4bf6c4;}else{if(_0x49acba){_0x4f6d40=_0x49acba;const _0x302c75=_0x410479[_0x2ac6c7(0x1b0)](_0xc29bd6=>_0xc29bd6[_0x2ac6c7(0x19e)]===_0x49acba);_0x55e6a2=_0x302c75?.[_0x2ac6c7(0x184)];}else{if(_0x1567ac['nonInteractive'])throw CliErrors[_0x2ac6c7(0x1d0)](_0x2ac6c7(0x1ce));else{if(_0x1f8436){const _0x486963=_0x410479[_0x2ac6c7(0x1ba)](_0x41d44e=>_0x41d44e[_0x2ac6c7(0x184)]+'\x20('+_0x41d44e[_0x2ac6c7(0x1d1)]+')'),_0x12d1b1=await promptSelect('Select\x20dataset:',_0x486963),_0x5b80d6=_0x410479[_0x12d1b1];if(!_0x5b80d6)throw CliErrors[_0x2ac6c7(0x1d0)]('Invalid\x20dataset\x20selection.');_0x55e6a2=_0x5b80d6[_0x2ac6c7(0x184)],_0x4f6d40=_0x5b80d6[_0x2ac6c7(0x19e)];}else{const _0x3c00aa=await listDatasets(_0x1567ac[_0x2ac6c7(0x1c1)]);if(_0x3c00aa[_0x2ac6c7(0x1ca)]===0x0)throw CliErrors['validation'](_0x2ac6c7(0x1b7));const _0x324488=_0x3c00aa[_0x2ac6c7(0x1ba)](_0x36aa55=>_0x36aa55[_0x2ac6c7(0x1d8)]+'\x20['+(_0x36aa55['source']??'UNKNOWN')+_0x2ac6c7(0x18b)+_0x36aa55['code']+')'),_0x39404d=await promptSelect(_0x2ac6c7(0x1d6),_0x324488),_0x2d4953=_0x3c00aa[_0x39404d];if(!_0x2d4953)throw CliErrors[_0x2ac6c7(0x1d0)](_0x2ac6c7(0x1cf));_0x4f6d40=_0x2d4953['code'],_0x55e6a2=undefined;}}}}const _0x534f43=await listDatasets(_0x1567ac[_0x2ac6c7(0x1c1)]),_0x306fc1=_0x534f43[_0x2ac6c7(0x1b0)](_0x27da5d=>_0x27da5d[_0x2ac6c7(0x190)]===_0x4f6d40);if(!_0x306fc1)throw CliErrors[_0x2ac6c7(0x1d0)](_0x2ac6c7(0x1ac)+_0x4f6d40+_0x2ac6c7(0x1bc)+(_0x55e6a2?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+_0x2ac6c7(0x192):''));_0x13cee1=_0x306fc1['id'];const _0x37f2e9=_0x55e6a2??_0x4f6d40,_0x564f98=await listBffDatasetOperations(_0x1567ac['appCode'],_0x13cee1),_0x1033a8=_0x564f98?Object[_0x2ac6c7(0x1b6)](_0x564f98):[];if(_0x1033a8[_0x2ac6c7(0x1ca)]===0x0)throw CliErrors[_0x2ac6c7(0x1d0)](_0x2ac6c7(0x1db)+_0x37f2e9+'.');let _0x13ced3;const _0x8c6ee3=_0x1567ac[_0x2ac6c7(0x1b5)](_0x2ac6c7(0x183));if(_0x8c6ee3){if(!_0x1033a8[_0x2ac6c7(0x191)](_0x8c6ee3))throw CliErrors[_0x2ac6c7(0x1d0)](_0x2ac6c7(0x1ad)+_0x8c6ee3+_0x2ac6c7(0x1a2)+_0x37f2e9+'.\x20'+('Available:\x20'+_0x1033a8[_0x2ac6c7(0x1b1)](',\x20')));_0x13ced3=_0x8c6ee3;}else{if(_0x1567ac[_0x2ac6c7(0x1bf)])throw CliErrors[_0x2ac6c7(0x1d0)](_0x2ac6c7(0x17f));const _0x1e45ce=await promptSelect(_0x2ac6c7(0x1c2),_0x1033a8);_0x13ced3=_0x1033a8[_0x1e45ce]??_0x1033a8[0x0];}let _0x2d25fe=normalizeHookFunctionNode(_0x1567ac[_0x2ac6c7(0x1b5)]('function-node'));if(!_0x2d25fe){if(_0x1567ac[_0x2ac6c7(0x1b5)](_0x2ac6c7(0x1a3)))throw CliErrors[_0x2ac6c7(0x1d0)](_0x2ac6c7(0x1cd));if(_0x1567ac[_0x2ac6c7(0x1bf)])throw CliErrors[_0x2ac6c7(0x1d0)](_0x2ac6c7(0x1dd));const _0xa7b599=await promptSelect(_0x2ac6c7(0x1c8),['before',_0x2ac6c7(0x1c7)]);_0x2d25fe=[_0x2ac6c7(0x179),_0x2ac6c7(0x1c7)][_0xa7b599]??_0x2ac6c7(0x179);}return{'alias':_0x55e6a2,'datasetCode':_0x4f6d40,'datasetId':_0x13cee1,'operationType':_0x13ced3,'functionNode':_0x2d25fe};}async function promptSelect(_0x35412f,_0x2ed7c9){const _0x1050c7=a31_0x50caba;if(_0x2ed7c9[_0x1050c7(0x1ca)]===0x1)return 0x0;for(const [_0x1aada5,_0x4c66e0]of _0x2ed7c9['entries']()){process[_0x1050c7(0x177)][_0x1050c7(0x186)]('\x20\x20'+(_0x1aada5+0x1)+'.\x20'+_0x4c66e0+'\x0a');}const _0x127b8a=createInterface({'input':process[_0x1050c7(0x1cb)],'output':process[_0x1050c7(0x177)]});while(!![]){const _0x3c6205=await new Promise(_0x508c40=>{const _0x40dc4f=_0x1050c7;_0x127b8a[_0x40dc4f(0x1c9)](_0x35412f+'\x20',_0x508c40);}),_0x4ece8c=Number['parseInt'](_0x3c6205[_0x1050c7(0x1c4)](),0xa);if(Number[_0x1050c7(0x1d7)](_0x4ece8c)&&_0x4ece8c>=0x1&&_0x4ece8c<=_0x2ed7c9[_0x1050c7(0x1ca)])return _0x127b8a[_0x1050c7(0x178)](),_0x4ece8c-0x1;process[_0x1050c7(0x177)][_0x1050c7(0x186)](_0x1050c7(0x1ae)+_0x2ed7c9[_0x1050c7(0x1ca)]+'.\x0a');}}function buildFilePath(_0x2cfc2e,_0x34bb91,_0x24d0b8,_0x3139d5){const _0x31f5d8=a31_0x50caba;if(_0x34bb91===_0x31f5d8(0x1aa)){if(!_0x3139d5)throw CliErrors[_0x31f5d8(0x1d0)](_0x31f5d8(0x1b2));const _0x11191b=_0x3139d5[_0x31f5d8(0x184)]??_0x3139d5[_0x31f5d8(0x19e)];return join(_0x2cfc2e[_0x31f5d8(0x185)],_0x31f5d8(0x1aa),_0x11191b,_0x3139d5[_0x31f5d8(0x19b)],_0x3139d5[_0x31f5d8(0x1d2)],_0x24d0b8+_0x31f5d8(0x1c6));}return join(_0x2cfc2e[_0x31f5d8(0x185)],_0x34bb91,_0x24d0b8+_0x31f5d8(0x1c6));}export function generateTemplate(_0x46f4fc,_0x5d48e8,_0x28fd4f,_0x45f514,_0x15d2f6){const _0x4e923e=a31_0x50caba,_0x421ab9=_0x45f514?.[_0x4e923e(0x1c4)]()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x3ed8a3=getAppBaseUrl(_0x28fd4f),_0x643b56=_0x4e923e(0x1d3);if(_0x46f4fc===_0x4e923e(0x18f))return _0x4e923e(0x199)+_0x421ab9+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20'+_0x5d48e8+_0x4e923e(0x17c)+_0x3ed8a3+_0x4e923e(0x1cc)+_0x28fd4f+_0x4e923e(0x1d4)+_0x5d48e8+'.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22'+_0x5d48e8+_0x4e923e(0x189)+_0x643b56+_0x4e923e(0x188)+_0x5d48e8+_0x4e923e(0x194);if(_0x46f4fc===_0x4e923e(0x19c))return _0x4e923e(0x199)+_0x421ab9+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20'+_0x5d48e8+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/'+_0x28fd4f+'/'+_0x5d48e8+_0x4e923e(0x17c)+_0x3ed8a3+_0x4e923e(0x1cc)+_0x28fd4f+_0x4e923e(0x1a8)+_0x5d48e8+_0x4e923e(0x176)+_0x643b56+_0x4e923e(0x1a0)+_0x5d48e8+_0x4e923e(0x194);if(!_0x15d2f6)throw CliErrors[_0x4e923e(0x1d0)](_0x4e923e(0x1bd));const _0x583b8b=_0x15d2f6['alias']??_0x15d2f6['datasetCode'],_0x5eebba=_0x15d2f6[_0x4e923e(0x1d2)]===_0x4e923e(0x179)?'当前请求参数':_0x4e923e(0x17a),_0x36412d=_0x15d2f6[_0x4e923e(0x1d2)]===_0x4e923e(0x179)?_0x4e923e(0x1c0):_0x4e923e(0x1d9);return _0x4e923e(0x199)+_0x421ab9+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20'+_0x5d48e8+_0x4e923e(0x1a4)+_0x28fd4f+'/'+_0x15d2f6['datasetCode']+'/'+_0x15d2f6[_0x4e923e(0x19b)]+_0x4e923e(0x17c)+_0x3ed8a3+_0x4e923e(0x17d)+_0x15d2f6[_0x4e923e(0x1b8)]+'#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x28fd4f+_0x4e923e(0x1bb)+_0x583b8b+'/'+_0x15d2f6[_0x4e923e(0x19b)]+'/'+_0x15d2f6[_0x4e923e(0x1d2)]+'/'+_0x5d48e8+_0x4e923e(0x1b3)+_0x15d2f6['functionNode']+'\x0a'+_0x643b56+_0x4e923e(0x17b)+_0x5eebba+_0x4e923e(0x18a)+_0x36412d+_0x4e923e(0x1c3)+_0x5d48e8+_0x4e923e(0x194);}
@@ -1 +1 @@
1
- const a32_0x5323ec=a32_0x1545;(function(_0x35dee2,_0x2388dd){const _0x55ed6c=a32_0x1545,_0x5d4812=_0x35dee2();while(!![]){try{const _0x575485=-parseInt(_0x55ed6c(0x13e))/0x1+-parseInt(_0x55ed6c(0x144))/0x2+-parseInt(_0x55ed6c(0x121))/0x3*(-parseInt(_0x55ed6c(0x131))/0x4)+parseInt(_0x55ed6c(0x12c))/0x5+-parseInt(_0x55ed6c(0x145))/0x6*(-parseInt(_0x55ed6c(0x12d))/0x7)+parseInt(_0x55ed6c(0x125))/0x8*(-parseInt(_0x55ed6c(0x11f))/0x9)+parseInt(_0x55ed6c(0x13f))/0xa*(-parseInt(_0x55ed6c(0x12f))/0xb);if(_0x575485===_0x2388dd)break;else _0x5d4812['push'](_0x5d4812['shift']());}catch(_0x4b4f12){_0x5d4812['push'](_0x5d4812['shift']());}}}(a32_0x5bb1,0x4a212));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a32_0x1545(_0x23ab36,_0x438646){_0x23ab36=_0x23ab36-0x112;const _0x5bb12e=a32_0x5bb1();let _0x15453d=_0x5bb12e[_0x23ab36];return _0x15453d;}function a32_0x5bb1(){const _0x505da6=['2980760caCCDf','7tQjDcA','Function\x20not\x20found:\x20','99OWQWwV','Backend\x20Function\x20lock\x20file\x20not\x20found.','76FySsiR','Multiple\x20functions\x20match\x20\x22','apps','target','replace','split','Local\x20delete\x20not\x20settled\x20for\x20','length','Deleted\x20','toISOString','string','remoteId','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','62651jOwqtZ','308050SFIGhE','str','\x20\x20-\x20','scriptsRootDir','parse','151908CPdClg','1525728hdVyTR','filter','delete','trashedTo','map','functions','lockFilePath','/api/management/library/scripts/delete','bff','includes','No\x20lock\x20entry\x20found\x20for\x20\x22','find','join','projectRoot','1449aDCgxc','Would\x20delete\x20','13209RksWFf','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','scriptsRoot','<timestamp>','10664clIHxL','\x22\x20not\x20found\x20after\x20ensureLockScope.','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','\x20(local\x20file\x20moved\x20to\x20trash)','appCode','validation','trashDir'];a32_0x5bb1=function(){return _0x505da6;};return a32_0x5bb1();}import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x5323ec(0x119),'command':a32_0x5323ec(0x113),'description':a32_0x5323ec(0x122),'risk':'high-risk-write','flags':[{'name':a32_0x5323ec(0x134),'type':a32_0x5323ec(0x13b),'required':!![],'description':a32_0x5323ec(0x127)}],async 'validate'(_0x50ad54){const _0x5e1873=a32_0x5323ec,_0x41954e=loadBffProjectConfig(_0x50ad54['appCode']),_0x4ba7d4=await readBffLockFile(_0x41954e['lockFilePath']);if(!_0x4ba7d4)throw CliErrors[_0x5e1873(0x12a)]('Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x16bd2b){const _0x2eef2e=a32_0x5323ec,_0x22585b=loadBffProjectConfig(_0x16bd2b['appCode']),_0x541e9f=await readBffLockFile(_0x22585b[_0x2eef2e(0x117)]);if(!_0x541e9f)throw CliErrors[_0x2eef2e(0x12a)](_0x2eef2e(0x130));const {appLock:_0x55ea9d}=ensureLockScope(_0x541e9f,_0x16bd2b['appCode'],_0x22585b[_0x2eef2e(0x123)],_0x2eef2e(0x113)),_0xc27bc5=_0x16bd2b[_0x2eef2e(0x140)](_0x2eef2e(0x134)),_0x43bb98=Object['keys'](_0x55ea9d['functions']),_0x57b2dd=resolveDeleteTarget(_0xc27bc5,_0x43bb98),_0x431556=_0x55ea9d[_0x2eef2e(0x116)][_0x57b2dd];if(!_0x431556)throw CliErrors['validation'](_0x2eef2e(0x11b)+_0x57b2dd+'\x22.');const _0x502c3a=resolveLocalFilePathFromLockKey(_0x22585b,_0x57b2dd),_0x14bb92=relative(_0x22585b[_0x2eef2e(0x11e)],_0x502c3a),_0x4154f1=join(_0x22585b[_0x2eef2e(0x12b)],_0x2eef2e(0x124),_0x14bb92);return{'method':'POST','url':_0x2eef2e(0x118),'body':{'appCode':_0x16bd2b['appCode'],'target':_0x57b2dd,'remoteId':_0x431556[_0x2eef2e(0x13c)],'localFilePath':_0x502c3a,'trashedPath':_0x4154f1},'description':_0x2eef2e(0x120)+_0x57b2dd+_0x2eef2e(0x13d)};},async 'execute'(_0x510d78){const _0x147103=a32_0x5323ec,_0x1124e4=loadBffProjectConfig(_0x510d78['appCode']),_0x234540=await readBffLockFile(_0x1124e4[_0x147103(0x117)]);if(!_0x234540)throw CliErrors[_0x147103(0x12a)](_0x147103(0x130));const {lockData:_0x282cba,appLock:_0x25a01c}=ensureLockScope(_0x234540,_0x510d78[_0x147103(0x129)],_0x1124e4[_0x147103(0x123)],_0x147103(0x113)),_0xe5c6fd=JSON[_0x147103(0x143)](JSON['stringify'](_0x282cba)),_0x19f28e=_0xe5c6fd[_0x147103(0x133)][_0x510d78[_0x147103(0x129)]];if(!_0x19f28e)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x510d78[_0x147103(0x129)]+_0x147103(0x126));const _0x3ef3bf=_0x510d78[_0x147103(0x140)](_0x147103(0x134)),_0x54f026=Object['keys'](_0x19f28e[_0x147103(0x116)]),_0x3db0b3=resolveDeleteTarget(_0x3ef3bf,_0x54f026),_0x33b783=_0x19f28e[_0x147103(0x116)][_0x3db0b3];if(!_0x33b783)throw CliErrors[_0x147103(0x12a)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x3db0b3+'\x22.');await deleteBffScript(_0x33b783[_0x147103(0x13c)]),delete _0x19f28e['functions'][_0x3db0b3],_0x19f28e['lastSync']=new Date()[_0x147103(0x13a)](),await writeBffLockFile(_0x1124e4[_0x147103(0x117)],_0xe5c6fd);const _0x4c60b9=resolveLocalFilePathFromLockKey(_0x1124e4,_0x3db0b3);let _0xf69e16;await fileExists(_0x4c60b9)&&(_0xf69e16=await moveToTrash(_0x1124e4[_0x147103(0x11e)],_0x1124e4[_0x147103(0x12b)],_0x4c60b9),await cleanupEmptyDirectories(dirname(_0x4c60b9),_0x1124e4[_0x147103(0x142)]));await waitForDeleteSettlement(_0x1124e4[_0x147103(0x117)],_0x510d78[_0x147103(0x129)],_0x3db0b3,_0x4c60b9),await sleep(0x96);const _0xd9e206={'deleted':_0x3db0b3,'remoteId':_0x33b783[_0x147103(0x13c)]};if(_0xf69e16)_0xd9e206[_0x147103(0x114)]=_0xf69e16;return{'ok':!![],'data':_0xd9e206,'message':_0x147103(0x139)+_0x3db0b3+(_0xf69e16?_0x147103(0x128):'')};}};function resolveDeleteTarget(_0x2769ce,_0x595e82){const _0x5d046e=a32_0x5323ec;if(_0x2769ce[_0x5d046e(0x11a)]('/')){const _0x595a25=_0x595e82[_0x5d046e(0x11c)](_0x23ad4c=>_0x23ad4c===_0x2769ce);if(!_0x595a25)throw CliErrors[_0x5d046e(0x12a)](_0x5d046e(0x12e)+_0x2769ce);return _0x595a25;}const _0x363f54=_0x595e82[_0x5d046e(0x112)](_0x3d7345=>_0x3d7345[_0x5d046e(0x136)]('/')['at'](-0x1)===_0x2769ce);if(_0x363f54[_0x5d046e(0x138)]===0x0)throw CliErrors[_0x5d046e(0x12a)](_0x5d046e(0x12e)+_0x2769ce);if(_0x363f54['length']>0x1)throw CliErrors[_0x5d046e(0x12a)](_0x5d046e(0x132)+_0x2769ce+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x363f54[_0x5d046e(0x115)](_0x136f2e=>_0x5d046e(0x141)+_0x136f2e)[_0x5d046e(0x11d)]('\x0a'));return _0x363f54[0x0];}async function moveToTrash(_0xbadce5,_0x594484,_0x57bb76){const _0x5aa240=a32_0x5323ec,_0x27a51e=new Date()[_0x5aa240(0x13a)]()[_0x5aa240(0x135)](/[:.]/g,'-'),_0x2a83bf=relative(_0xbadce5,_0x57bb76),_0x51e3de=join(_0x594484,_0x27a51e,_0x2a83bf);return await mkdir(dirname(_0x51e3de),{'recursive':!![]}),await rename(_0x57bb76,_0x51e3de),_0x51e3de;}async function cleanupEmptyDirectories(_0x2b2064,_0x440305){const _0x1df921=a32_0x5323ec;let _0x53e310=resolve(_0x2b2064);const _0x5db62d=resolve(_0x440305);while(_0x53e310['startsWith'](''+_0x5db62d+sep)||_0x53e310===_0x5db62d){if(_0x53e310===_0x5db62d)return;try{const _0x1ad3e3=await readdir(_0x53e310);if(_0x1ad3e3[_0x1df921(0x138)]>0x0)return;await rmdir(_0x53e310);}catch{return;}_0x53e310=dirname(_0x53e310);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x2cd30a,_0x1e7af9,_0xe81ab6,_0x3afb83){const _0x4ffcd3=a32_0x5323ec;for(let _0x4bdd58=0x0;_0x4bdd58<DELETE_SETTLE_RETRY_COUNT;_0x4bdd58+=0x1){const _0x5f0a9a=await readBffLockFile(_0x2cd30a),_0xe80cc5=!!_0x5f0a9a?.[_0x4ffcd3(0x133)]?.[_0x1e7af9]?.['functions']?.[_0xe81ab6],_0x4d49d9=await fileExists(_0x3afb83);if(!_0xe80cc5&&!_0x4d49d9)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x4ffcd3(0x137)+_0xe81ab6+'.');}
1
+ const a32_0x786d90=a32_0x12f4;(function(_0x5f094f,_0xb544f6){const _0x593ed9=a32_0x12f4,_0x5da10b=_0x5f094f();while(!![]){try{const _0x4dce57=-parseInt(_0x593ed9(0x9e))/0x1*(parseInt(_0x593ed9(0x96))/0x2)+-parseInt(_0x593ed9(0xaa))/0x3*(parseInt(_0x593ed9(0xa0))/0x4)+parseInt(_0x593ed9(0xb1))/0x5+parseInt(_0x593ed9(0xba))/0x6*(parseInt(_0x593ed9(0xa9))/0x7)+-parseInt(_0x593ed9(0xb0))/0x8+-parseInt(_0x593ed9(0xac))/0x9+-parseInt(_0x593ed9(0x9a))/0xa*(-parseInt(_0x593ed9(0x91))/0xb);if(_0x4dce57===_0xb544f6)break;else _0x5da10b['push'](_0x5da10b['shift']());}catch(_0x28cf5d){_0x5da10b['push'](_0x5da10b['shift']());}}}(a32_0x2aaf,0x69283));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';function a32_0x12f4(_0x200a0a,_0x42361b){_0x200a0a=_0x200a0a-0x8f;const _0x2aafac=a32_0x2aaf();let _0x12f4bf=_0x2aafac[_0x200a0a];return _0x12f4bf;}export const bffDelete={'service':a32_0x786d90(0xb2),'command':'delete','description':a32_0x786d90(0x95),'risk':a32_0x786d90(0x98),'flags':[{'name':'target','type':a32_0x786d90(0xbe),'required':!![],'description':a32_0x786d90(0xb8)}],async 'validate'(_0x5c68e6){const _0x3637b7=a32_0x786d90,_0x5d1ec2=loadBffProjectConfig(_0x5c68e6['appCode']),_0xd446a5=await readBffLockFile(_0x5d1ec2[_0x3637b7(0xb4)]);if(!_0xd446a5)throw CliErrors[_0x3637b7(0xa5)](_0x3637b7(0xa7));},async 'dryRun'(_0x5b5677){const _0xf39eb9=a32_0x786d90,_0x5656ff=loadBffProjectConfig(_0x5b5677['appCode']),_0x118d4e=await readBffLockFile(_0x5656ff[_0xf39eb9(0xb4)]);if(!_0x118d4e)throw CliErrors[_0xf39eb9(0xa5)](_0xf39eb9(0xad));const {appLock:_0x31debd}=ensureLockScope(_0x118d4e,_0x5b5677['appCode'],_0x5656ff[_0xf39eb9(0x94)],_0xf39eb9(0xb3)),_0x1593fa=_0x5b5677[_0xf39eb9(0xc0)](_0xf39eb9(0xc1)),_0xef513e=Object[_0xf39eb9(0xa3)](_0x31debd['functions']),_0x1b424a=resolveDeleteTarget(_0x1593fa,_0xef513e),_0x1d38f0=_0x31debd[_0xf39eb9(0x9d)][_0x1b424a];if(!_0x1d38f0)throw CliErrors[_0xf39eb9(0xa5)](_0xf39eb9(0xab)+_0x1b424a+'\x22.');const _0xfdd258=resolveLocalFilePathFromLockKey(_0x5656ff,_0x1b424a),_0x119976=relative(_0x5656ff[_0xf39eb9(0xa2)],_0xfdd258),_0xb17fb6=join(_0x5656ff[_0xf39eb9(0xb6)],_0xf39eb9(0x92),_0x119976);return{'method':_0xf39eb9(0xa6),'url':'/api/management/library/scripts/delete','body':{'appCode':_0x5b5677['appCode'],'target':_0x1b424a,'remoteId':_0x1d38f0[_0xf39eb9(0xa1)],'localFilePath':_0xfdd258,'trashedPath':_0xb17fb6},'description':_0xf39eb9(0xb9)+_0x1b424a+_0xf39eb9(0x99)};},async 'execute'(_0x146dfa){const _0x4304a2=a32_0x786d90,_0x13b316=loadBffProjectConfig(_0x146dfa['appCode']),_0x188d43=await readBffLockFile(_0x13b316[_0x4304a2(0xb4)]);if(!_0x188d43)throw CliErrors[_0x4304a2(0xa5)](_0x4304a2(0xad));const {lockData:_0xb398a,appLock:_0x4bcc3e}=ensureLockScope(_0x188d43,_0x146dfa['appCode'],_0x13b316[_0x4304a2(0x94)],'delete'),_0x200774=JSON[_0x4304a2(0xbf)](JSON['stringify'](_0xb398a)),_0x5ae52=_0x200774[_0x4304a2(0xc2)][_0x146dfa[_0x4304a2(0xa4)]];if(!_0x5ae52)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x146dfa[_0x4304a2(0xa4)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x4d476e=_0x146dfa[_0x4304a2(0xc0)](_0x4304a2(0xc1)),_0x540b47=Object[_0x4304a2(0xa3)](_0x5ae52[_0x4304a2(0x9d)]),_0x177db9=resolveDeleteTarget(_0x4d476e,_0x540b47),_0x2ddcee=_0x5ae52['functions'][_0x177db9];if(!_0x2ddcee)throw CliErrors[_0x4304a2(0xa5)](_0x4304a2(0xab)+_0x177db9+'\x22.');await deleteBffScript(_0x2ddcee[_0x4304a2(0xa1)]),delete _0x5ae52['functions'][_0x177db9],_0x5ae52['lastSync']=new Date()[_0x4304a2(0x9f)](),await writeBffLockFile(_0x13b316[_0x4304a2(0xb4)],_0x200774);const _0x952aae=resolveLocalFilePathFromLockKey(_0x13b316,_0x177db9);let _0x3bfe02;await fileExists(_0x952aae)&&(_0x3bfe02=await moveToTrash(_0x13b316[_0x4304a2(0xa2)],_0x13b316[_0x4304a2(0xb6)],_0x952aae),await cleanupEmptyDirectories(dirname(_0x952aae),_0x13b316[_0x4304a2(0x90)]));await waitForDeleteSettlement(_0x13b316[_0x4304a2(0xb4)],_0x146dfa['appCode'],_0x177db9,_0x952aae),await sleep(0x96);const _0x508a71={'deleted':_0x177db9,'remoteId':_0x2ddcee[_0x4304a2(0xa1)]};if(_0x3bfe02)_0x508a71[_0x4304a2(0x93)]=_0x3bfe02;return{'ok':!![],'data':_0x508a71,'message':'Deleted\x20'+_0x177db9+(_0x3bfe02?_0x4304a2(0xae):'')};}};function resolveDeleteTarget(_0x5ec0b0,_0xe3eeb6){const _0x532320=a32_0x786d90;if(_0x5ec0b0['includes']('/')){const _0x2012a2=_0xe3eeb6['find'](_0x296ea7=>_0x296ea7===_0x5ec0b0);if(!_0x2012a2)throw CliErrors['validation']('Function\x20not\x20found:\x20'+_0x5ec0b0);return _0x2012a2;}const _0x319f1b=_0xe3eeb6[_0x532320(0xa8)](_0x3987c7=>_0x3987c7[_0x532320(0xbd)]('/')['at'](-0x1)===_0x5ec0b0);if(_0x319f1b[_0x532320(0x9c)]===0x0)throw CliErrors[_0x532320(0xa5)](_0x532320(0xbb)+_0x5ec0b0);if(_0x319f1b[_0x532320(0x9c)]>0x1)throw CliErrors['validation']('Multiple\x20functions\x20match\x20\x22'+_0x5ec0b0+_0x532320(0xb7)+_0x319f1b[_0x532320(0xaf)](_0x32e45a=>_0x532320(0xb5)+_0x32e45a)[_0x532320(0xbc)]('\x0a'));return _0x319f1b[0x0];}async function moveToTrash(_0x5cc184,_0x4eee22,_0x3cb73e){const _0x351f5e=a32_0x786d90,_0x42d2e7=new Date()[_0x351f5e(0x9f)]()[_0x351f5e(0x9b)](/[:.]/g,'-'),_0x27d51a=relative(_0x5cc184,_0x3cb73e),_0x191674=join(_0x4eee22,_0x42d2e7,_0x27d51a);return await mkdir(dirname(_0x191674),{'recursive':!![]}),await rename(_0x3cb73e,_0x191674),_0x191674;}function a32_0x2aaf(){const _0x55fcb9=['383024ZhntoH','remoteId','projectRoot','keys','appCode','validation','POST','Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','filter','7utBspu','3XOEmje','No\x20lock\x20entry\x20found\x20for\x20\x22','4958208EGQSpn','Backend\x20Function\x20lock\x20file\x20not\x20found.','\x20(local\x20file\x20moved\x20to\x20trash)','map','3459240GnPnmc','1308500TqkXNW','bff','delete','lockFilePath','\x20\x20-\x20','trashDir','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','Would\x20delete\x20','136254zAgEbS','Function\x20not\x20found:\x20','join','split','string','parse','str','target','apps','startsWith','scriptsRootDir','3702061ZricwY','<timestamp>','trashedTo','scriptsRoot','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','2EbEaXh','Local\x20delete\x20not\x20settled\x20for\x20','high-risk-write','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','40nOOarP','replace','length','functions','120817qJakBU','toISOString'];a32_0x2aaf=function(){return _0x55fcb9;};return a32_0x2aaf();}async function cleanupEmptyDirectories(_0x2d6200,_0x4a545e){const _0x58a8e4=a32_0x786d90;let _0x25c79a=resolve(_0x2d6200);const _0x43174a=resolve(_0x4a545e);while(_0x25c79a[_0x58a8e4(0x8f)](''+_0x43174a+sep)||_0x25c79a===_0x43174a){if(_0x25c79a===_0x43174a)return;try{const _0x46423a=await readdir(_0x25c79a);if(_0x46423a['length']>0x0)return;await rmdir(_0x25c79a);}catch{return;}_0x25c79a=dirname(_0x25c79a);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x4c9459,_0x12c842,_0x3cbfc0,_0x3d1f97){const _0x258ec3=a32_0x786d90;for(let _0x1850ef=0x0;_0x1850ef<DELETE_SETTLE_RETRY_COUNT;_0x1850ef+=0x1){const _0x599b5f=await readBffLockFile(_0x4c9459),_0x3a5cf2=!!_0x599b5f?.['apps']?.[_0x12c842]?.['functions']?.[_0x3cbfc0],_0x9ae5d1=await fileExists(_0x3d1f97);if(!_0x3a5cf2&&!_0x9ae5d1)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x258ec3(0x97)+_0x3cbfc0+'.');}
@@ -1 +1 @@
1
- const a33_0x2addab=a33_0x22e1;function a33_0x4f29(){const _0x30472e=['Return\x20full\x20raw\x20script\x20object','33RDzBnW','8nvXRrs','updatedTime','2131125zgwkaz','238750otZIzG','4mlsCDG','bff','verbose','num','Get\x20Backend\x20Function\x20script\x20details\x20by\x20ID','read','7517503QkAEfP','1600278yLMWzy','updateUserName','appCode','version','boolean','Script\x20ID','687496RqvKhB','10767015WznjeM','scriptContent','2606220wDtjBc','2XzZlPw','detail','scriptType','bool'];a33_0x4f29=function(){return _0x30472e;};return a33_0x4f29();}function a33_0x22e1(_0x261853,_0x55d398){_0x261853=_0x261853-0x1bc;const _0x4f291c=a33_0x4f29();let _0x22e1b9=_0x4f291c[_0x261853];return _0x22e1b9;}(function(_0x1a3fa6,_0x116249){const _0x39ee14=a33_0x22e1,_0x29f108=_0x1a3fa6();while(!![]){try{const _0x35e75c=-parseInt(_0x39ee14(0x1d1))/0x1*(parseInt(_0x39ee14(0x1d5))/0x2)+parseInt(_0x39ee14(0x1d4))/0x3+parseInt(_0x39ee14(0x1c4))/0x4*(parseInt(_0x39ee14(0x1c2))/0x5)+parseInt(_0x39ee14(0x1cb))/0x6+parseInt(_0x39ee14(0x1ca))/0x7+parseInt(_0x39ee14(0x1c0))/0x8*(-parseInt(_0x39ee14(0x1d2))/0x9)+-parseInt(_0x39ee14(0x1c3))/0xa*(parseInt(_0x39ee14(0x1bf))/0xb);if(_0x35e75c===_0x116249)break;else _0x29f108['push'](_0x29f108['shift']());}catch(_0x50d570){_0x29f108['push'](_0x29f108['shift']());}}}(a33_0x4f29,0xa60d7));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x2addab(0x1c5),'command':a33_0x2addab(0x1d6),'description':a33_0x2addab(0x1c8),'risk':a33_0x2addab(0x1c9),'flags':[{'name':'id','type':'number','required':!![],'description':a33_0x2addab(0x1d0)},{'name':a33_0x2addab(0x1c6),'type':a33_0x2addab(0x1cf),'description':a33_0x2addab(0x1be)}],async 'execute'(_0x158298){const _0x3af3b0=a33_0x2addab,_0x3187ff=await getBffScriptInfo(_0x158298[_0x3af3b0(0x1c7)]('id')),_0x52efa2=_0x158298[_0x3af3b0(0x1bd)](_0x3af3b0(0x1c6));if(_0x52efa2)return{'ok':!![],'data':_0x3187ff};return{'ok':!![],'data':{'id':_0x3187ff['id'],'functionName':_0x3187ff['functionName']??'','version':_0x3187ff[_0x3af3b0(0x1ce)]??'','updateUserName':_0x3187ff[_0x3af3b0(0x1cc)]??'','appCode':_0x3187ff[_0x3af3b0(0x1cd)],'scriptType':_0x3187ff[_0x3af3b0(0x1bc)],'description':_0x3187ff['description']||'(none)','createdTime':_0x3187ff['createdTime']??'','updatedTime':_0x3187ff[_0x3af3b0(0x1c1)]??'','scriptContent':_0x3187ff[_0x3af3b0(0x1d3)]??''}};}};
1
+ const a33_0x44aebc=a33_0x54b1;function a33_0x54b1(_0x353c19,_0x118093){_0x353c19=_0x353c19-0x16b;const _0x1bd8ea=a33_0x1bd8();let _0x54b110=_0x1bd8ea[_0x353c19];return _0x54b110;}(function(_0x408cfd,_0x1e9aba){const _0xa78df8=a33_0x54b1,_0x10a213=_0x408cfd();while(!![]){try{const _0x2131ec=parseInt(_0xa78df8(0x170))/0x1*(-parseInt(_0xa78df8(0x17b))/0x2)+parseInt(_0xa78df8(0x175))/0x3+parseInt(_0xa78df8(0x17f))/0x4+-parseInt(_0xa78df8(0x173))/0x5+parseInt(_0xa78df8(0x180))/0x6*(-parseInt(_0xa78df8(0x178))/0x7)+parseInt(_0xa78df8(0x174))/0x8+parseInt(_0xa78df8(0x17e))/0x9;if(_0x2131ec===_0x1e9aba)break;else _0x10a213['push'](_0x10a213['shift']());}catch(_0x2e45d0){_0x10a213['push'](_0x10a213['shift']());}}}(a33_0x1bd8,0xcb985));function a33_0x1bd8(){const _0x322989=['379962vkLfCW','3843784CCPyhd','25140xxxjzP','Get\x20Backend\x20Function\x20script\x20details\x20by\x20ID','Script\x20ID','verbose','description','scriptContent','280076CDTKHc','bff','detail','2566010eEMslR','8118216glwQJI','3162474CTlYcX','functionName','createdTime','1946matseb','number','version','4SZCskv','read','(none)'];a33_0x1bd8=function(){return _0x322989;};return a33_0x1bd8();}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x44aebc(0x171),'command':a33_0x44aebc(0x172),'description':a33_0x44aebc(0x16b),'risk':a33_0x44aebc(0x17c),'flags':[{'name':'id','type':a33_0x44aebc(0x179),'required':!![],'description':a33_0x44aebc(0x16c)},{'name':'verbose','type':'boolean','description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x26cc0a){const _0x4e820b=a33_0x44aebc,_0xbe2004=await getBffScriptInfo(_0x26cc0a['num']('id')),_0x1f98fa=_0x26cc0a['bool'](_0x4e820b(0x16d));if(_0x1f98fa)return{'ok':!![],'data':_0xbe2004};return{'ok':!![],'data':{'id':_0xbe2004['id'],'functionName':_0xbe2004[_0x4e820b(0x176)]??'','version':_0xbe2004[_0x4e820b(0x17a)]??'','updateUserName':_0xbe2004['updateUserName']??'','appCode':_0xbe2004['appCode'],'scriptType':_0xbe2004['scriptType'],'description':_0xbe2004[_0x4e820b(0x16e)]||_0x4e820b(0x17d),'createdTime':_0xbe2004[_0x4e820b(0x177)]??'','updatedTime':_0xbe2004['updatedTime']??'','scriptContent':_0xbe2004[_0x4e820b(0x16f)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x11b97c,_0x155d80){const _0xe82299=a34_0x1ec7,_0x2172d3=_0x11b97c();while(!![]){try{const _0x53cdc7=-parseInt(_0xe82299(0xe2))/0x1+-parseInt(_0xe82299(0xde))/0x2*(parseInt(_0xe82299(0xe3))/0x3)+-parseInt(_0xe82299(0xdf))/0x4*(-parseInt(_0xe82299(0xdd))/0x5)+parseInt(_0xe82299(0xe1))/0x6*(parseInt(_0xe82299(0xe7))/0x7)+-parseInt(_0xe82299(0xe5))/0x8+-parseInt(_0xe82299(0xe0))/0x9+parseInt(_0xe82299(0xe4))/0xa*(parseInt(_0xe82299(0xe6))/0xb);if(_0x53cdc7===_0x155d80)break;else _0x2172d3['push'](_0x2172d3['shift']());}catch(_0x5b1915){_0x2172d3['push'](_0x2172d3['shift']());}}}(a34_0x1a5f,0x2de44));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';function a34_0x1ec7(_0x22aa1a,_0x4f7b57){_0x22aa1a=_0x22aa1a-0xdd;const _0x1a5f41=a34_0x1a5f();let _0x1ec7a7=_0x1a5f41[_0x22aa1a];return _0x1ec7a7;}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];function a34_0x1a5f(){const _0x558307=['3DKXjEn','110bObYyI','1531200jhNxox','650639yZlwot','315zpGvbv','72665ZidTYu','41598HQnuYX','56sHmHcy','1753308PXdcTY','564iJnrSe','263348VBAmxA'];a34_0x1a5f=function(){return _0x558307;};return a34_0x1a5f();}
1
+ (function(_0x419ace,_0x3ab37e){const _0xbfc540=a34_0x1466,_0xe5daf0=_0x419ace();while(!![]){try{const _0x5a713f=parseInt(_0xbfc540(0x174))/0x1+-parseInt(_0xbfc540(0x177))/0x2*(-parseInt(_0xbfc540(0x17a))/0x3)+parseInt(_0xbfc540(0x178))/0x4*(parseInt(_0xbfc540(0x176))/0x5)+-parseInt(_0xbfc540(0x170))/0x6*(-parseInt(_0xbfc540(0x173))/0x7)+parseInt(_0xbfc540(0x179))/0x8+parseInt(_0xbfc540(0x171))/0x9*(parseInt(_0xbfc540(0x172))/0xa)+-parseInt(_0xbfc540(0x175))/0xb;if(_0x5a713f===_0x3ab37e)break;else _0xe5daf0['push'](_0xe5daf0['shift']());}catch(_0x36684a){_0xe5daf0['push'](_0xe5daf0['shift']());}}}(a34_0x2103,0xe8ff9));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';function a34_0x2103(){const _0x3d926e=['174168geHpQD','48hAIRiP','576JufDBw','9300780ahssEF','10TWavCG','94612SXxvyy','431098qPyVdV','45540583ijLQjK','5sfeUWI','98746HqUskH','6082484CtERqK'];a34_0x2103=function(){return _0x3d926e;};return a34_0x2103();}function a34_0x1466(_0xf8339,_0x249bc6){_0xf8339=_0xf8339-0x170;const _0x210394=a34_0x2103();let _0x14667c=_0x210394[_0xf8339];return _0x14667c;}import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];