@lovrabet/rabetbase-cli 2.3.12 → 2.3.13-beta.2

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
- 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
+ const a20_0x245c74=a20_0x418c;(function(_0x4bf4b8,_0x348f81){const _0x54cc12=a20_0x418c,_0x94aa14=_0x4bf4b8();while(!![]){try{const _0x3699eb=-parseInt(_0x54cc12(0x143))/0x1*(-parseInt(_0x54cc12(0x12d))/0x2)+parseInt(_0x54cc12(0x12b))/0x3+parseInt(_0x54cc12(0x12c))/0x4*(-parseInt(_0x54cc12(0x12e))/0x5)+parseInt(_0x54cc12(0x140))/0x6+-parseInt(_0x54cc12(0x154))/0x7*(-parseInt(_0x54cc12(0x13d))/0x8)+-parseInt(_0x54cc12(0x139))/0x9+parseInt(_0x54cc12(0x138))/0xa*(parseInt(_0x54cc12(0x147))/0xb);if(_0x3699eb===_0x348f81)break;else _0x94aa14['push'](_0x94aa14['shift']());}catch(_0x2d705c){_0x94aa14['push'](_0x94aa14['shift']());}}}(a20_0xb0cc,0x7421d));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(_0x443ef2,_0x48b1ee){const _0x191705=a20_0x418c,_0x24cd80=[],_0x1c0865=_0x443ef2[_0x191705(0x144)]&&typeof _0x443ef2[_0x191705(0x144)]===_0x191705(0x151)?_0x443ef2['apps']:{},_0x4e900c=_0x443ef2[_0x191705(0x14a)]||undefined;for(const [_0x6f9605,_0x249933]of Object[_0x191705(0x137)](_0x1c0865)){if(!_0x249933||typeof _0x249933!==_0x191705(0x151)||!_0x249933[_0x191705(0x13f)])continue;_0x24cd80[_0x191705(0x149)]({'name':_0x6f9605,'appcode':_0x249933['appcode'],'named':!![],'definedIn':_0x48b1ee,'isDefault':_0x6f9605===_0x4e900c,...buildAppProfileListFields(_0x249933)});}return _0x24cd80;}function buildMergedItems(_0x42ffb0,_0x4a95c4){const _0x379f9f=a20_0x418c,{apps:apps={},defaultApp:_0x512ac6}=_0x42ffb0,_0x5714c8=_0x4a95c4[_0x379f9f(0x13a)][_0x379f9f(0x144)]&&typeof _0x4a95c4[_0x379f9f(0x13a)][_0x379f9f(0x144)]==='object'?_0x4a95c4[_0x379f9f(0x13a)][_0x379f9f(0x144)]:{},_0x473044=_0x4a95c4['projectConfig'][_0x379f9f(0x144)]&&typeof _0x4a95c4[_0x379f9f(0x146)][_0x379f9f(0x144)]==='object'?_0x4a95c4['projectConfig'][_0x379f9f(0x144)]:{},_0x3f5240=_0x4a95c4[_0x379f9f(0x146)][_0x379f9f(0x12f)]===![],_0x535f0f=Object[_0x379f9f(0x137)](apps),_0x58af11=_0x535f0f[_0x379f9f(0x131)](([_0x11df62,_0x26c7a6])=>({'name':_0x11df62,'appcode':_0x26c7a6[_0x379f9f(0x13f)],'named':!![],'definedIn':appDefinedIn(_0x11df62,_0x5714c8,_0x473044,_0x3f5240),'isDefault':_0x11df62===_0x512ac6,...buildAppProfileListFields(_0x26c7a6)}));return _0x58af11;}function validateAppListFlags(_0x4ed9f2){const _0x29f1c3=a20_0x418c;if(!_0x4ed9f2[_0x29f1c3(0x153)](_0x29f1c3(0x14e)))return;if(!_0x4ed9f2[_0x29f1c3(0x153)](_0x29f1c3(0x14f))&&!_0x4ed9f2[_0x29f1c3(0x153)](_0x29f1c3(0x14c)))return;throw CliErrors['validation'](_0x29f1c3(0x141),_0x29f1c3(0x156));}async function execute(_0x3d0ef4){const _0xc01944=a20_0x418c;validateAppListFlags(_0x3d0ef4);if(_0x3d0ef4[_0xc01944(0x153)](_0xc01944(0x14e)))return{'ok':!![],'data':await listRemoteAppDirectory(_0x3d0ef4)};const _0x3a898e=_0x3d0ef4[_0xc01944(0x153)](_0xc01944(0x14f)),_0x15740f=_0x3d0ef4[_0xc01944(0x153)](_0xc01944(0x14c)),_0x12b7e9=_0x3a898e?_0xc01944(0x14f):_0x15740f?'project':_0xc01944(0x136),{config:_0x3c5c3f,layers:_0x5de6e6}=readRawConfigWithLayers(),_0x5b82ec=resolveDefaultAppSource(_0x5de6e6),{defaultApp:_0x63ab2a}=_0x3c5c3f;let _0x468e36,_0x22b9c9;switch(_0x12b7e9){case _0xc01944(0x14f):_0x468e36=buildItemsFromLayer(_0x5de6e6[_0xc01944(0x13a)],_0xc01944(0x14f)),_0x22b9c9=_0x5de6e6['globalPath'];break;case _0xc01944(0x14c):_0x468e36=buildItemsFromLayer(_0x5de6e6['projectConfig'],_0xc01944(0x14c)),_0x22b9c9=_0x5de6e6[_0xc01944(0x145)];break;default:_0x468e36=buildMergedItems(_0x3c5c3f,_0x5de6e6);break;}enrichAppListItemsWithMergedSelection(_0x468e36,_0x3d0ef4[_0xc01944(0x12a)]);if(_0x468e36[_0xc01944(0x155)]===0x0){const _0x15e267=_0x12b7e9===_0xc01944(0x136)?'':_0xc01944(0x13b)+_0x12b7e9+_0xc01944(0x132);return{'ok':!![],'data':[],'message':_0xc01944(0x133)+_0x15e267+'.\x20Use\x20`'+CLI_BIN_NAME+_0xc01944(0x134)};}const _0x26c47a=_0x468e36[_0xc01944(0x13c)](_0x1f556e=>_0x1f556e['isCurrent']===!![]),_0x445f79=_0x63ab2a??_0x26c47a?.[_0xc01944(0x13f)]??null,_0x2a2fc9=_0x12b7e9==='merged'?{'globalPath':_0x5de6e6['globalPath']??null,'projectPath':_0x5de6e6['projectPath']??null,'defaultApp':_0x445f79,'defaultAppSource':_0x63ab2a!=null?_0x5b82ec:null}:{'scope':_0x12b7e9,'configPath':_0x22b9c9??null};return{'ok':!![],'data':{'items':_0x468e36,'meta':_0x2a2fc9}};}function a20_0xb0cc(){const _0x13d223=['apps','projectPath','projectConfig','11aYaAub','boolean','push','defaultApp','list','project','Show\x20only\x20apps\x20from\x20project\x20.rabetbase.json','remote','global','read','object','app','bool','2471dzxeXg','length','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20for\x20the\x20platform\x20directory,\x20or\x20`rabetbase\x20app\x20list\x20--global/--project`\x20for\x20local\x20config.','mergedCli','1785951YPLbSn','12912GjYLJS','185606yqmIuC','1045WcpjwZ','inherit','optional','map','\x20config','No\x20apps\x20configured','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','List\x20apps\x20available\x20on\x20the\x20platform\x20for\x20the\x20current\x20login','merged','entries','6128120YMHsai','5615739NYQIaw','globalConfig','\x20in\x20','find','3448dqIsaB','List\x20configured\x20apps,\x20or\x20platform\x20apps\x20with\x20--remote','appcode','1370532SnvXMS','`--remote`\x20cannot\x20be\x20used\x20with\x20`--global`\x20or\x20`--project`.','Show\x20only\x20apps\x20from\x20global\x20~/.rabetbase.json','2SIMGyH'];a20_0xb0cc=function(){return _0x13d223;};return a20_0xb0cc();}function a20_0x418c(_0x5cd63d,_0x222a95){_0x5cd63d=_0x5cd63d-0x12a;const _0xb0cc8f=a20_0xb0cc();let _0x418c49=_0xb0cc8f[_0x5cd63d];return _0x418c49;}export const appListDefinition={'service':a20_0x245c74(0x152),'command':a20_0x245c74(0x14b),'description':a20_0x245c74(0x13e),'risk':a20_0x245c74(0x150),'auth':a20_0x245c74(0x130),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a20_0x245c74(0x14e),'type':'boolean','description':a20_0x245c74(0x135),'default':![]},{'name':a20_0x245c74(0x14f),'type':'boolean','description':a20_0x245c74(0x142),'default':![]},{'name':a20_0x245c74(0x14c),'type':a20_0x245c74(0x148),'description':a20_0x245c74(0x14d),'default':![]}],async 'validate'(_0x7571af){validateAppListFlags(_0x7571af);},'execute':execute};
@@ -1 +1 @@
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
+ (function(_0x1cc6af,_0x1eca11){const _0x2f9e22=a21_0x3510,_0x298289=_0x1cc6af();while(!![]){try{const _0x1fc488=-parseInt(_0x2f9e22(0x106))/0x1+parseInt(_0x2f9e22(0x10a))/0x2+-parseInt(_0x2f9e22(0x108))/0x3*(parseInt(_0x2f9e22(0x116))/0x4)+-parseInt(_0x2f9e22(0x107))/0x5*(-parseInt(_0x2f9e22(0x113))/0x6)+-parseInt(_0x2f9e22(0x109))/0x7*(-parseInt(_0x2f9e22(0x10e))/0x8)+-parseInt(_0x2f9e22(0x115))/0x9*(parseInt(_0x2f9e22(0x110))/0xa)+-parseInt(_0x2f9e22(0x10d))/0xb*(-parseInt(_0x2f9e22(0x114))/0xc);if(_0x1fc488===_0x1eca11)break;else _0x298289['push'](_0x298289['shift']());}catch(_0x4cde8f){_0x298289['push'](_0x298289['shift']());}}}(a21_0x1f6b,0xf19f1));function a21_0x1f6b(){const _0x5d8b05=['platform','946502kdYNZt','125XQEEZe','3JSyHWO','4021857nfxKSK','3184566ENKofo','appDesc','map','11ELWzRe','16aksmJE','authRequired','45030xMxOec','cookie','appCode','26958ljHnBz','13449684QXYoHM','1935rpCaEf','4280756RyzwWR'];a21_0x1f6b=function(){return _0x5d8b05;};return a21_0x1f6b();}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_0x3510(_0x21234a,_0x22a4e7){_0x21234a=_0x21234a-0x105;const _0x1f6b69=a21_0x1f6b();let _0x3510b8=_0x1f6b69[_0x21234a];return _0x3510b8;}function resolveCookie(_0x1965a3){const _0x42bab6=a21_0x3510,_0x14d628=_0x1965a3[_0x42bab6(0x111)]||getCookie();if(!_0x14d628)throw CliErrors[_0x42bab6(0x10f)]();return _0x14d628;}export async function listRemoteAppDirectory(_0x500295){const _0x49f47b=a21_0x3510,_0x247663=await withActiveCookie(resolveCookie(_0x500295),()=>listRemoteApps());return{'items':_0x247663[_0x49f47b(0x10c)](_0x3b3fca=>({..._0x3b3fca['id']!=null?{'id':_0x3b3fca['id']}:{},'appCode':_0x3b3fca[_0x49f47b(0x112)],'appName':_0x3b3fca['appName'],..._0x3b3fca['appDesc']!=null?{'appDesc':_0x3b3fca[_0x49f47b(0x10b)]}:{}})),'meta':{'source':_0x49f47b(0x105)}};}
@@ -1 +1 @@
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
+ const a22_0x36d482=a22_0x5c90;(function(_0x34606f,_0x26b92c){const _0x48874a=a22_0x5c90,_0x4b047d=_0x34606f();while(!![]){try{const _0x5e5593=parseInt(_0x48874a(0x116))/0x1*(-parseInt(_0x48874a(0x117))/0x2)+parseInt(_0x48874a(0x10c))/0x3*(-parseInt(_0x48874a(0x118))/0x4)+parseInt(_0x48874a(0x10d))/0x5+-parseInt(_0x48874a(0x11a))/0x6*(parseInt(_0x48874a(0x113))/0x7)+parseInt(_0x48874a(0x10b))/0x8+parseInt(_0x48874a(0x112))/0x9*(-parseInt(_0x48874a(0x110))/0xa)+parseInt(_0x48874a(0x10e))/0xb;if(_0x5e5593===_0x26b92c)break;else _0x4b047d['push'](_0x4b047d['shift']());}catch(_0xfe2db8){_0x4b047d['push'](_0x4b047d['shift']());}}}(a22_0x47c9,0xb0821));import{CLI_BIN_NAME}from'../../constant/cli.js';import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a22_0x5c90(_0x29fb29,_0x2b6704){_0x29fb29=_0x29fb29-0x10b;const _0x47c96b=a22_0x47c9();let _0x5c901b=_0x47c96b[_0x29fb29];return _0x5c901b;}function a22_0x47c9(){const _0x2d2b03=['36irjbmE','9091733OPwXdA','\x20workspace\x20remove','remove','5NcGfDe','294386Rltupt','68UvEGTb','app\x20remove','6TjRTrY','App\x20profile\x20name\x20to\x20remove','7990896NHPxPt','139011HcQndV','5001435WMrype','29933827hRGtLy','name','2937290pnwgTN','Deprecated:\x20use\x20workspace\x20remove\x20to\x20remove\x20an\x20app\x20profile'];a22_0x47c9=function(){return _0x2d2b03;};return a22_0x47c9();}export const appRemoveDefinition={'service':'app','command':a22_0x36d482(0x115),'description':a22_0x36d482(0x111),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a22_0x36d482(0x114),'since':'2026-07'},'args':[{'name':a22_0x36d482(0x10f),'description':a22_0x36d482(0x11b),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x460d6d=>validateAppName(_0x460d6d,'app\x20remove'),'execute':_0x451e4c=>runAppRemove(_0x451e4c,a22_0x36d482(0x119))};
@@ -1 +1 @@
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
+ (function(_0x5289c4,_0x133e80){const _0x3f9a56=a23_0x4148,_0x36b761=_0x5289c4();while(!![]){try{const _0x8a5887=-parseInt(_0x3f9a56(0x106))/0x1+-parseInt(_0x3f9a56(0xfa))/0x2+parseInt(_0x3f9a56(0xfb))/0x3+-parseInt(_0x3f9a56(0xf1))/0x4*(-parseInt(_0x3f9a56(0xf4))/0x5)+parseInt(_0x3f9a56(0x102))/0x6*(-parseInt(_0x3f9a56(0xfc))/0x7)+parseInt(_0x3f9a56(0x104))/0x8+parseInt(_0x3f9a56(0xf9))/0x9*(parseInt(_0x3f9a56(0xf6))/0xa);if(_0x8a5887===_0x133e80)break;else _0x36b761['push'](_0x36b761['shift']());}catch(_0x3c0200){_0x36b761['push'](_0x36b761['shift']());}}}(a23_0x32bc,0xeabd3));import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';export function enrichAppListItemsWithMergedSelection(_0x16b234,_0x51fb75){const _0x4c23ad=a23_0x4148;if(!_0x51fb75)return;const _0x5365df=_0x51fb75[_0x4c23ad(0x109)]&&typeof _0x51fb75[_0x4c23ad(0x109)]===_0x4c23ad(0x10c)?_0x51fb75[_0x4c23ad(0x109)]:{},_0x38209c=Object[_0x4c23ad(0x10b)](_0x5365df)['length']>0x0;for(const _0x3d5d28 of _0x16b234){_0x3d5d28[_0x4c23ad(0x107)]=![];}const _0x21e80f=_0x51fb75[_0x4c23ad(0x105)]!=null?String(_0x51fb75['appCode'])['trim']():'';if(_0x38209c){const _0x275faa=_0x51fb75[_0x4c23ad(0x101)]??_0x51fb75[_0x4c23ad(0xfe)];if(_0x275faa)for(const _0x3921e9 of _0x16b234){_0x3921e9[_0x4c23ad(0xef)]===!![]&&_0x3921e9['name']===_0x275faa&&(_0x3921e9[_0x4c23ad(0x107)]=!![]);}for(const _0x3dbc85 of _0x16b234){if(_0x3dbc85['named']!==![])continue;if(_0x51fb75['defaultApp'])continue;_0x21e80f&&String(_0x3dbc85[_0x4c23ad(0xf3)]??'')['trim']()===_0x21e80f&&(_0x3dbc85[_0x4c23ad(0x107)]=!![]);}return;}if(!_0x21e80f)return;for(const _0x563f36 of _0x16b234){String(_0x563f36['appcode']??'')[_0x4c23ad(0xf2)]()===_0x21e80f&&(_0x563f36['isCurrent']=!![]);}}export function resolveAppScopeForWrite(_0x165292,_0x3b6a01,_0x3727c0){const _0x2eee02=a23_0x4148;if(_0x3b6a01)return _0x2eee02(0xf5);const _0x3e512f=_0x3727c0[_0x2eee02(0xf8)][_0x2eee02(0x109)]&&typeof _0x3727c0[_0x2eee02(0xf8)][_0x2eee02(0x109)]===_0x2eee02(0x10c)?_0x3727c0[_0x2eee02(0xf8)][_0x2eee02(0x109)]:{},_0x3e5c42=_0x3727c0[_0x2eee02(0xf0)][_0x2eee02(0x109)]&&typeof _0x3727c0[_0x2eee02(0xf0)][_0x2eee02(0x109)]===_0x2eee02(0x10c)?_0x3727c0[_0x2eee02(0xf0)][_0x2eee02(0x109)]:{};if(Object[_0x2eee02(0xff)][_0x2eee02(0xf7)][_0x2eee02(0x100)](_0x3e512f,_0x165292))return _0x2eee02(0xfd);if(Object[_0x2eee02(0xff)][_0x2eee02(0xf7)][_0x2eee02(0x100)](_0x3e5c42,_0x165292))return _0x2eee02(0xf5);return _0x2eee02(0xfd);}export function appDefinedIn(_0x4dfad3,_0xe70de9,_0x599ac8,_0xcce17c){const _0x5cf7cd=a23_0x4148;if(_0xcce17c)return Object[_0x5cf7cd(0xff)][_0x5cf7cd(0xf7)][_0x5cf7cd(0x100)](_0x599ac8,_0x4dfad3)?_0x5cf7cd(0xfd):_0x5cf7cd(0xf5);const _0x5d52d0=Object[_0x5cf7cd(0xff)][_0x5cf7cd(0xf7)][_0x5cf7cd(0x100)](_0xe70de9,_0x4dfad3),_0x2811d1=Object['prototype'][_0x5cf7cd(0xf7)][_0x5cf7cd(0x100)](_0x599ac8,_0x4dfad3);if(_0x5d52d0&&_0x2811d1)return _0x5cf7cd(0x108);if(_0x2811d1)return _0x5cf7cd(0xfd);return _0x5cf7cd(0xf5);}export function resolveDefaultAppSource(_0x537eac){const _0x2e1b2f=a23_0x4148,_0x3b2792=_0x537eac[_0x2e1b2f(0xf8)][_0x2e1b2f(0x109)]&&typeof _0x537eac[_0x2e1b2f(0xf8)][_0x2e1b2f(0x109)]===_0x2e1b2f(0x10c)?_0x537eac[_0x2e1b2f(0xf8)][_0x2e1b2f(0x109)]:{};if(_0x2e1b2f(0xfe)in _0x537eac[_0x2e1b2f(0xf8)])return _0x2e1b2f(0xfd);if(Object[_0x2e1b2f(0x10b)](_0x3b2792)['length']>0x0)return _0x2e1b2f(0xfd);if(_0x537eac[_0x2e1b2f(0xf8)][_0x2e1b2f(0x10a)]===![])return null;if(_0x537eac['globalConfig'][_0x2e1b2f(0xfe)])return _0x2e1b2f(0xf5);return null;}function a23_0x4148(_0x68d456,_0x4df01a){_0x68d456=_0x68d456-0xef;const _0x32bc0d=a23_0x32bc();let _0x4148cc=_0x32bc0d[_0x68d456];return _0x4148cc;}export function getConfigPath(_0x48b6f2={}){const _0x3cca64=a23_0x4148,_0x65a1f2=_0x48b6f2['global']?_0x3cca64(0xf5):_0x3cca64(0xfd);return resolveWriteConfigPath(_0x65a1f2);}export function readConfig(_0x36b2af={}){return readConfigFile(getConfigPath(_0x36b2af));}function a23_0x32bc(){const _0x1b15f5=['keys','object','named','globalConfig','76oNAlrX','trim','appcode','301030ysgTSH','global','10KfusXM','hasOwnProperty','projectConfig','4337514iCFSsX','1213414TwNyhP','1960203zCLjQG','826959yvPaiq','project','defaultApp','prototype','call','currentApp','18jbIvLs','\x20(global)','1097664ErdNCz','appCode','493860qkNoIh','isCurrent','both','apps','inherit'];a23_0x32bc=function(){return _0x1b15f5;};return a23_0x32bc();}export function writeConfig(_0x31eddd,_0x11b0c5={}){writeConfigFile(getConfigPath(_0x11b0c5),_0x31eddd);}export function scopeLabel(_0x21a780){const _0x25983f=a23_0x4148;return _0x21a780[_0x25983f(0xf5)]?_0x25983f(0x103):'';}
@@ -1 +1 @@
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
+ const a24_0x435d4e=a24_0xe750;(function(_0x3fe09c,_0x4e39b1){const _0x15a190=a24_0xe750,_0x33232=_0x3fe09c();while(!![]){try{const _0x44ef65=parseInt(_0x15a190(0xeb))/0x1*(parseInt(_0x15a190(0xef))/0x2)+parseInt(_0x15a190(0xf1))/0x3*(-parseInt(_0x15a190(0xf6))/0x4)+parseInt(_0x15a190(0xf0))/0x5*(-parseInt(_0x15a190(0xfb))/0x6)+-parseInt(_0x15a190(0xec))/0x7+parseInt(_0x15a190(0xf9))/0x8*(parseInt(_0x15a190(0xf7))/0x9)+-parseInt(_0x15a190(0xfc))/0xa+-parseInt(_0x15a190(0xfa))/0xb*(-parseInt(_0x15a190(0xf3))/0xc);if(_0x44ef65===_0x4e39b1)break;else _0x33232['push'](_0x33232['shift']());}catch(_0xeb0cfd){_0x33232['push'](_0x33232['shift']());}}}(a24_0x319b,0x967bf));import{deleteAppConfig,getAppConfigByKey}from'../../core/api-client.js';function a24_0xe750(_0x309e05,_0x18e952){_0x309e05=_0x309e05-0xea;const _0x319b9f=a24_0x319b();let _0xe750fb=_0x319b9f[_0x309e05];return _0xe750fb;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asAppConfigDryRunResult,buildMutationData,KEY_ARG,projectAppConfig,readKeyArg,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';const DELETE_PATH='/smartapi/app-config/delete';export const appConfigDelete={'service':'app-config','command':'delete','description':'Delete\x20one\x20runtime\x20app-config\x20key','risk':a24_0x435d4e(0xee),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5e06d5){readKeyArg(_0x5e06d5);},async 'dryRun'(_0x5ee8fe){const _0x52a55f=a24_0x435d4e,_0x56dd20=readKeyArg(_0x5ee8fe),_0x55a617=await mustGetByKey(_0x5ee8fe[_0x52a55f(0xea)],_0x56dd20);return asAppConfigDryRunResult(buildMutationData({'operation':_0x52a55f(0xf8),'appCode':_0x5ee8fe[_0x52a55f(0xea)],'key':_0x56dd20,'before':projectAppConfig(_0x55a617),'after':null,'dryRun':!![]}),{'method':_0x52a55f(0xf4),'url':DELETE_PATH});},async 'execute'(_0x250362){const _0x5d01b9=a24_0x435d4e,_0x14c4ac=readKeyArg(_0x250362),_0x1bf66e=await mustGetByKey(_0x250362['appCode'],_0x14c4ac);return await withAppConfigApiBoundary('delete',{'appCode':_0x250362['appCode'],'key':_0x14c4ac},()=>deleteAppConfig({'appCode':_0x250362[_0x5d01b9(0xea)],'id':requireAppConfigId(_0x1bf66e,_0x14c4ac,_0x250362[_0x5d01b9(0xea)])})),{'ok':!![],'data':buildMutationData({'operation':_0x5d01b9(0xf8),'appCode':_0x250362[_0x5d01b9(0xea)],'key':_0x14c4ac,'before':projectAppConfig(_0x1bf66e),'after':null,'dryRun':![]}),'message':_0x5d01b9(0xfd)+_0x14c4ac};}};async function mustGetByKey(_0x2fc80a,_0x9cf465){const _0x3f6bf4=a24_0x435d4e,_0x2ed8e3=await withAppConfigApiBoundary('get',{'appCode':_0x2fc80a,'key':_0x9cf465},()=>getAppConfigByKey(_0x2fc80a,_0x9cf465));if(!_0x2ed8e3)throw CliErrors[_0x3f6bf4(0xf2)]('App\x20config\x20key\x20not\x20found:\x20'+_0x9cf465,'appCode:\x20'+_0x2fc80a);return _0x2ed8e3;}function a24_0x319b(){const _0x562e22=['high-risk-write','2361622FEUJPa','74025NMAsQu','81924SdxchD','validation','8407128yHQqfQ','POST',',\x20appCode=','76DVWVMW','9ghFuel','delete','6813992CXyAEd','11fwDNAP','90NENARL','5313090UocQuN','Deleted\x20app\x20config\x20','apiError','appCode','1ZTHedT','5911745AidNli','App\x20config\x20server\x20id\x20missing\x20for\x20key='];a24_0x319b=function(){return _0x562e22;};return a24_0x319b();}function requireAppConfigId(_0x1948e3,_0x12d30d,_0x569053){const _0x3ebc70=a24_0x435d4e;if(typeof _0x1948e3['id']==='number'&&Number['isFinite'](_0x1948e3['id'])&&_0x1948e3['id']>0x0)return _0x1948e3['id'];throw CliErrors[_0x3ebc70(0xfe)](_0x3ebc70(0xed)+_0x12d30d+_0x3ebc70(0xf5)+_0x569053);}
@@ -1 +1 @@
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
+ const a25_0x20871c=a25_0x108c;(function(_0x919ff2,_0x28ff5e){const _0x16be5e=a25_0x108c,_0x36b46d=_0x919ff2();while(!![]){try{const _0x117611=-parseInt(_0x16be5e(0xb1))/0x1*(-parseInt(_0x16be5e(0xb9))/0x2)+parseInt(_0x16be5e(0xb6))/0x3+parseInt(_0x16be5e(0xab))/0x4+parseInt(_0x16be5e(0xb4))/0x5*(parseInt(_0x16be5e(0xa8))/0x6)+parseInt(_0x16be5e(0xac))/0x7*(-parseInt(_0x16be5e(0xb0))/0x8)+parseInt(_0x16be5e(0xad))/0x9*(parseInt(_0x16be5e(0xae))/0xa)+-parseInt(_0x16be5e(0xb8))/0xb;if(_0x117611===_0x28ff5e)break;else _0x36b46d['push'](_0x36b46d['shift']());}catch(_0x1238ae){_0x36b46d['push'](_0x36b46d['shift']());}}}(a25_0x536d,0x39a90));function a25_0x108c(_0x217008,_0x469ca3){_0x217008=_0x217008-0xa7;const _0x536d03=a25_0x536d();let _0x108cbc=_0x536d03[_0x217008];return _0x108cbc;}import{getAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a25_0x536d(){const _0x4e6cb7=['9KSsHqH','3646070PyEgBL','bool','1016592gzEYfY','380059MgspmY','reveal','\x20with\x20value\x20redacted','3635IzUzxK','appCode','112677mTIqdg','appCode:\x20','10116733zzODeW','2tXBCNH','Loaded\x20app\x20config\x20','get','282HvVVtN','read','Inspect\x20one\x20runtime\x20app-config\x20key;\x20value\x20is\x20redacted\x20unless\x20--reveal\x20is\x20used','1866236PdEgmq','7prudCg'];a25_0x536d=function(){return _0x4e6cb7;};return a25_0x536d();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{KEY_ARG,projectAppConfig,readKeyArg,REVEAL_FLAG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':a25_0x20871c(0xa7),'description':a25_0x20871c(0xaa),'risk':a25_0x20871c(0xa9),'args':[KEY_ARG],'flags':[APPCODE_FLAG_OPTIONAL,REVEAL_FLAG],async 'validate'(_0x2a0a17){readKeyArg(_0x2a0a17);},async 'execute'(_0x484057){const _0x7789f0=a25_0x20871c,_0x55fc1f=readKeyArg(_0x484057),_0x509539=await withAppConfigApiBoundary(_0x7789f0(0xa7),{'appCode':_0x484057[_0x7789f0(0xb5)],'key':_0x55fc1f},()=>getAppConfigByKey(_0x484057['appCode'],_0x55fc1f));if(!_0x509539)throw CliErrors['validation']('App\x20config\x20key\x20not\x20found:\x20'+_0x55fc1f,_0x7789f0(0xb7)+_0x484057['appCode']);const _0x52b1cc=projectAppConfig(_0x509539,{'reveal':_0x484057[_0x7789f0(0xaf)](_0x7789f0(0xb2))});return{'ok':!![],'data':{'config':_0x52b1cc},'message':_0x484057['bool'](_0x7789f0(0xb2))?'Loaded\x20app\x20config\x20'+_0x55fc1f+'\x20with\x20value\x20revealed':_0x7789f0(0xba)+_0x55fc1f+_0x7789f0(0xb3)};}};
@@ -1 +1 @@
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
+ function a26_0x51e5(){const _0xb1deed=['1380776saxCDt','4324734wAQPAf','1927263yBfaHf','764020KTGaMJ','3902507AhQJua','4giAPzf','301348rXRCBE','1136204kuWGBo','6zwfPVG'];a26_0x51e5=function(){return _0xb1deed;};return a26_0x51e5();}(function(_0x457f1a,_0x4ea084){const _0x3f5cec=a26_0x2a58,_0xf12e3e=_0x457f1a();while(!![]){try{const _0x1a3421=parseInt(_0x3f5cec(0x1c7))/0x1+parseInt(_0x3f5cec(0x1c8))/0x2+parseInt(_0x3f5cec(0x1cc))/0x3+-parseInt(_0x3f5cec(0x1c6))/0x4*(-parseInt(_0x3f5cec(0x1cd))/0x5)+parseInt(_0x3f5cec(0x1c9))/0x6*(-parseInt(_0x3f5cec(0x1ce))/0x7)+-parseInt(_0x3f5cec(0x1ca))/0x8+-parseInt(_0x3f5cec(0x1cb))/0x9;if(_0x1a3421===_0x4ea084)break;else _0xf12e3e['push'](_0xf12e3e['shift']());}catch(_0x314508){_0xf12e3e['push'](_0xf12e3e['shift']());}}}(a26_0x51e5,0x6eda3));import{appConfigList}from'../../commands/app-config/list.js';import{appConfigGet}from'../../commands/app-config/get.js';import{appConfigSet}from'../../commands/app-config/set.js';function a26_0x2a58(_0x4f4bd8,_0x33badd){_0x4f4bd8=_0x4f4bd8-0x1c6;const _0x51e5e1=a26_0x51e5();let _0x2a5806=_0x51e5e1[_0x4f4bd8];return _0x2a5806;}import{appConfigDelete}from'../../commands/app-config/delete.js';export const appConfigDefinitions=[appConfigList,appConfigGet,appConfigSet,appConfigDelete];
@@ -1 +1 @@
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
+ const a27_0x14d413=a27_0x2c35;(function(_0x5e8d75,_0x258ec7){const _0x14793e=a27_0x2c35,_0x18dfb8=_0x5e8d75();while(!![]){try{const _0x166782=-parseInt(_0x14793e(0x13e))/0x1+parseInt(_0x14793e(0x13c))/0x2*(parseInt(_0x14793e(0x138))/0x3)+-parseInt(_0x14793e(0x141))/0x4*(parseInt(_0x14793e(0x140))/0x5)+-parseInt(_0x14793e(0x149))/0x6+-parseInt(_0x14793e(0x144))/0x7*(parseInt(_0x14793e(0x137))/0x8)+-parseInt(_0x14793e(0x142))/0x9+-parseInt(_0x14793e(0x14b))/0xa*(-parseInt(_0x14793e(0x13b))/0xb);if(_0x166782===_0x258ec7)break;else _0x18dfb8['push'](_0x18dfb8['shift']());}catch(_0x134bef){_0x18dfb8['push'](_0x18dfb8['shift']());}}}(a27_0x6703,0xe1dec));function a27_0x2c35(_0x47d6d6,_0xdffbda){_0x47d6d6=_0x47d6d6-0x137;const _0x6703f0=a27_0x6703();let _0x2c35a6=_0x6703f0[_0x47d6d6];return _0x2c35a6;}import{listAppConfigs}from'../../core/api-client.js';function a27_0x6703(){const _0x125c5e=['read','10ffggke','3408184BINMdA','12721680BkwRqJ','list','4011gPUdMn','key','length','str','appCode','4939392YFvhRb','Found\x20','410wnESoC','Filter\x20by\x20exact\x20config\x20key','3208GahihS','54pjbAOA','app-config','trim','1587993zRDFzM','84498oeknZk','List\x20runtime\x20app-config\x20key\x20metadata\x20without\x20printing\x20values','1583584AqpdPv'];a27_0x6703=function(){return _0x125c5e;};return a27_0x6703();}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_0x14d413(0x139),'command':a27_0x14d413(0x143),'description':a27_0x14d413(0x13d),'risk':a27_0x14d413(0x13f),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a27_0x14d413(0x145),'type':'string','description':a27_0x14d413(0x14c)},TAGS_FLAG],async 'validate'(_0xab6ac){const _0x5692d8=a27_0x14d413,_0x432302=_0xab6ac[_0x5692d8(0x147)](_0x5692d8(0x145))['trim']();if(_0x432302)validateKey(_0x432302);readOptionalTags(_0xab6ac);},async 'execute'(_0x106dc9){const _0x579c12=a27_0x14d413,_0x193d1c=_0x106dc9[_0x579c12(0x147)](_0x579c12(0x145))[_0x579c12(0x13a)]()||undefined,_0x25e41a=readOptionalTags(_0x106dc9),_0x643b8=await withAppConfigApiBoundary(_0x579c12(0x143),{'appCode':_0x106dc9[_0x579c12(0x148)]},()=>listAppConfigs(_0x106dc9[_0x579c12(0x148)],{'key':_0x193d1c,'tags':_0x25e41a})),_0x3aa30a=_0x643b8['map'](_0x4bb949=>projectAppConfig(_0x4bb949));return{'ok':!![],'data':{'appCode':_0x106dc9[_0x579c12(0x148)],'count':_0x3aa30a[_0x579c12(0x146)],'configs':_0x3aa30a},'message':_0x579c12(0x14a)+_0x3aa30a['length']+'\x20app\x20config(s)'};}};
@@ -1 +1 @@
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
+ const a28_0xaddc06=a28_0x5625;(function(_0x2bc501,_0x506513){const _0x5933af=a28_0x5625,_0x63687f=_0x2bc501();while(!![]){try{const _0x42c187=parseInt(_0x5933af(0x128))/0x1*(parseInt(_0x5933af(0x125))/0x2)+parseInt(_0x5933af(0x133))/0x3+parseInt(_0x5933af(0x12f))/0x4*(parseInt(_0x5933af(0x131))/0x5)+parseInt(_0x5933af(0x136))/0x6*(-parseInt(_0x5933af(0x121))/0x7)+-parseInt(_0x5933af(0x12d))/0x8*(parseInt(_0x5933af(0x123))/0x9)+-parseInt(_0x5933af(0x139))/0xa+parseInt(_0x5933af(0x13a))/0xb*(parseInt(_0x5933af(0x138))/0xc);if(_0x42c187===_0x506513)break;else _0x63687f['push'](_0x63687f['shift']());}catch(_0x19e467){_0x63687f['push'](_0x63687f['shift']());}}}(a28_0x2311,0x78404));import{createAppConfig,getAppConfigByKey,updateAppConfig}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{assertSingleValueSource,assertValueSourceReadable,asAppConfigDryRunResult,buildMutationData,FROM_ENV_FLAG,KEY_ARG,plannedAppConfig,projectAppConfig,readAppConfigValue,readKeyArg,readOptionalTags,STDIN_FLAG,TAGS_FLAG,VALUE_ARG,withAppConfigApiBoundary}from'../../commands/app-config/shared.js';function a28_0x5625(_0x41a3c2,_0x44c76d){_0x41a3c2=_0x41a3c2-0x121;const _0x2311cf=a28_0x2311();let _0x5625d2=_0x2311cf[_0x41a3c2];return _0x5625d2;}const CREATE_PATH=a28_0xaddc06(0x12b),UPDATE_PATH='/smartapi/app-config/update';export const appConfigSet={'service':a28_0xaddc06(0x126),'command':'set','description':a28_0xaddc06(0x13b),'risk':a28_0xaddc06(0x12c),'args':[KEY_ARG,VALUE_ARG],'flags':[APPCODE_FLAG_OPTIONAL,TAGS_FLAG,STDIN_FLAG,FROM_ENV_FLAG,{'name':a28_0xaddc06(0x132),'type':a28_0xaddc06(0x124),'description':a28_0xaddc06(0x135)}],async 'validate'(_0x46dd8f){readKeyArg(_0x46dd8f),readOptionalTags(_0x46dd8f),assertSingleValueSource(_0x46dd8f);},async 'dryRun'(_0x4789ef){const _0x4f2eee=a28_0xaddc06,_0x320b3f=readKeyArg(_0x4789ef),_0x529c7f=readOptionalTags(_0x4789ef),_0x15fd88=assertSingleValueSource(_0x4789ef);await assertValueSourceReadable(_0x15fd88);const _0x35bc82=await withAppConfigApiBoundary(_0x4f2eee(0x127),{'appCode':_0x4789ef[_0x4f2eee(0x130)],'key':_0x320b3f},()=>getAppConfigByKey(_0x4789ef[_0x4f2eee(0x130)],_0x320b3f)),_0x586160=_0x35bc82?_0x4f2eee(0x134):_0x4f2eee(0x129),_0xb6ff1b=_0x35bc82?projectAppConfig(_0x35bc82):null,_0x576aa9=plannedAppConfig({'appCode':_0x4789ef[_0x4f2eee(0x130)],'key':_0x320b3f,'tags':_0x529c7f??_0x35bc82?.[_0x4f2eee(0x122)],'hasValue':!![]});return asAppConfigDryRunResult(buildMutationData({'operation':_0x586160,'appCode':_0x4789ef[_0x4f2eee(0x130)],'key':_0x320b3f,'before':_0xb6ff1b,'after':_0x576aa9,'dryRun':!![]}),{'method':_0x4f2eee(0x13c),'url':_0x586160===_0x4f2eee(0x134)?UPDATE_PATH:CREATE_PATH});},async 'execute'(_0x2fd459){const _0x5e2a19=a28_0xaddc06,_0x5d6a36=readKeyArg(_0x2fd459),_0x49f904=readOptionalTags(_0x2fd459),_0x431721=await withAppConfigApiBoundary('get',{'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36},()=>getAppConfigByKey(_0x2fd459[_0x5e2a19(0x130)],_0x5d6a36)),_0x58133f=_0x431721?projectAppConfig(_0x431721):null,_0x500126=_0x431721?_0x5e2a19(0x134):'create',{value:_0xa70657,warnings:_0x39f824}=await readAppConfigValue(_0x2fd459),_0x397228={'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36,'value':_0xa70657,'tags':_0x49f904??_0x431721?.['tags']??undefined};await withAppConfigApiBoundary(_0x500126,{'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36},async()=>{_0x431721?await updateAppConfig({..._0x397228,'id':requireAppConfigId(_0x431721,_0x5d6a36,_0x2fd459['appCode'])}):await createAppConfig(_0x397228);});const _0xa03f31=await withAppConfigApiBoundary(_0x5e2a19(0x127),{'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36},()=>getAppConfigByKey(_0x2fd459[_0x5e2a19(0x130)],_0x5d6a36)),_0x339d8e=_0xa03f31?projectAppConfig(_0xa03f31):plannedAppConfig({'appCode':_0x2fd459['appCode'],'key':_0x5d6a36,'tags':_0x397228[_0x5e2a19(0x122)],'hasValue':_0xa70657!==''});return{'ok':!![],'data':buildMutationData({'operation':_0x500126,'appCode':_0x2fd459[_0x5e2a19(0x130)],'key':_0x5d6a36,'before':_0x58133f,'after':_0x339d8e,'dryRun':![],'warnings':_0x39f824}),'message':(_0x500126==='update'?'Updated':_0x5e2a19(0x12a))+'\x20app\x20config\x20'+_0x5d6a36};}};function a28_0x2311(){const _0x4cd177=['Read\x20config\x20value\x20from\x20file','6ziHCAy','App\x20config\x20server\x20id\x20missing\x20for\x20key=','60VdhUYu','3315800nPoDaE','1010009tqQnsc','Create\x20or\x20update\x20one\x20runtime\x20app-config\x20key','POST','6182071PXzhCc','tags','172647lkJzTe','string','367316qWrPST','app-config','get','2OpIdGK','create','Created','/smartapi/app-config/create','high-risk-write','264ckHNNP',',\x20appCode=','92228wXQUAP','appCode','135nGSzAW','file','2674110LpMnWG','update'];a28_0x2311=function(){return _0x4cd177;};return a28_0x2311();}function requireAppConfigId(_0x20de56,_0x2e1ab8,_0x5dda78){const _0x5c6465=a28_0xaddc06;if(typeof _0x20de56['id']==='number'&&Number['isFinite'](_0x20de56['id'])&&_0x20de56['id']>0x0)return _0x20de56['id'];throw CliErrors['apiError'](_0x5c6465(0x137)+_0x2e1ab8+_0x5c6465(0x12e)+_0x5dda78);}
@@ -1 +1 @@
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
+ const a29_0x2d9113=a29_0x31d7;(function(_0x597e33,_0x14a156){const _0x7da9aa=a29_0x31d7,_0x30c14b=_0x597e33();while(!![]){try{const _0x276e57=parseInt(_0x7da9aa(0x1a6))/0x1+-parseInt(_0x7da9aa(0x190))/0x2+parseInt(_0x7da9aa(0x1ac))/0x3*(-parseInt(_0x7da9aa(0x1b0))/0x4)+-parseInt(_0x7da9aa(0x1b4))/0x5*(-parseInt(_0x7da9aa(0x1cc))/0x6)+parseInt(_0x7da9aa(0x1c9))/0x7*(-parseInt(_0x7da9aa(0x19d))/0x8)+parseInt(_0x7da9aa(0x1a7))/0x9+parseInt(_0x7da9aa(0x1a9))/0xa*(-parseInt(_0x7da9aa(0x1cd))/0xb);if(_0x276e57===_0x14a156)break;else _0x30c14b['push'](_0x30c14b['shift']());}catch(_0xa5a1ce){_0x30c14b['push'](_0x30c14b['shift']());}}}(a29_0x9362,0xceb3f));function a29_0x9362(){const _0x5b48b6=['value\x20is\x20redacted','flag','appCode:\x20','string','App\x20config\x20tags\x20length\x20cannot\x20exceed\x2032.','name','252ZmYxBP','key','apiError','14232VwIewX','99bgNcoQ','args','Sensitive\x20config\x20value.\x20Prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.','781962cAzqGv','Environment\x20variable\x20is\x20not\x20set:\x20','valueRedacted','str','file','join','tags','Read\x20config\x20value\x20from\x20stdin','\x20app\x20config.','operation','from-env','method','value','17912XsYRuW','Failed\x20to\x20','Use\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','before','env','App\x20config\x20key\x20length\x20cannot\x20exceed\x20256.','kind','trim','gmtModified','1085428xlJWPQ','14338224sijiql','hasValue','851030KbcSry','push','Use\x20exactly\x20one\x20of:\x20positional\x20<value>,\x20--stdin,\x20--from-env\x20<NAME>,\x20or\x20--file\x20<path>.','9nwLjWv','appCode','stdin','path','1772956jEmrCC','gmtCreate','Runtime\x20app-config\x20key','validation','1550IWjtal','Read\x20config\x20value\x20from\x20the\x20named\x20environment\x20variable','length','data','once','utf8','Config\x20tags\x20for\x20filtering/display\x20metadata','Missing\x20app-config\x20key.','App\x20config\x20value\x20source\x20is\x20ambiguous.','argument','slice','key:\x20','boolean','reveal','warnings'];a29_0x9362=function(){return _0x5b48b6;};return a29_0x9362();}import{access,readFile}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const KEY_ARG={'name':a29_0x2d9113(0x1ca),'description':a29_0x2d9113(0x1b2),'required':!![]};export const VALUE_ARG={'name':'value','description':a29_0x2d9113(0x18f),'required':![]};export const TAGS_FLAG={'name':a29_0x2d9113(0x196),'type':a29_0x2d9113(0x1c6),'description':a29_0x2d9113(0x1ba)};export const STDIN_FLAG={'name':a29_0x2d9113(0x1ae),'type':a29_0x2d9113(0x1c0),'description':a29_0x2d9113(0x197),'default':![]};export const FROM_ENV_FLAG={'name':a29_0x2d9113(0x19a),'type':a29_0x2d9113(0x1c6),'description':a29_0x2d9113(0x1b5)};function a29_0x31d7(_0xaef3c3,_0x59511f){_0xaef3c3=_0xaef3c3-0x18f;const _0x936229=a29_0x9362();let _0x31d7a7=_0x936229[_0xaef3c3];return _0x31d7a7;}export const REVEAL_FLAG={'name':'reveal','type':'boolean','description':'Reveal\x20the\x20sensitive\x20value\x20for\x20this\x20single\x20key','default':![]};export function readKeyArg(_0x499bc5){const _0x27156c=_0x499bc5['args'][0x0]?.['trim']()??'';return validateKey(_0x27156c),_0x27156c;}export function readOptionalTags(_0x37979c){const _0x345cc5=a29_0x2d9113,_0xb5ece5=_0x37979c[_0x345cc5(0x193)]('tags')[_0x345cc5(0x1a4)]();if(!_0xb5ece5)return undefined;if(_0xb5ece5['length']>0x20)throw CliErrors[_0x345cc5(0x1b3)](_0x345cc5(0x1c7));return _0xb5ece5;}export function validateKey(_0x39acf9){const _0x49431c=a29_0x2d9113;if(!_0x39acf9)throw CliErrors['validation'](_0x49431c(0x1bb));if(_0x39acf9[_0x49431c(0x1b6)]>0x100)throw CliErrors[_0x49431c(0x1b3)](_0x49431c(0x1a2));}export function projectAppConfig(_0xbbd2e2,_0xef2e7a){const _0x5bda2d=a29_0x2d9113,_0x5cd0b6=_0xbbd2e2['value']!==undefined&&_0xbbd2e2[_0x5bda2d(0x19c)]!==null&&_0xbbd2e2['value']!=='',_0x1d2dd0={'appCode':_0xbbd2e2['appCode'],'key':_0xbbd2e2['key'],'tags':_0xbbd2e2[_0x5bda2d(0x196)]??undefined,'hasValue':_0x5cd0b6,'valueRedacted':_0x5cd0b6&&!_0xef2e7a?.[_0x5bda2d(0x1c1)],'gmtCreate':_0xbbd2e2[_0x5bda2d(0x1b1)],'gmtModified':_0xbbd2e2[_0x5bda2d(0x1a5)]};return _0xef2e7a?.['reveal']&&(_0x1d2dd0[_0x5bda2d(0x19c)]=_0xbbd2e2[_0x5bda2d(0x19c)]??'',_0x1d2dd0[_0x5bda2d(0x192)]=![]),_0x1d2dd0;}export function plannedAppConfig(_0x397f17){const _0x15a504=a29_0x2d9113,_0x21c0e6=_0x397f17[_0x15a504(0x1a8)]??!![];return{'appCode':_0x397f17['appCode'],'key':_0x397f17['key'],'tags':_0x397f17[_0x15a504(0x196)]??undefined,'hasValue':_0x21c0e6,'valueRedacted':_0x21c0e6};}export function buildMutationData(_0x173d8f){const _0x4c4242=a29_0x2d9113;return{'operation':_0x173d8f[_0x4c4242(0x199)],'selector':{'appCode':_0x173d8f['appCode'],'key':_0x173d8f['key']},'before':_0x173d8f[_0x4c4242(0x1a0)],'after':_0x173d8f['after'],'dryRun':_0x173d8f['dryRun'],'warnings':_0x173d8f[_0x4c4242(0x1c2)]??[]};}export async function withAppConfigApiBoundary(_0x242598,_0x209708,_0x5697b1){const _0x37e7f6=a29_0x2d9113;try{return await _0x5697b1();}catch{const _0x557892=[_0x37e7f6(0x1c5)+_0x209708[_0x37e7f6(0x1ad)]];if(_0x209708[_0x37e7f6(0x1ca)])_0x557892[_0x37e7f6(0x1aa)](_0x37e7f6(0x1bf)+_0x209708[_0x37e7f6(0x1ca)]);_0x557892['push'](_0x37e7f6(0x1c3));throw CliErrors[_0x37e7f6(0x1cb)](_0x37e7f6(0x19e)+_0x242598+_0x37e7f6(0x198),_0x557892[_0x37e7f6(0x195)](';\x20')+'.');}}export function asAppConfigDryRunResult(_0xeccf05,_0x356fec){const _0x4db6e1=a29_0x2d9113;return Object['defineProperties'](_0xeccf05,{'method':{'value':_0x356fec[_0x4db6e1(0x19b)],'enumerable':![]},'url':{'value':_0x356fec['url'],'enumerable':![]}});}export function assertSingleValueSource(_0x56dd7e){const _0x8c41e0=a29_0x2d9113,_0x2404e1=[];_0x56dd7e['args']['length']>0x1&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':'argument','value':_0x56dd7e[_0x8c41e0(0x1ce)][_0x8c41e0(0x1be)](0x1)[_0x8c41e0(0x195)]('\x20')});const _0x1a1eb9=_0x56dd7e[_0x8c41e0(0x1c4)](_0x8c41e0(0x19c));_0x1a1eb9!==undefined&&_0x1a1eb9!==null&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':'argument','value':String(_0x1a1eb9)});_0x56dd7e['bool'](_0x8c41e0(0x1ae))&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':'stdin'});const _0x2e6508=_0x56dd7e['str']('from-env')[_0x8c41e0(0x1a4)]();_0x2e6508&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':'env','name':_0x2e6508});const _0xe2cc3e=_0x56dd7e[_0x8c41e0(0x193)](_0x8c41e0(0x194))[_0x8c41e0(0x1a4)]();_0xe2cc3e&&_0x2404e1[_0x8c41e0(0x1aa)]({'kind':_0x8c41e0(0x194),'path':_0xe2cc3e});if(_0x2404e1['length']===0x0)throw CliErrors[_0x8c41e0(0x1b3)]('Missing\x20app-config\x20value\x20source.',_0x8c41e0(0x19f));if(_0x2404e1[_0x8c41e0(0x1b6)]>0x1)throw CliErrors['validation'](_0x8c41e0(0x1bc),_0x8c41e0(0x1ab));return _0x2404e1[0x0];}export async function assertValueSourceReadable(_0xe0fdbd){const _0xb0c70f=a29_0x2d9113;if(_0xe0fdbd[_0xb0c70f(0x1a3)]===_0xb0c70f(0x1a1)&&!(_0xe0fdbd[_0xb0c70f(0x1c8)]in process.env))throw CliErrors['validation'](_0xb0c70f(0x191)+_0xe0fdbd['name']);if(_0xe0fdbd[_0xb0c70f(0x1a3)]==='file')try{await access(_0xe0fdbd[_0xb0c70f(0x1af)]);}catch{throw CliErrors[_0xb0c70f(0x1b3)]('Value\x20file\x20is\x20not\x20readable:\x20'+_0xe0fdbd[_0xb0c70f(0x1af)]);}}export async function readAppConfigValue(_0x9eed37){const _0x1454fb=a29_0x2d9113,_0x170372=assertSingleValueSource(_0x9eed37),_0x3b3954=[];if(_0x170372[_0x1454fb(0x1a3)]===_0x1454fb(0x1bd))return _0x3b3954[_0x1454fb(0x1aa)]('Value\x20was\x20provided\x20as\x20a\x20command\x20argument;\x20prefer\x20--stdin,\x20--from-env,\x20or\x20--file\x20for\x20secrets.'),{'value':_0x170372[_0x1454fb(0x19c)]??'','source':_0x170372['kind'],'warnings':_0x3b3954};if(_0x170372[_0x1454fb(0x1a3)]===_0x1454fb(0x1ae))return{'value':await readStdin(),'source':_0x170372[_0x1454fb(0x1a3)],'warnings':_0x3b3954};if(_0x170372[_0x1454fb(0x1a3)]==='env'){if(!(_0x170372['name']in process.env))throw CliErrors[_0x1454fb(0x1b3)]('Environment\x20variable\x20is\x20not\x20set:\x20'+_0x170372[_0x1454fb(0x1c8)]);return{'value':process.env[_0x170372.name]??'','source':_0x170372['kind'],'warnings':_0x3b3954};}return{'value':await readFile(_0x170372[_0x1454fb(0x1af)],_0x1454fb(0x1b9)),'source':_0x170372['kind'],'warnings':_0x3b3954};}function readStdin(){return new Promise((_0x44437f,_0x54a35c)=>{const _0x3b81a9=a29_0x31d7;let _0x1d6316='';process[_0x3b81a9(0x1ae)]['setEncoding'](_0x3b81a9(0x1b9)),process[_0x3b81a9(0x1ae)]['on'](_0x3b81a9(0x1b7),_0xc0938a=>{_0x1d6316+=_0xc0938a;}),process[_0x3b81a9(0x1ae)]['once']('end',()=>_0x44437f(_0x1d6316)),process['stdin'][_0x3b81a9(0x1b8)]('error',_0x54a35c);});}
@@ -1 +1 @@
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
+ const a30_0x38521f=a30_0x83d8;function a30_0x83d8(_0x48b361,_0xe01200){_0x48b361=_0x48b361-0x11d;const _0x47e702=a30_0x47e7();let _0x83d8d1=_0x47e702[_0x48b361];return _0x83d8d1;}function a30_0x47e7(){const _0x21b856=['54933ZkeALY','Clear\x20login\x20session','../../auth/auth-server-ui.js','login','48272wSadTa','207xxYTVV','9314CCwnVI','!\x20Not\x20logged\x20in','5485248uMiDkv','44jeUOkB','auth','4202455DFQIVx','10422330fSIxNT','Skip\x20login\x20confirmation\x20and\x20start\x20browser\x20auth\x20immediately','112280mXJLcL','logout','log','read','52VkGMVU','yes','bool','boolean'];a30_0x47e7=function(){return _0x21b856;};return a30_0x47e7();}(function(_0x51d16c,_0x2ba88e){const _0xbd93c8=a30_0x83d8,_0x2237bf=_0x51d16c();while(!![]){try{const _0x30d359=parseInt(_0xbd93c8(0x11d))/0x1*(-parseInt(_0xbd93c8(0x127))/0x2)+-parseInt(_0xbd93c8(0x121))/0x3*(-parseInt(_0xbd93c8(0x12a))/0x4)+parseInt(_0xbd93c8(0x12c))/0x5+parseInt(_0xbd93c8(0x129))/0x6+-parseInt(_0xbd93c8(0x12f))/0x7+parseInt(_0xbd93c8(0x125))/0x8*(-parseInt(_0xbd93c8(0x126))/0x9)+-parseInt(_0xbd93c8(0x12d))/0xa;if(_0x30d359===_0x2ba88e)break;else _0x2237bf['push'](_0x2237bf['shift']());}catch(_0x5821a3){_0x2237bf['push'](_0x2237bf['shift']());}}}(a30_0x47e7,0x7e325));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'../../auth/constant.js';export const authDefinitions=[{'service':a30_0x38521f(0x12b),'command':a30_0x38521f(0x124),'description':'Login\x20via\x20browser','risk':a30_0x38521f(0x132),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a30_0x38521f(0x11e),'type':a30_0x38521f(0x120),'description':a30_0x38521f(0x12e),'default':![]}],async 'execute'(_0x58f83a){const _0x16919d=a30_0x38521f,{runAuthServer:_0x1d8858}=await import(_0x16919d(0x123));return await _0x1d8858({'autoYes':_0x58f83a[_0x16919d(0x11f)](_0x16919d(0x11e)),'nonInteractive':_0x58f83a['nonInteractive']}),{'ok':!![]};}},{'service':'auth','command':a30_0x38521f(0x130),'description':a30_0x38521f(0x122),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x8b3e4){const _0x389bab=a30_0x38521f;return existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x389bab(0x131)]('✓\x20Logged\x20out')):console[_0x389bab(0x131)](_0x389bab(0x128)),{'ok':!![]};}}];
@@ -1 +1 @@
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
+ const a31_0x4678cf=a31_0x1cf0;(function(_0x29fc8e,_0x5464d1){const _0x340625=a31_0x1cf0,_0x169c8d=_0x29fc8e();while(!![]){try{const _0x50e0c8=parseInt(_0x340625(0x141))/0x1*(-parseInt(_0x340625(0x183))/0x2)+parseInt(_0x340625(0x180))/0x3+-parseInt(_0x340625(0x17e))/0x4*(-parseInt(_0x340625(0x145))/0x5)+parseInt(_0x340625(0x14c))/0x6*(-parseInt(_0x340625(0x16e))/0x7)+-parseInt(_0x340625(0x146))/0x8*(-parseInt(_0x340625(0x169))/0x9)+parseInt(_0x340625(0x178))/0xa+-parseInt(_0x340625(0x134))/0xb;if(_0x50e0c8===_0x5464d1)break;else _0x169c8d['push'](_0x169c8d['shift']());}catch(_0x6863b1){_0x169c8d['push'](_0x169c8d['shift']());}}}(a31_0x2333,0xedddb));import{createInterface}from'node:readline';import{mkdir,writeFile}from'node:fs/promises';import{dirname,join}from'node:path';import{listDatasets,listBffDatasetOperations}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists}from'../../core/bff/file-system.js';import{isValidBffFunctionName,normalizeHookFunctionNode}from'../../core/bff/utils.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const bffCreate={'service':a31_0x4678cf(0x133),'command':a31_0x4678cf(0x161),'description':a31_0x4678cf(0x17f),'risk':a31_0x4678cf(0x15f),'flags':[{'name':'type','type':a31_0x4678cf(0x13f),'required':!![],'enum':[a31_0x4678cf(0x17c),a31_0x4678cf(0x143),a31_0x4678cf(0x16b)],'description':a31_0x4678cf(0x182)},{'name':'name','type':a31_0x4678cf(0x13f),'required':!![],'description':a31_0x4678cf(0x132)},{'name':'description','type':a31_0x4678cf(0x13f),'description':a31_0x4678cf(0x176)},{'name':a31_0x4678cf(0x15d),'type':a31_0x4678cf(0x13f),'description':'Dataset\x20alias\x20from\x20api.ts\x20(HOOK\x20only,\x20preferred)'},{'name':a31_0x4678cf(0x158),'type':'string','description':a31_0x4678cf(0x160)},{'name':'operation-type','type':a31_0x4678cf(0x13f),'description':a31_0x4678cf(0x138)},{'name':a31_0x4678cf(0x13d),'type':a31_0x4678cf(0x13f),'description':a31_0x4678cf(0x142),'enum':[a31_0x4678cf(0x152),'after']}],async 'validate'(_0x519b3b){const _0x1ece97=a31_0x4678cf,_0x352807=_0x519b3b[_0x1ece97(0x16d)](_0x1ece97(0x14a));if(!isValidBffFunctionName(_0x352807))throw CliErrors['validation']('Invalid\x20function\x20name\x20\x22'+_0x352807+'\x22.\x20Must\x20be\x20a\x20valid\x20JS\x20identifier\x20(e.g.\x20createOrder,\x20beforeFilter).');},async 'execute'(_0x2e0292){const _0xdc5421=a31_0x4678cf,_0x9529e0=loadBffProjectConfig(_0x2e0292[_0xdc5421(0x167)]),_0x31ab18=_0x2e0292[_0xdc5421(0x16d)](_0xdc5421(0x173)),_0x42abae=_0x2e0292[_0xdc5421(0x16d)](_0xdc5421(0x14a)),_0x71f5c1=_0x2e0292[_0xdc5421(0x16d)](_0xdc5421(0x163))||undefined,_0x4c6b67=_0x31ab18===_0xdc5421(0x16b)?await resolveHookOptions(_0x9529e0,_0x2e0292):undefined,_0x2c5f91=buildFilePath(_0x9529e0,_0x31ab18,_0x42abae,_0x4c6b67);if(await fileExists(_0x2c5f91))throw CliErrors['validation']('File\x20already\x20exists:\x20'+_0x2c5f91);await mkdir(dirname(_0x2c5f91),{'recursive':!![]});const _0x5523a6=generateTemplate(_0x31ab18,_0x42abae,_0x2e0292[_0xdc5421(0x167)],_0x71f5c1,_0x4c6b67);await writeFile(_0x2c5f91,_0x5523a6,'utf8');const _0x2b2bcf={'type':_0x31ab18,'name':_0x42abae,'path':_0x2c5f91};if(_0x71f5c1)_0x2b2bcf['description']=_0x71f5c1;if(_0x4c6b67){if(_0x4c6b67['alias'])_0x2b2bcf[_0xdc5421(0x15d)]=_0x4c6b67[_0xdc5421(0x15d)];_0x2b2bcf['datasetCode']=_0x4c6b67[_0xdc5421(0x13a)],_0x2b2bcf[_0xdc5421(0x13e)]=_0x4c6b67[_0xdc5421(0x13e)],_0x2b2bcf[_0xdc5421(0x12d)]=_0x4c6b67[_0xdc5421(0x12d)];}return{'ok':!![],'data':_0x2b2bcf,'message':_0xdc5421(0x140)+_0x31ab18+_0xdc5421(0x171)+_0x42abae};}};async function resolveHookOptions(_0x3cb4eb,_0x538ced){const _0x32f362=a31_0x4678cf,_0x48cd8f=loadAliasMap(_0x538ced['apiDir'],undefined,resolveApiFilePath(_0x538ced[_0x32f362(0x15e)],_0x538ced['appCode'])),_0x1f8107=_0x48cd8f[_0x32f362(0x131)]>0x0;let _0x5edf7d,_0x168cf4,_0x5ee40d;const _0x4d562c=_0x538ced['str'](_0x32f362(0x15d)),_0x330b62=_0x538ced[_0x32f362(0x16d)](_0x32f362(0x158));if(_0x4d562c){const _0x1b88c0=resolveAlias(_0x538ced[_0x32f362(0x15e)],_0x4d562c,undefined,resolveApiFilePath(_0x538ced[_0x32f362(0x15e)],_0x538ced[_0x32f362(0x167)]));if(!_0x1b88c0){const _0xc5d841=_0x1f8107?'Available\x20aliases:\x20'+_0x48cd8f[_0x32f362(0x14f)](_0x30de5c=>_0x30de5c[_0x32f362(0x15d)])['join'](',\x20'):_0x32f362(0x17a)+CLI_BIN_NAME+_0x32f362(0x149);throw CliErrors[_0x32f362(0x175)]('Alias\x20\x22'+_0x4d562c+'\x22\x20not\x20found.\x20'+_0xc5d841);}_0x5edf7d=_0x4d562c,_0x168cf4=_0x1b88c0;}else{if(_0x330b62){_0x168cf4=_0x330b62;const _0x4c6d18=_0x48cd8f[_0x32f362(0x184)](_0x4c4a45=>_0x4c4a45[_0x32f362(0x13a)]===_0x330b62);_0x5edf7d=_0x4c6d18?.[_0x32f362(0x15d)];}else{if(_0x538ced[_0x32f362(0x172)])throw CliErrors['validation'](_0x32f362(0x16f));else{if(_0x1f8107){const _0x50d969=_0x48cd8f[_0x32f362(0x14f)](_0x353ffb=>_0x353ffb[_0x32f362(0x15d)]+'\x20('+_0x353ffb[_0x32f362(0x147)]+')'),_0x21d3cb=await promptSelect(_0x32f362(0x17b),_0x50d969),_0x21b58d=_0x48cd8f[_0x21d3cb];if(!_0x21b58d)throw CliErrors[_0x32f362(0x175)](_0x32f362(0x185));_0x5edf7d=_0x21b58d['alias'],_0x168cf4=_0x21b58d[_0x32f362(0x13a)];}else{const _0x20633a=await listDatasets(_0x538ced['appCode']);if(_0x20633a[_0x32f362(0x131)]===0x0)throw CliErrors['validation']('No\x20datasets\x20found\x20for\x20this\x20app.');const _0x59f499=_0x20633a['map'](_0xdc957a=>_0xdc957a['name']+'\x20['+(_0xdc957a[_0x32f362(0x153)]??_0x32f362(0x164))+_0x32f362(0x137)+_0xdc957a[_0x32f362(0x177)]+')'),_0x2aba43=await promptSelect(_0x32f362(0x17b),_0x59f499),_0x11e9ed=_0x20633a[_0x2aba43];if(!_0x11e9ed)throw CliErrors[_0x32f362(0x175)](_0x32f362(0x185));_0x168cf4=_0x11e9ed[_0x32f362(0x177)],_0x5edf7d=undefined;}}}}const _0x371503=await listDatasets(_0x538ced[_0x32f362(0x167)]),_0x3c84ae=_0x371503[_0x32f362(0x184)](_0x31a6c4=>_0x31a6c4[_0x32f362(0x177)]===_0x168cf4);if(!_0x3c84ae)throw CliErrors['validation'](_0x32f362(0x165)+_0x168cf4+'\x22.\x20'+(_0x5edf7d?_0x32f362(0x17d)+CLI_BIN_NAME+_0x32f362(0x170):''));_0x5ee40d=_0x3c84ae['id'];const _0x2a6610=_0x5edf7d??_0x168cf4,_0x519503=await listBffDatasetOperations(_0x538ced[_0x32f362(0x167)],_0x5ee40d),_0x577fdc=_0x519503?Object[_0x32f362(0x130)](_0x519503):[];if(_0x577fdc[_0x32f362(0x131)]===0x0)throw CliErrors[_0x32f362(0x175)](_0x32f362(0x16c)+_0x2a6610+'.');let _0x4f4d9a;const _0xd73514=_0x538ced['str'](_0x32f362(0x12f));if(_0xd73514){if(!_0x577fdc[_0x32f362(0x168)](_0xd73514))throw CliErrors[_0x32f362(0x175)]('Operation\x20type\x20\x22'+_0xd73514+'\x22\x20not\x20found\x20for\x20dataset\x20'+_0x2a6610+'.\x20'+(_0x32f362(0x135)+_0x577fdc[_0x32f362(0x136)](',\x20')));_0x4f4d9a=_0xd73514;}else{if(_0x538ced[_0x32f362(0x172)])throw CliErrors[_0x32f362(0x175)]('--operation-type\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x1582fb=await promptSelect(_0x32f362(0x148),_0x577fdc);_0x4f4d9a=_0x577fdc[_0x1582fb]??_0x577fdc[0x0];}let _0x3b3734=normalizeHookFunctionNode(_0x538ced[_0x32f362(0x16d)](_0x32f362(0x13d)));if(!_0x3b3734){if(_0x538ced[_0x32f362(0x16d)](_0x32f362(0x13d)))throw CliErrors['validation'](_0x32f362(0x14b));if(_0x538ced[_0x32f362(0x172)])throw CliErrors[_0x32f362(0x175)]('--function-node\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.');const _0x41d6d2=await promptSelect('Select\x20trigger\x20node:',[_0x32f362(0x152),_0x32f362(0x14e)]);_0x3b3734=[_0x32f362(0x152),_0x32f362(0x14e)][_0x41d6d2]??_0x32f362(0x152);}return{'alias':_0x5edf7d,'datasetCode':_0x168cf4,'datasetId':_0x5ee40d,'operationType':_0x4f4d9a,'functionNode':_0x3b3734};}function a31_0x2333(){const _0x25a507=['question','alias','apiDir','write','Dataset\x20code\x20(HOOK\x20only,\x20fallback\x20when\x20alias\x20unavailable)','create','\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','description','UNKNOWN','Dataset\x20not\x20found\x20for\x20code\x20\x22','\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','appCode','includes','3852837omaSeG','.js','HOOK','No\x20operation\x20types\x20found\x20for\x20dataset\x20','str','11095133oyUlOB','--alias\x20or\x20--datasetcode\x20is\x20required\x20for\x20HOOK\x20in\x20non-interactive\x20mode.','\x20api\x20pull`\x20to\x20refresh.','\x20function:\x20','nonInteractive','type','close','validation','Script\x20description','code','11594210cymOmK','HOOK\x20requires\x20hookOptions\x20for\x20template\x20generation.','No\x20api.ts\x20found.\x20Run\x20`','Select\x20dataset:','COMMON','The\x20api.ts\x20may\x20be\x20stale\x20—\x20run\x20`','12KugeMV','Scaffold\x20a\x20new\x20BFF\x20function\x20from\x20template','4227840IYeqZm','stderr','Script\x20type','30nYPUbt','find','Invalid\x20dataset\x20selection.','functionNode','\x0a\x20*\x20[接口路径]\x20POST\x20/api/','operation-type','keys','length','Function\x20name\x20(valid\x20JS\x20identifier)','bff','15840825SgESLX','Available:\x20','join',']\x20(','Operation\x20type\x20(HOOK\x20only)','/**\x0a\x20*\x20ENDPOINT\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','datasetCode','/**\x0a\x20*\x20HOOK\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','/**\x0a\x20*\x20COMMON\x20function\x20template.\x0a\x20*\x0a\x20*\x20[脚本描述]\x20','function-node','operationType','string','Created\x20','5488yApExL','Trigger\x20node\x20(HOOK\x20only)','ENDPOINT','(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a','1094710Jwkzci','16hxXCCS','tableName','Select\x20operation\x20type:','\x20api\x20pull`\x20first,\x20or\x20use\x20--datasetcode\x20instead.','name','--function-node\x20must\x20be\x20\x27before\x27\x20or\x20\x27after\x27.','6evrJcV','TODO:\x20add\x20script\x20description','after','map','\x0a\x20*\x20[脚本名称]\x20','\x0a\x20*\x20[触发节点]\x20','before','source','isInteger','scriptsRootDir','stdin','trim','datasetcode','parseInt','HOOK\x20requires\x20alias/operation/node\x20options.','\x0a\x20*\x20[接口路径]\x20POST\x20/api/endpoint/{appCode}/{scriptName}\x0a\x20*\x20[当前示例]\x20POST\x20/api/endpoint/'];a31_0x2333=function(){return _0x25a507;};return a31_0x2333();}async function promptSelect(_0x4c0af5,_0x58544c){const _0xf580c6=a31_0x4678cf;if(_0x58544c[_0xf580c6(0x131)]===0x1)return 0x0;for(const [_0x3ab335,_0x4e67b7]of _0x58544c['entries']()){process[_0xf580c6(0x181)][_0xf580c6(0x15f)]('\x20\x20'+(_0x3ab335+0x1)+'.\x20'+_0x4e67b7+'\x0a');}const _0x25cfaf=createInterface({'input':process[_0xf580c6(0x156)],'output':process['stderr']});while(!![]){const _0x3dfe6f=await new Promise(_0x301ba9=>{const _0x43e270=_0xf580c6;_0x25cfaf[_0x43e270(0x15c)](_0x4c0af5+'\x20',_0x301ba9);}),_0x304e96=Number[_0xf580c6(0x159)](_0x3dfe6f[_0xf580c6(0x157)](),0xa);if(Number[_0xf580c6(0x154)](_0x304e96)&&_0x304e96>=0x1&&_0x304e96<=_0x58544c['length'])return _0x25cfaf[_0xf580c6(0x174)](),_0x304e96-0x1;process[_0xf580c6(0x181)]['write']('\x20\x20Enter\x20a\x20number\x20between\x201\x20and\x20'+_0x58544c[_0xf580c6(0x131)]+'.\x0a');}}function buildFilePath(_0x395c9d,_0x1c5c63,_0x44da4d,_0xf4dfe3){const _0xe71151=a31_0x4678cf;if(_0x1c5c63===_0xe71151(0x16b)){if(!_0xf4dfe3)throw CliErrors[_0xe71151(0x175)](_0xe71151(0x15a));const _0x484590=_0xf4dfe3[_0xe71151(0x15d)]??_0xf4dfe3[_0xe71151(0x13a)];return join(_0x395c9d[_0xe71151(0x155)],_0xe71151(0x16b),_0x484590,_0xf4dfe3[_0xe71151(0x13e)],_0xf4dfe3[_0xe71151(0x12d)],_0x44da4d+'.js');}return join(_0x395c9d[_0xe71151(0x155)],_0x1c5c63,_0x44da4d+_0xe71151(0x16a));}function a31_0x1cf0(_0x25fa1b,_0x59e999){_0x25fa1b=_0x25fa1b-0x12d;const _0x2333a8=a31_0x2333();let _0x1cf01f=_0x2333a8[_0x25fa1b];return _0x1cf01f;}export function generateTemplate(_0x39506c,_0x578235,_0x40c857,_0x2a8683,_0x392d33){const _0x3c5872=a31_0x4678cf,_0x37a311=_0x2a8683?.[_0x3c5872(0x157)]()||_0x3c5872(0x14d);if(_0x39506c==='COMMON')return _0x3c5872(0x13c)+_0x37a311+_0x3c5872(0x150)+_0x578235+'\x0a\x20*\x20[脚本类型]\x20COMMON\x0a\x20*\x20[本地路径]\x20.rabetbase/bff/COMMON/'+_0x578235+'.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'+_0x578235+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';if(_0x39506c===_0x3c5872(0x143))return _0x3c5872(0x139)+_0x37a311+_0x3c5872(0x15b)+_0x40c857+'/'+_0x578235+_0x3c5872(0x166)+_0x578235+_0x3c5872(0x144);if(!_0x392d33)throw CliErrors[_0x3c5872(0x175)](_0x3c5872(0x179));return _0x3c5872(0x13b)+_0x37a311+_0x3c5872(0x12e)+_0x40c857+'/'+_0x392d33['datasetCode']+'/'+_0x392d33[_0x3c5872(0x13e)]+_0x3c5872(0x151)+_0x392d33[_0x3c5872(0x12d)]+_0x3c5872(0x162)+_0x578235+'(params,\x20context)\x20{\x0a\x20\x20return\x20params;\x0a}\x0a';}
@@ -1 +1 @@
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
+ const a32_0x456fd5=a32_0x2ece;(function(_0x1d4255,_0x19fa32){const _0x40d766=a32_0x2ece,_0x44c060=_0x1d4255();while(!![]){try{const _0x1a08a9=parseInt(_0x40d766(0x1d8))/0x1*(parseInt(_0x40d766(0x1f2))/0x2)+-parseInt(_0x40d766(0x1dc))/0x3*(-parseInt(_0x40d766(0x200))/0x4)+parseInt(_0x40d766(0x1df))/0x5+parseInt(_0x40d766(0x1ed))/0x6+parseInt(_0x40d766(0x1fe))/0x7+parseInt(_0x40d766(0x1ec))/0x8+parseInt(_0x40d766(0x1eb))/0x9*(-parseInt(_0x40d766(0x1f1))/0xa);if(_0x1a08a9===_0x19fa32)break;else _0x44c060['push'](_0x44c060['shift']());}catch(_0x5d1caf){_0x44c060['push'](_0x44c060['shift']());}}}(a32_0x470b,0xca462));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a32_0x456fd5(0x1ea),'command':a32_0x456fd5(0x1dd),'description':'Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','risk':a32_0x456fd5(0x206),'flags':[{'name':a32_0x456fd5(0x1e0),'type':a32_0x456fd5(0x1e6),'required':!![],'description':a32_0x456fd5(0x1de)}],async 'validate'(_0x2acda1){const _0x48e291=a32_0x456fd5,_0xd749b4=loadBffProjectConfig(_0x2acda1['appCode']),_0x42bc7a=await readBffLockFile(_0xd749b4['lockFilePath']);if(!_0x42bc7a)throw CliErrors[_0x48e291(0x1fd)](_0x48e291(0x207));},async 'dryRun'(_0x55b959){const _0x155822=a32_0x456fd5,_0x3496fc=loadBffProjectConfig(_0x55b959['appCode']),_0x2f31b3=await readBffLockFile(_0x3496fc[_0x155822(0x204)]);if(!_0x2f31b3)throw CliErrors['validation'](_0x155822(0x1e9));const {appLock:_0x5a78a8}=ensureLockScope(_0x2f31b3,_0x55b959[_0x155822(0x1f4)],_0x3496fc[_0x155822(0x1ef)],'delete'),_0x561f9f=_0x55b959[_0x155822(0x1f6)](_0x155822(0x1e0)),_0x34e680=Object[_0x155822(0x1db)](_0x5a78a8['functions']),_0x155fed=resolveDeleteTarget(_0x561f9f,_0x34e680),_0x4fa42c=_0x5a78a8[_0x155822(0x1fb)][_0x155fed];if(!_0x4fa42c)throw CliErrors[_0x155822(0x1fd)](_0x155822(0x202)+_0x155fed+'\x22.');const _0x1cdd99=resolveLocalFilePathFromLockKey(_0x3496fc,_0x155fed),_0x55f100=relative(_0x3496fc[_0x155822(0x1f8)],_0x1cdd99),_0x7a59d2=join(_0x3496fc[_0x155822(0x1f9)],'<timestamp>',_0x55f100);return{'method':_0x155822(0x1d9),'url':_0x155822(0x1f7),'body':{'appCode':_0x55b959[_0x155822(0x1f4)],'target':_0x155fed,'remoteId':_0x4fa42c[_0x155822(0x1e2)],'localFilePath':_0x1cdd99,'trashedPath':_0x7a59d2},'description':_0x155822(0x1f5)+_0x155fed+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x5b6a1c){const _0x441ef1=a32_0x456fd5,_0x585386=loadBffProjectConfig(_0x5b6a1c['appCode']),_0x253082=await readBffLockFile(_0x585386[_0x441ef1(0x204)]);if(!_0x253082)throw CliErrors[_0x441ef1(0x1fd)](_0x441ef1(0x1e9));const {lockData:_0x51e338,appLock:_0x489027}=ensureLockScope(_0x253082,_0x5b6a1c[_0x441ef1(0x1f4)],_0x585386[_0x441ef1(0x1ef)],_0x441ef1(0x1dd)),_0x3a58b8=JSON['parse'](JSON['stringify'](_0x51e338)),_0x1b02bf=_0x3a58b8[_0x441ef1(0x1fa)][_0x5b6a1c[_0x441ef1(0x1f4)]];if(!_0x1b02bf)throw new Error(_0x441ef1(0x1d7)+_0x5b6a1c[_0x441ef1(0x1f4)]+_0x441ef1(0x201));const _0x4cabdb=_0x5b6a1c[_0x441ef1(0x1f6)](_0x441ef1(0x1e0)),_0x3f4adb=Object[_0x441ef1(0x1db)](_0x1b02bf[_0x441ef1(0x1fb)]),_0x268751=resolveDeleteTarget(_0x4cabdb,_0x3f4adb),_0x755ca7=_0x1b02bf[_0x441ef1(0x1fb)][_0x268751];if(!_0x755ca7)throw CliErrors[_0x441ef1(0x1fd)](_0x441ef1(0x202)+_0x268751+'\x22.');await deleteBffScript(_0x755ca7['remoteId']),delete _0x1b02bf[_0x441ef1(0x1fb)][_0x268751],_0x1b02bf[_0x441ef1(0x1ee)]=new Date()[_0x441ef1(0x1e3)](),await writeBffLockFile(_0x585386[_0x441ef1(0x204)],_0x3a58b8);const _0x3f4210=resolveLocalFilePathFromLockKey(_0x585386,_0x268751);let _0x415a0c;await fileExists(_0x3f4210)&&(_0x415a0c=await moveToTrash(_0x585386[_0x441ef1(0x1f8)],_0x585386[_0x441ef1(0x1f9)],_0x3f4210),await cleanupEmptyDirectories(dirname(_0x3f4210),_0x585386[_0x441ef1(0x1d5)]));await waitForDeleteSettlement(_0x585386[_0x441ef1(0x204)],_0x5b6a1c[_0x441ef1(0x1f4)],_0x268751,_0x3f4210),await sleep(0x96);const _0x199365={'deleted':_0x268751,'remoteId':_0x755ca7[_0x441ef1(0x1e2)]};if(_0x415a0c)_0x199365['trashedTo']=_0x415a0c;return{'ok':!![],'data':_0x199365,'message':_0x441ef1(0x203)+_0x268751+(_0x415a0c?_0x441ef1(0x1e1):'')};}};function resolveDeleteTarget(_0x1854cc,_0xd127d1){const _0xb6f1b=a32_0x456fd5;if(_0x1854cc[_0xb6f1b(0x1fc)]('/')){const _0x504c28=_0xd127d1['find'](_0x23af86=>_0x23af86===_0x1854cc);if(!_0x504c28)throw CliErrors[_0xb6f1b(0x1fd)](_0xb6f1b(0x1e4)+_0x1854cc);return _0x504c28;}const _0x5e6c8a=_0xd127d1[_0xb6f1b(0x1e8)](_0x1a0487=>_0x1a0487[_0xb6f1b(0x1e5)]('/')['at'](-0x1)===_0x1854cc);if(_0x5e6c8a[_0xb6f1b(0x1f0)]===0x0)throw CliErrors[_0xb6f1b(0x1fd)](_0xb6f1b(0x1e4)+_0x1854cc);if(_0x5e6c8a[_0xb6f1b(0x1f0)]>0x1)throw CliErrors['validation']('Multiple\x20functions\x20match\x20\x22'+_0x1854cc+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x5e6c8a[_0xb6f1b(0x1ff)](_0x644532=>_0xb6f1b(0x1e7)+_0x644532)[_0xb6f1b(0x205)]('\x0a'));return _0x5e6c8a[0x0];}function a32_0x470b(){const _0x36b92d=['replace','keys','39645eskHcf','delete','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','3168635PPOJKY','target','\x20(local\x20file\x20moved\x20to\x20trash)','remoteId','toISOString','Function\x20not\x20found:\x20','split','string','\x20\x20-\x20','filter','BFF\x20lock\x20file\x20not\x20found.','bff','5427NyMEuO','5474664aCuPTv','4810170RSyidD','lastSync','scriptsRoot','length','68850qMQqbR','1633894gTFnWF','Local\x20delete\x20not\x20settled\x20for\x20','appCode','Would\x20delete\x20','str','/api/management/library/scripts/delete','projectRoot','trashDir','apps','functions','includes','validation','8493135TMSlMa','map','4ZXPabS','\x22\x20not\x20found\x20after\x20ensureLockScope.','No\x20lock\x20entry\x20found\x20for\x20\x22','Deleted\x20','lockFilePath','join','high-risk-write','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','scriptsRootDir','startsWith','Lock\x20scope\x20for\x20app\x20\x22','2IQqfor','POST'];a32_0x470b=function(){return _0x36b92d;};return a32_0x470b();}function a32_0x2ece(_0x2c8dc5,_0x5ad08b){_0x2c8dc5=_0x2c8dc5-0x1d5;const _0x470b7c=a32_0x470b();let _0x2ece62=_0x470b7c[_0x2c8dc5];return _0x2ece62;}async function moveToTrash(_0x39fb4f,_0x413cdc,_0x480972){const _0x49ec8c=a32_0x456fd5,_0x5361e0=new Date()['toISOString']()[_0x49ec8c(0x1da)](/[:.]/g,'-'),_0x1f65fd=relative(_0x39fb4f,_0x480972),_0xb8304a=join(_0x413cdc,_0x5361e0,_0x1f65fd);return await mkdir(dirname(_0xb8304a),{'recursive':!![]}),await rename(_0x480972,_0xb8304a),_0xb8304a;}async function cleanupEmptyDirectories(_0x4e911c,_0x177f49){const _0x3dab5e=a32_0x456fd5;let _0x16bda5=resolve(_0x4e911c);const _0x2ac2aa=resolve(_0x177f49);while(_0x16bda5[_0x3dab5e(0x1d6)](''+_0x2ac2aa+sep)||_0x16bda5===_0x2ac2aa){if(_0x16bda5===_0x2ac2aa)return;try{const _0x12c1e7=await readdir(_0x16bda5);if(_0x12c1e7['length']>0x0)return;await rmdir(_0x16bda5);}catch{return;}_0x16bda5=dirname(_0x16bda5);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0xfffab5,_0xc879da,_0x52c806,_0x4f7abc){const _0x1f81cb=a32_0x456fd5;for(let _0x37081b=0x0;_0x37081b<DELETE_SETTLE_RETRY_COUNT;_0x37081b+=0x1){const _0x515bbb=await readBffLockFile(_0xfffab5),_0xe06d6=!!_0x515bbb?.[_0x1f81cb(0x1fa)]?.[_0xc879da]?.[_0x1f81cb(0x1fb)]?.[_0x52c806],_0x2f13fe=await fileExists(_0x4f7abc);if(!_0xe06d6&&!_0x2f13fe)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x1f81cb(0x1f3)+_0x52c806+'.');}
@@ -1 +1 @@
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
+ const a33_0xb4ca50=a33_0x4ba4;(function(_0x396bc4,_0x1cfadf){const _0xb502c4=a33_0x4ba4,_0x45fb86=_0x396bc4();while(!![]){try{const _0x3f8ceb=-parseInt(_0xb502c4(0xcd))/0x1*(parseInt(_0xb502c4(0xc6))/0x2)+parseInt(_0xb502c4(0xc0))/0x3*(parseInt(_0xb502c4(0xc9))/0x4)+parseInt(_0xb502c4(0xcc))/0x5*(-parseInt(_0xb502c4(0xbf))/0x6)+-parseInt(_0xb502c4(0xce))/0x7+-parseInt(_0xb502c4(0xbd))/0x8+parseInt(_0xb502c4(0xca))/0x9*(parseInt(_0xb502c4(0xc1))/0xa)+-parseInt(_0xb502c4(0xbe))/0xb*(-parseInt(_0xb502c4(0xd3))/0xc);if(_0x3f8ceb===_0x1cfadf)break;else _0x45fb86['push'](_0x45fb86['shift']());}catch(_0x4e4b20){_0x45fb86['push'](_0x45fb86['shift']());}}}(a33_0x2637,0x82cf1));function a33_0x4ba4(_0x302253,_0x52f2cf){_0x302253=_0x302253-0xbb;const _0x263707=a33_0x2637();let _0x4ba42d=_0x263707[_0x302253];return _0x4ba42d;}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a33_0xb4ca50(0xc7),'command':'detail','description':a33_0xb4ca50(0xd2),'risk':a33_0xb4ca50(0xc5),'flags':[{'name':'id','type':a33_0xb4ca50(0xbc),'required':!![],'description':a33_0xb4ca50(0xc3)},{'name':a33_0xb4ca50(0xd0),'type':'boolean','description':a33_0xb4ca50(0xc8)}],async 'execute'(_0x354453){const _0x29c48c=a33_0xb4ca50,_0x388f61=await getBffScriptInfo(_0x354453['num']('id')),_0x508f2f=_0x354453[_0x29c48c(0xd1)](_0x29c48c(0xd0));if(_0x508f2f)return{'ok':!![],'data':_0x388f61};return{'ok':!![],'data':{'id':_0x388f61['id'],'appCode':_0x388f61[_0x29c48c(0xcb)],'scriptType':_0x388f61[_0x29c48c(0xbb)],'description':_0x388f61[_0x29c48c(0xcf)]||'(none)','createdTime':_0x388f61['createdTime']??'','updatedTime':_0x388f61[_0x29c48c(0xc2)]??'','scriptContent':_0x388f61[_0x29c48c(0xc4)]??''}};}};function a33_0x2637(){const _0x56044a=['2OBiyQU','bff','Return\x20full\x20raw\x20script\x20object','270892eaaYtt','9FctPcf','appCode','4981715ZIQAEd','725565LPUZEE','7050610cJWhHz','description','verbose','bool','Get\x20BFF\x20script\x20details\x20by\x20ID','4077036fCGuPG','scriptType','number','6783400hKtLzy','99yILDGY','6KVWtGJ','3MNvyId','9873560oMOAAx','updatedTime','Script\x20ID','scriptContent','read'];a33_0x2637=function(){return _0x56044a;};return a33_0x2637();}
@@ -1 +1 @@
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];
1
+ (function(_0x3b58ad,_0x136d8e){const _0x3a1ce6=a34_0x5d4c,_0x29e31e=_0x3b58ad();while(!![]){try{const _0x3a3b4b=-parseInt(_0x3a1ce6(0x9c))/0x1*(-parseInt(_0x3a1ce6(0x9b))/0x2)+-parseInt(_0x3a1ce6(0x9a))/0x3*(parseInt(_0x3a1ce6(0x96))/0x4)+parseInt(_0x3a1ce6(0x9e))/0x5*(-parseInt(_0x3a1ce6(0x99))/0x6)+-parseInt(_0x3a1ce6(0xa0))/0x7+parseInt(_0x3a1ce6(0x9f))/0x8*(parseInt(_0x3a1ce6(0x9d))/0x9)+-parseInt(_0x3a1ce6(0x97))/0xa*(-parseInt(_0x3a1ce6(0x95))/0xb)+parseInt(_0x3a1ce6(0x98))/0xc;if(_0x3a3b4b===_0x136d8e)break;else _0x29e31e['push'](_0x29e31e['shift']());}catch(_0x5610b8){_0x29e31e['push'](_0x29e31e['shift']());}}}(a34_0x1d2f,0x96fb6));function a34_0x1d2f(){const _0x5aedca=['11501964PofydW','1040880HSTANu','3LOxuTr','18916WBLlbO','115htzuVg','27AvsDDS','35ULxDXM','1873576fXfwsy','885367oyExfb','522742Tshzzv','3348068vYnzlf','10XZVxgq'];a34_0x1d2f=function(){return _0x5aedca;};return a34_0x1d2f();}import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';function a34_0x5d4c(_0x25afb0,_0x4d566d){_0x25afb0=_0x25afb0-0x95;const _0x1d2fb9=a34_0x1d2f();let _0x5d4c09=_0x1d2fb9[_0x25afb0];return _0x5d4c09;}import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
@@ -1 +1 @@
1
- const a35_0x4822ed=a35_0x3e5d;(function(_0x2cd46d,_0xaaa49c){const _0x24b435=a35_0x3e5d,_0x4f8ea5=_0x2cd46d();while(!![]){try{const _0x3f0875=parseInt(_0x24b435(0xb8))/0x1*(-parseInt(_0x24b435(0xc6))/0x2)+-parseInt(_0x24b435(0xcd))/0x3+parseInt(_0x24b435(0xd3))/0x4+parseInt(_0x24b435(0xd2))/0x5*(parseInt(_0x24b435(0xbe))/0x6)+-parseInt(_0x24b435(0xcf))/0x7+-parseInt(_0x24b435(0xc0))/0x8+-parseInt(_0x24b435(0xc2))/0x9*(-parseInt(_0x24b435(0xc8))/0xa);if(_0x3f0875===_0xaaa49c)break;else _0x4f8ea5['push'](_0x4f8ea5['shift']());}catch(_0x200c3f){_0x4f8ea5['push'](_0x4f8ea5['shift']());}}}(a35_0x1057,0x21795));function a35_0x3e5d(_0x15a314,_0x4f0e39){_0x15a314=_0x15a314-0xb8;const _0x105749=a35_0x1057();let _0x3e5d41=_0x105749[_0x15a314];return _0x3e5d41;}import{listBffScripts}from'../../core/api-client.js';function a35_0x1057(){const _0x1eba7d=['description','118945uNMwMw','396712BfVBjr','17rqQKUl','boolean','list','functionName','Script\x20type\x20filter','type','6vSFsMn','length','2164672OJIZHv','No\x20BFF\x20scripts\x20found.','6705wSGrMk','ENDPOINT','(unnamed)','str','21914jzuALI','string','8960usKAKn','bff','Return\x20full\x20script\x20objects','verbose','scriptType','189012huDCAR','name','934647lJulRb','appCode'];a35_0x1057=function(){return _0x1eba7d;};return a35_0x1057();}export const bffList={'service':a35_0x4822ed(0xc9),'command':a35_0x4822ed(0xba),'description':'List\x20BFF\x20scripts','risk':'read','flags':[{'name':a35_0x4822ed(0xbd),'type':a35_0x4822ed(0xc7),'description':a35_0x4822ed(0xbc),'default':a35_0x4822ed(0xc3),'enum':[a35_0x4822ed(0xc3),'COMMON']},{'name':a35_0x4822ed(0xce),'type':a35_0x4822ed(0xc7),'description':'Filter\x20by\x20script\x20name'},{'name':a35_0x4822ed(0xcb),'type':a35_0x4822ed(0xb9),'description':a35_0x4822ed(0xca)}],async 'execute'(_0x2804a8){const _0x27f7f0=a35_0x4822ed,_0xe93c56=await listBffScripts(_0x2804a8[_0x27f7f0(0xd0)],_0x2804a8['str'](_0x27f7f0(0xbd)),{'scriptName':_0x2804a8[_0x27f7f0(0xc5)]('name')||undefined}),_0x25b003=_0x2804a8['bool'](_0x27f7f0(0xcb));return{'ok':!![],'data':_0x25b003?_0xe93c56:_0xe93c56['map'](_0x266c33=>({'id':_0x266c33['id'],'functionName':_0x266c33[_0x27f7f0(0xbb)]??'','description':_0x266c33[_0x27f7f0(0xd1)]||_0x27f7f0(0xc4),'scriptType':_0x266c33[_0x27f7f0(0xcc)]})),'message':_0xe93c56[_0x27f7f0(0xbf)]===0x0?_0x27f7f0(0xc1):undefined};}};
1
+ const a35_0x2a97d1=a35_0x52a1;(function(_0x50ffe6,_0x5a2e86){const _0x586489=a35_0x52a1,_0x2063e2=_0x50ffe6();while(!![]){try{const _0x2d7d12=parseInt(_0x586489(0x85))/0x1+-parseInt(_0x586489(0x8d))/0x2+-parseInt(_0x586489(0x7f))/0x3+parseInt(_0x586489(0x91))/0x4*(parseInt(_0x586489(0x95))/0x5)+parseInt(_0x586489(0x82))/0x6*(-parseInt(_0x586489(0x90))/0x7)+-parseInt(_0x586489(0x8c))/0x8*(parseInt(_0x586489(0x83))/0x9)+parseInt(_0x586489(0x96))/0xa;if(_0x2d7d12===_0x5a2e86)break;else _0x2063e2['push'](_0x2063e2['shift']());}catch(_0x23a91b){_0x2063e2['push'](_0x2063e2['shift']());}}}(a35_0x8cf5,0x8f7e8));function a35_0x8cf5(){const _0xf0ddb8=['Filter\x20by\x20script\x20name','40nMntbv','1086834yNVsgf','verbose','str','448czfUww','4324AIEHUB','name','type','COMMON','885YShpsw','14453130SoQgql','List\x20BFF\x20scripts','ENDPOINT','list','1292844bmWeQR','bff','boolean','69870EracyL','526293ZJZEZj','(unnamed)','963132lYTYzt','Script\x20type\x20filter','appCode','No\x20BFF\x20scripts\x20found.','description','string'];a35_0x8cf5=function(){return _0xf0ddb8;};return a35_0x8cf5();}import{listBffScripts}from'../../core/api-client.js';function a35_0x52a1(_0x177d59,_0x1f4e98){_0x177d59=_0x177d59-0x7e;const _0x8cf5ee=a35_0x8cf5();let _0x52a1fd=_0x8cf5ee[_0x177d59];return _0x52a1fd;}export const bffList={'service':a35_0x2a97d1(0x80),'command':a35_0x2a97d1(0x7e),'description':a35_0x2a97d1(0x97),'risk':'read','flags':[{'name':'type','type':a35_0x2a97d1(0x8a),'description':a35_0x2a97d1(0x86),'default':a35_0x2a97d1(0x98),'enum':[a35_0x2a97d1(0x98),a35_0x2a97d1(0x94)]},{'name':a35_0x2a97d1(0x92),'type':a35_0x2a97d1(0x8a),'description':a35_0x2a97d1(0x8b)},{'name':a35_0x2a97d1(0x8e),'type':a35_0x2a97d1(0x81),'description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x188075){const _0x419795=a35_0x2a97d1,_0x4ad4c9=await listBffScripts(_0x188075[_0x419795(0x87)],_0x188075[_0x419795(0x8f)](_0x419795(0x93)),{'scriptName':_0x188075[_0x419795(0x8f)](_0x419795(0x92))||undefined}),_0x2e7e3a=_0x188075['bool'](_0x419795(0x8e));return{'ok':!![],'data':_0x2e7e3a?_0x4ad4c9:_0x4ad4c9['map'](_0x5cae48=>({'id':_0x5cae48['id'],'functionName':_0x5cae48['functionName']??'','description':_0x5cae48[_0x419795(0x89)]||_0x419795(0x84),'scriptType':_0x5cae48['scriptType']})),'message':_0x4ad4c9['length']===0x0?_0x419795(0x88):undefined};}};