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

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 (259) 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/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -0
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/regroup-start.js +1 -1
  109. package/lib/commands/menu/shared/compare-table.js +1 -1
  110. package/lib/commands/menu/shared/delete-plan.js +1 -1
  111. package/lib/commands/menu/shared/facts.js +1 -1
  112. package/lib/commands/menu/shared/index.js +1 -1
  113. package/lib/commands/menu/shared/inquirer.js +1 -1
  114. package/lib/commands/menu/shared/local-pages.js +1 -1
  115. package/lib/commands/menu/shared/logic.js +1 -1
  116. package/lib/commands/menu/shared/mutations.js +1 -1
  117. package/lib/commands/menu/shared/service.js +1 -1
  118. package/lib/commands/menu/shared/sync-core.js +1 -1
  119. package/lib/commands/menu/shared/update-core.js +1 -1
  120. package/lib/commands/menu/shared/valid-url.js +1 -1
  121. package/lib/commands/menu/sync.js +1 -1
  122. package/lib/commands/menu/update.js +1 -1
  123. package/lib/commands/notification/config-list.js +1 -1
  124. package/lib/commands/notification/index.js +1 -1
  125. package/lib/commands/page/generate-start.js +1 -1
  126. package/lib/commands/page/generate-status.js +1 -1
  127. package/lib/commands/page/index.js +1 -1
  128. package/lib/commands/page/pull.js +1 -1
  129. package/lib/commands/page/push.js +1 -1
  130. package/lib/commands/page/relation-audit.js +1 -1
  131. package/lib/commands/page/shared.js +1 -1
  132. package/lib/commands/page/standard-page-status.js +1 -1
  133. package/lib/commands/page/sync.js +1 -1
  134. package/lib/commands/permit/index.js +1 -1
  135. package/lib/commands/permit/page-get.js +1 -1
  136. package/lib/commands/permit/page-set.js +1 -1
  137. package/lib/commands/permit/role-apis-set.js +1 -1
  138. package/lib/commands/permit/role-menus-set.js +1 -1
  139. package/lib/commands/permit/role-menus.js +1 -1
  140. package/lib/commands/permit/shared.js +1 -1
  141. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  142. package/lib/commands/project/create/format-elapsed.js +1 -1
  143. package/lib/commands/project/create/main.js +1 -1
  144. package/lib/commands/project/create/non-interactive.js +1 -1
  145. package/lib/commands/project/create/project-template-path.js +1 -1
  146. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  147. package/lib/commands/project/create/use-format-code.js +1 -1
  148. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  149. package/lib/commands/project/index.js +1 -1
  150. package/lib/commands/project/init.js +1 -1
  151. package/lib/commands/project/upgrade.js +1 -1
  152. package/lib/commands/registry.js +1 -1
  153. package/lib/commands/role/create.js +1 -1
  154. package/lib/commands/role/delete.js +1 -1
  155. package/lib/commands/role/detail.js +1 -1
  156. package/lib/commands/role/index.js +1 -1
  157. package/lib/commands/role/list.js +1 -1
  158. package/lib/commands/role/shared.js +1 -1
  159. package/lib/commands/role/update.js +1 -1
  160. package/lib/commands/role/user-add.js +1 -1
  161. package/lib/commands/role/user-remove.js +1 -1
  162. package/lib/commands/role/user-resolve.js +1 -1
  163. package/lib/commands/run/index.js +1 -1
  164. package/lib/commands/schema.js +1 -1
  165. package/lib/commands/sql/create.js +1 -1
  166. package/lib/commands/sql/delete.js +1 -1
  167. package/lib/commands/sql/detail.js +1 -1
  168. package/lib/commands/sql/exec.js +1 -1
  169. package/lib/commands/sql/index.js +1 -1
  170. package/lib/commands/sql/list.js +1 -1
  171. package/lib/commands/sql/pull.js +1 -1
  172. package/lib/commands/sql/push.js +1 -1
  173. package/lib/commands/sql/save.js +1 -1
  174. package/lib/commands/sql/shared.js +1 -1
  175. package/lib/commands/sql/status.js +1 -1
  176. package/lib/commands/sql/validate.js +1 -1
  177. package/lib/commands/task/index.js +1 -1
  178. package/lib/commands/task/status.js +1 -1
  179. package/lib/commands/workspace/add.js +1 -1
  180. package/lib/commands/workspace/index.js +1 -1
  181. package/lib/commands/workspace/remove.js +1 -1
  182. package/lib/config/schema.js +1 -1
  183. package/lib/constant/cdn.js +1 -1
  184. package/lib/constant/cli.js +1 -1
  185. package/lib/constant/defaults.js +1 -1
  186. package/lib/constant/domain.js +1 -1
  187. package/lib/constant/env.js +1 -1
  188. package/lib/constant/output.js +1 -1
  189. package/lib/constant/paths.js +1 -1
  190. package/lib/constant/risk.js +1 -1
  191. package/lib/context/app-resolver.js +1 -1
  192. package/lib/context/auth-resolver.js +1 -1
  193. package/lib/context/config-loader.js +1 -1
  194. package/lib/context.js +1 -1
  195. package/lib/core/alias-resolver.js +1 -1
  196. package/lib/core/api-client.js +1 -1
  197. package/lib/core/bff/config.js +1 -1
  198. package/lib/core/bff/file-system.js +1 -1
  199. package/lib/core/bff/hash.js +1 -1
  200. package/lib/core/bff/lock.js +1 -1
  201. package/lib/core/bff/utils.js +1 -1
  202. package/lib/core/db-resolver.js +1 -1
  203. package/lib/core/page/file-system.js +1 -1
  204. package/lib/core/page/hash.js +1 -1
  205. package/lib/core/page/lock.js +1 -1
  206. package/lib/core/sql-index-auditor.js +1 -1
  207. package/lib/core/sql-sync/config.js +1 -1
  208. package/lib/core/sql-sync/file-system.js +1 -1
  209. package/lib/core/sql-sync/hash.js +1 -1
  210. package/lib/core/sql-sync/lock.js +1 -1
  211. package/lib/core/sql-sync/utils.js +1 -1
  212. package/lib/core/sql-validator.js +1 -1
  213. package/lib/errors.js +1 -1
  214. package/lib/framework/build-all-flags.js +1 -1
  215. package/lib/framework/error-output.js +1 -1
  216. package/lib/framework/explicit-yes.js +1 -1
  217. package/lib/framework/flags.js +1 -1
  218. package/lib/framework/help.js +1 -1
  219. package/lib/framework/index.js +1 -1
  220. package/lib/framework/output.js +1 -1
  221. package/lib/framework/response.js +1 -1
  222. package/lib/framework/runner-alias.js +1 -1
  223. package/lib/framework/runner.js +1 -1
  224. package/lib/framework/schema-export.js +1 -1
  225. package/lib/framework/types.js +1 -1
  226. package/lib/generated/build-info.js +1 -1
  227. package/lib/help.js +1 -1
  228. package/lib/skills/main.js +1 -1
  229. package/lib/skills/npx-skills-add.js +1 -1
  230. package/lib/telemetry/cli-command-trace.js +1 -1
  231. package/lib/telemetry/cli-help-trace.js +1 -1
  232. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  233. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  234. package/lib/telemetry/send-cli-trace-log.js +1 -1
  235. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  236. package/lib/utils/ai_config.js +1 -1
  237. package/lib/utils/apply-jq-filter.js +1 -1
  238. package/lib/utils/cdn-config.js +1 -1
  239. package/lib/utils/check-sdk-version.js +1 -1
  240. package/lib/utils/cli-version-check.js +1 -1
  241. package/lib/utils/cli-version-policy.js +1 -1
  242. package/lib/utils/config.js +1 -1
  243. package/lib/utils/copy-directory.js +1 -1
  244. package/lib/utils/entity-with-id.js +1 -1
  245. package/lib/utils/file-utils.js +1 -1
  246. package/lib/utils/guides-cdn.js +1 -1
  247. package/lib/utils/http-client.js +1 -1
  248. package/lib/utils/is-non-interactive.js +1 -1
  249. package/lib/utils/logger.js +1 -1
  250. package/lib/utils/params.js +1 -1
  251. package/lib/utils/platform.js +1 -1
  252. package/lib/utils/rules-cdn.js +1 -1
  253. package/lib/utils/sleep.js +1 -1
  254. package/lib/utils/template-replacer.js +1 -1
  255. package/lib/utils/update-notice.js +1 -1
  256. package/lib/utils/version.js +1 -1
  257. package/lib/utils/with-active-cookie.js +1 -1
  258. package/lib/utils/write-cli-side-channel.js +1 -1
  259. package/package.json +1 -1
@@ -1 +1 @@
1
- const a20_0x3f859c=a20_0x12d6;(function(_0x554662,_0xa0d02e){const _0x4a8ff0=a20_0x12d6,_0x513a0e=_0x554662();while(!![]){try{const _0x492a0e=-parseInt(_0x4a8ff0(0x1b7))/0x1*(-parseInt(_0x4a8ff0(0x1bf))/0x2)+parseInt(_0x4a8ff0(0x1bc))/0x3*(parseInt(_0x4a8ff0(0x1af))/0x4)+-parseInt(_0x4a8ff0(0x1b2))/0x5+parseInt(_0x4a8ff0(0x1ca))/0x6+parseInt(_0x4a8ff0(0x1ac))/0x7*(-parseInt(_0x4a8ff0(0x1b5))/0x8)+parseInt(_0x4a8ff0(0x1c9))/0x9*(parseInt(_0x4a8ff0(0x1c0))/0xa)+-parseInt(_0x4a8ff0(0x1ba))/0xb*(parseInt(_0x4a8ff0(0x1ae))/0xc);if(_0x492a0e===_0xa0d02e)break;else _0x513a0e['push'](_0x513a0e['shift']());}catch(_0x1f41b5){_0x513a0e['push'](_0x513a0e['shift']());}}}(a20_0x1507,0x3e47b));import{readRawConfigWithLayers}from'../../context.js';function a20_0x12d6(_0x7ec381,_0x646aa2){_0x7ec381=_0x7ec381-0x1a6;const _0x150736=a20_0x1507();let _0x12d627=_0x150736[_0x7ec381];return _0x12d627;}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(_0x1e8f8b,_0x2a9233){const _0x6b3944=a20_0x12d6,_0x4ccfe5=[],_0x4e556d=_0x1e8f8b[_0x6b3944(0x1b4)]&&typeof _0x1e8f8b['apps']===_0x6b3944(0x1b0)?_0x1e8f8b[_0x6b3944(0x1b4)]:{},_0x496fdc=_0x1e8f8b['defaultApp']||undefined;for(const [_0x5509b0,_0x19a390]of Object[_0x6b3944(0x1cd)](_0x4e556d)){if(!_0x19a390||typeof _0x19a390!==_0x6b3944(0x1b0)||!_0x19a390[_0x6b3944(0x1a8)])continue;_0x4ccfe5[_0x6b3944(0x1b8)]({'name':_0x5509b0,'appcode':_0x19a390[_0x6b3944(0x1a8)],'named':!![],'definedIn':_0x2a9233,'isDefault':_0x5509b0===_0x496fdc,...buildAppProfileListFields(_0x19a390)});}return _0x4ccfe5;}function buildMergedItems(_0x5bc472,_0xd0f3c4){const _0x34cb09=a20_0x12d6,{apps:apps={},defaultApp:_0x204c3d}=_0x5bc472,_0x52871e=_0xd0f3c4[_0x34cb09(0x1a6)][_0x34cb09(0x1b4)]&&typeof _0xd0f3c4[_0x34cb09(0x1a6)][_0x34cb09(0x1b4)]===_0x34cb09(0x1b0)?_0xd0f3c4[_0x34cb09(0x1a6)][_0x34cb09(0x1b4)]:{},_0x123805=_0xd0f3c4['projectConfig'][_0x34cb09(0x1b4)]&&typeof _0xd0f3c4[_0x34cb09(0x1c3)][_0x34cb09(0x1b4)]===_0x34cb09(0x1b0)?_0xd0f3c4[_0x34cb09(0x1c3)]['apps']:{},_0xb2007d=_0xd0f3c4[_0x34cb09(0x1c3)][_0x34cb09(0x1ab)]===![],_0x14e46f=Object[_0x34cb09(0x1cd)](apps),_0x3da2df=_0x14e46f[_0x34cb09(0x1b3)](([_0x183d89,_0x6129ab])=>({'name':_0x183d89,'appcode':_0x6129ab['appcode'],'named':!![],'definedIn':appDefinedIn(_0x183d89,_0x52871e,_0x123805,_0xb2007d),'isDefault':_0x183d89===_0x204c3d,...buildAppProfileListFields(_0x6129ab)}));return _0x3da2df;}function validateAppListFlags(_0x4a929d){const _0x406fda=a20_0x12d6;if(!_0x4a929d['bool'](_0x406fda(0x1a9)))return;if(!_0x4a929d[_0x406fda(0x1bb)]('global')&&!_0x4a929d[_0x406fda(0x1bb)]('project'))return;throw CliErrors[_0x406fda(0x1b1)](_0x406fda(0x1be),'Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.');}async function execute(_0x46dd0d){const _0x39ebab=a20_0x12d6;validateAppListFlags(_0x46dd0d);if(_0x46dd0d[_0x39ebab(0x1bb)]('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x46dd0d)};const _0x564621=_0x46dd0d['bool'](_0x39ebab(0x1cc)),_0x2f201a=_0x46dd0d[_0x39ebab(0x1bb)](_0x39ebab(0x1c7)),_0x51bd3f=_0x564621?'global':_0x2f201a?_0x39ebab(0x1c7):_0x39ebab(0x1bd),{config:_0x171c40,layers:_0x3cb92c}=readRawConfigWithLayers(),_0x50e6d8=resolveDefaultAppSource(_0x3cb92c),{defaultApp:_0x15757a}=_0x171c40;let _0x198a6a,_0x5f1a1e;switch(_0x51bd3f){case'global':_0x198a6a=buildItemsFromLayer(_0x3cb92c['globalConfig'],_0x39ebab(0x1cc)),_0x5f1a1e=_0x3cb92c[_0x39ebab(0x1cb)];break;case _0x39ebab(0x1c7):_0x198a6a=buildItemsFromLayer(_0x3cb92c[_0x39ebab(0x1c3)],_0x39ebab(0x1c7)),_0x5f1a1e=_0x3cb92c[_0x39ebab(0x1c5)];break;default:_0x198a6a=buildMergedItems(_0x171c40,_0x3cb92c);break;}enrichAppListItemsWithMergedSelection(_0x198a6a,_0x46dd0d[_0x39ebab(0x1aa)]);if(_0x198a6a['length']===0x0){const _0x412563=_0x51bd3f===_0x39ebab(0x1bd)?'':_0x39ebab(0x1a7)+_0x51bd3f+_0x39ebab(0x1c8);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x412563+_0x39ebab(0x1c4)+CLI_BIN_NAME+'\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.'};}const _0x1fa319=_0x198a6a[_0x39ebab(0x1c2)](_0x54aea3=>_0x54aea3['isCurrent']===!![]),_0x1e849a=_0x15757a??_0x1fa319?.[_0x39ebab(0x1a8)]??null,_0x5edafe=_0x51bd3f===_0x39ebab(0x1bd)?{'globalPath':_0x3cb92c[_0x39ebab(0x1cb)]??null,'projectPath':_0x3cb92c[_0x39ebab(0x1c5)]??null,'defaultApp':_0x1e849a,'defaultAppSource':_0x15757a!=null?_0x50e6d8:null}:{'scope':_0x51bd3f,'configPath':_0x5f1a1e??null};return{'ok':!![],'data':{'items':_0x198a6a,'meta':_0x5edafe}};}function a20_0x1507(){const _0xcbbf8e=['remote','mergedCli','inherit','833OjAIHh','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','12yyYOWk','20pehoGQ','object','validation','1853295ublETH','map','apps','18664XLTOAu','app','86qwGxMK','push','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','3012933AItfNJ','bool','282732fGQZie','merged','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','1306MZsBHZ','2474770ymPwIs','read','find','projectConfig','.\x20Use\x20`','projectPath','boolean','project','\x20config','18Nwpblv','929736MXtTVu','globalPath','global','entries','globalConfig','\x20in\x20','appcode'];a20_0x1507=function(){return _0xcbbf8e;};return a20_0x1507();}export const appListDefinition={'service':a20_0x3f859c(0x1b6),'command':'list','description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x3f859c(0x1c1),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x3f859c(0x1a9),'type':a20_0x3f859c(0x1c6),'description':a20_0x3f859c(0x1ad),'default':![]},{'name':a20_0x3f859c(0x1cc),'type':a20_0x3f859c(0x1c6),'description':'Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','default':![]},{'name':a20_0x3f859c(0x1c7),'type':'boolean','description':a20_0x3f859c(0x1b9),'default':![]}],async 'validate'(_0x578f3a){validateAppListFlags(_0x578f3a);},'execute':execute};
1
+ function a20_0x226f(_0x26771f,_0x2389ee){_0x26771f=_0x26771f-0x131;const _0x318a85=a20_0x318a();let _0x226fdf=_0x318a85[_0x26771f];return _0x226fdf;}const a20_0x4535b8=a20_0x226f;(function(_0x519551,_0x219960){const _0x346348=a20_0x226f,_0x3d6a79=_0x519551();while(!![]){try{const _0x224d2d=-parseInt(_0x346348(0x137))/0x1+parseInt(_0x346348(0x154))/0x2*(parseInt(_0x346348(0x157))/0x3)+-parseInt(_0x346348(0x144))/0x4*(-parseInt(_0x346348(0x133))/0x5)+-parseInt(_0x346348(0x149))/0x6+parseInt(_0x346348(0x138))/0x7+-parseInt(_0x346348(0x148))/0x8*(-parseInt(_0x346348(0x152))/0x9)+parseInt(_0x346348(0x136))/0xa*(-parseInt(_0x346348(0x13c))/0xb);if(_0x224d2d===_0x219960)break;else _0x3d6a79['push'](_0x3d6a79['shift']());}catch(_0x330a39){_0x3d6a79['push'](_0x3d6a79['shift']());}}}(a20_0x318a,0x489b0));import{readRawConfigWithLayers}from'../../context.js';function a20_0x318a(){const _0x111f36=['object','6824bBcFfO','2944482yADNUV','bool','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','project','read','validation','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','\x20config','merged','5238aVUXcs','map','175394sknFyY','globalConfig','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','6ynZica','globalPath','mergedCli','appcode','apps','push','find','entries','605XCfMMd','inherit','projectPath','10WLpLJJ','154128xESqgL','2441859OGJcBW','app','remote','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','957011fZyaYE','No\x20apps\x20configured','optional','.\x20Use\x20`','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','length','boolean','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','284vTmoZO','global','projectConfig'];a20_0x318a=function(){return _0x111f36;};return a20_0x318a();}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(_0x2e9ddd,_0x13da31){const _0x33f5d5=a20_0x226f,_0x30d180=[],_0x1be317=_0x2e9ddd[_0x33f5d5(0x15b)]&&typeof _0x2e9ddd['apps']===_0x33f5d5(0x147)?_0x2e9ddd['apps']:{},_0x52a017=_0x2e9ddd['defaultApp']||undefined;for(const [_0xc92f73,_0x190608]of Object[_0x33f5d5(0x132)](_0x1be317)){if(!_0x190608||typeof _0x190608!==_0x33f5d5(0x147)||!_0x190608['appcode'])continue;_0x30d180[_0x33f5d5(0x15c)]({'name':_0xc92f73,'appcode':_0x190608[_0x33f5d5(0x15a)],'named':!![],'definedIn':_0x13da31,'isDefault':_0xc92f73===_0x52a017,...buildAppProfileListFields(_0x190608)});}return _0x30d180;}function buildMergedItems(_0x4da33c,_0x26fb9a){const _0x49e1ec=a20_0x226f,{apps:apps={},defaultApp:_0x13e443}=_0x4da33c,_0x52670c=_0x26fb9a[_0x49e1ec(0x155)][_0x49e1ec(0x15b)]&&typeof _0x26fb9a[_0x49e1ec(0x155)][_0x49e1ec(0x15b)]===_0x49e1ec(0x147)?_0x26fb9a[_0x49e1ec(0x155)][_0x49e1ec(0x15b)]:{},_0x4e911d=_0x26fb9a[_0x49e1ec(0x146)][_0x49e1ec(0x15b)]&&typeof _0x26fb9a[_0x49e1ec(0x146)]['apps']==='object'?_0x26fb9a[_0x49e1ec(0x146)][_0x49e1ec(0x15b)]:{},_0x27a07c=_0x26fb9a[_0x49e1ec(0x146)][_0x49e1ec(0x134)]===![],_0xc0e968=Object[_0x49e1ec(0x132)](apps),_0x181deb=_0xc0e968[_0x49e1ec(0x153)](([_0x3c58e1,_0x2a6cf9])=>({'name':_0x3c58e1,'appcode':_0x2a6cf9[_0x49e1ec(0x15a)],'named':!![],'definedIn':appDefinedIn(_0x3c58e1,_0x52670c,_0x4e911d,_0x27a07c),'isDefault':_0x3c58e1===_0x13e443,...buildAppProfileListFields(_0x2a6cf9)}));return _0x181deb;}function validateAppListFlags(_0x2780bf){const _0x5f2167=a20_0x226f;if(!_0x2780bf[_0x5f2167(0x14a)](_0x5f2167(0x13a)))return;if(!_0x2780bf['bool'](_0x5f2167(0x145))&&!_0x2780bf['bool'](_0x5f2167(0x14c)))return;throw CliErrors[_0x5f2167(0x14e)](_0x5f2167(0x14f),_0x5f2167(0x13b));}async function execute(_0x7bd420){const _0x457765=a20_0x226f;validateAppListFlags(_0x7bd420);if(_0x7bd420[_0x457765(0x14a)](_0x457765(0x13a)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x7bd420)};const _0x440986=_0x7bd420[_0x457765(0x14a)](_0x457765(0x145)),_0x5a5a4e=_0x7bd420['bool'](_0x457765(0x14c)),_0x8caa6f=_0x440986?_0x457765(0x145):_0x5a5a4e?_0x457765(0x14c):_0x457765(0x151),{config:_0x3a4173,layers:_0x35c2c1}=readRawConfigWithLayers(),_0x181f81=resolveDefaultAppSource(_0x35c2c1),{defaultApp:_0x1d128e}=_0x3a4173;let _0xb4e8bc,_0xf41199;switch(_0x8caa6f){case'global':_0xb4e8bc=buildItemsFromLayer(_0x35c2c1['globalConfig'],_0x457765(0x145)),_0xf41199=_0x35c2c1['globalPath'];break;case _0x457765(0x14c):_0xb4e8bc=buildItemsFromLayer(_0x35c2c1[_0x457765(0x146)],_0x457765(0x14c)),_0xf41199=_0x35c2c1[_0x457765(0x135)];break;default:_0xb4e8bc=buildMergedItems(_0x3a4173,_0x35c2c1);break;}enrichAppListItemsWithMergedSelection(_0xb4e8bc,_0x7bd420[_0x457765(0x159)]);if(_0xb4e8bc[_0x457765(0x141)]===0x0){const _0xfd6c95=_0x8caa6f==='merged'?'':'\x20in\x20'+_0x8caa6f+_0x457765(0x150);return{'ok':!![],'data':[],'message':_0x457765(0x13d)+_0xfd6c95+_0x457765(0x13f)+CLI_BIN_NAME+_0x457765(0x156)};}const _0x2138d1=_0xb4e8bc[_0x457765(0x131)](_0x1b6eb8=>_0x1b6eb8['isCurrent']===!![]),_0xc19fb4=_0x1d128e??_0x2138d1?.[_0x457765(0x15a)]??null,_0x391dd2=_0x8caa6f===_0x457765(0x151)?{'globalPath':_0x35c2c1[_0x457765(0x158)]??null,'projectPath':_0x35c2c1[_0x457765(0x135)]??null,'defaultApp':_0xc19fb4,'defaultAppSource':_0x1d128e!=null?_0x181f81:null}:{'scope':_0x8caa6f,'configPath':_0xf41199??null};return{'ok':!![],'data':{'items':_0xb4e8bc,'meta':_0x391dd2}};}export const appListDefinition={'service':a20_0x4535b8(0x139),'command':'list','description':'List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','risk':a20_0x4535b8(0x14d),'auth':a20_0x4535b8(0x13e),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x4535b8(0x13a),'type':a20_0x4535b8(0x142),'description':a20_0x4535b8(0x140),'default':![]},{'name':a20_0x4535b8(0x145),'type':a20_0x4535b8(0x142),'description':a20_0x4535b8(0x14b),'default':![]},{'name':'project','type':'boolean','description':a20_0x4535b8(0x143),'default':![]}],async 'validate'(_0x58b085){validateAppListFlags(_0x58b085);},'execute':execute};
@@ -1 +1 @@
1
- (function(_0x40dfe9,_0x3a4acc){const _0x51b3c9=a21_0x5208,_0x3d7d37=_0x40dfe9();while(!![]){try{const _0x2c5574=parseInt(_0x51b3c9(0xac))/0x1*(-parseInt(_0x51b3c9(0xb9))/0x2)+parseInt(_0x51b3c9(0xb1))/0x3*(parseInt(_0x51b3c9(0xb5))/0x4)+parseInt(_0x51b3c9(0xb8))/0x5+-parseInt(_0x51b3c9(0xae))/0x6+parseInt(_0x51b3c9(0xb7))/0x7+parseInt(_0x51b3c9(0xaf))/0x8*(-parseInt(_0x51b3c9(0xad))/0x9)+parseInt(_0x51b3c9(0xb2))/0xa;if(_0x2c5574===_0x3a4acc)break;else _0x3d7d37['push'](_0x3d7d37['shift']());}catch(_0x200623){_0x3d7d37['push'](_0x3d7d37['shift']());}}}(a21_0x214b,0x9381b));function a21_0x214b(){const _0x13fd53=['cookie','3077011rehKaj','1452685MvKmAo','26IZslUK','authRequired','34320uJIftm','1580427ClECLU','5227182kiZeZR','16PzEkhn','map','5118plTVzW','4115620XAoMTi','appName','appDesc','2652NbYFSq'];a21_0x214b=function(){return _0x13fd53;};return a21_0x214b();}import{listRemoteApps}from'../../core/api-client.js';function a21_0x5208(_0xe1562b,_0x2eaccb){_0xe1562b=_0xe1562b-0xab;const _0x214b27=a21_0x214b();let _0x52087f=_0x214b27[_0xe1562b];return _0x52087f;}import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x2fc682){const _0x28f37d=a21_0x5208,_0x8a9ccc=_0x2fc682[_0x28f37d(0xb6)]||getCookie();if(!_0x8a9ccc)throw CliErrors[_0x28f37d(0xab)]();return _0x8a9ccc;}export async function listRemoteAppDirectory(_0x5b89c1){const _0x2d071b=a21_0x5208,_0x4031bc=await withActiveCookie(resolveCookie(_0x5b89c1),()=>listRemoteApps());return{'items':_0x4031bc[_0x2d071b(0xb0)](_0x74f498=>({..._0x74f498['id']!=null?{'id':_0x74f498['id']}:{},'appCode':_0x74f498['appCode'],'appName':_0x74f498[_0x2d071b(0xb3)],..._0x74f498[_0x2d071b(0xb4)]!=null?{'appDesc':_0x74f498['appDesc']}:{}})),'meta':{'source':'platform'}};}
1
+ function a21_0x4ef3(){const _0x478e69=['8412850pHQrsW','appName','15206049rJyzhy','1980iYJCCl','10bqKlkW','120827NaWITg','5204568bOuHfY','4uyPbYl','632EXhfLB','8IRPTgc','platform','757762WrKiXk','appDesc','authRequired','2566401ABdYzJ','195646sgNaPi','appCode'];a21_0x4ef3=function(){return _0x478e69;};return a21_0x4ef3();}function a21_0x5bf7(_0x583fe3,_0x4b9fff){_0x583fe3=_0x583fe3-0x78;const _0x4ef3ec=a21_0x4ef3();let _0x5bf7b4=_0x4ef3ec[_0x583fe3];return _0x5bf7b4;}(function(_0x1a2378,_0xf67bd8){const _0x4d6f80=a21_0x5bf7,_0x56f3c7=_0x1a2378();while(!![]){try{const _0x3b534c=parseInt(_0x4d6f80(0x7b))/0x1*(-parseInt(_0x4d6f80(0x7f))/0x2)+parseInt(_0x4d6f80(0x82))/0x3*(parseInt(_0x4d6f80(0x7d))/0x4)+-parseInt(_0x4d6f80(0x85))/0x5+-parseInt(_0x4d6f80(0x7a))/0x6+-parseInt(_0x4d6f80(0x79))/0x7*(parseInt(_0x4d6f80(0x7c))/0x8)+-parseInt(_0x4d6f80(0x87))/0x9*(-parseInt(_0x4d6f80(0x78))/0xa)+-parseInt(_0x4d6f80(0x83))/0xb*(-parseInt(_0x4d6f80(0x88))/0xc);if(_0x3b534c===_0xf67bd8)break;else _0x56f3c7['push'](_0x56f3c7['shift']());}catch(_0x17f7e6){_0x56f3c7['push'](_0x56f3c7['shift']());}}}(a21_0x4ef3,0xdd33c));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x5d0d8e){const _0x172698=a21_0x5bf7,_0x149d8e=_0x5d0d8e['cookie']||getCookie();if(!_0x149d8e)throw CliErrors[_0x172698(0x81)]();return _0x149d8e;}export async function listRemoteAppDirectory(_0x4ddb0e){const _0x46d700=a21_0x5bf7,_0x1c23cd=await withActiveCookie(resolveCookie(_0x4ddb0e),()=>listRemoteApps());return{'items':_0x1c23cd['map'](_0x322dc8=>({..._0x322dc8['id']!=null?{'id':_0x322dc8['id']}:{},'appCode':_0x322dc8[_0x46d700(0x84)],'appName':_0x322dc8[_0x46d700(0x86)],..._0x322dc8[_0x46d700(0x80)]!=null?{'appDesc':_0x322dc8[_0x46d700(0x80)]}:{}})),'meta':{'source':_0x46d700(0x7e)}};}
@@ -1 +1 @@
1
- function a22_0x4c62(){const _0x43b83a=['Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','remove','210310raCnGA','27lzMrHj','1570535lDAFBa','3624418KsmmbI','44872ccZkGp','12WpfCAx','281508kjnwkN','name','app\x20remove','673096cjUUZL','882PPZSJi','2026-07','App\x20profile\x20name\x20to\x20remove','429vtyZUm','474808SzXsXE','\x20workspace\x20remove'];a22_0x4c62=function(){return _0x43b83a;};return a22_0x4c62();}const a22_0x13467b=a22_0x4b6a;(function(_0xe0662f,_0x1524b9){const _0x9f9fa6=a22_0x4b6a,_0x5c14d7=_0xe0662f();while(!![]){try{const _0x4911cc=-parseInt(_0x9f9fa6(0x1a6))/0x1+parseInt(_0x9f9fa6(0x199))/0x2+parseInt(_0x9f9fa6(0x19e))/0x3*(parseInt(_0x9f9fa6(0x1a3))/0x4)+parseInt(_0x9f9fa6(0x19f))/0x5*(-parseInt(_0x9f9fa6(0x1a2))/0x6)+parseInt(_0x9f9fa6(0x1a0))/0x7+-parseInt(_0x9f9fa6(0x1a1))/0x8*(parseInt(_0x9f9fa6(0x1a7))/0x9)+parseInt(_0x9f9fa6(0x19d))/0xa*(parseInt(_0x9f9fa6(0x198))/0xb);if(_0x4911cc===_0x1524b9)break;else _0x5c14d7['push'](_0x5c14d7['shift']());}catch(_0x2fb971){_0x5c14d7['push'](_0x5c14d7['shift']());}}}(a22_0x4c62,0x5759c));import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x4b6a(_0x2d7ff0,_0x384dfc){_0x2d7ff0=_0x2d7ff0-0x198;const _0x4c62ca=a22_0x4c62();let _0x4b6ab2=_0x4c62ca[_0x2d7ff0];return _0x4b6ab2;}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':'app','command':a22_0x13467b(0x19c),'description':a22_0x13467b(0x19b),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x13467b(0x19a),'since':a22_0x13467b(0x1a8)},'args':[{'name':a22_0x13467b(0x1a4),'description':a22_0x13467b(0x1a9),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x1e2cb4=>validateAppName(_0x1e2cb4,a22_0x13467b(0x1a5)),'execute':_0xcd787c=>runAppRemove(_0xcd787c,a22_0x13467b(0x1a5))};
1
+ const a22_0x501e50=a22_0x4963;(function(_0x444eb0,_0x2ba695){const _0x4f4f74=a22_0x4963,_0x31c5e2=_0x444eb0();while(!![]){try{const _0x3dc5f0=parseInt(_0x4f4f74(0x1e8))/0x1*(-parseInt(_0x4f4f74(0x1eb))/0x2)+-parseInt(_0x4f4f74(0x1e7))/0x3+-parseInt(_0x4f4f74(0x1ef))/0x4+parseInt(_0x4f4f74(0x1f5))/0x5+-parseInt(_0x4f4f74(0x1f2))/0x6+-parseInt(_0x4f4f74(0x1ee))/0x7*(-parseInt(_0x4f4f74(0x1e9))/0x8)+parseInt(_0x4f4f74(0x1e6))/0x9*(parseInt(_0x4f4f74(0x1f0))/0xa);if(_0x3dc5f0===_0x2ba695)break;else _0x31c5e2['push'](_0x31c5e2['shift']());}catch(_0x588762){_0x31c5e2['push'](_0x31c5e2['shift']());}}}(a22_0x1dec,0xb25e3));function a22_0x1dec(){const _0x4a5473=['1055406fDCCYR','\x20workspace\x20remove','app\x20remove','7MVUHNm','4216960SgCWVA','132670foKYku','remove','258036DBGdWG','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','App\x20profile\x20name\x20to\x20remove','865385VLJcfz','1773TJAmzO','4141053gzHETy','1omZqRt','7593752GaXGdy','2026-07'];a22_0x1dec=function(){return _0x4a5473;};return a22_0x1dec();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0x4963(_0x58fc6a,_0x2a18d3){_0x58fc6a=_0x58fc6a-0x1e6;const _0x1decdb=a22_0x1dec();let _0x49636e=_0x1decdb[_0x58fc6a];return _0x49636e;}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':'app','command':a22_0x501e50(0x1f1),'description':a22_0x501e50(0x1f3),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x501e50(0x1ec),'since':a22_0x501e50(0x1ea)},'args':[{'name':'name','description':a22_0x501e50(0x1f4),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x227849=>validateAppName(_0x227849,a22_0x501e50(0x1ed)),'execute':_0x3e000c=>runAppRemove(_0x3e000c,a22_0x501e50(0x1ed))};
@@ -1 +1 @@
1
- (function(_0x796ba9,_0x414c1d){const _0x55c862=a23_0x5d1a,_0x27196d=_0x796ba9();while(!![]){try{const _0x35fb6b=-parseInt(_0x55c862(0x165))/0x1*(parseInt(_0x55c862(0x171))/0x2)+-parseInt(_0x55c862(0x178))/0x3+parseInt(_0x55c862(0x177))/0x4*(-parseInt(_0x55c862(0x17b))/0x5)+-parseInt(_0x55c862(0x167))/0x6*(-parseInt(_0x55c862(0x176))/0x7)+parseInt(_0x55c862(0x16d))/0x8*(parseInt(_0x55c862(0x164))/0x9)+-parseInt(_0x55c862(0x17d))/0xa+parseInt(_0x55c862(0x16c))/0xb*(parseInt(_0x55c862(0x17a))/0xc);if(_0x35fb6b===_0x414c1d)break;else _0x27196d['push'](_0x27196d['shift']());}catch(_0x3dd6a8){_0x27196d['push'](_0x27196d['shift']());}}}(a23_0x1ad9,0x43242));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a23_0x5d1a(_0x4ccdf9,_0x1e284d){_0x4ccdf9=_0x4ccdf9-0x164;const _0x1ad9e7=a23_0x1ad9();let _0x5d1ae9=_0x1ad9e7[_0x4ccdf9];return _0x5d1ae9;}export function enrichAppListItemsWithMergedSelection(_0x51afe6,_0x11726a){const _0x5a116b=a23_0x5d1a;if(!_0x11726a)return;const _0x225349=_0x11726a['apps']&&typeof _0x11726a[_0x5a116b(0x182)]===_0x5a116b(0x16e)?_0x11726a[_0x5a116b(0x182)]:{},_0x45d985=Object[_0x5a116b(0x166)](_0x225349)[_0x5a116b(0x17e)]>0x0;for(const _0x194a4f of _0x51afe6){_0x194a4f[_0x5a116b(0x16a)]=![];}const _0x4c42d2=_0x11726a['appCode']!=null?String(_0x11726a[_0x5a116b(0x17f)])[_0x5a116b(0x180)]():'';if(_0x45d985){const _0x463018=_0x11726a[_0x5a116b(0x169)]??_0x11726a[_0x5a116b(0x174)];if(_0x463018)for(const _0x5d44af of _0x51afe6){_0x5d44af['named']===!![]&&_0x5d44af[_0x5a116b(0x16f)]===_0x463018&&(_0x5d44af[_0x5a116b(0x16a)]=!![]);}for(const _0x127647 of _0x51afe6){if(_0x127647[_0x5a116b(0x179)]!==![])continue;if(_0x11726a['defaultApp'])continue;_0x4c42d2&&String(_0x127647[_0x5a116b(0x183)]??'')['trim']()===_0x4c42d2&&(_0x127647['isCurrent']=!![]);}return;}if(!_0x4c42d2)return;for(const _0x20e9ce of _0x51afe6){String(_0x20e9ce[_0x5a116b(0x183)]??'')[_0x5a116b(0x180)]()===_0x4c42d2&&(_0x20e9ce[_0x5a116b(0x16a)]=!![]);}}export function resolveAppScopeForWrite(_0x472564,_0x2ab833,_0x565c98){const _0x2458dc=a23_0x5d1a;if(_0x2ab833)return'global';const _0x35a53a=_0x565c98['projectConfig'][_0x2458dc(0x182)]&&typeof _0x565c98[_0x2458dc(0x17c)][_0x2458dc(0x182)]===_0x2458dc(0x16e)?_0x565c98[_0x2458dc(0x17c)]['apps']:{},_0xba0e88=_0x565c98['globalConfig']['apps']&&typeof _0x565c98['globalConfig'][_0x2458dc(0x182)]===_0x2458dc(0x16e)?_0x565c98['globalConfig'][_0x2458dc(0x182)]:{};if(Object[_0x2458dc(0x170)]['hasOwnProperty'][_0x2458dc(0x181)](_0x35a53a,_0x472564))return _0x2458dc(0x175);if(Object[_0x2458dc(0x170)][_0x2458dc(0x168)]['call'](_0xba0e88,_0x472564))return _0x2458dc(0x173);return _0x2458dc(0x175);}function a23_0x1ad9(){const _0x199a66=['hasOwnProperty','currentApp','isCurrent','both','613481TIKKoY','204280bXUFjo','object','name','prototype','10kWocaA','globalConfig','global','defaultApp','project','7IpmEuQ','156BJAhIE','313383nrUmhG','named','192AucNAw','24270HAJhaH','projectConfig','2775760rJJvJY','length','appCode','trim','call','apps','appcode','9vnahvj','78429QgptRW','keys','1923762alJuyn'];a23_0x1ad9=function(){return _0x199a66;};return a23_0x1ad9();}export function appDefinedIn(_0x1dd9e3,_0x9c4644,_0x4b76be,_0x41423e){const _0x3ccb88=a23_0x5d1a;if(_0x41423e)return Object[_0x3ccb88(0x170)][_0x3ccb88(0x168)][_0x3ccb88(0x181)](_0x4b76be,_0x1dd9e3)?_0x3ccb88(0x175):_0x3ccb88(0x173);const _0x28a912=Object[_0x3ccb88(0x170)][_0x3ccb88(0x168)][_0x3ccb88(0x181)](_0x9c4644,_0x1dd9e3),_0x5d40f6=Object[_0x3ccb88(0x170)][_0x3ccb88(0x168)][_0x3ccb88(0x181)](_0x4b76be,_0x1dd9e3);if(_0x28a912&&_0x5d40f6)return _0x3ccb88(0x16b);if(_0x5d40f6)return'project';return _0x3ccb88(0x173);}export function resolveDefaultAppSource(_0x385ef3){const _0x5b1b71=a23_0x5d1a,_0x3b2bcc=_0x385ef3[_0x5b1b71(0x17c)][_0x5b1b71(0x182)]&&typeof _0x385ef3[_0x5b1b71(0x17c)]['apps']===_0x5b1b71(0x16e)?_0x385ef3['projectConfig'][_0x5b1b71(0x182)]:{};if(_0x5b1b71(0x174)in _0x385ef3['projectConfig'])return'project';if(Object[_0x5b1b71(0x166)](_0x3b2bcc)[_0x5b1b71(0x17e)]>0x0)return _0x5b1b71(0x175);if(_0x385ef3[_0x5b1b71(0x17c)]['inherit']===![])return null;if(_0x385ef3[_0x5b1b71(0x172)][_0x5b1b71(0x174)])return _0x5b1b71(0x173);return null;}export function getConfigPath(_0x4c6529={}){const _0xd400b9=a23_0x5d1a,_0x1954ee=_0x4c6529[_0xd400b9(0x173)]?_0xd400b9(0x173):_0xd400b9(0x175);return resolveWriteConfigPath(_0x1954ee);}export function readConfig(_0x59e0c8={}){return readConfigFile(getConfigPath(_0x59e0c8));}export function writeConfig(_0x178597,_0x42a66b={}){writeConfigFile(getConfigPath(_0x42a66b),_0x178597);}export function scopeLabel(_0x1f5ba6){const _0x2963fe=a23_0x5d1a;return _0x1f5ba6[_0x2963fe(0x173)]?'\x20(global)':'';}
1
+ (function(_0x48724c,_0x2ef0f4){const _0x430d5b=a23_0x1149,_0x16e0fa=_0x48724c();while(!![]){try{const _0x12c601=parseInt(_0x430d5b(0x11a))/0x1*(-parseInt(_0x430d5b(0x10b))/0x2)+parseInt(_0x430d5b(0x124))/0x3+-parseInt(_0x430d5b(0x119))/0x4*(parseInt(_0x430d5b(0x10a))/0x5)+parseInt(_0x430d5b(0x114))/0x6*(-parseInt(_0x430d5b(0x11b))/0x7)+-parseInt(_0x430d5b(0x112))/0x8+-parseInt(_0x430d5b(0x115))/0x9+parseInt(_0x430d5b(0x125))/0xa;if(_0x12c601===_0x2ef0f4)break;else _0x16e0fa['push'](_0x16e0fa['shift']());}catch(_0x10dc5c){_0x16e0fa['push'](_0x16e0fa['shift']());}}}(a23_0x2eb1,0xec34f));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a23_0x2eb1(){const _0x2e0224=['object','global','prototype','apps','trim','7183240WFWHyE','isCurrent','90rXqtZj','16397271JCGErV','\x20(global)','length','appcode','45572REXwnr','3rTypzA','803474OGTjmH','name','projectConfig','globalConfig','defaultApp','keys','inherit','call','named','3313437lTwEyV','54382460ZDofih','hasOwnProperty','project','430gtnkxo','102580rvtuoj','appCode'];a23_0x2eb1=function(){return _0x2e0224;};return a23_0x2eb1();}export function enrichAppListItemsWithMergedSelection(_0x55bb5d,_0x11b0f3){const _0x20a328=a23_0x1149;if(!_0x11b0f3)return;const _0x529c06=_0x11b0f3[_0x20a328(0x110)]&&typeof _0x11b0f3[_0x20a328(0x110)]===_0x20a328(0x10d)?_0x11b0f3['apps']:{},_0x24eabd=Object[_0x20a328(0x120)](_0x529c06)[_0x20a328(0x117)]>0x0;for(const _0x576a78 of _0x55bb5d){_0x576a78[_0x20a328(0x113)]=![];}const _0x113f34=_0x11b0f3[_0x20a328(0x10c)]!=null?String(_0x11b0f3[_0x20a328(0x10c)])[_0x20a328(0x111)]():'';if(_0x24eabd){const _0x379aa1=_0x11b0f3['currentApp']??_0x11b0f3['defaultApp'];if(_0x379aa1)for(const _0x3195a9 of _0x55bb5d){_0x3195a9[_0x20a328(0x123)]===!![]&&_0x3195a9[_0x20a328(0x11c)]===_0x379aa1&&(_0x3195a9['isCurrent']=!![]);}for(const _0x484936 of _0x55bb5d){if(_0x484936[_0x20a328(0x123)]!==![])continue;if(_0x11b0f3[_0x20a328(0x11f)])continue;_0x113f34&&String(_0x484936['appcode']??'')[_0x20a328(0x111)]()===_0x113f34&&(_0x484936['isCurrent']=!![]);}return;}if(!_0x113f34)return;for(const _0x466dbf of _0x55bb5d){String(_0x466dbf[_0x20a328(0x118)]??'')[_0x20a328(0x111)]()===_0x113f34&&(_0x466dbf[_0x20a328(0x113)]=!![]);}}export function resolveAppScopeForWrite(_0x5b6a75,_0x41dbe6,_0x50201c){const _0x5f9b48=a23_0x1149;if(_0x41dbe6)return'global';const _0x4ef96d=_0x50201c[_0x5f9b48(0x11d)][_0x5f9b48(0x110)]&&typeof _0x50201c[_0x5f9b48(0x11d)][_0x5f9b48(0x110)]===_0x5f9b48(0x10d)?_0x50201c[_0x5f9b48(0x11d)][_0x5f9b48(0x110)]:{},_0x3f3f48=_0x50201c['globalConfig']['apps']&&typeof _0x50201c[_0x5f9b48(0x11e)][_0x5f9b48(0x110)]===_0x5f9b48(0x10d)?_0x50201c[_0x5f9b48(0x11e)]['apps']:{};if(Object[_0x5f9b48(0x10f)][_0x5f9b48(0x126)][_0x5f9b48(0x122)](_0x4ef96d,_0x5b6a75))return _0x5f9b48(0x127);if(Object[_0x5f9b48(0x10f)][_0x5f9b48(0x126)][_0x5f9b48(0x122)](_0x3f3f48,_0x5b6a75))return _0x5f9b48(0x10e);return'project';}export function appDefinedIn(_0x537375,_0x1d9349,_0xd2984f,_0x518ca6){const _0x3937f7=a23_0x1149;if(_0x518ca6)return Object[_0x3937f7(0x10f)]['hasOwnProperty']['call'](_0xd2984f,_0x537375)?_0x3937f7(0x127):'global';const _0x2d548f=Object['prototype'][_0x3937f7(0x126)][_0x3937f7(0x122)](_0x1d9349,_0x537375),_0x3cb4e9=Object[_0x3937f7(0x10f)][_0x3937f7(0x126)][_0x3937f7(0x122)](_0xd2984f,_0x537375);if(_0x2d548f&&_0x3cb4e9)return'both';if(_0x3cb4e9)return _0x3937f7(0x127);return _0x3937f7(0x10e);}export function resolveDefaultAppSource(_0x50f558){const _0x467b2b=a23_0x1149,_0x421fd5=_0x50f558[_0x467b2b(0x11d)][_0x467b2b(0x110)]&&typeof _0x50f558['projectConfig'][_0x467b2b(0x110)]===_0x467b2b(0x10d)?_0x50f558[_0x467b2b(0x11d)][_0x467b2b(0x110)]:{};if('defaultApp'in _0x50f558[_0x467b2b(0x11d)])return _0x467b2b(0x127);if(Object[_0x467b2b(0x120)](_0x421fd5)[_0x467b2b(0x117)]>0x0)return _0x467b2b(0x127);if(_0x50f558[_0x467b2b(0x11d)][_0x467b2b(0x121)]===![])return null;if(_0x50f558[_0x467b2b(0x11e)][_0x467b2b(0x11f)])return _0x467b2b(0x10e);return null;}function a23_0x1149(_0x3089ef,_0x2241ac){_0x3089ef=_0x3089ef-0x10a;const _0x2eb11e=a23_0x2eb1();let _0x11494b=_0x2eb11e[_0x3089ef];return _0x11494b;}export function getConfigPath(_0xcf6e58={}){const _0x4161c6=a23_0x1149,_0x8820ea=_0xcf6e58['global']?_0x4161c6(0x10e):_0x4161c6(0x127);return resolveWriteConfigPath(_0x8820ea);}export function readConfig(_0x21b280={}){return readConfigFile(getConfigPath(_0x21b280));}export function writeConfig(_0x39c851,_0x4d3659={}){writeConfigFile(getConfigPath(_0x4d3659),_0x39c851);}export function scopeLabel(_0x417451){const _0x21d836=a23_0x1149;return _0x417451['global']?_0x21d836(0x116):'';}
@@ -1 +1 @@
1
- function a24_0x4a22(_0x111fa6,_0x46ad78){_0x111fa6=_0x111fa6-0xb1;const _0x13b841=a24_0x13b8();let _0x4a2291=_0x13b841[_0x111fa6];return _0x4a2291;}const a24_0x1bf946=a24_0x4a22;function a24_0x13b8(){const _0x5eece2=['validation','8704015QfXjMw','isFinite','1DJOpxW','8bUXqtJ','appCode','apiError','Delete\x20one\x20runtime\x20app-config\x20key','2082801pJTukE',',\x20appCode=','6YyyCmx','number','POST','386416KYErvo','3149115kJDGKJ','delete','App\x20config\x20server\x20id\x20missing\x20for\x20key=','app-config','24049970fYqKKr','17044740ujtslN','530404gVdWCi','high-risk-write','get'];a24_0x13b8=function(){return _0x5eece2;};return a24_0x13b8();}(function(_0x5b94a9,_0x2d7d57){const _0x31853d=a24_0x4a22,_0x2c7cad=_0x5b94a9();while(!![]){try{const _0xaed37d=-parseInt(_0x31853d(0xb1))/0x1*(-parseInt(_0x31853d(0xbb))/0x2)+-parseInt(_0x31853d(0xbc))/0x3+-parseInt(_0x31853d(0xc2))/0x4+parseInt(_0x31853d(0xc6))/0x5*(parseInt(_0x31853d(0xb8))/0x6)+-parseInt(_0x31853d(0xb6))/0x7*(parseInt(_0x31853d(0xb2))/0x8)+-parseInt(_0x31853d(0xc1))/0x9+parseInt(_0x31853d(0xc0))/0xa;if(_0xaed37d===_0x2d7d57)break;else _0x2c7cad['push'](_0x2c7cad['shift']());}catch(_0x12d352){_0x2c7cad['push'](_0x2c7cad['shift']());}}}(a24_0x13b8,0xebab3));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH='/smartapi/app-config/delete';export const appConfigDelete={'service':a24_0x1bf946(0xbf),'command':'delete','description':a24_0x1bf946(0xb5),'risk':a24_0x1bf946(0xc3),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x439c6e){readKeyArg(_0x439c6e);},async 'dryRun'(_0x427bd7){const _0x37c19e=a24_0x1bf946,_0x18e68b=readKeyArg(_0x427bd7),_0x4ae76a=await mustGetByKey(_0x427bd7['appCode'],_0x18e68b);return asAppConfigDryRunResult(buildMutationData({'operation':_0x37c19e(0xbd),'appCode':_0x427bd7[_0x37c19e(0xb3)],'key':_0x18e68b,'before':projectAppConfig(_0x4ae76a),'after':null,'dryRun':!![]}),{'method':_0x37c19e(0xba),'url':DELETE_PATH});},async 'execute'(_0x1c5a79){const _0x4fb418=a24_0x1bf946,_0x5d93b3=readKeyArg(_0x1c5a79),_0x4bd8df=await mustGetByKey(_0x1c5a79[_0x4fb418(0xb3)],_0x5d93b3);return await withAppConfigApiBoundary(_0x4fb418(0xbd),{'appCode':_0x1c5a79[_0x4fb418(0xb3)],'key':_0x5d93b3},()=>deleteAppConfig({'appCode':_0x1c5a79['appCode'],'id':requireAppConfigId(_0x4bd8df,_0x5d93b3,_0x1c5a79[_0x4fb418(0xb3)])})),{'ok':!![],'data':buildMutationData({'operation':_0x4fb418(0xbd),'appCode':_0x1c5a79['appCode'],'key':_0x5d93b3,'before':projectAppConfig(_0x4bd8df),'after':null,'dryRun':![]}),'message':'Deleted\x20app\x20config\x20'+_0x5d93b3};}};async function mustGetByKey(_0x167f96,_0xcc4423){const _0x5e65d=a24_0x1bf946,_0x5f05e4=await withAppConfigApiBoundary(_0x5e65d(0xc4),{'appCode':_0x167f96,'key':_0xcc4423},()=>getAppConfigByKey(_0x167f96,_0xcc4423));if(!_0x5f05e4)throw CliErrors[_0x5e65d(0xc5)]('App\x20config\x20key\x20not\x20found:\x20'+_0xcc4423,'appCode:\x20'+_0x167f96);return _0x5f05e4;}function requireAppConfigId(_0x33294c,_0x5d6434,_0x53f7ff){const _0x219af9=a24_0x1bf946;if(typeof _0x33294c['id']===_0x219af9(0xb9)&&Number[_0x219af9(0xc7)](_0x33294c['id'])&&_0x33294c['id']>0x0)return _0x33294c['id'];throw CliErrors[_0x219af9(0xb4)](_0x219af9(0xbe)+_0x5d6434+_0x219af9(0xb7)+_0x53f7ff);}
1
+ const a24_0x1c2477=a24_0x3238;(function(_0x58b911,_0x3b322c){const _0xfcfabb=a24_0x3238,_0x93b885=_0x58b911();while(!![]){try{const _0x5a5877=-parseInt(_0xfcfabb(0x1ec))/0x1*(-parseInt(_0xfcfabb(0x1e4))/0x2)+parseInt(_0xfcfabb(0x1e7))/0x3+parseInt(_0xfcfabb(0x1e9))/0x4+-parseInt(_0xfcfabb(0x1de))/0x5*(parseInt(_0xfcfabb(0x1ea))/0x6)+parseInt(_0xfcfabb(0x1ed))/0x7+-parseInt(_0xfcfabb(0x1e8))/0x8*(-parseInt(_0xfcfabb(0x1ef))/0x9)+-parseInt(_0xfcfabb(0x1e1))/0xa*(parseInt(_0xfcfabb(0x1f2))/0xb);if(_0x5a5877===_0x3b322c)break;else _0x93b885['push'](_0x93b885['shift']());}catch(_0x40a54f){_0x93b885['push'](_0x93b885['shift']());}}}(a24_0x318a,0x272ff));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0x3238(_0x54bede,_0x420eec){_0x54bede=_0x54bede-0x1de;const _0x318ab6=a24_0x318a();let _0x323862=_0x318ab6[_0x54bede];return _0x323862;}import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x1c2477(0x1ee);export const appConfigDelete={'service':a24_0x1c2477(0x1e6),'command':a24_0x1c2477(0x1df),'description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':a24_0x1c2477(0x1e0),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x328884){readKeyArg(_0x328884);},async 'dryRun'(_0x2a88a9){const _0x56538c=a24_0x1c2477,_0x31d27f=readKeyArg(_0x2a88a9),_0x367609=await mustGetByKey(_0x2a88a9[_0x56538c(0x1f0)],_0x31d27f);return asAppConfigDryRunResult(buildMutationData({'operation':_0x56538c(0x1df),'appCode':_0x2a88a9[_0x56538c(0x1f0)],'key':_0x31d27f,'before':projectAppConfig(_0x367609),'after':null,'dryRun':!![]}),{'method':_0x56538c(0x1e2),'url':DELETE_PATH});},async 'execute'(_0x489326){const _0xf2c9e7=a24_0x1c2477,_0x35979f=readKeyArg(_0x489326),_0x3a3463=await mustGetByKey(_0x489326[_0xf2c9e7(0x1f0)],_0x35979f);return await withAppConfigApiBoundary(_0xf2c9e7(0x1df),{'appCode':_0x489326['appCode'],'key':_0x35979f},()=>deleteAppConfig({'appCode':_0x489326[_0xf2c9e7(0x1f0)],'id':requireAppConfigId(_0x3a3463,_0x35979f,_0x489326['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0xf2c9e7(0x1df),'appCode':_0x489326[_0xf2c9e7(0x1f0)],'key':_0x35979f,'before':projectAppConfig(_0x3a3463),'after':null,'dryRun':![]}),'message':_0xf2c9e7(0x1eb)+_0x35979f};}};async function mustGetByKey(_0x92adf0,_0x391be3){const _0x19d75b=await withAppConfigApiBoundary('get',{'appCode':_0x92adf0,'key':_0x391be3},()=>getAppConfigByKey(_0x92adf0,_0x391be3));if(!_0x19d75b)throw CliErrors['validation']('App\x20config\x20key\x20not\x20found:\x20'+_0x391be3,'appCode:\x20'+_0x92adf0);return _0x19d75b;}function requireAppConfigId(_0x32e32b,_0xf5cc02,_0x5f1359){const _0x3d1a81=a24_0x1c2477;if(typeof _0x32e32b['id']==='number'&&Number[_0x3d1a81(0x1f1)](_0x32e32b['id'])&&_0x32e32b['id']>0x0)return _0x32e32b['id'];throw CliErrors['apiError'](_0x3d1a81(0x1e5)+_0xf5cc02+_0x3d1a81(0x1e3)+_0x5f1359);}function a24_0x318a(){const _0x1e167b=['App\x20config\x20server\x20id\x20missing\x20for\x20key=','app-config','396951Shkiyy','21944eNaCoZ','1143260hEytdR','447576QwDXkW','Deleted\x20app\x20config\x20','3TPKxgO','918946kxCxLa','/smartapi/app-config/delete','927oeJyyW','appCode','isFinite','755194SfQwps','5vHbbgB','delete','high-risk-write','120wFFXAD','POST',',\x20appCode=','151344kkYPKx'];a24_0x318a=function(){return _0x1e167b;};return a24_0x318a();}
@@ -1 +1 @@
1
- const a25_0x57452d=a25_0x41fc;(function(_0x4ec6b8,_0x41dd96){const _0x46c75e=a25_0x41fc,_0x355348=_0x4ec6b8();while(!![]){try{const _0x3ed397=parseInt(_0x46c75e(0x19b))/0x1*(parseInt(_0x46c75e(0x197))/0x2)+-parseInt(_0x46c75e(0x1a5))/0x3+-parseInt(_0x46c75e(0x1a3))/0x4+parseInt(_0x46c75e(0x195))/0x5+parseInt(_0x46c75e(0x19d))/0x6+parseInt(_0x46c75e(0x199))/0x7*(parseInt(_0x46c75e(0x194))/0x8)+parseInt(_0x46c75e(0x19a))/0x9*(-parseInt(_0x46c75e(0x1a2))/0xa);if(_0x3ed397===_0x41dd96)break;else _0x355348['push'](_0x355348['shift']());}catch(_0x4d220d){_0x355348['push'](_0x355348['shift']());}}}(a25_0x5de7,0x8c0a7));import{getAppConfigByKey}from'../../core/api-client.js';function a25_0x41fc(_0x53ec2c,_0x12b5e2){_0x53ec2c=_0x53ec2c-0x193;const _0x5de700=a25_0x5de7();let _0x41fc5e=_0x5de700[_0x53ec2c];return _0x41fc5e;}function a25_0x5de7(){const _0x1f5584=['Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','4842392yhPEHv','5638295vlYwfC','read','10202KfKgBt','appCode:\x20','7oNWHhv','142713pSzsTv','139wTHfKd','\x20with\x20value\x20redacted','2911164syUxTe','Loaded\x20app\x20config\x20','get','appCode','reveal','590TtcXIG','1914072wDcnPI','bool','2818509pxsaEc','App\x20config\x20key\x20not\x20found:\x20'];a25_0x5de7=function(){return _0x1f5584;};return a25_0x5de7();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':'get','description':a25_0x57452d(0x193),'risk':a25_0x57452d(0x196),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x910c9){readKeyArg(_0x910c9);},async 'execute'(_0x25cb15){const _0x298c20=a25_0x57452d,_0x421388=readKeyArg(_0x25cb15),_0x2792e2=await withAppConfigApiBoundary(_0x298c20(0x19f),{'appCode':_0x25cb15[_0x298c20(0x1a0)],'key':_0x421388},()=>getAppConfigByKey(_0x25cb15[_0x298c20(0x1a0)],_0x421388));if(!_0x2792e2)throw CliErrors['validation'](_0x298c20(0x1a6)+_0x421388,_0x298c20(0x198)+_0x25cb15['appCode']);const _0x2c3bf9=projectAppConfig(_0x2792e2,{'reveal':_0x25cb15[_0x298c20(0x1a4)](_0x298c20(0x1a1))});return{'ok':!![],'data':{'config':_0x2c3bf9},'message':_0x25cb15[_0x298c20(0x1a4)]('reveal')?_0x298c20(0x19e)+_0x421388+'\x20with\x20value\x20revealed':_0x298c20(0x19e)+_0x421388+_0x298c20(0x19c)};}};
1
+ const a25_0x457895=a25_0x11bd;(function(_0x19d986,_0x23ce18){const _0x2ba78e=a25_0x11bd,_0x5532b3=_0x19d986();while(!![]){try{const _0x590c84=parseInt(_0x2ba78e(0x11d))/0x1+parseInt(_0x2ba78e(0x115))/0x2+-parseInt(_0x2ba78e(0x125))/0x3*(-parseInt(_0x2ba78e(0x127))/0x4)+parseInt(_0x2ba78e(0x123))/0x5+-parseInt(_0x2ba78e(0x11e))/0x6+-parseInt(_0x2ba78e(0x121))/0x7+-parseInt(_0x2ba78e(0x11a))/0x8*(parseInt(_0x2ba78e(0x119))/0x9);if(_0x590c84===_0x23ce18)break;else _0x5532b3['push'](_0x5532b3['shift']());}catch(_0x5490ee){_0x5532b3['push'](_0x5532b3['shift']());}}}(a25_0x3c21,0xeb613));import{getAppConfigByKey}from'../../core/api-client.js';function a25_0x3c21(){const _0x1258db=['get','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','1662354WKfICL','5123106xnLQCh','read','reveal','7172123VecFNB','Loaded\x20app\x20config\x20','667135QfJmsP','\x20with\x20value\x20redacted','21JBBvod','validation','984476yuroVG','app-config','App\x20config\x20key\x20not\x20found:\x20','2923740xzJYCU','bool','appCode','appCode:\x20','27AzKxfm','5701144xiEnYv'];a25_0x3c21=function(){return _0x1258db;};return a25_0x3c21();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a25_0x11bd(_0x7d1c8,_0x1c35fe){_0x7d1c8=_0x7d1c8-0x115;const _0x3c2197=a25_0x3c21();let _0x11bddd=_0x3c2197[_0x7d1c8];return _0x11bddd;}import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x457895(0x128),'command':a25_0x457895(0x11b),'description':a25_0x457895(0x11c),'risk':a25_0x457895(0x11f),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x53c2aa){readKeyArg(_0x53c2aa);},async 'execute'(_0x1e4631){const _0x4484f9=a25_0x457895,_0x217b73=readKeyArg(_0x1e4631),_0x2bd94d=await withAppConfigApiBoundary(_0x4484f9(0x11b),{'appCode':_0x1e4631[_0x4484f9(0x117)],'key':_0x217b73},()=>getAppConfigByKey(_0x1e4631['appCode'],_0x217b73));if(!_0x2bd94d)throw CliErrors[_0x4484f9(0x126)](_0x4484f9(0x129)+_0x217b73,_0x4484f9(0x118)+_0x1e4631[_0x4484f9(0x117)]);const _0x229abf=projectAppConfig(_0x2bd94d,{'reveal':_0x1e4631[_0x4484f9(0x116)](_0x4484f9(0x120))});return{'ok':!![],'data':{'config':_0x229abf},'message':_0x1e4631[_0x4484f9(0x116)](_0x4484f9(0x120))?'Loaded\x20app\x20config\x20'+_0x217b73+'\x20with\x20value\x20revealed':_0x4484f9(0x122)+_0x217b73+_0x4484f9(0x124)};}};
@@ -1 +1 @@
1
- (function(_0x3e1e71,_0x330816){const _0x5c96cd=a26_0x1214,_0x328f10=_0x3e1e71();while(!![]){try{const _0x3f9a66=parseInt(_0x5c96cd(0x1cc))/0x1+parseInt(_0x5c96cd(0x1d2))/0x2*(-parseInt(_0x5c96cd(0x1d1))/0x3)+parseInt(_0x5c96cd(0x1cf))/0x4+parseInt(_0x5c96cd(0x1cd))/0x5+parseInt(_0x5c96cd(0x1d0))/0x6*(-parseInt(_0x5c96cd(0x1d3))/0x7)+parseInt(_0x5c96cd(0x1d4))/0x8+parseInt(_0x5c96cd(0x1cb))/0x9*(-parseInt(_0x5c96cd(0x1ce))/0xa);if(_0x3f9a66===_0x330816)break;else _0x328f10['push'](_0x328f10['shift']());}catch(_0x54f618){_0x328f10['push'](_0x328f10['shift']());}}}(a26_0x29a0,0xc6250));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';function a26_0x1214(_0x16bf33,_0x35ca84){_0x16bf33=_0x16bf33-0x1cb;const _0x29a033=a26_0x29a0();let _0x12147e=_0x29a033[_0x16bf33];return _0x12147e;}function a26_0x29a0(){const _0x53a645=['11741408oHaiMz','40122hITLbD','717465RqvRbY','2234005MAxVmU','1460XvodyW','2106256HYWTKY','1818WJzErW','960yhnlnL','7824ViWMmd','10262QytXfr'];a26_0x29a0=function(){return _0x53a645;};return a26_0x29a0();}import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
1
+ function a26_0xb048(_0x4935d3,_0x3302df){_0x4935d3=_0x4935d3-0x16f;const _0x208275=a26_0x2082();let _0xb048fc=_0x208275[_0x4935d3];return _0xb048fc;}function a26_0x2082(){const _0x1760f2=['5147750wDDCDp','153832SElBFr','5925205KfEFrQ','3749832ROUWRr','9758JnvKzJ','9OQzvzn','18kPEQTr','2798092pabsBW','822330zShAjh','3592majJmM'];a26_0x2082=function(){return _0x1760f2;};return a26_0x2082();}(function(_0x4cda32,_0x51875f){const _0x433497=a26_0xb048,_0x5d73b7=_0x4cda32();while(!![]){try{const _0x94c98a=-parseInt(_0x433497(0x171))/0x1*(parseInt(_0x433497(0x176))/0x2)+-parseInt(_0x433497(0x173))/0x3+parseInt(_0x433497(0x172))/0x4+parseInt(_0x433497(0x177))/0x5+-parseInt(_0x433497(0x178))/0x6+parseInt(_0x433497(0x16f))/0x7*(parseInt(_0x433497(0x174))/0x8)+parseInt(_0x433497(0x170))/0x9*(parseInt(_0x433497(0x175))/0xa);if(_0x94c98a===_0x51875f)break;else _0x5d73b7['push'](_0x5d73b7['shift']());}catch(_0x2c6e01){_0x5d73b7['push'](_0x5d73b7['shift']());}}}(a26_0x2082,0xb512b));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
- function a27_0x4a06(_0x3ee91b,_0x350e69){_0x3ee91b=_0x3ee91b-0x165;const _0x250aab=a27_0x250a();let _0x4a061e=_0x250aab[_0x3ee91b];return _0x4a061e;}const a27_0x1b87d1=a27_0x4a06;(function(_0x6599a5,_0x290d9d){const _0x469890=a27_0x4a06,_0x18301e=_0x6599a5();while(!![]){try{const _0x14d9a9=parseInt(_0x469890(0x173))/0x1+-parseInt(_0x469890(0x16c))/0x2+-parseInt(_0x469890(0x175))/0x3*(-parseInt(_0x469890(0x178))/0x4)+parseInt(_0x469890(0x170))/0x5+parseInt(_0x469890(0x17a))/0x6*(parseInt(_0x469890(0x174))/0x7)+-parseInt(_0x469890(0x171))/0x8*(-parseInt(_0x469890(0x16f))/0x9)+-parseInt(_0x469890(0x16b))/0xa*(parseInt(_0x469890(0x16d))/0xb);if(_0x14d9a9===_0x290d9d)break;else _0x18301e['push'](_0x18301e['shift']());}catch(_0x506aa6){_0x18301e['push'](_0x18301e['shift']());}}}(a27_0x250a,0x33fa2));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_0x1b87d1(0x167),'command':'list','description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0x1b87d1(0x165),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x1b87d1(0x172),'type':a27_0x1b87d1(0x179),'description':a27_0x1b87d1(0x177)},TAGS_FLAG],async 'validate'(_0xa47efc){const _0x402f4c=a27_0x1b87d1,_0x79c4f5=_0xa47efc['str'](_0x402f4c(0x172))['trim']();if(_0x79c4f5)validateKey(_0x79c4f5);readOptionalTags(_0xa47efc);},async 'execute'(_0x37ab05){const _0x1b5dd9=a27_0x1b87d1,_0x501fdc=_0x37ab05['str']('key')[_0x1b5dd9(0x176)]()||undefined,_0x5ea476=readOptionalTags(_0x37ab05),_0x488d46=await withAppConfigApiBoundary(_0x1b5dd9(0x16e),{'appCode':_0x37ab05[_0x1b5dd9(0x166)]},()=>listAppConfigs(_0x37ab05[_0x1b5dd9(0x166)],{'key':_0x501fdc,'tags':_0x5ea476})),_0x43d3b1=_0x488d46[_0x1b5dd9(0x16a)](_0x174f90=>projectAppConfig(_0x174f90));return{'ok':!![],'data':{'appCode':_0x37ab05[_0x1b5dd9(0x166)],'count':_0x43d3b1['length'],'configs':_0x43d3b1},'message':'Found\x20'+_0x43d3b1[_0x1b5dd9(0x169)]+_0x1b5dd9(0x168)};}};function a27_0x250a(){const _0x392433=['323370TGNMhh','138430YrUGNb','165rMeLGJ','list','913437epwngx','453280FGmIdd','8UWaLHp','key','128476MXTjRQ','1687DdVaMV','9eaQzWY','trim','Filter\x20by\x20exact\x20config\x20key','344108XxHErF','string','4692JJfNDB','read','appCode','app-config','\x20app\x20config(s)','length','map'];a27_0x250a=function(){return _0x392433;};return a27_0x250a();}
1
+ const a27_0x22262c=a27_0x52c0;function a27_0x2563(){const _0x385199=['139513tmRLux','682838ZFaLwe','1076024epRSlQ','Filter\x20by\x20exact\x20config\x20key','63SubjVY','1197FoFyKC','140AQtjSb','12668EQVdnW','trim','str','key','525201SOSZoB','string','Found\x20','appCode','12732YwbfOc','length','app-config','490jMxSHH','1962099guioPP','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','read','list'];a27_0x2563=function(){return _0x385199;};return a27_0x2563();}(function(_0x4f5234,_0x97c65b){const _0x34c0c5=a27_0x52c0,_0x366799=_0x4f5234();while(!![]){try{const _0x204e3a=-parseInt(_0x34c0c5(0x13f))/0x1+parseInt(_0x34c0c5(0x14c))/0x2+parseInt(_0x34c0c5(0x147))/0x3+-parseInt(_0x34c0c5(0x152))/0x4*(parseInt(_0x34c0c5(0x146))/0x5)+-parseInt(_0x34c0c5(0x143))/0x6*(parseInt(_0x34c0c5(0x150))/0x7)+-parseInt(_0x34c0c5(0x14d))/0x8*(-parseInt(_0x34c0c5(0x14f))/0x9)+-parseInt(_0x34c0c5(0x151))/0xa*(parseInt(_0x34c0c5(0x14b))/0xb);if(_0x204e3a===_0x97c65b)break;else _0x366799['push'](_0x366799['shift']());}catch(_0x5dd22d){_0x366799['push'](_0x366799['shift']());}}}(a27_0x2563,0x88f56));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_0x52c0(_0x44ce65,_0x16f956){_0x44ce65=_0x44ce65-0x13c;const _0x25639d=a27_0x2563();let _0x52c050=_0x25639d[_0x44ce65];return _0x52c050;}export const appConfigList={'service':a27_0x22262c(0x145),'command':a27_0x22262c(0x14a),'description':a27_0x22262c(0x148),'risk':a27_0x22262c(0x149),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x22262c(0x13e),'type':a27_0x22262c(0x140),'description':a27_0x22262c(0x14e)},TAGS_FLAG],async 'validate'(_0xd3f1b7){const _0x3f70e2=a27_0x22262c,_0x1700fe=_0xd3f1b7[_0x3f70e2(0x13d)](_0x3f70e2(0x13e))['trim']();if(_0x1700fe)validateKey(_0x1700fe);readOptionalTags(_0xd3f1b7);},async 'execute'(_0x1ded87){const _0x3d076f=a27_0x22262c,_0x36872b=_0x1ded87['str'](_0x3d076f(0x13e))[_0x3d076f(0x13c)]()||undefined,_0x37132e=readOptionalTags(_0x1ded87),_0x2efdd2=await withAppConfigApiBoundary(_0x3d076f(0x14a),{'appCode':_0x1ded87['appCode']},()=>listAppConfigs(_0x1ded87[_0x3d076f(0x142)],{'key':_0x36872b,'tags':_0x37132e})),_0x3cd444=_0x2efdd2['map'](_0x280a4f=>projectAppConfig(_0x280a4f));return{'ok':!![],'data':{'appCode':_0x1ded87[_0x3d076f(0x142)],'count':_0x3cd444[_0x3d076f(0x144)],'configs':_0x3cd444},'message':_0x3d076f(0x141)+_0x3cd444[_0x3d076f(0x144)]+'\x20app\x20config(s)'};}};
@@ -1 +1 @@
1
- const a28_0x2ada70=a28_0x55be;(function(_0x2742f3,_0x2bdb39){const _0x33ea08=a28_0x55be,_0x2a7d01=_0x2742f3();while(!![]){try{const _0x335a1c=parseInt(_0x33ea08(0xad))/0x1+-parseInt(_0x33ea08(0xa8))/0x2*(-parseInt(_0x33ea08(0xac))/0x3)+-parseInt(_0x33ea08(0xa9))/0x4*(-parseInt(_0x33ea08(0xb6))/0x5)+parseInt(_0x33ea08(0xb1))/0x6+parseInt(_0x33ea08(0xb4))/0x7+-parseInt(_0x33ea08(0xb2))/0x8+-parseInt(_0x33ea08(0xbf))/0x9;if(_0x335a1c===_0x2bdb39)break;else _0x2a7d01['push'](_0x2a7d01['shift']());}catch(_0x18a755){_0x2a7d01['push'](_0x2a7d01['shift']());}}}(a28_0x9f2c,0x460b3));function a28_0x9f2c(){const _0x350263=['4491585MNlZQt','\x20app\x20config\x20',',\x20appCode=','App\x20config\x20server\x20id\x20missing\x20for\x20key=','505522BOzGGK','24RVppTh','isFinite','file','6yLliKG','11601dOornN','app-config','update','appCode','2364444wArVnU','4352312FRhcJO','string','2527014IjWKjy','/smartapi/app-config/create','48170QjNSBn','Created','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','tags','create','/smartapi/app-config/update','get','high-risk-write','number'];a28_0x9f2c=function(){return _0x350263;};return a28_0x9f2c();}import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a28_0x55be(_0x286f63,_0x353c21){_0x286f63=_0x286f63-0xa5;const _0x9f2c1e=a28_0x9f2c();let _0x55be2b=_0x9f2c1e[_0x286f63];return _0x55be2b;}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_0x2ada70(0xb5),UPDATE_PATH=a28_0x2ada70(0xbb);export const appConfigSet={'service':a28_0x2ada70(0xae),'command':'set','description':a28_0x2ada70(0xb8),'risk':a28_0x2ada70(0xbd),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x2ada70(0xab),'type':a28_0x2ada70(0xb3),'description':'Read\x20config\x20value\x20from\x20file'}],async 'validate'(_0x269f9b){readKeyArg(_0x269f9b),readOptionalTags(_0x269f9b),assertSingleValueSource(_0x269f9b);},async 'dryRun'(_0x23e0ed){const _0xbc817f=a28_0x2ada70,_0x47b070=readKeyArg(_0x23e0ed),_0x15c115=readOptionalTags(_0x23e0ed),_0xaa8e98=assertSingleValueSource(_0x23e0ed);await assertValueSourceReadable(_0xaa8e98);const _0x1ec18b=await withAppConfigApiBoundary(_0xbc817f(0xbc),{'appCode':_0x23e0ed[_0xbc817f(0xb0)],'key':_0x47b070},()=>getAppConfigByKey(_0x23e0ed['appCode'],_0x47b070)),_0x1b8255=_0x1ec18b?_0xbc817f(0xaf):'create',_0x91914=_0x1ec18b?projectAppConfig(_0x1ec18b):null,_0x4c77cd=plannedAppConfig({'appCode':_0x23e0ed[_0xbc817f(0xb0)],'key':_0x47b070,'tags':_0x15c115??_0x1ec18b?.[_0xbc817f(0xb9)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x1b8255,'appCode':_0x23e0ed[_0xbc817f(0xb0)],'key':_0x47b070,'before':_0x91914,'after':_0x4c77cd,'dryRun':!![]}),{'method':'POST','url':_0x1b8255===_0xbc817f(0xaf)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x28d1fd){const _0x44fcd3=a28_0x2ada70,_0x14d744=readKeyArg(_0x28d1fd),_0x4cca76=readOptionalTags(_0x28d1fd),_0x120d8e=await withAppConfigApiBoundary(_0x44fcd3(0xbc),{'appCode':_0x28d1fd[_0x44fcd3(0xb0)],'key':_0x14d744},()=>getAppConfigByKey(_0x28d1fd[_0x44fcd3(0xb0)],_0x14d744)),_0x4dc27a=_0x120d8e?projectAppConfig(_0x120d8e):null,_0x4b223b=_0x120d8e?_0x44fcd3(0xaf):_0x44fcd3(0xba),{value:_0x34f13a,warnings:_0x292004}=await readAppConfigValue(_0x28d1fd),_0x2b2138={'appCode':_0x28d1fd[_0x44fcd3(0xb0)],'key':_0x14d744,'value':_0x34f13a,'tags':_0x4cca76??_0x120d8e?.['tags']??undefined};await withAppConfigApiBoundary(_0x4b223b,{'appCode':_0x28d1fd[_0x44fcd3(0xb0)],'key':_0x14d744},async()=>{const _0xf14e83=_0x44fcd3;_0x120d8e?await updateAppConfig({..._0x2b2138,'id':requireAppConfigId(_0x120d8e,_0x14d744,_0x28d1fd[_0xf14e83(0xb0)])}):await createAppConfig(_0x2b2138);});const _0x2d57b0=await withAppConfigApiBoundary('get',{'appCode':_0x28d1fd[_0x44fcd3(0xb0)],'key':_0x14d744},()=>getAppConfigByKey(_0x28d1fd[_0x44fcd3(0xb0)],_0x14d744)),_0x3283a1=_0x2d57b0?projectAppConfig(_0x2d57b0):plannedAppConfig({'appCode':_0x28d1fd[_0x44fcd3(0xb0)],'key':_0x14d744,'tags':_0x2b2138[_0x44fcd3(0xb9)],'hasValue':_0x34f13a!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x4b223b,'appCode':_0x28d1fd[_0x44fcd3(0xb0)],'key':_0x14d744,'before':_0x4dc27a,'after':_0x3283a1,'dryRun':![],'warnings':_0x292004}),'message':(_0x4b223b===_0x44fcd3(0xaf)?'Updated':_0x44fcd3(0xb7))+_0x44fcd3(0xa5)+_0x14d744};}};function requireAppConfigId(_0x202b8f,_0x58896d,_0x3cb810){const _0x153aac=a28_0x2ada70;if(typeof _0x202b8f['id']===_0x153aac(0xbe)&&Number[_0x153aac(0xaa)](_0x202b8f['id'])&&_0x202b8f['id']>0x0)return _0x202b8f['id'];throw CliErrors['apiError'](_0x153aac(0xa7)+_0x58896d+_0x153aac(0xa6)+_0x3cb810);}
1
+ const a28_0xeb9063=a28_0x4583;(function(_0x29928c,_0x1ee168){const _0x305beb=a28_0x4583,_0x38b78a=_0x29928c();while(!![]){try{const _0xb21503=parseInt(_0x305beb(0xe6))/0x1+parseInt(_0x305beb(0xef))/0x2*(-parseInt(_0x305beb(0xe1))/0x3)+-parseInt(_0x305beb(0xe3))/0x4*(parseInt(_0x305beb(0xf0))/0x5)+-parseInt(_0x305beb(0xde))/0x6+-parseInt(_0x305beb(0xea))/0x7*(-parseInt(_0x305beb(0xed))/0x8)+-parseInt(_0x305beb(0xe0))/0x9+-parseInt(_0x305beb(0xf1))/0xa*(-parseInt(_0x305beb(0xe4))/0xb);if(_0xb21503===_0x1ee168)break;else _0x38b78a['push'](_0x38b78a['shift']());}catch(_0x5e4103){_0x38b78a['push'](_0x38b78a['shift']());}}}(a28_0x12e8,0xe0434));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';function a28_0x12e8(){const _0x47574f=['app-config','update','3092873LRdOVI','Created','create','32cGLHeW','file','518qqYxiR','3139490tbcoGf','64160evadcg','/smartapi/app-config/update','get',',\x20appCode=','isFinite','appCode','Read\x20config\x20value\x20from\x20file','tags','8215068jaaCVD','high-risk-write','340560dtucLV','14019oiZMqS','apiError','8ZwYkHF','2123rEBtcr','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','1786057JRtatL','POST'];a28_0x12e8=function(){return _0x47574f;};return a28_0x12e8();}function a28_0x4583(_0x3ea9aa,_0x3421da){_0x3ea9aa=_0x3ea9aa-0xd7;const _0x12e8e0=a28_0x12e8();let _0x4583b0=_0x12e8e0[_0x3ea9aa];return _0x4583b0;}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='/smartapi/app-config/create',UPDATE_PATH=a28_0xeb9063(0xd7);export const appConfigSet={'service':a28_0xeb9063(0xe8),'command':'set','description':a28_0xeb9063(0xe5),'risk':a28_0xeb9063(0xdf),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0xeb9063(0xee),'type':'string','description':a28_0xeb9063(0xdc)}],async 'validate'(_0x5cd193){readKeyArg(_0x5cd193),readOptionalTags(_0x5cd193),assertSingleValueSource(_0x5cd193);},async 'dryRun'(_0x4352f7){const _0x368d75=a28_0xeb9063,_0x374a1f=readKeyArg(_0x4352f7),_0x3e6b4b=readOptionalTags(_0x4352f7),_0x6b4321=assertSingleValueSource(_0x4352f7);await assertValueSourceReadable(_0x6b4321);const _0x1880cf=await withAppConfigApiBoundary(_0x368d75(0xd8),{'appCode':_0x4352f7['appCode'],'key':_0x374a1f},()=>getAppConfigByKey(_0x4352f7[_0x368d75(0xdb)],_0x374a1f)),_0xfa0dc4=_0x1880cf?'update':_0x368d75(0xec),_0x2fbaf5=_0x1880cf?projectAppConfig(_0x1880cf):null,_0x3a318f=plannedAppConfig({'appCode':_0x4352f7['appCode'],'key':_0x374a1f,'tags':_0x3e6b4b??_0x1880cf?.[_0x368d75(0xdd)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0xfa0dc4,'appCode':_0x4352f7[_0x368d75(0xdb)],'key':_0x374a1f,'before':_0x2fbaf5,'after':_0x3a318f,'dryRun':!![]}),{'method':_0x368d75(0xe7),'url':_0xfa0dc4===_0x368d75(0xe9)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x1b1dd7){const _0x343133=a28_0xeb9063,_0x22b5a0=readKeyArg(_0x1b1dd7),_0x2c4166=readOptionalTags(_0x1b1dd7),_0x3a298a=await withAppConfigApiBoundary('get',{'appCode':_0x1b1dd7[_0x343133(0xdb)],'key':_0x22b5a0},()=>getAppConfigByKey(_0x1b1dd7[_0x343133(0xdb)],_0x22b5a0)),_0x3806d1=_0x3a298a?projectAppConfig(_0x3a298a):null,_0xa197e0=_0x3a298a?'update':_0x343133(0xec),{value:_0x42939b,warnings:_0x2c9c42}=await readAppConfigValue(_0x1b1dd7),_0x2eff30={'appCode':_0x1b1dd7[_0x343133(0xdb)],'key':_0x22b5a0,'value':_0x42939b,'tags':_0x2c4166??_0x3a298a?.['tags']??undefined};await withAppConfigApiBoundary(_0xa197e0,{'appCode':_0x1b1dd7['appCode'],'key':_0x22b5a0},async()=>{_0x3a298a?await updateAppConfig({..._0x2eff30,'id':requireAppConfigId(_0x3a298a,_0x22b5a0,_0x1b1dd7['appCode'])}):await createAppConfig(_0x2eff30);});const _0x45713b=await withAppConfigApiBoundary(_0x343133(0xd8),{'appCode':_0x1b1dd7[_0x343133(0xdb)],'key':_0x22b5a0},()=>getAppConfigByKey(_0x1b1dd7[_0x343133(0xdb)],_0x22b5a0)),_0x5bd116=_0x45713b?projectAppConfig(_0x45713b):plannedAppConfig({'appCode':_0x1b1dd7['appCode'],'key':_0x22b5a0,'tags':_0x2eff30[_0x343133(0xdd)],'hasValue':_0x42939b!==''});return{'ok':!![],'data':buildMutationData({'operation':_0xa197e0,'appCode':_0x1b1dd7[_0x343133(0xdb)],'key':_0x22b5a0,'before':_0x3806d1,'after':_0x5bd116,'dryRun':![],'warnings':_0x2c9c42}),'message':(_0xa197e0===_0x343133(0xe9)?'Updated':_0x343133(0xeb))+'\x20app\x20config\x20'+_0x22b5a0};}};function requireAppConfigId(_0xa45a46,_0x571bd8,_0x33080a){const _0x48db76=a28_0xeb9063;if(typeof _0xa45a46['id']==='number'&&Number[_0x48db76(0xda)](_0xa45a46['id'])&&_0xa45a46['id']>0x0)return _0xa45a46['id'];throw CliErrors[_0x48db76(0xe2)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x571bd8+_0x48db76(0xd9)+_0x33080a);}
@@ -1 +1 @@
1
- function a29_0x304f(_0x3e8386,_0x2f8df5){_0x3e8386=_0x3e8386-0x76;const _0x1f2a50=a29_0x1f2a();let _0x304f3c=_0x1f2a50[_0x3e8386];return _0x304f3c;}const a29_0x58a043=a29_0x304f;(function(_0x12c9e0,_0x21b064){const _0x17d161=a29_0x304f,_0x41f300=_0x12c9e0();while(!![]){try{const _0x2c9093=parseInt(_0x17d161(0x99))/0x1+parseInt(_0x17d161(0xa3))/0x2+-parseInt(_0x17d161(0x82))/0x3+parseInt(_0x17d161(0x98))/0x4*(parseInt(_0x17d161(0xba))/0x5)+parseInt(_0x17d161(0x8a))/0x6*(parseInt(_0x17d161(0x9f))/0x7)+parseInt(_0x17d161(0x95))/0x8*(-parseInt(_0x17d161(0x7a))/0x9)+parseInt(_0x17d161(0xae))/0xa;if(_0x2c9093===_0x21b064)break;else _0x41f300['push'](_0x41f300['shift']());}catch(_0x1ebc79){_0x41f300['push'](_0x41f300['shift']());}}}(a29_0x1f2a,0x753cd));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x58a043(0x8f),'description':a29_0x58a043(0x94),'required':!![]};export const VALUE_ARG={'name':a29_0x58a043(0x77),'description':a29_0x58a043(0x7e),'required':![]};export const TAGS_FLAG={'name':a29_0x58a043(0xb1),'type':a29_0x58a043(0x97),'description':a29_0x58a043(0x80)};export const STDIN_FLAG={'name':'stdin','type':'boolean','description':a29_0x58a043(0xab),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x58a043(0x92),'type':a29_0x58a043(0x97),'description':a29_0x58a043(0xb4)};export const REVEAL_FLAG={'name':'reveal','type':a29_0x58a043(0xb5),'description':a29_0x58a043(0xaf),'default':![]};export function readKeyArg(_0x47a1c0){const _0xe25746=a29_0x58a043,_0x52a966=_0x47a1c0['args'][0x0]?.[_0xe25746(0xa5)]()??'';return validateKey(_0x52a966),_0x52a966;}export function readOptionalTags(_0x4462b5){const _0x4bf9a9=a29_0x58a043,_0x14b551=_0x4462b5[_0x4bf9a9(0x9e)]('tags')[_0x4bf9a9(0xa5)]();if(!_0x14b551)return undefined;if(_0x14b551[_0x4bf9a9(0x8c)]>0x20)throw CliErrors[_0x4bf9a9(0xa2)](_0x4bf9a9(0x8b));return _0x14b551;}export function validateKey(_0xb3be8a){const _0xc286a1=a29_0x58a043;if(!_0xb3be8a)throw CliErrors[_0xc286a1(0xa2)]('Missing\x20app-config\x20key.');if(_0xb3be8a[_0xc286a1(0x8c)]>0x100)throw CliErrors['validation'](_0xc286a1(0x9b));}export function projectAppConfig(_0x3344f0,_0x195e28){const _0x519ab0=a29_0x58a043,_0x1c5b60=_0x3344f0[_0x519ab0(0x77)]!==undefined&&_0x3344f0[_0x519ab0(0x77)]!==null&&_0x3344f0[_0x519ab0(0x77)]!=='',_0x3e430a={'appCode':_0x3344f0['appCode'],'key':_0x3344f0[_0x519ab0(0x8f)],'tags':_0x3344f0[_0x519ab0(0xb1)]??undefined,'hasValue':_0x1c5b60,'valueRedacted':_0x1c5b60&&!_0x195e28?.['reveal'],'gmtCreate':_0x3344f0[_0x519ab0(0x87)],'gmtModified':_0x3344f0[_0x519ab0(0x83)]};return _0x195e28?.[_0x519ab0(0x79)]&&(_0x3e430a[_0x519ab0(0x77)]=_0x3344f0[_0x519ab0(0x77)]??'',_0x3e430a[_0x519ab0(0xad)]=![]),_0x3e430a;}export function plannedAppConfig(_0x45ddda){const _0x2fab7e=a29_0x58a043,_0x15c5e5=_0x45ddda[_0x2fab7e(0xbb)]??!![];return{'appCode':_0x45ddda[_0x2fab7e(0x93)],'key':_0x45ddda[_0x2fab7e(0x8f)],'tags':_0x45ddda[_0x2fab7e(0xb1)]??undefined,'hasValue':_0x15c5e5,'valueRedacted':_0x15c5e5};}export function buildMutationData(_0xfaa3fb){const _0x48f958=a29_0x58a043;return{'operation':_0xfaa3fb[_0x48f958(0xb3)],'selector':{'appCode':_0xfaa3fb[_0x48f958(0x93)],'key':_0xfaa3fb['key']},'before':_0xfaa3fb[_0x48f958(0x8e)],'after':_0xfaa3fb[_0x48f958(0x78)],'dryRun':_0xfaa3fb[_0x48f958(0xa8)],'warnings':_0xfaa3fb[_0x48f958(0x9d)]??[]};}export async function withAppConfigApiBoundary(_0x3e93a3,_0x302df2,_0x280382){const _0x36219e=a29_0x58a043;try{return await _0x280382();}catch{const _0x17dbd4=[_0x36219e(0xa0)+_0x302df2['appCode']];if(_0x302df2[_0x36219e(0x8f)])_0x17dbd4['push']('key:\x20'+_0x302df2[_0x36219e(0x8f)]);_0x17dbd4[_0x36219e(0xa9)](_0x36219e(0xaa));throw CliErrors[_0x36219e(0xa4)](_0x36219e(0x96)+_0x3e93a3+_0x36219e(0x84),_0x17dbd4[_0x36219e(0xb0)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x220eea,_0xd52a1d){const _0x47bf4f=a29_0x58a043;return Object[_0x47bf4f(0x86)](_0x220eea,{'method':{'value':_0xd52a1d['method'],'enumerable':![]},'url':{'value':_0xd52a1d[_0x47bf4f(0xb2)],'enumerable':![]}});}export function assertSingleValueSource(_0x3ea992){const _0x194ba6=a29_0x58a043,_0x2f99a0=[];_0x3ea992[_0x194ba6(0x7d)][_0x194ba6(0x8c)]>0x1&&_0x2f99a0[_0x194ba6(0xa9)]({'kind':_0x194ba6(0xa6),'value':_0x3ea992[_0x194ba6(0x7d)][_0x194ba6(0xac)](0x1)[_0x194ba6(0xb0)]('\x20')});const _0xd83da7=_0x3ea992['flag'](_0x194ba6(0x77));_0xd83da7!==undefined&&_0xd83da7!==null&&_0x2f99a0['push']({'kind':_0x194ba6(0xa6),'value':String(_0xd83da7)});_0x3ea992[_0x194ba6(0xb7)](_0x194ba6(0xb8))&&_0x2f99a0['push']({'kind':_0x194ba6(0xb8)});const _0x56cffe=_0x3ea992[_0x194ba6(0x9e)](_0x194ba6(0x92))['trim']();_0x56cffe&&_0x2f99a0[_0x194ba6(0xa9)]({'kind':_0x194ba6(0x9a),'name':_0x56cffe});const _0x437c16=_0x3ea992['str']('file')[_0x194ba6(0xa5)]();_0x437c16&&_0x2f99a0[_0x194ba6(0xa9)]({'kind':_0x194ba6(0x8d),'path':_0x437c16});if(_0x2f99a0[_0x194ba6(0x8c)]===0x0)throw CliErrors[_0x194ba6(0xa2)](_0x194ba6(0x7c),_0x194ba6(0x90));if(_0x2f99a0[_0x194ba6(0x8c)]>0x1)throw CliErrors[_0x194ba6(0xa2)](_0x194ba6(0x88),'Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');return _0x2f99a0[0x0];}export async function assertValueSourceReadable(_0x4bb5b8){const _0x5d9201=a29_0x58a043;if(_0x4bb5b8[_0x5d9201(0x91)]==='env'&&!(_0x4bb5b8['name']in process.env))throw CliErrors[_0x5d9201(0xa2)](_0x5d9201(0x81)+_0x4bb5b8[_0x5d9201(0xb9)]);if(_0x4bb5b8[_0x5d9201(0x91)]===_0x5d9201(0x8d))try{await access(_0x4bb5b8[_0x5d9201(0x89)]);}catch{throw CliErrors[_0x5d9201(0xa2)](_0x5d9201(0x85)+_0x4bb5b8[_0x5d9201(0x89)]);}}export async function readAppConfigValue(_0x3f2474){const _0x5383c2=a29_0x58a043,_0x1a2b7d=assertSingleValueSource(_0x3f2474),_0x53021e=[];if(_0x1a2b7d['kind']===_0x5383c2(0xa6))return _0x53021e[_0x5383c2(0xa9)](_0x5383c2(0x7f)),{'value':_0x1a2b7d[_0x5383c2(0x77)]??'','source':_0x1a2b7d[_0x5383c2(0x91)],'warnings':_0x53021e};if(_0x1a2b7d[_0x5383c2(0x91)]===_0x5383c2(0xb8))return{'value':await readStdin(),'source':_0x1a2b7d[_0x5383c2(0x91)],'warnings':_0x53021e};if(_0x1a2b7d[_0x5383c2(0x91)]==='env'){if(!(_0x1a2b7d[_0x5383c2(0xb9)]in process.env))throw CliErrors[_0x5383c2(0xa2)](_0x5383c2(0x81)+_0x1a2b7d[_0x5383c2(0xb9)]);return{'value':process.env[_0x1a2b7d.name]??'','source':_0x1a2b7d[_0x5383c2(0x91)],'warnings':_0x53021e};}return{'value':await readFile(_0x1a2b7d['path'],_0x5383c2(0xb6)),'source':_0x1a2b7d['kind'],'warnings':_0x53021e};}function a29_0x1f2a(){const _0x5d5077=['string','4ukFVwe','173151GRjYXl','env','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','end','warnings','str','12075TMIOxF','appCode:\x20','once','validation','997692osMdrR','apiError','trim','argument','error','dryRun','push','value\x20is\x20redacted','Read\x20config\x20value\x20from\x20stdin','slice','valueRedacted','5912200YLQFuC','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','join','tags','url','operation','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','boolean','utf8','bool','stdin','name','1292945MsGNmZ','hasValue','data','value','after','reveal','20421EFKviA','setEncoding','Missing\x20app-config\x20value\x20source.','args','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','Config\x20tags\x20for\x20filtering/display\x20metadata','Environment\x20variable\x20is\x20not\x20set:\x20','1564020iUMHUS','gmtModified','\x20app\x20config.','Value\x20file\x20is\x20not\x20readable:\x20','defineProperties','gmtCreate','App\x20config\x20value\x20source\x20is\x20ambiguous.','path','708QmEwpn','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','length','file','before','key','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','kind','from-env','appCode','Runtime\x20app-config\x20key','2552edieOZ','Failed\x20to\x20'];a29_0x1f2a=function(){return _0x5d5077;};return a29_0x1f2a();}function readStdin(){return new Promise((_0x47d429,_0x42e5fb)=>{const _0x4d3540=a29_0x304f;let _0x2e551f='';process[_0x4d3540(0xb8)][_0x4d3540(0x7b)]('utf8'),process['stdin']['on'](_0x4d3540(0x76),_0x553754=>{_0x2e551f+=_0x553754;}),process[_0x4d3540(0xb8)]['once'](_0x4d3540(0x9c),()=>_0x47d429(_0x2e551f)),process['stdin'][_0x4d3540(0xa1)](_0x4d3540(0xa7),_0x42e5fb);});}
1
+ const a29_0x2a2516=a29_0x25bb;(function(_0x391000,_0xd821fe){const _0x19d634=a29_0x25bb,_0x4f2135=_0x391000();while(!![]){try{const _0x25a903=-parseInt(_0x19d634(0xf9))/0x1*(parseInt(_0x19d634(0xcc))/0x2)+parseInt(_0x19d634(0xd1))/0x3+-parseInt(_0x19d634(0xcd))/0x4+-parseInt(_0x19d634(0xfe))/0x5+-parseInt(_0x19d634(0xf4))/0x6+parseInt(_0x19d634(0xdd))/0x7+parseInt(_0x19d634(0xfb))/0x8;if(_0x25a903===_0xd821fe)break;else _0x4f2135['push'](_0x4f2135['shift']());}catch(_0x4bba13){_0x4f2135['push'](_0x4f2135['shift']());}}}(a29_0x4323,0x74650));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':'key','description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x2a2516(0xdf),'required':![]};export const TAGS_FLAG={'name':a29_0x2a2516(0xd9),'type':a29_0x2a2516(0xd8),'description':a29_0x2a2516(0xe8)};export const STDIN_FLAG={'name':'stdin','type':'boolean','description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a29_0x2a2516(0xe1),'type':a29_0x2a2516(0xd8),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0x2a2516(0xe3),'type':a29_0x2a2516(0xd0),'description':a29_0x2a2516(0xf1),'default':![]};export function readKeyArg(_0x2778aa){const _0x804311=a29_0x2a2516,_0x6665db=_0x2778aa[_0x804311(0xcb)][0x0]?.[_0x804311(0xf3)]()??'';return validateKey(_0x6665db),_0x6665db;}export function readOptionalTags(_0x1e2ac8){const _0x55f63=a29_0x2a2516,_0x227a87=_0x1e2ac8[_0x55f63(0xdb)](_0x55f63(0xd9))[_0x55f63(0xf3)]();if(!_0x227a87)return undefined;if(_0x227a87[_0x55f63(0xfd)]>0x20)throw CliErrors[_0x55f63(0xf0)]('App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.');return _0x227a87;}export function validateKey(_0x23ccc2){const _0xd0b078=a29_0x2a2516;if(!_0x23ccc2)throw CliErrors['validation']('Missing\x20app-config\x20key.');if(_0x23ccc2[_0xd0b078(0xfd)]>0x100)throw CliErrors['validation']('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x23a9be,_0x552fad){const _0x3a4a14=a29_0x2a2516,_0x1e4354=_0x23a9be[_0x3a4a14(0xf2)]!==undefined&&_0x23a9be[_0x3a4a14(0xf2)]!==null&&_0x23a9be['value']!=='',_0x5e45aa={'appCode':_0x23a9be[_0x3a4a14(0xc7)],'key':_0x23a9be[_0x3a4a14(0xeb)],'tags':_0x23a9be[_0x3a4a14(0xd9)]??undefined,'hasValue':_0x1e4354,'valueRedacted':_0x1e4354&&!_0x552fad?.[_0x3a4a14(0xe3)],'gmtCreate':_0x23a9be[_0x3a4a14(0xc8)],'gmtModified':_0x23a9be[_0x3a4a14(0xf8)]};return _0x552fad?.['reveal']&&(_0x5e45aa[_0x3a4a14(0xf2)]=_0x23a9be['value']??'',_0x5e45aa[_0x3a4a14(0xef)]=![]),_0x5e45aa;}export function plannedAppConfig(_0x38f195){const _0x122af0=a29_0x2a2516,_0x434c89=_0x38f195['hasValue']??!![];return{'appCode':_0x38f195[_0x122af0(0xc7)],'key':_0x38f195['key'],'tags':_0x38f195[_0x122af0(0xd9)]??undefined,'hasValue':_0x434c89,'valueRedacted':_0x434c89};}export function buildMutationData(_0x471fe0){const _0x5791d2=a29_0x2a2516;return{'operation':_0x471fe0['operation'],'selector':{'appCode':_0x471fe0['appCode'],'key':_0x471fe0[_0x5791d2(0xeb)]},'before':_0x471fe0[_0x5791d2(0xe9)],'after':_0x471fe0[_0x5791d2(0xed)],'dryRun':_0x471fe0[_0x5791d2(0xd7)],'warnings':_0x471fe0['warnings']??[]};}export async function withAppConfigApiBoundary(_0x312cae,_0x2ac7c5,_0x3e199f){const _0x431535=a29_0x2a2516;try{return await _0x3e199f();}catch{const _0x474d9c=[_0x431535(0xe2)+_0x2ac7c5['appCode']];if(_0x2ac7c5['key'])_0x474d9c[_0x431535(0xe5)](_0x431535(0xfc)+_0x2ac7c5[_0x431535(0xeb)]);_0x474d9c[_0x431535(0xe5)](_0x431535(0xcf));throw CliErrors[_0x431535(0xfa)]('Failed\x20to\x20'+_0x312cae+_0x431535(0xea),_0x474d9c[_0x431535(0xd5)](';\x20')+'.');}}function a29_0x25bb(_0x3cf536,_0x508887){_0x3cf536=_0x3cf536-0xc3;const _0x432350=a29_0x4323();let _0x25bba7=_0x432350[_0x3cf536];return _0x25bba7;}function a29_0x4323(){const _0x36eb88=['1036960LUGfzU','env','App\x20config\x20value\x20source\x20is\x20ambiguous.','stdin','slice','appCode','gmtCreate','bool','name','args','20714uwZhEJ','1530384GigmUG','flag','value\x20is\x20redacted','boolean','222540LWccEK','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','setEncoding','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','join','kind','dryRun','string','tags','Environment\x20variable\x20is\x20not\x20set:\x20','str','Missing\x20app-config\x20value\x20source.','35287jdyZtI','url','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','method','from-env','appCode:\x20','reveal','once','push','data','argument','Config\x20tags\x20for\x20filtering/display\x20metadata','before','\x20app\x20config.','key','error','after','file','valueRedacted','validation','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','value','trim','2793318zoRtmt','utf8','path','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','gmtModified','89MvVVSW','apiError','18998760CDCCuX','key:\x20','length'];a29_0x4323=function(){return _0x36eb88;};return a29_0x4323();}export function asAppConfigDryRunResult(_0x5b063f,_0x2ce72f){const _0x44ab4d=a29_0x2a2516;return Object['defineProperties'](_0x5b063f,{'method':{'value':_0x2ce72f[_0x44ab4d(0xe0)],'enumerable':![]},'url':{'value':_0x2ce72f[_0x44ab4d(0xde)],'enumerable':![]}});}export function assertSingleValueSource(_0x30ddc1){const _0xc2545f=a29_0x2a2516,_0x31fd1e=[];_0x30ddc1[_0xc2545f(0xcb)][_0xc2545f(0xfd)]>0x1&&_0x31fd1e[_0xc2545f(0xe5)]({'kind':_0xc2545f(0xe7),'value':_0x30ddc1[_0xc2545f(0xcb)][_0xc2545f(0xc6)](0x1)['join']('\x20')});const _0x1473a1=_0x30ddc1[_0xc2545f(0xce)](_0xc2545f(0xf2));_0x1473a1!==undefined&&_0x1473a1!==null&&_0x31fd1e[_0xc2545f(0xe5)]({'kind':_0xc2545f(0xe7),'value':String(_0x1473a1)});_0x30ddc1[_0xc2545f(0xc9)](_0xc2545f(0xc5))&&_0x31fd1e['push']({'kind':_0xc2545f(0xc5)});const _0x34cb05=_0x30ddc1[_0xc2545f(0xdb)](_0xc2545f(0xe1))[_0xc2545f(0xf3)]();_0x34cb05&&_0x31fd1e[_0xc2545f(0xe5)]({'kind':'env','name':_0x34cb05});const _0x23b063=_0x30ddc1[_0xc2545f(0xdb)](_0xc2545f(0xee))[_0xc2545f(0xf3)]();_0x23b063&&_0x31fd1e[_0xc2545f(0xe5)]({'kind':_0xc2545f(0xee),'path':_0x23b063});if(_0x31fd1e['length']===0x0)throw CliErrors[_0xc2545f(0xf0)](_0xc2545f(0xdc),_0xc2545f(0xd2));if(_0x31fd1e[_0xc2545f(0xfd)]>0x1)throw CliErrors[_0xc2545f(0xf0)](_0xc2545f(0xc4),_0xc2545f(0xf7));return _0x31fd1e[0x0];}export async function assertValueSourceReadable(_0x14edaf){const _0xba29d3=a29_0x2a2516;if(_0x14edaf[_0xba29d3(0xd6)]===_0xba29d3(0xc3)&&!(_0x14edaf[_0xba29d3(0xca)]in process.env))throw CliErrors[_0xba29d3(0xf0)](_0xba29d3(0xda)+_0x14edaf[_0xba29d3(0xca)]);if(_0x14edaf[_0xba29d3(0xd6)]===_0xba29d3(0xee))try{await access(_0x14edaf[_0xba29d3(0xf6)]);}catch{throw CliErrors['validation']('Value\x20file\x20is\x20not\x20readable:\x20'+_0x14edaf[_0xba29d3(0xf6)]);}}export async function readAppConfigValue(_0x47f624){const _0x9a5985=a29_0x2a2516,_0x3358ab=assertSingleValueSource(_0x47f624),_0x265b9d=[];if(_0x3358ab[_0x9a5985(0xd6)]===_0x9a5985(0xe7))return _0x265b9d[_0x9a5985(0xe5)](_0x9a5985(0xd4)),{'value':_0x3358ab[_0x9a5985(0xf2)]??'','source':_0x3358ab[_0x9a5985(0xd6)],'warnings':_0x265b9d};if(_0x3358ab['kind']==='stdin')return{'value':await readStdin(),'source':_0x3358ab[_0x9a5985(0xd6)],'warnings':_0x265b9d};if(_0x3358ab[_0x9a5985(0xd6)]===_0x9a5985(0xc3)){if(!(_0x3358ab['name']in process.env))throw CliErrors[_0x9a5985(0xf0)](_0x9a5985(0xda)+_0x3358ab['name']);return{'value':process.env[_0x3358ab.name]??'','source':_0x3358ab[_0x9a5985(0xd6)],'warnings':_0x265b9d};}return{'value':await readFile(_0x3358ab[_0x9a5985(0xf6)],'utf8'),'source':_0x3358ab[_0x9a5985(0xd6)],'warnings':_0x265b9d};}function readStdin(){return new Promise((_0x4b9418,_0x18443a)=>{const _0x5581f4=a29_0x25bb;let _0x3e09ef='';process[_0x5581f4(0xc5)][_0x5581f4(0xd3)](_0x5581f4(0xf5)),process[_0x5581f4(0xc5)]['on'](_0x5581f4(0xe6),_0x39eb4f=>{_0x3e09ef+=_0x39eb4f;}),process['stdin'][_0x5581f4(0xe4)]('end',()=>_0x4b9418(_0x3e09ef)),process[_0x5581f4(0xc5)]['once'](_0x5581f4(0xec),_0x18443a);});}
@@ -1 +1 @@
1
- const a30_0x316a33=a30_0x3991;(function(_0x3c1337,_0x1f300c){const _0xd86010=a30_0x3991,_0x2851e4=_0x3c1337();while(!![]){try{const _0x20b766=-parseInt(_0xd86010(0x1db))/0x1*(-parseInt(_0xd86010(0x1e6))/0x2)+-parseInt(_0xd86010(0x1e4))/0x3+-parseInt(_0xd86010(0x1da))/0x4+-parseInt(_0xd86010(0x1d7))/0x5+-parseInt(_0xd86010(0x1ed))/0x6+-parseInt(_0xd86010(0x1d9))/0x7+parseInt(_0xd86010(0x1e0))/0x8*(parseInt(_0xd86010(0x1ea))/0x9);if(_0x20b766===_0x1f300c)break;else _0x2851e4['push'](_0x2851e4['shift']());}catch(_0x5827dc){_0x2851e4['push'](_0x2851e4['shift']());}}}(a30_0x4162,0x7842e));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';function a30_0x4162(){const _0xf407aa=['!\x20Not\x20logged\x20in','logout','16MPyrvL','read','auth','Clear\x20login\x20session','368190LhCsDU','../../auth/auth-server-ui.js','2gFOfPo','login','bool','yes','16058340ILclZz','✓\x20Logged\x20out','boolean','5003148jEKCxR','3940135jFAGiZ','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','3705555SqlHwB','3249844QLBJSg','10511NAIyoi','log','Login\x20via\x20browser'];a30_0x4162=function(){return _0xf407aa;};return a30_0x4162();}function a30_0x3991(_0x5d077c,_0x769397){_0x5d077c=_0x5d077c-0x1d7;const _0x4162f2=a30_0x4162();let _0x399138=_0x4162f2[_0x5d077c];return _0x399138;}export const authDefinitions=[{'service':a30_0x316a33(0x1e2),'command':a30_0x316a33(0x1e7),'description':a30_0x316a33(0x1dd),'risk':a30_0x316a33(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x316a33(0x1e9),'type':a30_0x316a33(0x1ec),'description':a30_0x316a33(0x1d8),'default':![]}],async 'execute'(_0xa16540){const _0xfc692b=a30_0x316a33,{runAuthServer:_0x54a79b}=await import(_0xfc692b(0x1e5));return await _0x54a79b({'autoYes':_0xa16540[_0xfc692b(0x1e8)](_0xfc692b(0x1e9)),'nonInteractive':_0xa16540['nonInteractive']}),{'ok':!![]};}},{'service':a30_0x316a33(0x1e2),'command':a30_0x316a33(0x1df),'description':a30_0x316a33(0x1e3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x28cc80){const _0x5a9189=a30_0x316a33;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x5a9189(0x1dc)](_0x5a9189(0x1eb))):console[_0x5a9189(0x1dc)](_0x5a9189(0x1de)),{'ok':!![]};}}];
1
+ function a30_0x34d3(_0x550213,_0x5e5b8f){_0x550213=_0x550213-0x179;const _0x3f18df=a30_0x3f18();let _0x34d345=_0x3f18df[_0x550213];return _0x34d345;}const a30_0x2aa2d8=a30_0x34d3;(function(_0x2b3090,_0x5b9dd4){const _0x56c355=a30_0x34d3,_0x42c024=_0x2b3090();while(!![]){try{const _0x2edb80=parseInt(_0x56c355(0x18b))/0x1+-parseInt(_0x56c355(0x17c))/0x2+-parseInt(_0x56c355(0x18a))/0x3*(parseInt(_0x56c355(0x182))/0x4)+parseInt(_0x56c355(0x17a))/0x5*(-parseInt(_0x56c355(0x179))/0x6)+parseInt(_0x56c355(0x18d))/0x7*(-parseInt(_0x56c355(0x187))/0x8)+-parseInt(_0x56c355(0x17d))/0x9*(parseInt(_0x56c355(0x188))/0xa)+parseInt(_0x56c355(0x17f))/0xb;if(_0x2edb80===_0x5b9dd4)break;else _0x42c024['push'](_0x42c024['shift']());}catch(_0x56d71a){_0x42c024['push'](_0x42c024['shift']());}}}(a30_0x3f18,0x6ec90));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x2aa2d8(0x18e),'command':a30_0x2aa2d8(0x180),'description':a30_0x2aa2d8(0x184),'risk':a30_0x2aa2d8(0x17b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x2aa2d8(0x18c),'type':'boolean','description':a30_0x2aa2d8(0x181),'default':![]}],async 'execute'(_0x557a70){const _0x4cedff=a30_0x2aa2d8,{runAuthServer:_0x58b7de}=await import('../../auth/auth-server-ui.js');return await _0x58b7de({'autoYes':_0x557a70[_0x4cedff(0x189)]('yes'),'nonInteractive':_0x557a70['nonInteractive']}),{'ok':!![]};}},{'service':a30_0x2aa2d8(0x18e),'command':a30_0x2aa2d8(0x17e),'description':a30_0x2aa2d8(0x183),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x58a2d2){const _0x16cb84=a30_0x2aa2d8;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x16cb84(0x185)]('✓\x20Logged\x20out')):console[_0x16cb84(0x185)](_0x16cb84(0x186)),{'ok':!![]};}}];function a30_0x3f18(){const _0x1855c8=['404980ldfgDY','yes','47425jfnBBF','auth','618174dmAFBV','5aRbwPI','read','1136860qHLYaQ','331299VqkyxK','logout','17365689FbCasV','login','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','33884KIngzY','Clear\x20login\x20session','Login\x20via\x20browser','log','!\x20Not\x20logged\x20in','240FAFPcL','10oUsDWE','bool','219aKsnfW'];a30_0x3f18=function(){return _0x1855c8;};return a30_0x3f18();}
@@ -1 +1 @@
1
- function a31_0x53f3(_0x2df7bc,_0x24a517){_0x2df7bc=_0x2df7bc-0x117;const _0x44ebf4=a31_0x44eb();let _0x53f3ad=_0x44ebf4[_0x2df7bc];return _0x53f3ad;}const a31_0x35e789=a31_0x53f3;(function(_0x4c1fc1,_0x1b32b0){const _0x3ac6f9=a31_0x53f3,_0x18c394=_0x4c1fc1();while(!![]){try{const _0x58e0a3=parseInt(_0x3ac6f9(0x138))/0x1+-parseInt(_0x3ac6f9(0x150))/0x2*(-parseInt(_0x3ac6f9(0x15c))/0x3)+parseInt(_0x3ac6f9(0x137))/0x4*(-parseInt(_0x3ac6f9(0x14f))/0x5)+parseInt(_0x3ac6f9(0x13e))/0x6*(parseInt(_0x3ac6f9(0x161))/0x7)+parseInt(_0x3ac6f9(0x157))/0x8+parseInt(_0x3ac6f9(0x164))/0x9+-parseInt(_0x3ac6f9(0x13c))/0xa;if(_0x58e0a3===_0x1b32b0)break;else _0x18c394['push'](_0x18c394['shift']());}catch(_0x51286f){_0x18c394['push'](_0x18c394['shift']());}}}(a31_0x44eb,0x32ca8));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_0x35e789(0x159),'command':'create','description':a31_0x35e789(0x167),'risk':a31_0x35e789(0x120),'flags':[{'name':a31_0x35e789(0x141),'type':a31_0x35e789(0x12f),'required':!![],'enum':['COMMON',a31_0x35e789(0x12a),a31_0x35e789(0x128)],'description':'Script\x20type'},{'name':a31_0x35e789(0x169),'type':a31_0x35e789(0x12f),'required':!![],'description':a31_0x35e789(0x124)},{'name':'description','type':'string','description':'Script\x20description'},{'name':'alias','type':'string','description':a31_0x35e789(0x125)},{'name':a31_0x35e789(0x13b),'type':'string','description':a31_0x35e789(0x15e)},{'name':'operation-type','type':a31_0x35e789(0x12f),'description':a31_0x35e789(0x11f)},{'name':a31_0x35e789(0x15a),'type':a31_0x35e789(0x12f),'description':a31_0x35e789(0x15b),'enum':[a31_0x35e789(0x130),a31_0x35e789(0x12c)]}],async 'validate'(_0x3db459){const _0x13074f=a31_0x35e789,_0x5e4479=_0x3db459[_0x13074f(0x127)](_0x13074f(0x169));if(!isValidBffFunctionName(_0x5e4479))throw CliErrors[_0x13074f(0x12b)]('Invalid\x20function\x20name\x20\x22'+_0x5e4479+_0x13074f(0x13d));},async 'execute'(_0x43015b){const _0x39b03b=a31_0x35e789,_0xfadc21=loadBffProjectConfig(_0x43015b[_0x39b03b(0x136)]),_0x525c68=_0x43015b[_0x39b03b(0x127)](_0x39b03b(0x141)),_0x31aea7=_0x43015b[_0x39b03b(0x127)](_0x39b03b(0x169)),_0x389322=_0x43015b['str']('description')||undefined,_0x50780a=_0x525c68===_0x39b03b(0x128)?await resolveHookOptions(_0xfadc21,_0x43015b):undefined,_0x440922=buildFilePath(_0xfadc21,_0x525c68,_0x31aea7,_0x50780a);if(await fileExists(_0x440922))throw CliErrors['validation'](_0x39b03b(0x14e)+_0x440922);await mkdir(dirname(_0x440922),{'recursive':!![]});const _0x401fcc=generateTemplate(_0x525c68,_0x31aea7,_0x43015b['appCode'],_0x389322,_0x50780a);await writeFile(_0x440922,_0x401fcc,_0x39b03b(0x118));const _0x2613f0={'type':_0x525c68,'name':_0x31aea7,'path':_0x440922};if(_0x389322)_0x2613f0[_0x39b03b(0x151)]=_0x389322;if(_0x50780a){if(_0x50780a['alias'])_0x2613f0[_0x39b03b(0x168)]=_0x50780a['alias'];_0x2613f0[_0x39b03b(0x144)]=_0x50780a[_0x39b03b(0x144)],_0x2613f0[_0x39b03b(0x11c)]=_0x50780a[_0x39b03b(0x11c)],_0x2613f0[_0x39b03b(0x135)]=_0x50780a[_0x39b03b(0x135)];}return{'ok':!![],'data':_0x2613f0,'message':'Created\x20'+_0x525c68+'\x20function:\x20'+_0x31aea7};}};async function resolveHookOptions(_0x280d0a,_0x33a4e0){const _0x2e5e60=a31_0x35e789,_0x3d2275=loadAliasMap(_0x33a4e0[_0x2e5e60(0x123)],undefined,resolveApiFilePath(_0x33a4e0[_0x2e5e60(0x123)],_0x33a4e0[_0x2e5e60(0x136)])),_0x53b89c=_0x3d2275[_0x2e5e60(0x11d)]>0x0;let _0x53655f,_0xc39399,_0x3b61d2;const _0x9abda6=_0x33a4e0['str']('alias'),_0x2ff4b5=_0x33a4e0[_0x2e5e60(0x127)](_0x2e5e60(0x13b));if(_0x9abda6){const _0x2f1954=resolveAlias(_0x33a4e0[_0x2e5e60(0x123)],_0x9abda6,undefined,resolveApiFilePath(_0x33a4e0[_0x2e5e60(0x123)],_0x33a4e0[_0x2e5e60(0x136)]));if(!_0x2f1954){const _0x870b3e=_0x53b89c?'Available\x20aliases:\x20'+_0x3d2275[_0x2e5e60(0x166)](_0x54aae7=>_0x54aae7[_0x2e5e60(0x168)])[_0x2e5e60(0x139)](',\x20'):_0x2e5e60(0x15d)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.';throw CliErrors[_0x2e5e60(0x12b)](_0x2e5e60(0x148)+_0x9abda6+_0x2e5e60(0x134)+_0x870b3e);}_0x53655f=_0x9abda6,_0xc39399=_0x2f1954;}else{if(_0x2ff4b5){_0xc39399=_0x2ff4b5;const _0x7176b6=_0x3d2275['find'](_0x31d2d3=>_0x31d2d3['datasetCode']===_0x2ff4b5);_0x53655f=_0x7176b6?.[_0x2e5e60(0x168)];}else{if(_0x33a4e0[_0x2e5e60(0x149)])throw CliErrors[_0x2e5e60(0x12b)](_0x2e5e60(0x156));else{if(_0x53b89c){const _0x44cc12=_0x3d2275[_0x2e5e60(0x166)](_0x4992c5=>_0x4992c5[_0x2e5e60(0x168)]+'\x20('+_0x4992c5[_0x2e5e60(0x160)]+')'),_0x4c3a3f=await promptSelect('Select\x20dataset:',_0x44cc12),_0x475053=_0x3d2275[_0x4c3a3f];if(!_0x475053)throw CliErrors[_0x2e5e60(0x12b)](_0x2e5e60(0x140));_0x53655f=_0x475053['alias'],_0xc39399=_0x475053[_0x2e5e60(0x144)];}else{const _0x1063c0=await listDatasets(_0x33a4e0[_0x2e5e60(0x136)]);if(_0x1063c0[_0x2e5e60(0x11d)]===0x0)throw CliErrors[_0x2e5e60(0x12b)](_0x2e5e60(0x11b));const _0x15d5ed=_0x1063c0[_0x2e5e60(0x166)](_0x219b5c=>_0x219b5c[_0x2e5e60(0x169)]+'\x20['+(_0x219b5c[_0x2e5e60(0x154)]??_0x2e5e60(0x158))+_0x2e5e60(0x13a)+_0x219b5c[_0x2e5e60(0x16a)]+')'),_0x44d324=await promptSelect(_0x2e5e60(0x133),_0x15d5ed),_0x29be0b=_0x1063c0[_0x44d324];if(!_0x29be0b)throw CliErrors[_0x2e5e60(0x12b)](_0x2e5e60(0x140));_0xc39399=_0x29be0b[_0x2e5e60(0x16a)],_0x53655f=undefined;}}}}const _0x3c2c0d=await listDatasets(_0x33a4e0[_0x2e5e60(0x136)]),_0x189155=_0x3c2c0d['find'](_0x477198=>_0x477198[_0x2e5e60(0x16a)]===_0xc39399);if(!_0x189155)throw CliErrors[_0x2e5e60(0x12b)](_0x2e5e60(0x165)+_0xc39399+'\x22.\x20'+(_0x53655f?'The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`'+CLI_BIN_NAME+_0x2e5e60(0x155):''));_0x3b61d2=_0x189155['id'];const _0x30ae4d=_0x53655f??_0xc39399,_0x2fca0b=await listBffDatasetOperations(_0x33a4e0[_0x2e5e60(0x136)],_0x3b61d2),_0x44bf99=_0x2fca0b?Object[_0x2e5e60(0x11a)](_0x2fca0b):[];if(_0x44bf99[_0x2e5e60(0x11d)]===0x0)throw CliErrors[_0x2e5e60(0x12b)](_0x2e5e60(0x153)+_0x30ae4d+'.');let _0x4156bb;const _0xa536f6=_0x33a4e0[_0x2e5e60(0x127)](_0x2e5e60(0x13f));if(_0xa536f6){if(!_0x44bf99[_0x2e5e60(0x119)](_0xa536f6))throw CliErrors[_0x2e5e60(0x12b)]('Operation\x20type\x20\x22'+_0xa536f6+_0x2e5e60(0x117)+_0x30ae4d+'.\x20'+(_0x2e5e60(0x131)+_0x44bf99['join'](',\x20')));_0x4156bb=_0xa536f6;}else{if(_0x33a4e0['nonInteractive'])throw CliErrors[_0x2e5e60(0x12b)](_0x2e5e60(0x129));const _0x46e8da=await promptSelect(_0x2e5e60(0x146),_0x44bf99);_0x4156bb=_0x44bf99[_0x46e8da]??_0x44bf99[0x0];}let _0x31e1fc=normalizeHookFunctionNode(_0x33a4e0[_0x2e5e60(0x127)]('function-node'));if(!_0x31e1fc){if(_0x33a4e0['str'](_0x2e5e60(0x15a)))throw CliErrors[_0x2e5e60(0x12b)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x33a4e0['nonInteractive'])throw CliErrors[_0x2e5e60(0x12b)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x479436=await promptSelect(_0x2e5e60(0x14d),['before',_0x2e5e60(0x12c)]);_0x31e1fc=[_0x2e5e60(0x130),_0x2e5e60(0x12c)][_0x479436]??_0x2e5e60(0x130);}return{'alias':_0x53655f,'datasetCode':_0xc39399,'datasetId':_0x3b61d2,'operationType':_0x4156bb,'functionNode':_0x31e1fc};}async function promptSelect(_0x94296a,_0x51521c){const _0xbf8981=a31_0x35e789;if(_0x51521c[_0xbf8981(0x11d)]===0x1)return 0x0;for(const [_0x57b378,_0x4b5057]of _0x51521c[_0xbf8981(0x145)]()){process['stderr'][_0xbf8981(0x120)]('\x20\x20'+(_0x57b378+0x1)+'.\x20'+_0x4b5057+'\x0a');}const _0x56fd34=createInterface({'input':process[_0xbf8981(0x15f)],'output':process[_0xbf8981(0x121)]});while(!![]){const _0x351f93=await new Promise(_0x4f6201=>{_0x56fd34['question'](_0x94296a+'\x20',_0x4f6201);}),_0x2e50ff=Number['parseInt'](_0x351f93[_0xbf8981(0x126)](),0xa);if(Number['isInteger'](_0x2e50ff)&&_0x2e50ff>=0x1&&_0x2e50ff<=_0x51521c['length'])return _0x56fd34['close'](),_0x2e50ff-0x1;process[_0xbf8981(0x121)][_0xbf8981(0x120)](_0xbf8981(0x11e)+_0x51521c[_0xbf8981(0x11d)]+'.\x0a');}}function a31_0x44eb(){const _0x5659c7=['stdin','tableName','861ndGroc','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','2073042JIdZXA','Dataset\x20not\x20found\x20for\x20code\x20\x22','map','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','alias','name','code','\x22\x20not\x20found\x20for\x20dataset\x20','utf8','includes','keys','No\x20datasets\x20found\x20for\x20this\x20app.','operationType','length','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Operation\x20type\x20(HOOK\x20only)','write','stderr','TODO:\x20add\x20script\x20description','apiDir','Function\x20name\x20(valid\x20JS\x20identifier)','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','trim','str','HOOK','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','ENDPOINT','validation','after','\x0a\x20*\x20[触发节点]\x20','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','string','before','Available:\x20','.js','Select\x20dataset:','\x22\x20not\x20found.\x20','functionNode','appCode','1486180KdMvvR','214400IzUiTO','join',']\x20(','datasetcode','2076300ffmMcT','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','1650owzWHQ','operation-type','Invalid\x20dataset\x20selection.','type','scriptsRootDir','.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','datasetCode','entries','Select\x20operation\x20type:','HOOK\x20requires\x20alias/operation/node\x20options.','Alias\x20\x22','nonInteractive','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','COMMON','Select\x20trigger\x20node:','File\x20already\x20exists:\x20','5zVVKqJ','126670fPrYaC','description','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','source','\x20api\x20pull`\x20to\x20refresh.','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','1455856IMuMhq','UNKNOWN','bff','function-node','Trigger\x20node\x20(HOOK\x20only)','6Gxsywp','No\x20api.ts\x20found.\x20Run\x20`','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)'];a31_0x44eb=function(){return _0x5659c7;};return a31_0x44eb();}function buildFilePath(_0x18927b,_0x5942e3,_0x21c939,_0xd6f44f){const _0x5936d9=a31_0x35e789;if(_0x5942e3===_0x5936d9(0x128)){if(!_0xd6f44f)throw CliErrors[_0x5936d9(0x12b)](_0x5936d9(0x147));const _0x3a6c2c=_0xd6f44f[_0x5936d9(0x168)]??_0xd6f44f['datasetCode'];return join(_0x18927b[_0x5936d9(0x142)],_0x5936d9(0x128),_0x3a6c2c,_0xd6f44f['operationType'],_0xd6f44f['functionNode'],_0x21c939+_0x5936d9(0x132));}return join(_0x18927b['scriptsRootDir'],_0x5942e3,_0x21c939+_0x5936d9(0x132));}export function generateTemplate(_0x2679d7,_0x27dda8,_0x4a3841,_0x468441,_0x1c4f4a){const _0x2be23d=a31_0x35e789,_0x5931db=_0x468441?.[_0x2be23d(0x126)]()||_0x2be23d(0x122);if(_0x2679d7===_0x2be23d(0x14c))return _0x2be23d(0x152)+_0x5931db+'\x0a\x20*\x20[脚本名称]\x20'+_0x27dda8+_0x2be23d(0x162)+_0x27dda8+_0x2be23d(0x143)+_0x27dda8+_0x2be23d(0x12e);if(_0x2679d7===_0x2be23d(0x12a))return _0x2be23d(0x14a)+_0x5931db+_0x2be23d(0x14b)+_0x4a3841+'/'+_0x27dda8+'\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'+_0x27dda8+_0x2be23d(0x12e);if(!_0x1c4f4a)throw CliErrors[_0x2be23d(0x12b)](_0x2be23d(0x163));return'/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x5931db+'\x0a\x20*\x20[接口路径]\x20POST\x20/api/'+_0x4a3841+'/'+_0x1c4f4a['datasetCode']+'/'+_0x1c4f4a[_0x2be23d(0x11c)]+_0x2be23d(0x12d)+_0x1c4f4a[_0x2be23d(0x135)]+'\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'+_0x27dda8+_0x2be23d(0x12e);}
1
+ const a31_0xc03609=a31_0xb0b5;(function(_0x4fd7fa,_0x5d8a09){const _0x39cbc2=a31_0xb0b5,_0x576821=_0x4fd7fa();while(!![]){try{const _0xcce929=-parseInt(_0x39cbc2(0xb4))/0x1*(parseInt(_0x39cbc2(0xdd))/0x2)+parseInt(_0x39cbc2(0xd0))/0x3+parseInt(_0x39cbc2(0xae))/0x4+-parseInt(_0x39cbc2(0xb2))/0x5+parseInt(_0x39cbc2(0xf2))/0x6*(-parseInt(_0x39cbc2(0xb5))/0x7)+parseInt(_0x39cbc2(0xc8))/0x8*(-parseInt(_0x39cbc2(0xc5))/0x9)+parseInt(_0x39cbc2(0xec))/0xa*(parseInt(_0x39cbc2(0xc2))/0xb);if(_0xcce929===_0x5d8a09)break;else _0x576821['push'](_0x576821['shift']());}catch(_0x2f3700){_0x576821['push'](_0x576821['shift']());}}}(a31_0x64c0,0xaa8f9));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';function a31_0x64c0(){const _0x2c83dd=['datasetcode','appCode','Operation\x20type\x20\x22','Select\x20dataset:','nonInteractive','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','operation-type','40iKmyEe','after','tableName','string','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','apiDir','1854924dUpVpa','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','Dataset\x20not\x20found\x20for\x20code\x20\x22','join','bff','function-node','map','Select\x20trigger\x20node:','trim','\x0a\x20*\x20[触发节点]\x20','Invalid\x20function\x20name\x20\x22','\x22\x20not\x20found\x20for\x20dataset\x20','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','type','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','question','length','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','COMMON','1672380vmAEjf','isInteger','alias','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','1898610JNKzam','functionNode','263DbMErW','28emWoIH','validation','operationType','Created\x20','datasetCode','scriptsRootDir','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','write','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','ENDPOINT','name','before','8457768VKXHRo','\x0a\x20*\x20[脚本名称]\x20','\x22.\x20','9uXbTJA',']\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','4433688frzWGD','Available:\x20','\x22\x20not\x20found.\x20','includes','close','HOOK','parseInt','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','1399329otiuxt','create','stdin','keys','str','No\x20operation\x20types\x20found\x20for\x20dataset\x20','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','Script\x20description','code','.js','source','find','stderr','8296ltnBTc','description','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','\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','No\x20api.ts\x20found.\x20Run\x20`','Available\x20aliases:\x20','Script\x20type','Alias\x20\x22'];a31_0x64c0=function(){return _0x2c83dd;};return a31_0x64c0();}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_0xc03609(0xf6),'command':a31_0xc03609(0xd1),'description':a31_0xc03609(0xac),'risk':a31_0xc03609(0xbd),'flags':[{'name':a31_0xc03609(0xa6),'type':a31_0xc03609(0xef),'required':!![],'enum':[a31_0xc03609(0xad),'ENDPOINT',a31_0xc03609(0xcd)],'description':a31_0xc03609(0xe3)},{'name':a31_0xc03609(0xc0),'type':a31_0xc03609(0xef),'required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':a31_0xc03609(0xde),'type':a31_0xc03609(0xef),'description':a31_0xc03609(0xd7)},{'name':a31_0xc03609(0xb0),'type':a31_0xc03609(0xef),'description':a31_0xc03609(0xa7)},{'name':a31_0xc03609(0xe5),'type':'string','description':a31_0xc03609(0xab)},{'name':a31_0xc03609(0xeb),'type':a31_0xc03609(0xef),'description':'Operation\x20type\x20(HOOK\x20only)'},{'name':a31_0xc03609(0xf7),'type':a31_0xc03609(0xef),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':[a31_0xc03609(0xc1),a31_0xc03609(0xed)]}],async 'validate'(_0x8a1202){const _0x310b8e=a31_0xc03609,_0x37208d=_0x8a1202[_0x310b8e(0xd4)](_0x310b8e(0xc0));if(!isValidBffFunctionName(_0x37208d))throw CliErrors[_0x310b8e(0xb6)](_0x310b8e(0xa2)+_0x37208d+_0x310b8e(0xf3));},async 'execute'(_0x28fa6f){const _0x3f4a04=a31_0xc03609,_0x318de0=loadBffProjectConfig(_0x28fa6f[_0x3f4a04(0xe6)]),_0x40a8ee=_0x28fa6f['str'](_0x3f4a04(0xa6)),_0x579783=_0x28fa6f[_0x3f4a04(0xd4)](_0x3f4a04(0xc0)),_0x5a3b53=_0x28fa6f['str'](_0x3f4a04(0xde))||undefined,_0x3e8e44=_0x40a8ee===_0x3f4a04(0xcd)?await resolveHookOptions(_0x318de0,_0x28fa6f):undefined,_0x44c95a=buildFilePath(_0x318de0,_0x40a8ee,_0x579783,_0x3e8e44);if(await fileExists(_0x44c95a))throw CliErrors[_0x3f4a04(0xb6)]('File\x20already\x20exists:\x20'+_0x44c95a);await mkdir(dirname(_0x44c95a),{'recursive':!![]});const _0x2b1095=generateTemplate(_0x40a8ee,_0x579783,_0x28fa6f[_0x3f4a04(0xe6)],_0x5a3b53,_0x3e8e44);await writeFile(_0x44c95a,_0x2b1095,'utf8');const _0x21fc1d={'type':_0x40a8ee,'name':_0x579783,'path':_0x44c95a};if(_0x5a3b53)_0x21fc1d['description']=_0x5a3b53;if(_0x3e8e44){if(_0x3e8e44['alias'])_0x21fc1d[_0x3f4a04(0xb0)]=_0x3e8e44[_0x3f4a04(0xb0)];_0x21fc1d['datasetCode']=_0x3e8e44[_0x3f4a04(0xb9)],_0x21fc1d[_0x3f4a04(0xb7)]=_0x3e8e44[_0x3f4a04(0xb7)],_0x21fc1d[_0x3f4a04(0xb3)]=_0x3e8e44['functionNode'];}return{'ok':!![],'data':_0x21fc1d,'message':_0x3f4a04(0xb8)+_0x40a8ee+'\x20function:\x20'+_0x579783};}};async function resolveHookOptions(_0x642dc7,_0x5c135a){const _0x22fd30=a31_0xc03609,_0x244b25=loadAliasMap(_0x5c135a[_0x22fd30(0xf1)],undefined,resolveApiFilePath(_0x5c135a[_0x22fd30(0xf1)],_0x5c135a['appCode'])),_0x2613bb=_0x244b25[_0x22fd30(0xa9)]>0x0;let _0x5ac7b7,_0x30b1fe,_0x16a2dc;const _0x3ed675=_0x5c135a['str'](_0x22fd30(0xb0)),_0x49df21=_0x5c135a[_0x22fd30(0xd4)]('datasetcode');if(_0x3ed675){const _0x33d739=resolveAlias(_0x5c135a[_0x22fd30(0xf1)],_0x3ed675,undefined,resolveApiFilePath(_0x5c135a['apiDir'],_0x5c135a[_0x22fd30(0xe6)]));if(!_0x33d739){const _0x5341f0=_0x2613bb?_0x22fd30(0xe2)+_0x244b25[_0x22fd30(0xf8)](_0x1f5077=>_0x1f5077[_0x22fd30(0xb0)])[_0x22fd30(0xf5)](',\x20'):_0x22fd30(0xe1)+CLI_BIN_NAME+_0x22fd30(0xbe);throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xe4)+_0x3ed675+_0x22fd30(0xca)+_0x5341f0);}_0x5ac7b7=_0x3ed675,_0x30b1fe=_0x33d739;}else{if(_0x49df21){_0x30b1fe=_0x49df21;const _0x4f8e07=_0x244b25[_0x22fd30(0xdb)](_0x441fdb=>_0x441fdb[_0x22fd30(0xb9)]===_0x49df21);_0x5ac7b7=_0x4f8e07?.[_0x22fd30(0xb0)];}else{if(_0x5c135a['nonInteractive'])throw CliErrors['validation'](_0x22fd30(0xa4));else{if(_0x2613bb){const _0x289f80=_0x244b25['map'](_0x5728d2=>_0x5728d2['alias']+'\x20('+_0x5728d2[_0x22fd30(0xee)]+')'),_0x45cd66=await promptSelect('Select\x20dataset:',_0x289f80),_0x39049c=_0x244b25[_0x45cd66];if(!_0x39049c)throw CliErrors[_0x22fd30(0xb6)]('Invalid\x20dataset\x20selection.');_0x5ac7b7=_0x39049c[_0x22fd30(0xb0)],_0x30b1fe=_0x39049c[_0x22fd30(0xb9)];}else{const _0x418f51=await listDatasets(_0x5c135a[_0x22fd30(0xe6)]);if(_0x418f51['length']===0x0)throw CliErrors[_0x22fd30(0xb6)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x51b28d=_0x418f51[_0x22fd30(0xf8)](_0x328b11=>_0x328b11[_0x22fd30(0xc0)]+'\x20['+(_0x328b11[_0x22fd30(0xda)]??'UNKNOWN')+_0x22fd30(0xc6)+_0x328b11[_0x22fd30(0xd8)]+')'),_0x4429e3=await promptSelect(_0x22fd30(0xe8),_0x51b28d),_0xeb2c5=_0x418f51[_0x4429e3];if(!_0xeb2c5)throw CliErrors[_0x22fd30(0xb6)]('Invalid\x20dataset\x20selection.');_0x30b1fe=_0xeb2c5[_0x22fd30(0xd8)],_0x5ac7b7=undefined;}}}}const _0x16bd1f=await listDatasets(_0x5c135a[_0x22fd30(0xe6)]),_0xb7c8ba=_0x16bd1f[_0x22fd30(0xdb)](_0x1ddab0=>_0x1ddab0[_0x22fd30(0xd8)]===_0x30b1fe);if(!_0xb7c8ba)throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xf4)+_0x30b1fe+_0x22fd30(0xc4)+(_0x5ac7b7?_0x22fd30(0xcf)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x16a2dc=_0xb7c8ba['id'];const _0x2722f6=_0x5ac7b7??_0x30b1fe,_0x29e986=await listBffDatasetOperations(_0x5c135a[_0x22fd30(0xe6)],_0x16a2dc),_0x2de678=_0x29e986?Object[_0x22fd30(0xd3)](_0x29e986):[];if(_0x2de678[_0x22fd30(0xa9)]===0x0)throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xd5)+_0x2722f6+'.');let _0x41fcc8;const _0x285b5e=_0x5c135a[_0x22fd30(0xd4)](_0x22fd30(0xeb));if(_0x285b5e){if(!_0x2de678[_0x22fd30(0xcb)](_0x285b5e))throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xe7)+_0x285b5e+_0x22fd30(0xa3)+_0x2722f6+'.\x20'+(_0x22fd30(0xc9)+_0x2de678[_0x22fd30(0xf5)](',\x20')));_0x41fcc8=_0x285b5e;}else{if(_0x5c135a[_0x22fd30(0xe9)])throw CliErrors['validation'](_0x22fd30(0xaa));const _0x3692f4=await promptSelect('Select\x20operation\x20type:',_0x2de678);_0x41fcc8=_0x2de678[_0x3692f4]??_0x2de678[0x0];}let _0xeb25d6=normalizeHookFunctionNode(_0x5c135a['str']('function-node'));if(!_0xeb25d6){if(_0x5c135a[_0x22fd30(0xd4)](_0x22fd30(0xf7)))throw CliErrors[_0x22fd30(0xb6)](_0x22fd30(0xb1));if(_0x5c135a[_0x22fd30(0xe9)])throw CliErrors[_0x22fd30(0xb6)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0xa86470=await promptSelect(_0x22fd30(0xf9),[_0x22fd30(0xc1),'after']);_0xeb25d6=[_0x22fd30(0xc1),_0x22fd30(0xed)][_0xa86470]??_0x22fd30(0xc1);}return{'alias':_0x5ac7b7,'datasetCode':_0x30b1fe,'datasetId':_0x16a2dc,'operationType':_0x41fcc8,'functionNode':_0xeb25d6};}async function promptSelect(_0x368b13,_0xeb5487){const _0x46d0b3=a31_0xc03609;if(_0xeb5487['length']===0x1)return 0x0;for(const [_0x54b68e,_0x56c00a]of _0xeb5487['entries']()){process[_0x46d0b3(0xdc)][_0x46d0b3(0xbd)]('\x20\x20'+(_0x54b68e+0x1)+'.\x20'+_0x56c00a+'\x0a');}const _0x1409ab=createInterface({'input':process[_0x46d0b3(0xd2)],'output':process[_0x46d0b3(0xdc)]});while(!![]){const _0x35ddd7=await new Promise(_0x4fdec3=>{const _0x2978a7=_0x46d0b3;_0x1409ab[_0x2978a7(0xa8)](_0x368b13+'\x20',_0x4fdec3);}),_0x459612=Number[_0x46d0b3(0xce)](_0x35ddd7[_0x46d0b3(0xa0)](),0xa);if(Number[_0x46d0b3(0xaf)](_0x459612)&&_0x459612>=0x1&&_0x459612<=_0xeb5487[_0x46d0b3(0xa9)])return _0x1409ab[_0x46d0b3(0xcc)](),_0x459612-0x1;process[_0x46d0b3(0xdc)]['write'](_0x46d0b3(0xd6)+_0xeb5487[_0x46d0b3(0xa9)]+'.\x0a');}}function buildFilePath(_0x3747b6,_0x5566de,_0x1f9036,_0x42f835){const _0x2778b7=a31_0xc03609;if(_0x5566de==='HOOK'){if(!_0x42f835)throw CliErrors[_0x2778b7(0xb6)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x77dc91=_0x42f835[_0x2778b7(0xb0)]??_0x42f835[_0x2778b7(0xb9)];return join(_0x3747b6[_0x2778b7(0xba)],'HOOK',_0x77dc91,_0x42f835[_0x2778b7(0xb7)],_0x42f835['functionNode'],_0x1f9036+_0x2778b7(0xd9));}return join(_0x3747b6[_0x2778b7(0xba)],_0x5566de,_0x1f9036+'.js');}function a31_0xb0b5(_0x56c2dc,_0xb0ce08){_0x56c2dc=_0x56c2dc-0xa0;const _0x64c0c9=a31_0x64c0();let _0xb0b5e5=_0x64c0c9[_0x56c2dc];return _0xb0b5e5;}export function generateTemplate(_0x315867,_0x53da54,_0xad0eb7,_0x23907d,_0x47eba9){const _0xcbfbc7=a31_0xc03609,_0x3c8243=_0x23907d?.[_0xcbfbc7(0xa0)]()||'TODO:\x20add\x20script\x20description';if(_0x315867===_0xcbfbc7(0xad))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x3c8243+_0xcbfbc7(0xc3)+_0x53da54+_0xcbfbc7(0xa5)+_0x53da54+_0xcbfbc7(0xc7)+_0x53da54+_0xcbfbc7(0xdf);if(_0x315867===_0xcbfbc7(0xbf))return'/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x3c8243+_0xcbfbc7(0xbb)+_0xad0eb7+'/'+_0x53da54+'\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'+_0x53da54+_0xcbfbc7(0xdf);if(!_0x47eba9)throw CliErrors[_0xcbfbc7(0xb6)](_0xcbfbc7(0xbc));return _0xcbfbc7(0xea)+_0x3c8243+_0xcbfbc7(0xf0)+_0xad0eb7+'/'+_0x47eba9[_0xcbfbc7(0xb9)]+'/'+_0x47eba9[_0xcbfbc7(0xb7)]+_0xcbfbc7(0xa1)+_0x47eba9[_0xcbfbc7(0xb3)]+_0xcbfbc7(0xe0)+_0x53da54+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
@@ -1 +1 @@
1
- const a32_0x2fb752=a32_0x142a;(function(_0x8a3779,_0x2720db){const _0x14f327=a32_0x142a,_0x5df4eb=_0x8a3779();while(!![]){try{const _0x41a22a=-parseInt(_0x14f327(0x183))/0x1+parseInt(_0x14f327(0x174))/0x2*(parseInt(_0x14f327(0x173))/0x3)+parseInt(_0x14f327(0x161))/0x4*(-parseInt(_0x14f327(0x186))/0x5)+parseInt(_0x14f327(0x16d))/0x6+parseInt(_0x14f327(0x17b))/0x7*(parseInt(_0x14f327(0x17a))/0x8)+parseInt(_0x14f327(0x16b))/0x9+-parseInt(_0x14f327(0x169))/0xa;if(_0x41a22a===_0x2720db)break;else _0x5df4eb['push'](_0x5df4eb['shift']());}catch(_0x5f297c){_0x5df4eb['push'](_0x5df4eb['shift']());}}}(a32_0x2f38,0x9c4f4));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';function a32_0x2f38(){const _0x283b10=['validation','1998115wVrAkf','Multiple\x20functions\x20match\x20\x22','lockFilePath','\x22\x20not\x20found\x20after\x20ensureLockScope.','startsWith','filter','scriptsRootDir','includes','functions','apps','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','/api/management/library/scripts/delete','toISOString','lastSync','stringify','bff','scriptsRoot','map','\x20(local\x20file\x20moved\x20to\x20trash)','8qVYDpc','replace','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','\x20\x20-\x20','BFF\x20lock\x20file\x20not\x20found.','remoteId','target','POST','5190630PdTmNB','keys','1984932JbhSGO','Function\x20not\x20found:\x20','5488170CBddSB','<timestamp>','Would\x20delete\x20','string','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','876VgrmDh','6382btnWoY','Lock\x20scope\x20for\x20app\x20\x22','projectRoot','join','Deleted\x20','No\x20lock\x20entry\x20found\x20for\x20\x22','232qBydgq','70483zpAFdd','str','find','delete','trashedTo','Local\x20delete\x20not\x20settled\x20for\x20','appCode','length','400463xLVNAd','trashDir'];a32_0x2f38=function(){return _0x283b10;};return a32_0x2f38();}function a32_0x142a(_0x55964f,_0x56fb9a){_0x55964f=_0x55964f-0x15f;const _0x2f387b=a32_0x2f38();let _0x142aa4=_0x2f387b[_0x55964f];return _0x142aa4;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x2fb752(0x195),'command':a32_0x2fb752(0x17e),'description':a32_0x2fb752(0x190),'risk':'high-risk-write','flags':[{'name':a32_0x2fb752(0x167),'type':a32_0x2fb752(0x170),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0x47e618){const _0xa46ab2=a32_0x2fb752,_0x2504f0=loadBffProjectConfig(_0x47e618[_0xa46ab2(0x181)]),_0x3aa02f=await readBffLockFile(_0x2504f0[_0xa46ab2(0x188)]);if(!_0x3aa02f)throw CliErrors[_0xa46ab2(0x185)](_0xa46ab2(0x171));},async 'dryRun'(_0x1da248){const _0x4834d0=a32_0x2fb752,_0x34b975=loadBffProjectConfig(_0x1da248[_0x4834d0(0x181)]),_0x4f07c7=await readBffLockFile(_0x34b975[_0x4834d0(0x188)]);if(!_0x4f07c7)throw CliErrors[_0x4834d0(0x185)](_0x4834d0(0x165));const {appLock:_0x1f20e9}=ensureLockScope(_0x4f07c7,_0x1da248['appCode'],_0x34b975[_0x4834d0(0x196)],_0x4834d0(0x17e)),_0x46fa44=_0x1da248[_0x4834d0(0x17c)](_0x4834d0(0x167)),_0x417ee5=Object['keys'](_0x1f20e9[_0x4834d0(0x18e)]),_0x1f0153=resolveDeleteTarget(_0x46fa44,_0x417ee5),_0x3bd292=_0x1f20e9[_0x4834d0(0x18e)][_0x1f0153];if(!_0x3bd292)throw CliErrors[_0x4834d0(0x185)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x1f0153+'\x22.');const _0x50305b=resolveLocalFilePathFromLockKey(_0x34b975,_0x1f0153),_0x5907ea=relative(_0x34b975[_0x4834d0(0x176)],_0x50305b),_0x3f1f44=join(_0x34b975['trashDir'],_0x4834d0(0x16e),_0x5907ea);return{'method':_0x4834d0(0x168),'url':_0x4834d0(0x191),'body':{'appCode':_0x1da248[_0x4834d0(0x181)],'target':_0x1f0153,'remoteId':_0x3bd292['remoteId'],'localFilePath':_0x50305b,'trashedPath':_0x3f1f44},'description':_0x4834d0(0x16f)+_0x1f0153+_0x4834d0(0x163)};},async 'execute'(_0x2671dc){const _0x2d8350=a32_0x2fb752,_0x260ad2=loadBffProjectConfig(_0x2671dc[_0x2d8350(0x181)]),_0x375c01=await readBffLockFile(_0x260ad2[_0x2d8350(0x188)]);if(!_0x375c01)throw CliErrors[_0x2d8350(0x185)](_0x2d8350(0x165));const {lockData:_0xd42e9a,appLock:_0x419ec9}=ensureLockScope(_0x375c01,_0x2671dc[_0x2d8350(0x181)],_0x260ad2[_0x2d8350(0x196)],_0x2d8350(0x17e)),_0x1d9196=JSON['parse'](JSON[_0x2d8350(0x194)](_0xd42e9a)),_0x453f17=_0x1d9196['apps'][_0x2671dc[_0x2d8350(0x181)]];if(!_0x453f17)throw new Error(_0x2d8350(0x175)+_0x2671dc['appCode']+_0x2d8350(0x189));const _0x2ea14e=_0x2671dc[_0x2d8350(0x17c)](_0x2d8350(0x167)),_0x50e6f7=Object[_0x2d8350(0x16a)](_0x453f17[_0x2d8350(0x18e)]),_0x14dcab=resolveDeleteTarget(_0x2ea14e,_0x50e6f7),_0x16b52c=_0x453f17[_0x2d8350(0x18e)][_0x14dcab];if(!_0x16b52c)throw CliErrors[_0x2d8350(0x185)](_0x2d8350(0x179)+_0x14dcab+'\x22.');await deleteBffScript(_0x16b52c[_0x2d8350(0x166)]),delete _0x453f17[_0x2d8350(0x18e)][_0x14dcab],_0x453f17[_0x2d8350(0x193)]=new Date()[_0x2d8350(0x192)](),await writeBffLockFile(_0x260ad2['lockFilePath'],_0x1d9196);const _0x375615=resolveLocalFilePathFromLockKey(_0x260ad2,_0x14dcab);let _0x1dd5cf;await fileExists(_0x375615)&&(_0x1dd5cf=await moveToTrash(_0x260ad2[_0x2d8350(0x176)],_0x260ad2[_0x2d8350(0x184)],_0x375615),await cleanupEmptyDirectories(dirname(_0x375615),_0x260ad2[_0x2d8350(0x18c)]));await waitForDeleteSettlement(_0x260ad2[_0x2d8350(0x188)],_0x2671dc['appCode'],_0x14dcab,_0x375615),await sleep(0x96);const _0x86203c={'deleted':_0x14dcab,'remoteId':_0x16b52c[_0x2d8350(0x166)]};if(_0x1dd5cf)_0x86203c[_0x2d8350(0x17f)]=_0x1dd5cf;return{'ok':!![],'data':_0x86203c,'message':_0x2d8350(0x178)+_0x14dcab+(_0x1dd5cf?_0x2d8350(0x160):'')};}};function resolveDeleteTarget(_0x59248a,_0x2c32ba){const _0x16dafb=a32_0x2fb752;if(_0x59248a[_0x16dafb(0x18d)]('/')){const _0xa46a0b=_0x2c32ba[_0x16dafb(0x17d)](_0x70ab8a=>_0x70ab8a===_0x59248a);if(!_0xa46a0b)throw CliErrors[_0x16dafb(0x185)]('Function\x20not\x20found:\x20'+_0x59248a);return _0xa46a0b;}const _0xa6c40d=_0x2c32ba[_0x16dafb(0x18b)](_0x276ade=>_0x276ade['split']('/')['at'](-0x1)===_0x59248a);if(_0xa6c40d[_0x16dafb(0x182)]===0x0)throw CliErrors[_0x16dafb(0x185)](_0x16dafb(0x16c)+_0x59248a);if(_0xa6c40d[_0x16dafb(0x182)]>0x1)throw CliErrors[_0x16dafb(0x185)](_0x16dafb(0x187)+_0x59248a+_0x16dafb(0x172)+_0xa6c40d[_0x16dafb(0x15f)](_0x26944f=>_0x16dafb(0x164)+_0x26944f)[_0x16dafb(0x177)]('\x0a'));return _0xa6c40d[0x0];}async function moveToTrash(_0x3a1bdb,_0x51818a,_0xa8b744){const _0x47444e=a32_0x2fb752,_0x16365c=new Date()[_0x47444e(0x192)]()[_0x47444e(0x162)](/[:.]/g,'-'),_0x52193a=relative(_0x3a1bdb,_0xa8b744),_0x3b14f5=join(_0x51818a,_0x16365c,_0x52193a);return await mkdir(dirname(_0x3b14f5),{'recursive':!![]}),await rename(_0xa8b744,_0x3b14f5),_0x3b14f5;}async function cleanupEmptyDirectories(_0x58c218,_0x8a13e){const _0x22f513=a32_0x2fb752;let _0x462410=resolve(_0x58c218);const _0x34dbb4=resolve(_0x8a13e);while(_0x462410[_0x22f513(0x18a)](''+_0x34dbb4+sep)||_0x462410===_0x34dbb4){if(_0x462410===_0x34dbb4)return;try{const _0x51e1f3=await readdir(_0x462410);if(_0x51e1f3['length']>0x0)return;await rmdir(_0x462410);}catch{return;}_0x462410=dirname(_0x462410);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x63d31,_0x1973ac,_0x4a497d,_0x1d9d3d){const _0x3d650b=a32_0x2fb752;for(let _0x4b1575=0x0;_0x4b1575<DELETE_SETTLE_RETRY_COUNT;_0x4b1575+=0x1){const _0xe0ba4d=await readBffLockFile(_0x63d31),_0x5cbd9b=!!_0xe0ba4d?.[_0x3d650b(0x18f)]?.[_0x1973ac]?.[_0x3d650b(0x18e)]?.[_0x4a497d],_0x1c79ff=await fileExists(_0x1d9d3d);if(!_0x5cbd9b&&!_0x1c79ff)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x3d650b(0x180)+_0x4a497d+'.');}
1
+ const a32_0x41e18a=a32_0x4a56;(function(_0x47b5b8,_0x4e39c6){const _0x330040=a32_0x4a56,_0x1c1336=_0x47b5b8();while(!![]){try{const _0x5b3a4c=-parseInt(_0x330040(0x15e))/0x1*(-parseInt(_0x330040(0x15d))/0x2)+parseInt(_0x330040(0x171))/0x3*(-parseInt(_0x330040(0x15f))/0x4)+-parseInt(_0x330040(0x16a))/0x5*(parseInt(_0x330040(0x156))/0x6)+-parseInt(_0x330040(0x167))/0x7*(-parseInt(_0x330040(0x160))/0x8)+-parseInt(_0x330040(0x16c))/0x9+parseInt(_0x330040(0x162))/0xa*(-parseInt(_0x330040(0x14c))/0xb)+parseInt(_0x330040(0x14e))/0xc;if(_0x5b3a4c===_0x4e39c6)break;else _0x1c1336['push'](_0x1c1336['shift']());}catch(_0x724258){_0x1c1336['push'](_0x1c1336['shift']());}}}(a32_0xb892,0x875b6));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';function a32_0xb892(){const _0x4d6193=['stringify','split','filter','32050bOYIyy','49OGmsTT','50348XPBxnh','2824KdmKtY','trashedTo','55030XcNJAU','keys','BFF\x20lock\x20file\x20not\x20found.','remoteId','str','10318RKMTMm','\x20(local\x20file\x20moved\x20to\x20trash)','map','420175AFUkOE','functions','4309344PTNTKE','trashDir','validation','lockFilePath','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','21RBBkia','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','find','Local\x20delete\x20not\x20settled\x20for\x20','projectRoot','apps','scriptsRootDir','includes','No\x20lock\x20entry\x20found\x20for\x20\x22','delete','join','1188wMOZFP','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','6938328Qhhnzo','length','target','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','appCode','Lock\x20scope\x20for\x20app\x20\x22','\x20\x20-\x20','bff','12CEFOFW','\x22\x20not\x20found\x20after\x20ensureLockScope.','scriptsRoot','toISOString'];a32_0xb892=function(){return _0x4d6193;};return a32_0xb892();}import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';function a32_0x4a56(_0x3b6be7,_0x3c5489){_0x3b6be7=_0x3b6be7-0x14b;const _0xb892ad=a32_0xb892();let _0x4a5683=_0xb892ad[_0x3b6be7];return _0x4a5683;}export const bffDelete={'service':a32_0x41e18a(0x155),'command':a32_0x41e18a(0x17a),'description':'Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','risk':'high-risk-write','flags':[{'name':a32_0x41e18a(0x150),'type':'string','required':!![],'description':a32_0x41e18a(0x151)}],async 'validate'(_0x494e34){const _0x1211bc=a32_0x41e18a,_0x143b0d=loadBffProjectConfig(_0x494e34['appCode']),_0xb6398b=await readBffLockFile(_0x143b0d[_0x1211bc(0x16f)]);if(!_0xb6398b)throw CliErrors[_0x1211bc(0x16e)](_0x1211bc(0x172));},async 'dryRun'(_0x52d161){const _0x5eb372=a32_0x41e18a,_0x517dad=loadBffProjectConfig(_0x52d161[_0x5eb372(0x152)]),_0x2f72dd=await readBffLockFile(_0x517dad['lockFilePath']);if(!_0x2f72dd)throw CliErrors[_0x5eb372(0x16e)](_0x5eb372(0x164));const {appLock:_0x3239c9}=ensureLockScope(_0x2f72dd,_0x52d161[_0x5eb372(0x152)],_0x517dad[_0x5eb372(0x158)],_0x5eb372(0x17a)),_0x234fec=_0x52d161[_0x5eb372(0x166)](_0x5eb372(0x150)),_0x27ec81=Object[_0x5eb372(0x163)](_0x3239c9[_0x5eb372(0x16b)]),_0x15d02b=resolveDeleteTarget(_0x234fec,_0x27ec81),_0x19715b=_0x3239c9[_0x5eb372(0x16b)][_0x15d02b];if(!_0x19715b)throw CliErrors[_0x5eb372(0x16e)](_0x5eb372(0x179)+_0x15d02b+'\x22.');const _0x412a19=resolveLocalFilePathFromLockKey(_0x517dad,_0x15d02b),_0x1c2d1a=relative(_0x517dad[_0x5eb372(0x175)],_0x412a19),_0x268c83=join(_0x517dad[_0x5eb372(0x16d)],'<timestamp>',_0x1c2d1a);return{'method':'POST','url':'/api/management/library/scripts/delete','body':{'appCode':_0x52d161[_0x5eb372(0x152)],'target':_0x15d02b,'remoteId':_0x19715b[_0x5eb372(0x165)],'localFilePath':_0x412a19,'trashedPath':_0x268c83},'description':'Would\x20delete\x20'+_0x15d02b+_0x5eb372(0x14d)};},async 'execute'(_0x227f37){const _0x3ee4f=a32_0x41e18a,_0x23f4ae=loadBffProjectConfig(_0x227f37[_0x3ee4f(0x152)]),_0x5bee57=await readBffLockFile(_0x23f4ae[_0x3ee4f(0x16f)]);if(!_0x5bee57)throw CliErrors[_0x3ee4f(0x16e)](_0x3ee4f(0x164));const {lockData:_0x521574,appLock:_0x389a49}=ensureLockScope(_0x5bee57,_0x227f37[_0x3ee4f(0x152)],_0x23f4ae[_0x3ee4f(0x158)],_0x3ee4f(0x17a)),_0x3ceb6a=JSON['parse'](JSON[_0x3ee4f(0x15a)](_0x521574)),_0x25e1b9=_0x3ceb6a[_0x3ee4f(0x176)][_0x227f37[_0x3ee4f(0x152)]];if(!_0x25e1b9)throw new Error(_0x3ee4f(0x153)+_0x227f37[_0x3ee4f(0x152)]+_0x3ee4f(0x157));const _0xf3eeb4=_0x227f37[_0x3ee4f(0x166)]('target'),_0x90fb92=Object[_0x3ee4f(0x163)](_0x25e1b9[_0x3ee4f(0x16b)]),_0x452197=resolveDeleteTarget(_0xf3eeb4,_0x90fb92),_0x388d8a=_0x25e1b9[_0x3ee4f(0x16b)][_0x452197];if(!_0x388d8a)throw CliErrors[_0x3ee4f(0x16e)](_0x3ee4f(0x179)+_0x452197+'\x22.');await deleteBffScript(_0x388d8a[_0x3ee4f(0x165)]),delete _0x25e1b9[_0x3ee4f(0x16b)][_0x452197],_0x25e1b9['lastSync']=new Date()[_0x3ee4f(0x159)](),await writeBffLockFile(_0x23f4ae['lockFilePath'],_0x3ceb6a);const _0x275bad=resolveLocalFilePathFromLockKey(_0x23f4ae,_0x452197);let _0x114109;await fileExists(_0x275bad)&&(_0x114109=await moveToTrash(_0x23f4ae['projectRoot'],_0x23f4ae[_0x3ee4f(0x16d)],_0x275bad),await cleanupEmptyDirectories(dirname(_0x275bad),_0x23f4ae[_0x3ee4f(0x177)]));await waitForDeleteSettlement(_0x23f4ae[_0x3ee4f(0x16f)],_0x227f37[_0x3ee4f(0x152)],_0x452197,_0x275bad),await sleep(0x96);const _0x4cc807={'deleted':_0x452197,'remoteId':_0x388d8a[_0x3ee4f(0x165)]};if(_0x114109)_0x4cc807[_0x3ee4f(0x161)]=_0x114109;return{'ok':!![],'data':_0x4cc807,'message':'Deleted\x20'+_0x452197+(_0x114109?_0x3ee4f(0x168):'')};}};function resolveDeleteTarget(_0x53bda1,_0x4ea298){const _0x1ccd96=a32_0x41e18a;if(_0x53bda1[_0x1ccd96(0x178)]('/')){const _0x230b1c=_0x4ea298[_0x1ccd96(0x173)](_0x2d0367=>_0x2d0367===_0x53bda1);if(!_0x230b1c)throw CliErrors[_0x1ccd96(0x16e)]('Function\x20not\x20found:\x20'+_0x53bda1);return _0x230b1c;}const _0x5a8eab=_0x4ea298[_0x1ccd96(0x15c)](_0x2a5cf5=>_0x2a5cf5[_0x1ccd96(0x15b)]('/')['at'](-0x1)===_0x53bda1);if(_0x5a8eab['length']===0x0)throw CliErrors[_0x1ccd96(0x16e)]('Function\x20not\x20found:\x20'+_0x53bda1);if(_0x5a8eab[_0x1ccd96(0x14f)]>0x1)throw CliErrors[_0x1ccd96(0x16e)]('Multiple\x20functions\x20match\x20\x22'+_0x53bda1+_0x1ccd96(0x170)+_0x5a8eab[_0x1ccd96(0x169)](_0x194c7b=>_0x1ccd96(0x154)+_0x194c7b)[_0x1ccd96(0x14b)]('\x0a'));return _0x5a8eab[0x0];}async function moveToTrash(_0x33bc03,_0xfa1621,_0x435afa){const _0x3e1bfa=a32_0x41e18a,_0x2675d1=new Date()[_0x3e1bfa(0x159)]()['replace'](/[:.]/g,'-'),_0xf20f6f=relative(_0x33bc03,_0x435afa),_0x37d529=join(_0xfa1621,_0x2675d1,_0xf20f6f);return await mkdir(dirname(_0x37d529),{'recursive':!![]}),await rename(_0x435afa,_0x37d529),_0x37d529;}async function cleanupEmptyDirectories(_0x20aa01,_0x4648a1){const _0x305998=a32_0x41e18a;let _0x5bfb00=resolve(_0x20aa01);const _0x26eaa1=resolve(_0x4648a1);while(_0x5bfb00['startsWith'](''+_0x26eaa1+sep)||_0x5bfb00===_0x26eaa1){if(_0x5bfb00===_0x26eaa1)return;try{const _0x5a7aaa=await readdir(_0x5bfb00);if(_0x5a7aaa[_0x305998(0x14f)]>0x0)return;await rmdir(_0x5bfb00);}catch{return;}_0x5bfb00=dirname(_0x5bfb00);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x4b8dc5,_0x29b8b0,_0x461b33,_0x385576){const _0xbf1eed=a32_0x41e18a;for(let _0x6db745=0x0;_0x6db745<DELETE_SETTLE_RETRY_COUNT;_0x6db745+=0x1){const _0x594636=await readBffLockFile(_0x4b8dc5),_0xe3fb3b=!!_0x594636?.[_0xbf1eed(0x176)]?.[_0x29b8b0]?.[_0xbf1eed(0x16b)]?.[_0x461b33],_0x38ee6b=await fileExists(_0x385576);if(!_0xe3fb3b&&!_0x38ee6b)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0xbf1eed(0x174)+_0x461b33+'.');}
@@ -1 +1 @@
1
- const a33_0x47b98d=a33_0x3a0e;(function(_0x436313,_0x36f984){const _0x33c0f0=a33_0x3a0e,_0x2d0088=_0x436313();while(!![]){try{const _0x34c2fd=-parseInt(_0x33c0f0(0x1ed))/0x1+-parseInt(_0x33c0f0(0x1eb))/0x2*(-parseInt(_0x33c0f0(0x1da))/0x3)+parseInt(_0x33c0f0(0x1e4))/0x4*(parseInt(_0x33c0f0(0x1ef))/0x5)+-parseInt(_0x33c0f0(0x1ee))/0x6+parseInt(_0x33c0f0(0x1df))/0x7*(-parseInt(_0x33c0f0(0x1ec))/0x8)+-parseInt(_0x33c0f0(0x1f2))/0x9*(parseInt(_0x33c0f0(0x1e1))/0xa)+parseInt(_0x33c0f0(0x1e6))/0xb*(parseInt(_0x33c0f0(0x1f0))/0xc);if(_0x34c2fd===_0x36f984)break;else _0x2d0088['push'](_0x2d0088['shift']());}catch(_0x405091){_0x2d0088['push'](_0x2d0088['shift']());}}}(a33_0x5d4b,0x98959));function a33_0x3a0e(_0x864be0,_0x41da14){_0x864be0=_0x864be0-0x1da;const _0x5d4b18=a33_0x5d4b();let _0x3a0e11=_0x5d4b18[_0x864be0];return _0x3a0e11;}function a33_0x5d4b(){const _0x4a2d35=['appCode','8amslyQ','2406896AGKtjk','631953pRySvX','3110946obKSqo','1570cwpwxe','228ssWaZd','bff','837RfjFzm','450228BvkPss','updatedTime','verbose','Return\x20full\x20raw\x20script\x20object','Script\x20ID','28fgYgaT','num','114580QblHeO','detail','read','5844ooLpXW','scriptContent','1728397QZMxpU','number','createdTime','description'];a33_0x5d4b=function(){return _0x4a2d35;};return a33_0x5d4b();}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x47b98d(0x1f1),'command':a33_0x47b98d(0x1e2),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a33_0x47b98d(0x1e3),'flags':[{'name':'id','type':a33_0x47b98d(0x1e7),'required':!![],'description':a33_0x47b98d(0x1de)},{'name':'verbose','type':'boolean','description':a33_0x47b98d(0x1dd)}],async 'execute'(_0x2dd019){const _0x4c3589=a33_0x47b98d,_0xd3da8f=await getBffScriptInfo(_0x2dd019[_0x4c3589(0x1e0)]('id')),_0x5d3311=_0x2dd019['bool'](_0x4c3589(0x1dc));if(_0x5d3311)return{'ok':!![],'data':_0xd3da8f};return{'ok':!![],'data':{'id':_0xd3da8f['id'],'appCode':_0xd3da8f[_0x4c3589(0x1ea)],'scriptType':_0xd3da8f['scriptType'],'description':_0xd3da8f[_0x4c3589(0x1e9)]||'(none)','createdTime':_0xd3da8f[_0x4c3589(0x1e8)]??'','updatedTime':_0xd3da8f[_0x4c3589(0x1db)]??'','scriptContent':_0xd3da8f[_0x4c3589(0x1e5)]??''}};}};
1
+ const a33_0xb0de2a=a33_0x2f8c;(function(_0x9d50fa,_0x479a57){const _0x24f81b=a33_0x2f8c,_0x1c2bee=_0x9d50fa();while(!![]){try{const _0xc1b7f4=parseInt(_0x24f81b(0x166))/0x1+-parseInt(_0x24f81b(0x15d))/0x2+parseInt(_0x24f81b(0x15c))/0x3*(-parseInt(_0x24f81b(0x168))/0x4)+parseInt(_0x24f81b(0x161))/0x5*(parseInt(_0x24f81b(0x16c))/0x6)+parseInt(_0x24f81b(0x16a))/0x7+-parseInt(_0x24f81b(0x169))/0x8*(parseInt(_0x24f81b(0x15e))/0x9)+-parseInt(_0x24f81b(0x16f))/0xa;if(_0xc1b7f4===_0x479a57)break;else _0x1c2bee['push'](_0x1c2bee['shift']());}catch(_0x4d76ec){_0x1c2bee['push'](_0x1c2bee['shift']());}}}(a33_0x4af1,0x439bf));import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x4af1(){const _0x85e0be=['verbose','num','createdTime','bool','12300eDUoYz','374466ewbuaQ','153CHncZq','read','Return\x20full\x20raw\x20script\x20object','5ikEwsk','description','number','scriptType','Script\x20ID','525375wjwift','updatedTime','124bIuNOf','151016BxaIDc','3698597XfIkap','detail','397662hiGQSr','(none)','appCode','2078540nYmhyV','Get\x20BFF\x20script\x20details\x20by\x20ID','boolean'];a33_0x4af1=function(){return _0x85e0be;};return a33_0x4af1();}function a33_0x2f8c(_0x33598b,_0x562dc4){_0x33598b=_0x33598b-0x157;const _0x4af1b9=a33_0x4af1();let _0x2f8c33=_0x4af1b9[_0x33598b];return _0x2f8c33;}export const bffDetail={'service':'bff','command':a33_0xb0de2a(0x16b),'description':a33_0xb0de2a(0x170),'risk':a33_0xb0de2a(0x15f),'flags':[{'name':'id','type':a33_0xb0de2a(0x163),'required':!![],'description':a33_0xb0de2a(0x165)},{'name':a33_0xb0de2a(0x158),'type':a33_0xb0de2a(0x157),'description':a33_0xb0de2a(0x160)}],async 'execute'(_0x37f263){const _0xc8fd11=a33_0xb0de2a,_0x2c4f25=await getBffScriptInfo(_0x37f263[_0xc8fd11(0x159)]('id')),_0x3df3ac=_0x37f263[_0xc8fd11(0x15b)]('verbose');if(_0x3df3ac)return{'ok':!![],'data':_0x2c4f25};return{'ok':!![],'data':{'id':_0x2c4f25['id'],'appCode':_0x2c4f25[_0xc8fd11(0x16e)],'scriptType':_0x2c4f25[_0xc8fd11(0x164)],'description':_0x2c4f25[_0xc8fd11(0x162)]||_0xc8fd11(0x16d),'createdTime':_0x2c4f25[_0xc8fd11(0x15a)]??'','updatedTime':_0x2c4f25[_0xc8fd11(0x167)]??'','scriptContent':_0x2c4f25['scriptContent']??''}};}};
@@ -1 +1 @@
1
- function a34_0x20c5(_0x1b61c,_0x295569){_0x1b61c=_0x1b61c-0xaa;const _0x46afbd=a34_0x46af();let _0x20c523=_0x46afbd[_0x1b61c];return _0x20c523;}(function(_0x52d42d,_0x53c38e){const _0x1acf62=a34_0x20c5,_0x2c7886=_0x52d42d();while(!![]){try{const _0x164d3e=-parseInt(_0x1acf62(0xb2))/0x1*(-parseInt(_0x1acf62(0xab))/0x2)+-parseInt(_0x1acf62(0xb5))/0x3*(parseInt(_0x1acf62(0xb7))/0x4)+-parseInt(_0x1acf62(0xb0))/0x5*(parseInt(_0x1acf62(0xb4))/0x6)+parseInt(_0x1acf62(0xb6))/0x7*(parseInt(_0x1acf62(0xae))/0x8)+parseInt(_0x1acf62(0xac))/0x9*(-parseInt(_0x1acf62(0xb1))/0xa)+parseInt(_0x1acf62(0xaf))/0xb*(-parseInt(_0x1acf62(0xad))/0xc)+parseInt(_0x1acf62(0xb3))/0xd*(parseInt(_0x1acf62(0xaa))/0xe);if(_0x164d3e===_0x53c38e)break;else _0x2c7886['push'](_0x2c7886['shift']());}catch(_0x145644){_0x2c7886['push'](_0x2c7886['shift']());}}}(a34_0x46af,0x59a15));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_0x46af(){const _0x28ab6c=['44228inzOtk','1482922XhGpXh','431358JPDXns','36eOoHBe','24nLzmRH','8vUmTyB','4021963aKfbpv','10RGDepo','256350KclQKI','2vQhMwH','195IkPmmW','1850466aKmBGp','111zjqdxp','1446613qWBuXL'];a34_0x46af=function(){return _0x28ab6c;};return a34_0x46af();}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0x5494f3,_0x78b566){const _0x1ef8e6=a34_0x4ffa,_0x194d4a=_0x5494f3();while(!![]){try{const _0x4aeb36=parseInt(_0x1ef8e6(0x6c))/0x1*(-parseInt(_0x1ef8e6(0x68))/0x2)+parseInt(_0x1ef8e6(0x70))/0x3+-parseInt(_0x1ef8e6(0x6f))/0x4*(-parseInt(_0x1ef8e6(0x69))/0x5)+-parseInt(_0x1ef8e6(0x6a))/0x6*(parseInt(_0x1ef8e6(0x6e))/0x7)+parseInt(_0x1ef8e6(0x6d))/0x8+-parseInt(_0x1ef8e6(0x71))/0x9+parseInt(_0x1ef8e6(0x6b))/0xa;if(_0x4aeb36===_0x78b566)break;else _0x194d4a['push'](_0x194d4a['shift']());}catch(_0x3cdbcb){_0x194d4a['push'](_0x194d4a['shift']());}}}(a34_0x3181,0xd38b1));function a34_0x4ffa(_0x1ca106,_0x49612b){_0x1ca106=_0x1ca106-0x68;const _0x318154=a34_0x3181();let _0x4ffa57=_0x318154[_0x1ca106];return _0x4ffa57;}import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];function a34_0x3181(){const _0x4e9c01=['3975714fpOAAj','1559926lYFaBa','26995NAKlNe','156eHluab','17221080XaFYuL','1drjRKS','3246616yLqpfH','112028EbzxsK','24cSkfrh','1031895WevJsL'];a34_0x3181=function(){return _0x4e9c01;};return a34_0x3181();}
@@ -1 +1 @@
1
- const a35_0x1182a5=a35_0x42b3;(function(_0x4a290d,_0x418174){const _0x17854b=a35_0x42b3,_0x5bad46=_0x4a290d();while(!![]){try{const _0x40ad36=-parseInt(_0x17854b(0x155))/0x1+-parseInt(_0x17854b(0x14c))/0x2+-parseInt(_0x17854b(0x148))/0x3+-parseInt(_0x17854b(0x14d))/0x4*(-parseInt(_0x17854b(0x152))/0x5)+parseInt(_0x17854b(0x145))/0x6+parseInt(_0x17854b(0x149))/0x7*(parseInt(_0x17854b(0x159))/0x8)+parseInt(_0x17854b(0x151))/0x9*(parseInt(_0x17854b(0x147))/0xa);if(_0x40ad36===_0x418174)break;else _0x5bad46['push'](_0x5bad46['shift']());}catch(_0x10f58d){_0x5bad46['push'](_0x5bad46['shift']());}}}(a35_0x13d0,0xef607));function a35_0x42b3(_0x48a20e,_0x15048e){_0x48a20e=_0x48a20e-0x140;const _0x13d0be=a35_0x13d0();let _0x42b322=_0x13d0be[_0x48a20e];return _0x42b322;}function a35_0x13d0(){const _0x1be984=['Script\x20type\x20filter','name','2152120BZCeVb','8iAlFLH','List\x20BFF\x20scripts','read','type','4234500pXXncQ','55070aufxzF','str','scriptType','443214ZcEnlQ','length','description','functionName','447584obJYNr','bff','No\x20BFF\x20scripts\x20found.','(unnamed)','ENDPOINT','boolean','10098858AIdqBm','verbose','20NkddZi','5642394rGNxIt','217acCMZd'];a35_0x13d0=function(){return _0x1be984;};return a35_0x13d0();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a35_0x1182a5(0x140),'command':'list','description':a35_0x1182a5(0x14e),'risk':a35_0x1182a5(0x14f),'flags':[{'name':'type','type':'string','description':a35_0x1182a5(0x14a),'default':a35_0x1182a5(0x143),'enum':[a35_0x1182a5(0x143),'COMMON']},{'name':a35_0x1182a5(0x14b),'type':'string','description':'Filter\x20by\x20script\x20name'},{'name':a35_0x1182a5(0x146),'type':a35_0x1182a5(0x144),'description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0xd9edc8){const _0x415f8a=a35_0x1182a5,_0x40223d=await listBffScripts(_0xd9edc8['appCode'],_0xd9edc8[_0x415f8a(0x153)](_0x415f8a(0x150)),{'scriptName':_0xd9edc8[_0x415f8a(0x153)](_0x415f8a(0x14b))||undefined}),_0x2a813f=_0xd9edc8['bool'](_0x415f8a(0x146));return{'ok':!![],'data':_0x2a813f?_0x40223d:_0x40223d['map'](_0x94d0e8=>({'id':_0x94d0e8['id'],'functionName':_0x94d0e8[_0x415f8a(0x158)]??'','description':_0x94d0e8[_0x415f8a(0x157)]||_0x415f8a(0x142),'scriptType':_0x94d0e8[_0x415f8a(0x154)]})),'message':_0x40223d[_0x415f8a(0x156)]===0x0?_0x415f8a(0x141):undefined};}};
1
+ function a35_0x3316(){const _0x2d882e=['scriptType','bool','7532QFzvKk','read','str','110554UnbAlC','2556AdXPdr','functionName','boolean','name','1223173gyJJUu','type','map','2570rddNkU','14128xuUIPi','string','ENDPOINT','8177860zJLixX','1036303YEUnBo','No\x20BFF\x20scripts\x20found.','20738223WRFbKh','Return\x20full\x20script\x20objects','List\x20BFF\x20scripts','(unnamed)','84cGpFKA','24bfqGCA','COMMON','Script\x20type\x20filter','verbose'];a35_0x3316=function(){return _0x2d882e;};return a35_0x3316();}function a35_0x4ec2(_0x6a3e7b,_0x31e9af){_0x6a3e7b=_0x6a3e7b-0xca;const _0x33163b=a35_0x3316();let _0x4ec2c9=_0x33163b[_0x6a3e7b];return _0x4ec2c9;}const a35_0x132eb1=a35_0x4ec2;(function(_0x48630e,_0x3fd3a5){const _0x3176e1=a35_0x4ec2,_0x51b8d5=_0x48630e();while(!![]){try{const _0xde9629=-parseInt(_0x3176e1(0xdc))/0x1+parseInt(_0x3176e1(0xcf))/0x2*(parseInt(_0x3176e1(0xe2))/0x3)+-parseInt(_0x3176e1(0xcc))/0x4*(parseInt(_0x3176e1(0xd7))/0x5)+-parseInt(_0x3176e1(0xe3))/0x6*(-parseInt(_0x3176e1(0xd4))/0x7)+-parseInt(_0x3176e1(0xd8))/0x8*(parseInt(_0x3176e1(0xd0))/0x9)+-parseInt(_0x3176e1(0xdb))/0xa+parseInt(_0x3176e1(0xde))/0xb;if(_0xde9629===_0x3fd3a5)break;else _0x51b8d5['push'](_0x51b8d5['shift']());}catch(_0x31c1f8){_0x51b8d5['push'](_0x51b8d5['shift']());}}}(a35_0x3316,0xc563e));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':'bff','command':'list','description':a35_0x132eb1(0xe0),'risk':a35_0x132eb1(0xcd),'flags':[{'name':a35_0x132eb1(0xd5),'type':'string','description':a35_0x132eb1(0xe5),'default':'ENDPOINT','enum':[a35_0x132eb1(0xda),a35_0x132eb1(0xe4)]},{'name':a35_0x132eb1(0xd3),'type':a35_0x132eb1(0xd9),'description':'Filter\x20by\x20script\x20name'},{'name':a35_0x132eb1(0xe6),'type':a35_0x132eb1(0xd2),'description':a35_0x132eb1(0xdf)}],async 'execute'(_0x297ec0){const _0x10a873=a35_0x132eb1,_0x38b18c=await listBffScripts(_0x297ec0['appCode'],_0x297ec0[_0x10a873(0xce)]('type'),{'scriptName':_0x297ec0[_0x10a873(0xce)](_0x10a873(0xd3))||undefined}),_0x279fc7=_0x297ec0[_0x10a873(0xcb)](_0x10a873(0xe6));return{'ok':!![],'data':_0x279fc7?_0x38b18c:_0x38b18c[_0x10a873(0xd6)](_0x489ba6=>({'id':_0x489ba6['id'],'functionName':_0x489ba6[_0x10a873(0xd1)]??'','description':_0x489ba6['description']||_0x10a873(0xe1),'scriptType':_0x489ba6[_0x10a873(0xca)]})),'message':_0x38b18c['length']===0x0?_0x10a873(0xdd):undefined};}};