@lovrabet/rabetbase-cli 2.4.5-beta.1 → 2.4.5

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 (292) 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/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/shared.js +1 -1
  109. package/lib/commands/kb/update.js +1 -1
  110. package/lib/commands/logs/index.js +1 -1
  111. package/lib/commands/menu/asset-update.js +1 -1
  112. package/lib/commands/menu/delete.js +1 -1
  113. package/lib/commands/menu/external-link-create.js +1 -1
  114. package/lib/commands/menu/external-link-update.js +1 -1
  115. package/lib/commands/menu/group-create.js +1 -1
  116. package/lib/commands/menu/group-update.js +1 -1
  117. package/lib/commands/menu/index.js +1 -1
  118. package/lib/commands/menu/list.js +1 -1
  119. package/lib/commands/menu/move.js +1 -1
  120. package/lib/commands/menu/regroup-start.js +1 -1
  121. package/lib/commands/menu/rename.js +1 -1
  122. package/lib/commands/menu/shared/compare-table.js +1 -1
  123. package/lib/commands/menu/shared/delete-plan.js +1 -1
  124. package/lib/commands/menu/shared/facts.js +1 -1
  125. package/lib/commands/menu/shared/index.js +1 -1
  126. package/lib/commands/menu/shared/inquirer.js +1 -1
  127. package/lib/commands/menu/shared/local-pages.js +1 -1
  128. package/lib/commands/menu/shared/logic.js +1 -1
  129. package/lib/commands/menu/shared/mutations.js +1 -1
  130. package/lib/commands/menu/shared/service.js +1 -1
  131. package/lib/commands/menu/shared/sync-core.js +1 -1
  132. package/lib/commands/menu/shared/update-core.js +1 -1
  133. package/lib/commands/menu/shared/valid-url.js +1 -1
  134. package/lib/commands/menu/sync.js +1 -1
  135. package/lib/commands/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/generate-start.js +1 -1
  143. package/lib/commands/page/generate-status.js +1 -1
  144. package/lib/commands/page/index.js +1 -1
  145. package/lib/commands/page/pull.js +1 -1
  146. package/lib/commands/page/push.js +1 -1
  147. package/lib/commands/page/react/create.js +1 -1
  148. package/lib/commands/page/react/detail.js +1 -1
  149. package/lib/commands/page/react/list.js +1 -1
  150. package/lib/commands/page/react/publish.js +1 -1
  151. package/lib/commands/page/react/shared.js +1 -1
  152. package/lib/commands/page/react/syntax.js +1 -1
  153. package/lib/commands/page/react/template.js +1 -1
  154. package/lib/commands/page/react/update.js +1 -1
  155. package/lib/commands/page/relation-audit.js +1 -1
  156. package/lib/commands/page/restore.js +1 -1
  157. package/lib/commands/page/shared.js +1 -1
  158. package/lib/commands/page/standard-page-status.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/schema.js +1 -1
  206. package/lib/constant/cdn.js +1 -1
  207. package/lib/constant/cli.js +1 -1
  208. package/lib/constant/defaults.js +1 -1
  209. package/lib/constant/domain.js +1 -1
  210. package/lib/constant/env.js +1 -1
  211. package/lib/constant/output.js +1 -1
  212. package/lib/constant/paths.js +1 -1
  213. package/lib/constant/risk.js +1 -1
  214. package/lib/context/app-resolver.js +1 -1
  215. package/lib/context/auth-resolver.js +1 -1
  216. package/lib/context/config-loader.js +1 -1
  217. package/lib/context.js +1 -1
  218. package/lib/core/alias-resolver.js +1 -1
  219. package/lib/core/api-client.js +1 -1
  220. package/lib/core/bff/config.js +1 -1
  221. package/lib/core/bff/file-system.js +1 -1
  222. package/lib/core/bff/hash.js +1 -1
  223. package/lib/core/bff/lock.js +1 -1
  224. package/lib/core/bff/utils.js +1 -1
  225. package/lib/core/db-resolver.js +1 -1
  226. package/lib/core/page/file-system.js +1 -1
  227. package/lib/core/page/hash.js +1 -1
  228. package/lib/core/page/lock.js +1 -1
  229. package/lib/core/sql-index-auditor.js +1 -1
  230. package/lib/core/sql-sync/config.js +1 -1
  231. package/lib/core/sql-sync/file-system.js +1 -1
  232. package/lib/core/sql-sync/hash.js +1 -1
  233. package/lib/core/sql-sync/lock.js +1 -1
  234. package/lib/core/sql-sync/utils.js +1 -1
  235. package/lib/core/sql-validator.js +1 -1
  236. package/lib/errors.js +1 -1
  237. package/lib/framework/build-all-flags.js +1 -1
  238. package/lib/framework/error-output.js +1 -1
  239. package/lib/framework/explicit-yes.js +1 -1
  240. package/lib/framework/flags.js +1 -1
  241. package/lib/framework/help.js +1 -1
  242. package/lib/framework/index.js +1 -1
  243. package/lib/framework/output.js +1 -1
  244. package/lib/framework/response.js +1 -1
  245. package/lib/framework/runner-alias.js +1 -1
  246. package/lib/framework/runner.js +1 -1
  247. package/lib/framework/schema-export.js +1 -1
  248. package/lib/framework/types.js +1 -1
  249. package/lib/generated/build-info.d.ts +4 -4
  250. package/lib/generated/build-info.js +1 -1
  251. package/lib/help.js +1 -1
  252. package/lib/postinstall.js +1 -1
  253. package/lib/runtime/confirmation.js +1 -1
  254. package/lib/runtime/event.js +1 -1
  255. package/lib/runtime/index.js +1 -1
  256. package/lib/runtime/queue.js +1 -1
  257. package/lib/runtime/resolve.js +1 -1
  258. package/lib/skills/builtin-skill.js +1 -1
  259. package/lib/skills/main.js +1 -1
  260. package/lib/skills/npx-skills-add.js +1 -1
  261. package/lib/skills/skill-presence.js +1 -1
  262. package/lib/telemetry/cli-command-trace.js +1 -1
  263. package/lib/telemetry/cli-help-trace.js +1 -1
  264. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  265. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  266. package/lib/telemetry/send-cli-trace-log.js +1 -1
  267. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  268. package/lib/utils/ai_config.js +1 -1
  269. package/lib/utils/apply-jq-filter.js +1 -1
  270. package/lib/utils/cdn-config.js +1 -1
  271. package/lib/utils/check-sdk-version.js +1 -1
  272. package/lib/utils/cli-version-check.js +1 -1
  273. package/lib/utils/cli-version-policy.js +1 -1
  274. package/lib/utils/config.js +1 -1
  275. package/lib/utils/entity-with-id.js +1 -1
  276. package/lib/utils/file-utils.js +1 -1
  277. package/lib/utils/guides-cdn.js +1 -1
  278. package/lib/utils/http-client.js +1 -1
  279. package/lib/utils/is-non-interactive.js +1 -1
  280. package/lib/utils/logger.js +1 -1
  281. package/lib/utils/params.js +1 -1
  282. package/lib/utils/platform.js +1 -1
  283. package/lib/utils/rules-cdn.js +1 -1
  284. package/lib/utils/sleep.js +1 -1
  285. package/lib/utils/template-replacer.js +1 -1
  286. package/lib/utils/update-notice.js +1 -1
  287. package/lib/utils/version.js +1 -1
  288. package/lib/utils/with-active-cookie.js +1 -1
  289. package/lib/utils/write-cli-side-channel.js +1 -1
  290. package/package.json +1 -1
  291. package/skills/rabetbase/SKILL.md +1 -1
  292. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a19_0x11c1ef=a19_0x2cb4;(function(_0xe1a10d,_0x4dbb6e){const _0x61f4f7=a19_0x2cb4,_0x36393c=_0xe1a10d();while(!![]){try{const _0xe0048=-parseInt(_0x61f4f7(0x196))/0x1*(parseInt(_0x61f4f7(0x187))/0x2)+-parseInt(_0x61f4f7(0x188))/0x3*(parseInt(_0x61f4f7(0x190))/0x4)+-parseInt(_0x61f4f7(0x194))/0x5*(parseInt(_0x61f4f7(0x17a))/0x6)+-parseInt(_0x61f4f7(0x171))/0x7+parseInt(_0x61f4f7(0x179))/0x8*(parseInt(_0x61f4f7(0x173))/0x9)+parseInt(_0x61f4f7(0x18d))/0xa*(parseInt(_0x61f4f7(0x189))/0xb)+-parseInt(_0x61f4f7(0x17c))/0xc*(-parseInt(_0x61f4f7(0x18f))/0xd);if(_0xe0048===_0x4dbb6e)break;else _0x36393c['push'](_0x36393c['shift']());}catch(_0x51e2c7){_0x36393c['push'](_0x36393c['shift']());}}}(a19_0x545e,0x54fff));function a19_0x2cb4(_0xaf6183,_0x12891f){_0xaf6183=_0xaf6183-0x167;const _0x545ed5=a19_0x545e();let _0x2cb407=_0x545ed5[_0xaf6183];return _0x2cb407;}import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';function a19_0x545e(){const _0x34de31=['\x20in\x20','appcode','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','isCurrent','apps','map','optional','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','325774qjNuwd','9dWKrTM','110mXXjgX','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','globalPath','projectPath','636330mGWhxC','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','101894RNiqUR','794588CKdFgZ','length','read','validation','330425GIlTzX','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','1RnYeoT','app','remote','bool','.\x20Use\x20`','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','globalConfig','defaultApp','entries','object','mergedCli','1496264iorvln','boolean','1683rlmWJL','inherit','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','list','projectConfig','project','5288QPfESw','48pdcBGs','global','1668zZDYeW','\x20config','merged'];a19_0x545e=function(){return _0x34de31;};return a19_0x545e();}import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0xc158b8,_0x3d005d){const _0x2cd5d4=a19_0x2cb4,_0x4ba522=[],_0x2c1d02=_0xc158b8['apps']&&typeof _0xc158b8[_0x2cd5d4(0x183)]===_0x2cd5d4(0x16f)?_0xc158b8[_0x2cd5d4(0x183)]:{},_0x46d780=_0xc158b8[_0x2cd5d4(0x16d)]||undefined;for(const [_0x128bac,_0x4688f9]of Object[_0x2cd5d4(0x16e)](_0x2c1d02)){if(!_0x4688f9||typeof _0x4688f9!=='object'||!_0x4688f9[_0x2cd5d4(0x180)])continue;_0x4ba522['push']({'name':_0x128bac,'appcode':_0x4688f9[_0x2cd5d4(0x180)],'named':!![],'definedIn':_0x3d005d,'isDefault':_0x128bac===_0x46d780,...buildAppProfileListFields(_0x4688f9)});}return _0x4ba522;}function buildMergedItems(_0x528ddd,_0x456283){const _0x4a6224=a19_0x2cb4,{apps:apps={},defaultApp:_0x50ddb1}=_0x528ddd,_0x270373=_0x456283['globalConfig'][_0x4a6224(0x183)]&&typeof _0x456283[_0x4a6224(0x16c)][_0x4a6224(0x183)]===_0x4a6224(0x16f)?_0x456283[_0x4a6224(0x16c)][_0x4a6224(0x183)]:{},_0x3c0fd3=_0x456283['projectConfig'][_0x4a6224(0x183)]&&typeof _0x456283[_0x4a6224(0x177)][_0x4a6224(0x183)]===_0x4a6224(0x16f)?_0x456283[_0x4a6224(0x177)][_0x4a6224(0x183)]:{},_0x3def44=_0x456283[_0x4a6224(0x177)][_0x4a6224(0x174)]===![],_0x1b9ab0=Object[_0x4a6224(0x16e)](apps),_0x21300e=_0x1b9ab0[_0x4a6224(0x184)](([_0x4a7735,_0x39609d])=>({'name':_0x4a7735,'appcode':_0x39609d[_0x4a6224(0x180)],'named':!![],'definedIn':appDefinedIn(_0x4a7735,_0x270373,_0x3c0fd3,_0x3def44),'isDefault':_0x4a7735===_0x50ddb1,...buildAppProfileListFields(_0x39609d)}));return _0x21300e;}function validateAppListFlags(_0x34642f){const _0x5514aa=a19_0x2cb4;if(!_0x34642f[_0x5514aa(0x169)](_0x5514aa(0x168)))return;if(!_0x34642f[_0x5514aa(0x169)](_0x5514aa(0x17b))&&!_0x34642f[_0x5514aa(0x169)](_0x5514aa(0x178)))return;throw CliErrors[_0x5514aa(0x193)](_0x5514aa(0x175),_0x5514aa(0x186));}async function execute(_0x389b3f){const _0x17cb7e=a19_0x2cb4;validateAppListFlags(_0x389b3f);if(_0x389b3f[_0x17cb7e(0x169)](_0x17cb7e(0x168)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x389b3f)};const _0x540750=_0x389b3f[_0x17cb7e(0x169)]('global'),_0x5bdb40=_0x389b3f[_0x17cb7e(0x169)](_0x17cb7e(0x178)),_0x7a439c=_0x540750?_0x17cb7e(0x17b):_0x5bdb40?_0x17cb7e(0x178):_0x17cb7e(0x17e),{config:_0x10af6f,layers:_0x380c6a}=readRawConfigWithLayers(),_0x3ded8d=resolveDefaultAppSource(_0x380c6a),{defaultApp:_0x55676c}=_0x10af6f;let _0x5eb30c,_0x322a46;switch(_0x7a439c){case _0x17cb7e(0x17b):_0x5eb30c=buildItemsFromLayer(_0x380c6a[_0x17cb7e(0x16c)],_0x17cb7e(0x17b)),_0x322a46=_0x380c6a[_0x17cb7e(0x18b)];break;case'project':_0x5eb30c=buildItemsFromLayer(_0x380c6a[_0x17cb7e(0x177)],_0x17cb7e(0x178)),_0x322a46=_0x380c6a[_0x17cb7e(0x18c)];break;default:_0x5eb30c=buildMergedItems(_0x10af6f,_0x380c6a);break;}enrichAppListItemsWithMergedSelection(_0x5eb30c,_0x389b3f[_0x17cb7e(0x170)]);if(_0x5eb30c[_0x17cb7e(0x191)]===0x0){const _0x1a4a9f=_0x7a439c===_0x17cb7e(0x17e)?'':_0x17cb7e(0x17f)+_0x7a439c+_0x17cb7e(0x17d);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x1a4a9f+_0x17cb7e(0x16a)+CLI_BIN_NAME+_0x17cb7e(0x195)};}const _0x120d7d=_0x5eb30c['find'](_0x186bfa=>_0x186bfa[_0x17cb7e(0x182)]===!![]),_0x197390=_0x55676c??_0x120d7d?.['appcode']??null,_0x1046b4=_0x7a439c==='merged'?{'globalPath':_0x380c6a['globalPath']??null,'projectPath':_0x380c6a['projectPath']??null,'defaultApp':_0x197390,'defaultAppSource':_0x55676c!=null?_0x3ded8d:null}:{'scope':_0x7a439c,'configPath':_0x322a46??null};return{'ok':!![],'data':{'items':_0x5eb30c,'meta':_0x1046b4}};}export const appListDefinition={'service':a19_0x11c1ef(0x167),'command':a19_0x11c1ef(0x176),'description':a19_0x11c1ef(0x181),'risk':a19_0x11c1ef(0x192),'auth':a19_0x11c1ef(0x185),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a19_0x11c1ef(0x168),'type':'boolean','description':a19_0x11c1ef(0x18e),'default':![]},{'name':a19_0x11c1ef(0x17b),'type':a19_0x11c1ef(0x172),'description':a19_0x11c1ef(0x16b),'default':![]},{'name':a19_0x11c1ef(0x178),'type':a19_0x11c1ef(0x172),'description':a19_0x11c1ef(0x18a),'default':![]}],async 'validate'(_0x8d1b6a){validateAppListFlags(_0x8d1b6a);},'execute':execute};
1
+ const a19_0x1ef661=a19_0x1f09;(function(_0x3cd1fd,_0x3c87a3){const _0x56ff29=a19_0x1f09,_0x360d9d=_0x3cd1fd();while(!![]){try{const _0x15f783=-parseInt(_0x56ff29(0xa9))/0x1*(-parseInt(_0x56ff29(0xb7))/0x2)+parseInt(_0x56ff29(0x97))/0x3+parseInt(_0x56ff29(0xb9))/0x4*(-parseInt(_0x56ff29(0xba))/0x5)+-parseInt(_0x56ff29(0x9a))/0x6+-parseInt(_0x56ff29(0xb1))/0x7+-parseInt(_0x56ff29(0xb5))/0x8+-parseInt(_0x56ff29(0x99))/0x9*(-parseInt(_0x56ff29(0xa5))/0xa);if(_0x15f783===_0x3c87a3)break;else _0x360d9d['push'](_0x360d9d['shift']());}catch(_0x3004ae){_0x360d9d['push'](_0x360d9d['shift']());}}}(a19_0x49b4,0x8f443));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(_0x2b179a,_0xb87c44){const _0x115113=a19_0x1f09,_0x276ac4=[],_0x16d103=_0x2b179a['apps']&&typeof _0x2b179a[_0x115113(0xaf)]===_0x115113(0xa2)?_0x2b179a[_0x115113(0xaf)]:{},_0x529354=_0x2b179a[_0x115113(0xac)]||undefined;for(const [_0x906259,_0xa58c72]of Object[_0x115113(0xa8)](_0x16d103)){if(!_0xa58c72||typeof _0xa58c72!==_0x115113(0xa2)||!_0xa58c72[_0x115113(0xb0)])continue;_0x276ac4[_0x115113(0x9c)]({'name':_0x906259,'appcode':_0xa58c72['appcode'],'named':!![],'definedIn':_0xb87c44,'isDefault':_0x906259===_0x529354,...buildAppProfileListFields(_0xa58c72)});}return _0x276ac4;}function buildMergedItems(_0x4cd62c,_0x5d4e9a){const _0x1860ce=a19_0x1f09,{apps:apps={},defaultApp:_0x5d6f64}=_0x4cd62c,_0x14ffc2=_0x5d4e9a[_0x1860ce(0xb4)][_0x1860ce(0xaf)]&&typeof _0x5d4e9a[_0x1860ce(0xb4)][_0x1860ce(0xaf)]===_0x1860ce(0xa2)?_0x5d4e9a[_0x1860ce(0xb4)][_0x1860ce(0xaf)]:{},_0x49f55a=_0x5d4e9a['projectConfig'][_0x1860ce(0xaf)]&&typeof _0x5d4e9a['projectConfig'][_0x1860ce(0xaf)]===_0x1860ce(0xa2)?_0x5d4e9a['projectConfig'][_0x1860ce(0xaf)]:{},_0x5a519b=_0x5d4e9a[_0x1860ce(0x98)]['inherit']===![],_0x476291=Object['entries'](apps),_0x52b658=_0x476291[_0x1860ce(0xa4)](([_0x41ca8a,_0x4c3687])=>({'name':_0x41ca8a,'appcode':_0x4c3687[_0x1860ce(0xb0)],'named':!![],'definedIn':appDefinedIn(_0x41ca8a,_0x14ffc2,_0x49f55a,_0x5a519b),'isDefault':_0x41ca8a===_0x5d6f64,...buildAppProfileListFields(_0x4c3687)}));return _0x52b658;}function a19_0x1f09(_0x10f39d,_0x280aac){_0x10f39d=_0x10f39d-0x95;const _0x49b437=a19_0x49b4();let _0x1f0902=_0x49b437[_0x10f39d];return _0x1f0902;}function validateAppListFlags(_0x4c18c2){const _0x4a5e16=a19_0x1f09;if(!_0x4c18c2[_0x4a5e16(0x9f)](_0x4a5e16(0xbb)))return;if(!_0x4c18c2[_0x4a5e16(0x9f)](_0x4a5e16(0xa1))&&!_0x4c18c2[_0x4a5e16(0x9f)](_0x4a5e16(0xb6)))return;throw CliErrors[_0x4a5e16(0xae)](_0x4a5e16(0xb8),'Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.');}function a19_0x49b4(){const _0x4a3bf9=['globalConfig','1559408qvEjEC','project','6vusRIQ','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','44rDNMZi','475205YDOhII','remote','list','boolean','globalPath','1055538HcmFsO','projectConfig','21267RHsMFi','1578222NyaDYT','.\x20Use\x20`','push','No\x20apps\x20configured','\x20config','bool','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','global','object','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','map','3530mzwSjx','isCurrent','find','entries','362430VVJZpS','optional','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','defaultApp','merged','validation','apps','appcode','1281294HlcdGT','mergedCli','\x20in\x20'];a19_0x49b4=function(){return _0x4a3bf9;};return a19_0x49b4();}async function execute(_0x505d10){const _0x3de357=a19_0x1f09;validateAppListFlags(_0x505d10);if(_0x505d10[_0x3de357(0x9f)](_0x3de357(0xbb)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x505d10)};const _0x3fd5f5=_0x505d10[_0x3de357(0x9f)](_0x3de357(0xa1)),_0x2ee112=_0x505d10[_0x3de357(0x9f)](_0x3de357(0xb6)),_0xd6de3d=_0x3fd5f5?_0x3de357(0xa1):_0x2ee112?'project':'merged',{config:_0x33f6b6,layers:_0x309e71}=readRawConfigWithLayers(),_0x460c66=resolveDefaultAppSource(_0x309e71),{defaultApp:_0x346c35}=_0x33f6b6;let _0x35cbb1,_0x43e10e;switch(_0xd6de3d){case _0x3de357(0xa1):_0x35cbb1=buildItemsFromLayer(_0x309e71[_0x3de357(0xb4)],_0x3de357(0xa1)),_0x43e10e=_0x309e71[_0x3de357(0x96)];break;case _0x3de357(0xb6):_0x35cbb1=buildItemsFromLayer(_0x309e71[_0x3de357(0x98)],_0x3de357(0xb6)),_0x43e10e=_0x309e71['projectPath'];break;default:_0x35cbb1=buildMergedItems(_0x33f6b6,_0x309e71);break;}enrichAppListItemsWithMergedSelection(_0x35cbb1,_0x505d10[_0x3de357(0xb2)]);if(_0x35cbb1['length']===0x0){const _0x548338=_0xd6de3d===_0x3de357(0xad)?'':_0x3de357(0xb3)+_0xd6de3d+_0x3de357(0x9e);return{'ok':!![],'data':[],'message':_0x3de357(0x9d)+_0x548338+_0x3de357(0x9b)+CLI_BIN_NAME+'\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x4839a1=_0x35cbb1[_0x3de357(0xa7)](_0xb45e12=>_0xb45e12[_0x3de357(0xa6)]===!![]),_0x18bb6c=_0x346c35??_0x4839a1?.[_0x3de357(0xb0)]??null,_0x47c40d=_0xd6de3d===_0x3de357(0xad)?{'globalPath':_0x309e71[_0x3de357(0x96)]??null,'projectPath':_0x309e71['projectPath']??null,'defaultApp':_0x18bb6c,'defaultAppSource':_0x346c35!=null?_0x460c66:null}:{'scope':_0xd6de3d,'configPath':_0x43e10e??null};return{'ok':!![],'data':{'items':_0x35cbb1,'meta':_0x47c40d}};}export const appListDefinition={'service':'app','command':a19_0x1ef661(0xbc),'description':a19_0x1ef661(0xa3),'risk':'read','auth':a19_0x1ef661(0xaa),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a19_0x1ef661(0xbb),'type':'boolean','description':a19_0x1ef661(0xa0),'default':![]},{'name':a19_0x1ef661(0xa1),'type':a19_0x1ef661(0x95),'description':a19_0x1ef661(0xab),'default':![]},{'name':a19_0x1ef661(0xb6),'type':a19_0x1ef661(0x95),'description':'Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','default':![]}],async 'validate'(_0xa5bfea){validateAppListFlags(_0xa5bfea);},'execute':execute};
@@ -1 +1 @@
1
- const a20_0x5adedb=a20_0x2b5c;function a20_0x2b5c(_0x2e0f89,_0x4ac44e){_0x2e0f89=_0x2e0f89-0x149;const _0x456663=a20_0x4566();let _0x2b5c86=_0x456663[_0x2e0f89];return _0x2b5c86;}function a20_0x4566(){const _0x34242f=['3501546TTdUWo','168110noQaPp','7OHduSM','8xBrZRx','2487784gEhMPG','3709wVXMoq','appCode','Found\x20','length','List\x20application\x20members\x20with\x20their\x20role\x20memberships','374oOJCCa','8DpCrHN','2820955MTeJKI','72gntpCD','\x20application\x20member(s)','7586145eVMNnT','176fCIGOn','2204415IfnVEX','read','members-list'];a20_0x4566=function(){return _0x34242f;};return a20_0x4566();}(function(_0x5ef52e,_0x597c73){const _0xb2b539=a20_0x2b5c,_0x1c7f62=_0x5ef52e();while(!![]){try{const _0x2d693e=-parseInt(_0xb2b539(0x150))/0x1*(parseInt(_0xb2b539(0x155))/0x2)+parseInt(_0xb2b539(0x15c))/0x3+parseInt(_0xb2b539(0x156))/0x4*(parseInt(_0xb2b539(0x157))/0x5)+parseInt(_0xb2b539(0x14b))/0x6*(-parseInt(_0xb2b539(0x14d))/0x7)+-parseInt(_0xb2b539(0x14e))/0x8*(parseInt(_0xb2b539(0x15a))/0x9)+parseInt(_0xb2b539(0x14c))/0xa*(-parseInt(_0xb2b539(0x15b))/0xb)+parseInt(_0xb2b539(0x158))/0xc*(parseInt(_0xb2b539(0x14f))/0xd);if(_0x2d693e===_0x597c73)break;else _0x1c7f62['push'](_0x1c7f62['shift']());}catch(_0x1c13db){_0x1c7f62['push'](_0x1c7f62['shift']());}}}(a20_0x4566,0x97f04));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':'app','command':a20_0x5adedb(0x14a),'description':a20_0x5adedb(0x154),'risk':a20_0x5adedb(0x149),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5d3921){const _0x38dc4d=a20_0x5adedb,_0x36f960=projectAppMembers(await listRoleUsers(_0x5d3921['appCode']));return{'ok':!![],'data':{'appCode':_0x5d3921[_0x38dc4d(0x151)],'items':_0x36f960,'totalCount':_0x36f960['length']},'message':_0x38dc4d(0x152)+_0x36f960[_0x38dc4d(0x153)]+_0x38dc4d(0x159)};}};
1
+ function a20_0x35b4(){const _0x1ef832=['28029726HNgaVP','615344kJohEs','read','1997850DROTfT','app','414588UuNWcT','length','91yIYQaB','55972hEwfrF','\x20application\x20member(s)','Found\x20','2388530skPWUL','5496248gRJTGW','8DPlROy'];a20_0x35b4=function(){return _0x1ef832;};return a20_0x35b4();}const a20_0x327902=a20_0x3e8a;(function(_0x128eff,_0x277cd4){const _0x2afd55=a20_0x3e8a,_0x55e32a=_0x128eff();while(!![]){try{const _0xfdbbd=-parseInt(_0x2afd55(0x1af))/0x1+-parseInt(_0x2afd55(0x1b6))/0x2+parseInt(_0x2afd55(0x1b1))/0x3+parseInt(_0x2afd55(0x1ad))/0x4*(-parseInt(_0x2afd55(0x1ab))/0x5)+parseInt(_0x2afd55(0x1b3))/0x6*(-parseInt(_0x2afd55(0x1b5))/0x7)+-parseInt(_0x2afd55(0x1ac))/0x8+parseInt(_0x2afd55(0x1ae))/0x9;if(_0xfdbbd===_0x277cd4)break;else _0x55e32a['push'](_0x55e32a['shift']());}catch(_0x35af84){_0x55e32a['push'](_0x55e32a['shift']());}}}(a20_0x35b4,0x9195d));function a20_0x3e8a(_0x58dcc6,_0x5cf27e){_0x58dcc6=_0x58dcc6-0x1ab;const _0x35b46f=a20_0x35b4();let _0x3e8a1d=_0x35b46f[_0x58dcc6];return _0x3e8a1d;}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':a20_0x327902(0x1b2),'command':'members-list','description':'List\x20application\x20members\x20with\x20their\x20role\x20memberships','risk':a20_0x327902(0x1b0),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x6fa56d){const _0xf7e8f3=a20_0x327902,_0x423b8a=projectAppMembers(await listRoleUsers(_0x6fa56d['appCode']));return{'ok':!![],'data':{'appCode':_0x6fa56d['appCode'],'items':_0x423b8a,'totalCount':_0x423b8a[_0xf7e8f3(0x1b4)]},'message':_0xf7e8f3(0x1b8)+_0x423b8a['length']+_0xf7e8f3(0x1b7)};}};
@@ -1 +1 @@
1
- (function(_0x4b2613,_0x3821b2){const _0x18e4a1=a21_0x3f1c,_0xa6220f=_0x4b2613();while(!![]){try{const _0x275325=parseInt(_0x18e4a1(0x17f))/0x1+parseInt(_0x18e4a1(0x17b))/0x2+parseInt(_0x18e4a1(0x176))/0x3+-parseInt(_0x18e4a1(0x174))/0x4*(-parseInt(_0x18e4a1(0x179))/0x5)+parseInt(_0x18e4a1(0x17a))/0x6*(-parseInt(_0x18e4a1(0x173))/0x7)+parseInt(_0x18e4a1(0x177))/0x8*(-parseInt(_0x18e4a1(0x175))/0x9)+parseInt(_0x18e4a1(0x178))/0xa;if(_0x275325===_0x3821b2)break;else _0xa6220f['push'](_0xa6220f['shift']());}catch(_0x31d386){_0xa6220f['push'](_0xa6220f['shift']());}}}(a21_0xca1b,0x195d0));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';function a21_0x3f1c(_0x376c2a,_0x497f65){_0x376c2a=_0x376c2a-0x173;const _0xca1bd5=a21_0xca1b();let _0x3f1c39=_0xca1bd5[_0x376c2a];return _0x3f1c39;}import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x4d67a0){const _0x4f3e47=a21_0x3f1c,_0x3a7261=_0x4d67a0['cookie']||getCookie();if(!_0x3a7261)throw CliErrors[_0x4f3e47(0x17d)]();return _0x3a7261;}function a21_0xca1b(){const _0x5be47e=['platform','authRequired','appName','98735QrWYAi','184429ffFLIZ','4oYpwVJ','1853055lBNtqD','117552mmWiAF','8fuYxQb','2097320bRdOgO','561455EYYZpn','36eOPArY','15846pAocGA'];a21_0xca1b=function(){return _0x5be47e;};return a21_0xca1b();}export async function listRemoteAppDirectory(_0x329396){const _0x4415c7=a21_0x3f1c,_0x50ff74=await withActiveCookie(resolveCookie(_0x329396),()=>listRemoteApps());return{'items':_0x50ff74['map'](_0x28ca36=>({..._0x28ca36['id']!=null?{'id':_0x28ca36['id']}:{},'appCode':_0x28ca36['appCode'],'appName':_0x28ca36[_0x4415c7(0x17e)],..._0x28ca36['appDesc']!=null?{'appDesc':_0x28ca36['appDesc']}:{}})),'meta':{'source':_0x4415c7(0x17c)}};}
1
+ (function(_0x5f9c18,_0x1153ea){const _0xca7186=a21_0x3640,_0xc7a593=_0x5f9c18();while(!![]){try{const _0x455c37=-parseInt(_0xca7186(0x148))/0x1*(parseInt(_0xca7186(0x14e))/0x2)+parseInt(_0xca7186(0x14d))/0x3*(-parseInt(_0xca7186(0x149))/0x4)+parseInt(_0xca7186(0x150))/0x5*(parseInt(_0xca7186(0x156))/0x6)+-parseInt(_0xca7186(0x147))/0x7+-parseInt(_0xca7186(0x151))/0x8*(parseInt(_0xca7186(0x14a))/0x9)+parseInt(_0xca7186(0x154))/0xa+-parseInt(_0xca7186(0x14c))/0xb*(-parseInt(_0xca7186(0x14b))/0xc);if(_0x455c37===_0x1153ea)break;else _0xc7a593['push'](_0xc7a593['shift']());}catch(_0x4193de){_0xc7a593['push'](_0xc7a593['shift']());}}}(a21_0x1019,0x537e0));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a21_0x3640(_0x3dde91,_0x494dab){_0x3dde91=_0x3dde91-0x147;const _0x101971=a21_0x1019();let _0x36409c=_0x101971[_0x3dde91];return _0x36409c;}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x565a90){const _0x45e55b=a21_0x3640,_0x1933ed=_0x565a90[_0x45e55b(0x152)]||getCookie();if(!_0x1933ed)throw CliErrors['authRequired']();return _0x1933ed;}function a21_0x1019(){const _0x379e31=['appName','22818onLilD','2781702VMTrlE','62639YLOWGa','1592HbxVtN','282294xmYcBv','2112708XEGynt','77CmXfsg','4971oOOiHg','20wBFues','appDesc','665vfNvUo','56cORELm','cookie','map','5065960hhHrFA'];a21_0x1019=function(){return _0x379e31;};return a21_0x1019();}export async function listRemoteAppDirectory(_0x1c9dcc){const _0x4af972=a21_0x3640,_0x7d7942=await withActiveCookie(resolveCookie(_0x1c9dcc),()=>listRemoteApps());return{'items':_0x7d7942[_0x4af972(0x153)](_0x42d47c=>({..._0x42d47c['id']!=null?{'id':_0x42d47c['id']}:{},'appCode':_0x42d47c['appCode'],'appName':_0x42d47c[_0x4af972(0x155)],..._0x42d47c[_0x4af972(0x14f)]!=null?{'appDesc':_0x42d47c[_0x4af972(0x14f)]}:{}})),'meta':{'source':'platform'}};}
@@ -1 +1 @@
1
- function a22_0x4402(_0x2f2e26,_0x40d096){_0x2f2e26=_0x2f2e26-0xf7;const _0x16f454=a22_0x16f4();let _0x440240=_0x16f454[_0x2f2e26];return _0x440240;}(function(_0x1f95a7,_0xb3a689){const _0x474fd8=a22_0x4402,_0xf209b6=_0x1f95a7();while(!![]){try{const _0x37da0e=-parseInt(_0x474fd8(0x117))/0x1+-parseInt(_0x474fd8(0x127))/0x2+-parseInt(_0x474fd8(0x10a))/0x3+parseInt(_0x474fd8(0xfa))/0x4*(-parseInt(_0x474fd8(0xfe))/0x5)+parseInt(_0x474fd8(0x106))/0x6*(parseInt(_0x474fd8(0xf7))/0x7)+-parseInt(_0x474fd8(0x110))/0x8+-parseInt(_0x474fd8(0x10b))/0x9*(-parseInt(_0x474fd8(0x11d))/0xa);if(_0x37da0e===_0xb3a689)break;else _0xf209b6['push'](_0xf209b6['shift']());}catch(_0xe661da){_0xf209b6['push'](_0xf209b6['shift']());}}}(a22_0x16f4,0x45dca));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x352e12){const _0xd4f8d1=a22_0x4402,_0x4f683c=_0x352e12?.[_0xd4f8d1(0x125)]();return _0x4f683c?_0x4f683c:null;}export function projectAppMembers(_0xf12374){const _0x14022e=a22_0x4402,_0x56a4ee=new Map(),_0x22c629=[..._0xf12374][_0x14022e(0x121)]((_0x52b446,_0x35bc42)=>_0x52b446['id']-_0x35bc42['id']),_0xf87be5=(_0x164bb8,_0x4af243,_0x58b422)=>{const _0x5210c3=_0x14022e;for(const _0x577434 of _0x4af243){const _0x222ef2=Number(_0x577434[_0x5210c3(0x11e)]);if(!Number[_0x5210c3(0xff)](_0x222ef2)||_0x222ef2<=0x0)continue;let _0x56492a=_0x56a4ee[_0x5210c3(0x10c)](_0x222ef2);if(!_0x56492a)_0x56492a={'userId':_0x222ef2,'username':nullableText(_0x577434[_0x5210c3(0x123)]),'displayName':nullableText(_0x577434[_0x5210c3(0x10f)]),'status':_0x58b422,'roles':[],'roleKeys':new Set()},_0x56a4ee['set'](_0x222ef2,_0x56492a);else{_0x56492a[_0x5210c3(0x123)]??=nullableText(_0x577434['username']),_0x56492a['displayName']??=nullableText(_0x577434[_0x5210c3(0x10f)]);if(_0x58b422===_0x5210c3(0x111))_0x56492a['status']=_0x5210c3(0x111);}const _0x5e8f6f=_0x164bb8['id']+':'+_0x58b422;if(_0x56492a['roleKeys'][_0x5210c3(0x10e)](_0x5e8f6f))continue;_0x56492a[_0x5210c3(0xf9)][_0x5210c3(0x112)](_0x5e8f6f),_0x56492a[_0x5210c3(0x113)][_0x5210c3(0xfc)]({'roleId':_0x164bb8['id'],'roleName':nullableText(_0x164bb8[_0x5210c3(0x116)]),'roleType':nullableText(_0x164bb8[_0x5210c3(0x11c)]),'membershipStatus':_0x58b422});}};for(const _0x3c2a5c of _0x22c629){_0xf87be5(_0x3c2a5c,_0x3c2a5c[_0x14022e(0xf8)]??[],'ACTIVE'),_0xf87be5(_0x3c2a5c,_0x3c2a5c['applyUserList']??[],_0x14022e(0x128));}return[..._0x56a4ee[_0x14022e(0x119)]()][_0x14022e(0x10d)](_0x5441ea=>({'userId':_0x5441ea[_0x14022e(0x11e)],'username':_0x5441ea[_0x14022e(0x123)],'displayName':_0x5441ea[_0x14022e(0xfb)],'status':_0x5441ea[_0x14022e(0x101)],'roles':_0x5441ea['roles'][_0x14022e(0x121)]((_0x218108,_0x1458ef)=>_0x218108['roleId']-_0x1458ef['roleId']||(_0x218108[_0x14022e(0x107)]===_0x1458ef[_0x14022e(0x107)]?0x0:_0x218108['membershipStatus']===_0x14022e(0x111)?-0x1:0x1))}))[_0x14022e(0x121)]((_0x312bec,_0x4f3b9b)=>_0x312bec[_0x14022e(0x11e)]-_0x4f3b9b[_0x14022e(0x11e)]);}export function enrichAppListItemsWithMergedSelection(_0xd3fa48,_0xd39539){const _0x59bffc=a22_0x4402;if(!_0xd39539)return;const _0x13e716=_0xd39539[_0x59bffc(0x115)]&&typeof _0xd39539['apps']===_0x59bffc(0x108)?_0xd39539[_0x59bffc(0x115)]:{},_0x6f5777=Object[_0x59bffc(0x11b)](_0x13e716)[_0x59bffc(0x100)]>0x0;for(const _0x15122b of _0xd3fa48){_0x15122b['isCurrent']=![];}const _0x1f94c8=_0xd39539[_0x59bffc(0x109)]!=null?String(_0xd39539[_0x59bffc(0x109)])[_0x59bffc(0x125)]():'';if(_0x6f5777){const _0x1facac=_0xd39539[_0x59bffc(0x118)]??_0xd39539['defaultApp'];if(_0x1facac)for(const _0x2bf950 of _0xd3fa48){_0x2bf950[_0x59bffc(0x103)]===!![]&&_0x2bf950[_0x59bffc(0x114)]===_0x1facac&&(_0x2bf950['isCurrent']=!![]);}for(const _0x2d4b96 of _0xd3fa48){if(_0x2d4b96['named']!==![])continue;if(_0xd39539[_0x59bffc(0xfd)])continue;_0x1f94c8&&String(_0x2d4b96[_0x59bffc(0x122)]??'')[_0x59bffc(0x125)]()===_0x1f94c8&&(_0x2d4b96[_0x59bffc(0x129)]=!![]);}return;}if(!_0x1f94c8)return;for(const _0x1d76e0 of _0xd3fa48){String(_0x1d76e0[_0x59bffc(0x122)]??'')['trim']()===_0x1f94c8&&(_0x1d76e0[_0x59bffc(0x129)]=!![]);}}export function resolveAppScopeForWrite(_0x3ea42f,_0x18da67,_0x1302d9){const _0x2a5018=a22_0x4402;if(_0x18da67)return'global';const _0x11fa4a=_0x1302d9['projectConfig'][_0x2a5018(0x115)]&&typeof _0x1302d9[_0x2a5018(0x124)][_0x2a5018(0x115)]===_0x2a5018(0x108)?_0x1302d9[_0x2a5018(0x124)][_0x2a5018(0x115)]:{},_0x4f29ff=_0x1302d9[_0x2a5018(0x102)][_0x2a5018(0x115)]&&typeof _0x1302d9[_0x2a5018(0x102)]['apps']===_0x2a5018(0x108)?_0x1302d9[_0x2a5018(0x102)][_0x2a5018(0x115)]:{};if(Object[_0x2a5018(0x11a)][_0x2a5018(0x105)]['call'](_0x11fa4a,_0x3ea42f))return _0x2a5018(0x120);if(Object[_0x2a5018(0x11a)][_0x2a5018(0x105)][_0x2a5018(0x104)](_0x4f29ff,_0x3ea42f))return _0x2a5018(0x11f);return'project';}export function appDefinedIn(_0x2eddc9,_0x2297eb,_0x2a70fa,_0x41a691){const _0x4d43fb=a22_0x4402;if(_0x41a691)return Object['prototype'][_0x4d43fb(0x105)][_0x4d43fb(0x104)](_0x2a70fa,_0x2eddc9)?_0x4d43fb(0x120):_0x4d43fb(0x11f);const _0x833a99=Object['prototype'][_0x4d43fb(0x105)]['call'](_0x2297eb,_0x2eddc9),_0x2ce8c7=Object[_0x4d43fb(0x11a)][_0x4d43fb(0x105)][_0x4d43fb(0x104)](_0x2a70fa,_0x2eddc9);if(_0x833a99&&_0x2ce8c7)return'both';if(_0x2ce8c7)return'project';return'global';}function a22_0x16f4(){const _0x240027=['add','roles','name','apps','roleName','113175TEVBlw','currentApp','values','prototype','keys','roleType','344570BWyPMr','userId','global','project','sort','appcode','username','projectConfig','trim','\x20(global)','209014DntkVm','PENDING','isCurrent','1341095aDfBCA','userList','roleKeys','244204QJFVgL','displayName','push','defaultApp','5hNCfOU','isFinite','length','status','globalConfig','named','call','hasOwnProperty','6VmsenP','membershipStatus','object','appCode','983736CBObZw','261XwHefy','get','map','has','nickname','2384312cwqzHk','ACTIVE'];a22_0x16f4=function(){return _0x240027;};return a22_0x16f4();}export function resolveDefaultAppSource(_0x27704c){const _0x3c8505=a22_0x4402,_0x18ecb9=_0x27704c[_0x3c8505(0x124)][_0x3c8505(0x115)]&&typeof _0x27704c[_0x3c8505(0x124)][_0x3c8505(0x115)]===_0x3c8505(0x108)?_0x27704c['projectConfig'][_0x3c8505(0x115)]:{};if(_0x3c8505(0xfd)in _0x27704c[_0x3c8505(0x124)])return _0x3c8505(0x120);if(Object[_0x3c8505(0x11b)](_0x18ecb9)[_0x3c8505(0x100)]>0x0)return _0x3c8505(0x120);if(_0x27704c['projectConfig']['inherit']===![])return null;if(_0x27704c['globalConfig']['defaultApp'])return _0x3c8505(0x11f);return null;}export function getConfigPath(_0x2505fb={}){const _0x523adc=a22_0x4402,_0x22364a=_0x2505fb[_0x523adc(0x11f)]?_0x523adc(0x11f):_0x523adc(0x120);return resolveWriteConfigPath(_0x22364a);}export function readConfig(_0x3b1ae0={}){return readConfigFile(getConfigPath(_0x3b1ae0));}export function writeConfig(_0x3c1c0c,_0x1ea366={}){writeConfigFile(getConfigPath(_0x1ea366),_0x3c1c0c);}export function scopeLabel(_0x343ea7){const _0x23c662=a22_0x4402;return _0x343ea7[_0x23c662(0x11f)]?_0x23c662(0x126):'';}
1
+ function a22_0x35f1(_0x3eaf34,_0x5c7ac9){_0x3eaf34=_0x3eaf34-0x84;const _0x583b10=a22_0x583b();let _0x35f109=_0x583b10[_0x3eaf34];return _0x35f109;}(function(_0x545b8c,_0x1961df){const _0xaeeb0d=a22_0x35f1,_0x1b00a1=_0x545b8c();while(!![]){try{const _0x34fd2c=-parseInt(_0xaeeb0d(0xac))/0x1+-parseInt(_0xaeeb0d(0x8d))/0x2+-parseInt(_0xaeeb0d(0x9f))/0x3*(parseInt(_0xaeeb0d(0xa5))/0x4)+-parseInt(_0xaeeb0d(0xa1))/0x5*(-parseInt(_0xaeeb0d(0xb6))/0x6)+parseInt(_0xaeeb0d(0xb0))/0x7*(-parseInt(_0xaeeb0d(0xb2))/0x8)+-parseInt(_0xaeeb0d(0xa8))/0x9*(-parseInt(_0xaeeb0d(0x9d))/0xa)+parseInt(_0xaeeb0d(0x98))/0xb*(parseInt(_0xaeeb0d(0x95))/0xc);if(_0x34fd2c===_0x1961df)break;else _0x1b00a1['push'](_0x1b00a1['shift']());}catch(_0x3f96fd){_0x1b00a1['push'](_0x1b00a1['shift']());}}}(a22_0x583b,0xd1b7b));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x18b10a){const _0x57b4c3=_0x18b10a?.['trim']();return _0x57b4c3?_0x57b4c3:null;}export function projectAppMembers(_0x568c79){const _0x3fed60=a22_0x35f1,_0x149e9f=new Map(),_0x20ca60=[..._0x568c79][_0x3fed60(0x9b)]((_0x3efce,_0x2bdd9b)=>_0x3efce['id']-_0x2bdd9b['id']),_0x1c9bbd=(_0x55dcfe,_0x2a015c,_0x95dcfa)=>{const _0x3ad3a1=_0x3fed60;for(const _0x4bf4dd of _0x2a015c){const _0x4ab40e=Number(_0x4bf4dd['userId']);if(!Number[_0x3ad3a1(0xaa)](_0x4ab40e)||_0x4ab40e<=0x0)continue;let _0x5d994f=_0x149e9f[_0x3ad3a1(0xb9)](_0x4ab40e);if(!_0x5d994f)_0x5d994f={'userId':_0x4ab40e,'username':nullableText(_0x4bf4dd['username']),'displayName':nullableText(_0x4bf4dd['nickname']),'status':_0x95dcfa,'roles':[],'roleKeys':new Set()},_0x149e9f[_0x3ad3a1(0xa7)](_0x4ab40e,_0x5d994f);else{_0x5d994f[_0x3ad3a1(0x90)]??=nullableText(_0x4bf4dd[_0x3ad3a1(0x90)]),_0x5d994f[_0x3ad3a1(0xae)]??=nullableText(_0x4bf4dd[_0x3ad3a1(0xa4)]);if(_0x95dcfa===_0x3ad3a1(0x8f))_0x5d994f[_0x3ad3a1(0x97)]=_0x3ad3a1(0x8f);}const _0x1081ea=_0x55dcfe['id']+':'+_0x95dcfa;if(_0x5d994f[_0x3ad3a1(0xa3)][_0x3ad3a1(0xa9)](_0x1081ea))continue;_0x5d994f[_0x3ad3a1(0xa3)][_0x3ad3a1(0x8e)](_0x1081ea),_0x5d994f[_0x3ad3a1(0xb3)][_0x3ad3a1(0x91)]({'roleId':_0x55dcfe['id'],'roleName':nullableText(_0x55dcfe['roleName']),'roleType':nullableText(_0x55dcfe[_0x3ad3a1(0x85)]),'membershipStatus':_0x95dcfa});}};for(const _0x45921f of _0x20ca60){_0x1c9bbd(_0x45921f,_0x45921f[_0x3fed60(0x88)]??[],_0x3fed60(0x8f)),_0x1c9bbd(_0x45921f,_0x45921f[_0x3fed60(0xa2)]??[],'PENDING');}return[..._0x149e9f[_0x3fed60(0x9e)]()][_0x3fed60(0x96)](_0xce601e=>({'userId':_0xce601e[_0x3fed60(0x84)],'username':_0xce601e['username'],'displayName':_0xce601e[_0x3fed60(0xae)],'status':_0xce601e['status'],'roles':_0xce601e['roles'][_0x3fed60(0x9b)]((_0x4c502b,_0x48bb4e)=>_0x4c502b[_0x3fed60(0x99)]-_0x48bb4e[_0x3fed60(0x99)]||(_0x4c502b[_0x3fed60(0xb4)]===_0x48bb4e[_0x3fed60(0xb4)]?0x0:_0x4c502b[_0x3fed60(0xb4)]===_0x3fed60(0x8f)?-0x1:0x1))}))['sort']((_0x143413,_0x45fce7)=>_0x143413['userId']-_0x45fce7[_0x3fed60(0x84)]);}export function enrichAppListItemsWithMergedSelection(_0x3636e1,_0x5b3fba){const _0x9bc23b=a22_0x35f1;if(!_0x5b3fba)return;const _0x3e5c14=_0x5b3fba[_0x9bc23b(0xa6)]&&typeof _0x5b3fba[_0x9bc23b(0xa6)]===_0x9bc23b(0x93)?_0x5b3fba[_0x9bc23b(0xa6)]:{},_0x1064a8=Object[_0x9bc23b(0x86)](_0x3e5c14)[_0x9bc23b(0x94)]>0x0;for(const _0x1c9ff1 of _0x3636e1){_0x1c9ff1['isCurrent']=![];}const _0x20e078=_0x5b3fba[_0x9bc23b(0xb8)]!=null?String(_0x5b3fba[_0x9bc23b(0xb8)])[_0x9bc23b(0xb1)]():'';if(_0x1064a8){const _0x464087=_0x5b3fba['currentApp']??_0x5b3fba[_0x9bc23b(0xa0)];if(_0x464087)for(const _0x1824c8 of _0x3636e1){_0x1824c8[_0x9bc23b(0x92)]===!![]&&_0x1824c8[_0x9bc23b(0x89)]===_0x464087&&(_0x1824c8[_0x9bc23b(0xad)]=!![]);}for(const _0x471db3 of _0x3636e1){if(_0x471db3['named']!==![])continue;if(_0x5b3fba[_0x9bc23b(0xa0)])continue;_0x20e078&&String(_0x471db3['appcode']??'')[_0x9bc23b(0xb1)]()===_0x20e078&&(_0x471db3['isCurrent']=!![]);}return;}if(!_0x20e078)return;for(const _0x41c02a of _0x3636e1){String(_0x41c02a[_0x9bc23b(0x8c)]??'')[_0x9bc23b(0xb1)]()===_0x20e078&&(_0x41c02a[_0x9bc23b(0xad)]=!![]);}}export function resolveAppScopeForWrite(_0x257916,_0x915347,_0x228e2c){const _0x17edab=a22_0x35f1;if(_0x915347)return'global';const _0x5852b4=_0x228e2c['projectConfig'][_0x17edab(0xa6)]&&typeof _0x228e2c[_0x17edab(0x8a)][_0x17edab(0xa6)]===_0x17edab(0x93)?_0x228e2c[_0x17edab(0x8a)][_0x17edab(0xa6)]:{},_0x266cf0=_0x228e2c[_0x17edab(0x8b)][_0x17edab(0xa6)]&&typeof _0x228e2c[_0x17edab(0x8b)]['apps']===_0x17edab(0x93)?_0x228e2c[_0x17edab(0x8b)]['apps']:{};if(Object[_0x17edab(0xb7)][_0x17edab(0x87)][_0x17edab(0xb5)](_0x5852b4,_0x257916))return _0x17edab(0x9a);if(Object[_0x17edab(0xb7)][_0x17edab(0x87)][_0x17edab(0xb5)](_0x266cf0,_0x257916))return'global';return _0x17edab(0x9a);}export function appDefinedIn(_0x384631,_0x271502,_0x5eeb62,_0x272346){const _0x3e6407=a22_0x35f1;if(_0x272346)return Object[_0x3e6407(0xb7)][_0x3e6407(0x87)][_0x3e6407(0xb5)](_0x5eeb62,_0x384631)?_0x3e6407(0x9a):_0x3e6407(0xab);const _0x39b2a7=Object[_0x3e6407(0xb7)]['hasOwnProperty'][_0x3e6407(0xb5)](_0x271502,_0x384631),_0xfd48e6=Object[_0x3e6407(0xb7)][_0x3e6407(0x87)][_0x3e6407(0xb5)](_0x5eeb62,_0x384631);if(_0x39b2a7&&_0xfd48e6)return _0x3e6407(0x9c);if(_0xfd48e6)return _0x3e6407(0x9a);return'global';}export function resolveDefaultAppSource(_0x3b7d86){const _0x3853c8=a22_0x35f1,_0x437895=_0x3b7d86[_0x3853c8(0x8a)]['apps']&&typeof _0x3b7d86['projectConfig'][_0x3853c8(0xa6)]===_0x3853c8(0x93)?_0x3b7d86[_0x3853c8(0x8a)][_0x3853c8(0xa6)]:{};if(_0x3853c8(0xa0)in _0x3b7d86[_0x3853c8(0x8a)])return _0x3853c8(0x9a);if(Object[_0x3853c8(0x86)](_0x437895)[_0x3853c8(0x94)]>0x0)return'project';if(_0x3b7d86[_0x3853c8(0x8a)][_0x3853c8(0xaf)]===![])return null;if(_0x3b7d86['globalConfig'][_0x3853c8(0xa0)])return _0x3853c8(0xab);return null;}export function getConfigPath(_0x5be0d1={}){const _0x2fc1a3=a22_0x35f1,_0x244063=_0x5be0d1[_0x2fc1a3(0xab)]?_0x2fc1a3(0xab):_0x2fc1a3(0x9a);return resolveWriteConfigPath(_0x244063);}export function readConfig(_0x2321f6={}){return readConfigFile(getConfigPath(_0x2321f6));}function a22_0x583b(){const _0x157b6d=['516yvHAFL','apps','set','117qnkHkL','has','isFinite','global','49233KNuqEq','isCurrent','displayName','inherit','245RCzaBh','trim','269104znFfJn','roles','membershipStatus','call','8984082TdjzZr','prototype','appCode','get','userId','roleType','keys','hasOwnProperty','userList','name','projectConfig','globalConfig','appcode','2921432lnLgDW','add','ACTIVE','username','push','named','object','length','12zmamHS','map','status','27837997AaziNI','roleId','project','sort','both','498950AKTAYN','values','26289qFYWEf','defaultApp','5osIAZI','applyUserList','roleKeys','nickname'];a22_0x583b=function(){return _0x157b6d;};return a22_0x583b();}export function writeConfig(_0x237b33,_0x3fb20f={}){writeConfigFile(getConfigPath(_0x3fb20f),_0x237b33);}export function scopeLabel(_0x54d848){return _0x54d848['global']?'\x20(global)':'';}
@@ -1 +1 @@
1
- const a23_0xb97ca0=a23_0x1e0b;(function(_0x490cfe,_0x220b1a){const _0x50ed8f=a23_0x1e0b,_0x2f8536=_0x490cfe();while(!![]){try{const _0x2f0b8f=-parseInt(_0x50ed8f(0x1ca))/0x1+-parseInt(_0x50ed8f(0x1c5))/0x2+parseInt(_0x50ed8f(0x1c1))/0x3*(-parseInt(_0x50ed8f(0x1bd))/0x4)+parseInt(_0x50ed8f(0x1cb))/0x5+-parseInt(_0x50ed8f(0x1bc))/0x6+parseInt(_0x50ed8f(0x1c0))/0x7*(-parseInt(_0x50ed8f(0x1c6))/0x8)+parseInt(_0x50ed8f(0x1c8))/0x9*(parseInt(_0x50ed8f(0x1be))/0xa);if(_0x2f0b8f===_0x220b1a)break;else _0x2f8536['push'](_0x2f8536['shift']());}catch(_0x275bef){_0x2f8536['push'](_0x2f8536['shift']());}}}(a23_0x4dd9,0xc8292));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH='/smartapi/app-config/delete';function a23_0x1e0b(_0x12d479,_0x423810){_0x12d479=_0x12d479-0x1ba;const _0x4dd97e=a23_0x4dd9();let _0x1e0bac=_0x4dd97e[_0x12d479];return _0x1e0bac;}export const appConfigDelete={'service':'app-config','command':'delete','description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':a23_0xb97ca0(0x1bb),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2ba5fd){readKeyArg(_0x2ba5fd);},async 'dryRun'(_0x448998){const _0x232734=a23_0xb97ca0,_0xd7d32c=readKeyArg(_0x448998),_0x1fe2b0=await mustGetByKey(_0x448998[_0x232734(0x1c4)],_0xd7d32c);return asAppConfigDryRunResult(buildMutationData({'operation':_0x232734(0x1c3),'appCode':_0x448998[_0x232734(0x1c4)],'key':_0xd7d32c,'before':projectAppConfig(_0x1fe2b0),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x52c655){const _0x4c1e2d=a23_0xb97ca0,_0x204f64=readKeyArg(_0x52c655),_0x40bf4c=await mustGetByKey(_0x52c655[_0x4c1e2d(0x1c4)],_0x204f64);return await withAppConfigApiBoundary(_0x4c1e2d(0x1c3),{'appCode':_0x52c655['appCode'],'key':_0x204f64},()=>deleteAppConfig({'appCode':_0x52c655[_0x4c1e2d(0x1c4)],'id':requireAppConfigId(_0x40bf4c,_0x204f64,_0x52c655[_0x4c1e2d(0x1c4)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x52c655[_0x4c1e2d(0x1c4)],'key':_0x204f64,'before':projectAppConfig(_0x40bf4c),'after':null,'dryRun':![]}),'message':_0x4c1e2d(0x1c2)+_0x204f64};}};async function mustGetByKey(_0x4e5094,_0x2ca7e2){const _0x51fa95=a23_0xb97ca0,_0x381334=await withAppConfigApiBoundary('get',{'appCode':_0x4e5094,'key':_0x2ca7e2},()=>getAppConfigByKey(_0x4e5094,_0x2ca7e2));if(!_0x381334)throw CliErrors['validation'](_0x51fa95(0x1bf)+_0x2ca7e2,_0x51fa95(0x1ba)+_0x4e5094);return _0x381334;}function a23_0x4dd9(){const _0x64cc2f=['App\x20config\x20key\x20not\x20found:\x20','82747SNkeDX','24XvzppH','Deleted\x20app\x20config\x20','delete','appCode','1835174nkwVga','40PCoOzl',',\x20appCode=','46413POAUXC','number','812588TQeTOY','6537370jdlQzR','appCode:\x20','high-risk-write','4368522liCdes','581216ELlfXu','6190rkLSDa'];a23_0x4dd9=function(){return _0x64cc2f;};return a23_0x4dd9();}function requireAppConfigId(_0x51193a,_0x42a9e9,_0x2bac2e){const _0x272d15=a23_0xb97ca0;if(typeof _0x51193a['id']===_0x272d15(0x1c9)&&Number['isFinite'](_0x51193a['id'])&&_0x51193a['id']>0x0)return _0x51193a['id'];throw CliErrors['apiError']('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x42a9e9+_0x272d15(0x1c7)+_0x2bac2e);}
1
+ const a23_0x20ffa2=a23_0x5619;(function(_0x27bd96,_0x5f294d){const _0x1db708=a23_0x5619,_0x503909=_0x27bd96();while(!![]){try{const _0x544bb2=parseInt(_0x1db708(0x182))/0x1*(parseInt(_0x1db708(0x192))/0x2)+parseInt(_0x1db708(0x191))/0x3+-parseInt(_0x1db708(0x17b))/0x4+parseInt(_0x1db708(0x179))/0x5*(-parseInt(_0x1db708(0x186))/0x6)+-parseInt(_0x1db708(0x181))/0x7+-parseInt(_0x1db708(0x188))/0x8*(-parseInt(_0x1db708(0x18d))/0x9)+-parseInt(_0x1db708(0x18a))/0xa*(-parseInt(_0x1db708(0x189))/0xb);if(_0x544bb2===_0x5f294d)break;else _0x503909['push'](_0x503909['shift']());}catch(_0x3aeba6){_0x503909['push'](_0x503909['shift']());}}}(a23_0x25ab,0xbb9d3));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=a23_0x20ffa2(0x185);function a23_0x5619(_0x474134,_0x43cbdd){_0x474134=_0x474134-0x179;const _0x25abe6=a23_0x25ab();let _0x56190c=_0x25abe6[_0x474134];return _0x56190c;}export const appConfigDelete={'service':a23_0x20ffa2(0x18e),'command':'delete','description':a23_0x20ffa2(0x183),'risk':a23_0x20ffa2(0x18f),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4559f2){readKeyArg(_0x4559f2);},async 'dryRun'(_0x423202){const _0x36f8bb=a23_0x20ffa2,_0x4813af=readKeyArg(_0x423202),_0x44dad4=await mustGetByKey(_0x423202[_0x36f8bb(0x17e)],_0x4813af);return asAppConfigDryRunResult(buildMutationData({'operation':_0x36f8bb(0x17a),'appCode':_0x423202[_0x36f8bb(0x17e)],'key':_0x4813af,'before':projectAppConfig(_0x44dad4),'after':null,'dryRun':!![]}),{'method':_0x36f8bb(0x187),'url':DELETE_PATH});},async 'execute'(_0x18a14e){const _0x504086=a23_0x20ffa2,_0x184dad=readKeyArg(_0x18a14e),_0x56b6ee=await mustGetByKey(_0x18a14e[_0x504086(0x17e)],_0x184dad);return await withAppConfigApiBoundary('delete',{'appCode':_0x18a14e[_0x504086(0x17e)],'key':_0x184dad},()=>deleteAppConfig({'appCode':_0x18a14e[_0x504086(0x17e)],'id':requireAppConfigId(_0x56b6ee,_0x184dad,_0x18a14e[_0x504086(0x17e)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x18a14e[_0x504086(0x17e)],'key':_0x184dad,'before':projectAppConfig(_0x56b6ee),'after':null,'dryRun':![]}),'message':'Deleted\x20app\x20config\x20'+_0x184dad};}};async function mustGetByKey(_0x5e0ec6,_0x1714a4){const _0xe7d1f2=a23_0x20ffa2,_0x3b2c0c=await withAppConfigApiBoundary(_0xe7d1f2(0x190),{'appCode':_0x5e0ec6,'key':_0x1714a4},()=>getAppConfigByKey(_0x5e0ec6,_0x1714a4));if(!_0x3b2c0c)throw CliErrors[_0xe7d1f2(0x18c)](_0xe7d1f2(0x17d)+_0x1714a4,_0xe7d1f2(0x18b)+_0x5e0ec6);return _0x3b2c0c;}function a23_0x25ab(){const _0x599347=['1041090rXjSpZ','appCode:\x20','validation','864rRyPYK','app-config','high-risk-write','get','120375XMuENu','1291794DIoFjm','95pKhAro','delete','1298484bdCCmL','App\x20config\x20server\x20id\x20missing\x20for\x20key=','App\x20config\x20key\x20not\x20found:\x20','appCode','isFinite','apiError','5567947HvdiMb','1zQoelJ','Delete\x20one\x20runtime\x20app-config\x20key','number','/smartapi/app-config/delete','245772CWQiGJ','POST','17576zfLXCO','187gZOQck'];a23_0x25ab=function(){return _0x599347;};return a23_0x25ab();}function requireAppConfigId(_0x59b4f0,_0x387f2c,_0x4e8e61){const _0x777d2=a23_0x20ffa2;if(typeof _0x59b4f0['id']===_0x777d2(0x184)&&Number[_0x777d2(0x17f)](_0x59b4f0['id'])&&_0x59b4f0['id']>0x0)return _0x59b4f0['id'];throw CliErrors[_0x777d2(0x180)](_0x777d2(0x17c)+_0x387f2c+',\x20appCode='+_0x4e8e61);}
@@ -1 +1 @@
1
- const a24_0xb199e1=a24_0x379d;(function(_0x3ab232,_0x50070e){const _0x48e489=a24_0x379d,_0x44cb2c=_0x3ab232();while(!![]){try{const _0x221f8f=-parseInt(_0x48e489(0x1cd))/0x1+-parseInt(_0x48e489(0x1c4))/0x2+parseInt(_0x48e489(0x1c8))/0x3+parseInt(_0x48e489(0x1c1))/0x4+parseInt(_0x48e489(0x1c9))/0x5*(parseInt(_0x48e489(0x1cb))/0x6)+-parseInt(_0x48e489(0x1ce))/0x7*(parseInt(_0x48e489(0x1c3))/0x8)+-parseInt(_0x48e489(0x1d3))/0x9*(parseInt(_0x48e489(0x1d1))/0xa);if(_0x221f8f===_0x50070e)break;else _0x44cb2c['push'](_0x44cb2c['shift']());}catch(_0x315199){_0x44cb2c['push'](_0x44cb2c['shift']());}}}(a24_0x49cf,0x39fda));function a24_0x49cf(){const _0x2309d7=['16AHHDru','163816kuOVyS','Loaded\x20app\x20config\x20','reveal','\x20with\x20value\x20revealed','134001kBNcPO','215dclpHG','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','42576sCwSRn','\x20with\x20value\x20redacted','180044lvKbhI','96215hFUHkg','bool','appCode','60ebZAzw','get','79893HPIgus','app-config','App\x20config\x20key\x20not\x20found:\x20','validation','appCode:\x20','921756PYOINF','read'];a24_0x49cf=function(){return _0x2309d7;};return a24_0x49cf();}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a24_0x379d(_0x33748b,_0x2e9ade){_0x33748b=_0x33748b-0x1c1;const _0x49cf3d=a24_0x49cf();let _0x379dfc=_0x49cf3d[_0x33748b];return _0x379dfc;}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':a24_0xb199e1(0x1d4),'command':a24_0xb199e1(0x1d2),'description':a24_0xb199e1(0x1ca),'risk':a24_0xb199e1(0x1c2),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x3264db){readKeyArg(_0x3264db);},async 'execute'(_0xeb97d1){const _0x3cc23f=a24_0xb199e1,_0x43769f=readKeyArg(_0xeb97d1),_0x5f1da7=await withAppConfigApiBoundary('get',{'appCode':_0xeb97d1['appCode'],'key':_0x43769f},()=>getAppConfigByKey(_0xeb97d1[_0x3cc23f(0x1d0)],_0x43769f));if(!_0x5f1da7)throw CliErrors[_0x3cc23f(0x1d6)](_0x3cc23f(0x1d5)+_0x43769f,_0x3cc23f(0x1d7)+_0xeb97d1[_0x3cc23f(0x1d0)]);const _0x3b3c9e=projectAppConfig(_0x5f1da7,{'reveal':_0xeb97d1[_0x3cc23f(0x1cf)](_0x3cc23f(0x1c6))});return{'ok':!![],'data':{'config':_0x3b3c9e},'message':_0xeb97d1[_0x3cc23f(0x1cf)](_0x3cc23f(0x1c6))?_0x3cc23f(0x1c5)+_0x43769f+_0x3cc23f(0x1c7):_0x3cc23f(0x1c5)+_0x43769f+_0x3cc23f(0x1cc)};}};
1
+ function a24_0x2f36(_0x1d666a,_0xb99065){_0x1d666a=_0x1d666a-0xeb;const _0xa9b180=a24_0xa9b1();let _0x2f36f3=_0xa9b180[_0x1d666a];return _0x2f36f3;}function a24_0xa9b1(){const _0x17c334=['674FsuLuT','253065CcnGtK','5469INhvrO','reveal','\x20with\x20value\x20redacted','66dVabTN','app-config','\x20with\x20value\x20revealed','validation','Loaded\x20app\x20config\x20','203607pcdlis','get','bool','477215mtyWOs','2005744sVqppH','1067GbhCUq','36TrEVBB','appCode','appCode:\x20','312809zMhVUC','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','56290fyqNiD'];a24_0xa9b1=function(){return _0x17c334;};return a24_0xa9b1();}const a24_0x5bd822=a24_0x2f36;(function(_0x4e4d3c,_0x350475){const _0x382b9f=a24_0x2f36,_0x5952b2=_0x4e4d3c();while(!![]){try{const _0x5c7a1d=parseInt(_0x382b9f(0xf3))/0x1+-parseInt(_0x382b9f(0xfc))/0x2*(-parseInt(_0x382b9f(0xfe))/0x3)+parseInt(_0x382b9f(0xf6))/0x4*(-parseInt(_0x382b9f(0xfd))/0x5)+parseInt(_0x382b9f(0xeb))/0x6*(parseInt(_0x382b9f(0xf9))/0x7)+-parseInt(_0x382b9f(0xf4))/0x8+-parseInt(_0x382b9f(0xf0))/0x9+-parseInt(_0x382b9f(0xfb))/0xa*(parseInt(_0x382b9f(0xf5))/0xb);if(_0x5c7a1d===_0x350475)break;else _0x5952b2['push'](_0x5952b2['shift']());}catch(_0x466a5c){_0x5952b2['push'](_0x5952b2['shift']());}}}(a24_0xa9b1,0x4b41c));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':a24_0x5bd822(0xec),'command':a24_0x5bd822(0xf1),'description':a24_0x5bd822(0xfa),'risk':'read','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x383ea7){readKeyArg(_0x383ea7);},async 'execute'(_0x334e46){const _0x350057=a24_0x5bd822,_0x10ca88=readKeyArg(_0x334e46),_0x3f0b73=await withAppConfigApiBoundary(_0x350057(0xf1),{'appCode':_0x334e46[_0x350057(0xf7)],'key':_0x10ca88},()=>getAppConfigByKey(_0x334e46[_0x350057(0xf7)],_0x10ca88));if(!_0x3f0b73)throw CliErrors[_0x350057(0xee)]('App\x20config\x20key\x20not\x20found:\x20'+_0x10ca88,_0x350057(0xf8)+_0x334e46[_0x350057(0xf7)]);const _0x10e2ff=projectAppConfig(_0x3f0b73,{'reveal':_0x334e46['bool'](_0x350057(0xff))});return{'ok':!![],'data':{'config':_0x10e2ff},'message':_0x334e46[_0x350057(0xf2)](_0x350057(0xff))?_0x350057(0xef)+_0x10ca88+_0x350057(0xed):_0x350057(0xef)+_0x10ca88+_0x350057(0x100)};}};
@@ -1 +1 @@
1
- (function(_0x397142,_0x275bf2){const _0x2de103=a25_0x4252,_0x769417=_0x397142();while(!![]){try{const _0x3e1ee8=parseInt(_0x2de103(0x119))/0x1+-parseInt(_0x2de103(0x118))/0x2+parseInt(_0x2de103(0x11c))/0x3*(-parseInt(_0x2de103(0x117))/0x4)+parseInt(_0x2de103(0x116))/0x5+-parseInt(_0x2de103(0x11b))/0x6+parseInt(_0x2de103(0x11d))/0x7*(parseInt(_0x2de103(0x114))/0x8)+parseInt(_0x2de103(0x115))/0x9*(parseInt(_0x2de103(0x11a))/0xa);if(_0x3e1ee8===_0x275bf2)break;else _0x769417['push'](_0x769417['shift']());}catch(_0x31073a){_0x769417['push'](_0x769417['shift']());}}}(a25_0x4030,0xd3740));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];function a25_0x4252(_0x1df333,_0x93755b){_0x1df333=_0x1df333-0x114;const _0x4030a7=a25_0x4030();let _0x42524d=_0x4030a7[_0x1df333];return _0x42524d;}function a25_0x4030(){const _0x25de73=['2982152uPWajs','1492815pRRwGB','30zuoEUT','6144738bPFxQH','3NJhHrM','658MdDCtd','42376cqdpiX','1382823cQpcmC','4871350ltPEBm','178532NNQdcQ'];a25_0x4030=function(){return _0x25de73;};return a25_0x4030();}
1
+ function a25_0x40a7(_0x362047,_0x3f19e3){_0x362047=_0x362047-0x11a;const _0x209935=a25_0x2099();let _0x40a7cd=_0x209935[_0x362047];return _0x40a7cd;}(function(_0x318b69,_0x3180e1){const _0x1f7e39=a25_0x40a7,_0x50ac96=_0x318b69();while(!![]){try{const _0x461d3c=parseInt(_0x1f7e39(0x11d))/0x1+parseInt(_0x1f7e39(0x11a))/0x2*(parseInt(_0x1f7e39(0x11e))/0x3)+parseInt(_0x1f7e39(0x11f))/0x4*(parseInt(_0x1f7e39(0x11c))/0x5)+parseInt(_0x1f7e39(0x120))/0x6+parseInt(_0x1f7e39(0x121))/0x7+-parseInt(_0x1f7e39(0x11b))/0x8+parseInt(_0x1f7e39(0x122))/0x9*(-parseInt(_0x1f7e39(0x123))/0xa);if(_0x461d3c===_0x3180e1)break;else _0x50ac96['push'](_0x50ac96['shift']());}catch(_0x13c686){_0x50ac96['push'](_0x50ac96['shift']());}}}(a25_0x2099,0x71191));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 a25_0x2099(){const _0x3af4ec=['254344FduVfX','83365yshWTT','450222yEeqJf','3gBhStL','12eqwUtc','4774242WKrUtO','3791620bchukd','171CnwPsP','1048470OChpgv','1299054MUfPLf'];a25_0x2099=function(){return _0x3af4ec;};return a25_0x2099();}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
@@ -1 +1 @@
1
- function a26_0x3643(_0x526907,_0x5278de){_0x526907=_0x526907-0x12e;const _0x128f34=a26_0x128f();let _0x3643f6=_0x128f34[_0x526907];return _0x3643f6;}const a26_0x20b70c=a26_0x3643;function a26_0x128f(){const _0x479bb9=['app-config','70LUtiEe','Found\x20','187909tEhxdV','8aaYjux','length','map','list','\x20app\x20config(s)','key','6677584IbWhES','5csTvcK','376587MZCXaA','59376aKTwGX','2674540bSamSa','trim','3475204BZkZTm','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','526311cPduHl','str','Filter\x20by\x20exact\x20config\x20key','259bXUwmW','appCode'];a26_0x128f=function(){return _0x479bb9;};return a26_0x128f();}(function(_0x526b8f,_0x53b617){const _0x5dde84=a26_0x3643,_0xa8dbf2=_0x526b8f();while(!![]){try{const _0x5d355f=-parseInt(_0x5dde84(0x143))/0x1*(-parseInt(_0x5dde84(0x144))/0x2)+parseInt(_0x5dde84(0x13b))/0x3+parseInt(_0x5dde84(0x139))/0x4*(parseInt(_0x5dde84(0x134))/0x5)+parseInt(_0x5dde84(0x136))/0x6*(-parseInt(_0x5dde84(0x13e))/0x7)+-parseInt(_0x5dde84(0x133))/0x8+-parseInt(_0x5dde84(0x135))/0x9*(-parseInt(_0x5dde84(0x141))/0xa)+-parseInt(_0x5dde84(0x137))/0xb;if(_0x5d355f===_0x53b617)break;else _0xa8dbf2['push'](_0xa8dbf2['shift']());}catch(_0x25232a){_0xa8dbf2['push'](_0xa8dbf2['shift']());}}}(a26_0x128f,0x9d6b1));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':a26_0x20b70c(0x140),'command':a26_0x20b70c(0x130),'description':a26_0x20b70c(0x13a),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a26_0x20b70c(0x132),'type':'string','description':a26_0x20b70c(0x13d)},TAGS_FLAG],async 'validate'(_0x56b30e){const _0x1bda18=a26_0x20b70c,_0x19bff9=_0x56b30e[_0x1bda18(0x13c)](_0x1bda18(0x132))[_0x1bda18(0x138)]();if(_0x19bff9)validateKey(_0x19bff9);readOptionalTags(_0x56b30e);},async 'execute'(_0x4e5322){const _0x290aa5=a26_0x20b70c,_0x563c61=_0x4e5322[_0x290aa5(0x13c)](_0x290aa5(0x132))[_0x290aa5(0x138)]()||undefined,_0x179209=readOptionalTags(_0x4e5322),_0x487d49=await withAppConfigApiBoundary(_0x290aa5(0x130),{'appCode':_0x4e5322[_0x290aa5(0x13f)]},()=>listAppConfigs(_0x4e5322[_0x290aa5(0x13f)],{'key':_0x563c61,'tags':_0x179209})),_0x722d3=_0x487d49[_0x290aa5(0x12f)](_0x931f5b=>projectAppConfig(_0x931f5b));return{'ok':!![],'data':{'appCode':_0x4e5322[_0x290aa5(0x13f)],'count':_0x722d3[_0x290aa5(0x12e)],'configs':_0x722d3},'message':_0x290aa5(0x142)+_0x722d3[_0x290aa5(0x12e)]+_0x290aa5(0x131)};}};
1
+ const a26_0x5b7afd=a26_0x19fa;function a26_0x1e0f(){const _0x135d77=['list','138784bsYemF','5193DxNYUs','string','550MxZxQR','key','4456683AvOXDD','app-config','283352icENmZ','399QwuGqP','map','1BvEGmp','3247498XlaOhh','length','3757860ADyBeg','trim','8429562hhqTOW','45sEutTO','appCode','Found\x20','Filter\x20by\x20exact\x20config\x20key','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values'];a26_0x1e0f=function(){return _0x135d77;};return a26_0x1e0f();}(function(_0x2f6df0,_0x23982c){const _0x3cca82=a26_0x19fa,_0x289192=_0x2f6df0();while(!![]){try{const _0x470fd8=parseInt(_0x3cca82(0xa5))/0x1*(-parseInt(_0x3cca82(0xa6))/0x2)+-parseInt(_0x3cca82(0xab))/0x3*(-parseInt(_0x3cca82(0xa2))/0x4)+parseInt(_0x3cca82(0xa8))/0x5+parseInt(_0x3cca82(0xaa))/0x6+-parseInt(_0x3cca82(0xa3))/0x7*(parseInt(_0x3cca82(0xb1))/0x8)+parseInt(_0x3cca82(0xb2))/0x9*(-parseInt(_0x3cca82(0xb4))/0xa)+parseInt(_0x3cca82(0xa0))/0xb;if(_0x470fd8===_0x23982c)break;else _0x289192['push'](_0x289192['shift']());}catch(_0x98c51e){_0x289192['push'](_0x289192['shift']());}}}(a26_0x1e0f,0xef3be));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a26_0x19fa(_0x96feaf,_0x2ddc1d){_0x96feaf=_0x96feaf-0xa0;const _0x1e0f58=a26_0x1e0f();let _0x19fab6=_0x1e0f58[_0x96feaf];return _0x19fab6;}export const appConfigList={'service':a26_0x5b7afd(0xa1),'command':a26_0x5b7afd(0xb0),'description':a26_0x5b7afd(0xaf),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a26_0x5b7afd(0xb5),'type':a26_0x5b7afd(0xb3),'description':a26_0x5b7afd(0xae)},TAGS_FLAG],async 'validate'(_0x3767f0){const _0x38a216=_0x3767f0['str']('key')['trim']();if(_0x38a216)validateKey(_0x38a216);readOptionalTags(_0x3767f0);},async 'execute'(_0x593e93){const _0x378600=a26_0x5b7afd,_0x116375=_0x593e93['str'](_0x378600(0xb5))[_0x378600(0xa9)]()||undefined,_0x10c91e=readOptionalTags(_0x593e93),_0x1be6c3=await withAppConfigApiBoundary(_0x378600(0xb0),{'appCode':_0x593e93[_0x378600(0xac)]},()=>listAppConfigs(_0x593e93[_0x378600(0xac)],{'key':_0x116375,'tags':_0x10c91e})),_0x1a8f16=_0x1be6c3[_0x378600(0xa4)](_0x29909f=>projectAppConfig(_0x29909f));return{'ok':!![],'data':{'appCode':_0x593e93['appCode'],'count':_0x1a8f16[_0x378600(0xa7)],'configs':_0x1a8f16},'message':_0x378600(0xad)+_0x1a8f16[_0x378600(0xa7)]+'\x20app\x20config(s)'};}};
@@ -1 +1 @@
1
- const a27_0x36d423=a27_0x5ab4;(function(_0x133015,_0x287f99){const _0x6e6677=a27_0x5ab4,_0x2be310=_0x133015();while(!![]){try{const _0x68eabd=parseInt(_0x6e6677(0x194))/0x1+-parseInt(_0x6e6677(0x19a))/0x2+parseInt(_0x6e6677(0x19b))/0x3*(parseInt(_0x6e6677(0x1a0))/0x4)+parseInt(_0x6e6677(0x19d))/0x5+-parseInt(_0x6e6677(0x1aa))/0x6*(-parseInt(_0x6e6677(0x1ab))/0x7)+-parseInt(_0x6e6677(0x1a9))/0x8*(-parseInt(_0x6e6677(0x192))/0x9)+parseInt(_0x6e6677(0x1ae))/0xa*(-parseInt(_0x6e6677(0x1a5))/0xb);if(_0x68eabd===_0x287f99)break;else _0x2be310['push'](_0x2be310['shift']());}catch(_0x254812){_0x2be310['push'](_0x2be310['shift']());}}}(a27_0x323e,0xcaa8e));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x5ab4(_0x2656ff,_0x2e3f5a){_0x2656ff=_0x2656ff-0x191;const _0x323e80=a27_0x323e();let _0x5ab4fe=_0x323e80[_0x2656ff];return _0x5ab4fe;}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=a27_0x36d423(0x1a1),UPDATE_PATH=a27_0x36d423(0x199);export const appConfigSet={'service':a27_0x36d423(0x1ac),'command':a27_0x36d423(0x196),'description':a27_0x36d423(0x1a3),'risk':a27_0x36d423(0x1a8),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a27_0x36d423(0x1a7),'type':'string','description':a27_0x36d423(0x198)}],async 'validate'(_0x11c713){readKeyArg(_0x11c713),readOptionalTags(_0x11c713),assertSingleValueSource(_0x11c713);},async 'dryRun'(_0x366762){const _0xb342a1=a27_0x36d423,_0x4f4a7e=readKeyArg(_0x366762),_0xabfb=readOptionalTags(_0x366762),_0x171fc2=assertSingleValueSource(_0x366762);await assertValueSourceReadable(_0x171fc2);const _0x444504=await withAppConfigApiBoundary(_0xb342a1(0x195),{'appCode':_0x366762['appCode'],'key':_0x4f4a7e},()=>getAppConfigByKey(_0x366762[_0xb342a1(0x19c)],_0x4f4a7e)),_0x3309dd=_0x444504?_0xb342a1(0x193):'create',_0x3983d6=_0x444504?projectAppConfig(_0x444504):null,_0x33d553=plannedAppConfig({'appCode':_0x366762['appCode'],'key':_0x4f4a7e,'tags':_0xabfb??_0x444504?.[_0xb342a1(0x197)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x3309dd,'appCode':_0x366762[_0xb342a1(0x19c)],'key':_0x4f4a7e,'before':_0x3983d6,'after':_0x33d553,'dryRun':!![]}),{'method':_0xb342a1(0x1a4),'url':_0x3309dd===_0xb342a1(0x193)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x411dd7){const _0x411ebc=a27_0x36d423,_0x720635=readKeyArg(_0x411dd7),_0x4f68ac=readOptionalTags(_0x411dd7),_0x1d3168=await withAppConfigApiBoundary(_0x411ebc(0x195),{'appCode':_0x411dd7[_0x411ebc(0x19c)],'key':_0x720635},()=>getAppConfigByKey(_0x411dd7[_0x411ebc(0x19c)],_0x720635)),_0x242924=_0x1d3168?projectAppConfig(_0x1d3168):null,_0xe43031=_0x1d3168?_0x411ebc(0x193):'create',{value:_0x304b3b,warnings:_0x132639}=await readAppConfigValue(_0x411dd7),_0x4f4340={'appCode':_0x411dd7[_0x411ebc(0x19c)],'key':_0x720635,'value':_0x304b3b,'tags':_0x4f68ac??_0x1d3168?.[_0x411ebc(0x197)]??undefined};await withAppConfigApiBoundary(_0xe43031,{'appCode':_0x411dd7[_0x411ebc(0x19c)],'key':_0x720635},async()=>{_0x1d3168?await updateAppConfig({..._0x4f4340,'id':requireAppConfigId(_0x1d3168,_0x720635,_0x411dd7['appCode'])}):await createAppConfig(_0x4f4340);});const _0xb45514=await withAppConfigApiBoundary(_0x411ebc(0x195),{'appCode':_0x411dd7[_0x411ebc(0x19c)],'key':_0x720635},()=>getAppConfigByKey(_0x411dd7['appCode'],_0x720635)),_0x20ecb4=_0xb45514?projectAppConfig(_0xb45514):plannedAppConfig({'appCode':_0x411dd7[_0x411ebc(0x19c)],'key':_0x720635,'tags':_0x4f4340[_0x411ebc(0x197)],'hasValue':_0x304b3b!==''});return{'ok':!![],'data':buildMutationData({'operation':_0xe43031,'appCode':_0x411dd7[_0x411ebc(0x19c)],'key':_0x720635,'before':_0x242924,'after':_0x20ecb4,'dryRun':![],'warnings':_0x132639}),'message':(_0xe43031===_0x411ebc(0x193)?_0x411ebc(0x19f):_0x411ebc(0x1ad))+_0x411ebc(0x1a2)+_0x720635};}};function a27_0x323e(){const _0x185bc0=['195036WMAUqI','28VfMQQu','app-config','Created','5440duAaYp','number','275391BaSROM','update','1408185rqdZMe','get','set','tags','Read\x20config\x20value\x20from\x20file','/smartapi/app-config/update','116320rXSWcY','104937pDcJZY','appCode','2302320BGTLRp','apiError','Updated','84gSskFL','/smartapi/app-config/create','\x20app\x20config\x20','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','POST','38544PPnlQt',',\x20appCode=','file','write','16DgGtlv'];a27_0x323e=function(){return _0x185bc0;};return a27_0x323e();}function requireAppConfigId(_0x2d1b69,_0x420fea,_0x433a58){const _0x3d22c8=a27_0x36d423;if(typeof _0x2d1b69['id']===_0x3d22c8(0x191)&&Number['isFinite'](_0x2d1b69['id'])&&_0x2d1b69['id']>0x0)return _0x2d1b69['id'];throw CliErrors[_0x3d22c8(0x19e)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x420fea+_0x3d22c8(0x1a6)+_0x433a58);}
1
+ const a27_0x16311d=a27_0x19fd;function a27_0x360c(){const _0x17ab88=['App\x20config\x20server\x20id\x20missing\x20for\x20key=','app-config','9657fetxbu','/smartapi/app-config/create','isFinite','Read\x20config\x20value\x20from\x20file','1173180uolyAG','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','712ahWpUS','Created','get','create','set','tags','257157hmdCvF','2007960MLaOxt','appCode','90vpbxEP','2zTRlsz','file',',\x20appCode=','Updated','2257976YMkLud','247997efoQZL','POST','1170RmuZfE','update'];a27_0x360c=function(){return _0x17ab88;};return a27_0x360c();}(function(_0x3a6107,_0x5883dd){const _0x2a00b9=a27_0x19fd,_0x4583ff=_0x3a6107();while(!![]){try{const _0x2dfd17=-parseInt(_0x2a00b9(0x187))/0x1*(-parseInt(_0x2a00b9(0x182))/0x2)+parseInt(_0x2a00b9(0x18d))/0x3+parseInt(_0x2a00b9(0x193))/0x4*(-parseInt(_0x2a00b9(0x189))/0x5)+parseInt(_0x2a00b9(0x191))/0x6+parseInt(_0x2a00b9(0x186))/0x7+-parseInt(_0x2a00b9(0x17f))/0x8+parseInt(_0x2a00b9(0x17e))/0x9*(-parseInt(_0x2a00b9(0x181))/0xa);if(_0x2dfd17===_0x5883dd)break;else _0x4583ff['push'](_0x4583ff['shift']());}catch(_0x566e81){_0x4583ff['push'](_0x4583ff['shift']());}}}(a27_0x360c,0x35976));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';function a27_0x19fd(_0x30a319,_0x3796be){_0x30a319=_0x30a319-0x17a;const _0x360cf7=a27_0x360c();let _0x19fdc5=_0x360cf7[_0x30a319];return _0x19fdc5;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a27_0x16311d(0x18e),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a27_0x16311d(0x18c),'command':a27_0x16311d(0x17c),'description':a27_0x16311d(0x192),'risk':'write','args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a27_0x16311d(0x183),'type':'string','description':a27_0x16311d(0x190)}],async 'validate'(_0x53b3d5){readKeyArg(_0x53b3d5),readOptionalTags(_0x53b3d5),assertSingleValueSource(_0x53b3d5);},async 'dryRun'(_0x55ca7e){const _0x263e66=a27_0x16311d,_0x48c285=readKeyArg(_0x55ca7e),_0x39ee3a=readOptionalTags(_0x55ca7e),_0x4e35a6=assertSingleValueSource(_0x55ca7e);await assertValueSourceReadable(_0x4e35a6);const _0x27c576=await withAppConfigApiBoundary(_0x263e66(0x17a),{'appCode':_0x55ca7e[_0x263e66(0x180)],'key':_0x48c285},()=>getAppConfigByKey(_0x55ca7e['appCode'],_0x48c285)),_0x2fda11=_0x27c576?_0x263e66(0x18a):_0x263e66(0x17b),_0x1abf7e=_0x27c576?projectAppConfig(_0x27c576):null,_0x1aa29e=plannedAppConfig({'appCode':_0x55ca7e['appCode'],'key':_0x48c285,'tags':_0x39ee3a??_0x27c576?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x2fda11,'appCode':_0x55ca7e[_0x263e66(0x180)],'key':_0x48c285,'before':_0x1abf7e,'after':_0x1aa29e,'dryRun':!![]}),{'method':_0x263e66(0x188),'url':_0x2fda11===_0x263e66(0x18a)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x5d48ad){const _0x2de4f5=a27_0x16311d,_0x34e3b0=readKeyArg(_0x5d48ad),_0x4102a3=readOptionalTags(_0x5d48ad),_0x198788=await withAppConfigApiBoundary('get',{'appCode':_0x5d48ad[_0x2de4f5(0x180)],'key':_0x34e3b0},()=>getAppConfigByKey(_0x5d48ad[_0x2de4f5(0x180)],_0x34e3b0)),_0x5c9bb1=_0x198788?projectAppConfig(_0x198788):null,_0x59c1e0=_0x198788?_0x2de4f5(0x18a):_0x2de4f5(0x17b),{value:_0x50e051,warnings:_0x4ce49a}=await readAppConfigValue(_0x5d48ad),_0x418111={'appCode':_0x5d48ad[_0x2de4f5(0x180)],'key':_0x34e3b0,'value':_0x50e051,'tags':_0x4102a3??_0x198788?.[_0x2de4f5(0x17d)]??undefined};await withAppConfigApiBoundary(_0x59c1e0,{'appCode':_0x5d48ad[_0x2de4f5(0x180)],'key':_0x34e3b0},async()=>{const _0x2367fd=_0x2de4f5;_0x198788?await updateAppConfig({..._0x418111,'id':requireAppConfigId(_0x198788,_0x34e3b0,_0x5d48ad[_0x2367fd(0x180)])}):await createAppConfig(_0x418111);});const _0x5156a4=await withAppConfigApiBoundary(_0x2de4f5(0x17a),{'appCode':_0x5d48ad[_0x2de4f5(0x180)],'key':_0x34e3b0},()=>getAppConfigByKey(_0x5d48ad[_0x2de4f5(0x180)],_0x34e3b0)),_0x3d4bf5=_0x5156a4?projectAppConfig(_0x5156a4):plannedAppConfig({'appCode':_0x5d48ad[_0x2de4f5(0x180)],'key':_0x34e3b0,'tags':_0x418111[_0x2de4f5(0x17d)],'hasValue':_0x50e051!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x59c1e0,'appCode':_0x5d48ad[_0x2de4f5(0x180)],'key':_0x34e3b0,'before':_0x5c9bb1,'after':_0x3d4bf5,'dryRun':![],'warnings':_0x4ce49a}),'message':(_0x59c1e0===_0x2de4f5(0x18a)?_0x2de4f5(0x185):_0x2de4f5(0x194))+'\x20app\x20config\x20'+_0x34e3b0};}};function requireAppConfigId(_0x55d5a6,_0x3b97d7,_0x12f4cc){const _0x2bb6f8=a27_0x16311d;if(typeof _0x55d5a6['id']==='number'&&Number[_0x2bb6f8(0x18f)](_0x55d5a6['id'])&&_0x55d5a6['id']>0x0)return _0x55d5a6['id'];throw CliErrors['apiError'](_0x2bb6f8(0x18b)+_0x3b97d7+_0x2bb6f8(0x184)+_0x12f4cc);}
@@ -1 +1 @@
1
- function a28_0x50fa(_0x5d0ce9,_0x45efa4){_0x5d0ce9=_0x5d0ce9-0xd4;const _0x512577=a28_0x5125();let _0x50fa71=_0x512577[_0x5d0ce9];return _0x50fa71;}const a28_0x12efbe=a28_0x50fa;(function(_0x3118ce,_0xcb3a96){const _0x18d4d6=a28_0x50fa,_0x1a2d52=_0x3118ce();while(!![]){try{const _0x2bd948=parseInt(_0x18d4d6(0xd5))/0x1*(-parseInt(_0x18d4d6(0xf6))/0x2)+parseInt(_0x18d4d6(0xfe))/0x3*(-parseInt(_0x18d4d6(0xf9))/0x4)+parseInt(_0x18d4d6(0xd6))/0x5*(-parseInt(_0x18d4d6(0xfb))/0x6)+-parseInt(_0x18d4d6(0xe1))/0x7+parseInt(_0x18d4d6(0x110))/0x8+-parseInt(_0x18d4d6(0x112))/0x9+-parseInt(_0x18d4d6(0x114))/0xa*(-parseInt(_0x18d4d6(0xf2))/0xb);if(_0x2bd948===_0xcb3a96)break;else _0x1a2d52['push'](_0x1a2d52['shift']());}catch(_0x3b66b1){_0x1a2d52['push'](_0x1a2d52['shift']());}}}(a28_0x5125,0x6d419));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a28_0x12efbe(0x106),'description':a28_0x12efbe(0xd7),'required':!![]};export const VALUE_ARG={'name':a28_0x12efbe(0x104),'description':a28_0x12efbe(0x113),'required':![]};export const TAGS_FLAG={'name':a28_0x12efbe(0xef),'type':a28_0x12efbe(0xea),'description':a28_0x12efbe(0xdc)};export const STDIN_FLAG={'name':a28_0x12efbe(0xe0),'type':'boolean','description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a28_0x12efbe(0x101),'type':a28_0x12efbe(0xea),'description':a28_0x12efbe(0xfc)};export const REVEAL_FLAG={'name':a28_0x12efbe(0x115),'type':a28_0x12efbe(0xe4),'description':a28_0x12efbe(0x10e),'default':![]};export function readKeyArg(_0x14a7f){const _0x5f269a=a28_0x12efbe,_0x28e0cd=_0x14a7f[_0x5f269a(0xfa)][0x0]?.['trim']()??'';return validateKey(_0x28e0cd),_0x28e0cd;}export function readOptionalTags(_0x30f50a){const _0x13b9b3=a28_0x12efbe,_0x53bc3c=_0x30f50a[_0x13b9b3(0xfd)]('tags')[_0x13b9b3(0xf8)]();if(!_0x53bc3c)return undefined;if(_0x53bc3c[_0x13b9b3(0xdf)]>0x20)throw CliErrors[_0x13b9b3(0xf1)]('App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.');return _0x53bc3c;}export function validateKey(_0xbec4c2){const _0x496821=a28_0x12efbe;if(!_0xbec4c2)throw CliErrors[_0x496821(0xf1)]('Missing\x20app-config\x20key.');if(_0xbec4c2['length']>0x100)throw CliErrors[_0x496821(0xf1)](_0x496821(0xec));}export function projectAppConfig(_0x2d6495,_0x2dac72){const _0x175b4f=a28_0x12efbe,_0x2cb78b=_0x2d6495[_0x175b4f(0x104)]!==undefined&&_0x2d6495[_0x175b4f(0x104)]!==null&&_0x2d6495[_0x175b4f(0x104)]!=='',_0x394a9e={'appCode':_0x2d6495['appCode'],'key':_0x2d6495[_0x175b4f(0x106)],'tags':_0x2d6495['tags']??undefined,'hasValue':_0x2cb78b,'valueRedacted':_0x2cb78b&&!_0x2dac72?.[_0x175b4f(0x115)],'gmtCreate':_0x2d6495[_0x175b4f(0x103)],'gmtModified':_0x2d6495['gmtModified']};return _0x2dac72?.[_0x175b4f(0x115)]&&(_0x394a9e[_0x175b4f(0x104)]=_0x2d6495['value']??'',_0x394a9e['valueRedacted']=![]),_0x394a9e;}function a28_0x5125(){const _0x38ed31=['kind','appCode','setEncoding','value\x20is\x20redacted','method','warnings','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','App\x20config\x20value\x20source\x20is\x20ambiguous.','3455216liKLtW','Failed\x20to\x20','3399966wsGwPN','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','192030ZjDnir','reveal','bool','43axzycY','3310790jXMwgF','Runtime\x20app-config\x20key','argument','once','data','key:\x20','Config\x20tags\x20for\x20filtering/display\x20metadata','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','name','length','stdin','4475954uOTidv','Environment\x20variable\x20is\x20not\x20set:\x20','end','boolean','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','defineProperties','push','Value\x20file\x20is\x20not\x20readable:\x20','appCode:\x20','string','utf8','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','url','hasValue','tags','Missing\x20app-config\x20value\x20source.','validation','1331qmAmfs','join','path','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','20146ARALKn','file','trim','71076wazTTT','args','6HLjLaU','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','str','33MjJARJ','env','after','from-env','before','gmtCreate','value','slice','key','flag'];a28_0x5125=function(){return _0x38ed31;};return a28_0x5125();}export function plannedAppConfig(_0x22e418){const _0x205c08=a28_0x12efbe,_0x599fdb=_0x22e418[_0x205c08(0xee)]??!![];return{'appCode':_0x22e418[_0x205c08(0x109)],'key':_0x22e418[_0x205c08(0x106)],'tags':_0x22e418[_0x205c08(0xef)]??undefined,'hasValue':_0x599fdb,'valueRedacted':_0x599fdb};}export function buildMutationData(_0x3900c8){const _0x232584=a28_0x12efbe;return{'operation':_0x3900c8['operation'],'selector':{'appCode':_0x3900c8[_0x232584(0x109)],'key':_0x3900c8['key']},'before':_0x3900c8[_0x232584(0x102)],'after':_0x3900c8[_0x232584(0x100)],'dryRun':_0x3900c8['dryRun'],'warnings':_0x3900c8[_0x232584(0x10d)]??[]};}export async function withAppConfigApiBoundary(_0x1cdef2,_0x132a74,_0x192725){const _0x4c24cf=a28_0x12efbe;try{return await _0x192725();}catch{const _0x2bdde3=[_0x4c24cf(0xe9)+_0x132a74[_0x4c24cf(0x109)]];if(_0x132a74[_0x4c24cf(0x106)])_0x2bdde3['push'](_0x4c24cf(0xdb)+_0x132a74['key']);_0x2bdde3['push'](_0x4c24cf(0x10b));throw CliErrors['apiError'](_0x4c24cf(0x111)+_0x1cdef2+'\x20app\x20config.',_0x2bdde3[_0x4c24cf(0xf3)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x4ea5c7,_0xc41552){const _0x710b83=a28_0x12efbe;return Object[_0x710b83(0xe6)](_0x4ea5c7,{'method':{'value':_0xc41552[_0x710b83(0x10c)],'enumerable':![]},'url':{'value':_0xc41552[_0x710b83(0xed)],'enumerable':![]}});}export function assertSingleValueSource(_0x55b5be){const _0x3bb2dc=a28_0x12efbe,_0x3c576e=[];_0x55b5be[_0x3bb2dc(0xfa)][_0x3bb2dc(0xdf)]>0x1&&_0x3c576e[_0x3bb2dc(0xe7)]({'kind':_0x3bb2dc(0xd8),'value':_0x55b5be[_0x3bb2dc(0xfa)][_0x3bb2dc(0x105)](0x1)[_0x3bb2dc(0xf3)]('\x20')});const _0x19a025=_0x55b5be[_0x3bb2dc(0x107)](_0x3bb2dc(0x104));_0x19a025!==undefined&&_0x19a025!==null&&_0x3c576e[_0x3bb2dc(0xe7)]({'kind':_0x3bb2dc(0xd8),'value':String(_0x19a025)});_0x55b5be[_0x3bb2dc(0xd4)]('stdin')&&_0x3c576e['push']({'kind':'stdin'});const _0x4d5a41=_0x55b5be[_0x3bb2dc(0xfd)]('from-env')[_0x3bb2dc(0xf8)]();_0x4d5a41&&_0x3c576e[_0x3bb2dc(0xe7)]({'kind':_0x3bb2dc(0xff),'name':_0x4d5a41});const _0x3d01=_0x55b5be[_0x3bb2dc(0xfd)](_0x3bb2dc(0xf7))['trim']();_0x3d01&&_0x3c576e[_0x3bb2dc(0xe7)]({'kind':_0x3bb2dc(0xf7),'path':_0x3d01});if(_0x3c576e[_0x3bb2dc(0xdf)]===0x0)throw CliErrors[_0x3bb2dc(0xf1)](_0x3bb2dc(0xf0),_0x3bb2dc(0xf5));if(_0x3c576e['length']>0x1)throw CliErrors[_0x3bb2dc(0xf1)](_0x3bb2dc(0x10f),_0x3bb2dc(0xdd));return _0x3c576e[0x0];}export async function assertValueSourceReadable(_0x1172f8){const _0x39577d=a28_0x12efbe;if(_0x1172f8[_0x39577d(0x108)]===_0x39577d(0xff)&&!(_0x1172f8['name']in process.env))throw CliErrors[_0x39577d(0xf1)](_0x39577d(0xe2)+_0x1172f8[_0x39577d(0xde)]);if(_0x1172f8[_0x39577d(0x108)]==='file')try{await access(_0x1172f8[_0x39577d(0xf4)]);}catch{throw CliErrors[_0x39577d(0xf1)](_0x39577d(0xe8)+_0x1172f8['path']);}}export async function readAppConfigValue(_0x22263a){const _0x54fb87=a28_0x12efbe,_0x48e3c1=assertSingleValueSource(_0x22263a),_0x16396a=[];if(_0x48e3c1['kind']==='argument')return _0x16396a[_0x54fb87(0xe7)](_0x54fb87(0xe5)),{'value':_0x48e3c1[_0x54fb87(0x104)]??'','source':_0x48e3c1['kind'],'warnings':_0x16396a};if(_0x48e3c1[_0x54fb87(0x108)]===_0x54fb87(0xe0))return{'value':await readStdin(),'source':_0x48e3c1[_0x54fb87(0x108)],'warnings':_0x16396a};if(_0x48e3c1[_0x54fb87(0x108)]===_0x54fb87(0xff)){if(!(_0x48e3c1['name']in process.env))throw CliErrors[_0x54fb87(0xf1)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x48e3c1['name']);return{'value':process.env[_0x48e3c1.name]??'','source':_0x48e3c1[_0x54fb87(0x108)],'warnings':_0x16396a};}return{'value':await readFile(_0x48e3c1[_0x54fb87(0xf4)],'utf8'),'source':_0x48e3c1[_0x54fb87(0x108)],'warnings':_0x16396a};}function readStdin(){return new Promise((_0x56cca1,_0x3bd412)=>{const _0x412005=a28_0x50fa;let _0x40f796='';process[_0x412005(0xe0)][_0x412005(0x10a)](_0x412005(0xeb)),process[_0x412005(0xe0)]['on'](_0x412005(0xda),_0x3ee90a=>{_0x40f796+=_0x3ee90a;}),process['stdin'][_0x412005(0xd9)](_0x412005(0xe3),()=>_0x56cca1(_0x40f796)),process[_0x412005(0xe0)][_0x412005(0xd9)]('error',_0x3bd412);});}
1
+ const a28_0x210b7e=a28_0x31b0;(function(_0x3d13db,_0x9da302){const _0x59d0fe=a28_0x31b0,_0x3c10be=_0x3d13db();while(!![]){try{const _0x173566=-parseInt(_0x59d0fe(0x121))/0x1+parseInt(_0x59d0fe(0x12d))/0x2*(parseInt(_0x59d0fe(0x111))/0x3)+parseInt(_0x59d0fe(0x10e))/0x4*(parseInt(_0x59d0fe(0x117))/0x5)+-parseInt(_0x59d0fe(0x11c))/0x6+parseInt(_0x59d0fe(0x141))/0x7*(parseInt(_0x59d0fe(0x11f))/0x8)+parseInt(_0x59d0fe(0x130))/0x9+parseInt(_0x59d0fe(0x131))/0xa*(-parseInt(_0x59d0fe(0x118))/0xb);if(_0x173566===_0x9da302)break;else _0x3c10be['push'](_0x3c10be['shift']());}catch(_0xd6a5e8){_0x3c10be['push'](_0x3c10be['shift']());}}}(a28_0x1f8e,0xd5391));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':a28_0x210b7e(0x144),'description':a28_0x210b7e(0x12e),'required':![]};export const TAGS_FLAG={'name':a28_0x210b7e(0x11b),'type':'string','description':a28_0x210b7e(0x10c)};export const STDIN_FLAG={'name':a28_0x210b7e(0x133),'type':'boolean','description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a28_0x210b7e(0x125),'type':a28_0x210b7e(0x12f),'description':a28_0x210b7e(0x11a)};export const REVEAL_FLAG={'name':a28_0x210b7e(0x10b),'type':a28_0x210b7e(0x120),'description':a28_0x210b7e(0x13d),'default':![]};function a28_0x31b0(_0x2179cd,_0x35a30e){_0x2179cd=_0x2179cd-0x108;const _0x1f8ef0=a28_0x1f8e();let _0x31b06b=_0x1f8ef0[_0x2179cd];return _0x31b06b;}export function readKeyArg(_0xa656be){const _0x41c213=a28_0x210b7e,_0x2a3efb=_0xa656be[_0x41c213(0x134)][0x0]?.[_0x41c213(0x135)]()??'';return validateKey(_0x2a3efb),_0x2a3efb;}function a28_0x1f8e(){const _0x159f1f=['hasValue','end','validation','slice','reveal','Config\x20tags\x20for\x20filtering/display\x20metadata','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','214004tAhJLP','warnings','path','2411592fVjCmL','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','error','data','join','key','30UZMgin','535216whumQk','after','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','tags','4215402kmRQlT','dryRun','apiError','2047432qFlvIJ','boolean','413207Ziqqkr','setEncoding','env','file','from-env','before','name','appCode','argument','kind','App\x20config\x20value\x20source\x20is\x20ambiguous.','Failed\x20to\x20','4bnQyNX','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','string','1743480BbaqqI','80jFyAfZ','push','stdin','args','trim','utf8','method','defineProperties','Environment\x20variable\x20is\x20not\x20set:\x20','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','Missing\x20app-config\x20key.','Value\x20file\x20is\x20not\x20readable:\x20','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','gmtModified','length','str','7WyqZSV','flag','once','value','gmtCreate','Missing\x20app-config\x20value\x20source.','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'];a28_0x1f8e=function(){return _0x159f1f;};return a28_0x1f8e();}export function readOptionalTags(_0x48c666){const _0x588f64=a28_0x210b7e,_0x18b59e=_0x48c666[_0x588f64(0x140)]('tags')[_0x588f64(0x135)]();if(!_0x18b59e)return undefined;if(_0x18b59e[_0x588f64(0x13f)]>0x20)throw CliErrors[_0x588f64(0x109)](_0x588f64(0x13a));return _0x18b59e;}export function validateKey(_0x8fac50){const _0x328837=a28_0x210b7e;if(!_0x8fac50)throw CliErrors[_0x328837(0x109)](_0x328837(0x13b));if(_0x8fac50['length']>0x100)throw CliErrors[_0x328837(0x109)](_0x328837(0x112));}export function projectAppConfig(_0x446ca6,_0x3a542f){const _0x53eb47=a28_0x210b7e,_0x3f185f=_0x446ca6[_0x53eb47(0x144)]!==undefined&&_0x446ca6[_0x53eb47(0x144)]!==null&&_0x446ca6[_0x53eb47(0x144)]!=='',_0x54a9a1={'appCode':_0x446ca6[_0x53eb47(0x128)],'key':_0x446ca6[_0x53eb47(0x116)],'tags':_0x446ca6['tags']??undefined,'hasValue':_0x3f185f,'valueRedacted':_0x3f185f&&!_0x3a542f?.[_0x53eb47(0x10b)],'gmtCreate':_0x446ca6[_0x53eb47(0x145)],'gmtModified':_0x446ca6[_0x53eb47(0x13e)]};return _0x3a542f?.[_0x53eb47(0x10b)]&&(_0x54a9a1[_0x53eb47(0x144)]=_0x446ca6['value']??'',_0x54a9a1['valueRedacted']=![]),_0x54a9a1;}export function plannedAppConfig(_0x40bb88){const _0x5c42ea=a28_0x210b7e,_0x4c2a77=_0x40bb88[_0x5c42ea(0x148)]??!![];return{'appCode':_0x40bb88[_0x5c42ea(0x128)],'key':_0x40bb88[_0x5c42ea(0x116)],'tags':_0x40bb88[_0x5c42ea(0x11b)]??undefined,'hasValue':_0x4c2a77,'valueRedacted':_0x4c2a77};}export function buildMutationData(_0x6be69b){const _0x53d3a5=a28_0x210b7e;return{'operation':_0x6be69b['operation'],'selector':{'appCode':_0x6be69b[_0x53d3a5(0x128)],'key':_0x6be69b[_0x53d3a5(0x116)]},'before':_0x6be69b[_0x53d3a5(0x126)],'after':_0x6be69b[_0x53d3a5(0x119)],'dryRun':_0x6be69b[_0x53d3a5(0x11d)],'warnings':_0x6be69b[_0x53d3a5(0x10f)]??[]};}export async function withAppConfigApiBoundary(_0x39e261,_0x1e2787,_0x278ac6){const _0xba3b9a=a28_0x210b7e;try{return await _0x278ac6();}catch{const _0x5c934d=['appCode:\x20'+_0x1e2787[_0xba3b9a(0x128)]];if(_0x1e2787[_0xba3b9a(0x116)])_0x5c934d[_0xba3b9a(0x132)]('key:\x20'+_0x1e2787[_0xba3b9a(0x116)]);_0x5c934d['push']('value\x20is\x20redacted');throw CliErrors[_0xba3b9a(0x11e)](_0xba3b9a(0x12c)+_0x39e261+'\x20app\x20config.',_0x5c934d[_0xba3b9a(0x115)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x5f4749,_0x7d7a82){const _0x269613=a28_0x210b7e;return Object[_0x269613(0x138)](_0x5f4749,{'method':{'value':_0x7d7a82[_0x269613(0x137)],'enumerable':![]},'url':{'value':_0x7d7a82['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x39318a){const _0x188056=a28_0x210b7e,_0x3d5a49=[];_0x39318a['args'][_0x188056(0x13f)]>0x1&&_0x3d5a49[_0x188056(0x132)]({'kind':_0x188056(0x129),'value':_0x39318a[_0x188056(0x134)][_0x188056(0x10a)](0x1)[_0x188056(0x115)]('\x20')});const _0x426c45=_0x39318a[_0x188056(0x142)](_0x188056(0x144));_0x426c45!==undefined&&_0x426c45!==null&&_0x3d5a49['push']({'kind':'argument','value':String(_0x426c45)});_0x39318a['bool'](_0x188056(0x133))&&_0x3d5a49[_0x188056(0x132)]({'kind':_0x188056(0x133)});const _0x184751=_0x39318a[_0x188056(0x140)]('from-env')[_0x188056(0x135)]();_0x184751&&_0x3d5a49[_0x188056(0x132)]({'kind':_0x188056(0x123),'name':_0x184751});const _0x4d7c26=_0x39318a[_0x188056(0x140)](_0x188056(0x124))[_0x188056(0x135)]();_0x4d7c26&&_0x3d5a49['push']({'kind':_0x188056(0x124),'path':_0x4d7c26});if(_0x3d5a49[_0x188056(0x13f)]===0x0)throw CliErrors[_0x188056(0x109)](_0x188056(0x146),'Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x3d5a49[_0x188056(0x13f)]>0x1)throw CliErrors[_0x188056(0x109)](_0x188056(0x12b),_0x188056(0x10d));return _0x3d5a49[0x0];}export async function assertValueSourceReadable(_0x3147cd){const _0x25aa08=a28_0x210b7e;if(_0x3147cd['kind']===_0x25aa08(0x123)&&!(_0x3147cd[_0x25aa08(0x127)]in process.env))throw CliErrors[_0x25aa08(0x109)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x3147cd[_0x25aa08(0x127)]);if(_0x3147cd[_0x25aa08(0x12a)]===_0x25aa08(0x124))try{await access(_0x3147cd[_0x25aa08(0x110)]);}catch{throw CliErrors['validation'](_0x25aa08(0x13c)+_0x3147cd[_0x25aa08(0x110)]);}}export async function readAppConfigValue(_0x35786b){const _0x577949=a28_0x210b7e,_0x18415d=assertSingleValueSource(_0x35786b),_0x48b63e=[];if(_0x18415d[_0x577949(0x12a)]===_0x577949(0x129))return _0x48b63e[_0x577949(0x132)](_0x577949(0x147)),{'value':_0x18415d[_0x577949(0x144)]??'','source':_0x18415d['kind'],'warnings':_0x48b63e};if(_0x18415d[_0x577949(0x12a)]===_0x577949(0x133))return{'value':await readStdin(),'source':_0x18415d[_0x577949(0x12a)],'warnings':_0x48b63e};if(_0x18415d['kind']===_0x577949(0x123)){if(!(_0x18415d[_0x577949(0x127)]in process.env))throw CliErrors[_0x577949(0x109)](_0x577949(0x139)+_0x18415d['name']);return{'value':process.env[_0x18415d.name]??'','source':_0x18415d[_0x577949(0x12a)],'warnings':_0x48b63e};}return{'value':await readFile(_0x18415d[_0x577949(0x110)],_0x577949(0x136)),'source':_0x18415d[_0x577949(0x12a)],'warnings':_0x48b63e};}function readStdin(){return new Promise((_0x28feea,_0x2db4db)=>{const _0x383dbd=a28_0x31b0;let _0x37273e='';process['stdin'][_0x383dbd(0x122)](_0x383dbd(0x136)),process[_0x383dbd(0x133)]['on'](_0x383dbd(0x114),_0x27d784=>{_0x37273e+=_0x27d784;}),process[_0x383dbd(0x133)][_0x383dbd(0x143)](_0x383dbd(0x108),()=>_0x28feea(_0x37273e)),process[_0x383dbd(0x133)]['once'](_0x383dbd(0x113),_0x2db4db);});}
@@ -1 +1 @@
1
- function a29_0x5b33(_0x564959,_0x3f6e28){_0x564959=_0x564959-0x1f1;const _0x4da97e=a29_0x4da9();let _0x5b33b5=_0x4da97e[_0x564959];return _0x5b33b5;}function a29_0x4da9(){const _0x579b91=['10218824KfhhFl','logout','1223892FxtbOx','1939450gyArtM','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','8392QUQKqy','nonInteractive','log','login','Login\x20via\x20browser','1348pccHZL','5772CMBAln','511zteqRV','yes','auth','365BAcsJT','119940JsoDEO','12893598zuPxlW','read','✓\x20Logged\x20out'];a29_0x4da9=function(){return _0x579b91;};return a29_0x4da9();}const a29_0x26f38b=a29_0x5b33;(function(_0x3695e3,_0x58062f){const _0xe6a563=a29_0x5b33,_0x36cd1d=_0x3695e3();while(!![]){try{const _0x568685=parseInt(_0xe6a563(0x203))/0x1+-parseInt(_0xe6a563(0x1f7))/0x2*(-parseInt(_0xe6a563(0x1f8))/0x3)+-parseInt(_0xe6a563(0x1f2))/0x4*(parseInt(_0xe6a563(0x1fc))/0x5)+parseInt(_0xe6a563(0x1fd))/0x6*(-parseInt(_0xe6a563(0x1f9))/0x7)+-parseInt(_0xe6a563(0x201))/0x8+parseInt(_0xe6a563(0x1fe))/0x9+-parseInt(_0xe6a563(0x204))/0xa;if(_0x568685===_0x58062f)break;else _0x36cd1d['push'](_0x36cd1d['shift']());}catch(_0x2d95d1){_0x36cd1d['push'](_0x36cd1d['shift']());}}}(a29_0x4da9,0xd44c0));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a29_0x26f38b(0x1f5),'description':a29_0x26f38b(0x1f6),'risk':a29_0x26f38b(0x1ff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a29_0x26f38b(0x1fa),'type':'boolean','description':a29_0x26f38b(0x1f1),'default':![]}],async 'execute'(_0x1e5f09){const _0x4a23fa=a29_0x26f38b,{runAuthServer:_0x3fabc5}=await import('../../auth/auth-server-ui.js');return await _0x3fabc5({'autoYes':_0x1e5f09['bool'](_0x4a23fa(0x1fa)),'nonInteractive':_0x1e5f09[_0x4a23fa(0x1f3)]}),{'ok':!![]};}},{'service':a29_0x26f38b(0x1fb),'command':a29_0x26f38b(0x202),'description':'Clear\x20login\x20session','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4c2463){const _0x16bbb3=a29_0x26f38b;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x16bbb3(0x1f4)](_0x16bbb3(0x200))):console[_0x16bbb3(0x1f4)]('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
1
+ const a29_0x4c963c=a29_0xa705;(function(_0x4d506a,_0x4f51f4){const _0x179b36=a29_0xa705,_0x2cfd0f=_0x4d506a();while(!![]){try{const _0x28ee23=-parseInt(_0x179b36(0x170))/0x1+parseInt(_0x179b36(0x172))/0x2+parseInt(_0x179b36(0x17f))/0x3+parseInt(_0x179b36(0x17d))/0x4+-parseInt(_0x179b36(0x16e))/0x5*(-parseInt(_0x179b36(0x17a))/0x6)+-parseInt(_0x179b36(0x17b))/0x7+-parseInt(_0x179b36(0x176))/0x8;if(_0x28ee23===_0x4f51f4)break;else _0x2cfd0f['push'](_0x2cfd0f['shift']());}catch(_0x1c3bd4){_0x2cfd0f['push'](_0x2cfd0f['shift']());}}}(a29_0x4e47,0xdf1fa));function a29_0x4e47(){const _0x837f5a=['login','yes','21678152KVdMxJ','write','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','bool','64728VFknrL','3126886yEKUMY','Clear\x20login\x20session','4768700ALmSeb','nonInteractive','287145hHbYNP','!\x20Not\x20logged\x20in','log','650HrWLSB','logout','224123QDjXfZ','boolean','3208348PSMFrD','✓\x20Logged\x20out'];a29_0x4e47=function(){return _0x837f5a;};return a29_0x4e47();}import{unlinkSync,existsSync}from'node:fs';function a29_0xa705(_0x5487b2,_0x3a47b5){_0x5487b2=_0x5487b2-0x16c;const _0x4e4799=a29_0x4e47();let _0xa7056d=_0x4e4799[_0x5487b2];return _0xa7056d;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a29_0x4c963c(0x174),'description':'Login\x20via\x20browser','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a29_0x4c963c(0x175),'type':a29_0x4c963c(0x171),'description':a29_0x4c963c(0x178),'default':![]}],async 'execute'(_0x5c60ce){const _0x5b9199=a29_0x4c963c,{runAuthServer:_0x4493a4}=await import('../../auth/auth-server-ui.js');return await _0x4493a4({'autoYes':_0x5c60ce[_0x5b9199(0x179)](_0x5b9199(0x175)),'nonInteractive':_0x5c60ce[_0x5b9199(0x17e)]}),{'ok':!![]};}},{'service':'auth','command':a29_0x4c963c(0x16f),'description':a29_0x4c963c(0x17c),'risk':a29_0x4c963c(0x177),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x243dea){const _0x19b35a=a29_0x4c963c;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x19b35a(0x16d)](_0x19b35a(0x173))):console['log'](_0x19b35a(0x16c)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a30_0x23515b=a30_0x1a31;(function(_0x3c71c8,_0x2d3ad9){const _0x42af12=a30_0x1a31,_0x52d986=_0x3c71c8();while(!![]){try{const _0xdcbc02=-parseInt(_0x42af12(0x175))/0x1*(parseInt(_0x42af12(0x19e))/0x2)+-parseInt(_0x42af12(0x179))/0x3*(parseInt(_0x42af12(0x176))/0x4)+-parseInt(_0x42af12(0x198))/0x5+parseInt(_0x42af12(0x158))/0x6*(-parseInt(_0x42af12(0x171))/0x7)+parseInt(_0x42af12(0x16c))/0x8+-parseInt(_0x42af12(0x1a9))/0x9*(parseInt(_0x42af12(0x194))/0xa)+parseInt(_0x42af12(0x185))/0xb*(parseInt(_0x42af12(0x173))/0xc);if(_0xdcbc02===_0x2d3ad9)break;else _0x52d986['push'](_0x52d986['shift']());}catch(_0x201652){_0x52d986['push'](_0x52d986['shift']());}}}(a30_0xfc04,0x2cedf));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';function a30_0xfc04(){const _0x2326fa=['.js','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','function-node','scriptsRootDir','description','Created\x20','Function\x20name\x20(valid\x20JS\x20identifier)','COMMON','\x20function:\x20','map','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','question','datasetcode','Script\x20description','Operation\x20type\x20\x22','81432GqitXS','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','Select\x20dataset:','No\x20datasets\x20found\x20for\x20this\x20app.','name','623oTGkXJ','trim','2161428xdElIK','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','17UZtaBh','1177780RTJznE','UNKNOWN','close','3Dhowmj','includes','stderr','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','write','bff','code','Available\x20aliases:\x20','str','\x0a\x20*\x20[触发节点]\x20','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','stdin','44bNGjUW','\x22\x20not\x20found.\x20','length','ENDPOINT','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','create','operationType','isInteger','validation','join','keys','datasetCode','functionNode','Trigger\x20node\x20(HOOK\x20only)','Dataset\x20not\x20found\x20for\x20code\x20\x22','1640evoGyp','nonInteractive','appCode','\x22\x20not\x20found\x20for\x20dataset\x20','88545ZebopP','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Invalid\x20dataset\x20selection.','File\x20already\x20exists:\x20','apiDir','1430zMFGER','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Operation\x20type\x20(HOOK\x20only)','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','Select\x20operation\x20type:','Available:\x20','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Alias\x20\x22','parseInt','string','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','9216xSIotR','\x0a\x20*\x20[脚本名称]\x20','type','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','tableName','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','source','before','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','No\x20api.ts\x20found.\x20Run\x20`','HOOK\x20requires\x20alias/operation/node\x20options.','alias','3666VhNrVe','read','HOOK','after','operation-type'];a30_0xfc04=function(){return _0x2326fa;};return a30_0xfc04();}function a30_0x1a31(_0x5367c4,_0x5c84b1){_0x5367c4=_0x5367c4-0x154;const _0xfc04e5=a30_0xfc04();let _0x1a315a=_0xfc04e5[_0x5367c4];return _0x1a315a;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a30_0x23515b(0x17e),'command':a30_0x23515b(0x18a),'description':a30_0x23515b(0x154),'risk':a30_0x23515b(0x159),'flags':[{'name':'type','type':'string','required':!![],'enum':[a30_0x23515b(0x164),a30_0x23515b(0x188),a30_0x23515b(0x15a)],'description':'Script\x20type'},{'name':'name','type':'string','required':!![],'description':a30_0x23515b(0x163)},{'name':a30_0x23515b(0x161),'type':a30_0x23515b(0x1a7),'description':a30_0x23515b(0x16a)},{'name':a30_0x23515b(0x157),'type':'string','description':a30_0x23515b(0x1a4)},{'name':a30_0x23515b(0x169),'type':'string','description':a30_0x23515b(0x19a)},{'name':a30_0x23515b(0x15c),'type':a30_0x23515b(0x1a7),'description':a30_0x23515b(0x1a0)},{'name':a30_0x23515b(0x15f),'type':a30_0x23515b(0x1a7),'description':a30_0x23515b(0x192),'enum':['before','after']}],async 'validate'(_0xeea33a){const _0x1c645d=a30_0x23515b,_0x38b0d5=_0xeea33a['str'](_0x1c645d(0x170));if(!isValidBffFunctionName(_0x38b0d5))throw CliErrors[_0x1c645d(0x18d)]('Invalid\x20function\x20name\x20\x22'+_0x38b0d5+_0x1c645d(0x17c));},async 'execute'(_0x230196){const _0x187003=a30_0x23515b,_0x3e5b3d=loadBffProjectConfig(_0x230196['appCode']),_0x594f08=_0x230196[_0x187003(0x181)](_0x187003(0x1ab)),_0x2bb4ba=_0x230196['str']('name'),_0x3e438a=_0x230196[_0x187003(0x181)]('description')||undefined,_0x116ab4=_0x594f08===_0x187003(0x15a)?await resolveHookOptions(_0x3e5b3d,_0x230196):undefined,_0xa405c1=buildFilePath(_0x3e5b3d,_0x594f08,_0x2bb4ba,_0x116ab4);if(await fileExists(_0xa405c1))throw CliErrors[_0x187003(0x18d)](_0x187003(0x19c)+_0xa405c1);await mkdir(dirname(_0xa405c1),{'recursive':!![]});const _0x208e5a=generateTemplate(_0x594f08,_0x2bb4ba,_0x230196[_0x187003(0x196)],_0x3e438a,_0x116ab4);await writeFile(_0xa405c1,_0x208e5a,'utf8');const _0x30d297={'type':_0x594f08,'name':_0x2bb4ba,'path':_0xa405c1};if(_0x3e438a)_0x30d297['description']=_0x3e438a;if(_0x116ab4){if(_0x116ab4[_0x187003(0x157)])_0x30d297[_0x187003(0x157)]=_0x116ab4['alias'];_0x30d297[_0x187003(0x190)]=_0x116ab4['datasetCode'],_0x30d297[_0x187003(0x18b)]=_0x116ab4[_0x187003(0x18b)],_0x30d297['functionNode']=_0x116ab4[_0x187003(0x191)];}return{'ok':!![],'data':_0x30d297,'message':_0x187003(0x162)+_0x594f08+_0x187003(0x165)+_0x2bb4ba};}};async function resolveHookOptions(_0x4ba182,_0x3ce502){const _0x442f97=a30_0x23515b,_0xf7f7b3=loadAliasMap(_0x3ce502[_0x442f97(0x19d)],undefined,resolveApiFilePath(_0x3ce502[_0x442f97(0x19d)],_0x3ce502['appCode'])),_0x4c9362=_0xf7f7b3[_0x442f97(0x187)]>0x0;let _0x31f942,_0x30f5a5,_0x407ae8;const _0x333d14=_0x3ce502['str'](_0x442f97(0x157)),_0x54a60a=_0x3ce502[_0x442f97(0x181)](_0x442f97(0x169));if(_0x333d14){const _0x4c537c=resolveAlias(_0x3ce502[_0x442f97(0x19d)],_0x333d14,undefined,resolveApiFilePath(_0x3ce502[_0x442f97(0x19d)],_0x3ce502['appCode']));if(!_0x4c537c){const _0xc9b916=_0x4c9362?_0x442f97(0x180)+_0xf7f7b3[_0x442f97(0x166)](_0x1b0f41=>_0x1b0f41[_0x442f97(0x157)])[_0x442f97(0x18e)](',\x20'):_0x442f97(0x155)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x442f97(0x18d)](_0x442f97(0x1a5)+_0x333d14+_0x442f97(0x186)+_0xc9b916);}_0x31f942=_0x333d14,_0x30f5a5=_0x4c537c;}else{if(_0x54a60a){_0x30f5a5=_0x54a60a;const _0x147356=_0xf7f7b3['find'](_0x22b1ee=>_0x22b1ee[_0x442f97(0x190)]===_0x54a60a);_0x31f942=_0x147356?.[_0x442f97(0x157)];}else{if(_0x3ce502['nonInteractive'])throw CliErrors[_0x442f97(0x18d)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x4c9362){const _0x5694ce=_0xf7f7b3[_0x442f97(0x166)](_0x53e7af=>_0x53e7af[_0x442f97(0x157)]+'\x20('+_0x53e7af[_0x442f97(0x1ad)]+')'),_0x29256f=await promptSelect(_0x442f97(0x16e),_0x5694ce),_0x4987d4=_0xf7f7b3[_0x29256f];if(!_0x4987d4)throw CliErrors[_0x442f97(0x18d)](_0x442f97(0x19b));_0x31f942=_0x4987d4[_0x442f97(0x157)],_0x30f5a5=_0x4987d4[_0x442f97(0x190)];}else{const _0x3b5833=await listDatasets(_0x3ce502['appCode']);if(_0x3b5833['length']===0x0)throw CliErrors[_0x442f97(0x18d)](_0x442f97(0x16f));const _0x24b560=_0x3b5833['map'](_0x1a5139=>_0x1a5139[_0x442f97(0x170)]+'\x20['+(_0x1a5139[_0x442f97(0x1b0)]??_0x442f97(0x177))+']\x20('+_0x1a5139['code']+')'),_0x5203f4=await promptSelect(_0x442f97(0x16e),_0x24b560),_0x1f1241=_0x3b5833[_0x5203f4];if(!_0x1f1241)throw CliErrors[_0x442f97(0x18d)]('Invalid\x20dataset\x20selection.');_0x30f5a5=_0x1f1241[_0x442f97(0x17f)],_0x31f942=undefined;}}}}const _0x562ff5=await listDatasets(_0x3ce502[_0x442f97(0x196)]),_0x41a077=_0x562ff5['find'](_0x29566e=>_0x29566e['code']===_0x30f5a5);if(!_0x41a077)throw CliErrors[_0x442f97(0x18d)](_0x442f97(0x193)+_0x30f5a5+'\x22.\x20'+(_0x31f942?_0x442f97(0x183)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x407ae8=_0x41a077['id'];const _0x1c8b8e=_0x31f942??_0x30f5a5,_0x8e44b=await listBffDatasetOperations(_0x3ce502['appCode'],_0x407ae8),_0x495fb9=_0x8e44b?Object[_0x442f97(0x18f)](_0x8e44b):[];if(_0x495fb9[_0x442f97(0x187)]===0x0)throw CliErrors[_0x442f97(0x18d)](_0x442f97(0x1af)+_0x1c8b8e+'.');let _0x40f3d7;const _0x558e0f=_0x3ce502['str']('operation-type');if(_0x558e0f){if(!_0x495fb9[_0x442f97(0x17a)](_0x558e0f))throw CliErrors[_0x442f97(0x18d)](_0x442f97(0x16b)+_0x558e0f+_0x442f97(0x197)+_0x1c8b8e+'.\x20'+(_0x442f97(0x1a3)+_0x495fb9[_0x442f97(0x18e)](',\x20')));_0x40f3d7=_0x558e0f;}else{if(_0x3ce502[_0x442f97(0x195)])throw CliErrors[_0x442f97(0x18d)](_0x442f97(0x1ac));const _0x4301d1=await promptSelect(_0x442f97(0x1a2),_0x495fb9);_0x40f3d7=_0x495fb9[_0x4301d1]??_0x495fb9[0x0];}let _0x219ba6=normalizeHookFunctionNode(_0x3ce502['str'](_0x442f97(0x15f)));if(!_0x219ba6){if(_0x3ce502['str'](_0x442f97(0x15f)))throw CliErrors['validation']('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x3ce502[_0x442f97(0x195)])throw CliErrors[_0x442f97(0x18d)](_0x442f97(0x189));const _0x341ffd=await promptSelect('Select\x20trigger\x20node:',[_0x442f97(0x1b1),_0x442f97(0x15b)]);_0x219ba6=[_0x442f97(0x1b1),_0x442f97(0x15b)][_0x341ffd]??_0x442f97(0x1b1);}return{'alias':_0x31f942,'datasetCode':_0x30f5a5,'datasetId':_0x407ae8,'operationType':_0x40f3d7,'functionNode':_0x219ba6};}async function promptSelect(_0x5ac42b,_0x53e834){const _0x54e41a=a30_0x23515b;if(_0x53e834['length']===0x1)return 0x0;for(const [_0xdf7318,_0x35349b]of _0x53e834['entries']()){process[_0x54e41a(0x17b)][_0x54e41a(0x17d)]('\x20\x20'+(_0xdf7318+0x1)+'.\x20'+_0x35349b+'\x0a');}const _0x2e80ac=createInterface({'input':process[_0x54e41a(0x184)],'output':process['stderr']});while(!![]){const _0x47be4c=await new Promise(_0x17f883=>{const _0x1901c7=_0x54e41a;_0x2e80ac[_0x1901c7(0x168)](_0x5ac42b+'\x20',_0x17f883);}),_0x5a8577=Number[_0x54e41a(0x1a6)](_0x47be4c[_0x54e41a(0x172)](),0xa);if(Number[_0x54e41a(0x18c)](_0x5a8577)&&_0x5a8577>=0x1&&_0x5a8577<=_0x53e834['length'])return _0x2e80ac[_0x54e41a(0x178)](),_0x5a8577-0x1;process[_0x54e41a(0x17b)][_0x54e41a(0x17d)](_0x54e41a(0x199)+_0x53e834['length']+'.\x0a');}}function buildFilePath(_0x3fafd1,_0x51de42,_0x4e1da9,_0x2823c1){const _0x9b35d5=a30_0x23515b;if(_0x51de42===_0x9b35d5(0x15a)){if(!_0x2823c1)throw CliErrors[_0x9b35d5(0x18d)](_0x9b35d5(0x156));const _0x209f4e=_0x2823c1['alias']??_0x2823c1['datasetCode'];return join(_0x3fafd1[_0x9b35d5(0x160)],_0x9b35d5(0x15a),_0x209f4e,_0x2823c1['operationType'],_0x2823c1[_0x9b35d5(0x191)],_0x4e1da9+_0x9b35d5(0x15d));}return join(_0x3fafd1[_0x9b35d5(0x160)],_0x51de42,_0x4e1da9+'.js');}export function generateTemplate(_0x541b4d,_0x4618af,_0x1caf0a,_0x54a336,_0x576805){const _0x4c10fc=a30_0x23515b,_0x3f0f4c=_0x54a336?.[_0x4c10fc(0x172)]()||'TODO:\x20add\x20script\x20description';if(_0x541b4d===_0x4c10fc(0x164))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x3f0f4c+_0x4c10fc(0x1aa)+_0x4618af+_0x4c10fc(0x15e)+_0x4618af+'.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x4618af+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x541b4d===_0x4c10fc(0x188))return _0x4c10fc(0x1a8)+_0x3f0f4c+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'+_0x1caf0a+'/'+_0x4618af+_0x4c10fc(0x1ae)+_0x4618af+_0x4c10fc(0x16d);if(!_0x576805)throw CliErrors[_0x4c10fc(0x18d)](_0x4c10fc(0x1a1));return _0x4c10fc(0x19f)+_0x3f0f4c+_0x4c10fc(0x174)+_0x1caf0a+'/'+_0x576805[_0x4c10fc(0x190)]+'/'+_0x576805[_0x4c10fc(0x18b)]+_0x4c10fc(0x182)+_0x576805['functionNode']+_0x4c10fc(0x167)+_0x4618af+_0x4c10fc(0x16d);}
1
+ const a30_0x44d0ac=a30_0x4a11;(function(_0x5f50e8,_0x1d8b4f){const _0x1bedc0=a30_0x4a11,_0x4f4efd=_0x5f50e8();while(!![]){try{const _0x14ecff=parseInt(_0x1bedc0(0x185))/0x1*(parseInt(_0x1bedc0(0x183))/0x2)+-parseInt(_0x1bedc0(0x166))/0x3+parseInt(_0x1bedc0(0x18c))/0x4+-parseInt(_0x1bedc0(0x17e))/0x5*(-parseInt(_0x1bedc0(0x1bb))/0x6)+parseInt(_0x1bedc0(0x1b3))/0x7*(-parseInt(_0x1bedc0(0x181))/0x8)+parseInt(_0x1bedc0(0x17c))/0x9+parseInt(_0x1bedc0(0x1a2))/0xa*(-parseInt(_0x1bedc0(0x191))/0xb);if(_0x14ecff===_0x1d8b4f)break;else _0x4f4efd['push'](_0x4f4efd['shift']());}catch(_0x46581){_0x4f4efd['push'](_0x4f4efd['shift']());}}}(a30_0x1bfd,0x9a043));function a30_0x1bfd(){const _0x3381ac=['Invalid\x20function\x20name\x20\x22','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','datasetcode','after','\x20api\x20pull`\x20to\x20refresh.','File\x20already\x20exists:\x20','\x0a\x20*\x20[触发节点]\x20','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','before','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','Invalid\x20dataset\x20selection.','COMMON','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','str','functionNode','appCode','69460UwPlVz','stdin','source','alias','tableName','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','question','length',']\x20(','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','validation','apiDir','Select\x20trigger\x20node:','Script\x20type','ENDPOINT','Select\x20operation\x20type:','1603JWnKQL','\x22\x20not\x20found.\x20','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Select\x20dataset:','name','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','join','description','2814ZVtSdS','keys','read','\x22\x20not\x20found\x20for\x20dataset\x20','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','stderr','650931WvOAEo','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Function\x20name\x20(valid\x20JS\x20identifier)','Trigger\x20node\x20(HOOK\x20only)','trim','\x0a\x20*\x20[脚本名称]\x20','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','operationType','write','\x22.\x20','Operation\x20type\x20(HOOK\x20only)','Available:\x20','HOOK','function-node','code','scriptsRootDir','utf8','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','isInteger','includes','Script\x20description','5262606PUIMzg','datasetCode','11875zAOExC','\x20function:\x20','string','28400vfcIly','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','88636rTeCmN','UNKNOWN','1gSzdDe','.js','No\x20datasets\x20found\x20for\x20this\x20app.','bff','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','HOOK\x20requires\x20alias/operation/node\x20options.','Available\x20aliases:\x20','2144180YVpdnH','map','nonInteractive','operation-type','No\x20api.ts\x20found.\x20Run\x20`','979TaxBMR'];a30_0x1bfd=function(){return _0x3381ac;};return a30_0x1bfd();}import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a30_0x44d0ac(0x188),'command':'create','description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':a30_0x44d0ac(0x1bd),'flags':[{'name':'type','type':'string','required':!![],'enum':[a30_0x44d0ac(0x19d),'ENDPOINT',a30_0x44d0ac(0x173)],'description':a30_0x44d0ac(0x1b0)},{'name':'name','type':a30_0x44d0ac(0x180),'required':!![],'description':a30_0x44d0ac(0x169)},{'name':a30_0x44d0ac(0x1ba),'type':a30_0x44d0ac(0x180),'description':a30_0x44d0ac(0x17b)},{'name':'alias','type':a30_0x44d0ac(0x180),'description':a30_0x44d0ac(0x167)},{'name':a30_0x44d0ac(0x194),'type':'string','description':a30_0x44d0ac(0x1b5)},{'name':'operation-type','type':a30_0x44d0ac(0x180),'description':a30_0x44d0ac(0x171)},{'name':a30_0x44d0ac(0x174),'type':'string','description':a30_0x44d0ac(0x16a),'enum':['before',a30_0x44d0ac(0x195)]}],async 'validate'(_0x427c17){const _0x2f2095=a30_0x44d0ac,_0x196cb8=_0x427c17[_0x2f2095(0x19f)](_0x2f2095(0x1b7));if(!isValidBffFunctionName(_0x196cb8))throw CliErrors['validation'](_0x2f2095(0x192)+_0x196cb8+_0x2f2095(0x1a7));},async 'execute'(_0x3f4c93){const _0x371941=a30_0x44d0ac,_0x340085=loadBffProjectConfig(_0x3f4c93[_0x371941(0x1a1)]),_0xbf93b0=_0x3f4c93[_0x371941(0x19f)]('type'),_0xda4755=_0x3f4c93[_0x371941(0x19f)](_0x371941(0x1b7)),_0x7c036c=_0x3f4c93[_0x371941(0x19f)](_0x371941(0x1ba))||undefined,_0x4d2a82=_0xbf93b0===_0x371941(0x173)?await resolveHookOptions(_0x340085,_0x3f4c93):undefined,_0x4de679=buildFilePath(_0x340085,_0xbf93b0,_0xda4755,_0x4d2a82);if(await fileExists(_0x4de679))throw CliErrors[_0x371941(0x1ad)](_0x371941(0x197)+_0x4de679);await mkdir(dirname(_0x4de679),{'recursive':!![]});const _0x331273=generateTemplate(_0xbf93b0,_0xda4755,_0x3f4c93['appCode'],_0x7c036c,_0x4d2a82);await writeFile(_0x4de679,_0x331273,_0x371941(0x177));const _0x46d1cc={'type':_0xbf93b0,'name':_0xda4755,'path':_0x4de679};if(_0x7c036c)_0x46d1cc[_0x371941(0x1ba)]=_0x7c036c;if(_0x4d2a82){if(_0x4d2a82[_0x371941(0x1a5)])_0x46d1cc['alias']=_0x4d2a82[_0x371941(0x1a5)];_0x46d1cc[_0x371941(0x17d)]=_0x4d2a82['datasetCode'],_0x46d1cc[_0x371941(0x16e)]=_0x4d2a82['operationType'],_0x46d1cc[_0x371941(0x1a0)]=_0x4d2a82[_0x371941(0x1a0)];}return{'ok':!![],'data':_0x46d1cc,'message':'Created\x20'+_0xbf93b0+_0x371941(0x17f)+_0xda4755};}};function a30_0x4a11(_0x3b12f9,_0x1e7ebc){_0x3b12f9=_0x3b12f9-0x166;const _0x1bfd0d=a30_0x1bfd();let _0x4a1179=_0x1bfd0d[_0x3b12f9];return _0x4a1179;}async function resolveHookOptions(_0x5c295a,_0x5730d8){const _0x4ebc77=a30_0x44d0ac,_0xc6c714=loadAliasMap(_0x5730d8[_0x4ebc77(0x1ae)],undefined,resolveApiFilePath(_0x5730d8[_0x4ebc77(0x1ae)],_0x5730d8[_0x4ebc77(0x1a1)])),_0x5cd568=_0xc6c714[_0x4ebc77(0x1aa)]>0x0;let _0x41dece,_0x5f3270,_0x3884a6;const _0x482329=_0x5730d8[_0x4ebc77(0x19f)](_0x4ebc77(0x1a5)),_0x39fc16=_0x5730d8[_0x4ebc77(0x19f)](_0x4ebc77(0x194));if(_0x482329){const _0x551500=resolveAlias(_0x5730d8['apiDir'],_0x482329,undefined,resolveApiFilePath(_0x5730d8[_0x4ebc77(0x1ae)],_0x5730d8['appCode']));if(!_0x551500){const _0x23a92f=_0x5cd568?_0x4ebc77(0x18b)+_0xc6c714[_0x4ebc77(0x18d)](_0x31b171=>_0x31b171[_0x4ebc77(0x1a5)])[_0x4ebc77(0x1b9)](',\x20'):_0x4ebc77(0x190)+CLI_BIN_NAME+_0x4ebc77(0x193);throw CliErrors[_0x4ebc77(0x1ad)]('Alias\x20\x22'+_0x482329+_0x4ebc77(0x1b4)+_0x23a92f);}_0x41dece=_0x482329,_0x5f3270=_0x551500;}else{if(_0x39fc16){_0x5f3270=_0x39fc16;const _0x2d7708=_0xc6c714['find'](_0x2776e6=>_0x2776e6['datasetCode']===_0x39fc16);_0x41dece=_0x2d7708?.[_0x4ebc77(0x1a5)];}else{if(_0x5730d8[_0x4ebc77(0x18e)])throw CliErrors[_0x4ebc77(0x1ad)](_0x4ebc77(0x168));else{if(_0x5cd568){const _0x370404=_0xc6c714[_0x4ebc77(0x18d)](_0x498db3=>_0x498db3[_0x4ebc77(0x1a5)]+'\x20('+_0x498db3[_0x4ebc77(0x1a6)]+')'),_0x525ab1=await promptSelect(_0x4ebc77(0x1b6),_0x370404),_0x2610db=_0xc6c714[_0x525ab1];if(!_0x2610db)throw CliErrors[_0x4ebc77(0x1ad)](_0x4ebc77(0x19c));_0x41dece=_0x2610db[_0x4ebc77(0x1a5)],_0x5f3270=_0x2610db[_0x4ebc77(0x17d)];}else{const _0x12d4f0=await listDatasets(_0x5730d8[_0x4ebc77(0x1a1)]);if(_0x12d4f0[_0x4ebc77(0x1aa)]===0x0)throw CliErrors[_0x4ebc77(0x1ad)](_0x4ebc77(0x187));const _0x2d63e5=_0x12d4f0['map'](_0xd901de=>_0xd901de[_0x4ebc77(0x1b7)]+'\x20['+(_0xd901de[_0x4ebc77(0x1a4)]??_0x4ebc77(0x184))+_0x4ebc77(0x1ab)+_0xd901de[_0x4ebc77(0x175)]+')'),_0x1b5f29=await promptSelect('Select\x20dataset:',_0x2d63e5),_0x55a2e8=_0x12d4f0[_0x1b5f29];if(!_0x55a2e8)throw CliErrors['validation'](_0x4ebc77(0x19c));_0x5f3270=_0x55a2e8[_0x4ebc77(0x175)],_0x41dece=undefined;}}}}const _0x17df3e=await listDatasets(_0x5730d8[_0x4ebc77(0x1a1)]),_0x1a7a0a=_0x17df3e['find'](_0x35bdae=>_0x35bdae['code']===_0x5f3270);if(!_0x1a7a0a)throw CliErrors['validation']('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x5f3270+_0x4ebc77(0x170)+(_0x41dece?_0x4ebc77(0x1b8)+CLI_BIN_NAME+_0x4ebc77(0x196):''));_0x3884a6=_0x1a7a0a['id'];const _0x2f533d=_0x41dece??_0x5f3270,_0xd005b2=await listBffDatasetOperations(_0x5730d8[_0x4ebc77(0x1a1)],_0x3884a6),_0x5643fb=_0xd005b2?Object[_0x4ebc77(0x1bc)](_0xd005b2):[];if(_0x5643fb[_0x4ebc77(0x1aa)]===0x0)throw CliErrors[_0x4ebc77(0x1ad)]('No\x20operation\x20types\x20found\x20for\x20dataset\x20'+_0x2f533d+'.');let _0x2d6ad0;const _0x9de5cb=_0x5730d8['str'](_0x4ebc77(0x18f));if(_0x9de5cb){if(!_0x5643fb[_0x4ebc77(0x17a)](_0x9de5cb))throw CliErrors['validation']('Operation\x20type\x20\x22'+_0x9de5cb+_0x4ebc77(0x1be)+_0x2f533d+'.\x20'+(_0x4ebc77(0x172)+_0x5643fb[_0x4ebc77(0x1b9)](',\x20')));_0x2d6ad0=_0x9de5cb;}else{if(_0x5730d8[_0x4ebc77(0x18e)])throw CliErrors[_0x4ebc77(0x1ad)]('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x46a1e1=await promptSelect(_0x4ebc77(0x1b2),_0x5643fb);_0x2d6ad0=_0x5643fb[_0x46a1e1]??_0x5643fb[0x0];}let _0x308577=normalizeHookFunctionNode(_0x5730d8['str'](_0x4ebc77(0x174)));if(!_0x308577){if(_0x5730d8[_0x4ebc77(0x19f)](_0x4ebc77(0x174)))throw CliErrors['validation'](_0x4ebc77(0x19b));if(_0x5730d8[_0x4ebc77(0x18e)])throw CliErrors[_0x4ebc77(0x1ad)](_0x4ebc77(0x16d));const _0x5e549d=await promptSelect(_0x4ebc77(0x1af),[_0x4ebc77(0x19a),_0x4ebc77(0x195)]);_0x308577=[_0x4ebc77(0x19a),_0x4ebc77(0x195)][_0x5e549d]??_0x4ebc77(0x19a);}return{'alias':_0x41dece,'datasetCode':_0x5f3270,'datasetId':_0x3884a6,'operationType':_0x2d6ad0,'functionNode':_0x308577};}async function promptSelect(_0x14def4,_0x2de609){const _0x573b87=a30_0x44d0ac;if(_0x2de609[_0x573b87(0x1aa)]===0x1)return 0x0;for(const [_0x2e1e4,_0x3a4ed2]of _0x2de609['entries']()){process[_0x573b87(0x1c0)][_0x573b87(0x16f)]('\x20\x20'+(_0x2e1e4+0x1)+'.\x20'+_0x3a4ed2+'\x0a');}const _0x5584d4=createInterface({'input':process[_0x573b87(0x1a3)],'output':process[_0x573b87(0x1c0)]});while(!![]){const _0x5a6ab2=await new Promise(_0x209593=>{const _0x11a006=_0x573b87;_0x5584d4[_0x11a006(0x1a9)](_0x14def4+'\x20',_0x209593);}),_0xc7e02f=Number['parseInt'](_0x5a6ab2[_0x573b87(0x16b)](),0xa);if(Number[_0x573b87(0x179)](_0xc7e02f)&&_0xc7e02f>=0x1&&_0xc7e02f<=_0x2de609['length'])return _0x5584d4['close'](),_0xc7e02f-0x1;process[_0x573b87(0x1c0)][_0x573b87(0x16f)](_0x573b87(0x182)+_0x2de609[_0x573b87(0x1aa)]+'.\x0a');}}function buildFilePath(_0x3fd8e0,_0x4b92f9,_0x3cf99a,_0x4c5ba5){const _0x4c3e7e=a30_0x44d0ac;if(_0x4b92f9==='HOOK'){if(!_0x4c5ba5)throw CliErrors['validation'](_0x4c3e7e(0x18a));const _0x2096ae=_0x4c5ba5['alias']??_0x4c5ba5['datasetCode'];return join(_0x3fd8e0[_0x4c3e7e(0x176)],'HOOK',_0x2096ae,_0x4c5ba5[_0x4c3e7e(0x16e)],_0x4c5ba5[_0x4c3e7e(0x1a0)],_0x3cf99a+_0x4c3e7e(0x186));}return join(_0x3fd8e0[_0x4c3e7e(0x176)],_0x4b92f9,_0x3cf99a+_0x4c3e7e(0x186));}export function generateTemplate(_0x554255,_0xc7fae4,_0x11dd8d,_0x542d20,_0x382981){const _0x2f8c45=a30_0x44d0ac,_0xc02712=_0x542d20?.[_0x2f8c45(0x16b)]()||'TODO:\x20add\x20script\x20description';if(_0x554255===_0x2f8c45(0x19d))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0xc02712+_0x2f8c45(0x16c)+_0xc7fae4+_0x2f8c45(0x178)+_0xc7fae4+'.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0xc7fae4+_0x2f8c45(0x199);if(_0x554255===_0x2f8c45(0x1b1))return _0x2f8c45(0x1bf)+_0xc02712+_0x2f8c45(0x19e)+_0x11dd8d+'/'+_0xc7fae4+'\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0xc7fae4+_0x2f8c45(0x199);if(!_0x382981)throw CliErrors[_0x2f8c45(0x1ad)](_0x2f8c45(0x1a8));return _0x2f8c45(0x189)+_0xc02712+_0x2f8c45(0x1ac)+_0x11dd8d+'/'+_0x382981[_0x2f8c45(0x17d)]+'/'+_0x382981['operationType']+_0x2f8c45(0x198)+_0x382981[_0x2f8c45(0x1a0)]+'\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0xc7fae4+_0x2f8c45(0x199);}
@@ -1 +1 @@
1
- const a31_0xba05d6=a31_0x31e1;(function(_0x497bce,_0x38d6c1){const _0x31a344=a31_0x31e1,_0x1c3458=_0x497bce();while(!![]){try{const _0x30fbf4=parseInt(_0x31a344(0x1ea))/0x1+parseInt(_0x31a344(0x210))/0x2*(parseInt(_0x31a344(0x205))/0x3)+parseInt(_0x31a344(0x1db))/0x4+parseInt(_0x31a344(0x200))/0x5+parseInt(_0x31a344(0x1f8))/0x6*(parseInt(_0x31a344(0x1e3))/0x7)+-parseInt(_0x31a344(0x1f4))/0x8*(-parseInt(_0x31a344(0x20e))/0x9)+parseInt(_0x31a344(0x1f2))/0xa*(-parseInt(_0x31a344(0x209))/0xb);if(_0x30fbf4===_0x38d6c1)break;else _0x1c3458['push'](_0x1c3458['shift']());}catch(_0x1cf00e){_0x1c3458['push'](_0x1c3458['shift']());}}}(a31_0x2aec,0x469af));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a31_0x2aec(){const _0x556c1e=['appCode','567246DCgfBu','BFF\x20lock\x20file\x20not\x20found.','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','delete','find','lockFilePath','validation','join','10vbvBWm','trashedTo','2716808OHelQb','Deleted\x20','keys','replace','68286xwSTyD','\x20(local\x20file\x20moved\x20to\x20trash)','\x20\x20-\x20','stringify','<timestamp>','POST','Function\x20not\x20found:\x20','bff','2502000mEstJw','filter','startsWith','\x22\x20not\x20found\x20after\x20ensureLockScope.','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','557562nAsGuH','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','apps','map','19948874OFXrJD','high-risk-write','toISOString','includes','remoteId','9FZHjbC','scriptsRootDir','2dJMQAh','length','lastSync','string','1856432MNddgW','functions','target','/api/management/library/scripts/delete','Lock\x20scope\x20for\x20app\x20\x22','Would\x20delete\x20','trashDir','Local\x20delete\x20not\x20settled\x20for\x20','28lGFNzj','No\x20lock\x20entry\x20found\x20for\x20\x22','str','scriptsRoot','projectRoot','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.'];a31_0x2aec=function(){return _0x556c1e;};return a31_0x2aec();}import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a31_0xba05d6(0x1ff),'command':a31_0xba05d6(0x1ed),'description':a31_0xba05d6(0x204),'risk':a31_0xba05d6(0x20a),'flags':[{'name':a31_0xba05d6(0x1dd),'type':a31_0xba05d6(0x213),'required':!![],'description':a31_0xba05d6(0x206)}],async 'validate'(_0x5d9902){const _0x1a18f6=a31_0xba05d6,_0x17de4f=loadBffProjectConfig(_0x5d9902[_0x1a18f6(0x1e9)]),_0x209270=await readBffLockFile(_0x17de4f['lockFilePath']);if(!_0x209270)throw CliErrors['validation'](_0x1a18f6(0x1e8));},async 'dryRun'(_0x527457){const _0x10fcdb=a31_0xba05d6,_0x279cd6=loadBffProjectConfig(_0x527457[_0x10fcdb(0x1e9)]),_0x5f4252=await readBffLockFile(_0x279cd6[_0x10fcdb(0x1ef)]);if(!_0x5f4252)throw CliErrors[_0x10fcdb(0x1f0)](_0x10fcdb(0x1eb));const {appLock:_0x2b22fd}=ensureLockScope(_0x5f4252,_0x527457[_0x10fcdb(0x1e9)],_0x279cd6[_0x10fcdb(0x1e6)],_0x10fcdb(0x1ed)),_0x16f653=_0x527457['str'](_0x10fcdb(0x1dd)),_0x598b67=Object[_0x10fcdb(0x1f6)](_0x2b22fd[_0x10fcdb(0x1dc)]),_0xad2d6=resolveDeleteTarget(_0x16f653,_0x598b67),_0x1e07a5=_0x2b22fd[_0x10fcdb(0x1dc)][_0xad2d6];if(!_0x1e07a5)throw CliErrors[_0x10fcdb(0x1f0)](_0x10fcdb(0x1e4)+_0xad2d6+'\x22.');const _0x776185=resolveLocalFilePathFromLockKey(_0x279cd6,_0xad2d6),_0x564302=relative(_0x279cd6[_0x10fcdb(0x1e7)],_0x776185),_0x36077a=join(_0x279cd6['trashDir'],_0x10fcdb(0x1fc),_0x564302);return{'method':_0x10fcdb(0x1fd),'url':_0x10fcdb(0x1de),'body':{'appCode':_0x527457[_0x10fcdb(0x1e9)],'target':_0xad2d6,'remoteId':_0x1e07a5[_0x10fcdb(0x20d)],'localFilePath':_0x776185,'trashedPath':_0x36077a},'description':_0x10fcdb(0x1e0)+_0xad2d6+_0x10fcdb(0x1ec)};},async 'execute'(_0x29e1a9){const _0x58936a=a31_0xba05d6,_0x4605fd=loadBffProjectConfig(_0x29e1a9[_0x58936a(0x1e9)]),_0x17408e=await readBffLockFile(_0x4605fd[_0x58936a(0x1ef)]);if(!_0x17408e)throw CliErrors['validation'](_0x58936a(0x1eb));const {lockData:_0x2acf34,appLock:_0x4e62d4}=ensureLockScope(_0x17408e,_0x29e1a9[_0x58936a(0x1e9)],_0x4605fd[_0x58936a(0x1e6)],_0x58936a(0x1ed)),_0x2c4b02=JSON['parse'](JSON[_0x58936a(0x1fb)](_0x2acf34)),_0x148897=_0x2c4b02[_0x58936a(0x207)][_0x29e1a9[_0x58936a(0x1e9)]];if(!_0x148897)throw new Error(_0x58936a(0x1df)+_0x29e1a9[_0x58936a(0x1e9)]+_0x58936a(0x203));const _0x41884c=_0x29e1a9[_0x58936a(0x1e5)](_0x58936a(0x1dd)),_0x3e5c97=Object[_0x58936a(0x1f6)](_0x148897[_0x58936a(0x1dc)]),_0x95d940=resolveDeleteTarget(_0x41884c,_0x3e5c97),_0x3eeaaf=_0x148897[_0x58936a(0x1dc)][_0x95d940];if(!_0x3eeaaf)throw CliErrors[_0x58936a(0x1f0)](_0x58936a(0x1e4)+_0x95d940+'\x22.');await deleteBffScript(_0x3eeaaf['remoteId']),delete _0x148897[_0x58936a(0x1dc)][_0x95d940],_0x148897[_0x58936a(0x212)]=new Date()[_0x58936a(0x20b)](),await writeBffLockFile(_0x4605fd[_0x58936a(0x1ef)],_0x2c4b02);const _0x28b272=resolveLocalFilePathFromLockKey(_0x4605fd,_0x95d940);let _0x5bad3a;await fileExists(_0x28b272)&&(_0x5bad3a=await moveToTrash(_0x4605fd[_0x58936a(0x1e7)],_0x4605fd[_0x58936a(0x1e1)],_0x28b272),await cleanupEmptyDirectories(dirname(_0x28b272),_0x4605fd[_0x58936a(0x20f)]));await waitForDeleteSettlement(_0x4605fd[_0x58936a(0x1ef)],_0x29e1a9[_0x58936a(0x1e9)],_0x95d940,_0x28b272),await sleep(0x96);const _0x7a9feb={'deleted':_0x95d940,'remoteId':_0x3eeaaf[_0x58936a(0x20d)]};if(_0x5bad3a)_0x7a9feb[_0x58936a(0x1f3)]=_0x5bad3a;return{'ok':!![],'data':_0x7a9feb,'message':_0x58936a(0x1f5)+_0x95d940+(_0x5bad3a?_0x58936a(0x1f9):'')};}};function a31_0x31e1(_0x450f2b,_0x3adbbe){_0x450f2b=_0x450f2b-0x1db;const _0x2aec64=a31_0x2aec();let _0x31e140=_0x2aec64[_0x450f2b];return _0x31e140;}function resolveDeleteTarget(_0x2db8ac,_0x5bb78d){const _0x1817b2=a31_0xba05d6;if(_0x2db8ac[_0x1817b2(0x20c)]('/')){const _0x2142b8=_0x5bb78d[_0x1817b2(0x1ee)](_0x1bec83=>_0x1bec83===_0x2db8ac);if(!_0x2142b8)throw CliErrors[_0x1817b2(0x1f0)](_0x1817b2(0x1fe)+_0x2db8ac);return _0x2142b8;}const _0x5d9422=_0x5bb78d[_0x1817b2(0x201)](_0x1ad335=>_0x1ad335['split']('/')['at'](-0x1)===_0x2db8ac);if(_0x5d9422[_0x1817b2(0x211)]===0x0)throw CliErrors['validation'](_0x1817b2(0x1fe)+_0x2db8ac);if(_0x5d9422[_0x1817b2(0x211)]>0x1)throw CliErrors[_0x1817b2(0x1f0)]('Multiple\x20functions\x20match\x20\x22'+_0x2db8ac+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x5d9422[_0x1817b2(0x208)](_0x3c60ab=>_0x1817b2(0x1fa)+_0x3c60ab)[_0x1817b2(0x1f1)]('\x0a'));return _0x5d9422[0x0];}async function moveToTrash(_0xe4c723,_0x5a3584,_0x2121f3){const _0x7f010b=a31_0xba05d6,_0x1de5c9=new Date()[_0x7f010b(0x20b)]()[_0x7f010b(0x1f7)](/[:.]/g,'-'),_0x462008=relative(_0xe4c723,_0x2121f3),_0x444045=join(_0x5a3584,_0x1de5c9,_0x462008);return await mkdir(dirname(_0x444045),{'recursive':!![]}),await rename(_0x2121f3,_0x444045),_0x444045;}async function cleanupEmptyDirectories(_0x8eb3c8,_0x22c0da){const _0x375007=a31_0xba05d6;let _0x26f2c3=resolve(_0x8eb3c8);const _0x419816=resolve(_0x22c0da);while(_0x26f2c3[_0x375007(0x202)](''+_0x419816+sep)||_0x26f2c3===_0x419816){if(_0x26f2c3===_0x419816)return;try{const _0x47b386=await readdir(_0x26f2c3);if(_0x47b386['length']>0x0)return;await rmdir(_0x26f2c3);}catch{return;}_0x26f2c3=dirname(_0x26f2c3);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x213f1e,_0x4bd7c1,_0x4dcef8,_0x48c0d9){const _0x58dc93=a31_0xba05d6;for(let _0x332a72=0x0;_0x332a72<DELETE_SETTLE_RETRY_COUNT;_0x332a72+=0x1){const _0x5c50ad=await readBffLockFile(_0x213f1e),_0x3b22e4=!!_0x5c50ad?.['apps']?.[_0x4bd7c1]?.[_0x58dc93(0x1dc)]?.[_0x4dcef8],_0x437a6a=await fileExists(_0x48c0d9);if(!_0x3b22e4&&!_0x437a6a)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x58dc93(0x1e2)+_0x4dcef8+'.');}
1
+ const a31_0x345c42=a31_0x4936;(function(_0x23c3e9,_0x38f8fd){const _0x3f8157=a31_0x4936,_0x12d13f=_0x23c3e9();while(!![]){try{const _0x51af05=parseInt(_0x3f8157(0x184))/0x1*(parseInt(_0x3f8157(0x162))/0x2)+parseInt(_0x3f8157(0x188))/0x3*(-parseInt(_0x3f8157(0x161))/0x4)+-parseInt(_0x3f8157(0x187))/0x5*(parseInt(_0x3f8157(0x18e))/0x6)+-parseInt(_0x3f8157(0x167))/0x7+-parseInt(_0x3f8157(0x15c))/0x8+-parseInt(_0x3f8157(0x16b))/0x9+parseInt(_0x3f8157(0x181))/0xa*(parseInt(_0x3f8157(0x17e))/0xb);if(_0x51af05===_0x38f8fd)break;else _0x12d13f['push'](_0x12d13f['shift']());}catch(_0x50e081){_0x12d13f['push'](_0x12d13f['shift']());}}}(a31_0x26f5,0xc8b78));function a31_0x4936(_0x552817,_0x623231){_0x552817=_0x552817-0x15b;const _0x26f519=a31_0x26f5();let _0x49366e=_0x26f519[_0x552817];return _0x49366e;}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';export const bffDelete={'service':a31_0x345c42(0x163),'command':'delete','description':a31_0x345c42(0x16f),'risk':a31_0x345c42(0x191),'flags':[{'name':a31_0x345c42(0x186),'type':a31_0x345c42(0x190),'required':!![],'description':a31_0x345c42(0x17c)}],async 'validate'(_0x4faca4){const _0x170256=a31_0x345c42,_0xd71c4f=loadBffProjectConfig(_0x4faca4[_0x170256(0x17b)]),_0x4c1a6f=await readBffLockFile(_0xd71c4f[_0x170256(0x169)]);if(!_0x4c1a6f)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x1a7454){const _0x2ce2b3=a31_0x345c42,_0x3711cc=loadBffProjectConfig(_0x1a7454['appCode']),_0x2a1d28=await readBffLockFile(_0x3711cc[_0x2ce2b3(0x169)]);if(!_0x2a1d28)throw CliErrors['validation'](_0x2ce2b3(0x171));const {appLock:_0x2cd1ee}=ensureLockScope(_0x2a1d28,_0x1a7454[_0x2ce2b3(0x17b)],_0x3711cc[_0x2ce2b3(0x172)],_0x2ce2b3(0x18c)),_0x3da11f=_0x1a7454[_0x2ce2b3(0x185)](_0x2ce2b3(0x186)),_0x58408b=Object[_0x2ce2b3(0x176)](_0x2cd1ee[_0x2ce2b3(0x175)]),_0x28a419=resolveDeleteTarget(_0x3da11f,_0x58408b),_0x5f0361=_0x2cd1ee[_0x2ce2b3(0x175)][_0x28a419];if(!_0x5f0361)throw CliErrors[_0x2ce2b3(0x173)](_0x2ce2b3(0x189)+_0x28a419+'\x22.');const _0x4c1a3d=resolveLocalFilePathFromLockKey(_0x3711cc,_0x28a419),_0x1ccb70=relative(_0x3711cc['projectRoot'],_0x4c1a3d),_0x2173a3=join(_0x3711cc[_0x2ce2b3(0x15f)],_0x2ce2b3(0x17f),_0x1ccb70);return{'method':_0x2ce2b3(0x18a),'url':_0x2ce2b3(0x17a),'body':{'appCode':_0x1a7454[_0x2ce2b3(0x17b)],'target':_0x28a419,'remoteId':_0x5f0361[_0x2ce2b3(0x15e)],'localFilePath':_0x4c1a3d,'trashedPath':_0x2173a3},'description':_0x2ce2b3(0x18b)+_0x28a419+_0x2ce2b3(0x16d)};},async 'execute'(_0x3bffa9){const _0x5b7253=a31_0x345c42,_0x155221=loadBffProjectConfig(_0x3bffa9['appCode']),_0x4f6f0d=await readBffLockFile(_0x155221['lockFilePath']);if(!_0x4f6f0d)throw CliErrors[_0x5b7253(0x173)](_0x5b7253(0x171));const {lockData:_0x4963aa,appLock:_0x3b40aa}=ensureLockScope(_0x4f6f0d,_0x3bffa9[_0x5b7253(0x17b)],_0x155221['scriptsRoot'],'delete'),_0x16998d=JSON[_0x5b7253(0x166)](JSON[_0x5b7253(0x182)](_0x4963aa)),_0x542340=_0x16998d[_0x5b7253(0x164)][_0x3bffa9[_0x5b7253(0x17b)]];if(!_0x542340)throw new Error(_0x5b7253(0x183)+_0x3bffa9[_0x5b7253(0x17b)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x187fb4=_0x3bffa9[_0x5b7253(0x185)](_0x5b7253(0x186)),_0x140fb6=Object[_0x5b7253(0x176)](_0x542340[_0x5b7253(0x175)]),_0x48e595=resolveDeleteTarget(_0x187fb4,_0x140fb6),_0x108884=_0x542340[_0x5b7253(0x175)][_0x48e595];if(!_0x108884)throw CliErrors['validation']('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x48e595+'\x22.');await deleteBffScript(_0x108884[_0x5b7253(0x15e)]),delete _0x542340[_0x5b7253(0x175)][_0x48e595],_0x542340['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x155221['lockFilePath'],_0x16998d);const _0x39dec6=resolveLocalFilePathFromLockKey(_0x155221,_0x48e595);let _0x3ef0b0;await fileExists(_0x39dec6)&&(_0x3ef0b0=await moveToTrash(_0x155221[_0x5b7253(0x179)],_0x155221[_0x5b7253(0x15f)],_0x39dec6),await cleanupEmptyDirectories(dirname(_0x39dec6),_0x155221[_0x5b7253(0x16c)]));await waitForDeleteSettlement(_0x155221[_0x5b7253(0x169)],_0x3bffa9['appCode'],_0x48e595,_0x39dec6),await sleep(0x96);const _0x44a330={'deleted':_0x48e595,'remoteId':_0x108884[_0x5b7253(0x15e)]};if(_0x3ef0b0)_0x44a330['trashedTo']=_0x3ef0b0;return{'ok':!![],'data':_0x44a330,'message':_0x5b7253(0x16e)+_0x48e595+(_0x3ef0b0?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x5acf45,_0x3e67e3){const _0x471aa4=a31_0x345c42;if(_0x5acf45[_0x471aa4(0x18f)]('/')){const _0x252c77=_0x3e67e3[_0x471aa4(0x16a)](_0xd84567=>_0xd84567===_0x5acf45);if(!_0x252c77)throw CliErrors['validation']('Function\x20not\x20found:\x20'+_0x5acf45);return _0x252c77;}const _0x192202=_0x3e67e3[_0x471aa4(0x168)](_0x5af033=>_0x5af033[_0x471aa4(0x177)]('/')['at'](-0x1)===_0x5acf45);if(_0x192202[_0x471aa4(0x174)]===0x0)throw CliErrors['validation'](_0x471aa4(0x15d)+_0x5acf45);if(_0x192202[_0x471aa4(0x174)]>0x1)throw CliErrors[_0x471aa4(0x173)](_0x471aa4(0x17d)+_0x5acf45+_0x471aa4(0x180)+_0x192202[_0x471aa4(0x178)](_0x33af5d=>_0x471aa4(0x15b)+_0x33af5d)[_0x471aa4(0x170)]('\x0a'));return _0x192202[0x0];}async function moveToTrash(_0xc80075,_0x1bcb6d,_0x5597c6){const _0x33e4b0=a31_0x345c42,_0x3a824a=new Date()[_0x33e4b0(0x18d)]()['replace'](/[:.]/g,'-'),_0x3ff447=relative(_0xc80075,_0x5597c6),_0x4dab10=join(_0x1bcb6d,_0x3a824a,_0x3ff447);return await mkdir(dirname(_0x4dab10),{'recursive':!![]}),await rename(_0x5597c6,_0x4dab10),_0x4dab10;}async function cleanupEmptyDirectories(_0x599ad1,_0x4064e0){const _0x492a19=a31_0x345c42;let _0x3cfc69=resolve(_0x599ad1);const _0x452283=resolve(_0x4064e0);while(_0x3cfc69[_0x492a19(0x165)](''+_0x452283+sep)||_0x3cfc69===_0x452283){if(_0x3cfc69===_0x452283)return;try{const _0x422980=await readdir(_0x3cfc69);if(_0x422980[_0x492a19(0x174)]>0x0)return;await rmdir(_0x3cfc69);}catch{return;}_0x3cfc69=dirname(_0x3cfc69);}}function a31_0x26f5(){const _0x386605=['7697682IUcAfz','scriptsRootDir','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','Deleted\x20','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','join','BFF\x20lock\x20file\x20not\x20found.','scriptsRoot','validation','length','functions','keys','split','map','projectRoot','/api/management/library/scripts/delete','appCode','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','Multiple\x20functions\x20match\x20\x22','27516973FKewWu','<timestamp>','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','10ClInmf','stringify','Lock\x20scope\x20for\x20app\x20\x22','532333EBsZzB','str','target','5wtHres','12003QAGvOn','No\x20lock\x20entry\x20found\x20for\x20\x22','POST','Would\x20delete\x20','delete','toISOString','1830462ONGxvn','includes','string','high-risk-write','\x20\x20-\x20','979296vHxmcb','Function\x20not\x20found:\x20','remoteId','trashDir','Local\x20delete\x20not\x20settled\x20for\x20','700SclMTD','2HyAdLp','bff','apps','startsWith','parse','1601446HLPcyr','filter','lockFilePath','find'];a31_0x26f5=function(){return _0x386605;};return a31_0x26f5();}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x445439,_0x4d500f,_0x236805,_0x112cee){const _0x40124d=a31_0x345c42;for(let _0x59f037=0x0;_0x59f037<DELETE_SETTLE_RETRY_COUNT;_0x59f037+=0x1){const _0x1ec208=await readBffLockFile(_0x445439),_0x1beecd=!!_0x1ec208?.[_0x40124d(0x164)]?.[_0x4d500f]?.[_0x40124d(0x175)]?.[_0x236805],_0x3343ba=await fileExists(_0x112cee);if(!_0x1beecd&&!_0x3343ba)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x40124d(0x160)+_0x236805+'.');}
@@ -1 +1 @@
1
- const a32_0x240f7c=a32_0x51fc;(function(_0xe8b3d1,_0x2b13d8){const _0x19c7a5=a32_0x51fc,_0x120710=_0xe8b3d1();while(!![]){try{const _0x63a8e0=parseInt(_0x19c7a5(0x1f4))/0x1+parseInt(_0x19c7a5(0x1fa))/0x2*(parseInt(_0x19c7a5(0x1eb))/0x3)+-parseInt(_0x19c7a5(0x1f5))/0x4*(-parseInt(_0x19c7a5(0x1f9))/0x5)+-parseInt(_0x19c7a5(0x1f3))/0x6*(parseInt(_0x19c7a5(0x1f0))/0x7)+-parseInt(_0x19c7a5(0x1ea))/0x8*(-parseInt(_0x19c7a5(0x1ef))/0x9)+parseInt(_0x19c7a5(0x1f7))/0xa*(parseInt(_0x19c7a5(0x1dc))/0xb)+-parseInt(_0x19c7a5(0x1f2))/0xc;if(_0x63a8e0===_0x2b13d8)break;else _0x120710['push'](_0x120710['shift']());}catch(_0x4b69cd){_0x120710['push'](_0x120710['shift']());}}}(a32_0x274f,0x37e08));function a32_0x274f(){const _0x5b2851=['bff','version','read','createdTime','detail','Return\x20full\x20raw\x20script\x20object','992lCNriD','3gQixaJ','num','Get\x20BFF\x20script\x20details\x20by\x20ID','number','11097AywyJB','938qUKeBK','appCode','12117504LrrMOE','12108PPDhcC','133672IOJXPZ','1823572PGCqQt','updateUserName','36570Fzqpxt','(none)','5FCFkce','721384NyaGjM','1221YzqTgv','verbose','boolean','scriptContent','description','bool','functionName','updatedTime'];a32_0x274f=function(){return _0x5b2851;};return a32_0x274f();}import{getBffScriptInfo}from'../../core/api-client.js';function a32_0x51fc(_0xb21b0a,_0x288a07){_0xb21b0a=_0xb21b0a-0x1dc;const _0x274ff8=a32_0x274f();let _0x51fc72=_0x274ff8[_0xb21b0a];return _0x51fc72;}export const bffDetail={'service':a32_0x240f7c(0x1e4),'command':a32_0x240f7c(0x1e8),'description':a32_0x240f7c(0x1ed),'risk':a32_0x240f7c(0x1e6),'flags':[{'name':'id','type':a32_0x240f7c(0x1ee),'required':!![],'description':'Script\x20ID'},{'name':a32_0x240f7c(0x1dd),'type':a32_0x240f7c(0x1de),'description':a32_0x240f7c(0x1e9)}],async 'execute'(_0xbcf56d){const _0x5cd035=a32_0x240f7c,_0xadc141=await getBffScriptInfo(_0xbcf56d[_0x5cd035(0x1ec)]('id')),_0x593cd9=_0xbcf56d[_0x5cd035(0x1e1)]('verbose');if(_0x593cd9)return{'ok':!![],'data':_0xadc141};return{'ok':!![],'data':{'id':_0xadc141['id'],'functionName':_0xadc141[_0x5cd035(0x1e2)]??'','version':_0xadc141[_0x5cd035(0x1e5)]??'','updateUserName':_0xadc141[_0x5cd035(0x1f6)]??'','appCode':_0xadc141[_0x5cd035(0x1f1)],'scriptType':_0xadc141['scriptType'],'description':_0xadc141[_0x5cd035(0x1e0)]||_0x5cd035(0x1f8),'createdTime':_0xadc141[_0x5cd035(0x1e7)]??'','updatedTime':_0xadc141[_0x5cd035(0x1e3)]??'','scriptContent':_0xadc141[_0x5cd035(0x1df)]??''}};}};
1
+ const a32_0x41e948=a32_0x49ea;function a32_0x49ea(_0xbb0e2c,_0x46d1dd){_0xbb0e2c=_0xbb0e2c-0xda;const _0x7821fe=a32_0x7821();let _0x49eacd=_0x7821fe[_0xbb0e2c];return _0x49eacd;}function a32_0x7821(){const _0x10eb7c=['(none)','100LSvOlm','Return\x20full\x20raw\x20script\x20object','Script\x20ID','760DXktvy','read','scriptType','1263218WOPBEt','39378UjnHsg','bff','42168zWhWfZ','version','45451klugDa','verbose','description','328aLqiNy','updateUserName','9268452KTjvKI','boolean','551620ZhbnYg','updatedTime','scriptContent','num','126HjlGBM','Get\x20BFF\x20script\x20details\x20by\x20ID','696967MdQjtj','detail'];a32_0x7821=function(){return _0x10eb7c;};return a32_0x7821();}(function(_0x4ce83e,_0x2ea250){const _0x33a957=a32_0x49ea,_0x12d4aa=_0x4ce83e();while(!![]){try{const _0x379492=parseInt(_0x33a957(0xe8))/0x1+-parseInt(_0x33a957(0xe6))/0x2*(parseInt(_0x33a957(0xf4))/0x3)+parseInt(_0x33a957(0xe2))/0x4+-parseInt(_0x33a957(0xee))/0x5*(-parseInt(_0x33a957(0xf2))/0x6)+parseInt(_0x33a957(0xdb))/0x7*(-parseInt(_0x33a957(0xde))/0x8)+-parseInt(_0x33a957(0xe0))/0x9+-parseInt(_0x33a957(0xeb))/0xa*(-parseInt(_0x33a957(0xf1))/0xb);if(_0x379492===_0x2ea250)break;else _0x12d4aa['push'](_0x12d4aa['shift']());}catch(_0x9d949e){_0x12d4aa['push'](_0x12d4aa['shift']());}}}(a32_0x7821,0xc321b));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a32_0x41e948(0xf3),'command':a32_0x41e948(0xe9),'description':a32_0x41e948(0xe7),'risk':a32_0x41e948(0xef),'flags':[{'name':'id','type':'number','required':!![],'description':a32_0x41e948(0xed)},{'name':'verbose','type':a32_0x41e948(0xe1),'description':a32_0x41e948(0xec)}],async 'execute'(_0x489e79){const _0x21a2ec=a32_0x41e948,_0x289c85=await getBffScriptInfo(_0x489e79[_0x21a2ec(0xe5)]('id')),_0x4fc413=_0x489e79['bool'](_0x21a2ec(0xdc));if(_0x4fc413)return{'ok':!![],'data':_0x289c85};return{'ok':!![],'data':{'id':_0x289c85['id'],'functionName':_0x289c85['functionName']??'','version':_0x289c85[_0x21a2ec(0xda)]??'','updateUserName':_0x289c85[_0x21a2ec(0xdf)]??'','appCode':_0x289c85['appCode'],'scriptType':_0x289c85[_0x21a2ec(0xf0)],'description':_0x289c85[_0x21a2ec(0xdd)]||_0x21a2ec(0xea),'createdTime':_0x289c85['createdTime']??'','updatedTime':_0x289c85[_0x21a2ec(0xe3)]??'','scriptContent':_0x289c85[_0x21a2ec(0xe4)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x31eacc,_0x5dbbf8){const _0x31e581=a33_0x54c5,_0x4560bf=_0x31eacc();while(!![]){try{const _0x139672=-parseInt(_0x31e581(0xf4))/0x1*(parseInt(_0x31e581(0xf0))/0x2)+parseInt(_0x31e581(0xf3))/0x3+-parseInt(_0x31e581(0xf1))/0x4+-parseInt(_0x31e581(0xf5))/0x5*(parseInt(_0x31e581(0xf2))/0x6)+-parseInt(_0x31e581(0xf6))/0x7+parseInt(_0x31e581(0xf8))/0x8+parseInt(_0x31e581(0xf7))/0x9;if(_0x139672===_0x5dbbf8)break;else _0x4560bf['push'](_0x4560bf['shift']());}catch(_0x3e3a99){_0x4560bf['push'](_0x4560bf['shift']());}}}(a33_0x5fd2,0x9fe98));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';function a33_0x5fd2(){const _0x56f22e=['3fgslwo','5156625xMuewN','4343507PyjKRQ','7082460MIkwUi','9549136MfCoCx','35872PCDNWe','1189088ZkaCeG','6jYKtzb','2031972ZqVuhj'];a33_0x5fd2=function(){return _0x56f22e;};return a33_0x5fd2();}function a33_0x54c5(_0x164a48,_0xda542c){_0x164a48=_0x164a48-0xf0;const _0x5fd2e4=a33_0x5fd2();let _0x54c59b=_0x5fd2e4[_0x164a48];return _0x54c59b;}import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0xfa4d16,_0x3cafcb){const _0x235c2b=a33_0x893a,_0x57a201=_0xfa4d16();while(!![]){try{const _0xb8bf0c=-parseInt(_0x235c2b(0x90))/0x1*(-parseInt(_0x235c2b(0x94))/0x2)+parseInt(_0x235c2b(0x93))/0x3+-parseInt(_0x235c2b(0x8e))/0x4+-parseInt(_0x235c2b(0x95))/0x5+-parseInt(_0x235c2b(0x8f))/0x6+-parseInt(_0x235c2b(0x91))/0x7*(-parseInt(_0x235c2b(0x92))/0x8)+parseInt(_0x235c2b(0x8d))/0x9;if(_0xb8bf0c===_0x3cafcb)break;else _0x57a201['push'](_0x57a201['shift']());}catch(_0x50c59f){_0x57a201['push'](_0x57a201['shift']());}}}(a33_0x23f0,0x4f5be));import{bffList}from'../../commands/bff/list.js';function a33_0x23f0(){const _0x477f83=['2036202YlhQWh','4xjJhvE','7IgbCGB','1397544qWrfgi','390582wmrDLE','63244UgbsSb','285645nXMiVe','4041027ahhcJT','635312toTuRF'];a33_0x23f0=function(){return _0x477f83;};return a33_0x23f0();}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';import{bffDelete}from'../../commands/bff/delete.js';function a33_0x893a(_0x84db45,_0x5d9db4){_0x84db45=_0x84db45-0x8d;const _0x23f014=a33_0x23f0();let _0x893a6=_0x23f014[_0x84db45];return _0x893a6;}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];