@lovrabet/rabetbase-cli 2.5.0-beta.2 → 2.5.0-beta.3

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 (295) 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/tables.js +1 -1
  93. package/lib/commands/db/test.js +1 -1
  94. package/lib/commands/db/update.js +1 -1
  95. package/lib/commands/doctor.js +1 -1
  96. package/lib/commands/file/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/search.js +1 -1
  107. package/lib/commands/kb/shared.js +1 -1
  108. package/lib/commands/kb/update.js +1 -1
  109. package/lib/commands/logs/index.js +1 -1
  110. package/lib/commands/menu/asset-update.js +1 -1
  111. package/lib/commands/menu/delete.js +1 -1
  112. package/lib/commands/menu/external-link-create.js +1 -1
  113. package/lib/commands/menu/external-link-update.js +1 -1
  114. package/lib/commands/menu/group-create.js +1 -1
  115. package/lib/commands/menu/group-update.js +1 -1
  116. package/lib/commands/menu/index.js +1 -1
  117. package/lib/commands/menu/list.js +1 -1
  118. package/lib/commands/menu/move.js +1 -1
  119. package/lib/commands/menu/regroup-start.js +1 -1
  120. package/lib/commands/menu/rename.js +1 -1
  121. package/lib/commands/menu/shared/compare-table.js +1 -1
  122. package/lib/commands/menu/shared/delete-plan.js +1 -1
  123. package/lib/commands/menu/shared/facts.js +1 -1
  124. package/lib/commands/menu/shared/index.js +1 -1
  125. package/lib/commands/menu/shared/inquirer.js +1 -1
  126. package/lib/commands/menu/shared/local-pages.js +1 -1
  127. package/lib/commands/menu/shared/logic.js +1 -1
  128. package/lib/commands/menu/shared/mutations.js +1 -1
  129. package/lib/commands/menu/shared/service.js +1 -1
  130. package/lib/commands/menu/shared/sync-core.js +1 -1
  131. package/lib/commands/menu/shared/update-core.js +1 -1
  132. package/lib/commands/menu/shared/valid-url.js +1 -1
  133. package/lib/commands/menu/sync.js +1 -1
  134. package/lib/commands/menu/visibility-update.js +1 -1
  135. package/lib/commands/notification/config-create.js +1 -1
  136. package/lib/commands/notification/config-delete.js +1 -1
  137. package/lib/commands/notification/config-list.js +1 -1
  138. package/lib/commands/notification/config-update.js +1 -1
  139. package/lib/commands/notification/index.js +1 -1
  140. package/lib/commands/notification/shared.js +1 -1
  141. package/lib/commands/ocr/index.js +1 -1
  142. package/lib/commands/page/create.js +1 -1
  143. package/lib/commands/page/custom/detail.js +1 -1
  144. package/lib/commands/page/custom/list.js +1 -1
  145. package/lib/commands/page/custom/publish.js +1 -1
  146. package/lib/commands/page/custom/shared.js +1 -1
  147. package/lib/commands/page/custom/syntax.js +1 -1
  148. package/lib/commands/page/custom/template.js +1 -1
  149. package/lib/commands/page/custom/update.js +1 -1
  150. package/lib/commands/page/data-list-status.js +1 -1
  151. package/lib/commands/page/generate-start.js +1 -1
  152. package/lib/commands/page/generate-status.js +1 -1
  153. package/lib/commands/page/index.js +1 -1
  154. package/lib/commands/page/pull.js +1 -1
  155. package/lib/commands/page/push.js +1 -1
  156. package/lib/commands/page/relation-audit.js +1 -1
  157. package/lib/commands/page/restore.js +1 -1
  158. package/lib/commands/page/shared.js +1 -1
  159. package/lib/commands/page/sync.js +1 -1
  160. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  161. package/lib/commands/project/create/format-elapsed.js +1 -1
  162. package/lib/commands/project/create/main.js +1 -1
  163. package/lib/commands/project/create/materialize-project-template.js +1 -1
  164. package/lib/commands/project/create/project-name.js +1 -1
  165. package/lib/commands/project/create/project-template-archive.js +1 -1
  166. package/lib/commands/project/create/project-template-path.js +1 -1
  167. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  168. package/lib/commands/project/create/use-format-code.js +1 -1
  169. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  170. package/lib/commands/project/index.js +1 -1
  171. package/lib/commands/project/upgrade.js +1 -1
  172. package/lib/commands/registry.js +1 -1
  173. package/lib/commands/role/delete.js +1 -1
  174. package/lib/commands/role/detail.js +1 -1
  175. package/lib/commands/role/index.js +1 -1
  176. package/lib/commands/role/list.js +1 -1
  177. package/lib/commands/role/shared.js +1 -1
  178. package/lib/commands/role/update.js +1 -1
  179. package/lib/commands/role/user-add.js +1 -1
  180. package/lib/commands/role/user-remove.js +1 -1
  181. package/lib/commands/role/user-resolve.js +1 -1
  182. package/lib/commands/run/index.js +1 -1
  183. package/lib/commands/schema.js +1 -1
  184. package/lib/commands/sql/create.js +1 -1
  185. package/lib/commands/sql/delete.js +1 -1
  186. package/lib/commands/sql/detail.js +1 -1
  187. package/lib/commands/sql/exec.js +1 -1
  188. package/lib/commands/sql/index.js +1 -1
  189. package/lib/commands/sql/list.js +1 -1
  190. package/lib/commands/sql/pull.js +1 -1
  191. package/lib/commands/sql/push.js +1 -1
  192. package/lib/commands/sql/shared.js +1 -1
  193. package/lib/commands/sql/status.js +1 -1
  194. package/lib/commands/sql/validate.js +1 -1
  195. package/lib/commands/task/index.js +1 -1
  196. package/lib/commands/task/status.js +1 -1
  197. package/lib/commands/tenant/index.js +1 -1
  198. package/lib/commands/tenant/members-list.js +1 -1
  199. package/lib/commands/tenant/shared.js +1 -1
  200. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  201. package/lib/commands/user-account/index.js +1 -1
  202. package/lib/commands/workspace/add.js +1 -1
  203. package/lib/commands/workspace/index.js +1 -1
  204. package/lib/commands/workspace/remove.js +1 -1
  205. package/lib/config/domain-config.js +1 -1
  206. package/lib/config/schema.js +1 -1
  207. package/lib/constant/cdn.js +1 -1
  208. package/lib/constant/cli.js +1 -1
  209. package/lib/constant/defaults.js +1 -1
  210. package/lib/constant/domain.js +1 -1
  211. package/lib/constant/env.js +1 -1
  212. package/lib/constant/output.js +1 -1
  213. package/lib/constant/paths.js +1 -1
  214. package/lib/constant/region.js +1 -1
  215. package/lib/constant/risk.js +1 -1
  216. package/lib/context/app-resolver.js +1 -1
  217. package/lib/context/auth-resolver.js +1 -1
  218. package/lib/context/config-loader.js +1 -1
  219. package/lib/context.js +1 -1
  220. package/lib/core/alias-resolver.js +1 -1
  221. package/lib/core/api-client.js +1 -1
  222. package/lib/core/bff/config.js +1 -1
  223. package/lib/core/bff/file-system.js +1 -1
  224. package/lib/core/bff/hash.js +1 -1
  225. package/lib/core/bff/lock.js +1 -1
  226. package/lib/core/bff/utils.js +1 -1
  227. package/lib/core/db-resolver.js +1 -1
  228. package/lib/core/page/file-system.js +1 -1
  229. package/lib/core/page/hash.js +1 -1
  230. package/lib/core/page/lock.js +1 -1
  231. package/lib/core/sql-index-auditor.js +1 -1
  232. package/lib/core/sql-sync/config.js +1 -1
  233. package/lib/core/sql-sync/file-system.js +1 -1
  234. package/lib/core/sql-sync/hash.js +1 -1
  235. package/lib/core/sql-sync/lock.js +1 -1
  236. package/lib/core/sql-sync/utils.js +1 -1
  237. package/lib/core/sql-validator.js +1 -1
  238. package/lib/errors.js +1 -1
  239. package/lib/framework/build-all-flags.js +1 -1
  240. package/lib/framework/error-output.js +1 -1
  241. package/lib/framework/explicit-yes.js +1 -1
  242. package/lib/framework/flags.js +1 -1
  243. package/lib/framework/help.js +1 -1
  244. package/lib/framework/index.js +1 -1
  245. package/lib/framework/output.js +1 -1
  246. package/lib/framework/response.js +1 -1
  247. package/lib/framework/runner-alias.js +1 -1
  248. package/lib/framework/runner.js +1 -1
  249. package/lib/framework/schema-export.js +1 -1
  250. package/lib/framework/types.js +1 -1
  251. package/lib/generated/build-info.d.ts +4 -4
  252. package/lib/generated/build-info.js +1 -1
  253. package/lib/help.js +1 -1
  254. package/lib/postinstall.js +1 -1
  255. package/lib/runtime/confirmation.js +1 -1
  256. package/lib/runtime/event.js +1 -1
  257. package/lib/runtime/index.js +1 -1
  258. package/lib/runtime/queue.js +1 -1
  259. package/lib/runtime/resolve.js +1 -1
  260. package/lib/skills/builtin-skill.js +1 -1
  261. package/lib/skills/main.js +1 -1
  262. package/lib/skills/npx-skills-add.js +1 -1
  263. package/lib/skills/skill-presence.js +1 -1
  264. package/lib/telemetry/cli-command-trace.js +1 -1
  265. package/lib/telemetry/cli-help-trace.js +1 -1
  266. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  267. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  268. package/lib/telemetry/send-cli-trace-log.js +1 -1
  269. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  270. package/lib/utils/ai_config.js +1 -1
  271. package/lib/utils/apply-jq-filter.js +1 -1
  272. package/lib/utils/cdn-config.js +1 -1
  273. package/lib/utils/check-sdk-version.js +1 -1
  274. package/lib/utils/cli-version-check.js +1 -1
  275. package/lib/utils/cli-version-policy.js +1 -1
  276. package/lib/utils/config.js +1 -1
  277. package/lib/utils/entity-with-id.js +1 -1
  278. package/lib/utils/file-utils.js +1 -1
  279. package/lib/utils/guides-cdn.js +1 -1
  280. package/lib/utils/http-client.js +1 -1
  281. package/lib/utils/is-non-interactive.js +1 -1
  282. package/lib/utils/logger.js +1 -1
  283. package/lib/utils/params.js +1 -1
  284. package/lib/utils/platform.js +1 -1
  285. package/lib/utils/sleep.js +1 -1
  286. package/lib/utils/template-replacer.js +1 -1
  287. package/lib/utils/update-notice.js +1 -1
  288. package/lib/utils/version.js +1 -1
  289. package/lib/utils/with-active-cookie.js +1 -1
  290. package/lib/utils/write-cli-side-channel.js +1 -1
  291. package/package.json +1 -1
  292. package/skills/rabetbase/SKILL.md +1 -1
  293. package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
  294. package/skills/rabetbase/references/rabetbase-page-custom-list.md +5 -2
  295. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a20_0x5365a=a20_0x2bdb;(function(_0x2ff658,_0x1152e0){const _0x237d1d=a20_0x2bdb,_0x1e47bf=_0x2ff658();while(!![]){try{const _0x4b01da=parseInt(_0x237d1d(0xb5))/0x1*(-parseInt(_0x237d1d(0xc3))/0x2)+parseInt(_0x237d1d(0xd4))/0x3+parseInt(_0x237d1d(0xd5))/0x4+-parseInt(_0x237d1d(0xc6))/0x5*(-parseInt(_0x237d1d(0xe1))/0x6)+parseInt(_0x237d1d(0xd7))/0x7+-parseInt(_0x237d1d(0xd0))/0x8*(-parseInt(_0x237d1d(0xd6))/0x9)+parseInt(_0x237d1d(0xb3))/0xa*(-parseInt(_0x237d1d(0xbf))/0xb);if(_0x4b01da===_0x1152e0)break;else _0x1e47bf['push'](_0x1e47bf['shift']());}catch(_0x5d50b7){_0x1e47bf['push'](_0x1e47bf['shift']());}}}(a20_0x532f,0xc6e35));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function a20_0x2bdb(_0x4e7099,_0x54da5d){_0x4e7099=_0x4e7099-0xb3;const _0x532f98=a20_0x532f();let _0x2bdb67=_0x532f98[_0x4e7099];return _0x2bdb67;}function buildItemsFromLayer(_0x2da467,_0x518328){const _0x257592=a20_0x2bdb,_0x4581a6=[],_0x1c0e19=_0x2da467[_0x257592(0xdc)]&&typeof _0x2da467[_0x257592(0xdc)]===_0x257592(0xb8)?_0x2da467[_0x257592(0xdc)]:{},_0x2202dc=_0x2da467[_0x257592(0xd8)]||undefined,_0x52a101=_0x2202dc??(Object[_0x257592(0xbc)](_0x1c0e19)[_0x257592(0xc4)]===0x1?Object[_0x257592(0xbc)](_0x1c0e19)[0x0]:undefined);for(const [_0x1d16be,_0xcb662a]of Object[_0x257592(0xc7)](_0x1c0e19)){if(!_0xcb662a||typeof _0xcb662a!=='object'||!_0xcb662a[_0x257592(0xba)])continue;_0x4581a6[_0x257592(0xcf)]({'name':_0x1d16be,'appcode':_0xcb662a[_0x257592(0xba)],'named':!![],'definedIn':_0x518328,'isDefault':_0x1d16be===_0x52a101,...buildAppProfileListFields(_0xcb662a)});}return _0x4581a6;}function buildMergedItems(_0x3a19a1,_0x4c41f4){const _0x2cc579=a20_0x2bdb,{apps:apps={}}=_0x3a19a1,_0x167864=_0x3a19a1[_0x2cc579(0xd8)],_0x1f16b1=_0x167864??(Object['keys'](apps)[_0x2cc579(0xc4)]===0x1?Object[_0x2cc579(0xbc)](apps)[0x0]:undefined),_0x208bed=_0x4c41f4[_0x2cc579(0xb4)][_0x2cc579(0xdc)]&&typeof _0x4c41f4['globalConfig']['apps']===_0x2cc579(0xb8)?_0x4c41f4[_0x2cc579(0xb4)]['apps']:{},_0x59ed53=_0x4c41f4['projectConfig'][_0x2cc579(0xdc)]&&typeof _0x4c41f4[_0x2cc579(0xcc)][_0x2cc579(0xdc)]==='object'?_0x4c41f4[_0x2cc579(0xcc)][_0x2cc579(0xdc)]:{},_0x94fcc7=Object[_0x2cc579(0xc7)](apps),_0x2d2d6a=_0x94fcc7[_0x2cc579(0xda)](([_0x1e8832,_0x26c594])=>({'name':_0x1e8832,'appcode':_0x26c594[_0x2cc579(0xba)],'named':!![],'definedIn':appDefinedIn(_0x1e8832,_0x208bed,_0x59ed53),'isDefault':_0x1e8832===_0x1f16b1,...buildAppProfileListFields(_0x26c594)}));return _0x2d2d6a;}function validateAppListFlags(_0x56ccbe){const _0x36ed3d=a20_0x2bdb;if(!_0x56ccbe[_0x36ed3d(0xd2)](_0x36ed3d(0xc1)))return;if(!_0x56ccbe[_0x36ed3d(0xd2)](_0x36ed3d(0xcd))&&!_0x56ccbe[_0x36ed3d(0xd2)]('project'))return;throw CliErrors[_0x36ed3d(0xca)](_0x36ed3d(0xbe),'Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.');}async function execute(_0x4f28a4){const _0x58d758=a20_0x2bdb;validateAppListFlags(_0x4f28a4);if(_0x4f28a4[_0x58d758(0xd2)](_0x58d758(0xc1)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x4f28a4)};const _0x459323=_0x4f28a4[_0x58d758(0xd2)]('global'),_0x333afd=_0x4f28a4[_0x58d758(0xd2)]('project'),_0x488076=_0x459323?_0x58d758(0xcd):_0x333afd?_0x58d758(0xd9):_0x58d758(0xc9),{config:_0x543415,layers:_0x30f058}=readRawConfigWithLayers(),_0x2d745c=resolveDefaultAppSource(_0x30f058),{defaultApp:_0xcc744b}=_0x543415;let _0x506824,_0x21a6bf;switch(_0x488076){case'global':_0x506824=buildItemsFromLayer(_0x30f058[_0x58d758(0xb4)],'global'),_0x21a6bf=_0x30f058[_0x58d758(0xdb)];break;case _0x58d758(0xd9):_0x506824=buildItemsFromLayer(_0x30f058[_0x58d758(0xcc)],_0x58d758(0xd9)),_0x21a6bf=_0x30f058[_0x58d758(0xdf)];break;default:_0x506824=buildMergedItems(_0x543415,_0x30f058);break;}enrichAppListItemsWithMergedSelection(_0x506824,_0x4f28a4[_0x58d758(0xbb)]);if(_0x506824[_0x58d758(0xc4)]===0x0){const _0x347394=_0x488076==='merged'?'':_0x58d758(0xd1)+_0x488076+_0x58d758(0xbd);return{'ok':!![],'data':[],'message':_0x58d758(0xc2)+_0x347394+_0x58d758(0xdd)+CLI_BIN_NAME+_0x58d758(0xce)};}const _0x30786d=_0x506824['find'](_0x339bb1=>_0x339bb1[_0x58d758(0xe0)]===!![]),_0x4c69fd=_0xcc744b??_0x30786d?.[_0x58d758(0xb6)]??null,_0x144184=_0x488076===_0x58d758(0xc9)?{'globalPath':_0x30f058['globalPath']??null,'projectPath':_0x30f058[_0x58d758(0xdf)]??null,'defaultApp':_0x4c69fd,'defaultAppSource':_0xcc744b!=null?_0x2d745c:null}:{'scope':_0x488076,'configPath':_0x21a6bf??null};return{'ok':!![],'data':{'items':_0x506824,'meta':_0x144184}};}function a20_0x532f(){const _0x1d727d=['4382210GTcDcK','defaultApp','project','map','globalPath','apps','.\x20Use\x20`','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','projectPath','isCurrent','210JGouJz','2170910rNNcQu','globalConfig','127LVxeCg','name','optional','object','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','appcode','mergedCli','keys','\x20config','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','121SuXcbX','list','remote','No\x20apps\x20configured','10186wvRdHW','length','read','6830ZEgohe','entries','boolean','merged','validation','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','projectConfig','global','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','push','40NFXTuv','\x20in\x20','bool','app','3608823fdMPaC','3846964jqaFFh','1819683nCeEDb'];a20_0x532f=function(){return _0x1d727d;};return a20_0x532f();}export const appListDefinition={'service':a20_0x5365a(0xd3),'command':a20_0x5365a(0xc0),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x5365a(0xc5),'auth':a20_0x5365a(0xb7),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x5365a(0xc1),'type':a20_0x5365a(0xc8),'description':a20_0x5365a(0xcb),'default':![]},{'name':a20_0x5365a(0xcd),'type':a20_0x5365a(0xc8),'description':a20_0x5365a(0xde),'default':![]},{'name':a20_0x5365a(0xd9),'type':a20_0x5365a(0xc8),'description':a20_0x5365a(0xb9),'default':![]}],async 'validate'(_0x39d730){validateAppListFlags(_0x39d730);},'execute':execute};
1
+ const a20_0x49fd99=a20_0x5a99;(function(_0x53b381,_0x41a4cf){const _0x22c107=a20_0x5a99,_0x2c826b=_0x53b381();while(!![]){try{const _0x35df2a=parseInt(_0x22c107(0x12d))/0x1+parseInt(_0x22c107(0x10c))/0x2+-parseInt(_0x22c107(0x10e))/0x3+-parseInt(_0x22c107(0x109))/0x4*(-parseInt(_0x22c107(0x11d))/0x5)+-parseInt(_0x22c107(0x105))/0x6+parseInt(_0x22c107(0x110))/0x7+parseInt(_0x22c107(0x125))/0x8*(parseInt(_0x22c107(0x12e))/0x9);if(_0x35df2a===_0x41a4cf)break;else _0x2c826b['push'](_0x2c826b['shift']());}catch(_0x33586f){_0x2c826b['push'](_0x2c826b['shift']());}}}(a20_0x16cc,0x6ba91));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x324d04,_0x4b2ed2){const _0x4b6ed7=a20_0x5a99,_0x14dac6=[],_0x282c65=_0x324d04[_0x4b6ed7(0x114)]&&typeof _0x324d04[_0x4b6ed7(0x114)]===_0x4b6ed7(0x11f)?_0x324d04[_0x4b6ed7(0x114)]:{},_0xced642=_0x324d04[_0x4b6ed7(0x10b)]||undefined,_0x275fc8=_0xced642??(Object[_0x4b6ed7(0x108)](_0x282c65)[_0x4b6ed7(0x120)]===0x1?Object[_0x4b6ed7(0x108)](_0x282c65)[0x0]:undefined);for(const [_0x4656c9,_0x4b4316]of Object[_0x4b6ed7(0x117)](_0x282c65)){if(!_0x4b4316||typeof _0x4b4316!=='object'||!_0x4b4316['appcode'])continue;_0x14dac6[_0x4b6ed7(0x128)]({'name':_0x4656c9,'appcode':_0x4b4316['appcode'],'named':!![],'definedIn':_0x4b2ed2,'isDefault':_0x4656c9===_0x275fc8,...buildAppProfileListFields(_0x4b4316)});}return _0x14dac6;}function a20_0x16cc(){const _0x56946e=['Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','25WpPPub','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','object','length','list','appcode','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','globalConfig','135616NafMuN','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','read','push','boolean','projectConfig','\x20config','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','3228CBivIq','288sJTFlQ','global','globalPath','600546zbwPHM','isCurrent','app','keys','284036pOYgFR','validation','defaultApp','302786hOKECR','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','1765017vpKexP','name','540939bVyLuo','bool','projectPath','merged','apps','remote','mergedCli','entries','No\x20apps\x20configured','project','\x20in\x20','map'];a20_0x16cc=function(){return _0x56946e;};return a20_0x16cc();}function buildMergedItems(_0x448b0b,_0x2c0321){const _0x5e669c=a20_0x5a99,{apps:apps={}}=_0x448b0b,_0xbb8a9d=_0x448b0b[_0x5e669c(0x10b)],_0x1488df=_0xbb8a9d??(Object[_0x5e669c(0x108)](apps)['length']===0x1?Object[_0x5e669c(0x108)](apps)[0x0]:undefined),_0x5dce1f=_0x2c0321[_0x5e669c(0x124)][_0x5e669c(0x114)]&&typeof _0x2c0321[_0x5e669c(0x124)][_0x5e669c(0x114)]===_0x5e669c(0x11f)?_0x2c0321[_0x5e669c(0x124)][_0x5e669c(0x114)]:{},_0xe7b7c=_0x2c0321[_0x5e669c(0x12a)][_0x5e669c(0x114)]&&typeof _0x2c0321[_0x5e669c(0x12a)][_0x5e669c(0x114)]===_0x5e669c(0x11f)?_0x2c0321[_0x5e669c(0x12a)][_0x5e669c(0x114)]:{},_0x51c194=Object['entries'](apps),_0x146abd=_0x51c194[_0x5e669c(0x11b)](([_0x36bdb0,_0x54b024])=>({'name':_0x36bdb0,'appcode':_0x54b024[_0x5e669c(0x122)],'named':!![],'definedIn':appDefinedIn(_0x36bdb0,_0x5dce1f,_0xe7b7c),'isDefault':_0x36bdb0===_0x1488df,...buildAppProfileListFields(_0x54b024)}));return _0x146abd;}function a20_0x5a99(_0x29e702,_0x4cfeca){_0x29e702=_0x29e702-0x104;const _0x16cc02=a20_0x16cc();let _0x5a995d=_0x16cc02[_0x29e702];return _0x5a995d;}function validateAppListFlags(_0x36ccbc){const _0x10a4f8=a20_0x5a99;if(!_0x36ccbc[_0x10a4f8(0x111)](_0x10a4f8(0x115)))return;if(!_0x36ccbc[_0x10a4f8(0x111)](_0x10a4f8(0x12f))&&!_0x36ccbc[_0x10a4f8(0x111)](_0x10a4f8(0x119)))return;throw CliErrors[_0x10a4f8(0x10a)](_0x10a4f8(0x11e),_0x10a4f8(0x12c));}async function execute(_0x583cfd){const _0x44065f=a20_0x5a99;validateAppListFlags(_0x583cfd);if(_0x583cfd[_0x44065f(0x111)](_0x44065f(0x115)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x583cfd)};const _0x457478=_0x583cfd['bool'](_0x44065f(0x12f)),_0x41a7d1=_0x583cfd['bool']('project'),_0xfaa565=_0x457478?_0x44065f(0x12f):_0x41a7d1?_0x44065f(0x119):'merged',{config:_0x139eb3,layers:_0x11d220}=readRawConfigWithLayers(),_0x16bc5b=resolveDefaultAppSource(_0x11d220),{defaultApp:_0x27de9d}=_0x139eb3;let _0x2c2201,_0x5ab1a6;switch(_0xfaa565){case _0x44065f(0x12f):_0x2c2201=buildItemsFromLayer(_0x11d220[_0x44065f(0x124)],_0x44065f(0x12f)),_0x5ab1a6=_0x11d220['globalPath'];break;case _0x44065f(0x119):_0x2c2201=buildItemsFromLayer(_0x11d220[_0x44065f(0x12a)],_0x44065f(0x119)),_0x5ab1a6=_0x11d220[_0x44065f(0x112)];break;default:_0x2c2201=buildMergedItems(_0x139eb3,_0x11d220);break;}enrichAppListItemsWithMergedSelection(_0x2c2201,_0x583cfd[_0x44065f(0x116)]);if(_0x2c2201[_0x44065f(0x120)]===0x0){const _0x4d721c=_0xfaa565===_0x44065f(0x113)?'':_0x44065f(0x11a)+_0xfaa565+_0x44065f(0x12b);return{'ok':!![],'data':[],'message':_0x44065f(0x118)+_0x4d721c+'.\x20Use\x20`'+CLI_BIN_NAME+_0x44065f(0x126)};}const _0x505d66=_0x2c2201['find'](_0x56df90=>_0x56df90[_0x44065f(0x106)]===!![]),_0x59f937=_0x27de9d??_0x505d66?.[_0x44065f(0x10f)]??null,_0x321d23=_0xfaa565===_0x44065f(0x113)?{'globalPath':_0x11d220[_0x44065f(0x104)]??null,'projectPath':_0x11d220['projectPath']??null,'defaultApp':_0x59f937,'defaultAppSource':_0x27de9d!=null?_0x16bc5b:null}:{'scope':_0xfaa565,'configPath':_0x5ab1a6??null};return{'ok':!![],'data':{'items':_0x2c2201,'meta':_0x321d23}};}export const appListDefinition={'service':a20_0x49fd99(0x107),'command':a20_0x49fd99(0x121),'description':a20_0x49fd99(0x10d),'risk':a20_0x49fd99(0x127),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x49fd99(0x115),'type':a20_0x49fd99(0x129),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a20_0x49fd99(0x12f),'type':a20_0x49fd99(0x129),'description':a20_0x49fd99(0x123),'default':![]},{'name':a20_0x49fd99(0x119),'type':'boolean','description':a20_0x49fd99(0x11c),'default':![]}],async 'validate'(_0x191402){validateAppListFlags(_0x191402);},'execute':execute};
@@ -1 +1 @@
1
- const a21_0x3e5ad9=a21_0x4e2d;(function(_0x47d07a,_0x5dbbee){const _0x493c73=a21_0x4e2d,_0xf7e116=_0x47d07a();while(!![]){try{const _0x1c5296=parseInt(_0x493c73(0xd7))/0x1+-parseInt(_0x493c73(0xd5))/0x2+parseInt(_0x493c73(0xdf))/0x3+parseInt(_0x493c73(0xd8))/0x4*(parseInt(_0x493c73(0xe3))/0x5)+parseInt(_0x493c73(0xe0))/0x6+parseInt(_0x493c73(0xd9))/0x7*(parseInt(_0x493c73(0xe1))/0x8)+-parseInt(_0x493c73(0xdc))/0x9;if(_0x1c5296===_0x5dbbee)break;else _0xf7e116['push'](_0xf7e116['shift']());}catch(_0x352441){_0xf7e116['push'](_0xf7e116['shift']());}}}(a21_0x355c,0x7adfd));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';function a21_0x4e2d(_0x443e7b,_0x3ff5a7){_0x443e7b=_0x443e7b-0xd5;const _0x355c5d=a21_0x355c();let _0x4e2df2=_0x355c5d[_0x443e7b];return _0x4e2df2;}export const appMembersListDefinition={'service':'app','command':a21_0x3e5ad9(0xda),'description':a21_0x3e5ad9(0xdd),'risk':a21_0x3e5ad9(0xd6),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x244bf9){const _0x35ffea=a21_0x3e5ad9,_0x51d574=projectAppMembers(await listRoleUsers(_0x244bf9['appCode']));return{'ok':!![],'data':{'appCode':_0x244bf9['appCode'],'items':_0x51d574,'totalCount':_0x51d574[_0x35ffea(0xde)]},'message':_0x35ffea(0xdb)+_0x51d574[_0x35ffea(0xde)]+_0x35ffea(0xe2)};}};function a21_0x355c(){const _0x490387=['4BrjTBv','434IJDKvb','members-list','Found\x20','27525159qjtzmS','List\x20application\x20members\x20with\x20their\x20role\x20memberships','length','1853988GIwRJg','5881752dJcZdk','49352ftTnwT','\x20application\x20member(s)','4502885qZoHGf','537236btbtRF','read','948919AYmrua'];a21_0x355c=function(){return _0x490387;};return a21_0x355c();}
1
+ const a21_0x906ad=a21_0x1cc7;function a21_0x1cc7(_0x34ed53,_0xd57a9b){_0x34ed53=_0x34ed53-0xdb;const _0x16a651=a21_0x16a6();let _0x1cc775=_0x16a651[_0x34ed53];return _0x1cc775;}function a21_0x16a6(){const _0x3a3451=['5bUWCfY','\x20application\x20member(s)','437890OUGuCU','List\x20application\x20members\x20with\x20their\x20role\x20memberships','app','4415240tCzYpC','read','18BJKLZs','12GIHYQu','2035901NdmpOF','length','1207625IPSbKR','appCode','4458472ZKBoYi','654210IPhiCM','2971112AoJqlV'];a21_0x16a6=function(){return _0x3a3451;};return a21_0x16a6();}(function(_0x5383d6,_0x4fa29b){const _0x1842c9=a21_0x1cc7,_0x1c494b=_0x5383d6();while(!![]){try{const _0x14ed98=parseInt(_0x1842c9(0xea))/0x1*(parseInt(_0x1842c9(0xdc))/0x2)+-parseInt(_0x1842c9(0xe8))/0x3+parseInt(_0x1842c9(0xe9))/0x4+parseInt(_0x1842c9(0xe5))/0x5+parseInt(_0x1842c9(0xe2))/0x6*(parseInt(_0x1842c9(0xe3))/0x7)+parseInt(_0x1842c9(0xe7))/0x8*(-parseInt(_0x1842c9(0xe1))/0x9)+-parseInt(_0x1842c9(0xdf))/0xa;if(_0x14ed98===_0x4fa29b)break;else _0x1c494b['push'](_0x1c494b['shift']());}catch(_0x59d6b2){_0x1c494b['push'](_0x1c494b['shift']());}}}(a21_0x16a6,0xd86e6));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':a21_0x906ad(0xde),'command':'members-list','description':a21_0x906ad(0xdd),'risk':a21_0x906ad(0xe0),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x41ce34){const _0x176b58=a21_0x906ad,_0x5127e6=projectAppMembers(await listRoleUsers(_0x41ce34['appCode']));return{'ok':!![],'data':{'appCode':_0x41ce34[_0x176b58(0xe6)],'items':_0x5127e6,'totalCount':_0x5127e6[_0x176b58(0xe4)]},'message':'Found\x20'+_0x5127e6['length']+_0x176b58(0xdb)};}};
@@ -1 +1 @@
1
- (function(_0xc0e91a,_0x5f4ee7){const _0x3e641b=a22_0x2977,_0x24c3a0=_0xc0e91a();while(!![]){try{const _0x45d5a1=parseInt(_0x3e641b(0x8f))/0x1*(-parseInt(_0x3e641b(0x93))/0x2)+-parseInt(_0x3e641b(0x90))/0x3+-parseInt(_0x3e641b(0x8d))/0x4+parseInt(_0x3e641b(0x87))/0x5*(parseInt(_0x3e641b(0x84))/0x6)+-parseInt(_0x3e641b(0x8b))/0x7+-parseInt(_0x3e641b(0x85))/0x8*(parseInt(_0x3e641b(0x91))/0x9)+parseInt(_0x3e641b(0x86))/0xa;if(_0x45d5a1===_0x5f4ee7)break;else _0x24c3a0['push'](_0x24c3a0['shift']());}catch(_0x1c42da){_0x24c3a0['push'](_0x24c3a0['shift']());}}}(a22_0x53c9,0xd0ed3));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a22_0x53c9(){const _0x414c59=['46778300YzYHjf','535HUAbIM','authRequired','appCode','cookie','2824703uvxIiH','appDesc','3437476wXINsP','map','315089aZUSsp','4395069fjpBzm','198MPpuOG','appName','6jyElPa','platform','67242llJkBb','490192wswgAr'];a22_0x53c9=function(){return _0x414c59;};return a22_0x53c9();}import{withActiveCookie}from'../../utils/with-active-cookie.js';function a22_0x2977(_0x46a4ca,_0x4b8a30){_0x46a4ca=_0x46a4ca-0x84;const _0x53c988=a22_0x53c9();let _0x2977a3=_0x53c988[_0x46a4ca];return _0x2977a3;}function resolveCookie(_0x3f4d19){const _0x430a25=a22_0x2977,_0x159e49=_0x3f4d19[_0x430a25(0x8a)]||getCookie();if(!_0x159e49)throw CliErrors[_0x430a25(0x88)]();return _0x159e49;}export async function listRemoteAppDirectory(_0x3c8181){const _0x161fc8=a22_0x2977,_0x41f623=await withActiveCookie(resolveCookie(_0x3c8181),()=>listRemoteApps());return{'items':_0x41f623[_0x161fc8(0x8e)](_0x22c33e=>({..._0x22c33e['id']!=null?{'id':_0x22c33e['id']}:{},'appCode':_0x22c33e[_0x161fc8(0x89)],'appName':_0x22c33e[_0x161fc8(0x92)],..._0x22c33e[_0x161fc8(0x8c)]!=null?{'appDesc':_0x22c33e[_0x161fc8(0x8c)]}:{}})),'meta':{'source':_0x161fc8(0x94)}};}
1
+ (function(_0x58b919,_0x51e651){const _0x3e9420=a22_0x53a6,_0x696bad=_0x58b919();while(!![]){try{const _0x541589=-parseInt(_0x3e9420(0xe1))/0x1*(parseInt(_0x3e9420(0xe2))/0x2)+parseInt(_0x3e9420(0xe6))/0x3+-parseInt(_0x3e9420(0xee))/0x4*(parseInt(_0x3e9420(0xe7))/0x5)+parseInt(_0x3e9420(0xf0))/0x6*(-parseInt(_0x3e9420(0xe4))/0x7)+-parseInt(_0x3e9420(0xe3))/0x8*(parseInt(_0x3e9420(0xe8))/0x9)+-parseInt(_0x3e9420(0xef))/0xa*(parseInt(_0x3e9420(0xeb))/0xb)+parseInt(_0x3e9420(0xe9))/0xc;if(_0x541589===_0x51e651)break;else _0x696bad['push'](_0x696bad['shift']());}catch(_0x41e4c7){_0x696bad['push'](_0x696bad['shift']());}}}(a22_0x1dc2,0x358cc));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(_0x45e48f){const _0x23407d=a22_0x53a6,_0x5773f2=_0x45e48f[_0x23407d(0xf1)]||getCookie();if(!_0x5773f2)throw CliErrors[_0x23407d(0xe5)]();return _0x5773f2;}function a22_0x53a6(_0x419969,_0x44509e){_0x419969=_0x419969-0xe1;const _0x1dc2e9=a22_0x1dc2();let _0x53a6af=_0x1dc2e9[_0x419969];return _0x53a6af;}function a22_0x1dc2(){const _0x249371=['7PfGqcp','authRequired','307734snvCgK','10kUcpVB','549yDEieC','8524248ahggEE','map','495uQojIj','appName','appCode','46244CagyJi','15530EAiucc','1148682vlnwGg','cookie','platform','3TLmbHc','27606ewDUwc','35112hpcDUG'];a22_0x1dc2=function(){return _0x249371;};return a22_0x1dc2();}export async function listRemoteAppDirectory(_0x221f5b){const _0x575d52=a22_0x53a6,_0x14ac52=await withActiveCookie(resolveCookie(_0x221f5b),()=>listRemoteApps());return{'items':_0x14ac52[_0x575d52(0xea)](_0x3a38ad=>({..._0x3a38ad['id']!=null?{'id':_0x3a38ad['id']}:{},'appCode':_0x3a38ad[_0x575d52(0xed)],'appName':_0x3a38ad[_0x575d52(0xec)],..._0x3a38ad['appDesc']!=null?{'appDesc':_0x3a38ad['appDesc']}:{}})),'meta':{'source':_0x575d52(0xf2)}};}
@@ -1 +1 @@
1
- (function(_0x55d744,_0x346f8e){const _0x3e9b07=a23_0x1d12,_0x2f5c43=_0x55d744();while(!![]){try{const _0x1b2988=-parseInt(_0x3e9b07(0x143))/0x1+-parseInt(_0x3e9b07(0x128))/0x2+parseInt(_0x3e9b07(0x124))/0x3*(-parseInt(_0x3e9b07(0x141))/0x4)+-parseInt(_0x3e9b07(0x130))/0x5*(parseInt(_0x3e9b07(0x14c))/0x6)+-parseInt(_0x3e9b07(0x13f))/0x7+parseInt(_0x3e9b07(0x14b))/0x8*(-parseInt(_0x3e9b07(0x11f))/0x9)+-parseInt(_0x3e9b07(0x137))/0xa*(-parseInt(_0x3e9b07(0x122))/0xb);if(_0x1b2988===_0x346f8e)break;else _0x2f5c43['push'](_0x2f5c43['shift']());}catch(_0xc11861){_0x2f5c43['push'](_0x2f5c43['shift']());}}}(a23_0x1b14,0xacf42));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x27b080){const _0x48ab17=a23_0x1d12,_0x5e0001=_0x27b080?.[_0x48ab17(0x12e)]();return _0x5e0001?_0x5e0001:null;}export function projectAppMembers(_0x4c1585){const _0x441289=a23_0x1d12,_0x11c340=new Map(),_0x44e30d=[..._0x4c1585][_0x441289(0x142)]((_0x21cc52,_0x1616e7)=>_0x21cc52['id']-_0x1616e7['id']),_0x1cb44c=(_0x9bb71d,_0x361481,_0x192a33)=>{const _0x51196f=_0x441289;for(const _0x1ffa42 of _0x361481){const _0x521502=Number(_0x1ffa42[_0x51196f(0x12f)]);if(!Number[_0x51196f(0x13e)](_0x521502)||_0x521502<=0x0)continue;let _0x4d0693=_0x11c340[_0x51196f(0x11c)](_0x521502);if(!_0x4d0693)_0x4d0693={'userId':_0x521502,'username':nullableText(_0x1ffa42[_0x51196f(0x12d)]),'displayName':nullableText(_0x1ffa42[_0x51196f(0x12c)]),'status':_0x192a33,'roles':[],'roleKeys':new Set()},_0x11c340[_0x51196f(0x12a)](_0x521502,_0x4d0693);else{_0x4d0693[_0x51196f(0x12d)]??=nullableText(_0x1ffa42['username']),_0x4d0693[_0x51196f(0x147)]??=nullableText(_0x1ffa42[_0x51196f(0x12c)]);if(_0x192a33==='ACTIVE')_0x4d0693[_0x51196f(0x131)]=_0x51196f(0x13d);}const _0x1db847=_0x9bb71d['id']+':'+_0x192a33;if(_0x4d0693['roleKeys'][_0x51196f(0x148)](_0x1db847))continue;_0x4d0693[_0x51196f(0x134)]['add'](_0x1db847),_0x4d0693['roles'][_0x51196f(0x135)]({'roleId':_0x9bb71d['id'],'roleName':nullableText(_0x9bb71d[_0x51196f(0x129)]),'roleType':nullableText(_0x9bb71d['roleType']),'membershipStatus':_0x192a33});}};for(const _0x1bf038 of _0x44e30d){_0x1cb44c(_0x1bf038,_0x1bf038[_0x441289(0x11b)]??[],_0x441289(0x13d)),_0x1cb44c(_0x1bf038,_0x1bf038[_0x441289(0x140)]??[],_0x441289(0x138));}return[..._0x11c340[_0x441289(0x145)]()]['map'](_0x2c5965=>({'userId':_0x2c5965[_0x441289(0x12f)],'username':_0x2c5965['username'],'displayName':_0x2c5965[_0x441289(0x147)],'status':_0x2c5965['status'],'roles':_0x2c5965[_0x441289(0x11d)][_0x441289(0x142)]((_0x319fe4,_0x1d5539)=>_0x319fe4[_0x441289(0x139)]-_0x1d5539[_0x441289(0x139)]||(_0x319fe4[_0x441289(0x123)]===_0x1d5539['membershipStatus']?0x0:_0x319fe4[_0x441289(0x123)]==='ACTIVE'?-0x1:0x1))}))[_0x441289(0x142)]((_0x215f3c,_0x4cdcb6)=>_0x215f3c[_0x441289(0x12f)]-_0x4cdcb6[_0x441289(0x12f)]);}export function enrichAppListItemsWithMergedSelection(_0xa897a,_0x50370d){const _0x2e3ebe=a23_0x1d12;if(!_0x50370d)return;const _0xa16bba=_0x50370d[_0x2e3ebe(0x13b)]&&typeof _0x50370d[_0x2e3ebe(0x13b)]===_0x2e3ebe(0x11a)?_0x50370d['apps']:{},_0x49644f=Object[_0x2e3ebe(0x11e)](_0xa16bba)[_0x2e3ebe(0x14a)]>0x0;for(const _0x1f4305 of _0xa897a){_0x1f4305['isCurrent']=![];}const _0x272fd5=_0x50370d[_0x2e3ebe(0x144)]!=null?String(_0x50370d['appCode'])[_0x2e3ebe(0x12e)]():'';if(_0x49644f){const _0x29a962=_0x50370d['currentApp']??_0x50370d[_0x2e3ebe(0x133)];if(_0x29a962)for(const _0x284b of _0xa897a){_0x284b[_0x2e3ebe(0x149)]===!![]&&_0x284b[_0x2e3ebe(0x132)]===_0x29a962&&(_0x284b['isCurrent']=!![]);}for(const _0x1b4115 of _0xa897a){if(_0x1b4115[_0x2e3ebe(0x149)]!==![])continue;if(_0x50370d[_0x2e3ebe(0x133)])continue;_0x272fd5&&String(_0x1b4115[_0x2e3ebe(0x120)]??'')['trim']()===_0x272fd5&&(_0x1b4115[_0x2e3ebe(0x121)]=!![]);}return;}if(!_0x272fd5)return;for(const _0x65ec25 of _0xa897a){String(_0x65ec25[_0x2e3ebe(0x120)]??'')[_0x2e3ebe(0x12e)]()===_0x272fd5&&(_0x65ec25[_0x2e3ebe(0x121)]=!![]);}}export function resolveAppScopeForWrite(_0x5b69d4,_0x2948e6,_0x4ac00d){const _0x46829f=a23_0x1d12;if(_0x2948e6)return _0x46829f(0x13c);const _0x5ee689=_0x4ac00d[_0x46829f(0x146)]['apps']&&typeof _0x4ac00d[_0x46829f(0x146)]['apps']===_0x46829f(0x11a)?_0x4ac00d[_0x46829f(0x146)][_0x46829f(0x13b)]:{},_0x4ffc3d=_0x4ac00d['globalConfig'][_0x46829f(0x13b)]&&typeof _0x4ac00d[_0x46829f(0x125)][_0x46829f(0x13b)]===_0x46829f(0x11a)?_0x4ac00d['globalConfig']['apps']:{};if(Object[_0x46829f(0x13a)][_0x46829f(0x127)][_0x46829f(0x136)](_0x5ee689,_0x5b69d4))return'project';if(Object[_0x46829f(0x13a)]['hasOwnProperty']['call'](_0x4ffc3d,_0x5b69d4))return _0x46829f(0x13c);return'project';}function a23_0x1b14(){const _0x18eca2=['\x20(global)','object','userList','get','roles','keys','18bnvMsF','appcode','isCurrent','66BUFadk','membershipStatus','6atGyJT','globalConfig','project','hasOwnProperty','2292058DstkzP','roleName','set','both','nickname','username','trim','userId','5665ZLoqpV','status','name','defaultApp','roleKeys','push','call','6234270QvUIqT','PENDING','roleId','prototype','apps','global','ACTIVE','isFinite','2255001NJtydu','applyUserList','613628pibsOx','sort','85307TGRnUl','appCode','values','projectConfig','displayName','has','named','length','1320128fIbJGN','4458MtSxsc'];a23_0x1b14=function(){return _0x18eca2;};return a23_0x1b14();}export function appDefinedIn(_0x8e9ac5,_0x47aee9,_0x4d9fd6){const _0x4e9a3f=a23_0x1d12,_0x3936a6=Object[_0x4e9a3f(0x13a)]['hasOwnProperty'][_0x4e9a3f(0x136)](_0x47aee9,_0x8e9ac5),_0x333ac2=Object['prototype']['hasOwnProperty'][_0x4e9a3f(0x136)](_0x4d9fd6,_0x8e9ac5);if(_0x3936a6&&_0x333ac2)return _0x4e9a3f(0x12b);if(_0x333ac2)return _0x4e9a3f(0x126);return _0x4e9a3f(0x13c);}export function resolveDefaultAppSource(_0xe5b02a){const _0x461a36=a23_0x1d12,_0x16af4e=_0xe5b02a['projectConfig'][_0x461a36(0x13b)]&&typeof _0xe5b02a['projectConfig'][_0x461a36(0x13b)]===_0x461a36(0x11a)?_0xe5b02a[_0x461a36(0x146)][_0x461a36(0x13b)]:{};if('defaultApp'in _0xe5b02a[_0x461a36(0x146)])return _0x461a36(0x126);if(Object[_0x461a36(0x11e)](_0x16af4e)['length']>0x0)return _0x461a36(0x126);if(Object['keys'](_0xe5b02a['projectConfig'])[_0x461a36(0x14a)]===0x0&&_0xe5b02a['globalConfig']['defaultApp'])return _0x461a36(0x13c);return null;}export function getConfigPath(_0x4b7d49={}){const _0x18feb3=a23_0x1d12,_0x79aac6=_0x4b7d49['global']?_0x18feb3(0x13c):_0x18feb3(0x126);return resolveWriteConfigPath(_0x79aac6);}export function readConfig(_0x25fe4e={}){return readConfigFile(getConfigPath(_0x25fe4e));}function a23_0x1d12(_0xd37ff3,_0x598eb9){_0xd37ff3=_0xd37ff3-0x119;const _0x1b1439=a23_0x1b14();let _0x1d121b=_0x1b1439[_0xd37ff3];return _0x1d121b;}export function writeConfig(_0x2b4f3b,_0x22cbf7={}){writeConfigFile(getConfigPath(_0x22cbf7),_0x2b4f3b);}export function scopeLabel(_0x1a67f1){const _0x23d055=a23_0x1d12;return _0x1a67f1[_0x23d055(0x13c)]?_0x23d055(0x119):'';}
1
+ (function(_0x167181,_0x2d8ade){const _0xa87e8a=a23_0x324f,_0x42ba77=_0x167181();while(!![]){try{const _0x5409e3=parseInt(_0xa87e8a(0x139))/0x1*(parseInt(_0xa87e8a(0x14a))/0x2)+parseInt(_0xa87e8a(0x151))/0x3*(-parseInt(_0xa87e8a(0x135))/0x4)+parseInt(_0xa87e8a(0x156))/0x5*(parseInt(_0xa87e8a(0x141))/0x6)+-parseInt(_0xa87e8a(0x140))/0x7*(parseInt(_0xa87e8a(0x155))/0x8)+parseInt(_0xa87e8a(0x136))/0x9*(parseInt(_0xa87e8a(0x133))/0xa)+-parseInt(_0xa87e8a(0x132))/0xb+parseInt(_0xa87e8a(0x12b))/0xc*(parseInt(_0xa87e8a(0x13c))/0xd);if(_0x5409e3===_0x2d8ade)break;else _0x42ba77['push'](_0x42ba77['shift']());}catch(_0x484a88){_0x42ba77['push'](_0x42ba77['shift']());}}}(a23_0x2d67,0xef20c));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x23338e){const _0x533921=a23_0x324f,_0x335933=_0x23338e?.[_0x533921(0x143)]();return _0x335933?_0x335933:null;}export function projectAppMembers(_0x1791cb){const _0x34e18e=a23_0x324f,_0x25c597=new Map(),_0x3999f8=[..._0x1791cb]['sort']((_0x4944f9,_0x3acebd)=>_0x4944f9['id']-_0x3acebd['id']),_0x1a1450=(_0x4128b4,_0x4bd903,_0x8992fa)=>{const _0x3c7aa3=a23_0x324f;for(const _0x9eac3c of _0x4bd903){const _0x6ca7ee=Number(_0x9eac3c['userId']);if(!Number['isFinite'](_0x6ca7ee)||_0x6ca7ee<=0x0)continue;let _0x2a4515=_0x25c597[_0x3c7aa3(0x137)](_0x6ca7ee);if(!_0x2a4515)_0x2a4515={'userId':_0x6ca7ee,'username':nullableText(_0x9eac3c[_0x3c7aa3(0x13f)]),'displayName':nullableText(_0x9eac3c[_0x3c7aa3(0x12a)]),'status':_0x8992fa,'roles':[],'roleKeys':new Set()},_0x25c597['set'](_0x6ca7ee,_0x2a4515);else{_0x2a4515[_0x3c7aa3(0x13f)]??=nullableText(_0x9eac3c['username']),_0x2a4515[_0x3c7aa3(0x14c)]??=nullableText(_0x9eac3c['nickname']);if(_0x8992fa===_0x3c7aa3(0x14b))_0x2a4515[_0x3c7aa3(0x152)]=_0x3c7aa3(0x14b);}const _0x54fe61=_0x4128b4['id']+':'+_0x8992fa;if(_0x2a4515[_0x3c7aa3(0x150)][_0x3c7aa3(0x13b)](_0x54fe61))continue;_0x2a4515[_0x3c7aa3(0x150)]['add'](_0x54fe61),_0x2a4515[_0x3c7aa3(0x130)]['push']({'roleId':_0x4128b4['id'],'roleName':nullableText(_0x4128b4['roleName']),'roleType':nullableText(_0x4128b4[_0x3c7aa3(0x131)]),'membershipStatus':_0x8992fa});}};for(const _0x34414d of _0x3999f8){_0x1a1450(_0x34414d,_0x34414d['userList']??[],'ACTIVE'),_0x1a1450(_0x34414d,_0x34414d[_0x34e18e(0x147)]??[],_0x34e18e(0x144));}return[..._0x25c597['values']()]['map'](_0x26f495=>({'userId':_0x26f495['userId'],'username':_0x26f495['username'],'displayName':_0x26f495[_0x34e18e(0x14c)],'status':_0x26f495[_0x34e18e(0x152)],'roles':_0x26f495[_0x34e18e(0x130)]['sort']((_0x5b007f,_0x3c568f)=>_0x5b007f[_0x34e18e(0x146)]-_0x3c568f[_0x34e18e(0x146)]||(_0x5b007f['membershipStatus']===_0x3c568f['membershipStatus']?0x0:_0x5b007f['membershipStatus']===_0x34e18e(0x14b)?-0x1:0x1))}))['sort']((_0xfe8abd,_0x154bf8)=>_0xfe8abd[_0x34e18e(0x142)]-_0x154bf8[_0x34e18e(0x142)]);}function a23_0x2d67(){const _0x34c2fd=['defaultApp','apps','prototype','roles','roleType','9917006gzjEWd','865790NKmqHS','\x20(global)','4tJCUMS','117wfyCRR','get','globalConfig','73GjjVCt','hasOwnProperty','has','4021823DOVPFe','keys','projectConfig','username','6065563vcYNvd','5563122cipoxn','userId','trim','PENDING','appCode','roleId','applyUserList','call','isCurrent','24086vEkXAk','ACTIVE','displayName','length','appcode','global','roleKeys','5378367ykeHLm','status','named','both','16VoRmqf','5Fgrouo','nickname','96eaLqNA','project'];a23_0x2d67=function(){return _0x34c2fd;};return a23_0x2d67();}export function enrichAppListItemsWithMergedSelection(_0x1f2ed2,_0x4474a4){const _0x276fa5=a23_0x324f;if(!_0x4474a4)return;const _0x25819c=_0x4474a4['apps']&&typeof _0x4474a4[_0x276fa5(0x12e)]==='object'?_0x4474a4[_0x276fa5(0x12e)]:{},_0x51c291=Object[_0x276fa5(0x13d)](_0x25819c)[_0x276fa5(0x14d)]>0x0;for(const _0xe8cdeb of _0x1f2ed2){_0xe8cdeb[_0x276fa5(0x149)]=![];}const _0x3fb0fa=_0x4474a4[_0x276fa5(0x145)]!=null?String(_0x4474a4['appCode'])[_0x276fa5(0x143)]():'';if(_0x51c291){const _0x1233dc=_0x4474a4['currentApp']??_0x4474a4[_0x276fa5(0x12d)];if(_0x1233dc)for(const _0x4228e6 of _0x1f2ed2){_0x4228e6[_0x276fa5(0x153)]===!![]&&_0x4228e6['name']===_0x1233dc&&(_0x4228e6[_0x276fa5(0x149)]=!![]);}for(const _0x1cd69b of _0x1f2ed2){if(_0x1cd69b[_0x276fa5(0x153)]!==![])continue;if(_0x4474a4[_0x276fa5(0x12d)])continue;_0x3fb0fa&&String(_0x1cd69b['appcode']??'')[_0x276fa5(0x143)]()===_0x3fb0fa&&(_0x1cd69b['isCurrent']=!![]);}return;}if(!_0x3fb0fa)return;for(const _0x40de48 of _0x1f2ed2){String(_0x40de48[_0x276fa5(0x14e)]??'')['trim']()===_0x3fb0fa&&(_0x40de48[_0x276fa5(0x149)]=!![]);}}export function resolveAppScopeForWrite(_0x36e8dc,_0x3852d2,_0xd2575c){const _0x2920bc=a23_0x324f;if(_0x3852d2)return'global';const _0x4165ca=_0xd2575c[_0x2920bc(0x13e)][_0x2920bc(0x12e)]&&typeof _0xd2575c['projectConfig'][_0x2920bc(0x12e)]==='object'?_0xd2575c[_0x2920bc(0x13e)][_0x2920bc(0x12e)]:{},_0x46b8cf=_0xd2575c[_0x2920bc(0x138)][_0x2920bc(0x12e)]&&typeof _0xd2575c[_0x2920bc(0x138)][_0x2920bc(0x12e)]==='object'?_0xd2575c['globalConfig'][_0x2920bc(0x12e)]:{};if(Object[_0x2920bc(0x12f)]['hasOwnProperty'][_0x2920bc(0x148)](_0x4165ca,_0x36e8dc))return _0x2920bc(0x12c);if(Object[_0x2920bc(0x12f)]['hasOwnProperty']['call'](_0x46b8cf,_0x36e8dc))return _0x2920bc(0x14f);return'project';}export function appDefinedIn(_0x292bdc,_0x32a0a7,_0x3d664b){const _0x5cb7ad=a23_0x324f,_0x26cc26=Object[_0x5cb7ad(0x12f)][_0x5cb7ad(0x13a)][_0x5cb7ad(0x148)](_0x32a0a7,_0x292bdc),_0x4c8d1c=Object['prototype'][_0x5cb7ad(0x13a)]['call'](_0x3d664b,_0x292bdc);if(_0x26cc26&&_0x4c8d1c)return _0x5cb7ad(0x154);if(_0x4c8d1c)return'project';return _0x5cb7ad(0x14f);}export function resolveDefaultAppSource(_0x41327f){const _0x3f32a2=a23_0x324f,_0x182793=_0x41327f[_0x3f32a2(0x13e)]['apps']&&typeof _0x41327f[_0x3f32a2(0x13e)]['apps']==='object'?_0x41327f[_0x3f32a2(0x13e)][_0x3f32a2(0x12e)]:{};if(_0x3f32a2(0x12d)in _0x41327f['projectConfig'])return _0x3f32a2(0x12c);if(Object[_0x3f32a2(0x13d)](_0x182793)[_0x3f32a2(0x14d)]>0x0)return'project';if(Object[_0x3f32a2(0x13d)](_0x41327f[_0x3f32a2(0x13e)])[_0x3f32a2(0x14d)]===0x0&&_0x41327f['globalConfig'][_0x3f32a2(0x12d)])return'global';return null;}function a23_0x324f(_0x743d95,_0x2a4d96){_0x743d95=_0x743d95-0x12a;const _0x2d6757=a23_0x2d67();let _0x324ff4=_0x2d6757[_0x743d95];return _0x324ff4;}export function getConfigPath(_0x2e18af={}){const _0x1a2a1f=a23_0x324f,_0x4c9aff=_0x2e18af['global']?_0x1a2a1f(0x14f):_0x1a2a1f(0x12c);return resolveWriteConfigPath(_0x4c9aff);}export function readConfig(_0x4c6a1d={}){return readConfigFile(getConfigPath(_0x4c6a1d));}export function writeConfig(_0x382203,_0x4d1845={}){writeConfigFile(getConfigPath(_0x4d1845),_0x382203);}export function scopeLabel(_0x22590a){const _0x1920c0=a23_0x324f;return _0x22590a[_0x1920c0(0x14f)]?_0x1920c0(0x134):'';}
@@ -1 +1 @@
1
- function a24_0x2e18(){const _0x22dc74=['2148564HuDYgG','Deleted\x20app\x20config\x20','get','7202tGsImK','POST','63riikjw','Delete\x20one\x20runtime\x20app-config\x20key','validation','729824JwShUz','apiError','14562uKzkng','isFinite','appCode','504RfTIeo','/smartapi/app-config/delete','147256jKqdWR','24438TXthxS','2336ftNGkh','App\x20config\x20key\x20not\x20found:\x20','number','delete','11574FQRXNy','20RKlXsv','38340FawPGF',',\x20appCode=','App\x20config\x20server\x20id\x20missing\x20for\x20key=','10rBjfIx'];a24_0x2e18=function(){return _0x22dc74;};return a24_0x2e18();}const a24_0x466d4d=a24_0x37e1;(function(_0xfdcfe8,_0x5ac494){const _0x2e7dcb=a24_0x37e1,_0x1118a3=_0xfdcfe8();while(!![]){try{const _0x556ac1=parseInt(_0x2e7dcb(0x15e))/0x1+parseInt(_0x2e7dcb(0x15f))/0x2*(-parseInt(_0x2e7dcb(0x16f))/0x3)+-parseInt(_0x2e7dcb(0x172))/0x4*(parseInt(_0x2e7dcb(0x169))/0x5)+parseInt(_0x2e7dcb(0x164))/0x6*(-parseInt(_0x2e7dcb(0x15c))/0x7)+-parseInt(_0x2e7dcb(0x160))/0x8*(parseInt(_0x2e7dcb(0x174))/0x9)+-parseInt(_0x2e7dcb(0x165))/0xa*(parseInt(_0x2e7dcb(0x16a))/0xb)+parseInt(_0x2e7dcb(0x166))/0xc*(parseInt(_0x2e7dcb(0x16d))/0xd);if(_0x556ac1===_0x5ac494)break;else _0x1118a3['push'](_0x1118a3['shift']());}catch(_0x43ecc8){_0x1118a3['push'](_0x1118a3['shift']());}}}(a24_0x2e18,0x47b97));function a24_0x37e1(_0xe63a5c,_0x4c9037){_0xe63a5c=_0xe63a5c-0x15c;const _0x2e186f=a24_0x2e18();let _0x37e179=_0x2e186f[_0xe63a5c];return _0x37e179;}import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x466d4d(0x15d);export const appConfigDelete={'service':'app-config','command':a24_0x466d4d(0x163),'description':a24_0x466d4d(0x170),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x14f9ab){readKeyArg(_0x14f9ab);},async 'dryRun'(_0x2ba5b8){const _0x332d72=a24_0x466d4d,_0x1e754c=readKeyArg(_0x2ba5b8),_0x58379f=await mustGetByKey(_0x2ba5b8[_0x332d72(0x176)],_0x1e754c);return asAppConfigDryRunResult(buildMutationData({'operation':_0x332d72(0x163),'appCode':_0x2ba5b8['appCode'],'key':_0x1e754c,'before':projectAppConfig(_0x58379f),'after':null,'dryRun':!![]}),{'method':_0x332d72(0x16e),'url':DELETE_PATH});},async 'execute'(_0x3637ea){const _0x377a98=a24_0x466d4d,_0x2daa2a=readKeyArg(_0x3637ea),_0x3eff1b=await mustGetByKey(_0x3637ea['appCode'],_0x2daa2a);return await withAppConfigApiBoundary(_0x377a98(0x163),{'appCode':_0x3637ea[_0x377a98(0x176)],'key':_0x2daa2a},()=>deleteAppConfig({'appCode':_0x3637ea[_0x377a98(0x176)],'id':requireAppConfigId(_0x3eff1b,_0x2daa2a,_0x3637ea[_0x377a98(0x176)])})),{'ok':!![],'data':buildMutationData({'operation':_0x377a98(0x163),'appCode':_0x3637ea[_0x377a98(0x176)],'key':_0x2daa2a,'before':projectAppConfig(_0x3eff1b),'after':null,'dryRun':![]}),'message':_0x377a98(0x16b)+_0x2daa2a};}};async function mustGetByKey(_0x17644b,_0x2e862c){const _0x5c9410=a24_0x466d4d,_0x4f7c80=await withAppConfigApiBoundary(_0x5c9410(0x16c),{'appCode':_0x17644b,'key':_0x2e862c},()=>getAppConfigByKey(_0x17644b,_0x2e862c));if(!_0x4f7c80)throw CliErrors[_0x5c9410(0x171)](_0x5c9410(0x161)+_0x2e862c,'appCode:\x20'+_0x17644b);return _0x4f7c80;}function requireAppConfigId(_0x33c3f4,_0x1f9be3,_0x223152){const _0x26979d=a24_0x466d4d;if(typeof _0x33c3f4['id']===_0x26979d(0x162)&&Number[_0x26979d(0x175)](_0x33c3f4['id'])&&_0x33c3f4['id']>0x0)return _0x33c3f4['id'];throw CliErrors[_0x26979d(0x173)](_0x26979d(0x168)+_0x1f9be3+_0x26979d(0x167)+_0x223152);}
1
+ const a24_0x1ae6c1=a24_0xc546;(function(_0x1112a6,_0x5a7ca7){const _0x28aa8c=a24_0xc546,_0x43f437=_0x1112a6();while(!![]){try{const _0x57c2d4=parseInt(_0x28aa8c(0x1d4))/0x1+parseInt(_0x28aa8c(0x1cd))/0x2*(parseInt(_0x28aa8c(0x1d7))/0x3)+-parseInt(_0x28aa8c(0x1d3))/0x4*(-parseInt(_0x28aa8c(0x1d2))/0x5)+-parseInt(_0x28aa8c(0x1c5))/0x6*(parseInt(_0x28aa8c(0x1d9))/0x7)+parseInt(_0x28aa8c(0x1d1))/0x8+parseInt(_0x28aa8c(0x1cf))/0x9+-parseInt(_0x28aa8c(0x1c8))/0xa;if(_0x57c2d4===_0x5a7ca7)break;else _0x43f437['push'](_0x43f437['shift']());}catch(_0x4ad98b){_0x43f437['push'](_0x43f437['shift']());}}}(a24_0x1800,0x8c4a3));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a24_0x1800(){const _0x4cb6f9=['1603230hBPfJw','Deleted\x20app\x20config\x20','POST','29895640SniDQf','appCode','delete','App\x20config\x20key\x20not\x20found:\x20','isFinite','50ZMPwYg','app-config','6927849pUVscb','apiError','6425728NvwJVj','5kHICmu','4289176QeizXv','845160spICUY','high-risk-write','get','105045BcowKD','validation','21YTYkfD',',\x20appCode='];a24_0x1800=function(){return _0x4cb6f9;};return a24_0x1800();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0xc546(_0x4789a7,_0x2ccc8c){_0x4789a7=_0x4789a7-0x1c5;const _0x180013=a24_0x1800();let _0xc546ff=_0x180013[_0x4789a7];return _0xc546ff;}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':a24_0x1ae6c1(0x1ce),'command':a24_0x1ae6c1(0x1ca),'description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':a24_0x1ae6c1(0x1d5),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2f7436){readKeyArg(_0x2f7436);},async 'dryRun'(_0x1cf93e){const _0x748520=a24_0x1ae6c1,_0x3753e=readKeyArg(_0x1cf93e),_0x43dcbb=await mustGetByKey(_0x1cf93e[_0x748520(0x1c9)],_0x3753e);return asAppConfigDryRunResult(buildMutationData({'operation':'delete','appCode':_0x1cf93e[_0x748520(0x1c9)],'key':_0x3753e,'before':projectAppConfig(_0x43dcbb),'after':null,'dryRun':!![]}),{'method':_0x748520(0x1c7),'url':DELETE_PATH});},async 'execute'(_0x47de54){const _0x355a1d=a24_0x1ae6c1,_0x35352d=readKeyArg(_0x47de54),_0x25fa0b=await mustGetByKey(_0x47de54[_0x355a1d(0x1c9)],_0x35352d);return await withAppConfigApiBoundary('delete',{'appCode':_0x47de54[_0x355a1d(0x1c9)],'key':_0x35352d},()=>deleteAppConfig({'appCode':_0x47de54[_0x355a1d(0x1c9)],'id':requireAppConfigId(_0x25fa0b,_0x35352d,_0x47de54[_0x355a1d(0x1c9)])})),{'ok':!![],'data':buildMutationData({'operation':_0x355a1d(0x1ca),'appCode':_0x47de54['appCode'],'key':_0x35352d,'before':projectAppConfig(_0x25fa0b),'after':null,'dryRun':![]}),'message':_0x355a1d(0x1c6)+_0x35352d};}};async function mustGetByKey(_0x2ec1de,_0x11ea0b){const _0x49945e=a24_0x1ae6c1,_0xd764c0=await withAppConfigApiBoundary(_0x49945e(0x1d6),{'appCode':_0x2ec1de,'key':_0x11ea0b},()=>getAppConfigByKey(_0x2ec1de,_0x11ea0b));if(!_0xd764c0)throw CliErrors[_0x49945e(0x1d8)](_0x49945e(0x1cb)+_0x11ea0b,'appCode:\x20'+_0x2ec1de);return _0xd764c0;}function requireAppConfigId(_0x47412f,_0x21f99d,_0x3a34fa){const _0x23d175=a24_0x1ae6c1;if(typeof _0x47412f['id']==='number'&&Number[_0x23d175(0x1cc)](_0x47412f['id'])&&_0x47412f['id']>0x0)return _0x47412f['id'];throw CliErrors[_0x23d175(0x1d0)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x21f99d+_0x23d175(0x1da)+_0x3a34fa);}
@@ -1 +1 @@
1
- const a25_0x5e3542=a25_0x1277;function a25_0x1277(_0x2bcd37,_0x1242c5){_0x2bcd37=_0x2bcd37-0xa4;const _0x59d68c=a25_0x59d6();let _0x1277ab=_0x59d68c[_0x2bcd37];return _0x1277ab;}(function(_0x1b677a,_0x5aa1b8){const _0x3de445=a25_0x1277,_0x197d3c=_0x1b677a();while(!![]){try{const _0x40328e=parseInt(_0x3de445(0xb0))/0x1*(parseInt(_0x3de445(0xaa))/0x2)+parseInt(_0x3de445(0xad))/0x3*(-parseInt(_0x3de445(0xa8))/0x4)+-parseInt(_0x3de445(0xb7))/0x5*(parseInt(_0x3de445(0xb1))/0x6)+parseInt(_0x3de445(0xae))/0x7+-parseInt(_0x3de445(0xaf))/0x8+parseInt(_0x3de445(0xb2))/0x9*(parseInt(_0x3de445(0xb4))/0xa)+parseInt(_0x3de445(0xa7))/0xb*(parseInt(_0x3de445(0xa9))/0xc);if(_0x40328e===_0x5aa1b8)break;else _0x197d3c['push'](_0x197d3c['shift']());}catch(_0x94f1a9){_0x197d3c['push'](_0x197d3c['shift']());}}}(a25_0x59d6,0x5ef6d));function a25_0x59d6(){const _0x2596b6=['read','318285kiGyNY','276244qGubqA','12YcoBWm','865496ofTOBi','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','validation','30osKlWi','5104022XwgXse','3690528PZyqhw','1DFidVT','234gDDAvP','12339jHaNAa','bool','4040lsAncS','get','\x20with\x20value\x20revealed','26130udjEfS','Loaded\x20app\x20config\x20','reveal','appCode','appCode:\x20'];a25_0x59d6=function(){return _0x2596b6;};return a25_0x59d6();}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':a25_0x5e3542(0xb5),'description':a25_0x5e3542(0xab),'risk':a25_0x5e3542(0xa6),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x39012b){readKeyArg(_0x39012b);},async 'execute'(_0x59690d){const _0x70d2c=a25_0x5e3542,_0x65cf39=readKeyArg(_0x59690d),_0x913fe1=await withAppConfigApiBoundary(_0x70d2c(0xb5),{'appCode':_0x59690d['appCode'],'key':_0x65cf39},()=>getAppConfigByKey(_0x59690d[_0x70d2c(0xa4)],_0x65cf39));if(!_0x913fe1)throw CliErrors[_0x70d2c(0xac)]('App\x20config\x20key\x20not\x20found:\x20'+_0x65cf39,_0x70d2c(0xa5)+_0x59690d['appCode']);const _0x144ce2=projectAppConfig(_0x913fe1,{'reveal':_0x59690d['bool'](_0x70d2c(0xb9))});return{'ok':!![],'data':{'config':_0x144ce2},'message':_0x59690d[_0x70d2c(0xb3)]('reveal')?'Loaded\x20app\x20config\x20'+_0x65cf39+_0x70d2c(0xb6):_0x70d2c(0xb8)+_0x65cf39+'\x20with\x20value\x20redacted'};}};
1
+ const a25_0x143ba0=a25_0x4eda;(function(_0x3fd67c,_0x5c966e){const _0x5b2ec8=a25_0x4eda,_0x4389ad=_0x3fd67c();while(!![]){try{const _0x23ad8a=parseInt(_0x5b2ec8(0x81))/0x1*(-parseInt(_0x5b2ec8(0x8b))/0x2)+parseInt(_0x5b2ec8(0x82))/0x3*(-parseInt(_0x5b2ec8(0x86))/0x4)+parseInt(_0x5b2ec8(0x95))/0x5*(parseInt(_0x5b2ec8(0x96))/0x6)+-parseInt(_0x5b2ec8(0x8e))/0x7+parseInt(_0x5b2ec8(0x91))/0x8*(-parseInt(_0x5b2ec8(0x94))/0x9)+-parseInt(_0x5b2ec8(0x90))/0xa*(parseInt(_0x5b2ec8(0x8a))/0xb)+parseInt(_0x5b2ec8(0x83))/0xc*(parseInt(_0x5b2ec8(0x93))/0xd);if(_0x23ad8a===_0x5c966e)break;else _0x4389ad['push'](_0x4389ad['shift']());}catch(_0x59aebb){_0x4389ad['push'](_0x4389ad['shift']());}}}(a25_0x4348,0x2bc3d));function a25_0x4eda(_0x3dfbd3,_0x518c1d){_0x3dfbd3=_0x3dfbd3-0x81;const _0x4348a0=a25_0x4348();let _0x4eda3f=_0x4348a0[_0x3dfbd3];return _0x4eda3f;}function a25_0x4348(){const _0x24c52a=['653317TeDzml','get','360940LbWDlc','976eJwgtk','\x20with\x20value\x20revealed','26SzphpY','531SCSVqz','140470XKXGCr','6OAhkkh','App\x20config\x20key\x20not\x20found:\x20','\x20with\x20value\x20redacted','6086lDodVj','6UfTJTr','2698932qYNOQZ','appCode','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','44108OkFdyc','validation','appCode:\x20','bool','11WIuPPI','46ZLcIZQ','reveal','app-config'];a25_0x4348=function(){return _0x24c52a;};return a25_0x4348();}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x143ba0(0x8d),'command':a25_0x143ba0(0x8f),'description':a25_0x143ba0(0x85),'risk':'read','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x5c8d6b){readKeyArg(_0x5c8d6b);},async 'execute'(_0x298ff2){const _0x217c58=a25_0x143ba0,_0xb48e39=readKeyArg(_0x298ff2),_0xd557e8=await withAppConfigApiBoundary(_0x217c58(0x8f),{'appCode':_0x298ff2[_0x217c58(0x84)],'key':_0xb48e39},()=>getAppConfigByKey(_0x298ff2[_0x217c58(0x84)],_0xb48e39));if(!_0xd557e8)throw CliErrors[_0x217c58(0x87)](_0x217c58(0x97)+_0xb48e39,_0x217c58(0x88)+_0x298ff2[_0x217c58(0x84)]);const _0x2629d1=projectAppConfig(_0xd557e8,{'reveal':_0x298ff2[_0x217c58(0x89)](_0x217c58(0x8c))});return{'ok':!![],'data':{'config':_0x2629d1},'message':_0x298ff2[_0x217c58(0x89)](_0x217c58(0x8c))?'Loaded\x20app\x20config\x20'+_0xb48e39+_0x217c58(0x92):'Loaded\x20app\x20config\x20'+_0xb48e39+_0x217c58(0x98)};}};
@@ -1 +1 @@
1
- (function(_0x1a1c01,_0x14b463){const _0x391d1b=a26_0x3952,_0x53b58c=_0x1a1c01();while(!![]){try{const _0x13f6b2=-parseInt(_0x391d1b(0x1f2))/0x1*(parseInt(_0x391d1b(0x1ea))/0x2)+parseInt(_0x391d1b(0x1ec))/0x3+parseInt(_0x391d1b(0x1ef))/0x4+-parseInt(_0x391d1b(0x1ee))/0x5+-parseInt(_0x391d1b(0x1f0))/0x6+-parseInt(_0x391d1b(0x1eb))/0x7*(-parseInt(_0x391d1b(0x1f1))/0x8)+parseInt(_0x391d1b(0x1ed))/0x9;if(_0x13f6b2===_0x14b463)break;else _0x53b58c['push'](_0x53b58c['shift']());}catch(_0x588be7){_0x53b58c['push'](_0x53b58c['shift']());}}}(a26_0x406d,0x82b77));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_0x3952(_0x46767a,_0x3bfa63){_0x46767a=_0x46767a-0x1ea;const _0x406d15=a26_0x406d();let _0x395250=_0x406d15[_0x46767a];return _0x395250;}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];function a26_0x406d(){const _0x36fa99=['906642zUrEOj','3352TjDBBy','4WEJTLM','31090RKVVuD','3752YZgoAe','1665744HdOITT','1647999uYQlYI','3312335FBMocM','1792904VNGdRy'];a26_0x406d=function(){return _0x36fa99;};return a26_0x406d();}
1
+ (function(_0x1d301b,_0x1c248e){const _0x4597af=a26_0x14b1,_0x3e0278=_0x1d301b();while(!![]){try{const _0x26f73a=parseInt(_0x4597af(0x11f))/0x1+-parseInt(_0x4597af(0x11c))/0x2+parseInt(_0x4597af(0x123))/0x3*(parseInt(_0x4597af(0x124))/0x4)+parseInt(_0x4597af(0x11b))/0x5*(parseInt(_0x4597af(0x121))/0x6)+parseInt(_0x4597af(0x120))/0x7*(parseInt(_0x4597af(0x11e))/0x8)+-parseInt(_0x4597af(0x11d))/0x9+parseInt(_0x4597af(0x11a))/0xa*(-parseInt(_0x4597af(0x122))/0xb);if(_0x26f73a===_0x1c248e)break;else _0x3e0278['push'](_0x3e0278['shift']());}catch(_0x4ce85a){_0x3e0278['push'](_0x3e0278['shift']());}}}(a26_0x3d62,0xd7390));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';function a26_0x14b1(_0x338cd1,_0x2ebc8b){_0x338cd1=_0x338cd1-0x11a;const _0x3d6254=a26_0x3d62();let _0x14b178=_0x3d6254[_0x338cd1];return _0x14b178;}import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];function a26_0x3d62(){const _0x34b6ab=['66upaAXm','275aGbdjJ','358239RApKhm','40YDQvUf','671740cAlvCD','225375DcFkfw','1112360piUsSU','3484539YsDcrH','24UzlAZw','1703556MCZGtb','258398craLoV'];a26_0x3d62=function(){return _0x34b6ab;};return a26_0x3d62();}
@@ -1 +1 @@
1
- const a27_0x4e986a=a27_0x1596;function a27_0x1596(_0x26f289,_0x4b4142){_0x26f289=_0x26f289-0x1c4;const _0x5ea8b9=a27_0x5ea8();let _0x1596dc=_0x5ea8b9[_0x26f289];return _0x1596dc;}function a27_0x5ea8(){const _0x5c8f=['36564gEgYMi','length','appCode','21051WIWRkf','str','key','12aXmVfu','2696RmiLKu','Found\x20','trim','3716867IkxZWn','string','929015pIzgWZ','Filter\x20by\x20exact\x20config\x20key','88lDKbai','10502990wwyMAb','list','read','12BWUHpc','4469689VORQuf','\x20app\x20config(s)','14LijHgX','app-config','81660omvukM'];a27_0x5ea8=function(){return _0x5c8f;};return a27_0x5ea8();}(function(_0x2effe5,_0x4ceb95){const _0x5652ae=a27_0x1596,_0x302637=_0x2effe5();while(!![]){try{const _0xfbf106=-parseInt(_0x5652ae(0x1da))/0x1*(parseInt(_0x5652ae(0x1c5))/0x2)+-parseInt(_0x5652ae(0x1c4))/0x3*(-parseInt(_0x5652ae(0x1d3))/0x4)+parseInt(_0x5652ae(0x1d1))/0x5*(parseInt(_0x5652ae(0x1d7))/0x6)+-parseInt(_0x5652ae(0x1d8))/0x7+-parseInt(_0x5652ae(0x1cc))/0x8*(parseInt(_0x5652ae(0x1c8))/0x9)+parseInt(_0x5652ae(0x1d4))/0xa+parseInt(_0x5652ae(0x1cf))/0xb*(parseInt(_0x5652ae(0x1cb))/0xc);if(_0xfbf106===_0x4ceb95)break;else _0x302637['push'](_0x302637['shift']());}catch(_0x762eee){_0x302637['push'](_0x302637['shift']());}}}(a27_0x5ea8,0xa5054));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_0x4e986a(0x1db),'command':'list','description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0x4e986a(0x1d6),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x4e986a(0x1ca),'type':a27_0x4e986a(0x1d0),'description':a27_0x4e986a(0x1d2)},TAGS_FLAG],async 'validate'(_0x30ac3d){const _0x4c09a7=a27_0x4e986a,_0x2472f6=_0x30ac3d[_0x4c09a7(0x1c9)]('key')['trim']();if(_0x2472f6)validateKey(_0x2472f6);readOptionalTags(_0x30ac3d);},async 'execute'(_0x4e8abc){const _0x477fa2=a27_0x4e986a,_0x2745ac=_0x4e8abc[_0x477fa2(0x1c9)](_0x477fa2(0x1ca))[_0x477fa2(0x1ce)]()||undefined,_0x35c700=readOptionalTags(_0x4e8abc),_0x27aa87=await withAppConfigApiBoundary(_0x477fa2(0x1d5),{'appCode':_0x4e8abc[_0x477fa2(0x1c7)]},()=>listAppConfigs(_0x4e8abc['appCode'],{'key':_0x2745ac,'tags':_0x35c700})),_0x37f1ab=_0x27aa87['map'](_0x286da2=>projectAppConfig(_0x286da2));return{'ok':!![],'data':{'appCode':_0x4e8abc[_0x477fa2(0x1c7)],'count':_0x37f1ab['length'],'configs':_0x37f1ab},'message':_0x477fa2(0x1cd)+_0x37f1ab[_0x477fa2(0x1c6)]+_0x477fa2(0x1d9)};}};
1
+ const a27_0x1c8484=a27_0x14b2;function a27_0x14b2(_0x3b1404,_0x1ba4bb){_0x3b1404=_0x3b1404-0x108;const _0x461539=a27_0x4615();let _0x14b225=_0x461539[_0x3b1404];return _0x14b225;}(function(_0x330b44,_0x1fd60a){const _0x289cfb=a27_0x14b2,_0x433dde=_0x330b44();while(!![]){try{const _0x8828f0=parseInt(_0x289cfb(0x10a))/0x1*(parseInt(_0x289cfb(0x110))/0x2)+-parseInt(_0x289cfb(0x10d))/0x3+-parseInt(_0x289cfb(0x112))/0x4*(-parseInt(_0x289cfb(0x114))/0x5)+parseInt(_0x289cfb(0x119))/0x6+-parseInt(_0x289cfb(0x108))/0x7+-parseInt(_0x289cfb(0x113))/0x8*(-parseInt(_0x289cfb(0x10f))/0x9)+parseInt(_0x289cfb(0x11d))/0xa*(parseInt(_0x289cfb(0x11c))/0xb);if(_0x8828f0===_0x1fd60a)break;else _0x433dde['push'](_0x433dde['shift']());}catch(_0xb6a797){_0x433dde['push'](_0x433dde['shift']());}}}(a27_0x4615,0x9666b));import{listAppConfigs}from'../../core/api-client.js';function a27_0x4615(){const _0x390686=['4368788lIldQl','841736EnFQCN','5fErxeP','map','\x20app\x20config(s)','key','string','1398606kjTuCr','length','trim','891209wNAxZc','20wpuZvD','Filter\x20by\x20exact\x20config\x20key','app-config','7148071GpMTSK','appCode','2165ahSZUX','str','read','2870622JHPAwr','Found\x20','63WVAYUU','342HsVUOs','list'];a27_0x4615=function(){return _0x390686;};return a27_0x4615();}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_0x1c8484(0x11f),'command':a27_0x1c8484(0x111),'description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0x1c8484(0x10c),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x1c8484(0x117),'type':a27_0x1c8484(0x118),'description':a27_0x1c8484(0x11e)},TAGS_FLAG],async 'validate'(_0x4df8b4){const _0x433ad1=a27_0x1c8484,_0x2fe5bb=_0x4df8b4[_0x433ad1(0x10b)](_0x433ad1(0x117))[_0x433ad1(0x11b)]();if(_0x2fe5bb)validateKey(_0x2fe5bb);readOptionalTags(_0x4df8b4);},async 'execute'(_0x3b125a){const _0x2cad8a=a27_0x1c8484,_0x2b0a13=_0x3b125a[_0x2cad8a(0x10b)]('key')['trim']()||undefined,_0x5b9f00=readOptionalTags(_0x3b125a),_0x20862a=await withAppConfigApiBoundary(_0x2cad8a(0x111),{'appCode':_0x3b125a[_0x2cad8a(0x109)]},()=>listAppConfigs(_0x3b125a['appCode'],{'key':_0x2b0a13,'tags':_0x5b9f00})),_0x10c880=_0x20862a[_0x2cad8a(0x115)](_0x3b1c91=>projectAppConfig(_0x3b1c91));return{'ok':!![],'data':{'appCode':_0x3b125a[_0x2cad8a(0x109)],'count':_0x10c880[_0x2cad8a(0x11a)],'configs':_0x10c880},'message':_0x2cad8a(0x10e)+_0x10c880[_0x2cad8a(0x11a)]+_0x2cad8a(0x116)};}};
@@ -1 +1 @@
1
- const a28_0x10f3db=a28_0x5e1c;(function(_0x18d7b8,_0x4c20b7){const _0x41e8bb=a28_0x5e1c,_0x1ae694=_0x18d7b8();while(!![]){try{const _0x1a630d=parseInt(_0x41e8bb(0xe7))/0x1*(-parseInt(_0x41e8bb(0xf3))/0x2)+-parseInt(_0x41e8bb(0xde))/0x3*(parseInt(_0x41e8bb(0xef))/0x4)+-parseInt(_0x41e8bb(0xe0))/0x5*(parseInt(_0x41e8bb(0xf5))/0x6)+parseInt(_0x41e8bb(0xe6))/0x7+-parseInt(_0x41e8bb(0xe2))/0x8*(parseInt(_0x41e8bb(0xf9))/0x9)+-parseInt(_0x41e8bb(0xea))/0xa*(-parseInt(_0x41e8bb(0xdc))/0xb)+-parseInt(_0x41e8bb(0xf6))/0xc*(-parseInt(_0x41e8bb(0xe9))/0xd);if(_0x1a630d===_0x4c20b7)break;else _0x1ae694['push'](_0x1ae694['shift']());}catch(_0x60c6c2){_0x1ae694['push'](_0x1ae694['shift']());}}}(a28_0x3ae4,0x9ac7f));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a28_0x5e1c(_0x12374f,_0x1b2fe8){_0x12374f=_0x12374f-0xdc;const _0x3ae449=a28_0x3ae4();let _0x5e1cac=_0x3ae449[_0x12374f];return _0x5e1cac;}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';function a28_0x3ae4(){const _0x2a4959=['isFinite','Read\x20config\x20value\x20from\x20file','2132QXGBTq','get','6MwfTUH','132wFtvPI','apiError','number','8418267qGGoAy','tags','11Ynjefx','Updated','6HTZyYj','appCode','1978785ufUqoK','create','8nexLcz','POST','update','/smartapi/app-config/update','5286715bJoQqo','31wEvyKq','write','1704209AXIkxG','706630GykXXF','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','App\x20config\x20server\x20id\x20missing\x20for\x20key=','/smartapi/app-config/create','set','539564kMDglF','Created'];a28_0x3ae4=function(){return _0x2a4959;};return a28_0x3ae4();}const CREATE_PATH=a28_0x10f3db(0xed),UPDATE_PATH=a28_0x10f3db(0xe5);export const appConfigSet={'service':'app-config','command':a28_0x10f3db(0xee),'description':a28_0x10f3db(0xeb),'risk':a28_0x10f3db(0xe8),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':'string','description':a28_0x10f3db(0xf2)}],async 'validate'(_0x5e2a56){readKeyArg(_0x5e2a56),readOptionalTags(_0x5e2a56),assertSingleValueSource(_0x5e2a56);},async 'dryRun'(_0xb3a636){const _0x4eef1e=a28_0x10f3db,_0x3fb749=readKeyArg(_0xb3a636),_0x18447b=readOptionalTags(_0xb3a636),_0x2a5d79=assertSingleValueSource(_0xb3a636);await assertValueSourceReadable(_0x2a5d79);const _0x436b7b=await withAppConfigApiBoundary(_0x4eef1e(0xf4),{'appCode':_0xb3a636['appCode'],'key':_0x3fb749},()=>getAppConfigByKey(_0xb3a636[_0x4eef1e(0xdf)],_0x3fb749)),_0x572b5b=_0x436b7b?_0x4eef1e(0xe4):_0x4eef1e(0xe1),_0x57a607=_0x436b7b?projectAppConfig(_0x436b7b):null,_0x4270fd=plannedAppConfig({'appCode':_0xb3a636[_0x4eef1e(0xdf)],'key':_0x3fb749,'tags':_0x18447b??_0x436b7b?.[_0x4eef1e(0xfa)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x572b5b,'appCode':_0xb3a636['appCode'],'key':_0x3fb749,'before':_0x57a607,'after':_0x4270fd,'dryRun':!![]}),{'method':_0x4eef1e(0xe3),'url':_0x572b5b===_0x4eef1e(0xe4)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x5ca634){const _0xa9bc0d=a28_0x10f3db,_0x1a05db=readKeyArg(_0x5ca634),_0x32b5cc=readOptionalTags(_0x5ca634),_0x4323a8=await withAppConfigApiBoundary(_0xa9bc0d(0xf4),{'appCode':_0x5ca634['appCode'],'key':_0x1a05db},()=>getAppConfigByKey(_0x5ca634[_0xa9bc0d(0xdf)],_0x1a05db)),_0x37a4bf=_0x4323a8?projectAppConfig(_0x4323a8):null,_0x35e990=_0x4323a8?_0xa9bc0d(0xe4):_0xa9bc0d(0xe1),{value:_0x4f3c54,warnings:_0x3724f6}=await readAppConfigValue(_0x5ca634),_0x5f1d1a={'appCode':_0x5ca634[_0xa9bc0d(0xdf)],'key':_0x1a05db,'value':_0x4f3c54,'tags':_0x32b5cc??_0x4323a8?.['tags']??undefined};await withAppConfigApiBoundary(_0x35e990,{'appCode':_0x5ca634[_0xa9bc0d(0xdf)],'key':_0x1a05db},async()=>{const _0x1a0a1c=_0xa9bc0d;_0x4323a8?await updateAppConfig({..._0x5f1d1a,'id':requireAppConfigId(_0x4323a8,_0x1a05db,_0x5ca634[_0x1a0a1c(0xdf)])}):await createAppConfig(_0x5f1d1a);});const _0x10df6a=await withAppConfigApiBoundary(_0xa9bc0d(0xf4),{'appCode':_0x5ca634['appCode'],'key':_0x1a05db},()=>getAppConfigByKey(_0x5ca634[_0xa9bc0d(0xdf)],_0x1a05db)),_0x46b785=_0x10df6a?projectAppConfig(_0x10df6a):plannedAppConfig({'appCode':_0x5ca634[_0xa9bc0d(0xdf)],'key':_0x1a05db,'tags':_0x5f1d1a[_0xa9bc0d(0xfa)],'hasValue':_0x4f3c54!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x35e990,'appCode':_0x5ca634[_0xa9bc0d(0xdf)],'key':_0x1a05db,'before':_0x37a4bf,'after':_0x46b785,'dryRun':![],'warnings':_0x3724f6}),'message':(_0x35e990===_0xa9bc0d(0xe4)?_0xa9bc0d(0xdd):_0xa9bc0d(0xf0))+'\x20app\x20config\x20'+_0x1a05db};}};function requireAppConfigId(_0x3bdfbe,_0x35295a,_0x3345ac){const _0x1b91c9=a28_0x10f3db;if(typeof _0x3bdfbe['id']===_0x1b91c9(0xf8)&&Number[_0x1b91c9(0xf1)](_0x3bdfbe['id'])&&_0x3bdfbe['id']>0x0)return _0x3bdfbe['id'];throw CliErrors[_0x1b91c9(0xf7)](_0x1b91c9(0xec)+_0x35295a+',\x20appCode='+_0x3345ac);}
1
+ const a28_0x1f4916=a28_0xf2f8;(function(_0x4a4cdc,_0xd2d95a){const _0x4c8456=a28_0xf2f8,_0x2afdb8=_0x4a4cdc();while(!![]){try{const _0x5e7560=-parseInt(_0x4c8456(0x174))/0x1+-parseInt(_0x4c8456(0x177))/0x2+-parseInt(_0x4c8456(0x17c))/0x3*(parseInt(_0x4c8456(0x180))/0x4)+-parseInt(_0x4c8456(0x181))/0x5*(parseInt(_0x4c8456(0x173))/0x6)+parseInt(_0x4c8456(0x175))/0x7*(-parseInt(_0x4c8456(0x169))/0x8)+-parseInt(_0x4c8456(0x172))/0x9*(parseInt(_0x4c8456(0x16e))/0xa)+parseInt(_0x4c8456(0x176))/0xb;if(_0x5e7560===_0xd2d95a)break;else _0x2afdb8['push'](_0x2afdb8['shift']());}catch(_0x58be48){_0x2afdb8['push'](_0x2afdb8['shift']());}}}(a28_0x51a0,0x2afcc));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a28_0x51a0(){const _0x102324=['update','appCode','1772230TwwfEB','app-config','isFinite','apiError','9NYcRRy','6rLJagD','251756witiPB','1853348vdHijB','14396118HGgKYZ','329942eHLtmK','set','POST','write','get','3FrOqgJ','Read\x20config\x20value\x20from\x20file','create','tags','274552OoqCfk','1026550SXYWPW','string','file','8OhARQE','\x20app\x20config\x20','Created'];a28_0x51a0=function(){return _0x102324;};return a28_0x51a0();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH='/smartapi/app-config/create',UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0x1f4916(0x16f),'command':a28_0x1f4916(0x178),'description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0x1f4916(0x17a),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x1f4916(0x183),'type':a28_0x1f4916(0x182),'description':a28_0x1f4916(0x17d)}],async 'validate'(_0x51fa94){readKeyArg(_0x51fa94),readOptionalTags(_0x51fa94),assertSingleValueSource(_0x51fa94);},async 'dryRun'(_0x2d6c02){const _0x667b88=a28_0x1f4916,_0x5d6388=readKeyArg(_0x2d6c02),_0x546d9e=readOptionalTags(_0x2d6c02),_0x1f96fd=assertSingleValueSource(_0x2d6c02);await assertValueSourceReadable(_0x1f96fd);const _0x13665f=await withAppConfigApiBoundary(_0x667b88(0x17b),{'appCode':_0x2d6c02[_0x667b88(0x16d)],'key':_0x5d6388},()=>getAppConfigByKey(_0x2d6c02['appCode'],_0x5d6388)),_0x17a875=_0x13665f?_0x667b88(0x16c):_0x667b88(0x17e),_0x1e97d9=_0x13665f?projectAppConfig(_0x13665f):null,_0x3fcf35=plannedAppConfig({'appCode':_0x2d6c02['appCode'],'key':_0x5d6388,'tags':_0x546d9e??_0x13665f?.[_0x667b88(0x17f)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x17a875,'appCode':_0x2d6c02[_0x667b88(0x16d)],'key':_0x5d6388,'before':_0x1e97d9,'after':_0x3fcf35,'dryRun':!![]}),{'method':_0x667b88(0x179),'url':_0x17a875===_0x667b88(0x16c)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x2f9e9f){const _0x272fa9=a28_0x1f4916,_0x4d7f57=readKeyArg(_0x2f9e9f),_0x427f17=readOptionalTags(_0x2f9e9f),_0x121bb2=await withAppConfigApiBoundary(_0x272fa9(0x17b),{'appCode':_0x2f9e9f[_0x272fa9(0x16d)],'key':_0x4d7f57},()=>getAppConfigByKey(_0x2f9e9f[_0x272fa9(0x16d)],_0x4d7f57)),_0x4639dd=_0x121bb2?projectAppConfig(_0x121bb2):null,_0x144632=_0x121bb2?_0x272fa9(0x16c):_0x272fa9(0x17e),{value:_0x18e61d,warnings:_0x570bae}=await readAppConfigValue(_0x2f9e9f),_0x342f3b={'appCode':_0x2f9e9f['appCode'],'key':_0x4d7f57,'value':_0x18e61d,'tags':_0x427f17??_0x121bb2?.[_0x272fa9(0x17f)]??undefined};await withAppConfigApiBoundary(_0x144632,{'appCode':_0x2f9e9f['appCode'],'key':_0x4d7f57},async()=>{const _0x1a5032=_0x272fa9;_0x121bb2?await updateAppConfig({..._0x342f3b,'id':requireAppConfigId(_0x121bb2,_0x4d7f57,_0x2f9e9f[_0x1a5032(0x16d)])}):await createAppConfig(_0x342f3b);});const _0x286b38=await withAppConfigApiBoundary(_0x272fa9(0x17b),{'appCode':_0x2f9e9f[_0x272fa9(0x16d)],'key':_0x4d7f57},()=>getAppConfigByKey(_0x2f9e9f['appCode'],_0x4d7f57)),_0x53eb4b=_0x286b38?projectAppConfig(_0x286b38):plannedAppConfig({'appCode':_0x2f9e9f[_0x272fa9(0x16d)],'key':_0x4d7f57,'tags':_0x342f3b[_0x272fa9(0x17f)],'hasValue':_0x18e61d!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x144632,'appCode':_0x2f9e9f['appCode'],'key':_0x4d7f57,'before':_0x4639dd,'after':_0x53eb4b,'dryRun':![],'warnings':_0x570bae}),'message':(_0x144632===_0x272fa9(0x16c)?'Updated':_0x272fa9(0x16b))+_0x272fa9(0x16a)+_0x4d7f57};}};function a28_0xf2f8(_0x2aa0ab,_0x12ab9f){_0x2aa0ab=_0x2aa0ab-0x169;const _0x51a07d=a28_0x51a0();let _0xf2f8d5=_0x51a07d[_0x2aa0ab];return _0xf2f8d5;}function requireAppConfigId(_0x347201,_0x1cccfa,_0x11f1e2){const _0x1d62c6=a28_0x1f4916;if(typeof _0x347201['id']==='number'&&Number[_0x1d62c6(0x170)](_0x347201['id'])&&_0x347201['id']>0x0)return _0x347201['id'];throw CliErrors[_0x1d62c6(0x171)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x1cccfa+',\x20appCode='+_0x11f1e2);}
@@ -1 +1 @@
1
- const a29_0x238e62=a29_0x305e;(function(_0xa8e552,_0x4ff629){const _0x2687ea=a29_0x305e,_0x413bc5=_0xa8e552();while(!![]){try{const _0x145a2f=-parseInt(_0x2687ea(0x75))/0x1*(-parseInt(_0x2687ea(0x98))/0x2)+parseInt(_0x2687ea(0x6a))/0x3+-parseInt(_0x2687ea(0x69))/0x4+-parseInt(_0x2687ea(0x95))/0x5+parseInt(_0x2687ea(0x87))/0x6*(-parseInt(_0x2687ea(0x96))/0x7)+-parseInt(_0x2687ea(0x91))/0x8+parseInt(_0x2687ea(0x77))/0x9*(parseInt(_0x2687ea(0x8f))/0xa);if(_0x145a2f===_0x4ff629)break;else _0x413bc5['push'](_0x413bc5['shift']());}catch(_0x12fb72){_0x413bc5['push'](_0x413bc5['shift']());}}}(a29_0x7fb4,0x66e84));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x238e62(0x6d),'description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':a29_0x238e62(0xa0),'description':a29_0x238e62(0x8e),'required':![]};function a29_0x7fb4(){const _0x2bb6de=['App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','argument','reveal','dryRun','7JMsFhw','str','57087JyXabF','validation','gmtModified','kind','boolean','defineProperties','name','url','path','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','Missing\x20app-config\x20key.','string','Failed\x20to\x20','once','from-env','warnings','2076AWZMCg','push','length','valueRedacted','env','stdin','args','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','1650mUtrzR','App\x20config\x20value\x20source\x20is\x20ambiguous.','1948728UXPIqa','Environment\x20variable\x20is\x20not\x20set:\x20','Config\x20tags\x20for\x20filtering/display\x20metadata','trim','4034620xvxMMo','3255SzkGAF','file','208778xibCye','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','join','error','Value\x20file\x20is\x20not\x20readable:\x20','flag','appCode','bool','value','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','setEncoding','slice','method','1149992bjWvDX','429279NpGIie','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','tags','key','Missing\x20app-config\x20value\x20source.','operation','utf8'];a29_0x7fb4=function(){return _0x2bb6de;};return a29_0x7fb4();}export const TAGS_FLAG={'name':a29_0x238e62(0x6c),'type':a29_0x238e62(0x82),'description':a29_0x238e62(0x93)};export const STDIN_FLAG={'name':'stdin','type':a29_0x238e62(0x7b),'description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a29_0x238e62(0x85),'type':a29_0x238e62(0x82),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0x238e62(0x73),'type':'boolean','description':a29_0x238e62(0x80),'default':![]};export function readKeyArg(_0x32d10a){const _0x9dce6=a29_0x238e62,_0x339b9f=_0x32d10a[_0x9dce6(0x8d)][0x0]?.[_0x9dce6(0x94)]()??'';return validateKey(_0x339b9f),_0x339b9f;}export function readOptionalTags(_0x3ba4e5){const _0x3959ef=a29_0x238e62,_0x8d8f27=_0x3ba4e5[_0x3959ef(0x76)](_0x3959ef(0x6c))['trim']();if(!_0x8d8f27)return undefined;if(_0x8d8f27[_0x3959ef(0x89)]>0x20)throw CliErrors[_0x3959ef(0x78)](_0x3959ef(0x99));return _0x8d8f27;}function a29_0x305e(_0x37b06c,_0x40c8ab){_0x37b06c=_0x37b06c-0x69;const _0x7fb473=a29_0x7fb4();let _0x305e1f=_0x7fb473[_0x37b06c];return _0x305e1f;}export function validateKey(_0x5d6a3d){const _0x11537b=a29_0x238e62;if(!_0x5d6a3d)throw CliErrors['validation'](_0x11537b(0x81));if(_0x5d6a3d[_0x11537b(0x89)]>0x100)throw CliErrors[_0x11537b(0x78)](_0x11537b(0x71));}export function projectAppConfig(_0x50e166,_0x258f11){const _0x177558=a29_0x238e62,_0xccf86=_0x50e166['value']!==undefined&&_0x50e166[_0x177558(0xa0)]!==null&&_0x50e166[_0x177558(0xa0)]!=='',_0x3d0afc={'appCode':_0x50e166['appCode'],'key':_0x50e166[_0x177558(0x6d)],'tags':_0x50e166[_0x177558(0x6c)]??undefined,'hasValue':_0xccf86,'valueRedacted':_0xccf86&&!_0x258f11?.['reveal'],'gmtCreate':_0x50e166['gmtCreate'],'gmtModified':_0x50e166[_0x177558(0x79)]};return _0x258f11?.[_0x177558(0x73)]&&(_0x3d0afc[_0x177558(0xa0)]=_0x50e166[_0x177558(0xa0)]??'',_0x3d0afc[_0x177558(0x8a)]=![]),_0x3d0afc;}export function plannedAppConfig(_0x567597){const _0x5976db=a29_0x238e62,_0x417502=_0x567597['hasValue']??!![];return{'appCode':_0x567597[_0x5976db(0x9e)],'key':_0x567597[_0x5976db(0x6d)],'tags':_0x567597[_0x5976db(0x6c)]??undefined,'hasValue':_0x417502,'valueRedacted':_0x417502};}export function buildMutationData(_0xdb30c){const _0x530222=a29_0x238e62;return{'operation':_0xdb30c[_0x530222(0x6f)],'selector':{'appCode':_0xdb30c[_0x530222(0x9e)],'key':_0xdb30c[_0x530222(0x6d)]},'before':_0xdb30c['before'],'after':_0xdb30c['after'],'dryRun':_0xdb30c[_0x530222(0x74)],'warnings':_0xdb30c[_0x530222(0x86)]??[]};}export async function withAppConfigApiBoundary(_0x3dcc15,_0x1de64c,_0x167ccd){const _0x1f6920=a29_0x238e62;try{return await _0x167ccd();}catch{const _0x36fece=['appCode:\x20'+_0x1de64c[_0x1f6920(0x9e)]];if(_0x1de64c[_0x1f6920(0x6d)])_0x36fece[_0x1f6920(0x88)]('key:\x20'+_0x1de64c[_0x1f6920(0x6d)]);_0x36fece[_0x1f6920(0x88)]('value\x20is\x20redacted');throw CliErrors['apiError'](_0x1f6920(0x83)+_0x3dcc15+'\x20app\x20config.',_0x36fece[_0x1f6920(0x9a)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x595fcd,_0x2a2a29){const _0x3dcbbb=a29_0x238e62;return Object[_0x3dcbbb(0x7c)](_0x595fcd,{'method':{'value':_0x2a2a29[_0x3dcbbb(0xa4)],'enumerable':![]},'url':{'value':_0x2a2a29[_0x3dcbbb(0x7e)],'enumerable':![]}});}export function assertSingleValueSource(_0x49d3c5){const _0x3ed846=a29_0x238e62,_0x212f2f=[];_0x49d3c5['args'][_0x3ed846(0x89)]>0x1&&_0x212f2f[_0x3ed846(0x88)]({'kind':'argument','value':_0x49d3c5['args'][_0x3ed846(0xa3)](0x1)[_0x3ed846(0x9a)]('\x20')});const _0x423709=_0x49d3c5[_0x3ed846(0x9d)](_0x3ed846(0xa0));_0x423709!==undefined&&_0x423709!==null&&_0x212f2f[_0x3ed846(0x88)]({'kind':_0x3ed846(0x72),'value':String(_0x423709)});_0x49d3c5[_0x3ed846(0x9f)](_0x3ed846(0x8c))&&_0x212f2f[_0x3ed846(0x88)]({'kind':_0x3ed846(0x8c)});const _0x20d6ee=_0x49d3c5[_0x3ed846(0x76)]('from-env')[_0x3ed846(0x94)]();_0x20d6ee&&_0x212f2f['push']({'kind':_0x3ed846(0x8b),'name':_0x20d6ee});const _0x9bfb6e=_0x49d3c5['str'](_0x3ed846(0x97))[_0x3ed846(0x94)]();_0x9bfb6e&&_0x212f2f[_0x3ed846(0x88)]({'kind':_0x3ed846(0x97),'path':_0x9bfb6e});if(_0x212f2f[_0x3ed846(0x89)]===0x0)throw CliErrors[_0x3ed846(0x78)](_0x3ed846(0x6e),'Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x212f2f[_0x3ed846(0x89)]>0x1)throw CliErrors[_0x3ed846(0x78)](_0x3ed846(0x90),_0x3ed846(0x6b));return _0x212f2f[0x0];}export async function assertValueSourceReadable(_0x44913c){const _0x2ff4f4=a29_0x238e62;if(_0x44913c[_0x2ff4f4(0x7a)]===_0x2ff4f4(0x8b)&&!(_0x44913c['name']in process.env))throw CliErrors[_0x2ff4f4(0x78)](_0x2ff4f4(0x92)+_0x44913c[_0x2ff4f4(0x7d)]);if(_0x44913c[_0x2ff4f4(0x7a)]===_0x2ff4f4(0x97))try{await access(_0x44913c[_0x2ff4f4(0x7f)]);}catch{throw CliErrors[_0x2ff4f4(0x78)](_0x2ff4f4(0x9c)+_0x44913c[_0x2ff4f4(0x7f)]);}}export async function readAppConfigValue(_0x3111e6){const _0x57b7b6=a29_0x238e62,_0x58dfde=assertSingleValueSource(_0x3111e6),_0x5ad104=[];if(_0x58dfde[_0x57b7b6(0x7a)]===_0x57b7b6(0x72))return _0x5ad104[_0x57b7b6(0x88)](_0x57b7b6(0xa1)),{'value':_0x58dfde[_0x57b7b6(0xa0)]??'','source':_0x58dfde[_0x57b7b6(0x7a)],'warnings':_0x5ad104};if(_0x58dfde['kind']===_0x57b7b6(0x8c))return{'value':await readStdin(),'source':_0x58dfde[_0x57b7b6(0x7a)],'warnings':_0x5ad104};if(_0x58dfde[_0x57b7b6(0x7a)]===_0x57b7b6(0x8b)){if(!(_0x58dfde[_0x57b7b6(0x7d)]in process.env))throw CliErrors['validation'](_0x57b7b6(0x92)+_0x58dfde['name']);return{'value':process.env[_0x58dfde.name]??'','source':_0x58dfde['kind'],'warnings':_0x5ad104};}return{'value':await readFile(_0x58dfde['path'],_0x57b7b6(0x70)),'source':_0x58dfde[_0x57b7b6(0x7a)],'warnings':_0x5ad104};}function readStdin(){return new Promise((_0x19ccc0,_0x4db90a)=>{const _0x441490=a29_0x305e;let _0x2ce42f='';process['stdin'][_0x441490(0xa2)]('utf8'),process['stdin']['on']('data',_0x12d037=>{_0x2ce42f+=_0x12d037;}),process[_0x441490(0x8c)][_0x441490(0x84)]('end',()=>_0x19ccc0(_0x2ce42f)),process['stdin']['once'](_0x441490(0x9b),_0x4db90a);});}
1
+ const a29_0x4ced28=a29_0x5b46;(function(_0x1fabf0,_0x35c060){const _0x4f7d83=a29_0x5b46,_0x134781=_0x1fabf0();while(!![]){try{const _0xa398e7=-parseInt(_0x4f7d83(0x13c))/0x1*(parseInt(_0x4f7d83(0x12d))/0x2)+-parseInt(_0x4f7d83(0x143))/0x3+-parseInt(_0x4f7d83(0x152))/0x4*(-parseInt(_0x4f7d83(0x144))/0x5)+parseInt(_0x4f7d83(0x124))/0x6+parseInt(_0x4f7d83(0x135))/0x7*(parseInt(_0x4f7d83(0x12b))/0x8)+-parseInt(_0x4f7d83(0x142))/0x9*(-parseInt(_0x4f7d83(0x11b))/0xa)+-parseInt(_0x4f7d83(0x132))/0xb;if(_0xa398e7===_0x35c060)break;else _0x134781['push'](_0x134781['shift']());}catch(_0x28403c){_0x134781['push'](_0x134781['shift']());}}}(a29_0xc2e9,0xaa002));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x4ced28(0x123),'description':a29_0x4ced28(0x140),'required':!![]};export const VALUE_ARG={'name':a29_0x4ced28(0x148),'description':a29_0x4ced28(0x119),'required':![]};export const TAGS_FLAG={'name':'tags','type':a29_0x4ced28(0x13f),'description':a29_0x4ced28(0x13d)};export const STDIN_FLAG={'name':a29_0x4ced28(0x131),'type':a29_0x4ced28(0x128),'description':a29_0x4ced28(0x13b),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x4ced28(0x120),'type':a29_0x4ced28(0x13f),'description':a29_0x4ced28(0x13a)};export const REVEAL_FLAG={'name':a29_0x4ced28(0x11d),'type':'boolean','description':a29_0x4ced28(0x133),'default':![]};export function readKeyArg(_0x702856){const _0x43226a=a29_0x4ced28,_0x3cbdeb=_0x702856[_0x43226a(0x14d)][0x0]?.['trim']()??'';return validateKey(_0x3cbdeb),_0x3cbdeb;}export function readOptionalTags(_0x463994){const _0x234d89=a29_0x4ced28,_0x33e09d=_0x463994[_0x234d89(0x11e)](_0x234d89(0x155))[_0x234d89(0x122)]();if(!_0x33e09d)return undefined;if(_0x33e09d['length']>0x20)throw CliErrors['validation'](_0x234d89(0x127));return _0x33e09d;}export function validateKey(_0x144445){const _0x2d95f5=a29_0x4ced28;if(!_0x144445)throw CliErrors[_0x2d95f5(0x153)](_0x2d95f5(0x14f));if(_0x144445[_0x2d95f5(0x12c)]>0x100)throw CliErrors[_0x2d95f5(0x153)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0xf4e2cd,_0x56b287){const _0x294f0b=a29_0x4ced28,_0x33ec86=_0xf4e2cd[_0x294f0b(0x148)]!==undefined&&_0xf4e2cd[_0x294f0b(0x148)]!==null&&_0xf4e2cd[_0x294f0b(0x148)]!=='',_0x3a577b={'appCode':_0xf4e2cd['appCode'],'key':_0xf4e2cd[_0x294f0b(0x123)],'tags':_0xf4e2cd[_0x294f0b(0x155)]??undefined,'hasValue':_0x33ec86,'valueRedacted':_0x33ec86&&!_0x56b287?.[_0x294f0b(0x11d)],'gmtCreate':_0xf4e2cd[_0x294f0b(0x117)],'gmtModified':_0xf4e2cd[_0x294f0b(0x12f)]};return _0x56b287?.[_0x294f0b(0x11d)]&&(_0x3a577b['value']=_0xf4e2cd['value']??'',_0x3a577b['valueRedacted']=![]),_0x3a577b;}export function plannedAppConfig(_0x50240f){const _0x5719ba=a29_0x4ced28,_0x462e41=_0x50240f[_0x5719ba(0x14b)]??!![];return{'appCode':_0x50240f[_0x5719ba(0x14e)],'key':_0x50240f[_0x5719ba(0x123)],'tags':_0x50240f[_0x5719ba(0x155)]??undefined,'hasValue':_0x462e41,'valueRedacted':_0x462e41};}export function buildMutationData(_0x45b83d){const _0x1a22ae=a29_0x4ced28;return{'operation':_0x45b83d[_0x1a22ae(0x136)],'selector':{'appCode':_0x45b83d[_0x1a22ae(0x14e)],'key':_0x45b83d[_0x1a22ae(0x123)]},'before':_0x45b83d[_0x1a22ae(0x121)],'after':_0x45b83d[_0x1a22ae(0x134)],'dryRun':_0x45b83d[_0x1a22ae(0x126)],'warnings':_0x45b83d['warnings']??[]};}export async function withAppConfigApiBoundary(_0x1247d3,_0x8da546,_0x29f894){const _0xf027de=a29_0x4ced28;try{return await _0x29f894();}catch{const _0x170116=['appCode:\x20'+_0x8da546['appCode']];if(_0x8da546[_0xf027de(0x123)])_0x170116[_0xf027de(0x13e)](_0xf027de(0x130)+_0x8da546[_0xf027de(0x123)]);_0x170116[_0xf027de(0x13e)]('value\x20is\x20redacted');throw CliErrors[_0xf027de(0x146)](_0xf027de(0x14c)+_0x1247d3+_0xf027de(0x115),_0x170116[_0xf027de(0x12e)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x3dad9b,_0x46904c){const _0x9eb609=a29_0x4ced28;return Object[_0x9eb609(0x118)](_0x3dad9b,{'method':{'value':_0x46904c[_0x9eb609(0x129)],'enumerable':![]},'url':{'value':_0x46904c['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x46716f){const _0x2341e6=a29_0x4ced28,_0x57985a=[];_0x46716f[_0x2341e6(0x14d)][_0x2341e6(0x12c)]>0x1&&_0x57985a['push']({'kind':'argument','value':_0x46716f[_0x2341e6(0x14d)]['slice'](0x1)['join']('\x20')});const _0xe7587b=_0x46716f[_0x2341e6(0x11c)](_0x2341e6(0x148));_0xe7587b!==undefined&&_0xe7587b!==null&&_0x57985a[_0x2341e6(0x13e)]({'kind':'argument','value':String(_0xe7587b)});_0x46716f[_0x2341e6(0x116)](_0x2341e6(0x131))&&_0x57985a[_0x2341e6(0x13e)]({'kind':_0x2341e6(0x131)});const _0x5106aa=_0x46716f[_0x2341e6(0x11e)](_0x2341e6(0x120))[_0x2341e6(0x122)]();_0x5106aa&&_0x57985a[_0x2341e6(0x13e)]({'kind':'env','name':_0x5106aa});const _0x1fe89f=_0x46716f[_0x2341e6(0x11e)]('file')[_0x2341e6(0x122)]();_0x1fe89f&&_0x57985a[_0x2341e6(0x13e)]({'kind':_0x2341e6(0x150),'path':_0x1fe89f});if(_0x57985a[_0x2341e6(0x12c)]===0x0)throw CliErrors[_0x2341e6(0x153)](_0x2341e6(0x125),'Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x57985a['length']>0x1)throw CliErrors[_0x2341e6(0x153)](_0x2341e6(0x11a),_0x2341e6(0x145));return _0x57985a[0x0];}function a29_0x5b46(_0x2c38f0,_0x267400){_0x2c38f0=_0x2c38f0-0x115;const _0xc2e95f=a29_0xc2e9();let _0x5b46d7=_0xc2e95f[_0x2c38f0];return _0x5b46d7;}export async function assertValueSourceReadable(_0x6d9e1e){const _0x5842c1=a29_0x4ced28;if(_0x6d9e1e['kind']===_0x5842c1(0x151)&&!(_0x6d9e1e[_0x5842c1(0x139)]in process.env))throw CliErrors[_0x5842c1(0x153)](_0x5842c1(0x147)+_0x6d9e1e[_0x5842c1(0x139)]);if(_0x6d9e1e[_0x5842c1(0x14a)]===_0x5842c1(0x150))try{await access(_0x6d9e1e['path']);}catch{throw CliErrors[_0x5842c1(0x153)](_0x5842c1(0x12a)+_0x6d9e1e[_0x5842c1(0x138)]);}}function a29_0xc2e9(){const _0x219edd=['join','gmtModified','key:\x20','stdin','21564785cMyVBl','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','after','7cLGnpd','operation','utf8','path','name','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','Read\x20config\x20value\x20from\x20stdin','18131ztptZO','Config\x20tags\x20for\x20filtering/display\x20metadata','push','string','Runtime\x20app-config\x20key','end','9855UoHAjY','631977ETQRBX','5BakozL','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','apiError','Environment\x20variable\x20is\x20not\x20set:\x20','value','once','kind','hasValue','Failed\x20to\x20','args','appCode','Missing\x20app-config\x20key.','file','env','4306368bXjIfZ','validation','data','tags','\x20app\x20config.','bool','gmtCreate','defineProperties','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','App\x20config\x20value\x20source\x20is\x20ambiguous.','7460saLwgr','flag','reveal','str','argument','from-env','before','trim','key','4937634DNxjGj','Missing\x20app-config\x20value\x20source.','dryRun','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','boolean','method','Value\x20file\x20is\x20not\x20readable:\x20','6574896RRouML','length','74XHAGnH'];a29_0xc2e9=function(){return _0x219edd;};return a29_0xc2e9();}export async function readAppConfigValue(_0x36fd11){const _0x3e87c3=a29_0x4ced28,_0x26b892=assertSingleValueSource(_0x36fd11),_0x195317=[];if(_0x26b892[_0x3e87c3(0x14a)]===_0x3e87c3(0x11f))return _0x195317[_0x3e87c3(0x13e)]('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0x26b892['value']??'','source':_0x26b892[_0x3e87c3(0x14a)],'warnings':_0x195317};if(_0x26b892[_0x3e87c3(0x14a)]==='stdin')return{'value':await readStdin(),'source':_0x26b892[_0x3e87c3(0x14a)],'warnings':_0x195317};if(_0x26b892[_0x3e87c3(0x14a)]===_0x3e87c3(0x151)){if(!(_0x26b892[_0x3e87c3(0x139)]in process.env))throw CliErrors[_0x3e87c3(0x153)](_0x3e87c3(0x147)+_0x26b892[_0x3e87c3(0x139)]);return{'value':process.env[_0x26b892.name]??'','source':_0x26b892[_0x3e87c3(0x14a)],'warnings':_0x195317};}return{'value':await readFile(_0x26b892[_0x3e87c3(0x138)],_0x3e87c3(0x137)),'source':_0x26b892[_0x3e87c3(0x14a)],'warnings':_0x195317};}function readStdin(){return new Promise((_0x229c92,_0x65f80e)=>{const _0x4f2961=a29_0x5b46;let _0x2457ef='';process['stdin']['setEncoding'](_0x4f2961(0x137)),process[_0x4f2961(0x131)]['on'](_0x4f2961(0x154),_0xe848e1=>{_0x2457ef+=_0xe848e1;}),process['stdin'][_0x4f2961(0x149)](_0x4f2961(0x141),()=>_0x229c92(_0x2457ef)),process[_0x4f2961(0x131)][_0x4f2961(0x149)]('error',_0x65f80e);});}
@@ -1 +1 @@
1
- const a30_0x1fdfaf=a30_0x5eea;function a30_0x5c10(){const _0x1e0176=['auth','bool','!\x20Not\x20logged\x20in','5054595GwjqEx','yes','boolean','log','110432zlutcL','✓\x20Logged\x20out','1099845oQYGWJ','write','12030792fobuei','22nwgeBg','Login\x20via\x20browser','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','61303lmCfjr','4182282FioNIb','5245464MEREYP','logout'];a30_0x5c10=function(){return _0x1e0176;};return a30_0x5c10();}(function(_0x60b8fa,_0x36a619){const _0x527ff0=a30_0x5eea,_0x4dc581=_0x60b8fa();while(!![]){try{const _0x8f396c=parseInt(_0x527ff0(0x1e8))/0x1*(parseInt(_0x527ff0(0x1e5))/0x2)+parseInt(_0x527ff0(0x1f5))/0x3+parseInt(_0x527ff0(0x1f3))/0x4+parseInt(_0x527ff0(0x1ef))/0x5+parseInt(_0x527ff0(0x1e9))/0x6+-parseInt(_0x527ff0(0x1ea))/0x7+-parseInt(_0x527ff0(0x1e4))/0x8;if(_0x8f396c===_0x36a619)break;else _0x4dc581['push'](_0x4dc581['shift']());}catch(_0x3e683b){_0x4dc581['push'](_0x4dc581['shift']());}}}(a30_0x5c10,0x7fc39));function a30_0x5eea(_0x7cf8d8,_0x43374c){_0x7cf8d8=_0x7cf8d8-0x1e3;const _0x5c10bc=a30_0x5c10();let _0x5eea38=_0x5c10bc[_0x7cf8d8];return _0x5eea38;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x1fdfaf(0x1ec),'command':'login','description':a30_0x1fdfaf(0x1e6),'risk':a30_0x1fdfaf(0x1e3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'yes','type':a30_0x1fdfaf(0x1f1),'description':a30_0x1fdfaf(0x1e7),'default':![]}],async 'execute'(_0x2c1534){const _0x32b817=a30_0x1fdfaf,{runAuthServer:_0x197825}=await import('../../auth/auth-server-ui.js');return await _0x197825({'autoYes':_0x2c1534[_0x32b817(0x1ed)](_0x32b817(0x1f0)),'nonInteractive':_0x2c1534['nonInteractive']}),{'ok':!![]};}},{'service':a30_0x1fdfaf(0x1ec),'command':a30_0x1fdfaf(0x1eb),'description':'Clear\x20login\x20session','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x574bb4){const _0x4dd628=a30_0x1fdfaf;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x4dd628(0x1f2)](_0x4dd628(0x1f4))):console[_0x4dd628(0x1f2)](_0x4dd628(0x1ee)),{'ok':!![]};}}];
1
+ const a30_0x5ceb57=a30_0xd337;(function(_0x57582a,_0x13f77f){const _0x2e3beb=a30_0xd337,_0x2e6f04=_0x57582a();while(!![]){try{const _0x45c24d=parseInt(_0x2e3beb(0x96))/0x1+parseInt(_0x2e3beb(0x92))/0x2*(parseInt(_0x2e3beb(0x8e))/0x3)+parseInt(_0x2e3beb(0x91))/0x4+-parseInt(_0x2e3beb(0x8a))/0x5*(-parseInt(_0x2e3beb(0x99))/0x6)+parseInt(_0x2e3beb(0x98))/0x7+-parseInt(_0x2e3beb(0x90))/0x8+-parseInt(_0x2e3beb(0x8b))/0x9;if(_0x45c24d===_0x13f77f)break;else _0x2e6f04['push'](_0x2e6f04['shift']());}catch(_0x324d68){_0x2e6f04['push'](_0x2e6f04['shift']());}}}(a30_0x4f4b,0x640b1));import{unlinkSync,existsSync}from'node:fs';function a30_0xd337(_0x45b7a6,_0x3674d9){_0x45b7a6=_0x45b7a6-0x8a;const _0x4f4bd0=a30_0x4f4b();let _0xd337de=_0x4f4bd0[_0x45b7a6];return _0xd337de;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x5ceb57(0x9a),'command':a30_0x5ceb57(0x8f),'description':'Login\x20via\x20browser','risk':a30_0x5ceb57(0x9c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x5ceb57(0x93),'type':a30_0x5ceb57(0x94),'description':a30_0x5ceb57(0x9d),'default':![]}],async 'execute'(_0x336a56){const _0x1569ce=a30_0x5ceb57,{runAuthServer:_0x1f71c2}=await import(_0x1569ce(0x8c));return await _0x1f71c2({'autoYes':_0x336a56[_0x1569ce(0x9b)](_0x1569ce(0x93)),'nonInteractive':_0x336a56[_0x1569ce(0x8d)]}),{'ok':!![]};}},{'service':a30_0x5ceb57(0x9a),'command':a30_0x5ceb57(0x97),'description':'Clear\x20login\x20session','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2ce539){const _0x5851b8=a30_0x5ceb57;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x5851b8(0x95)]('✓\x20Logged\x20out')):console[_0x5851b8(0x95)]('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];function a30_0x4f4b(){const _0xfad824=['yes','boolean','log','626593UxkJbU','logout','5109272UezXvE','72waWDtH','auth','bool','write','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','10520bRLinr','7729848GYNisk','../../auth/auth-server-ui.js','nonInteractive','107829XAzxYt','login','2599080AsIdiN','703416DrJzZO','2okdGGx'];a30_0x4f4b=function(){return _0xfad824;};return a30_0x4f4b();}
@@ -1 +1 @@
1
- const a31_0x373629=a31_0x2048;(function(_0x114411,_0x56d153){const _0x44c734=a31_0x2048,_0x4372fa=_0x114411();while(!![]){try{const _0xa1e3c0=-parseInt(_0x44c734(0xfa))/0x1*(parseInt(_0x44c734(0xf3))/0x2)+-parseInt(_0x44c734(0xe5))/0x3+parseInt(_0x44c734(0xd5))/0x4+-parseInt(_0x44c734(0xe3))/0x5*(parseInt(_0x44c734(0x10f))/0x6)+-parseInt(_0x44c734(0xd7))/0x7*(parseInt(_0x44c734(0xcf))/0x8)+parseInt(_0x44c734(0x11c))/0x9*(parseInt(_0x44c734(0xe1))/0xa)+parseInt(_0x44c734(0xe4))/0xb;if(_0xa1e3c0===_0x56d153)break;else _0x4372fa['push'](_0x4372fa['shift']());}catch(_0x2b3d04){_0x4372fa['push'](_0x4372fa['shift']());}}}(a31_0x14ce,0xab276));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';function a31_0x2048(_0x269ef6,_0x37ffd5){_0x269ef6=_0x269ef6-0xc4;const _0x14cef1=a31_0x14ce();let _0x20485f=_0x14cef1[_0x269ef6];return _0x20485f;}import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':a31_0x373629(0xee),'command':a31_0x373629(0xde),'description':a31_0x373629(0xd4),'risk':'read','flags':[{'name':a31_0x373629(0x105),'type':a31_0x373629(0x122),'required':!![],'enum':['COMMON','ENDPOINT',a31_0x373629(0xcb)],'description':a31_0x373629(0xfc)},{'name':a31_0x373629(0xeb),'type':'string','required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0x373629(0xc7),'type':a31_0x373629(0x122),'description':a31_0x373629(0x109)},{'name':a31_0x373629(0x113),'type':a31_0x373629(0x122),'description':a31_0x373629(0xd0)},{'name':a31_0x373629(0x10b),'type':a31_0x373629(0x122),'description':a31_0x373629(0xd1)},{'name':'operation-type','type':a31_0x373629(0x122),'description':a31_0x373629(0x117)},{'name':a31_0x373629(0xf5),'type':'string','description':a31_0x373629(0x124),'enum':['before',a31_0x373629(0x118)]}],async 'validate'(_0x1efadd){const _0x14a1f7=a31_0x373629,_0x27ffd3=_0x1efadd[_0x14a1f7(0x116)](_0x14a1f7(0xeb));if(!isValidBffFunctionName(_0x27ffd3))throw CliErrors['validation'](_0x14a1f7(0xd3)+_0x27ffd3+_0x14a1f7(0x129));},async 'execute'(_0x33c273){const _0x373977=a31_0x373629,_0x1c4526=loadBffProjectConfig(_0x33c273['appCode']),_0x2b8cd5=_0x33c273[_0x373977(0x116)](_0x373977(0x105)),_0x4156be=_0x33c273[_0x373977(0x116)]('name'),_0x357fce=_0x33c273[_0x373977(0x116)](_0x373977(0xc7))||undefined,_0x271d31=_0x2b8cd5===_0x373977(0xcb)?await resolveHookOptions(_0x1c4526,_0x33c273):undefined,_0x3edb0a=buildFilePath(_0x1c4526,_0x2b8cd5,_0x4156be,_0x271d31);if(await fileExists(_0x3edb0a))throw CliErrors['validation']('File\x20already\x20exists:\x20'+_0x3edb0a);await mkdir(dirname(_0x3edb0a),{'recursive':!![]});const _0x40b668=generateTemplate(_0x2b8cd5,_0x4156be,_0x33c273[_0x373977(0xda)],_0x357fce,_0x271d31);await writeFile(_0x3edb0a,_0x40b668,_0x373977(0x12d));const _0x89a3d8={'type':_0x2b8cd5,'name':_0x4156be,'path':_0x3edb0a};if(_0x357fce)_0x89a3d8[_0x373977(0xc7)]=_0x357fce;if(_0x271d31){if(_0x271d31[_0x373977(0x113)])_0x89a3d8['alias']=_0x271d31[_0x373977(0x113)];_0x89a3d8[_0x373977(0x12a)]=_0x271d31[_0x373977(0x12a)],_0x89a3d8[_0x373977(0xe9)]=_0x271d31['operationType'],_0x89a3d8[_0x373977(0xce)]=_0x271d31[_0x373977(0xce)];}return{'ok':!![],'data':_0x89a3d8,'message':_0x373977(0xf4)+_0x2b8cd5+_0x373977(0xc8)+_0x4156be};}};async function resolveHookOptions(_0x509a93,_0x3b23ca){const _0x3e5c63=a31_0x373629,_0x179745=loadAliasMap(_0x3b23ca[_0x3e5c63(0xd6)],undefined,resolveApiFilePath(_0x3b23ca[_0x3e5c63(0xd6)],_0x3b23ca[_0x3e5c63(0xda)])),_0x5c6c31=_0x179745['length']>0x0;let _0x2ac5d6,_0x33ca8c,_0x12cd58;const _0x38ce32=_0x3b23ca[_0x3e5c63(0x116)]('alias'),_0x1cc02c=_0x3b23ca[_0x3e5c63(0x116)]('datasetcode');if(_0x38ce32){const _0xd39305=resolveAlias(_0x3b23ca['apiDir'],_0x38ce32,undefined,resolveApiFilePath(_0x3b23ca[_0x3e5c63(0xd6)],_0x3b23ca['appCode']));if(!_0xd39305){const _0x59307a=_0x5c6c31?_0x3e5c63(0x11e)+_0x179745[_0x3e5c63(0xcc)](_0x13b8ed=>_0x13b8ed['alias'])['join'](',\x20'):_0x3e5c63(0x126)+CLI_BIN_NAME+_0x3e5c63(0xe7);throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0xea)+_0x38ce32+'\x22\x20not\x20found.\x20'+_0x59307a);}_0x2ac5d6=_0x38ce32,_0x33ca8c=_0xd39305;}else{if(_0x1cc02c){_0x33ca8c=_0x1cc02c;const _0x2257dc=_0x179745[_0x3e5c63(0xf9)](_0x1dcdbf=>_0x1dcdbf[_0x3e5c63(0x12a)]===_0x1cc02c);_0x2ac5d6=_0x2257dc?.['alias'];}else{if(_0x3b23ca[_0x3e5c63(0x12b)])throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0xdd));else{if(_0x5c6c31){const _0x3d12dd=_0x179745[_0x3e5c63(0xcc)](_0x57aac5=>_0x57aac5[_0x3e5c63(0x113)]+'\x20('+_0x57aac5['tableName']+')'),_0x39bd7d=await promptSelect(_0x3e5c63(0x108),_0x3d12dd),_0x34696a=_0x179745[_0x39bd7d];if(!_0x34696a)throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x120));_0x2ac5d6=_0x34696a['alias'],_0x33ca8c=_0x34696a[_0x3e5c63(0x12a)];}else{const _0x48000b=await listDatasets(_0x3b23ca['appCode']);if(_0x48000b[_0x3e5c63(0x114)]===0x0)throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x101));const _0x24b48f=_0x48000b['map'](_0x390b97=>_0x390b97['name']+'\x20['+(_0x390b97[_0x3e5c63(0xd2)]??'UNKNOWN')+_0x3e5c63(0xe0)+_0x390b97[_0x3e5c63(0x100)]+')'),_0x332f7b=await promptSelect(_0x3e5c63(0x108),_0x24b48f),_0x363a2c=_0x48000b[_0x332f7b];if(!_0x363a2c)throw CliErrors['validation'](_0x3e5c63(0x120));_0x33ca8c=_0x363a2c[_0x3e5c63(0x100)],_0x2ac5d6=undefined;}}}}const _0x417ba9=await listDatasets(_0x3b23ca[_0x3e5c63(0xda)]),_0x1fd672=_0x417ba9[_0x3e5c63(0xf9)](_0x46577b=>_0x46577b[_0x3e5c63(0x100)]===_0x33ca8c);if(!_0x1fd672)throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0xd8)+_0x33ca8c+'\x22.\x20'+(_0x2ac5d6?_0x3e5c63(0xc6)+CLI_BIN_NAME+_0x3e5c63(0xff):''));_0x12cd58=_0x1fd672['id'];const _0x106038=_0x2ac5d6??_0x33ca8c,_0x2c2b5e=await listBffDatasetOperations(_0x3b23ca[_0x3e5c63(0xda)],_0x12cd58),_0x1287f1=_0x2c2b5e?Object[_0x3e5c63(0xf8)](_0x2c2b5e):[];if(_0x1287f1[_0x3e5c63(0x114)]===0x0)throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x10e)+_0x106038+'.');let _0x3e9a1e;const _0x598823=_0x3b23ca[_0x3e5c63(0x116)](_0x3e5c63(0xc9));if(_0x598823){if(!_0x1287f1[_0x3e5c63(0x12c)](_0x598823))throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x127)+_0x598823+_0x3e5c63(0xed)+_0x106038+'.\x20'+('Available:\x20'+_0x1287f1[_0x3e5c63(0xe2)](',\x20')));_0x3e9a1e=_0x598823;}else{if(_0x3b23ca['nonInteractive'])throw CliErrors['validation'](_0x3e5c63(0xe6));const _0x4727a5=await promptSelect('Select\x20operation\x20type:',_0x1287f1);_0x3e9a1e=_0x1287f1[_0x4727a5]??_0x1287f1[0x0];}let _0x51b89e=normalizeHookFunctionNode(_0x3b23ca[_0x3e5c63(0x116)]('function-node'));if(!_0x51b89e){if(_0x3b23ca['str'](_0x3e5c63(0xf5)))throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0x11f));if(_0x3b23ca[_0x3e5c63(0x12b)])throw CliErrors[_0x3e5c63(0xfb)](_0x3e5c63(0xcd));const _0x5e7caf=await promptSelect('Select\x20trigger\x20node:',[_0x3e5c63(0x112),_0x3e5c63(0x118)]);_0x51b89e=['before',_0x3e5c63(0x118)][_0x5e7caf]??_0x3e5c63(0x112);}return{'alias':_0x2ac5d6,'datasetCode':_0x33ca8c,'datasetId':_0x12cd58,'operationType':_0x3e9a1e,'functionNode':_0x51b89e};}async function promptSelect(_0x4b9eac,_0x20a9dd){const _0x48b64d=a31_0x373629;if(_0x20a9dd[_0x48b64d(0x114)]===0x1)return 0x0;for(const [_0x5eef09,_0x498edc]of _0x20a9dd[_0x48b64d(0x104)]()){process[_0x48b64d(0x128)]['write']('\x20\x20'+(_0x5eef09+0x1)+'.\x20'+_0x498edc+'\x0a');}const _0x21ec2b=createInterface({'input':process[_0x48b64d(0xf6)],'output':process[_0x48b64d(0x128)]});while(!![]){const _0x4a3a9a=await new Promise(_0x273f39=>{const _0x36365c=_0x48b64d;_0x21ec2b[_0x36365c(0x107)](_0x4b9eac+'\x20',_0x273f39);}),_0x45a3e3=Number[_0x48b64d(0x125)](_0x4a3a9a['trim'](),0xa);if(Number[_0x48b64d(0xf7)](_0x45a3e3)&&_0x45a3e3>=0x1&&_0x45a3e3<=_0x20a9dd[_0x48b64d(0x114)])return _0x21ec2b[_0x48b64d(0xfe)](),_0x45a3e3-0x1;process['stderr'][_0x48b64d(0xc5)](_0x48b64d(0x11b)+_0x20a9dd[_0x48b64d(0x114)]+'.\x0a');}}function buildFilePath(_0x4ba772,_0x316d6c,_0x59cc54,_0x9139f){const _0x2fb2f6=a31_0x373629;if(_0x316d6c==='HOOK'){if(!_0x9139f)throw CliErrors[_0x2fb2f6(0xfb)](_0x2fb2f6(0x103));const _0x26d13b=_0x9139f[_0x2fb2f6(0x113)]??_0x9139f[_0x2fb2f6(0x12a)];return join(_0x4ba772[_0x2fb2f6(0xe8)],'HOOK',_0x26d13b,_0x9139f['operationType'],_0x9139f[_0x2fb2f6(0xce)],_0x59cc54+'.js');}return join(_0x4ba772[_0x2fb2f6(0xe8)],_0x316d6c,_0x59cc54+_0x2fb2f6(0x10a));}function a31_0x14ce(){const _0xceac7c=['.js\x0a','appCode','.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','create','ENDPOINT',']\x20(','10xbCPvx','join','544150mPKror','13834953qRScxK','1749375vyrgDH','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','scriptsRootDir','operationType','Alias\x20\x22','name','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','\x22\x20not\x20found\x20for\x20dataset\x20','bff','/HOOK/','\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','/ENDPOINT/','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20','2TDwdbP','Created\x20','function-node','stdin','isInteger','keys','find','962222CjzeoI','validation','Script\x20type','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','close','\x20api\x20pull`\x20to\x20refresh.','code','No\x20datasets\x20found\x20for\x20this\x20app.','当前响应结果','HOOK\x20requires\x20alias/operation/node\x20options.','entries','type','\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20','question','Select\x20dataset:','Script\x20description','.js','datasetcode','当前请求参数','.js\x0a\x20*\x20[触发节点]\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','30GvRFQj','\x0a\x20*\x20[平台配置]\x20','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','before','alias','length','\x22,\x20params\x20})\x0a','str','Operation\x20type\x20(HOOK\x20only)','after','修改后的响应结果','\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','7143678xqVrAF','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Available\x20aliases:\x20','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','Invalid\x20dataset\x20selection.','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','string','COMMON','Trigger\x20node\x20(HOOK\x20only)','parseInt','No\x20api.ts\x20found.\x20Run\x20`','Operation\x20type\x20\x22','stderr','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','datasetCode','nonInteractive','includes','utf8','/**\x0a\x20*\x20','write','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','description','\x20function:\x20','operation-type','\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','HOOK','map','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','functionNode','17776GEvpsx','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','source','Invalid\x20function\x20name\x20\x22','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','3329608YacvRQ','apiDir','294WYRTyh','Dataset\x20not\x20found\x20for\x20code\x20\x22'];a31_0x14ce=function(){return _0xceac7c;};return a31_0x14ce();}export function generateTemplate(_0x3c74a2,_0x55d293,_0x3c46c1,_0x5f5443,_0x23735e){const _0x3b5b5c=a31_0x373629,_0x3ca1bf=_0x5f5443?.['trim']()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x52d041=getAppBaseUrl(_0x3c46c1),_0x1766d6='\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(_0x3c74a2===_0x3b5b5c(0x123))return _0x3b5b5c(0xc4)+_0x3ca1bf+_0x3b5b5c(0xfd)+_0x55d293+_0x3b5b5c(0x110)+_0x52d041+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x3c46c1+'/COMMON/'+_0x55d293+_0x3b5b5c(0xdb)+_0x55d293+_0x3b5b5c(0x115)+_0x1766d6+_0x3b5b5c(0xca)+_0x55d293+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x3c74a2===_0x3b5b5c(0xdf))return _0x3b5b5c(0xc4)+_0x3ca1bf+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20'+_0x55d293+_0x3b5b5c(0xdc)+_0x3c46c1+'/'+_0x55d293+'\x0a\x20*\x20[平台配置]\x20'+_0x52d041+'/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/'+_0x3c46c1+_0x3b5b5c(0xf1)+_0x55d293+_0x3b5b5c(0xd9)+_0x1766d6+_0x3b5b5c(0xf0)+_0x55d293+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x23735e)throw CliErrors[_0x3b5b5c(0xfb)](_0x3b5b5c(0xec));const _0x4765bd=_0x23735e[_0x3b5b5c(0x113)]??_0x23735e[_0x3b5b5c(0x12a)],_0x4e839e=_0x23735e[_0x3b5b5c(0xce)]==='before'?_0x3b5b5c(0x10c):_0x3b5b5c(0x102),_0x3d5f28=_0x23735e[_0x3b5b5c(0xce)]===_0x3b5b5c(0x112)?'修改后的请求参数':_0x3b5b5c(0x119);return _0x3b5b5c(0xc4)+_0x3ca1bf+_0x3b5b5c(0xf2)+_0x55d293+_0x3b5b5c(0x121)+_0x3c46c1+'/'+_0x23735e[_0x3b5b5c(0x12a)]+'/'+_0x23735e['operationType']+_0x3b5b5c(0x110)+_0x52d041+'/data/dataset/'+_0x23735e['datasetId']+_0x3b5b5c(0x111)+_0x3c46c1+_0x3b5b5c(0xef)+_0x4765bd+'/'+_0x23735e['operationType']+'/'+_0x23735e[_0x3b5b5c(0xce)]+'/'+_0x55d293+_0x3b5b5c(0x10d)+_0x23735e['functionNode']+'\x0a'+_0x1766d6+_0x3b5b5c(0x106)+_0x4e839e+_0x3b5b5c(0x11a)+_0x3d5f28+'\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x55d293+_0x3b5b5c(0x11d);}
1
+ const a31_0x862ec=a31_0x48a1;(function(_0x409ebd,_0x5ea4cc){const _0x129b16=a31_0x48a1,_0x525a1e=_0x409ebd();while(!![]){try{const _0x43249d=parseInt(_0x129b16(0x14b))/0x1*(parseInt(_0x129b16(0x10e))/0x2)+-parseInt(_0x129b16(0x157))/0x3*(parseInt(_0x129b16(0x12d))/0x4)+-parseInt(_0x129b16(0x102))/0x5*(parseInt(_0x129b16(0x13c))/0x6)+-parseInt(_0x129b16(0x135))/0x7*(parseInt(_0x129b16(0x147))/0x8)+parseInt(_0x129b16(0x132))/0x9+-parseInt(_0x129b16(0x11e))/0xa*(parseInt(_0x129b16(0x104))/0xb)+parseInt(_0x129b16(0x14a))/0xc;if(_0x43249d===_0x5ea4cc)break;else _0x525a1e['push'](_0x525a1e['shift']());}catch(_0x2e005d){_0x525a1e['push'](_0x525a1e['shift']());}}}(a31_0x1881,0xb5e0f));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';function a31_0x48a1(_0x16ad2d,_0x2013d1){_0x16ad2d=_0x16ad2d-0xf7;const _0x18813e=a31_0x1881();let _0x48a1c5=_0x18813e[_0x16ad2d];return _0x48a1c5;}import{DEFAULT_BFF_SCRIPT_DESCRIPTION,isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getAppBaseUrl}from'../../constant/domain.js';export const bffCreate={'service':'bff','command':'create','description':a31_0x862ec(0x10c),'risk':a31_0x862ec(0x13f),'flags':[{'name':'type','type':'string','required':!![],'enum':[a31_0x862ec(0x10a),'ENDPOINT',a31_0x862ec(0x133)],'description':a31_0x862ec(0x11a)},{'name':a31_0x862ec(0x15e),'type':a31_0x862ec(0x105),'required':!![],'description':a31_0x862ec(0x12f)},{'name':a31_0x862ec(0x130),'type':a31_0x862ec(0x105),'description':a31_0x862ec(0xf9)},{'name':a31_0x862ec(0x118),'type':a31_0x862ec(0x105),'description':a31_0x862ec(0x148)},{'name':a31_0x862ec(0x142),'type':'string','description':a31_0x862ec(0x12a)},{'name':a31_0x862ec(0x124),'type':a31_0x862ec(0x105),'description':a31_0x862ec(0x13e)},{'name':a31_0x862ec(0x12c),'type':a31_0x862ec(0x105),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':['before',a31_0x862ec(0x15b)]}],async 'validate'(_0x35633a){const _0x9c5dae=a31_0x862ec,_0x4477a9=_0x35633a['str'](_0x9c5dae(0x15e));if(!isValidBffFunctionName(_0x4477a9))throw CliErrors[_0x9c5dae(0xf8)](_0x9c5dae(0x141)+_0x4477a9+_0x9c5dae(0x149));},async 'execute'(_0x236440){const _0x3bc020=a31_0x862ec,_0x557ec1=loadBffProjectConfig(_0x236440[_0x3bc020(0x15c)]),_0x194c21=_0x236440[_0x3bc020(0x151)](_0x3bc020(0x13a)),_0xc22526=_0x236440['str'](_0x3bc020(0x15e)),_0x140e94=_0x236440[_0x3bc020(0x151)](_0x3bc020(0x130))||undefined,_0x24b058=_0x194c21===_0x3bc020(0x133)?await resolveHookOptions(_0x557ec1,_0x236440):undefined,_0x10d52f=buildFilePath(_0x557ec1,_0x194c21,_0xc22526,_0x24b058);if(await fileExists(_0x10d52f))throw CliErrors[_0x3bc020(0xf8)](_0x3bc020(0x110)+_0x10d52f);await mkdir(dirname(_0x10d52f),{'recursive':!![]});const _0x59f3c1=generateTemplate(_0x194c21,_0xc22526,_0x236440[_0x3bc020(0x15c)],_0x140e94,_0x24b058);await writeFile(_0x10d52f,_0x59f3c1,'utf8');const _0x6e776c={'type':_0x194c21,'name':_0xc22526,'path':_0x10d52f};if(_0x140e94)_0x6e776c[_0x3bc020(0x130)]=_0x140e94;if(_0x24b058){if(_0x24b058[_0x3bc020(0x118)])_0x6e776c[_0x3bc020(0x118)]=_0x24b058['alias'];_0x6e776c['datasetCode']=_0x24b058['datasetCode'],_0x6e776c['operationType']=_0x24b058[_0x3bc020(0x144)],_0x6e776c[_0x3bc020(0x13b)]=_0x24b058[_0x3bc020(0x13b)];}return{'ok':!![],'data':_0x6e776c,'message':'Created\x20'+_0x194c21+_0x3bc020(0x11f)+_0xc22526};}};async function resolveHookOptions(_0x2382c2,_0x2dd4e3){const _0x23a4fb=a31_0x862ec,_0x55ca8c=loadAliasMap(_0x2dd4e3['apiDir'],undefined,resolveApiFilePath(_0x2dd4e3[_0x23a4fb(0x140)],_0x2dd4e3[_0x23a4fb(0x15c)])),_0x4e9526=_0x55ca8c[_0x23a4fb(0x112)]>0x0;let _0x2d160f,_0x59eb7d,_0x340546;const _0x1271a2=_0x2dd4e3[_0x23a4fb(0x151)](_0x23a4fb(0x118)),_0x31b45d=_0x2dd4e3[_0x23a4fb(0x151)](_0x23a4fb(0x142));if(_0x1271a2){const _0x3be177=resolveAlias(_0x2dd4e3[_0x23a4fb(0x140)],_0x1271a2,undefined,resolveApiFilePath(_0x2dd4e3[_0x23a4fb(0x140)],_0x2dd4e3[_0x23a4fb(0x15c)]));if(!_0x3be177){const _0x1d77d8=_0x4e9526?'Available\x20aliases:\x20'+_0x55ca8c[_0x23a4fb(0x159)](_0x14259f=>_0x14259f[_0x23a4fb(0x118)])[_0x23a4fb(0x10f)](',\x20'):_0x23a4fb(0x160)+CLI_BIN_NAME+_0x23a4fb(0x10b);throw CliErrors[_0x23a4fb(0xf8)](_0x23a4fb(0x155)+_0x1271a2+_0x23a4fb(0x139)+_0x1d77d8);}_0x2d160f=_0x1271a2,_0x59eb7d=_0x3be177;}else{if(_0x31b45d){_0x59eb7d=_0x31b45d;const _0x291b62=_0x55ca8c[_0x23a4fb(0x154)](_0x437589=>_0x437589[_0x23a4fb(0x126)]===_0x31b45d);_0x2d160f=_0x291b62?.[_0x23a4fb(0x118)];}else{if(_0x2dd4e3['nonInteractive'])throw CliErrors[_0x23a4fb(0xf8)](_0x23a4fb(0x136));else{if(_0x4e9526){const _0x45b0d0=_0x55ca8c[_0x23a4fb(0x159)](_0x2e2857=>_0x2e2857['alias']+'\x20('+_0x2e2857[_0x23a4fb(0x145)]+')'),_0xbc5a1=await promptSelect(_0x23a4fb(0xfb),_0x45b0d0),_0x461f71=_0x55ca8c[_0xbc5a1];if(!_0x461f71)throw CliErrors[_0x23a4fb(0xf8)](_0x23a4fb(0x146));_0x2d160f=_0x461f71[_0x23a4fb(0x118)],_0x59eb7d=_0x461f71['datasetCode'];}else{const _0x18c7b2=await listDatasets(_0x2dd4e3['appCode']);if(_0x18c7b2['length']===0x0)throw CliErrors['validation'](_0x23a4fb(0x121));const _0x571f7e=_0x18c7b2[_0x23a4fb(0x159)](_0x8b0b5b=>_0x8b0b5b[_0x23a4fb(0x15e)]+'\x20['+(_0x8b0b5b[_0x23a4fb(0x116)]??'UNKNOWN')+']\x20('+_0x8b0b5b['code']+')'),_0x2cd5fe=await promptSelect(_0x23a4fb(0xfb),_0x571f7e),_0x10d0f8=_0x18c7b2[_0x2cd5fe];if(!_0x10d0f8)throw CliErrors[_0x23a4fb(0xf8)](_0x23a4fb(0x146));_0x59eb7d=_0x10d0f8[_0x23a4fb(0x150)],_0x2d160f=undefined;}}}}const _0x212a65=await listDatasets(_0x2dd4e3[_0x23a4fb(0x15c)]),_0xb7ff55=_0x212a65['find'](_0x222dbd=>_0x222dbd[_0x23a4fb(0x150)]===_0x59eb7d);if(!_0xb7ff55)throw CliErrors[_0x23a4fb(0xf8)]('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x59eb7d+_0x23a4fb(0x101)+(_0x2d160f?_0x23a4fb(0xfc)+CLI_BIN_NAME+_0x23a4fb(0xfa):''));_0x340546=_0xb7ff55['id'];const _0x4251d9=_0x2d160f??_0x59eb7d,_0x489ed9=await listBffDatasetOperations(_0x2dd4e3[_0x23a4fb(0x15c)],_0x340546),_0x5695b0=_0x489ed9?Object[_0x23a4fb(0x14f)](_0x489ed9):[];if(_0x5695b0[_0x23a4fb(0x112)]===0x0)throw CliErrors[_0x23a4fb(0xf8)](_0x23a4fb(0x122)+_0x4251d9+'.');let _0x42f4c9;const _0x462cef=_0x2dd4e3[_0x23a4fb(0x151)](_0x23a4fb(0x124));if(_0x462cef){if(!_0x5695b0[_0x23a4fb(0x143)](_0x462cef))throw CliErrors[_0x23a4fb(0xf8)](_0x23a4fb(0x108)+_0x462cef+_0x23a4fb(0x128)+_0x4251d9+'.\x20'+(_0x23a4fb(0x111)+_0x5695b0[_0x23a4fb(0x10f)](',\x20')));_0x42f4c9=_0x462cef;}else{if(_0x2dd4e3[_0x23a4fb(0x106)])throw CliErrors['validation']('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x5c543e=await promptSelect(_0x23a4fb(0x10d),_0x5695b0);_0x42f4c9=_0x5695b0[_0x5c543e]??_0x5695b0[0x0];}let _0x476a55=normalizeHookFunctionNode(_0x2dd4e3[_0x23a4fb(0x151)](_0x23a4fb(0x12c)));if(!_0x476a55){if(_0x2dd4e3[_0x23a4fb(0x151)](_0x23a4fb(0x12c)))throw CliErrors[_0x23a4fb(0xf8)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x2dd4e3['nonInteractive'])throw CliErrors['validation'](_0x23a4fb(0x119));const _0x3ccc8e=await promptSelect(_0x23a4fb(0x123),['before',_0x23a4fb(0x15b)]);_0x476a55=[_0x23a4fb(0x120),'after'][_0x3ccc8e]??'before';}return{'alias':_0x2d160f,'datasetCode':_0x59eb7d,'datasetId':_0x340546,'operationType':_0x42f4c9,'functionNode':_0x476a55};}async function promptSelect(_0x643579,_0x428f07){const _0x3a4ee0=a31_0x862ec;if(_0x428f07['length']===0x1)return 0x0;for(const [_0x3b0d30,_0x3eb9f9]of _0x428f07[_0x3a4ee0(0xfe)]()){process['stderr'][_0x3a4ee0(0xff)]('\x20\x20'+(_0x3b0d30+0x1)+'.\x20'+_0x3eb9f9+'\x0a');}const _0x5b28fa=createInterface({'input':process[_0x3a4ee0(0xf7)],'output':process[_0x3a4ee0(0x14e)]});while(!![]){const _0x441a30=await new Promise(_0x2508f0=>{const _0x25246f=_0x3a4ee0;_0x5b28fa[_0x25246f(0x15d)](_0x643579+'\x20',_0x2508f0);}),_0x19dd5a=Number[_0x3a4ee0(0x152)](_0x441a30[_0x3a4ee0(0x115)](),0xa);if(Number[_0x3a4ee0(0x153)](_0x19dd5a)&&_0x19dd5a>=0x1&&_0x19dd5a<=_0x428f07['length'])return _0x5b28fa[_0x3a4ee0(0x11b)](),_0x19dd5a-0x1;process[_0x3a4ee0(0x14e)][_0x3a4ee0(0xff)](_0x3a4ee0(0x11d)+_0x428f07['length']+'.\x0a');}}function a31_0x1881(){const _0x1aa26c=['COMMON','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','Scaffold\x20a\x20new\x20Backend\x20Function\x20script\x20from\x20template','Select\x20operation\x20type:','622194JSDLoj','join','File\x20already\x20exists:\x20','Available:\x20','length','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','\x22,\x20params\x20})\x0a','trim','source','/data/backend-function\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','alias','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Script\x20type','close','\x0a\x20*\x20[平台配置]\x20','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','2925410RZKosN','\x20function:\x20','before','No\x20datasets\x20found\x20for\x20this\x20app.','No\x20operation\x20types\x20found\x20for\x20dataset\x20','Select\x20trigger\x20node:','operation-type','#api-list\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/','datasetCode','/ENDPOINT/','\x22\x20not\x20found\x20for\x20dataset\x20','ENDPOINT','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','function-node','1505464lPtapU','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[脚本名称]\x20','Function\x20name\x20(valid\x20JS\x20identifier)','description','/HOOK/','8327097zivjLP','HOOK','.js','3073854aLvNOn','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','修改后的请求参数','\x0a\x20*\x0a\x20*\x20[脚本类型]\x20ENDPOINT\x0a\x20*\x20[脚本名称]\x20','\x22\x20not\x20found.\x20','type','functionNode','30RGHHBp','/COMMON/','Operation\x20type\x20(HOOK\x20only)','read','apiDir','Invalid\x20function\x20name\x20\x22','datasetcode','includes','operationType','tableName','Invalid\x20dataset\x20selection.','24bxGXHN','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','33339360fSVaXe','1zMHoLW','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/','\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','stderr','keys','code','str','parseInt','isInteger','find','Alias\x20\x22','.js\x0a\x20*\x20[触发节点]\x20','6awLMVa','当前请求参数','map','\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','after','appCode','question','name','HOOK\x20requires\x20alias/operation/node\x20options.','No\x20api.ts\x20found.\x20Run\x20`','stdin','validation','Script\x20description','\x20api\x20pull`\x20to\x20refresh.','Select\x20dataset:','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','当前响应结果','entries','write','/**\x0a\x20*\x20','\x22.\x20','614455gSvdvD','\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','22EAexGV','string','nonInteractive','scriptsRootDir','Operation\x20type\x20\x22','修改后的响应结果'];a31_0x1881=function(){return _0x1aa26c;};return a31_0x1881();}function buildFilePath(_0x2d4157,_0x446cd3,_0x2eefcf,_0x317917){const _0x34d8e7=a31_0x862ec;if(_0x446cd3==='HOOK'){if(!_0x317917)throw CliErrors[_0x34d8e7(0xf8)](_0x34d8e7(0x15f));const _0x3cd651=_0x317917[_0x34d8e7(0x118)]??_0x317917[_0x34d8e7(0x126)];return join(_0x2d4157[_0x34d8e7(0x107)],'HOOK',_0x3cd651,_0x317917[_0x34d8e7(0x144)],_0x317917[_0x34d8e7(0x13b)],_0x2eefcf+_0x34d8e7(0x134));}return join(_0x2d4157[_0x34d8e7(0x107)],_0x446cd3,_0x2eefcf+_0x34d8e7(0x134));}export function generateTemplate(_0x1472ad,_0x4d5344,_0x52fcfe,_0x4ecf93,_0x3e6d4c){const _0x47b1dc=a31_0x862ec,_0x32e189=_0x4ecf93?.['trim']()||DEFAULT_BFF_SCRIPT_DESCRIPTION,_0x3785b7=getAppBaseUrl(_0x52fcfe),_0x25482f='\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(_0x1472ad===_0x47b1dc(0x10a))return _0x47b1dc(0x100)+_0x32e189+_0x47b1dc(0x12e)+_0x4d5344+_0x47b1dc(0x11c)+_0x3785b7+_0x47b1dc(0x117)+_0x52fcfe+_0x47b1dc(0x13d)+_0x4d5344+'.js\x0a\x20*\x20[调用方式]\x20context.client.bff.execute({\x20scriptName:\x20\x22'+_0x4d5344+_0x47b1dc(0x114)+_0x25482f+_0x47b1dc(0x15a)+_0x4d5344+_0x47b1dc(0x113);if(_0x1472ad===_0x47b1dc(0x129))return _0x47b1dc(0x100)+_0x32e189+_0x47b1dc(0x138)+_0x4d5344+_0x47b1dc(0x14c)+_0x52fcfe+'/'+_0x4d5344+_0x47b1dc(0x11c)+_0x3785b7+_0x47b1dc(0x117)+_0x52fcfe+_0x47b1dc(0x127)+_0x4d5344+'.js\x0a'+_0x25482f+_0x47b1dc(0x103)+_0x4d5344+_0x47b1dc(0x113);if(!_0x3e6d4c)throw CliErrors[_0x47b1dc(0xf8)]('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');const _0x3c5809=_0x3e6d4c['alias']??_0x3e6d4c[_0x47b1dc(0x126)],_0x1af9e7=_0x3e6d4c[_0x47b1dc(0x13b)]==='before'?_0x47b1dc(0x158):_0x47b1dc(0xfd),_0xb3f646=_0x3e6d4c[_0x47b1dc(0x13b)]===_0x47b1dc(0x120)?_0x47b1dc(0x137):_0x47b1dc(0x109);return'/**\x0a\x20*\x20'+_0x32e189+'\x0a\x20*\x0a\x20*\x20[脚本类型]\x20HOOK\x0a\x20*\x20[脚本名称]\x20'+_0x4d5344+_0x47b1dc(0x12b)+_0x52fcfe+'/'+_0x3e6d4c[_0x47b1dc(0x126)]+'/'+_0x3e6d4c['operationType']+'\x0a\x20*\x20[平台配置]\x20'+_0x3785b7+'/data/dataset/'+_0x3e6d4c['datasetId']+_0x47b1dc(0x125)+_0x52fcfe+_0x47b1dc(0x131)+_0x3c5809+'/'+_0x3e6d4c[_0x47b1dc(0x144)]+'/'+_0x3e6d4c[_0x47b1dc(0x13b)]+'/'+_0x4d5344+_0x47b1dc(0x156)+_0x3e6d4c['functionNode']+'\x0a'+_0x25482f+'\x0a\x20*\x20[参数字段]\x20按实际输入为\x20params.<字段名>\x20补充\x20JSDoc\x20参数标签;无字段时仅保留根参数\x0a\x20*\x20[异常说明]\x20无;显式抛出异常时补充异常类型与触发条件\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20'+_0x1af9e7+'\x0a\x20*\x20@param\x20{Object}\x20context\x20平台注入的执行上下文\x0a\x20*\x20@returns\x20{Promise<Object>}\x20'+_0xb3f646+_0x47b1dc(0x14d)+_0x4d5344+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
@@ -1 +1 @@
1
- const a32_0xde8518=a32_0x2bd1;(function(_0x52ab1b,_0x16ffb6){const _0xed858d=a32_0x2bd1,_0x128ade=_0x52ab1b();while(!![]){try{const _0x5d95b8=parseInt(_0xed858d(0x1e0))/0x1+parseInt(_0xed858d(0x1c6))/0x2*(parseInt(_0xed858d(0x1d7))/0x3)+-parseInt(_0xed858d(0x1d1))/0x4+-parseInt(_0xed858d(0x1bc))/0x5+-parseInt(_0xed858d(0x1cb))/0x6*(parseInt(_0xed858d(0x1c3))/0x7)+-parseInt(_0xed858d(0x1bd))/0x8*(parseInt(_0xed858d(0x1de))/0x9)+parseInt(_0xed858d(0x1dc))/0xa;if(_0x5d95b8===_0x16ffb6)break;else _0x128ade['push'](_0x128ade['shift']());}catch(_0x1343e6){_0x128ade['push'](_0x128ade['shift']());}}}(a32_0x1f08,0x2c7fe));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_0x2bd1(_0x44c868,_0x1408b2){_0x44c868=_0x44c868-0x1b6;const _0x1f084a=a32_0x1f08();let _0x2bd143=_0x1f084a[_0x44c868];return _0x2bd143;}export const bffDelete={'service':'bff','command':'delete','description':a32_0xde8518(0x1e5),'risk':a32_0xde8518(0x1e2),'flags':[{'name':a32_0xde8518(0x1d9),'type':a32_0xde8518(0x1b8),'required':!![],'description':a32_0xde8518(0x1c9)}],async 'validate'(_0x11f2ce){const _0x97e4b4=a32_0xde8518,_0x1112d2=loadBffProjectConfig(_0x11f2ce[_0x97e4b4(0x1c8)]),_0x534a89=await readBffLockFile(_0x1112d2['lockFilePath']);if(!_0x534a89)throw CliErrors[_0x97e4b4(0x1b7)](_0x97e4b4(0x1d4));},async 'dryRun'(_0x49e74d){const _0x5f47c8=a32_0xde8518,_0x3746a3=loadBffProjectConfig(_0x49e74d[_0x5f47c8(0x1c8)]),_0x6a729c=await readBffLockFile(_0x3746a3[_0x5f47c8(0x1d6)]);if(!_0x6a729c)throw CliErrors[_0x5f47c8(0x1b7)](_0x5f47c8(0x1cc));const {appLock:_0x5ad893}=ensureLockScope(_0x6a729c,_0x49e74d[_0x5f47c8(0x1c8)],_0x3746a3[_0x5f47c8(0x1df)],_0x5f47c8(0x1b6)),_0x16705b=_0x49e74d[_0x5f47c8(0x1e3)](_0x5f47c8(0x1d9)),_0x19389e=Object[_0x5f47c8(0x1d2)](_0x5ad893['functions']),_0x5a075d=resolveDeleteTarget(_0x16705b,_0x19389e),_0x4d93f1=_0x5ad893['functions'][_0x5a075d];if(!_0x4d93f1)throw CliErrors[_0x5f47c8(0x1b7)](_0x5f47c8(0x1d8)+_0x5a075d+'\x22.');const _0x5dc006=resolveLocalFilePathFromLockKey(_0x3746a3,_0x5a075d),_0xdb166a=relative(_0x3746a3['projectRoot'],_0x5dc006),_0x4610b8=join(_0x3746a3['trashDir'],_0x5f47c8(0x1c7),_0xdb166a);return{'method':_0x5f47c8(0x1e6),'url':_0x5f47c8(0x1be),'body':{'appCode':_0x49e74d[_0x5f47c8(0x1c8)],'target':_0x5a075d,'remoteId':_0x4d93f1[_0x5f47c8(0x1e9)],'localFilePath':_0x5dc006,'trashedPath':_0x4610b8},'description':'Would\x20delete\x20'+_0x5a075d+_0x5f47c8(0x1c5)};},async 'execute'(_0x1401e8){const _0x19e1e1=a32_0xde8518,_0x58ab57=loadBffProjectConfig(_0x1401e8[_0x19e1e1(0x1c8)]),_0x2c0742=await readBffLockFile(_0x58ab57[_0x19e1e1(0x1d6)]);if(!_0x2c0742)throw CliErrors[_0x19e1e1(0x1b7)](_0x19e1e1(0x1cc));const {lockData:_0x41d5e9,appLock:_0x1908d8}=ensureLockScope(_0x2c0742,_0x1401e8[_0x19e1e1(0x1c8)],_0x58ab57[_0x19e1e1(0x1df)],'delete'),_0x427bb2=JSON[_0x19e1e1(0x1da)](JSON[_0x19e1e1(0x1dd)](_0x41d5e9)),_0x4a8bc2=_0x427bb2[_0x19e1e1(0x1bf)][_0x1401e8['appCode']];if(!_0x4a8bc2)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x1401e8[_0x19e1e1(0x1c8)]+_0x19e1e1(0x1bb));const _0x4628c5=_0x1401e8[_0x19e1e1(0x1e3)]('target'),_0x26ba40=Object['keys'](_0x4a8bc2[_0x19e1e1(0x1c2)]),_0x474e7c=resolveDeleteTarget(_0x4628c5,_0x26ba40),_0xe2ed70=_0x4a8bc2['functions'][_0x474e7c];if(!_0xe2ed70)throw CliErrors[_0x19e1e1(0x1b7)](_0x19e1e1(0x1d8)+_0x474e7c+'\x22.');await deleteBffScript(_0xe2ed70['remoteId']),delete _0x4a8bc2[_0x19e1e1(0x1c2)][_0x474e7c],_0x4a8bc2[_0x19e1e1(0x1e7)]=new Date()[_0x19e1e1(0x1e4)](),await writeBffLockFile(_0x58ab57[_0x19e1e1(0x1d6)],_0x427bb2);const _0x2a1996=resolveLocalFilePathFromLockKey(_0x58ab57,_0x474e7c);let _0x1a24cd;await fileExists(_0x2a1996)&&(_0x1a24cd=await moveToTrash(_0x58ab57['projectRoot'],_0x58ab57[_0x19e1e1(0x1e8)],_0x2a1996),await cleanupEmptyDirectories(dirname(_0x2a1996),_0x58ab57['scriptsRootDir']));await waitForDeleteSettlement(_0x58ab57['lockFilePath'],_0x1401e8[_0x19e1e1(0x1c8)],_0x474e7c,_0x2a1996),await sleep(0x96);const _0x8fc3d8={'deleted':_0x474e7c,'remoteId':_0xe2ed70[_0x19e1e1(0x1e9)]};if(_0x1a24cd)_0x8fc3d8['trashedTo']=_0x1a24cd;return{'ok':!![],'data':_0x8fc3d8,'message':_0x19e1e1(0x1db)+_0x474e7c+(_0x1a24cd?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x55e311,_0x3ca99f){const _0x2950ce=a32_0xde8518;if(_0x55e311[_0x2950ce(0x1ca)]('/')){const _0x82e474=_0x3ca99f[_0x2950ce(0x1d5)](_0x5c925d=>_0x5c925d===_0x55e311);if(!_0x82e474)throw CliErrors[_0x2950ce(0x1b7)](_0x2950ce(0x1cd)+_0x55e311);return _0x82e474;}const _0x239a18=_0x3ca99f[_0x2950ce(0x1e1)](_0x1e5f7d=>_0x1e5f7d[_0x2950ce(0x1ea)]('/')['at'](-0x1)===_0x55e311);if(_0x239a18[_0x2950ce(0x1b9)]===0x0)throw CliErrors[_0x2950ce(0x1b7)](_0x2950ce(0x1cd)+_0x55e311);if(_0x239a18['length']>0x1)throw CliErrors[_0x2950ce(0x1b7)](_0x2950ce(0x1ba)+_0x55e311+_0x2950ce(0x1d3)+_0x239a18[_0x2950ce(0x1c1)](_0x5ef45b=>_0x2950ce(0x1d0)+_0x5ef45b)[_0x2950ce(0x1c4)]('\x0a'));return _0x239a18[0x0];}async function moveToTrash(_0x2dfb97,_0x4ebeaf,_0x27bf96){const _0x5b07e3=a32_0xde8518,_0x4ff739=new Date()['toISOString']()[_0x5b07e3(0x1c0)](/[:.]/g,'-'),_0x2e20c8=relative(_0x2dfb97,_0x27bf96),_0x41f7e7=join(_0x4ebeaf,_0x4ff739,_0x2e20c8);return await mkdir(dirname(_0x41f7e7),{'recursive':!![]}),await rename(_0x27bf96,_0x41f7e7),_0x41f7e7;}async function cleanupEmptyDirectories(_0x39e77a,_0x3e7406){const _0x379ee4=a32_0xde8518;let _0x1d1271=resolve(_0x39e77a);const _0x45c946=resolve(_0x3e7406);while(_0x1d1271[_0x379ee4(0x1ce)](''+_0x45c946+sep)||_0x1d1271===_0x45c946){if(_0x1d1271===_0x45c946)return;try{const _0x1ca3e5=await readdir(_0x1d1271);if(_0x1ca3e5[_0x379ee4(0x1b9)]>0x0)return;await rmdir(_0x1d1271);}catch{return;}_0x1d1271=dirname(_0x1d1271);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;function a32_0x1f08(){const _0x293a9f=['toISOString','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local','POST','lastSync','trashDir','remoteId','split','delete','validation','string','length','Multiple\x20functions\x20match\x20\x22','\x22\x20not\x20found\x20after\x20ensureLockScope.','883460eMgRKr','478872zAJCVD','/api/management/library/scripts/delete','apps','replace','map','functions','294OUiRTU','join','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','7442QkeWXo','<timestamp>','appCode','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','includes','35616adWNOH','Backend\x20Function\x20lock\x20file\x20not\x20found.','Function\x20not\x20found:\x20','startsWith','Local\x20delete\x20not\x20settled\x20for\x20','\x20\x20-\x20','279668ZYoNlV','keys','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','find','lockFilePath','213CigLDF','No\x20lock\x20entry\x20found\x20for\x20\x22','target','parse','Deleted\x20','2907380OITQUJ','stringify','36WwkTWp','scriptsRoot','362698ApgBkH','filter','high-risk-write','str'];a32_0x1f08=function(){return _0x293a9f;};return a32_0x1f08();}async function waitForDeleteSettlement(_0x4bd7e6,_0x12dc05,_0x12883c,_0x1bdf8a){const _0x4c2117=a32_0xde8518;for(let _0x584c3f=0x0;_0x584c3f<DELETE_SETTLE_RETRY_COUNT;_0x584c3f+=0x1){const _0x21c0c6=await readBffLockFile(_0x4bd7e6),_0x466973=!!_0x21c0c6?.[_0x4c2117(0x1bf)]?.[_0x12dc05]?.[_0x4c2117(0x1c2)]?.[_0x12883c],_0x491670=await fileExists(_0x1bdf8a);if(!_0x466973&&!_0x491670)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x4c2117(0x1cf)+_0x12883c+'.');}
1
+ function a32_0x5cc9(){const _0x4d9d04=['Deleted\x20','\x22\x20not\x20found\x20after\x20ensureLockScope.','str','\x20(local\x20file\x20moved\x20to\x20trash)','lockFilePath','target','toISOString','stringify','keys','remoteId','parse','4197465LSZEpp','Backend\x20Function\x20lock\x20file\x20not\x20found.','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','1605570bsCcAh','delete','\x20\x20-\x20','7877032MIxJbJ','filter','includes','validation','appCode','1fBCAbh','1809466mJkwsR','trashedTo','scriptsRootDir','Function\x20not\x20found:\x20','scriptsRoot','1832760bMKcVW','functions','Would\x20delete\x20','Multiple\x20functions\x20match\x20\x22','split','Backend\x20Function\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','23748VQMrjo','POST','high-risk-write','1065799nAMYEP','find','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','string','trashDir','lastSync','/api/management/library/scripts/delete','length','join','Local\x20delete\x20not\x20settled\x20for\x20','apps','496OKETwT','Delete\x20a\x20Backend\x20Function\x20script\x20from\x20remote\x20and\x20local'];a32_0x5cc9=function(){return _0x4d9d04;};return a32_0x5cc9();}const a32_0xea5732=a32_0x44a9;(function(_0x180c1,_0x4d4b18){const _0x50c265=a32_0x44a9,_0x11e80e=_0x180c1();while(!![]){try{const _0x37a32e=-parseInt(_0x50c265(0x172))/0x1*(parseInt(_0x50c265(0x173))/0x2)+parseInt(_0x50c265(0x17e))/0x3*(parseInt(_0x50c265(0x18c))/0x4)+-parseInt(_0x50c265(0x199))/0x5+parseInt(_0x50c265(0x19c))/0x6+-parseInt(_0x50c265(0x181))/0x7+parseInt(_0x50c265(0x19f))/0x8+parseInt(_0x50c265(0x178))/0x9;if(_0x37a32e===_0x4d4b18)break;else _0x11e80e['push'](_0x11e80e['shift']());}catch(_0x145ecb){_0x11e80e['push'](_0x11e80e['shift']());}}}(a32_0x5cc9,0x84125));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a32_0x44a9(_0x2cd38f,_0x118101){_0x2cd38f=_0x2cd38f-0x16e;const _0x5cc9f2=a32_0x5cc9();let _0x44a933=_0x5cc9f2[_0x2cd38f];return _0x44a933;}import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':'bff','command':'delete','description':a32_0xea5732(0x18d),'risk':a32_0xea5732(0x180),'flags':[{'name':a32_0xea5732(0x193),'type':a32_0xea5732(0x184),'required':!![],'description':a32_0xea5732(0x19b)}],async 'validate'(_0x6d8773){const _0x209f81=a32_0xea5732,_0x4b2bd2=loadBffProjectConfig(_0x6d8773[_0x209f81(0x171)]),_0x305704=await readBffLockFile(_0x4b2bd2[_0x209f81(0x192)]);if(!_0x305704)throw CliErrors[_0x209f81(0x170)](_0x209f81(0x17d));},async 'dryRun'(_0x2018b4){const _0x39baa2=a32_0xea5732,_0xb10715=loadBffProjectConfig(_0x2018b4[_0x39baa2(0x171)]),_0x12b143=await readBffLockFile(_0xb10715[_0x39baa2(0x192)]);if(!_0x12b143)throw CliErrors[_0x39baa2(0x170)](_0x39baa2(0x19a));const {appLock:_0x5a04c1}=ensureLockScope(_0x12b143,_0x2018b4[_0x39baa2(0x171)],_0xb10715[_0x39baa2(0x177)],_0x39baa2(0x19d)),_0x567585=_0x2018b4[_0x39baa2(0x190)](_0x39baa2(0x193)),_0x4e204c=Object[_0x39baa2(0x196)](_0x5a04c1['functions']),_0xa6b606=resolveDeleteTarget(_0x567585,_0x4e204c),_0x4c117d=_0x5a04c1[_0x39baa2(0x179)][_0xa6b606];if(!_0x4c117d)throw CliErrors[_0x39baa2(0x170)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0xa6b606+'\x22.');const _0x335664=resolveLocalFilePathFromLockKey(_0xb10715,_0xa6b606),_0x587f00=relative(_0xb10715['projectRoot'],_0x335664),_0x165a91=join(_0xb10715[_0x39baa2(0x185)],'<timestamp>',_0x587f00);return{'method':_0x39baa2(0x17f),'url':_0x39baa2(0x187),'body':{'appCode':_0x2018b4['appCode'],'target':_0xa6b606,'remoteId':_0x4c117d['remoteId'],'localFilePath':_0x335664,'trashedPath':_0x165a91},'description':_0x39baa2(0x17a)+_0xa6b606+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x17b211){const _0x108d47=a32_0xea5732,_0x29f66a=loadBffProjectConfig(_0x17b211[_0x108d47(0x171)]),_0x20bc68=await readBffLockFile(_0x29f66a[_0x108d47(0x192)]);if(!_0x20bc68)throw CliErrors[_0x108d47(0x170)]('Backend\x20Function\x20lock\x20file\x20not\x20found.');const {lockData:_0x1883ac,appLock:_0x2e54ae}=ensureLockScope(_0x20bc68,_0x17b211[_0x108d47(0x171)],_0x29f66a['scriptsRoot'],_0x108d47(0x19d)),_0x10f45b=JSON[_0x108d47(0x198)](JSON[_0x108d47(0x195)](_0x1883ac)),_0x5c4b1a=_0x10f45b[_0x108d47(0x18b)][_0x17b211[_0x108d47(0x171)]];if(!_0x5c4b1a)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x17b211['appCode']+_0x108d47(0x18f));const _0x2f16c5=_0x17b211['str']('target'),_0x3a272c=Object['keys'](_0x5c4b1a[_0x108d47(0x179)]),_0x432a58=resolveDeleteTarget(_0x2f16c5,_0x3a272c),_0x2fc9a5=_0x5c4b1a[_0x108d47(0x179)][_0x432a58];if(!_0x2fc9a5)throw CliErrors['validation']('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x432a58+'\x22.');await deleteBffScript(_0x2fc9a5[_0x108d47(0x197)]),delete _0x5c4b1a['functions'][_0x432a58],_0x5c4b1a[_0x108d47(0x186)]=new Date()[_0x108d47(0x194)](),await writeBffLockFile(_0x29f66a['lockFilePath'],_0x10f45b);const _0x19e886=resolveLocalFilePathFromLockKey(_0x29f66a,_0x432a58);let _0x199e59;await fileExists(_0x19e886)&&(_0x199e59=await moveToTrash(_0x29f66a['projectRoot'],_0x29f66a[_0x108d47(0x185)],_0x19e886),await cleanupEmptyDirectories(dirname(_0x19e886),_0x29f66a[_0x108d47(0x175)]));await waitForDeleteSettlement(_0x29f66a[_0x108d47(0x192)],_0x17b211[_0x108d47(0x171)],_0x432a58,_0x19e886),await sleep(0x96);const _0x22861b={'deleted':_0x432a58,'remoteId':_0x2fc9a5[_0x108d47(0x197)]};if(_0x199e59)_0x22861b[_0x108d47(0x174)]=_0x199e59;return{'ok':!![],'data':_0x22861b,'message':_0x108d47(0x18e)+_0x432a58+(_0x199e59?_0x108d47(0x191):'')};}};function resolveDeleteTarget(_0x330855,_0x8a0b1f){const _0x3a7849=a32_0xea5732;if(_0x330855[_0x3a7849(0x16f)]('/')){const _0x439e1c=_0x8a0b1f[_0x3a7849(0x182)](_0x192da3=>_0x192da3===_0x330855);if(!_0x439e1c)throw CliErrors['validation'](_0x3a7849(0x176)+_0x330855);return _0x439e1c;}const _0x4b1c27=_0x8a0b1f[_0x3a7849(0x16e)](_0x2da25d=>_0x2da25d[_0x3a7849(0x17c)]('/')['at'](-0x1)===_0x330855);if(_0x4b1c27[_0x3a7849(0x188)]===0x0)throw CliErrors['validation'](_0x3a7849(0x176)+_0x330855);if(_0x4b1c27[_0x3a7849(0x188)]>0x1)throw CliErrors[_0x3a7849(0x170)](_0x3a7849(0x17b)+_0x330855+_0x3a7849(0x183)+_0x4b1c27['map'](_0x24f154=>_0x3a7849(0x19e)+_0x24f154)[_0x3a7849(0x189)]('\x0a'));return _0x4b1c27[0x0];}async function moveToTrash(_0x26e791,_0x2ab08f,_0x15b0fb){const _0x4bf0f5=a32_0xea5732,_0x265cc4=new Date()[_0x4bf0f5(0x194)]()['replace'](/[:.]/g,'-'),_0xb4a3ba=relative(_0x26e791,_0x15b0fb),_0x41a2de=join(_0x2ab08f,_0x265cc4,_0xb4a3ba);return await mkdir(dirname(_0x41a2de),{'recursive':!![]}),await rename(_0x15b0fb,_0x41a2de),_0x41a2de;}async function cleanupEmptyDirectories(_0x822ff1,_0x30d76b){const _0x3ef7e0=a32_0xea5732;let _0x203171=resolve(_0x822ff1);const _0x2593c5=resolve(_0x30d76b);while(_0x203171['startsWith'](''+_0x2593c5+sep)||_0x203171===_0x2593c5){if(_0x203171===_0x2593c5)return;try{const _0x5534fc=await readdir(_0x203171);if(_0x5534fc[_0x3ef7e0(0x188)]>0x0)return;await rmdir(_0x203171);}catch{return;}_0x203171=dirname(_0x203171);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x32f240,_0x24678c,_0x2e7160,_0x4485b4){const _0x5c4803=a32_0xea5732;for(let _0x7780d2=0x0;_0x7780d2<DELETE_SETTLE_RETRY_COUNT;_0x7780d2+=0x1){const _0x30dc08=await readBffLockFile(_0x32f240),_0x64dac1=!!_0x30dc08?.[_0x5c4803(0x18b)]?.[_0x24678c]?.[_0x5c4803(0x179)]?.[_0x2e7160],_0x10efe4=await fileExists(_0x4485b4);if(!_0x64dac1&&!_0x10efe4)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x5c4803(0x18a)+_0x2e7160+'.');}
@@ -1 +1 @@
1
- const a33_0x107dfa=a33_0x11f4;function a33_0x11f4(_0x18821b,_0x1cbc2f){_0x18821b=_0x18821b-0x1e2;const _0x8a63cc=a33_0x8a63();let _0x11f43a=_0x8a63cc[_0x18821b];return _0x11f43a;}(function(_0x19d9d6,_0x5adf95){const _0x139123=a33_0x11f4,_0x1a84b5=_0x19d9d6();while(!![]){try{const _0x29c350=-parseInt(_0x139123(0x1f1))/0x1+-parseInt(_0x139123(0x1f0))/0x2*(parseInt(_0x139123(0x1f3))/0x3)+parseInt(_0x139123(0x1e2))/0x4*(-parseInt(_0x139123(0x1ec))/0x5)+parseInt(_0x139123(0x1ed))/0x6+-parseInt(_0x139123(0x1f5))/0x7+parseInt(_0x139123(0x1eb))/0x8*(-parseInt(_0x139123(0x1f8))/0x9)+-parseInt(_0x139123(0x1ea))/0xa*(-parseInt(_0x139123(0x1e5))/0xb);if(_0x29c350===_0x5adf95)break;else _0x1a84b5['push'](_0x1a84b5['shift']());}catch(_0x1de2dc){_0x1a84b5['push'](_0x1a84b5['shift']());}}}(a33_0x8a63,0xa1937));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x107dfa(0x1fa),'command':'detail','description':a33_0x107dfa(0x1e6),'risk':a33_0x107dfa(0x1e9),'flags':[{'name':'id','type':'number','required':!![],'description':a33_0x107dfa(0x1e7)},{'name':a33_0x107dfa(0x1f9),'type':a33_0x107dfa(0x1ee),'description':a33_0x107dfa(0x1f4)}],async 'execute'(_0x4515de){const _0x2cda50=a33_0x107dfa,_0x1797d1=await getBffScriptInfo(_0x4515de[_0x2cda50(0x1ef)]('id')),_0x5794ba=_0x4515de['bool'](_0x2cda50(0x1f9));if(_0x5794ba)return{'ok':!![],'data':_0x1797d1};return{'ok':!![],'data':{'id':_0x1797d1['id'],'functionName':_0x1797d1[_0x2cda50(0x1f2)]??'','version':_0x1797d1[_0x2cda50(0x1e4)]??'','updateUserName':_0x1797d1['updateUserName']??'','appCode':_0x1797d1['appCode'],'scriptType':_0x1797d1[_0x2cda50(0x1f7)],'description':_0x1797d1['description']||'(none)','createdTime':_0x1797d1[_0x2cda50(0x1f6)]??'','updatedTime':_0x1797d1[_0x2cda50(0x1e8)]??'','scriptContent':_0x1797d1[_0x2cda50(0x1e3)]??''}};}};function a33_0x8a63(){const _0x53913f=['scriptType','108jVYIji','verbose','bff','772orCykL','scriptContent','version','14233538hCsvKF','Get\x20Backend\x20Function\x20script\x20details\x20by\x20ID','Script\x20ID','updatedTime','read','40JDcXVv','841296XxxcNo','4505FKBMkU','687606RgxJlV','boolean','num','102724YlgYiG','1159634HGtfVh','functionName','66jpeszr','Return\x20full\x20raw\x20script\x20object','6322281eqqJtP','createdTime'];a33_0x8a63=function(){return _0x53913f;};return a33_0x8a63();}
1
+ function a33_0x5792(){const _0x574f59=['12Mczzpq','updateUserName','verbose','version','Return\x20full\x20raw\x20script\x20object','updatedTime','35922qvJEGr','1201264NUiOOJ','1052412uXJKJb','detail','9ooXLNU','Script\x20ID','scriptType','functionName','createdTime','appCode','bool','(none)','7028zpHLox','1458356MyuyWE','88459030WENLWr','bff','10544NbHYXN','number','18120730wkkSdZ','715fXXwgC','boolean','description','scriptContent','num'];a33_0x5792=function(){return _0x574f59;};return a33_0x5792();}function a33_0x4bcc(_0x293709,_0x1ff2ce){_0x293709=_0x293709-0x70;const _0x579214=a33_0x5792();let _0x4bcc9d=_0x579214[_0x293709];return _0x4bcc9d;}const a33_0x461af3=a33_0x4bcc;(function(_0x229120,_0x93c7a1){const _0x28b019=a33_0x4bcc,_0x56013a=_0x229120();while(!![]){try{const _0x22c018=-parseInt(_0x28b019(0x78))/0x1+-parseInt(_0x28b019(0x77))/0x2+parseInt(_0x28b019(0x70))/0x3*(-parseInt(_0x28b019(0x83))/0x4)+-parseInt(_0x28b019(0x89))/0x5*(parseInt(_0x28b019(0x76))/0x6)+parseInt(_0x28b019(0x82))/0x7*(-parseInt(_0x28b019(0x86))/0x8)+-parseInt(_0x28b019(0x7a))/0x9*(parseInt(_0x28b019(0x88))/0xa)+parseInt(_0x28b019(0x84))/0xb;if(_0x22c018===_0x93c7a1)break;else _0x56013a['push'](_0x56013a['shift']());}catch(_0x4edc96){_0x56013a['push'](_0x56013a['shift']());}}}(a33_0x5792,0xe535c));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x461af3(0x85),'command':a33_0x461af3(0x79),'description':'Get\x20Backend\x20Function\x20script\x20details\x20by\x20ID','risk':'read','flags':[{'name':'id','type':a33_0x461af3(0x87),'required':!![],'description':a33_0x461af3(0x7b)},{'name':a33_0x461af3(0x72),'type':a33_0x461af3(0x8a),'description':a33_0x461af3(0x74)}],async 'execute'(_0x4174b7){const _0x238a6e=a33_0x461af3,_0x2fa001=await getBffScriptInfo(_0x4174b7[_0x238a6e(0x8d)]('id')),_0x30eb08=_0x4174b7[_0x238a6e(0x80)](_0x238a6e(0x72));if(_0x30eb08)return{'ok':!![],'data':_0x2fa001};return{'ok':!![],'data':{'id':_0x2fa001['id'],'functionName':_0x2fa001[_0x238a6e(0x7d)]??'','version':_0x2fa001[_0x238a6e(0x73)]??'','updateUserName':_0x2fa001[_0x238a6e(0x71)]??'','appCode':_0x2fa001[_0x238a6e(0x7f)],'scriptType':_0x2fa001[_0x238a6e(0x7c)],'description':_0x2fa001[_0x238a6e(0x8b)]||_0x238a6e(0x81),'createdTime':_0x2fa001[_0x238a6e(0x7e)]??'','updatedTime':_0x2fa001[_0x238a6e(0x75)]??'','scriptContent':_0x2fa001[_0x238a6e(0x8c)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x33fab5,_0x576cad){const _0x1e2853=a34_0x2e47,_0x284de9=_0x33fab5();while(!![]){try{const _0x5288c6=-parseInt(_0x1e2853(0x1cc))/0x1*(-parseInt(_0x1e2853(0x1cb))/0x2)+-parseInt(_0x1e2853(0x1ce))/0x3*(-parseInt(_0x1e2853(0x1c5))/0x4)+parseInt(_0x1e2853(0x1cd))/0x5*(parseInt(_0x1e2853(0x1c7))/0x6)+-parseInt(_0x1e2853(0x1c9))/0x7*(-parseInt(_0x1e2853(0x1ca))/0x8)+parseInt(_0x1e2853(0x1cf))/0x9+parseInt(_0x1e2853(0x1c6))/0xa+-parseInt(_0x1e2853(0x1c8))/0xb;if(_0x5288c6===_0x576cad)break;else _0x284de9['push'](_0x284de9['shift']());}catch(_0x1e12d1){_0x284de9['push'](_0x284de9['shift']());}}}(a34_0x2586,0x4072b));import{bffList}from'../../commands/bff/list.js';function a34_0x2586(){const _0x2088db=['89925rrmvNl','1341009HLdxVl','2797317fCNIGK','4EBHmhA','3061400qFPlZn','144BHHwgL','20474454xdfwTw','56cCgEcn','255560ifGEoy','748274mEfmdi','1XsFsvc'];a34_0x2586=function(){return _0x2088db;};return a34_0x2586();}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_0x2e47(_0x27eadb,_0x5a00a1){_0x27eadb=_0x27eadb-0x1c5;const _0x2586fa=a34_0x2586();let _0x2e472c=_0x2586fa[_0x27eadb];return _0x2e472c;}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ function a34_0x4ce2(){const _0x547829=['8sXQYCG','57180YXvSLm','1021194MjvqCk','7CxcUGg','35nKOmNX','46359uRuBIR','429436Gkdnpr','868248dhTMKB','45658WQwrdy','407yVRodk','38492IGlTzt'];a34_0x4ce2=function(){return _0x547829;};return a34_0x4ce2();}(function(_0x107abc,_0x5cc6ea){const _0x421d60=a34_0x2884,_0x5992cc=_0x107abc();while(!![]){try{const _0xa995d7=parseInt(_0x421d60(0x189))/0x1*(-parseInt(_0x421d60(0x18e))/0x2)+parseInt(_0x421d60(0x18b))/0x3+parseInt(_0x421d60(0x185))/0x4*(parseInt(_0x421d60(0x18a))/0x5)+parseInt(_0x421d60(0x18d))/0x6+-parseInt(_0x421d60(0x18c))/0x7+parseInt(_0x421d60(0x186))/0x8*(-parseInt(_0x421d60(0x188))/0x9)+parseInt(_0x421d60(0x187))/0xa*(parseInt(_0x421d60(0x18f))/0xb);if(_0xa995d7===_0x5cc6ea)break;else _0x5992cc['push'](_0x5992cc['shift']());}catch(_0x537145){_0x5992cc['push'](_0x5992cc['shift']());}}}(a34_0x4ce2,0x19817));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';function a34_0x2884(_0x417639,_0x1850be){_0x417639=_0x417639-0x185;const _0x4ce2fa=a34_0x4ce2();let _0x288471=_0x4ce2fa[_0x417639];return _0x288471;}import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];