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

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 (273) hide show
  1. package/README.md +7 -2
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/list.js +1 -1
  56. package/lib/commands/config/set.js +1 -1
  57. package/lib/commands/config/shared.js +1 -1
  58. package/lib/commands/data/filter.js +1 -1
  59. package/lib/commands/data/getOne.js +1 -1
  60. package/lib/commands/data/index.js +1 -1
  61. package/lib/commands/data/shared.js +1 -1
  62. package/lib/commands/dataset/business-group-update.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/tables.js +1 -1
  93. package/lib/commands/db/test.js +1 -1
  94. package/lib/commands/db/update.js +1 -1
  95. package/lib/commands/doctor.js +1 -1
  96. package/lib/commands/file/index.js +1 -1
  97. package/lib/commands/init/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/kb/create.js +1 -0
  103. package/lib/commands/kb/delete.js +1 -0
  104. package/lib/commands/kb/detail.js +1 -0
  105. package/lib/commands/kb/index.js +1 -0
  106. package/lib/commands/kb/list.js +1 -0
  107. package/lib/commands/kb/shared.js +1 -0
  108. package/lib/commands/kb/update.js +1 -0
  109. package/lib/commands/logs/index.js +1 -1
  110. package/lib/commands/menu/asset-update.js +1 -1
  111. package/lib/commands/menu/delete.js +1 -1
  112. package/lib/commands/menu/external-link-create.js +1 -1
  113. package/lib/commands/menu/external-link-update.js +1 -1
  114. package/lib/commands/menu/group-create.js +1 -1
  115. package/lib/commands/menu/group-update.js +1 -1
  116. package/lib/commands/menu/index.js +1 -1
  117. package/lib/commands/menu/list.js +1 -1
  118. package/lib/commands/menu/move.js +1 -1
  119. package/lib/commands/menu/regroup-start.js +1 -1
  120. package/lib/commands/menu/rename.js +1 -1
  121. package/lib/commands/menu/shared/compare-table.js +1 -1
  122. package/lib/commands/menu/shared/delete-plan.js +1 -1
  123. package/lib/commands/menu/shared/facts.js +1 -1
  124. package/lib/commands/menu/shared/index.js +1 -1
  125. package/lib/commands/menu/shared/inquirer.js +1 -1
  126. package/lib/commands/menu/shared/local-pages.js +1 -1
  127. package/lib/commands/menu/shared/logic.js +1 -1
  128. package/lib/commands/menu/shared/mutations.js +1 -1
  129. package/lib/commands/menu/shared/service.js +1 -1
  130. package/lib/commands/menu/shared/sync-core.js +1 -1
  131. package/lib/commands/menu/shared/update-core.js +1 -1
  132. package/lib/commands/menu/shared/valid-url.js +1 -1
  133. package/lib/commands/menu/sync.js +1 -1
  134. package/lib/commands/notification/config-list.js +1 -1
  135. package/lib/commands/notification/index.js +1 -1
  136. package/lib/commands/ocr/index.js +1 -1
  137. package/lib/commands/page/generate-start.js +1 -1
  138. package/lib/commands/page/generate-status.js +1 -1
  139. package/lib/commands/page/index.js +1 -1
  140. package/lib/commands/page/pull.js +1 -1
  141. package/lib/commands/page/push.js +1 -1
  142. package/lib/commands/page/relation-audit.js +1 -1
  143. package/lib/commands/page/restore.js +1 -1
  144. package/lib/commands/page/shared.js +1 -1
  145. package/lib/commands/page/standard-page-status.js +1 -1
  146. package/lib/commands/page/sync.js +1 -1
  147. package/lib/commands/permit/index.js +1 -1
  148. package/lib/commands/permit/page-get.js +1 -1
  149. package/lib/commands/permit/page-set.js +1 -1
  150. package/lib/commands/permit/role-apis-set.js +1 -1
  151. package/lib/commands/permit/role-menus-set.js +1 -1
  152. package/lib/commands/permit/role-menus.js +1 -1
  153. package/lib/commands/permit/shared.js +1 -1
  154. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  155. package/lib/commands/project/create/format-elapsed.js +1 -1
  156. package/lib/commands/project/create/main.js +1 -1
  157. package/lib/commands/project/create/non-interactive.js +1 -1
  158. package/lib/commands/project/create/project-template-path.js +1 -1
  159. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  160. package/lib/commands/project/create/use-format-code.js +1 -1
  161. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  162. package/lib/commands/project/index.js +1 -1
  163. package/lib/commands/project/init.js +1 -1
  164. package/lib/commands/project/upgrade.js +1 -1
  165. package/lib/commands/registry.js +1 -1
  166. package/lib/commands/role/create.js +1 -1
  167. package/lib/commands/role/delete.js +1 -1
  168. package/lib/commands/role/detail.js +1 -1
  169. package/lib/commands/role/index.js +1 -1
  170. package/lib/commands/role/list.js +1 -1
  171. package/lib/commands/role/shared.js +1 -1
  172. package/lib/commands/role/update.js +1 -1
  173. package/lib/commands/role/user-add.js +1 -1
  174. package/lib/commands/role/user-remove.js +1 -1
  175. package/lib/commands/role/user-resolve.js +1 -1
  176. package/lib/commands/run/index.js +1 -1
  177. package/lib/commands/schema.js +1 -1
  178. package/lib/commands/sql/create.js +1 -1
  179. package/lib/commands/sql/delete.js +1 -1
  180. package/lib/commands/sql/detail.js +1 -1
  181. package/lib/commands/sql/exec.js +1 -1
  182. package/lib/commands/sql/index.js +1 -1
  183. package/lib/commands/sql/list.js +1 -1
  184. package/lib/commands/sql/pull.js +1 -1
  185. package/lib/commands/sql/push.js +1 -1
  186. package/lib/commands/sql/save.js +1 -1
  187. package/lib/commands/sql/shared.js +1 -1
  188. package/lib/commands/sql/status.js +1 -1
  189. package/lib/commands/sql/validate.js +1 -1
  190. package/lib/commands/task/index.js +1 -1
  191. package/lib/commands/task/status.js +1 -1
  192. package/lib/commands/workspace/add.js +1 -1
  193. package/lib/commands/workspace/index.js +1 -1
  194. package/lib/commands/workspace/remove.js +1 -1
  195. package/lib/config/schema.js +1 -1
  196. package/lib/constant/cdn.js +1 -1
  197. package/lib/constant/cli.js +1 -1
  198. package/lib/constant/defaults.js +1 -1
  199. package/lib/constant/domain.js +1 -1
  200. package/lib/constant/env.js +1 -1
  201. package/lib/constant/output.js +1 -1
  202. package/lib/constant/paths.js +1 -1
  203. package/lib/constant/risk.js +1 -1
  204. package/lib/context/app-resolver.js +1 -1
  205. package/lib/context/auth-resolver.js +1 -1
  206. package/lib/context/config-loader.js +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.js +1 -1
  240. package/lib/help.js +1 -1
  241. package/lib/skills/main.js +1 -1
  242. package/lib/skills/npx-skills-add.js +1 -1
  243. package/lib/skills/skill-presence.js +1 -0
  244. package/lib/telemetry/cli-command-trace.js +1 -1
  245. package/lib/telemetry/cli-help-trace.js +1 -1
  246. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  247. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  248. package/lib/telemetry/send-cli-trace-log.js +1 -1
  249. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  250. package/lib/utils/ai_config.js +1 -1
  251. package/lib/utils/apply-jq-filter.js +1 -1
  252. package/lib/utils/cdn-config.js +1 -1
  253. package/lib/utils/check-sdk-version.js +1 -1
  254. package/lib/utils/cli-version-check.js +1 -1
  255. package/lib/utils/cli-version-policy.js +1 -1
  256. package/lib/utils/config.js +1 -1
  257. package/lib/utils/copy-directory.js +1 -1
  258. package/lib/utils/entity-with-id.js +1 -1
  259. package/lib/utils/file-utils.js +1 -1
  260. package/lib/utils/guides-cdn.js +1 -1
  261. package/lib/utils/http-client.js +1 -1
  262. package/lib/utils/is-non-interactive.js +1 -1
  263. package/lib/utils/logger.js +1 -1
  264. package/lib/utils/params.js +1 -1
  265. package/lib/utils/platform.js +1 -1
  266. package/lib/utils/rules-cdn.js +1 -1
  267. package/lib/utils/sleep.js +1 -1
  268. package/lib/utils/template-replacer.js +1 -1
  269. package/lib/utils/update-notice.js +1 -1
  270. package/lib/utils/version.js +1 -1
  271. package/lib/utils/with-active-cookie.js +1 -1
  272. package/lib/utils/write-cli-side-channel.js +1 -1
  273. package/package.json +1 -1
@@ -1 +1 @@
1
- const a18_0x534c68=a18_0x166c;(function(_0x503771,_0x28d1e0){const _0x2671a9=a18_0x166c,_0x1dd0a1=_0x503771();while(!![]){try{const _0x38304e=-parseInt(_0x2671a9(0x1a2))/0x1+-parseInt(_0x2671a9(0x1a1))/0x2+-parseInt(_0x2671a9(0x1a7))/0x3+-parseInt(_0x2671a9(0x19f))/0x4+parseInt(_0x2671a9(0x1a3))/0x5+-parseInt(_0x2671a9(0x1a9))/0x6*(-parseInt(_0x2671a9(0x1ab))/0x7)+parseInt(_0x2671a9(0x1aa))/0x8;if(_0x38304e===_0x28d1e0)break;else _0x1dd0a1['push'](_0x1dd0a1['shift']());}catch(_0x3a81ba){_0x1dd0a1['push'](_0x1dd0a1['shift']());}}}(a18_0x44e1,0x6272a));import{CLI_BIN_NAME}from'../../constant/cli.js';function a18_0x44e1(){const _0x58605d=['194192pavMdI','3327500wOsOXE','app','App\x20profile\x20name','app\x20add','42741SdLZMJ','write','2562knXeaK','100672ThoChX','238AiWgcI','add','232920SeARZZ','Deprecated:\x20use\x20workspace\x20add\x20to\x20register\x20an\x20app\x20profile','45382ruhYtb'];a18_0x44e1=function(){return _0x58605d;};return a18_0x44e1();}function a18_0x166c(_0x9fe1a8,_0x407d06){_0x9fe1a8=_0x9fe1a8-0x19f;const _0x44e1fc=a18_0x44e1();let _0x166cec=_0x44e1fc[_0x9fe1a8];return _0x166cec;}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const appAddDefinition={'service':a18_0x534c68(0x1a4),'command':a18_0x534c68(0x1ac),'description':a18_0x534c68(0x1a0),'risk':a18_0x534c68(0x1a8),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20add','since':'2026-07'},'args':[{'name':'name','description':a18_0x534c68(0x1a5),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x499307=>validateAppName(_0x499307,a18_0x534c68(0x1a6)),'execute':_0x4fca07=>runAppAdd(_0x4fca07,'app\x20add')};
1
+ const a18_0x5e0afc=a18_0x66bd;function a18_0x5503(){const _0x4ec3b0=['2026-07','1010028TsWNyc','name','103215pDLrFR','app','app\x20add','237016eBvyZk','6753465hPCKXZ','Deprecated:\x20use\x20workspace\x20add\x20to\x20register\x20an\x20app\x20profile','467064vGUQsx','116Kabgfs','add','10525oSxhwG','App\x20profile\x20name','88UdltMr','10ejNgTL','211703auuBZk','write'];a18_0x5503=function(){return _0x4ec3b0;};return a18_0x5503();}(function(_0x53969d,_0x3a1a31){const _0x3e9d19=a18_0x66bd,_0x2cd22c=_0x53969d();while(!![]){try{const _0x126074=-parseInt(_0x3e9d19(0x129))/0x1+-parseInt(_0x3e9d19(0x131))/0x2+-parseInt(_0x3e9d19(0x134))/0x3+-parseInt(_0x3e9d19(0x123))/0x4*(parseInt(_0x3e9d19(0x125))/0x5)+-parseInt(_0x3e9d19(0x12c))/0x6+-parseInt(_0x3e9d19(0x12e))/0x7*(-parseInt(_0x3e9d19(0x127))/0x8)+parseInt(_0x3e9d19(0x132))/0x9*(parseInt(_0x3e9d19(0x128))/0xa);if(_0x126074===_0x3a1a31)break;else _0x2cd22c['push'](_0x2cd22c['shift']());}catch(_0x42d1d8){_0x2cd22c['push'](_0x2cd22c['shift']());}}}(a18_0x5503,0x302b2));function a18_0x66bd(_0x585846,_0xd5ed83){_0x585846=_0x585846-0x123;const _0x550381=a18_0x5503();let _0x66bde4=_0x550381[_0x585846];return _0x66bde4;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const appAddDefinition={'service':a18_0x5e0afc(0x12f),'command':a18_0x5e0afc(0x124),'description':a18_0x5e0afc(0x133),'risk':a18_0x5e0afc(0x12a),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20add','since':a18_0x5e0afc(0x12b)},'args':[{'name':a18_0x5e0afc(0x12d),'description':a18_0x5e0afc(0x126),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x470cfb=>validateAppName(_0x470cfb,a18_0x5e0afc(0x130)),'execute':_0x1f2cdb=>runAppAdd(_0x1f2cdb,a18_0x5e0afc(0x130))};
@@ -1 +1 @@
1
- function a19_0x5bb2(_0x4841e5,_0x12216d){_0x4841e5=_0x4841e5-0x7c;const _0x336cbd=a19_0x336c();let _0x5bb22f=_0x336cbd[_0x4841e5];return _0x5bb22f;}(function(_0x94cf6d,_0x1aab8c){const _0x4cc510=a19_0x5bb2,_0x5a275b=_0x94cf6d();while(!![]){try{const _0x35a4d1=parseInt(_0x4cc510(0x84))/0x1*(parseInt(_0x4cc510(0x7e))/0x2)+-parseInt(_0x4cc510(0x85))/0x3+-parseInt(_0x4cc510(0x81))/0x4*(-parseInt(_0x4cc510(0x7d))/0x5)+parseInt(_0x4cc510(0x7f))/0x6+-parseInt(_0x4cc510(0x7c))/0x7+-parseInt(_0x4cc510(0x82))/0x8*(parseInt(_0x4cc510(0x80))/0x9)+-parseInt(_0x4cc510(0x83))/0xa*(parseInt(_0x4cc510(0x86))/0xb);if(_0x35a4d1===_0x1aab8c)break;else _0x5a275b['push'](_0x5a275b['shift']());}catch(_0x499775){_0x5a275b['push'](_0x5a275b['shift']());}}}(a19_0x336c,0x6d240));import{appListDefinition}from'../../commands/app/list.js';function a19_0x336c(){const _0x3c13aa=['91786TDveOE','2859486tMUhMx','34497gTqmdO','2480ufjIrp','200VToGjq','2229940LQBZSZ','16TuYSLs','2487489gIYmnd','11wQZirR','1316749QiAXFL','4615kQSyYh'];a19_0x336c=function(){return _0x3c13aa;};return a19_0x336c();}import{appAddDefinition}from'../../commands/app/add.js';import{appRemoveDefinition}from'../../commands/app/remove.js';export const appDefinitions=[appListDefinition,appAddDefinition,appRemoveDefinition];
1
+ function a19_0x1bce(){const _0x53df25=['18tLsrYM','510770SlZdoW','2685DaJVjb','6496imWjtU','4891620tTVQAK','480822qBfSOI','10701HzvFyh','1289175BcMrzv','868syeuso','55imbDXI','12934362qdiIDY'];a19_0x1bce=function(){return _0x53df25;};return a19_0x1bce();}(function(_0x2bf8d8,_0x5e74b2){const _0x1d20a0=a19_0x1eb1,_0x15fa94=_0x2bf8d8();while(!![]){try{const _0x169528=parseInt(_0x1d20a0(0xe8))/0x1+parseInt(_0x1d20a0(0xe4))/0x2+-parseInt(_0x1d20a0(0xe5))/0x3*(parseInt(_0x1d20a0(0xeb))/0x4)+-parseInt(_0x1d20a0(0xea))/0x5*(-parseInt(_0x1d20a0(0xee))/0x6)+-parseInt(_0x1d20a0(0xed))/0x7+-parseInt(_0x1d20a0(0xe6))/0x8*(parseInt(_0x1d20a0(0xe9))/0x9)+-parseInt(_0x1d20a0(0xe7))/0xa*(-parseInt(_0x1d20a0(0xec))/0xb);if(_0x169528===_0x5e74b2)break;else _0x15fa94['push'](_0x15fa94['shift']());}catch(_0x112bc1){_0x15fa94['push'](_0x15fa94['shift']());}}}(a19_0x1bce,0xe7769));import{appListDefinition}from'../../commands/app/list.js';import{appAddDefinition}from'../../commands/app/add.js';import{appRemoveDefinition}from'../../commands/app/remove.js';function a19_0x1eb1(_0x397705,_0x3cbd49){_0x397705=_0x397705-0xe4;const _0x1bce59=a19_0x1bce();let _0x1eb182=_0x1bce59[_0x397705];return _0x1eb182;}export const appDefinitions=[appListDefinition,appAddDefinition,appRemoveDefinition];
@@ -1 +1 @@
1
- const a20_0x558e32=a20_0x2784;(function(_0xa412ce,_0x4d520c){const _0x3a13a9=a20_0x2784,_0x18df8b=_0xa412ce();while(!![]){try{const _0x409b1b=parseInt(_0x3a13a9(0x16d))/0x1*(parseInt(_0x3a13a9(0x17a))/0x2)+parseInt(_0x3a13a9(0x185))/0x3*(-parseInt(_0x3a13a9(0x162))/0x4)+parseInt(_0x3a13a9(0x17f))/0x5+-parseInt(_0x3a13a9(0x181))/0x6*(parseInt(_0x3a13a9(0x17b))/0x7)+parseInt(_0x3a13a9(0x168))/0x8+parseInt(_0x3a13a9(0x176))/0x9+parseInt(_0x3a13a9(0x166))/0xa;if(_0x409b1b===_0x4d520c)break;else _0x18df8b['push'](_0x18df8b['shift']());}catch(_0x5c6aea){_0x18df8b['push'](_0x18df8b['shift']());}}}(a20_0x2131,0x23d35));function a20_0x2784(_0x2668a4,_0x118b4b){_0x2668a4=_0x2668a4-0x162;const _0x213131=a20_0x2131();let _0x278471=_0x213131[_0x2668a4];return _0x278471;}import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x6ccbcc,_0x1bbbfb){const _0x4ee9b0=a20_0x2784,_0x56612e=[],_0x16945b=_0x6ccbcc[_0x4ee9b0(0x170)]&&typeof _0x6ccbcc[_0x4ee9b0(0x170)]===_0x4ee9b0(0x178)?_0x6ccbcc[_0x4ee9b0(0x170)]:{},_0x4769d8=_0x6ccbcc[_0x4ee9b0(0x167)]||undefined;for(const [_0x25614c,_0x57ac20]of Object[_0x4ee9b0(0x17c)](_0x16945b)){if(!_0x57ac20||typeof _0x57ac20!==_0x4ee9b0(0x178)||!_0x57ac20[_0x4ee9b0(0x171)])continue;_0x56612e[_0x4ee9b0(0x177)]({'name':_0x25614c,'appcode':_0x57ac20['appcode'],'named':!![],'definedIn':_0x1bbbfb,'isDefault':_0x25614c===_0x4769d8,...buildAppProfileListFields(_0x57ac20)});}return _0x56612e;}function buildMergedItems(_0x2e1f42,_0x3cc4cc){const _0x703280=a20_0x2784,{apps:apps={},defaultApp:_0x39399b}=_0x2e1f42,_0x54ee13=_0x3cc4cc[_0x703280(0x173)][_0x703280(0x170)]&&typeof _0x3cc4cc[_0x703280(0x173)]['apps']===_0x703280(0x178)?_0x3cc4cc[_0x703280(0x173)][_0x703280(0x170)]:{},_0x39c6bb=_0x3cc4cc[_0x703280(0x189)][_0x703280(0x170)]&&typeof _0x3cc4cc[_0x703280(0x189)][_0x703280(0x170)]==='object'?_0x3cc4cc[_0x703280(0x189)][_0x703280(0x170)]:{},_0x11a9d1=_0x3cc4cc['projectConfig'][_0x703280(0x172)]===![],_0x287862=Object['entries'](apps),_0x5d6878=_0x287862[_0x703280(0x174)](([_0x4326fb,_0x4ebf6b])=>({'name':_0x4326fb,'appcode':_0x4ebf6b[_0x703280(0x171)],'named':!![],'definedIn':appDefinedIn(_0x4326fb,_0x54ee13,_0x39c6bb,_0x11a9d1),'isDefault':_0x4326fb===_0x39399b,...buildAppProfileListFields(_0x4ebf6b)}));return _0x5d6878;}function validateAppListFlags(_0x13c605){const _0x5dcd2a=a20_0x2784;if(!_0x13c605[_0x5dcd2a(0x188)]('remote'))return;if(!_0x13c605[_0x5dcd2a(0x188)]('global')&&!_0x13c605['bool'](_0x5dcd2a(0x175)))return;throw CliErrors[_0x5dcd2a(0x169)](_0x5dcd2a(0x16f),'Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.');}function a20_0x2131(){const _0x39e229=['\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','projectPath','find','754190fcZfBY','defaultApp','915264KkAeOQ','validation','mergedCli','list','merged','47OvkJHF','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','apps','appcode','inherit','globalConfig','map','project','547164ROfBDR','push','object','global','8112fIABdv','1744043uVSmph','entries','\x20config','app','1100705BYSVTD','isCurrent','6ZJACXa','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','boolean','remote','13974Jpjdhs','read','\x20in\x20','bool','projectConfig','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','228Drxdhy'];a20_0x2131=function(){return _0x39e229;};return a20_0x2131();}async function execute(_0x15f5c7){const _0x30f1b1=a20_0x2784;validateAppListFlags(_0x15f5c7);if(_0x15f5c7[_0x30f1b1(0x188)](_0x30f1b1(0x184)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x15f5c7)};const _0x310c45=_0x15f5c7[_0x30f1b1(0x188)](_0x30f1b1(0x179)),_0x24b7e3=_0x15f5c7[_0x30f1b1(0x188)]('project'),_0x588955=_0x310c45?_0x30f1b1(0x179):_0x24b7e3?_0x30f1b1(0x175):_0x30f1b1(0x16c),{config:_0x4eca91,layers:_0x53b973}=readRawConfigWithLayers(),_0x367ec2=resolveDefaultAppSource(_0x53b973),{defaultApp:_0x2eb33d}=_0x4eca91;let _0x349b9f,_0x12a9db;switch(_0x588955){case _0x30f1b1(0x179):_0x349b9f=buildItemsFromLayer(_0x53b973[_0x30f1b1(0x173)],_0x30f1b1(0x179)),_0x12a9db=_0x53b973['globalPath'];break;case _0x30f1b1(0x175):_0x349b9f=buildItemsFromLayer(_0x53b973[_0x30f1b1(0x189)],'project'),_0x12a9db=_0x53b973[_0x30f1b1(0x164)];break;default:_0x349b9f=buildMergedItems(_0x4eca91,_0x53b973);break;}enrichAppListItemsWithMergedSelection(_0x349b9f,_0x15f5c7[_0x30f1b1(0x16a)]);if(_0x349b9f['length']===0x0){const _0x305087=_0x588955==='merged'?'':_0x30f1b1(0x187)+_0x588955+_0x30f1b1(0x17d);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x305087+'.\x20Use\x20`'+CLI_BIN_NAME+_0x30f1b1(0x163)};}const _0x40672a=_0x349b9f[_0x30f1b1(0x165)](_0x3465f6=>_0x3465f6[_0x30f1b1(0x180)]===!![]),_0x1c7004=_0x2eb33d??_0x40672a?.['appcode']??null,_0x1f43e7=_0x588955===_0x30f1b1(0x16c)?{'globalPath':_0x53b973['globalPath']??null,'projectPath':_0x53b973[_0x30f1b1(0x164)]??null,'defaultApp':_0x1c7004,'defaultAppSource':_0x2eb33d!=null?_0x367ec2:null}:{'scope':_0x588955,'configPath':_0x12a9db??null};return{'ok':!![],'data':{'items':_0x349b9f,'meta':_0x1f43e7}};}export const appListDefinition={'service':a20_0x558e32(0x17e),'command':a20_0x558e32(0x16b),'description':a20_0x558e32(0x182),'risk':a20_0x558e32(0x186),'auth':'optional','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x558e32(0x184),'type':a20_0x558e32(0x183),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a20_0x558e32(0x179),'type':a20_0x558e32(0x183),'description':a20_0x558e32(0x18a),'default':![]},{'name':a20_0x558e32(0x175),'type':a20_0x558e32(0x183),'description':a20_0x558e32(0x16e),'default':![]}],async 'validate'(_0x433e44){validateAppListFlags(_0x433e44);},'execute':execute};
1
+ const a20_0x567d03=a20_0x4af6;(function(_0x5b76ea,_0x5ae771){const _0x1401fc=a20_0x4af6,_0x59115c=_0x5b76ea();while(!![]){try{const _0x2159bc=parseInt(_0x1401fc(0xdb))/0x1+parseInt(_0x1401fc(0xd7))/0x2*(parseInt(_0x1401fc(0xda))/0x3)+parseInt(_0x1401fc(0xe0))/0x4*(parseInt(_0x1401fc(0xe5))/0x5)+-parseInt(_0x1401fc(0xe2))/0x6*(parseInt(_0x1401fc(0xc9))/0x7)+-parseInt(_0x1401fc(0xdf))/0x8*(-parseInt(_0x1401fc(0xc6))/0x9)+-parseInt(_0x1401fc(0xc3))/0xa+-parseInt(_0x1401fc(0xd4))/0xb*(parseInt(_0x1401fc(0xc2))/0xc);if(_0x2159bc===_0x5ae771)break;else _0x59115c['push'](_0x59115c['shift']());}catch(_0x4222b6){_0x59115c['push'](_0x59115c['shift']());}}}(a20_0x28b3,0x4c20a));import{readRawConfigWithLayers}from'../../context.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';import{buildAppProfileListFields}from'../../config/schema.js';import{appDefinedIn,enrichAppListItemsWithMergedSelection,resolveDefaultAppSource}from'../../commands/app/shared.js';import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x33a684,_0x47aae8){const _0x430ac3=a20_0x4af6,_0x1162bc=[],_0x4a5ad0=_0x33a684[_0x430ac3(0xd8)]&&typeof _0x33a684[_0x430ac3(0xd8)]==='object'?_0x33a684['apps']:{},_0x3eb065=_0x33a684[_0x430ac3(0xe8)]||undefined;for(const [_0x3ea128,_0x414725]of Object['entries'](_0x4a5ad0)){if(!_0x414725||typeof _0x414725!=='object'||!_0x414725['appcode'])continue;_0x1162bc[_0x430ac3(0xde)]({'name':_0x3ea128,'appcode':_0x414725[_0x430ac3(0xcd)],'named':!![],'definedIn':_0x47aae8,'isDefault':_0x3ea128===_0x3eb065,...buildAppProfileListFields(_0x414725)});}return _0x1162bc;}function buildMergedItems(_0x2c3f62,_0x4404b9){const _0x5ebcfd=a20_0x4af6,{apps:apps={},defaultApp:_0x34d75c}=_0x2c3f62,_0x5d0eae=_0x4404b9[_0x5ebcfd(0xe1)][_0x5ebcfd(0xd8)]&&typeof _0x4404b9['globalConfig'][_0x5ebcfd(0xd8)]===_0x5ebcfd(0xe9)?_0x4404b9['globalConfig'][_0x5ebcfd(0xd8)]:{},_0xce297c=_0x4404b9['projectConfig'][_0x5ebcfd(0xd8)]&&typeof _0x4404b9[_0x5ebcfd(0xd2)]['apps']===_0x5ebcfd(0xe9)?_0x4404b9[_0x5ebcfd(0xd2)]['apps']:{},_0x33908f=_0x4404b9['projectConfig'][_0x5ebcfd(0xd3)]===![],_0x530a3d=Object[_0x5ebcfd(0xd1)](apps),_0x110470=_0x530a3d['map'](([_0x3d8b4e,_0x19991c])=>({'name':_0x3d8b4e,'appcode':_0x19991c[_0x5ebcfd(0xcd)],'named':!![],'definedIn':appDefinedIn(_0x3d8b4e,_0x5d0eae,_0xce297c,_0x33908f),'isDefault':_0x3d8b4e===_0x34d75c,...buildAppProfileListFields(_0x19991c)}));return _0x110470;}function validateAppListFlags(_0x191f25){const _0x582d4f=a20_0x4af6;if(!_0x191f25['bool'](_0x582d4f(0xd9)))return;if(!_0x191f25[_0x582d4f(0xd5)](_0x582d4f(0xd6))&&!_0x191f25[_0x582d4f(0xd5)](_0x582d4f(0xe3)))return;throw CliErrors['validation'](_0x582d4f(0xdd),'Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.');}function a20_0x4af6(_0x3582ab,_0x448f9e){_0x3582ab=_0x3582ab-0xc2;const _0x28b3d4=a20_0x28b3();let _0x4af6fa=_0x28b3d4[_0x3582ab];return _0x4af6fa;}async function execute(_0x309fa6){const _0x183649=a20_0x4af6;validateAppListFlags(_0x309fa6);if(_0x309fa6[_0x183649(0xd5)](_0x183649(0xd9)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x309fa6)};const _0x256fd8=_0x309fa6['bool'](_0x183649(0xd6)),_0x359f51=_0x309fa6[_0x183649(0xd5)](_0x183649(0xe3)),_0x1ad04d=_0x256fd8?'global':_0x359f51?_0x183649(0xe3):_0x183649(0xcf),{config:_0x2cfe07,layers:_0xb3e677}=readRawConfigWithLayers(),_0x16f86e=resolveDefaultAppSource(_0xb3e677),{defaultApp:_0x17372d}=_0x2cfe07;let _0x3398d9,_0x3e9c11;switch(_0x1ad04d){case _0x183649(0xd6):_0x3398d9=buildItemsFromLayer(_0xb3e677['globalConfig'],_0x183649(0xd6)),_0x3e9c11=_0xb3e677[_0x183649(0xe6)];break;case _0x183649(0xe3):_0x3398d9=buildItemsFromLayer(_0xb3e677[_0x183649(0xd2)],_0x183649(0xe3)),_0x3e9c11=_0xb3e677[_0x183649(0xca)];break;default:_0x3398d9=buildMergedItems(_0x2cfe07,_0xb3e677);break;}enrichAppListItemsWithMergedSelection(_0x3398d9,_0x309fa6[_0x183649(0xd0)]);if(_0x3398d9[_0x183649(0xcc)]===0x0){const _0x5cd81c=_0x1ad04d===_0x183649(0xcf)?'':'\x20in\x20'+_0x1ad04d+_0x183649(0xc8);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x5cd81c+_0x183649(0xdc)+CLI_BIN_NAME+_0x183649(0xea)};}const _0x7a329c=_0x3398d9[_0x183649(0xcb)](_0x394bba=>_0x394bba['isCurrent']===!![]),_0x132e23=_0x17372d??_0x7a329c?.[_0x183649(0xcd)]??null,_0x52e046=_0x1ad04d==='merged'?{'globalPath':_0xb3e677['globalPath']??null,'projectPath':_0xb3e677[_0x183649(0xca)]??null,'defaultApp':_0x132e23,'defaultAppSource':_0x17372d!=null?_0x16f86e:null}:{'scope':_0x1ad04d,'configPath':_0x3e9c11??null};return{'ok':!![],'data':{'items':_0x3398d9,'meta':_0x52e046}};}export const appListDefinition={'service':a20_0x567d03(0xce),'command':'list','description':a20_0x567d03(0xc5),'risk':'read','auth':a20_0x567d03(0xe7),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x567d03(0xd9),'type':a20_0x567d03(0xc7),'description':a20_0x567d03(0xe4),'default':![]},{'name':a20_0x567d03(0xd6),'type':'boolean','description':a20_0x567d03(0xc4),'default':![]},{'name':'project','type':a20_0x567d03(0xc7),'description':'Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','default':![]}],async 'validate'(_0x331c46){validateAppListFlags(_0x331c46);},'execute':execute};function a20_0x28b3(){const _0x591320=['global','510210xoHxdC','apps','remote','3sbZZqI','447204akLdRS','.\x20Use\x20`','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','push','8iSjEIG','11148MqbVAH','globalConfig','42vJhzEA','project','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','5KWScvb','globalPath','optional','defaultApp','object','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','48DpGhxg','3542030MijKPJ','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','3243231mNjmyz','boolean','\x20config','206962Xahhbk','projectPath','find','length','appcode','app','merged','mergedCli','entries','projectConfig','inherit','529298HaQMAK','bool'];a20_0x28b3=function(){return _0x591320;};return a20_0x28b3();}
@@ -1 +1 @@
1
- (function(_0x1c29e9,_0x41b04c){const _0x1b3962=a21_0x4e4c,_0x2e3dff=_0x1c29e9();while(!![]){try{const _0x8da73c=parseInt(_0x1b3962(0x11f))/0x1+-parseInt(_0x1b3962(0x124))/0x2*(-parseInt(_0x1b3962(0x11d))/0x3)+parseInt(_0x1b3962(0x120))/0x4*(-parseInt(_0x1b3962(0x123))/0x5)+-parseInt(_0x1b3962(0x121))/0x6*(-parseInt(_0x1b3962(0x126))/0x7)+parseInt(_0x1b3962(0x11c))/0x8+-parseInt(_0x1b3962(0x122))/0x9*(parseInt(_0x1b3962(0x118))/0xa)+-parseInt(_0x1b3962(0x127))/0xb*(parseInt(_0x1b3962(0x11a))/0xc);if(_0x8da73c===_0x41b04c)break;else _0x2e3dff['push'](_0x2e3dff['shift']());}catch(_0x3f2309){_0x2e3dff['push'](_0x2e3dff['shift']());}}}(a21_0x2fc3,0x71cfa));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a21_0x4e4c(_0x2e293e,_0x483985){_0x2e293e=_0x2e293e-0x118;const _0x2fc38c=a21_0x2fc3();let _0x4e4cc7=_0x2fc38c[_0x2e293e];return _0x4e4cc7;}function resolveCookie(_0x2479cc){const _0x4648d0=a21_0x4e4c,_0x10f628=_0x2479cc[_0x4648d0(0x11e)]||getCookie();if(!_0x10f628)throw CliErrors[_0x4648d0(0x11b)]();return _0x10f628;}function a21_0x2fc3(){const _0x55c650=['16797SIXVYe','cookie','429498mLrQqa','916HpggGD','12SwvFqc','12285ZUeMeT','5350FqbeZY','102klbvOK','map','89467GeWAoU','1232VfAJNI','appName','appCode','2570WaXjXg','appDesc','53640KTigoM','authRequired','6576288FTMMGr'];a21_0x2fc3=function(){return _0x55c650;};return a21_0x2fc3();}export async function listRemoteAppDirectory(_0x547c3f){const _0x1173e3=a21_0x4e4c,_0x46f561=await withActiveCookie(resolveCookie(_0x547c3f),()=>listRemoteApps());return{'items':_0x46f561[_0x1173e3(0x125)](_0x3e8c0e=>({..._0x3e8c0e['id']!=null?{'id':_0x3e8c0e['id']}:{},'appCode':_0x3e8c0e[_0x1173e3(0x129)],'appName':_0x3e8c0e[_0x1173e3(0x128)],..._0x3e8c0e[_0x1173e3(0x119)]!=null?{'appDesc':_0x3e8c0e[_0x1173e3(0x119)]}:{}})),'meta':{'source':'platform'}};}
1
+ (function(_0x429de2,_0x51a864){const _0x58c4ac=a21_0x516f,_0x17de6f=_0x429de2();while(!![]){try{const _0xb5913f=-parseInt(_0x58c4ac(0x80))/0x1*(parseInt(_0x58c4ac(0x83))/0x2)+-parseInt(_0x58c4ac(0x7e))/0x3*(-parseInt(_0x58c4ac(0x7c))/0x4)+parseInt(_0x58c4ac(0x7d))/0x5+parseInt(_0x58c4ac(0x7f))/0x6+-parseInt(_0x58c4ac(0x85))/0x7*(parseInt(_0x58c4ac(0x84))/0x8)+-parseInt(_0x58c4ac(0x7b))/0x9*(-parseInt(_0x58c4ac(0x7a))/0xa)+-parseInt(_0x58c4ac(0x86))/0xb;if(_0xb5913f===_0x51a864)break;else _0x17de6f['push'](_0x17de6f['shift']());}catch(_0x1be905){_0x17de6f['push'](_0x17de6f['shift']());}}}(a21_0x2aa2,0x582bd));function a21_0x2aa2(){const _0x2bfc64=['appName','561420YVIBDn','9TUMRST','7180Wrvivc','3233040lIMScm','933IoosDo','3456480hNfPzU','425897yEYDpa','map','appDesc','2FfGsLd','392KyKipX','6629RSBwSX','11039886utRKSo','authRequired','appCode'];a21_0x2aa2=function(){return _0x2bfc64;};return a21_0x2aa2();}import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a21_0x516f(_0xf8a2e2,_0x5dd577){_0xf8a2e2=_0xf8a2e2-0x79;const _0x2aa2ba=a21_0x2aa2();let _0x516f59=_0x2aa2ba[_0xf8a2e2];return _0x516f59;}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x1d8b71){const _0xada627=a21_0x516f,_0x5a5637=_0x1d8b71['cookie']||getCookie();if(!_0x5a5637)throw CliErrors[_0xada627(0x87)]();return _0x5a5637;}export async function listRemoteAppDirectory(_0x3a4041){const _0x1ecf46=a21_0x516f,_0x5890f4=await withActiveCookie(resolveCookie(_0x3a4041),()=>listRemoteApps());return{'items':_0x5890f4[_0x1ecf46(0x81)](_0x333a0e=>({..._0x333a0e['id']!=null?{'id':_0x333a0e['id']}:{},'appCode':_0x333a0e[_0x1ecf46(0x88)],'appName':_0x333a0e[_0x1ecf46(0x79)],..._0x333a0e[_0x1ecf46(0x82)]!=null?{'appDesc':_0x333a0e[_0x1ecf46(0x82)]}:{}})),'meta':{'source':'platform'}};}
@@ -1 +1 @@
1
- const a22_0xafe4e7=a22_0x5a72;function a22_0x5a72(_0x2f0b6b,_0x2402c4){_0x2f0b6b=_0x2f0b6b-0xaa;const _0x281efd=a22_0x281e();let _0x5a72b2=_0x281efd[_0x2f0b6b];return _0x5a72b2;}function a22_0x281e(){const _0x57c3a8=['name','138286XiUaHR','11438330pFUUsj','261100VqFpSu','2026-07','2027472GdNMNI','app\x20remove','App\x20profile\x20name\x20to\x20remove','15008onzqAh','42FTPLxo','7EUSbMg','3510UdHBlH','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','\x20workspace\x20remove','3348730nSVHqH','1332628DNCCsL'];a22_0x281e=function(){return _0x57c3a8;};return a22_0x281e();}(function(_0x17a2d4,_0x13f48f){const _0x323f21=a22_0x5a72,_0x44574e=_0x17a2d4();while(!![]){try{const _0x653551=parseInt(_0x323f21(0xad))/0x1*(-parseInt(_0x323f21(0xb4))/0x2)+-parseInt(_0x323f21(0xb8))/0x3+parseInt(_0x323f21(0xb2))/0x4+-parseInt(_0x323f21(0xb6))/0x5*(-parseInt(_0x323f21(0xac))/0x6)+parseInt(_0x323f21(0xb1))/0x7+-parseInt(_0x323f21(0xab))/0x8*(parseInt(_0x323f21(0xae))/0x9)+parseInt(_0x323f21(0xb5))/0xa;if(_0x653551===_0x13f48f)break;else _0x44574e['push'](_0x44574e['shift']());}catch(_0x117b10){_0x44574e['push'](_0x44574e['shift']());}}}(a22_0x281e,0x68d8f));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':'app','command':'remove','description':a22_0xafe4e7(0xaf),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0xafe4e7(0xb0),'since':a22_0xafe4e7(0xb7)},'args':[{'name':a22_0xafe4e7(0xb3),'description':a22_0xafe4e7(0xaa),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x36aa55=>validateAppName(_0x36aa55,'app\x20remove'),'execute':_0x4fa2b7=>runAppRemove(_0x4fa2b7,a22_0xafe4e7(0xb9))};
1
+ const a22_0x23ced0=a22_0x2885;function a22_0x2885(_0x1d6d0b,_0x21433f){_0x1d6d0b=_0x1d6d0b-0x17d;const _0x1c15cd=a22_0x1c15();let _0x288564=_0x1c15cd[_0x1d6d0b];return _0x288564;}(function(_0x3708f8,_0x5e8794){const _0x5d457c=a22_0x2885,_0x24a116=_0x3708f8();while(!![]){try{const _0x45f5eb=-parseInt(_0x5d457c(0x181))/0x1*(parseInt(_0x5d457c(0x186))/0x2)+-parseInt(_0x5d457c(0x180))/0x3*(parseInt(_0x5d457c(0x18f))/0x4)+parseInt(_0x5d457c(0x182))/0x5*(-parseInt(_0x5d457c(0x18d))/0x6)+-parseInt(_0x5d457c(0x187))/0x7+parseInt(_0x5d457c(0x17f))/0x8*(parseInt(_0x5d457c(0x18e))/0x9)+-parseInt(_0x5d457c(0x189))/0xa*(parseInt(_0x5d457c(0x18a))/0xb)+parseInt(_0x5d457c(0x184))/0xc;if(_0x45f5eb===_0x5e8794)break;else _0x24a116['push'](_0x24a116['shift']());}catch(_0x2a76d3){_0x24a116['push'](_0x24a116['shift']());}}}(a22_0x1c15,0x8db58));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':a22_0x23ced0(0x18c),'command':a22_0x23ced0(0x18b),'description':a22_0x23ced0(0x17e),'risk':a22_0x23ced0(0x17d),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x23ced0(0x185),'since':'2026-07'},'args':[{'name':a22_0x23ced0(0x183),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x31b444=>validateAppName(_0x31b444,a22_0x23ced0(0x188)),'execute':_0x4559f1=>runAppRemove(_0x4559f1,a22_0x23ced0(0x188))};function a22_0x1c15(){const _0x3d94ba=['1854EQCWym','6742176YQaICV','app\x20remove','10EXajve','1548965MOBlKF','remove','app','294VPkoKN','119259eENdVd','72188HUDmFf','high-risk-write','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','504OouRrI','93xqSvYw','1136gXmAel','83270Dpqupk','name','39338220IZLEAV','\x20workspace\x20remove'];a22_0x1c15=function(){return _0x3d94ba;};return a22_0x1c15();}
@@ -1 +1 @@
1
- (function(_0x34d57c,_0x21d43c){const _0x4cf431=a23_0x4604,_0x371b58=_0x34d57c();while(!![]){try{const _0xc33197=parseInt(_0x4cf431(0x1e5))/0x1+-parseInt(_0x4cf431(0x1ed))/0x2+-parseInt(_0x4cf431(0x1de))/0x3*(parseInt(_0x4cf431(0x1e0))/0x4)+-parseInt(_0x4cf431(0x1e8))/0x5*(parseInt(_0x4cf431(0x1f7))/0x6)+-parseInt(_0x4cf431(0x1e3))/0x7*(-parseInt(_0x4cf431(0x1e6))/0x8)+-parseInt(_0x4cf431(0x1df))/0x9+-parseInt(_0x4cf431(0x1f5))/0xa*(-parseInt(_0x4cf431(0x1fb))/0xb);if(_0xc33197===_0x21d43c)break;else _0x371b58['push'](_0x371b58['shift']());}catch(_0x3a59){_0x371b58['push'](_0x371b58['shift']());}}}(a23_0x2862,0x2b36c));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x1ce358,_0x183545){const _0xcc95ca=a23_0x4604;if(!_0x183545)return;const _0x27a7ba=_0x183545[_0xcc95ca(0x1dd)]&&typeof _0x183545[_0xcc95ca(0x1dd)]===_0xcc95ca(0x1f6)?_0x183545[_0xcc95ca(0x1dd)]:{},_0x488a49=Object[_0xcc95ca(0x1ea)](_0x27a7ba)['length']>0x0;for(const _0x494627 of _0x1ce358){_0x494627[_0xcc95ca(0x1f4)]=![];}const _0x3cd657=_0x183545[_0xcc95ca(0x1f0)]!=null?String(_0x183545['appCode'])[_0xcc95ca(0x1f2)]():'';if(_0x488a49){const _0x599985=_0x183545[_0xcc95ca(0x1e9)]??_0x183545[_0xcc95ca(0x1ee)];if(_0x599985)for(const _0x4567dd of _0x1ce358){_0x4567dd['named']===!![]&&_0x4567dd[_0xcc95ca(0x1fa)]===_0x599985&&(_0x4567dd[_0xcc95ca(0x1f4)]=!![]);}for(const _0x124839 of _0x1ce358){if(_0x124839[_0xcc95ca(0x1eb)]!==![])continue;if(_0x183545['defaultApp'])continue;_0x3cd657&&String(_0x124839[_0xcc95ca(0x1f8)]??'')[_0xcc95ca(0x1f2)]()===_0x3cd657&&(_0x124839[_0xcc95ca(0x1f4)]=!![]);}return;}if(!_0x3cd657)return;for(const _0x27951b of _0x1ce358){String(_0x27951b['appcode']??'')[_0xcc95ca(0x1f2)]()===_0x3cd657&&(_0x27951b[_0xcc95ca(0x1f4)]=!![]);}}export function resolveAppScopeForWrite(_0x5dfa40,_0xb8f06f,_0x22fa7e){const _0x40c7a3=a23_0x4604;if(_0xb8f06f)return _0x40c7a3(0x1e7);const _0x454b9d=_0x22fa7e[_0x40c7a3(0x1f3)]['apps']&&typeof _0x22fa7e[_0x40c7a3(0x1f3)][_0x40c7a3(0x1dd)]==='object'?_0x22fa7e[_0x40c7a3(0x1f3)]['apps']:{},_0x410c58=_0x22fa7e['globalConfig']['apps']&&typeof _0x22fa7e[_0x40c7a3(0x1e2)]['apps']===_0x40c7a3(0x1f6)?_0x22fa7e[_0x40c7a3(0x1e2)]['apps']:{};if(Object[_0x40c7a3(0x1e4)][_0x40c7a3(0x1ec)][_0x40c7a3(0x1ef)](_0x454b9d,_0x5dfa40))return _0x40c7a3(0x1e1);if(Object[_0x40c7a3(0x1e4)]['hasOwnProperty'][_0x40c7a3(0x1ef)](_0x410c58,_0x5dfa40))return _0x40c7a3(0x1e7);return'project';}function a23_0x4604(_0x275103,_0x2e85a3){_0x275103=_0x275103-0x1dc;const _0x2862c3=a23_0x2862();let _0x46045a=_0x2862c3[_0x275103];return _0x46045a;}export function appDefinedIn(_0xd43d8,_0x23570d,_0x49168b,_0x30f292){const _0x330bd=a23_0x4604;if(_0x30f292)return Object[_0x330bd(0x1e4)][_0x330bd(0x1ec)]['call'](_0x49168b,_0xd43d8)?_0x330bd(0x1e1):_0x330bd(0x1e7);const _0x5c2637=Object[_0x330bd(0x1e4)][_0x330bd(0x1ec)][_0x330bd(0x1ef)](_0x23570d,_0xd43d8),_0x34c83d=Object[_0x330bd(0x1e4)]['hasOwnProperty']['call'](_0x49168b,_0xd43d8);if(_0x5c2637&&_0x34c83d)return _0x330bd(0x1dc);if(_0x34c83d)return _0x330bd(0x1e1);return'global';}export function resolveDefaultAppSource(_0x11b269){const _0xb577cc=a23_0x4604,_0x50f411=_0x11b269['projectConfig'][_0xb577cc(0x1dd)]&&typeof _0x11b269[_0xb577cc(0x1f3)][_0xb577cc(0x1dd)]===_0xb577cc(0x1f6)?_0x11b269[_0xb577cc(0x1f3)][_0xb577cc(0x1dd)]:{};if(_0xb577cc(0x1ee)in _0x11b269[_0xb577cc(0x1f3)])return'project';if(Object['keys'](_0x50f411)['length']>0x0)return _0xb577cc(0x1e1);if(_0x11b269['projectConfig'][_0xb577cc(0x1f9)]===![])return null;if(_0x11b269[_0xb577cc(0x1e2)][_0xb577cc(0x1ee)])return _0xb577cc(0x1e7);return null;}export function getConfigPath(_0x187f90={}){const _0x2032bf=a23_0x4604,_0x38963c=_0x187f90[_0x2032bf(0x1e7)]?_0x2032bf(0x1e7):_0x2032bf(0x1e1);return resolveWriteConfigPath(_0x38963c);}function a23_0x2862(){const _0x31c3c5=['1814498TjJVLv','prototype','302290kxkxDr','8ffAAwL','global','5BvUThR','currentApp','keys','named','hasOwnProperty','567080SCoVXF','defaultApp','call','appCode','\x20(global)','trim','projectConfig','isCurrent','5658930oiYEKn','object','1063098iWoccX','appcode','inherit','name','11ALiSSW','both','apps','3radPjZ','2867463SObuBV','684252KNtMvi','project','globalConfig'];a23_0x2862=function(){return _0x31c3c5;};return a23_0x2862();}export function readConfig(_0x44d9c6={}){return readConfigFile(getConfigPath(_0x44d9c6));}export function writeConfig(_0xbc974f,_0x50908c={}){writeConfigFile(getConfigPath(_0x50908c),_0xbc974f);}export function scopeLabel(_0x214162){const _0x1ec31d=a23_0x4604;return _0x214162['global']?_0x1ec31d(0x1f1):'';}
1
+ (function(_0x1fc922,_0x31cc66){const _0x103627=a23_0x31c0,_0x8f7051=_0x1fc922();while(!![]){try{const _0x2c5841=-parseInt(_0x103627(0xa4))/0x1*(parseInt(_0x103627(0xb5))/0x2)+parseInt(_0x103627(0xa5))/0x3*(parseInt(_0x103627(0xc3))/0x4)+-parseInt(_0x103627(0xc5))/0x5*(parseInt(_0x103627(0xae))/0x6)+parseInt(_0x103627(0xac))/0x7*(parseInt(_0x103627(0xc4))/0x8)+parseInt(_0x103627(0xa9))/0x9+parseInt(_0x103627(0xb3))/0xa*(parseInt(_0x103627(0xa8))/0xb)+parseInt(_0x103627(0xad))/0xc;if(_0x2c5841===_0x31cc66)break;else _0x8f7051['push'](_0x8f7051['shift']());}catch(_0x32f44c){_0x8f7051['push'](_0x8f7051['shift']());}}}(a23_0x237a,0x8b8ee));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x24f0d1,_0x54d6fb){const _0x5b0a37=a23_0x31c0;if(!_0x54d6fb)return;const _0xb58f8e=_0x54d6fb[_0x5b0a37(0xaf)]&&typeof _0x54d6fb[_0x5b0a37(0xaf)]===_0x5b0a37(0xa7)?_0x54d6fb[_0x5b0a37(0xaf)]:{},_0x156d87=Object[_0x5b0a37(0xbf)](_0xb58f8e)['length']>0x0;for(const _0x562a15 of _0x24f0d1){_0x562a15[_0x5b0a37(0xc0)]=![];}const _0xec5b51=_0x54d6fb['appCode']!=null?String(_0x54d6fb[_0x5b0a37(0xbd)])[_0x5b0a37(0xb1)]():'';if(_0x156d87){const _0x49a5f7=_0x54d6fb[_0x5b0a37(0xab)]??_0x54d6fb[_0x5b0a37(0xb6)];if(_0x49a5f7)for(const _0x6ab1fa of _0x24f0d1){_0x6ab1fa[_0x5b0a37(0xb2)]===!![]&&_0x6ab1fa[_0x5b0a37(0xa6)]===_0x49a5f7&&(_0x6ab1fa[_0x5b0a37(0xc0)]=!![]);}for(const _0x3a48b1 of _0x24f0d1){if(_0x3a48b1[_0x5b0a37(0xb2)]!==![])continue;if(_0x54d6fb[_0x5b0a37(0xb6)])continue;_0xec5b51&&String(_0x3a48b1[_0x5b0a37(0xbb)]??'')['trim']()===_0xec5b51&&(_0x3a48b1[_0x5b0a37(0xc0)]=!![]);}return;}if(!_0xec5b51)return;for(const _0x1ac473 of _0x24f0d1){String(_0x1ac473['appcode']??'')['trim']()===_0xec5b51&&(_0x1ac473[_0x5b0a37(0xc0)]=!![]);}}export function resolveAppScopeForWrite(_0x5d52ba,_0x2a8193,_0x576693){const _0x26f025=a23_0x31c0;if(_0x2a8193)return _0x26f025(0xbc);const _0x4789cb=_0x576693[_0x26f025(0xb9)]['apps']&&typeof _0x576693[_0x26f025(0xb9)][_0x26f025(0xaf)]===_0x26f025(0xa7)?_0x576693['projectConfig'][_0x26f025(0xaf)]:{},_0x403690=_0x576693[_0x26f025(0xaa)][_0x26f025(0xaf)]&&typeof _0x576693[_0x26f025(0xaa)][_0x26f025(0xaf)]==='object'?_0x576693['globalConfig'][_0x26f025(0xaf)]:{};if(Object['prototype'][_0x26f025(0xb8)][_0x26f025(0xc2)](_0x4789cb,_0x5d52ba))return _0x26f025(0xc1);if(Object[_0x26f025(0xb0)][_0x26f025(0xb8)][_0x26f025(0xc2)](_0x403690,_0x5d52ba))return _0x26f025(0xbc);return _0x26f025(0xc1);}export function appDefinedIn(_0x1577c4,_0x97a6b5,_0x10246e,_0x47130b){const _0x18606a=a23_0x31c0;if(_0x47130b)return Object['prototype'][_0x18606a(0xb8)][_0x18606a(0xc2)](_0x10246e,_0x1577c4)?_0x18606a(0xc1):'global';const _0xfa1a0=Object[_0x18606a(0xb0)][_0x18606a(0xb8)]['call'](_0x97a6b5,_0x1577c4),_0x2fcea1=Object[_0x18606a(0xb0)][_0x18606a(0xb8)][_0x18606a(0xc2)](_0x10246e,_0x1577c4);if(_0xfa1a0&&_0x2fcea1)return _0x18606a(0xbe);if(_0x2fcea1)return _0x18606a(0xc1);return _0x18606a(0xbc);}export function resolveDefaultAppSource(_0xacfa9b){const _0x41d110=a23_0x31c0,_0x1e466f=_0xacfa9b['projectConfig'][_0x41d110(0xaf)]&&typeof _0xacfa9b[_0x41d110(0xb9)][_0x41d110(0xaf)]===_0x41d110(0xa7)?_0xacfa9b[_0x41d110(0xb9)]['apps']:{};if('defaultApp'in _0xacfa9b['projectConfig'])return _0x41d110(0xc1);if(Object[_0x41d110(0xbf)](_0x1e466f)[_0x41d110(0xb7)]>0x0)return _0x41d110(0xc1);if(_0xacfa9b['projectConfig'][_0x41d110(0xba)]===![])return null;if(_0xacfa9b['globalConfig'][_0x41d110(0xb6)])return'global';return null;}function a23_0x237a(){const _0x5e0348=['both','keys','isCurrent','project','call','4388ozvKZf','5832dfFlRf','255sGCpaA','5581jNGdHo','1032MJnVWY','name','object','112651ijAtFG','3641859bqHGig','globalConfig','currentApp','2765orONuR','3198492fDVJan','110724izvMLo','apps','prototype','trim','named','510vNcZBj','\x20(global)','124eXYjtt','defaultApp','length','hasOwnProperty','projectConfig','inherit','appcode','global','appCode'];a23_0x237a=function(){return _0x5e0348;};return a23_0x237a();}export function getConfigPath(_0x46dd89={}){const _0xee741c=a23_0x31c0,_0x5bd622=_0x46dd89[_0xee741c(0xbc)]?'global':'project';return resolveWriteConfigPath(_0x5bd622);}function a23_0x31c0(_0xdc2716,_0x15b4ad){_0xdc2716=_0xdc2716-0xa4;const _0x237a36=a23_0x237a();let _0x31c0ab=_0x237a36[_0xdc2716];return _0x31c0ab;}export function readConfig(_0x41c36d={}){return readConfigFile(getConfigPath(_0x41c36d));}export function writeConfig(_0x25226e,_0x536151={}){writeConfigFile(getConfigPath(_0x536151),_0x25226e);}export function scopeLabel(_0x881e90){const _0xcf2550=a23_0x31c0;return _0x881e90[_0xcf2550(0xbc)]?_0xcf2550(0xb4):'';}
@@ -1 +1 @@
1
- const a24_0x3b7e48=a24_0x2812;(function(_0x3b622b,_0x1f641e){const _0x500c6f=a24_0x2812,_0x4e20fc=_0x3b622b();while(!![]){try{const _0x5c038c=-parseInt(_0x500c6f(0x1bf))/0x1*(parseInt(_0x500c6f(0x1d1))/0x2)+parseInt(_0x500c6f(0x1d3))/0x3+parseInt(_0x500c6f(0x1d7))/0x4+parseInt(_0x500c6f(0x1ce))/0x5*(-parseInt(_0x500c6f(0x1c1))/0x6)+parseInt(_0x500c6f(0x1c7))/0x7+parseInt(_0x500c6f(0x1cc))/0x8*(-parseInt(_0x500c6f(0x1d0))/0x9)+parseInt(_0x500c6f(0x1cf))/0xa;if(_0x5c038c===_0x1f641e)break;else _0x4e20fc['push'](_0x4e20fc['shift']());}catch(_0x52910e){_0x4e20fc['push'](_0x4e20fc['shift']());}}}(a24_0x5175,0x42b6b));function a24_0x2812(_0x5c9126,_0x396a4e){_0x5c9126=_0x5c9126-0x1bf;const _0x51758e=a24_0x5175();let _0x281203=_0x51758e[_0x5c9126];return _0x281203;}import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0x5175(){const _0xb776e2=['number','POST','Delete\x20one\x20runtime\x20app-config\x20key','apiError','appCode','2631986XfmhRt','/smartapi/app-config/delete','high-risk-write',',\x20appCode=','app-config','8ccdIOQ','isFinite','32445admnuM','5031110whTTrY','3985749YokEIf','54CieVxo','appCode:\x20','980814xROoJx','App\x20config\x20server\x20id\x20missing\x20for\x20key=','App\x20config\x20key\x20not\x20found:\x20','delete','269844AIrGwx','4061qUREsA','Deleted\x20app\x20config\x20','414RLZnoH'];a24_0x5175=function(){return _0xb776e2;};return a24_0x5175();}import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x3b7e48(0x1c8);export const appConfigDelete={'service':a24_0x3b7e48(0x1cb),'command':a24_0x3b7e48(0x1d6),'description':a24_0x3b7e48(0x1c4),'risk':a24_0x3b7e48(0x1c9),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49712e){readKeyArg(_0x49712e);},async 'dryRun'(_0x1c2088){const _0x9cf95=a24_0x3b7e48,_0x24cc23=readKeyArg(_0x1c2088),_0x3c38a0=await mustGetByKey(_0x1c2088[_0x9cf95(0x1c6)],_0x24cc23);return asAppConfigDryRunResult(buildMutationData({'operation':_0x9cf95(0x1d6),'appCode':_0x1c2088['appCode'],'key':_0x24cc23,'before':projectAppConfig(_0x3c38a0),'after':null,'dryRun':!![]}),{'method':_0x9cf95(0x1c3),'url':DELETE_PATH});},async 'execute'(_0x512e67){const _0x1cfdf5=a24_0x3b7e48,_0x58097f=readKeyArg(_0x512e67),_0x60698b=await mustGetByKey(_0x512e67['appCode'],_0x58097f);return await withAppConfigApiBoundary(_0x1cfdf5(0x1d6),{'appCode':_0x512e67[_0x1cfdf5(0x1c6)],'key':_0x58097f},()=>deleteAppConfig({'appCode':_0x512e67['appCode'],'id':requireAppConfigId(_0x60698b,_0x58097f,_0x512e67['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0x1cfdf5(0x1d6),'appCode':_0x512e67['appCode'],'key':_0x58097f,'before':projectAppConfig(_0x60698b),'after':null,'dryRun':![]}),'message':_0x1cfdf5(0x1c0)+_0x58097f};}};async function mustGetByKey(_0x4ebd11,_0x294f70){const _0x25e8d9=a24_0x3b7e48,_0x285f02=await withAppConfigApiBoundary('get',{'appCode':_0x4ebd11,'key':_0x294f70},()=>getAppConfigByKey(_0x4ebd11,_0x294f70));if(!_0x285f02)throw CliErrors['validation'](_0x25e8d9(0x1d5)+_0x294f70,_0x25e8d9(0x1d2)+_0x4ebd11);return _0x285f02;}function requireAppConfigId(_0x4247df,_0x227568,_0x26a407){const _0x63e886=a24_0x3b7e48;if(typeof _0x4247df['id']===_0x63e886(0x1c2)&&Number[_0x63e886(0x1cd)](_0x4247df['id'])&&_0x4247df['id']>0x0)return _0x4247df['id'];throw CliErrors[_0x63e886(0x1c5)](_0x63e886(0x1d4)+_0x227568+_0x63e886(0x1ca)+_0x26a407);}
1
+ const a24_0x46e440=a24_0x1e35;(function(_0x4e89c3,_0x6290ae){const _0x5a17fb=a24_0x1e35,_0x5205c5=_0x4e89c3();while(!![]){try{const _0x9c26ff=-parseInt(_0x5a17fb(0x1b8))/0x1+-parseInt(_0x5a17fb(0x1c3))/0x2+-parseInt(_0x5a17fb(0x1c1))/0x3*(parseInt(_0x5a17fb(0x1c4))/0x4)+parseInt(_0x5a17fb(0x1c6))/0x5*(-parseInt(_0x5a17fb(0x1b6))/0x6)+parseInt(_0x5a17fb(0x1bb))/0x7+-parseInt(_0x5a17fb(0x1c5))/0x8*(parseInt(_0x5a17fb(0x1be))/0x9)+parseInt(_0x5a17fb(0x1c7))/0xa;if(_0x9c26ff===_0x6290ae)break;else _0x5205c5['push'](_0x5205c5['shift']());}catch(_0x37200d){_0x5205c5['push'](_0x5205c5['shift']());}}}(a24_0x1230,0x884b3));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a24_0x1e35(_0x2d2960,_0x346836){_0x2d2960=_0x2d2960-0x1b1;const _0x123046=a24_0x1230();let _0x1e356f=_0x123046[_0x2d2960];return _0x1e356f;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x46e440(0x1b2);function a24_0x1230(){const _0x4e5ced=['App\x20config\x20server\x20id\x20missing\x20for\x20key=','Deleted\x20app\x20config\x20','47616TWOnnh',',\x20appCode=','987125wsaSML','appCode:\x20','Delete\x20one\x20runtime\x20app-config\x20key','1929683CeHeKE','validation','get','9qMKiNu','apiError','isFinite','2650227KmKCpd','POST','1973052qHElYK','4wnhhkI','1648168nKNTZp','380QDFQvD','39488070yqRUZL','appCode','/smartapi/app-config/delete','delete'];a24_0x1230=function(){return _0x4e5ced;};return a24_0x1230();}export const appConfigDelete={'service':'app-config','command':a24_0x46e440(0x1b3),'description':a24_0x46e440(0x1ba),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5b035b){readKeyArg(_0x5b035b);},async 'dryRun'(_0x12422b){const _0x1a4eb7=a24_0x46e440,_0x4f5fc1=readKeyArg(_0x12422b),_0x1afc7b=await mustGetByKey(_0x12422b[_0x1a4eb7(0x1b1)],_0x4f5fc1);return asAppConfigDryRunResult(buildMutationData({'operation':'delete','appCode':_0x12422b[_0x1a4eb7(0x1b1)],'key':_0x4f5fc1,'before':projectAppConfig(_0x1afc7b),'after':null,'dryRun':!![]}),{'method':_0x1a4eb7(0x1c2),'url':DELETE_PATH});},async 'execute'(_0x499a78){const _0x1b5f7f=a24_0x46e440,_0x2e66f0=readKeyArg(_0x499a78),_0x38cac4=await mustGetByKey(_0x499a78[_0x1b5f7f(0x1b1)],_0x2e66f0);return await withAppConfigApiBoundary(_0x1b5f7f(0x1b3),{'appCode':_0x499a78['appCode'],'key':_0x2e66f0},()=>deleteAppConfig({'appCode':_0x499a78[_0x1b5f7f(0x1b1)],'id':requireAppConfigId(_0x38cac4,_0x2e66f0,_0x499a78[_0x1b5f7f(0x1b1)])})),{'ok':!![],'data':buildMutationData({'operation':_0x1b5f7f(0x1b3),'appCode':_0x499a78[_0x1b5f7f(0x1b1)],'key':_0x2e66f0,'before':projectAppConfig(_0x38cac4),'after':null,'dryRun':![]}),'message':_0x1b5f7f(0x1b5)+_0x2e66f0};}};async function mustGetByKey(_0x27859f,_0x4bf990){const _0x5e97b4=a24_0x46e440,_0x452f27=await withAppConfigApiBoundary(_0x5e97b4(0x1bd),{'appCode':_0x27859f,'key':_0x4bf990},()=>getAppConfigByKey(_0x27859f,_0x4bf990));if(!_0x452f27)throw CliErrors[_0x5e97b4(0x1bc)]('App\x20config\x20key\x20not\x20found:\x20'+_0x4bf990,_0x5e97b4(0x1b9)+_0x27859f);return _0x452f27;}function requireAppConfigId(_0x336234,_0x5421cd,_0xb0e4be){const _0x32fc04=a24_0x46e440;if(typeof _0x336234['id']==='number'&&Number[_0x32fc04(0x1c0)](_0x336234['id'])&&_0x336234['id']>0x0)return _0x336234['id'];throw CliErrors[_0x32fc04(0x1bf)](_0x32fc04(0x1b4)+_0x5421cd+_0x32fc04(0x1b7)+_0xb0e4be);}
@@ -1 +1 @@
1
- const a25_0x4fd531=a25_0x5e80;(function(_0x548ea4,_0x43a611){const _0x5ae670=a25_0x5e80,_0x5bb4a7=_0x548ea4();while(!![]){try{const _0x378c47=parseInt(_0x5ae670(0x1f3))/0x1*(parseInt(_0x5ae670(0x1ef))/0x2)+parseInt(_0x5ae670(0x1eb))/0x3+parseInt(_0x5ae670(0x1f6))/0x4*(-parseInt(_0x5ae670(0x1ee))/0x5)+-parseInt(_0x5ae670(0x1fc))/0x6*(-parseInt(_0x5ae670(0x1fd))/0x7)+-parseInt(_0x5ae670(0x1ed))/0x8*(parseInt(_0x5ae670(0x1f7))/0x9)+parseInt(_0x5ae670(0x1f9))/0xa+-parseInt(_0x5ae670(0x1f1))/0xb;if(_0x378c47===_0x43a611)break;else _0x5bb4a7['push'](_0x5bb4a7['shift']());}catch(_0x277075){_0x5bb4a7['push'](_0x5bb4a7['shift']());}}}(a25_0x3262,0x55aa2));function a25_0x3262(){const _0x275b82=['App\x20config\x20key\x20not\x20found:\x20','4QdEMar','444762IDptXY','validation','6441000dRtykO','bool','app-config','162bojVCa','61299oHtkaR','Loaded\x20app\x20config\x20','\x20with\x20value\x20revealed','2099676QgcPvf','read','88WAAXHO','77845xBFxtM','689646LMcuMa','appCode','11167255dKiQIR','reveal','1mVfene','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used'];a25_0x3262=function(){return _0x275b82;};return a25_0x3262();}function a25_0x5e80(_0xe7d4a9,_0x3b741c){_0xe7d4a9=_0xe7d4a9-0x1ea;const _0x326271=a25_0x3262();let _0x5e80b7=_0x326271[_0xe7d4a9];return _0x5e80b7;}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x4fd531(0x1fb),'command':'get','description':a25_0x4fd531(0x1f4),'risk':a25_0x4fd531(0x1ec),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x4144cc){readKeyArg(_0x4144cc);},async 'execute'(_0x21e43c){const _0x222ff7=a25_0x4fd531,_0x5981df=readKeyArg(_0x21e43c),_0x279c0e=await withAppConfigApiBoundary('get',{'appCode':_0x21e43c['appCode'],'key':_0x5981df},()=>getAppConfigByKey(_0x21e43c[_0x222ff7(0x1f0)],_0x5981df));if(!_0x279c0e)throw CliErrors[_0x222ff7(0x1f8)](_0x222ff7(0x1f5)+_0x5981df,'appCode:\x20'+_0x21e43c[_0x222ff7(0x1f0)]);const _0x3582b3=projectAppConfig(_0x279c0e,{'reveal':_0x21e43c[_0x222ff7(0x1fa)](_0x222ff7(0x1f2))});return{'ok':!![],'data':{'config':_0x3582b3},'message':_0x21e43c[_0x222ff7(0x1fa)](_0x222ff7(0x1f2))?_0x222ff7(0x1fe)+_0x5981df+_0x222ff7(0x1ea):_0x222ff7(0x1fe)+_0x5981df+'\x20with\x20value\x20redacted'};}};
1
+ const a25_0x3a7893=a25_0x3f12;function a25_0x3f12(_0x5d38c9,_0x251553){_0x5d38c9=_0x5d38c9-0x1eb;const _0x3bd7fa=a25_0x3bd7();let _0x3f1240=_0x3bd7fa[_0x5d38c9];return _0x3f1240;}function a25_0x3bd7(){const _0x3492b5=['get','854978RMxJzQ','3387385eiRmBC','18593560CLrWpS','44250IgZBxE','app-config','742oswdgt','1237504pDqFYV','bool','appCode','Loaded\x20app\x20config\x20','36Fzjxqh','\x20with\x20value\x20redacted','read','3707300Lwekbm','reveal','validation','App\x20config\x20key\x20not\x20found:\x20','726542BUtBMX','3ESXgbn'];a25_0x3bd7=function(){return _0x3492b5;};return a25_0x3bd7();}(function(_0x49d5cd,_0x380b98){const _0x3a5bb1=a25_0x3f12,_0x31c626=_0x49d5cd();while(!![]){try{const _0x39cbd4=-parseInt(_0x3a5bb1(0x1f0))/0x1+parseInt(_0x3a5bb1(0x1f3))/0x2*(-parseInt(_0x3a5bb1(0x1f1))/0x3)+-parseInt(_0x3a5bb1(0x1ec))/0x4+-parseInt(_0x3a5bb1(0x1f4))/0x5+parseInt(_0x3a5bb1(0x1f6))/0x6*(parseInt(_0x3a5bb1(0x1f8))/0x7)+-parseInt(_0x3a5bb1(0x1f9))/0x8*(-parseInt(_0x3a5bb1(0x1fd))/0x9)+parseInt(_0x3a5bb1(0x1f5))/0xa;if(_0x39cbd4===_0x380b98)break;else _0x31c626['push'](_0x31c626['shift']());}catch(_0xd7a258){_0x31c626['push'](_0x31c626['shift']());}}}(a25_0x3bd7,0x7a715));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x3a7893(0x1f7),'command':a25_0x3a7893(0x1f2),'description':'Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','risk':a25_0x3a7893(0x1eb),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0xaf55f1){readKeyArg(_0xaf55f1);},async 'execute'(_0x10c526){const _0x3d7b90=a25_0x3a7893,_0x25de1c=readKeyArg(_0x10c526),_0x3c3356=await withAppConfigApiBoundary(_0x3d7b90(0x1f2),{'appCode':_0x10c526[_0x3d7b90(0x1fb)],'key':_0x25de1c},()=>getAppConfigByKey(_0x10c526[_0x3d7b90(0x1fb)],_0x25de1c));if(!_0x3c3356)throw CliErrors[_0x3d7b90(0x1ee)](_0x3d7b90(0x1ef)+_0x25de1c,'appCode:\x20'+_0x10c526[_0x3d7b90(0x1fb)]);const _0x1c52ca=projectAppConfig(_0x3c3356,{'reveal':_0x10c526[_0x3d7b90(0x1fa)](_0x3d7b90(0x1ed))});return{'ok':!![],'data':{'config':_0x1c52ca},'message':_0x10c526[_0x3d7b90(0x1fa)]('reveal')?_0x3d7b90(0x1fc)+_0x25de1c+'\x20with\x20value\x20revealed':_0x3d7b90(0x1fc)+_0x25de1c+_0x3d7b90(0x1fe)};}};
@@ -1 +1 @@
1
- (function(_0x3f2f2e,_0x5718c0){const _0x4918c7=a26_0x4121,_0x4078ed=_0x3f2f2e();while(!![]){try{const _0x196692=parseInt(_0x4918c7(0xa1))/0x1+-parseInt(_0x4918c7(0xa6))/0x2*(-parseInt(_0x4918c7(0xab))/0x3)+parseInt(_0x4918c7(0xa8))/0x4*(-parseInt(_0x4918c7(0xa4))/0x5)+-parseInt(_0x4918c7(0xa2))/0x6*(parseInt(_0x4918c7(0xa5))/0x7)+-parseInt(_0x4918c7(0xa3))/0x8*(-parseInt(_0x4918c7(0xa0))/0x9)+parseInt(_0x4918c7(0xa9))/0xa*(-parseInt(_0x4918c7(0xa7))/0xb)+parseInt(_0x4918c7(0xac))/0xc*(parseInt(_0x4918c7(0xaa))/0xd);if(_0x196692===_0x5718c0)break;else _0x4078ed['push'](_0x4078ed['shift']());}catch(_0x330cfd){_0x4078ed['push'](_0x4078ed['shift']());}}}(a26_0x563e,0xedd90));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';function a26_0x563e(){const _0x2f0c50=['80395jtGZQw','2YsnDuG','11QCmnKf','12XJdqUJ','5514690idYoVc','792805Dlmseo','1435683cJPKJM','300LXOYrP','27603ZnArAL','625040sArkit','834rklDvT','4904HfYWwX','2310315irhpuh'];a26_0x563e=function(){return _0x2f0c50;};return a26_0x563e();}import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';function a26_0x4121(_0x575efe,_0x32f7cc){_0x575efe=_0x575efe-0xa0;const _0x563e15=a26_0x563e();let _0x412144=_0x563e15[_0x575efe];return _0x412144;}export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
1
+ function a26_0x103a(){const _0x2b4452=['56vvoHQQ','1393030RNxNEK','1196412BPJspc','24mbaVLG','377279HWsaOV','152730veMEGw','1526175apyYjx','1KushYn','165915rukkEz','877164KzGRuL'];a26_0x103a=function(){return _0x2b4452;};return a26_0x103a();}function a26_0x5630(_0xaf305c,_0x215fc7){_0xaf305c=_0xaf305c-0x1af;const _0x103aa2=a26_0x103a();let _0x5630ef=_0x103aa2[_0xaf305c];return _0x5630ef;}(function(_0x1b5dd3,_0x54d036){const _0x53880b=a26_0x5630,_0x42c0fc=_0x1b5dd3();while(!![]){try{const _0x1f646e=-parseInt(_0x53880b(0x1b5))/0x1*(parseInt(_0x53880b(0x1b7))/0x2)+parseInt(_0x53880b(0x1b6))/0x3*(parseInt(_0x53880b(0x1b1))/0x4)+parseInt(_0x53880b(0x1b4))/0x5+-parseInt(_0x53880b(0x1b0))/0x6+parseInt(_0x53880b(0x1b2))/0x7*(parseInt(_0x53880b(0x1b8))/0x8)+parseInt(_0x53880b(0x1b3))/0x9+-parseInt(_0x53880b(0x1af))/0xa;if(_0x1f646e===_0x54d036)break;else _0x42c0fc['push'](_0x42c0fc['shift']());}catch(_0x56567b){_0x42c0fc['push'](_0x42c0fc['shift']());}}}(a26_0x103a,0x3e04b));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
@@ -1 +1 @@
1
- const a27_0x45cde5=a27_0x5091;function a27_0x5091(_0x3ae05b,_0x44a762){_0x3ae05b=_0x3ae05b-0x1b2;const _0x37f108=a27_0x37f1();let _0x5091ee=_0x37f108[_0x3ae05b];return _0x5091ee;}(function(_0x33aa96,_0x10e112){const _0x2a6ee7=a27_0x5091,_0x3c77cd=_0x33aa96();while(!![]){try{const _0x4cbf56=parseInt(_0x2a6ee7(0x1b4))/0x1*(parseInt(_0x2a6ee7(0x1bc))/0x2)+parseInt(_0x2a6ee7(0x1bb))/0x3+parseInt(_0x2a6ee7(0x1c0))/0x4*(parseInt(_0x2a6ee7(0x1ba))/0x5)+-parseInt(_0x2a6ee7(0x1c7))/0x6*(-parseInt(_0x2a6ee7(0x1c9))/0x7)+-parseInt(_0x2a6ee7(0x1b3))/0x8*(-parseInt(_0x2a6ee7(0x1c8))/0x9)+parseInt(_0x2a6ee7(0x1ca))/0xa+parseInt(_0x2a6ee7(0x1b8))/0xb*(-parseInt(_0x2a6ee7(0x1c3))/0xc);if(_0x4cbf56===_0x10e112)break;else _0x3c77cd['push'](_0x3c77cd['shift']());}catch(_0x4cad91){_0x3c77cd['push'](_0x3c77cd['shift']());}}}(a27_0x37f1,0xc291c));function a27_0x37f1(){const _0x16e084=['string','str','Filter\x20by\x20exact\x20config\x20key','22llEasP','list','310rVwPPD','4773336jAUthU','2UcUhVB','key','read','appCode','76404EqxXvI','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','Found\x20','30857016OujYzr','app-config','map','length','6dKjvPL','5409qdeJmn','9745295IaeEdg','5972870onCoXC','\x20app\x20config(s)','856PxCJxT','1110639gHVmMY'];a27_0x37f1=function(){return _0x16e084;};return a27_0x37f1();}import{listAppConfigs}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x45cde5(0x1c4),'command':a27_0x45cde5(0x1b9),'description':a27_0x45cde5(0x1c1),'risk':a27_0x45cde5(0x1be),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x45cde5(0x1bd),'type':a27_0x45cde5(0x1b5),'description':a27_0x45cde5(0x1b7)},TAGS_FLAG],async 'validate'(_0x3f8cf2){const _0x40a241=a27_0x45cde5,_0x3d0747=_0x3f8cf2[_0x40a241(0x1b6)]('key')['trim']();if(_0x3d0747)validateKey(_0x3d0747);readOptionalTags(_0x3f8cf2);},async 'execute'(_0x5cf8bc){const _0x1106b3=a27_0x45cde5,_0x5b36e0=_0x5cf8bc[_0x1106b3(0x1b6)](_0x1106b3(0x1bd))['trim']()||undefined,_0x174c34=readOptionalTags(_0x5cf8bc),_0x3f6c4d=await withAppConfigApiBoundary(_0x1106b3(0x1b9),{'appCode':_0x5cf8bc[_0x1106b3(0x1bf)]},()=>listAppConfigs(_0x5cf8bc[_0x1106b3(0x1bf)],{'key':_0x5b36e0,'tags':_0x174c34})),_0xb87e6d=_0x3f6c4d[_0x1106b3(0x1c5)](_0x36434e=>projectAppConfig(_0x36434e));return{'ok':!![],'data':{'appCode':_0x5cf8bc[_0x1106b3(0x1bf)],'count':_0xb87e6d[_0x1106b3(0x1c6)],'configs':_0xb87e6d},'message':_0x1106b3(0x1c2)+_0xb87e6d[_0x1106b3(0x1c6)]+_0x1106b3(0x1b2)};}};
1
+ const a27_0x69b5c=a27_0x2ae0;(function(_0x44d5e4,_0x4c6f57){const _0x94cfc5=a27_0x2ae0,_0x41cb2d=_0x44d5e4();while(!![]){try{const _0x3d36c8=parseInt(_0x94cfc5(0x18a))/0x1*(-parseInt(_0x94cfc5(0x17c))/0x2)+-parseInt(_0x94cfc5(0x181))/0x3+parseInt(_0x94cfc5(0x187))/0x4*(parseInt(_0x94cfc5(0x186))/0x5)+parseInt(_0x94cfc5(0x189))/0x6+parseInt(_0x94cfc5(0x175))/0x7*(parseInt(_0x94cfc5(0x17d))/0x8)+parseInt(_0x94cfc5(0x180))/0x9*(parseInt(_0x94cfc5(0x182))/0xa)+-parseInt(_0x94cfc5(0x17a))/0xb;if(_0x3d36c8===_0x4c6f57)break;else _0x41cb2d['push'](_0x41cb2d['shift']());}catch(_0x2e43b2){_0x41cb2d['push'](_0x41cb2d['shift']());}}}(a27_0x3de3,0xb8dcc));import{listAppConfigs}from'../../core/api-client.js';function a27_0x3de3(){const _0x5ed134=['length','8001983UGfxoy','read','6ogaVZW','49576CmAYAc','key','map','431127FFTRfz','1727838kOQrJI','140JIjZET','Filter\x20by\x20exact\x20config\x20key','app-config','trim','25JyoVsR','769372pQbqhS','list','2189856NyzQvN','460213FjJNON','string','1631zINkXf','str','Found\x20','appCode'];a27_0x3de3=function(){return _0x5ed134;};return a27_0x3de3();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x2ae0(_0x167691,_0x32f04f){_0x167691=_0x167691-0x174;const _0x3de393=a27_0x3de3();let _0x2ae05b=_0x3de393[_0x167691];return _0x2ae05b;}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x69b5c(0x184),'command':a27_0x69b5c(0x188),'description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0x69b5c(0x17b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'key','type':a27_0x69b5c(0x174),'description':a27_0x69b5c(0x183)},TAGS_FLAG],async 'validate'(_0x5f72d2){const _0x332cb1=a27_0x69b5c,_0x16bc25=_0x5f72d2[_0x332cb1(0x176)](_0x332cb1(0x17e))[_0x332cb1(0x185)]();if(_0x16bc25)validateKey(_0x16bc25);readOptionalTags(_0x5f72d2);},async 'execute'(_0x5b2360){const _0x5662ef=a27_0x69b5c,_0x2a4d82=_0x5b2360[_0x5662ef(0x176)](_0x5662ef(0x17e))[_0x5662ef(0x185)]()||undefined,_0x296743=readOptionalTags(_0x5b2360),_0x25b094=await withAppConfigApiBoundary('list',{'appCode':_0x5b2360[_0x5662ef(0x178)]},()=>listAppConfigs(_0x5b2360[_0x5662ef(0x178)],{'key':_0x2a4d82,'tags':_0x296743})),_0x177131=_0x25b094[_0x5662ef(0x17f)](_0x39e5c8=>projectAppConfig(_0x39e5c8));return{'ok':!![],'data':{'appCode':_0x5b2360[_0x5662ef(0x178)],'count':_0x177131[_0x5662ef(0x179)],'configs':_0x177131},'message':_0x5662ef(0x177)+_0x177131[_0x5662ef(0x179)]+'\x20app\x20config(s)'};}};
@@ -1 +1 @@
1
- const a28_0x92f7a9=a28_0x5687;(function(_0x2cad4f,_0x4f7cb5){const _0x503cfd=a28_0x5687,_0xa467c6=_0x2cad4f();while(!![]){try{const _0x3b1310=parseInt(_0x503cfd(0x1d6))/0x1+parseInt(_0x503cfd(0x1c9))/0x2*(-parseInt(_0x503cfd(0x1c3))/0x3)+parseInt(_0x503cfd(0x1cb))/0x4+-parseInt(_0x503cfd(0x1ca))/0x5+parseInt(_0x503cfd(0x1d2))/0x6+-parseInt(_0x503cfd(0x1d5))/0x7+-parseInt(_0x503cfd(0x1c6))/0x8;if(_0x3b1310===_0x4f7cb5)break;else _0xa467c6['push'](_0xa467c6['shift']());}catch(_0x483d07){_0xa467c6['push'](_0xa467c6['shift']());}}}(a28_0x5771,0x7fa6f));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH=a28_0x92f7a9(0x1d7),UPDATE_PATH='/smartapi/app-config/update';function a28_0x5687(_0x5e1b0c,_0x2f1a66){_0x5e1b0c=_0x5e1b0c-0x1c3;const _0x5771c5=a28_0x5771();let _0x56874b=_0x5771c5[_0x5e1b0c];return _0x56874b;}export const appConfigSet={'service':'app-config','command':'set','description':'Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','risk':a28_0x92f7a9(0x1cd),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x92f7a9(0x1ce),'description':a28_0x92f7a9(0x1cf)}],async 'validate'(_0x5b0104){readKeyArg(_0x5b0104),readOptionalTags(_0x5b0104),assertSingleValueSource(_0x5b0104);},async 'dryRun'(_0x342e5b){const _0x10ce36=a28_0x92f7a9,_0x138325=readKeyArg(_0x342e5b),_0x13ba09=readOptionalTags(_0x342e5b),_0x245fa8=assertSingleValueSource(_0x342e5b);await assertValueSourceReadable(_0x245fa8);const _0x157148=await withAppConfigApiBoundary(_0x10ce36(0x1c8),{'appCode':_0x342e5b[_0x10ce36(0x1d0)],'key':_0x138325},()=>getAppConfigByKey(_0x342e5b['appCode'],_0x138325)),_0x474198=_0x157148?_0x10ce36(0x1d3):'create',_0x20e7bf=_0x157148?projectAppConfig(_0x157148):null,_0x3bbf89=plannedAppConfig({'appCode':_0x342e5b[_0x10ce36(0x1d0)],'key':_0x138325,'tags':_0x13ba09??_0x157148?.['tags'],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x474198,'appCode':_0x342e5b[_0x10ce36(0x1d0)],'key':_0x138325,'before':_0x20e7bf,'after':_0x3bbf89,'dryRun':!![]}),{'method':'POST','url':_0x474198===_0x10ce36(0x1d3)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x18c970){const _0x328d85=a28_0x92f7a9,_0x225279=readKeyArg(_0x18c970),_0x53e420=readOptionalTags(_0x18c970),_0x28d4a6=await withAppConfigApiBoundary(_0x328d85(0x1c8),{'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279},()=>getAppConfigByKey(_0x18c970[_0x328d85(0x1d0)],_0x225279)),_0x534c11=_0x28d4a6?projectAppConfig(_0x28d4a6):null,_0x1a4d1c=_0x28d4a6?'update':_0x328d85(0x1c5),{value:_0x16defd,warnings:_0x403d88}=await readAppConfigValue(_0x18c970),_0x2aa3db={'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279,'value':_0x16defd,'tags':_0x53e420??_0x28d4a6?.[_0x328d85(0x1d1)]??undefined};await withAppConfigApiBoundary(_0x1a4d1c,{'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279},async()=>{const _0xb41605=_0x328d85;_0x28d4a6?await updateAppConfig({..._0x2aa3db,'id':requireAppConfigId(_0x28d4a6,_0x225279,_0x18c970[_0xb41605(0x1d0)])}):await createAppConfig(_0x2aa3db);});const _0x1604c4=await withAppConfigApiBoundary(_0x328d85(0x1c8),{'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279},()=>getAppConfigByKey(_0x18c970[_0x328d85(0x1d0)],_0x225279)),_0x2bbbcd=_0x1604c4?projectAppConfig(_0x1604c4):plannedAppConfig({'appCode':_0x18c970[_0x328d85(0x1d0)],'key':_0x225279,'tags':_0x2aa3db[_0x328d85(0x1d1)],'hasValue':_0x16defd!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x1a4d1c,'appCode':_0x18c970['appCode'],'key':_0x225279,'before':_0x534c11,'after':_0x2bbbcd,'dryRun':![],'warnings':_0x403d88}),'message':(_0x1a4d1c===_0x328d85(0x1d3)?_0x328d85(0x1c4):'Created')+'\x20app\x20config\x20'+_0x225279};}};function requireAppConfigId(_0x445289,_0x242b24,_0x491c31){const _0x2691f0=a28_0x92f7a9;if(typeof _0x445289['id']===_0x2691f0(0x1cc)&&Number['isFinite'](_0x445289['id'])&&_0x445289['id']>0x0)return _0x445289['id'];throw CliErrors['apiError'](_0x2691f0(0x1d4)+_0x242b24+_0x2691f0(0x1c7)+_0x491c31);}function a28_0x5771(){const _0x1f4ec1=['appCode','tags','3464304AiSGij','update','App\x20config\x20server\x20id\x20missing\x20for\x20key=','3303083pVpVtU','827958tleKOO','/smartapi/app-config/create','3Qzugdd','Updated','create','3731952FzqbLi',',\x20appCode=','get','1208362uLINCg','588405cfGWVy','3110984nZeQps','number','high-risk-write','string','Read\x20config\x20value\x20from\x20file'];a28_0x5771=function(){return _0x1f4ec1;};return a28_0x5771();}
1
+ const a28_0x4bbdad=a28_0x5d32;(function(_0x37407e,_0x21a5fa){const _0x28fdc3=a28_0x5d32,_0x18f72a=_0x37407e();while(!![]){try{const _0x47219b=-parseInt(_0x28fdc3(0x1bb))/0x1+-parseInt(_0x28fdc3(0x1c2))/0x2*(parseInt(_0x28fdc3(0x1bd))/0x3)+-parseInt(_0x28fdc3(0x1c5))/0x4+parseInt(_0x28fdc3(0x1c7))/0x5*(parseInt(_0x28fdc3(0x1b1))/0x6)+parseInt(_0x28fdc3(0x1b0))/0x7+parseInt(_0x28fdc3(0x1ad))/0x8*(parseInt(_0x28fdc3(0x1a9))/0x9)+parseInt(_0x28fdc3(0x1ac))/0xa*(parseInt(_0x28fdc3(0x1c1))/0xb);if(_0x47219b===_0x21a5fa)break;else _0x18f72a['push'](_0x18f72a['shift']());}catch(_0x39ad2c){_0x18f72a['push'](_0x18f72a['shift']());}}}(a28_0x4463,0x4fce2));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a28_0x4463(){const _0x159698=['number','21909SZrSau','set','tags','Read\x20config\x20value\x20from\x20file','14933677oMTtYa','8EOylKB','string','isFinite','2354520CnYtVx','Created','665ZEYXTs','650592ZhbgDP',',\x20appCode=','create','10nAXpyf','8LpWLCQ','update','App\x20config\x20server\x20id\x20missing\x20for\x20key=','108381yprHxv','4578FjaGWI','get','\x20app\x20config\x20','appCode','apiError','high-risk-write','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','/smartapi/app-config/create','POST','app-config','602133NsbIpB'];a28_0x4463=function(){return _0x159698;};return a28_0x4463();}const CREATE_PATH=a28_0x4bbdad(0x1b8),UPDATE_PATH='/smartapi/app-config/update';function a28_0x5d32(_0x44a1d2,_0x18224c){_0x44a1d2=_0x44a1d2-0x1a9;const _0x44633c=a28_0x4463();let _0x5d325a=_0x44633c[_0x44a1d2];return _0x5d325a;}export const appConfigSet={'service':a28_0x4bbdad(0x1ba),'command':a28_0x4bbdad(0x1be),'description':a28_0x4bbdad(0x1b7),'risk':a28_0x4bbdad(0x1b6),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x4bbdad(0x1c3),'description':a28_0x4bbdad(0x1c0)}],async 'validate'(_0x39d9fe){readKeyArg(_0x39d9fe),readOptionalTags(_0x39d9fe),assertSingleValueSource(_0x39d9fe);},async 'dryRun'(_0x5c215b){const _0x9bb3fa=a28_0x4bbdad,_0x10d7e5=readKeyArg(_0x5c215b),_0x43f091=readOptionalTags(_0x5c215b),_0x271366=assertSingleValueSource(_0x5c215b);await assertValueSourceReadable(_0x271366);const _0x5bbc43=await withAppConfigApiBoundary('get',{'appCode':_0x5c215b[_0x9bb3fa(0x1b4)],'key':_0x10d7e5},()=>getAppConfigByKey(_0x5c215b[_0x9bb3fa(0x1b4)],_0x10d7e5)),_0x48662a=_0x5bbc43?_0x9bb3fa(0x1ae):_0x9bb3fa(0x1ab),_0x41bbc2=_0x5bbc43?projectAppConfig(_0x5bbc43):null,_0x1395f7=plannedAppConfig({'appCode':_0x5c215b[_0x9bb3fa(0x1b4)],'key':_0x10d7e5,'tags':_0x43f091??_0x5bbc43?.[_0x9bb3fa(0x1bf)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x48662a,'appCode':_0x5c215b[_0x9bb3fa(0x1b4)],'key':_0x10d7e5,'before':_0x41bbc2,'after':_0x1395f7,'dryRun':!![]}),{'method':_0x9bb3fa(0x1b9),'url':_0x48662a===_0x9bb3fa(0x1ae)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x5d20fa){const _0x764169=a28_0x4bbdad,_0x53f486=readKeyArg(_0x5d20fa),_0x4fa2f7=readOptionalTags(_0x5d20fa),_0x1373e9=await withAppConfigApiBoundary(_0x764169(0x1b2),{'appCode':_0x5d20fa['appCode'],'key':_0x53f486},()=>getAppConfigByKey(_0x5d20fa[_0x764169(0x1b4)],_0x53f486)),_0x5e0ac7=_0x1373e9?projectAppConfig(_0x1373e9):null,_0x1ef952=_0x1373e9?_0x764169(0x1ae):'create',{value:_0x290f3e,warnings:_0x82dc20}=await readAppConfigValue(_0x5d20fa),_0xd2ab39={'appCode':_0x5d20fa[_0x764169(0x1b4)],'key':_0x53f486,'value':_0x290f3e,'tags':_0x4fa2f7??_0x1373e9?.['tags']??undefined};await withAppConfigApiBoundary(_0x1ef952,{'appCode':_0x5d20fa[_0x764169(0x1b4)],'key':_0x53f486},async()=>{const _0x1f3e8f=_0x764169;_0x1373e9?await updateAppConfig({..._0xd2ab39,'id':requireAppConfigId(_0x1373e9,_0x53f486,_0x5d20fa[_0x1f3e8f(0x1b4)])}):await createAppConfig(_0xd2ab39);});const _0x52fec4=await withAppConfigApiBoundary(_0x764169(0x1b2),{'appCode':_0x5d20fa[_0x764169(0x1b4)],'key':_0x53f486},()=>getAppConfigByKey(_0x5d20fa[_0x764169(0x1b4)],_0x53f486)),_0x22cdd2=_0x52fec4?projectAppConfig(_0x52fec4):plannedAppConfig({'appCode':_0x5d20fa[_0x764169(0x1b4)],'key':_0x53f486,'tags':_0xd2ab39['tags'],'hasValue':_0x290f3e!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x1ef952,'appCode':_0x5d20fa[_0x764169(0x1b4)],'key':_0x53f486,'before':_0x5e0ac7,'after':_0x22cdd2,'dryRun':![],'warnings':_0x82dc20}),'message':(_0x1ef952===_0x764169(0x1ae)?'Updated':_0x764169(0x1c6))+_0x764169(0x1b3)+_0x53f486};}};function requireAppConfigId(_0x56ef8d,_0x240488,_0x23d497){const _0x3d3401=a28_0x4bbdad;if(typeof _0x56ef8d['id']===_0x3d3401(0x1bc)&&Number[_0x3d3401(0x1c4)](_0x56ef8d['id'])&&_0x56ef8d['id']>0x0)return _0x56ef8d['id'];throw CliErrors[_0x3d3401(0x1b5)](_0x3d3401(0x1af)+_0x240488+_0x3d3401(0x1aa)+_0x23d497);}
@@ -1 +1 @@
1
- const a29_0x25b1dd=a29_0x5575;(function(_0x370be9,_0x4c5df3){const _0x437ae6=a29_0x5575,_0x2d7486=_0x370be9();while(!![]){try{const _0x536ddb=parseInt(_0x437ae6(0x207))/0x1+-parseInt(_0x437ae6(0x1f9))/0x2*(-parseInt(_0x437ae6(0x1f7))/0x3)+parseInt(_0x437ae6(0x21c))/0x4*(-parseInt(_0x437ae6(0x1f6))/0x5)+-parseInt(_0x437ae6(0x1eb))/0x6+-parseInt(_0x437ae6(0x1fa))/0x7+parseInt(_0x437ae6(0x1ff))/0x8*(-parseInt(_0x437ae6(0x1e4))/0x9)+parseInt(_0x437ae6(0x21a))/0xa;if(_0x536ddb===_0x4c5df3)break;else _0x2d7486['push'](_0x2d7486['shift']());}catch(_0x35d230){_0x2d7486['push'](_0x2d7486['shift']());}}}(a29_0x3b80,0x47fb9));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x25b1dd(0x1fd),'description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':a29_0x25b1dd(0x200),'description':'Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','required':![]};export const TAGS_FLAG={'name':a29_0x25b1dd(0x20c),'type':a29_0x25b1dd(0x210),'description':a29_0x25b1dd(0x1ea)};export const STDIN_FLAG={'name':a29_0x25b1dd(0x21e),'type':'boolean','description':a29_0x25b1dd(0x1f3),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x25b1dd(0x202),'type':a29_0x25b1dd(0x210),'description':'Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable'};export const REVEAL_FLAG={'name':a29_0x25b1dd(0x20a),'type':a29_0x25b1dd(0x1fb),'description':a29_0x25b1dd(0x218),'default':![]};function a29_0x3b80(){const _0x5aba15=['before','\x20app\x20config.','106878SCQZJG','utf8','push','reveal','gmtCreate','tags','args','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','appCode:\x20','string','kind','warnings','apiError','value\x20is\x20redacted','error','setEncoding','appCode','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','str','12246250CLNwyd','end','4KFjIfw','Missing\x20app-config\x20key.','stdin','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','env','17811wavpYZ','after','App\x20config\x20value\x20source\x20is\x20ambiguous.','argument','defineProperties','path','Config\x20tags\x20for\x20filtering/display\x20metadata','517836xDNINq','once','Environment\x20variable\x20is\x20not\x20set:\x20','trim','slice','Failed\x20to\x20','join','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Read\x20config\x20value\x20from\x20stdin','length','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','2077025NWskmR','2772gxjwyD','validation','1046vzZvVz','3290140PWnemT','boolean','name','key','file','2216tgnnvj','value','gmtModified','from-env','key:\x20','url'];a29_0x3b80=function(){return _0x5aba15;};return a29_0x3b80();}export function readKeyArg(_0x3895f9){const _0x5a55f3=a29_0x25b1dd,_0x1135b9=_0x3895f9[_0x5a55f3(0x20d)][0x0]?.[_0x5a55f3(0x1ee)]()??'';return validateKey(_0x1135b9),_0x1135b9;}export function readOptionalTags(_0x626fa){const _0x19e4dd=a29_0x25b1dd,_0x184c18=_0x626fa[_0x19e4dd(0x219)](_0x19e4dd(0x20c))[_0x19e4dd(0x1ee)]();if(!_0x184c18)return undefined;if(_0x184c18[_0x19e4dd(0x1f4)]>0x20)throw CliErrors[_0x19e4dd(0x1f8)](_0x19e4dd(0x1f5));return _0x184c18;}export function validateKey(_0x2df612){const _0x11e040=a29_0x25b1dd;if(!_0x2df612)throw CliErrors[_0x11e040(0x1f8)](_0x11e040(0x21d));if(_0x2df612[_0x11e040(0x1f4)]>0x100)throw CliErrors[_0x11e040(0x1f8)]('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}export function projectAppConfig(_0x25c683,_0x1a0996){const _0x5bdfdb=a29_0x25b1dd,_0x8c7738=_0x25c683[_0x5bdfdb(0x200)]!==undefined&&_0x25c683['value']!==null&&_0x25c683[_0x5bdfdb(0x200)]!=='',_0x202761={'appCode':_0x25c683[_0x5bdfdb(0x217)],'key':_0x25c683[_0x5bdfdb(0x1fd)],'tags':_0x25c683[_0x5bdfdb(0x20c)]??undefined,'hasValue':_0x8c7738,'valueRedacted':_0x8c7738&&!_0x1a0996?.['reveal'],'gmtCreate':_0x25c683[_0x5bdfdb(0x20b)],'gmtModified':_0x25c683[_0x5bdfdb(0x201)]};return _0x1a0996?.[_0x5bdfdb(0x20a)]&&(_0x202761[_0x5bdfdb(0x200)]=_0x25c683['value']??'',_0x202761['valueRedacted']=![]),_0x202761;}export function plannedAppConfig(_0x468c3c){const _0xd4693f=a29_0x25b1dd,_0x5c605c=_0x468c3c['hasValue']??!![];return{'appCode':_0x468c3c[_0xd4693f(0x217)],'key':_0x468c3c[_0xd4693f(0x1fd)],'tags':_0x468c3c[_0xd4693f(0x20c)]??undefined,'hasValue':_0x5c605c,'valueRedacted':_0x5c605c};}export function buildMutationData(_0xa8e018){const _0x437ea9=a29_0x25b1dd;return{'operation':_0xa8e018['operation'],'selector':{'appCode':_0xa8e018['appCode'],'key':_0xa8e018['key']},'before':_0xa8e018[_0x437ea9(0x205)],'after':_0xa8e018[_0x437ea9(0x1e5)],'dryRun':_0xa8e018['dryRun'],'warnings':_0xa8e018[_0x437ea9(0x212)]??[]};}export async function withAppConfigApiBoundary(_0xb5c6cd,_0x424dd4,_0x3dff61){const _0x39242a=a29_0x25b1dd;try{return await _0x3dff61();}catch{const _0x3b10db=[_0x39242a(0x20f)+_0x424dd4[_0x39242a(0x217)]];if(_0x424dd4[_0x39242a(0x1fd)])_0x3b10db[_0x39242a(0x209)](_0x39242a(0x203)+_0x424dd4[_0x39242a(0x1fd)]);_0x3b10db[_0x39242a(0x209)](_0x39242a(0x214));throw CliErrors[_0x39242a(0x213)](_0x39242a(0x1f0)+_0xb5c6cd+_0x39242a(0x206),_0x3b10db['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x94d417,_0x5d72eb){const _0x5a6707=a29_0x25b1dd;return Object[_0x5a6707(0x1e8)](_0x94d417,{'method':{'value':_0x5d72eb['method'],'enumerable':![]},'url':{'value':_0x5d72eb[_0x5a6707(0x204)],'enumerable':![]}});}export function assertSingleValueSource(_0x2bc58b){const _0x4966a3=a29_0x25b1dd,_0x4469ff=[];_0x2bc58b[_0x4966a3(0x20d)]['length']>0x1&&_0x4469ff[_0x4966a3(0x209)]({'kind':_0x4966a3(0x1e7),'value':_0x2bc58b[_0x4966a3(0x20d)][_0x4966a3(0x1ef)](0x1)[_0x4966a3(0x1f1)]('\x20')});const _0x1ead86=_0x2bc58b['flag']('value');_0x1ead86!==undefined&&_0x1ead86!==null&&_0x4469ff[_0x4966a3(0x209)]({'kind':_0x4966a3(0x1e7),'value':String(_0x1ead86)});_0x2bc58b['bool'](_0x4966a3(0x21e))&&_0x4469ff[_0x4966a3(0x209)]({'kind':_0x4966a3(0x21e)});const _0xadda40=_0x2bc58b['str'](_0x4966a3(0x202))['trim']();_0xadda40&&_0x4469ff['push']({'kind':'env','name':_0xadda40});const _0x1c034b=_0x2bc58b['str']('file')[_0x4966a3(0x1ee)]();_0x1c034b&&_0x4469ff['push']({'kind':_0x4966a3(0x1fe),'path':_0x1c034b});if(_0x4469ff[_0x4966a3(0x1f4)]===0x0)throw CliErrors['validation']('Missing\x20app-config\x20value\x20source.',_0x4966a3(0x20e));if(_0x4469ff[_0x4966a3(0x1f4)]>0x1)throw CliErrors[_0x4966a3(0x1f8)](_0x4966a3(0x1e6),_0x4966a3(0x1f2));return _0x4469ff[0x0];}export async function assertValueSourceReadable(_0x1e719d){const _0x4327d5=a29_0x25b1dd;if(_0x1e719d['kind']===_0x4327d5(0x1e3)&&!(_0x1e719d[_0x4327d5(0x1fc)]in process.env))throw CliErrors[_0x4327d5(0x1f8)](_0x4327d5(0x1ed)+_0x1e719d[_0x4327d5(0x1fc)]);if(_0x1e719d['kind']===_0x4327d5(0x1fe))try{await access(_0x1e719d[_0x4327d5(0x1e9)]);}catch{throw CliErrors[_0x4327d5(0x1f8)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0x1e719d['path']);}}export async function readAppConfigValue(_0x2e3c53){const _0x5b279b=a29_0x25b1dd,_0xdf2809=assertSingleValueSource(_0x2e3c53),_0xc06fdd=[];if(_0xdf2809[_0x5b279b(0x211)]==='argument')return _0xc06fdd[_0x5b279b(0x209)](_0x5b279b(0x1e2)),{'value':_0xdf2809['value']??'','source':_0xdf2809[_0x5b279b(0x211)],'warnings':_0xc06fdd};if(_0xdf2809[_0x5b279b(0x211)]===_0x5b279b(0x21e))return{'value':await readStdin(),'source':_0xdf2809[_0x5b279b(0x211)],'warnings':_0xc06fdd};if(_0xdf2809[_0x5b279b(0x211)]===_0x5b279b(0x1e3)){if(!(_0xdf2809[_0x5b279b(0x1fc)]in process.env))throw CliErrors[_0x5b279b(0x1f8)](_0x5b279b(0x1ed)+_0xdf2809[_0x5b279b(0x1fc)]);return{'value':process.env[_0xdf2809.name]??'','source':_0xdf2809[_0x5b279b(0x211)],'warnings':_0xc06fdd};}return{'value':await readFile(_0xdf2809['path'],_0x5b279b(0x208)),'source':_0xdf2809['kind'],'warnings':_0xc06fdd};}function a29_0x5575(_0x326536,_0x3f90fb){_0x326536=_0x326536-0x1e2;const _0x3b807d=a29_0x3b80();let _0x55750e=_0x3b807d[_0x326536];return _0x55750e;}function readStdin(){return new Promise((_0x2a067e,_0x2d1f4d)=>{const _0x221fdc=a29_0x5575;let _0x52606c='';process[_0x221fdc(0x21e)][_0x221fdc(0x216)](_0x221fdc(0x208)),process[_0x221fdc(0x21e)]['on']('data',_0x3c024f=>{_0x52606c+=_0x3c024f;}),process['stdin']['once'](_0x221fdc(0x21b),()=>_0x2a067e(_0x52606c)),process['stdin'][_0x221fdc(0x1ec)](_0x221fdc(0x215),_0x2d1f4d);});}
1
+ const a29_0x30cb39=a29_0x2362;(function(_0x44edb1,_0x11bac6){const _0x1d05f2=a29_0x2362,_0xfe7f45=_0x44edb1();while(!![]){try{const _0x119188=-parseInt(_0x1d05f2(0x113))/0x1+parseInt(_0x1d05f2(0x117))/0x2*(parseInt(_0x1d05f2(0x11e))/0x3)+parseInt(_0x1d05f2(0x11d))/0x4+parseInt(_0x1d05f2(0x140))/0x5+-parseInt(_0x1d05f2(0x112))/0x6+parseInt(_0x1d05f2(0x124))/0x7+-parseInt(_0x1d05f2(0x142))/0x8;if(_0x119188===_0x11bac6)break;else _0xfe7f45['push'](_0xfe7f45['shift']());}catch(_0x39873b){_0xfe7f45['push'](_0xfe7f45['shift']());}}}(a29_0x1462,0xca341));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x30cb39(0x141),'description':'Runtime\x20app-config\x20key','required':!![]};export const VALUE_ARG={'name':a29_0x30cb39(0x114),'description':a29_0x30cb39(0x13b),'required':![]};export const TAGS_FLAG={'name':a29_0x30cb39(0x143),'type':'string','description':'Config\x20tags\x20for\x20filtering/display\x20metadata'};export const STDIN_FLAG={'name':'stdin','type':a29_0x30cb39(0x122),'description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':'from-env','type':'string','description':a29_0x30cb39(0x120)};export const REVEAL_FLAG={'name':a29_0x30cb39(0x139),'type':'boolean','description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};export function readKeyArg(_0x5cb8ab){const _0xc2ef9c=a29_0x30cb39,_0x231cb3=_0x5cb8ab[_0xc2ef9c(0x132)][0x0]?.[_0xc2ef9c(0x11b)]()??'';return validateKey(_0x231cb3),_0x231cb3;}export function readOptionalTags(_0x459b0a){const _0x220c56=a29_0x30cb39,_0x208b13=_0x459b0a['str'](_0x220c56(0x143))[_0x220c56(0x11b)]();if(!_0x208b13)return undefined;if(_0x208b13[_0x220c56(0x136)]>0x20)throw CliErrors[_0x220c56(0x12d)](_0x220c56(0x131));return _0x208b13;}function a29_0x2362(_0x45ce39,_0x5a44d7){_0x45ce39=_0x45ce39-0x112;const _0x14628b=a29_0x1462();let _0x2362ad=_0x14628b[_0x45ce39];return _0x2362ad;}export function validateKey(_0x25723f){const _0x5cd5f3=a29_0x30cb39;if(!_0x25723f)throw CliErrors[_0x5cd5f3(0x12d)](_0x5cd5f3(0x138));if(_0x25723f[_0x5cd5f3(0x136)]>0x100)throw CliErrors[_0x5cd5f3(0x12d)](_0x5cd5f3(0x119));}export function projectAppConfig(_0x2d0e3c,_0x3df03f){const _0x2505f4=a29_0x30cb39,_0x3e360f=_0x2d0e3c[_0x2505f4(0x114)]!==undefined&&_0x2d0e3c['value']!==null&&_0x2d0e3c['value']!=='',_0x2182b6={'appCode':_0x2d0e3c[_0x2505f4(0x133)],'key':_0x2d0e3c[_0x2505f4(0x141)],'tags':_0x2d0e3c[_0x2505f4(0x143)]??undefined,'hasValue':_0x3e360f,'valueRedacted':_0x3e360f&&!_0x3df03f?.[_0x2505f4(0x139)],'gmtCreate':_0x2d0e3c[_0x2505f4(0x118)],'gmtModified':_0x2d0e3c[_0x2505f4(0x121)]};return _0x3df03f?.[_0x2505f4(0x139)]&&(_0x2182b6[_0x2505f4(0x114)]=_0x2d0e3c[_0x2505f4(0x114)]??'',_0x2182b6[_0x2505f4(0x116)]=![]),_0x2182b6;}export function plannedAppConfig(_0x28ea1b){const _0x44bb0f=a29_0x30cb39,_0x884121=_0x28ea1b[_0x44bb0f(0x11a)]??!![];return{'appCode':_0x28ea1b['appCode'],'key':_0x28ea1b[_0x44bb0f(0x141)],'tags':_0x28ea1b[_0x44bb0f(0x143)]??undefined,'hasValue':_0x884121,'valueRedacted':_0x884121};}export function buildMutationData(_0x3281e7){const _0x4000f0=a29_0x30cb39;return{'operation':_0x3281e7['operation'],'selector':{'appCode':_0x3281e7[_0x4000f0(0x133)],'key':_0x3281e7[_0x4000f0(0x141)]},'before':_0x3281e7['before'],'after':_0x3281e7['after'],'dryRun':_0x3281e7[_0x4000f0(0x125)],'warnings':_0x3281e7['warnings']??[]};}export async function withAppConfigApiBoundary(_0x1cda82,_0x6f6a66,_0x519660){const _0x19f9f0=a29_0x30cb39;try{return await _0x519660();}catch{const _0x14e6cb=[_0x19f9f0(0x11c)+_0x6f6a66['appCode']];if(_0x6f6a66[_0x19f9f0(0x141)])_0x14e6cb[_0x19f9f0(0x12c)](_0x19f9f0(0x13e)+_0x6f6a66['key']);_0x14e6cb[_0x19f9f0(0x12c)](_0x19f9f0(0x134));throw CliErrors['apiError']('Failed\x20to\x20'+_0x1cda82+'\x20app\x20config.',_0x14e6cb['join'](';\x20')+'.');}}export function asAppConfigDryRunResult(_0xe28c19,_0x39e431){const _0x30ee09=a29_0x30cb39;return Object[_0x30ee09(0x11f)](_0xe28c19,{'method':{'value':_0x39e431[_0x30ee09(0x123)],'enumerable':![]},'url':{'value':_0x39e431[_0x30ee09(0x147)],'enumerable':![]}});}export function assertSingleValueSource(_0x341b38){const _0xe3c477=a29_0x30cb39,_0x56bdd1=[];_0x341b38[_0xe3c477(0x132)][_0xe3c477(0x136)]>0x1&&_0x56bdd1[_0xe3c477(0x12c)]({'kind':_0xe3c477(0x128),'value':_0x341b38[_0xe3c477(0x132)][_0xe3c477(0x12b)](0x1)['join']('\x20')});const _0x358609=_0x341b38[_0xe3c477(0x12e)](_0xe3c477(0x114));_0x358609!==undefined&&_0x358609!==null&&_0x56bdd1[_0xe3c477(0x12c)]({'kind':_0xe3c477(0x128),'value':String(_0x358609)});_0x341b38[_0xe3c477(0x13f)]('stdin')&&_0x56bdd1[_0xe3c477(0x12c)]({'kind':'stdin'});const _0x37457a=_0x341b38[_0xe3c477(0x145)](_0xe3c477(0x146))[_0xe3c477(0x11b)]();_0x37457a&&_0x56bdd1['push']({'kind':'env','name':_0x37457a});const _0x5bdd59=_0x341b38['str'](_0xe3c477(0x115))[_0xe3c477(0x11b)]();_0x5bdd59&&_0x56bdd1[_0xe3c477(0x12c)]({'kind':_0xe3c477(0x115),'path':_0x5bdd59});if(_0x56bdd1[_0xe3c477(0x136)]===0x0)throw CliErrors['validation'](_0xe3c477(0x149),_0xe3c477(0x12f));if(_0x56bdd1[_0xe3c477(0x136)]>0x1)throw CliErrors[_0xe3c477(0x12d)]('App\x20config\x20value\x20source\x20is\x20ambiguous.',_0xe3c477(0x127));return _0x56bdd1[0x0];}export async function assertValueSourceReadable(_0x290c67){const _0x5aea16=a29_0x30cb39;if(_0x290c67['kind']===_0x5aea16(0x13d)&&!(_0x290c67[_0x5aea16(0x137)]in process.env))throw CliErrors[_0x5aea16(0x12d)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x290c67[_0x5aea16(0x137)]);if(_0x290c67[_0x5aea16(0x13a)]===_0x5aea16(0x115))try{await access(_0x290c67[_0x5aea16(0x129)]);}catch{throw CliErrors[_0x5aea16(0x12d)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0x290c67[_0x5aea16(0x129)]);}}function a29_0x1462(){const _0x1026c2=['value\x20is\x20redacted','stdin','length','name','Missing\x20app-config\x20key.','reveal','kind','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.','env','key:\x20','bool','3530055iXVccH','key','4486144SBoqbZ','tags','data','str','from-env','url','once','Missing\x20app-config\x20value\x20source.','6219816xVegVC','1021860LYaAJk','value','file','valueRedacted','2RnZIXJ','gmtCreate','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','hasValue','trim','appCode:\x20','1396008eVWPot','3639387LLPglS','defineProperties','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','gmtModified','boolean','method','8255429xPpRQo','dryRun','utf8','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','argument','path','setEncoding','slice','push','validation','flag','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','error','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','args','appCode'];a29_0x1462=function(){return _0x1026c2;};return a29_0x1462();}export async function readAppConfigValue(_0x274a6b){const _0x22ff12=a29_0x30cb39,_0x3b20f1=assertSingleValueSource(_0x274a6b),_0x30d225=[];if(_0x3b20f1['kind']===_0x22ff12(0x128))return _0x30d225['push'](_0x22ff12(0x13c)),{'value':_0x3b20f1[_0x22ff12(0x114)]??'','source':_0x3b20f1[_0x22ff12(0x13a)],'warnings':_0x30d225};if(_0x3b20f1[_0x22ff12(0x13a)]===_0x22ff12(0x135))return{'value':await readStdin(),'source':_0x3b20f1[_0x22ff12(0x13a)],'warnings':_0x30d225};if(_0x3b20f1[_0x22ff12(0x13a)]===_0x22ff12(0x13d)){if(!(_0x3b20f1[_0x22ff12(0x137)]in process.env))throw CliErrors['validation']('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x3b20f1[_0x22ff12(0x137)]);return{'value':process.env[_0x3b20f1.name]??'','source':_0x3b20f1[_0x22ff12(0x13a)],'warnings':_0x30d225};}return{'value':await readFile(_0x3b20f1[_0x22ff12(0x129)],_0x22ff12(0x126)),'source':_0x3b20f1[_0x22ff12(0x13a)],'warnings':_0x30d225};}function readStdin(){return new Promise((_0x12248a,_0x4d9b53)=>{const _0x67831b=a29_0x2362;let _0x112518='';process[_0x67831b(0x135)][_0x67831b(0x12a)]('utf8'),process[_0x67831b(0x135)]['on'](_0x67831b(0x144),_0x2fb286=>{_0x112518+=_0x2fb286;}),process['stdin'][_0x67831b(0x148)]('end',()=>_0x12248a(_0x112518)),process[_0x67831b(0x135)][_0x67831b(0x148)](_0x67831b(0x130),_0x4d9b53);});}
@@ -1 +1 @@
1
- const a30_0x1bc7fb=a30_0x239d;(function(_0x177c33,_0x569a44){const _0x415b02=a30_0x239d,_0x486405=_0x177c33();while(!![]){try{const _0x389589=-parseInt(_0x415b02(0x1cc))/0x1*(parseInt(_0x415b02(0x1d6))/0x2)+-parseInt(_0x415b02(0x1cb))/0x3*(-parseInt(_0x415b02(0x1cf))/0x4)+parseInt(_0x415b02(0x1cd))/0x5*(parseInt(_0x415b02(0x1c5))/0x6)+-parseInt(_0x415b02(0x1c4))/0x7+parseInt(_0x415b02(0x1ce))/0x8+-parseInt(_0x415b02(0x1d8))/0x9+parseInt(_0x415b02(0x1d0))/0xa*(parseInt(_0x415b02(0x1d1))/0xb);if(_0x389589===_0x569a44)break;else _0x486405['push'](_0x486405['shift']());}catch(_0x27f57d){_0x486405['push'](_0x486405['shift']());}}}(a30_0x90d6,0x5e51e));import{unlinkSync,existsSync}from'node:fs';function a30_0x90d6(){const _0x586e0d=['!\x20Not\x20logged\x20in','1514744fyJwXg','270492NElWQn','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','log','yes','Clear\x20login\x20session','read','252969mmKyvq','1yMmUaB','5oTWqoW','547584JgHEpp','4oYDOcT','5764830gFWweh','33XcDIUC','nonInteractive','login','write','✓\x20Logged\x20out','1295390RabuRU','logout','6091929mLfeDR','auth'];a30_0x90d6=function(){return _0x586e0d;};return a30_0x90d6();}function a30_0x239d(_0x7e0d5b,_0x44ced8){_0x7e0d5b=_0x7e0d5b-0x1c3;const _0x90d6ea=a30_0x90d6();let _0x239dd6=_0x90d6ea[_0x7e0d5b];return _0x239dd6;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x1bc7fb(0x1d9),'command':a30_0x1bc7fb(0x1d3),'description':'Login\x20via\x20browser','risk':a30_0x1bc7fb(0x1ca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x1bc7fb(0x1c8),'type':'boolean','description':a30_0x1bc7fb(0x1c6),'default':![]}],async 'execute'(_0x24ed0d){const _0x1f084d=a30_0x1bc7fb,{runAuthServer:_0x5bfb44}=await import('../../auth/auth-server-ui.js');return await _0x5bfb44({'autoYes':_0x24ed0d['bool']('yes'),'nonInteractive':_0x24ed0d[_0x1f084d(0x1d2)]}),{'ok':!![]};}},{'service':a30_0x1bc7fb(0x1d9),'command':a30_0x1bc7fb(0x1d7),'description':a30_0x1bc7fb(0x1c9),'risk':a30_0x1bc7fb(0x1d4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x33fc9b){const _0x11928b=a30_0x1bc7fb;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x11928b(0x1c7)](_0x11928b(0x1d5))):console['log'](_0x11928b(0x1c3)),{'ok':!![]};}}];
1
+ function a30_0x585d(_0x57bba5,_0x33eefe){_0x57bba5=_0x57bba5-0x1c0;const _0x27273a=a30_0x2727();let _0x585d8e=_0x27273a[_0x57bba5];return _0x585d8e;}function a30_0x2727(){const _0x169ecb=['253783mMlegY','read','write','nonInteractive','login','90XmfHVf','bool','logout','1509270bixEiQ','432040UPiShX','43698ZtQZJZ','yes','718964daDiAP','auth','boolean','!\x20Not\x20logged\x20in','4365056CEQcra','Clear\x20login\x20session','✓\x20Logged\x20out','681405bIFWIV','../../auth/auth-server-ui.js'];a30_0x2727=function(){return _0x169ecb;};return a30_0x2727();}const a30_0x18c8d3=a30_0x585d;(function(_0x308e77,_0x2c35c9){const _0x1641c2=a30_0x585d,_0x149fe6=_0x308e77();while(!![]){try{const _0x283d14=-parseInt(_0x1641c2(0x1c9))/0x1+-parseInt(_0x1641c2(0x1d2))/0x2+parseInt(_0x1641c2(0x1c7))/0x3+parseInt(_0x1641c2(0x1c0))/0x4+parseInt(_0x1641c2(0x1ce))/0x5*(-parseInt(_0x1641c2(0x1d3))/0x6)+-parseInt(_0x1641c2(0x1d1))/0x7+parseInt(_0x1641c2(0x1c4))/0x8;if(_0x283d14===_0x2c35c9)break;else _0x149fe6['push'](_0x149fe6['shift']());}catch(_0x503481){_0x149fe6['push'](_0x149fe6['shift']());}}}(a30_0x2727,0x21341));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x18c8d3(0x1c1),'command':a30_0x18c8d3(0x1cd),'description':'Login\x20via\x20browser','risk':a30_0x18c8d3(0x1ca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'yes','type':a30_0x18c8d3(0x1c2),'description':'Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','default':![]}],async 'execute'(_0x5485ac){const _0x56c949=a30_0x18c8d3,{runAuthServer:_0x563af8}=await import(_0x56c949(0x1c8));return await _0x563af8({'autoYes':_0x5485ac[_0x56c949(0x1cf)](_0x56c949(0x1d4)),'nonInteractive':_0x5485ac[_0x56c949(0x1cc)]}),{'ok':!![]};}},{'service':a30_0x18c8d3(0x1c1),'command':a30_0x18c8d3(0x1d0),'description':a30_0x18c8d3(0x1c5),'risk':a30_0x18c8d3(0x1cb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x32271a){const _0x182853=a30_0x18c8d3;return existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x182853(0x1c6))):console['log'](_0x182853(0x1c3)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a31_0x524c16=a31_0x4240;(function(_0x44fe2c,_0x1b0f73){const _0x3eb0f6=a31_0x4240,_0x23f990=_0x44fe2c();while(!![]){try{const _0x2ae29f=parseInt(_0x3eb0f6(0x1f6))/0x1+parseInt(_0x3eb0f6(0x1de))/0x2+-parseInt(_0x3eb0f6(0x1c6))/0x3*(parseInt(_0x3eb0f6(0x1c4))/0x4)+-parseInt(_0x3eb0f6(0x1be))/0x5*(parseInt(_0x3eb0f6(0x1b9))/0x6)+parseInt(_0x3eb0f6(0x1d9))/0x7*(-parseInt(_0x3eb0f6(0x1e3))/0x8)+parseInt(_0x3eb0f6(0x1f2))/0x9+parseInt(_0x3eb0f6(0x1ff))/0xa*(parseInt(_0x3eb0f6(0x1b8))/0xb);if(_0x2ae29f===_0x1b0f73)break;else _0x23f990['push'](_0x23f990['shift']());}catch(_0x4e76fa){_0x23f990['push'](_0x23f990['shift']());}}}(a31_0x9ac4,0xa1bc0));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a31_0x9ac4(){const _0x5b5972=['/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','1086410RxaYyQ','Select\x20dataset:','File\x20already\x20exists:\x20','operation-type','Select\x20operation\x20type:','map','nonInteractive','close','description','10XyDSwN','string','Available\x20aliases:\x20','Invalid\x20dataset\x20selection.','before','apiDir','stdin','trim','\x22\x20not\x20found.\x20','No\x20api.ts\x20found.\x20Run\x20`','scriptsRootDir','create','Operation\x20type\x20(HOOK\x20only)','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','Invalid\x20function\x20name\x20\x22','validation','\x0a\x20*\x20[脚本名称]\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','5543021aMsXcj','176466bhLJnB','length','ENDPOINT','functionNode','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','50vaqNIY','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','\x22.\x20','includes','.js','.js\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Input\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Processing\x20result.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','154616grFahz','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','63wAHOoR','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','datasetCode','Trigger\x20node\x20(HOOK\x20only)','datasetcode','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','join','bff','isInteger','type',']\x20(','HOOK\x20requires\x20alias/operation/node\x20options.','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','appCode','name','\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Current\x20request\x20params\x20or\x20response\x20result.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Modified\x20params\x20object.\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','No\x20operation\x20types\x20found\x20for\x20dataset\x20','1253MHgmxF','function-node','Dataset\x20not\x20found\x20for\x20code\x20\x22','utf8','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','1526886jvHawi','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','COMMON','Operation\x20type\x20\x22','HOOK','43224iDSPPg','str','\x20function:\x20','UNKNOWN','alias','operationType','Select\x20trigger\x20node:','code','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','Available:\x20','question','write','find','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','stderr','3435129UfusZH','keys','after'];a31_0x9ac4=function(){return _0x5b5972;};return a31_0x9ac4();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a31_0x4240(_0x136519,_0x3ec373){_0x136519=_0x136519-0x1ad;const _0x9ac46f=a31_0x9ac4();let _0x4240b7=_0x9ac46f[_0x136519];return _0x4240b7;}export const bffCreate={'service':a31_0x524c16(0x1cd),'command':a31_0x524c16(0x1b1),'description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':'write','flags':[{'name':'type','type':'string','required':!![],'enum':[a31_0x524c16(0x1e0),a31_0x524c16(0x1bb),a31_0x524c16(0x1e2)],'description':'Script\x20type'},{'name':a31_0x524c16(0x1d4),'type':'string','required':!![],'description':'Function\x20name\x20(valid\x20JS\x20identifier)'},{'name':'description','type':a31_0x524c16(0x200),'description':'Script\x20description'},{'name':'alias','type':a31_0x524c16(0x200),'description':a31_0x524c16(0x1b3)},{'name':a31_0x524c16(0x1ca),'type':a31_0x524c16(0x200),'description':a31_0x524c16(0x1cb)},{'name':a31_0x524c16(0x1f9),'type':a31_0x524c16(0x200),'description':a31_0x524c16(0x1b2)},{'name':a31_0x524c16(0x1da),'type':a31_0x524c16(0x200),'description':a31_0x524c16(0x1c9),'enum':[a31_0x524c16(0x203),a31_0x524c16(0x1f4)]}],async 'validate'(_0x1d808b){const _0x1f996c=a31_0x524c16,_0x24e5b1=_0x1d808b[_0x1f996c(0x1e4)](_0x1f996c(0x1d4));if(!isValidBffFunctionName(_0x24e5b1))throw CliErrors['validation'](_0x1f996c(0x1b4)+_0x24e5b1+_0x1f996c(0x1d2));},async 'execute'(_0x57cb6b){const _0x3b7561=a31_0x524c16,_0x56eb70=loadBffProjectConfig(_0x57cb6b['appCode']),_0x428d3a=_0x57cb6b[_0x3b7561(0x1e4)](_0x3b7561(0x1cf)),_0x2b5619=_0x57cb6b[_0x3b7561(0x1e4)](_0x3b7561(0x1d4)),_0xe42d4e=_0x57cb6b[_0x3b7561(0x1e4)](_0x3b7561(0x1fe))||undefined,_0x56e569=_0x428d3a===_0x3b7561(0x1e2)?await resolveHookOptions(_0x56eb70,_0x57cb6b):undefined,_0x3ff38a=buildFilePath(_0x56eb70,_0x428d3a,_0x2b5619,_0x56e569);if(await fileExists(_0x3ff38a))throw CliErrors[_0x3b7561(0x1b5)](_0x3b7561(0x1f8)+_0x3ff38a);await mkdir(dirname(_0x3ff38a),{'recursive':!![]});const _0x243b26=generateTemplate(_0x428d3a,_0x2b5619,_0x57cb6b[_0x3b7561(0x1d3)],_0xe42d4e,_0x56e569);await writeFile(_0x3ff38a,_0x243b26,_0x3b7561(0x1dc));const _0x58a1a3={'type':_0x428d3a,'name':_0x2b5619,'path':_0x3ff38a};if(_0xe42d4e)_0x58a1a3[_0x3b7561(0x1fe)]=_0xe42d4e;if(_0x56e569){if(_0x56e569['alias'])_0x58a1a3[_0x3b7561(0x1e7)]=_0x56e569['alias'];_0x58a1a3[_0x3b7561(0x1c8)]=_0x56e569[_0x3b7561(0x1c8)],_0x58a1a3['operationType']=_0x56e569[_0x3b7561(0x1e8)],_0x58a1a3[_0x3b7561(0x1bc)]=_0x56e569['functionNode'];}return{'ok':!![],'data':_0x58a1a3,'message':'Created\x20'+_0x428d3a+_0x3b7561(0x1e5)+_0x2b5619};}};async function resolveHookOptions(_0x5ceee3,_0x1f5ee4){const _0x7eb8c9=a31_0x524c16,_0x517fa4=loadAliasMap(_0x1f5ee4[_0x7eb8c9(0x204)],undefined,resolveApiFilePath(_0x1f5ee4['apiDir'],_0x1f5ee4[_0x7eb8c9(0x1d3)])),_0x3b97c5=_0x517fa4[_0x7eb8c9(0x1ba)]>0x0;let _0x586ded,_0x1ebaba,_0x2229f9;const _0x13ddc5=_0x1f5ee4['str']('alias'),_0x278217=_0x1f5ee4[_0x7eb8c9(0x1e4)](_0x7eb8c9(0x1ca));if(_0x13ddc5){const _0x292a7f=resolveAlias(_0x1f5ee4[_0x7eb8c9(0x204)],_0x13ddc5,undefined,resolveApiFilePath(_0x1f5ee4[_0x7eb8c9(0x204)],_0x1f5ee4[_0x7eb8c9(0x1d3)]));if(!_0x292a7f){const _0x4d41c0=_0x3b97c5?_0x7eb8c9(0x201)+_0x517fa4['map'](_0x4d195b=>_0x4d195b['alias'])['join'](',\x20'):_0x7eb8c9(0x1af)+CLI_BIN_NAME+_0x7eb8c9(0x1bf);throw CliErrors['validation']('Alias\x20\x22'+_0x13ddc5+_0x7eb8c9(0x1ae)+_0x4d41c0);}_0x586ded=_0x13ddc5,_0x1ebaba=_0x292a7f;}else{if(_0x278217){_0x1ebaba=_0x278217;const _0x5f21be=_0x517fa4['find'](_0x5dde16=>_0x5dde16[_0x7eb8c9(0x1c8)]===_0x278217);_0x586ded=_0x5f21be?.[_0x7eb8c9(0x1e7)];}else{if(_0x1f5ee4[_0x7eb8c9(0x1fc)])throw CliErrors[_0x7eb8c9(0x1b5)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x3b97c5){const _0x45c5f3=_0x517fa4[_0x7eb8c9(0x1fb)](_0x177bcd=>_0x177bcd['alias']+'\x20('+_0x177bcd['tableName']+')'),_0x3052dc=await promptSelect(_0x7eb8c9(0x1f7),_0x45c5f3),_0x32c77a=_0x517fa4[_0x3052dc];if(!_0x32c77a)throw CliErrors['validation'](_0x7eb8c9(0x202));_0x586ded=_0x32c77a['alias'],_0x1ebaba=_0x32c77a['datasetCode'];}else{const _0x3816cd=await listDatasets(_0x1f5ee4[_0x7eb8c9(0x1d3)]);if(_0x3816cd[_0x7eb8c9(0x1ba)]===0x0)throw CliErrors[_0x7eb8c9(0x1b5)]('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x4e8667=_0x3816cd[_0x7eb8c9(0x1fb)](_0x5e8c17=>_0x5e8c17[_0x7eb8c9(0x1d4)]+'\x20['+(_0x5e8c17['source']??_0x7eb8c9(0x1e6))+_0x7eb8c9(0x1d0)+_0x5e8c17['code']+')'),_0x2a93fe=await promptSelect(_0x7eb8c9(0x1f7),_0x4e8667),_0x54d8fb=_0x3816cd[_0x2a93fe];if(!_0x54d8fb)throw CliErrors[_0x7eb8c9(0x1b5)]('Invalid\x20dataset\x20selection.');_0x1ebaba=_0x54d8fb[_0x7eb8c9(0x1ea)],_0x586ded=undefined;}}}}const _0x4c9905=await listDatasets(_0x1f5ee4[_0x7eb8c9(0x1d3)]),_0x1ed386=_0x4c9905[_0x7eb8c9(0x1ef)](_0x228d77=>_0x228d77[_0x7eb8c9(0x1ea)]===_0x1ebaba);if(!_0x1ed386)throw CliErrors[_0x7eb8c9(0x1b5)](_0x7eb8c9(0x1db)+_0x1ebaba+_0x7eb8c9(0x1c0)+(_0x586ded?_0x7eb8c9(0x1bd)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh.':''));_0x2229f9=_0x1ed386['id'];const _0x4eafa8=_0x586ded??_0x1ebaba,_0x304468=await listBffDatasetOperations(_0x1f5ee4[_0x7eb8c9(0x1d3)],_0x2229f9),_0x5c802b=_0x304468?Object[_0x7eb8c9(0x1f3)](_0x304468):[];if(_0x5c802b[_0x7eb8c9(0x1ba)]===0x0)throw CliErrors[_0x7eb8c9(0x1b5)](_0x7eb8c9(0x1d8)+_0x4eafa8+'.');let _0xad4526;const _0xb95d77=_0x1f5ee4[_0x7eb8c9(0x1e4)](_0x7eb8c9(0x1f9));if(_0xb95d77){if(!_0x5c802b[_0x7eb8c9(0x1c1)](_0xb95d77))throw CliErrors[_0x7eb8c9(0x1b5)](_0x7eb8c9(0x1e1)+_0xb95d77+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x4eafa8+'.\x20'+(_0x7eb8c9(0x1ec)+_0x5c802b[_0x7eb8c9(0x1cc)](',\x20')));_0xad4526=_0xb95d77;}else{if(_0x1f5ee4[_0x7eb8c9(0x1fc)])throw CliErrors['validation']('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x341219=await promptSelect(_0x7eb8c9(0x1fa),_0x5c802b);_0xad4526=_0x5c802b[_0x341219]??_0x5c802b[0x0];}let _0x4e339d=normalizeHookFunctionNode(_0x1f5ee4[_0x7eb8c9(0x1e4)](_0x7eb8c9(0x1da)));if(!_0x4e339d){if(_0x1f5ee4['str'](_0x7eb8c9(0x1da)))throw CliErrors['validation'](_0x7eb8c9(0x1d7));if(_0x1f5ee4[_0x7eb8c9(0x1fc)])throw CliErrors[_0x7eb8c9(0x1b5)](_0x7eb8c9(0x1eb));const _0x110133=await promptSelect(_0x7eb8c9(0x1e9),[_0x7eb8c9(0x203),_0x7eb8c9(0x1f4)]);_0x4e339d=[_0x7eb8c9(0x203),_0x7eb8c9(0x1f4)][_0x110133]??_0x7eb8c9(0x203);}return{'alias':_0x586ded,'datasetCode':_0x1ebaba,'datasetId':_0x2229f9,'operationType':_0xad4526,'functionNode':_0x4e339d};}async function promptSelect(_0x4c6815,_0x792f97){const _0x6c67fd=a31_0x524c16;if(_0x792f97[_0x6c67fd(0x1ba)]===0x1)return 0x0;for(const [_0x45b1b1,_0xf49830]of _0x792f97['entries']()){process['stderr'][_0x6c67fd(0x1ee)]('\x20\x20'+(_0x45b1b1+0x1)+'.\x20'+_0xf49830+'\x0a');}const _0x51e5b2=createInterface({'input':process[_0x6c67fd(0x205)],'output':process['stderr']});while(!![]){const _0x1ef33b=await new Promise(_0x1e212d=>{const _0x4b0954=_0x6c67fd;_0x51e5b2[_0x4b0954(0x1ed)](_0x4c6815+'\x20',_0x1e212d);}),_0x260d89=Number['parseInt'](_0x1ef33b[_0x6c67fd(0x1ad)](),0xa);if(Number[_0x6c67fd(0x1ce)](_0x260d89)&&_0x260d89>=0x1&&_0x260d89<=_0x792f97['length'])return _0x51e5b2[_0x6c67fd(0x1fd)](),_0x260d89-0x1;process[_0x6c67fd(0x1f1)]['write']('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x792f97[_0x6c67fd(0x1ba)]+'.\x0a');}}function buildFilePath(_0x2791aa,_0x28185b,_0x153be2,_0x314e5a){const _0xd8d1fa=a31_0x524c16;if(_0x28185b===_0xd8d1fa(0x1e2)){if(!_0x314e5a)throw CliErrors[_0xd8d1fa(0x1b5)](_0xd8d1fa(0x1d1));const _0x458a1f=_0x314e5a['alias']??_0x314e5a['datasetCode'];return join(_0x2791aa[_0xd8d1fa(0x1b0)],_0xd8d1fa(0x1e2),_0x458a1f,_0x314e5a[_0xd8d1fa(0x1e8)],_0x314e5a[_0xd8d1fa(0x1bc)],_0x153be2+_0xd8d1fa(0x1c2));}return join(_0x2791aa[_0xd8d1fa(0x1b0)],_0x28185b,_0x153be2+_0xd8d1fa(0x1c2));}export function generateTemplate(_0x2278a1,_0x387a44,_0x5c415f,_0xe00384,_0x6e0564){const _0x5aedc6=a31_0x524c16,_0x46b164=_0xe00384?.[_0x5aedc6(0x1ad)]()||'TODO:\x20add\x20script\x20description';if(_0x2278a1===_0x5aedc6(0x1e0))return _0x5aedc6(0x1f5)+_0x46b164+_0x5aedc6(0x1b6)+_0x387a44+_0x5aedc6(0x1c5)+_0x387a44+_0x5aedc6(0x1c3)+_0x387a44+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x2278a1==='ENDPOINT')return _0x5aedc6(0x1d6)+_0x46b164+_0x5aedc6(0x1b7)+_0x5c415f+'/'+_0x387a44+'\x0a\x20*\x0a\x20*\x20@param\x20{Object}\x20params\x20-\x20Request\x20parameters.\x0a\x20*\x20@param\x20{Object}\x20context\x20-\x20Execution\x20context\x20(injected\x20by\x20platform).\x0a\x20*\x20@returns\x20{Promise<Object>}\x20Business\x20result\x20(wrapped\x20in\x20response.data).\x0a\x20*/\x0aexport\x20default\x20async\x20function\x20'+_0x387a44+_0x5aedc6(0x1dd);if(!_0x6e0564)throw CliErrors['validation'](_0x5aedc6(0x1f0));return _0x5aedc6(0x1c7)+_0x46b164+_0x5aedc6(0x1df)+_0x5c415f+'/'+_0x6e0564[_0x5aedc6(0x1c8)]+'/'+_0x6e0564[_0x5aedc6(0x1e8)]+'\x0a\x20*\x20[触发节点]\x20'+_0x6e0564[_0x5aedc6(0x1bc)]+_0x5aedc6(0x1d5)+_0x387a44+_0x5aedc6(0x1dd);}
1
+ const a31_0x3b5636=a31_0xbd49;function a31_0x46fb(){const _0x18cb41=['stdin','bff','Select\x20dataset:','name','COMMON','7407099aXAiEp','length','UNKNOWN','appCode','HOOK','\x20function:\x20','\x22\x20not\x20found.\x20','operationType','\x0a\x20*\x20[脚本名称]\x20','No\x20operation\x20types\x20found\x20for\x20dataset\x20','parseInt','5989344BXkHZD','datasetCode','functionNode','\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','Created\x20','4rLUQID','after','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','string','No\x20datasets\x20found\x20for\x20this\x20app.','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','operation-type','Invalid\x20dataset\x20selection.','trim','function-node','entries','source','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','description','File\x20already\x20exists:\x20','join','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','\x20api\x20pull`\x20to\x20refresh.','before','466806LBaFpn','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','tableName','Operation\x20type\x20(HOOK\x20only)','10flVuIe','nonInteractive','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','305955FOcRvk','Function\x20name\x20(valid\x20JS\x20identifier)','ENDPOINT','Dataset\x20not\x20found\x20for\x20code\x20\x22','Script\x20description','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','apiDir','alias','isInteger','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','2333592BbiQGK','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','410dIcUue','HOOK\x20requires\x20alias/operation/node\x20options.','Script\x20type','scriptsRootDir','\x22\x20not\x20found\x20for\x20dataset\x20','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','No\x20api.ts\x20found.\x20Run\x20`','Invalid\x20function\x20name\x20\x22','write','\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','.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','stderr','includes','code','540331ELrkAE','validation','keys','4129465YAKXFr','.js','\x0a\x20*\x20[触发节点]\x20','utf8','map','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','datasetcode','type','Available\x20aliases:\x20','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','find','str','Operation\x20type\x20\x22'];a31_0x46fb=function(){return _0x18cb41;};return a31_0x46fb();}(function(_0x1e3d43,_0x498448){const _0x22a3c7=a31_0xbd49,_0x52c159=_0x1e3d43();while(!![]){try{const _0x3cb9e9=parseInt(_0x22a3c7(0x10e))/0x1+-parseInt(_0x22a3c7(0xf0))/0x2*(parseInt(_0x22a3c7(0xeb))/0x3)+parseInt(_0x22a3c7(0x133))/0x4*(-parseInt(_0x22a3c7(0x111))/0x5)+parseInt(_0x22a3c7(0x12e))/0x6+-parseInt(_0x22a3c7(0x123))/0x7+parseInt(_0x22a3c7(0xfe))/0x8+parseInt(_0x22a3c7(0xf3))/0x9*(parseInt(_0x22a3c7(0x100))/0xa);if(_0x3cb9e9===_0x498448)break;else _0x52c159['push'](_0x52c159['shift']());}catch(_0x2a201f){_0x52c159['push'](_0x52c159['shift']());}}}(a31_0x46fb,0x89345));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';function a31_0xbd49(_0x25581c,_0x1b5baa){_0x25581c=_0x25581c-0xdb;const _0x46fb07=a31_0x46fb();let _0xbd4904=_0x46fb07[_0x25581c];return _0xbd4904;}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_0x3b5636(0x11f),'command':'create','description':'Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','risk':'write','flags':[{'name':a31_0x3b5636(0x118),'type':a31_0x3b5636(0xdb),'required':!![],'enum':[a31_0x3b5636(0x122),a31_0x3b5636(0xf5),a31_0x3b5636(0x127)],'description':a31_0x3b5636(0x102)},{'name':a31_0x3b5636(0x121),'type':'string','required':!![],'description':a31_0x3b5636(0xf4)},{'name':a31_0x3b5636(0xe5),'type':a31_0x3b5636(0xdb),'description':a31_0x3b5636(0xf7)},{'name':'alias','type':a31_0x3b5636(0xdb),'description':a31_0x3b5636(0x11a)},{'name':a31_0x3b5636(0x117),'type':a31_0x3b5636(0xdb),'description':a31_0x3b5636(0x135)},{'name':a31_0x3b5636(0xde),'type':'string','description':a31_0x3b5636(0xef)},{'name':'function-node','type':a31_0x3b5636(0xdb),'description':'Trigger\x20node\x20(HOOK\x20only)','enum':['before','after']}],async 'validate'(_0x41c1b0){const _0x20c6e5=a31_0x3b5636,_0xfa391f=_0x41c1b0['str'](_0x20c6e5(0x121));if(!isValidBffFunctionName(_0xfa391f))throw CliErrors[_0x20c6e5(0x10f)](_0x20c6e5(0x107)+_0xfa391f+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x3366d4){const _0x16d434=a31_0x3b5636,_0xc43bea=loadBffProjectConfig(_0x3366d4['appCode']),_0x2f0c96=_0x3366d4[_0x16d434(0x11c)](_0x16d434(0x118)),_0x10a208=_0x3366d4[_0x16d434(0x11c)](_0x16d434(0x121)),_0x116b32=_0x3366d4[_0x16d434(0x11c)](_0x16d434(0xe5))||undefined,_0x299636=_0x2f0c96===_0x16d434(0x127)?await resolveHookOptions(_0xc43bea,_0x3366d4):undefined,_0x1837a9=buildFilePath(_0xc43bea,_0x2f0c96,_0x10a208,_0x299636);if(await fileExists(_0x1837a9))throw CliErrors[_0x16d434(0x10f)](_0x16d434(0xe6)+_0x1837a9);await mkdir(dirname(_0x1837a9),{'recursive':!![]});const _0x5192a1=generateTemplate(_0x2f0c96,_0x10a208,_0x3366d4['appCode'],_0x116b32,_0x299636);await writeFile(_0x1837a9,_0x5192a1,_0x16d434(0x114));const _0x268711={'type':_0x2f0c96,'name':_0x10a208,'path':_0x1837a9};if(_0x116b32)_0x268711[_0x16d434(0xe5)]=_0x116b32;if(_0x299636){if(_0x299636[_0x16d434(0xfa)])_0x268711[_0x16d434(0xfa)]=_0x299636[_0x16d434(0xfa)];_0x268711[_0x16d434(0x12f)]=_0x299636[_0x16d434(0x12f)],_0x268711[_0x16d434(0x12a)]=_0x299636['operationType'],_0x268711[_0x16d434(0x130)]=_0x299636['functionNode'];}return{'ok':!![],'data':_0x268711,'message':_0x16d434(0x132)+_0x2f0c96+_0x16d434(0x128)+_0x10a208};}};async function resolveHookOptions(_0x53d5a3,_0x5e1033){const _0x2740c0=a31_0x3b5636,_0x46567d=loadAliasMap(_0x5e1033['apiDir'],undefined,resolveApiFilePath(_0x5e1033[_0x2740c0(0xf9)],_0x5e1033[_0x2740c0(0x126)])),_0x4d0c6b=_0x46567d[_0x2740c0(0x124)]>0x0;let _0x41f19a,_0xc44edd,_0x1d272e;const _0x1f2389=_0x5e1033[_0x2740c0(0x11c)](_0x2740c0(0xfa)),_0x3aee0e=_0x5e1033[_0x2740c0(0x11c)]('datasetcode');if(_0x1f2389){const _0x458199=resolveAlias(_0x5e1033['apiDir'],_0x1f2389,undefined,resolveApiFilePath(_0x5e1033[_0x2740c0(0xf9)],_0x5e1033[_0x2740c0(0x126)]));if(!_0x458199){const _0x1c6f77=_0x4d0c6b?_0x2740c0(0x119)+_0x46567d[_0x2740c0(0x115)](_0x58149b=>_0x58149b['alias'])[_0x2740c0(0xe7)](',\x20'):_0x2740c0(0x106)+CLI_BIN_NAME+_0x2740c0(0x105);throw CliErrors[_0x2740c0(0x10f)]('Alias\x20\x22'+_0x1f2389+_0x2740c0(0x129)+_0x1c6f77);}_0x41f19a=_0x1f2389,_0xc44edd=_0x458199;}else{if(_0x3aee0e){_0xc44edd=_0x3aee0e;const _0x50e1fb=_0x46567d[_0x2740c0(0x11b)](_0x3b0c1a=>_0x3b0c1a[_0x2740c0(0x12f)]===_0x3aee0e);_0x41f19a=_0x50e1fb?.[_0x2740c0(0xfa)];}else{if(_0x5e1033[_0x2740c0(0xf1)])throw CliErrors[_0x2740c0(0x10f)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x4d0c6b){const _0x413b6a=_0x46567d['map'](_0x31f821=>_0x31f821['alias']+'\x20('+_0x31f821[_0x2740c0(0xee)]+')'),_0x409d6c=await promptSelect(_0x2740c0(0x120),_0x413b6a),_0x1048c4=_0x46567d[_0x409d6c];if(!_0x1048c4)throw CliErrors[_0x2740c0(0x10f)](_0x2740c0(0xdf));_0x41f19a=_0x1048c4[_0x2740c0(0xfa)],_0xc44edd=_0x1048c4[_0x2740c0(0x12f)];}else{const _0x1c0386=await listDatasets(_0x5e1033[_0x2740c0(0x126)]);if(_0x1c0386[_0x2740c0(0x124)]===0x0)throw CliErrors[_0x2740c0(0x10f)](_0x2740c0(0xdc));const _0x21dce2=_0x1c0386['map'](_0x120ade=>_0x120ade['name']+'\x20['+(_0x120ade[_0x2740c0(0xe3)]??_0x2740c0(0x125))+']\x20('+_0x120ade[_0x2740c0(0x10d)]+')'),_0x62b2a2=await promptSelect('Select\x20dataset:',_0x21dce2),_0x3dcf43=_0x1c0386[_0x62b2a2];if(!_0x3dcf43)throw CliErrors[_0x2740c0(0x10f)](_0x2740c0(0xdf));_0xc44edd=_0x3dcf43[_0x2740c0(0x10d)],_0x41f19a=undefined;}}}}const _0x5ddf5c=await listDatasets(_0x5e1033[_0x2740c0(0x126)]),_0x113daf=_0x5ddf5c[_0x2740c0(0x11b)](_0x394b26=>_0x394b26[_0x2740c0(0x10d)]===_0xc44edd);if(!_0x113daf)throw CliErrors[_0x2740c0(0x10f)](_0x2740c0(0xf6)+_0xc44edd+'\x22.\x20'+(_0x41f19a?_0x2740c0(0xec)+CLI_BIN_NAME+_0x2740c0(0xe9):''));_0x1d272e=_0x113daf['id'];const _0x5461c9=_0x41f19a??_0xc44edd,_0x35d769=await listBffDatasetOperations(_0x5e1033[_0x2740c0(0x126)],_0x1d272e),_0x3ffdd4=_0x35d769?Object[_0x2740c0(0x110)](_0x35d769):[];if(_0x3ffdd4[_0x2740c0(0x124)]===0x0)throw CliErrors[_0x2740c0(0x10f)](_0x2740c0(0x12c)+_0x5461c9+'.');let _0x46f599;const _0x366df5=_0x5e1033['str']('operation-type');if(_0x366df5){if(!_0x3ffdd4[_0x2740c0(0x10c)](_0x366df5))throw CliErrors['validation'](_0x2740c0(0x11d)+_0x366df5+_0x2740c0(0x104)+_0x5461c9+'.\x20'+('Available:\x20'+_0x3ffdd4[_0x2740c0(0xe7)](',\x20')));_0x46f599=_0x366df5;}else{if(_0x5e1033['nonInteractive'])throw CliErrors[_0x2740c0(0x10f)](_0x2740c0(0xed));const _0x4ab53b=await promptSelect('Select\x20operation\x20type:',_0x3ffdd4);_0x46f599=_0x3ffdd4[_0x4ab53b]??_0x3ffdd4[0x0];}let _0x58484a=normalizeHookFunctionNode(_0x5e1033[_0x2740c0(0x11c)](_0x2740c0(0xe1)));if(!_0x58484a){if(_0x5e1033[_0x2740c0(0x11c)]('function-node'))throw CliErrors['validation']('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x5e1033['nonInteractive'])throw CliErrors[_0x2740c0(0x10f)](_0x2740c0(0xfd));const _0x2a650d=await promptSelect('Select\x20trigger\x20node:',[_0x2740c0(0xea),_0x2740c0(0x134)]);_0x58484a=[_0x2740c0(0xea),_0x2740c0(0x134)][_0x2a650d]??_0x2740c0(0xea);}return{'alias':_0x41f19a,'datasetCode':_0xc44edd,'datasetId':_0x1d272e,'operationType':_0x46f599,'functionNode':_0x58484a};}async function promptSelect(_0x4ff636,_0x321f0b){const _0x2c12c3=a31_0x3b5636;if(_0x321f0b[_0x2c12c3(0x124)]===0x1)return 0x0;for(const [_0x5086eb,_0x540ede]of _0x321f0b[_0x2c12c3(0xe2)]()){process[_0x2c12c3(0x10b)][_0x2c12c3(0x108)]('\x20\x20'+(_0x5086eb+0x1)+'.\x20'+_0x540ede+'\x0a');}const _0x43de29=createInterface({'input':process[_0x2c12c3(0x11e)],'output':process[_0x2c12c3(0x10b)]});while(!![]){const _0x2cd966=await new Promise(_0x563e81=>{_0x43de29['question'](_0x4ff636+'\x20',_0x563e81);}),_0x344a95=Number[_0x2c12c3(0x12d)](_0x2cd966[_0x2c12c3(0xe0)](),0xa);if(Number[_0x2c12c3(0xfb)](_0x344a95)&&_0x344a95>=0x1&&_0x344a95<=_0x321f0b[_0x2c12c3(0x124)])return _0x43de29['close'](),_0x344a95-0x1;process[_0x2c12c3(0x10b)][_0x2c12c3(0x108)](_0x2c12c3(0xff)+_0x321f0b[_0x2c12c3(0x124)]+'.\x0a');}}function buildFilePath(_0x54b47d,_0x2a953d,_0x4f53cb,_0x1f2858){const _0x2694b6=a31_0x3b5636;if(_0x2a953d==='HOOK'){if(!_0x1f2858)throw CliErrors['validation'](_0x2694b6(0x101));const _0x444bd6=_0x1f2858[_0x2694b6(0xfa)]??_0x1f2858[_0x2694b6(0x12f)];return join(_0x54b47d[_0x2694b6(0x103)],'HOOK',_0x444bd6,_0x1f2858['operationType'],_0x1f2858[_0x2694b6(0x130)],_0x4f53cb+_0x2694b6(0x112));}return join(_0x54b47d[_0x2694b6(0x103)],_0x2a953d,_0x4f53cb+'.js');}export function generateTemplate(_0x4d5ede,_0x4c727e,_0x30939a,_0x4d11b,_0x3393af){const _0x2b3e75=a31_0x3b5636,_0x5bb295=_0x4d11b?.[_0x2b3e75(0xe0)]()||'TODO:\x20add\x20script\x20description';if(_0x4d5ede===_0x2b3e75(0x122))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x5bb295+_0x2b3e75(0x12b)+_0x4c727e+_0x2b3e75(0xfc)+_0x4c727e+_0x2b3e75(0x10a)+_0x4c727e+_0x2b3e75(0xdd);if(_0x4d5ede===_0x2b3e75(0xf5))return _0x2b3e75(0xf2)+_0x5bb295+_0x2b3e75(0x116)+_0x30939a+'/'+_0x4c727e+_0x2b3e75(0x109)+_0x4c727e+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(!_0x3393af)throw CliErrors['validation'](_0x2b3e75(0xe8));return _0x2b3e75(0xf8)+_0x5bb295+_0x2b3e75(0xe4)+_0x30939a+'/'+_0x3393af[_0x2b3e75(0x12f)]+'/'+_0x3393af[_0x2b3e75(0x12a)]+_0x2b3e75(0x113)+_0x3393af[_0x2b3e75(0x130)]+_0x2b3e75(0x131)+_0x4c727e+_0x2b3e75(0xdd);}
@@ -1 +1 @@
1
- const a32_0x8b9171=a32_0x37c7;(function(_0x2a6594,_0x3f452f){const _0x5d8378=a32_0x37c7,_0x5aee8b=_0x2a6594();while(!![]){try{const _0x25fdea=-parseInt(_0x5d8378(0xab))/0x1*(-parseInt(_0x5d8378(0x87))/0x2)+-parseInt(_0x5d8378(0x88))/0x3+parseInt(_0x5d8378(0xa4))/0x4+parseInt(_0x5d8378(0x8e))/0x5*(parseInt(_0x5d8378(0x96))/0x6)+parseInt(_0x5d8378(0xa7))/0x7*(parseInt(_0x5d8378(0x9f))/0x8)+-parseInt(_0x5d8378(0xa2))/0x9+parseInt(_0x5d8378(0xb2))/0xa;if(_0x25fdea===_0x3f452f)break;else _0x5aee8b['push'](_0x5aee8b['shift']());}catch(_0x51e4e8){_0x5aee8b['push'](_0x5aee8b['shift']());}}}(a32_0x526a,0xc981e));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a32_0x526a(){const _0x11b562=['Local\x20delete\x20not\x20settled\x20for\x20','remoteId','target','join','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','Would\x20delete\x20','Function\x20not\x20found:\x20','2632wiQbaP','lockFilePath','Deleted\x20','14078853bFeMex','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','2735680wakXVx','scriptsRoot','\x20\x20-\x20','2709HLoduK','trashedTo','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','projectRoot','545yKxCVl','No\x20lock\x20entry\x20found\x20for\x20\x22','keys','toISOString','lastSync','delete','parse','10825330XuxTWe','/api/management/library/scripts/delete','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','filter','apps','startsWith','BFF\x20lock\x20file\x20not\x20found.','3174ObGwzs','2155977lbqrbw','POST','high-risk-write','Lock\x20scope\x20for\x20app\x20\x22','scriptsRootDir','validation','1748295GjKjHI','length','appCode','str','Multiple\x20functions\x20match\x20\x22','functions','find','\x20(local\x20file\x20moved\x20to\x20trash)','6quMcCQ','<timestamp>'];a32_0x526a=function(){return _0x11b562;};return a32_0x526a();}import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':'bff','command':a32_0x8b9171(0xb0),'description':a32_0x8b9171(0xa9),'risk':a32_0x8b9171(0x8a),'flags':[{'name':a32_0x8b9171(0x9a),'type':'string','required':!![],'description':a32_0x8b9171(0xb4)}],async 'validate'(_0x50639a){const _0x18348e=a32_0x8b9171,_0xed809d=loadBffProjectConfig(_0x50639a[_0x18348e(0x90)]),_0x41dcd1=await readBffLockFile(_0xed809d[_0x18348e(0xa0)]);if(!_0x41dcd1)throw CliErrors[_0x18348e(0x8d)](_0x18348e(0xa3));},async 'dryRun'(_0x9d1b55){const _0x5cc221=a32_0x8b9171,_0x10e575=loadBffProjectConfig(_0x9d1b55[_0x5cc221(0x90)]),_0x257137=await readBffLockFile(_0x10e575[_0x5cc221(0xa0)]);if(!_0x257137)throw CliErrors['validation'](_0x5cc221(0x86));const {appLock:_0x563294}=ensureLockScope(_0x257137,_0x9d1b55['appCode'],_0x10e575[_0x5cc221(0xa5)],'delete'),_0x325b98=_0x9d1b55[_0x5cc221(0x91)](_0x5cc221(0x9a)),_0x546b07=Object[_0x5cc221(0xad)](_0x563294[_0x5cc221(0x93)]),_0x582439=resolveDeleteTarget(_0x325b98,_0x546b07),_0x29154f=_0x563294[_0x5cc221(0x93)][_0x582439];if(!_0x29154f)throw CliErrors[_0x5cc221(0x8d)](_0x5cc221(0xac)+_0x582439+'\x22.');const _0x251115=resolveLocalFilePathFromLockKey(_0x10e575,_0x582439),_0x1f5ac1=relative(_0x10e575['projectRoot'],_0x251115),_0x2b63f9=join(_0x10e575['trashDir'],_0x5cc221(0x97),_0x1f5ac1);return{'method':_0x5cc221(0x89),'url':_0x5cc221(0xb3),'body':{'appCode':_0x9d1b55[_0x5cc221(0x90)],'target':_0x582439,'remoteId':_0x29154f[_0x5cc221(0x99)],'localFilePath':_0x251115,'trashedPath':_0x2b63f9},'description':_0x5cc221(0x9d)+_0x582439+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x25bcf4){const _0x28e863=a32_0x8b9171,_0x54ce18=loadBffProjectConfig(_0x25bcf4[_0x28e863(0x90)]),_0x5655e1=await readBffLockFile(_0x54ce18['lockFilePath']);if(!_0x5655e1)throw CliErrors[_0x28e863(0x8d)](_0x28e863(0x86));const {lockData:_0x26ea63,appLock:_0x115144}=ensureLockScope(_0x5655e1,_0x25bcf4[_0x28e863(0x90)],_0x54ce18[_0x28e863(0xa5)],'delete'),_0x2dcd61=JSON[_0x28e863(0xb1)](JSON['stringify'](_0x26ea63)),_0x2b96df=_0x2dcd61[_0x28e863(0xb6)][_0x25bcf4[_0x28e863(0x90)]];if(!_0x2b96df)throw new Error(_0x28e863(0x8b)+_0x25bcf4[_0x28e863(0x90)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x42dfdc=_0x25bcf4[_0x28e863(0x91)](_0x28e863(0x9a)),_0x4fc878=Object[_0x28e863(0xad)](_0x2b96df[_0x28e863(0x93)]),_0x4d8082=resolveDeleteTarget(_0x42dfdc,_0x4fc878),_0x5a2a8d=_0x2b96df[_0x28e863(0x93)][_0x4d8082];if(!_0x5a2a8d)throw CliErrors[_0x28e863(0x8d)](_0x28e863(0xac)+_0x4d8082+'\x22.');await deleteBffScript(_0x5a2a8d[_0x28e863(0x99)]),delete _0x2b96df[_0x28e863(0x93)][_0x4d8082],_0x2b96df[_0x28e863(0xaf)]=new Date()[_0x28e863(0xae)](),await writeBffLockFile(_0x54ce18['lockFilePath'],_0x2dcd61);const _0x246163=resolveLocalFilePathFromLockKey(_0x54ce18,_0x4d8082);let _0x5eb4cb;await fileExists(_0x246163)&&(_0x5eb4cb=await moveToTrash(_0x54ce18[_0x28e863(0xaa)],_0x54ce18['trashDir'],_0x246163),await cleanupEmptyDirectories(dirname(_0x246163),_0x54ce18[_0x28e863(0x8c)]));await waitForDeleteSettlement(_0x54ce18[_0x28e863(0xa0)],_0x25bcf4[_0x28e863(0x90)],_0x4d8082,_0x246163),await sleep(0x96);const _0x20d9e0={'deleted':_0x4d8082,'remoteId':_0x5a2a8d[_0x28e863(0x99)]};if(_0x5eb4cb)_0x20d9e0[_0x28e863(0xa8)]=_0x5eb4cb;return{'ok':!![],'data':_0x20d9e0,'message':_0x28e863(0xa1)+_0x4d8082+(_0x5eb4cb?_0x28e863(0x95):'')};}};function a32_0x37c7(_0x169ad3,_0x39784b){_0x169ad3=_0x169ad3-0x86;const _0x526a74=a32_0x526a();let _0x37c77e=_0x526a74[_0x169ad3];return _0x37c77e;}function resolveDeleteTarget(_0x438842,_0x4f52e5){const _0x491fc8=a32_0x8b9171;if(_0x438842['includes']('/')){const _0xe45979=_0x4f52e5[_0x491fc8(0x94)](_0xc75e10=>_0xc75e10===_0x438842);if(!_0xe45979)throw CliErrors[_0x491fc8(0x8d)](_0x491fc8(0x9e)+_0x438842);return _0xe45979;}const _0x59b444=_0x4f52e5[_0x491fc8(0xb5)](_0xe0af29=>_0xe0af29['split']('/')['at'](-0x1)===_0x438842);if(_0x59b444['length']===0x0)throw CliErrors['validation'](_0x491fc8(0x9e)+_0x438842);if(_0x59b444[_0x491fc8(0x8f)]>0x1)throw CliErrors['validation'](_0x491fc8(0x92)+_0x438842+_0x491fc8(0x9c)+_0x59b444['map'](_0x57101b=>_0x491fc8(0xa6)+_0x57101b)[_0x491fc8(0x9b)]('\x0a'));return _0x59b444[0x0];}async function moveToTrash(_0x26af2c,_0x4c5e24,_0xc2ccee){const _0x241332=a32_0x8b9171,_0x5bcc3d=new Date()[_0x241332(0xae)]()['replace'](/[:.]/g,'-'),_0x3596cf=relative(_0x26af2c,_0xc2ccee),_0x279721=join(_0x4c5e24,_0x5bcc3d,_0x3596cf);return await mkdir(dirname(_0x279721),{'recursive':!![]}),await rename(_0xc2ccee,_0x279721),_0x279721;}async function cleanupEmptyDirectories(_0x55ceaf,_0x29cf42){const _0x1abd50=a32_0x8b9171;let _0x3fd458=resolve(_0x55ceaf);const _0x4f4eed=resolve(_0x29cf42);while(_0x3fd458[_0x1abd50(0xb7)](''+_0x4f4eed+sep)||_0x3fd458===_0x4f4eed){if(_0x3fd458===_0x4f4eed)return;try{const _0x46fb3e=await readdir(_0x3fd458);if(_0x46fb3e[_0x1abd50(0x8f)]>0x0)return;await rmdir(_0x3fd458);}catch{return;}_0x3fd458=dirname(_0x3fd458);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x35afa0,_0x33b28c,_0x13e394,_0x465c7b){const _0x8c8851=a32_0x8b9171;for(let _0x350c13=0x0;_0x350c13<DELETE_SETTLE_RETRY_COUNT;_0x350c13+=0x1){const _0x4b0177=await readBffLockFile(_0x35afa0),_0x3826d2=!!_0x4b0177?.['apps']?.[_0x33b28c]?.[_0x8c8851(0x93)]?.[_0x13e394],_0x3c3e62=await fileExists(_0x465c7b);if(!_0x3826d2&&!_0x3c3e62)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x8c8851(0x98)+_0x13e394+'.');}
1
+ const a32_0x350122=a32_0xca41;function a32_0xb3e0(){const _0x3e41f2=['612778Ysmacc','3cCBroB','Function\x20not\x20found:\x20','projectRoot','validation','split','Local\x20delete\x20not\x20settled\x20for\x20','606sqXOXG','stringify','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','functions','scriptsRoot','/api/management/library/scripts/delete','map','toISOString','1112489iCRhGk','bff','12aHPgxh','apps','appCode','delete','4720528rmzvuG','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','Would\x20delete\x20','Lock\x20scope\x20for\x20app\x20\x22','parse','length','845EyGmSA','replace','Multiple\x20functions\x20match\x20\x22','27461XKiWKZ','filter','BFF\x20lock\x20file\x20not\x20found.','startsWith','18kPUeeS','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','find','string','scriptsRootDir','5209138ZNuOSp','keys','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','remoteId','join','target','No\x20lock\x20entry\x20found\x20for\x20\x22','trashDir','920rxxnSX','str','lockFilePath','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','\x20\x20-\x20','high-risk-write','4806380KmWSjs','Deleted\x20','\x20(local\x20file\x20moved\x20to\x20trash)','lastSync'];a32_0xb3e0=function(){return _0x3e41f2;};return a32_0xb3e0();}(function(_0x12af14,_0x492316){const _0xbe1a52=a32_0xca41,_0x1e13d8=_0x12af14();while(!![]){try{const _0xd7bd42=-parseInt(_0xbe1a52(0xbe))/0x1+parseInt(_0xbe1a52(0xaf))/0x2*(parseInt(_0xbe1a52(0xb0))/0x3)+parseInt(_0xbe1a52(0xa5))/0x4*(-parseInt(_0xbe1a52(0xca))/0x5)+-parseInt(_0xbe1a52(0xb6))/0x6*(-parseInt(_0xbe1a52(0xcd))/0x7)+-parseInt(_0xbe1a52(0xc4))/0x8*(-parseInt(_0xbe1a52(0xd1))/0x9)+-parseInt(_0xbe1a52(0xab))/0xa+-parseInt(_0xbe1a52(0x9d))/0xb*(-parseInt(_0xbe1a52(0xc0))/0xc);if(_0xd7bd42===_0x492316)break;else _0x1e13d8['push'](_0x1e13d8['shift']());}catch(_0x4d7851){_0x1e13d8['push'](_0x1e13d8['shift']());}}}(a32_0xb3e0,0xb0d51));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x350122(0xbf),'command':a32_0x350122(0xc3),'description':a32_0x350122(0xc5),'risk':a32_0x350122(0xaa),'flags':[{'name':'target','type':a32_0x350122(0x9b),'required':!![],'description':a32_0x350122(0x99)}],async 'validate'(_0x2f7a26){const _0x1dc9e3=a32_0x350122,_0x2303a0=loadBffProjectConfig(_0x2f7a26[_0x1dc9e3(0xc2)]),_0x284630=await readBffLockFile(_0x2303a0[_0x1dc9e3(0xa7)]);if(!_0x284630)throw CliErrors[_0x1dc9e3(0xb3)](_0x1dc9e3(0x9f));},async 'dryRun'(_0x49b5aa){const _0x56ebfb=a32_0x350122,_0x37fbfb=loadBffProjectConfig(_0x49b5aa[_0x56ebfb(0xc2)]),_0xe2d26c=await readBffLockFile(_0x37fbfb[_0x56ebfb(0xa7)]);if(!_0xe2d26c)throw CliErrors[_0x56ebfb(0xb3)](_0x56ebfb(0xcf));const {appLock:_0x109873}=ensureLockScope(_0xe2d26c,_0x49b5aa['appCode'],_0x37fbfb[_0x56ebfb(0xba)],_0x56ebfb(0xc3)),_0xf1bea8=_0x49b5aa[_0x56ebfb(0xa6)](_0x56ebfb(0xa2)),_0xb225f7=Object[_0x56ebfb(0x9e)](_0x109873[_0x56ebfb(0xb9)]),_0x8e41cc=resolveDeleteTarget(_0xf1bea8,_0xb225f7),_0x43afc2=_0x109873[_0x56ebfb(0xb9)][_0x8e41cc];if(!_0x43afc2)throw CliErrors[_0x56ebfb(0xb3)](_0x56ebfb(0xa3)+_0x8e41cc+'\x22.');const _0x522714=resolveLocalFilePathFromLockKey(_0x37fbfb,_0x8e41cc),_0x515cf2=relative(_0x37fbfb[_0x56ebfb(0xb2)],_0x522714),_0x48ee50=join(_0x37fbfb[_0x56ebfb(0xa4)],'<timestamp>',_0x515cf2);return{'method':'POST','url':_0x56ebfb(0xbb),'body':{'appCode':_0x49b5aa['appCode'],'target':_0x8e41cc,'remoteId':_0x43afc2[_0x56ebfb(0xa0)],'localFilePath':_0x522714,'trashedPath':_0x48ee50},'description':_0x56ebfb(0xc6)+_0x8e41cc+_0x56ebfb(0xb8)};},async 'execute'(_0x3aa6cb){const _0xa616a8=a32_0x350122,_0x13567d=loadBffProjectConfig(_0x3aa6cb[_0xa616a8(0xc2)]),_0x2ef48c=await readBffLockFile(_0x13567d[_0xa616a8(0xa7)]);if(!_0x2ef48c)throw CliErrors[_0xa616a8(0xb3)]('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x41c84f,appLock:_0x495fb8}=ensureLockScope(_0x2ef48c,_0x3aa6cb['appCode'],_0x13567d['scriptsRoot'],_0xa616a8(0xc3)),_0x26c987=JSON[_0xa616a8(0xc8)](JSON[_0xa616a8(0xb7)](_0x41c84f)),_0x465e84=_0x26c987[_0xa616a8(0xc1)][_0x3aa6cb['appCode']];if(!_0x465e84)throw new Error(_0xa616a8(0xc7)+_0x3aa6cb['appCode']+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x1813c1=_0x3aa6cb[_0xa616a8(0xa6)](_0xa616a8(0xa2)),_0x2e4755=Object[_0xa616a8(0x9e)](_0x465e84[_0xa616a8(0xb9)]),_0x4c6eac=resolveDeleteTarget(_0x1813c1,_0x2e4755),_0x469993=_0x465e84['functions'][_0x4c6eac];if(!_0x469993)throw CliErrors[_0xa616a8(0xb3)](_0xa616a8(0xa3)+_0x4c6eac+'\x22.');await deleteBffScript(_0x469993[_0xa616a8(0xa0)]),delete _0x465e84['functions'][_0x4c6eac],_0x465e84[_0xa616a8(0xae)]=new Date()[_0xa616a8(0xbd)](),await writeBffLockFile(_0x13567d[_0xa616a8(0xa7)],_0x26c987);const _0x62d09b=resolveLocalFilePathFromLockKey(_0x13567d,_0x4c6eac);let _0x4e46e5;await fileExists(_0x62d09b)&&(_0x4e46e5=await moveToTrash(_0x13567d['projectRoot'],_0x13567d['trashDir'],_0x62d09b),await cleanupEmptyDirectories(dirname(_0x62d09b),_0x13567d[_0xa616a8(0x9c)]));await waitForDeleteSettlement(_0x13567d[_0xa616a8(0xa7)],_0x3aa6cb[_0xa616a8(0xc2)],_0x4c6eac,_0x62d09b),await sleep(0x96);const _0x35974e={'deleted':_0x4c6eac,'remoteId':_0x469993[_0xa616a8(0xa0)]};if(_0x4e46e5)_0x35974e['trashedTo']=_0x4e46e5;return{'ok':!![],'data':_0x35974e,'message':_0xa616a8(0xac)+_0x4c6eac+(_0x4e46e5?_0xa616a8(0xad):'')};}};function resolveDeleteTarget(_0xd05df9,_0x22aec5){const _0x5306=a32_0x350122;if(_0xd05df9['includes']('/')){const _0x449ea5=_0x22aec5[_0x5306(0x9a)](_0x307e71=>_0x307e71===_0xd05df9);if(!_0x449ea5)throw CliErrors[_0x5306(0xb3)](_0x5306(0xb1)+_0xd05df9);return _0x449ea5;}const _0xba7a8d=_0x22aec5[_0x5306(0xce)](_0x1d89e0=>_0x1d89e0[_0x5306(0xb4)]('/')['at'](-0x1)===_0xd05df9);if(_0xba7a8d['length']===0x0)throw CliErrors[_0x5306(0xb3)](_0x5306(0xb1)+_0xd05df9);if(_0xba7a8d[_0x5306(0xc9)]>0x1)throw CliErrors[_0x5306(0xb3)](_0x5306(0xcc)+_0xd05df9+_0x5306(0xa8)+_0xba7a8d[_0x5306(0xbc)](_0x7e40ba=>_0x5306(0xa9)+_0x7e40ba)[_0x5306(0xa1)]('\x0a'));return _0xba7a8d[0x0];}async function moveToTrash(_0x5c9b91,_0x3c6aa3,_0x311be1){const _0x2937d5=a32_0x350122,_0x3b4b14=new Date()[_0x2937d5(0xbd)]()[_0x2937d5(0xcb)](/[:.]/g,'-'),_0x58be11=relative(_0x5c9b91,_0x311be1),_0x9dcbe2=join(_0x3c6aa3,_0x3b4b14,_0x58be11);return await mkdir(dirname(_0x9dcbe2),{'recursive':!![]}),await rename(_0x311be1,_0x9dcbe2),_0x9dcbe2;}async function cleanupEmptyDirectories(_0x2feebe,_0x38fdb0){const _0x1e993e=a32_0x350122;let _0x24a7d9=resolve(_0x2feebe);const _0x311495=resolve(_0x38fdb0);while(_0x24a7d9[_0x1e993e(0xd0)](''+_0x311495+sep)||_0x24a7d9===_0x311495){if(_0x24a7d9===_0x311495)return;try{const _0xa50efd=await readdir(_0x24a7d9);if(_0xa50efd[_0x1e993e(0xc9)]>0x0)return;await rmdir(_0x24a7d9);}catch{return;}_0x24a7d9=dirname(_0x24a7d9);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;function a32_0xca41(_0x3b5421,_0x2ff605){_0x3b5421=_0x3b5421-0x99;const _0xb3e043=a32_0xb3e0();let _0xca41b=_0xb3e043[_0x3b5421];return _0xca41b;}async function waitForDeleteSettlement(_0x171f41,_0x198239,_0x582630,_0xd74b45){const _0x292f54=a32_0x350122;for(let _0x43c674=0x0;_0x43c674<DELETE_SETTLE_RETRY_COUNT;_0x43c674+=0x1){const _0x4b880d=await readBffLockFile(_0x171f41),_0x2591e4=!!_0x4b880d?.['apps']?.[_0x198239]?.['functions']?.[_0x582630],_0x1ab740=await fileExists(_0xd74b45);if(!_0x2591e4&&!_0x1ab740)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x292f54(0xb5)+_0x582630+'.');}
@@ -1 +1 @@
1
- const a33_0x1a53cd=a33_0x4179;function a33_0x4179(_0x5a9cef,_0xe7afea){_0x5a9cef=_0x5a9cef-0x166;const _0x2f062f=a33_0x2f06();let _0x41793e=_0x2f062f[_0x5a9cef];return _0x41793e;}function a33_0x2f06(){const _0x18a2f4=['verbose','6dFWPZf','1771464leWCoQ','num','read','149510kzpvBM','821813VXyFJY','description','appCode','18GTOSWh','updatedTime','178IawhNP','Return\x20full\x20raw\x20script\x20object','number','Script\x20ID','scriptType','2373148rcOsgW','bff','1781810ovFrgb','createdTime','5574128lVrnrX','(none)','detail','Get\x20BFF\x20script\x20details\x20by\x20ID','boolean','9219iEoBWP'];a33_0x2f06=function(){return _0x18a2f4;};return a33_0x2f06();}(function(_0x4c330f,_0x173b72){const _0xa62210=a33_0x4179,_0x4dd89d=_0x4c330f();while(!![]){try{const _0x384caf=parseInt(_0xa62210(0x168))/0x1+-parseInt(_0xa62210(0x16d))/0x2*(parseInt(_0xa62210(0x17b))/0x3)+parseInt(_0xa62210(0x172))/0x4+parseInt(_0xa62210(0x174))/0x5+parseInt(_0xa62210(0x17d))/0x6*(-parseInt(_0xa62210(0x176))/0x7)+-parseInt(_0xa62210(0x17e))/0x8+-parseInt(_0xa62210(0x16b))/0x9*(parseInt(_0xa62210(0x167))/0xa);if(_0x384caf===_0x173b72)break;else _0x4dd89d['push'](_0x4dd89d['shift']());}catch(_0x43b39f){_0x4dd89d['push'](_0x4dd89d['shift']());}}}(a33_0x2f06,0x6df16));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0x1a53cd(0x173),'command':a33_0x1a53cd(0x178),'description':a33_0x1a53cd(0x179),'risk':a33_0x1a53cd(0x166),'flags':[{'name':'id','type':a33_0x1a53cd(0x16f),'required':!![],'description':a33_0x1a53cd(0x170)},{'name':'verbose','type':a33_0x1a53cd(0x17a),'description':a33_0x1a53cd(0x16e)}],async 'execute'(_0x24c3b9){const _0x206b12=a33_0x1a53cd,_0x21b6a7=await getBffScriptInfo(_0x24c3b9[_0x206b12(0x17f)]('id')),_0x222364=_0x24c3b9['bool'](_0x206b12(0x17c));if(_0x222364)return{'ok':!![],'data':_0x21b6a7};return{'ok':!![],'data':{'id':_0x21b6a7['id'],'appCode':_0x21b6a7[_0x206b12(0x16a)],'scriptType':_0x21b6a7[_0x206b12(0x171)],'description':_0x21b6a7[_0x206b12(0x169)]||_0x206b12(0x177),'createdTime':_0x21b6a7[_0x206b12(0x175)]??'','updatedTime':_0x21b6a7[_0x206b12(0x16c)]??'','scriptContent':_0x21b6a7['scriptContent']??''}};}};
1
+ function a33_0x20d0(_0xfdb397,_0x960fc0){_0xfdb397=_0xfdb397-0x1c6;const _0x58d376=a33_0x58d3();let _0x20d0a5=_0x58d376[_0xfdb397];return _0x20d0a5;}const a33_0x410fbe=a33_0x20d0;(function(_0x46d1da,_0x2b1e3a){const _0x22abf2=a33_0x20d0,_0x1150a=_0x46d1da();while(!![]){try{const _0x1a95f6=parseInt(_0x22abf2(0x1d6))/0x1*(-parseInt(_0x22abf2(0x1d0))/0x2)+parseInt(_0x22abf2(0x1cf))/0x3+-parseInt(_0x22abf2(0x1c9))/0x4+-parseInt(_0x22abf2(0x1da))/0x5*(parseInt(_0x22abf2(0x1d8))/0x6)+-parseInt(_0x22abf2(0x1d4))/0x7+-parseInt(_0x22abf2(0x1cb))/0x8*(parseInt(_0x22abf2(0x1d1))/0x9)+parseInt(_0x22abf2(0x1cd))/0xa*(parseInt(_0x22abf2(0x1ce))/0xb);if(_0x1a95f6===_0x2b1e3a)break;else _0x1150a['push'](_0x1150a['shift']());}catch(_0x5340ee){_0x1150a['push'](_0x1150a['shift']());}}}(a33_0x58d3,0x8b632));import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x58d3(){const _0xdb8d42=['number','3825108HRaaMT','bff','60656wAQGZB','(none)','35274380dprgtX','11MMNKcO','161082xgcYuz','6zkddrC','1314TffMyI','Return\x20full\x20raw\x20script\x20object','detail','4010300eruObt','description','5599xFxXDO','createdTime','12cuQZGm','Script\x20ID','893140fsoRXw','bool','verbose','boolean','appCode','read'];a33_0x58d3=function(){return _0xdb8d42;};return a33_0x58d3();}export const bffDetail={'service':a33_0x410fbe(0x1ca),'command':a33_0x410fbe(0x1d3),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a33_0x410fbe(0x1c7),'flags':[{'name':'id','type':a33_0x410fbe(0x1c8),'required':!![],'description':a33_0x410fbe(0x1d9)},{'name':a33_0x410fbe(0x1dc),'type':a33_0x410fbe(0x1dd),'description':a33_0x410fbe(0x1d2)}],async 'execute'(_0x16e9e9){const _0x2adcf5=a33_0x410fbe,_0xd9ac50=await getBffScriptInfo(_0x16e9e9['num']('id')),_0x2200fd=_0x16e9e9[_0x2adcf5(0x1db)](_0x2adcf5(0x1dc));if(_0x2200fd)return{'ok':!![],'data':_0xd9ac50};return{'ok':!![],'data':{'id':_0xd9ac50['id'],'appCode':_0xd9ac50[_0x2adcf5(0x1c6)],'scriptType':_0xd9ac50['scriptType'],'description':_0xd9ac50[_0x2adcf5(0x1d5)]||_0x2adcf5(0x1cc),'createdTime':_0xd9ac50[_0x2adcf5(0x1d7)]??'','updatedTime':_0xd9ac50['updatedTime']??'','scriptContent':_0xd9ac50['scriptContent']??''}};}};
@@ -1 +1 @@
1
- function a34_0xef6c(_0x3a26bb,_0x5851b5){_0x3a26bb=_0x3a26bb-0x12f;const _0x49a462=a34_0x49a4();let _0xef6c2d=_0x49a462[_0x3a26bb];return _0xef6c2d;}(function(_0x20b670,_0x4f0a17){const _0x4b7e6e=a34_0xef6c,_0x4ebe9b=_0x20b670();while(!![]){try{const _0x39f6dc=-parseInt(_0x4b7e6e(0x130))/0x1+parseInt(_0x4b7e6e(0x138))/0x2*(-parseInt(_0x4b7e6e(0x133))/0x3)+parseInt(_0x4b7e6e(0x131))/0x4*(parseInt(_0x4b7e6e(0x135))/0x5)+parseInt(_0x4b7e6e(0x12f))/0x6+-parseInt(_0x4b7e6e(0x137))/0x7+-parseInt(_0x4b7e6e(0x132))/0x8+-parseInt(_0x4b7e6e(0x136))/0x9*(parseInt(_0x4b7e6e(0x134))/0xa);if(_0x39f6dc===_0x4f0a17)break;else _0x4ebe9b['push'](_0x4ebe9b['shift']());}catch(_0x550677){_0x4ebe9b['push'](_0x4ebe9b['shift']());}}}(a34_0x49a4,0xc4fa5));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';function a34_0x49a4(){const _0x27b1eb=['18572cdhzEN','8425302YHFOMk','1024769iKpqIb','6011156LKiegH','3676136drTAAa','3CcYgoY','20UCnVAP','5EVpKiy','1724670jzJMHd','1563471vDoCHI'];a34_0x49a4=function(){return _0x27b1eb;};return a34_0x49a4();}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0x401fca,_0x534fb6){const _0x184b47=a34_0x155c,_0x31a74c=_0x401fca();while(!![]){try{const _0x11d067=parseInt(_0x184b47(0x1d0))/0x1+parseInt(_0x184b47(0x1d6))/0x2*(parseInt(_0x184b47(0x1d3))/0x3)+-parseInt(_0x184b47(0x1d2))/0x4*(parseInt(_0x184b47(0x1d9))/0x5)+parseInt(_0x184b47(0x1d1))/0x6+parseInt(_0x184b47(0x1d5))/0x7*(-parseInt(_0x184b47(0x1d7))/0x8)+parseInt(_0x184b47(0x1d8))/0x9+-parseInt(_0x184b47(0x1d4))/0xa;if(_0x11d067===_0x534fb6)break;else _0x31a74c['push'](_0x31a74c['shift']());}catch(_0x57060b){_0x31a74c['push'](_0x31a74c['shift']());}}}(a34_0x810d,0x1968d));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';function a34_0x155c(_0x138e21,_0x5a0d86){_0x138e21=_0x138e21-0x1d0;const _0x810d87=a34_0x810d();let _0x155cbd=_0x810d87[_0x138e21];return _0x155cbd;}import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';function a34_0x810d(){const _0x4da7c0=['48736EckZoF','4881xcfvTO','136730BoyqZN','7csDKqu','38vexKBB','596944JDJbaw','837918cgLoWk','20jExBNX','60456DcOYqq','339798sZnphM'];a34_0x810d=function(){return _0x4da7c0;};return a34_0x810d();}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];