@lovrabet/rabetbase-cli 2.3.15-beta.2 → 2.3.15

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 (264) 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/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/rename.js +1 -1
  113. package/lib/commands/menu/shared/compare-table.js +1 -1
  114. package/lib/commands/menu/shared/delete-plan.js +1 -1
  115. package/lib/commands/menu/shared/facts.js +1 -1
  116. package/lib/commands/menu/shared/index.js +1 -1
  117. package/lib/commands/menu/shared/inquirer.js +1 -1
  118. package/lib/commands/menu/shared/local-pages.js +1 -1
  119. package/lib/commands/menu/shared/logic.js +1 -1
  120. package/lib/commands/menu/shared/mutations.js +1 -1
  121. package/lib/commands/menu/shared/service.js +1 -1
  122. package/lib/commands/menu/shared/sync-core.js +1 -1
  123. package/lib/commands/menu/shared/update-core.js +1 -1
  124. package/lib/commands/menu/shared/valid-url.js +1 -1
  125. package/lib/commands/menu/sync.js +1 -1
  126. package/lib/commands/notification/config-list.js +1 -1
  127. package/lib/commands/notification/index.js +1 -1
  128. package/lib/commands/ocr/index.js +1 -1
  129. package/lib/commands/page/generate-start.js +1 -1
  130. package/lib/commands/page/generate-status.js +1 -1
  131. package/lib/commands/page/index.js +1 -1
  132. package/lib/commands/page/pull.js +1 -1
  133. package/lib/commands/page/push.js +1 -1
  134. package/lib/commands/page/relation-audit.js +1 -1
  135. package/lib/commands/page/restore.js +1 -1
  136. package/lib/commands/page/shared.js +1 -1
  137. package/lib/commands/page/standard-page-status.js +1 -1
  138. package/lib/commands/page/sync.js +1 -1
  139. package/lib/commands/permit/index.js +1 -1
  140. package/lib/commands/permit/page-get.js +1 -1
  141. package/lib/commands/permit/page-set.js +1 -1
  142. package/lib/commands/permit/role-apis-set.js +1 -1
  143. package/lib/commands/permit/role-menus-set.js +1 -1
  144. package/lib/commands/permit/role-menus.js +1 -1
  145. package/lib/commands/permit/shared.js +1 -1
  146. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  147. package/lib/commands/project/create/format-elapsed.js +1 -1
  148. package/lib/commands/project/create/main.js +1 -1
  149. package/lib/commands/project/create/non-interactive.js +1 -1
  150. package/lib/commands/project/create/project-template-path.js +1 -1
  151. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  152. package/lib/commands/project/create/use-format-code.js +1 -1
  153. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  154. package/lib/commands/project/index.js +1 -1
  155. package/lib/commands/project/init.js +1 -1
  156. package/lib/commands/project/upgrade.js +1 -1
  157. package/lib/commands/registry.js +1 -1
  158. package/lib/commands/role/create.js +1 -1
  159. package/lib/commands/role/delete.js +1 -1
  160. package/lib/commands/role/detail.js +1 -1
  161. package/lib/commands/role/index.js +1 -1
  162. package/lib/commands/role/list.js +1 -1
  163. package/lib/commands/role/shared.js +1 -1
  164. package/lib/commands/role/update.js +1 -1
  165. package/lib/commands/role/user-add.js +1 -1
  166. package/lib/commands/role/user-remove.js +1 -1
  167. package/lib/commands/role/user-resolve.js +1 -1
  168. package/lib/commands/run/index.js +1 -1
  169. package/lib/commands/schema.js +1 -1
  170. package/lib/commands/sql/create.js +1 -1
  171. package/lib/commands/sql/delete.js +1 -1
  172. package/lib/commands/sql/detail.js +1 -1
  173. package/lib/commands/sql/exec.js +1 -1
  174. package/lib/commands/sql/index.js +1 -1
  175. package/lib/commands/sql/list.js +1 -1
  176. package/lib/commands/sql/pull.js +1 -1
  177. package/lib/commands/sql/push.js +1 -1
  178. package/lib/commands/sql/save.js +1 -1
  179. package/lib/commands/sql/shared.js +1 -1
  180. package/lib/commands/sql/status.js +1 -1
  181. package/lib/commands/sql/validate.js +1 -1
  182. package/lib/commands/task/index.js +1 -1
  183. package/lib/commands/task/status.js +1 -1
  184. package/lib/commands/workspace/add.js +1 -1
  185. package/lib/commands/workspace/index.js +1 -1
  186. package/lib/commands/workspace/remove.js +1 -1
  187. package/lib/config/schema.js +1 -1
  188. package/lib/constant/cdn.js +1 -1
  189. package/lib/constant/cli.js +1 -1
  190. package/lib/constant/defaults.js +1 -1
  191. package/lib/constant/domain.js +1 -1
  192. package/lib/constant/env.js +1 -1
  193. package/lib/constant/output.js +1 -1
  194. package/lib/constant/paths.js +1 -1
  195. package/lib/constant/risk.js +1 -1
  196. package/lib/context/app-resolver.js +1 -1
  197. package/lib/context/auth-resolver.js +1 -1
  198. package/lib/context/config-loader.js +1 -1
  199. package/lib/context.js +1 -1
  200. package/lib/core/alias-resolver.js +1 -1
  201. package/lib/core/api-client.js +1 -1
  202. package/lib/core/bff/config.js +1 -1
  203. package/lib/core/bff/file-system.js +1 -1
  204. package/lib/core/bff/hash.js +1 -1
  205. package/lib/core/bff/lock.js +1 -1
  206. package/lib/core/bff/utils.js +1 -1
  207. package/lib/core/db-resolver.js +1 -1
  208. package/lib/core/page/file-system.js +1 -1
  209. package/lib/core/page/hash.js +1 -1
  210. package/lib/core/page/lock.js +1 -1
  211. package/lib/core/sql-index-auditor.js +1 -1
  212. package/lib/core/sql-sync/config.js +1 -1
  213. package/lib/core/sql-sync/file-system.js +1 -1
  214. package/lib/core/sql-sync/hash.js +1 -1
  215. package/lib/core/sql-sync/lock.js +1 -1
  216. package/lib/core/sql-sync/utils.js +1 -1
  217. package/lib/core/sql-validator.js +1 -1
  218. package/lib/errors.js +1 -1
  219. package/lib/framework/build-all-flags.js +1 -1
  220. package/lib/framework/error-output.js +1 -1
  221. package/lib/framework/explicit-yes.js +1 -1
  222. package/lib/framework/flags.js +1 -1
  223. package/lib/framework/help.js +1 -1
  224. package/lib/framework/index.js +1 -1
  225. package/lib/framework/output.js +1 -1
  226. package/lib/framework/response.js +1 -1
  227. package/lib/framework/runner-alias.js +1 -1
  228. package/lib/framework/runner.js +1 -1
  229. package/lib/framework/schema-export.js +1 -1
  230. package/lib/framework/types.js +1 -1
  231. package/lib/generated/build-info.js +1 -1
  232. package/lib/help.js +1 -1
  233. package/lib/skills/main.js +1 -1
  234. package/lib/skills/npx-skills-add.js +1 -1
  235. package/lib/telemetry/cli-command-trace.js +1 -1
  236. package/lib/telemetry/cli-help-trace.js +1 -1
  237. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  238. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  239. package/lib/telemetry/send-cli-trace-log.js +1 -1
  240. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  241. package/lib/utils/ai_config.js +1 -1
  242. package/lib/utils/apply-jq-filter.js +1 -1
  243. package/lib/utils/cdn-config.js +1 -1
  244. package/lib/utils/check-sdk-version.js +1 -1
  245. package/lib/utils/cli-version-check.js +1 -1
  246. package/lib/utils/cli-version-policy.js +1 -1
  247. package/lib/utils/config.js +1 -1
  248. package/lib/utils/copy-directory.js +1 -1
  249. package/lib/utils/entity-with-id.js +1 -1
  250. package/lib/utils/file-utils.js +1 -1
  251. package/lib/utils/guides-cdn.js +1 -1
  252. package/lib/utils/http-client.js +1 -1
  253. package/lib/utils/is-non-interactive.js +1 -1
  254. package/lib/utils/logger.js +1 -1
  255. package/lib/utils/params.js +1 -1
  256. package/lib/utils/platform.js +1 -1
  257. package/lib/utils/rules-cdn.js +1 -1
  258. package/lib/utils/sleep.js +1 -1
  259. package/lib/utils/template-replacer.js +1 -1
  260. package/lib/utils/update-notice.js +1 -1
  261. package/lib/utils/version.js +1 -1
  262. package/lib/utils/with-active-cookie.js +1 -1
  263. package/lib/utils/write-cli-side-channel.js +1 -1
  264. package/package.json +1 -1
@@ -1 +1 @@
1
- const a20_0x558e32=a20_0x2784;(function(_0xa412ce,_0x4d520c){const _0x3a13a9=a20_0x2784,_0x18df8b=_0xa412ce();while(!![]){try{const _0x409b1b=parseInt(_0x3a13a9(0x16d))/0x1*(parseInt(_0x3a13a9(0x17a))/0x2)+parseInt(_0x3a13a9(0x185))/0x3*(-parseInt(_0x3a13a9(0x162))/0x4)+parseInt(_0x3a13a9(0x17f))/0x5+-parseInt(_0x3a13a9(0x181))/0x6*(parseInt(_0x3a13a9(0x17b))/0x7)+parseInt(_0x3a13a9(0x168))/0x8+parseInt(_0x3a13a9(0x176))/0x9+parseInt(_0x3a13a9(0x166))/0xa;if(_0x409b1b===_0x4d520c)break;else _0x18df8b['push'](_0x18df8b['shift']());}catch(_0x5c6aea){_0x18df8b['push'](_0x18df8b['shift']());}}}(a20_0x2131,0x23d35));function a20_0x2784(_0x2668a4,_0x118b4b){_0x2668a4=_0x2668a4-0x162;const _0x213131=a20_0x2131();let _0x278471=_0x213131[_0x2668a4];return _0x278471;}import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x6ccbcc,_0x1bbbfb){const _0x4ee9b0=a20_0x2784,_0x56612e=[],_0x16945b=_0x6ccbcc[_0x4ee9b0(0x170)]&&typeof _0x6ccbcc[_0x4ee9b0(0x170)]===_0x4ee9b0(0x178)?_0x6ccbcc[_0x4ee9b0(0x170)]:{},_0x4769d8=_0x6ccbcc[_0x4ee9b0(0x167)]||undefined;for(const [_0x25614c,_0x57ac20]of Object[_0x4ee9b0(0x17c)](_0x16945b)){if(!_0x57ac20||typeof _0x57ac20!==_0x4ee9b0(0x178)||!_0x57ac20[_0x4ee9b0(0x171)])continue;_0x56612e[_0x4ee9b0(0x177)]({'name':_0x25614c,'appcode':_0x57ac20['appcode'],'named':!![],'definedIn':_0x1bbbfb,'isDefault':_0x25614c===_0x4769d8,...buildAppProfileListFields(_0x57ac20)});}return _0x56612e;}function buildMergedItems(_0x2e1f42,_0x3cc4cc){const _0x703280=a20_0x2784,{apps:apps={},defaultApp:_0x39399b}=_0x2e1f42,_0x54ee13=_0x3cc4cc[_0x703280(0x173)][_0x703280(0x170)]&&typeof _0x3cc4cc[_0x703280(0x173)]['apps']===_0x703280(0x178)?_0x3cc4cc[_0x703280(0x173)][_0x703280(0x170)]:{},_0x39c6bb=_0x3cc4cc[_0x703280(0x189)][_0x703280(0x170)]&&typeof _0x3cc4cc[_0x703280(0x189)][_0x703280(0x170)]==='object'?_0x3cc4cc[_0x703280(0x189)][_0x703280(0x170)]:{},_0x11a9d1=_0x3cc4cc['projectConfig'][_0x703280(0x172)]===![],_0x287862=Object['entries'](apps),_0x5d6878=_0x287862[_0x703280(0x174)](([_0x4326fb,_0x4ebf6b])=>({'name':_0x4326fb,'appcode':_0x4ebf6b[_0x703280(0x171)],'named':!![],'definedIn':appDefinedIn(_0x4326fb,_0x54ee13,_0x39c6bb,_0x11a9d1),'isDefault':_0x4326fb===_0x39399b,...buildAppProfileListFields(_0x4ebf6b)}));return _0x5d6878;}function validateAppListFlags(_0x13c605){const _0x5dcd2a=a20_0x2784;if(!_0x13c605[_0x5dcd2a(0x188)]('remote'))return;if(!_0x13c605[_0x5dcd2a(0x188)]('global')&&!_0x13c605['bool'](_0x5dcd2a(0x175)))return;throw CliErrors[_0x5dcd2a(0x169)](_0x5dcd2a(0x16f),'Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.');}function a20_0x2131(){const _0x39e229=['\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','projectPath','find','754190fcZfBY','defaultApp','915264KkAeOQ','validation','mergedCli','list','merged','47OvkJHF','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','apps','appcode','inherit','globalConfig','map','project','547164ROfBDR','push','object','global','8112fIABdv','1744043uVSmph','entries','\x20config','app','1100705BYSVTD','isCurrent','6ZJACXa','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','boolean','remote','13974Jpjdhs','read','\x20in\x20','bool','projectConfig','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','228Drxdhy'];a20_0x2131=function(){return _0x39e229;};return a20_0x2131();}async function execute(_0x15f5c7){const _0x30f1b1=a20_0x2784;validateAppListFlags(_0x15f5c7);if(_0x15f5c7[_0x30f1b1(0x188)](_0x30f1b1(0x184)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x15f5c7)};const _0x310c45=_0x15f5c7[_0x30f1b1(0x188)](_0x30f1b1(0x179)),_0x24b7e3=_0x15f5c7[_0x30f1b1(0x188)]('project'),_0x588955=_0x310c45?_0x30f1b1(0x179):_0x24b7e3?_0x30f1b1(0x175):_0x30f1b1(0x16c),{config:_0x4eca91,layers:_0x53b973}=readRawConfigWithLayers(),_0x367ec2=resolveDefaultAppSource(_0x53b973),{defaultApp:_0x2eb33d}=_0x4eca91;let _0x349b9f,_0x12a9db;switch(_0x588955){case _0x30f1b1(0x179):_0x349b9f=buildItemsFromLayer(_0x53b973[_0x30f1b1(0x173)],_0x30f1b1(0x179)),_0x12a9db=_0x53b973['globalPath'];break;case _0x30f1b1(0x175):_0x349b9f=buildItemsFromLayer(_0x53b973[_0x30f1b1(0x189)],'project'),_0x12a9db=_0x53b973[_0x30f1b1(0x164)];break;default:_0x349b9f=buildMergedItems(_0x4eca91,_0x53b973);break;}enrichAppListItemsWithMergedSelection(_0x349b9f,_0x15f5c7[_0x30f1b1(0x16a)]);if(_0x349b9f['length']===0x0){const _0x305087=_0x588955==='merged'?'':_0x30f1b1(0x187)+_0x588955+_0x30f1b1(0x17d);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x305087+'.\x20Use\x20`'+CLI_BIN_NAME+_0x30f1b1(0x163)};}const _0x40672a=_0x349b9f[_0x30f1b1(0x165)](_0x3465f6=>_0x3465f6[_0x30f1b1(0x180)]===!![]),_0x1c7004=_0x2eb33d??_0x40672a?.['appcode']??null,_0x1f43e7=_0x588955===_0x30f1b1(0x16c)?{'globalPath':_0x53b973['globalPath']??null,'projectPath':_0x53b973[_0x30f1b1(0x164)]??null,'defaultApp':_0x1c7004,'defaultAppSource':_0x2eb33d!=null?_0x367ec2:null}:{'scope':_0x588955,'configPath':_0x12a9db??null};return{'ok':!![],'data':{'items':_0x349b9f,'meta':_0x1f43e7}};}export const appListDefinition={'service':a20_0x558e32(0x17e),'command':a20_0x558e32(0x16b),'description':a20_0x558e32(0x182),'risk':a20_0x558e32(0x186),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x558e32(0x184),'type':a20_0x558e32(0x183),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a20_0x558e32(0x179),'type':a20_0x558e32(0x183),'description':a20_0x558e32(0x18a),'default':![]},{'name':a20_0x558e32(0x175),'type':a20_0x558e32(0x183),'description':a20_0x558e32(0x16e),'default':![]}],async 'validate'(_0x433e44){validateAppListFlags(_0x433e44);},'execute':execute};
1
+ const a20_0x3850db=a20_0x2bbb;function a20_0x2abc(){const _0x34ff2d=['remote','903830GmQbgo','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','6MCaoDG','.\x20Use\x20`','2296520DuiXbC','664RAwjom','find','globalPath','length','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','globalConfig','appcode','defaultApp','list','merged','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','51191DqvHmm','object','projectPath','boolean','No\x20apps\x20configured','inherit','global','projectConfig','\x20config','entries','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','3375660rfAtlb','8994537EJgOMW','apps','mergedCli','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','bool','project','1393494DVgoFJ','2807208oKhcGK','read'];a20_0x2abc=function(){return _0x34ff2d;};return a20_0x2abc();}function a20_0x2bbb(_0x5b4ab3,_0xb3686a){_0x5b4ab3=_0x5b4ab3-0x74;const _0x2abc03=a20_0x2abc();let _0x2bbb7e=_0x2abc03[_0x5b4ab3];return _0x2bbb7e;}(function(_0x12c47a,_0x3d982d){const _0x44b9d5=a20_0x2bbb,_0x409f5c=_0x12c47a();while(!![]){try{const _0x3a1c6c=-parseInt(_0x44b9d5(0x94))/0x1+parseInt(_0x44b9d5(0x90))/0x2+-parseInt(_0x44b9d5(0x91))/0x3+parseInt(_0x44b9d5(0x98))/0x4+-parseInt(_0x44b9d5(0x89))/0x5*(-parseInt(_0x44b9d5(0x96))/0x6)+parseInt(_0x44b9d5(0x7e))/0x7*(-parseInt(_0x44b9d5(0x99))/0x8)+parseInt(_0x44b9d5(0x8a))/0x9;if(_0x3a1c6c===_0x3d982d)break;else _0x409f5c['push'](_0x409f5c['shift']());}catch(_0x4f6976){_0x409f5c['push'](_0x409f5c['shift']());}}}(a20_0x2abc,0x79ca9));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x183934,_0x2250b2){const _0x2244aa=a20_0x2bbb,_0x44fbfc=[],_0x2011d9=_0x183934[_0x2244aa(0x8b)]&&typeof _0x183934['apps']===_0x2244aa(0x7f)?_0x183934['apps']:{},_0x36b315=_0x183934[_0x2244aa(0x7a)]||undefined;for(const [_0x2050f4,_0x135cf2]of Object[_0x2244aa(0x87)](_0x2011d9)){if(!_0x135cf2||typeof _0x135cf2!==_0x2244aa(0x7f)||!_0x135cf2['appcode'])continue;_0x44fbfc['push']({'name':_0x2050f4,'appcode':_0x135cf2[_0x2244aa(0x79)],'named':!![],'definedIn':_0x2250b2,'isDefault':_0x2050f4===_0x36b315,...buildAppProfileListFields(_0x135cf2)});}return _0x44fbfc;}function buildMergedItems(_0x163c6e,_0x295d92){const _0x2df189=a20_0x2bbb,{apps:apps={},defaultApp:_0x87086c}=_0x163c6e,_0x1c8364=_0x295d92[_0x2df189(0x78)][_0x2df189(0x8b)]&&typeof _0x295d92[_0x2df189(0x78)][_0x2df189(0x8b)]===_0x2df189(0x7f)?_0x295d92[_0x2df189(0x78)]['apps']:{},_0x8f2d31=_0x295d92['projectConfig'][_0x2df189(0x8b)]&&typeof _0x295d92['projectConfig'][_0x2df189(0x8b)]===_0x2df189(0x7f)?_0x295d92[_0x2df189(0x85)][_0x2df189(0x8b)]:{},_0x189afe=_0x295d92['projectConfig'][_0x2df189(0x83)]===![],_0x4abd7b=Object[_0x2df189(0x87)](apps),_0x51b5ac=_0x4abd7b['map'](([_0x26fafd,_0x2680df])=>({'name':_0x26fafd,'appcode':_0x2680df['appcode'],'named':!![],'definedIn':appDefinedIn(_0x26fafd,_0x1c8364,_0x8f2d31,_0x189afe),'isDefault':_0x26fafd===_0x87086c,...buildAppProfileListFields(_0x2680df)}));return _0x51b5ac;}function validateAppListFlags(_0x5dd13a){const _0x3358f5=a20_0x2bbb;if(!_0x5dd13a[_0x3358f5(0x8e)](_0x3358f5(0x93)))return;if(!_0x5dd13a[_0x3358f5(0x8e)](_0x3358f5(0x84))&&!_0x5dd13a[_0x3358f5(0x8e)](_0x3358f5(0x8f)))return;throw CliErrors['validation'](_0x3358f5(0x88),_0x3358f5(0x77));}async function execute(_0xec81a3){const _0x52b640=a20_0x2bbb;validateAppListFlags(_0xec81a3);if(_0xec81a3['bool'](_0x52b640(0x93)))return{'ok':!![],'data':await listRemoteAppDirectory(_0xec81a3)};const _0x277649=_0xec81a3[_0x52b640(0x8e)]('global'),_0x34bbda=_0xec81a3[_0x52b640(0x8e)](_0x52b640(0x8f)),_0x550705=_0x277649?_0x52b640(0x84):_0x34bbda?'project':_0x52b640(0x7c),{config:_0x5a38f9,layers:_0x3fabf3}=readRawConfigWithLayers(),_0x3be485=resolveDefaultAppSource(_0x3fabf3),{defaultApp:_0x21b17e}=_0x5a38f9;let _0x43e495,_0x5a1fed;switch(_0x550705){case'global':_0x43e495=buildItemsFromLayer(_0x3fabf3['globalConfig'],_0x52b640(0x84)),_0x5a1fed=_0x3fabf3[_0x52b640(0x75)];break;case _0x52b640(0x8f):_0x43e495=buildItemsFromLayer(_0x3fabf3[_0x52b640(0x85)],_0x52b640(0x8f)),_0x5a1fed=_0x3fabf3[_0x52b640(0x80)];break;default:_0x43e495=buildMergedItems(_0x5a38f9,_0x3fabf3);break;}enrichAppListItemsWithMergedSelection(_0x43e495,_0xec81a3[_0x52b640(0x8c)]);if(_0x43e495[_0x52b640(0x76)]===0x0){const _0x10f95c=_0x550705==='merged'?'':'\x20in\x20'+_0x550705+_0x52b640(0x86);return{'ok':!![],'data':[],'message':_0x52b640(0x82)+_0x10f95c+_0x52b640(0x97)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x24255d=_0x43e495[_0x52b640(0x74)](_0x19f0fd=>_0x19f0fd['isCurrent']===!![]),_0x4a4223=_0x21b17e??_0x24255d?.[_0x52b640(0x79)]??null,_0x23ab0c=_0x550705===_0x52b640(0x7c)?{'globalPath':_0x3fabf3[_0x52b640(0x75)]??null,'projectPath':_0x3fabf3['projectPath']??null,'defaultApp':_0x4a4223,'defaultAppSource':_0x21b17e!=null?_0x3be485:null}:{'scope':_0x550705,'configPath':_0x5a1fed??null};return{'ok':!![],'data':{'items':_0x43e495,'meta':_0x23ab0c}};}export const appListDefinition={'service':'app','command':a20_0x3850db(0x7b),'description':a20_0x3850db(0x8d),'risk':a20_0x3850db(0x92),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x3850db(0x93),'type':a20_0x3850db(0x81),'description':a20_0x3850db(0x95),'default':![]},{'name':a20_0x3850db(0x84),'type':a20_0x3850db(0x81),'description':'Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','default':![]},{'name':a20_0x3850db(0x8f),'type':'boolean','description':a20_0x3850db(0x7d),'default':![]}],async 'validate'(_0x57e862){validateAppListFlags(_0x57e862);},'execute':execute};
@@ -1 +1 @@
1
- (function(_0x1c29e9,_0x41b04c){const _0x1b3962=a21_0x4e4c,_0x2e3dff=_0x1c29e9();while(!![]){try{const _0x8da73c=parseInt(_0x1b3962(0x11f))/0x1+-parseInt(_0x1b3962(0x124))/0x2*(-parseInt(_0x1b3962(0x11d))/0x3)+parseInt(_0x1b3962(0x120))/0x4*(-parseInt(_0x1b3962(0x123))/0x5)+-parseInt(_0x1b3962(0x121))/0x6*(-parseInt(_0x1b3962(0x126))/0x7)+parseInt(_0x1b3962(0x11c))/0x8+-parseInt(_0x1b3962(0x122))/0x9*(parseInt(_0x1b3962(0x118))/0xa)+-parseInt(_0x1b3962(0x127))/0xb*(parseInt(_0x1b3962(0x11a))/0xc);if(_0x8da73c===_0x41b04c)break;else _0x2e3dff['push'](_0x2e3dff['shift']());}catch(_0x3f2309){_0x2e3dff['push'](_0x2e3dff['shift']());}}}(a21_0x2fc3,0x71cfa));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 a21_0x4e4c(_0x2e293e,_0x483985){_0x2e293e=_0x2e293e-0x118;const _0x2fc38c=a21_0x2fc3();let _0x4e4cc7=_0x2fc38c[_0x2e293e];return _0x4e4cc7;}function resolveCookie(_0x2479cc){const _0x4648d0=a21_0x4e4c,_0x10f628=_0x2479cc[_0x4648d0(0x11e)]||getCookie();if(!_0x10f628)throw CliErrors[_0x4648d0(0x11b)]();return _0x10f628;}function a21_0x2fc3(){const _0x55c650=['16797SIXVYe','cookie','429498mLrQqa','916HpggGD','12SwvFqc','12285ZUeMeT','5350FqbeZY','102klbvOK','map','89467GeWAoU','1232VfAJNI','appName','appCode','2570WaXjXg','appDesc','53640KTigoM','authRequired','6576288FTMMGr'];a21_0x2fc3=function(){return _0x55c650;};return a21_0x2fc3();}export async function listRemoteAppDirectory(_0x547c3f){const _0x1173e3=a21_0x4e4c,_0x46f561=await withActiveCookie(resolveCookie(_0x547c3f),()=>listRemoteApps());return{'items':_0x46f561[_0x1173e3(0x125)](_0x3e8c0e=>({..._0x3e8c0e['id']!=null?{'id':_0x3e8c0e['id']}:{},'appCode':_0x3e8c0e[_0x1173e3(0x129)],'appName':_0x3e8c0e[_0x1173e3(0x128)],..._0x3e8c0e[_0x1173e3(0x119)]!=null?{'appDesc':_0x3e8c0e[_0x1173e3(0x119)]}:{}})),'meta':{'source':'platform'}};}
1
+ (function(_0x2ededc,_0x17d993){const _0x242b6b=a21_0x38c6,_0x2b8d72=_0x2ededc();while(!![]){try{const _0x54e1ba=-parseInt(_0x242b6b(0xa1))/0x1*(parseInt(_0x242b6b(0x9a))/0x2)+-parseInt(_0x242b6b(0xa2))/0x3*(parseInt(_0x242b6b(0xa0))/0x4)+-parseInt(_0x242b6b(0x94))/0x5+parseInt(_0x242b6b(0x9e))/0x6*(parseInt(_0x242b6b(0xa3))/0x7)+-parseInt(_0x242b6b(0x95))/0x8*(parseInt(_0x242b6b(0x97))/0x9)+parseInt(_0x242b6b(0x9f))/0xa*(-parseInt(_0x242b6b(0x9b))/0xb)+parseInt(_0x242b6b(0x99))/0xc;if(_0x54e1ba===_0x17d993)break;else _0x2b8d72['push'](_0x2b8d72['shift']());}catch(_0xf1ba74){_0x2b8d72['push'](_0x2b8d72['shift']());}}}(a21_0x480b,0x801a5));function a21_0x480b(){const _0xacfaa6=['3aiplmF','3679193fReizf','map','appCode','3692115ybNURs','8ywGcTZ','platform','2936817Dcqcfq','appName','32586204muIlYn','25342WKiZgv','126863RUYmLh','cookie','appDesc','6HzeKQy','250ajeYNZ','4084916XiTmvn','27jfnbHO'];a21_0x480b=function(){return _0xacfaa6;};return a21_0x480b();}import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';function a21_0x38c6(_0x397df5,_0x44275a){_0x397df5=_0x397df5-0x93;const _0x480b80=a21_0x480b();let _0x38c659=_0x480b80[_0x397df5];return _0x38c659;}import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x2bc073){const _0x15e567=a21_0x38c6,_0x1ef2b4=_0x2bc073[_0x15e567(0x9c)]||getCookie();if(!_0x1ef2b4)throw CliErrors['authRequired']();return _0x1ef2b4;}export async function listRemoteAppDirectory(_0x15e115){const _0x3b5261=a21_0x38c6,_0x14d844=await withActiveCookie(resolveCookie(_0x15e115),()=>listRemoteApps());return{'items':_0x14d844[_0x3b5261(0xa4)](_0x3e0076=>({..._0x3e0076['id']!=null?{'id':_0x3e0076['id']}:{},'appCode':_0x3e0076[_0x3b5261(0x93)],'appName':_0x3e0076[_0x3b5261(0x98)],..._0x3e0076[_0x3b5261(0x9d)]!=null?{'appDesc':_0x3e0076[_0x3b5261(0x9d)]}:{}})),'meta':{'source':_0x3b5261(0x96)}};}
@@ -1 +1 @@
1
- const a22_0xafe4e7=a22_0x5a72;function a22_0x5a72(_0x2f0b6b,_0x2402c4){_0x2f0b6b=_0x2f0b6b-0xaa;const _0x281efd=a22_0x281e();let _0x5a72b2=_0x281efd[_0x2f0b6b];return _0x5a72b2;}function a22_0x281e(){const _0x57c3a8=['name','138286XiUaHR','11438330pFUUsj','261100VqFpSu','2026-07','2027472GdNMNI','app\x20remove','App\x20profile\x20name\x20to\x20remove','15008onzqAh','42FTPLxo','7EUSbMg','3510UdHBlH','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','\x20workspace\x20remove','3348730nSVHqH','1332628DNCCsL'];a22_0x281e=function(){return _0x57c3a8;};return a22_0x281e();}(function(_0x17a2d4,_0x13f48f){const _0x323f21=a22_0x5a72,_0x44574e=_0x17a2d4();while(!![]){try{const _0x653551=parseInt(_0x323f21(0xad))/0x1*(-parseInt(_0x323f21(0xb4))/0x2)+-parseInt(_0x323f21(0xb8))/0x3+parseInt(_0x323f21(0xb2))/0x4+-parseInt(_0x323f21(0xb6))/0x5*(-parseInt(_0x323f21(0xac))/0x6)+parseInt(_0x323f21(0xb1))/0x7+-parseInt(_0x323f21(0xab))/0x8*(parseInt(_0x323f21(0xae))/0x9)+parseInt(_0x323f21(0xb5))/0xa;if(_0x653551===_0x13f48f)break;else _0x44574e['push'](_0x44574e['shift']());}catch(_0x117b10){_0x44574e['push'](_0x44574e['shift']());}}}(a22_0x281e,0x68d8f));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':'app','command':'remove','description':a22_0xafe4e7(0xaf),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0xafe4e7(0xb0),'since':a22_0xafe4e7(0xb7)},'args':[{'name':a22_0xafe4e7(0xb3),'description':a22_0xafe4e7(0xaa),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x36aa55=>validateAppName(_0x36aa55,'app\x20remove'),'execute':_0x4fa2b7=>runAppRemove(_0x4fa2b7,a22_0xafe4e7(0xb9))};
1
+ const a22_0x2aefdf=a22_0x29f1;(function(_0x5d0d91,_0x70f049){const _0x54aa44=a22_0x29f1,_0x421f2c=_0x5d0d91();while(!![]){try{const _0x4d9410=-parseInt(_0x54aa44(0x1da))/0x1+-parseInt(_0x54aa44(0x1ce))/0x2*(parseInt(_0x54aa44(0x1d7))/0x3)+-parseInt(_0x54aa44(0x1d9))/0x4+-parseInt(_0x54aa44(0x1d5))/0x5*(-parseInt(_0x54aa44(0x1cf))/0x6)+-parseInt(_0x54aa44(0x1d0))/0x7+-parseInt(_0x54aa44(0x1d8))/0x8+parseInt(_0x54aa44(0x1d2))/0x9*(parseInt(_0x54aa44(0x1d3))/0xa);if(_0x4d9410===_0x70f049)break;else _0x421f2c['push'](_0x421f2c['shift']());}catch(_0xea08a6){_0x421f2c['push'](_0x421f2c['shift']());}}}(a22_0x9096,0xe69ce));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a22_0x29f1(_0x4ed483,_0x4b0262){_0x4ed483=_0x4ed483-0x1cb;const _0x909695=a22_0x9096();let _0x29f197=_0x909695[_0x4ed483];return _0x29f197;}export const appRemoveDefinition={'service':a22_0x2aefdf(0x1cb),'command':a22_0x2aefdf(0x1d4),'description':'Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x2aefdf(0x1d1),'since':'2026-07'},'args':[{'name':a22_0x2aefdf(0x1cd),'description':a22_0x2aefdf(0x1cc),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x2ed7d1=>validateAppName(_0x2ed7d1,a22_0x2aefdf(0x1d6)),'execute':_0x4457f0=>runAppRemove(_0x4457f0,a22_0x2aefdf(0x1d6))};function a22_0x9096(){const _0x34f940=['46dzBmTs','1930974FRYxAx','11604096oODubf','\x20workspace\x20remove','18GdEmAu','17697830soolBq','remove','25jIqstY','app\x20remove','238737nYhjyR','157056zvRteo','1986240LkcgjW','199884DeUxQr','app','App\x20profile\x20name\x20to\x20remove','name'];a22_0x9096=function(){return _0x34f940;};return a22_0x9096();}
@@ -1 +1 @@
1
- (function(_0x34d57c,_0x21d43c){const _0x4cf431=a23_0x4604,_0x371b58=_0x34d57c();while(!![]){try{const _0xc33197=parseInt(_0x4cf431(0x1e5))/0x1+-parseInt(_0x4cf431(0x1ed))/0x2+-parseInt(_0x4cf431(0x1de))/0x3*(parseInt(_0x4cf431(0x1e0))/0x4)+-parseInt(_0x4cf431(0x1e8))/0x5*(parseInt(_0x4cf431(0x1f7))/0x6)+-parseInt(_0x4cf431(0x1e3))/0x7*(-parseInt(_0x4cf431(0x1e6))/0x8)+-parseInt(_0x4cf431(0x1df))/0x9+-parseInt(_0x4cf431(0x1f5))/0xa*(-parseInt(_0x4cf431(0x1fb))/0xb);if(_0xc33197===_0x21d43c)break;else _0x371b58['push'](_0x371b58['shift']());}catch(_0x3a59){_0x371b58['push'](_0x371b58['shift']());}}}(a23_0x2862,0x2b36c));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x1ce358,_0x183545){const _0xcc95ca=a23_0x4604;if(!_0x183545)return;const _0x27a7ba=_0x183545[_0xcc95ca(0x1dd)]&&typeof _0x183545[_0xcc95ca(0x1dd)]===_0xcc95ca(0x1f6)?_0x183545[_0xcc95ca(0x1dd)]:{},_0x488a49=Object[_0xcc95ca(0x1ea)](_0x27a7ba)['length']>0x0;for(const _0x494627 of _0x1ce358){_0x494627[_0xcc95ca(0x1f4)]=![];}const _0x3cd657=_0x183545[_0xcc95ca(0x1f0)]!=null?String(_0x183545['appCode'])[_0xcc95ca(0x1f2)]():'';if(_0x488a49){const _0x599985=_0x183545[_0xcc95ca(0x1e9)]??_0x183545[_0xcc95ca(0x1ee)];if(_0x599985)for(const _0x4567dd of _0x1ce358){_0x4567dd['named']===!![]&&_0x4567dd[_0xcc95ca(0x1fa)]===_0x599985&&(_0x4567dd[_0xcc95ca(0x1f4)]=!![]);}for(const _0x124839 of _0x1ce358){if(_0x124839[_0xcc95ca(0x1eb)]!==![])continue;if(_0x183545['defaultApp'])continue;_0x3cd657&&String(_0x124839[_0xcc95ca(0x1f8)]??'')[_0xcc95ca(0x1f2)]()===_0x3cd657&&(_0x124839[_0xcc95ca(0x1f4)]=!![]);}return;}if(!_0x3cd657)return;for(const _0x27951b of _0x1ce358){String(_0x27951b['appcode']??'')[_0xcc95ca(0x1f2)]()===_0x3cd657&&(_0x27951b[_0xcc95ca(0x1f4)]=!![]);}}export function resolveAppScopeForWrite(_0x5dfa40,_0xb8f06f,_0x22fa7e){const _0x40c7a3=a23_0x4604;if(_0xb8f06f)return _0x40c7a3(0x1e7);const _0x454b9d=_0x22fa7e[_0x40c7a3(0x1f3)]['apps']&&typeof _0x22fa7e[_0x40c7a3(0x1f3)][_0x40c7a3(0x1dd)]==='object'?_0x22fa7e[_0x40c7a3(0x1f3)]['apps']:{},_0x410c58=_0x22fa7e['globalConfig']['apps']&&typeof _0x22fa7e[_0x40c7a3(0x1e2)]['apps']===_0x40c7a3(0x1f6)?_0x22fa7e[_0x40c7a3(0x1e2)]['apps']:{};if(Object[_0x40c7a3(0x1e4)][_0x40c7a3(0x1ec)][_0x40c7a3(0x1ef)](_0x454b9d,_0x5dfa40))return _0x40c7a3(0x1e1);if(Object[_0x40c7a3(0x1e4)]['hasOwnProperty'][_0x40c7a3(0x1ef)](_0x410c58,_0x5dfa40))return _0x40c7a3(0x1e7);return'project';}function a23_0x4604(_0x275103,_0x2e85a3){_0x275103=_0x275103-0x1dc;const _0x2862c3=a23_0x2862();let _0x46045a=_0x2862c3[_0x275103];return _0x46045a;}export function appDefinedIn(_0xd43d8,_0x23570d,_0x49168b,_0x30f292){const _0x330bd=a23_0x4604;if(_0x30f292)return Object[_0x330bd(0x1e4)][_0x330bd(0x1ec)]['call'](_0x49168b,_0xd43d8)?_0x330bd(0x1e1):_0x330bd(0x1e7);const _0x5c2637=Object[_0x330bd(0x1e4)][_0x330bd(0x1ec)][_0x330bd(0x1ef)](_0x23570d,_0xd43d8),_0x34c83d=Object[_0x330bd(0x1e4)]['hasOwnProperty']['call'](_0x49168b,_0xd43d8);if(_0x5c2637&&_0x34c83d)return _0x330bd(0x1dc);if(_0x34c83d)return _0x330bd(0x1e1);return'global';}export function resolveDefaultAppSource(_0x11b269){const _0xb577cc=a23_0x4604,_0x50f411=_0x11b269['projectConfig'][_0xb577cc(0x1dd)]&&typeof _0x11b269[_0xb577cc(0x1f3)][_0xb577cc(0x1dd)]===_0xb577cc(0x1f6)?_0x11b269[_0xb577cc(0x1f3)][_0xb577cc(0x1dd)]:{};if(_0xb577cc(0x1ee)in _0x11b269[_0xb577cc(0x1f3)])return'project';if(Object['keys'](_0x50f411)['length']>0x0)return _0xb577cc(0x1e1);if(_0x11b269['projectConfig'][_0xb577cc(0x1f9)]===![])return null;if(_0x11b269[_0xb577cc(0x1e2)][_0xb577cc(0x1ee)])return _0xb577cc(0x1e7);return null;}export function getConfigPath(_0x187f90={}){const _0x2032bf=a23_0x4604,_0x38963c=_0x187f90[_0x2032bf(0x1e7)]?_0x2032bf(0x1e7):_0x2032bf(0x1e1);return resolveWriteConfigPath(_0x38963c);}function a23_0x2862(){const _0x31c3c5=['1814498TjJVLv','prototype','302290kxkxDr','8ffAAwL','global','5BvUThR','currentApp','keys','named','hasOwnProperty','567080SCoVXF','defaultApp','call','appCode','\x20(global)','trim','projectConfig','isCurrent','5658930oiYEKn','object','1063098iWoccX','appcode','inherit','name','11ALiSSW','both','apps','3radPjZ','2867463SObuBV','684252KNtMvi','project','globalConfig'];a23_0x2862=function(){return _0x31c3c5;};return a23_0x2862();}export function readConfig(_0x44d9c6={}){return readConfigFile(getConfigPath(_0x44d9c6));}export function writeConfig(_0xbc974f,_0x50908c={}){writeConfigFile(getConfigPath(_0x50908c),_0xbc974f);}export function scopeLabel(_0x214162){const _0x1ec31d=a23_0x4604;return _0x214162['global']?_0x1ec31d(0x1f1):'';}
1
+ function a23_0x4b38(_0x205755,_0x41583d){_0x205755=_0x205755-0xc9;const _0x3dce48=a23_0x3dce();let _0x4b3884=_0x3dce48[_0x205755];return _0x4b3884;}(function(_0x11ecb2,_0xae3b0c){const _0x3024a1=a23_0x4b38,_0x304e88=_0x11ecb2();while(!![]){try{const _0x262d9f=parseInt(_0x3024a1(0xd4))/0x1+parseInt(_0x3024a1(0xdc))/0x2*(parseInt(_0x3024a1(0xd9))/0x3)+parseInt(_0x3024a1(0xe7))/0x4+-parseInt(_0x3024a1(0xe2))/0x5*(-parseInt(_0x3024a1(0xdd))/0x6)+-parseInt(_0x3024a1(0xe3))/0x7+-parseInt(_0x3024a1(0xd2))/0x8*(-parseInt(_0x3024a1(0xd1))/0x9)+-parseInt(_0x3024a1(0xe1))/0xa;if(_0x262d9f===_0xae3b0c)break;else _0x304e88['push'](_0x304e88['shift']());}catch(_0x2d2dec){_0x304e88['push'](_0x304e88['shift']());}}}(a23_0x3dce,0x1ae39));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x3c2770,_0x10cd14){const _0x30c95a=a23_0x4b38;if(!_0x10cd14)return;const _0x227b3e=_0x10cd14['apps']&&typeof _0x10cd14[_0x30c95a(0xda)]===_0x30c95a(0xcd)?_0x10cd14[_0x30c95a(0xda)]:{},_0x420605=Object[_0x30c95a(0xd8)](_0x227b3e)[_0x30c95a(0xcb)]>0x0;for(const _0x9b5ef5 of _0x3c2770){_0x9b5ef5['isCurrent']=![];}const _0x4747d2=_0x10cd14[_0x30c95a(0xc9)]!=null?String(_0x10cd14[_0x30c95a(0xc9)])[_0x30c95a(0xde)]():'';if(_0x420605){const _0x9a1205=_0x10cd14[_0x30c95a(0xcc)]??_0x10cd14[_0x30c95a(0xdb)];if(_0x9a1205)for(const _0x514b57 of _0x3c2770){_0x514b57[_0x30c95a(0xd0)]===!![]&&_0x514b57[_0x30c95a(0xe5)]===_0x9a1205&&(_0x514b57[_0x30c95a(0xe0)]=!![]);}for(const _0x26e449 of _0x3c2770){if(_0x26e449[_0x30c95a(0xd0)]!==![])continue;if(_0x10cd14['defaultApp'])continue;_0x4747d2&&String(_0x26e449['appcode']??'')[_0x30c95a(0xde)]()===_0x4747d2&&(_0x26e449[_0x30c95a(0xe0)]=!![]);}return;}if(!_0x4747d2)return;for(const _0x605886 of _0x3c2770){String(_0x605886[_0x30c95a(0xd6)]??'')[_0x30c95a(0xde)]()===_0x4747d2&&(_0x605886['isCurrent']=!![]);}}export function resolveAppScopeForWrite(_0x2e22fd,_0x4f2710,_0x20a9ea){const _0x36f3e7=a23_0x4b38;if(_0x4f2710)return _0x36f3e7(0xe4);const _0x11f13a=_0x20a9ea['projectConfig'][_0x36f3e7(0xda)]&&typeof _0x20a9ea[_0x36f3e7(0xd5)][_0x36f3e7(0xda)]===_0x36f3e7(0xcd)?_0x20a9ea[_0x36f3e7(0xd5)][_0x36f3e7(0xda)]:{},_0x53e0f7=_0x20a9ea['globalConfig'][_0x36f3e7(0xda)]&&typeof _0x20a9ea[_0x36f3e7(0xcf)]['apps']===_0x36f3e7(0xcd)?_0x20a9ea[_0x36f3e7(0xcf)][_0x36f3e7(0xda)]:{};if(Object[_0x36f3e7(0xca)][_0x36f3e7(0xd3)][_0x36f3e7(0xdf)](_0x11f13a,_0x2e22fd))return _0x36f3e7(0xe8);if(Object['prototype'][_0x36f3e7(0xd3)][_0x36f3e7(0xdf)](_0x53e0f7,_0x2e22fd))return _0x36f3e7(0xe4);return _0x36f3e7(0xe8);}function a23_0x3dce(){const _0x5e8420=['inherit','globalConfig','named','593523fLLvRH','16dqlAXu','hasOwnProperty','39463fvRIyy','projectConfig','appcode','\x20(global)','keys','8691mwfQrL','apps','defaultApp','26xJtpIs','27906auiRtr','trim','call','isCurrent','2964520GVXVjP','205bglLVX','969437StrDWC','global','name','both','581484EQsbDy','project','appCode','prototype','length','currentApp','object'];a23_0x3dce=function(){return _0x5e8420;};return a23_0x3dce();}export function appDefinedIn(_0x65581f,_0x42f39f,_0x3e8a5b,_0x4a7013){const _0x120582=a23_0x4b38;if(_0x4a7013)return Object['prototype'][_0x120582(0xd3)][_0x120582(0xdf)](_0x3e8a5b,_0x65581f)?_0x120582(0xe8):_0x120582(0xe4);const _0x6c7ca0=Object[_0x120582(0xca)][_0x120582(0xd3)][_0x120582(0xdf)](_0x42f39f,_0x65581f),_0x44644d=Object[_0x120582(0xca)][_0x120582(0xd3)][_0x120582(0xdf)](_0x3e8a5b,_0x65581f);if(_0x6c7ca0&&_0x44644d)return _0x120582(0xe6);if(_0x44644d)return _0x120582(0xe8);return _0x120582(0xe4);}export function resolveDefaultAppSource(_0x486f07){const _0x66b07f=a23_0x4b38,_0x9bd2ac=_0x486f07[_0x66b07f(0xd5)][_0x66b07f(0xda)]&&typeof _0x486f07['projectConfig'][_0x66b07f(0xda)]===_0x66b07f(0xcd)?_0x486f07[_0x66b07f(0xd5)][_0x66b07f(0xda)]:{};if('defaultApp'in _0x486f07[_0x66b07f(0xd5)])return'project';if(Object['keys'](_0x9bd2ac)[_0x66b07f(0xcb)]>0x0)return _0x66b07f(0xe8);if(_0x486f07['projectConfig'][_0x66b07f(0xce)]===![])return null;if(_0x486f07['globalConfig'][_0x66b07f(0xdb)])return'global';return null;}export function getConfigPath(_0x5afb6a={}){const _0x4e3804=a23_0x4b38,_0x25715f=_0x5afb6a['global']?_0x4e3804(0xe4):'project';return resolveWriteConfigPath(_0x25715f);}export function readConfig(_0x251270={}){return readConfigFile(getConfigPath(_0x251270));}export function writeConfig(_0x2c2844,_0x129b82={}){writeConfigFile(getConfigPath(_0x129b82),_0x2c2844);}export function scopeLabel(_0x374b7d){const _0x2be52d=a23_0x4b38;return _0x374b7d['global']?_0x2be52d(0xd7):'';}
@@ -1 +1 @@
1
- const a24_0x3b7e48=a24_0x2812;(function(_0x3b622b,_0x1f641e){const _0x500c6f=a24_0x2812,_0x4e20fc=_0x3b622b();while(!![]){try{const _0x5c038c=-parseInt(_0x500c6f(0x1bf))/0x1*(parseInt(_0x500c6f(0x1d1))/0x2)+parseInt(_0x500c6f(0x1d3))/0x3+parseInt(_0x500c6f(0x1d7))/0x4+parseInt(_0x500c6f(0x1ce))/0x5*(-parseInt(_0x500c6f(0x1c1))/0x6)+parseInt(_0x500c6f(0x1c7))/0x7+parseInt(_0x500c6f(0x1cc))/0x8*(-parseInt(_0x500c6f(0x1d0))/0x9)+parseInt(_0x500c6f(0x1cf))/0xa;if(_0x5c038c===_0x1f641e)break;else _0x4e20fc['push'](_0x4e20fc['shift']());}catch(_0x52910e){_0x4e20fc['push'](_0x4e20fc['shift']());}}}(a24_0x5175,0x42b6b));function a24_0x2812(_0x5c9126,_0x396a4e){_0x5c9126=_0x5c9126-0x1bf;const _0x51758e=a24_0x5175();let _0x281203=_0x51758e[_0x5c9126];return _0x281203;}import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0x5175(){const _0xb776e2=['number','POST','Delete\x20one\x20runtime\x20app-config\x20key','apiError','appCode','2631986XfmhRt','/smartapi/app-config/delete','high-risk-write',',\x20appCode=','app-config','8ccdIOQ','isFinite','32445admnuM','5031110whTTrY','3985749YokEIf','54CieVxo','appCode:\x20','980814xROoJx','App\x20config\x20server\x20id\x20missing\x20for\x20key=','App\x20config\x20key\x20not\x20found:\x20','delete','269844AIrGwx','4061qUREsA','Deleted\x20app\x20config\x20','414RLZnoH'];a24_0x5175=function(){return _0xb776e2;};return a24_0x5175();}import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x3b7e48(0x1c8);export const appConfigDelete={'service':a24_0x3b7e48(0x1cb),'command':a24_0x3b7e48(0x1d6),'description':a24_0x3b7e48(0x1c4),'risk':a24_0x3b7e48(0x1c9),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49712e){readKeyArg(_0x49712e);},async 'dryRun'(_0x1c2088){const _0x9cf95=a24_0x3b7e48,_0x24cc23=readKeyArg(_0x1c2088),_0x3c38a0=await mustGetByKey(_0x1c2088[_0x9cf95(0x1c6)],_0x24cc23);return asAppConfigDryRunResult(buildMutationData({'operation':_0x9cf95(0x1d6),'appCode':_0x1c2088['appCode'],'key':_0x24cc23,'before':projectAppConfig(_0x3c38a0),'after':null,'dryRun':!![]}),{'method':_0x9cf95(0x1c3),'url':DELETE_PATH});},async 'execute'(_0x512e67){const _0x1cfdf5=a24_0x3b7e48,_0x58097f=readKeyArg(_0x512e67),_0x60698b=await mustGetByKey(_0x512e67['appCode'],_0x58097f);return await withAppConfigApiBoundary(_0x1cfdf5(0x1d6),{'appCode':_0x512e67[_0x1cfdf5(0x1c6)],'key':_0x58097f},()=>deleteAppConfig({'appCode':_0x512e67['appCode'],'id':requireAppConfigId(_0x60698b,_0x58097f,_0x512e67['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0x1cfdf5(0x1d6),'appCode':_0x512e67['appCode'],'key':_0x58097f,'before':projectAppConfig(_0x60698b),'after':null,'dryRun':![]}),'message':_0x1cfdf5(0x1c0)+_0x58097f};}};async function mustGetByKey(_0x4ebd11,_0x294f70){const _0x25e8d9=a24_0x3b7e48,_0x285f02=await withAppConfigApiBoundary('get',{'appCode':_0x4ebd11,'key':_0x294f70},()=>getAppConfigByKey(_0x4ebd11,_0x294f70));if(!_0x285f02)throw CliErrors['validation'](_0x25e8d9(0x1d5)+_0x294f70,_0x25e8d9(0x1d2)+_0x4ebd11);return _0x285f02;}function requireAppConfigId(_0x4247df,_0x227568,_0x26a407){const _0x63e886=a24_0x3b7e48;if(typeof _0x4247df['id']===_0x63e886(0x1c2)&&Number[_0x63e886(0x1cd)](_0x4247df['id'])&&_0x4247df['id']>0x0)return _0x4247df['id'];throw CliErrors[_0x63e886(0x1c5)](_0x63e886(0x1d4)+_0x227568+_0x63e886(0x1ca)+_0x26a407);}
1
+ const a24_0x1acee2=a24_0xd0e0;function a24_0x48e6(){const _0xfaabd5=['appCode','appCode:\x20','5032gXxTPX','84879fZkyTl','delete','high-risk-write','355891bRqcPB','POST','Delete\x20one\x20runtime\x20app-config\x20key','get','Deleted\x20app\x20config\x20',',\x20appCode=','80BDeNdb','isFinite','validation','39378dOjaGD','app-config','/smartapi/app-config/delete','14CZDClb','140grwsPe','18315xJPLzK','number','2507760xSBjbX','4081539tJNIyp','4685394cNxJlx'];a24_0x48e6=function(){return _0xfaabd5;};return a24_0x48e6();}(function(_0x4aaa19,_0x59371e){const _0x5893af=a24_0xd0e0,_0x5f5016=_0x4aaa19();while(!![]){try{const _0x1f015=parseInt(_0x5893af(0x110))/0x1+parseInt(_0x5893af(0x11c))/0x2*(parseInt(_0x5893af(0x10d))/0x3)+-parseInt(_0x5893af(0x120))/0x4+-parseInt(_0x5893af(0x11d))/0x5*(parseInt(_0x5893af(0x119))/0x6)+-parseInt(_0x5893af(0x122))/0x7+-parseInt(_0x5893af(0x125))/0x8*(parseInt(_0x5893af(0x11e))/0x9)+parseInt(_0x5893af(0x116))/0xa*(parseInt(_0x5893af(0x121))/0xb);if(_0x1f015===_0x59371e)break;else _0x5f5016['push'](_0x5f5016['shift']());}catch(_0x3f4e89){_0x5f5016['push'](_0x5f5016['shift']());}}}(a24_0x48e6,0xba1a1));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x1acee2(0x11b);function a24_0xd0e0(_0x2f7d1e,_0x36ebba){_0x2f7d1e=_0x2f7d1e-0x10d;const _0x48e630=a24_0x48e6();let _0xd0e097=_0x48e630[_0x2f7d1e];return _0xd0e097;}export const appConfigDelete={'service':a24_0x1acee2(0x11a),'command':a24_0x1acee2(0x10e),'description':a24_0x1acee2(0x112),'risk':a24_0x1acee2(0x10f),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x9ec0b1){readKeyArg(_0x9ec0b1);},async 'dryRun'(_0x1fc041){const _0x3fa354=a24_0x1acee2,_0x5942b9=readKeyArg(_0x1fc041),_0x7224d4=await mustGetByKey(_0x1fc041['appCode'],_0x5942b9);return asAppConfigDryRunResult(buildMutationData({'operation':_0x3fa354(0x10e),'appCode':_0x1fc041['appCode'],'key':_0x5942b9,'before':projectAppConfig(_0x7224d4),'after':null,'dryRun':!![]}),{'method':_0x3fa354(0x111),'url':DELETE_PATH});},async 'execute'(_0xd706e5){const _0x39f99d=a24_0x1acee2,_0x141fb8=readKeyArg(_0xd706e5),_0x3b0d90=await mustGetByKey(_0xd706e5[_0x39f99d(0x123)],_0x141fb8);return await withAppConfigApiBoundary(_0x39f99d(0x10e),{'appCode':_0xd706e5[_0x39f99d(0x123)],'key':_0x141fb8},()=>deleteAppConfig({'appCode':_0xd706e5[_0x39f99d(0x123)],'id':requireAppConfigId(_0x3b0d90,_0x141fb8,_0xd706e5[_0x39f99d(0x123)])})),{'ok':!![],'data':buildMutationData({'operation':'delete','appCode':_0xd706e5[_0x39f99d(0x123)],'key':_0x141fb8,'before':projectAppConfig(_0x3b0d90),'after':null,'dryRun':![]}),'message':_0x39f99d(0x114)+_0x141fb8};}};async function mustGetByKey(_0x1d6be2,_0x5dcfaa){const _0x26c412=a24_0x1acee2,_0x2c5d19=await withAppConfigApiBoundary(_0x26c412(0x113),{'appCode':_0x1d6be2,'key':_0x5dcfaa},()=>getAppConfigByKey(_0x1d6be2,_0x5dcfaa));if(!_0x2c5d19)throw CliErrors[_0x26c412(0x118)]('App\x20config\x20key\x20not\x20found:\x20'+_0x5dcfaa,_0x26c412(0x124)+_0x1d6be2);return _0x2c5d19;}function requireAppConfigId(_0x269ec8,_0x2167df,_0xf792a3){const _0x2a22c4=a24_0x1acee2;if(typeof _0x269ec8['id']===_0x2a22c4(0x11f)&&Number[_0x2a22c4(0x117)](_0x269ec8['id'])&&_0x269ec8['id']>0x0)return _0x269ec8['id'];throw CliErrors['apiError']('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x2167df+_0x2a22c4(0x115)+_0xf792a3);}
@@ -1 +1 @@
1
- const a25_0x4fd531=a25_0x5e80;(function(_0x548ea4,_0x43a611){const _0x5ae670=a25_0x5e80,_0x5bb4a7=_0x548ea4();while(!![]){try{const _0x378c47=parseInt(_0x5ae670(0x1f3))/0x1*(parseInt(_0x5ae670(0x1ef))/0x2)+parseInt(_0x5ae670(0x1eb))/0x3+parseInt(_0x5ae670(0x1f6))/0x4*(-parseInt(_0x5ae670(0x1ee))/0x5)+-parseInt(_0x5ae670(0x1fc))/0x6*(-parseInt(_0x5ae670(0x1fd))/0x7)+-parseInt(_0x5ae670(0x1ed))/0x8*(parseInt(_0x5ae670(0x1f7))/0x9)+parseInt(_0x5ae670(0x1f9))/0xa+-parseInt(_0x5ae670(0x1f1))/0xb;if(_0x378c47===_0x43a611)break;else _0x5bb4a7['push'](_0x5bb4a7['shift']());}catch(_0x277075){_0x5bb4a7['push'](_0x5bb4a7['shift']());}}}(a25_0x3262,0x55aa2));function a25_0x3262(){const _0x275b82=['App\x20config\x20key\x20not\x20found:\x20','4QdEMar','444762IDptXY','validation','6441000dRtykO','bool','app-config','162bojVCa','61299oHtkaR','Loaded\x20app\x20config\x20','\x20with\x20value\x20revealed','2099676QgcPvf','read','88WAAXHO','77845xBFxtM','689646LMcuMa','appCode','11167255dKiQIR','reveal','1mVfene','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used'];a25_0x3262=function(){return _0x275b82;};return a25_0x3262();}function a25_0x5e80(_0xe7d4a9,_0x3b741c){_0xe7d4a9=_0xe7d4a9-0x1ea;const _0x326271=a25_0x3262();let _0x5e80b7=_0x326271[_0xe7d4a9];return _0x5e80b7;}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x4fd531(0x1fb),'command':'get','description':a25_0x4fd531(0x1f4),'risk':a25_0x4fd531(0x1ec),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x4144cc){readKeyArg(_0x4144cc);},async 'execute'(_0x21e43c){const _0x222ff7=a25_0x4fd531,_0x5981df=readKeyArg(_0x21e43c),_0x279c0e=await withAppConfigApiBoundary('get',{'appCode':_0x21e43c['appCode'],'key':_0x5981df},()=>getAppConfigByKey(_0x21e43c[_0x222ff7(0x1f0)],_0x5981df));if(!_0x279c0e)throw CliErrors[_0x222ff7(0x1f8)](_0x222ff7(0x1f5)+_0x5981df,'appCode:\x20'+_0x21e43c[_0x222ff7(0x1f0)]);const _0x3582b3=projectAppConfig(_0x279c0e,{'reveal':_0x21e43c[_0x222ff7(0x1fa)](_0x222ff7(0x1f2))});return{'ok':!![],'data':{'config':_0x3582b3},'message':_0x21e43c[_0x222ff7(0x1fa)](_0x222ff7(0x1f2))?_0x222ff7(0x1fe)+_0x5981df+_0x222ff7(0x1ea):_0x222ff7(0x1fe)+_0x5981df+'\x20with\x20value\x20redacted'};}};
1
+ const a25_0x13b167=a25_0x545c;function a25_0x5b39(){const _0x1e637e=['264zHqFgq','bool','3549lvGSmd','20298mVqmUd','App\x20config\x20key\x20not\x20found:\x20','14862xTOhKK','read','8yggnlm','12696UDwjnh','get','validation','app-config','2371095qsXSjP','\x20with\x20value\x20revealed','Loaded\x20app\x20config\x20','271742VkLwop','3657178EmgAoC','1SQjsQV','470fCrmyM','appCode','\x20with\x20value\x20redacted','reveal','98351qdpnaa','appCode:\x20','165VElmPD'];a25_0x5b39=function(){return _0x1e637e;};return a25_0x5b39();}(function(_0x4ce8be,_0x40ff58){const _0x190f1b=a25_0x545c,_0x438e45=_0x4ce8be();while(!![]){try{const _0x1fce0a=-parseInt(_0x190f1b(0x82))/0x1*(parseInt(_0x190f1b(0x80))/0x2)+parseInt(_0x190f1b(0x8d))/0x3*(parseInt(_0x190f1b(0x8a))/0x4)+parseInt(_0x190f1b(0x89))/0x5*(-parseInt(_0x190f1b(0x8f))/0x6)+parseInt(_0x190f1b(0x81))/0x7+-parseInt(_0x190f1b(0x91))/0x8*(-parseInt(_0x190f1b(0x7d))/0x9)+parseInt(_0x190f1b(0x83))/0xa*(-parseInt(_0x190f1b(0x87))/0xb)+-parseInt(_0x190f1b(0x79))/0xc*(parseInt(_0x190f1b(0x8c))/0xd);if(_0x1fce0a===_0x40ff58)break;else _0x438e45['push'](_0x438e45['shift']());}catch(_0x417cf7){_0x438e45['push'](_0x438e45['shift']());}}}(a25_0x5b39,0x4aa80));import{getAppConfigByKey}from'../../core/api-client.js';function a25_0x545c(_0xcad2cc,_0x5d5499){_0xcad2cc=_0xcad2cc-0x79;const _0x5b3994=a25_0x5b39();let _0x545c3b=_0x5b3994[_0xcad2cc];return _0x545c3b;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x13b167(0x7c),'command':a25_0x13b167(0x7a),'description':'Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','risk':a25_0x13b167(0x90),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0xe988b5){readKeyArg(_0xe988b5);},async 'execute'(_0x54ff57){const _0x1a1fac=a25_0x13b167,_0x4acf4b=readKeyArg(_0x54ff57),_0x478cd1=await withAppConfigApiBoundary(_0x1a1fac(0x7a),{'appCode':_0x54ff57['appCode'],'key':_0x4acf4b},()=>getAppConfigByKey(_0x54ff57[_0x1a1fac(0x84)],_0x4acf4b));if(!_0x478cd1)throw CliErrors[_0x1a1fac(0x7b)](_0x1a1fac(0x8e)+_0x4acf4b,_0x1a1fac(0x88)+_0x54ff57[_0x1a1fac(0x84)]);const _0x3ff45c=projectAppConfig(_0x478cd1,{'reveal':_0x54ff57[_0x1a1fac(0x8b)]('reveal')});return{'ok':!![],'data':{'config':_0x3ff45c},'message':_0x54ff57[_0x1a1fac(0x8b)](_0x1a1fac(0x86))?_0x1a1fac(0x7f)+_0x4acf4b+_0x1a1fac(0x7e):_0x1a1fac(0x7f)+_0x4acf4b+_0x1a1fac(0x85)};}};
@@ -1 +1 @@
1
- (function(_0x3f2f2e,_0x5718c0){const _0x4918c7=a26_0x4121,_0x4078ed=_0x3f2f2e();while(!![]){try{const _0x196692=parseInt(_0x4918c7(0xa1))/0x1+-parseInt(_0x4918c7(0xa6))/0x2*(-parseInt(_0x4918c7(0xab))/0x3)+parseInt(_0x4918c7(0xa8))/0x4*(-parseInt(_0x4918c7(0xa4))/0x5)+-parseInt(_0x4918c7(0xa2))/0x6*(parseInt(_0x4918c7(0xa5))/0x7)+-parseInt(_0x4918c7(0xa3))/0x8*(-parseInt(_0x4918c7(0xa0))/0x9)+parseInt(_0x4918c7(0xa9))/0xa*(-parseInt(_0x4918c7(0xa7))/0xb)+parseInt(_0x4918c7(0xac))/0xc*(parseInt(_0x4918c7(0xaa))/0xd);if(_0x196692===_0x5718c0)break;else _0x4078ed['push'](_0x4078ed['shift']());}catch(_0x330cfd){_0x4078ed['push'](_0x4078ed['shift']());}}}(a26_0x563e,0xedd90));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';function a26_0x563e(){const _0x2f0c50=['80395jtGZQw','2YsnDuG','11QCmnKf','12XJdqUJ','5514690idYoVc','792805Dlmseo','1435683cJPKJM','300LXOYrP','27603ZnArAL','625040sArkit','834rklDvT','4904HfYWwX','2310315irhpuh'];a26_0x563e=function(){return _0x2f0c50;};return a26_0x563e();}import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';function a26_0x4121(_0x575efe,_0x32f7cc){_0x575efe=_0x575efe-0xa0;const _0x563e15=a26_0x563e();let _0x412144=_0x563e15[_0x575efe];return _0x412144;}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
1
+ function a26_0x11de(_0x4c9191,_0x31686f){_0x4c9191=_0x4c9191-0x126;const _0x3c9a8c=a26_0x3c9a();let _0x11de91=_0x3c9a8c[_0x4c9191];return _0x11de91;}(function(_0x3fa45e,_0x1a4be6){const _0x29764a=a26_0x11de,_0x56d7f8=_0x3fa45e();while(!![]){try{const _0x3ba906=-parseInt(_0x29764a(0x12c))/0x1*(parseInt(_0x29764a(0x12a))/0x2)+-parseInt(_0x29764a(0x12f))/0x3+-parseInt(_0x29764a(0x129))/0x4*(parseInt(_0x29764a(0x128))/0x5)+-parseInt(_0x29764a(0x131))/0x6*(parseInt(_0x29764a(0x127))/0x7)+-parseInt(_0x29764a(0x12b))/0x8*(-parseInt(_0x29764a(0x126))/0x9)+-parseInt(_0x29764a(0x12d))/0xa*(-parseInt(_0x29764a(0x130))/0xb)+parseInt(_0x29764a(0x12e))/0xc;if(_0x3ba906===_0x1a4be6)break;else _0x56d7f8['push'](_0x56d7f8['shift']());}catch(_0x3aaecc){_0x56d7f8['push'](_0x56d7f8['shift']());}}}(a26_0x3c9a,0x96221));function a26_0x3c9a(){const _0xc33c2b=['95299lofBuo','11119050VlSRis','24471864kqZLvs','1498083VOIZqs','11nWKXRN','24kQgKYd','4812039aRZphN','714161LyxHIm','6052550WTGIdK','4kwrwrk','20IsaiAK','8xvVLaa'];a26_0x3c9a=function(){return _0xc33c2b;};return a26_0x3c9a();}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 +1 @@
1
- const a27_0x45cde5=a27_0x5091;function a27_0x5091(_0x3ae05b,_0x44a762){_0x3ae05b=_0x3ae05b-0x1b2;const _0x37f108=a27_0x37f1();let _0x5091ee=_0x37f108[_0x3ae05b];return _0x5091ee;}(function(_0x33aa96,_0x10e112){const _0x2a6ee7=a27_0x5091,_0x3c77cd=_0x33aa96();while(!![]){try{const _0x4cbf56=parseInt(_0x2a6ee7(0x1b4))/0x1*(parseInt(_0x2a6ee7(0x1bc))/0x2)+parseInt(_0x2a6ee7(0x1bb))/0x3+parseInt(_0x2a6ee7(0x1c0))/0x4*(parseInt(_0x2a6ee7(0x1ba))/0x5)+-parseInt(_0x2a6ee7(0x1c7))/0x6*(-parseInt(_0x2a6ee7(0x1c9))/0x7)+-parseInt(_0x2a6ee7(0x1b3))/0x8*(-parseInt(_0x2a6ee7(0x1c8))/0x9)+parseInt(_0x2a6ee7(0x1ca))/0xa+parseInt(_0x2a6ee7(0x1b8))/0xb*(-parseInt(_0x2a6ee7(0x1c3))/0xc);if(_0x4cbf56===_0x10e112)break;else _0x3c77cd['push'](_0x3c77cd['shift']());}catch(_0x4cad91){_0x3c77cd['push'](_0x3c77cd['shift']());}}}(a27_0x37f1,0xc291c));function a27_0x37f1(){const _0x16e084=['string','str','Filter\x20by\x20exact\x20config\x20key','22llEasP','list','310rVwPPD','4773336jAUthU','2UcUhVB','key','read','appCode','76404EqxXvI','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','Found\x20','30857016OujYzr','app-config','map','length','6dKjvPL','5409qdeJmn','9745295IaeEdg','5972870onCoXC','\x20app\x20config(s)','856PxCJxT','1110639gHVmMY'];a27_0x37f1=function(){return _0x16e084;};return a27_0x37f1();}import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x45cde5(0x1c4),'command':a27_0x45cde5(0x1b9),'description':a27_0x45cde5(0x1c1),'risk':a27_0x45cde5(0x1be),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x45cde5(0x1bd),'type':a27_0x45cde5(0x1b5),'description':a27_0x45cde5(0x1b7)},TAGS_FLAG],async 'validate'(_0x3f8cf2){const _0x40a241=a27_0x45cde5,_0x3d0747=_0x3f8cf2[_0x40a241(0x1b6)]('key')['trim']();if(_0x3d0747)validateKey(_0x3d0747);readOptionalTags(_0x3f8cf2);},async 'execute'(_0x5cf8bc){const _0x1106b3=a27_0x45cde5,_0x5b36e0=_0x5cf8bc[_0x1106b3(0x1b6)](_0x1106b3(0x1bd))['trim']()||undefined,_0x174c34=readOptionalTags(_0x5cf8bc),_0x3f6c4d=await withAppConfigApiBoundary(_0x1106b3(0x1b9),{'appCode':_0x5cf8bc[_0x1106b3(0x1bf)]},()=>listAppConfigs(_0x5cf8bc[_0x1106b3(0x1bf)],{'key':_0x5b36e0,'tags':_0x174c34})),_0xb87e6d=_0x3f6c4d[_0x1106b3(0x1c5)](_0x36434e=>projectAppConfig(_0x36434e));return{'ok':!![],'data':{'appCode':_0x5cf8bc[_0x1106b3(0x1bf)],'count':_0xb87e6d[_0x1106b3(0x1c6)],'configs':_0xb87e6d},'message':_0x1106b3(0x1c2)+_0xb87e6d[_0x1106b3(0x1c6)]+_0x1106b3(0x1b2)};}};
1
+ function a27_0x530f(_0x22eef1,_0x5cdc80){_0x22eef1=_0x22eef1-0x10d;const _0x29d360=a27_0x29d3();let _0x530fbf=_0x29d360[_0x22eef1];return _0x530fbf;}const a27_0x4886d4=a27_0x530f;(function(_0x3b45a0,_0x37e7e2){const _0x189971=a27_0x530f,_0x478a5f=_0x3b45a0();while(!![]){try{const _0x595a94=parseInt(_0x189971(0x111))/0x1+-parseInt(_0x189971(0x11b))/0x2*(parseInt(_0x189971(0x11e))/0x3)+-parseInt(_0x189971(0x113))/0x4+-parseInt(_0x189971(0x10e))/0x5*(-parseInt(_0x189971(0x117))/0x6)+parseInt(_0x189971(0x124))/0x7*(-parseInt(_0x189971(0x11f))/0x8)+parseInt(_0x189971(0x114))/0x9+parseInt(_0x189971(0x119))/0xa*(-parseInt(_0x189971(0x122))/0xb);if(_0x595a94===_0x37e7e2)break;else _0x478a5f['push'](_0x478a5f['shift']());}catch(_0x578d4b){_0x478a5f['push'](_0x478a5f['shift']());}}}(a27_0x29d3,0xd1772));import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a27_0x29d3(){const _0x47f0e0=['List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','string','3EMqDOc','3040DVstQz','app-config','read','2891009JapXzk','Filter\x20by\x20exact\x20config\x20key','2394DePHbR','appCode','195rddVLn','length','\x20app\x20config(s)','1646449DCKrIa','key','3693808iIWgWO','7712775qmHWDe','str','map','225612MHzmpz','trim','30ndgHXy','list','2540126IqXtHO'];a27_0x29d3=function(){return _0x47f0e0;};return a27_0x29d3();}export const appConfigList={'service':a27_0x4886d4(0x120),'command':a27_0x4886d4(0x11a),'description':a27_0x4886d4(0x11c),'risk':a27_0x4886d4(0x121),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x4886d4(0x112),'type':a27_0x4886d4(0x11d),'description':a27_0x4886d4(0x123)},TAGS_FLAG],async 'validate'(_0x482a96){const _0x4e6bab=a27_0x4886d4,_0x1bbbd6=_0x482a96[_0x4e6bab(0x115)](_0x4e6bab(0x112))[_0x4e6bab(0x118)]();if(_0x1bbbd6)validateKey(_0x1bbbd6);readOptionalTags(_0x482a96);},async 'execute'(_0x4f47f5){const _0x51e54a=a27_0x4886d4,_0x757d5=_0x4f47f5[_0x51e54a(0x115)]('key')[_0x51e54a(0x118)]()||undefined,_0x1f8b34=readOptionalTags(_0x4f47f5),_0x49996b=await withAppConfigApiBoundary(_0x51e54a(0x11a),{'appCode':_0x4f47f5[_0x51e54a(0x10d)]},()=>listAppConfigs(_0x4f47f5[_0x51e54a(0x10d)],{'key':_0x757d5,'tags':_0x1f8b34})),_0x52596a=_0x49996b[_0x51e54a(0x116)](_0x12ba8f=>projectAppConfig(_0x12ba8f));return{'ok':!![],'data':{'appCode':_0x4f47f5['appCode'],'count':_0x52596a['length'],'configs':_0x52596a},'message':'Found\x20'+_0x52596a[_0x51e54a(0x10f)]+_0x51e54a(0x110)};}};
@@ -1 +1 @@
1
- const a28_0x92f7a9=a28_0x5687;(function(_0x2cad4f,_0x4f7cb5){const _0x503cfd=a28_0x5687,_0xa467c6=_0x2cad4f();while(!![]){try{const _0x3b1310=parseInt(_0x503cfd(0x1d6))/0x1+parseInt(_0x503cfd(0x1c9))/0x2*(-parseInt(_0x503cfd(0x1c3))/0x3)+parseInt(_0x503cfd(0x1cb))/0x4+-parseInt(_0x503cfd(0x1ca))/0x5+parseInt(_0x503cfd(0x1d2))/0x6+-parseInt(_0x503cfd(0x1d5))/0x7+-parseInt(_0x503cfd(0x1c6))/0x8;if(_0x3b1310===_0x4f7cb5)break;else _0xa467c6['push'](_0xa467c6['shift']());}catch(_0x483d07){_0xa467c6['push'](_0xa467c6['shift']());}}}(a28_0x5771,0x7fa6f));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0x92f7a9(0x1d7),UPDATE_PATH='/smartapi/app-config/update';function a28_0x5687(_0x5e1b0c,_0x2f1a66){_0x5e1b0c=_0x5e1b0c-0x1c3;const _0x5771c5=a28_0x5771();let _0x56874b=_0x5771c5[_0x5e1b0c];return _0x56874b;}export const appConfigSet={'service':'app-config','command':'set','description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0x92f7a9(0x1cd),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x92f7a9(0x1ce),'description':a28_0x92f7a9(0x1cf)}],async 'validate'(_0x5b0104){readKeyArg(_0x5b0104),readOptionalTags(_0x5b0104),assertSingleValueSource(_0x5b0104);},async 'dryRun'(_0x342e5b){const _0x10ce36=a28_0x92f7a9,_0x138325=readKeyArg(_0x342e5b),_0x13ba09=readOptionalTags(_0x342e5b),_0x245fa8=assertSingleValueSource(_0x342e5b);await assertValueSourceReadable(_0x245fa8);const _0x157148=await withAppConfigApiBoundary(_0x10ce36(0x1c8),{'appCode':_0x342e5b[_0x10ce36(0x1d0)],'key':_0x138325},()=>getAppConfigByKey(_0x342e5b['appCode'],_0x138325)),_0x474198=_0x157148?_0x10ce36(0x1d3):'create',_0x20e7bf=_0x157148?projectAppConfig(_0x157148):null,_0x3bbf89=plannedAppConfig({'appCode':_0x342e5b[_0x10ce36(0x1d0)],'key':_0x138325,'tags':_0x13ba09??_0x157148?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x474198,'appCode':_0x342e5b[_0x10ce36(0x1d0)],'key':_0x138325,'before':_0x20e7bf,'after':_0x3bbf89,'dryRun':!![]}),{'method':'POST','url':_0x474198===_0x10ce36(0x1d3)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x18c970){const _0x328d85=a28_0x92f7a9,_0x225279=readKeyArg(_0x18c970),_0x53e420=readOptionalTags(_0x18c970),_0x28d4a6=await withAppConfigApiBoundary(_0x328d85(0x1c8),{'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279},()=>getAppConfigByKey(_0x18c970[_0x328d85(0x1d0)],_0x225279)),_0x534c11=_0x28d4a6?projectAppConfig(_0x28d4a6):null,_0x1a4d1c=_0x28d4a6?'update':_0x328d85(0x1c5),{value:_0x16defd,warnings:_0x403d88}=await readAppConfigValue(_0x18c970),_0x2aa3db={'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279,'value':_0x16defd,'tags':_0x53e420??_0x28d4a6?.[_0x328d85(0x1d1)]??undefined};await withAppConfigApiBoundary(_0x1a4d1c,{'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279},async()=>{const _0xb41605=_0x328d85;_0x28d4a6?await updateAppConfig({..._0x2aa3db,'id':requireAppConfigId(_0x28d4a6,_0x225279,_0x18c970[_0xb41605(0x1d0)])}):await createAppConfig(_0x2aa3db);});const _0x1604c4=await withAppConfigApiBoundary(_0x328d85(0x1c8),{'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279},()=>getAppConfigByKey(_0x18c970[_0x328d85(0x1d0)],_0x225279)),_0x2bbbcd=_0x1604c4?projectAppConfig(_0x1604c4):plannedAppConfig({'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279,'tags':_0x2aa3db[_0x328d85(0x1d1)],'hasValue':_0x16defd!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x1a4d1c,'appCode':_0x18c970['appCode'],'key':_0x225279,'before':_0x534c11,'after':_0x2bbbcd,'dryRun':![],'warnings':_0x403d88}),'message':(_0x1a4d1c===_0x328d85(0x1d3)?_0x328d85(0x1c4):'Created')+'\x20app\x20config\x20'+_0x225279};}};function requireAppConfigId(_0x445289,_0x242b24,_0x491c31){const _0x2691f0=a28_0x92f7a9;if(typeof _0x445289['id']===_0x2691f0(0x1cc)&&Number['isFinite'](_0x445289['id'])&&_0x445289['id']>0x0)return _0x445289['id'];throw CliErrors['apiError'](_0x2691f0(0x1d4)+_0x242b24+_0x2691f0(0x1c7)+_0x491c31);}function a28_0x5771(){const _0x1f4ec1=['appCode','tags','3464304AiSGij','update','App\x20config\x20server\x20id\x20missing\x20for\x20key=','3303083pVpVtU','827958tleKOO','/smartapi/app-config/create','3Qzugdd','Updated','create','3731952FzqbLi',',\x20appCode=','get','1208362uLINCg','588405cfGWVy','3110984nZeQps','number','high-risk-write','string','Read\x20config\x20value\x20from\x20file'];a28_0x5771=function(){return _0x1f4ec1;};return a28_0x5771();}
1
+ const a28_0x5e69ee=a28_0x2d63;(function(_0xa9d7f3,_0x4389b7){const _0x167547=a28_0x2d63,_0x18d077=_0xa9d7f3();while(!![]){try{const _0x1edcfe=parseInt(_0x167547(0xdf))/0x1*(-parseInt(_0x167547(0xda))/0x2)+-parseInt(_0x167547(0xd1))/0x3*(-parseInt(_0x167547(0xcc))/0x4)+parseInt(_0x167547(0xe5))/0x5+parseInt(_0x167547(0xd7))/0x6*(-parseInt(_0x167547(0xcb))/0x7)+-parseInt(_0x167547(0xca))/0x8+-parseInt(_0x167547(0xe0))/0x9*(parseInt(_0x167547(0xce))/0xa)+parseInt(_0x167547(0xd6))/0xb;if(_0x1edcfe===_0x4389b7)break;else _0x18d077['push'](_0x18d077['shift']());}catch(_0x30aa3b){_0x18d077['push'](_0x18d077['shift']());}}}(a28_0x4914,0x3c7f1));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';function a28_0x4914(){const _0x500faf=['7843286XFhTuC','18mWqdbe','app-config','apiError','5694VeKywl','Updated','appCode','/smartapi/app-config/update','isFinite','59gwJWLu','9uqYeCH','tags','App\x20config\x20server\x20id\x20missing\x20for\x20key=','set','create','1609910wcdOLY','get','3804912PIUqaj','517699uPOpEs','844676VXnsrk','/smartapi/app-config/create','3440950kRXvUl','\x20app\x20config\x20','POST','6kIVkeD','update','file','string','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key'];a28_0x4914=function(){return _0x500faf;};return a28_0x4914();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0x5e69ee(0xcd),UPDATE_PATH=a28_0x5e69ee(0xdd);export const appConfigSet={'service':a28_0x5e69ee(0xd8),'command':a28_0x5e69ee(0xe3),'description':a28_0x5e69ee(0xd5),'risk':'high-risk-write','args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x5e69ee(0xd3),'type':a28_0x5e69ee(0xd4),'description':'Read\x20config\x20value\x20from\x20file'}],async 'validate'(_0x2a4658){readKeyArg(_0x2a4658),readOptionalTags(_0x2a4658),assertSingleValueSource(_0x2a4658);},async 'dryRun'(_0x28a35e){const _0x1fff17=a28_0x5e69ee,_0x54e225=readKeyArg(_0x28a35e),_0xe7f543=readOptionalTags(_0x28a35e),_0x210681=assertSingleValueSource(_0x28a35e);await assertValueSourceReadable(_0x210681);const _0x38e032=await withAppConfigApiBoundary(_0x1fff17(0xe6),{'appCode':_0x28a35e[_0x1fff17(0xdc)],'key':_0x54e225},()=>getAppConfigByKey(_0x28a35e['appCode'],_0x54e225)),_0x1aa7cb=_0x38e032?_0x1fff17(0xd2):_0x1fff17(0xe4),_0x3533ad=_0x38e032?projectAppConfig(_0x38e032):null,_0x3bbedc=plannedAppConfig({'appCode':_0x28a35e[_0x1fff17(0xdc)],'key':_0x54e225,'tags':_0xe7f543??_0x38e032?.[_0x1fff17(0xe1)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x1aa7cb,'appCode':_0x28a35e[_0x1fff17(0xdc)],'key':_0x54e225,'before':_0x3533ad,'after':_0x3bbedc,'dryRun':!![]}),{'method':_0x1fff17(0xd0),'url':_0x1aa7cb===_0x1fff17(0xd2)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x30c09b){const _0x2b6e8d=a28_0x5e69ee,_0x9f5810=readKeyArg(_0x30c09b),_0x590624=readOptionalTags(_0x30c09b),_0x38d1cb=await withAppConfigApiBoundary(_0x2b6e8d(0xe6),{'appCode':_0x30c09b[_0x2b6e8d(0xdc)],'key':_0x9f5810},()=>getAppConfigByKey(_0x30c09b['appCode'],_0x9f5810)),_0x218e4e=_0x38d1cb?projectAppConfig(_0x38d1cb):null,_0x179cb4=_0x38d1cb?_0x2b6e8d(0xd2):_0x2b6e8d(0xe4),{value:_0x528b09,warnings:_0x4438f8}=await readAppConfigValue(_0x30c09b),_0x38cbcc={'appCode':_0x30c09b['appCode'],'key':_0x9f5810,'value':_0x528b09,'tags':_0x590624??_0x38d1cb?.[_0x2b6e8d(0xe1)]??undefined};await withAppConfigApiBoundary(_0x179cb4,{'appCode':_0x30c09b[_0x2b6e8d(0xdc)],'key':_0x9f5810},async()=>{const _0x3c24ac=_0x2b6e8d;_0x38d1cb?await updateAppConfig({..._0x38cbcc,'id':requireAppConfigId(_0x38d1cb,_0x9f5810,_0x30c09b[_0x3c24ac(0xdc)])}):await createAppConfig(_0x38cbcc);});const _0x27fbcb=await withAppConfigApiBoundary('get',{'appCode':_0x30c09b[_0x2b6e8d(0xdc)],'key':_0x9f5810},()=>getAppConfigByKey(_0x30c09b[_0x2b6e8d(0xdc)],_0x9f5810)),_0x52f5c7=_0x27fbcb?projectAppConfig(_0x27fbcb):plannedAppConfig({'appCode':_0x30c09b[_0x2b6e8d(0xdc)],'key':_0x9f5810,'tags':_0x38cbcc[_0x2b6e8d(0xe1)],'hasValue':_0x528b09!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x179cb4,'appCode':_0x30c09b['appCode'],'key':_0x9f5810,'before':_0x218e4e,'after':_0x52f5c7,'dryRun':![],'warnings':_0x4438f8}),'message':(_0x179cb4===_0x2b6e8d(0xd2)?_0x2b6e8d(0xdb):'Created')+_0x2b6e8d(0xcf)+_0x9f5810};}};function a28_0x2d63(_0x3876e4,_0x74947f){_0x3876e4=_0x3876e4-0xca;const _0x491433=a28_0x4914();let _0x2d633f=_0x491433[_0x3876e4];return _0x2d633f;}function requireAppConfigId(_0x4810b3,_0x3deab2,_0x20b25e){const _0x5de814=a28_0x5e69ee;if(typeof _0x4810b3['id']==='number'&&Number[_0x5de814(0xde)](_0x4810b3['id'])&&_0x4810b3['id']>0x0)return _0x4810b3['id'];throw CliErrors[_0x5de814(0xd9)](_0x5de814(0xe2)+_0x3deab2+',\x20appCode='+_0x20b25e);}
@@ -1 +1 @@
1
- const a29_0x25b1dd=a29_0x5575;(function(_0x370be9,_0x4c5df3){const _0x437ae6=a29_0x5575,_0x2d7486=_0x370be9();while(!![]){try{const _0x536ddb=parseInt(_0x437ae6(0x207))/0x1+-parseInt(_0x437ae6(0x1f9))/0x2*(-parseInt(_0x437ae6(0x1f7))/0x3)+parseInt(_0x437ae6(0x21c))/0x4*(-parseInt(_0x437ae6(0x1f6))/0x5)+-parseInt(_0x437ae6(0x1eb))/0x6+-parseInt(_0x437ae6(0x1fa))/0x7+parseInt(_0x437ae6(0x1ff))/0x8*(-parseInt(_0x437ae6(0x1e4))/0x9)+parseInt(_0x437ae6(0x21a))/0xa;if(_0x536ddb===_0x4c5df3)break;else _0x2d7486['push'](_0x2d7486['shift']());}catch(_0x35d230){_0x2d7486['push'](_0x2d7486['shift']());}}}(a29_0x3b80,0x47fb9));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x25b1dd(0x1fd),'description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':a29_0x25b1dd(0x200),'description':'Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','required':![]};export const TAGS_FLAG={'name':a29_0x25b1dd(0x20c),'type':a29_0x25b1dd(0x210),'description':a29_0x25b1dd(0x1ea)};export const STDIN_FLAG={'name':a29_0x25b1dd(0x21e),'type':'boolean','description':a29_0x25b1dd(0x1f3),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x25b1dd(0x202),'type':a29_0x25b1dd(0x210),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0x25b1dd(0x20a),'type':a29_0x25b1dd(0x1fb),'description':a29_0x25b1dd(0x218),'default':![]};function a29_0x3b80(){const _0x5aba15=['before','\x20app\x20config.','106878SCQZJG','utf8','push','reveal','gmtCreate','tags','args','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','appCode:\x20','string','kind','warnings','apiError','value\x20is\x20redacted','error','setEncoding','appCode','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','str','12246250CLNwyd','end','4KFjIfw','Missing\x20app-config\x20key.','stdin','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','env','17811wavpYZ','after','App\x20config\x20value\x20source\x20is\x20ambiguous.','argument','defineProperties','path','Config\x20tags\x20for\x20filtering/display\x20metadata','517836xDNINq','once','Environment\x20variable\x20is\x20not\x20set:\x20','trim','slice','Failed\x20to\x20','join','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Read\x20config\x20value\x20from\x20stdin','length','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','2077025NWskmR','2772gxjwyD','validation','1046vzZvVz','3290140PWnemT','boolean','name','key','file','2216tgnnvj','value','gmtModified','from-env','key:\x20','url'];a29_0x3b80=function(){return _0x5aba15;};return a29_0x3b80();}export function readKeyArg(_0x3895f9){const _0x5a55f3=a29_0x25b1dd,_0x1135b9=_0x3895f9[_0x5a55f3(0x20d)][0x0]?.[_0x5a55f3(0x1ee)]()??'';return validateKey(_0x1135b9),_0x1135b9;}export function readOptionalTags(_0x626fa){const _0x19e4dd=a29_0x25b1dd,_0x184c18=_0x626fa[_0x19e4dd(0x219)](_0x19e4dd(0x20c))[_0x19e4dd(0x1ee)]();if(!_0x184c18)return undefined;if(_0x184c18[_0x19e4dd(0x1f4)]>0x20)throw CliErrors[_0x19e4dd(0x1f8)](_0x19e4dd(0x1f5));return _0x184c18;}export function validateKey(_0x2df612){const _0x11e040=a29_0x25b1dd;if(!_0x2df612)throw CliErrors[_0x11e040(0x1f8)](_0x11e040(0x21d));if(_0x2df612[_0x11e040(0x1f4)]>0x100)throw CliErrors[_0x11e040(0x1f8)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x25c683,_0x1a0996){const _0x5bdfdb=a29_0x25b1dd,_0x8c7738=_0x25c683[_0x5bdfdb(0x200)]!==undefined&&_0x25c683['value']!==null&&_0x25c683[_0x5bdfdb(0x200)]!=='',_0x202761={'appCode':_0x25c683[_0x5bdfdb(0x217)],'key':_0x25c683[_0x5bdfdb(0x1fd)],'tags':_0x25c683[_0x5bdfdb(0x20c)]??undefined,'hasValue':_0x8c7738,'valueRedacted':_0x8c7738&&!_0x1a0996?.['reveal'],'gmtCreate':_0x25c683[_0x5bdfdb(0x20b)],'gmtModified':_0x25c683[_0x5bdfdb(0x201)]};return _0x1a0996?.[_0x5bdfdb(0x20a)]&&(_0x202761[_0x5bdfdb(0x200)]=_0x25c683['value']??'',_0x202761['valueRedacted']=![]),_0x202761;}export function plannedAppConfig(_0x468c3c){const _0xd4693f=a29_0x25b1dd,_0x5c605c=_0x468c3c['hasValue']??!![];return{'appCode':_0x468c3c[_0xd4693f(0x217)],'key':_0x468c3c[_0xd4693f(0x1fd)],'tags':_0x468c3c[_0xd4693f(0x20c)]??undefined,'hasValue':_0x5c605c,'valueRedacted':_0x5c605c};}export function buildMutationData(_0xa8e018){const _0x437ea9=a29_0x25b1dd;return{'operation':_0xa8e018['operation'],'selector':{'appCode':_0xa8e018['appCode'],'key':_0xa8e018['key']},'before':_0xa8e018[_0x437ea9(0x205)],'after':_0xa8e018[_0x437ea9(0x1e5)],'dryRun':_0xa8e018['dryRun'],'warnings':_0xa8e018[_0x437ea9(0x212)]??[]};}export async function withAppConfigApiBoundary(_0xb5c6cd,_0x424dd4,_0x3dff61){const _0x39242a=a29_0x25b1dd;try{return await _0x3dff61();}catch{const _0x3b10db=[_0x39242a(0x20f)+_0x424dd4[_0x39242a(0x217)]];if(_0x424dd4[_0x39242a(0x1fd)])_0x3b10db[_0x39242a(0x209)](_0x39242a(0x203)+_0x424dd4[_0x39242a(0x1fd)]);_0x3b10db[_0x39242a(0x209)](_0x39242a(0x214));throw CliErrors[_0x39242a(0x213)](_0x39242a(0x1f0)+_0xb5c6cd+_0x39242a(0x206),_0x3b10db['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x94d417,_0x5d72eb){const _0x5a6707=a29_0x25b1dd;return Object[_0x5a6707(0x1e8)](_0x94d417,{'method':{'value':_0x5d72eb['method'],'enumerable':![]},'url':{'value':_0x5d72eb[_0x5a6707(0x204)],'enumerable':![]}});}export function assertSingleValueSource(_0x2bc58b){const _0x4966a3=a29_0x25b1dd,_0x4469ff=[];_0x2bc58b[_0x4966a3(0x20d)]['length']>0x1&&_0x4469ff[_0x4966a3(0x209)]({'kind':_0x4966a3(0x1e7),'value':_0x2bc58b[_0x4966a3(0x20d)][_0x4966a3(0x1ef)](0x1)[_0x4966a3(0x1f1)]('\x20')});const _0x1ead86=_0x2bc58b['flag']('value');_0x1ead86!==undefined&&_0x1ead86!==null&&_0x4469ff[_0x4966a3(0x209)]({'kind':_0x4966a3(0x1e7),'value':String(_0x1ead86)});_0x2bc58b['bool'](_0x4966a3(0x21e))&&_0x4469ff[_0x4966a3(0x209)]({'kind':_0x4966a3(0x21e)});const _0xadda40=_0x2bc58b['str'](_0x4966a3(0x202))['trim']();_0xadda40&&_0x4469ff['push']({'kind':'env','name':_0xadda40});const _0x1c034b=_0x2bc58b['str']('file')[_0x4966a3(0x1ee)]();_0x1c034b&&_0x4469ff['push']({'kind':_0x4966a3(0x1fe),'path':_0x1c034b});if(_0x4469ff[_0x4966a3(0x1f4)]===0x0)throw CliErrors['validation']('Missing\x20app-config\x20value\x20source.',_0x4966a3(0x20e));if(_0x4469ff[_0x4966a3(0x1f4)]>0x1)throw CliErrors[_0x4966a3(0x1f8)](_0x4966a3(0x1e6),_0x4966a3(0x1f2));return _0x4469ff[0x0];}export async function assertValueSourceReadable(_0x1e719d){const _0x4327d5=a29_0x25b1dd;if(_0x1e719d['kind']===_0x4327d5(0x1e3)&&!(_0x1e719d[_0x4327d5(0x1fc)]in process.env))throw CliErrors[_0x4327d5(0x1f8)](_0x4327d5(0x1ed)+_0x1e719d[_0x4327d5(0x1fc)]);if(_0x1e719d['kind']===_0x4327d5(0x1fe))try{await access(_0x1e719d[_0x4327d5(0x1e9)]);}catch{throw CliErrors[_0x4327d5(0x1f8)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0x1e719d['path']);}}export async function readAppConfigValue(_0x2e3c53){const _0x5b279b=a29_0x25b1dd,_0xdf2809=assertSingleValueSource(_0x2e3c53),_0xc06fdd=[];if(_0xdf2809[_0x5b279b(0x211)]==='argument')return _0xc06fdd[_0x5b279b(0x209)](_0x5b279b(0x1e2)),{'value':_0xdf2809['value']??'','source':_0xdf2809[_0x5b279b(0x211)],'warnings':_0xc06fdd};if(_0xdf2809[_0x5b279b(0x211)]===_0x5b279b(0x21e))return{'value':await readStdin(),'source':_0xdf2809[_0x5b279b(0x211)],'warnings':_0xc06fdd};if(_0xdf2809[_0x5b279b(0x211)]===_0x5b279b(0x1e3)){if(!(_0xdf2809[_0x5b279b(0x1fc)]in process.env))throw CliErrors[_0x5b279b(0x1f8)](_0x5b279b(0x1ed)+_0xdf2809[_0x5b279b(0x1fc)]);return{'value':process.env[_0xdf2809.name]??'','source':_0xdf2809[_0x5b279b(0x211)],'warnings':_0xc06fdd};}return{'value':await readFile(_0xdf2809['path'],_0x5b279b(0x208)),'source':_0xdf2809['kind'],'warnings':_0xc06fdd};}function a29_0x5575(_0x326536,_0x3f90fb){_0x326536=_0x326536-0x1e2;const _0x3b807d=a29_0x3b80();let _0x55750e=_0x3b807d[_0x326536];return _0x55750e;}function readStdin(){return new Promise((_0x2a067e,_0x2d1f4d)=>{const _0x221fdc=a29_0x5575;let _0x52606c='';process[_0x221fdc(0x21e)][_0x221fdc(0x216)](_0x221fdc(0x208)),process[_0x221fdc(0x21e)]['on']('data',_0x3c024f=>{_0x52606c+=_0x3c024f;}),process['stdin']['once'](_0x221fdc(0x21b),()=>_0x2a067e(_0x52606c)),process['stdin'][_0x221fdc(0x1ec)](_0x221fdc(0x215),_0x2d1f4d);});}
1
+ const a29_0x987322=a29_0x4391;(function(_0x5373a4,_0x20cb1c){const _0x4593fa=a29_0x4391,_0x58e531=_0x5373a4();while(!![]){try{const _0x127831=-parseInt(_0x4593fa(0x211))/0x1*(-parseInt(_0x4593fa(0x210))/0x2)+parseInt(_0x4593fa(0x21e))/0x3*(parseInt(_0x4593fa(0x1ea))/0x4)+parseInt(_0x4593fa(0x20b))/0x5*(parseInt(_0x4593fa(0x1fe))/0x6)+-parseInt(_0x4593fa(0x1f9))/0x7+-parseInt(_0x4593fa(0x201))/0x8*(-parseInt(_0x4593fa(0x208))/0x9)+parseInt(_0x4593fa(0x1fa))/0xa*(-parseInt(_0x4593fa(0x214))/0xb)+parseInt(_0x4593fa(0x206))/0xc;if(_0x127831===_0x20cb1c)break;else _0x58e531['push'](_0x58e531['shift']());}catch(_0x58bbdb){_0x58e531['push'](_0x58e531['shift']());}}}(a29_0x14f6,0x1878a));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':a29_0x987322(0x1f5),'required':!![]};export const VALUE_ARG={'name':a29_0x987322(0x20d),'description':a29_0x987322(0x1f1),'required':![]};function a29_0x4391(_0x3c5841,_0x45d892){_0x3c5841=_0x3c5841-0x1e9;const _0x14f639=a29_0x14f6();let _0x43918f=_0x14f639[_0x3c5841];return _0x43918f;}export const TAGS_FLAG={'name':'tags','type':a29_0x987322(0x1fd),'description':a29_0x987322(0x1e9)};export const STDIN_FLAG={'name':a29_0x987322(0x219),'type':a29_0x987322(0x21a),'description':a29_0x987322(0x20c),'default':![]};function a29_0x14f6(){const _0x168c93=['setEncoding','error','flag','kind','3269772DnikmE','path','2727YFpdNE','push','appCode:\x20','100885lGVXoI','Read\x20config\x20value\x20from\x20stdin','value','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','from-env','66258KZSabi','1NKDLgw','valueRedacted','warnings','693oCbhgP','Value\x20file\x20is\x20not\x20readable:\x20','length','args','gmtCreate','stdin','boolean','utf8','appCode','str','66Fvfjaf','tags','key','\x20app\x20config.','join','file','gmtModified','defineProperties','bool','Failed\x20to\x20','name','apiError','Config\x20tags\x20for\x20filtering/display\x20metadata','7716EWkQqA','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','slice','trim','method','env','hasValue','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','once','App\x20config\x20value\x20source\x20is\x20ambiguous.','end','Runtime\x20app-config\x20key','after','validation','reveal','760116FjMSDK','29130XigXWR','operation','argument','string','12nCWBZq','Environment\x20variable\x20is\x20not\x20set:\x20','key:\x20','104qTMkdN'];a29_0x14f6=function(){return _0x168c93;};return a29_0x14f6();}export const FROM_ENV_FLAG={'name':a29_0x987322(0x20f),'type':a29_0x987322(0x1fd),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':'reveal','type':a29_0x987322(0x21a),'description':a29_0x987322(0x1eb),'default':![]};export function readKeyArg(_0x28857f){const _0x542d72=a29_0x987322,_0x10cc61=_0x28857f['args'][0x0]?.[_0x542d72(0x1ed)]()??'';return validateKey(_0x10cc61),_0x10cc61;}export function readOptionalTags(_0x2ec22f){const _0x3e2c15=a29_0x987322,_0x464432=_0x2ec22f[_0x3e2c15(0x21d)]('tags')[_0x3e2c15(0x1ed)]();if(!_0x464432)return undefined;if(_0x464432[_0x3e2c15(0x216)]>0x20)throw CliErrors['validation'](_0x3e2c15(0x20e));return _0x464432;}export function validateKey(_0x1e634b){const _0x5281e6=a29_0x987322;if(!_0x1e634b)throw CliErrors[_0x5281e6(0x1f7)]('Missing\x20app-config\x20key.');if(_0x1e634b[_0x5281e6(0x216)]>0x100)throw CliErrors[_0x5281e6(0x1f7)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x59601e,_0x2057d8){const _0x50c5df=a29_0x987322,_0x2b335c=_0x59601e[_0x50c5df(0x20d)]!==undefined&&_0x59601e['value']!==null&&_0x59601e[_0x50c5df(0x20d)]!=='',_0x3e8525={'appCode':_0x59601e[_0x50c5df(0x21c)],'key':_0x59601e[_0x50c5df(0x220)],'tags':_0x59601e['tags']??undefined,'hasValue':_0x2b335c,'valueRedacted':_0x2b335c&&!_0x2057d8?.[_0x50c5df(0x1f8)],'gmtCreate':_0x59601e[_0x50c5df(0x218)],'gmtModified':_0x59601e[_0x50c5df(0x224)]};return _0x2057d8?.['reveal']&&(_0x3e8525['value']=_0x59601e[_0x50c5df(0x20d)]??'',_0x3e8525[_0x50c5df(0x212)]=![]),_0x3e8525;}export function plannedAppConfig(_0x48b041){const _0x3d6cf0=a29_0x987322,_0xe5cafb=_0x48b041[_0x3d6cf0(0x1f0)]??!![];return{'appCode':_0x48b041['appCode'],'key':_0x48b041[_0x3d6cf0(0x220)],'tags':_0x48b041[_0x3d6cf0(0x21f)]??undefined,'hasValue':_0xe5cafb,'valueRedacted':_0xe5cafb};}export function buildMutationData(_0x2b6253){const _0x4438ea=a29_0x987322;return{'operation':_0x2b6253[_0x4438ea(0x1fb)],'selector':{'appCode':_0x2b6253['appCode'],'key':_0x2b6253['key']},'before':_0x2b6253['before'],'after':_0x2b6253[_0x4438ea(0x1f6)],'dryRun':_0x2b6253['dryRun'],'warnings':_0x2b6253[_0x4438ea(0x213)]??[]};}export async function withAppConfigApiBoundary(_0x3d4e75,_0x5b1a34,_0x115055){const _0x121fea=a29_0x987322;try{return await _0x115055();}catch{const _0x23ae0c=[_0x121fea(0x20a)+_0x5b1a34['appCode']];if(_0x5b1a34[_0x121fea(0x220)])_0x23ae0c[_0x121fea(0x209)](_0x121fea(0x200)+_0x5b1a34['key']);_0x23ae0c[_0x121fea(0x209)]('value\x20is\x20redacted');throw CliErrors[_0x121fea(0x229)](_0x121fea(0x227)+_0x3d4e75+_0x121fea(0x221),_0x23ae0c[_0x121fea(0x222)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x4d42a5,_0x4fb2fb){const _0x67ff54=a29_0x987322;return Object[_0x67ff54(0x225)](_0x4d42a5,{'method':{'value':_0x4fb2fb[_0x67ff54(0x1ee)],'enumerable':![]},'url':{'value':_0x4fb2fb['url'],'enumerable':![]}});}export function assertSingleValueSource(_0xa1599e){const _0x39ca5b=a29_0x987322,_0x330880=[];_0xa1599e[_0x39ca5b(0x217)][_0x39ca5b(0x216)]>0x1&&_0x330880['push']({'kind':'argument','value':_0xa1599e['args'][_0x39ca5b(0x1ec)](0x1)['join']('\x20')});const _0x14b708=_0xa1599e[_0x39ca5b(0x204)](_0x39ca5b(0x20d));_0x14b708!==undefined&&_0x14b708!==null&&_0x330880[_0x39ca5b(0x209)]({'kind':_0x39ca5b(0x1fc),'value':String(_0x14b708)});_0xa1599e[_0x39ca5b(0x226)](_0x39ca5b(0x219))&&_0x330880[_0x39ca5b(0x209)]({'kind':'stdin'});const _0x26a421=_0xa1599e[_0x39ca5b(0x21d)](_0x39ca5b(0x20f))[_0x39ca5b(0x1ed)]();_0x26a421&&_0x330880['push']({'kind':_0x39ca5b(0x1ef),'name':_0x26a421});const _0x3312ae=_0xa1599e[_0x39ca5b(0x21d)](_0x39ca5b(0x223))['trim']();_0x3312ae&&_0x330880[_0x39ca5b(0x209)]({'kind':'file','path':_0x3312ae});if(_0x330880[_0x39ca5b(0x216)]===0x0)throw CliErrors[_0x39ca5b(0x1f7)]('Missing\x20app-config\x20value\x20source.','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');if(_0x330880[_0x39ca5b(0x216)]>0x1)throw CliErrors['validation'](_0x39ca5b(0x1f3),'Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');return _0x330880[0x0];}export async function assertValueSourceReadable(_0x3108b){const _0x2a146b=a29_0x987322;if(_0x3108b[_0x2a146b(0x205)]===_0x2a146b(0x1ef)&&!(_0x3108b[_0x2a146b(0x228)]in process.env))throw CliErrors[_0x2a146b(0x1f7)](_0x2a146b(0x1ff)+_0x3108b[_0x2a146b(0x228)]);if(_0x3108b[_0x2a146b(0x205)]==='file')try{await access(_0x3108b[_0x2a146b(0x207)]);}catch{throw CliErrors[_0x2a146b(0x1f7)](_0x2a146b(0x215)+_0x3108b[_0x2a146b(0x207)]);}}export async function readAppConfigValue(_0x4a9568){const _0x5be243=a29_0x987322,_0x3a2db7=assertSingleValueSource(_0x4a9568),_0x46b1c3=[];if(_0x3a2db7[_0x5be243(0x205)]===_0x5be243(0x1fc))return _0x46b1c3[_0x5be243(0x209)]('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0x3a2db7['value']??'','source':_0x3a2db7['kind'],'warnings':_0x46b1c3};if(_0x3a2db7['kind']==='stdin')return{'value':await readStdin(),'source':_0x3a2db7[_0x5be243(0x205)],'warnings':_0x46b1c3};if(_0x3a2db7[_0x5be243(0x205)]===_0x5be243(0x1ef)){if(!(_0x3a2db7[_0x5be243(0x228)]in process.env))throw CliErrors[_0x5be243(0x1f7)](_0x5be243(0x1ff)+_0x3a2db7['name']);return{'value':process.env[_0x3a2db7.name]??'','source':_0x3a2db7['kind'],'warnings':_0x46b1c3};}return{'value':await readFile(_0x3a2db7[_0x5be243(0x207)],_0x5be243(0x21b)),'source':_0x3a2db7[_0x5be243(0x205)],'warnings':_0x46b1c3};}function readStdin(){return new Promise((_0xf097bf,_0x47df44)=>{const _0x87ec4d=a29_0x4391;let _0x56936f='';process[_0x87ec4d(0x219)][_0x87ec4d(0x202)](_0x87ec4d(0x21b)),process['stdin']['on']('data',_0xbdf147=>{_0x56936f+=_0xbdf147;}),process[_0x87ec4d(0x219)][_0x87ec4d(0x1f2)](_0x87ec4d(0x1f4),()=>_0xf097bf(_0x56936f)),process[_0x87ec4d(0x219)][_0x87ec4d(0x1f2)](_0x87ec4d(0x203),_0x47df44);});}
@@ -1 +1 @@
1
- const a30_0x1bc7fb=a30_0x239d;(function(_0x177c33,_0x569a44){const _0x415b02=a30_0x239d,_0x486405=_0x177c33();while(!![]){try{const _0x389589=-parseInt(_0x415b02(0x1cc))/0x1*(parseInt(_0x415b02(0x1d6))/0x2)+-parseInt(_0x415b02(0x1cb))/0x3*(-parseInt(_0x415b02(0x1cf))/0x4)+parseInt(_0x415b02(0x1cd))/0x5*(parseInt(_0x415b02(0x1c5))/0x6)+-parseInt(_0x415b02(0x1c4))/0x7+parseInt(_0x415b02(0x1ce))/0x8+-parseInt(_0x415b02(0x1d8))/0x9+parseInt(_0x415b02(0x1d0))/0xa*(parseInt(_0x415b02(0x1d1))/0xb);if(_0x389589===_0x569a44)break;else _0x486405['push'](_0x486405['shift']());}catch(_0x27f57d){_0x486405['push'](_0x486405['shift']());}}}(a30_0x90d6,0x5e51e));import{unlinkSync,existsSync}from'node:fs';function a30_0x90d6(){const _0x586e0d=['!\x20Not\x20logged\x20in','1514744fyJwXg','270492NElWQn','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','log','yes','Clear\x20login\x20session','read','252969mmKyvq','1yMmUaB','5oTWqoW','547584JgHEpp','4oYDOcT','5764830gFWweh','33XcDIUC','nonInteractive','login','write','✓\x20Logged\x20out','1295390RabuRU','logout','6091929mLfeDR','auth'];a30_0x90d6=function(){return _0x586e0d;};return a30_0x90d6();}function a30_0x239d(_0x7e0d5b,_0x44ced8){_0x7e0d5b=_0x7e0d5b-0x1c3;const _0x90d6ea=a30_0x90d6();let _0x239dd6=_0x90d6ea[_0x7e0d5b];return _0x239dd6;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x1bc7fb(0x1d9),'command':a30_0x1bc7fb(0x1d3),'description':'Login\x20via\x20browser','risk':a30_0x1bc7fb(0x1ca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x1bc7fb(0x1c8),'type':'boolean','description':a30_0x1bc7fb(0x1c6),'default':![]}],async 'execute'(_0x24ed0d){const _0x1f084d=a30_0x1bc7fb,{runAuthServer:_0x5bfb44}=await import('../../auth/auth-server-ui.js');return await _0x5bfb44({'autoYes':_0x24ed0d['bool']('yes'),'nonInteractive':_0x24ed0d[_0x1f084d(0x1d2)]}),{'ok':!![]};}},{'service':a30_0x1bc7fb(0x1d9),'command':a30_0x1bc7fb(0x1d7),'description':a30_0x1bc7fb(0x1c9),'risk':a30_0x1bc7fb(0x1d4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x33fc9b){const _0x11928b=a30_0x1bc7fb;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x11928b(0x1c7)](_0x11928b(0x1d5))):console['log'](_0x11928b(0x1c3)),{'ok':!![]};}}];
1
+ function a30_0x28ff(_0x91d3b7,_0x56eb95){_0x91d3b7=_0x91d3b7-0x1f0;const _0x426414=a30_0x4264();let _0x28ff76=_0x426414[_0x91d3b7];return _0x28ff76;}const a30_0x28eadf=a30_0x28ff;(function(_0x59c502,_0x313293){const _0x228083=a30_0x28ff,_0x55ee3c=_0x59c502();while(!![]){try{const _0x388985=parseInt(_0x228083(0x1f2))/0x1*(-parseInt(_0x228083(0x1fd))/0x2)+-parseInt(_0x228083(0x1f7))/0x3*(-parseInt(_0x228083(0x1fb))/0x4)+parseInt(_0x228083(0x1f3))/0x5*(-parseInt(_0x228083(0x203))/0x6)+parseInt(_0x228083(0x1f1))/0x7+parseInt(_0x228083(0x1fc))/0x8+-parseInt(_0x228083(0x1fe))/0x9*(-parseInt(_0x228083(0x201))/0xa)+-parseInt(_0x228083(0x1f5))/0xb*(parseInt(_0x228083(0x1ff))/0xc);if(_0x388985===_0x313293)break;else _0x55ee3c['push'](_0x55ee3c['shift']());}catch(_0x3ae400){_0x55ee3c['push'](_0x55ee3c['shift']());}}}(a30_0x4264,0x41a04));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x28eadf(0x202),'command':a30_0x28eadf(0x1f0),'description':'Login\x20via\x20browser','risk':a30_0x28eadf(0x1f6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x28eadf(0x205),'type':'boolean','description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x41b7e2){const _0x5b651c=a30_0x28eadf,{runAuthServer:_0x2b6cd9}=await import(_0x5b651c(0x200));return await _0x2b6cd9({'autoYes':_0x41b7e2['bool'](_0x5b651c(0x205)),'nonInteractive':_0x41b7e2[_0x5b651c(0x1f9)]}),{'ok':!![]};}},{'service':a30_0x28eadf(0x202),'command':a30_0x28eadf(0x1fa),'description':a30_0x28eadf(0x1f8),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x32c796){const _0x13122b=a30_0x28eadf;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x13122b(0x1f4)]('✓\x20Logged\x20out')):console[_0x13122b(0x1f4)](_0x13122b(0x204)),{'ok':!![]};}}];function a30_0x4264(){const _0x11bf4b=['14006883MwEyge','read','24yxDLwe','Clear\x20login\x20session','nonInteractive','logout','253096ytUIbb','2852816TobYBt','8118folUeQ','480699NeBcfg','12MqheNK','../../auth/auth-server-ui.js','70RPoQqm','auth','283152sBcybF','!\x20Not\x20logged\x20in','yes','login','3576853MxsJFx','39NlTfDq','5LKGuGg','log'];a30_0x4264=function(){return _0x11bf4b;};return a30_0x4264();}
@@ -1 +1 @@
1
- const a31_0x524c16=a31_0x4240;(function(_0x44fe2c,_0x1b0f73){const _0x3eb0f6=a31_0x4240,_0x23f990=_0x44fe2c();while(!![]){try{const _0x2ae29f=parseInt(_0x3eb0f6(0x1f6))/0x1+parseInt(_0x3eb0f6(0x1de))/0x2+-parseInt(_0x3eb0f6(0x1c6))/0x3*(parseInt(_0x3eb0f6(0x1c4))/0x4)+-parseInt(_0x3eb0f6(0x1be))/0x5*(parseInt(_0x3eb0f6(0x1b9))/0x6)+parseInt(_0x3eb0f6(0x1d9))/0x7*(-parseInt(_0x3eb0f6(0x1e3))/0x8)+parseInt(_0x3eb0f6(0x1f2))/0x9+parseInt(_0x3eb0f6(0x1ff))/0xa*(parseInt(_0x3eb0f6(0x1b8))/0xb);if(_0x2ae29f===_0x1b0f73)break;else _0x23f990['push'](_0x23f990['shift']());}catch(_0x4e76fa){_0x23f990['push'](_0x23f990['shift']());}}}(a31_0x9ac4,0xa1bc0));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a31_0x9ac4(){const _0x5b5972=['/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','1086410RxaYyQ','Select\x20dataset:','File\x20already\x20exists:\x20','operation-type','Select\x20operation\x20type:','map','nonInteractive','close','description','10XyDSwN','string','Available\x20aliases:\x20','Invalid\x20dataset\x20selection.','before','apiDir','stdin','trim','\x22\x20not\x20found.\x20','No\x20api.ts\x20found.\x20Run\x20`','scriptsRootDir','create','Operation\x20type\x20(HOOK\x20only)','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Invalid\x20function\x20name\x20\x22','validation','\x0a\x20*\x20[脚本名称]\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','5543021aMsXcj','176466bhLJnB','length','ENDPOINT','functionNode','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','50vaqNIY','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','\x22.\x20','includes','.js','.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','154616grFahz','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','63wAHOoR','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','datasetCode','Trigger\x20node\x20(HOOK\x20only)','datasetcode','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','join','bff','isInteger','type',']\x20(','HOOK\x20requires\x20alias/operation/node\x20options.','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','appCode','name','\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','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','No\x20operation\x20types\x20found\x20for\x20dataset\x20','1253MHgmxF','function-node','Dataset\x20not\x20found\x20for\x20code\x20\x22','utf8','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','1526886jvHawi','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','COMMON','Operation\x20type\x20\x22','HOOK','43224iDSPPg','str','\x20function:\x20','UNKNOWN','alias','operationType','Select\x20trigger\x20node:','code','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Available:\x20','question','write','find','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','stderr','3435129UfusZH','keys','after'];a31_0x9ac4=function(){return _0x5b5972;};return a31_0x9ac4();}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';function a31_0x4240(_0x136519,_0x3ec373){_0x136519=_0x136519-0x1ad;const _0x9ac46f=a31_0x9ac4();let _0x4240b7=_0x9ac46f[_0x136519];return _0x4240b7;}export const bffCreate={'service':a31_0x524c16(0x1cd),'command':a31_0x524c16(0x1b1),'description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':'write','flags':[{'name':'type','type':'string','required':!![],'enum':[a31_0x524c16(0x1e0),a31_0x524c16(0x1bb),a31_0x524c16(0x1e2)],'description':'Script\x20type'},{'name':a31_0x524c16(0x1d4),'type':'string','required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':'description','type':a31_0x524c16(0x200),'description':'Script\x20description'},{'name':'alias','type':a31_0x524c16(0x200),'description':a31_0x524c16(0x1b3)},{'name':a31_0x524c16(0x1ca),'type':a31_0x524c16(0x200),'description':a31_0x524c16(0x1cb)},{'name':a31_0x524c16(0x1f9),'type':a31_0x524c16(0x200),'description':a31_0x524c16(0x1b2)},{'name':a31_0x524c16(0x1da),'type':a31_0x524c16(0x200),'description':a31_0x524c16(0x1c9),'enum':[a31_0x524c16(0x203),a31_0x524c16(0x1f4)]}],async 'validate'(_0x1d808b){const _0x1f996c=a31_0x524c16,_0x24e5b1=_0x1d808b[_0x1f996c(0x1e4)](_0x1f996c(0x1d4));if(!isValidBffFunctionName(_0x24e5b1))throw CliErrors['validation'](_0x1f996c(0x1b4)+_0x24e5b1+_0x1f996c(0x1d2));},async 'execute'(_0x57cb6b){const _0x3b7561=a31_0x524c16,_0x56eb70=loadBffProjectConfig(_0x57cb6b['appCode']),_0x428d3a=_0x57cb6b[_0x3b7561(0x1e4)](_0x3b7561(0x1cf)),_0x2b5619=_0x57cb6b[_0x3b7561(0x1e4)](_0x3b7561(0x1d4)),_0xe42d4e=_0x57cb6b[_0x3b7561(0x1e4)](_0x3b7561(0x1fe))||undefined,_0x56e569=_0x428d3a===_0x3b7561(0x1e2)?await resolveHookOptions(_0x56eb70,_0x57cb6b):undefined,_0x3ff38a=buildFilePath(_0x56eb70,_0x428d3a,_0x2b5619,_0x56e569);if(await fileExists(_0x3ff38a))throw CliErrors[_0x3b7561(0x1b5)](_0x3b7561(0x1f8)+_0x3ff38a);await mkdir(dirname(_0x3ff38a),{'recursive':!![]});const _0x243b26=generateTemplate(_0x428d3a,_0x2b5619,_0x57cb6b[_0x3b7561(0x1d3)],_0xe42d4e,_0x56e569);await writeFile(_0x3ff38a,_0x243b26,_0x3b7561(0x1dc));const _0x58a1a3={'type':_0x428d3a,'name':_0x2b5619,'path':_0x3ff38a};if(_0xe42d4e)_0x58a1a3[_0x3b7561(0x1fe)]=_0xe42d4e;if(_0x56e569){if(_0x56e569['alias'])_0x58a1a3[_0x3b7561(0x1e7)]=_0x56e569['alias'];_0x58a1a3[_0x3b7561(0x1c8)]=_0x56e569[_0x3b7561(0x1c8)],_0x58a1a3['operationType']=_0x56e569[_0x3b7561(0x1e8)],_0x58a1a3[_0x3b7561(0x1bc)]=_0x56e569['functionNode'];}return{'ok':!![],'data':_0x58a1a3,'message':'Created\x20'+_0x428d3a+_0x3b7561(0x1e5)+_0x2b5619};}};async function resolveHookOptions(_0x5ceee3,_0x1f5ee4){const _0x7eb8c9=a31_0x524c16,_0x517fa4=loadAliasMap(_0x1f5ee4[_0x7eb8c9(0x204)],undefined,resolveApiFilePath(_0x1f5ee4['apiDir'],_0x1f5ee4[_0x7eb8c9(0x1d3)])),_0x3b97c5=_0x517fa4[_0x7eb8c9(0x1ba)]>0x0;let _0x586ded,_0x1ebaba,_0x2229f9;const _0x13ddc5=_0x1f5ee4['str']('alias'),_0x278217=_0x1f5ee4[_0x7eb8c9(0x1e4)](_0x7eb8c9(0x1ca));if(_0x13ddc5){const _0x292a7f=resolveAlias(_0x1f5ee4[_0x7eb8c9(0x204)],_0x13ddc5,undefined,resolveApiFilePath(_0x1f5ee4[_0x7eb8c9(0x204)],_0x1f5ee4[_0x7eb8c9(0x1d3)]));if(!_0x292a7f){const _0x4d41c0=_0x3b97c5?_0x7eb8c9(0x201)+_0x517fa4['map'](_0x4d195b=>_0x4d195b['alias'])['join'](',\x20'):_0x7eb8c9(0x1af)+CLI_BIN_NAME+_0x7eb8c9(0x1bf);throw CliErrors['validation']('Alias\x20\x22'+_0x13ddc5+_0x7eb8c9(0x1ae)+_0x4d41c0);}_0x586ded=_0x13ddc5,_0x1ebaba=_0x292a7f;}else{if(_0x278217){_0x1ebaba=_0x278217;const _0x5f21be=_0x517fa4['find'](_0x5dde16=>_0x5dde16[_0x7eb8c9(0x1c8)]===_0x278217);_0x586ded=_0x5f21be?.[_0x7eb8c9(0x1e7)];}else{if(_0x1f5ee4[_0x7eb8c9(0x1fc)])throw CliErrors[_0x7eb8c9(0x1b5)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x3b97c5){const _0x45c5f3=_0x517fa4[_0x7eb8c9(0x1fb)](_0x177bcd=>_0x177bcd['alias']+'\x20('+_0x177bcd['tableName']+')'),_0x3052dc=await promptSelect(_0x7eb8c9(0x1f7),_0x45c5f3),_0x32c77a=_0x517fa4[_0x3052dc];if(!_0x32c77a)throw CliErrors['validation'](_0x7eb8c9(0x202));_0x586ded=_0x32c77a['alias'],_0x1ebaba=_0x32c77a['datasetCode'];}else{const _0x3816cd=await listDatasets(_0x1f5ee4[_0x7eb8c9(0x1d3)]);if(_0x3816cd[_0x7eb8c9(0x1ba)]===0x0)throw CliErrors[_0x7eb8c9(0x1b5)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x4e8667=_0x3816cd[_0x7eb8c9(0x1fb)](_0x5e8c17=>_0x5e8c17[_0x7eb8c9(0x1d4)]+'\x20['+(_0x5e8c17['source']??_0x7eb8c9(0x1e6))+_0x7eb8c9(0x1d0)+_0x5e8c17['code']+')'),_0x2a93fe=await promptSelect(_0x7eb8c9(0x1f7),_0x4e8667),_0x54d8fb=_0x3816cd[_0x2a93fe];if(!_0x54d8fb)throw CliErrors[_0x7eb8c9(0x1b5)]('Invalid\x20dataset\x20selection.');_0x1ebaba=_0x54d8fb[_0x7eb8c9(0x1ea)],_0x586ded=undefined;}}}}const _0x4c9905=await listDatasets(_0x1f5ee4[_0x7eb8c9(0x1d3)]),_0x1ed386=_0x4c9905[_0x7eb8c9(0x1ef)](_0x228d77=>_0x228d77[_0x7eb8c9(0x1ea)]===_0x1ebaba);if(!_0x1ed386)throw CliErrors[_0x7eb8c9(0x1b5)](_0x7eb8c9(0x1db)+_0x1ebaba+_0x7eb8c9(0x1c0)+(_0x586ded?_0x7eb8c9(0x1bd)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x2229f9=_0x1ed386['id'];const _0x4eafa8=_0x586ded??_0x1ebaba,_0x304468=await listBffDatasetOperations(_0x1f5ee4[_0x7eb8c9(0x1d3)],_0x2229f9),_0x5c802b=_0x304468?Object[_0x7eb8c9(0x1f3)](_0x304468):[];if(_0x5c802b[_0x7eb8c9(0x1ba)]===0x0)throw CliErrors[_0x7eb8c9(0x1b5)](_0x7eb8c9(0x1d8)+_0x4eafa8+'.');let _0xad4526;const _0xb95d77=_0x1f5ee4[_0x7eb8c9(0x1e4)](_0x7eb8c9(0x1f9));if(_0xb95d77){if(!_0x5c802b[_0x7eb8c9(0x1c1)](_0xb95d77))throw CliErrors[_0x7eb8c9(0x1b5)](_0x7eb8c9(0x1e1)+_0xb95d77+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x4eafa8+'.\x20'+(_0x7eb8c9(0x1ec)+_0x5c802b[_0x7eb8c9(0x1cc)](',\x20')));_0xad4526=_0xb95d77;}else{if(_0x1f5ee4[_0x7eb8c9(0x1fc)])throw CliErrors['validation']('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x341219=await promptSelect(_0x7eb8c9(0x1fa),_0x5c802b);_0xad4526=_0x5c802b[_0x341219]??_0x5c802b[0x0];}let _0x4e339d=normalizeHookFunctionNode(_0x1f5ee4[_0x7eb8c9(0x1e4)](_0x7eb8c9(0x1da)));if(!_0x4e339d){if(_0x1f5ee4['str'](_0x7eb8c9(0x1da)))throw CliErrors['validation'](_0x7eb8c9(0x1d7));if(_0x1f5ee4[_0x7eb8c9(0x1fc)])throw CliErrors[_0x7eb8c9(0x1b5)](_0x7eb8c9(0x1eb));const _0x110133=await promptSelect(_0x7eb8c9(0x1e9),[_0x7eb8c9(0x203),_0x7eb8c9(0x1f4)]);_0x4e339d=[_0x7eb8c9(0x203),_0x7eb8c9(0x1f4)][_0x110133]??_0x7eb8c9(0x203);}return{'alias':_0x586ded,'datasetCode':_0x1ebaba,'datasetId':_0x2229f9,'operationType':_0xad4526,'functionNode':_0x4e339d};}async function promptSelect(_0x4c6815,_0x792f97){const _0x6c67fd=a31_0x524c16;if(_0x792f97[_0x6c67fd(0x1ba)]===0x1)return 0x0;for(const [_0x45b1b1,_0xf49830]of _0x792f97['entries']()){process['stderr'][_0x6c67fd(0x1ee)]('\x20\x20'+(_0x45b1b1+0x1)+'.\x20'+_0xf49830+'\x0a');}const _0x51e5b2=createInterface({'input':process[_0x6c67fd(0x205)],'output':process['stderr']});while(!![]){const _0x1ef33b=await new Promise(_0x1e212d=>{const _0x4b0954=_0x6c67fd;_0x51e5b2[_0x4b0954(0x1ed)](_0x4c6815+'\x20',_0x1e212d);}),_0x260d89=Number['parseInt'](_0x1ef33b[_0x6c67fd(0x1ad)](),0xa);if(Number[_0x6c67fd(0x1ce)](_0x260d89)&&_0x260d89>=0x1&&_0x260d89<=_0x792f97['length'])return _0x51e5b2[_0x6c67fd(0x1fd)](),_0x260d89-0x1;process[_0x6c67fd(0x1f1)]['write']('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x792f97[_0x6c67fd(0x1ba)]+'.\x0a');}}function buildFilePath(_0x2791aa,_0x28185b,_0x153be2,_0x314e5a){const _0xd8d1fa=a31_0x524c16;if(_0x28185b===_0xd8d1fa(0x1e2)){if(!_0x314e5a)throw CliErrors[_0xd8d1fa(0x1b5)](_0xd8d1fa(0x1d1));const _0x458a1f=_0x314e5a['alias']??_0x314e5a['datasetCode'];return join(_0x2791aa[_0xd8d1fa(0x1b0)],_0xd8d1fa(0x1e2),_0x458a1f,_0x314e5a[_0xd8d1fa(0x1e8)],_0x314e5a[_0xd8d1fa(0x1bc)],_0x153be2+_0xd8d1fa(0x1c2));}return join(_0x2791aa[_0xd8d1fa(0x1b0)],_0x28185b,_0x153be2+_0xd8d1fa(0x1c2));}export function generateTemplate(_0x2278a1,_0x387a44,_0x5c415f,_0xe00384,_0x6e0564){const _0x5aedc6=a31_0x524c16,_0x46b164=_0xe00384?.[_0x5aedc6(0x1ad)]()||'TODO:\x20add\x20script\x20description';if(_0x2278a1===_0x5aedc6(0x1e0))return _0x5aedc6(0x1f5)+_0x46b164+_0x5aedc6(0x1b6)+_0x387a44+_0x5aedc6(0x1c5)+_0x387a44+_0x5aedc6(0x1c3)+_0x387a44+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x2278a1==='ENDPOINT')return _0x5aedc6(0x1d6)+_0x46b164+_0x5aedc6(0x1b7)+_0x5c415f+'/'+_0x387a44+'\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'+_0x387a44+_0x5aedc6(0x1dd);if(!_0x6e0564)throw CliErrors['validation'](_0x5aedc6(0x1f0));return _0x5aedc6(0x1c7)+_0x46b164+_0x5aedc6(0x1df)+_0x5c415f+'/'+_0x6e0564[_0x5aedc6(0x1c8)]+'/'+_0x6e0564[_0x5aedc6(0x1e8)]+'\x0a\x20*\x20[触发节点]\x20'+_0x6e0564[_0x5aedc6(0x1bc)]+_0x5aedc6(0x1d5)+_0x387a44+_0x5aedc6(0x1dd);}
1
+ const a31_0x316aef=a31_0x52d8;(function(_0x4ee791,_0x7bb135){const _0x555346=a31_0x52d8,_0x656100=_0x4ee791();while(!![]){try{const _0x199868=parseInt(_0x555346(0x21c))/0x1*(parseInt(_0x555346(0x1dc))/0x2)+-parseInt(_0x555346(0x208))/0x3+parseInt(_0x555346(0x20d))/0x4+-parseInt(_0x555346(0x1fb))/0x5+parseInt(_0x555346(0x1fe))/0x6+parseInt(_0x555346(0x1ed))/0x7+-parseInt(_0x555346(0x1f4))/0x8;if(_0x199868===_0x7bb135)break;else _0x656100['push'](_0x656100['shift']());}catch(_0x1ef697){_0x656100['push'](_0x656100['shift']());}}}(a31_0x46e1,0xed22b));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x316aef(0x1f1),'command':a31_0x316aef(0x205),'description':a31_0x316aef(0x209),'risk':a31_0x316aef(0x210),'flags':[{'name':a31_0x316aef(0x1ee),'type':a31_0x316aef(0x20b),'required':!![],'enum':[a31_0x316aef(0x1e7),a31_0x316aef(0x21b),a31_0x316aef(0x219)],'description':a31_0x316aef(0x1fa)},{'name':a31_0x316aef(0x1f7),'type':a31_0x316aef(0x20b),'required':!![],'description':a31_0x316aef(0x20e)},{'name':'description','type':'string','description':'Script\x20description'},{'name':a31_0x316aef(0x215),'type':a31_0x316aef(0x20b),'description':a31_0x316aef(0x1d6)},{'name':a31_0x316aef(0x201),'type':a31_0x316aef(0x20b),'description':a31_0x316aef(0x1d3)},{'name':a31_0x316aef(0x1dd),'type':a31_0x316aef(0x20b),'description':a31_0x316aef(0x204)},{'name':a31_0x316aef(0x216),'type':a31_0x316aef(0x20b),'description':a31_0x316aef(0x1d8),'enum':['before','after']}],async 'validate'(_0x34f912){const _0x5cd875=a31_0x316aef,_0x423ae1=_0x34f912['str'](_0x5cd875(0x1f7));if(!isValidBffFunctionName(_0x423ae1))throw CliErrors['validation']('Invalid\x20function\x20name\x20\x22'+_0x423ae1+_0x5cd875(0x1fc));},async 'execute'(_0x4d8c13){const _0x15eaf7=a31_0x316aef,_0x49a65e=loadBffProjectConfig(_0x4d8c13[_0x15eaf7(0x1d5)]),_0x47d6cf=_0x4d8c13[_0x15eaf7(0x1d0)](_0x15eaf7(0x1ee)),_0x316778=_0x4d8c13['str'](_0x15eaf7(0x1f7)),_0x428187=_0x4d8c13[_0x15eaf7(0x1d0)]('description')||undefined,_0x276a4f=_0x47d6cf===_0x15eaf7(0x219)?await resolveHookOptions(_0x49a65e,_0x4d8c13):undefined,_0x4f74b5=buildFilePath(_0x49a65e,_0x47d6cf,_0x316778,_0x276a4f);if(await fileExists(_0x4f74b5))throw CliErrors[_0x15eaf7(0x1e1)](_0x15eaf7(0x221)+_0x4f74b5);await mkdir(dirname(_0x4f74b5),{'recursive':!![]});const _0x5122fe=generateTemplate(_0x47d6cf,_0x316778,_0x4d8c13[_0x15eaf7(0x1d5)],_0x428187,_0x276a4f);await writeFile(_0x4f74b5,_0x5122fe,'utf8');const _0x5d3785={'type':_0x47d6cf,'name':_0x316778,'path':_0x4f74b5};if(_0x428187)_0x5d3785[_0x15eaf7(0x1fd)]=_0x428187;if(_0x276a4f){if(_0x276a4f[_0x15eaf7(0x215)])_0x5d3785[_0x15eaf7(0x215)]=_0x276a4f[_0x15eaf7(0x215)];_0x5d3785[_0x15eaf7(0x1d2)]=_0x276a4f['datasetCode'],_0x5d3785[_0x15eaf7(0x1e9)]=_0x276a4f[_0x15eaf7(0x1e9)],_0x5d3785[_0x15eaf7(0x213)]=_0x276a4f[_0x15eaf7(0x213)];}return{'ok':!![],'data':_0x5d3785,'message':_0x15eaf7(0x212)+_0x47d6cf+_0x15eaf7(0x226)+_0x316778};}};async function resolveHookOptions(_0x533b2d,_0x295bbb){const _0x4f151a=a31_0x316aef,_0x30ae81=loadAliasMap(_0x295bbb[_0x4f151a(0x217)],undefined,resolveApiFilePath(_0x295bbb[_0x4f151a(0x217)],_0x295bbb['appCode'])),_0x411825=_0x30ae81[_0x4f151a(0x1d4)]>0x0;let _0x1cb6ef,_0x240482,_0x3e2d61;const _0x4c2554=_0x295bbb[_0x4f151a(0x1d0)](_0x4f151a(0x215)),_0x5a5cc8=_0x295bbb[_0x4f151a(0x1d0)]('datasetcode');if(_0x4c2554){const _0xd1d93a=resolveAlias(_0x295bbb[_0x4f151a(0x217)],_0x4c2554,undefined,resolveApiFilePath(_0x295bbb[_0x4f151a(0x217)],_0x295bbb['appCode']));if(!_0xd1d93a){const _0x1c145d=_0x411825?_0x4f151a(0x1f2)+_0x30ae81[_0x4f151a(0x225)](_0x175f1f=>_0x175f1f[_0x4f151a(0x215)])['join'](',\x20'):_0x4f151a(0x1f8)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x4f151a(0x1e1)](_0x4f151a(0x229)+_0x4c2554+_0x4f151a(0x20f)+_0x1c145d);}_0x1cb6ef=_0x4c2554,_0x240482=_0xd1d93a;}else{if(_0x5a5cc8){_0x240482=_0x5a5cc8;const _0x4a4133=_0x30ae81[_0x4f151a(0x1d1)](_0x59178d=>_0x59178d[_0x4f151a(0x1d2)]===_0x5a5cc8);_0x1cb6ef=_0x4a4133?.[_0x4f151a(0x215)];}else{if(_0x295bbb[_0x4f151a(0x1df)])throw CliErrors[_0x4f151a(0x1e1)](_0x4f151a(0x223));else{if(_0x411825){const _0x397544=_0x30ae81[_0x4f151a(0x225)](_0x2fc2e5=>_0x2fc2e5[_0x4f151a(0x215)]+'\x20('+_0x2fc2e5[_0x4f151a(0x1f9)]+')'),_0x827c69=await promptSelect(_0x4f151a(0x222),_0x397544),_0x319026=_0x30ae81[_0x827c69];if(!_0x319026)throw CliErrors[_0x4f151a(0x1e1)]('Invalid\x20dataset\x20selection.');_0x1cb6ef=_0x319026[_0x4f151a(0x215)],_0x240482=_0x319026[_0x4f151a(0x1d2)];}else{const _0x2e8162=await listDatasets(_0x295bbb[_0x4f151a(0x1d5)]);if(_0x2e8162[_0x4f151a(0x1d4)]===0x0)throw CliErrors[_0x4f151a(0x1e1)](_0x4f151a(0x211));const _0x5cd7f4=_0x2e8162[_0x4f151a(0x225)](_0x573081=>_0x573081[_0x4f151a(0x1f7)]+'\x20['+(_0x573081['source']??'UNKNOWN')+']\x20('+_0x573081[_0x4f151a(0x1ea)]+')'),_0x4a4561=await promptSelect(_0x4f151a(0x222),_0x5cd7f4),_0x22d605=_0x2e8162[_0x4a4561];if(!_0x22d605)throw CliErrors['validation'](_0x4f151a(0x21f));_0x240482=_0x22d605[_0x4f151a(0x1ea)],_0x1cb6ef=undefined;}}}}const _0x1c70e3=await listDatasets(_0x295bbb[_0x4f151a(0x1d5)]),_0x1e3836=_0x1c70e3[_0x4f151a(0x1d1)](_0x4c6278=>_0x4c6278[_0x4f151a(0x1ea)]===_0x240482);if(!_0x1e3836)throw CliErrors['validation']('Dataset\x20not\x20found\x20for\x20code\x20\x22'+_0x240482+_0x4f151a(0x228)+(_0x1cb6ef?_0x4f151a(0x1eb)+CLI_BIN_NAME+_0x4f151a(0x1e6):''));_0x3e2d61=_0x1e3836['id'];const _0x5a3c7f=_0x1cb6ef??_0x240482,_0x52b5e0=await listBffDatasetOperations(_0x295bbb[_0x4f151a(0x1d5)],_0x3e2d61),_0x9cec59=_0x52b5e0?Object[_0x4f151a(0x1ec)](_0x52b5e0):[];if(_0x9cec59[_0x4f151a(0x1d4)]===0x0)throw CliErrors[_0x4f151a(0x1e1)](_0x4f151a(0x1f5)+_0x5a3c7f+'.');let _0x280f68;const _0xff8726=_0x295bbb[_0x4f151a(0x1d0)]('operation-type');if(_0xff8726){if(!_0x9cec59['includes'](_0xff8726))throw CliErrors[_0x4f151a(0x1e1)]('Operation\x20type\x20\x22'+_0xff8726+_0x4f151a(0x1de)+_0x5a3c7f+'.\x20'+(_0x4f151a(0x21d)+_0x9cec59[_0x4f151a(0x1d7)](',\x20')));_0x280f68=_0xff8726;}else{if(_0x295bbb[_0x4f151a(0x1df)])throw CliErrors[_0x4f151a(0x1e1)](_0x4f151a(0x227));const _0x3840f6=await promptSelect('Select\x20operation\x20type:',_0x9cec59);_0x280f68=_0x9cec59[_0x3840f6]??_0x9cec59[0x0];}let _0x5d12ae=normalizeHookFunctionNode(_0x295bbb[_0x4f151a(0x1d0)](_0x4f151a(0x216)));if(!_0x5d12ae){if(_0x295bbb[_0x4f151a(0x1d0)](_0x4f151a(0x216)))throw CliErrors[_0x4f151a(0x1e1)](_0x4f151a(0x202));if(_0x295bbb['nonInteractive'])throw CliErrors[_0x4f151a(0x1e1)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x3aded1=await promptSelect(_0x4f151a(0x218),[_0x4f151a(0x21e),_0x4f151a(0x214)]);_0x5d12ae=[_0x4f151a(0x21e),_0x4f151a(0x214)][_0x3aded1]??_0x4f151a(0x21e);}return{'alias':_0x1cb6ef,'datasetCode':_0x240482,'datasetId':_0x3e2d61,'operationType':_0x280f68,'functionNode':_0x5d12ae};}async function promptSelect(_0x1d18a4,_0x5ddf0d){const _0x3d3376=a31_0x316aef;if(_0x5ddf0d['length']===0x1)return 0x0;for(const [_0x408bc4,_0x41138e]of _0x5ddf0d[_0x3d3376(0x1e4)]()){process[_0x3d3376(0x1db)][_0x3d3376(0x210)]('\x20\x20'+(_0x408bc4+0x1)+'.\x20'+_0x41138e+'\x0a');}const _0x33b0ec=createInterface({'input':process[_0x3d3376(0x207)],'output':process[_0x3d3376(0x1db)]});while(!![]){const _0x11695d=await new Promise(_0x168e1c=>{const _0x7b4b03=_0x3d3376;_0x33b0ec[_0x7b4b03(0x20a)](_0x1d18a4+'\x20',_0x168e1c);}),_0x2949bf=Number[_0x3d3376(0x1e8)](_0x11695d[_0x3d3376(0x1e0)](),0xa);if(Number['isInteger'](_0x2949bf)&&_0x2949bf>=0x1&&_0x2949bf<=_0x5ddf0d[_0x3d3376(0x1d4)])return _0x33b0ec[_0x3d3376(0x22b)](),_0x2949bf-0x1;process['stderr']['write'](_0x3d3376(0x220)+_0x5ddf0d[_0x3d3376(0x1d4)]+'.\x0a');}}function a31_0x52d8(_0x278c4b,_0x485fd7){_0x278c4b=_0x278c4b-0x1d0;const _0x46e18b=a31_0x46e1();let _0x52d8f9=_0x46e18b[_0x278c4b];return _0x52d8f9;}function a31_0x46e1(){const _0x569b38=['(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','entries','\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','\x20api\x20pull`\x20to\x20refresh.','COMMON','parseInt','operationType','code','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','keys','9726024lvZvIY','type','\x0a\x20*\x20[触发节点]\x20','\x0a\x20*\x20[脚本名称]\x20','bff','Available\x20aliases:\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','9265688ZUBJkm','No\x20operation\x20types\x20found\x20for\x20dataset\x20','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','name','No\x20api.ts\x20found.\x20Run\x20`','tableName','Script\x20type','7024330bGpvNi','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','description','5892738vcCOcT','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','datasetcode','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','.js','Operation\x20type\x20(HOOK\x20only)','create','HOOK\x20requires\x20alias/operation/node\x20options.','stdin','3537078CkTNqG','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','question','string','TODO:\x20add\x20script\x20description','4329748ghDIqt','Function\x20name\x20(valid\x20JS\x20identifier)','\x22\x20not\x20found.\x20','write','No\x20datasets\x20found\x20for\x20this\x20app.','Created\x20','functionNode','after','alias','function-node','apiDir','Select\x20trigger\x20node:','HOOK','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','ENDPOINT','15942EykzSh','Available:\x20','before','Invalid\x20dataset\x20selection.','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','File\x20already\x20exists:\x20','Select\x20dataset:','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','map','\x20function:\x20','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x22.\x20','Alias\x20\x22','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','close','str','find','datasetCode','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','length','appCode','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','join','Trigger\x20node\x20(HOOK\x20only)','\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','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','stderr','158iFRrvi','operation-type','\x22\x20not\x20found\x20for\x20dataset\x20','nonInteractive','trim','validation','scriptsRootDir'];a31_0x46e1=function(){return _0x569b38;};return a31_0x46e1();}function buildFilePath(_0x2ffc7d,_0x280743,_0x49a002,_0x48aab6){const _0x585f5a=a31_0x316aef;if(_0x280743===_0x585f5a(0x219)){if(!_0x48aab6)throw CliErrors[_0x585f5a(0x1e1)](_0x585f5a(0x206));const _0x29e023=_0x48aab6['alias']??_0x48aab6['datasetCode'];return join(_0x2ffc7d['scriptsRootDir'],_0x585f5a(0x219),_0x29e023,_0x48aab6[_0x585f5a(0x1e9)],_0x48aab6['functionNode'],_0x49a002+_0x585f5a(0x203));}return join(_0x2ffc7d[_0x585f5a(0x1e2)],_0x280743,_0x49a002+_0x585f5a(0x203));}export function generateTemplate(_0x1a36c1,_0x179275,_0x4d3ae4,_0x2518e3,_0x5a53e9){const _0x498751=a31_0x316aef,_0x1f3766=_0x2518e3?.[_0x498751(0x1e0)]()||_0x498751(0x20c);if(_0x1a36c1===_0x498751(0x1e7))return _0x498751(0x1f6)+_0x1f3766+_0x498751(0x1f0)+_0x179275+_0x498751(0x1ff)+_0x179275+_0x498751(0x1f3)+_0x179275+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x1a36c1==='ENDPOINT')return _0x498751(0x21a)+_0x1f3766+_0x498751(0x200)+_0x4d3ae4+'/'+_0x179275+_0x498751(0x1d9)+_0x179275+_0x498751(0x1e3);if(!_0x5a53e9)throw CliErrors[_0x498751(0x1e1)](_0x498751(0x22a));return _0x498751(0x1da)+_0x1f3766+_0x498751(0x224)+_0x4d3ae4+'/'+_0x5a53e9[_0x498751(0x1d2)]+'/'+_0x5a53e9[_0x498751(0x1e9)]+_0x498751(0x1ef)+_0x5a53e9[_0x498751(0x213)]+_0x498751(0x1e5)+_0x179275+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
@@ -1 +1 @@
1
- const a32_0x8b9171=a32_0x37c7;(function(_0x2a6594,_0x3f452f){const _0x5d8378=a32_0x37c7,_0x5aee8b=_0x2a6594();while(!![]){try{const _0x25fdea=-parseInt(_0x5d8378(0xab))/0x1*(-parseInt(_0x5d8378(0x87))/0x2)+-parseInt(_0x5d8378(0x88))/0x3+parseInt(_0x5d8378(0xa4))/0x4+parseInt(_0x5d8378(0x8e))/0x5*(parseInt(_0x5d8378(0x96))/0x6)+parseInt(_0x5d8378(0xa7))/0x7*(parseInt(_0x5d8378(0x9f))/0x8)+-parseInt(_0x5d8378(0xa2))/0x9+parseInt(_0x5d8378(0xb2))/0xa;if(_0x25fdea===_0x3f452f)break;else _0x5aee8b['push'](_0x5aee8b['shift']());}catch(_0x51e4e8){_0x5aee8b['push'](_0x5aee8b['shift']());}}}(a32_0x526a,0xc981e));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a32_0x526a(){const _0x11b562=['Local\x20delete\x20not\x20settled\x20for\x20','remoteId','target','join','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','Would\x20delete\x20','Function\x20not\x20found:\x20','2632wiQbaP','lockFilePath','Deleted\x20','14078853bFeMex','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','2735680wakXVx','scriptsRoot','\x20\x20-\x20','2709HLoduK','trashedTo','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','projectRoot','545yKxCVl','No\x20lock\x20entry\x20found\x20for\x20\x22','keys','toISOString','lastSync','delete','parse','10825330XuxTWe','/api/management/library/scripts/delete','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','filter','apps','startsWith','BFF\x20lock\x20file\x20not\x20found.','3174ObGwzs','2155977lbqrbw','POST','high-risk-write','Lock\x20scope\x20for\x20app\x20\x22','scriptsRootDir','validation','1748295GjKjHI','length','appCode','str','Multiple\x20functions\x20match\x20\x22','functions','find','\x20(local\x20file\x20moved\x20to\x20trash)','6quMcCQ','<timestamp>'];a32_0x526a=function(){return _0x11b562;};return a32_0x526a();}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':'bff','command':a32_0x8b9171(0xb0),'description':a32_0x8b9171(0xa9),'risk':a32_0x8b9171(0x8a),'flags':[{'name':a32_0x8b9171(0x9a),'type':'string','required':!![],'description':a32_0x8b9171(0xb4)}],async 'validate'(_0x50639a){const _0x18348e=a32_0x8b9171,_0xed809d=loadBffProjectConfig(_0x50639a[_0x18348e(0x90)]),_0x41dcd1=await readBffLockFile(_0xed809d[_0x18348e(0xa0)]);if(!_0x41dcd1)throw CliErrors[_0x18348e(0x8d)](_0x18348e(0xa3));},async 'dryRun'(_0x9d1b55){const _0x5cc221=a32_0x8b9171,_0x10e575=loadBffProjectConfig(_0x9d1b55[_0x5cc221(0x90)]),_0x257137=await readBffLockFile(_0x10e575[_0x5cc221(0xa0)]);if(!_0x257137)throw CliErrors['validation'](_0x5cc221(0x86));const {appLock:_0x563294}=ensureLockScope(_0x257137,_0x9d1b55['appCode'],_0x10e575[_0x5cc221(0xa5)],'delete'),_0x325b98=_0x9d1b55[_0x5cc221(0x91)](_0x5cc221(0x9a)),_0x546b07=Object[_0x5cc221(0xad)](_0x563294[_0x5cc221(0x93)]),_0x582439=resolveDeleteTarget(_0x325b98,_0x546b07),_0x29154f=_0x563294[_0x5cc221(0x93)][_0x582439];if(!_0x29154f)throw CliErrors[_0x5cc221(0x8d)](_0x5cc221(0xac)+_0x582439+'\x22.');const _0x251115=resolveLocalFilePathFromLockKey(_0x10e575,_0x582439),_0x1f5ac1=relative(_0x10e575['projectRoot'],_0x251115),_0x2b63f9=join(_0x10e575['trashDir'],_0x5cc221(0x97),_0x1f5ac1);return{'method':_0x5cc221(0x89),'url':_0x5cc221(0xb3),'body':{'appCode':_0x9d1b55[_0x5cc221(0x90)],'target':_0x582439,'remoteId':_0x29154f[_0x5cc221(0x99)],'localFilePath':_0x251115,'trashedPath':_0x2b63f9},'description':_0x5cc221(0x9d)+_0x582439+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x25bcf4){const _0x28e863=a32_0x8b9171,_0x54ce18=loadBffProjectConfig(_0x25bcf4[_0x28e863(0x90)]),_0x5655e1=await readBffLockFile(_0x54ce18['lockFilePath']);if(!_0x5655e1)throw CliErrors[_0x28e863(0x8d)](_0x28e863(0x86));const {lockData:_0x26ea63,appLock:_0x115144}=ensureLockScope(_0x5655e1,_0x25bcf4[_0x28e863(0x90)],_0x54ce18[_0x28e863(0xa5)],'delete'),_0x2dcd61=JSON[_0x28e863(0xb1)](JSON['stringify'](_0x26ea63)),_0x2b96df=_0x2dcd61[_0x28e863(0xb6)][_0x25bcf4[_0x28e863(0x90)]];if(!_0x2b96df)throw new Error(_0x28e863(0x8b)+_0x25bcf4[_0x28e863(0x90)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x42dfdc=_0x25bcf4[_0x28e863(0x91)](_0x28e863(0x9a)),_0x4fc878=Object[_0x28e863(0xad)](_0x2b96df[_0x28e863(0x93)]),_0x4d8082=resolveDeleteTarget(_0x42dfdc,_0x4fc878),_0x5a2a8d=_0x2b96df[_0x28e863(0x93)][_0x4d8082];if(!_0x5a2a8d)throw CliErrors[_0x28e863(0x8d)](_0x28e863(0xac)+_0x4d8082+'\x22.');await deleteBffScript(_0x5a2a8d[_0x28e863(0x99)]),delete _0x2b96df[_0x28e863(0x93)][_0x4d8082],_0x2b96df[_0x28e863(0xaf)]=new Date()[_0x28e863(0xae)](),await writeBffLockFile(_0x54ce18['lockFilePath'],_0x2dcd61);const _0x246163=resolveLocalFilePathFromLockKey(_0x54ce18,_0x4d8082);let _0x5eb4cb;await fileExists(_0x246163)&&(_0x5eb4cb=await moveToTrash(_0x54ce18[_0x28e863(0xaa)],_0x54ce18['trashDir'],_0x246163),await cleanupEmptyDirectories(dirname(_0x246163),_0x54ce18[_0x28e863(0x8c)]));await waitForDeleteSettlement(_0x54ce18[_0x28e863(0xa0)],_0x25bcf4[_0x28e863(0x90)],_0x4d8082,_0x246163),await sleep(0x96);const _0x20d9e0={'deleted':_0x4d8082,'remoteId':_0x5a2a8d[_0x28e863(0x99)]};if(_0x5eb4cb)_0x20d9e0[_0x28e863(0xa8)]=_0x5eb4cb;return{'ok':!![],'data':_0x20d9e0,'message':_0x28e863(0xa1)+_0x4d8082+(_0x5eb4cb?_0x28e863(0x95):'')};}};function a32_0x37c7(_0x169ad3,_0x39784b){_0x169ad3=_0x169ad3-0x86;const _0x526a74=a32_0x526a();let _0x37c77e=_0x526a74[_0x169ad3];return _0x37c77e;}function resolveDeleteTarget(_0x438842,_0x4f52e5){const _0x491fc8=a32_0x8b9171;if(_0x438842['includes']('/')){const _0xe45979=_0x4f52e5[_0x491fc8(0x94)](_0xc75e10=>_0xc75e10===_0x438842);if(!_0xe45979)throw CliErrors[_0x491fc8(0x8d)](_0x491fc8(0x9e)+_0x438842);return _0xe45979;}const _0x59b444=_0x4f52e5[_0x491fc8(0xb5)](_0xe0af29=>_0xe0af29['split']('/')['at'](-0x1)===_0x438842);if(_0x59b444['length']===0x0)throw CliErrors['validation'](_0x491fc8(0x9e)+_0x438842);if(_0x59b444[_0x491fc8(0x8f)]>0x1)throw CliErrors['validation'](_0x491fc8(0x92)+_0x438842+_0x491fc8(0x9c)+_0x59b444['map'](_0x57101b=>_0x491fc8(0xa6)+_0x57101b)[_0x491fc8(0x9b)]('\x0a'));return _0x59b444[0x0];}async function moveToTrash(_0x26af2c,_0x4c5e24,_0xc2ccee){const _0x241332=a32_0x8b9171,_0x5bcc3d=new Date()[_0x241332(0xae)]()['replace'](/[:.]/g,'-'),_0x3596cf=relative(_0x26af2c,_0xc2ccee),_0x279721=join(_0x4c5e24,_0x5bcc3d,_0x3596cf);return await mkdir(dirname(_0x279721),{'recursive':!![]}),await rename(_0xc2ccee,_0x279721),_0x279721;}async function cleanupEmptyDirectories(_0x55ceaf,_0x29cf42){const _0x1abd50=a32_0x8b9171;let _0x3fd458=resolve(_0x55ceaf);const _0x4f4eed=resolve(_0x29cf42);while(_0x3fd458[_0x1abd50(0xb7)](''+_0x4f4eed+sep)||_0x3fd458===_0x4f4eed){if(_0x3fd458===_0x4f4eed)return;try{const _0x46fb3e=await readdir(_0x3fd458);if(_0x46fb3e[_0x1abd50(0x8f)]>0x0)return;await rmdir(_0x3fd458);}catch{return;}_0x3fd458=dirname(_0x3fd458);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x35afa0,_0x33b28c,_0x13e394,_0x465c7b){const _0x8c8851=a32_0x8b9171;for(let _0x350c13=0x0;_0x350c13<DELETE_SETTLE_RETRY_COUNT;_0x350c13+=0x1){const _0x4b0177=await readBffLockFile(_0x35afa0),_0x3826d2=!!_0x4b0177?.['apps']?.[_0x33b28c]?.[_0x8c8851(0x93)]?.[_0x13e394],_0x3c3e62=await fileExists(_0x465c7b);if(!_0x3826d2&&!_0x3c3e62)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x8c8851(0x98)+_0x13e394+'.');}
1
+ const a32_0x53250a=a32_0x4d5c;(function(_0x2e67f5,_0x546406){const _0x155bdc=a32_0x4d5c,_0x402d44=_0x2e67f5();while(!![]){try{const _0x11bf74=parseInt(_0x155bdc(0xf6))/0x1+-parseInt(_0x155bdc(0x100))/0x2+-parseInt(_0x155bdc(0xf0))/0x3+parseInt(_0x155bdc(0xdf))/0x4*(parseInt(_0x155bdc(0xdb))/0x5)+-parseInt(_0x155bdc(0xfd))/0x6+parseInt(_0x155bdc(0xf9))/0x7*(-parseInt(_0x155bdc(0xdd))/0x8)+parseInt(_0x155bdc(0xd7))/0x9;if(_0x11bf74===_0x546406)break;else _0x402d44['push'](_0x402d44['shift']());}catch(_0x4a3d96){_0x402d44['push'](_0x402d44['shift']());}}}(a32_0xbe81,0x6fdb1));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a32_0x4d5c(_0x5b89b0,_0x1c6756){_0x5b89b0=_0x5b89b0-0xd3;const _0xbe81ae=a32_0xbe81();let _0x4d5ce9=_0xbe81ae[_0x5b89b0];return _0x4d5ce9;}function a32_0xbe81(){const _0x1e3ec7=['trashDir','lastSync','bff','Lock\x20scope\x20for\x20app\x20\x22','9217134jsHOJB','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','split','stringify','10iYHdVI','appCode','64hyLQnQ','replace','1040164TAfLKB','/api/management/library/scripts/delete','string','find','filter','remoteId','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','\x20(local\x20file\x20moved\x20to\x20trash)','Deleted\x20','keys','parse','high-risk-write','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','\x22\x20not\x20found\x20after\x20ensureLockScope.','length','<timestamp>','delete','2600415ryrjCH','POST','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','startsWith','functions','No\x20lock\x20entry\x20found\x20for\x20\x22','779845aUhNrq','apps','target','321209WQZQLA','validation','Function\x20not\x20found:\x20','scriptsRoot','29256BiYZDf','str','join','1254230uqClQQ','\x20\x20-\x20','projectRoot','lockFilePath','Local\x20delete\x20not\x20settled\x20for\x20','BFF\x20lock\x20file\x20not\x20found.','toISOString'];a32_0xbe81=function(){return _0x1e3ec7;};return a32_0xbe81();}import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x53250a(0xd5),'command':a32_0x53250a(0xef),'description':'Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','risk':a32_0x53250a(0xea),'flags':[{'name':a32_0x53250a(0xf8),'type':a32_0x53250a(0xe1),'required':!![],'description':a32_0x53250a(0xd8)}],async 'validate'(_0x4acab2){const _0x2ba234=a32_0x53250a,_0x5598c7=loadBffProjectConfig(_0x4acab2[_0x2ba234(0xdc)]),_0xa8909f=await readBffLockFile(_0x5598c7['lockFilePath']);if(!_0xa8909f)throw CliErrors[_0x2ba234(0xfa)](_0x2ba234(0xe5));},async 'dryRun'(_0x135c70){const _0x2cf397=a32_0x53250a,_0x44f670=loadBffProjectConfig(_0x135c70['appCode']),_0x2939d5=await readBffLockFile(_0x44f670[_0x2cf397(0x103)]);if(!_0x2939d5)throw CliErrors[_0x2cf397(0xfa)]('BFF\x20lock\x20file\x20not\x20found.');const {appLock:_0x4ccf7f}=ensureLockScope(_0x2939d5,_0x135c70[_0x2cf397(0xdc)],_0x44f670[_0x2cf397(0xfc)],_0x2cf397(0xef)),_0x51a8cf=_0x135c70[_0x2cf397(0xfe)](_0x2cf397(0xf8)),_0x24163b=Object[_0x2cf397(0xe8)](_0x4ccf7f[_0x2cf397(0xf4)]),_0x5b1421=resolveDeleteTarget(_0x51a8cf,_0x24163b),_0x53b745=_0x4ccf7f['functions'][_0x5b1421];if(!_0x53b745)throw CliErrors[_0x2cf397(0xfa)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x5b1421+'\x22.');const _0x2deb54=resolveLocalFilePathFromLockKey(_0x44f670,_0x5b1421),_0x16cc9f=relative(_0x44f670[_0x2cf397(0x102)],_0x2deb54),_0x486582=join(_0x44f670[_0x2cf397(0xd3)],_0x2cf397(0xee),_0x16cc9f);return{'method':_0x2cf397(0xf1),'url':_0x2cf397(0xe0),'body':{'appCode':_0x135c70['appCode'],'target':_0x5b1421,'remoteId':_0x53b745['remoteId'],'localFilePath':_0x2deb54,'trashedPath':_0x486582},'description':'Would\x20delete\x20'+_0x5b1421+_0x2cf397(0xeb)};},async 'execute'(_0x30c3c8){const _0x23228c=a32_0x53250a,_0x576bfa=loadBffProjectConfig(_0x30c3c8['appCode']),_0x85b968=await readBffLockFile(_0x576bfa[_0x23228c(0x103)]);if(!_0x85b968)throw CliErrors[_0x23228c(0xfa)](_0x23228c(0x105));const {lockData:_0x36295d,appLock:_0x540661}=ensureLockScope(_0x85b968,_0x30c3c8['appCode'],_0x576bfa['scriptsRoot'],_0x23228c(0xef)),_0x37361c=JSON[_0x23228c(0xe9)](JSON[_0x23228c(0xda)](_0x36295d)),_0x3ccd18=_0x37361c[_0x23228c(0xf7)][_0x30c3c8['appCode']];if(!_0x3ccd18)throw new Error(_0x23228c(0xd6)+_0x30c3c8[_0x23228c(0xdc)]+_0x23228c(0xec));const _0x5719f5=_0x30c3c8[_0x23228c(0xfe)](_0x23228c(0xf8)),_0x18d4ff=Object[_0x23228c(0xe8)](_0x3ccd18['functions']),_0x353dd0=resolveDeleteTarget(_0x5719f5,_0x18d4ff),_0x3d550e=_0x3ccd18[_0x23228c(0xf4)][_0x353dd0];if(!_0x3d550e)throw CliErrors[_0x23228c(0xfa)](_0x23228c(0xf5)+_0x353dd0+'\x22.');await deleteBffScript(_0x3d550e['remoteId']),delete _0x3ccd18[_0x23228c(0xf4)][_0x353dd0],_0x3ccd18[_0x23228c(0xd4)]=new Date()[_0x23228c(0x106)](),await writeBffLockFile(_0x576bfa[_0x23228c(0x103)],_0x37361c);const _0x2c0c40=resolveLocalFilePathFromLockKey(_0x576bfa,_0x353dd0);let _0x40dada;await fileExists(_0x2c0c40)&&(_0x40dada=await moveToTrash(_0x576bfa[_0x23228c(0x102)],_0x576bfa['trashDir'],_0x2c0c40),await cleanupEmptyDirectories(dirname(_0x2c0c40),_0x576bfa['scriptsRootDir']));await waitForDeleteSettlement(_0x576bfa[_0x23228c(0x103)],_0x30c3c8[_0x23228c(0xdc)],_0x353dd0,_0x2c0c40),await sleep(0x96);const _0x2ef232={'deleted':_0x353dd0,'remoteId':_0x3d550e[_0x23228c(0xe4)]};if(_0x40dada)_0x2ef232['trashedTo']=_0x40dada;return{'ok':!![],'data':_0x2ef232,'message':_0x23228c(0xe7)+_0x353dd0+(_0x40dada?_0x23228c(0xe6):'')};}};function resolveDeleteTarget(_0x35e204,_0x3b6700){const _0xa7a082=a32_0x53250a;if(_0x35e204['includes']('/')){const _0x10bc21=_0x3b6700[_0xa7a082(0xe2)](_0x29d7d5=>_0x29d7d5===_0x35e204);if(!_0x10bc21)throw CliErrors[_0xa7a082(0xfa)](_0xa7a082(0xfb)+_0x35e204);return _0x10bc21;}const _0x155407=_0x3b6700[_0xa7a082(0xe3)](_0x25fa7d=>_0x25fa7d[_0xa7a082(0xd9)]('/')['at'](-0x1)===_0x35e204);if(_0x155407[_0xa7a082(0xed)]===0x0)throw CliErrors[_0xa7a082(0xfa)]('Function\x20not\x20found:\x20'+_0x35e204);if(_0x155407[_0xa7a082(0xed)]>0x1)throw CliErrors[_0xa7a082(0xfa)]('Multiple\x20functions\x20match\x20\x22'+_0x35e204+_0xa7a082(0xf2)+_0x155407['map'](_0x988f36=>_0xa7a082(0x101)+_0x988f36)[_0xa7a082(0xff)]('\x0a'));return _0x155407[0x0];}async function moveToTrash(_0x3d21e4,_0x461d48,_0x364554){const _0x464ecd=a32_0x53250a,_0x10e18d=new Date()[_0x464ecd(0x106)]()[_0x464ecd(0xde)](/[:.]/g,'-'),_0x398939=relative(_0x3d21e4,_0x364554),_0x48bef5=join(_0x461d48,_0x10e18d,_0x398939);return await mkdir(dirname(_0x48bef5),{'recursive':!![]}),await rename(_0x364554,_0x48bef5),_0x48bef5;}async function cleanupEmptyDirectories(_0x4b1b99,_0x57ed19){const _0x32fc24=a32_0x53250a;let _0x112c1f=resolve(_0x4b1b99);const _0xbd3c56=resolve(_0x57ed19);while(_0x112c1f[_0x32fc24(0xf3)](''+_0xbd3c56+sep)||_0x112c1f===_0xbd3c56){if(_0x112c1f===_0xbd3c56)return;try{const _0x42fe49=await readdir(_0x112c1f);if(_0x42fe49[_0x32fc24(0xed)]>0x0)return;await rmdir(_0x112c1f);}catch{return;}_0x112c1f=dirname(_0x112c1f);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x5d03a7,_0x4f7639,_0x454a23,_0x54ba03){const _0x22403c=a32_0x53250a;for(let _0x5872a8=0x0;_0x5872a8<DELETE_SETTLE_RETRY_COUNT;_0x5872a8+=0x1){const _0x2cd8e4=await readBffLockFile(_0x5d03a7),_0x121151=!!_0x2cd8e4?.[_0x22403c(0xf7)]?.[_0x4f7639]?.['functions']?.[_0x454a23],_0x1580fa=await fileExists(_0x54ba03);if(!_0x121151&&!_0x1580fa)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x22403c(0x104)+_0x454a23+'.');}
@@ -1 +1 @@
1
- const a33_0x1a53cd=a33_0x4179;function a33_0x4179(_0x5a9cef,_0xe7afea){_0x5a9cef=_0x5a9cef-0x166;const _0x2f062f=a33_0x2f06();let _0x41793e=_0x2f062f[_0x5a9cef];return _0x41793e;}function a33_0x2f06(){const _0x18a2f4=['verbose','6dFWPZf','1771464leWCoQ','num','read','149510kzpvBM','821813VXyFJY','description','appCode','18GTOSWh','updatedTime','178IawhNP','Return\x20full\x20raw\x20script\x20object','number','Script\x20ID','scriptType','2373148rcOsgW','bff','1781810ovFrgb','createdTime','5574128lVrnrX','(none)','detail','Get\x20BFF\x20script\x20details\x20by\x20ID','boolean','9219iEoBWP'];a33_0x2f06=function(){return _0x18a2f4;};return a33_0x2f06();}(function(_0x4c330f,_0x173b72){const _0xa62210=a33_0x4179,_0x4dd89d=_0x4c330f();while(!![]){try{const _0x384caf=parseInt(_0xa62210(0x168))/0x1+-parseInt(_0xa62210(0x16d))/0x2*(parseInt(_0xa62210(0x17b))/0x3)+parseInt(_0xa62210(0x172))/0x4+parseInt(_0xa62210(0x174))/0x5+parseInt(_0xa62210(0x17d))/0x6*(-parseInt(_0xa62210(0x176))/0x7)+-parseInt(_0xa62210(0x17e))/0x8+-parseInt(_0xa62210(0x16b))/0x9*(parseInt(_0xa62210(0x167))/0xa);if(_0x384caf===_0x173b72)break;else _0x4dd89d['push'](_0x4dd89d['shift']());}catch(_0x43b39f){_0x4dd89d['push'](_0x4dd89d['shift']());}}}(a33_0x2f06,0x6df16));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x1a53cd(0x173),'command':a33_0x1a53cd(0x178),'description':a33_0x1a53cd(0x179),'risk':a33_0x1a53cd(0x166),'flags':[{'name':'id','type':a33_0x1a53cd(0x16f),'required':!![],'description':a33_0x1a53cd(0x170)},{'name':'verbose','type':a33_0x1a53cd(0x17a),'description':a33_0x1a53cd(0x16e)}],async 'execute'(_0x24c3b9){const _0x206b12=a33_0x1a53cd,_0x21b6a7=await getBffScriptInfo(_0x24c3b9[_0x206b12(0x17f)]('id')),_0x222364=_0x24c3b9['bool'](_0x206b12(0x17c));if(_0x222364)return{'ok':!![],'data':_0x21b6a7};return{'ok':!![],'data':{'id':_0x21b6a7['id'],'appCode':_0x21b6a7[_0x206b12(0x16a)],'scriptType':_0x21b6a7[_0x206b12(0x171)],'description':_0x21b6a7[_0x206b12(0x169)]||_0x206b12(0x177),'createdTime':_0x21b6a7[_0x206b12(0x175)]??'','updatedTime':_0x21b6a7[_0x206b12(0x16c)]??'','scriptContent':_0x21b6a7['scriptContent']??''}};}};
1
+ function a33_0xcf2c(){const _0x894117=['appCode','745744rUnRsE','433764KlafpQ','4913970neqKDP','bff','detail','9096SetoqC','Get\x20BFF\x20script\x20details\x20by\x20ID','description','44RTbcVZ','num','2296iDXBpr','scriptContent','number','5547546IuTUkv','read','255201uILYBi','verbose','3084752MtFhXG','(none)'];a33_0xcf2c=function(){return _0x894117;};return a33_0xcf2c();}function a33_0x2926(_0x28319e,_0x301f9a){_0x28319e=_0x28319e-0x1d0;const _0xcf2c6f=a33_0xcf2c();let _0x2926c7=_0xcf2c6f[_0x28319e];return _0x2926c7;}const a33_0x15a237=a33_0x2926;(function(_0x5f4763,_0x549804){const _0x5f5498=a33_0x2926,_0x2f9854=_0x5f4763();while(!![]){try{const _0x2f06ba=-parseInt(_0x5f5498(0x1d5))/0x1+-parseInt(_0x5f5498(0x1d4))/0x2+-parseInt(_0x5f5498(0x1e3))/0x3*(-parseInt(_0x5f5498(0x1dc))/0x4)+parseInt(_0x5f5498(0x1d6))/0x5+-parseInt(_0x5f5498(0x1d9))/0x6*(-parseInt(_0x5f5498(0x1de))/0x7)+-parseInt(_0x5f5498(0x1d1))/0x8+-parseInt(_0x5f5498(0x1e1))/0x9;if(_0x2f06ba===_0x549804)break;else _0x2f9854['push'](_0x2f9854['shift']());}catch(_0xea58c3){_0x2f9854['push'](_0x2f9854['shift']());}}}(a33_0xcf2c,0x943b3));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x15a237(0x1d7),'command':a33_0x15a237(0x1d8),'description':a33_0x15a237(0x1da),'risk':a33_0x15a237(0x1e2),'flags':[{'name':'id','type':a33_0x15a237(0x1e0),'required':!![],'description':'Script\x20ID'},{'name':a33_0x15a237(0x1d0),'type':'boolean','description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x13a995){const _0x1ef4d=a33_0x15a237,_0x3fd303=await getBffScriptInfo(_0x13a995[_0x1ef4d(0x1dd)]('id')),_0x5dc705=_0x13a995['bool'](_0x1ef4d(0x1d0));if(_0x5dc705)return{'ok':!![],'data':_0x3fd303};return{'ok':!![],'data':{'id':_0x3fd303['id'],'appCode':_0x3fd303[_0x1ef4d(0x1d3)],'scriptType':_0x3fd303['scriptType'],'description':_0x3fd303[_0x1ef4d(0x1db)]||_0x1ef4d(0x1d2),'createdTime':_0x3fd303['createdTime']??'','updatedTime':_0x3fd303['updatedTime']??'','scriptContent':_0x3fd303[_0x1ef4d(0x1df)]??''}};}};
@@ -1 +1 @@
1
- function a34_0xef6c(_0x3a26bb,_0x5851b5){_0x3a26bb=_0x3a26bb-0x12f;const _0x49a462=a34_0x49a4();let _0xef6c2d=_0x49a462[_0x3a26bb];return _0xef6c2d;}(function(_0x20b670,_0x4f0a17){const _0x4b7e6e=a34_0xef6c,_0x4ebe9b=_0x20b670();while(!![]){try{const _0x39f6dc=-parseInt(_0x4b7e6e(0x130))/0x1+parseInt(_0x4b7e6e(0x138))/0x2*(-parseInt(_0x4b7e6e(0x133))/0x3)+parseInt(_0x4b7e6e(0x131))/0x4*(parseInt(_0x4b7e6e(0x135))/0x5)+parseInt(_0x4b7e6e(0x12f))/0x6+-parseInt(_0x4b7e6e(0x137))/0x7+-parseInt(_0x4b7e6e(0x132))/0x8+-parseInt(_0x4b7e6e(0x136))/0x9*(parseInt(_0x4b7e6e(0x134))/0xa);if(_0x39f6dc===_0x4f0a17)break;else _0x4ebe9b['push'](_0x4ebe9b['shift']());}catch(_0x550677){_0x4ebe9b['push'](_0x4ebe9b['shift']());}}}(a34_0x49a4,0xc4fa5));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';function a34_0x49a4(){const _0x27b1eb=['18572cdhzEN','8425302YHFOMk','1024769iKpqIb','6011156LKiegH','3676136drTAAa','3CcYgoY','20UCnVAP','5EVpKiy','1724670jzJMHd','1563471vDoCHI'];a34_0x49a4=function(){return _0x27b1eb;};return a34_0x49a4();}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0x4b968e,_0x526ae4){const _0x3818de=a34_0x48be,_0x54ef7b=_0x4b968e();while(!![]){try{const _0x5918b9=-parseInt(_0x3818de(0x11d))/0x1+parseInt(_0x3818de(0x11b))/0x2*(-parseInt(_0x3818de(0x121))/0x3)+-parseInt(_0x3818de(0x11f))/0x4*(-parseInt(_0x3818de(0x11a))/0x5)+parseInt(_0x3818de(0x118))/0x6+-parseInt(_0x3818de(0x119))/0x7*(parseInt(_0x3818de(0x11e))/0x8)+-parseInt(_0x3818de(0x122))/0x9+parseInt(_0x3818de(0x120))/0xa*(parseInt(_0x3818de(0x11c))/0xb);if(_0x5918b9===_0x526ae4)break;else _0x54ef7b['push'](_0x54ef7b['shift']());}catch(_0x1a7cea){_0x54ef7b['push'](_0x54ef7b['shift']());}}}(a34_0x4b87,0x2b028));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 a34_0x48be(_0x134f32,_0x39d05e){_0x134f32=_0x134f32-0x118;const _0x4b87fb=a34_0x4b87();let _0x48be46=_0x4b87fb[_0x134f32];return _0x48be46;}function a34_0x4b87(){const _0x406b9e=['20669OlspRn','219272NRpMoa','104312ixDFXx','44360ksebIU','3960cwhMIz','279120fWWFXd','3145167nPMkBF','1171794jIQTGw','70xBohIp','55PnQIcf','4aMwHwx'];a34_0x4b87=function(){return _0x406b9e;};return a34_0x4b87();}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
1
- const a35_0x5035c7=a35_0x569e;function a35_0x51e3(){const _0x6ccb06=['No\x20BFF\x20scripts\x20found.','length','str','8146bRLVBf','7QcHsvD','2311080KAkSBG','(unnamed)','map','3021100DYsVHc','bool','9RUYrnO','name','COMMON','appCode','list','Script\x20type\x20filter','451WTsmxF','86031PJABye','4PbPTJA','ENDPOINT','Return\x20full\x20script\x20objects','141060bdmDpk','bff','description','859505xfhqlC','functionName','111UhUKaW','486930DzdBOF','type','string','verbose'];a35_0x51e3=function(){return _0x6ccb06;};return a35_0x51e3();}(function(_0xec773d,_0x151d53){const _0x280a8d=a35_0x569e,_0x39968d=_0xec773d();while(!![]){try{const _0x1ed885=-parseInt(_0x280a8d(0x121))/0x1*(parseInt(_0x280a8d(0x10a))/0x2)+parseInt(_0x280a8d(0x118))/0x3*(-parseInt(_0x280a8d(0x119))/0x4)+parseInt(_0x280a8d(0x11f))/0x5+-parseInt(_0x280a8d(0x122))/0x6*(-parseInt(_0x280a8d(0x10b))/0x7)+parseInt(_0x280a8d(0x10c))/0x8+-parseInt(_0x280a8d(0x111))/0x9*(parseInt(_0x280a8d(0x10f))/0xa)+parseInt(_0x280a8d(0x117))/0xb*(parseInt(_0x280a8d(0x11c))/0xc);if(_0x1ed885===_0x151d53)break;else _0x39968d['push'](_0x39968d['shift']());}catch(_0x37bf4c){_0x39968d['push'](_0x39968d['shift']());}}}(a35_0x51e3,0x3ad6e));import{listBffScripts}from'../../core/api-client.js';function a35_0x569e(_0xb9a7f3,_0x1527f7){_0xb9a7f3=_0xb9a7f3-0x104;const _0x51e37e=a35_0x51e3();let _0x569e03=_0x51e37e[_0xb9a7f3];return _0x569e03;}export const bffList={'service':a35_0x5035c7(0x11d),'command':a35_0x5035c7(0x115),'description':'List\x20BFF\x20scripts','risk':'read','flags':[{'name':'type','type':a35_0x5035c7(0x105),'description':a35_0x5035c7(0x116),'default':a35_0x5035c7(0x11a),'enum':[a35_0x5035c7(0x11a),a35_0x5035c7(0x113)]},{'name':a35_0x5035c7(0x112),'type':a35_0x5035c7(0x105),'description':'Filter\x20by\x20script\x20name'},{'name':'verbose','type':'boolean','description':a35_0x5035c7(0x11b)}],async 'execute'(_0x5e4236){const _0x5d9042=a35_0x5035c7,_0x5d463a=await listBffScripts(_0x5e4236[_0x5d9042(0x114)],_0x5e4236['str'](_0x5d9042(0x104)),{'scriptName':_0x5e4236[_0x5d9042(0x109)]('name')||undefined}),_0x200cbd=_0x5e4236[_0x5d9042(0x110)](_0x5d9042(0x106));return{'ok':!![],'data':_0x200cbd?_0x5d463a:_0x5d463a[_0x5d9042(0x10e)](_0x265aa6=>({'id':_0x265aa6['id'],'functionName':_0x265aa6[_0x5d9042(0x120)]??'','description':_0x265aa6[_0x5d9042(0x11e)]||_0x5d9042(0x10d),'scriptType':_0x265aa6['scriptType']})),'message':_0x5d463a[_0x5d9042(0x108)]===0x0?_0x5d9042(0x107):undefined};}};
1
+ const a35_0x467508=a35_0x2a81;function a35_0x2a81(_0x495f5a,_0x9b0a20){_0x495f5a=_0x495f5a-0x186;const _0x35e6d=a35_0x35e6();let _0x2a8145=_0x35e6d[_0x495f5a];return _0x2a8145;}(function(_0x2c43b6,_0x2e5117){const _0x996f28=a35_0x2a81,_0x2f1802=_0x2c43b6();while(!![]){try{const _0x3196a2=-parseInt(_0x996f28(0x188))/0x1*(-parseInt(_0x996f28(0x18d))/0x2)+-parseInt(_0x996f28(0x192))/0x3*(parseInt(_0x996f28(0x19e))/0x4)+parseInt(_0x996f28(0x199))/0x5*(parseInt(_0x996f28(0x1a4))/0x6)+parseInt(_0x996f28(0x197))/0x7+parseInt(_0x996f28(0x1a2))/0x8*(-parseInt(_0x996f28(0x196))/0x9)+parseInt(_0x996f28(0x18b))/0xa+-parseInt(_0x996f28(0x198))/0xb;if(_0x3196a2===_0x2e5117)break;else _0x2f1802['push'](_0x2f1802['shift']());}catch(_0x3c5045){_0x2f1802['push'](_0x2f1802['shift']());}}}(a35_0x35e6,0xa1485));import{listBffScripts}from'../../core/api-client.js';function a35_0x35e6(){const _0x47a710=['list','str','List\x20BFF\x20scripts','No\x20BFF\x20scripts\x20found.','31827BRtAdZ','ENDPOINT','verbose','Return\x20full\x20script\x20objects','9YHNeoM','7654059KSZsoK','24730013juutnc','85YLZZhV','read','string','bool','scriptType','156VwJtrb','length','boolean','functionName','4148248KTClfH','description','369858JblagC','type','Filter\x20by\x20script\x20name','1024843pOPlcV','appCode','bff','6748670NXMiLD','name','2lVVlTi'];a35_0x35e6=function(){return _0x47a710;};return a35_0x35e6();}export const bffList={'service':a35_0x467508(0x18a),'command':a35_0x467508(0x18e),'description':a35_0x467508(0x190),'risk':a35_0x467508(0x19a),'flags':[{'name':a35_0x467508(0x186),'type':a35_0x467508(0x19b),'description':'Script\x20type\x20filter','default':'ENDPOINT','enum':[a35_0x467508(0x193),'COMMON']},{'name':'name','type':'string','description':a35_0x467508(0x187)},{'name':a35_0x467508(0x194),'type':a35_0x467508(0x1a0),'description':a35_0x467508(0x195)}],async 'execute'(_0x408d92){const _0xa5eb94=a35_0x467508,_0x4dccdc=await listBffScripts(_0x408d92[_0xa5eb94(0x189)],_0x408d92[_0xa5eb94(0x18f)]('type'),{'scriptName':_0x408d92['str'](_0xa5eb94(0x18c))||undefined}),_0x4f3642=_0x408d92[_0xa5eb94(0x19c)](_0xa5eb94(0x194));return{'ok':!![],'data':_0x4f3642?_0x4dccdc:_0x4dccdc['map'](_0xed1b4a=>({'id':_0xed1b4a['id'],'functionName':_0xed1b4a[_0xa5eb94(0x1a1)]??'','description':_0xed1b4a[_0xa5eb94(0x1a3)]||'(unnamed)','scriptType':_0xed1b4a[_0xa5eb94(0x19d)]})),'message':_0x4dccdc[_0xa5eb94(0x19f)]===0x0?_0xa5eb94(0x191):undefined};}};