@lovrabet/rabetbase-cli 2.3.16-beta.5 → 2.3.16-beta.7

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 (278) 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/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/kb/create.js +1 -1
  101. package/lib/commands/kb/delete.js +1 -1
  102. package/lib/commands/kb/detail.js +1 -1
  103. package/lib/commands/kb/index.js +1 -1
  104. package/lib/commands/kb/list.js +1 -1
  105. package/lib/commands/kb/shared.js +1 -1
  106. package/lib/commands/kb/update.js +1 -1
  107. package/lib/commands/logs/index.js +1 -1
  108. package/lib/commands/menu/asset-update.js +1 -1
  109. package/lib/commands/menu/delete.js +1 -1
  110. package/lib/commands/menu/external-link-create.js +1 -1
  111. package/lib/commands/menu/external-link-update.js +1 -1
  112. package/lib/commands/menu/group-create.js +1 -1
  113. package/lib/commands/menu/group-update.js +1 -1
  114. package/lib/commands/menu/index.js +1 -1
  115. package/lib/commands/menu/list.js +1 -1
  116. package/lib/commands/menu/move.js +1 -1
  117. package/lib/commands/menu/regroup-start.js +1 -1
  118. package/lib/commands/menu/rename.js +1 -1
  119. package/lib/commands/menu/shared/compare-table.js +1 -1
  120. package/lib/commands/menu/shared/delete-plan.js +1 -1
  121. package/lib/commands/menu/shared/facts.js +1 -1
  122. package/lib/commands/menu/shared/index.js +1 -1
  123. package/lib/commands/menu/shared/inquirer.js +1 -1
  124. package/lib/commands/menu/shared/local-pages.js +1 -1
  125. package/lib/commands/menu/shared/logic.js +1 -1
  126. package/lib/commands/menu/shared/mutations.js +1 -1
  127. package/lib/commands/menu/shared/service.js +1 -1
  128. package/lib/commands/menu/shared/sync-core.js +1 -1
  129. package/lib/commands/menu/shared/update-core.js +1 -1
  130. package/lib/commands/menu/shared/valid-url.js +1 -1
  131. package/lib/commands/menu/sync.js +1 -1
  132. package/lib/commands/notification/config-list.js +1 -1
  133. package/lib/commands/notification/index.js +1 -1
  134. package/lib/commands/ocr/index.js +1 -1
  135. package/lib/commands/page/generate-start.js +1 -1
  136. package/lib/commands/page/generate-status.js +1 -1
  137. package/lib/commands/page/index.js +1 -1
  138. package/lib/commands/page/pull.js +1 -1
  139. package/lib/commands/page/push.js +1 -1
  140. package/lib/commands/page/relation-audit.js +1 -1
  141. package/lib/commands/page/restore.js +1 -1
  142. package/lib/commands/page/shared.js +1 -1
  143. package/lib/commands/page/standard-page-status.js +1 -1
  144. package/lib/commands/page/sync.js +1 -1
  145. package/lib/commands/permit/index.js +1 -1
  146. package/lib/commands/permit/page-get.js +1 -1
  147. package/lib/commands/permit/page-set.js +1 -1
  148. package/lib/commands/permit/role-apis-set.js +1 -1
  149. package/lib/commands/permit/role-menus-set.js +1 -1
  150. package/lib/commands/permit/role-menus.js +1 -1
  151. package/lib/commands/permit/shared.js +1 -1
  152. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  153. package/lib/commands/project/create/format-elapsed.js +1 -1
  154. package/lib/commands/project/create/main.js +1 -1
  155. package/lib/commands/project/create/non-interactive.js +1 -1
  156. package/lib/commands/project/create/project-template-path.js +1 -1
  157. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  158. package/lib/commands/project/create/use-format-code.js +1 -1
  159. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  160. package/lib/commands/project/index.js +1 -1
  161. package/lib/commands/project/upgrade.js +1 -1
  162. package/lib/commands/registry.js +1 -1
  163. package/lib/commands/role/create.js +1 -1
  164. package/lib/commands/role/delete.js +1 -1
  165. package/lib/commands/role/detail.js +1 -1
  166. package/lib/commands/role/index.js +1 -1
  167. package/lib/commands/role/list.js +1 -1
  168. package/lib/commands/role/shared.js +1 -1
  169. package/lib/commands/role/update.js +1 -1
  170. package/lib/commands/role/user-add.js +1 -1
  171. package/lib/commands/role/user-remove.js +1 -1
  172. package/lib/commands/role/user-resolve.js +1 -1
  173. package/lib/commands/run/index.js +1 -1
  174. package/lib/commands/schema.js +1 -1
  175. package/lib/commands/sql/create.js +1 -1
  176. package/lib/commands/sql/delete.js +1 -1
  177. package/lib/commands/sql/detail.js +1 -1
  178. package/lib/commands/sql/exec.js +1 -1
  179. package/lib/commands/sql/index.js +1 -1
  180. package/lib/commands/sql/list.js +1 -1
  181. package/lib/commands/sql/pull.js +1 -1
  182. package/lib/commands/sql/push.js +1 -1
  183. package/lib/commands/sql/shared.js +1 -1
  184. package/lib/commands/sql/status.js +1 -1
  185. package/lib/commands/sql/validate.js +1 -1
  186. package/lib/commands/task/index.js +1 -1
  187. package/lib/commands/task/status.js +1 -1
  188. package/lib/commands/tenant/index.js +1 -1
  189. package/lib/commands/tenant/members-list.js +1 -1
  190. package/lib/commands/tenant/shared.js +1 -1
  191. package/lib/commands/workspace/add.js +1 -1
  192. package/lib/commands/workspace/index.js +1 -1
  193. package/lib/commands/workspace/remove.js +1 -1
  194. package/lib/config/schema.js +1 -1
  195. package/lib/constant/cdn.js +1 -1
  196. package/lib/constant/cli.js +1 -1
  197. package/lib/constant/defaults.js +1 -1
  198. package/lib/constant/domain.js +1 -1
  199. package/lib/constant/env.js +1 -1
  200. package/lib/constant/output.js +1 -1
  201. package/lib/constant/paths.js +1 -1
  202. package/lib/constant/risk.js +1 -1
  203. package/lib/context/app-resolver.js +1 -1
  204. package/lib/context/auth-resolver.js +1 -1
  205. package/lib/context/config-loader.js +1 -1
  206. package/lib/context.js +1 -1
  207. package/lib/core/alias-resolver.js +1 -1
  208. package/lib/core/api-client.js +1 -1
  209. package/lib/core/bff/config.js +1 -1
  210. package/lib/core/bff/file-system.js +1 -1
  211. package/lib/core/bff/hash.js +1 -1
  212. package/lib/core/bff/lock.js +1 -1
  213. package/lib/core/bff/utils.js +1 -1
  214. package/lib/core/db-resolver.js +1 -1
  215. package/lib/core/page/file-system.js +1 -1
  216. package/lib/core/page/hash.js +1 -1
  217. package/lib/core/page/lock.js +1 -1
  218. package/lib/core/sql-index-auditor.js +1 -1
  219. package/lib/core/sql-sync/config.js +1 -1
  220. package/lib/core/sql-sync/file-system.js +1 -1
  221. package/lib/core/sql-sync/hash.js +1 -1
  222. package/lib/core/sql-sync/lock.js +1 -1
  223. package/lib/core/sql-sync/utils.js +1 -1
  224. package/lib/core/sql-validator.js +1 -1
  225. package/lib/errors.js +1 -1
  226. package/lib/framework/build-all-flags.js +1 -1
  227. package/lib/framework/error-output.js +1 -1
  228. package/lib/framework/explicit-yes.js +1 -1
  229. package/lib/framework/flags.js +1 -1
  230. package/lib/framework/help.js +1 -1
  231. package/lib/framework/index.js +1 -1
  232. package/lib/framework/output.js +1 -1
  233. package/lib/framework/response.js +1 -1
  234. package/lib/framework/runner-alias.js +1 -1
  235. package/lib/framework/runner.js +1 -1
  236. package/lib/framework/schema-export.js +1 -1
  237. package/lib/framework/types.js +1 -1
  238. package/lib/generated/build-info.d.ts +4 -4
  239. package/lib/generated/build-info.js +1 -1
  240. package/lib/help.js +1 -1
  241. package/lib/runtime/confirmation.js +1 -1
  242. package/lib/runtime/event.js +1 -1
  243. package/lib/runtime/index.js +1 -1
  244. package/lib/runtime/queue.js +1 -1
  245. package/lib/runtime/resolve.js +1 -1
  246. package/lib/skills/main.js +1 -1
  247. package/lib/skills/npx-skills-add.js +1 -1
  248. package/lib/skills/skill-presence.js +1 -1
  249. package/lib/telemetry/cli-command-trace.js +1 -1
  250. package/lib/telemetry/cli-help-trace.js +1 -1
  251. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  252. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  253. package/lib/telemetry/send-cli-trace-log.js +1 -1
  254. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  255. package/lib/utils/ai_config.js +1 -1
  256. package/lib/utils/apply-jq-filter.js +1 -1
  257. package/lib/utils/cdn-config.js +1 -1
  258. package/lib/utils/check-sdk-version.js +1 -1
  259. package/lib/utils/cli-version-check.js +1 -1
  260. package/lib/utils/cli-version-policy.js +1 -1
  261. package/lib/utils/config.js +1 -1
  262. package/lib/utils/copy-directory.js +1 -1
  263. package/lib/utils/entity-with-id.js +1 -1
  264. package/lib/utils/file-utils.js +1 -1
  265. package/lib/utils/guides-cdn.js +1 -1
  266. package/lib/utils/http-client.js +1 -1
  267. package/lib/utils/is-non-interactive.js +1 -1
  268. package/lib/utils/logger.js +1 -1
  269. package/lib/utils/params.js +1 -1
  270. package/lib/utils/platform.js +1 -1
  271. package/lib/utils/rules-cdn.js +1 -1
  272. package/lib/utils/sleep.js +1 -1
  273. package/lib/utils/template-replacer.js +1 -1
  274. package/lib/utils/update-notice.js +1 -1
  275. package/lib/utils/version.js +1 -1
  276. package/lib/utils/with-active-cookie.js +1 -1
  277. package/lib/utils/write-cli-side-channel.js +1 -1
  278. package/package.json +1 -1
@@ -1 +1 @@
1
- const a19_0x388ae0=a19_0x42bd;(function(_0xb485fb,_0xc4da96){const _0x5afd40=a19_0x42bd,_0x13dba5=_0xb485fb();while(!![]){try{const _0x26b019=parseInt(_0x5afd40(0xf4))/0x1+-parseInt(_0x5afd40(0xe7))/0x2*(-parseInt(_0x5afd40(0xde))/0x3)+-parseInt(_0x5afd40(0xf3))/0x4+parseInt(_0x5afd40(0xf0))/0x5*(parseInt(_0x5afd40(0xf8))/0x6)+parseInt(_0x5afd40(0xfc))/0x7+-parseInt(_0x5afd40(0xee))/0x8+-parseInt(_0x5afd40(0xf9))/0x9;if(_0x26b019===_0xc4da96)break;else _0x13dba5['push'](_0x13dba5['shift']());}catch(_0x303f0d){_0x13dba5['push'](_0x13dba5['shift']());}}}(a19_0x363b,0xeda70));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_0x42bd(_0x172b6f,_0x42ec9e){_0x172b6f=_0x172b6f-0xdd;const _0x363b0b=a19_0x363b();let _0x42bdbe=_0x363b0b[_0x172b6f];return _0x42bdbe;}import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';function a19_0x363b(){const _0x2b2878=['map','optional','globalConfig','14881936DoviVK','\x20config','3918290yFPNMX','remote','merged','2845812CCAoNU','1509725gqLpeg','isCurrent','globalPath','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','6sdrmbF','14892237FotCHW','app','boolean','10260894yeaeAI','projectPath','read','inherit','find','list','mergedCli','apps','validation','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','bool','object','4321761yyseAX','global','push','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','No\x20apps\x20configured','projectConfig','defaultApp','project','2cLbwvt','appcode','entries','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.'];a19_0x363b=function(){return _0x2b2878;};return a19_0x363b();}import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x145b99,_0x52a6fb){const _0x19dc27=a19_0x42bd,_0x5243f0=[],_0x23e0ad=_0x145b99['apps']&&typeof _0x145b99[_0x19dc27(0x103)]===_0x19dc27(0xdd)?_0x145b99['apps']:{},_0x230470=_0x145b99[_0x19dc27(0xe5)]||undefined;for(const [_0x2c0c71,_0x225164]of Object[_0x19dc27(0xe9)](_0x23e0ad)){if(!_0x225164||typeof _0x225164!==_0x19dc27(0xdd)||!_0x225164[_0x19dc27(0xe8)])continue;_0x5243f0[_0x19dc27(0xe0)]({'name':_0x2c0c71,'appcode':_0x225164['appcode'],'named':!![],'definedIn':_0x52a6fb,'isDefault':_0x2c0c71===_0x230470,...buildAppProfileListFields(_0x225164)});}return _0x5243f0;}function buildMergedItems(_0x2e9dc3,_0x58e19d){const _0x53cd05=a19_0x42bd,{apps:apps={},defaultApp:_0x13fb09}=_0x2e9dc3,_0x349fb5=_0x58e19d[_0x53cd05(0xed)][_0x53cd05(0x103)]&&typeof _0x58e19d[_0x53cd05(0xed)][_0x53cd05(0x103)]===_0x53cd05(0xdd)?_0x58e19d[_0x53cd05(0xed)][_0x53cd05(0x103)]:{},_0x15ea8b=_0x58e19d[_0x53cd05(0xe4)][_0x53cd05(0x103)]&&typeof _0x58e19d[_0x53cd05(0xe4)][_0x53cd05(0x103)]==='object'?_0x58e19d['projectConfig'][_0x53cd05(0x103)]:{},_0x31a869=_0x58e19d[_0x53cd05(0xe4)][_0x53cd05(0xff)]===![],_0x568c1a=Object['entries'](apps),_0x3d9fb0=_0x568c1a[_0x53cd05(0xeb)](([_0x24bb6d,_0x5a0542])=>({'name':_0x24bb6d,'appcode':_0x5a0542[_0x53cd05(0xe8)],'named':!![],'definedIn':appDefinedIn(_0x24bb6d,_0x349fb5,_0x15ea8b,_0x31a869),'isDefault':_0x24bb6d===_0x13fb09,...buildAppProfileListFields(_0x5a0542)}));return _0x3d9fb0;}function validateAppListFlags(_0x2c8c56){const _0x4bf03f=a19_0x42bd;if(!_0x2c8c56['bool'](_0x4bf03f(0xf1)))return;if(!_0x2c8c56[_0x4bf03f(0x106)](_0x4bf03f(0xdf))&&!_0x2c8c56['bool']('project'))return;throw CliErrors[_0x4bf03f(0x104)](_0x4bf03f(0xea),_0x4bf03f(0xe2));}async function execute(_0xae1744){const _0x126d46=a19_0x42bd;validateAppListFlags(_0xae1744);if(_0xae1744[_0x126d46(0x106)](_0x126d46(0xf1)))return{'ok':!![],'data':await listRemoteAppDirectory(_0xae1744)};const _0xc96107=_0xae1744[_0x126d46(0x106)](_0x126d46(0xdf)),_0x2f5c7c=_0xae1744[_0x126d46(0x106)]('project'),_0x432187=_0xc96107?_0x126d46(0xdf):_0x2f5c7c?_0x126d46(0xe6):_0x126d46(0xf2),{config:_0xc634a4,layers:_0x4b1a6b}=readRawConfigWithLayers(),_0x2210c4=resolveDefaultAppSource(_0x4b1a6b),{defaultApp:_0x12a83a}=_0xc634a4;let _0x35627b,_0x54396d;switch(_0x432187){case _0x126d46(0xdf):_0x35627b=buildItemsFromLayer(_0x4b1a6b[_0x126d46(0xed)],_0x126d46(0xdf)),_0x54396d=_0x4b1a6b[_0x126d46(0xf6)];break;case _0x126d46(0xe6):_0x35627b=buildItemsFromLayer(_0x4b1a6b[_0x126d46(0xe4)],'project'),_0x54396d=_0x4b1a6b[_0x126d46(0xfd)];break;default:_0x35627b=buildMergedItems(_0xc634a4,_0x4b1a6b);break;}enrichAppListItemsWithMergedSelection(_0x35627b,_0xae1744[_0x126d46(0x102)]);if(_0x35627b['length']===0x0){const _0x1ce102=_0x432187===_0x126d46(0xf2)?'':'\x20in\x20'+_0x432187+_0x126d46(0xef);return{'ok':!![],'data':[],'message':_0x126d46(0xe3)+_0x1ce102+'.\x20Use\x20`'+CLI_BIN_NAME+_0x126d46(0x105)};}const _0x2f5c82=_0x35627b[_0x126d46(0x100)](_0x419d16=>_0x419d16[_0x126d46(0xf5)]===!![]),_0x2c2f44=_0x12a83a??_0x2f5c82?.[_0x126d46(0xe8)]??null,_0x2af7eb=_0x432187===_0x126d46(0xf2)?{'globalPath':_0x4b1a6b[_0x126d46(0xf6)]??null,'projectPath':_0x4b1a6b['projectPath']??null,'defaultApp':_0x2c2f44,'defaultAppSource':_0x12a83a!=null?_0x2210c4:null}:{'scope':_0x432187,'configPath':_0x54396d??null};return{'ok':!![],'data':{'items':_0x35627b,'meta':_0x2af7eb}};}export const appListDefinition={'service':a19_0x388ae0(0xfa),'command':a19_0x388ae0(0x101),'description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a19_0x388ae0(0xfe),'auth':a19_0x388ae0(0xec),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a19_0x388ae0(0xf1),'type':a19_0x388ae0(0xfb),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a19_0x388ae0(0xdf),'type':a19_0x388ae0(0xfb),'description':a19_0x388ae0(0xf7),'default':![]},{'name':a19_0x388ae0(0xe6),'type':a19_0x388ae0(0xfb),'description':a19_0x388ae0(0xe1),'default':![]}],async 'validate'(_0x4d6f09){validateAppListFlags(_0x4d6f09);},'execute':execute};
1
+ const a19_0x14fcd5=a19_0x23b9;(function(_0x192054,_0x4f9328){const _0x6b0635=a19_0x23b9,_0x49da0d=_0x192054();while(!![]){try{const _0x3aca25=-parseInt(_0x6b0635(0x17b))/0x1*(-parseInt(_0x6b0635(0x18b))/0x2)+parseInt(_0x6b0635(0x16d))/0x3*(-parseInt(_0x6b0635(0x185))/0x4)+-parseInt(_0x6b0635(0x187))/0x5+-parseInt(_0x6b0635(0x175))/0x6*(parseInt(_0x6b0635(0x160))/0x7)+-parseInt(_0x6b0635(0x17f))/0x8+parseInt(_0x6b0635(0x188))/0x9+-parseInt(_0x6b0635(0x184))/0xa*(-parseInt(_0x6b0635(0x18a))/0xb);if(_0x3aca25===_0x4f9328)break;else _0x49da0d['push'](_0x49da0d['shift']());}catch(_0x1a998a){_0x49da0d['push'](_0x49da0d['shift']());}}}(a19_0x44ee,0x85447));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a19_0x23b9(_0x2e9224,_0x578972){_0x2e9224=_0x2e9224-0x15f;const _0x44ee1f=a19_0x44ee();let _0x23b9ad=_0x44ee1f[_0x2e9224];return _0x23b9ad;}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 a19_0x44ee(){const _0x36d76e=['length','apps','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','1580HPcrEJ','2444cTrjdA','optional','5158265XuvnuP','820215cJrtKt','inherit','221353bLMggy','972872WGicUX','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','project','7AEVFdr','entries','globalPath','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','appcode','push','validation','\x20workspace\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','global','find','projectPath','app','projectConfig','225vqRfmo','\x20config','remote','map','boolean','No\x20apps\x20configured','globalConfig','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','6302706fpPwzo','defaultApp','bool','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','object','list','1jLfTIx','\x20in\x20','merged','mergedCli','8665704vMpHtN'];a19_0x44ee=function(){return _0x36d76e;};return a19_0x44ee();}function buildItemsFromLayer(_0x4b4731,_0x1d0595){const _0x320020=a19_0x23b9,_0x3b39c8=[],_0x41f3b0=_0x4b4731['apps']&&typeof _0x4b4731[_0x320020(0x181)]===_0x320020(0x179)?_0x4b4731[_0x320020(0x181)]:{},_0x48b654=_0x4b4731[_0x320020(0x176)]||undefined;for(const [_0x50bae8,_0x3ccb88]of Object['entries'](_0x41f3b0)){if(!_0x3ccb88||typeof _0x3ccb88!==_0x320020(0x179)||!_0x3ccb88[_0x320020(0x164)])continue;_0x3b39c8[_0x320020(0x165)]({'name':_0x50bae8,'appcode':_0x3ccb88[_0x320020(0x164)],'named':!![],'definedIn':_0x1d0595,'isDefault':_0x50bae8===_0x48b654,...buildAppProfileListFields(_0x3ccb88)});}return _0x3b39c8;}function buildMergedItems(_0x5b7552,_0xdd2e28){const _0x4a129e=a19_0x23b9,{apps:apps={},defaultApp:_0x582eff}=_0x5b7552,_0x5bb31c=_0xdd2e28[_0x4a129e(0x173)][_0x4a129e(0x181)]&&typeof _0xdd2e28[_0x4a129e(0x173)][_0x4a129e(0x181)]===_0x4a129e(0x179)?_0xdd2e28['globalConfig']['apps']:{},_0x28d5f6=_0xdd2e28[_0x4a129e(0x16c)][_0x4a129e(0x181)]&&typeof _0xdd2e28[_0x4a129e(0x16c)][_0x4a129e(0x181)]===_0x4a129e(0x179)?_0xdd2e28[_0x4a129e(0x16c)]['apps']:{},_0x10784f=_0xdd2e28['projectConfig'][_0x4a129e(0x189)]===![],_0x33e2fe=Object[_0x4a129e(0x161)](apps),_0x1e2be6=_0x33e2fe[_0x4a129e(0x170)](([_0x35f721,_0xf5c4fa])=>({'name':_0x35f721,'appcode':_0xf5c4fa[_0x4a129e(0x164)],'named':!![],'definedIn':appDefinedIn(_0x35f721,_0x5bb31c,_0x28d5f6,_0x10784f),'isDefault':_0x35f721===_0x582eff,...buildAppProfileListFields(_0xf5c4fa)}));return _0x1e2be6;}function validateAppListFlags(_0x503a69){const _0x27e45f=a19_0x23b9;if(!_0x503a69['bool']('remote'))return;if(!_0x503a69[_0x27e45f(0x177)](_0x27e45f(0x168))&&!_0x503a69[_0x27e45f(0x177)](_0x27e45f(0x15f)))return;throw CliErrors[_0x27e45f(0x166)](_0x27e45f(0x18c),_0x27e45f(0x182));}async function execute(_0x1e0a57){const _0x5b9805=a19_0x23b9;validateAppListFlags(_0x1e0a57);if(_0x1e0a57[_0x5b9805(0x177)]('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x1e0a57)};const _0x2ff66d=_0x1e0a57['bool'](_0x5b9805(0x168)),_0x3a5f21=_0x1e0a57[_0x5b9805(0x177)](_0x5b9805(0x15f)),_0x1dc991=_0x2ff66d?_0x5b9805(0x168):_0x3a5f21?_0x5b9805(0x15f):_0x5b9805(0x17d),{config:_0x4c771d,layers:_0x4697b7}=readRawConfigWithLayers(),_0x2893a1=resolveDefaultAppSource(_0x4697b7),{defaultApp:_0x4a09a5}=_0x4c771d;let _0x4d223a,_0x20c551;switch(_0x1dc991){case'global':_0x4d223a=buildItemsFromLayer(_0x4697b7[_0x5b9805(0x173)],_0x5b9805(0x168)),_0x20c551=_0x4697b7['globalPath'];break;case _0x5b9805(0x15f):_0x4d223a=buildItemsFromLayer(_0x4697b7[_0x5b9805(0x16c)],_0x5b9805(0x15f)),_0x20c551=_0x4697b7[_0x5b9805(0x16a)];break;default:_0x4d223a=buildMergedItems(_0x4c771d,_0x4697b7);break;}enrichAppListItemsWithMergedSelection(_0x4d223a,_0x1e0a57[_0x5b9805(0x17e)]);if(_0x4d223a[_0x5b9805(0x180)]===0x0){const _0x5d9077=_0x1dc991===_0x5b9805(0x17d)?'':_0x5b9805(0x17c)+_0x1dc991+_0x5b9805(0x16e);return{'ok':!![],'data':[],'message':_0x5b9805(0x172)+_0x5d9077+'.\x20Use\x20`'+CLI_BIN_NAME+_0x5b9805(0x167)};}const _0x3d2d8c=_0x4d223a[_0x5b9805(0x169)](_0x28ad93=>_0x28ad93['isCurrent']===!![]),_0x130fe5=_0x4a09a5??_0x3d2d8c?.[_0x5b9805(0x164)]??null,_0x35cb39=_0x1dc991==='merged'?{'globalPath':_0x4697b7[_0x5b9805(0x162)]??null,'projectPath':_0x4697b7['projectPath']??null,'defaultApp':_0x130fe5,'defaultAppSource':_0x4a09a5!=null?_0x2893a1:null}:{'scope':_0x1dc991,'configPath':_0x20c551??null};return{'ok':!![],'data':{'items':_0x4d223a,'meta':_0x35cb39}};}export const appListDefinition={'service':a19_0x14fcd5(0x16b),'command':a19_0x14fcd5(0x17a),'description':a19_0x14fcd5(0x183),'risk':'read','auth':a19_0x14fcd5(0x186),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a19_0x14fcd5(0x16f),'type':'boolean','description':a19_0x14fcd5(0x178),'default':![]},{'name':'global','type':'boolean','description':a19_0x14fcd5(0x174),'default':![]},{'name':a19_0x14fcd5(0x15f),'type':a19_0x14fcd5(0x171),'description':a19_0x14fcd5(0x163),'default':![]}],async 'validate'(_0x1f028e){validateAppListFlags(_0x1f028e);},'execute':execute};
@@ -1 +1 @@
1
- const a20_0x4b85cd=a20_0x3c7c;(function(_0x5bd71d,_0x5c645a){const _0x566861=a20_0x3c7c,_0x118797=_0x5bd71d();while(!![]){try{const _0x27896a=-parseInt(_0x566861(0x1ea))/0x1*(parseInt(_0x566861(0x1e4))/0x2)+parseInt(_0x566861(0x1e1))/0x3*(parseInt(_0x566861(0x1e5))/0x4)+-parseInt(_0x566861(0x1e3))/0x5+-parseInt(_0x566861(0x1e8))/0x6+parseInt(_0x566861(0x1e6))/0x7*(-parseInt(_0x566861(0x1ed))/0x8)+parseInt(_0x566861(0x1ef))/0x9*(-parseInt(_0x566861(0x1ec))/0xa)+parseInt(_0x566861(0x1e2))/0xb*(parseInt(_0x566861(0x1ee))/0xc);if(_0x27896a===_0x5c645a)break;else _0x118797['push'](_0x118797['shift']());}catch(_0x31c343){_0x118797['push'](_0x118797['shift']());}}}(a20_0x285a,0xd64e0));function a20_0x3c7c(_0x2643b2,_0x107b53){_0x2643b2=_0x2643b2-0x1e1;const _0x285ad7=a20_0x285a();let _0x3c7c13=_0x285ad7[_0x2643b2];return _0x3c7c13;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a20_0x285a(){const _0x578b6b=['60cwnMwu','280DvAiyg','1924308YdbtJh','1991817hUCmfI','81kDWyYS','418QwLOpq','3253260LRenHJ','100ecAdHW','86372CuFfyp','250138uFrhXM','List\x20application\x20members\x20with\x20their\x20role\x20memberships','9818946TxKIYU','\x20application\x20member(s)','18663YDufeP','members-list'];a20_0x285a=function(){return _0x578b6b;};return a20_0x285a();}import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';export const appMembersListDefinition={'service':'app','command':a20_0x4b85cd(0x1eb),'description':a20_0x4b85cd(0x1e7),'risk':'read','requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x15fd9b){const _0x386d76=a20_0x4b85cd,_0x33cbed=projectAppMembers(await listRoleUsers(_0x15fd9b['appCode']));return{'ok':!![],'data':{'appCode':_0x15fd9b['appCode'],'items':_0x33cbed,'totalCount':_0x33cbed['length']},'message':'Found\x20'+_0x33cbed['length']+_0x386d76(0x1e9)};}};
1
+ const a20_0xa55cb7=a20_0x4be4;(function(_0x5e8428,_0x5b3657){const _0x2d8f7d=a20_0x4be4,_0x3af24b=_0x5e8428();while(!![]){try{const _0x14c701=-parseInt(_0x2d8f7d(0x126))/0x1+parseInt(_0x2d8f7d(0x11e))/0x2*(parseInt(_0x2d8f7d(0x121))/0x3)+-parseInt(_0x2d8f7d(0x129))/0x4+-parseInt(_0x2d8f7d(0x120))/0x5+-parseInt(_0x2d8f7d(0x125))/0x6*(parseInt(_0x2d8f7d(0x11f))/0x7)+parseInt(_0x2d8f7d(0x128))/0x8*(parseInt(_0x2d8f7d(0x124))/0x9)+parseInt(_0x2d8f7d(0x11d))/0xa;if(_0x14c701===_0x5b3657)break;else _0x3af24b['push'](_0x3af24b['shift']());}catch(_0x139df1){_0x3af24b['push'](_0x3af24b['shift']());}}}(a20_0x59cd,0x35a31));function a20_0x59cd(){const _0x4cf42d=['551421awVHNm','Found\x20','members-list','13581xdpCQB','192JecTNA','172695DjAhxG','List\x20application\x20members\x20with\x20their\x20role\x20memberships','1864xebcwU','1258588TvwWta','appCode','length','read','5342510VQOKsZ','2whbnNI','27657iJqlXv','1180920fwfgQG'];a20_0x59cd=function(){return _0x4cf42d;};return a20_0x59cd();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppMembers}from'../../commands/app/shared.js';import{listRoleUsers}from'../../core/api-client.js';function a20_0x4be4(_0x4a306a,_0x5a5402){_0x4a306a=_0x4a306a-0x11b;const _0x59cd9e=a20_0x59cd();let _0x4be49b=_0x59cd9e[_0x4a306a];return _0x4be49b;}export const appMembersListDefinition={'service':'app','command':a20_0xa55cb7(0x123),'description':a20_0xa55cb7(0x127),'risk':a20_0xa55cb7(0x11c),'requiresAuth':!![],'requiresAppCode':!![],'structuredErrors':!![],'flags':[APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2b7079){const _0x3c66c1=a20_0xa55cb7,_0x4b876f=projectAppMembers(await listRoleUsers(_0x2b7079['appCode']));return{'ok':!![],'data':{'appCode':_0x2b7079[_0x3c66c1(0x12a)],'items':_0x4b876f,'totalCount':_0x4b876f[_0x3c66c1(0x11b)]},'message':_0x3c66c1(0x122)+_0x4b876f[_0x3c66c1(0x11b)]+'\x20application\x20member(s)'};}};
@@ -1 +1 @@
1
- (function(_0x1883ca,_0x28cb97){const _0x7d22c2=a21_0x2b99,_0x283c44=_0x1883ca();while(!![]){try{const _0x87181d=-parseInt(_0x7d22c2(0xc9))/0x1+parseInt(_0x7d22c2(0xcf))/0x2+parseInt(_0x7d22c2(0xc6))/0x3+-parseInt(_0x7d22c2(0xd1))/0x4*(-parseInt(_0x7d22c2(0xd0))/0x5)+parseInt(_0x7d22c2(0xca))/0x6*(-parseInt(_0x7d22c2(0xcb))/0x7)+-parseInt(_0x7d22c2(0xc8))/0x8+-parseInt(_0x7d22c2(0xcc))/0x9;if(_0x87181d===_0x28cb97)break;else _0x283c44['push'](_0x283c44['shift']());}catch(_0x779c56){_0x283c44['push'](_0x283c44['shift']());}}}(a21_0x3ce7,0xc4b37));function a21_0x2b99(_0x55c1f0,_0x33a525){_0x55c1f0=_0x55c1f0-0xc5;const _0x3ce77e=a21_0x3ce7();let _0x2b99fa=_0x3ce77e[_0x55c1f0];return _0x2b99fa;}import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x3ccd2e){const _0x5c94f7=a21_0x2b99,_0x58a6ea=_0x3ccd2e[_0x5c94f7(0xce)]||getCookie();if(!_0x58a6ea)throw CliErrors[_0x5c94f7(0xc5)]();return _0x58a6ea;}export async function listRemoteAppDirectory(_0x453167){const _0x14d306=a21_0x2b99,_0x53c468=await withActiveCookie(resolveCookie(_0x453167),()=>listRemoteApps());return{'items':_0x53c468[_0x14d306(0xc7)](_0x4435de=>({..._0x4435de['id']!=null?{'id':_0x4435de['id']}:{},'appCode':_0x4435de['appCode'],'appName':_0x4435de[_0x14d306(0xd2)],..._0x4435de['appDesc']!=null?{'appDesc':_0x4435de['appDesc']}:{}})),'meta':{'source':_0x14d306(0xcd)}};}function a21_0x3ce7(){const _0x36b4dd=['2224330puAAQV','1405rpXFIY','12668rWNoIr','appName','authRequired','2542269xNVDKE','map','398928FbtMzs','709787GcDLnQ','6pPGlSk','518854AhZraT','10890477qSnjrf','platform','cookie'];a21_0x3ce7=function(){return _0x36b4dd;};return a21_0x3ce7();}
1
+ (function(_0x244ae8,_0x50c776){const _0xde258d=a21_0x66fd,_0x5e92db=_0x244ae8();while(!![]){try{const _0x50b9e6=-parseInt(_0xde258d(0x166))/0x1*(-parseInt(_0xde258d(0x162))/0x2)+parseInt(_0xde258d(0x16f))/0x3*(-parseInt(_0xde258d(0x16d))/0x4)+-parseInt(_0xde258d(0x160))/0x5*(parseInt(_0xde258d(0x164))/0x6)+parseInt(_0xde258d(0x165))/0x7*(parseInt(_0xde258d(0x16a))/0x8)+-parseInt(_0xde258d(0x163))/0x9+parseInt(_0xde258d(0x170))/0xa*(-parseInt(_0xde258d(0x15f))/0xb)+parseInt(_0xde258d(0x16e))/0xc*(parseInt(_0xde258d(0x161))/0xd);if(_0x50b9e6===_0x50c776)break;else _0x5e92db['push'](_0x5e92db['shift']());}catch(_0x70bc0){_0x5e92db['push'](_0x5e92db['shift']());}}}(a21_0x41cb,0xee7c2));import{listRemoteApps}from'../../core/api-client.js';function a21_0x41cb(){const _0x3e19cc=['96257imIpUr','7VXIxuf','cookie','appCode','platform','88RWSpdE','map','appDesc','4MqoCpU','5532mSrpOT','4273503kSwpbS','5430KuLuAk','1672XPkylD','3242390bREQwz','117949KBdazq','178394HkzYWm','16433496yAfkWw','6NKWBdi'];a21_0x41cb=function(){return _0x3e19cc;};return a21_0x41cb();}import{getCookie}from'../../auth/get-cookie.js';function a21_0x66fd(_0xcf07b7,_0x35c089){_0xcf07b7=_0xcf07b7-0x15f;const _0x41cbcb=a21_0x41cb();let _0x66fd16=_0x41cbcb[_0xcf07b7];return _0x66fd16;}import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x3f0fe2){const _0x1be733=a21_0x66fd,_0x5c8e84=_0x3f0fe2[_0x1be733(0x167)]||getCookie();if(!_0x5c8e84)throw CliErrors['authRequired']();return _0x5c8e84;}export async function listRemoteAppDirectory(_0x50576b){const _0x3c6f0c=a21_0x66fd,_0xeb153e=await withActiveCookie(resolveCookie(_0x50576b),()=>listRemoteApps());return{'items':_0xeb153e[_0x3c6f0c(0x16b)](_0x27b1b5=>({..._0x27b1b5['id']!=null?{'id':_0x27b1b5['id']}:{},'appCode':_0x27b1b5[_0x3c6f0c(0x168)],'appName':_0x27b1b5['appName'],..._0x27b1b5[_0x3c6f0c(0x16c)]!=null?{'appDesc':_0x27b1b5[_0x3c6f0c(0x16c)]}:{}})),'meta':{'source':_0x3c6f0c(0x169)}};}
@@ -1 +1 @@
1
- (function(_0x17ef24,_0x5f0d68){const _0x36fa48=a22_0x3f37,_0x4f74de=_0x17ef24();while(!![]){try{const _0x108182=-parseInt(_0x36fa48(0x178))/0x1+-parseInt(_0x36fa48(0x18e))/0x2+-parseInt(_0x36fa48(0x185))/0x3+parseInt(_0x36fa48(0x182))/0x4+-parseInt(_0x36fa48(0x168))/0x5+parseInt(_0x36fa48(0x162))/0x6*(parseInt(_0x36fa48(0x17f))/0x7)+parseInt(_0x36fa48(0x18f))/0x8*(parseInt(_0x36fa48(0x16b))/0x9);if(_0x108182===_0x5f0d68)break;else _0x4f74de['push'](_0x4f74de['shift']());}catch(_0x2b4350){_0x4f74de['push'](_0x4f74de['shift']());}}}(a22_0x4ac2,0xc70eb));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x1236d9){const _0x19fb07=_0x1236d9?.['trim']();return _0x19fb07?_0x19fb07:null;}export function projectAppMembers(_0x5e604b){const _0x246614=a22_0x3f37,_0x5cafa8=new Map(),_0x47ab07=[..._0x5e604b]['sort']((_0x21544b,_0x4ed7e2)=>_0x21544b['id']-_0x4ed7e2['id']),_0x1c83fa=(_0x341060,_0x54e3f5,_0x9870e0)=>{const _0x5bc9d8=a22_0x3f37;for(const _0x5e1644 of _0x54e3f5){const _0x2f569f=Number(_0x5e1644[_0x5bc9d8(0x18a)]);if(!Number[_0x5bc9d8(0x165)](_0x2f569f)||_0x2f569f<=0x0)continue;let _0x174859=_0x5cafa8['get'](_0x2f569f);if(!_0x174859)_0x174859={'userId':_0x2f569f,'username':nullableText(_0x5e1644['username']),'displayName':nullableText(_0x5e1644[_0x5bc9d8(0x17c)]),'status':_0x9870e0,'roles':[],'roleKeys':new Set()},_0x5cafa8[_0x5bc9d8(0x175)](_0x2f569f,_0x174859);else{_0x174859['username']??=nullableText(_0x5e1644[_0x5bc9d8(0x17b)]),_0x174859[_0x5bc9d8(0x177)]??=nullableText(_0x5e1644[_0x5bc9d8(0x17c)]);if(_0x9870e0===_0x5bc9d8(0x190))_0x174859[_0x5bc9d8(0x16e)]=_0x5bc9d8(0x190);}const _0x164242=_0x341060['id']+':'+_0x9870e0;if(_0x174859['roleKeys'][_0x5bc9d8(0x170)](_0x164242))continue;_0x174859[_0x5bc9d8(0x18d)][_0x5bc9d8(0x18b)](_0x164242),_0x174859['roles'][_0x5bc9d8(0x174)]({'roleId':_0x341060['id'],'roleName':nullableText(_0x341060[_0x5bc9d8(0x17e)]),'roleType':nullableText(_0x341060['roleType']),'membershipStatus':_0x9870e0});}};for(const _0x5ab682 of _0x47ab07){_0x1c83fa(_0x5ab682,_0x5ab682['userList']??[],_0x246614(0x190)),_0x1c83fa(_0x5ab682,_0x5ab682[_0x246614(0x169)]??[],_0x246614(0x16d));}return[..._0x5cafa8[_0x246614(0x17d)]()][_0x246614(0x181)](_0x325523=>({'userId':_0x325523[_0x246614(0x18a)],'username':_0x325523[_0x246614(0x17b)],'displayName':_0x325523[_0x246614(0x177)],'status':_0x325523[_0x246614(0x16e)],'roles':_0x325523['roles'][_0x246614(0x16a)]((_0x2e05e1,_0x320a45)=>_0x2e05e1[_0x246614(0x172)]-_0x320a45['roleId']||(_0x2e05e1[_0x246614(0x186)]===_0x320a45[_0x246614(0x186)]?0x0:_0x2e05e1[_0x246614(0x186)]===_0x246614(0x190)?-0x1:0x1))}))[_0x246614(0x16a)]((_0xc457be,_0x342003)=>_0xc457be[_0x246614(0x18a)]-_0x342003[_0x246614(0x18a)]);}export function enrichAppListItemsWithMergedSelection(_0xb55bfe,_0x1b014d){const _0x59bd0d=a22_0x3f37;if(!_0x1b014d)return;const _0x328124=_0x1b014d[_0x59bd0d(0x173)]&&typeof _0x1b014d[_0x59bd0d(0x173)]===_0x59bd0d(0x18c)?_0x1b014d['apps']:{},_0x9f26cb=Object[_0x59bd0d(0x164)](_0x328124)['length']>0x0;for(const _0x1bd2bf of _0xb55bfe){_0x1bd2bf[_0x59bd0d(0x184)]=![];}const _0x484148=_0x1b014d[_0x59bd0d(0x17a)]!=null?String(_0x1b014d['appCode'])[_0x59bd0d(0x176)]():'';if(_0x9f26cb){const _0x1855a1=_0x1b014d[_0x59bd0d(0x189)]??_0x1b014d['defaultApp'];if(_0x1855a1)for(const _0x21ba09 of _0xb55bfe){_0x21ba09[_0x59bd0d(0x183)]===!![]&&_0x21ba09['name']===_0x1855a1&&(_0x21ba09['isCurrent']=!![]);}for(const _0x566696 of _0xb55bfe){if(_0x566696[_0x59bd0d(0x183)]!==![])continue;if(_0x1b014d[_0x59bd0d(0x166)])continue;_0x484148&&String(_0x566696[_0x59bd0d(0x179)]??'')[_0x59bd0d(0x176)]()===_0x484148&&(_0x566696[_0x59bd0d(0x184)]=!![]);}return;}if(!_0x484148)return;for(const _0x46cd86 of _0xb55bfe){String(_0x46cd86['appcode']??'')[_0x59bd0d(0x176)]()===_0x484148&&(_0x46cd86[_0x59bd0d(0x184)]=!![]);}}export function resolveAppScopeForWrite(_0x417ec2,_0x3d85a4,_0x9e0d86){const _0x555e2e=a22_0x3f37;if(_0x3d85a4)return _0x555e2e(0x187);const _0x26a374=_0x9e0d86[_0x555e2e(0x188)]['apps']&&typeof _0x9e0d86[_0x555e2e(0x188)][_0x555e2e(0x173)]===_0x555e2e(0x18c)?_0x9e0d86[_0x555e2e(0x188)][_0x555e2e(0x173)]:{},_0x445ab3=_0x9e0d86[_0x555e2e(0x161)][_0x555e2e(0x173)]&&typeof _0x9e0d86[_0x555e2e(0x161)]['apps']===_0x555e2e(0x18c)?_0x9e0d86['globalConfig'][_0x555e2e(0x173)]:{};if(Object['prototype'][_0x555e2e(0x167)]['call'](_0x26a374,_0x417ec2))return _0x555e2e(0x180);if(Object[_0x555e2e(0x171)]['hasOwnProperty']['call'](_0x445ab3,_0x417ec2))return _0x555e2e(0x187);return _0x555e2e(0x180);}export function appDefinedIn(_0x4b616f,_0x4c5133,_0x59dcce,_0x5ea2ba){const _0x1ffc80=a22_0x3f37;if(_0x5ea2ba)return Object['prototype'][_0x1ffc80(0x167)][_0x1ffc80(0x16c)](_0x59dcce,_0x4b616f)?_0x1ffc80(0x180):_0x1ffc80(0x187);const _0x140b00=Object['prototype'][_0x1ffc80(0x167)][_0x1ffc80(0x16c)](_0x4c5133,_0x4b616f),_0x5c00c8=Object[_0x1ffc80(0x171)][_0x1ffc80(0x167)]['call'](_0x59dcce,_0x4b616f);if(_0x140b00&&_0x5c00c8)return'both';if(_0x5c00c8)return'project';return _0x1ffc80(0x187);}function a22_0x4ac2(){const _0x283f7d=['ACTIVE','length','globalConfig','70506weVHie','\x20(global)','keys','isFinite','defaultApp','hasOwnProperty','6596230sNHVrV','applyUserList','sort','31510089OegNXW','call','PENDING','status','inherit','has','prototype','roleId','apps','push','set','trim','displayName','1524502nCGVYi','appcode','appCode','username','nickname','values','roleName','399htGTev','project','map','4607616uFRBVU','named','isCurrent','4794729cTYkTu','membershipStatus','global','projectConfig','currentApp','userId','add','object','roleKeys','131004OTxHOj','8qSaavz'];a22_0x4ac2=function(){return _0x283f7d;};return a22_0x4ac2();}function a22_0x3f37(_0x54c3cd,_0x4ebcd9){_0x54c3cd=_0x54c3cd-0x161;const _0x4ac232=a22_0x4ac2();let _0x3f374a=_0x4ac232[_0x54c3cd];return _0x3f374a;}export function resolveDefaultAppSource(_0x5be162){const _0x99ba44=a22_0x3f37,_0x4c3b18=_0x5be162['projectConfig']['apps']&&typeof _0x5be162[_0x99ba44(0x188)][_0x99ba44(0x173)]===_0x99ba44(0x18c)?_0x5be162[_0x99ba44(0x188)][_0x99ba44(0x173)]:{};if(_0x99ba44(0x166)in _0x5be162['projectConfig'])return _0x99ba44(0x180);if(Object[_0x99ba44(0x164)](_0x4c3b18)[_0x99ba44(0x191)]>0x0)return _0x99ba44(0x180);if(_0x5be162[_0x99ba44(0x188)][_0x99ba44(0x16f)]===![])return null;if(_0x5be162[_0x99ba44(0x161)][_0x99ba44(0x166)])return _0x99ba44(0x187);return null;}export function getConfigPath(_0x2ccef6={}){const _0x8516c7=a22_0x3f37,_0x571144=_0x2ccef6[_0x8516c7(0x187)]?_0x8516c7(0x187):_0x8516c7(0x180);return resolveWriteConfigPath(_0x571144);}export function readConfig(_0x2b2014={}){return readConfigFile(getConfigPath(_0x2b2014));}export function writeConfig(_0x9749b4,_0xc36c6={}){writeConfigFile(getConfigPath(_0xc36c6),_0x9749b4);}export function scopeLabel(_0xc032b){const _0x4522be=a22_0x3f37;return _0xc032b[_0x4522be(0x187)]?_0x4522be(0x163):'';}
1
+ (function(_0x2ac4b7,_0x4f06cb){const _0x1127b7=a22_0x18c0,_0xc00896=_0x2ac4b7();while(!![]){try{const _0x4c6c8d=-parseInt(_0x1127b7(0x1de))/0x1*(-parseInt(_0x1127b7(0x1da))/0x2)+-parseInt(_0x1127b7(0x1bb))/0x3*(parseInt(_0x1127b7(0x1df))/0x4)+-parseInt(_0x1127b7(0x1b4))/0x5*(-parseInt(_0x1127b7(0x1c3))/0x6)+parseInt(_0x1127b7(0x1bf))/0x7*(parseInt(_0x1127b7(0x1b9))/0x8)+parseInt(_0x1127b7(0x1c0))/0x9*(-parseInt(_0x1127b7(0x1cb))/0xa)+-parseInt(_0x1127b7(0x1d2))/0xb+parseInt(_0x1127b7(0x1e2))/0xc;if(_0x4c6c8d===_0x4f06cb)break;else _0xc00896['push'](_0xc00896['shift']());}catch(_0x596ff6){_0xc00896['push'](_0xc00896['shift']());}}}(a22_0x20a1,0x48cbb));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function nullableText(_0x2c2f0b){const _0x14cd2f=a22_0x18c0,_0xdec795=_0x2c2f0b?.[_0x14cd2f(0x1d6)]();return _0xdec795?_0xdec795:null;}export function projectAppMembers(_0x4a4729){const _0x192802=a22_0x18c0,_0x3fad9f=new Map(),_0x880f61=[..._0x4a4729][_0x192802(0x1c7)]((_0x1ad2d9,_0x4fa9f3)=>_0x1ad2d9['id']-_0x4fa9f3['id']),_0x176729=(_0x541a52,_0x36bc14,_0x3e0ff5)=>{const _0x221c32=_0x192802;for(const _0x2c1cc9 of _0x36bc14){const _0x478432=Number(_0x2c1cc9[_0x221c32(0x1be)]);if(!Number[_0x221c32(0x1e5)](_0x478432)||_0x478432<=0x0)continue;let _0x3b54b7=_0x3fad9f[_0x221c32(0x1b6)](_0x478432);if(!_0x3b54b7)_0x3b54b7={'userId':_0x478432,'username':nullableText(_0x2c1cc9[_0x221c32(0x1c5)]),'displayName':nullableText(_0x2c1cc9[_0x221c32(0x1ce)]),'status':_0x3e0ff5,'roles':[],'roleKeys':new Set()},_0x3fad9f[_0x221c32(0x1b8)](_0x478432,_0x3b54b7);else{_0x3b54b7['username']??=nullableText(_0x2c1cc9['username']),_0x3b54b7[_0x221c32(0x1d1)]??=nullableText(_0x2c1cc9['nickname']);if(_0x3e0ff5==='ACTIVE')_0x3b54b7[_0x221c32(0x1ca)]=_0x221c32(0x1b3);}const _0x4c3c66=_0x541a52['id']+':'+_0x3e0ff5;if(_0x3b54b7[_0x221c32(0x1d4)]['has'](_0x4c3c66))continue;_0x3b54b7[_0x221c32(0x1d4)]['add'](_0x4c3c66),_0x3b54b7[_0x221c32(0x1b0)][_0x221c32(0x1db)]({'roleId':_0x541a52['id'],'roleName':nullableText(_0x541a52[_0x221c32(0x1d9)]),'roleType':nullableText(_0x541a52[_0x221c32(0x1e1)]),'membershipStatus':_0x3e0ff5});}};for(const _0x408ecf of _0x880f61){_0x176729(_0x408ecf,_0x408ecf[_0x192802(0x1d7)]??[],_0x192802(0x1b3)),_0x176729(_0x408ecf,_0x408ecf['applyUserList']??[],_0x192802(0x1dd));}return[..._0x3fad9f[_0x192802(0x1d8)]()][_0x192802(0x1c2)](_0x2bd3a3=>({'userId':_0x2bd3a3[_0x192802(0x1be)],'username':_0x2bd3a3[_0x192802(0x1c5)],'displayName':_0x2bd3a3['displayName'],'status':_0x2bd3a3[_0x192802(0x1ca)],'roles':_0x2bd3a3[_0x192802(0x1b0)][_0x192802(0x1c7)]((_0x214abb,_0x201071)=>_0x214abb[_0x192802(0x1c4)]-_0x201071['roleId']||(_0x214abb[_0x192802(0x1e4)]===_0x201071[_0x192802(0x1e4)]?0x0:_0x214abb[_0x192802(0x1e4)]===_0x192802(0x1b3)?-0x1:0x1))}))[_0x192802(0x1c7)]((_0x5f0404,_0x3e9fe4)=>_0x5f0404[_0x192802(0x1be)]-_0x3e9fe4['userId']);}export function enrichAppListItemsWithMergedSelection(_0x46ce66,_0x595092){const _0x3f77c6=a22_0x18c0;if(!_0x595092)return;const _0x1a1cf3=_0x595092[_0x3f77c6(0x1d5)]&&typeof _0x595092[_0x3f77c6(0x1d5)]===_0x3f77c6(0x1c1)?_0x595092[_0x3f77c6(0x1d5)]:{},_0x4b801c=Object[_0x3f77c6(0x1b2)](_0x1a1cf3)[_0x3f77c6(0x1cd)]>0x0;for(const _0x336058 of _0x46ce66){_0x336058['isCurrent']=![];}const _0x91d783=_0x595092['appCode']!=null?String(_0x595092[_0x3f77c6(0x1ba)])[_0x3f77c6(0x1d6)]():'';if(_0x4b801c){const _0x3b17e7=_0x595092[_0x3f77c6(0x1e3)]??_0x595092[_0x3f77c6(0x1b7)];if(_0x3b17e7)for(const _0x18bf3d of _0x46ce66){_0x18bf3d[_0x3f77c6(0x1cc)]===!![]&&_0x18bf3d[_0x3f77c6(0x1bd)]===_0x3b17e7&&(_0x18bf3d[_0x3f77c6(0x1b5)]=!![]);}for(const _0x361e30 of _0x46ce66){if(_0x361e30[_0x3f77c6(0x1cc)]!==![])continue;if(_0x595092['defaultApp'])continue;_0x91d783&&String(_0x361e30[_0x3f77c6(0x1bc)]??'')[_0x3f77c6(0x1d6)]()===_0x91d783&&(_0x361e30['isCurrent']=!![]);}return;}if(!_0x91d783)return;for(const _0xbfc1c3 of _0x46ce66){String(_0xbfc1c3[_0x3f77c6(0x1bc)]??'')[_0x3f77c6(0x1d6)]()===_0x91d783&&(_0xbfc1c3[_0x3f77c6(0x1b5)]=!![]);}}export function resolveAppScopeForWrite(_0x1cc18d,_0x1bef25,_0x5aafe1){const _0x4a63d0=a22_0x18c0;if(_0x1bef25)return'global';const _0x2ed201=_0x5aafe1[_0x4a63d0(0x1d0)][_0x4a63d0(0x1d5)]&&typeof _0x5aafe1[_0x4a63d0(0x1d0)][_0x4a63d0(0x1d5)]===_0x4a63d0(0x1c1)?_0x5aafe1['projectConfig'][_0x4a63d0(0x1d5)]:{},_0x2bbfe7=_0x5aafe1[_0x4a63d0(0x1b1)][_0x4a63d0(0x1d5)]&&typeof _0x5aafe1[_0x4a63d0(0x1b1)][_0x4a63d0(0x1d5)]==='object'?_0x5aafe1[_0x4a63d0(0x1b1)][_0x4a63d0(0x1d5)]:{};if(Object[_0x4a63d0(0x1c6)][_0x4a63d0(0x1e0)][_0x4a63d0(0x1dc)](_0x2ed201,_0x1cc18d))return'project';if(Object['prototype'][_0x4a63d0(0x1e0)][_0x4a63d0(0x1dc)](_0x2bbfe7,_0x1cc18d))return _0x4a63d0(0x1d3);return _0x4a63d0(0x1cf);}export function appDefinedIn(_0x386004,_0x3a5c02,_0x3f8fe5,_0x2e6275){const _0x357d4c=a22_0x18c0;if(_0x2e6275)return Object['prototype'][_0x357d4c(0x1e0)][_0x357d4c(0x1dc)](_0x3f8fe5,_0x386004)?'project':_0x357d4c(0x1d3);const _0x305e07=Object[_0x357d4c(0x1c6)]['hasOwnProperty'][_0x357d4c(0x1dc)](_0x3a5c02,_0x386004),_0x534027=Object[_0x357d4c(0x1c6)][_0x357d4c(0x1e0)][_0x357d4c(0x1dc)](_0x3f8fe5,_0x386004);if(_0x305e07&&_0x534027)return'both';if(_0x534027)return _0x357d4c(0x1cf);return _0x357d4c(0x1d3);}export function resolveDefaultAppSource(_0x48ca0){const _0x1ee91b=a22_0x18c0,_0x8af31a=_0x48ca0['projectConfig']['apps']&&typeof _0x48ca0[_0x1ee91b(0x1d0)][_0x1ee91b(0x1d5)]===_0x1ee91b(0x1c1)?_0x48ca0[_0x1ee91b(0x1d0)]['apps']:{};if(_0x1ee91b(0x1b7)in _0x48ca0[_0x1ee91b(0x1d0)])return _0x1ee91b(0x1cf);if(Object[_0x1ee91b(0x1b2)](_0x8af31a)['length']>0x0)return _0x1ee91b(0x1cf);if(_0x48ca0['projectConfig'][_0x1ee91b(0x1c8)]===![])return null;if(_0x48ca0[_0x1ee91b(0x1b1)]['defaultApp'])return _0x1ee91b(0x1d3);return null;}export function getConfigPath(_0x5e48dd={}){const _0x39eb20=a22_0x18c0,_0x35bd1c=_0x5e48dd[_0x39eb20(0x1d3)]?_0x39eb20(0x1d3):_0x39eb20(0x1cf);return resolveWriteConfigPath(_0x35bd1c);}export function readConfig(_0x5cac80={}){return readConfigFile(getConfigPath(_0x5cac80));}function a22_0x18c0(_0xb4de57,_0x45f502){_0xb4de57=_0xb4de57-0x1b0;const _0x20a1ab=a22_0x20a1();let _0x18c016=_0x20a1ab[_0xb4de57];return _0x18c016;}export function writeConfig(_0x160de8,_0x532af8={}){writeConfigFile(getConfigPath(_0x532af8),_0x160de8);}export function scopeLabel(_0x4d1b9d){const _0x2972ff=a22_0x18c0;return _0x4d1b9d['global']?_0x2972ff(0x1c9):'';}function a22_0x20a1(){const _0x1f369f=['hasOwnProperty','roleType','1524288mdilQr','currentApp','membershipStatus','isFinite','roles','globalConfig','keys','ACTIVE','5zbpDZz','isCurrent','get','defaultApp','set','88664XBbvwr','appCode','13740jHsWPf','appcode','name','userId','133NjxVvb','927gzfpzm','object','map','3071802TuEwAL','roleId','username','prototype','sort','inherit','\x20(global)','status','8680BeikFu','named','length','nickname','project','projectConfig','displayName','907797VMVvZR','global','roleKeys','apps','trim','userList','values','roleName','18XKrLax','push','call','PENDING','4146qEYTiA','364boSoBS'];a22_0x20a1=function(){return _0x1f369f;};return a22_0x20a1();}
@@ -1 +1 @@
1
- const a23_0x376bda=a23_0x2b12;(function(_0x6e5c68,_0x35f963){const _0xa2476=a23_0x2b12,_0xe1fca5=_0x6e5c68();while(!![]){try{const _0x39b037=parseInt(_0xa2476(0x168))/0x1*(-parseInt(_0xa2476(0x16e))/0x2)+parseInt(_0xa2476(0x164))/0x3+-parseInt(_0xa2476(0x178))/0x4*(-parseInt(_0xa2476(0x171))/0x5)+parseInt(_0xa2476(0x163))/0x6*(-parseInt(_0xa2476(0x162))/0x7)+-parseInt(_0xa2476(0x170))/0x8+-parseInt(_0xa2476(0x167))/0x9+parseInt(_0xa2476(0x175))/0xa;if(_0x39b037===_0x35f963)break;else _0xe1fca5['push'](_0xe1fca5['shift']());}catch(_0x753b0f){_0xe1fca5['push'](_0xe1fca5['shift']());}}}(a23_0xa691,0xecbcc));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';function a23_0x2b12(_0x56fcf1,_0x58baf1){_0x56fcf1=_0x56fcf1-0x162;const _0xa691bd=a23_0xa691();let _0x2b12b4=_0xa691bd[_0x56fcf1];return _0x2b12b4;}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_0x376bda(0x16d);export const appConfigDelete={'service':a23_0x376bda(0x177),'command':a23_0x376bda(0x176),'description':a23_0x376bda(0x16c),'risk':a23_0x376bda(0x174),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x45e83b){readKeyArg(_0x45e83b);},async 'dryRun'(_0x351d1a){const _0x4b5f6c=a23_0x376bda,_0xcd61a4=readKeyArg(_0x351d1a),_0x19830b=await mustGetByKey(_0x351d1a[_0x4b5f6c(0x166)],_0xcd61a4);return asAppConfigDryRunResult(buildMutationData({'operation':_0x4b5f6c(0x176),'appCode':_0x351d1a[_0x4b5f6c(0x166)],'key':_0xcd61a4,'before':projectAppConfig(_0x19830b),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x5b1c2b){const _0x26445b=a23_0x376bda,_0x323e56=readKeyArg(_0x5b1c2b),_0x29c07b=await mustGetByKey(_0x5b1c2b[_0x26445b(0x166)],_0x323e56);return await withAppConfigApiBoundary(_0x26445b(0x176),{'appCode':_0x5b1c2b[_0x26445b(0x166)],'key':_0x323e56},()=>deleteAppConfig({'appCode':_0x5b1c2b['appCode'],'id':requireAppConfigId(_0x29c07b,_0x323e56,_0x5b1c2b[_0x26445b(0x166)])})),{'ok':!![],'data':buildMutationData({'operation':_0x26445b(0x176),'appCode':_0x5b1c2b[_0x26445b(0x166)],'key':_0x323e56,'before':projectAppConfig(_0x29c07b),'after':null,'dryRun':![]}),'message':_0x26445b(0x16b)+_0x323e56};}};function a23_0xa691(){const _0x6e84f7=['Deleted\x20app\x20config\x20','Delete\x20one\x20runtime\x20app-config\x20key','/smartapi/app-config/delete','10pSHqoL','apiError','4851560OwiSpU','8020725tDeiWB','App\x20config\x20server\x20id\x20missing\x20for\x20key=','appCode:\x20','high-risk-write','13671250PamjcU','delete','app-config','4hxeFXO','App\x20config\x20key\x20not\x20found:\x20','6355531loQHDv','6vGBKBo','1989285CtyKSj','get','appCode','7911189OlVFxj','54258xFEjnx','validation','number'];a23_0xa691=function(){return _0x6e84f7;};return a23_0xa691();}async function mustGetByKey(_0x18be71,_0x5481b6){const _0x1ef8c0=a23_0x376bda,_0x239088=await withAppConfigApiBoundary(_0x1ef8c0(0x165),{'appCode':_0x18be71,'key':_0x5481b6},()=>getAppConfigByKey(_0x18be71,_0x5481b6));if(!_0x239088)throw CliErrors[_0x1ef8c0(0x169)](_0x1ef8c0(0x179)+_0x5481b6,_0x1ef8c0(0x173)+_0x18be71);return _0x239088;}function requireAppConfigId(_0x113374,_0x3ef24c,_0x11f6de){const _0x558fd6=a23_0x376bda;if(typeof _0x113374['id']===_0x558fd6(0x16a)&&Number['isFinite'](_0x113374['id'])&&_0x113374['id']>0x0)return _0x113374['id'];throw CliErrors[_0x558fd6(0x16f)](_0x558fd6(0x172)+_0x3ef24c+',\x20appCode='+_0x11f6de);}
1
+ const a23_0x3656b0=a23_0x20e2;(function(_0x1ba6c2,_0x34d015){const _0xbdf9ae=a23_0x20e2,_0xe0f4a9=_0x1ba6c2();while(!![]){try{const _0x477e5c=parseInt(_0xbdf9ae(0x80))/0x1*(-parseInt(_0xbdf9ae(0x6f))/0x2)+-parseInt(_0xbdf9ae(0x74))/0x3*(-parseInt(_0xbdf9ae(0x7f))/0x4)+-parseInt(_0xbdf9ae(0x82))/0x5+parseInt(_0xbdf9ae(0x7b))/0x6+-parseInt(_0xbdf9ae(0x6b))/0x7*(parseInt(_0xbdf9ae(0x6c))/0x8)+parseInt(_0xbdf9ae(0x76))/0x9*(parseInt(_0xbdf9ae(0x81))/0xa)+-parseInt(_0xbdf9ae(0x72))/0xb*(-parseInt(_0xbdf9ae(0x77))/0xc);if(_0x477e5c===_0x34d015)break;else _0xe0f4a9['push'](_0xe0f4a9['shift']());}catch(_0xd42ae1){_0xe0f4a9['push'](_0xe0f4a9['shift']());}}}(a23_0x57b8,0xe9387));function a23_0x20e2(_0x397aee,_0x1c6d8c){_0x397aee=_0x397aee-0x6a;const _0x57b89e=a23_0x57b8();let _0x20e27a=_0x57b89e[_0x397aee];return _0x20e27a;}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_0x3656b0(0x75);function a23_0x57b8(){const _0x4d17ee=['appCode:\x20','4NyuOEn','676utKtKH','6874110VAhQDM','8160960KEipIi','Deleted\x20app\x20config\x20','287oEiEXN','113016ddZmbJ',',\x20appCode=','appCode','3574zmGKEf','App\x20config\x20key\x20not\x20found:\x20','App\x20config\x20server\x20id\x20missing\x20for\x20key=','177078tvrdYM','app-config','4968903IHKVwC','/smartapi/app-config/delete','9BJmWOp','696eUyiLy','apiError','isFinite','get','6583716yMwmnq','validation','delete'];a23_0x57b8=function(){return _0x4d17ee;};return a23_0x57b8();}export const appConfigDelete={'service':a23_0x3656b0(0x73),'command':'delete','description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1eccf8){readKeyArg(_0x1eccf8);},async 'dryRun'(_0x13d18d){const _0x1c8b6b=a23_0x3656b0,_0x548bfc=readKeyArg(_0x13d18d),_0x5325d4=await mustGetByKey(_0x13d18d[_0x1c8b6b(0x6e)],_0x548bfc);return asAppConfigDryRunResult(buildMutationData({'operation':_0x1c8b6b(0x7d),'appCode':_0x13d18d[_0x1c8b6b(0x6e)],'key':_0x548bfc,'before':projectAppConfig(_0x5325d4),'after':null,'dryRun':!![]}),{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x1bc15c){const _0x33f5f2=a23_0x3656b0,_0x2e5ba3=readKeyArg(_0x1bc15c),_0x3cfd9d=await mustGetByKey(_0x1bc15c['appCode'],_0x2e5ba3);return await withAppConfigApiBoundary(_0x33f5f2(0x7d),{'appCode':_0x1bc15c[_0x33f5f2(0x6e)],'key':_0x2e5ba3},()=>deleteAppConfig({'appCode':_0x1bc15c[_0x33f5f2(0x6e)],'id':requireAppConfigId(_0x3cfd9d,_0x2e5ba3,_0x1bc15c['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0x1bc15c[_0x33f5f2(0x6e)],'key':_0x2e5ba3,'before':projectAppConfig(_0x3cfd9d),'after':null,'dryRun':![]}),'message':_0x33f5f2(0x6a)+_0x2e5ba3};}};async function mustGetByKey(_0x182d38,_0x26772e){const _0x5d1058=a23_0x3656b0,_0x1a81b9=await withAppConfigApiBoundary(_0x5d1058(0x7a),{'appCode':_0x182d38,'key':_0x26772e},()=>getAppConfigByKey(_0x182d38,_0x26772e));if(!_0x1a81b9)throw CliErrors[_0x5d1058(0x7c)](_0x5d1058(0x70)+_0x26772e,_0x5d1058(0x7e)+_0x182d38);return _0x1a81b9;}function requireAppConfigId(_0x4d079d,_0x1fb0fd,_0xeaf21f){const _0x580830=a23_0x3656b0;if(typeof _0x4d079d['id']==='number'&&Number[_0x580830(0x79)](_0x4d079d['id'])&&_0x4d079d['id']>0x0)return _0x4d079d['id'];throw CliErrors[_0x580830(0x78)](_0x580830(0x71)+_0x1fb0fd+_0x580830(0x6d)+_0xeaf21f);}
@@ -1 +1 @@
1
- const a24_0x8ed9a4=a24_0x2e95;(function(_0x404475,_0x339071){const _0x4fad19=a24_0x2e95,_0x43acd1=_0x404475();while(!![]){try{const _0x54327d=parseInt(_0x4fad19(0x1bb))/0x1+parseInt(_0x4fad19(0x1b4))/0x2*(parseInt(_0x4fad19(0x1c3))/0x3)+-parseInt(_0x4fad19(0x1bd))/0x4*(-parseInt(_0x4fad19(0x1b6))/0x5)+-parseInt(_0x4fad19(0x1b0))/0x6*(-parseInt(_0x4fad19(0x1ba))/0x7)+parseInt(_0x4fad19(0x1c4))/0x8*(parseInt(_0x4fad19(0x1b3))/0x9)+parseInt(_0x4fad19(0x1b2))/0xa+-parseInt(_0x4fad19(0x1c1))/0xb*(parseInt(_0x4fad19(0x1b7))/0xc);if(_0x54327d===_0x339071)break;else _0x43acd1['push'](_0x43acd1['shift']());}catch(_0x399b3b){_0x43acd1['push'](_0x43acd1['shift']());}}}(a24_0x4ed7,0x981c6));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a24_0x2e95(_0x756f43,_0x127bcc){_0x756f43=_0x756f43-0x1af;const _0x4ed7d3=a24_0x4ed7();let _0x2e95f6=_0x4ed7d3[_0x756f43];return _0x2e95f6;}function a24_0x4ed7(){const _0x341143=['256836sjIUtj','read','4501770yQIlEn','5033817Lljdin','2hkeFpJ','appCode','15Mrbxdj','93360zfRhSt','reveal','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','147wotDPD','772084HMvoqp','get','1297460ZpdVWF','\x20with\x20value\x20revealed','bool','App\x20config\x20key\x20not\x20found:\x20','5225UxYYFX','\x20with\x20value\x20redacted','1994853XsrIZW','8ZJiLiq','Loaded\x20app\x20config\x20'];a24_0x4ed7=function(){return _0x341143;};return a24_0x4ed7();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':'get','description':a24_0x8ed9a4(0x1b9),'risk':a24_0x8ed9a4(0x1b1),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x20212c){readKeyArg(_0x20212c);},async 'execute'(_0x270e55){const _0x78bd93=a24_0x8ed9a4,_0x2dceaa=readKeyArg(_0x270e55),_0xf4c5d7=await withAppConfigApiBoundary(_0x78bd93(0x1bc),{'appCode':_0x270e55[_0x78bd93(0x1b5)],'key':_0x2dceaa},()=>getAppConfigByKey(_0x270e55[_0x78bd93(0x1b5)],_0x2dceaa));if(!_0xf4c5d7)throw CliErrors['validation'](_0x78bd93(0x1c0)+_0x2dceaa,'appCode:\x20'+_0x270e55[_0x78bd93(0x1b5)]);const _0x3af71e=projectAppConfig(_0xf4c5d7,{'reveal':_0x270e55[_0x78bd93(0x1bf)]('reveal')});return{'ok':!![],'data':{'config':_0x3af71e},'message':_0x270e55[_0x78bd93(0x1bf)](_0x78bd93(0x1b8))?_0x78bd93(0x1af)+_0x2dceaa+_0x78bd93(0x1be):'Loaded\x20app\x20config\x20'+_0x2dceaa+_0x78bd93(0x1c2)};}};
1
+ const a24_0x5c5ca8=a24_0x3d4b;(function(_0x40d762,_0x1b3040){const _0x1cecdd=a24_0x3d4b,_0x34391c=_0x40d762();while(!![]){try{const _0xea5a8=parseInt(_0x1cecdd(0x1e9))/0x1*(parseInt(_0x1cecdd(0x1eb))/0x2)+-parseInt(_0x1cecdd(0x1e7))/0x3+parseInt(_0x1cecdd(0x1e0))/0x4*(-parseInt(_0x1cecdd(0x1e4))/0x5)+parseInt(_0x1cecdd(0x1ef))/0x6*(parseInt(_0x1cecdd(0x1e8))/0x7)+-parseInt(_0x1cecdd(0x1de))/0x8+-parseInt(_0x1cecdd(0x1e2))/0x9+-parseInt(_0x1cecdd(0x1dd))/0xa*(-parseInt(_0x1cecdd(0x1ed))/0xb);if(_0xea5a8===_0x1b3040)break;else _0x34391c['push'](_0x34391c['shift']());}catch(_0x6af801){_0x34391c['push'](_0x34391c['shift']());}}}(a24_0x4500,0xd7a4a));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a24_0x4500(){const _0x201988=['bool','13252302WbjfcE','appCode','561245UgdHbw','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','appCode:\x20','4625271AtTHiH','3122yTZvei','1361425thhFQw','Loaded\x20app\x20config\x20','2WvUQgu','get','11ThJgHp','\x20with\x20value\x20revealed','7428dJXEAC','app-config','read','App\x20config\x20key\x20not\x20found:\x20','reveal','30732420wNgmuN','6918464RbaCkf','\x20with\x20value\x20redacted','8Vgczin'];a24_0x4500=function(){return _0x201988;};return a24_0x4500();}function a24_0x3d4b(_0x37fd5f,_0x5e49b3){_0x37fd5f=_0x37fd5f-0x1d9;const _0x4500f5=a24_0x4500();let _0x3d4b7f=_0x4500f5[_0x37fd5f];return _0x3d4b7f;}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_0x5c5ca8(0x1d9),'command':a24_0x5c5ca8(0x1ec),'description':a24_0x5c5ca8(0x1e5),'risk':a24_0x5c5ca8(0x1da),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x14199c){readKeyArg(_0x14199c);},async 'execute'(_0xc96190){const _0x25876a=a24_0x5c5ca8,_0x228985=readKeyArg(_0xc96190),_0x3c352a=await withAppConfigApiBoundary(_0x25876a(0x1ec),{'appCode':_0xc96190[_0x25876a(0x1e3)],'key':_0x228985},()=>getAppConfigByKey(_0xc96190['appCode'],_0x228985));if(!_0x3c352a)throw CliErrors['validation'](_0x25876a(0x1db)+_0x228985,_0x25876a(0x1e6)+_0xc96190[_0x25876a(0x1e3)]);const _0x485232=projectAppConfig(_0x3c352a,{'reveal':_0xc96190[_0x25876a(0x1e1)](_0x25876a(0x1dc))});return{'ok':!![],'data':{'config':_0x485232},'message':_0xc96190[_0x25876a(0x1e1)]('reveal')?_0x25876a(0x1ea)+_0x228985+_0x25876a(0x1ee):'Loaded\x20app\x20config\x20'+_0x228985+_0x25876a(0x1df)};}};
@@ -1 +1 @@
1
- function a25_0x4825(_0x5a01f4,_0x22f097){_0x5a01f4=_0x5a01f4-0x184;const _0x298bca=a25_0x298b();let _0x482504=_0x298bca[_0x5a01f4];return _0x482504;}(function(_0x50a88b,_0x53a5a8){const _0x205519=a25_0x4825,_0x3c143d=_0x50a88b();while(!![]){try{const _0x27b566=-parseInt(_0x205519(0x189))/0x1*(-parseInt(_0x205519(0x18c))/0x2)+-parseInt(_0x205519(0x188))/0x3+parseInt(_0x205519(0x184))/0x4*(-parseInt(_0x205519(0x185))/0x5)+-parseInt(_0x205519(0x18b))/0x6+parseInt(_0x205519(0x187))/0x7+-parseInt(_0x205519(0x18a))/0x8+parseInt(_0x205519(0x186))/0x9;if(_0x27b566===_0x53a5a8)break;else _0x3c143d['push'](_0x3c143d['shift']());}catch(_0x210933){_0x3c143d['push'](_0x3c143d['shift']());}}}(a25_0x298b,0x800e3));function a25_0x298b(){const _0x391e4d=['5728aiMQqr','100AzMUds','12138885FFoamP','4980976IZQDac','2277630VQNtmg','1SuizEW','3422000fedGMG','2220114ZpjtRr','99602BSNGLz'];a25_0x298b=function(){return _0x391e4d;};return a25_0x298b();}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];
1
+ function a25_0x6fbc(){const _0x5307f5=['330612OOleNk','14CCxLdV','540920CePVsD','143NwXDzH','2092088aWWMVo','1309986nSqkIV','5taNQZS','2964284jDgYCa','57048irolMZ','1586496tpNgyn','5pvnrEr'];a25_0x6fbc=function(){return _0x5307f5;};return a25_0x6fbc();}(function(_0xd2c907,_0x11c0d4){const _0x354295=a25_0x2017,_0x37ada3=_0xd2c907();while(!![]){try{const _0x842069=-parseInt(_0x354295(0xa9))/0x1*(parseInt(_0x354295(0xa3))/0x2)+parseInt(_0x354295(0xa1))/0x3+parseInt(_0x354295(0xaa))/0x4+-parseInt(_0x354295(0xa2))/0x5*(parseInt(_0x354295(0xa0))/0x6)+parseInt(_0x354295(0xa4))/0x7*(-parseInt(_0x354295(0xa7))/0x8)+-parseInt(_0x354295(0xa8))/0x9+parseInt(_0x354295(0xa5))/0xa*(parseInt(_0x354295(0xa6))/0xb);if(_0x842069===_0x11c0d4)break;else _0x37ada3['push'](_0x37ada3['shift']());}catch(_0x57cdce){_0x37ada3['push'](_0x37ada3['shift']());}}}(a25_0x6fbc,0x72605));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';function a25_0x2017(_0x2d65cf,_0x59a6b5){_0x2d65cf=_0x2d65cf-0xa0;const _0x6fbc79=a25_0x6fbc();let _0x2017d2=_0x6fbc79[_0x2d65cf];return _0x2017d2;}import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
@@ -1 +1 @@
1
- const a26_0xb8ba22=a26_0x302b;function a26_0x31dd(){const _0x3669fc=['7EQYCoB','appCode','Filter\x20by\x20exact\x20config\x20key','5848617SaikYa','map','str','read','length','7256305sCvUjj','Found\x20','20790936dVloQQ','306279rlsBzr','key','5621232TuRnov','2023300doknuS','4535916hsIFcI','trim'];a26_0x31dd=function(){return _0x3669fc;};return a26_0x31dd();}function a26_0x302b(_0x414cdb,_0x444aaf){_0x414cdb=_0x414cdb-0xb5;const _0x31dd3b=a26_0x31dd();let _0x302bc6=_0x31dd3b[_0x414cdb];return _0x302bc6;}(function(_0xb193e4,_0x1dac8f){const _0x1d0686=a26_0x302b,_0x2a1323=_0xb193e4();while(!![]){try{const _0x559ab5=-parseInt(_0x1d0686(0xb8))/0x1+-parseInt(_0x1d0686(0xbb))/0x2+-parseInt(_0x1d0686(0xc1))/0x3+parseInt(_0x1d0686(0xbc))/0x4+parseInt(_0x1d0686(0xb5))/0x5+-parseInt(_0x1d0686(0xba))/0x6*(parseInt(_0x1d0686(0xbe))/0x7)+parseInt(_0x1d0686(0xb7))/0x8;if(_0x559ab5===_0x1dac8f)break;else _0x2a1323['push'](_0x2a1323['shift']());}catch(_0x50de3e){_0x2a1323['push'](_0x2a1323['shift']());}}}(a26_0x31dd,0xef337));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':'app-config','command':'list','description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a26_0xb8ba22(0xc4),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a26_0xb8ba22(0xb9),'type':'string','description':a26_0xb8ba22(0xc0)},TAGS_FLAG],async 'validate'(_0x1a7447){const _0x410c0b=a26_0xb8ba22,_0x124273=_0x1a7447[_0x410c0b(0xc3)]('key')[_0x410c0b(0xbd)]();if(_0x124273)validateKey(_0x124273);readOptionalTags(_0x1a7447);},async 'execute'(_0x46e94f){const _0x5d56db=a26_0xb8ba22,_0x215e1f=_0x46e94f['str']('key')['trim']()||undefined,_0x3094fd=readOptionalTags(_0x46e94f),_0x44398f=await withAppConfigApiBoundary('list',{'appCode':_0x46e94f[_0x5d56db(0xbf)]},()=>listAppConfigs(_0x46e94f['appCode'],{'key':_0x215e1f,'tags':_0x3094fd})),_0x5c1afa=_0x44398f[_0x5d56db(0xc2)](_0xa02f15=>projectAppConfig(_0xa02f15));return{'ok':!![],'data':{'appCode':_0x46e94f[_0x5d56db(0xbf)],'count':_0x5c1afa[_0x5d56db(0xc5)],'configs':_0x5c1afa},'message':_0x5d56db(0xb6)+_0x5c1afa[_0x5d56db(0xc5)]+'\x20app\x20config(s)'};}};
1
+ const a26_0xddbcb8=a26_0x5c77;(function(_0x2fb192,_0x5d1983){const _0x1cb2a2=a26_0x5c77,_0x4a9f0d=_0x2fb192();while(!![]){try{const _0x478a27=parseInt(_0x1cb2a2(0x177))/0x1*(parseInt(_0x1cb2a2(0x175))/0x2)+parseInt(_0x1cb2a2(0x162))/0x3*(parseInt(_0x1cb2a2(0x179))/0x4)+-parseInt(_0x1cb2a2(0x16b))/0x5+-parseInt(_0x1cb2a2(0x173))/0x6*(parseInt(_0x1cb2a2(0x16f))/0x7)+parseInt(_0x1cb2a2(0x166))/0x8*(parseInt(_0x1cb2a2(0x169))/0x9)+-parseInt(_0x1cb2a2(0x176))/0xa*(-parseInt(_0x1cb2a2(0x171))/0xb)+-parseInt(_0x1cb2a2(0x172))/0xc;if(_0x478a27===_0x5d1983)break;else _0x4a9f0d['push'](_0x4a9f0d['shift']());}catch(_0x3359a6){_0x4a9f0d['push'](_0x4a9f0d['shift']());}}}(a26_0x5e6d,0x765fa));import{listAppConfigs}from'../../core/api-client.js';function a26_0x5e6d(){const _0x3fe77d=['Filter\x20by\x20exact\x20config\x20key','2892sdJoeV','1433490CZgDgQ','633SniyXK','list','7336aOIYWU','Found\x20','615RfijDG','read','length','trim','4651936ClGoFp','string','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','9txdOKM','map','4241425IGxbdi','str','appCode','\x20app\x20config(s)','28bxCIfX','key','44fdhljj','8819580TIobKI','567102haMVLO'];a26_0x5e6d=function(){return _0x3fe77d;};return a26_0x5e6d();}function a26_0x5c77(_0x58e364,_0x4b0438){_0x58e364=_0x58e364-0x162;const _0x5e6d82=a26_0x5e6d();let _0x5c7794=_0x5e6d82[_0x58e364];return _0x5c7794;}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':'app-config','command':a26_0xddbcb8(0x178),'description':a26_0xddbcb8(0x168),'risk':a26_0xddbcb8(0x163),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a26_0xddbcb8(0x170),'type':a26_0xddbcb8(0x167),'description':a26_0xddbcb8(0x174)},TAGS_FLAG],async 'validate'(_0x49fadc){const _0x39c0a5=a26_0xddbcb8,_0x15ecfb=_0x49fadc[_0x39c0a5(0x16c)](_0x39c0a5(0x170))['trim']();if(_0x15ecfb)validateKey(_0x15ecfb);readOptionalTags(_0x49fadc);},async 'execute'(_0xa08ff9){const _0xd0c775=a26_0xddbcb8,_0xc15e34=_0xa08ff9['str']('key')[_0xd0c775(0x165)]()||undefined,_0x1dc041=readOptionalTags(_0xa08ff9),_0x26a636=await withAppConfigApiBoundary(_0xd0c775(0x178),{'appCode':_0xa08ff9['appCode']},()=>listAppConfigs(_0xa08ff9[_0xd0c775(0x16d)],{'key':_0xc15e34,'tags':_0x1dc041})),_0x5252c6=_0x26a636[_0xd0c775(0x16a)](_0x597a5f=>projectAppConfig(_0x597a5f));return{'ok':!![],'data':{'appCode':_0xa08ff9['appCode'],'count':_0x5252c6[_0xd0c775(0x164)],'configs':_0x5252c6},'message':_0xd0c775(0x17a)+_0x5252c6[_0xd0c775(0x164)]+_0xd0c775(0x16e)};}};
@@ -1 +1 @@
1
- const a27_0x3bac98=a27_0x2726;(function(_0x23443e,_0x285a97){const _0x3399bf=a27_0x2726,_0xfd755d=_0x23443e();while(!![]){try{const _0x473486=parseInt(_0x3399bf(0x1bf))/0x1*(parseInt(_0x3399bf(0x1d0))/0x2)+-parseInt(_0x3399bf(0x1c1))/0x3+-parseInt(_0x3399bf(0x1d2))/0x4*(parseInt(_0x3399bf(0x1ce))/0x5)+-parseInt(_0x3399bf(0x1c3))/0x6*(-parseInt(_0x3399bf(0x1d8))/0x7)+-parseInt(_0x3399bf(0x1cd))/0x8*(parseInt(_0x3399bf(0x1d5))/0x9)+-parseInt(_0x3399bf(0x1ca))/0xa*(-parseInt(_0x3399bf(0x1d1))/0xb)+parseInt(_0x3399bf(0x1d7))/0xc*(parseInt(_0x3399bf(0x1d4))/0xd);if(_0x473486===_0x285a97)break;else _0xfd755d['push'](_0xfd755d['shift']());}catch(_0xd8daa3){_0xfd755d['push'](_0xfd755d['shift']());}}}(a27_0x1a2e,0xe049c));function a27_0x1a2e(){const _0x3eeaeb=[',\x20appCode=','Updated','203663MKEBvu','update','4998618DJHuEu','Created','4594332sKqhTi','tags','string','high-risk-write','get','isFinite','POST','57190eoRvLX','create','/smartapi/app-config/create','8sVSBCT','250igPENa','appCode','14FiOjsP','2596UndBfc','119192gFfaFJ','/smartapi/app-config/update','13ujDCov','6726033NdmFqn','set','6184296QroyKg','14TqSstb','number','apiError'];a27_0x1a2e=function(){return _0x3eeaeb;};return a27_0x1a2e();}import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a27_0x3bac98(0x1cc),UPDATE_PATH=a27_0x3bac98(0x1d3);function a27_0x2726(_0x56da5d,_0x17a443){_0x56da5d=_0x56da5d-0x1be;const _0x1a2eec=a27_0x1a2e();let _0x27264d=_0x1a2eec[_0x56da5d];return _0x27264d;}export const appConfigSet={'service':'app-config','command':a27_0x3bac98(0x1d6),'description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a27_0x3bac98(0x1c6),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a27_0x3bac98(0x1c5),'description':'Read\x20config\x20value\x20from\x20file'}],async 'validate'(_0x3e7da3){readKeyArg(_0x3e7da3),readOptionalTags(_0x3e7da3),assertSingleValueSource(_0x3e7da3);},async 'dryRun'(_0x3fc062){const _0x4dd44c=a27_0x3bac98,_0x4e19d9=readKeyArg(_0x3fc062),_0x253d6a=readOptionalTags(_0x3fc062),_0x31b501=assertSingleValueSource(_0x3fc062);await assertValueSourceReadable(_0x31b501);const _0xe258e9=await withAppConfigApiBoundary('get',{'appCode':_0x3fc062['appCode'],'key':_0x4e19d9},()=>getAppConfigByKey(_0x3fc062[_0x4dd44c(0x1cf)],_0x4e19d9)),_0x2afac8=_0xe258e9?_0x4dd44c(0x1c0):_0x4dd44c(0x1cb),_0x509c9c=_0xe258e9?projectAppConfig(_0xe258e9):null,_0x4ba735=plannedAppConfig({'appCode':_0x3fc062['appCode'],'key':_0x4e19d9,'tags':_0x253d6a??_0xe258e9?.[_0x4dd44c(0x1c4)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x2afac8,'appCode':_0x3fc062[_0x4dd44c(0x1cf)],'key':_0x4e19d9,'before':_0x509c9c,'after':_0x4ba735,'dryRun':!![]}),{'method':_0x4dd44c(0x1c9),'url':_0x2afac8==='update'?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x1758a5){const _0x1b3d67=a27_0x3bac98,_0x420c82=readKeyArg(_0x1758a5),_0x161e27=readOptionalTags(_0x1758a5),_0x1eff6a=await withAppConfigApiBoundary(_0x1b3d67(0x1c7),{'appCode':_0x1758a5[_0x1b3d67(0x1cf)],'key':_0x420c82},()=>getAppConfigByKey(_0x1758a5[_0x1b3d67(0x1cf)],_0x420c82)),_0x187f4e=_0x1eff6a?projectAppConfig(_0x1eff6a):null,_0x3dbe58=_0x1eff6a?_0x1b3d67(0x1c0):_0x1b3d67(0x1cb),{value:_0x450e8f,warnings:_0x1b18a0}=await readAppConfigValue(_0x1758a5),_0x52f99a={'appCode':_0x1758a5['appCode'],'key':_0x420c82,'value':_0x450e8f,'tags':_0x161e27??_0x1eff6a?.['tags']??undefined};await withAppConfigApiBoundary(_0x3dbe58,{'appCode':_0x1758a5[_0x1b3d67(0x1cf)],'key':_0x420c82},async()=>{const _0x35913f=_0x1b3d67;_0x1eff6a?await updateAppConfig({..._0x52f99a,'id':requireAppConfigId(_0x1eff6a,_0x420c82,_0x1758a5[_0x35913f(0x1cf)])}):await createAppConfig(_0x52f99a);});const _0x4561b8=await withAppConfigApiBoundary(_0x1b3d67(0x1c7),{'appCode':_0x1758a5[_0x1b3d67(0x1cf)],'key':_0x420c82},()=>getAppConfigByKey(_0x1758a5[_0x1b3d67(0x1cf)],_0x420c82)),_0x38fe63=_0x4561b8?projectAppConfig(_0x4561b8):plannedAppConfig({'appCode':_0x1758a5[_0x1b3d67(0x1cf)],'key':_0x420c82,'tags':_0x52f99a[_0x1b3d67(0x1c4)],'hasValue':_0x450e8f!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x3dbe58,'appCode':_0x1758a5[_0x1b3d67(0x1cf)],'key':_0x420c82,'before':_0x187f4e,'after':_0x38fe63,'dryRun':![],'warnings':_0x1b18a0}),'message':(_0x3dbe58===_0x1b3d67(0x1c0)?_0x1b3d67(0x1be):_0x1b3d67(0x1c2))+'\x20app\x20config\x20'+_0x420c82};}};function requireAppConfigId(_0x432602,_0x5be529,_0x105a8f){const _0x4d5c6b=a27_0x3bac98;if(typeof _0x432602['id']===_0x4d5c6b(0x1d9)&&Number[_0x4d5c6b(0x1c8)](_0x432602['id'])&&_0x432602['id']>0x0)return _0x432602['id'];throw CliErrors[_0x4d5c6b(0x1da)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x5be529+_0x4d5c6b(0x1db)+_0x105a8f);}
1
+ const a27_0x400615=a27_0x1932;(function(_0x2d421c,_0xe71f3b){const _0x1d9b75=a27_0x1932,_0x29633b=_0x2d421c();while(!![]){try{const _0x477e0d=parseInt(_0x1d9b75(0x109))/0x1*(parseInt(_0x1d9b75(0x107))/0x2)+-parseInt(_0x1d9b75(0x10e))/0x3*(-parseInt(_0x1d9b75(0x105))/0x4)+-parseInt(_0x1d9b75(0x10c))/0x5+-parseInt(_0x1d9b75(0x110))/0x6+-parseInt(_0x1d9b75(0xfb))/0x7*(parseInt(_0x1d9b75(0xfd))/0x8)+parseInt(_0x1d9b75(0x113))/0x9*(-parseInt(_0x1d9b75(0xf7))/0xa)+parseInt(_0x1d9b75(0x103))/0xb;if(_0x477e0d===_0xe71f3b)break;else _0x29633b['push'](_0x29633b['shift']());}catch(_0x4c559d){_0x29633b['push'](_0x29633b['shift']());}}}(a27_0x31e6,0x80040));function a27_0x1932(_0x5fd117,_0x1f92df){_0x5fd117=_0x5fd117-0xf5;const _0x31e6d5=a27_0x31e6();let _0x1932e1=_0x31e6d5[_0x5fd117];return _0x1932e1;}import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a27_0x400615(0x112),UPDATE_PATH=a27_0x400615(0x100);export const appConfigSet={'service':a27_0x400615(0xfe),'command':'set','description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a27_0x400615(0x10b),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a27_0x400615(0xf6),'type':a27_0x400615(0xf8),'description':a27_0x400615(0x10d)}],async 'validate'(_0x2a5b1b){readKeyArg(_0x2a5b1b),readOptionalTags(_0x2a5b1b),assertSingleValueSource(_0x2a5b1b);},async 'dryRun'(_0x2281a8){const _0x259059=a27_0x400615,_0x254d1f=readKeyArg(_0x2281a8),_0x3a5f4c=readOptionalTags(_0x2281a8),_0x559e19=assertSingleValueSource(_0x2281a8);await assertValueSourceReadable(_0x559e19);const _0x5c75ed=await withAppConfigApiBoundary('get',{'appCode':_0x2281a8['appCode'],'key':_0x254d1f},()=>getAppConfigByKey(_0x2281a8['appCode'],_0x254d1f)),_0x3235e5=_0x5c75ed?_0x259059(0xff):'create',_0xda390d=_0x5c75ed?projectAppConfig(_0x5c75ed):null,_0x5f1348=plannedAppConfig({'appCode':_0x2281a8[_0x259059(0xf9)],'key':_0x254d1f,'tags':_0x3a5f4c??_0x5c75ed?.[_0x259059(0x108)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x3235e5,'appCode':_0x2281a8[_0x259059(0xf9)],'key':_0x254d1f,'before':_0xda390d,'after':_0x5f1348,'dryRun':!![]}),{'method':_0x259059(0x102),'url':_0x3235e5===_0x259059(0xff)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x352824){const _0x39b69a=a27_0x400615,_0x10296c=readKeyArg(_0x352824),_0x24ced4=readOptionalTags(_0x352824),_0x1207b3=await withAppConfigApiBoundary(_0x39b69a(0x10a),{'appCode':_0x352824['appCode'],'key':_0x10296c},()=>getAppConfigByKey(_0x352824['appCode'],_0x10296c)),_0xc6a60b=_0x1207b3?projectAppConfig(_0x1207b3):null,_0x46baa8=_0x1207b3?_0x39b69a(0xff):_0x39b69a(0x101),{value:_0x496cbc,warnings:_0x93e36a}=await readAppConfigValue(_0x352824),_0xbb3cfa={'appCode':_0x352824[_0x39b69a(0xf9)],'key':_0x10296c,'value':_0x496cbc,'tags':_0x24ced4??_0x1207b3?.['tags']??undefined};await withAppConfigApiBoundary(_0x46baa8,{'appCode':_0x352824['appCode'],'key':_0x10296c},async()=>{const _0x3cd26b=_0x39b69a;_0x1207b3?await updateAppConfig({..._0xbb3cfa,'id':requireAppConfigId(_0x1207b3,_0x10296c,_0x352824[_0x3cd26b(0xf9)])}):await createAppConfig(_0xbb3cfa);});const _0xf2f399=await withAppConfigApiBoundary(_0x39b69a(0x10a),{'appCode':_0x352824['appCode'],'key':_0x10296c},()=>getAppConfigByKey(_0x352824[_0x39b69a(0xf9)],_0x10296c)),_0x37a94b=_0xf2f399?projectAppConfig(_0xf2f399):plannedAppConfig({'appCode':_0x352824[_0x39b69a(0xf9)],'key':_0x10296c,'tags':_0xbb3cfa['tags'],'hasValue':_0x496cbc!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x46baa8,'appCode':_0x352824[_0x39b69a(0xf9)],'key':_0x10296c,'before':_0xc6a60b,'after':_0x37a94b,'dryRun':![],'warnings':_0x93e36a}),'message':(_0x46baa8===_0x39b69a(0xff)?_0x39b69a(0xf5):_0x39b69a(0xfa))+_0x39b69a(0xfc)+_0x10296c};}};function requireAppConfigId(_0x52ef1c,_0x26bdd8,_0x593a22){const _0x2847e6=a27_0x400615;if(typeof _0x52ef1c['id']===_0x2847e6(0x111)&&Number['isFinite'](_0x52ef1c['id'])&&_0x52ef1c['id']>0x0)return _0x52ef1c['id'];throw CliErrors[_0x2847e6(0x106)](_0x2847e6(0x10f)+_0x26bdd8+_0x2847e6(0x104)+_0x593a22);}function a27_0x31e6(){const _0x4eb68c=['\x20app\x20config\x20','8yJfzVP','app-config','update','/smartapi/app-config/update','create','POST','12929774borsGK',',\x20appCode=','104DbGYSK','apiError','622FQskhv','tags','2577HKAyZs','get','high-risk-write','3131865cikxaI','Read\x20config\x20value\x20from\x20file','41133cOXcsu','App\x20config\x20server\x20id\x20missing\x20for\x20key=','281688jHZFNI','number','/smartapi/app-config/create','18JjOdnb','Updated','file','5200690PqNVvs','string','appCode','Created','668892XMepeV'];a27_0x31e6=function(){return _0x4eb68c;};return a27_0x31e6();}
@@ -1 +1 @@
1
- const a28_0xbe6680=a28_0x2087;(function(_0x25b175,_0x32087a){const _0x29893a=a28_0x2087,_0x3ca023=_0x25b175();while(!![]){try{const _0x252936=-parseInt(_0x29893a(0x1f5))/0x1+parseInt(_0x29893a(0x203))/0x2*(parseInt(_0x29893a(0x1eb))/0x3)+-parseInt(_0x29893a(0x1d2))/0x4+-parseInt(_0x29893a(0x20d))/0x5+parseInt(_0x29893a(0x1e8))/0x6+-parseInt(_0x29893a(0x201))/0x7+-parseInt(_0x29893a(0x1d9))/0x8*(-parseInt(_0x29893a(0x1da))/0x9);if(_0x252936===_0x32087a)break;else _0x3ca023['push'](_0x3ca023['shift']());}catch(_0x29cbc1){_0x3ca023['push'](_0x3ca023['shift']());}}}(a28_0x340d,0x763f3));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':a28_0xbe6680(0x1dd),'required':!![]};export const VALUE_ARG={'name':a28_0xbe6680(0x1fc),'description':'Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','required':![]};export const TAGS_FLAG={'name':a28_0xbe6680(0x1d4),'type':a28_0xbe6680(0x1f8),'description':'Config\x20tags\x20for\x20filtering/display\x20metadata'};export const STDIN_FLAG={'name':'stdin','type':a28_0xbe6680(0x1d5),'description':a28_0xbe6680(0x20e),'default':![]};export const FROM_ENV_FLAG={'name':a28_0xbe6680(0x1ea),'type':a28_0xbe6680(0x1f8),'description':a28_0xbe6680(0x20a)};export const REVEAL_FLAG={'name':a28_0xbe6680(0x200),'type':a28_0xbe6680(0x1d5),'description':a28_0xbe6680(0x1fd),'default':![]};function a28_0x2087(_0x5a2e48,_0x376546){_0x5a2e48=_0x5a2e48-0x1d2;const _0x340db1=a28_0x340d();let _0x20872f=_0x340db1[_0x5a2e48];return _0x20872f;}export function readKeyArg(_0x10b624){const _0x23d629=a28_0xbe6680,_0x4eaf01=_0x10b624[_0x23d629(0x207)][0x0]?.['trim']()??'';return validateKey(_0x4eaf01),_0x4eaf01;}function a28_0x340d(){const _0x50769e=['path','error','args','operation','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','stdin','before','3720240odwfsv','Read\x20config\x20value\x20from\x20stdin','2081844UmWveO','data','tags','boolean','key:\x20','Environment\x20variable\x20is\x20not\x20set:\x20','appCode','6248aRmLYG','23454rJuzMo','utf8','length','Runtime\x20app-config\x20key','bool','trim','once','dryRun','defineProperties','setEncoding','kind','valueRedacted','Missing\x20app-config\x20key.','apiError','1649124xIVSag','argument','from-env','655770XgKWsk','Failed\x20to\x20','Missing\x20app-config\x20value\x20source.','after','validation','slice','hasValue','key','join','env','778087vjmPdx','App\x20config\x20value\x20source\x20is\x20ambiguous.','\x20app\x20config.','string','str','method','flag','value','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','file','push','reveal','12565xsupXx','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','2mbBkGu','name'];a28_0x340d=function(){return _0x50769e;};return a28_0x340d();}export function readOptionalTags(_0x15f64c){const _0x4e9a2b=a28_0xbe6680,_0x336dd9=_0x15f64c[_0x4e9a2b(0x1f9)](_0x4e9a2b(0x1d4))[_0x4e9a2b(0x1df)]();if(!_0x336dd9)return undefined;if(_0x336dd9[_0x4e9a2b(0x1dc)]>0x20)throw CliErrors['validation'](_0x4e9a2b(0x202));return _0x336dd9;}export function validateKey(_0x572bc3){const _0x3bb119=a28_0xbe6680;if(!_0x572bc3)throw CliErrors['validation'](_0x3bb119(0x1e6));if(_0x572bc3[_0x3bb119(0x1dc)]>0x100)throw CliErrors[_0x3bb119(0x1ef)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x4ab0f7,_0x5fecf9){const _0x3f2da7=a28_0xbe6680,_0x3601fb=_0x4ab0f7['value']!==undefined&&_0x4ab0f7[_0x3f2da7(0x1fc)]!==null&&_0x4ab0f7['value']!=='',_0x128361={'appCode':_0x4ab0f7['appCode'],'key':_0x4ab0f7[_0x3f2da7(0x1f2)],'tags':_0x4ab0f7[_0x3f2da7(0x1d4)]??undefined,'hasValue':_0x3601fb,'valueRedacted':_0x3601fb&&!_0x5fecf9?.[_0x3f2da7(0x200)],'gmtCreate':_0x4ab0f7['gmtCreate'],'gmtModified':_0x4ab0f7['gmtModified']};return _0x5fecf9?.[_0x3f2da7(0x200)]&&(_0x128361[_0x3f2da7(0x1fc)]=_0x4ab0f7[_0x3f2da7(0x1fc)]??'',_0x128361[_0x3f2da7(0x1e5)]=![]),_0x128361;}export function plannedAppConfig(_0x22d53c){const _0x2cd2b0=a28_0xbe6680,_0x429d01=_0x22d53c[_0x2cd2b0(0x1f1)]??!![];return{'appCode':_0x22d53c[_0x2cd2b0(0x1d8)],'key':_0x22d53c['key'],'tags':_0x22d53c['tags']??undefined,'hasValue':_0x429d01,'valueRedacted':_0x429d01};}export function buildMutationData(_0xf06aec){const _0xa034de=a28_0xbe6680;return{'operation':_0xf06aec[_0xa034de(0x208)],'selector':{'appCode':_0xf06aec[_0xa034de(0x1d8)],'key':_0xf06aec[_0xa034de(0x1f2)]},'before':_0xf06aec[_0xa034de(0x20c)],'after':_0xf06aec[_0xa034de(0x1ee)],'dryRun':_0xf06aec[_0xa034de(0x1e1)],'warnings':_0xf06aec['warnings']??[]};}export async function withAppConfigApiBoundary(_0x4cc725,_0x56f8b0,_0x3ab429){const _0x3a21a0=a28_0xbe6680;try{return await _0x3ab429();}catch{const _0x23fe61=['appCode:\x20'+_0x56f8b0['appCode']];if(_0x56f8b0['key'])_0x23fe61[_0x3a21a0(0x1ff)](_0x3a21a0(0x1d6)+_0x56f8b0['key']);_0x23fe61['push']('value\x20is\x20redacted');throw CliErrors[_0x3a21a0(0x1e7)](_0x3a21a0(0x1ec)+_0x4cc725+_0x3a21a0(0x1f7),_0x23fe61[_0x3a21a0(0x1f3)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x48a9e7,_0x1621d6){const _0x3e7015=a28_0xbe6680;return Object[_0x3e7015(0x1e2)](_0x48a9e7,{'method':{'value':_0x1621d6[_0x3e7015(0x1fa)],'enumerable':![]},'url':{'value':_0x1621d6['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x26c2bb){const _0x55d64c=a28_0xbe6680,_0x4ee359=[];_0x26c2bb[_0x55d64c(0x207)][_0x55d64c(0x1dc)]>0x1&&_0x4ee359[_0x55d64c(0x1ff)]({'kind':'argument','value':_0x26c2bb[_0x55d64c(0x207)][_0x55d64c(0x1f0)](0x1)[_0x55d64c(0x1f3)]('\x20')});const _0x8756d3=_0x26c2bb[_0x55d64c(0x1fb)](_0x55d64c(0x1fc));_0x8756d3!==undefined&&_0x8756d3!==null&&_0x4ee359[_0x55d64c(0x1ff)]({'kind':_0x55d64c(0x1e9),'value':String(_0x8756d3)});_0x26c2bb[_0x55d64c(0x1de)]('stdin')&&_0x4ee359[_0x55d64c(0x1ff)]({'kind':'stdin'});const _0x184feb=_0x26c2bb['str']('from-env')[_0x55d64c(0x1df)]();_0x184feb&&_0x4ee359[_0x55d64c(0x1ff)]({'kind':_0x55d64c(0x1f4),'name':_0x184feb});const _0x3a7c7b=_0x26c2bb[_0x55d64c(0x1f9)](_0x55d64c(0x1fe))[_0x55d64c(0x1df)]();_0x3a7c7b&&_0x4ee359[_0x55d64c(0x1ff)]({'kind':_0x55d64c(0x1fe),'path':_0x3a7c7b});if(_0x4ee359['length']===0x0)throw CliErrors[_0x55d64c(0x1ef)](_0x55d64c(0x1ed),_0x55d64c(0x209));if(_0x4ee359['length']>0x1)throw CliErrors[_0x55d64c(0x1ef)](_0x55d64c(0x1f6),'Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');return _0x4ee359[0x0];}export async function assertValueSourceReadable(_0x11eb42){const _0x5e4abd=a28_0xbe6680;if(_0x11eb42[_0x5e4abd(0x1e4)]===_0x5e4abd(0x1f4)&&!(_0x11eb42[_0x5e4abd(0x204)]in process.env))throw CliErrors[_0x5e4abd(0x1ef)](_0x5e4abd(0x1d7)+_0x11eb42[_0x5e4abd(0x204)]);if(_0x11eb42['kind']===_0x5e4abd(0x1fe))try{await access(_0x11eb42[_0x5e4abd(0x205)]);}catch{throw CliErrors['validation']('Value\x20file\x20is\x20not\x20readable:\x20'+_0x11eb42[_0x5e4abd(0x205)]);}}export async function readAppConfigValue(_0x5dd48c){const _0xdbaf3=a28_0xbe6680,_0x383231=assertSingleValueSource(_0x5dd48c),_0x42cd2b=[];if(_0x383231[_0xdbaf3(0x1e4)]===_0xdbaf3(0x1e9))return _0x42cd2b[_0xdbaf3(0x1ff)]('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0x383231[_0xdbaf3(0x1fc)]??'','source':_0x383231[_0xdbaf3(0x1e4)],'warnings':_0x42cd2b};if(_0x383231[_0xdbaf3(0x1e4)]===_0xdbaf3(0x20b))return{'value':await readStdin(),'source':_0x383231['kind'],'warnings':_0x42cd2b};if(_0x383231[_0xdbaf3(0x1e4)]===_0xdbaf3(0x1f4)){if(!(_0x383231[_0xdbaf3(0x204)]in process.env))throw CliErrors[_0xdbaf3(0x1ef)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x383231['name']);return{'value':process.env[_0x383231.name]??'','source':_0x383231[_0xdbaf3(0x1e4)],'warnings':_0x42cd2b};}return{'value':await readFile(_0x383231[_0xdbaf3(0x205)],_0xdbaf3(0x1db)),'source':_0x383231[_0xdbaf3(0x1e4)],'warnings':_0x42cd2b};}function readStdin(){return new Promise((_0x38baa4,_0x200744)=>{const _0x5c7be9=a28_0x2087;let _0x55b490='';process['stdin'][_0x5c7be9(0x1e3)]('utf8'),process['stdin']['on'](_0x5c7be9(0x1d3),_0x76cdba=>{_0x55b490+=_0x76cdba;}),process[_0x5c7be9(0x20b)][_0x5c7be9(0x1e0)]('end',()=>_0x38baa4(_0x55b490)),process['stdin']['once'](_0x5c7be9(0x206),_0x200744);});}
1
+ const a28_0x12fc4a=a28_0x1fcd;(function(_0x59a6a8,_0x1d0b2f){const _0x5d74a3=a28_0x1fcd,_0x17f676=_0x59a6a8();while(!![]){try{const _0x538f7b=parseInt(_0x5d74a3(0x90))/0x1+parseInt(_0x5d74a3(0x7c))/0x2*(parseInt(_0x5d74a3(0x97))/0x3)+parseInt(_0x5d74a3(0x7a))/0x4*(-parseInt(_0x5d74a3(0x68))/0x5)+-parseInt(_0x5d74a3(0xa3))/0x6*(-parseInt(_0x5d74a3(0x82))/0x7)+parseInt(_0x5d74a3(0x9f))/0x8*(-parseInt(_0x5d74a3(0x8c))/0x9)+-parseInt(_0x5d74a3(0x9e))/0xa+-parseInt(_0x5d74a3(0x8b))/0xb*(-parseInt(_0x5d74a3(0x73))/0xc);if(_0x538f7b===_0x1d0b2f)break;else _0x17f676['push'](_0x17f676['shift']());}catch(_0x43ef45){_0x17f676['push'](_0x17f676['shift']());}}}(a28_0x389d,0x4b1a8));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a28_0x12fc4a(0x8e),'description':a28_0x12fc4a(0x6f),'required':!![]};export const VALUE_ARG={'name':a28_0x12fc4a(0x9a),'description':'Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','required':![]};export const TAGS_FLAG={'name':a28_0x12fc4a(0xa1),'type':a28_0x12fc4a(0x84),'description':a28_0x12fc4a(0x91)};export const STDIN_FLAG={'name':a28_0x12fc4a(0x8a),'type':'boolean','description':a28_0x12fc4a(0xa4),'default':![]};function a28_0x389d(){const _0xd7e0d2=['method','from-env','7tDETSQ','push','string','before','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','after','trim','name','stdin','632885Bjnwpd','36BxXleY','setEncoding','key','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','41642HKEBUU','Config\x20tags\x20for\x20filtering/display\x20metadata','utf8','file','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','App\x20config\x20value\x20source\x20is\x20ambiguous.','warnings','3fnLphr','length','argument','value','kind','url','hasValue','1148200NOBDMM','1178784zRzeHx','str','tags','Environment\x20variable\x20is\x20not\x20set:\x20','2227602Glmgky','Read\x20config\x20value\x20from\x20stdin','Missing\x20app-config\x20value\x20source.','path','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','2777160vmuKzz','validation','appCode','args','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','defineProperties','boolean','Runtime\x20app-config\x20key','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Value\x20file\x20is\x20not\x20readable:\x20','\x20app\x20config.','180BcuPjb','Failed\x20to\x20','appCode:\x20','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','once','apiError','gmtCreate','4DHNLCQ','env','582668JXREGH','reveal','data','value\x20is\x20redacted'];a28_0x389d=function(){return _0xd7e0d2;};return a28_0x389d();}export const FROM_ENV_FLAG={'name':a28_0x12fc4a(0x81),'type':'string','description':a28_0x12fc4a(0x76)};export const REVEAL_FLAG={'name':a28_0x12fc4a(0x7d),'type':a28_0x12fc4a(0x6e),'description':a28_0x12fc4a(0x8f),'default':![]};export function readKeyArg(_0x3309fe){const _0x251261=a28_0x12fc4a,_0x2ec6d3=_0x3309fe['args'][0x0]?.[_0x251261(0x88)]()??'';return validateKey(_0x2ec6d3),_0x2ec6d3;}function a28_0x1fcd(_0x8a0a1c,_0x24e1f7){_0x8a0a1c=_0x8a0a1c-0x65;const _0x389d58=a28_0x389d();let _0x1fcd4c=_0x389d58[_0x8a0a1c];return _0x1fcd4c;}export function readOptionalTags(_0x1b0594){const _0x587c1f=a28_0x12fc4a,_0x39804c=_0x1b0594[_0x587c1f(0xa0)](_0x587c1f(0xa1))['trim']();if(!_0x39804c)return undefined;if(_0x39804c[_0x587c1f(0x98)]>0x20)throw CliErrors['validation'](_0x587c1f(0x67));return _0x39804c;}export function validateKey(_0x5074f4){const _0x1ae831=a28_0x12fc4a;if(!_0x5074f4)throw CliErrors[_0x1ae831(0x69)]('Missing\x20app-config\x20key.');if(_0x5074f4[_0x1ae831(0x98)]>0x100)throw CliErrors[_0x1ae831(0x69)](_0x1ae831(0x94));}export function projectAppConfig(_0x3ab144,_0xcd1284){const _0x53c50c=a28_0x12fc4a,_0x5bdf53=_0x3ab144[_0x53c50c(0x9a)]!==undefined&&_0x3ab144[_0x53c50c(0x9a)]!==null&&_0x3ab144[_0x53c50c(0x9a)]!=='',_0x25746e={'appCode':_0x3ab144[_0x53c50c(0x6a)],'key':_0x3ab144[_0x53c50c(0x8e)],'tags':_0x3ab144[_0x53c50c(0xa1)]??undefined,'hasValue':_0x5bdf53,'valueRedacted':_0x5bdf53&&!_0xcd1284?.[_0x53c50c(0x7d)],'gmtCreate':_0x3ab144[_0x53c50c(0x79)],'gmtModified':_0x3ab144['gmtModified']};return _0xcd1284?.[_0x53c50c(0x7d)]&&(_0x25746e[_0x53c50c(0x9a)]=_0x3ab144[_0x53c50c(0x9a)]??'',_0x25746e['valueRedacted']=![]),_0x25746e;}export function plannedAppConfig(_0x7c9564){const _0x4dc3cb=a28_0x12fc4a,_0x359192=_0x7c9564[_0x4dc3cb(0x9d)]??!![];return{'appCode':_0x7c9564[_0x4dc3cb(0x6a)],'key':_0x7c9564[_0x4dc3cb(0x8e)],'tags':_0x7c9564[_0x4dc3cb(0xa1)]??undefined,'hasValue':_0x359192,'valueRedacted':_0x359192};}export function buildMutationData(_0x3fe6fa){const _0x56a313=a28_0x12fc4a;return{'operation':_0x3fe6fa['operation'],'selector':{'appCode':_0x3fe6fa[_0x56a313(0x6a)],'key':_0x3fe6fa[_0x56a313(0x8e)]},'before':_0x3fe6fa[_0x56a313(0x85)],'after':_0x3fe6fa[_0x56a313(0x87)],'dryRun':_0x3fe6fa['dryRun'],'warnings':_0x3fe6fa[_0x56a313(0x96)]??[]};}export async function withAppConfigApiBoundary(_0x5218d5,_0x23b8c5,_0x4fd395){const _0x486f3a=a28_0x12fc4a;try{return await _0x4fd395();}catch{const _0x1050a0=[_0x486f3a(0x75)+_0x23b8c5[_0x486f3a(0x6a)]];if(_0x23b8c5[_0x486f3a(0x8e)])_0x1050a0['push']('key:\x20'+_0x23b8c5[_0x486f3a(0x8e)]);_0x1050a0[_0x486f3a(0x83)](_0x486f3a(0x7f));throw CliErrors[_0x486f3a(0x78)](_0x486f3a(0x74)+_0x5218d5+_0x486f3a(0x72),_0x1050a0['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x55edc0,_0x3fb21c){const _0x1df957=a28_0x12fc4a;return Object[_0x1df957(0x6d)](_0x55edc0,{'method':{'value':_0x3fb21c[_0x1df957(0x80)],'enumerable':![]},'url':{'value':_0x3fb21c[_0x1df957(0x9c)],'enumerable':![]}});}export function assertSingleValueSource(_0x296e93){const _0x4e01f2=a28_0x12fc4a,_0x191455=[];_0x296e93[_0x4e01f2(0x6b)][_0x4e01f2(0x98)]>0x1&&_0x191455[_0x4e01f2(0x83)]({'kind':'argument','value':_0x296e93[_0x4e01f2(0x6b)]['slice'](0x1)['join']('\x20')});const _0x5db758=_0x296e93['flag'](_0x4e01f2(0x9a));_0x5db758!==undefined&&_0x5db758!==null&&_0x191455['push']({'kind':_0x4e01f2(0x99),'value':String(_0x5db758)});_0x296e93['bool'](_0x4e01f2(0x8a))&&_0x191455[_0x4e01f2(0x83)]({'kind':'stdin'});const _0x47cb79=_0x296e93['str']('from-env')[_0x4e01f2(0x88)]();_0x47cb79&&_0x191455['push']({'kind':_0x4e01f2(0x7b),'name':_0x47cb79});const _0x506366=_0x296e93[_0x4e01f2(0xa0)](_0x4e01f2(0x93))[_0x4e01f2(0x88)]();_0x506366&&_0x191455[_0x4e01f2(0x83)]({'kind':_0x4e01f2(0x93),'path':_0x506366});if(_0x191455[_0x4e01f2(0x98)]===0x0)throw CliErrors[_0x4e01f2(0x69)](_0x4e01f2(0x65),_0x4e01f2(0x86));if(_0x191455[_0x4e01f2(0x98)]>0x1)throw CliErrors[_0x4e01f2(0x69)](_0x4e01f2(0x95),_0x4e01f2(0x6c));return _0x191455[0x0];}export async function assertValueSourceReadable(_0x53353d){const _0x56cc5c=a28_0x12fc4a;if(_0x53353d[_0x56cc5c(0x9b)]===_0x56cc5c(0x7b)&&!(_0x53353d[_0x56cc5c(0x89)]in process.env))throw CliErrors['validation'](_0x56cc5c(0xa2)+_0x53353d[_0x56cc5c(0x89)]);if(_0x53353d['kind']===_0x56cc5c(0x93))try{await access(_0x53353d[_0x56cc5c(0x66)]);}catch{throw CliErrors[_0x56cc5c(0x69)](_0x56cc5c(0x71)+_0x53353d[_0x56cc5c(0x66)]);}}export async function readAppConfigValue(_0x473b06){const _0x18a168=a28_0x12fc4a,_0x10d47d=assertSingleValueSource(_0x473b06),_0x185ae1=[];if(_0x10d47d['kind']===_0x18a168(0x99))return _0x185ae1[_0x18a168(0x83)](_0x18a168(0x70)),{'value':_0x10d47d['value']??'','source':_0x10d47d[_0x18a168(0x9b)],'warnings':_0x185ae1};if(_0x10d47d[_0x18a168(0x9b)]===_0x18a168(0x8a))return{'value':await readStdin(),'source':_0x10d47d[_0x18a168(0x9b)],'warnings':_0x185ae1};if(_0x10d47d[_0x18a168(0x9b)]===_0x18a168(0x7b)){if(!(_0x10d47d[_0x18a168(0x89)]in process.env))throw CliErrors[_0x18a168(0x69)](_0x18a168(0xa2)+_0x10d47d[_0x18a168(0x89)]);return{'value':process.env[_0x10d47d.name]??'','source':_0x10d47d['kind'],'warnings':_0x185ae1};}return{'value':await readFile(_0x10d47d[_0x18a168(0x66)],'utf8'),'source':_0x10d47d['kind'],'warnings':_0x185ae1};}function readStdin(){return new Promise((_0x3a9f9b,_0x1e0a0e)=>{const _0xa843b1=a28_0x1fcd;let _0x369056='';process[_0xa843b1(0x8a)][_0xa843b1(0x8d)](_0xa843b1(0x92)),process[_0xa843b1(0x8a)]['on'](_0xa843b1(0x7e),_0x2f29f4=>{_0x369056+=_0x2f29f4;}),process[_0xa843b1(0x8a)][_0xa843b1(0x77)]('end',()=>_0x3a9f9b(_0x369056)),process[_0xa843b1(0x8a)][_0xa843b1(0x77)]('error',_0x1e0a0e);});}
@@ -1 +1 @@
1
- const a29_0x25d1bf=a29_0x176b;(function(_0x1346fd,_0x5c2181){const _0x3b8383=a29_0x176b,_0x2700df=_0x1346fd();while(!![]){try{const _0x1b6417=-parseInt(_0x3b8383(0x161))/0x1*(parseInt(_0x3b8383(0x174))/0x2)+-parseInt(_0x3b8383(0x15f))/0x3*(parseInt(_0x3b8383(0x16f))/0x4)+parseInt(_0x3b8383(0x162))/0x5*(parseInt(_0x3b8383(0x166))/0x6)+parseInt(_0x3b8383(0x171))/0x7*(parseInt(_0x3b8383(0x172))/0x8)+-parseInt(_0x3b8383(0x165))/0x9*(-parseInt(_0x3b8383(0x15a))/0xa)+-parseInt(_0x3b8383(0x173))/0xb+-parseInt(_0x3b8383(0x15e))/0xc*(-parseInt(_0x3b8383(0x16a))/0xd);if(_0x1b6417===_0x5c2181)break;else _0x2700df['push'](_0x2700df['shift']());}catch(_0x1e784c){_0x2700df['push'](_0x2700df['shift']());}}}(a29_0x29da,0x80a19));function a29_0x176b(_0x37321a,_0x758b43){_0x37321a=_0x37321a-0x15a;const _0x29da39=a29_0x29da();let _0x176b35=_0x29da39[_0x37321a];return _0x176b35;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a29_0x25d1bf(0x15b),'command':a29_0x25d1bf(0x163),'description':a29_0x25d1bf(0x16d),'risk':a29_0x25d1bf(0x164),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'yes','type':a29_0x25d1bf(0x160),'description':a29_0x25d1bf(0x170),'default':![]}],async 'execute'(_0x56f70b){const _0x1731f4=a29_0x25d1bf,{runAuthServer:_0x40ed1c}=await import(_0x1731f4(0x169));return await _0x40ed1c({'autoYes':_0x56f70b[_0x1731f4(0x16c)](_0x1731f4(0x167)),'nonInteractive':_0x56f70b['nonInteractive']}),{'ok':!![]};}},{'service':a29_0x25d1bf(0x15b),'command':a29_0x25d1bf(0x15d),'description':a29_0x25d1bf(0x168),'risk':a29_0x25d1bf(0x15c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x287839){const _0x69d5eb=a29_0x25d1bf;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x69d5eb(0x16b)]('✓\x20Logged\x20out')):console[_0x69d5eb(0x16b)](_0x69d5eb(0x16e)),{'ok':!![]};}}];function a29_0x29da(){const _0x515a58=['read','63UoMXgW','30ZpEaLg','yes','Clear\x20login\x20session','../../auth/auth-server-ui.js','13xIoiPn','log','bool','Login\x20via\x20browser','!\x20Not\x20logged\x20in','4iRIuAl','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','7xmycfr','1768800rtAkpP','1833634chzBVl','86NxYqhj','451010mRWRWi','auth','write','logout','8348412BnpUYj','2931099tlhyLJ','boolean','6671HCAJwR','724945sDlLyX','login'];a29_0x29da=function(){return _0x515a58;};return a29_0x29da();}
1
+ function a29_0x3341(_0x556f27,_0x484e87){_0x556f27=_0x556f27-0x170;const _0x24a5ad=a29_0x24a5();let _0x33411a=_0x24a5ad[_0x556f27];return _0x33411a;}function a29_0x24a5(){const _0x152cd8=['149457aBKQBV','bool','54LiKiKF','boolean','yes','279jVencO','16AVuJSk','../../auth/auth-server-ui.js','auth','Login\x20via\x20browser','6866DrqKNA','16883810fRMuaj','login','752076TxDpzy','5397633oRZDQW','926770qqsvEo','1483528GYXvpf','nonInteractive','write','log','logout'];a29_0x24a5=function(){return _0x152cd8;};return a29_0x24a5();}const a29_0x35cfd9=a29_0x3341;(function(_0x37fb77,_0x19181d){const _0x21a3c8=a29_0x3341,_0x598024=_0x37fb77();while(!![]){try{const _0x3a5489=parseInt(_0x21a3c8(0x174))/0x1+parseInt(_0x21a3c8(0x171))/0x2*(-parseInt(_0x21a3c8(0x181))/0x3)+-parseInt(_0x21a3c8(0x182))/0x4*(parseInt(_0x21a3c8(0x176))/0x5)+-parseInt(_0x21a3c8(0x17e))/0x6*(parseInt(_0x21a3c8(0x17c))/0x7)+-parseInt(_0x21a3c8(0x177))/0x8+-parseInt(_0x21a3c8(0x175))/0x9+parseInt(_0x21a3c8(0x172))/0xa;if(_0x3a5489===_0x19181d)break;else _0x598024['push'](_0x598024['shift']());}catch(_0xc58ba){_0x598024['push'](_0x598024['shift']());}}}(a29_0x24a5,0x62403));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a29_0x35cfd9(0x184),'command':a29_0x35cfd9(0x173),'description':a29_0x35cfd9(0x170),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'yes','type':a29_0x35cfd9(0x17f),'description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x393aa7){const _0x4309d4=a29_0x35cfd9,{runAuthServer:_0x179bfd}=await import(_0x4309d4(0x183));return await _0x179bfd({'autoYes':_0x393aa7[_0x4309d4(0x17d)](_0x4309d4(0x180)),'nonInteractive':_0x393aa7[_0x4309d4(0x178)]}),{'ok':!![]};}},{'service':a29_0x35cfd9(0x184),'command':a29_0x35cfd9(0x17b),'description':'Clear\x20login\x20session','risk':a29_0x35cfd9(0x179),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x11a994){const _0x68d5d1=a29_0x35cfd9;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x68d5d1(0x17a)]('✓\x20Logged\x20out')):console['log']('!\x20Not\x20logged\x20in'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a30_0x102b87=a30_0x143c;function a30_0x143c(_0x13f236,_0x120a18){_0x13f236=_0x13f236-0x178;const _0x57648e=a30_0x5764();let _0x143cde=_0x57648e[_0x13f236];return _0x143cde;}(function(_0x5168d0,_0x1155a5){const _0x2f2e60=a30_0x143c,_0x16a60d=_0x5168d0();while(!![]){try{const _0x51ab7b=parseInt(_0x2f2e60(0x183))/0x1+-parseInt(_0x2f2e60(0x17e))/0x2+-parseInt(_0x2f2e60(0x1d6))/0x3*(parseInt(_0x2f2e60(0x19c))/0x4)+-parseInt(_0x2f2e60(0x1cb))/0x5+-parseInt(_0x2f2e60(0x1ce))/0x6+-parseInt(_0x2f2e60(0x1a1))/0x7*(parseInt(_0x2f2e60(0x1b5))/0x8)+parseInt(_0x2f2e60(0x1c8))/0x9*(parseInt(_0x2f2e60(0x1b2))/0xa);if(_0x51ab7b===_0x1155a5)break;else _0x16a60d['push'](_0x16a60d['shift']());}catch(_0xcf99ea){_0x16a60d['push'](_0x16a60d['shift']());}}}(a30_0x5764,0x51fda));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';function a30_0x5764(){const _0x38e4a9=['alias','COMMON','\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','Script\x20description','validation','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','ENDPOINT','question','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','create','Select\x20operation\x20type:','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','HOOK','parseInt','nonInteractive','stdin','Invalid\x20function\x20name\x20\x22','scriptsRootDir','name','Invalid\x20dataset\x20selection.','910104cMARTT','datasetCode','includes','function-node',']\x20(','28DEKZPT','Operation\x20type\x20(HOOK\x20only)','Function\x20name\x20(valid\x20JS\x20identifier)','join','No\x20datasets\x20found\x20for\x20this\x20app.','HOOK\x20requires\x20alias/operation/node\x20options.','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','before','read','Select\x20trigger\x20node:','\x20api\x20pull`\x20to\x20refresh.','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','functionNode','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Dataset\x20not\x20found\x20for\x20code\x20\x22','Operation\x20type\x20\x22','686050PiIQST','.js','entries','1172216epKkjm','apiDir','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','source','File\x20already\x20exists:\x20','bff','operationType','close','operation-type','after','description','datasetcode','\x0a\x20*\x20[脚本名称]\x20','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x22\x20not\x20found.\x20','\x22\x20not\x20found\x20for\x20dataset\x20','\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','UNKNOWN','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','279FrPQpG','length','string','3316035wbPMXL','Alias\x20\x22','appCode','869190qcFPjG','\x0a\x20*\x20[触发节点]\x20','No\x20api.ts\x20found.\x20Run\x20`','Available:\x20','isInteger','\x20function:\x20','tableName','type','6NdFZgg','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Select\x20dataset:','write','map','str','find','325806QsLcco','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','code','stderr','trim','221214VKXBGP','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','\x22.\x20','TODO:\x20add\x20script\x20description','.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'];a30_0x5764=function(){return _0x38e4a9;};return a30_0x5764();}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_0x102b87(0x1ba),'command':a30_0x102b87(0x191),'description':a30_0x102b87(0x1c7),'risk':a30_0x102b87(0x1a9),'flags':[{'name':'type','type':'string','required':!![],'enum':[a30_0x102b87(0x189),a30_0x102b87(0x18e),'HOOK'],'description':'Script\x20type'},{'name':'name','type':a30_0x102b87(0x1ca),'required':!![],'description':a30_0x102b87(0x1a3)},{'name':'description','type':a30_0x102b87(0x1ca),'description':a30_0x102b87(0x18b)},{'name':a30_0x102b87(0x188),'type':a30_0x102b87(0x1ca),'description':a30_0x102b87(0x178)},{'name':a30_0x102b87(0x1c0),'type':a30_0x102b87(0x1ca),'description':'Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)'},{'name':a30_0x102b87(0x1bd),'type':a30_0x102b87(0x1ca),'description':a30_0x102b87(0x1a2)},{'name':a30_0x102b87(0x19f),'type':a30_0x102b87(0x1ca),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':['before',a30_0x102b87(0x1be)]}],async 'validate'(_0x3952af){const _0x202701=a30_0x102b87,_0x43a092=_0x3952af[_0x202701(0x17c)]('name');if(!isValidBffFunctionName(_0x43a092))throw CliErrors[_0x202701(0x18c)](_0x202701(0x198)+_0x43a092+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x3d024f){const _0xc7f182=a30_0x102b87,_0x1ccdea=loadBffProjectConfig(_0x3d024f[_0xc7f182(0x1cd)]),_0x437bba=_0x3d024f[_0xc7f182(0x17c)](_0xc7f182(0x1d5)),_0x24e1f8=_0x3d024f[_0xc7f182(0x17c)]('name'),_0x4781ef=_0x3d024f['str'](_0xc7f182(0x1bf))||undefined,_0x7699b=_0x437bba===_0xc7f182(0x194)?await resolveHookOptions(_0x1ccdea,_0x3d024f):undefined,_0xb3b62d=buildFilePath(_0x1ccdea,_0x437bba,_0x24e1f8,_0x7699b);if(await fileExists(_0xb3b62d))throw CliErrors[_0xc7f182(0x18c)](_0xc7f182(0x1b9)+_0xb3b62d);await mkdir(dirname(_0xb3b62d),{'recursive':!![]});const _0x16e9b5=generateTemplate(_0x437bba,_0x24e1f8,_0x3d024f[_0xc7f182(0x1cd)],_0x4781ef,_0x7699b);await writeFile(_0xb3b62d,_0x16e9b5,'utf8');const _0x207748={'type':_0x437bba,'name':_0x24e1f8,'path':_0xb3b62d};if(_0x4781ef)_0x207748[_0xc7f182(0x1bf)]=_0x4781ef;if(_0x7699b){if(_0x7699b[_0xc7f182(0x188)])_0x207748[_0xc7f182(0x188)]=_0x7699b[_0xc7f182(0x188)];_0x207748[_0xc7f182(0x19d)]=_0x7699b[_0xc7f182(0x19d)],_0x207748[_0xc7f182(0x1bb)]=_0x7699b[_0xc7f182(0x1bb)],_0x207748[_0xc7f182(0x1ad)]=_0x7699b[_0xc7f182(0x1ad)];}return{'ok':!![],'data':_0x207748,'message':'Created\x20'+_0x437bba+_0xc7f182(0x1d3)+_0x24e1f8};}};async function resolveHookOptions(_0x3e3605,_0x3e84f0){const _0x15fad6=a30_0x102b87,_0xc074ad=loadAliasMap(_0x3e84f0[_0x15fad6(0x1b6)],undefined,resolveApiFilePath(_0x3e84f0['apiDir'],_0x3e84f0['appCode'])),_0x830686=_0xc074ad[_0x15fad6(0x1c9)]>0x0;let _0x58d0e1,_0xcf74ca,_0x14a7f9;const _0x1ec0d4=_0x3e84f0[_0x15fad6(0x17c)]('alias'),_0x5a8e0c=_0x3e84f0[_0x15fad6(0x17c)]('datasetcode');if(_0x1ec0d4){const _0x5ddeab=resolveAlias(_0x3e84f0['apiDir'],_0x1ec0d4,undefined,resolveApiFilePath(_0x3e84f0[_0x15fad6(0x1b6)],_0x3e84f0[_0x15fad6(0x1cd)]));if(!_0x5ddeab){const _0x5d634c=_0x830686?'Available\x20aliases:\x20'+_0xc074ad['map'](_0x2ab6ce=>_0x2ab6ce[_0x15fad6(0x188)])[_0x15fad6(0x1a4)](',\x20'):_0x15fad6(0x1d0)+CLI_BIN_NAME+_0x15fad6(0x1a7);throw CliErrors[_0x15fad6(0x18c)](_0x15fad6(0x1cc)+_0x1ec0d4+_0x15fad6(0x1c3)+_0x5d634c);}_0x58d0e1=_0x1ec0d4,_0xcf74ca=_0x5ddeab;}else{if(_0x5a8e0c){_0xcf74ca=_0x5a8e0c;const _0x5405ed=_0xc074ad[_0x15fad6(0x17d)](_0x393b74=>_0x393b74[_0x15fad6(0x19d)]===_0x5a8e0c);_0x58d0e1=_0x5405ed?.[_0x15fad6(0x188)];}else{if(_0x3e84f0['nonInteractive'])throw CliErrors['validation']('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x830686){const _0x239c94=_0xc074ad[_0x15fad6(0x17b)](_0xff8819=>_0xff8819[_0x15fad6(0x188)]+'\x20('+_0xff8819[_0x15fad6(0x1d4)]+')'),_0x4040b6=await promptSelect(_0x15fad6(0x179),_0x239c94),_0x4790b4=_0xc074ad[_0x4040b6];if(!_0x4790b4)throw CliErrors[_0x15fad6(0x18c)]('Invalid\x20dataset\x20selection.');_0x58d0e1=_0x4790b4[_0x15fad6(0x188)],_0xcf74ca=_0x4790b4['datasetCode'];}else{const _0x1d23c8=await listDatasets(_0x3e84f0[_0x15fad6(0x1cd)]);if(_0x1d23c8[_0x15fad6(0x1c9)]===0x0)throw CliErrors['validation'](_0x15fad6(0x1a5));const _0x14b55a=_0x1d23c8[_0x15fad6(0x17b)](_0x558726=>_0x558726[_0x15fad6(0x19a)]+'\x20['+(_0x558726[_0x15fad6(0x1b8)]??_0x15fad6(0x1c6))+_0x15fad6(0x1a0)+_0x558726[_0x15fad6(0x180)]+')'),_0x5e0abc=await promptSelect('Select\x20dataset:',_0x14b55a),_0x1a51c1=_0x1d23c8[_0x5e0abc];if(!_0x1a51c1)throw CliErrors[_0x15fad6(0x18c)](_0x15fad6(0x19b));_0xcf74ca=_0x1a51c1[_0x15fad6(0x180)],_0x58d0e1=undefined;}}}}const _0x1b21b3=await listDatasets(_0x3e84f0[_0x15fad6(0x1cd)]),_0x2b4bb0=_0x1b21b3[_0x15fad6(0x17d)](_0x2e9c65=>_0x2e9c65[_0x15fad6(0x180)]===_0xcf74ca);if(!_0x2b4bb0)throw CliErrors[_0x15fad6(0x18c)](_0x15fad6(0x1b0)+_0xcf74ca+_0x15fad6(0x185)+(_0x58d0e1?_0x15fad6(0x184)+CLI_BIN_NAME+_0x15fad6(0x1ab):''));_0x14a7f9=_0x2b4bb0['id'];const _0x2a7b5b=_0x58d0e1??_0xcf74ca,_0x4cabcf=await listBffDatasetOperations(_0x3e84f0['appCode'],_0x14a7f9),_0xdfcfbc=_0x4cabcf?Object['keys'](_0x4cabcf):[];if(_0xdfcfbc[_0x15fad6(0x1c9)]===0x0)throw CliErrors[_0x15fad6(0x18c)]('No\x20operation\x20types\x20found\x20for\x20dataset\x20'+_0x2a7b5b+'.');let _0x45ef16;const _0x2f653e=_0x3e84f0['str'](_0x15fad6(0x1bd));if(_0x2f653e){if(!_0xdfcfbc[_0x15fad6(0x19e)](_0x2f653e))throw CliErrors[_0x15fad6(0x18c)](_0x15fad6(0x1b1)+_0x2f653e+_0x15fad6(0x1c4)+_0x2a7b5b+'.\x20'+(_0x15fad6(0x1d1)+_0xdfcfbc[_0x15fad6(0x1a4)](',\x20')));_0x45ef16=_0x2f653e;}else{if(_0x3e84f0[_0x15fad6(0x196)])throw CliErrors[_0x15fad6(0x18c)](_0x15fad6(0x17f));const _0x5670bd=await promptSelect(_0x15fad6(0x192),_0xdfcfbc);_0x45ef16=_0xdfcfbc[_0x5670bd]??_0xdfcfbc[0x0];}let _0x1a910e=normalizeHookFunctionNode(_0x3e84f0[_0x15fad6(0x17c)](_0x15fad6(0x19f)));if(!_0x1a910e){if(_0x3e84f0[_0x15fad6(0x17c)]('function-node'))throw CliErrors[_0x15fad6(0x18c)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x3e84f0['nonInteractive'])throw CliErrors[_0x15fad6(0x18c)](_0x15fad6(0x1ac));const _0x3b0451=await promptSelect(_0x15fad6(0x1aa),[_0x15fad6(0x1a8),'after']);_0x1a910e=[_0x15fad6(0x1a8),_0x15fad6(0x1be)][_0x3b0451]??_0x15fad6(0x1a8);}return{'alias':_0x58d0e1,'datasetCode':_0xcf74ca,'datasetId':_0x14a7f9,'operationType':_0x45ef16,'functionNode':_0x1a910e};}async function promptSelect(_0x1252ef,_0x4560e1){const _0x4fed5e=a30_0x102b87;if(_0x4560e1[_0x4fed5e(0x1c9)]===0x1)return 0x0;for(const [_0x398236,_0x28a103]of _0x4560e1[_0x4fed5e(0x1b4)]()){process['stderr'][_0x4fed5e(0x17a)]('\x20\x20'+(_0x398236+0x1)+'.\x20'+_0x28a103+'\x0a');}const _0x5cf5b9=createInterface({'input':process[_0x4fed5e(0x197)],'output':process[_0x4fed5e(0x181)]});while(!![]){const _0x4052e0=await new Promise(_0x4cb93d=>{const _0x283c5b=_0x4fed5e;_0x5cf5b9[_0x283c5b(0x18f)](_0x1252ef+'\x20',_0x4cb93d);}),_0x451369=Number[_0x4fed5e(0x195)](_0x4052e0['trim'](),0xa);if(Number[_0x4fed5e(0x1d2)](_0x451369)&&_0x451369>=0x1&&_0x451369<=_0x4560e1[_0x4fed5e(0x1c9)])return _0x5cf5b9[_0x4fed5e(0x1bc)](),_0x451369-0x1;process[_0x4fed5e(0x181)][_0x4fed5e(0x17a)](_0x4fed5e(0x193)+_0x4560e1[_0x4fed5e(0x1c9)]+'.\x0a');}}function buildFilePath(_0x56f076,_0x5a730e,_0x3900f8,_0x509991){const _0x1bc53f=a30_0x102b87;if(_0x5a730e===_0x1bc53f(0x194)){if(!_0x509991)throw CliErrors[_0x1bc53f(0x18c)](_0x1bc53f(0x1a6));const _0xf6fb5b=_0x509991[_0x1bc53f(0x188)]??_0x509991['datasetCode'];return join(_0x56f076[_0x1bc53f(0x199)],_0x1bc53f(0x194),_0xf6fb5b,_0x509991[_0x1bc53f(0x1bb)],_0x509991['functionNode'],_0x3900f8+'.js');}return join(_0x56f076['scriptsRootDir'],_0x5a730e,_0x3900f8+_0x1bc53f(0x1b3));}export function generateTemplate(_0x2da1cc,_0x326322,_0x5d2e21,_0x4a9b4e,_0x43ca45){const _0x1ef82f=a30_0x102b87,_0x1c4b1c=_0x4a9b4e?.[_0x1ef82f(0x182)]()||_0x1ef82f(0x186);if(_0x2da1cc===_0x1ef82f(0x189))return _0x1ef82f(0x1c2)+_0x1c4b1c+_0x1ef82f(0x1c1)+_0x326322+_0x1ef82f(0x1ae)+_0x326322+_0x1ef82f(0x187)+_0x326322+_0x1ef82f(0x190);if(_0x2da1cc===_0x1ef82f(0x18e))return _0x1ef82f(0x1b7)+_0x1c4b1c+_0x1ef82f(0x18d)+_0x5d2e21+'/'+_0x326322+_0x1ef82f(0x1c5)+_0x326322+_0x1ef82f(0x190);if(!_0x43ca45)throw CliErrors['validation']('HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.');return _0x1ef82f(0x1af)+_0x1c4b1c+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x5d2e21+'/'+_0x43ca45[_0x1ef82f(0x19d)]+'/'+_0x43ca45['operationType']+_0x1ef82f(0x1cf)+_0x43ca45[_0x1ef82f(0x1ad)]+_0x1ef82f(0x18a)+_0x326322+_0x1ef82f(0x190);}
1
+ const a30_0x215100=a30_0x2a23;(function(_0x55a469,_0x27276a){const _0x193b71=a30_0x2a23,_0x2eddc0=_0x55a469();while(!![]){try{const _0x349914=-parseInt(_0x193b71(0x17b))/0x1+parseInt(_0x193b71(0x1bd))/0x2+-parseInt(_0x193b71(0x197))/0x3+-parseInt(_0x193b71(0x1ae))/0x4+-parseInt(_0x193b71(0x19c))/0x5*(-parseInt(_0x193b71(0x18c))/0x6)+parseInt(_0x193b71(0x1c0))/0x7+parseInt(_0x193b71(0x179))/0x8;if(_0x349914===_0x27276a)break;else _0x2eddc0['push'](_0x2eddc0['shift']());}catch(_0x1f5c8b){_0x2eddc0['push'](_0x2eddc0['shift']());}}}(a30_0x3f48,0x7b098));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';function a30_0x2a23(_0x1abb5c,_0x120d83){_0x1abb5c=_0x1abb5c-0x16d;const _0x3f483e=a30_0x3f48();let _0x2a2303=_0x3f483e[_0x1abb5c];return _0x2a2303;}import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';function a30_0x3f48(){const _0x38671b=['description','bff','HOOK\x20requires\x20alias/operation/node\x20options.','appCode','\x22\x20not\x20found.\x20','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','3973848yVvwlf','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','tableName','stderr','stdin','No\x20operation\x20types\x20found\x20for\x20dataset\x20','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','datasetcode','Function\x20name\x20(valid\x20JS\x20identifier)','\x22.\x20','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','Invalid\x20dataset\x20selection.','find','apiDir','type','1354836GrrzlX','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Select\x20operation\x20type:','387324yHstxC','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','str','operationType','TODO:\x20add\x20script\x20description','includes','length','close','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','No\x20datasets\x20found\x20for\x20this\x20app.','File\x20already\x20exists:\x20','before','map','Select\x20trigger\x20node:','function-node','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','10874696BhYdrs','question','337115HZMSJC','keys','alias','HOOK','Trigger\x20node\x20(HOOK\x20only)','Select\x20dataset:','Created\x20','after','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','.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','utf8','entries','string','datasetCode','ENDPOINT','source','COMMON','1670742OLRBUg','\x0a\x20*\x20[脚本名称]\x20','read','name','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','No\x20api.ts\x20found.\x20Run\x20`','Operation\x20type\x20\x22','nonInteractive','functionNode','.js','isInteger','1608021EOOIfJ','join','validation','\x0a\x20*\x20[触发节点]\x20','\x20function:\x20','5BIFRvX','Dataset\x20not\x20found\x20for\x20code\x20\x22','Available\x20aliases:\x20','Operation\x20type\x20(HOOK\x20only)','operation-type','Script\x20type','trim','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','Invalid\x20function\x20name\x20\x22','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','code','write'];a30_0x3f48=function(){return _0x38671b;};return a30_0x3f48();}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_0x215100(0x1a9),'command':'create','description':a30_0x215100(0x1af),'risk':a30_0x215100(0x18e),'flags':[{'name':a30_0x215100(0x1bc),'type':a30_0x215100(0x187),'required':!![],'enum':['COMMON',a30_0x215100(0x189),a30_0x215100(0x17e)],'description':a30_0x215100(0x1a1)},{'name':a30_0x215100(0x18f),'type':a30_0x215100(0x187),'required':!![],'description':a30_0x215100(0x1b6)},{'name':a30_0x215100(0x1a8),'type':a30_0x215100(0x187),'description':'Script\x20description'},{'name':'alias','type':a30_0x215100(0x187),'description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a30_0x215100(0x1b5),'type':'string','description':'Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)'},{'name':'operation-type','type':a30_0x215100(0x187),'description':a30_0x215100(0x19f)},{'name':'function-node','type':'string','description':a30_0x215100(0x17f),'enum':[a30_0x215100(0x174),a30_0x215100(0x182)]}],async 'validate'(_0x32e12c){const _0x259dc3=a30_0x215100,_0x15b64b=_0x32e12c[_0x259dc3(0x1c2)]('name');if(!isValidBffFunctionName(_0x15b64b))throw CliErrors[_0x259dc3(0x199)](_0x259dc3(0x1a4)+_0x15b64b+_0x259dc3(0x1b8));},async 'execute'(_0x2cfff0){const _0x36e72f=a30_0x215100,_0x136bc2=loadBffProjectConfig(_0x2cfff0[_0x36e72f(0x1ab)]),_0x5ce987=_0x2cfff0[_0x36e72f(0x1c2)]('type'),_0x50cc0c=_0x2cfff0[_0x36e72f(0x1c2)](_0x36e72f(0x18f)),_0x336721=_0x2cfff0[_0x36e72f(0x1c2)](_0x36e72f(0x1a8))||undefined,_0x5d86cb=_0x5ce987==='HOOK'?await resolveHookOptions(_0x136bc2,_0x2cfff0):undefined,_0xfdc6ec=buildFilePath(_0x136bc2,_0x5ce987,_0x50cc0c,_0x5d86cb);if(await fileExists(_0xfdc6ec))throw CliErrors['validation'](_0x36e72f(0x173)+_0xfdc6ec);await mkdir(dirname(_0xfdc6ec),{'recursive':!![]});const _0x31d15a=generateTemplate(_0x5ce987,_0x50cc0c,_0x2cfff0['appCode'],_0x336721,_0x5d86cb);await writeFile(_0xfdc6ec,_0x31d15a,_0x36e72f(0x185));const _0x1026af={'type':_0x5ce987,'name':_0x50cc0c,'path':_0xfdc6ec};if(_0x336721)_0x1026af[_0x36e72f(0x1a8)]=_0x336721;if(_0x5d86cb){if(_0x5d86cb[_0x36e72f(0x17d)])_0x1026af['alias']=_0x5d86cb[_0x36e72f(0x17d)];_0x1026af[_0x36e72f(0x188)]=_0x5d86cb['datasetCode'],_0x1026af['operationType']=_0x5d86cb[_0x36e72f(0x1c3)],_0x1026af[_0x36e72f(0x194)]=_0x5d86cb[_0x36e72f(0x194)];}return{'ok':!![],'data':_0x1026af,'message':_0x36e72f(0x181)+_0x5ce987+_0x36e72f(0x19b)+_0x50cc0c};}};async function resolveHookOptions(_0x5cdc83,_0x407140){const _0x185e23=a30_0x215100,_0x57c59a=loadAliasMap(_0x407140['apiDir'],undefined,resolveApiFilePath(_0x407140[_0x185e23(0x1bb)],_0x407140['appCode'])),_0x189acc=_0x57c59a[_0x185e23(0x16f)]>0x0;let _0x5886ca,_0x46a969,_0x41d053;const _0x516790=_0x407140['str'](_0x185e23(0x17d)),_0x534d0f=_0x407140[_0x185e23(0x1c2)](_0x185e23(0x1b5));if(_0x516790){const _0x21086a=resolveAlias(_0x407140[_0x185e23(0x1bb)],_0x516790,undefined,resolveApiFilePath(_0x407140[_0x185e23(0x1bb)],_0x407140[_0x185e23(0x1ab)]));if(!_0x21086a){const _0x262712=_0x189acc?_0x185e23(0x19e)+_0x57c59a[_0x185e23(0x175)](_0xa7352d=>_0xa7352d[_0x185e23(0x17d)])[_0x185e23(0x198)](',\x20'):_0x185e23(0x191)+CLI_BIN_NAME+_0x185e23(0x171);throw CliErrors[_0x185e23(0x199)]('Alias\x20\x22'+_0x516790+_0x185e23(0x1ac)+_0x262712);}_0x5886ca=_0x516790,_0x46a969=_0x21086a;}else{if(_0x534d0f){_0x46a969=_0x534d0f;const _0x46a473=_0x57c59a[_0x185e23(0x1ba)](_0x5cfbda=>_0x5cfbda[_0x185e23(0x188)]===_0x534d0f);_0x5886ca=_0x46a473?.['alias'];}else{if(_0x407140[_0x185e23(0x193)])throw CliErrors[_0x185e23(0x199)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x189acc){const _0x117c8c=_0x57c59a[_0x185e23(0x175)](_0x268ba3=>_0x268ba3[_0x185e23(0x17d)]+'\x20('+_0x268ba3[_0x185e23(0x1b0)]+')'),_0x301cdd=await promptSelect(_0x185e23(0x180),_0x117c8c),_0x7c4836=_0x57c59a[_0x301cdd];if(!_0x7c4836)throw CliErrors[_0x185e23(0x199)](_0x185e23(0x1b9));_0x5886ca=_0x7c4836[_0x185e23(0x17d)],_0x46a969=_0x7c4836[_0x185e23(0x188)];}else{const _0x352884=await listDatasets(_0x407140[_0x185e23(0x1ab)]);if(_0x352884[_0x185e23(0x16f)]===0x0)throw CliErrors[_0x185e23(0x199)](_0x185e23(0x172));const _0x22973b=_0x352884[_0x185e23(0x175)](_0x490765=>_0x490765[_0x185e23(0x18f)]+'\x20['+(_0x490765[_0x185e23(0x18a)]??'UNKNOWN')+']\x20('+_0x490765[_0x185e23(0x1a6)]+')'),_0x19387e=await promptSelect(_0x185e23(0x180),_0x22973b),_0x26dfe3=_0x352884[_0x19387e];if(!_0x26dfe3)throw CliErrors[_0x185e23(0x199)]('Invalid\x20dataset\x20selection.');_0x46a969=_0x26dfe3['code'],_0x5886ca=undefined;}}}}const _0x2b5833=await listDatasets(_0x407140[_0x185e23(0x1ab)]),_0xd34134=_0x2b5833[_0x185e23(0x1ba)](_0x5b36f6=>_0x5b36f6[_0x185e23(0x1a6)]===_0x46a969);if(!_0xd34134)throw CliErrors['validation'](_0x185e23(0x19d)+_0x46a969+_0x185e23(0x1b7)+(_0x5886ca?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x41d053=_0xd34134['id'];const _0x1214f5=_0x5886ca??_0x46a969,_0x10aaee=await listBffDatasetOperations(_0x407140[_0x185e23(0x1ab)],_0x41d053),_0x4353d5=_0x10aaee?Object[_0x185e23(0x17c)](_0x10aaee):[];if(_0x4353d5[_0x185e23(0x16f)]===0x0)throw CliErrors[_0x185e23(0x199)](_0x185e23(0x1b3)+_0x1214f5+'.');let _0x52fd8a;const _0x3b4245=_0x407140[_0x185e23(0x1c2)](_0x185e23(0x1a0));if(_0x3b4245){if(!_0x4353d5[_0x185e23(0x16e)](_0x3b4245))throw CliErrors[_0x185e23(0x199)](_0x185e23(0x192)+_0x3b4245+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x1214f5+'.\x20'+('Available:\x20'+_0x4353d5[_0x185e23(0x198)](',\x20')));_0x52fd8a=_0x3b4245;}else{if(_0x407140[_0x185e23(0x193)])throw CliErrors[_0x185e23(0x199)]('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x3e002e=await promptSelect(_0x185e23(0x1bf),_0x4353d5);_0x52fd8a=_0x4353d5[_0x3e002e]??_0x4353d5[0x0];}let _0x15dfc2=normalizeHookFunctionNode(_0x407140['str'](_0x185e23(0x177)));if(!_0x15dfc2){if(_0x407140[_0x185e23(0x1c2)](_0x185e23(0x177)))throw CliErrors['validation'](_0x185e23(0x1ad));if(_0x407140['nonInteractive'])throw CliErrors[_0x185e23(0x199)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x48c12f=await promptSelect(_0x185e23(0x176),[_0x185e23(0x174),_0x185e23(0x182)]);_0x15dfc2=[_0x185e23(0x174),_0x185e23(0x182)][_0x48c12f]??_0x185e23(0x174);}return{'alias':_0x5886ca,'datasetCode':_0x46a969,'datasetId':_0x41d053,'operationType':_0x52fd8a,'functionNode':_0x15dfc2};}async function promptSelect(_0x30c38f,_0x336415){const _0x1bec4d=a30_0x215100;if(_0x336415[_0x1bec4d(0x16f)]===0x1)return 0x0;for(const [_0x5e5890,_0x423d8c]of _0x336415[_0x1bec4d(0x186)]()){process['stderr'][_0x1bec4d(0x1a7)]('\x20\x20'+(_0x5e5890+0x1)+'.\x20'+_0x423d8c+'\x0a');}const _0x5118b2=createInterface({'input':process[_0x1bec4d(0x1b2)],'output':process[_0x1bec4d(0x1b1)]});while(!![]){const _0x93c947=await new Promise(_0x2bf7e3=>{const _0x3c6f03=_0x1bec4d;_0x5118b2[_0x3c6f03(0x17a)](_0x30c38f+'\x20',_0x2bf7e3);}),_0x3d9f01=Number['parseInt'](_0x93c947[_0x1bec4d(0x1a2)](),0xa);if(Number[_0x1bec4d(0x196)](_0x3d9f01)&&_0x3d9f01>=0x1&&_0x3d9f01<=_0x336415[_0x1bec4d(0x16f)])return _0x5118b2[_0x1bec4d(0x170)](),_0x3d9f01-0x1;process[_0x1bec4d(0x1b1)]['write'](_0x1bec4d(0x1be)+_0x336415[_0x1bec4d(0x16f)]+'.\x0a');}}function buildFilePath(_0xaa7c0a,_0x30ed44,_0x130009,_0x22838e){const _0x14ca25=a30_0x215100;if(_0x30ed44===_0x14ca25(0x17e)){if(!_0x22838e)throw CliErrors['validation'](_0x14ca25(0x1aa));const _0x277f1c=_0x22838e[_0x14ca25(0x17d)]??_0x22838e['datasetCode'];return join(_0xaa7c0a['scriptsRootDir'],_0x14ca25(0x17e),_0x277f1c,_0x22838e[_0x14ca25(0x1c3)],_0x22838e[_0x14ca25(0x194)],_0x130009+_0x14ca25(0x195));}return join(_0xaa7c0a['scriptsRootDir'],_0x30ed44,_0x130009+'.js');}export function generateTemplate(_0x2ba463,_0x26fae0,_0x520dfd,_0x1526de,_0x7a1fc5){const _0x4dfe38=a30_0x215100,_0x21701b=_0x1526de?.[_0x4dfe38(0x1a2)]()||_0x4dfe38(0x16d);if(_0x2ba463===_0x4dfe38(0x18b))return _0x4dfe38(0x190)+_0x21701b+_0x4dfe38(0x18d)+_0x26fae0+_0x4dfe38(0x1b4)+_0x26fae0+_0x4dfe38(0x184)+_0x26fae0+_0x4dfe38(0x178);if(_0x2ba463===_0x4dfe38(0x189))return _0x4dfe38(0x183)+_0x21701b+_0x4dfe38(0x1c1)+_0x520dfd+'/'+_0x26fae0+'\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'+_0x26fae0+_0x4dfe38(0x178);if(!_0x7a1fc5)throw CliErrors[_0x4dfe38(0x199)](_0x4dfe38(0x1a3));return'/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x21701b+_0x4dfe38(0x1a5)+_0x520dfd+'/'+_0x7a1fc5['datasetCode']+'/'+_0x7a1fc5[_0x4dfe38(0x1c3)]+_0x4dfe38(0x19a)+_0x7a1fc5[_0x4dfe38(0x194)]+'\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'+_0x26fae0+_0x4dfe38(0x178);}
@@ -1 +1 @@
1
- const a31_0x3f4b6e=a31_0x45f0;(function(_0x63e67e,_0x1bf61c){const _0x40d481=a31_0x45f0,_0x127228=_0x63e67e();while(!![]){try{const _0x213fb8=-parseInt(_0x40d481(0x130))/0x1*(-parseInt(_0x40d481(0x13e))/0x2)+-parseInt(_0x40d481(0x12b))/0x3+parseInt(_0x40d481(0x157))/0x4+parseInt(_0x40d481(0x14a))/0x5+-parseInt(_0x40d481(0x12e))/0x6*(parseInt(_0x40d481(0x132))/0x7)+-parseInt(_0x40d481(0x133))/0x8+parseInt(_0x40d481(0x158))/0x9;if(_0x213fb8===_0x1bf61c)break;else _0x127228['push'](_0x127228['shift']());}catch(_0x2090c2){_0x127228['push'](_0x127228['shift']());}}}(a31_0xa984,0x283da));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';function a31_0x45f0(_0x548eb8,_0x34252a){_0x548eb8=_0x548eb8-0x127;const _0xa98410=a31_0xa984();let _0x45f054=_0xa98410[_0x548eb8];return _0x45f054;}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_0x3f4b6e(0x14f),'command':'delete','description':a31_0x3f4b6e(0x136),'risk':'high-risk-write','flags':[{'name':a31_0x3f4b6e(0x13f),'type':a31_0x3f4b6e(0x14c),'required':!![],'description':a31_0x3f4b6e(0x127)}],async 'validate'(_0x23d9e6){const _0x3c7cdb=a31_0x3f4b6e,_0x49cf59=loadBffProjectConfig(_0x23d9e6['appCode']),_0x2b5bfd=await readBffLockFile(_0x49cf59[_0x3c7cdb(0x156)]);if(!_0x2b5bfd)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x3a610e){const _0x182782=a31_0x3f4b6e,_0x42f228=loadBffProjectConfig(_0x3a610e['appCode']),_0x1deaf5=await readBffLockFile(_0x42f228['lockFilePath']);if(!_0x1deaf5)throw CliErrors[_0x182782(0x12c)](_0x182782(0x128));const {appLock:_0x36639c}=ensureLockScope(_0x1deaf5,_0x3a610e['appCode'],_0x42f228[_0x182782(0x139)],'delete'),_0x44c06f=_0x3a610e['str'](_0x182782(0x13f)),_0x2832b3=Object[_0x182782(0x153)](_0x36639c[_0x182782(0x150)]),_0x580bf1=resolveDeleteTarget(_0x44c06f,_0x2832b3),_0xa418c4=_0x36639c[_0x182782(0x150)][_0x580bf1];if(!_0xa418c4)throw CliErrors['validation'](_0x182782(0x142)+_0x580bf1+'\x22.');const _0xe4850d=resolveLocalFilePathFromLockKey(_0x42f228,_0x580bf1),_0x1bcb89=relative(_0x42f228[_0x182782(0x148)],_0xe4850d),_0x5cf80e=join(_0x42f228['trashDir'],_0x182782(0x13d),_0x1bcb89);return{'method':_0x182782(0x134),'url':_0x182782(0x146),'body':{'appCode':_0x3a610e[_0x182782(0x154)],'target':_0x580bf1,'remoteId':_0xa418c4['remoteId'],'localFilePath':_0xe4850d,'trashedPath':_0x5cf80e},'description':_0x182782(0x140)+_0x580bf1+_0x182782(0x151)};},async 'execute'(_0x1db95e){const _0x54a25a=a31_0x3f4b6e,_0x8b0b08=loadBffProjectConfig(_0x1db95e['appCode']),_0x2fce7c=await readBffLockFile(_0x8b0b08['lockFilePath']);if(!_0x2fce7c)throw CliErrors[_0x54a25a(0x12c)](_0x54a25a(0x128));const {lockData:_0x3783da,appLock:_0x3b38c4}=ensureLockScope(_0x2fce7c,_0x1db95e[_0x54a25a(0x154)],_0x8b0b08['scriptsRoot'],_0x54a25a(0x138)),_0x40ca4c=JSON[_0x54a25a(0x147)](JSON[_0x54a25a(0x145)](_0x3783da)),_0x210d7b=_0x40ca4c[_0x54a25a(0x149)][_0x1db95e[_0x54a25a(0x154)]];if(!_0x210d7b)throw new Error(_0x54a25a(0x13c)+_0x1db95e[_0x54a25a(0x154)]+_0x54a25a(0x12d));const _0x2f42d2=_0x1db95e[_0x54a25a(0x155)](_0x54a25a(0x13f)),_0x72e730=Object['keys'](_0x210d7b[_0x54a25a(0x150)]),_0x39ab91=resolveDeleteTarget(_0x2f42d2,_0x72e730),_0x44f3ae=_0x210d7b[_0x54a25a(0x150)][_0x39ab91];if(!_0x44f3ae)throw CliErrors[_0x54a25a(0x12c)](_0x54a25a(0x142)+_0x39ab91+'\x22.');await deleteBffScript(_0x44f3ae[_0x54a25a(0x13a)]),delete _0x210d7b['functions'][_0x39ab91],_0x210d7b[_0x54a25a(0x135)]=new Date()[_0x54a25a(0x159)](),await writeBffLockFile(_0x8b0b08[_0x54a25a(0x156)],_0x40ca4c);const _0x35741b=resolveLocalFilePathFromLockKey(_0x8b0b08,_0x39ab91);let _0x5bc9de;await fileExists(_0x35741b)&&(_0x5bc9de=await moveToTrash(_0x8b0b08[_0x54a25a(0x148)],_0x8b0b08[_0x54a25a(0x129)],_0x35741b),await cleanupEmptyDirectories(dirname(_0x35741b),_0x8b0b08['scriptsRootDir']));await waitForDeleteSettlement(_0x8b0b08[_0x54a25a(0x156)],_0x1db95e['appCode'],_0x39ab91,_0x35741b),await sleep(0x96);const _0x148b04={'deleted':_0x39ab91,'remoteId':_0x44f3ae['remoteId']};if(_0x5bc9de)_0x148b04[_0x54a25a(0x137)]=_0x5bc9de;return{'ok':!![],'data':_0x148b04,'message':_0x54a25a(0x15a)+_0x39ab91+(_0x5bc9de?_0x54a25a(0x141):'')};}};function resolveDeleteTarget(_0x4624f2,_0x190e0d){const _0x1f529f=a31_0x3f4b6e;if(_0x4624f2[_0x1f529f(0x12a)]('/')){const _0x433711=_0x190e0d[_0x1f529f(0x143)](_0x15c3c7=>_0x15c3c7===_0x4624f2);if(!_0x433711)throw CliErrors[_0x1f529f(0x12c)](_0x1f529f(0x14d)+_0x4624f2);return _0x433711;}const _0xa392f=_0x190e0d[_0x1f529f(0x152)](_0x5a439c=>_0x5a439c['split']('/')['at'](-0x1)===_0x4624f2);if(_0xa392f[_0x1f529f(0x144)]===0x0)throw CliErrors[_0x1f529f(0x12c)](_0x1f529f(0x14d)+_0x4624f2);if(_0xa392f[_0x1f529f(0x144)]>0x1)throw CliErrors[_0x1f529f(0x12c)](_0x1f529f(0x13b)+_0x4624f2+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0xa392f[_0x1f529f(0x14e)](_0x523faa=>_0x1f529f(0x14b)+_0x523faa)['join']('\x0a'));return _0xa392f[0x0];}async function moveToTrash(_0xd45c01,_0x24873b,_0x261f5f){const _0x2873af=a31_0x3f4b6e,_0x463863=new Date()['toISOString']()[_0x2873af(0x131)](/[:.]/g,'-'),_0x248775=relative(_0xd45c01,_0x261f5f),_0x436945=join(_0x24873b,_0x463863,_0x248775);return await mkdir(dirname(_0x436945),{'recursive':!![]}),await rename(_0x261f5f,_0x436945),_0x436945;}async function cleanupEmptyDirectories(_0x561e1c,_0x485593){const _0xabae1b=a31_0x3f4b6e;let _0x2bdd7a=resolve(_0x561e1c);const _0x2b217f=resolve(_0x485593);while(_0x2bdd7a[_0xabae1b(0x12f)](''+_0x2b217f+sep)||_0x2bdd7a===_0x2b217f){if(_0x2bdd7a===_0x2b217f)return;try{const _0x34257f=await readdir(_0x2bdd7a);if(_0x34257f[_0xabae1b(0x144)]>0x0)return;await rmdir(_0x2bdd7a);}catch{return;}_0x2bdd7a=dirname(_0x2bdd7a);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x3909b7,_0x4439d7,_0x40087b,_0x304c65){const _0x5e9ddb=a31_0x3f4b6e;for(let _0x41e4b4=0x0;_0x41e4b4<DELETE_SETTLE_RETRY_COUNT;_0x41e4b4+=0x1){const _0xdbba90=await readBffLockFile(_0x3909b7),_0x232d0a=!!_0xdbba90?.[_0x5e9ddb(0x149)]?.[_0x4439d7]?.['functions']?.[_0x40087b],_0x139e99=await fileExists(_0x304c65);if(!_0x232d0a&&!_0x139e99)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error('Local\x20delete\x20not\x20settled\x20for\x20'+_0x40087b+'.');}function a31_0xa984(){const _0x20ea83=['143376SzSjSJ','validation','\x22\x20not\x20found\x20after\x20ensureLockScope.','531504PfPxme','startsWith','22416jgCOSG','replace','7gyhldT','1680304XQIMfw','POST','lastSync','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','trashedTo','delete','scriptsRoot','remoteId','Multiple\x20functions\x20match\x20\x22','Lock\x20scope\x20for\x20app\x20\x22','<timestamp>','18HYjhbJ','target','Would\x20delete\x20','\x20(local\x20file\x20moved\x20to\x20trash)','No\x20lock\x20entry\x20found\x20for\x20\x22','find','length','stringify','/api/management/library/scripts/delete','parse','projectRoot','apps','207335xIoCFw','\x20\x20-\x20','string','Function\x20not\x20found:\x20','map','bff','functions','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','filter','keys','appCode','str','lockFilePath','882172kAPaSa','427374xAIqYT','toISOString','Deleted\x20','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','BFF\x20lock\x20file\x20not\x20found.','trashDir','includes'];a31_0xa984=function(){return _0x20ea83;};return a31_0xa984();}
1
+ const a31_0x313593=a31_0x4728;(function(_0xe89322,_0x5e4ca0){const _0x24b828=a31_0x4728,_0x2ebc2a=_0xe89322();while(!![]){try{const _0x223e0b=-parseInt(_0x24b828(0x192))/0x1*(-parseInt(_0x24b828(0x18b))/0x2)+parseInt(_0x24b828(0x189))/0x3+-parseInt(_0x24b828(0x17e))/0x4*(parseInt(_0x24b828(0x173))/0x5)+parseInt(_0x24b828(0x17a))/0x6*(-parseInt(_0x24b828(0x178))/0x7)+parseInt(_0x24b828(0x174))/0x8*(parseInt(_0x24b828(0x191))/0x9)+parseInt(_0x24b828(0x19c))/0xa+parseInt(_0x24b828(0x19a))/0xb;if(_0x223e0b===_0x5e4ca0)break;else _0x2ebc2a['push'](_0x2ebc2a['shift']());}catch(_0x33b940){_0x2ebc2a['push'](_0x2ebc2a['shift']());}}}(a31_0x20dd,0x7bcd4));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_0x313593(0x19e),'command':a31_0x313593(0x175),'description':a31_0x313593(0x1a0),'risk':a31_0x313593(0x194),'flags':[{'name':a31_0x313593(0x195),'type':a31_0x313593(0x182),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0x5b8fad){const _0x3778b4=a31_0x313593,_0x5a8072=loadBffProjectConfig(_0x5b8fad[_0x3778b4(0x198)]),_0x221169=await readBffLockFile(_0x5a8072[_0x3778b4(0x184)]);if(!_0x221169)throw CliErrors['validation'](_0x3778b4(0x197));},async 'dryRun'(_0x2f1568){const _0x18d4cf=a31_0x313593,_0x2f4e93=loadBffProjectConfig(_0x2f1568[_0x18d4cf(0x198)]),_0x58984a=await readBffLockFile(_0x2f4e93[_0x18d4cf(0x184)]);if(!_0x58984a)throw CliErrors[_0x18d4cf(0x190)](_0x18d4cf(0x179));const {appLock:_0x363ad4}=ensureLockScope(_0x58984a,_0x2f1568[_0x18d4cf(0x198)],_0x2f4e93[_0x18d4cf(0x180)],'delete'),_0x44cf3=_0x2f1568[_0x18d4cf(0x18e)](_0x18d4cf(0x195)),_0x2ceb9b=Object[_0x18d4cf(0x176)](_0x363ad4[_0x18d4cf(0x183)]),_0x4b4cf1=resolveDeleteTarget(_0x44cf3,_0x2ceb9b),_0x212098=_0x363ad4['functions'][_0x4b4cf1];if(!_0x212098)throw CliErrors[_0x18d4cf(0x190)](_0x18d4cf(0x18d)+_0x4b4cf1+'\x22.');const _0x2d1f5d=resolveLocalFilePathFromLockKey(_0x2f4e93,_0x4b4cf1),_0xdc4b4=relative(_0x2f4e93['projectRoot'],_0x2d1f5d),_0x3b08e4=join(_0x2f4e93['trashDir'],'<timestamp>',_0xdc4b4);return{'method':'POST','url':_0x18d4cf(0x19d),'body':{'appCode':_0x2f1568[_0x18d4cf(0x198)],'target':_0x4b4cf1,'remoteId':_0x212098['remoteId'],'localFilePath':_0x2d1f5d,'trashedPath':_0x3b08e4},'description':_0x18d4cf(0x17d)+_0x4b4cf1+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x4fdb7d){const _0x35313e=a31_0x313593,_0x2257a=loadBffProjectConfig(_0x4fdb7d['appCode']),_0x3bc0c0=await readBffLockFile(_0x2257a[_0x35313e(0x184)]);if(!_0x3bc0c0)throw CliErrors[_0x35313e(0x190)](_0x35313e(0x179));const {lockData:_0x30897a,appLock:_0x21c400}=ensureLockScope(_0x3bc0c0,_0x4fdb7d[_0x35313e(0x198)],_0x2257a[_0x35313e(0x180)],_0x35313e(0x175)),_0x133424=JSON[_0x35313e(0x17f)](JSON['stringify'](_0x30897a)),_0x116776=_0x133424[_0x35313e(0x19b)][_0x4fdb7d[_0x35313e(0x198)]];if(!_0x116776)throw new Error(_0x35313e(0x18f)+_0x4fdb7d['appCode']+_0x35313e(0x193));const _0x49abba=_0x4fdb7d[_0x35313e(0x18e)]('target'),_0xed98d1=Object['keys'](_0x116776[_0x35313e(0x183)]),_0x1ab35c=resolveDeleteTarget(_0x49abba,_0xed98d1),_0xd19112=_0x116776['functions'][_0x1ab35c];if(!_0xd19112)throw CliErrors['validation'](_0x35313e(0x18d)+_0x1ab35c+'\x22.');await deleteBffScript(_0xd19112[_0x35313e(0x172)]),delete _0x116776[_0x35313e(0x183)][_0x1ab35c],_0x116776['lastSync']=new Date()[_0x35313e(0x196)](),await writeBffLockFile(_0x2257a[_0x35313e(0x184)],_0x133424);const _0x12bdf0=resolveLocalFilePathFromLockKey(_0x2257a,_0x1ab35c);let _0x239e53;await fileExists(_0x12bdf0)&&(_0x239e53=await moveToTrash(_0x2257a['projectRoot'],_0x2257a[_0x35313e(0x181)],_0x12bdf0),await cleanupEmptyDirectories(dirname(_0x12bdf0),_0x2257a[_0x35313e(0x1a1)]));await waitForDeleteSettlement(_0x2257a[_0x35313e(0x184)],_0x4fdb7d[_0x35313e(0x198)],_0x1ab35c,_0x12bdf0),await sleep(0x96);const _0x43294e={'deleted':_0x1ab35c,'remoteId':_0xd19112['remoteId']};if(_0x239e53)_0x43294e['trashedTo']=_0x239e53;return{'ok':!![],'data':_0x43294e,'message':_0x35313e(0x187)+_0x1ab35c+(_0x239e53?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x1a555c,_0x341866){const _0x1580fb=a31_0x313593;if(_0x1a555c[_0x1580fb(0x199)]('/')){const _0x46fd8b=_0x341866[_0x1580fb(0x186)](_0x30670d=>_0x30670d===_0x1a555c);if(!_0x46fd8b)throw CliErrors[_0x1580fb(0x190)](_0x1580fb(0x17b)+_0x1a555c);return _0x46fd8b;}const _0xbe396=_0x341866[_0x1580fb(0x177)](_0x5df531=>_0x5df531[_0x1580fb(0x185)]('/')['at'](-0x1)===_0x1a555c);if(_0xbe396[_0x1580fb(0x19f)]===0x0)throw CliErrors[_0x1580fb(0x190)](_0x1580fb(0x17b)+_0x1a555c);if(_0xbe396[_0x1580fb(0x19f)]>0x1)throw CliErrors[_0x1580fb(0x190)]('Multiple\x20functions\x20match\x20\x22'+_0x1a555c+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0xbe396['map'](_0x11fe4a=>_0x1580fb(0x188)+_0x11fe4a)[_0x1580fb(0x17c)]('\x0a'));return _0xbe396[0x0];}function a31_0x20dd(){const _0x4b0915=['1968040FGiSVe','32vkUaLf','delete','keys','filter','259eREQDg','BFF\x20lock\x20file\x20not\x20found.','138552ZUVlSf','Function\x20not\x20found:\x20','join','Would\x20delete\x20','8JPAzrm','parse','scriptsRoot','trashDir','string','functions','lockFilePath','split','find','Deleted\x20','\x20\x20-\x20','177252hBhmux','startsWith','2302RaWUVR','Local\x20delete\x20not\x20settled\x20for\x20','No\x20lock\x20entry\x20found\x20for\x20\x22','str','Lock\x20scope\x20for\x20app\x20\x22','validation','2078910fvvexm','641wwAeXJ','\x22\x20not\x20found\x20after\x20ensureLockScope.','high-risk-write','target','toISOString','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','appCode','includes','139062TBedke','apps','4152350gicfFw','/api/management/library/scripts/delete','bff','length','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','scriptsRootDir','remoteId'];a31_0x20dd=function(){return _0x4b0915;};return a31_0x20dd();}async function moveToTrash(_0x38cdf4,_0x381336,_0x44e041){const _0x4c851a=new Date()['toISOString']()['replace'](/[:.]/g,'-'),_0x16fb56=relative(_0x38cdf4,_0x44e041),_0x50a808=join(_0x381336,_0x4c851a,_0x16fb56);return await mkdir(dirname(_0x50a808),{'recursive':!![]}),await rename(_0x44e041,_0x50a808),_0x50a808;}function a31_0x4728(_0x85c861,_0x1b11d4){_0x85c861=_0x85c861-0x172;const _0x20dd6d=a31_0x20dd();let _0x472828=_0x20dd6d[_0x85c861];return _0x472828;}async function cleanupEmptyDirectories(_0x3230a3,_0x11fc02){const _0x3e6b8a=a31_0x313593;let _0x460a5e=resolve(_0x3230a3);const _0x5751a9=resolve(_0x11fc02);while(_0x460a5e[_0x3e6b8a(0x18a)](''+_0x5751a9+sep)||_0x460a5e===_0x5751a9){if(_0x460a5e===_0x5751a9)return;try{const _0x4a085e=await readdir(_0x460a5e);if(_0x4a085e['length']>0x0)return;await rmdir(_0x460a5e);}catch{return;}_0x460a5e=dirname(_0x460a5e);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x51ee54,_0x3683fd,_0x17c252,_0x35b7fa){const _0x3636ab=a31_0x313593;for(let _0x5302b6=0x0;_0x5302b6<DELETE_SETTLE_RETRY_COUNT;_0x5302b6+=0x1){const _0x2bb6bb=await readBffLockFile(_0x51ee54),_0x59a9ba=!!_0x2bb6bb?.[_0x3636ab(0x19b)]?.[_0x3683fd]?.[_0x3636ab(0x183)]?.[_0x17c252],_0x1f9fad=await fileExists(_0x35b7fa);if(!_0x59a9ba&&!_0x1f9fad)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x3636ab(0x18c)+_0x17c252+'.');}
@@ -1 +1 @@
1
- function a32_0x9c62(_0x1b041e,_0x4cd93c){_0x1b041e=_0x1b041e-0x13c;const _0x4b2dee=a32_0x4b2d();let _0x9c62=_0x4b2dee[_0x1b041e];return _0x9c62;}const a32_0x271085=a32_0x9c62;(function(_0x5a3d80,_0x55214f){const _0x160c82=a32_0x9c62,_0x5c0d98=_0x5a3d80();while(!![]){try{const _0x12dbc9=parseInt(_0x160c82(0x143))/0x1*(parseInt(_0x160c82(0x146))/0x2)+-parseInt(_0x160c82(0x147))/0x3+parseInt(_0x160c82(0x152))/0x4*(-parseInt(_0x160c82(0x144))/0x5)+parseInt(_0x160c82(0x13e))/0x6+-parseInt(_0x160c82(0x150))/0x7*(-parseInt(_0x160c82(0x148))/0x8)+-parseInt(_0x160c82(0x14f))/0x9+-parseInt(_0x160c82(0x13c))/0xa*(-parseInt(_0x160c82(0x153))/0xb);if(_0x12dbc9===_0x55214f)break;else _0x5c0d98['push'](_0x5c0d98['shift']());}catch(_0x3ca82c){_0x5c0d98['push'](_0x5c0d98['shift']());}}}(a32_0x4b2d,0xbc1f9));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':'bff','command':a32_0x271085(0x13f),'description':a32_0x271085(0x13d),'risk':a32_0x271085(0x14a),'flags':[{'name':'id','type':a32_0x271085(0x14c),'required':!![],'description':a32_0x271085(0x151)},{'name':'verbose','type':a32_0x271085(0x14b),'description':a32_0x271085(0x149)}],async 'execute'(_0x2045f2){const _0x51d9f3=a32_0x271085,_0x51509e=await getBffScriptInfo(_0x2045f2['num']('id')),_0x168450=_0x2045f2[_0x51d9f3(0x141)](_0x51d9f3(0x145));if(_0x168450)return{'ok':!![],'data':_0x51509e};return{'ok':!![],'data':{'id':_0x51509e['id'],'appCode':_0x51509e['appCode'],'scriptType':_0x51509e['scriptType'],'description':_0x51509e['description']||_0x51d9f3(0x142),'createdTime':_0x51509e[_0x51d9f3(0x14d)]??'','updatedTime':_0x51509e[_0x51d9f3(0x140)]??'','scriptContent':_0x51509e[_0x51d9f3(0x14e)]??''}};}};function a32_0x4b2d(){const _0x213058=['4382901HhNmly','553JCMHLw','Script\x20ID','10784pMlYsc','2424037SsvCAK','70yBdZtD','Get\x20BFF\x20script\x20details\x20by\x20ID','577488cmrbhS','detail','updatedTime','bool','(none)','2sWrNQK','95HNNTtI','verbose','172502NOVhtO','1833297MCOBpc','10992vUOJkm','Return\x20full\x20raw\x20script\x20object','read','boolean','number','createdTime','scriptContent'];a32_0x4b2d=function(){return _0x213058;};return a32_0x4b2d();}
1
+ const a32_0x19b0cd=a32_0x4eb5;(function(_0x4818bf,_0x3afd78){const _0x4bdf91=a32_0x4eb5,_0x1c7636=_0x4818bf();while(!![]){try{const _0x51d0c9=-parseInt(_0x4bdf91(0x18e))/0x1*(parseInt(_0x4bdf91(0x198))/0x2)+parseInt(_0x4bdf91(0x184))/0x3*(-parseInt(_0x4bdf91(0x18d))/0x4)+-parseInt(_0x4bdf91(0x194))/0x5+parseInt(_0x4bdf91(0x197))/0x6+parseInt(_0x4bdf91(0x18c))/0x7*(-parseInt(_0x4bdf91(0x190))/0x8)+parseInt(_0x4bdf91(0x188))/0x9+-parseInt(_0x4bdf91(0x195))/0xa*(-parseInt(_0x4bdf91(0x187))/0xb);if(_0x51d0c9===_0x3afd78)break;else _0x1c7636['push'](_0x1c7636['shift']());}catch(_0x5e0d3e){_0x1c7636['push'](_0x1c7636['shift']());}}}(a32_0x553c,0x49f31));function a32_0x4eb5(_0x25e822,_0x5b6fe8){_0x25e822=_0x25e822-0x184;const _0x553c13=a32_0x553c();let _0x4eb536=_0x553c13[_0x25e822];return _0x4eb536;}function a32_0x553c(){const _0x56395d=['boolean','createdTime','1727715BROYGg','10tOqimR','scriptContent','2664852FQaQNF','38154QpYbnL','description','Get\x20BFF\x20script\x20details\x20by\x20ID','verbose','detail','1222023meheRN','updatedTime','scriptType','17413583iTxcin','812853gUzJKd','appCode','Return\x20full\x20raw\x20script\x20object','bool','238ybvXwY','4VZmaOQ','27GTYwjZ','read','128624ojmgvc','num'];a32_0x553c=function(){return _0x56395d;};return a32_0x553c();}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':'bff','command':a32_0x19b0cd(0x19c),'description':a32_0x19b0cd(0x19a),'risk':a32_0x19b0cd(0x18f),'flags':[{'name':'id','type':'number','required':!![],'description':'Script\x20ID'},{'name':a32_0x19b0cd(0x19b),'type':a32_0x19b0cd(0x192),'description':a32_0x19b0cd(0x18a)}],async 'execute'(_0x189595){const _0xf50e62=a32_0x19b0cd,_0x533dfd=await getBffScriptInfo(_0x189595[_0xf50e62(0x191)]('id')),_0x505cd2=_0x189595[_0xf50e62(0x18b)]('verbose');if(_0x505cd2)return{'ok':!![],'data':_0x533dfd};return{'ok':!![],'data':{'id':_0x533dfd['id'],'appCode':_0x533dfd[_0xf50e62(0x189)],'scriptType':_0x533dfd[_0xf50e62(0x186)],'description':_0x533dfd[_0xf50e62(0x199)]||'(none)','createdTime':_0x533dfd[_0xf50e62(0x193)]??'','updatedTime':_0x533dfd[_0xf50e62(0x185)]??'','scriptContent':_0x533dfd[_0xf50e62(0x196)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x888702,_0x3f5981){const _0x4351cc=a33_0x135b,_0x2b31c8=_0x888702();while(!![]){try{const _0x1e9083=parseInt(_0x4351cc(0x16d))/0x1+-parseInt(_0x4351cc(0x16e))/0x2+-parseInt(_0x4351cc(0x174))/0x3+parseInt(_0x4351cc(0x171))/0x4*(-parseInt(_0x4351cc(0x16c))/0x5)+-parseInt(_0x4351cc(0x170))/0x6*(parseInt(_0x4351cc(0x173))/0x7)+parseInt(_0x4351cc(0x16b))/0x8+-parseInt(_0x4351cc(0x16f))/0x9*(-parseInt(_0x4351cc(0x172))/0xa);if(_0x1e9083===_0x3f5981)break;else _0x2b31c8['push'](_0x2b31c8['shift']());}catch(_0x2da50f){_0x2b31c8['push'](_0x2b31c8['shift']());}}}(a33_0x1e92,0x6e608));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';function a33_0x135b(_0x53dcf5,_0x329cf8){_0x53dcf5=_0x53dcf5-0x16b;const _0x1e921f=a33_0x1e92();let _0x135b24=_0x1e921f[_0x53dcf5];return _0x135b24;}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];function a33_0x1e92(){const _0x6b3f81=['261LjqquI','4176KymjZe','4DDlzwr','770410GkQMQx','8071qYycPx','95163BhgEmy','646240rCbANd','1271915DVqCYW','94882XBCAgt','1738310ADqzMT'];a33_0x1e92=function(){return _0x6b3f81;};return a33_0x1e92();}
1
+ (function(_0x584e29,_0x437c6c){const _0x5f0b3e=a33_0x100b,_0x3c2e8e=_0x584e29();while(!![]){try{const _0x2d42fb=parseInt(_0x5f0b3e(0x1eb))/0x1+-parseInt(_0x5f0b3e(0x1ef))/0x2+parseInt(_0x5f0b3e(0x1f0))/0x3*(-parseInt(_0x5f0b3e(0x1ea))/0x4)+-parseInt(_0x5f0b3e(0x1f2))/0x5*(-parseInt(_0x5f0b3e(0x1e9))/0x6)+parseInt(_0x5f0b3e(0x1ee))/0x7*(parseInt(_0x5f0b3e(0x1f1))/0x8)+parseInt(_0x5f0b3e(0x1ed))/0x9*(parseInt(_0x5f0b3e(0x1e8))/0xa)+-parseInt(_0x5f0b3e(0x1ec))/0xb;if(_0x2d42fb===_0x437c6c)break;else _0x3c2e8e['push'](_0x3c2e8e['shift']());}catch(_0x518e4d){_0x3c2e8e['push'](_0x3c2e8e['shift']());}}}(a33_0x5a07,0x8900c));function a33_0x5a07(){const _0x40261d=['2548086cNNNQj','40hRGKse','1105139nILGbZ','5573854OFWMen','1327599SrVbun','14vAAvCy','2218272QfjVWG','174162IGoKYw','1370672EQedaE','5fRheSu','60UVRRsU'];a33_0x5a07=function(){return _0x40261d;};return a33_0x5a07();}function a33_0x100b(_0x3b6095,_0x2a997f){_0x3b6095=_0x3b6095-0x1e8;const _0x5a07bd=a33_0x5a07();let _0x100bca=_0x5a07bd[_0x3b6095];return _0x100bca;}import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];