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

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 (260) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- function a19_0x1f06(){const _0x3c4865=['1888440JTynUL','18fIUyek','2135960fsQgYl','7751772mipppO','5213532etpuAw','4277ZmaEss','5195425mYAnSm','122719hKgwwE','9776AaagWK'];a19_0x1f06=function(){return _0x3c4865;};return a19_0x1f06();}(function(_0x4bd91a,_0x268343){const _0x466fdd=a19_0x3d54,_0x59f8fe=_0x4bd91a();while(!![]){try{const _0x44de80=-parseInt(_0x466fdd(0x171))/0x1*(parseInt(_0x466fdd(0x174))/0x2)+parseInt(_0x466fdd(0x173))/0x3+-parseInt(_0x466fdd(0x175))/0x4+parseInt(_0x466fdd(0x170))/0x5+parseInt(_0x466fdd(0x177))/0x6+parseInt(_0x466fdd(0x16f))/0x7*(parseInt(_0x466fdd(0x172))/0x8)+-parseInt(_0x466fdd(0x176))/0x9;if(_0x44de80===_0x268343)break;else _0x59f8fe['push'](_0x59f8fe['shift']());}catch(_0x5cf372){_0x59f8fe['push'](_0x59f8fe['shift']());}}}(a19_0x1f06,0xbf7e8));import{appListDefinition}from'../../commands/app/list.js';import{appAddDefinition}from'../../commands/app/add.js';function a19_0x3d54(_0xb1fddb,_0x314fea){_0xb1fddb=_0xb1fddb-0x16f;const _0x1f06ea=a19_0x1f06();let _0x3d5436=_0x1f06ea[_0xb1fddb];return _0x3d5436;}import{appRemoveDefinition}from'../../commands/app/remove.js';export const appDefinitions=[appListDefinition,appAddDefinition,appRemoveDefinition];
1
+ (function(_0x33af5f,_0x1666cc){const _0x1ace85=a19_0x2c2a,_0x1aab0a=_0x33af5f();while(!![]){try{const _0x4a3cdb=-parseInt(_0x1ace85(0x14e))/0x1*(-parseInt(_0x1ace85(0x145))/0x2)+-parseInt(_0x1ace85(0x14d))/0x3*(-parseInt(_0x1ace85(0x144))/0x4)+-parseInt(_0x1ace85(0x14c))/0x5*(-parseInt(_0x1ace85(0x14a))/0x6)+parseInt(_0x1ace85(0x143))/0x7*(-parseInt(_0x1ace85(0x147))/0x8)+-parseInt(_0x1ace85(0x149))/0x9*(-parseInt(_0x1ace85(0x14f))/0xa)+-parseInt(_0x1ace85(0x148))/0xb*(parseInt(_0x1ace85(0x146))/0xc)+-parseInt(_0x1ace85(0x14b))/0xd;if(_0x4a3cdb===_0x1666cc)break;else _0x1aab0a['push'](_0x1aab0a['shift']());}catch(_0x3381aa){_0x1aab0a['push'](_0x1aab0a['shift']());}}}(a19_0x572c,0x4f026));import{appListDefinition}from'../../commands/app/list.js';import{appAddDefinition}from'../../commands/app/add.js';function a19_0x2c2a(_0xbc5fed,_0x4b1840){_0xbc5fed=_0xbc5fed-0x143;const _0x572cf1=a19_0x572c();let _0x2c2a4f=_0x572cf1[_0xbc5fed];return _0x2c2a4f;}import{appRemoveDefinition}from'../../commands/app/remove.js';export const appDefinitions=[appListDefinition,appAddDefinition,appRemoveDefinition];function a19_0x572c(){const _0x16dbe7=['25061GrXOxx','442490TbPKGz','7MfZLBc','1075252ZPwGzZ','40OpEOiy','1012980Wbxibb','1386024fcVMFY','44BOGAtU','27qFmrHN','6gizzwd','4333056JSFLrV','1325335jluIUw','3mODReK'];a19_0x572c=function(){return _0x16dbe7;};return a19_0x572c();}
@@ -1 +1 @@
1
- const a20_0x3a8d9a=a20_0xba97;(function(_0x3eb24f,_0x4c2232){const _0x556c0c=a20_0xba97,_0x58b07f=_0x3eb24f();while(!![]){try{const _0xff8d0b=parseInt(_0x556c0c(0x8a))/0x1+-parseInt(_0x556c0c(0xac))/0x2+parseInt(_0x556c0c(0x96))/0x3*(parseInt(_0x556c0c(0x99))/0x4)+-parseInt(_0x556c0c(0x9d))/0x5*(parseInt(_0x556c0c(0xad))/0x6)+-parseInt(_0x556c0c(0x8b))/0x7*(parseInt(_0x556c0c(0xaa))/0x8)+parseInt(_0x556c0c(0x92))/0x9*(parseInt(_0x556c0c(0x9c))/0xa)+-parseInt(_0x556c0c(0x8e))/0xb*(-parseInt(_0x556c0c(0xa2))/0xc);if(_0xff8d0b===_0x4c2232)break;else _0x58b07f['push'](_0x58b07f['shift']());}catch(_0x45406e){_0x58b07f['push'](_0x58b07f['shift']());}}}(a20_0x4263,0x5ea4c));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(_0x599f4,_0x289a96){const _0x517cdf=a20_0xba97,_0x1fbd53=[],_0x52f30f=_0x599f4[_0x517cdf(0x82)]&&typeof _0x599f4[_0x517cdf(0x82)]==='object'?_0x599f4[_0x517cdf(0x82)]:{},_0x11258b=_0x599f4[_0x517cdf(0xa1)]||undefined;for(const [_0x79808,_0x32e649]of Object[_0x517cdf(0xa8)](_0x52f30f)){if(!_0x32e649||typeof _0x32e649!==_0x517cdf(0x89)||!_0x32e649[_0x517cdf(0xa6)])continue;_0x1fbd53[_0x517cdf(0x9e)]({'name':_0x79808,'appcode':_0x32e649['appcode'],'named':!![],'definedIn':_0x289a96,'isDefault':_0x79808===_0x11258b,...buildAppProfileListFields(_0x32e649)});}return _0x1fbd53;}function a20_0xba97(_0x104fbc,_0x381706){_0x104fbc=_0x104fbc-0x81;const _0x426320=a20_0x4263();let _0xba9739=_0x426320[_0x104fbc];return _0xba9739;}function buildMergedItems(_0x370958,_0x3aa2f2){const _0x3f70d4=a20_0xba97,{apps:apps={},defaultApp:_0x5de8a0}=_0x370958,_0x43817d=_0x3aa2f2[_0x3f70d4(0xa5)]['apps']&&typeof _0x3aa2f2[_0x3f70d4(0xa5)][_0x3f70d4(0x82)]===_0x3f70d4(0x89)?_0x3aa2f2[_0x3f70d4(0xa5)][_0x3f70d4(0x82)]:{},_0x1dfec7=_0x3aa2f2[_0x3f70d4(0x90)][_0x3f70d4(0x82)]&&typeof _0x3aa2f2[_0x3f70d4(0x90)][_0x3f70d4(0x82)]==='object'?_0x3aa2f2[_0x3f70d4(0x90)][_0x3f70d4(0x82)]:{},_0xd5d7a9=_0x3aa2f2['projectConfig']['inherit']===![],_0x244bb1=Object[_0x3f70d4(0xa8)](apps),_0x72aea7=_0x244bb1[_0x3f70d4(0x8f)](([_0xb90294,_0x396927])=>({'name':_0xb90294,'appcode':_0x396927[_0x3f70d4(0xa6)],'named':!![],'definedIn':appDefinedIn(_0xb90294,_0x43817d,_0x1dfec7,_0xd5d7a9),'isDefault':_0xb90294===_0x5de8a0,...buildAppProfileListFields(_0x396927)}));return _0x72aea7;}function validateAppListFlags(_0x52399a){const _0x1c3b63=a20_0xba97;if(!_0x52399a[_0x1c3b63(0x83)](_0x1c3b63(0x94)))return;if(!_0x52399a[_0x1c3b63(0x83)]('global')&&!_0x52399a[_0x1c3b63(0x83)]('project'))return;throw CliErrors[_0x1c3b63(0x88)](_0x1c3b63(0x9b),_0x1c3b63(0xa3));}function a20_0x4263(){const _0xc05fc1=['Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','apps','bool','.\x20Use\x20`','mergedCli','global','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','validation','object','520345wvWgMh','161ZCziXz','globalPath','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','4827988Ykzbsl','map','projectConfig','length','170073SNrWjB','find','remote','No\x20apps\x20configured','10671XrDWOl','read','app','276XkILOX','optional','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','10eiyVzm','608730ESceTA','push','merged','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','defaultApp','12PiehyI','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','\x20in\x20','globalConfig','appcode','\x20config','entries','project','202712UWAwbg','boolean','262760mezAkg','6PfCQXs','projectPath'];a20_0x4263=function(){return _0xc05fc1;};return a20_0x4263();}async function execute(_0x50ae54){const _0x531098=a20_0xba97;validateAppListFlags(_0x50ae54);if(_0x50ae54[_0x531098(0x83)](_0x531098(0x94)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x50ae54)};const _0x71be21=_0x50ae54[_0x531098(0x83)](_0x531098(0x86)),_0x1ec04a=_0x50ae54[_0x531098(0x83)](_0x531098(0xa9)),_0x39dedd=_0x71be21?_0x531098(0x86):_0x1ec04a?_0x531098(0xa9):'merged',{config:_0x3f7226,layers:_0x3bb17c}=readRawConfigWithLayers(),_0x2f2dd1=resolveDefaultAppSource(_0x3bb17c),{defaultApp:_0x3a8119}=_0x3f7226;let _0x54445e,_0x37d27b;switch(_0x39dedd){case _0x531098(0x86):_0x54445e=buildItemsFromLayer(_0x3bb17c[_0x531098(0xa5)],_0x531098(0x86)),_0x37d27b=_0x3bb17c[_0x531098(0x8c)];break;case _0x531098(0xa9):_0x54445e=buildItemsFromLayer(_0x3bb17c[_0x531098(0x90)],_0x531098(0xa9)),_0x37d27b=_0x3bb17c[_0x531098(0xae)];break;default:_0x54445e=buildMergedItems(_0x3f7226,_0x3bb17c);break;}enrichAppListItemsWithMergedSelection(_0x54445e,_0x50ae54[_0x531098(0x85)]);if(_0x54445e[_0x531098(0x91)]===0x0){const _0x196ce4=_0x39dedd===_0x531098(0x9f)?'':_0x531098(0xa4)+_0x39dedd+_0x531098(0xa7);return{'ok':!![],'data':[],'message':_0x531098(0x95)+_0x196ce4+_0x531098(0x84)+CLI_BIN_NAME+_0x531098(0x8d)};}const _0x216ce5=_0x54445e[_0x531098(0x93)](_0x4a686b=>_0x4a686b['isCurrent']===!![]),_0x2537db=_0x3a8119??_0x216ce5?.['appcode']??null,_0x4efbfa=_0x39dedd===_0x531098(0x9f)?{'globalPath':_0x3bb17c['globalPath']??null,'projectPath':_0x3bb17c['projectPath']??null,'defaultApp':_0x2537db,'defaultAppSource':_0x3a8119!=null?_0x2f2dd1:null}:{'scope':_0x39dedd,'configPath':_0x37d27b??null};return{'ok':!![],'data':{'items':_0x54445e,'meta':_0x4efbfa}};}export const appListDefinition={'service':a20_0x3a8d9a(0x98),'command':'list','description':a20_0x3a8d9a(0xa0),'risk':a20_0x3a8d9a(0x97),'auth':a20_0x3a8d9a(0x9a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x3a8d9a(0x94),'type':a20_0x3a8d9a(0xab),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':a20_0x3a8d9a(0x86),'type':a20_0x3a8d9a(0xab),'description':a20_0x3a8d9a(0x81),'default':![]},{'name':'project','type':a20_0x3a8d9a(0xab),'description':a20_0x3a8d9a(0x87),'default':![]}],async 'validate'(_0x5ce0b8){validateAppListFlags(_0x5ce0b8);},'execute':execute};
1
+ const a20_0x19e1fd=a20_0x2ffd;(function(_0x5a79d3,_0x566778){const _0x24892e=a20_0x2ffd,_0x3d5d72=_0x5a79d3();while(!![]){try{const _0x47d285=-parseInt(_0x24892e(0x1e3))/0x1*(parseInt(_0x24892e(0x1df))/0x2)+parseInt(_0x24892e(0x1c4))/0x3*(-parseInt(_0x24892e(0x1bc))/0x4)+parseInt(_0x24892e(0x1cd))/0x5+-parseInt(_0x24892e(0x1cf))/0x6+-parseInt(_0x24892e(0x1d2))/0x7*(-parseInt(_0x24892e(0x1c2))/0x8)+-parseInt(_0x24892e(0x1d0))/0x9*(parseInt(_0x24892e(0x1e2))/0xa)+parseInt(_0x24892e(0x1bb))/0xb;if(_0x47d285===_0x566778)break;else _0x3d5d72['push'](_0x3d5d72['shift']());}catch(_0x2986c0){_0x3d5d72['push'](_0x3d5d72['shift']());}}}(a20_0x287d,0x60cf4));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';function a20_0x2ffd(_0x17ae3c,_0x4a8d8c){_0x17ae3c=_0x17ae3c-0x1ba;const _0x287d96=a20_0x287d();let _0x2ffd98=_0x287d96[_0x17ae3c];return _0x2ffd98;}import{listRemoteAppDirectory}from'../../commands/app/remote-directory.js';function buildItemsFromLayer(_0x16acdb,_0x18707d){const _0x28837f=a20_0x2ffd,_0x25ea9c=[],_0x3a90b2=_0x16acdb['apps']&&typeof _0x16acdb[_0x28837f(0x1e4)]===_0x28837f(0x1cc)?_0x16acdb[_0x28837f(0x1e4)]:{},_0x566d29=_0x16acdb[_0x28837f(0x1dc)]||undefined;for(const [_0x197e5b,_0x35c26e]of Object[_0x28837f(0x1c0)](_0x3a90b2)){if(!_0x35c26e||typeof _0x35c26e!=='object'||!_0x35c26e[_0x28837f(0x1db)])continue;_0x25ea9c[_0x28837f(0x1d7)]({'name':_0x197e5b,'appcode':_0x35c26e[_0x28837f(0x1db)],'named':!![],'definedIn':_0x18707d,'isDefault':_0x197e5b===_0x566d29,...buildAppProfileListFields(_0x35c26e)});}return _0x25ea9c;}function buildMergedItems(_0x2e5fcc,_0x531581){const _0x16c059=a20_0x2ffd,{apps:apps={},defaultApp:_0x4aa70d}=_0x2e5fcc,_0x561aa5=_0x531581[_0x16c059(0x1d4)]['apps']&&typeof _0x531581[_0x16c059(0x1d4)][_0x16c059(0x1e4)]===_0x16c059(0x1cc)?_0x531581[_0x16c059(0x1d4)][_0x16c059(0x1e4)]:{},_0x778592=_0x531581[_0x16c059(0x1bf)][_0x16c059(0x1e4)]&&typeof _0x531581[_0x16c059(0x1bf)]['apps']===_0x16c059(0x1cc)?_0x531581[_0x16c059(0x1bf)][_0x16c059(0x1e4)]:{},_0x4a2869=_0x531581[_0x16c059(0x1bf)]['inherit']===![],_0xf2c9c8=Object['entries'](apps),_0x47b137=_0xf2c9c8[_0x16c059(0x1de)](([_0x41c775,_0xc207a3])=>({'name':_0x41c775,'appcode':_0xc207a3[_0x16c059(0x1db)],'named':!![],'definedIn':appDefinedIn(_0x41c775,_0x561aa5,_0x778592,_0x4a2869),'isDefault':_0x41c775===_0x4aa70d,...buildAppProfileListFields(_0xc207a3)}));return _0x47b137;}function validateAppListFlags(_0xa4a8b7){const _0x1d5817=a20_0x2ffd;if(!_0xa4a8b7[_0x1d5817(0x1bd)](_0x1d5817(0x1e1)))return;if(!_0xa4a8b7[_0x1d5817(0x1bd)]('global')&&!_0xa4a8b7[_0x1d5817(0x1bd)](_0x1d5817(0x1c7)))return;throw CliErrors['validation'](_0x1d5817(0x1dd),_0x1d5817(0x1d8));}async function execute(_0x8b8869){const _0x29a865=a20_0x2ffd;validateAppListFlags(_0x8b8869);if(_0x8b8869[_0x29a865(0x1bd)]('remote'))return{'ok':!![],'data':await listRemoteAppDirectory(_0x8b8869)};const _0x59156a=_0x8b8869['bool'](_0x29a865(0x1e5)),_0x16693c=_0x8b8869[_0x29a865(0x1bd)](_0x29a865(0x1c7)),_0x7e775e=_0x59156a?_0x29a865(0x1e5):_0x16693c?_0x29a865(0x1c7):_0x29a865(0x1d5),{config:_0x2993ea,layers:_0x4f448c}=readRawConfigWithLayers(),_0x1d3dc4=resolveDefaultAppSource(_0x4f448c),{defaultApp:_0x2d6381}=_0x2993ea;let _0x1d30c8,_0x5ca568;switch(_0x7e775e){case'global':_0x1d30c8=buildItemsFromLayer(_0x4f448c[_0x29a865(0x1d4)],_0x29a865(0x1e5)),_0x5ca568=_0x4f448c[_0x29a865(0x1e0)];break;case _0x29a865(0x1c7):_0x1d30c8=buildItemsFromLayer(_0x4f448c[_0x29a865(0x1bf)],_0x29a865(0x1c7)),_0x5ca568=_0x4f448c[_0x29a865(0x1d9)];break;default:_0x1d30c8=buildMergedItems(_0x2993ea,_0x4f448c);break;}enrichAppListItemsWithMergedSelection(_0x1d30c8,_0x8b8869['mergedCli']);if(_0x1d30c8[_0x29a865(0x1ce)]===0x0){const _0x298e69=_0x7e775e===_0x29a865(0x1d5)?'':_0x29a865(0x1c6)+_0x7e775e+_0x29a865(0x1d1);return{'ok':!![],'data':[],'message':'No\x20apps\x20configured'+_0x298e69+_0x29a865(0x1be)+CLI_BIN_NAME+_0x29a865(0x1cb)};}const _0x2644cf=_0x1d30c8[_0x29a865(0x1ba)](_0x2cdcf3=>_0x2cdcf3[_0x29a865(0x1c5)]===!![]),_0x58d299=_0x2d6381??_0x2644cf?.[_0x29a865(0x1db)]??null,_0x478ed3=_0x7e775e===_0x29a865(0x1d5)?{'globalPath':_0x4f448c[_0x29a865(0x1e0)]??null,'projectPath':_0x4f448c[_0x29a865(0x1d9)]??null,'defaultApp':_0x58d299,'defaultAppSource':_0x2d6381!=null?_0x1d3dc4:null}:{'scope':_0x7e775e,'configPath':_0x5ca568??null};return{'ok':!![],'data':{'items':_0x1d30c8,'meta':_0x478ed3}};}export const appListDefinition={'service':a20_0x19e1fd(0x1ca),'command':a20_0x19e1fd(0x1c8),'description':a20_0x19e1fd(0x1c1),'risk':a20_0x19e1fd(0x1da),'auth':a20_0x19e1fd(0x1c9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x19e1fd(0x1e1),'type':a20_0x19e1fd(0x1d3),'description':'List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','default':![]},{'name':'global','type':a20_0x19e1fd(0x1d3),'description':a20_0x19e1fd(0x1c3),'default':![]},{'name':a20_0x19e1fd(0x1c7),'type':a20_0x19e1fd(0x1d3),'description':a20_0x19e1fd(0x1d6),'default':![]}],async 'validate'(_0x4ce110){validateAppListFlags(_0x4ce110);},'execute':execute};function a20_0x287d(){const _0x32dc03=['List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','1072CnUYMd','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','45bsRUHB','isCurrent','\x20in\x20','project','list','optional','app','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','object','2772150dBqdgr','length','2684196sVrVfm','3888KNyuUI','\x20config','1442eAJant','boolean','globalConfig','merged','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','push','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','projectPath','read','appcode','defaultApp','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','map','544386BcBHoi','globalPath','remote','5640QDuDcT','2PbNWoq','apps','global','find','11802483vfNCiQ','6148lGYZZD','bool','.\x20Use\x20`','projectConfig','entries'];a20_0x287d=function(){return _0x32dc03;};return a20_0x287d();}
@@ -1 +1 @@
1
- (function(_0x176c66,_0x209350){const _0x323b90=a21_0x6331,_0x5bfcc1=_0x176c66();while(!![]){try{const _0x27fb5b=parseInt(_0x323b90(0x1f6))/0x1+parseInt(_0x323b90(0x1ef))/0x2+-parseInt(_0x323b90(0x1f5))/0x3*(parseInt(_0x323b90(0x1eb))/0x4)+-parseInt(_0x323b90(0x1ea))/0x5+parseInt(_0x323b90(0x1f4))/0x6+-parseInt(_0x323b90(0x1ed))/0x7+parseInt(_0x323b90(0x1f1))/0x8*(parseInt(_0x323b90(0x1e8))/0x9);if(_0x27fb5b===_0x209350)break;else _0x5bfcc1['push'](_0x5bfcc1['shift']());}catch(_0x455e20){_0x5bfcc1['push'](_0x5bfcc1['shift']());}}}(a21_0x52fc,0x9b87f));import{listRemoteApps}from'../../core/api-client.js';import{getCookie}from'../../auth/get-cookie.js';import{CliErrors}from'../../errors.js';function a21_0x6331(_0x40c8ca,_0x779537){_0x40c8ca=_0x40c8ca-0x1e7;const _0x52fcc8=a21_0x52fc();let _0x633156=_0x52fcc8[_0x40c8ca];return _0x633156;}import{withActiveCookie}from'../../utils/with-active-cookie.js';function resolveCookie(_0x224b45){const _0x2f8065=a21_0x6331,_0x613ebc=_0x224b45[_0x2f8065(0x1ee)]||getCookie();if(!_0x613ebc)throw CliErrors[_0x2f8065(0x1f2)]();return _0x613ebc;}function a21_0x52fc(){const _0x29dfd9=['map','45bNdHVK','appName','5706770NVoKzs','30076HmZjlD','platform','5774300THwkxC','cookie','1012686rLqpUC','appDesc','720624arrxvg','authRequired','appCode','6551364nRErvB','141XpqKPh','908075JoQUUL'];a21_0x52fc=function(){return _0x29dfd9;};return a21_0x52fc();}export async function listRemoteAppDirectory(_0x228c89){const _0x3b4afa=a21_0x6331,_0xeb9f83=await withActiveCookie(resolveCookie(_0x228c89),()=>listRemoteApps());return{'items':_0xeb9f83[_0x3b4afa(0x1e7)](_0x699f25=>({..._0x699f25['id']!=null?{'id':_0x699f25['id']}:{},'appCode':_0x699f25[_0x3b4afa(0x1f3)],'appName':_0x699f25[_0x3b4afa(0x1e9)],..._0x699f25[_0x3b4afa(0x1f0)]!=null?{'appDesc':_0x699f25[_0x3b4afa(0x1f0)]}:{}})),'meta':{'source':_0x3b4afa(0x1ec)}};}
1
+ (function(_0x238c78,_0x33e6f2){const _0x1ab37e=a21_0x2700,_0x3c6576=_0x238c78();while(!![]){try{const _0x21cf19=parseInt(_0x1ab37e(0x149))/0x1+parseInt(_0x1ab37e(0x14c))/0x2+parseInt(_0x1ab37e(0x14f))/0x3*(-parseInt(_0x1ab37e(0x152))/0x4)+parseInt(_0x1ab37e(0x14d))/0x5+-parseInt(_0x1ab37e(0x142))/0x6*(-parseInt(_0x1ab37e(0x143))/0x7)+-parseInt(_0x1ab37e(0x14a))/0x8*(-parseInt(_0x1ab37e(0x153))/0x9)+-parseInt(_0x1ab37e(0x147))/0xa*(parseInt(_0x1ab37e(0x146))/0xb);if(_0x21cf19===_0x33e6f2)break;else _0x3c6576['push'](_0x3c6576['shift']());}catch(_0x52e5b9){_0x3c6576['push'](_0x3c6576['shift']());}}}(a21_0x3bc0,0x582bf));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_0x2700(_0x1be125,_0x2a9a25){_0x1be125=_0x1be125-0x142;const _0x3bc085=a21_0x3bc0();let _0x27004f=_0x3bc085[_0x1be125];return _0x27004f;}function resolveCookie(_0x4167b5){const _0x21e2ed=a21_0x2700,_0x26c0ab=_0x4167b5[_0x21e2ed(0x145)]||getCookie();if(!_0x26c0ab)throw CliErrors[_0x21e2ed(0x144)]();return _0x26c0ab;}export async function listRemoteAppDirectory(_0x115133){const _0x52ab05=a21_0x2700,_0x57876b=await withActiveCookie(resolveCookie(_0x115133),()=>listRemoteApps());return{'items':_0x57876b[_0x52ab05(0x148)](_0x5a453a=>({..._0x5a453a['id']!=null?{'id':_0x5a453a['id']}:{},'appCode':_0x5a453a[_0x52ab05(0x150)],'appName':_0x5a453a[_0x52ab05(0x151)],..._0x5a453a[_0x52ab05(0x14b)]!=null?{'appDesc':_0x5a453a[_0x52ab05(0x14b)]}:{}})),'meta':{'source':_0x52ab05(0x14e)}};}function a21_0x3bc0(){const _0x256dc5=['24093tzEtzU','appCode','appName','152kTrxFB','18OdkaZR','6096Ogavps','2359IAiAKx','authRequired','cookie','9052021flpJMz','10zUWhVu','map','231290BnXAav','1090256irjqmn','appDesc','808504SPIYyz','1193710zqBgpw','platform'];a21_0x3bc0=function(){return _0x256dc5;};return a21_0x3bc0();}
@@ -1 +1 @@
1
- const a22_0x3d8f56=a22_0x5942;(function(_0x1604a8,_0x25c8ce){const _0x2f0ebe=a22_0x5942,_0x5032bc=_0x1604a8();while(!![]){try{const _0xfc37ca=parseInt(_0x2f0ebe(0x10f))/0x1+parseInt(_0x2f0ebe(0x114))/0x2+parseInt(_0x2f0ebe(0x112))/0x3*(parseInt(_0x2f0ebe(0x111))/0x4)+parseInt(_0x2f0ebe(0x116))/0x5+parseInt(_0x2f0ebe(0x119))/0x6*(parseInt(_0x2f0ebe(0x109))/0x7)+parseInt(_0x2f0ebe(0x10e))/0x8+parseInt(_0x2f0ebe(0x10b))/0x9*(-parseInt(_0x2f0ebe(0x110))/0xa);if(_0xfc37ca===_0x25c8ce)break;else _0x5032bc['push'](_0x5032bc['shift']());}catch(_0x4fcc3a){_0x5032bc['push'](_0x5032bc['shift']());}}}(a22_0xc5f5,0x73cab));function a22_0x5942(_0x306a7f,_0x508083){_0x306a7f=_0x306a7f-0x108;const _0xc5f5a7=a22_0xc5f5();let _0x59429b=_0xc5f5a7[_0x306a7f];return _0x59429b;}import{CLI_BIN_NAME}from'../../constant/cli.js';function a22_0xc5f5(){const _0x4c814a=['high-risk-write','21237516IgqCsY','remove','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','4058184kGKVLK','732674lGWoKy','10BIKXzP','4zRUijT','1605309iyGUNA','App\x20profile\x20name\x20to\x20remove','1301770LEpYrf','2026-07','71610fHMSyB','app\x20remove','name','420GrXqms','\x20workspace\x20remove','app','39375fmdnzh'];a22_0xc5f5=function(){return _0x4c814a;};return a22_0xc5f5();}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':a22_0x3d8f56(0x108),'command':a22_0x3d8f56(0x10c),'description':a22_0x3d8f56(0x10d),'risk':a22_0x3d8f56(0x10a),'requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x3d8f56(0x11a),'since':a22_0x3d8f56(0x115)},'args':[{'name':a22_0x3d8f56(0x118),'description':a22_0x3d8f56(0x113),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x5d9bbc=>validateAppName(_0x5d9bbc,'app\x20remove'),'execute':_0x33af6f=>runAppRemove(_0x33af6f,a22_0x3d8f56(0x117))};
1
+ function a22_0x2edb(_0x3effe7,_0x264b78){_0x3effe7=_0x3effe7-0x11d;const _0x1a8705=a22_0x1a87();let _0x2edbc7=_0x1a8705[_0x3effe7];return _0x2edbc7;}const a22_0xf88451=a22_0x2edb;function a22_0x1a87(){const _0x22067c=['8xhOXYJ','name','2227998mDWTbk','40365HDTafD','remove','app','10804527upopqo','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile','app\x20remove','2026-07','143VTqnMV','191BByoaC','476fUnvAn','394YiUGFG','1076194rIlflL','App\x20profile\x20name\x20to\x20remove','1213890NOAOVM','864357olUQuU'];a22_0x1a87=function(){return _0x22067c;};return a22_0x1a87();}(function(_0x1ee6f8,_0x344e5b){const _0xc7f9a1=a22_0x2edb,_0x559a9d=_0x1ee6f8();while(!![]){try{const _0x41f6a2=-parseInt(_0xc7f9a1(0x125))/0x1*(-parseInt(_0xc7f9a1(0x127))/0x2)+parseInt(_0xc7f9a1(0x12b))/0x3+parseInt(_0xc7f9a1(0x126))/0x4*(parseInt(_0xc7f9a1(0x11d))/0x5)+-parseInt(_0xc7f9a1(0x12e))/0x6+parseInt(_0xc7f9a1(0x128))/0x7+-parseInt(_0xc7f9a1(0x12c))/0x8*(-parseInt(_0xc7f9a1(0x120))/0x9)+-parseInt(_0xc7f9a1(0x12a))/0xa*(parseInt(_0xc7f9a1(0x124))/0xb);if(_0x41f6a2===_0x344e5b)break;else _0x559a9d['push'](_0x559a9d['shift']());}catch(_0x3b90f2){_0x559a9d['push'](_0x559a9d['shift']());}}}(a22_0x1a87,0xa8c58));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const appRemoveDefinition={'service':a22_0xf88451(0x11f),'command':a22_0xf88451(0x11e),'description':a22_0xf88451(0x121),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20remove','since':a22_0xf88451(0x123)},'args':[{'name':a22_0xf88451(0x12d),'description':a22_0xf88451(0x129),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x5e0b12=>validateAppName(_0x5e0b12,a22_0xf88451(0x122)),'execute':_0x167b72=>runAppRemove(_0x167b72,a22_0xf88451(0x122))};
@@ -1 +1 @@
1
- (function(_0x546a7e,_0x28afaa){const _0x205d77=a23_0x52dc,_0x494cf9=_0x546a7e();while(!![]){try{const _0x57f37b=-parseInt(_0x205d77(0x1de))/0x1+parseInt(_0x205d77(0x1e6))/0x2+-parseInt(_0x205d77(0x1e1))/0x3+-parseInt(_0x205d77(0x1ea))/0x4*(parseInt(_0x205d77(0x1d9))/0x5)+parseInt(_0x205d77(0x1ee))/0x6*(-parseInt(_0x205d77(0x1dc))/0x7)+parseInt(_0x205d77(0x1df))/0x8*(-parseInt(_0x205d77(0x1e7))/0x9)+-parseInt(_0x205d77(0x1f0))/0xa*(-parseInt(_0x205d77(0x1e0))/0xb);if(_0x57f37b===_0x28afaa)break;else _0x494cf9['push'](_0x494cf9['shift']());}catch(_0xe523cc){_0x494cf9['push'](_0x494cf9['shift']());}}}(a23_0x1acb,0x53ae6));function a23_0x52dc(_0x362bc1,_0x5d1e64){_0x362bc1=_0x362bc1-0x1d3;const _0x1acbea=a23_0x1acb();let _0x52dc78=_0x1acbea[_0x362bc1];return _0x52dc78;}import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x38d3da,_0x23817f){const _0x31d8dc=a23_0x52dc;if(!_0x23817f)return;const _0x1272db=_0x23817f[_0x31d8dc(0x1e3)]&&typeof _0x23817f[_0x31d8dc(0x1e3)]===_0x31d8dc(0x1d4)?_0x23817f[_0x31d8dc(0x1e3)]:{},_0x2ff1c9=Object[_0x31d8dc(0x1db)](_0x1272db)[_0x31d8dc(0x1dd)]>0x0;for(const _0x427f7b of _0x38d3da){_0x427f7b[_0x31d8dc(0x1d6)]=![];}const _0x8eaa5b=_0x23817f['appCode']!=null?String(_0x23817f['appCode'])[_0x31d8dc(0x1f1)]():'';if(_0x2ff1c9){const _0x358b1c=_0x23817f['currentApp']??_0x23817f[_0x31d8dc(0x1eb)];if(_0x358b1c)for(const _0x19505b of _0x38d3da){_0x19505b[_0x31d8dc(0x1e2)]===!![]&&_0x19505b[_0x31d8dc(0x1d5)]===_0x358b1c&&(_0x19505b['isCurrent']=!![]);}for(const _0x3af73d of _0x38d3da){if(_0x3af73d['named']!==![])continue;if(_0x23817f[_0x31d8dc(0x1eb)])continue;_0x8eaa5b&&String(_0x3af73d[_0x31d8dc(0x1da)]??'')['trim']()===_0x8eaa5b&&(_0x3af73d[_0x31d8dc(0x1d6)]=!![]);}return;}if(!_0x8eaa5b)return;for(const _0x378efc of _0x38d3da){String(_0x378efc['appcode']??'')['trim']()===_0x8eaa5b&&(_0x378efc['isCurrent']=!![]);}}export function resolveAppScopeForWrite(_0xd2c914,_0x4765f2,_0x19ecdf){const _0x1fb745=a23_0x52dc;if(_0x4765f2)return _0x1fb745(0x1e4);const _0x3c45d5=_0x19ecdf[_0x1fb745(0x1ef)][_0x1fb745(0x1e3)]&&typeof _0x19ecdf['projectConfig']['apps']==='object'?_0x19ecdf[_0x1fb745(0x1ef)][_0x1fb745(0x1e3)]:{},_0x86b9de=_0x19ecdf[_0x1fb745(0x1e5)][_0x1fb745(0x1e3)]&&typeof _0x19ecdf[_0x1fb745(0x1e5)][_0x1fb745(0x1e3)]===_0x1fb745(0x1d4)?_0x19ecdf['globalConfig'][_0x1fb745(0x1e3)]:{};if(Object[_0x1fb745(0x1d7)][_0x1fb745(0x1ec)]['call'](_0x3c45d5,_0xd2c914))return _0x1fb745(0x1ed);if(Object[_0x1fb745(0x1d7)][_0x1fb745(0x1ec)][_0x1fb745(0x1d3)](_0x86b9de,_0xd2c914))return'global';return _0x1fb745(0x1ed);}export function appDefinedIn(_0x349a7d,_0x44c30d,_0x3a8b62,_0x5a135f){const _0x5584ab=a23_0x52dc;if(_0x5a135f)return Object[_0x5584ab(0x1d7)]['hasOwnProperty'][_0x5584ab(0x1d3)](_0x3a8b62,_0x349a7d)?_0x5584ab(0x1ed):_0x5584ab(0x1e4);const _0x45039b=Object[_0x5584ab(0x1d7)][_0x5584ab(0x1ec)][_0x5584ab(0x1d3)](_0x44c30d,_0x349a7d),_0x23a227=Object[_0x5584ab(0x1d7)][_0x5584ab(0x1ec)][_0x5584ab(0x1d3)](_0x3a8b62,_0x349a7d);if(_0x45039b&&_0x23a227)return _0x5584ab(0x1e8);if(_0x23a227)return _0x5584ab(0x1ed);return _0x5584ab(0x1e4);}export function resolveDefaultAppSource(_0x3a8217){const _0x4dc26b=a23_0x52dc,_0x488542=_0x3a8217[_0x4dc26b(0x1ef)][_0x4dc26b(0x1e3)]&&typeof _0x3a8217['projectConfig'][_0x4dc26b(0x1e3)]===_0x4dc26b(0x1d4)?_0x3a8217[_0x4dc26b(0x1ef)][_0x4dc26b(0x1e3)]:{};if('defaultApp'in _0x3a8217['projectConfig'])return _0x4dc26b(0x1ed);if(Object[_0x4dc26b(0x1db)](_0x488542)[_0x4dc26b(0x1dd)]>0x0)return'project';if(_0x3a8217['projectConfig'][_0x4dc26b(0x1e9)]===![])return null;if(_0x3a8217['globalConfig'][_0x4dc26b(0x1eb)])return _0x4dc26b(0x1e4);return null;}export function getConfigPath(_0x49d281={}){const _0x74ca82=a23_0x52dc,_0x38bf82=_0x49d281['global']?_0x74ca82(0x1e4):'project';return resolveWriteConfigPath(_0x38bf82);}function a23_0x1acb(){const _0x5d039b=['keys','54957yWpcxy','length','168092mstalW','358024nXFsLh','453541FyYpPt','349080mBHqoB','named','apps','global','globalConfig','1123724TrDdBN','9GbOfPw','both','inherit','4fhTsEi','defaultApp','hasOwnProperty','project','6pxaVBd','projectConfig','130PkUiYY','trim','call','object','name','isCurrent','prototype','\x20(global)','2090255fDCkEk','appcode'];a23_0x1acb=function(){return _0x5d039b;};return a23_0x1acb();}export function readConfig(_0x15faef={}){return readConfigFile(getConfigPath(_0x15faef));}export function writeConfig(_0x56d4e6,_0x5b5bfa={}){writeConfigFile(getConfigPath(_0x5b5bfa),_0x56d4e6);}export function scopeLabel(_0x502cb1){const _0xc385e=a23_0x52dc;return _0x502cb1[_0xc385e(0x1e4)]?_0xc385e(0x1d8):'';}
1
+ function a23_0x19a0(_0x2917df,_0xb580e0){_0x2917df=_0x2917df-0x100;const _0x1dd74b=a23_0x1dd7();let _0x19a02b=_0x1dd74b[_0x2917df];return _0x19a02b;}(function(_0xe6b3a5,_0x2af635){const _0x2f6407=a23_0x19a0,_0x43a04f=_0xe6b3a5();while(!![]){try{const _0x3878a0=parseInt(_0x2f6407(0x11b))/0x1+-parseInt(_0x2f6407(0x119))/0x2*(parseInt(_0x2f6407(0x102))/0x3)+-parseInt(_0x2f6407(0x117))/0x4+-parseInt(_0x2f6407(0x113))/0x5*(-parseInt(_0x2f6407(0x104))/0x6)+parseInt(_0x2f6407(0x101))/0x7*(-parseInt(_0x2f6407(0x10a))/0x8)+parseInt(_0x2f6407(0x114))/0x9+parseInt(_0x2f6407(0x115))/0xa*(parseInt(_0x2f6407(0x10b))/0xb);if(_0x3878a0===_0x2af635)break;else _0x43a04f['push'](_0x43a04f['shift']());}catch(_0x4606ea){_0x43a04f['push'](_0x43a04f['shift']());}}}(a23_0x1dd7,0x7530c));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x23c1b7,_0x27104b){const _0x5a7995=a23_0x19a0;if(!_0x27104b)return;const _0x54924a=_0x27104b['apps']&&typeof _0x27104b[_0x5a7995(0x116)]===_0x5a7995(0x10d)?_0x27104b[_0x5a7995(0x116)]:{},_0x3059e2=Object['keys'](_0x54924a)[_0x5a7995(0x11a)]>0x0;for(const _0x41fd95 of _0x23c1b7){_0x41fd95[_0x5a7995(0x112)]=![];}const _0x5af301=_0x27104b[_0x5a7995(0x106)]!=null?String(_0x27104b[_0x5a7995(0x106)])[_0x5a7995(0x118)]():'';if(_0x3059e2){const _0x57bc47=_0x27104b[_0x5a7995(0x10f)]??_0x27104b['defaultApp'];if(_0x57bc47)for(const _0x2ab570 of _0x23c1b7){_0x2ab570['named']===!![]&&_0x2ab570[_0x5a7995(0x11d)]===_0x57bc47&&(_0x2ab570[_0x5a7995(0x112)]=!![]);}for(const _0x5dfdc7 of _0x23c1b7){if(_0x5dfdc7['named']!==![])continue;if(_0x27104b[_0x5a7995(0x103)])continue;_0x5af301&&String(_0x5dfdc7['appcode']??'')[_0x5a7995(0x118)]()===_0x5af301&&(_0x5dfdc7[_0x5a7995(0x112)]=!![]);}return;}if(!_0x5af301)return;for(const _0x11f28c of _0x23c1b7){String(_0x11f28c[_0x5a7995(0x111)]??'')[_0x5a7995(0x118)]()===_0x5af301&&(_0x11f28c['isCurrent']=!![]);}}export function resolveAppScopeForWrite(_0x392df9,_0x15a3dc,_0x294c29){const _0x254a93=a23_0x19a0;if(_0x15a3dc)return _0x254a93(0x10e);const _0x17066b=_0x294c29['projectConfig'][_0x254a93(0x116)]&&typeof _0x294c29[_0x254a93(0x108)][_0x254a93(0x116)]==='object'?_0x294c29[_0x254a93(0x108)][_0x254a93(0x116)]:{},_0x1b1440=_0x294c29[_0x254a93(0x100)]['apps']&&typeof _0x294c29[_0x254a93(0x100)][_0x254a93(0x116)]===_0x254a93(0x10d)?_0x294c29['globalConfig'][_0x254a93(0x116)]:{};if(Object[_0x254a93(0x107)][_0x254a93(0x10c)][_0x254a93(0x110)](_0x17066b,_0x392df9))return _0x254a93(0x109);if(Object[_0x254a93(0x107)][_0x254a93(0x10c)]['call'](_0x1b1440,_0x392df9))return _0x254a93(0x10e);return _0x254a93(0x109);}export function appDefinedIn(_0xe20bac,_0x20bbd5,_0x13bfbc,_0x576eb1){const _0xc58b74=a23_0x19a0;if(_0x576eb1)return Object[_0xc58b74(0x107)][_0xc58b74(0x10c)][_0xc58b74(0x110)](_0x13bfbc,_0xe20bac)?_0xc58b74(0x109):_0xc58b74(0x10e);const _0xcd8cca=Object[_0xc58b74(0x107)][_0xc58b74(0x10c)][_0xc58b74(0x110)](_0x20bbd5,_0xe20bac),_0x2be94f=Object[_0xc58b74(0x107)][_0xc58b74(0x10c)][_0xc58b74(0x110)](_0x13bfbc,_0xe20bac);if(_0xcd8cca&&_0x2be94f)return _0xc58b74(0x11c);if(_0x2be94f)return _0xc58b74(0x109);return _0xc58b74(0x10e);}export function resolveDefaultAppSource(_0x479cd6){const _0x5823a6=a23_0x19a0,_0x5db349=_0x479cd6[_0x5823a6(0x108)][_0x5823a6(0x116)]&&typeof _0x479cd6[_0x5823a6(0x108)][_0x5823a6(0x116)]===_0x5823a6(0x10d)?_0x479cd6['projectConfig'][_0x5823a6(0x116)]:{};if(_0x5823a6(0x103)in _0x479cd6[_0x5823a6(0x108)])return'project';if(Object['keys'](_0x5db349)[_0x5823a6(0x11a)]>0x0)return'project';if(_0x479cd6[_0x5823a6(0x108)][_0x5823a6(0x105)]===![])return null;if(_0x479cd6['globalConfig'][_0x5823a6(0x103)])return _0x5823a6(0x10e);return null;}export function getConfigPath(_0x34b243={}){const _0x10a0f3=a23_0x19a0,_0x3387f7=_0x34b243[_0x10a0f3(0x10e)]?_0x10a0f3(0x10e):_0x10a0f3(0x109);return resolveWriteConfigPath(_0x3387f7);}export function readConfig(_0x51ee8e={}){return readConfigFile(getConfigPath(_0x51ee8e));}export function writeConfig(_0x9a6b53,_0x57caec={}){writeConfigFile(getConfigPath(_0x57caec),_0x9a6b53);}function a23_0x1dd7(){const _0x334bcb=['prototype','projectConfig','project','7590136IgNnNp','615153VcogBS','hasOwnProperty','object','global','currentApp','call','appcode','isCurrent','3443285nnTVud','2012850cunosC','270PsaiXC','apps','2785440QFiCbg','trim','1626728xMFMaa','length','516275qGiyxQ','both','name','globalConfig','7IIJHbv','3feiOuE','defaultApp','6nzgCCM','inherit','appCode'];a23_0x1dd7=function(){return _0x334bcb;};return a23_0x1dd7();}export function scopeLabel(_0x379592){const _0x281507=a23_0x19a0;return _0x379592[_0x281507(0x10e)]?'\x20(global)':'';}
@@ -1 +1 @@
1
- const a24_0x174ad7=a24_0xc4a0;(function(_0x38449c,_0x348f4c){const _0x1c3a2d=a24_0xc4a0,_0x1be402=_0x38449c();while(!![]){try{const _0x57d44d=parseInt(_0x1c3a2d(0xea))/0x1*(parseInt(_0x1c3a2d(0xf1))/0x2)+parseInt(_0x1c3a2d(0xec))/0x3*(-parseInt(_0x1c3a2d(0xf4))/0x4)+-parseInt(_0x1c3a2d(0xed))/0x5+parseInt(_0x1c3a2d(0xf2))/0x6*(parseInt(_0x1c3a2d(0xeb))/0x7)+-parseInt(_0x1c3a2d(0xfa))/0x8+parseInt(_0x1c3a2d(0xf7))/0x9*(-parseInt(_0x1c3a2d(0xe6))/0xa)+parseInt(_0x1c3a2d(0xf9))/0xb;if(_0x57d44d===_0x348f4c)break;else _0x1be402['push'](_0x1be402['shift']());}catch(_0x4d171d){_0x1be402['push'](_0x1be402['shift']());}}}(a24_0x569f,0x8661f));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a24_0xc4a0(_0x266c21,_0x577e7f){_0x266c21=_0x266c21-0xe5;const _0x569fff=a24_0x569f();let _0xc4a003=_0x569fff[_0x266c21];return _0xc4a003;}import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a24_0x569f(){const _0x201b90=['Deleted\x20app\x20config\x20','get','apiError','2bFYqaD','7ngyHdi','1169913OHSvdM','5438925GFEfmA','POST','appCode:\x20','delete','288206gpaWnT','399906hsuFXx','isFinite','8qjMQOZ','appCode','App\x20config\x20key\x20not\x20found:\x20','3551517cdjaHn','validation','37730649tRxHIA','7777160kNTlaZ',',\x20appCode=','10ymedRp'];a24_0x569f=function(){return _0x201b90;};return a24_0x569f();}const DELETE_PATH='/smartapi/app-config/delete';export const appConfigDelete={'service':'app-config','command':a24_0x174ad7(0xf0),'description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x71614b){readKeyArg(_0x71614b);},async 'dryRun'(_0x1fb3d9){const _0x434fa2=a24_0x174ad7,_0x2c6766=readKeyArg(_0x1fb3d9),_0x3e7504=await mustGetByKey(_0x1fb3d9[_0x434fa2(0xf5)],_0x2c6766);return asAppConfigDryRunResult(buildMutationData({'operation':_0x434fa2(0xf0),'appCode':_0x1fb3d9[_0x434fa2(0xf5)],'key':_0x2c6766,'before':projectAppConfig(_0x3e7504),'after':null,'dryRun':!![]}),{'method':_0x434fa2(0xee),'url':DELETE_PATH});},async 'execute'(_0x2f4d9e){const _0x537e8b=a24_0x174ad7,_0x8696f2=readKeyArg(_0x2f4d9e),_0x1dd782=await mustGetByKey(_0x2f4d9e[_0x537e8b(0xf5)],_0x8696f2);return await withAppConfigApiBoundary('delete',{'appCode':_0x2f4d9e[_0x537e8b(0xf5)],'key':_0x8696f2},()=>deleteAppConfig({'appCode':_0x2f4d9e[_0x537e8b(0xf5)],'id':requireAppConfigId(_0x1dd782,_0x8696f2,_0x2f4d9e['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0x537e8b(0xf0),'appCode':_0x2f4d9e['appCode'],'key':_0x8696f2,'before':projectAppConfig(_0x1dd782),'after':null,'dryRun':![]}),'message':_0x537e8b(0xe7)+_0x8696f2};}};async function mustGetByKey(_0x134b70,_0x55ec73){const _0x3bd55c=a24_0x174ad7,_0x3e82bd=await withAppConfigApiBoundary(_0x3bd55c(0xe8),{'appCode':_0x134b70,'key':_0x55ec73},()=>getAppConfigByKey(_0x134b70,_0x55ec73));if(!_0x3e82bd)throw CliErrors[_0x3bd55c(0xf8)](_0x3bd55c(0xf6)+_0x55ec73,_0x3bd55c(0xef)+_0x134b70);return _0x3e82bd;}function requireAppConfigId(_0x145581,_0x26ed66,_0x3956df){const _0x3284ed=a24_0x174ad7;if(typeof _0x145581['id']==='number'&&Number[_0x3284ed(0xf3)](_0x145581['id'])&&_0x145581['id']>0x0)return _0x145581['id'];throw CliErrors[_0x3284ed(0xe9)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x26ed66+_0x3284ed(0xe5)+_0x3956df);}
1
+ function a24_0x2e64(){const _0x27f368=['205924gPZkCx','validation','61448ZntyEX','867905ApMHKU','85AHKuyR','isFinite','app-config','Deleted\x20app\x20config\x20','Delete\x20one\x20runtime\x20app-config\x20key','get','15ykNQaW','6aIyqlX','19403112FhlHIM','10kFhHlY','/smartapi/app-config/delete','delete','POST','5302935HqLxMT','2684255xzvXow','274358hplyIR',',\x20appCode=','369BGUvCg','appCode','appCode:\x20','number','apiError'];a24_0x2e64=function(){return _0x27f368;};return a24_0x2e64();}const a24_0x1b2a2b=a24_0x3b0d;function a24_0x3b0d(_0x1e551d,_0x64f317){_0x1e551d=_0x1e551d-0x101;const _0x2e64fe=a24_0x2e64();let _0x3b0d70=_0x2e64fe[_0x1e551d];return _0x3b0d70;}(function(_0x18de28,_0x9718d2){const _0xde1895=a24_0x3b0d,_0xb4ab21=_0x18de28();while(!![]){try{const _0x2fa14e=parseInt(_0xde1895(0x115))/0x1+-parseInt(_0xde1895(0x10b))/0x2*(parseInt(_0xde1895(0x102))/0x3)+parseInt(_0xde1895(0x112))/0x4*(parseInt(_0xde1895(0x116))/0x5)+-parseInt(_0xde1895(0x103))/0x6*(-parseInt(_0xde1895(0x10a))/0x7)+parseInt(_0xde1895(0x114))/0x8*(parseInt(_0xde1895(0x10d))/0x9)+-parseInt(_0xde1895(0x105))/0xa*(-parseInt(_0xde1895(0x109))/0xb)+-parseInt(_0xde1895(0x104))/0xc;if(_0x2fa14e===_0x9718d2)break;else _0xb4ab21['push'](_0xb4ab21['shift']());}catch(_0x4cefcc){_0xb4ab21['push'](_0xb4ab21['shift']());}}}(a24_0x2e64,0x978bc));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH=a24_0x1b2a2b(0x106);export const appConfigDelete={'service':a24_0x1b2a2b(0x118),'command':'delete','description':a24_0x1b2a2b(0x11a),'risk':'high-risk-write','args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1bf9a2){readKeyArg(_0x1bf9a2);},async 'dryRun'(_0x418e42){const _0x42d0ed=a24_0x1b2a2b,_0x1c7218=readKeyArg(_0x418e42),_0x139ef4=await mustGetByKey(_0x418e42['appCode'],_0x1c7218);return asAppConfigDryRunResult(buildMutationData({'operation':_0x42d0ed(0x107),'appCode':_0x418e42['appCode'],'key':_0x1c7218,'before':projectAppConfig(_0x139ef4),'after':null,'dryRun':!![]}),{'method':_0x42d0ed(0x108),'url':DELETE_PATH});},async 'execute'(_0x1e3006){const _0x50b623=a24_0x1b2a2b,_0x2a0c2f=readKeyArg(_0x1e3006),_0x44bec2=await mustGetByKey(_0x1e3006[_0x50b623(0x10e)],_0x2a0c2f);return await withAppConfigApiBoundary(_0x50b623(0x107),{'appCode':_0x1e3006[_0x50b623(0x10e)],'key':_0x2a0c2f},()=>deleteAppConfig({'appCode':_0x1e3006[_0x50b623(0x10e)],'id':requireAppConfigId(_0x44bec2,_0x2a0c2f,_0x1e3006['appCode'])})),{'ok':!![],'data':buildMutationData({'operation':_0x50b623(0x107),'appCode':_0x1e3006['appCode'],'key':_0x2a0c2f,'before':projectAppConfig(_0x44bec2),'after':null,'dryRun':![]}),'message':_0x50b623(0x119)+_0x2a0c2f};}};async function mustGetByKey(_0x200e2b,_0xab6f1b){const _0x121c1a=a24_0x1b2a2b,_0x2af67b=await withAppConfigApiBoundary(_0x121c1a(0x101),{'appCode':_0x200e2b,'key':_0xab6f1b},()=>getAppConfigByKey(_0x200e2b,_0xab6f1b));if(!_0x2af67b)throw CliErrors[_0x121c1a(0x113)]('App\x20config\x20key\x20not\x20found:\x20'+_0xab6f1b,_0x121c1a(0x10f)+_0x200e2b);return _0x2af67b;}function requireAppConfigId(_0x2ef96b,_0xb48807,_0x4c9576){const _0x31f5bc=a24_0x1b2a2b;if(typeof _0x2ef96b['id']===_0x31f5bc(0x110)&&Number[_0x31f5bc(0x117)](_0x2ef96b['id'])&&_0x2ef96b['id']>0x0)return _0x2ef96b['id'];throw CliErrors[_0x31f5bc(0x111)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0xb48807+_0x31f5bc(0x10c)+_0x4c9576);}
@@ -1 +1 @@
1
- function a25_0x57a4(){const _0x17363c=['1657408tqTwPV','Loaded\x20app\x20config\x20','42OuoOlO','read','App\x20config\x20key\x20not\x20found:\x20','3172200xTLAAW','861395UrmJwu','2503510kNPREx','8262002nRAFUi','1491549CCHiYh','get','app-config','bool','reveal','\x20with\x20value\x20revealed','\x20with\x20value\x20redacted','372667ItHdtT','2ZokdaY','63xnrPxm','appCode'];a25_0x57a4=function(){return _0x17363c;};return a25_0x57a4();}function a25_0x5d6f(_0x2d884c,_0xcf3403){_0x2d884c=_0x2d884c-0xb2;const _0x57a499=a25_0x57a4();let _0x5d6f52=_0x57a499[_0x2d884c];return _0x5d6f52;}const a25_0x2d68d0=a25_0x5d6f;(function(_0x2e7c35,_0xa2d964){const _0x7647c9=a25_0x5d6f,_0x1896af=_0x2e7c35();while(!![]){try{const _0x5d9673=parseInt(_0x7647c9(0xba))/0x1*(parseInt(_0x7647c9(0xbb))/0x2)+-parseInt(_0x7647c9(0xb3))/0x3+-parseInt(_0x7647c9(0xc3))/0x4+-parseInt(_0x7647c9(0xc4))/0x5*(-parseInt(_0x7647c9(0xc0))/0x6)+-parseInt(_0x7647c9(0xb2))/0x7+-parseInt(_0x7647c9(0xbe))/0x8+parseInt(_0x7647c9(0xbc))/0x9*(parseInt(_0x7647c9(0xc5))/0xa);if(_0x5d9673===_0xa2d964)break;else _0x1896af['push'](_0x1896af['shift']());}catch(_0x5159c2){_0x1896af['push'](_0x1896af['shift']());}}}(a25_0x57a4,0x9f846));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_0x2d68d0(0xb5),'command':a25_0x2d68d0(0xb4),'description':'Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','risk':a25_0x2d68d0(0xc1),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x24f280){readKeyArg(_0x24f280);},async 'execute'(_0x265937){const _0x5bd783=a25_0x2d68d0,_0x1ea552=readKeyArg(_0x265937),_0x26f5ac=await withAppConfigApiBoundary(_0x5bd783(0xb4),{'appCode':_0x265937[_0x5bd783(0xbd)],'key':_0x1ea552},()=>getAppConfigByKey(_0x265937['appCode'],_0x1ea552));if(!_0x26f5ac)throw CliErrors['validation'](_0x5bd783(0xc2)+_0x1ea552,'appCode:\x20'+_0x265937['appCode']);const _0xab6c30=projectAppConfig(_0x26f5ac,{'reveal':_0x265937[_0x5bd783(0xb6)](_0x5bd783(0xb7))});return{'ok':!![],'data':{'config':_0xab6c30},'message':_0x265937[_0x5bd783(0xb6)](_0x5bd783(0xb7))?_0x5bd783(0xbf)+_0x1ea552+_0x5bd783(0xb8):_0x5bd783(0xbf)+_0x1ea552+_0x5bd783(0xb9)};}};
1
+ const a25_0x342a7e=a25_0x5a74;function a25_0x5a74(_0x2c76fc,_0x399ac9){_0x2c76fc=_0x2c76fc-0xfb;const _0x403466=a25_0x4034();let _0x5a74c1=_0x403466[_0x2c76fc];return _0x5a74c1;}(function(_0x4741f6,_0x5ed4cd){const _0x1d7b94=a25_0x5a74,_0x572633=_0x4741f6();while(!![]){try{const _0x8c3bbb=parseInt(_0x1d7b94(0x108))/0x1+-parseInt(_0x1d7b94(0x10b))/0x2*(-parseInt(_0x1d7b94(0x10a))/0x3)+-parseInt(_0x1d7b94(0x101))/0x4*(-parseInt(_0x1d7b94(0x103))/0x5)+-parseInt(_0x1d7b94(0x105))/0x6*(-parseInt(_0x1d7b94(0x10c))/0x7)+-parseInt(_0x1d7b94(0xfb))/0x8+parseInt(_0x1d7b94(0x106))/0x9*(-parseInt(_0x1d7b94(0x100))/0xa)+-parseInt(_0x1d7b94(0x10d))/0xb*(parseInt(_0x1d7b94(0x102))/0xc);if(_0x8c3bbb===_0x5ed4cd)break;else _0x572633['push'](_0x572633['shift']());}catch(_0x2ec974){_0x572633['push'](_0x572633['shift']());}}}(a25_0x4034,0xe55cf));import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a25_0x4034(){const _0x300ac3=['read','695296HtbFXm','\x20with\x20value\x20revealed','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','get','\x20with\x20value\x20redacted','14159740YYHDrW','28YvcVaO','12uleWAK','201415pMYmAw','Loaded\x20app\x20config\x20','6140202bBAdQW','9ccQwpR','reveal','612769GZORcE','app-config','477RgslYE','11594gcrhDu','7JOjYKG','4372313aDgxDZ','bool','App\x20config\x20key\x20not\x20found:\x20','appCode'];a25_0x4034=function(){return _0x300ac3;};return a25_0x4034();}import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a25_0x342a7e(0x109),'command':a25_0x342a7e(0xfe),'description':a25_0x342a7e(0xfd),'risk':a25_0x342a7e(0x111),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x3c11bd){readKeyArg(_0x3c11bd);},async 'execute'(_0x5ef061){const _0xb093df=a25_0x342a7e,_0x17b280=readKeyArg(_0x5ef061),_0x149d05=await withAppConfigApiBoundary(_0xb093df(0xfe),{'appCode':_0x5ef061[_0xb093df(0x110)],'key':_0x17b280},()=>getAppConfigByKey(_0x5ef061['appCode'],_0x17b280));if(!_0x149d05)throw CliErrors['validation'](_0xb093df(0x10f)+_0x17b280,'appCode:\x20'+_0x5ef061[_0xb093df(0x110)]);const _0x134ad9=projectAppConfig(_0x149d05,{'reveal':_0x5ef061[_0xb093df(0x10e)](_0xb093df(0x107))});return{'ok':!![],'data':{'config':_0x134ad9},'message':_0x5ef061['bool'](_0xb093df(0x107))?'Loaded\x20app\x20config\x20'+_0x17b280+_0xb093df(0xfc):_0xb093df(0x104)+_0x17b280+_0xb093df(0xff)};}};
@@ -1 +1 @@
1
- function a26_0x8f23(_0x132a4e,_0x16454a){_0x132a4e=_0x132a4e-0x169;const _0x61c8f9=a26_0x61c8();let _0x8f23ba=_0x61c8f9[_0x132a4e];return _0x8f23ba;}(function(_0x4ef2f6,_0x5c4580){const _0x411a9b=a26_0x8f23,_0x3fa642=_0x4ef2f6();while(!![]){try{const _0x3b250d=-parseInt(_0x411a9b(0x171))/0x1+-parseInt(_0x411a9b(0x16f))/0x2+parseInt(_0x411a9b(0x170))/0x3+parseInt(_0x411a9b(0x16e))/0x4+parseInt(_0x411a9b(0x16a))/0x5*(-parseInt(_0x411a9b(0x16b))/0x6)+-parseInt(_0x411a9b(0x169))/0x7*(-parseInt(_0x411a9b(0x16c))/0x8)+parseInt(_0x411a9b(0x16d))/0x9;if(_0x3b250d===_0x5c4580)break;else _0x3fa642['push'](_0x3fa642['shift']());}catch(_0x204cde){_0x3fa642['push'](_0x3fa642['shift']());}}}(a26_0x61c8,0x6b12d));function a26_0x61c8(){const _0x235590=['5IQeRvy','4093314YDjPeF','24tRJPMC','1337733ncUceE','3052948mYzHJc','495810osYuyM','2155350gwIcdj','685215lVKjKd','988372JRSyDB'];a26_0x61c8=function(){return _0x235590;};return a26_0x61c8();}import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
1
+ function a26_0x3c9d(){const _0x381c24=['2838IJlQFS','22OomUmR','13058390pZSaoJ','288YqlrTp','8892648BzVkIG','2225019iIcnWA','15KHcuvj','1769120Inguzp','54551yUoliP','464117BSEsDZ','4QleFoE'];a26_0x3c9d=function(){return _0x381c24;};return a26_0x3c9d();}(function(_0x38563c,_0x144690){const _0x3d6053=a26_0x3b7d,_0x4746b0=_0x38563c();while(!![]){try{const _0x35193f=-parseInt(_0x3d6053(0x139))/0x1+-parseInt(_0x3d6053(0x142))/0x2+-parseInt(_0x3d6053(0x140))/0x3*(-parseInt(_0x3d6053(0x13a))/0x4)+-parseInt(_0x3d6053(0x141))/0x5*(-parseInt(_0x3d6053(0x13b))/0x6)+-parseInt(_0x3d6053(0x138))/0x7*(parseInt(_0x3d6053(0x13e))/0x8)+-parseInt(_0x3d6053(0x13f))/0x9+parseInt(_0x3d6053(0x13d))/0xa*(parseInt(_0x3d6053(0x13c))/0xb);if(_0x35193f===_0x144690)break;else _0x4746b0['push'](_0x4746b0['shift']());}catch(_0x5b2f3c){_0x4746b0['push'](_0x4746b0['shift']());}}}(a26_0x3c9d,0xb40c1));function a26_0x3b7d(_0x3c1acd,_0x4ad89d){_0x3c1acd=_0x3c1acd-0x138;const _0x3c9d51=a26_0x3c9d();let _0x3b7d7d=_0x3c9d51[_0x3c1acd];return _0x3b7d7d;}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_0x3f2d82=a27_0x23c2;(function(_0x14d58d,_0x52ca22){const _0x47aeb2=a27_0x23c2,_0x476694=_0x14d58d();while(!![]){try{const _0x3e6add=-parseInt(_0x47aeb2(0xcd))/0x1*(parseInt(_0x47aeb2(0xd4))/0x2)+-parseInt(_0x47aeb2(0xc7))/0x3+parseInt(_0x47aeb2(0xcf))/0x4*(parseInt(_0x47aeb2(0xd0))/0x5)+parseInt(_0x47aeb2(0xca))/0x6+parseInt(_0x47aeb2(0xce))/0x7*(parseInt(_0x47aeb2(0xc9))/0x8)+parseInt(_0x47aeb2(0xcb))/0x9+-parseInt(_0x47aeb2(0xd9))/0xa;if(_0x3e6add===_0x52ca22)break;else _0x476694['push'](_0x476694['shift']());}catch(_0x21e608){_0x476694['push'](_0x476694['shift']());}}}(a27_0xc4b2,0xe3551));import{listAppConfigs}from'../../core/api-client.js';function a27_0xc4b2(){const _0x46e1dc=['9508864VrYYbY','396864dVwmoK','5496093TPoZst','trim','162394XxRdqF','7ZDJdgP','16uShRxE','2261685xFYIeP','read','Found\x20','length','14ADnAvj','map','appCode','\x20app\x20config(s)','str','429520NeXSko','app-config','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','4691742xNPFtM','list'];a27_0xc4b2=function(){return _0x46e1dc;};return a27_0xc4b2();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a27_0x23c2(_0x308271,_0x475b2b){_0x308271=_0x308271-0xc7;const _0xc4b24c=a27_0xc4b2();let _0x23c273=_0xc4b24c[_0x308271];return _0x23c273;}import{projectAppConfig,readOptionalTags,TAGS_FLAG,validateKey,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigList={'service':a27_0x3f2d82(0xda),'command':a27_0x3f2d82(0xc8),'description':a27_0x3f2d82(0xdb),'risk':a27_0x3f2d82(0xd1),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'key','type':'string','description':'Filter\x20by\x20exact\x20config\x20key'},TAGS_FLAG],async 'validate'(_0x29dc42){const _0x40f7aa=a27_0x3f2d82,_0x4ebd3e=_0x29dc42[_0x40f7aa(0xd8)]('key')[_0x40f7aa(0xcc)]();if(_0x4ebd3e)validateKey(_0x4ebd3e);readOptionalTags(_0x29dc42);},async 'execute'(_0x29ad1f){const _0x5bcd1f=a27_0x3f2d82,_0x52321a=_0x29ad1f[_0x5bcd1f(0xd8)]('key')['trim']()||undefined,_0x53be91=readOptionalTags(_0x29ad1f),_0xea136f=await withAppConfigApiBoundary(_0x5bcd1f(0xc8),{'appCode':_0x29ad1f[_0x5bcd1f(0xd6)]},()=>listAppConfigs(_0x29ad1f[_0x5bcd1f(0xd6)],{'key':_0x52321a,'tags':_0x53be91})),_0xffd205=_0xea136f[_0x5bcd1f(0xd5)](_0x15ea8f=>projectAppConfig(_0x15ea8f));return{'ok':!![],'data':{'appCode':_0x29ad1f[_0x5bcd1f(0xd6)],'count':_0xffd205['length'],'configs':_0xffd205},'message':_0x5bcd1f(0xd2)+_0xffd205[_0x5bcd1f(0xd3)]+_0x5bcd1f(0xd7)};}};
1
+ function a27_0x445f(_0x42c785,_0x45dea8){_0x42c785=_0x42c785-0x169;const _0x17dfb9=a27_0x17df();let _0x445f0f=_0x17dfb9[_0x42c785];return _0x445f0f;}const a27_0x59c099=a27_0x445f;(function(_0x23d5ce,_0x5b0124){const _0x2e3daf=a27_0x445f,_0x2f3b30=_0x23d5ce();while(!![]){try{const _0x41cc34=-parseInt(_0x2e3daf(0x178))/0x1+-parseInt(_0x2e3daf(0x17d))/0x2*(-parseInt(_0x2e3daf(0x16c))/0x3)+-parseInt(_0x2e3daf(0x16d))/0x4*(-parseInt(_0x2e3daf(0x17a))/0x5)+-parseInt(_0x2e3daf(0x16e))/0x6+parseInt(_0x2e3daf(0x179))/0x7*(parseInt(_0x2e3daf(0x169))/0x8)+parseInt(_0x2e3daf(0x17e))/0x9+parseInt(_0x2e3daf(0x16f))/0xa*(-parseInt(_0x2e3daf(0x177))/0xb);if(_0x41cc34===_0x5b0124)break;else _0x2f3b30['push'](_0x2f3b30['shift']());}catch(_0x46f1bc){_0x2f3b30['push'](_0x2f3b30['shift']());}}}(a27_0x17df,0x2f4aa));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_0x59c099(0x175),'command':'list','description':'List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','risk':a27_0x59c099(0x16b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x59c099(0x172),'type':a27_0x59c099(0x176),'description':a27_0x59c099(0x171)},TAGS_FLAG],async 'validate'(_0x5f2e11){const _0x126c9f=a27_0x59c099,_0x45ae00=_0x5f2e11[_0x126c9f(0x17b)]('key')[_0x126c9f(0x17c)]();if(_0x45ae00)validateKey(_0x45ae00);readOptionalTags(_0x5f2e11);},async 'execute'(_0x30110e){const _0x3ba975=a27_0x59c099,_0x497e44=_0x30110e[_0x3ba975(0x17b)](_0x3ba975(0x172))[_0x3ba975(0x17c)]()||undefined,_0x6b471b=readOptionalTags(_0x30110e),_0x53ba11=await withAppConfigApiBoundary('list',{'appCode':_0x30110e[_0x3ba975(0x174)]},()=>listAppConfigs(_0x30110e[_0x3ba975(0x174)],{'key':_0x497e44,'tags':_0x6b471b})),_0x291ba7=_0x53ba11['map'](_0x5648e8=>projectAppConfig(_0x5648e8));return{'ok':!![],'data':{'appCode':_0x30110e[_0x3ba975(0x174)],'count':_0x291ba7['length'],'configs':_0x291ba7},'message':_0x3ba975(0x173)+_0x291ba7[_0x3ba975(0x16a)]+_0x3ba975(0x170)};}};function a27_0x17df(){const _0x3ba80a=['59406wVrJYr','28856VjqXaN','1454700LyaaXe','10OoRYPM','\x20app\x20config(s)','Filter\x20by\x20exact\x20config\x20key','key','Found\x20','appCode','app-config','string','166595PYGwyi','118148fLWqWh','250523XmxCxX','5QurusZ','str','trim','24IIdgWZ','2599398EbiPEy','8pjjiEu','length','read'];a27_0x17df=function(){return _0x3ba80a;};return a27_0x17df();}
@@ -1 +1 @@
1
- const a28_0x5a71db=a28_0xe425;(function(_0xfdb1d6,_0x3ac87b){const _0x127164=a28_0xe425,_0xac7700=_0xfdb1d6();while(!![]){try{const _0x1ecc91=parseInt(_0x127164(0x1d0))/0x1*(parseInt(_0x127164(0x1c8))/0x2)+parseInt(_0x127164(0x1d8))/0x3+-parseInt(_0x127164(0x1d7))/0x4*(-parseInt(_0x127164(0x1d2))/0x5)+parseInt(_0x127164(0x1c9))/0x6*(-parseInt(_0x127164(0x1e0))/0x7)+parseInt(_0x127164(0x1db))/0x8+parseInt(_0x127164(0x1df))/0x9+-parseInt(_0x127164(0x1ce))/0xa;if(_0x1ecc91===_0x3ac87b)break;else _0xac7700['push'](_0xac7700['shift']());}catch(_0x53ff56){_0xac7700['push'](_0xac7700['shift']());}}}(a28_0x44b6,0xf257b));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a28_0x44b6(){const _0x3765d8=['Created','file','appCode','704ANBLby','14052jVFPlF','create','set','apiError','high-risk-write','27649730tlfNOq',',\x20appCode=','4276fvHDTP','\x20app\x20config\x20','560535QMkqGi','string','Read\x20config\x20value\x20from\x20file','/smartapi/app-config/update','get','48GBuLgE','1054641AFKcYQ','app-config','tags','9872488Pbnfng','Updated','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','update','4601700FZiZHe','3556lXpiZv'];a28_0x44b6=function(){return _0x3765d8;};return a28_0x44b6();}function a28_0xe425(_0x5850b2,_0x7b2fb4){_0x5850b2=_0x5850b2-0x1c5;const _0x44b678=a28_0x44b6();let _0xe425d4=_0x44b678[_0x5850b2];return _0xe425d4;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const CREATE_PATH='/smartapi/app-config/create',UPDATE_PATH=a28_0x5a71db(0x1d5);export const appConfigSet={'service':a28_0x5a71db(0x1d9),'command':a28_0x5a71db(0x1cb),'description':a28_0x5a71db(0x1dd),'risk':a28_0x5a71db(0x1cd),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0x5a71db(0x1c6),'type':a28_0x5a71db(0x1d3),'description':a28_0x5a71db(0x1d4)}],async 'validate'(_0x561650){readKeyArg(_0x561650),readOptionalTags(_0x561650),assertSingleValueSource(_0x561650);},async 'dryRun'(_0x1f5e8e){const _0xac5071=a28_0x5a71db,_0x488ca6=readKeyArg(_0x1f5e8e),_0x22a8d5=readOptionalTags(_0x1f5e8e),_0x37c703=assertSingleValueSource(_0x1f5e8e);await assertValueSourceReadable(_0x37c703);const _0x9a5614=await withAppConfigApiBoundary(_0xac5071(0x1d6),{'appCode':_0x1f5e8e['appCode'],'key':_0x488ca6},()=>getAppConfigByKey(_0x1f5e8e[_0xac5071(0x1c7)],_0x488ca6)),_0x333ffa=_0x9a5614?_0xac5071(0x1de):_0xac5071(0x1ca),_0x13aa36=_0x9a5614?projectAppConfig(_0x9a5614):null,_0x3364df=plannedAppConfig({'appCode':_0x1f5e8e[_0xac5071(0x1c7)],'key':_0x488ca6,'tags':_0x22a8d5??_0x9a5614?.[_0xac5071(0x1da)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x333ffa,'appCode':_0x1f5e8e[_0xac5071(0x1c7)],'key':_0x488ca6,'before':_0x13aa36,'after':_0x3364df,'dryRun':!![]}),{'method':'POST','url':_0x333ffa===_0xac5071(0x1de)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x31a321){const _0xdfba48=a28_0x5a71db,_0x4247c6=readKeyArg(_0x31a321),_0x120b02=readOptionalTags(_0x31a321),_0x146f6d=await withAppConfigApiBoundary(_0xdfba48(0x1d6),{'appCode':_0x31a321[_0xdfba48(0x1c7)],'key':_0x4247c6},()=>getAppConfigByKey(_0x31a321[_0xdfba48(0x1c7)],_0x4247c6)),_0x45f2a5=_0x146f6d?projectAppConfig(_0x146f6d):null,_0x69ee67=_0x146f6d?_0xdfba48(0x1de):_0xdfba48(0x1ca),{value:_0x149481,warnings:_0x1ced35}=await readAppConfigValue(_0x31a321),_0x2c0561={'appCode':_0x31a321[_0xdfba48(0x1c7)],'key':_0x4247c6,'value':_0x149481,'tags':_0x120b02??_0x146f6d?.[_0xdfba48(0x1da)]??undefined};await withAppConfigApiBoundary(_0x69ee67,{'appCode':_0x31a321[_0xdfba48(0x1c7)],'key':_0x4247c6},async()=>{const _0xcb0a71=_0xdfba48;_0x146f6d?await updateAppConfig({..._0x2c0561,'id':requireAppConfigId(_0x146f6d,_0x4247c6,_0x31a321[_0xcb0a71(0x1c7)])}):await createAppConfig(_0x2c0561);});const _0x150c36=await withAppConfigApiBoundary(_0xdfba48(0x1d6),{'appCode':_0x31a321[_0xdfba48(0x1c7)],'key':_0x4247c6},()=>getAppConfigByKey(_0x31a321['appCode'],_0x4247c6)),_0x21cd7b=_0x150c36?projectAppConfig(_0x150c36):plannedAppConfig({'appCode':_0x31a321[_0xdfba48(0x1c7)],'key':_0x4247c6,'tags':_0x2c0561[_0xdfba48(0x1da)],'hasValue':_0x149481!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x69ee67,'appCode':_0x31a321[_0xdfba48(0x1c7)],'key':_0x4247c6,'before':_0x45f2a5,'after':_0x21cd7b,'dryRun':![],'warnings':_0x1ced35}),'message':(_0x69ee67===_0xdfba48(0x1de)?_0xdfba48(0x1dc):_0xdfba48(0x1c5))+_0xdfba48(0x1d1)+_0x4247c6};}};function requireAppConfigId(_0x23c51e,_0x4ad815,_0x1f0ace){const _0x369818=a28_0x5a71db;if(typeof _0x23c51e['id']==='number'&&Number['isFinite'](_0x23c51e['id'])&&_0x23c51e['id']>0x0)return _0x23c51e['id'];throw CliErrors[_0x369818(0x1cc)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x4ad815+_0x369818(0x1cf)+_0x1f0ace);}
1
+ function a28_0x353d(_0x38d7f1,_0x4b9c3b){_0x38d7f1=_0x38d7f1-0x14e;const _0x4c7493=a28_0x4c74();let _0x353d8b=_0x4c7493[_0x38d7f1];return _0x353d8b;}const a28_0x169703=a28_0x353d;(function(_0xf0953,_0x4674a8){const _0x177655=a28_0x353d,_0xfe06f3=_0xf0953();while(!![]){try{const _0x2142a6=-parseInt(_0x177655(0x14f))/0x1*(-parseInt(_0x177655(0x162))/0x2)+parseInt(_0x177655(0x156))/0x3*(parseInt(_0x177655(0x154))/0x4)+-parseInt(_0x177655(0x151))/0x5+parseInt(_0x177655(0x152))/0x6+-parseInt(_0x177655(0x158))/0x7*(-parseInt(_0x177655(0x159))/0x8)+-parseInt(_0x177655(0x168))/0x9+-parseInt(_0x177655(0x15e))/0xa*(parseInt(_0x177655(0x169))/0xb);if(_0x2142a6===_0x4674a8)break;else _0xfe06f3['push'](_0xfe06f3['shift']());}catch(_0x3ef5ad){_0xfe06f3['push'](_0xfe06f3['shift']());}}}(a28_0x4c74,0x75701));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='/smartapi/app-config/create',UPDATE_PATH=a28_0x169703(0x160);export const appConfigSet={'service':'app-config','command':a28_0x169703(0x15b),'description':a28_0x169703(0x167),'risk':a28_0x169703(0x161),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':'file','type':a28_0x169703(0x157),'description':a28_0x169703(0x14e)}],async 'validate'(_0x168620){readKeyArg(_0x168620),readOptionalTags(_0x168620),assertSingleValueSource(_0x168620);},async 'dryRun'(_0x4e1979){const _0x4a584e=a28_0x169703,_0x47098e=readKeyArg(_0x4e1979),_0x347aa9=readOptionalTags(_0x4e1979),_0x39a547=assertSingleValueSource(_0x4e1979);await assertValueSourceReadable(_0x39a547);const _0x30147f=await withAppConfigApiBoundary(_0x4a584e(0x15d),{'appCode':_0x4e1979[_0x4a584e(0x16a)],'key':_0x47098e},()=>getAppConfigByKey(_0x4e1979[_0x4a584e(0x16a)],_0x47098e)),_0xce0de4=_0x30147f?_0x4a584e(0x165):_0x4a584e(0x164),_0x1ff454=_0x30147f?projectAppConfig(_0x30147f):null,_0x50d8a7=plannedAppConfig({'appCode':_0x4e1979[_0x4a584e(0x16a)],'key':_0x47098e,'tags':_0x347aa9??_0x30147f?.[_0x4a584e(0x15f)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0xce0de4,'appCode':_0x4e1979[_0x4a584e(0x16a)],'key':_0x47098e,'before':_0x1ff454,'after':_0x50d8a7,'dryRun':!![]}),{'method':_0x4a584e(0x166),'url':_0xce0de4===_0x4a584e(0x165)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x2ecb2d){const _0x22998=a28_0x169703,_0x3acb01=readKeyArg(_0x2ecb2d),_0x1338c7=readOptionalTags(_0x2ecb2d),_0x146ce7=await withAppConfigApiBoundary(_0x22998(0x15d),{'appCode':_0x2ecb2d[_0x22998(0x16a)],'key':_0x3acb01},()=>getAppConfigByKey(_0x2ecb2d[_0x22998(0x16a)],_0x3acb01)),_0x4c6170=_0x146ce7?projectAppConfig(_0x146ce7):null,_0x12b535=_0x146ce7?'update':'create',{value:_0x475ed7,warnings:_0x2070cf}=await readAppConfigValue(_0x2ecb2d),_0x5d415f={'appCode':_0x2ecb2d['appCode'],'key':_0x3acb01,'value':_0x475ed7,'tags':_0x1338c7??_0x146ce7?.[_0x22998(0x15f)]??undefined};await withAppConfigApiBoundary(_0x12b535,{'appCode':_0x2ecb2d[_0x22998(0x16a)],'key':_0x3acb01},async()=>{_0x146ce7?await updateAppConfig({..._0x5d415f,'id':requireAppConfigId(_0x146ce7,_0x3acb01,_0x2ecb2d['appCode'])}):await createAppConfig(_0x5d415f);});const _0x54b2d0=await withAppConfigApiBoundary(_0x22998(0x15d),{'appCode':_0x2ecb2d[_0x22998(0x16a)],'key':_0x3acb01},()=>getAppConfigByKey(_0x2ecb2d['appCode'],_0x3acb01)),_0xccfdf6=_0x54b2d0?projectAppConfig(_0x54b2d0):plannedAppConfig({'appCode':_0x2ecb2d[_0x22998(0x16a)],'key':_0x3acb01,'tags':_0x5d415f[_0x22998(0x15f)],'hasValue':_0x475ed7!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x12b535,'appCode':_0x2ecb2d[_0x22998(0x16a)],'key':_0x3acb01,'before':_0x4c6170,'after':_0xccfdf6,'dryRun':![],'warnings':_0x2070cf}),'message':(_0x12b535===_0x22998(0x165)?_0x22998(0x153):_0x22998(0x15a))+_0x22998(0x15c)+_0x3acb01};}};function a28_0x4c74(){const _0x2e5b51=['968NmehxC','Created','set','\x20app\x20config\x20','get','70QMnWvy','tags','/smartapi/app-config/update','high-risk-write','973868mAzACS','apiError','create','update','POST','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','1080072MDwaLz','1256310TfMolI','appCode','number','Read\x20config\x20value\x20from\x20file','1QDIWkC',',\x20appCode=','3002225AuDigq','3332094AtXxJL','Updated','8aTlttG','isFinite','822531AvONEe','string','23737xNKffQ'];a28_0x4c74=function(){return _0x2e5b51;};return a28_0x4c74();}function requireAppConfigId(_0x506461,_0x32e738,_0x188d02){const _0x47369a=a28_0x169703;if(typeof _0x506461['id']===_0x47369a(0x16b)&&Number[_0x47369a(0x155)](_0x506461['id'])&&_0x506461['id']>0x0)return _0x506461['id'];throw CliErrors[_0x47369a(0x163)]('App\x20config\x20server\x20id\x20missing\x20for\x20key='+_0x32e738+_0x47369a(0x150)+_0x188d02);}
@@ -1 +1 @@
1
- const a29_0x5f01d3=a29_0x10c8;(function(_0x1deb22,_0x34a481){const _0x18c953=a29_0x10c8,_0x3b4de6=_0x1deb22();while(!![]){try{const _0x2fd0b4=parseInt(_0x18c953(0x1c8))/0x1*(parseInt(_0x18c953(0x1b1))/0x2)+parseInt(_0x18c953(0x1a0))/0x3+parseInt(_0x18c953(0x190))/0x4+parseInt(_0x18c953(0x1a7))/0x5*(-parseInt(_0x18c953(0x1a6))/0x6)+parseInt(_0x18c953(0x1a4))/0x7*(parseInt(_0x18c953(0x1b9))/0x8)+parseInt(_0x18c953(0x1b5))/0x9*(parseInt(_0x18c953(0x1b8))/0xa)+-parseInt(_0x18c953(0x1c9))/0xb;if(_0x2fd0b4===_0x34a481)break;else _0x3b4de6['push'](_0x3b4de6['shift']());}catch(_0x1581ec){_0x3b4de6['push'](_0x3b4de6['shift']());}}}(a29_0x278f,0xdb873));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';function a29_0x10c8(_0x4183f8,_0x5b01d0){_0x4183f8=_0x4183f8-0x18a;const _0x278fcb=a29_0x278f();let _0x10c8a3=_0x278fcb[_0x4183f8];return _0x10c8a3;}export const KEY_ARG={'name':a29_0x5f01d3(0x195),'description':a29_0x5f01d3(0x1b0),'required':!![]};export const VALUE_ARG={'name':a29_0x5f01d3(0x1c3),'description':'Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','required':![]};export const TAGS_FLAG={'name':a29_0x5f01d3(0x19d),'type':a29_0x5f01d3(0x198),'description':a29_0x5f01d3(0x1b7)};export const STDIN_FLAG={'name':a29_0x5f01d3(0x18d),'type':a29_0x5f01d3(0x1bf),'description':'Read\x20config\x20value\x20from\x20stdin','default':![]};function a29_0x278f(){const _0x42129e=['apiError','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','appCode:\x20','Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','boolean','flag','join','warnings','value','from-env','str','validation','Environment\x20variable\x20is\x20not\x20set:\x20','711450bqOvmj','62849941UdUgrM','defineProperties','argument','gmtModified','push','dryRun','stdin','setEncoding','appCode','5210672tAlTHt','data','value\x20is\x20redacted','kind','Failed\x20to\x20','key','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','string','url','utf8','after','once','tags','env','reveal','3179859eJBYGJ','path','length','slice','112FvniuA','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','1338396VxkhYz','5xOPyem','trim','Missing\x20app-config\x20value\x20source.','args','Missing\x20app-config\x20key.','before','file','name','valueRedacted','Runtime\x20app-config\x20key','4xothko','\x20app\x20config.','method','gmtCreate','15576147ENVRPT','operation','Config\x20tags\x20for\x20filtering/display\x20metadata','10HeeDGW','659840ZSLbHd'];a29_0x278f=function(){return _0x42129e;};return a29_0x278f();}export const FROM_ENV_FLAG={'name':'from-env','type':a29_0x5f01d3(0x198),'description':a29_0x5f01d3(0x196)};export const REVEAL_FLAG={'name':a29_0x5f01d3(0x19f),'type':'boolean','description':a29_0x5f01d3(0x1bd),'default':![]};export function readKeyArg(_0x3790cd){const _0x784c88=a29_0x5f01d3,_0x3715a8=_0x3790cd[_0x784c88(0x1aa)][0x0]?.[_0x784c88(0x1a8)]()??'';return validateKey(_0x3715a8),_0x3715a8;}export function readOptionalTags(_0xebe913){const _0x52d789=a29_0x5f01d3,_0xfe8fd0=_0xebe913['str'](_0x52d789(0x19d))[_0x52d789(0x1a8)]();if(!_0xfe8fd0)return undefined;if(_0xfe8fd0[_0x52d789(0x1a2)]>0x20)throw CliErrors[_0x52d789(0x1c6)](_0x52d789(0x1bb));return _0xfe8fd0;}export function validateKey(_0x3d7492){const _0x1fac5a=a29_0x5f01d3;if(!_0x3d7492)throw CliErrors[_0x1fac5a(0x1c6)](_0x1fac5a(0x1ab));if(_0x3d7492[_0x1fac5a(0x1a2)]>0x100)throw CliErrors[_0x1fac5a(0x1c6)](_0x1fac5a(0x197));}export function projectAppConfig(_0x163295,_0x473e38){const _0x4ab093=a29_0x5f01d3,_0x431d94=_0x163295['value']!==undefined&&_0x163295[_0x4ab093(0x1c3)]!==null&&_0x163295[_0x4ab093(0x1c3)]!=='',_0x1abeb0={'appCode':_0x163295[_0x4ab093(0x18f)],'key':_0x163295[_0x4ab093(0x195)],'tags':_0x163295[_0x4ab093(0x19d)]??undefined,'hasValue':_0x431d94,'valueRedacted':_0x431d94&&!_0x473e38?.['reveal'],'gmtCreate':_0x163295[_0x4ab093(0x1b4)],'gmtModified':_0x163295[_0x4ab093(0x18a)]};return _0x473e38?.[_0x4ab093(0x19f)]&&(_0x1abeb0[_0x4ab093(0x1c3)]=_0x163295[_0x4ab093(0x1c3)]??'',_0x1abeb0[_0x4ab093(0x1af)]=![]),_0x1abeb0;}export function plannedAppConfig(_0x3b0517){const _0x24d3e0=a29_0x5f01d3,_0xdad7e8=_0x3b0517['hasValue']??!![];return{'appCode':_0x3b0517[_0x24d3e0(0x18f)],'key':_0x3b0517[_0x24d3e0(0x195)],'tags':_0x3b0517[_0x24d3e0(0x19d)]??undefined,'hasValue':_0xdad7e8,'valueRedacted':_0xdad7e8};}export function buildMutationData(_0x3a5473){const _0x4d12c8=a29_0x5f01d3;return{'operation':_0x3a5473[_0x4d12c8(0x1b6)],'selector':{'appCode':_0x3a5473[_0x4d12c8(0x18f)],'key':_0x3a5473[_0x4d12c8(0x195)]},'before':_0x3a5473[_0x4d12c8(0x1ac)],'after':_0x3a5473[_0x4d12c8(0x19b)],'dryRun':_0x3a5473[_0x4d12c8(0x18c)],'warnings':_0x3a5473[_0x4d12c8(0x1c2)]??[]};}export async function withAppConfigApiBoundary(_0x5c4ac7,_0x4c7777,_0x3c4264){const _0x18fc71=a29_0x5f01d3;try{return await _0x3c4264();}catch{const _0x1cd7e5=[_0x18fc71(0x1bc)+_0x4c7777[_0x18fc71(0x18f)]];if(_0x4c7777[_0x18fc71(0x195)])_0x1cd7e5[_0x18fc71(0x18b)]('key:\x20'+_0x4c7777[_0x18fc71(0x195)]);_0x1cd7e5[_0x18fc71(0x18b)](_0x18fc71(0x192));throw CliErrors[_0x18fc71(0x1ba)](_0x18fc71(0x194)+_0x5c4ac7+_0x18fc71(0x1b2),_0x1cd7e5[_0x18fc71(0x1c1)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x5e277c,_0xae8ac7){const _0x4179ad=a29_0x5f01d3;return Object[_0x4179ad(0x1ca)](_0x5e277c,{'method':{'value':_0xae8ac7[_0x4179ad(0x1b3)],'enumerable':![]},'url':{'value':_0xae8ac7[_0x4179ad(0x199)],'enumerable':![]}});}export function assertSingleValueSource(_0xd1bfdf){const _0x4a0c22=a29_0x5f01d3,_0x489ec9=[];_0xd1bfdf['args'][_0x4a0c22(0x1a2)]>0x1&&_0x489ec9[_0x4a0c22(0x18b)]({'kind':_0x4a0c22(0x1cb),'value':_0xd1bfdf[_0x4a0c22(0x1aa)][_0x4a0c22(0x1a3)](0x1)[_0x4a0c22(0x1c1)]('\x20')});const _0x371e58=_0xd1bfdf[_0x4a0c22(0x1c0)]('value');_0x371e58!==undefined&&_0x371e58!==null&&_0x489ec9['push']({'kind':_0x4a0c22(0x1cb),'value':String(_0x371e58)});_0xd1bfdf['bool']('stdin')&&_0x489ec9[_0x4a0c22(0x18b)]({'kind':_0x4a0c22(0x18d)});const _0x580bab=_0xd1bfdf['str'](_0x4a0c22(0x1c4))[_0x4a0c22(0x1a8)]();_0x580bab&&_0x489ec9['push']({'kind':'env','name':_0x580bab});const _0x496068=_0xd1bfdf[_0x4a0c22(0x1c5)](_0x4a0c22(0x1ad))['trim']();_0x496068&&_0x489ec9[_0x4a0c22(0x18b)]({'kind':_0x4a0c22(0x1ad),'path':_0x496068});if(_0x489ec9['length']===0x0)throw CliErrors[_0x4a0c22(0x1c6)](_0x4a0c22(0x1a9),_0x4a0c22(0x1be));if(_0x489ec9['length']>0x1)throw CliErrors[_0x4a0c22(0x1c6)]('App\x20config\x20value\x20source\x20is\x20ambiguous.','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');return _0x489ec9[0x0];}export async function assertValueSourceReadable(_0xf02754){const _0x1caf0c=a29_0x5f01d3;if(_0xf02754['kind']===_0x1caf0c(0x19e)&&!(_0xf02754[_0x1caf0c(0x1ae)]in process.env))throw CliErrors[_0x1caf0c(0x1c6)](_0x1caf0c(0x1c7)+_0xf02754[_0x1caf0c(0x1ae)]);if(_0xf02754[_0x1caf0c(0x193)]==='file')try{await access(_0xf02754[_0x1caf0c(0x1a1)]);}catch{throw CliErrors[_0x1caf0c(0x1c6)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0xf02754[_0x1caf0c(0x1a1)]);}}export async function readAppConfigValue(_0x25773f){const _0x1f6164=a29_0x5f01d3,_0x58ecdb=assertSingleValueSource(_0x25773f),_0xb00214=[];if(_0x58ecdb['kind']===_0x1f6164(0x1cb))return _0xb00214['push'](_0x1f6164(0x1a5)),{'value':_0x58ecdb[_0x1f6164(0x1c3)]??'','source':_0x58ecdb['kind'],'warnings':_0xb00214};if(_0x58ecdb[_0x1f6164(0x193)]===_0x1f6164(0x18d))return{'value':await readStdin(),'source':_0x58ecdb[_0x1f6164(0x193)],'warnings':_0xb00214};if(_0x58ecdb[_0x1f6164(0x193)]===_0x1f6164(0x19e)){if(!(_0x58ecdb[_0x1f6164(0x1ae)]in process.env))throw CliErrors['validation'](_0x1f6164(0x1c7)+_0x58ecdb[_0x1f6164(0x1ae)]);return{'value':process.env[_0x58ecdb.name]??'','source':_0x58ecdb[_0x1f6164(0x193)],'warnings':_0xb00214};}return{'value':await readFile(_0x58ecdb[_0x1f6164(0x1a1)],_0x1f6164(0x19a)),'source':_0x58ecdb[_0x1f6164(0x193)],'warnings':_0xb00214};}function readStdin(){return new Promise((_0x2beaca,_0x811892)=>{const _0x766522=a29_0x10c8;let _0x31bc1e='';process[_0x766522(0x18d)][_0x766522(0x18e)](_0x766522(0x19a)),process[_0x766522(0x18d)]['on'](_0x766522(0x191),_0x33aaad=>{_0x31bc1e+=_0x33aaad;}),process[_0x766522(0x18d)][_0x766522(0x19c)]('end',()=>_0x2beaca(_0x31bc1e)),process['stdin'][_0x766522(0x19c)]('error',_0x811892);});}
1
+ const a29_0x1c30a4=a29_0x592c;function a29_0x329b(){const _0x3bad5a=['end','once','gmtModified','before','stdin','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','defineProperties','Value\x20file\x20is\x20not\x20readable:\x20','setEncoding','key:\x20','bool','Runtime\x20app-config\x20key','reveal','value','operation','Missing\x20app-config\x20key.','join','env','11341mCMQhN','validation','177413pJCWNP','kind','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','method','from-env','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','string','appCode','str','data','hasValue','620QRkWoc','error','tags','trim','\x20app\x20config.','gmtCreate','utf8','38040vIKUwG','199482LRxdky','flag','url','warnings','Missing\x20app-config\x20value\x20source.','path','1042218VlYrgh','name','key','42joAIBT','boolean','112xqQdom','argument','1029705zWsNgB','392220mNSytl','App\x20config\x20value\x20source\x20is\x20ambiguous.','push','appCode:\x20','file','Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','args','after','length','slice','115nkGbhA','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','Environment\x20variable\x20is\x20not\x20set:\x20'];a29_0x329b=function(){return _0x3bad5a;};return a29_0x329b();}(function(_0x5770c8,_0x491828){const _0xfb7189=a29_0x592c,_0x16a408=_0x5770c8();while(!![]){try{const _0x104eba=parseInt(_0xfb7189(0x121))/0x1+-parseInt(_0xfb7189(0x13a))/0x2+parseInt(_0xfb7189(0x141))/0x3+parseInt(_0xfb7189(0x133))/0x4*(-parseInt(_0xfb7189(0x14c))/0x5)+parseInt(_0xfb7189(0x134))/0x6*(parseInt(_0xfb7189(0x13d))/0x7)+-parseInt(_0xfb7189(0x13f))/0x8*(-parseInt(_0xfb7189(0x142))/0x9)+-parseInt(_0xfb7189(0x12c))/0xa*(parseInt(_0xfb7189(0x161))/0xb);if(_0x104eba===_0x491828)break;else _0x16a408['push'](_0x16a408['shift']());}catch(_0x1b6f86){_0x16a408['push'](_0x16a408['shift']());}}}(a29_0x329b,0x80899));import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x1c30a4(0x13c),'description':a29_0x1c30a4(0x15a),'required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x1c30a4(0x123),'required':![]};export const TAGS_FLAG={'name':a29_0x1c30a4(0x12e),'type':a29_0x1c30a4(0x127),'description':'Config\x20tags\x20for\x20filtering/display\x20metadata'};export const STDIN_FLAG={'name':a29_0x1c30a4(0x153),'type':a29_0x1c30a4(0x13e),'description':'Read\x20config\x20value\x20from\x20stdin','default':![]};export const FROM_ENV_FLAG={'name':a29_0x1c30a4(0x125),'type':a29_0x1c30a4(0x127),'description':a29_0x1c30a4(0x154)};export const REVEAL_FLAG={'name':'reveal','type':a29_0x1c30a4(0x13e),'description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};export function readKeyArg(_0x41fd17){const _0x48197a=a29_0x1c30a4,_0x2389ea=_0x41fd17[_0x48197a(0x148)][0x0]?.[_0x48197a(0x12f)]()??'';return validateKey(_0x2389ea),_0x2389ea;}export function readOptionalTags(_0x410892){const _0x4106f2=a29_0x1c30a4,_0x5de5be=_0x410892['str'](_0x4106f2(0x12e))[_0x4106f2(0x12f)]();if(!_0x5de5be)return undefined;if(_0x5de5be[_0x4106f2(0x14a)]>0x20)throw CliErrors[_0x4106f2(0x120)](_0x4106f2(0x126));return _0x5de5be;}export function validateKey(_0x25e1e9){const _0x2641e4=a29_0x1c30a4;if(!_0x25e1e9)throw CliErrors[_0x2641e4(0x120)](_0x2641e4(0x15e));if(_0x25e1e9[_0x2641e4(0x14a)]>0x100)throw CliErrors['validation']('App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.');}function a29_0x592c(_0x550bb9,_0x12afa1){_0x550bb9=_0x550bb9-0x120;const _0x329bb0=a29_0x329b();let _0x592ccb=_0x329bb0[_0x550bb9];return _0x592ccb;}export function projectAppConfig(_0x5713b9,_0x5b26ec){const _0x5ee426=a29_0x1c30a4,_0x42e4a4=_0x5713b9[_0x5ee426(0x15c)]!==undefined&&_0x5713b9['value']!==null&&_0x5713b9[_0x5ee426(0x15c)]!=='',_0xe95f92={'appCode':_0x5713b9[_0x5ee426(0x128)],'key':_0x5713b9['key'],'tags':_0x5713b9[_0x5ee426(0x12e)]??undefined,'hasValue':_0x42e4a4,'valueRedacted':_0x42e4a4&&!_0x5b26ec?.[_0x5ee426(0x15b)],'gmtCreate':_0x5713b9[_0x5ee426(0x131)],'gmtModified':_0x5713b9[_0x5ee426(0x151)]};return _0x5b26ec?.[_0x5ee426(0x15b)]&&(_0xe95f92[_0x5ee426(0x15c)]=_0x5713b9[_0x5ee426(0x15c)]??'',_0xe95f92['valueRedacted']=![]),_0xe95f92;}export function plannedAppConfig(_0xbe79b4){const _0x2c7216=a29_0x1c30a4,_0x31e042=_0xbe79b4[_0x2c7216(0x12b)]??!![];return{'appCode':_0xbe79b4[_0x2c7216(0x128)],'key':_0xbe79b4['key'],'tags':_0xbe79b4['tags']??undefined,'hasValue':_0x31e042,'valueRedacted':_0x31e042};}export function buildMutationData(_0x4bd68e){const _0x221a1e=a29_0x1c30a4;return{'operation':_0x4bd68e[_0x221a1e(0x15d)],'selector':{'appCode':_0x4bd68e[_0x221a1e(0x128)],'key':_0x4bd68e[_0x221a1e(0x13c)]},'before':_0x4bd68e[_0x221a1e(0x152)],'after':_0x4bd68e[_0x221a1e(0x149)],'dryRun':_0x4bd68e['dryRun'],'warnings':_0x4bd68e[_0x221a1e(0x137)]??[]};}export async function withAppConfigApiBoundary(_0x1e0da9,_0x14c861,_0x383007){const _0x150486=a29_0x1c30a4;try{return await _0x383007();}catch{const _0x1dcd3c=[_0x150486(0x145)+_0x14c861['appCode']];if(_0x14c861[_0x150486(0x13c)])_0x1dcd3c[_0x150486(0x144)](_0x150486(0x158)+_0x14c861['key']);_0x1dcd3c[_0x150486(0x144)]('value\x20is\x20redacted');throw CliErrors['apiError']('Failed\x20to\x20'+_0x1e0da9+_0x150486(0x130),_0x1dcd3c[_0x150486(0x15f)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0x207173,_0xa6665c){const _0x25e348=a29_0x1c30a4;return Object[_0x25e348(0x155)](_0x207173,{'method':{'value':_0xa6665c[_0x25e348(0x124)],'enumerable':![]},'url':{'value':_0xa6665c[_0x25e348(0x136)],'enumerable':![]}});}export function assertSingleValueSource(_0x551bf4){const _0x54be88=a29_0x1c30a4,_0x12ab2c=[];_0x551bf4[_0x54be88(0x148)][_0x54be88(0x14a)]>0x1&&_0x12ab2c[_0x54be88(0x144)]({'kind':'argument','value':_0x551bf4[_0x54be88(0x148)][_0x54be88(0x14b)](0x1)['join']('\x20')});const _0x4c1c78=_0x551bf4[_0x54be88(0x135)](_0x54be88(0x15c));_0x4c1c78!==undefined&&_0x4c1c78!==null&&_0x12ab2c[_0x54be88(0x144)]({'kind':_0x54be88(0x140),'value':String(_0x4c1c78)});_0x551bf4[_0x54be88(0x159)](_0x54be88(0x153))&&_0x12ab2c[_0x54be88(0x144)]({'kind':_0x54be88(0x153)});const _0x22ef76=_0x551bf4[_0x54be88(0x129)](_0x54be88(0x125))[_0x54be88(0x12f)]();_0x22ef76&&_0x12ab2c[_0x54be88(0x144)]({'kind':_0x54be88(0x160),'name':_0x22ef76});const _0x1a4711=_0x551bf4[_0x54be88(0x129)]('file')[_0x54be88(0x12f)]();_0x1a4711&&_0x12ab2c[_0x54be88(0x144)]({'kind':_0x54be88(0x146),'path':_0x1a4711});if(_0x12ab2c[_0x54be88(0x14a)]===0x0)throw CliErrors[_0x54be88(0x120)](_0x54be88(0x138),_0x54be88(0x14d));if(_0x12ab2c[_0x54be88(0x14a)]>0x1)throw CliErrors[_0x54be88(0x120)](_0x54be88(0x143),'Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.');return _0x12ab2c[0x0];}export async function assertValueSourceReadable(_0x1673b3){const _0x55b011=a29_0x1c30a4;if(_0x1673b3[_0x55b011(0x122)]===_0x55b011(0x160)&&!(_0x1673b3[_0x55b011(0x13b)]in process.env))throw CliErrors['validation']('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x1673b3[_0x55b011(0x13b)]);if(_0x1673b3[_0x55b011(0x122)]===_0x55b011(0x146))try{await access(_0x1673b3[_0x55b011(0x139)]);}catch{throw CliErrors[_0x55b011(0x120)](_0x55b011(0x156)+_0x1673b3[_0x55b011(0x139)]);}}export async function readAppConfigValue(_0x40b756){const _0x221df5=a29_0x1c30a4,_0x4d5b61=assertSingleValueSource(_0x40b756),_0x5cb535=[];if(_0x4d5b61[_0x221df5(0x122)]==='argument')return _0x5cb535['push'](_0x221df5(0x147)),{'value':_0x4d5b61[_0x221df5(0x15c)]??'','source':_0x4d5b61[_0x221df5(0x122)],'warnings':_0x5cb535};if(_0x4d5b61[_0x221df5(0x122)]===_0x221df5(0x153))return{'value':await readStdin(),'source':_0x4d5b61[_0x221df5(0x122)],'warnings':_0x5cb535};if(_0x4d5b61['kind']==='env'){if(!(_0x4d5b61['name']in process.env))throw CliErrors[_0x221df5(0x120)](_0x221df5(0x14e)+_0x4d5b61[_0x221df5(0x13b)]);return{'value':process.env[_0x4d5b61.name]??'','source':_0x4d5b61[_0x221df5(0x122)],'warnings':_0x5cb535};}return{'value':await readFile(_0x4d5b61[_0x221df5(0x139)],_0x221df5(0x132)),'source':_0x4d5b61['kind'],'warnings':_0x5cb535};}function readStdin(){return new Promise((_0x45fb02,_0x4ddb56)=>{const _0x131abc=a29_0x592c;let _0x495341='';process[_0x131abc(0x153)][_0x131abc(0x157)](_0x131abc(0x132)),process['stdin']['on'](_0x131abc(0x12a),_0x4261f1=>{_0x495341+=_0x4261f1;}),process['stdin'][_0x131abc(0x150)](_0x131abc(0x14f),()=>_0x45fb02(_0x495341)),process[_0x131abc(0x153)][_0x131abc(0x150)](_0x131abc(0x12d),_0x4ddb56);});}
@@ -1 +1 @@
1
- const a30_0x792ea5=a30_0x4eeb;(function(_0x4244bc,_0x4098c2){const _0x18b0ab=a30_0x4eeb,_0xfb7534=_0x4244bc();while(!![]){try{const _0x48d7cb=parseInt(_0x18b0ab(0x11c))/0x1*(parseInt(_0x18b0ab(0x10f))/0x2)+parseInt(_0x18b0ab(0x115))/0x3*(parseInt(_0x18b0ab(0x116))/0x4)+parseInt(_0x18b0ab(0x120))/0x5*(-parseInt(_0x18b0ab(0x125))/0x6)+-parseInt(_0x18b0ab(0x126))/0x7+parseInt(_0x18b0ab(0x11e))/0x8+parseInt(_0x18b0ab(0x123))/0x9+-parseInt(_0x18b0ab(0x110))/0xa;if(_0x48d7cb===_0x4098c2)break;else _0xfb7534['push'](_0xfb7534['shift']());}catch(_0xfb4886){_0xfb7534['push'](_0xfb7534['shift']());}}}(a30_0x4114,0x2f664));import{unlinkSync,existsSync}from'node:fs';function a30_0x4114(){const _0x1403aa=['✓\x20Logged\x20out','6MAivGs','1270402yLtnGV','196306VMXrpt','404270zITibI','read','log','login','!\x20Not\x20logged\x20in','45MYXGqX','16008FTbLUR','auth','logout','bool','Login\x20via\x20browser','boolean','2RXiSTc','write','1200632BSEOsk','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','450435nBiPiS','../../auth/auth-server-ui.js','nonInteractive','897597OsIWnc'];a30_0x4114=function(){return _0x1403aa;};return a30_0x4114();}function a30_0x4eeb(_0x5a012e,_0x3844c7){_0x5a012e=_0x5a012e-0x10f;const _0x411404=a30_0x4114();let _0x4eebe8=_0x411404[_0x5a012e];return _0x4eebe8;}import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x792ea5(0x117),'command':a30_0x792ea5(0x113),'description':a30_0x792ea5(0x11a),'risk':a30_0x792ea5(0x111),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':'yes','type':a30_0x792ea5(0x11b),'description':a30_0x792ea5(0x11f),'default':![]}],async 'execute'(_0x46725c){const _0x4b53c4=a30_0x792ea5,{runAuthServer:_0xdae383}=await import(_0x4b53c4(0x121));return await _0xdae383({'autoYes':_0x46725c[_0x4b53c4(0x119)]('yes'),'nonInteractive':_0x46725c[_0x4b53c4(0x122)]}),{'ok':!![]};}},{'service':a30_0x792ea5(0x117),'command':a30_0x792ea5(0x118),'description':'Clear\x20login\x20session','risk':a30_0x792ea5(0x11d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x313433){const _0x22a017=a30_0x792ea5;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x22a017(0x112)](_0x22a017(0x124))):console[_0x22a017(0x112)](_0x22a017(0x114)),{'ok':!![]};}}];
1
+ function a30_0x3321(_0x3c0a79,_0x1da824){_0x3c0a79=_0x3c0a79-0x120;const _0xd5bdca=a30_0xd5bd();let _0x3321f9=_0xd5bdca[_0x3c0a79];return _0x3321f9;}function a30_0xd5bd(){const _0x39ffde=['log','3465534Fmjseo','34143996QllAqC','✓\x20Logged\x20out','Clear\x20login\x20session','../../auth/auth-server-ui.js','4FlMlTV','1238485ZXMjtR','13fUzMQq','logout','736aLbVqf','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','nonInteractive','12116619ZjLTsF','boolean','Login\x20via\x20browser','60313vmfgTo','69790JuCBXR','bool','2EkSQiK','auth','yes','5zouDXk','!\x20Not\x20logged\x20in','390vMptJH','2096214NzSIeM','login'];a30_0xd5bd=function(){return _0x39ffde;};return a30_0xd5bd();}const a30_0xcaf44b=a30_0x3321;(function(_0x5b6005,_0x461c8a){const _0x4b4c82=a30_0x3321,_0x57e02b=_0x5b6005();while(!![]){try{const _0x284b5d=-parseInt(_0x4b4c82(0x139))/0x1*(parseInt(_0x4b4c82(0x12a))/0x2)+parseInt(_0x4b4c82(0x130))/0x3*(parseInt(_0x4b4c82(0x138))/0x4)+-parseInt(_0x4b4c82(0x12d))/0x5*(-parseInt(_0x4b4c82(0x133))/0x6)+-parseInt(_0x4b4c82(0x128))/0x7*(parseInt(_0x4b4c82(0x121))/0x8)+-parseInt(_0x4b4c82(0x124))/0x9+parseInt(_0x4b4c82(0x12f))/0xa*(parseInt(_0x4b4c82(0x127))/0xb)+-parseInt(_0x4b4c82(0x134))/0xc*(-parseInt(_0x4b4c82(0x13a))/0xd);if(_0x284b5d===_0x461c8a)break;else _0x57e02b['push'](_0x57e02b['shift']());}catch(_0x6f80a7){_0x57e02b['push'](_0x57e02b['shift']());}}}(a30_0xd5bd,0xcb7c9));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':'auth','command':a30_0xcaf44b(0x131),'description':a30_0xcaf44b(0x126),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0xcaf44b(0x12c),'type':a30_0xcaf44b(0x125),'description':a30_0xcaf44b(0x122),'default':![]}],async 'execute'(_0x285394){const _0x2d158c=a30_0xcaf44b,{runAuthServer:_0x4bede5}=await import(_0x2d158c(0x137));return await _0x4bede5({'autoYes':_0x285394[_0x2d158c(0x129)](_0x2d158c(0x12c)),'nonInteractive':_0x285394[_0x2d158c(0x123)]}),{'ok':!![]};}},{'service':a30_0xcaf44b(0x12b),'command':a30_0xcaf44b(0x120),'description':a30_0xcaf44b(0x136),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xaad2ec){const _0x12990d=a30_0xcaf44b;return existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x12990d(0x135))):console[_0x12990d(0x132)](_0x12990d(0x12e)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a31_0x2c27d0=a31_0x2b07;(function(_0x151393,_0x4a4f3e){const _0x37364a=a31_0x2b07,_0x264ef5=_0x151393();while(!![]){try{const _0xe9d452=-parseInt(_0x37364a(0x1ef))/0x1*(-parseInt(_0x37364a(0x1f4))/0x2)+parseInt(_0x37364a(0x1ae))/0x3+-parseInt(_0x37364a(0x1f7))/0x4+parseInt(_0x37364a(0x1b7))/0x5*(-parseInt(_0x37364a(0x1f1))/0x6)+-parseInt(_0x37364a(0x1d5))/0x7*(parseInt(_0x37364a(0x1b3))/0x8)+parseInt(_0x37364a(0x1cb))/0x9*(parseInt(_0x37364a(0x1b5))/0xa)+-parseInt(_0x37364a(0x1b6))/0xb;if(_0xe9d452===_0x4a4f3e)break;else _0x264ef5['push'](_0x264ef5['shift']());}catch(_0x4687a6){_0x264ef5['push'](_0x264ef5['shift']());}}}(a31_0x1f40,0xf0c1b));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';function a31_0x1f40(){const _0x407354=['183071XKvlXS','create','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','string','\x22.\x20','\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).','function-node','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Select\x20operation\x20type:','operationType','.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','Alias\x20\x22','Script\x20description','utf8','Invalid\x20dataset\x20selection.','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','bff','scriptsRootDir','length','entries','HOOK\x20requires\x20alias/operation/node\x20options.','operation-type','Operation\x20type\x20(HOOK\x20only)','\x22\x20not\x20found\x20for\x20dataset\x20','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','Function\x20name\x20(valid\x20JS\x20identifier)','4321xFwvFT','\x20function:\x20','4481868XTnpiG','File\x20already\x20exists:\x20','str','716DIbylV','name','UNKNOWN','6642560DoLITg','functionNode','datasetcode','--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','code','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','Select\x20dataset:','write','COMMON','TODO:\x20add\x20script\x20description','parseInt','\x0a\x20*\x20[触发节点]\x20','No\x20datasets\x20found\x20for\x20this\x20app.','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','includes','\x20api\x20pull`\x20to\x20refresh.','Trigger\x20node\x20(HOOK\x20only)','trim','isInteger','ENDPOINT','\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','4555833zadTCx','HOOK','type','description','No\x20operation\x20types\x20found\x20for\x20dataset\x20','8exxYFw','map','16368260HEpQll','14106895gQcVYH','5McGbhP','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','appCode','datasetCode','nonInteractive','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','question','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','No\x20api.ts\x20found.\x20Run\x20`','keys','join','Dataset\x20not\x20found\x20for\x20code\x20\x22','Available:\x20','Invalid\x20function\x20name\x20\x22','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/','before','9uNWrJF','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','find','validation','stdin','.js','source','after','alias','stderr'];a31_0x1f40=function(){return _0x407354;};return a31_0x1f40();}function a31_0x2b07(_0x30a613,_0x33c9e8){_0x30a613=_0x30a613-0x19a;const _0x1f4000=a31_0x1f40();let _0x2b07ea=_0x1f4000[_0x30a613];return _0x2b07ea;}import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x2c27d0(0x1e5),'command':a31_0x2c27d0(0x1d6),'description':a31_0x2c27d0(0x1be),'risk':a31_0x2c27d0(0x1a0),'flags':[{'name':a31_0x2c27d0(0x1b0),'type':a31_0x2c27d0(0x1d8),'required':!![],'enum':['COMMON',a31_0x2c27d0(0x1ac),a31_0x2c27d0(0x1af)],'description':'Script\x20type'},{'name':a31_0x2c27d0(0x1f5),'type':a31_0x2c27d0(0x1d8),'required':!![],'description':a31_0x2c27d0(0x1ee)},{'name':a31_0x2c27d0(0x1b1),'type':a31_0x2c27d0(0x1d8),'description':a31_0x2c27d0(0x1e1)},{'name':a31_0x2c27d0(0x1d3),'type':'string','description':a31_0x2c27d0(0x1e4)},{'name':'datasetcode','type':a31_0x2c27d0(0x1d8),'description':a31_0x2c27d0(0x1ed)},{'name':a31_0x2c27d0(0x1ea),'type':a31_0x2c27d0(0x1d8),'description':a31_0x2c27d0(0x1eb)},{'name':a31_0x2c27d0(0x1db),'type':'string','description':a31_0x2c27d0(0x1a9),'enum':[a31_0x2c27d0(0x1ca),a31_0x2c27d0(0x1d2)]}],async 'validate'(_0x4bccc2){const _0x24207c=a31_0x2c27d0,_0x5b6d7e=_0x4bccc2[_0x24207c(0x1f3)](_0x24207c(0x1f5));if(!isValidBffFunctionName(_0x5b6d7e))throw CliErrors[_0x24207c(0x1ce)](_0x24207c(0x1c4)+_0x5b6d7e+_0x24207c(0x1da));},async 'execute'(_0x825ac8){const _0x4ad713=a31_0x2c27d0,_0x1f2649=loadBffProjectConfig(_0x825ac8[_0x4ad713(0x1b9)]),_0x30c562=_0x825ac8[_0x4ad713(0x1f3)](_0x4ad713(0x1b0)),_0x5d529b=_0x825ac8[_0x4ad713(0x1f3)]('name'),_0x1d81c0=_0x825ac8['str'](_0x4ad713(0x1b1))||undefined,_0x4aa179=_0x30c562===_0x4ad713(0x1af)?await resolveHookOptions(_0x1f2649,_0x825ac8):undefined,_0x586b86=buildFilePath(_0x1f2649,_0x30c562,_0x5d529b,_0x4aa179);if(await fileExists(_0x586b86))throw CliErrors['validation'](_0x4ad713(0x1f2)+_0x586b86);await mkdir(dirname(_0x586b86),{'recursive':!![]});const _0x136ada=generateTemplate(_0x30c562,_0x5d529b,_0x825ac8[_0x4ad713(0x1b9)],_0x1d81c0,_0x4aa179);await writeFile(_0x586b86,_0x136ada,_0x4ad713(0x1e2));const _0x72335={'type':_0x30c562,'name':_0x5d529b,'path':_0x586b86};if(_0x1d81c0)_0x72335[_0x4ad713(0x1b1)]=_0x1d81c0;if(_0x4aa179){if(_0x4aa179[_0x4ad713(0x1d3)])_0x72335['alias']=_0x4aa179['alias'];_0x72335[_0x4ad713(0x1ba)]=_0x4aa179[_0x4ad713(0x1ba)],_0x72335[_0x4ad713(0x1de)]=_0x4aa179['operationType'],_0x72335[_0x4ad713(0x19a)]=_0x4aa179['functionNode'];}return{'ok':!![],'data':_0x72335,'message':'Created\x20'+_0x30c562+_0x4ad713(0x1f0)+_0x5d529b};}};async function resolveHookOptions(_0x59448d,_0x4a80cd){const _0x465097=a31_0x2c27d0,_0x360c4b=loadAliasMap(_0x4a80cd['apiDir'],undefined,resolveApiFilePath(_0x4a80cd['apiDir'],_0x4a80cd['appCode'])),_0x31dd6b=_0x360c4b[_0x465097(0x1e7)]>0x0;let _0x56c87a,_0x161458,_0x3d5431;const _0x115491=_0x4a80cd[_0x465097(0x1f3)]('alias'),_0x444e3c=_0x4a80cd['str'](_0x465097(0x19b));if(_0x115491){const _0x56d8cf=resolveAlias(_0x4a80cd['apiDir'],_0x115491,undefined,resolveApiFilePath(_0x4a80cd['apiDir'],_0x4a80cd[_0x465097(0x1b9)]));if(!_0x56d8cf){const _0xf31a60=_0x31dd6b?'Available\x20aliases:\x20'+_0x360c4b[_0x465097(0x1b4)](_0x3267b9=>_0x3267b9[_0x465097(0x1d3)])[_0x465097(0x1c1)](',\x20'):_0x465097(0x1bf)+CLI_BIN_NAME+_0x465097(0x1c7);throw CliErrors['validation'](_0x465097(0x1e0)+_0x115491+'\x22\x20not\x20found.\x20'+_0xf31a60);}_0x56c87a=_0x115491,_0x161458=_0x56d8cf;}else{if(_0x444e3c){_0x161458=_0x444e3c;const _0x4f3d31=_0x360c4b[_0x465097(0x1cd)](_0x5a652d=>_0x5a652d[_0x465097(0x1ba)]===_0x444e3c);_0x56c87a=_0x4f3d31?.[_0x465097(0x1d3)];}else{if(_0x4a80cd['nonInteractive'])throw CliErrors[_0x465097(0x1ce)](_0x465097(0x1c6));else{if(_0x31dd6b){const _0x3c48dc=_0x360c4b[_0x465097(0x1b4)](_0xce27cb=>_0xce27cb[_0x465097(0x1d3)]+'\x20('+_0xce27cb['tableName']+')'),_0x49a1d8=await promptSelect(_0x465097(0x19f),_0x3c48dc),_0x365709=_0x360c4b[_0x49a1d8];if(!_0x365709)throw CliErrors['validation'](_0x465097(0x1e3));_0x56c87a=_0x365709[_0x465097(0x1d3)],_0x161458=_0x365709[_0x465097(0x1ba)];}else{const _0x766493=await listDatasets(_0x4a80cd[_0x465097(0x1b9)]);if(_0x766493['length']===0x0)throw CliErrors[_0x465097(0x1ce)](_0x465097(0x1a5));const _0x367d3f=_0x766493[_0x465097(0x1b4)](_0xe74c43=>_0xe74c43[_0x465097(0x1f5)]+'\x20['+(_0xe74c43[_0x465097(0x1d1)]??_0x465097(0x1f6))+']\x20('+_0xe74c43[_0x465097(0x19d)]+')'),_0x465d8b=await promptSelect('Select\x20dataset:',_0x367d3f),_0x2f5dfa=_0x766493[_0x465d8b];if(!_0x2f5dfa)throw CliErrors[_0x465097(0x1ce)]('Invalid\x20dataset\x20selection.');_0x161458=_0x2f5dfa[_0x465097(0x19d)],_0x56c87a=undefined;}}}}const _0x5b7938=await listDatasets(_0x4a80cd[_0x465097(0x1b9)]),_0x21582c=_0x5b7938[_0x465097(0x1cd)](_0x386111=>_0x386111[_0x465097(0x19d)]===_0x161458);if(!_0x21582c)throw CliErrors['validation'](_0x465097(0x1c2)+_0x161458+_0x465097(0x1d9)+(_0x56c87a?_0x465097(0x1d7)+CLI_BIN_NAME+_0x465097(0x1a8):''));_0x3d5431=_0x21582c['id'];const _0x5e1ca5=_0x56c87a??_0x161458,_0xf72708=await listBffDatasetOperations(_0x4a80cd[_0x465097(0x1b9)],_0x3d5431),_0x3b8ffa=_0xf72708?Object[_0x465097(0x1c0)](_0xf72708):[];if(_0x3b8ffa[_0x465097(0x1e7)]===0x0)throw CliErrors['validation'](_0x465097(0x1b2)+_0x5e1ca5+'.');let _0x4f8899;const _0x3a82f4=_0x4a80cd['str'](_0x465097(0x1ea));if(_0x3a82f4){if(!_0x3b8ffa[_0x465097(0x1a7)](_0x3a82f4))throw CliErrors['validation']('Operation\x20type\x20\x22'+_0x3a82f4+_0x465097(0x1ec)+_0x5e1ca5+'.\x20'+(_0x465097(0x1c3)+_0x3b8ffa[_0x465097(0x1c1)](',\x20')));_0x4f8899=_0x3a82f4;}else{if(_0x4a80cd[_0x465097(0x1bb)])throw CliErrors[_0x465097(0x1ce)](_0x465097(0x19c));const _0x4fe166=await promptSelect(_0x465097(0x1dd),_0x3b8ffa);_0x4f8899=_0x3b8ffa[_0x4fe166]??_0x3b8ffa[0x0];}let _0x298685=normalizeHookFunctionNode(_0x4a80cd[_0x465097(0x1f3)](_0x465097(0x1db)));if(!_0x298685){if(_0x4a80cd[_0x465097(0x1f3)](_0x465097(0x1db)))throw CliErrors[_0x465097(0x1ce)](_0x465097(0x1b8));if(_0x4a80cd['nonInteractive'])throw CliErrors['validation'](_0x465097(0x1cc));const _0x3ce546=await promptSelect('Select\x20trigger\x20node:',[_0x465097(0x1ca),_0x465097(0x1d2)]);_0x298685=[_0x465097(0x1ca),_0x465097(0x1d2)][_0x3ce546]??_0x465097(0x1ca);}return{'alias':_0x56c87a,'datasetCode':_0x161458,'datasetId':_0x3d5431,'operationType':_0x4f8899,'functionNode':_0x298685};}async function promptSelect(_0x422efd,_0x17b0ec){const _0x3a28c6=a31_0x2c27d0;if(_0x17b0ec[_0x3a28c6(0x1e7)]===0x1)return 0x0;for(const [_0x119c16,_0x5d9e47]of _0x17b0ec[_0x3a28c6(0x1e8)]()){process['stderr']['write']('\x20\x20'+(_0x119c16+0x1)+'.\x20'+_0x5d9e47+'\x0a');}const _0x4a72f2=createInterface({'input':process[_0x3a28c6(0x1cf)],'output':process[_0x3a28c6(0x1d4)]});while(!![]){const _0x5a44d6=await new Promise(_0x5a5cb3=>{const _0xd47aa2=_0x3a28c6;_0x4a72f2[_0xd47aa2(0x1bd)](_0x422efd+'\x20',_0x5a5cb3);}),_0x2d1780=Number[_0x3a28c6(0x1a3)](_0x5a44d6[_0x3a28c6(0x1aa)](),0xa);if(Number[_0x3a28c6(0x1ab)](_0x2d1780)&&_0x2d1780>=0x1&&_0x2d1780<=_0x17b0ec[_0x3a28c6(0x1e7)])return _0x4a72f2['close'](),_0x2d1780-0x1;process[_0x3a28c6(0x1d4)][_0x3a28c6(0x1a0)]('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x17b0ec[_0x3a28c6(0x1e7)]+'.\x0a');}}function buildFilePath(_0x405150,_0x3c349e,_0x4eb986,_0x2029fc){const _0x157f54=a31_0x2c27d0;if(_0x3c349e==='HOOK'){if(!_0x2029fc)throw CliErrors[_0x157f54(0x1ce)](_0x157f54(0x1e9));const _0x49b6d1=_0x2029fc[_0x157f54(0x1d3)]??_0x2029fc[_0x157f54(0x1ba)];return join(_0x405150[_0x157f54(0x1e6)],'HOOK',_0x49b6d1,_0x2029fc[_0x157f54(0x1de)],_0x2029fc[_0x157f54(0x19a)],_0x4eb986+_0x157f54(0x1d0));}return join(_0x405150[_0x157f54(0x1e6)],_0x3c349e,_0x4eb986+'.js');}export function generateTemplate(_0x10f285,_0x3aa9b2,_0x41b56a,_0x1ba11f,_0x573e4d){const _0x2b10ba=a31_0x2c27d0,_0x271f9a=_0x1ba11f?.['trim']()||_0x2b10ba(0x1a2);if(_0x10f285===_0x2b10ba(0x1a1))return _0x2b10ba(0x1dc)+_0x271f9a+'\x0a\x20*\x20[脚本名称]\x20'+_0x3aa9b2+_0x2b10ba(0x1c9)+_0x3aa9b2+_0x2b10ba(0x1df)+_0x3aa9b2+_0x2b10ba(0x1bc);if(_0x10f285==='ENDPOINT')return _0x2b10ba(0x19e)+_0x271f9a+_0x2b10ba(0x1a6)+_0x41b56a+'/'+_0x3aa9b2+'\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'+_0x3aa9b2+_0x2b10ba(0x1bc);if(!_0x573e4d)throw CliErrors[_0x2b10ba(0x1ce)](_0x2b10ba(0x1c8));return'/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x271f9a+_0x2b10ba(0x1c5)+_0x41b56a+'/'+_0x573e4d[_0x2b10ba(0x1ba)]+'/'+_0x573e4d[_0x2b10ba(0x1de)]+_0x2b10ba(0x1a4)+_0x573e4d['functionNode']+_0x2b10ba(0x1ad)+_0x3aa9b2+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
1
+ const a31_0x56e86a=a31_0x4703;(function(_0x49778d,_0x53b8d6){const _0x2acc9e=a31_0x4703,_0x4736d8=_0x49778d();while(!![]){try{const _0x2fab9e=-parseInt(_0x2acc9e(0x194))/0x1*(parseInt(_0x2acc9e(0x171))/0x2)+parseInt(_0x2acc9e(0x154))/0x3*(-parseInt(_0x2acc9e(0x16a))/0x4)+-parseInt(_0x2acc9e(0x14f))/0x5+parseInt(_0x2acc9e(0x17b))/0x6*(-parseInt(_0x2acc9e(0x190))/0x7)+-parseInt(_0x2acc9e(0x191))/0x8*(-parseInt(_0x2acc9e(0x161))/0x9)+parseInt(_0x2acc9e(0x17f))/0xa*(-parseInt(_0x2acc9e(0x158))/0xb)+parseInt(_0x2acc9e(0x175))/0xc;if(_0x2fab9e===_0x53b8d6)break;else _0x4736d8['push'](_0x4736d8['shift']());}catch(_0x81335f){_0x4736d8['push'](_0x4736d8['shift']());}}}(a31_0x3b48,0x98296));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';function a31_0x3b48(){const _0x2ccc60=['map','bff','nonInteractive','\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','keys','create','alias','function-node','operationType','Script\x20type','includes','Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)','63511IPTwJE','32vxIswz','UNKNOWN','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','408815ZXrEih','length','question','functionNode','Available:\x20','before','join','No\x20operation\x20types\x20found\x20for\x20dataset\x20','\x20function:\x20','trim','Select\x20dataset:','Function\x20name\x20(valid\x20JS\x20identifier)','\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','apiDir','\x0a\x20*\x20[触发节点]\x20','code','string','entries','str','utf8','write','\x22.\x20','2677210dYgkex','parseInt','scriptsRootDir','\x22\x20not\x20found\x20for\x20dataset\x20','No\x20datasets\x20found\x20for\x20this\x20app.','1149xBKCNJ','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','stderr','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','99vvzsoQ','ENDPOINT','Alias\x20\x22','COMMON','description','Invalid\x20dataset\x20selection.','type','datasetcode','datasetCode','1363581BaMELc','Created\x20','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','tableName','\x20api\x20pull`\x20to\x20refresh.','HOOK','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','Operation\x20type\x20(HOOK\x20only)','.js','3076ATioBc','Trigger\x20node\x20(HOOK\x20only)','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/','File\x20already\x20exists:\x20','Operation\x20type\x20\x22','\x22\x20not\x20found.\x20','6ipNITs',']\x20(','after','operation-type','43115724MPQvDR','Dataset\x20not\x20found\x20for\x20code\x20\x22','Select\x20trigger\x20node:','validation','\x0a\x20*\x20[脚本名称]\x20','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','762adgFsg','appCode','name','TODO:\x20add\x20script\x20description','407860GsoXWd','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','find','--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.'];a31_0x3b48=function(){return _0x2ccc60;};return a31_0x3b48();}function a31_0x4703(_0x4253be,_0x300075){_0x4253be=_0x4253be-0x144;const _0x3b48f0=a31_0x3b48();let _0x470308=_0x3b48f0[_0x4253be];return _0x470308;}import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x56e86a(0x184),'command':a31_0x56e86a(0x189),'description':a31_0x56e86a(0x17a),'risk':'write','flags':[{'name':a31_0x56e86a(0x15e),'type':a31_0x56e86a(0x149),'required':!![],'enum':[a31_0x56e86a(0x15b),a31_0x56e86a(0x159),'HOOK'],'description':a31_0x56e86a(0x18d)},{'name':a31_0x56e86a(0x17d),'type':a31_0x56e86a(0x149),'required':!![],'description':a31_0x56e86a(0x144)},{'name':a31_0x56e86a(0x15c),'type':a31_0x56e86a(0x149),'description':'Script\x20description'},{'name':a31_0x56e86a(0x18a),'type':a31_0x56e86a(0x149),'description':a31_0x56e86a(0x18f)},{'name':a31_0x56e86a(0x15f),'type':'string','description':a31_0x56e86a(0x180)},{'name':a31_0x56e86a(0x174),'type':a31_0x56e86a(0x149),'description':a31_0x56e86a(0x168)},{'name':a31_0x56e86a(0x18b),'type':'string','description':a31_0x56e86a(0x16b),'enum':['before',a31_0x56e86a(0x173)]}],async 'validate'(_0xeff24d){const _0x6fdbfe=a31_0x56e86a,_0x51c5=_0xeff24d['str'](_0x6fdbfe(0x17d));if(!isValidBffFunctionName(_0x51c5))throw CliErrors[_0x6fdbfe(0x178)]('Invalid\x20function\x20name\x20\x22'+_0x51c5+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x332746){const _0x1df885=a31_0x56e86a,_0x4aa8f5=loadBffProjectConfig(_0x332746['appCode']),_0x4e91da=_0x332746['str'](_0x1df885(0x15e)),_0x133a19=_0x332746[_0x1df885(0x14b)]('name'),_0x111649=_0x332746[_0x1df885(0x14b)](_0x1df885(0x15c))||undefined,_0x155db0=_0x4e91da===_0x1df885(0x166)?await resolveHookOptions(_0x4aa8f5,_0x332746):undefined,_0x59f200=buildFilePath(_0x4aa8f5,_0x4e91da,_0x133a19,_0x155db0);if(await fileExists(_0x59f200))throw CliErrors[_0x1df885(0x178)](_0x1df885(0x16e)+_0x59f200);await mkdir(dirname(_0x59f200),{'recursive':!![]});const _0x245850=generateTemplate(_0x4e91da,_0x133a19,_0x332746['appCode'],_0x111649,_0x155db0);await writeFile(_0x59f200,_0x245850,_0x1df885(0x14c));const _0x490e16={'type':_0x4e91da,'name':_0x133a19,'path':_0x59f200};if(_0x111649)_0x490e16[_0x1df885(0x15c)]=_0x111649;if(_0x155db0){if(_0x155db0[_0x1df885(0x18a)])_0x490e16[_0x1df885(0x18a)]=_0x155db0[_0x1df885(0x18a)];_0x490e16[_0x1df885(0x160)]=_0x155db0[_0x1df885(0x160)],_0x490e16['operationType']=_0x155db0[_0x1df885(0x18c)],_0x490e16[_0x1df885(0x197)]=_0x155db0[_0x1df885(0x197)];}return{'ok':!![],'data':_0x490e16,'message':_0x1df885(0x162)+_0x4e91da+_0x1df885(0x19c)+_0x133a19};}};async function resolveHookOptions(_0x517b48,_0x5adf85){const _0x171b53=a31_0x56e86a,_0x1e2893=loadAliasMap(_0x5adf85['apiDir'],undefined,resolveApiFilePath(_0x5adf85[_0x171b53(0x146)],_0x5adf85[_0x171b53(0x17c)])),_0x336af4=_0x1e2893['length']>0x0;let _0x472905,_0x216152,_0x283db5;const _0x4dbeeb=_0x5adf85['str'](_0x171b53(0x18a)),_0x233fd3=_0x5adf85['str']('datasetcode');if(_0x4dbeeb){const _0x3386ce=resolveAlias(_0x5adf85[_0x171b53(0x146)],_0x4dbeeb,undefined,resolveApiFilePath(_0x5adf85['apiDir'],_0x5adf85[_0x171b53(0x17c)]));if(!_0x3386ce){const _0x2e0c2c=_0x336af4?'Available\x20aliases:\x20'+_0x1e2893[_0x171b53(0x183)](_0x49ac60=>_0x49ac60['alias'])[_0x171b53(0x19a)](',\x20'):'No\x20api.ts\x20found.\x20Run\x20`'+CLI_BIN_NAME+_0x171b53(0x167);throw CliErrors[_0x171b53(0x178)](_0x171b53(0x15a)+_0x4dbeeb+_0x171b53(0x170)+_0x2e0c2c);}_0x472905=_0x4dbeeb,_0x216152=_0x3386ce;}else{if(_0x233fd3){_0x216152=_0x233fd3;const _0x58c076=_0x1e2893[_0x171b53(0x181)](_0x3414de=>_0x3414de[_0x171b53(0x160)]===_0x233fd3);_0x472905=_0x58c076?.[_0x171b53(0x18a)];}else{if(_0x5adf85['nonInteractive'])throw CliErrors[_0x171b53(0x178)]('--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');else{if(_0x336af4){const _0x1a560a=_0x1e2893[_0x171b53(0x183)](_0x58431e=>_0x58431e[_0x171b53(0x18a)]+'\x20('+_0x58431e[_0x171b53(0x164)]+')'),_0x58b11d=await promptSelect(_0x171b53(0x19e),_0x1a560a),_0x367aa2=_0x1e2893[_0x58b11d];if(!_0x367aa2)throw CliErrors[_0x171b53(0x178)](_0x171b53(0x15d));_0x472905=_0x367aa2[_0x171b53(0x18a)],_0x216152=_0x367aa2[_0x171b53(0x160)];}else{const _0x422abb=await listDatasets(_0x5adf85[_0x171b53(0x17c)]);if(_0x422abb[_0x171b53(0x195)]===0x0)throw CliErrors[_0x171b53(0x178)](_0x171b53(0x153));const _0x55c7fc=_0x422abb[_0x171b53(0x183)](_0x288070=>_0x288070[_0x171b53(0x17d)]+'\x20['+(_0x288070['source']??_0x171b53(0x192))+_0x171b53(0x172)+_0x288070[_0x171b53(0x148)]+')'),_0x385df1=await promptSelect(_0x171b53(0x19e),_0x55c7fc),_0x50ffde=_0x422abb[_0x385df1];if(!_0x50ffde)throw CliErrors[_0x171b53(0x178)](_0x171b53(0x15d));_0x216152=_0x50ffde[_0x171b53(0x148)],_0x472905=undefined;}}}}const _0x2bb37a=await listDatasets(_0x5adf85[_0x171b53(0x17c)]),_0x1d0209=_0x2bb37a[_0x171b53(0x181)](_0x90e896=>_0x90e896[_0x171b53(0x148)]===_0x216152);if(!_0x1d0209)throw CliErrors['validation'](_0x171b53(0x176)+_0x216152+_0x171b53(0x14e)+(_0x472905?_0x171b53(0x163)+CLI_BIN_NAME+_0x171b53(0x165):''));_0x283db5=_0x1d0209['id'];const _0xd78d6d=_0x472905??_0x216152,_0x185a98=await listBffDatasetOperations(_0x5adf85[_0x171b53(0x17c)],_0x283db5),_0x51c10=_0x185a98?Object[_0x171b53(0x188)](_0x185a98):[];if(_0x51c10['length']===0x0)throw CliErrors[_0x171b53(0x178)](_0x171b53(0x19b)+_0xd78d6d+'.');let _0x1ed1a3;const _0x325d73=_0x5adf85[_0x171b53(0x14b)]('operation-type');if(_0x325d73){if(!_0x51c10[_0x171b53(0x18e)](_0x325d73))throw CliErrors[_0x171b53(0x178)](_0x171b53(0x16f)+_0x325d73+_0x171b53(0x152)+_0xd78d6d+'.\x20'+(_0x171b53(0x198)+_0x51c10[_0x171b53(0x19a)](',\x20')));_0x1ed1a3=_0x325d73;}else{if(_0x5adf85[_0x171b53(0x185)])throw CliErrors['validation']('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x17df28=await promptSelect('Select\x20operation\x20type:',_0x51c10);_0x1ed1a3=_0x51c10[_0x17df28]??_0x51c10[0x0];}let _0x3abd2b=normalizeHookFunctionNode(_0x5adf85[_0x171b53(0x14b)](_0x171b53(0x18b)));if(!_0x3abd2b){if(_0x5adf85['str'](_0x171b53(0x18b)))throw CliErrors[_0x171b53(0x178)]('--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.');if(_0x5adf85[_0x171b53(0x185)])throw CliErrors[_0x171b53(0x178)](_0x171b53(0x182));const _0x19d832=await promptSelect(_0x171b53(0x177),[_0x171b53(0x199),_0x171b53(0x173)]);_0x3abd2b=[_0x171b53(0x199),_0x171b53(0x173)][_0x19d832]??_0x171b53(0x199);}return{'alias':_0x472905,'datasetCode':_0x216152,'datasetId':_0x283db5,'operationType':_0x1ed1a3,'functionNode':_0x3abd2b};}async function promptSelect(_0x350976,_0x552df6){const _0x54fe05=a31_0x56e86a;if(_0x552df6[_0x54fe05(0x195)]===0x1)return 0x0;for(const [_0x466082,_0x3e35bc]of _0x552df6[_0x54fe05(0x14a)]()){process[_0x54fe05(0x156)][_0x54fe05(0x14d)]('\x20\x20'+(_0x466082+0x1)+'.\x20'+_0x3e35bc+'\x0a');}const _0x5cce3e=createInterface({'input':process['stdin'],'output':process['stderr']});while(!![]){const _0x3f508b=await new Promise(_0x1591c5=>{const _0x4fed5f=_0x54fe05;_0x5cce3e[_0x4fed5f(0x196)](_0x350976+'\x20',_0x1591c5);}),_0x25e5ea=Number[_0x54fe05(0x150)](_0x3f508b[_0x54fe05(0x19d)](),0xa);if(Number['isInteger'](_0x25e5ea)&&_0x25e5ea>=0x1&&_0x25e5ea<=_0x552df6[_0x54fe05(0x195)])return _0x5cce3e['close'](),_0x25e5ea-0x1;process[_0x54fe05(0x156)][_0x54fe05(0x14d)](_0x54fe05(0x186)+_0x552df6[_0x54fe05(0x195)]+'.\x0a');}}function buildFilePath(_0x2c618c,_0x57da0b,_0x1b16f4,_0x10deca){const _0x272f85=a31_0x56e86a;if(_0x57da0b==='HOOK'){if(!_0x10deca)throw CliErrors[_0x272f85(0x178)]('HOOK\x20requires\x20alias/operation/node\x20options.');const _0x1493db=_0x10deca[_0x272f85(0x18a)]??_0x10deca['datasetCode'];return join(_0x2c618c['scriptsRootDir'],_0x272f85(0x166),_0x1493db,_0x10deca[_0x272f85(0x18c)],_0x10deca[_0x272f85(0x197)],_0x1b16f4+_0x272f85(0x169));}return join(_0x2c618c[_0x272f85(0x151)],_0x57da0b,_0x1b16f4+'.js');}export function generateTemplate(_0x34a34f,_0x1dc700,_0x3d537c,_0x2b7d81,_0x931579){const _0x14f761=a31_0x56e86a,_0x2c989b=_0x2b7d81?.[_0x14f761(0x19d)]()||_0x14f761(0x17e);if(_0x34a34f===_0x14f761(0x15b))return'/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20'+_0x2c989b+_0x14f761(0x179)+_0x1dc700+'\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/'+_0x1dc700+'.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'+_0x1dc700+_0x14f761(0x155);if(_0x34a34f===_0x14f761(0x159))return _0x14f761(0x16c)+_0x2c989b+_0x14f761(0x16d)+_0x3d537c+'/'+_0x1dc700+'\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'+_0x1dc700+_0x14f761(0x155);if(!_0x931579)throw CliErrors['validation'](_0x14f761(0x193));return _0x14f761(0x157)+_0x2c989b+_0x14f761(0x187)+_0x3d537c+'/'+_0x931579[_0x14f761(0x160)]+'/'+_0x931579[_0x14f761(0x18c)]+_0x14f761(0x147)+_0x931579[_0x14f761(0x197)]+_0x14f761(0x145)+_0x1dc700+_0x14f761(0x155);}
@@ -1 +1 @@
1
- const a32_0x1fc238=a32_0x526b;(function(_0x3d0564,_0x105174){const _0x3e80bb=a32_0x526b,_0x38d086=_0x3d0564();while(!![]){try{const _0x4c7a3e=-parseInt(_0x3e80bb(0x142))/0x1*(parseInt(_0x3e80bb(0x13d))/0x2)+parseInt(_0x3e80bb(0x130))/0x3+parseInt(_0x3e80bb(0x13f))/0x4+parseInt(_0x3e80bb(0x149))/0x5+parseInt(_0x3e80bb(0x134))/0x6+-parseInt(_0x3e80bb(0x129))/0x7+-parseInt(_0x3e80bb(0x121))/0x8*(-parseInt(_0x3e80bb(0x125))/0x9);if(_0x4c7a3e===_0x105174)break;else _0x38d086['push'](_0x38d086['shift']());}catch(_0x54c8ae){_0x38d086['push'](_0x38d086['shift']());}}}(a32_0x230c,0xb443d));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';function a32_0x230c(){const _0x21445b=['startsWith','1026010luMJJZ','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','toISOString','validation','length','projectRoot','688872pKpIZA','lockFilePath','Function\x20not\x20found:\x20','join','81IfRnqS','lastSync','delete','<timestamp>','8812720SvZYPq','No\x20lock\x20entry\x20found\x20for\x20\x22','BFF\x20lock\x20file\x20not\x20found.','Deleted\x20','high-risk-write','/api/management/library/scripts/delete','stringify','1677147CqznAa','Would\x20delete\x20','parse','functions','8689614ftxEpw','POST','map','trashDir','trashedTo','appCode','filter','\x22\x20not\x20found\x20after\x20ensureLockScope.','str','13526jqdYfR','scriptsRoot','665188zFpvdf','target','remoteId','171RlCZFd','apps','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','includes','find','replace'];a32_0x230c=function(){return _0x21445b;};return a32_0x230c();}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_0x1fc238(0x127),'description':'Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','risk':a32_0x1fc238(0x12d),'flags':[{'name':a32_0x1fc238(0x140),'type':'string','required':!![],'description':a32_0x1fc238(0x144)}],async 'validate'(_0x29bb8d){const _0x1d5562=a32_0x1fc238,_0x5635fb=loadBffProjectConfig(_0x29bb8d[_0x1d5562(0x139)]),_0xe0ff06=await readBffLockFile(_0x5635fb[_0x1d5562(0x122)]);if(!_0xe0ff06)throw CliErrors[_0x1d5562(0x11e)]('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x1d70d2){const _0x56db35=a32_0x1fc238,_0x234999=loadBffProjectConfig(_0x1d70d2['appCode']),_0xca7f69=await readBffLockFile(_0x234999[_0x56db35(0x122)]);if(!_0xca7f69)throw CliErrors[_0x56db35(0x11e)](_0x56db35(0x12b));const {appLock:_0x3e7c0b}=ensureLockScope(_0xca7f69,_0x1d70d2['appCode'],_0x234999[_0x56db35(0x13e)],'delete'),_0x2445b0=_0x1d70d2['str'](_0x56db35(0x140)),_0x52b277=Object['keys'](_0x3e7c0b[_0x56db35(0x133)]),_0x3458bb=resolveDeleteTarget(_0x2445b0,_0x52b277),_0x2d7b89=_0x3e7c0b[_0x56db35(0x133)][_0x3458bb];if(!_0x2d7b89)throw CliErrors['validation'](_0x56db35(0x12a)+_0x3458bb+'\x22.');const _0x388870=resolveLocalFilePathFromLockKey(_0x234999,_0x3458bb),_0x1ecb97=relative(_0x234999[_0x56db35(0x120)],_0x388870),_0x5e31c6=join(_0x234999[_0x56db35(0x137)],_0x56db35(0x128),_0x1ecb97);return{'method':_0x56db35(0x135),'url':_0x56db35(0x12e),'body':{'appCode':_0x1d70d2['appCode'],'target':_0x3458bb,'remoteId':_0x2d7b89[_0x56db35(0x141)],'localFilePath':_0x388870,'trashedPath':_0x5e31c6},'description':_0x56db35(0x131)+_0x3458bb+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x57b99a){const _0x12cec4=a32_0x1fc238,_0x21a01f=loadBffProjectConfig(_0x57b99a[_0x12cec4(0x139)]),_0x29995e=await readBffLockFile(_0x21a01f[_0x12cec4(0x122)]);if(!_0x29995e)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x22861e,appLock:_0x301e15}=ensureLockScope(_0x29995e,_0x57b99a[_0x12cec4(0x139)],_0x21a01f['scriptsRoot'],_0x12cec4(0x127)),_0x4c9452=JSON[_0x12cec4(0x132)](JSON[_0x12cec4(0x12f)](_0x22861e)),_0x938405=_0x4c9452[_0x12cec4(0x143)][_0x57b99a['appCode']];if(!_0x938405)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x57b99a[_0x12cec4(0x139)]+_0x12cec4(0x13b));const _0x324271=_0x57b99a[_0x12cec4(0x13c)](_0x12cec4(0x140)),_0x268899=Object['keys'](_0x938405[_0x12cec4(0x133)]),_0x30ae92=resolveDeleteTarget(_0x324271,_0x268899),_0x10d265=_0x938405[_0x12cec4(0x133)][_0x30ae92];if(!_0x10d265)throw CliErrors[_0x12cec4(0x11e)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x30ae92+'\x22.');await deleteBffScript(_0x10d265[_0x12cec4(0x141)]),delete _0x938405[_0x12cec4(0x133)][_0x30ae92],_0x938405[_0x12cec4(0x126)]=new Date()[_0x12cec4(0x14b)](),await writeBffLockFile(_0x21a01f[_0x12cec4(0x122)],_0x4c9452);const _0x5d605b=resolveLocalFilePathFromLockKey(_0x21a01f,_0x30ae92);let _0x2bfbb4;await fileExists(_0x5d605b)&&(_0x2bfbb4=await moveToTrash(_0x21a01f[_0x12cec4(0x120)],_0x21a01f['trashDir'],_0x5d605b),await cleanupEmptyDirectories(dirname(_0x5d605b),_0x21a01f['scriptsRootDir']));await waitForDeleteSettlement(_0x21a01f['lockFilePath'],_0x57b99a[_0x12cec4(0x139)],_0x30ae92,_0x5d605b),await sleep(0x96);const _0x4916f1={'deleted':_0x30ae92,'remoteId':_0x10d265[_0x12cec4(0x141)]};if(_0x2bfbb4)_0x4916f1[_0x12cec4(0x138)]=_0x2bfbb4;return{'ok':!![],'data':_0x4916f1,'message':_0x12cec4(0x12c)+_0x30ae92+(_0x2bfbb4?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x51f6e4,_0xaa4d6f){const _0x46f59d=a32_0x1fc238;if(_0x51f6e4[_0x46f59d(0x145)]('/')){const _0x55acad=_0xaa4d6f[_0x46f59d(0x146)](_0x44c9f0=>_0x44c9f0===_0x51f6e4);if(!_0x55acad)throw CliErrors[_0x46f59d(0x11e)]('Function\x20not\x20found:\x20'+_0x51f6e4);return _0x55acad;}const _0x37e202=_0xaa4d6f[_0x46f59d(0x13a)](_0x331ccd=>_0x331ccd['split']('/')['at'](-0x1)===_0x51f6e4);if(_0x37e202['length']===0x0)throw CliErrors[_0x46f59d(0x11e)](_0x46f59d(0x123)+_0x51f6e4);if(_0x37e202[_0x46f59d(0x11f)]>0x1)throw CliErrors[_0x46f59d(0x11e)]('Multiple\x20functions\x20match\x20\x22'+_0x51f6e4+_0x46f59d(0x14a)+_0x37e202[_0x46f59d(0x136)](_0x10fa79=>'\x20\x20-\x20'+_0x10fa79)[_0x46f59d(0x124)]('\x0a'));return _0x37e202[0x0];}function a32_0x526b(_0x297743,_0x4f23ba){_0x297743=_0x297743-0x11e;const _0x230cff=a32_0x230c();let _0x526bd2=_0x230cff[_0x297743];return _0x526bd2;}async function moveToTrash(_0x508350,_0x506ce6,_0x2fdd76){const _0x32f2df=a32_0x1fc238,_0x4ef395=new Date()[_0x32f2df(0x14b)]()[_0x32f2df(0x147)](/[:.]/g,'-'),_0x33e023=relative(_0x508350,_0x2fdd76),_0x36d997=join(_0x506ce6,_0x4ef395,_0x33e023);return await mkdir(dirname(_0x36d997),{'recursive':!![]}),await rename(_0x2fdd76,_0x36d997),_0x36d997;}async function cleanupEmptyDirectories(_0x5c00ac,_0x4e0038){const _0x3b5c0e=a32_0x1fc238;let _0xf17d29=resolve(_0x5c00ac);const _0x26bad2=resolve(_0x4e0038);while(_0xf17d29[_0x3b5c0e(0x148)](''+_0x26bad2+sep)||_0xf17d29===_0x26bad2){if(_0xf17d29===_0x26bad2)return;try{const _0x4ee1e4=await readdir(_0xf17d29);if(_0x4ee1e4['length']>0x0)return;await rmdir(_0xf17d29);}catch{return;}_0xf17d29=dirname(_0xf17d29);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x597ba8,_0x54aed2,_0x29a99e,_0x4a6aab){const _0x43cd=a32_0x1fc238;for(let _0x41aaf6=0x0;_0x41aaf6<DELETE_SETTLE_RETRY_COUNT;_0x41aaf6+=0x1){const _0x5ef47b=await readBffLockFile(_0x597ba8),_0x5e92ef=!!_0x5ef47b?.[_0x43cd(0x143)]?.[_0x54aed2]?.[_0x43cd(0x133)]?.[_0x29a99e],_0x38af1c=await fileExists(_0x4a6aab);if(!_0x5e92ef&&!_0x38af1c)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error('Local\x20delete\x20not\x20settled\x20for\x20'+_0x29a99e+'.');}
1
+ const a32_0x5bb577=a32_0x15e8;(function(_0x41d681,_0x430e14){const _0x2c9f1e=a32_0x15e8,_0x28b0ef=_0x41d681();while(!![]){try{const _0x145b79=parseInt(_0x2c9f1e(0xa8))/0x1*(-parseInt(_0x2c9f1e(0xb0))/0x2)+parseInt(_0x2c9f1e(0xd4))/0x3*(-parseInt(_0x2c9f1e(0xb9))/0x4)+-parseInt(_0x2c9f1e(0xbc))/0x5+-parseInt(_0x2c9f1e(0xd0))/0x6+parseInt(_0x2c9f1e(0xb1))/0x7+-parseInt(_0x2c9f1e(0xb8))/0x8*(parseInt(_0x2c9f1e(0xc5))/0x9)+parseInt(_0x2c9f1e(0xb7))/0xa;if(_0x145b79===_0x430e14)break;else _0x28b0ef['push'](_0x28b0ef['shift']());}catch(_0x271b9a){_0x28b0ef['push'](_0x28b0ef['shift']());}}}(a32_0x193c,0x4ad1e));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a32_0x15e8(_0x316080,_0x42738a){_0x316080=_0x316080-0xa8;const _0x193c12=a32_0x193c();let _0x15e818=_0x193c12[_0x316080];return _0x15e818;}import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a32_0x193c(){const _0x2d0436=['22624250iZuFez','6440jJIYhR','176mcGlzP','Deleted\x20','<timestamp>','3055755yHiufw','scriptsRootDir','stringify','Would\x20delete\x20','apps','remoteId','trashedTo','Multiple\x20functions\x20match\x20\x22','lockFilePath','3951jgFRIK','split','string','Lock\x20scope\x20for\x20app\x20\x22','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','replace','map','lastSync','toISOString','appCode','trashDir','2644434McgySk','POST','str','Local\x20delete\x20not\x20settled\x20for\x20','39003jrRHBc','scriptsRoot','functions','\x20\x20-\x20','validation','239icXdtt','projectRoot','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','target','Function\x20not\x20found:\x20','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','BFF\x20lock\x20file\x20not\x20found.','length','2202YMjvFE','1991535tAxvTt','No\x20lock\x20entry\x20found\x20for\x20\x22','bff','delete','filter','keys'];a32_0x193c=function(){return _0x2d0436;};return a32_0x193c();}import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x5bb577(0xb3),'command':a32_0x5bb577(0xb4),'description':a32_0x5bb577(0xc9),'risk':'high-risk-write','flags':[{'name':'target','type':a32_0x5bb577(0xc7),'required':!![],'description':'Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name'}],async 'validate'(_0x53e9ad){const _0x2e9c74=a32_0x5bb577,_0x9d3513=loadBffProjectConfig(_0x53e9ad['appCode']),_0x1134f2=await readBffLockFile(_0x9d3513[_0x2e9c74(0xc4)]);if(!_0x1134f2)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x3cf0c){const _0x131585=a32_0x5bb577,_0x5f0269=loadBffProjectConfig(_0x3cf0c[_0x131585(0xce)]),_0xeaf401=await readBffLockFile(_0x5f0269[_0x131585(0xc4)]);if(!_0xeaf401)throw CliErrors[_0x131585(0xd8)](_0x131585(0xae));const {appLock:_0x3b93a6}=ensureLockScope(_0xeaf401,_0x3cf0c[_0x131585(0xce)],_0x5f0269[_0x131585(0xd5)],'delete'),_0xef6803=_0x3cf0c[_0x131585(0xd2)]('target'),_0x1b849b=Object[_0x131585(0xb6)](_0x3b93a6[_0x131585(0xd6)]),_0x462d44=resolveDeleteTarget(_0xef6803,_0x1b849b),_0x18eb8e=_0x3b93a6[_0x131585(0xd6)][_0x462d44];if(!_0x18eb8e)throw CliErrors[_0x131585(0xd8)](_0x131585(0xb2)+_0x462d44+'\x22.');const _0x42e6d5=resolveLocalFilePathFromLockKey(_0x5f0269,_0x462d44),_0x11f52a=relative(_0x5f0269[_0x131585(0xa9)],_0x42e6d5),_0x1fe7d7=join(_0x5f0269[_0x131585(0xcf)],_0x131585(0xbb),_0x11f52a);return{'method':_0x131585(0xd1),'url':'/api/management/library/scripts/delete','body':{'appCode':_0x3cf0c[_0x131585(0xce)],'target':_0x462d44,'remoteId':_0x18eb8e[_0x131585(0xc1)],'localFilePath':_0x42e6d5,'trashedPath':_0x1fe7d7},'description':_0x131585(0xbf)+_0x462d44+_0x131585(0xad)};},async 'execute'(_0x28947e){const _0x161988=a32_0x5bb577,_0x4774d3=loadBffProjectConfig(_0x28947e[_0x161988(0xce)]),_0x126bbb=await readBffLockFile(_0x4774d3[_0x161988(0xc4)]);if(!_0x126bbb)throw CliErrors[_0x161988(0xd8)](_0x161988(0xae));const {lockData:_0x1a2b92,appLock:_0x340bcb}=ensureLockScope(_0x126bbb,_0x28947e[_0x161988(0xce)],_0x4774d3[_0x161988(0xd5)],'delete'),_0x1757a6=JSON['parse'](JSON[_0x161988(0xbe)](_0x1a2b92)),_0x5734bd=_0x1757a6[_0x161988(0xc0)][_0x28947e[_0x161988(0xce)]];if(!_0x5734bd)throw new Error(_0x161988(0xc8)+_0x28947e[_0x161988(0xce)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x304da6=_0x28947e[_0x161988(0xd2)](_0x161988(0xab)),_0x447997=Object[_0x161988(0xb6)](_0x5734bd['functions']),_0x49f324=resolveDeleteTarget(_0x304da6,_0x447997),_0x2e8822=_0x5734bd['functions'][_0x49f324];if(!_0x2e8822)throw CliErrors[_0x161988(0xd8)](_0x161988(0xb2)+_0x49f324+'\x22.');await deleteBffScript(_0x2e8822[_0x161988(0xc1)]),delete _0x5734bd[_0x161988(0xd6)][_0x49f324],_0x5734bd[_0x161988(0xcc)]=new Date()[_0x161988(0xcd)](),await writeBffLockFile(_0x4774d3['lockFilePath'],_0x1757a6);const _0x47bea2=resolveLocalFilePathFromLockKey(_0x4774d3,_0x49f324);let _0x5a663f;await fileExists(_0x47bea2)&&(_0x5a663f=await moveToTrash(_0x4774d3[_0x161988(0xa9)],_0x4774d3[_0x161988(0xcf)],_0x47bea2),await cleanupEmptyDirectories(dirname(_0x47bea2),_0x4774d3[_0x161988(0xbd)]));await waitForDeleteSettlement(_0x4774d3[_0x161988(0xc4)],_0x28947e[_0x161988(0xce)],_0x49f324,_0x47bea2),await sleep(0x96);const _0x36d603={'deleted':_0x49f324,'remoteId':_0x2e8822[_0x161988(0xc1)]};if(_0x5a663f)_0x36d603[_0x161988(0xc2)]=_0x5a663f;return{'ok':!![],'data':_0x36d603,'message':_0x161988(0xba)+_0x49f324+(_0x5a663f?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x45a0d5,_0x1cbbc5){const _0x13558c=a32_0x5bb577;if(_0x45a0d5['includes']('/')){const _0x4a2d4e=_0x1cbbc5['find'](_0x3d66f9=>_0x3d66f9===_0x45a0d5);if(!_0x4a2d4e)throw CliErrors['validation'](_0x13558c(0xac)+_0x45a0d5);return _0x4a2d4e;}const _0x35141d=_0x1cbbc5[_0x13558c(0xb5)](_0x270034=>_0x270034[_0x13558c(0xc6)]('/')['at'](-0x1)===_0x45a0d5);if(_0x35141d[_0x13558c(0xaf)]===0x0)throw CliErrors['validation'](_0x13558c(0xac)+_0x45a0d5);if(_0x35141d[_0x13558c(0xaf)]>0x1)throw CliErrors[_0x13558c(0xd8)](_0x13558c(0xc3)+_0x45a0d5+_0x13558c(0xaa)+_0x35141d[_0x13558c(0xcb)](_0x2fdeb6=>_0x13558c(0xd7)+_0x2fdeb6)['join']('\x0a'));return _0x35141d[0x0];}async function moveToTrash(_0x1ba3d8,_0x4093e4,_0x4171ad){const _0x44cc25=a32_0x5bb577,_0x4a4d0b=new Date()[_0x44cc25(0xcd)]()[_0x44cc25(0xca)](/[:.]/g,'-'),_0x427889=relative(_0x1ba3d8,_0x4171ad),_0x1c2d73=join(_0x4093e4,_0x4a4d0b,_0x427889);return await mkdir(dirname(_0x1c2d73),{'recursive':!![]}),await rename(_0x4171ad,_0x1c2d73),_0x1c2d73;}async function cleanupEmptyDirectories(_0x2d6fea,_0x38976b){const _0x3d9c6d=a32_0x5bb577;let _0x1ae82c=resolve(_0x2d6fea);const _0x375951=resolve(_0x38976b);while(_0x1ae82c['startsWith'](''+_0x375951+sep)||_0x1ae82c===_0x375951){if(_0x1ae82c===_0x375951)return;try{const _0x3e4372=await readdir(_0x1ae82c);if(_0x3e4372[_0x3d9c6d(0xaf)]>0x0)return;await rmdir(_0x1ae82c);}catch{return;}_0x1ae82c=dirname(_0x1ae82c);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x503b64,_0x199093,_0x2d6540,_0x190675){const _0x50fe37=a32_0x5bb577;for(let _0x107777=0x0;_0x107777<DELETE_SETTLE_RETRY_COUNT;_0x107777+=0x1){const _0x19f32e=await readBffLockFile(_0x503b64),_0x2d662d=!!_0x19f32e?.['apps']?.[_0x199093]?.['functions']?.[_0x2d6540],_0x509c1d=await fileExists(_0x190675);if(!_0x2d662d&&!_0x509c1d)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x50fe37(0xd3)+_0x2d6540+'.');}
@@ -1 +1 @@
1
- function a33_0x2464(_0x4012f9,_0x272677){_0x4012f9=_0x4012f9-0x15a;const _0x1e402d=a33_0x1e40();let _0x2464c5=_0x1e402d[_0x4012f9];return _0x2464c5;}function a33_0x1e40(){const _0x43fa95=['detail','3544zzRqjJ','boolean','897270Xqkukc','read','Return\x20full\x20raw\x20script\x20object','description','47356QElXgE','1026663eIOdZP','num','4kVTSWw','7MUOjIJ','scriptType','Script\x20ID','7335400rZvVfe','716856Djridc','2923015BEHpjT','9TBgCSV','scriptContent','bool','(none)','verbose','Get\x20BFF\x20script\x20details\x20by\x20ID'];a33_0x1e40=function(){return _0x43fa95;};return a33_0x1e40();}const a33_0x528378=a33_0x2464;(function(_0x23c3fd,_0x35f4a7){const _0x4f757f=a33_0x2464,_0x1b0d9f=_0x23c3fd();while(!![]){try{const _0x4d0b68=parseInt(_0x4f757f(0x16d))/0x1+-parseInt(_0x4f757f(0x15e))/0x2+parseInt(_0x4f757f(0x16e))/0x3+parseInt(_0x4f757f(0x170))/0x4*(-parseInt(_0x4f757f(0x15f))/0x5)+parseInt(_0x4f757f(0x169))/0x6+-parseInt(_0x4f757f(0x15a))/0x7*(-parseInt(_0x4f757f(0x167))/0x8)+-parseInt(_0x4f757f(0x160))/0x9*(-parseInt(_0x4f757f(0x15d))/0xa);if(_0x4d0b68===_0x35f4a7)break;else _0x1b0d9f['push'](_0x1b0d9f['shift']());}catch(_0x16733c){_0x1b0d9f['push'](_0x1b0d9f['shift']());}}}(a33_0x1e40,0x5095a));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':'bff','command':a33_0x528378(0x166),'description':a33_0x528378(0x165),'risk':a33_0x528378(0x16a),'flags':[{'name':'id','type':'number','required':!![],'description':a33_0x528378(0x15c)},{'name':a33_0x528378(0x164),'type':a33_0x528378(0x168),'description':a33_0x528378(0x16b)}],async 'execute'(_0x49b128){const _0x485b55=a33_0x528378,_0x144218=await getBffScriptInfo(_0x49b128[_0x485b55(0x16f)]('id')),_0x582a7e=_0x49b128[_0x485b55(0x162)](_0x485b55(0x164));if(_0x582a7e)return{'ok':!![],'data':_0x144218};return{'ok':!![],'data':{'id':_0x144218['id'],'appCode':_0x144218['appCode'],'scriptType':_0x144218[_0x485b55(0x15b)],'description':_0x144218[_0x485b55(0x16c)]||_0x485b55(0x163),'createdTime':_0x144218['createdTime']??'','updatedTime':_0x144218['updatedTime']??'','scriptContent':_0x144218[_0x485b55(0x161)]??''}};}};
1
+ const a33_0xa8cce=a33_0x13f8;(function(_0x2f1750,_0x1045fa){const _0x40bdd8=a33_0x13f8,_0x341d78=_0x2f1750();while(!![]){try{const _0x4ec93f=parseInt(_0x40bdd8(0x113))/0x1+-parseInt(_0x40bdd8(0x109))/0x2*(parseInt(_0x40bdd8(0x119))/0x3)+parseInt(_0x40bdd8(0x11b))/0x4*(parseInt(_0x40bdd8(0x111))/0x5)+-parseInt(_0x40bdd8(0x10a))/0x6+parseInt(_0x40bdd8(0x114))/0x7+parseInt(_0x40bdd8(0x110))/0x8*(parseInt(_0x40bdd8(0x11a))/0x9)+parseInt(_0x40bdd8(0x117))/0xa;if(_0x4ec93f===_0x1045fa)break;else _0x341d78['push'](_0x341d78['shift']());}catch(_0x5579c0){_0x341d78['push'](_0x341d78['shift']());}}}(a33_0x57ca,0x8a951));import{getBffScriptInfo}from'../../core/api-client.js';function a33_0x57ca(){const _0x38cdca=['scriptContent','4384864YVyNNJ','845qVZsdJ','description','373485PzLAOp','2589461SNexdv','appCode','Get\x20BFF\x20script\x20details\x20by\x20ID','9445300bWZMtP','Script\x20ID','3OZyqhD','9IbogBN','1092NuYeXI','2012254AhOhXs','4250538vYiCgV','number','read','(none)','verbose'];a33_0x57ca=function(){return _0x38cdca;};return a33_0x57ca();}function a33_0x13f8(_0x43a99b,_0x1cf7ea){_0x43a99b=_0x43a99b-0x109;const _0x57ca15=a33_0x57ca();let _0x13f8dc=_0x57ca15[_0x43a99b];return _0x13f8dc;}export const bffDetail={'service':'bff','command':'detail','description':a33_0xa8cce(0x116),'risk':a33_0xa8cce(0x10c),'flags':[{'name':'id','type':a33_0xa8cce(0x10b),'required':!![],'description':a33_0xa8cce(0x118)},{'name':a33_0xa8cce(0x10e),'type':'boolean','description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x1066de){const _0x8f24cf=a33_0xa8cce,_0x1f9e55=await getBffScriptInfo(_0x1066de['num']('id')),_0x2f5c18=_0x1066de['bool'](_0x8f24cf(0x10e));if(_0x2f5c18)return{'ok':!![],'data':_0x1f9e55};return{'ok':!![],'data':{'id':_0x1f9e55['id'],'appCode':_0x1f9e55[_0x8f24cf(0x115)],'scriptType':_0x1f9e55['scriptType'],'description':_0x1f9e55[_0x8f24cf(0x112)]||_0x8f24cf(0x10d),'createdTime':_0x1f9e55['createdTime']??'','updatedTime':_0x1f9e55['updatedTime']??'','scriptContent':_0x1f9e55[_0x8f24cf(0x10f)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x121725,_0xb82a64){const _0x542c8e=a34_0x5b53,_0x583249=_0x121725();while(!![]){try{const _0x31a25d=-parseInt(_0x542c8e(0x1aa))/0x1+-parseInt(_0x542c8e(0x1ad))/0x2+-parseInt(_0x542c8e(0x1af))/0x3*(parseInt(_0x542c8e(0x1b0))/0x4)+parseInt(_0x542c8e(0x1a8))/0x5+-parseInt(_0x542c8e(0x1ab))/0x6+-parseInt(_0x542c8e(0x1ac))/0x7+-parseInt(_0x542c8e(0x1ae))/0x8*(-parseInt(_0x542c8e(0x1a9))/0x9);if(_0x31a25d===_0xb82a64)break;else _0x583249['push'](_0x583249['shift']());}catch(_0x2bb9f2){_0x583249['push'](_0x583249['shift']());}}}(a34_0x589d,0x27354));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';function a34_0x589d(){const _0x20480f=['922588biOYXs','50530AHvUeD','6843024YPRHcs','276002xXaaRg','46818pACXNl','20496IyfLPS','184932MlDeHF','8dOTlNX','3aLTJxO'];a34_0x589d=function(){return _0x20480f;};return a34_0x589d();}import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';function a34_0x5b53(_0x5b6754,_0x23639e){_0x5b6754=_0x5b6754-0x1a8;const _0x589dad=a34_0x589d();let _0x5b53e4=_0x589dad[_0x5b6754];return _0x5b53e4;}import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0x42fa1f,_0x21ff36){const _0x53f140=a34_0xae68,_0x25f5b9=_0x42fa1f();while(!![]){try{const _0x1fc02f=-parseInt(_0x53f140(0x176))/0x1+-parseInt(_0x53f140(0x17a))/0x2+parseInt(_0x53f140(0x17c))/0x3*(parseInt(_0x53f140(0x173))/0x4)+parseInt(_0x53f140(0x175))/0x5+-parseInt(_0x53f140(0x177))/0x6*(parseInt(_0x53f140(0x174))/0x7)+parseInt(_0x53f140(0x179))/0x8*(-parseInt(_0x53f140(0x172))/0x9)+parseInt(_0x53f140(0x178))/0xa*(parseInt(_0x53f140(0x17b))/0xb);if(_0x1fc02f===_0x21ff36)break;else _0x25f5b9['push'](_0x25f5b9['shift']());}catch(_0x3bf614){_0x25f5b9['push'](_0x25f5b9['shift']());}}}(a34_0xfb83,0xdef7c));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';function a34_0xfb83(){const _0x15b83e=['665kZIxsk','8585005xFOTVr','544953AZNTbN','11280LkZRBC','36300uHKnIW','150208UBVycK','2472632LurXQv','869fHNlLe','225EaTYJF','9Kaelqn','47368WvHFMM'];a34_0xfb83=function(){return _0x15b83e;};return a34_0xfb83();}import{bffPull}from'../../commands/bff/pull.js';function a34_0xae68(_0x4188d6,_0x54eee0){_0x4188d6=_0x4188d6-0x172;const _0xfb830d=a34_0xfb83();let _0xae6816=_0xfb830d[_0x4188d6];return _0xae6816;}import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];