@lovrabet/rabetbase-cli 2.2.5-beta.2 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) 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/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -0
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/flags.js +1 -1
  48. package/lib/commands/common/validate.js +1 -1
  49. package/lib/commands/config/get.js +1 -1
  50. package/lib/commands/config/index.js +1 -1
  51. package/lib/commands/config/list.js +1 -1
  52. package/lib/commands/config/set.js +1 -1
  53. package/lib/commands/config/shared.js +1 -1
  54. package/lib/commands/data/filter.js +1 -1
  55. package/lib/commands/data/getOne.js +1 -1
  56. package/lib/commands/data/index.js +1 -1
  57. package/lib/commands/data/shared.js +1 -1
  58. package/lib/commands/dataset/business-group-update.js +1 -1
  59. package/lib/commands/dataset/capability.js +1 -1
  60. package/lib/commands/dataset/delete.js +1 -1
  61. package/lib/commands/dataset/detail.js +1 -1
  62. package/lib/commands/dataset/extend-update.js +1 -1
  63. package/lib/commands/dataset/field-update.js +1 -1
  64. package/lib/commands/dataset/index.js +1 -1
  65. package/lib/commands/dataset/list.js +1 -1
  66. package/lib/commands/dataset/operations.js +1 -1
  67. package/lib/commands/dataset/relation-create.js +1 -1
  68. package/lib/commands/dataset/relation-delete.js +1 -1
  69. package/lib/commands/dataset/relation-shared.js +1 -1
  70. package/lib/commands/dataset/relation-update.js +1 -1
  71. package/lib/commands/dataset/relations.js +1 -1
  72. package/lib/commands/dataset/rename.js +1 -1
  73. package/lib/commands/dataset/restore.js +1 -1
  74. package/lib/commands/db/analyze-cancel.js +1 -1
  75. package/lib/commands/db/analyze-start.js +1 -1
  76. package/lib/commands/db/analyze-status.js +1 -1
  77. package/lib/commands/db/create.js +1 -1
  78. package/lib/commands/db/delete.js +1 -1
  79. package/lib/commands/db/detail.js +1 -1
  80. package/lib/commands/db/diff.js +1 -1
  81. package/lib/commands/db/index.js +1 -1
  82. package/lib/commands/db/list.js +1 -1
  83. package/lib/commands/db/shared.js +1 -1
  84. package/lib/commands/db/tables.js +1 -1
  85. package/lib/commands/db/test.js +1 -1
  86. package/lib/commands/db/update.js +1 -1
  87. package/lib/commands/doctor.js +1 -1
  88. package/lib/commands/init/index.js +1 -1
  89. package/lib/commands/issue/index.js +1 -1
  90. package/lib/commands/issue/nudge.js +1 -1
  91. package/lib/commands/issue/report.js +1 -1
  92. package/lib/commands/issue/shared.js +1 -1
  93. package/lib/commands/logs/index.js +1 -1
  94. package/lib/commands/menu/index.js +1 -1
  95. package/lib/commands/menu/list.js +1 -1
  96. package/lib/commands/menu/shared/compare-table.js +1 -1
  97. package/lib/commands/menu/shared/index.js +1 -1
  98. package/lib/commands/menu/shared/inquirer.js +1 -1
  99. package/lib/commands/menu/shared/local-pages.js +1 -1
  100. package/lib/commands/menu/shared/logic.js +1 -1
  101. package/lib/commands/menu/shared/service.js +1 -1
  102. package/lib/commands/menu/shared/sync-core.js +1 -1
  103. package/lib/commands/menu/shared/update-core.js +1 -1
  104. package/lib/commands/menu/shared/valid-url.js +1 -1
  105. package/lib/commands/menu/sync.js +1 -1
  106. package/lib/commands/menu/update.js +1 -1
  107. package/lib/commands/page/generate-start.js +1 -1
  108. package/lib/commands/page/generate-status.js +1 -1
  109. package/lib/commands/page/index.js +1 -1
  110. package/lib/commands/page/pull.js +1 -1
  111. package/lib/commands/page/push.js +1 -1
  112. package/lib/commands/page/relation-audit.js +1 -1
  113. package/lib/commands/page/shared.js +1 -1
  114. package/lib/commands/page/standard-page-status.js +1 -1
  115. package/lib/commands/page/sync.js +1 -1
  116. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  117. package/lib/commands/project/create/format-elapsed.js +1 -1
  118. package/lib/commands/project/create/main.js +1 -1
  119. package/lib/commands/project/create/non-interactive.js +1 -1
  120. package/lib/commands/project/create/project-template-path.js +1 -1
  121. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  122. package/lib/commands/project/create/use-format-code.js +1 -1
  123. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  124. package/lib/commands/project/index.js +1 -1
  125. package/lib/commands/project/init.js +1 -1
  126. package/lib/commands/project/upgrade.js +1 -1
  127. package/lib/commands/registry.js +1 -1
  128. package/lib/commands/run/index.js +1 -1
  129. package/lib/commands/schema.js +1 -1
  130. package/lib/commands/sql/create.js +1 -1
  131. package/lib/commands/sql/delete.js +1 -1
  132. package/lib/commands/sql/detail.js +1 -1
  133. package/lib/commands/sql/exec.js +1 -1
  134. package/lib/commands/sql/index.js +1 -1
  135. package/lib/commands/sql/list.js +1 -1
  136. package/lib/commands/sql/pull.js +1 -1
  137. package/lib/commands/sql/push.js +1 -1
  138. package/lib/commands/sql/save.js +1 -1
  139. package/lib/commands/sql/shared.js +1 -1
  140. package/lib/commands/sql/status.js +1 -1
  141. package/lib/commands/sql/validate.js +1 -1
  142. package/lib/commands/workspace/index.js +1 -1
  143. package/lib/config/schema.js +1 -1
  144. package/lib/constant/cdn.js +1 -1
  145. package/lib/constant/cli.js +1 -1
  146. package/lib/constant/defaults.js +1 -1
  147. package/lib/constant/domain.js +1 -1
  148. package/lib/constant/env.js +1 -1
  149. package/lib/constant/output.js +1 -1
  150. package/lib/constant/paths.js +1 -1
  151. package/lib/constant/risk.js +1 -1
  152. package/lib/context/app-resolver.js +1 -1
  153. package/lib/context/auth-resolver.js +1 -1
  154. package/lib/context/config-loader.js +1 -1
  155. package/lib/context.js +1 -1
  156. package/lib/core/alias-resolver.js +1 -1
  157. package/lib/core/api-client.js +1 -1
  158. package/lib/core/bff/config.js +1 -1
  159. package/lib/core/bff/file-system.js +1 -1
  160. package/lib/core/bff/hash.js +1 -1
  161. package/lib/core/bff/lock.js +1 -1
  162. package/lib/core/bff/utils.js +1 -1
  163. package/lib/core/db-resolver.js +1 -1
  164. package/lib/core/page/file-system.js +1 -1
  165. package/lib/core/page/hash.js +1 -1
  166. package/lib/core/page/lock.js +1 -1
  167. package/lib/core/sql-sync/config.js +1 -1
  168. package/lib/core/sql-sync/file-system.js +1 -1
  169. package/lib/core/sql-sync/hash.js +1 -1
  170. package/lib/core/sql-sync/lock.js +1 -1
  171. package/lib/core/sql-sync/utils.js +1 -1
  172. package/lib/core/sql-validator.js +1 -1
  173. package/lib/errors.js +1 -1
  174. package/lib/framework/build-all-flags.js +1 -1
  175. package/lib/framework/flags.js +1 -1
  176. package/lib/framework/help.js +1 -1
  177. package/lib/framework/index.js +1 -1
  178. package/lib/framework/output.js +1 -1
  179. package/lib/framework/response.js +1 -1
  180. package/lib/framework/runner-alias.js +1 -1
  181. package/lib/framework/runner.js +1 -1
  182. package/lib/framework/schema-export.js +1 -1
  183. package/lib/framework/types.js +1 -1
  184. package/lib/generated/build-info.js +1 -1
  185. package/lib/help.js +1 -1
  186. package/lib/skills/main.js +1 -1
  187. package/lib/skills/npx-skills-add.js +1 -1
  188. package/lib/telemetry/cli-command-trace.js +1 -1
  189. package/lib/telemetry/cli-help-trace.js +1 -1
  190. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  191. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  192. package/lib/telemetry/send-cli-trace-log.js +1 -1
  193. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  194. package/lib/utils/ai_config.js +1 -1
  195. package/lib/utils/apply-jq-filter.js +1 -1
  196. package/lib/utils/cdn-config.js +1 -1
  197. package/lib/utils/check-sdk-version.js +1 -1
  198. package/lib/utils/cli-version-check.js +1 -1
  199. package/lib/utils/cli-version-policy.js +1 -1
  200. package/lib/utils/config.js +1 -1
  201. package/lib/utils/copy-directory.js +1 -1
  202. package/lib/utils/entity-with-id.js +1 -1
  203. package/lib/utils/file-utils.js +1 -1
  204. package/lib/utils/guides-cdn.js +1 -1
  205. package/lib/utils/http-client.js +1 -1
  206. package/lib/utils/is-non-interactive.js +1 -1
  207. package/lib/utils/logger.js +1 -1
  208. package/lib/utils/params.js +1 -1
  209. package/lib/utils/platform.js +1 -1
  210. package/lib/utils/rules-cdn.js +1 -1
  211. package/lib/utils/sleep.js +1 -1
  212. package/lib/utils/template-replacer.js +1 -1
  213. package/lib/utils/update-notice.js +1 -1
  214. package/lib/utils/version.js +1 -1
  215. package/lib/utils/with-active-cookie.js +1 -1
  216. package/lib/utils/write-cli-side-channel.js +1 -1
  217. package/package.json +1 -1
  218. package/lib/commands/skill/index.js +0 -1
@@ -1 +1 @@
1
- const a33_0x192538=a33_0x9b7c;(function(_0x5d1468,_0x22f703){const _0xed277c=a33_0x9b7c,_0x45f4a3=_0x5d1468();while(!![]){try{const _0x4b871d=-parseInt(_0xed277c(0x190))/0x1*(-parseInt(_0xed277c(0x18e))/0x2)+parseInt(_0xed277c(0x171))/0x3*(-parseInt(_0xed277c(0x18a))/0x4)+parseInt(_0xed277c(0x184))/0x5+-parseInt(_0xed277c(0x188))/0x6*(parseInt(_0xed277c(0x186))/0x7)+parseInt(_0xed277c(0x173))/0x8+parseInt(_0xed277c(0x172))/0x9+-parseInt(_0xed277c(0x196))/0xa;if(_0x4b871d===_0x22f703)break;else _0x45f4a3['push'](_0x45f4a3['shift']());}catch(_0x4ee5a4){_0x45f4a3['push'](_0x45f4a3['shift']());}}}(a33_0x1834,0x821e5));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a33_0x9b7c(_0x411e1b,_0x2e2c90){_0x411e1b=_0x411e1b-0x16f;const _0x1834cc=a33_0x1834();let _0x9b7cbd=_0x1834cc[_0x411e1b];return _0x9b7cbd;}import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';function a33_0x1834(){const _0x203d7d=['Deleted\x20','delete','lastSync','map','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','appCode','validation','<timestamp>','projectRoot','1660491YAVABw','6591159zkZFeo','5915712zdrJYW','trashedTo','Function\x20not\x20found:\x20','filter','Multiple\x20functions\x20match\x20\x22','remoteId','parse','lockFilePath','length','high-risk-write','trashDir','BFF\x20lock\x20file\x20not\x20found.','str','toISOString','/api/management/library/scripts/delete','POST','keys','3268510BqgHkv','stringify','91280CQXTaB','scriptsRoot','342xgudFF','\x20(local\x20file\x20moved\x20to\x20trash)','4wLtpav','includes','No\x20lock\x20entry\x20found\x20for\x20\x22','bff','4nqjAZD','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','482434EeGuJL','Would\x20delete\x20','functions','startsWith','string','scriptsRootDir','12606430FYZgfk','target'];a33_0x1834=function(){return _0x203d7d;};return a33_0x1834();}export const bffDelete={'service':a33_0x192538(0x18d),'command':a33_0x192538(0x199),'description':a33_0x192538(0x19c),'risk':a33_0x192538(0x17c),'flags':[{'name':a33_0x192538(0x197),'type':a33_0x192538(0x194),'required':!![],'description':a33_0x192538(0x18f)}],async 'validate'(_0x2d5258){const _0x1f5573=a33_0x192538,_0x135744=loadBffProjectConfig(_0x2d5258['appCode']),_0x32cb40=await readBffLockFile(_0x135744[_0x1f5573(0x17a)]);if(!_0x32cb40)throw CliErrors[_0x1f5573(0x19e)]('BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.');},async 'dryRun'(_0x1cea8d){const _0x5f032f=a33_0x192538,_0x2f46ef=loadBffProjectConfig(_0x1cea8d[_0x5f032f(0x19d)]),_0x1efcae=await readBffLockFile(_0x2f46ef['lockFilePath']);if(!_0x1efcae)throw CliErrors[_0x5f032f(0x19e)](_0x5f032f(0x17e));const {appLock:_0x5755dd}=ensureLockScope(_0x1efcae,_0x1cea8d[_0x5f032f(0x19d)],_0x2f46ef[_0x5f032f(0x187)],_0x5f032f(0x199)),_0x20b1f2=_0x1cea8d[_0x5f032f(0x17f)](_0x5f032f(0x197)),_0x4c3bf3=Object[_0x5f032f(0x183)](_0x5755dd[_0x5f032f(0x192)]),_0x544d6b=resolveDeleteTarget(_0x20b1f2,_0x4c3bf3),_0x4277c6=_0x5755dd[_0x5f032f(0x192)][_0x544d6b];if(!_0x4277c6)throw CliErrors[_0x5f032f(0x19e)](_0x5f032f(0x18c)+_0x544d6b+'\x22.');const _0x30b80d=resolveLocalFilePathFromLockKey(_0x2f46ef,_0x544d6b),_0x285c92=relative(_0x2f46ef[_0x5f032f(0x170)],_0x30b80d),_0xa98646=join(_0x2f46ef[_0x5f032f(0x17d)],_0x5f032f(0x16f),_0x285c92);return{'method':_0x5f032f(0x182),'url':_0x5f032f(0x181),'body':{'appCode':_0x1cea8d[_0x5f032f(0x19d)],'target':_0x544d6b,'remoteId':_0x4277c6[_0x5f032f(0x178)],'localFilePath':_0x30b80d,'trashedPath':_0xa98646},'description':_0x5f032f(0x191)+_0x544d6b+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x11add4){const _0x1d49c6=a33_0x192538,_0x6c0ba9=loadBffProjectConfig(_0x11add4[_0x1d49c6(0x19d)]),_0x5c11bc=await readBffLockFile(_0x6c0ba9['lockFilePath']);if(!_0x5c11bc)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x34eb87,appLock:_0x3b64fb}=ensureLockScope(_0x5c11bc,_0x11add4['appCode'],_0x6c0ba9['scriptsRoot'],_0x1d49c6(0x199)),_0x20f24a=JSON[_0x1d49c6(0x179)](JSON[_0x1d49c6(0x185)](_0x34eb87)),_0x16f3ab=_0x20f24a['apps'][_0x11add4['appCode']];if(!_0x16f3ab)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x11add4[_0x1d49c6(0x19d)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x4ae5ed=_0x11add4['str'](_0x1d49c6(0x197)),_0x433d00=Object['keys'](_0x16f3ab['functions']),_0xa30507=resolveDeleteTarget(_0x4ae5ed,_0x433d00),_0x456e04=_0x16f3ab[_0x1d49c6(0x192)][_0xa30507];if(!_0x456e04)throw CliErrors[_0x1d49c6(0x19e)](_0x1d49c6(0x18c)+_0xa30507+'\x22.');await deleteBffScript(_0x456e04[_0x1d49c6(0x178)]),delete _0x16f3ab[_0x1d49c6(0x192)][_0xa30507],_0x16f3ab[_0x1d49c6(0x19a)]=new Date()[_0x1d49c6(0x180)](),await writeBffLockFile(_0x6c0ba9[_0x1d49c6(0x17a)],_0x20f24a);const _0x4cb097=resolveLocalFilePathFromLockKey(_0x6c0ba9,_0xa30507);let _0x35cac3;await fileExists(_0x4cb097)&&(_0x35cac3=await moveToTrash(_0x6c0ba9[_0x1d49c6(0x170)],_0x6c0ba9[_0x1d49c6(0x17d)],_0x4cb097),await cleanupEmptyDirectories(dirname(_0x4cb097),_0x6c0ba9[_0x1d49c6(0x195)]));await waitForDeleteSettlement(_0x6c0ba9['lockFilePath'],_0x11add4[_0x1d49c6(0x19d)],_0xa30507,_0x4cb097),await sleep(0x96);const _0x2c951e={'deleted':_0xa30507,'remoteId':_0x456e04[_0x1d49c6(0x178)]};if(_0x35cac3)_0x2c951e[_0x1d49c6(0x174)]=_0x35cac3;return{'ok':!![],'data':_0x2c951e,'message':_0x1d49c6(0x198)+_0xa30507+(_0x35cac3?_0x1d49c6(0x189):'')};}};function resolveDeleteTarget(_0x3779ca,_0x20e6dc){const _0x139b34=a33_0x192538;if(_0x3779ca[_0x139b34(0x18b)]('/')){const _0x485cc8=_0x20e6dc['find'](_0x16b591=>_0x16b591===_0x3779ca);if(!_0x485cc8)throw CliErrors[_0x139b34(0x19e)](_0x139b34(0x175)+_0x3779ca);return _0x485cc8;}const _0x2a831f=_0x20e6dc[_0x139b34(0x176)](_0x416b93=>_0x416b93['split']('/')['at'](-0x1)===_0x3779ca);if(_0x2a831f[_0x139b34(0x17b)]===0x0)throw CliErrors[_0x139b34(0x19e)]('Function\x20not\x20found:\x20'+_0x3779ca);if(_0x2a831f[_0x139b34(0x17b)]>0x1)throw CliErrors['validation'](_0x139b34(0x177)+_0x3779ca+'\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a'+_0x2a831f[_0x139b34(0x19b)](_0x480f2a=>'\x20\x20-\x20'+_0x480f2a)['join']('\x0a'));return _0x2a831f[0x0];}async function moveToTrash(_0x2af1b7,_0x93a254,_0x1e90bf){const _0x33850b=a33_0x192538,_0x2e1339=new Date()[_0x33850b(0x180)]()['replace'](/[:.]/g,'-'),_0x45821e=relative(_0x2af1b7,_0x1e90bf),_0x34f7d8=join(_0x93a254,_0x2e1339,_0x45821e);return await mkdir(dirname(_0x34f7d8),{'recursive':!![]}),await rename(_0x1e90bf,_0x34f7d8),_0x34f7d8;}async function cleanupEmptyDirectories(_0x4084fc,_0x2b472b){const _0x2e0385=a33_0x192538;let _0x445929=resolve(_0x4084fc);const _0x506771=resolve(_0x2b472b);while(_0x445929[_0x2e0385(0x193)](''+_0x506771+sep)||_0x445929===_0x506771){if(_0x445929===_0x506771)return;try{const _0x3d4e9a=await readdir(_0x445929);if(_0x3d4e9a[_0x2e0385(0x17b)]>0x0)return;await rmdir(_0x445929);}catch{return;}_0x445929=dirname(_0x445929);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x403618,_0x9fe4cc,_0x4fd23c,_0x56db6e){const _0x1d0cfe=a33_0x192538;for(let _0xddbf82=0x0;_0xddbf82<DELETE_SETTLE_RETRY_COUNT;_0xddbf82+=0x1){const _0x467374=await readBffLockFile(_0x403618),_0x30f01e=!!_0x467374?.['apps']?.[_0x9fe4cc]?.[_0x1d0cfe(0x192)]?.[_0x4fd23c],_0x17aa74=await fileExists(_0x56db6e);if(!_0x30f01e&&!_0x17aa74)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error('Local\x20delete\x20not\x20settled\x20for\x20'+_0x4fd23c+'.');}
1
+ const a33_0x5e88e5=a33_0x30c6;(function(_0x2e3d6b,_0x2fa1b1){const _0x1bdfd2=a33_0x30c6,_0x56cb2d=_0x2e3d6b();while(!![]){try{const _0x3b8ce4=-parseInt(_0x1bdfd2(0xb1))/0x1*(parseInt(_0x1bdfd2(0xab))/0x2)+parseInt(_0x1bdfd2(0xbd))/0x3+parseInt(_0x1bdfd2(0xa8))/0x4+-parseInt(_0x1bdfd2(0xaa))/0x5+parseInt(_0x1bdfd2(0xb7))/0x6+parseInt(_0x1bdfd2(0xb5))/0x7*(-parseInt(_0x1bdfd2(0xb2))/0x8)+parseInt(_0x1bdfd2(0xa0))/0x9*(parseInt(_0x1bdfd2(0xb4))/0xa);if(_0x3b8ce4===_0x2fa1b1)break;else _0x56cb2d['push'](_0x56cb2d['shift']());}catch(_0x57ec1e){_0x56cb2d['push'](_0x56cb2d['shift']());}}}(a33_0x2765,0x70c26));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';function a33_0x2765(){const _0x18a141=['includes','validation','parse','1178568teEDyh','lockFilePath','appCode','projectRoot','string','<timestamp>','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','POST','join','toISOString','Deleted\x20','str','lastSync','keys','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','scriptsRoot','Multiple\x20functions\x20match\x20\x22','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','map','filter','find','length','functions','315fhJECG','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','trashDir','remoteId','startsWith','replace','Would\x20delete\x20','apps','599280izfvin','target','3005880eOTdDk','1811692rFMXzy','BFF\x20lock\x20file\x20not\x20found.','delete','/api/management/library/scripts/delete','bff','split','1zoTCIp','8cnKtFY','Local\x20delete\x20not\x20settled\x20for\x20','418510AbieCV','1878142JFlKLe','Function\x20not\x20found:\x20','1378374GxCHdk','No\x20lock\x20entry\x20found\x20for\x20\x22','scriptsRootDir'];a33_0x2765=function(){return _0x18a141;};return a33_0x2765();}import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';function a33_0x30c6(_0x2eb2e0,_0x4f908e){_0x2eb2e0=_0x2eb2e0-0x8b;const _0x276580=a33_0x2765();let _0x30c6a8=_0x276580[_0x2eb2e0];return _0x30c6a8;}import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a33_0x5e88e5(0xaf),'command':'delete','description':a33_0x5e88e5(0x97),'risk':'high-risk-write','flags':[{'name':a33_0x5e88e5(0xa9),'type':a33_0x5e88e5(0x8d),'required':!![],'description':a33_0x5e88e5(0xa1)}],async 'validate'(_0x7a74c6){const _0xd1dbb=a33_0x5e88e5,_0x400e4e=loadBffProjectConfig(_0x7a74c6['appCode']),_0x32cf9f=await readBffLockFile(_0x400e4e[_0xd1dbb(0xbe)]);if(!_0x32cf9f)throw CliErrors[_0xd1dbb(0xbb)](_0xd1dbb(0x9a));},async 'dryRun'(_0x5ed842){const _0x104cd9=a33_0x5e88e5,_0xbfd327=loadBffProjectConfig(_0x5ed842[_0x104cd9(0x8b)]),_0x36df57=await readBffLockFile(_0xbfd327[_0x104cd9(0xbe)]);if(!_0x36df57)throw CliErrors[_0x104cd9(0xbb)](_0x104cd9(0xac));const {appLock:_0x45dc22}=ensureLockScope(_0x36df57,_0x5ed842['appCode'],_0xbfd327['scriptsRoot'],_0x104cd9(0xad)),_0x2241ff=_0x5ed842['str'](_0x104cd9(0xa9)),_0x13cf88=Object[_0x104cd9(0x96)](_0x45dc22[_0x104cd9(0x9f)]),_0x14622a=resolveDeleteTarget(_0x2241ff,_0x13cf88),_0x46d955=_0x45dc22[_0x104cd9(0x9f)][_0x14622a];if(!_0x46d955)throw CliErrors[_0x104cd9(0xbb)](_0x104cd9(0xb8)+_0x14622a+'\x22.');const _0x3b1048=resolveLocalFilePathFromLockKey(_0xbfd327,_0x14622a),_0x58345a=relative(_0xbfd327[_0x104cd9(0x8c)],_0x3b1048),_0x28c14f=join(_0xbfd327[_0x104cd9(0xa2)],_0x104cd9(0x8e),_0x58345a);return{'method':_0x104cd9(0x90),'url':_0x104cd9(0xae),'body':{'appCode':_0x5ed842[_0x104cd9(0x8b)],'target':_0x14622a,'remoteId':_0x46d955['remoteId'],'localFilePath':_0x3b1048,'trashedPath':_0x28c14f},'description':_0x104cd9(0xa6)+_0x14622a+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash'};},async 'execute'(_0x131d2c){const _0x35920b=a33_0x5e88e5,_0x2feb46=loadBffProjectConfig(_0x131d2c[_0x35920b(0x8b)]),_0x56038f=await readBffLockFile(_0x2feb46[_0x35920b(0xbe)]);if(!_0x56038f)throw CliErrors['validation'](_0x35920b(0xac));const {lockData:_0x47078f,appLock:_0x5866c6}=ensureLockScope(_0x56038f,_0x131d2c['appCode'],_0x2feb46[_0x35920b(0x98)],_0x35920b(0xad)),_0x4e94cb=JSON[_0x35920b(0xbc)](JSON['stringify'](_0x47078f)),_0x3b72fa=_0x4e94cb[_0x35920b(0xa7)][_0x131d2c[_0x35920b(0x8b)]];if(!_0x3b72fa)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x131d2c[_0x35920b(0x8b)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x590636=_0x131d2c[_0x35920b(0x94)](_0x35920b(0xa9)),_0x228644=Object[_0x35920b(0x96)](_0x3b72fa[_0x35920b(0x9f)]),_0x30c67d=resolveDeleteTarget(_0x590636,_0x228644),_0x5185a=_0x3b72fa['functions'][_0x30c67d];if(!_0x5185a)throw CliErrors['validation']('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x30c67d+'\x22.');await deleteBffScript(_0x5185a[_0x35920b(0xa3)]),delete _0x3b72fa['functions'][_0x30c67d],_0x3b72fa[_0x35920b(0x95)]=new Date()[_0x35920b(0x92)](),await writeBffLockFile(_0x2feb46[_0x35920b(0xbe)],_0x4e94cb);const _0x6577d4=resolveLocalFilePathFromLockKey(_0x2feb46,_0x30c67d);let _0x5458ba;await fileExists(_0x6577d4)&&(_0x5458ba=await moveToTrash(_0x2feb46['projectRoot'],_0x2feb46[_0x35920b(0xa2)],_0x6577d4),await cleanupEmptyDirectories(dirname(_0x6577d4),_0x2feb46[_0x35920b(0xb9)]));await waitForDeleteSettlement(_0x2feb46[_0x35920b(0xbe)],_0x131d2c[_0x35920b(0x8b)],_0x30c67d,_0x6577d4),await sleep(0x96);const _0x3b03bd={'deleted':_0x30c67d,'remoteId':_0x5185a[_0x35920b(0xa3)]};if(_0x5458ba)_0x3b03bd['trashedTo']=_0x5458ba;return{'ok':!![],'data':_0x3b03bd,'message':_0x35920b(0x93)+_0x30c67d+(_0x5458ba?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function resolveDeleteTarget(_0x462255,_0x1c9bd4){const _0x3f1115=a33_0x5e88e5;if(_0x462255[_0x3f1115(0xba)]('/')){const _0x42ba35=_0x1c9bd4[_0x3f1115(0x9d)](_0x1923f7=>_0x1923f7===_0x462255);if(!_0x42ba35)throw CliErrors['validation'](_0x3f1115(0xb6)+_0x462255);return _0x42ba35;}const _0xc282=_0x1c9bd4[_0x3f1115(0x9c)](_0x877136=>_0x877136[_0x3f1115(0xb0)]('/')['at'](-0x1)===_0x462255);if(_0xc282[_0x3f1115(0x9e)]===0x0)throw CliErrors[_0x3f1115(0xbb)](_0x3f1115(0xb6)+_0x462255);if(_0xc282['length']>0x1)throw CliErrors['validation'](_0x3f1115(0x99)+_0x462255+_0x3f1115(0x8f)+_0xc282[_0x3f1115(0x9b)](_0x311d28=>'\x20\x20-\x20'+_0x311d28)[_0x3f1115(0x91)]('\x0a'));return _0xc282[0x0];}async function moveToTrash(_0x4c5927,_0x520b85,_0x201498){const _0x4c829b=a33_0x5e88e5,_0x188bc2=new Date()['toISOString']()[_0x4c829b(0xa5)](/[:.]/g,'-'),_0x8878b1=relative(_0x4c5927,_0x201498),_0x428adc=join(_0x520b85,_0x188bc2,_0x8878b1);return await mkdir(dirname(_0x428adc),{'recursive':!![]}),await rename(_0x201498,_0x428adc),_0x428adc;}async function cleanupEmptyDirectories(_0x31447e,_0x4b4561){const _0x534067=a33_0x5e88e5;let _0x103a36=resolve(_0x31447e);const _0x17e2b7=resolve(_0x4b4561);while(_0x103a36[_0x534067(0xa4)](''+_0x17e2b7+sep)||_0x103a36===_0x17e2b7){if(_0x103a36===_0x17e2b7)return;try{const _0x299e85=await readdir(_0x103a36);if(_0x299e85[_0x534067(0x9e)]>0x0)return;await rmdir(_0x103a36);}catch{return;}_0x103a36=dirname(_0x103a36);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x2c1b98,_0x1e7dea,_0x158164,_0x5bc50c){const _0x4c97c2=a33_0x5e88e5;for(let _0x339bd7=0x0;_0x339bd7<DELETE_SETTLE_RETRY_COUNT;_0x339bd7+=0x1){const _0x6711c4=await readBffLockFile(_0x2c1b98),_0x51be0e=!!_0x6711c4?.[_0x4c97c2(0xa7)]?.[_0x1e7dea]?.[_0x4c97c2(0x9f)]?.[_0x158164],_0x535193=await fileExists(_0x5bc50c);if(!_0x51be0e&&!_0x535193)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x4c97c2(0xb3)+_0x158164+'.');}
@@ -1 +1 @@
1
- function a34_0x27dc(_0x4f2d3a,_0x27e0c1){_0x4f2d3a=_0x4f2d3a-0x1ad;const _0x321b18=a34_0x321b();let _0x27dc46=_0x321b18[_0x4f2d3a];return _0x27dc46;}const a34_0x58821f=a34_0x27dc;(function(_0x20853b,_0x382dc3){const _0xcd8647=a34_0x27dc,_0x1cb533=_0x20853b();while(!![]){try{const _0x38805d=parseInt(_0xcd8647(0x1b4))/0x1+-parseInt(_0xcd8647(0x1b1))/0x2+-parseInt(_0xcd8647(0x1c1))/0x3*(-parseInt(_0xcd8647(0x1b7))/0x4)+parseInt(_0xcd8647(0x1b3))/0x5*(-parseInt(_0xcd8647(0x1ba))/0x6)+-parseInt(_0xcd8647(0x1b2))/0x7*(-parseInt(_0xcd8647(0x1be))/0x8)+parseInt(_0xcd8647(0x1ad))/0x9*(-parseInt(_0xcd8647(0x1c4))/0xa)+-parseInt(_0xcd8647(0x1c2))/0xb*(-parseInt(_0xcd8647(0x1b5))/0xc);if(_0x38805d===_0x382dc3)break;else _0x1cb533['push'](_0x1cb533['shift']());}catch(_0x6f7d16){_0x1cb533['push'](_0x1cb533['shift']());}}}(a34_0x321b,0x7b320));function a34_0x321b(){const _0x88b5ae=['createdTime','16770LicRRb','boolean','Return\x20full\x20raw\x20script\x20object','number','615464FjKkaX','scriptContent','scriptType','3xokqXV','842501avrDsd','bool','20780hdsNrb','description','3141QfNnfJ','verbose','bff','(none)','743394uZVZPP','7XUGmkX','95oRDsUK','46819CYSnRz','144aZgAtw','Script\x20ID','2447152VCLqpD','detail'];a34_0x321b=function(){return _0x88b5ae;};return a34_0x321b();}import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a34_0x58821f(0x1af),'command':a34_0x58821f(0x1b8),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':'read','flags':[{'name':'id','type':a34_0x58821f(0x1bd),'required':!![],'description':a34_0x58821f(0x1b6)},{'name':a34_0x58821f(0x1ae),'type':a34_0x58821f(0x1bb),'description':a34_0x58821f(0x1bc)}],async 'execute'(_0x401e95){const _0x1acfb6=a34_0x58821f,_0xce2959=await getBffScriptInfo(_0x401e95['num']('id')),_0x402bbd=_0x401e95[_0x1acfb6(0x1c3)](_0x1acfb6(0x1ae));if(_0x402bbd)return{'ok':!![],'data':_0xce2959};return{'ok':!![],'data':{'id':_0xce2959['id'],'appCode':_0xce2959['appCode'],'scriptType':_0xce2959[_0x1acfb6(0x1c0)],'description':_0xce2959[_0x1acfb6(0x1c5)]||_0x1acfb6(0x1b0),'createdTime':_0xce2959[_0x1acfb6(0x1b9)]??'','updatedTime':_0xce2959['updatedTime']??'','scriptContent':_0xce2959[_0x1acfb6(0x1bf)]??''}};}};
1
+ const a34_0x304bba=a34_0x1439;(function(_0x218664,_0x43df42){const _0x3920ba=a34_0x1439,_0x2d1350=_0x218664();while(!![]){try{const _0x4b9946=parseInt(_0x3920ba(0xcd))/0x1+-parseInt(_0x3920ba(0xcf))/0x2+parseInt(_0x3920ba(0xc1))/0x3*(-parseInt(_0x3920ba(0xbe))/0x4)+-parseInt(_0x3920ba(0xd1))/0x5*(-parseInt(_0x3920ba(0xd3))/0x6)+parseInt(_0x3920ba(0xd6))/0x7*(-parseInt(_0x3920ba(0xd7))/0x8)+parseInt(_0x3920ba(0xd4))/0x9+-parseInt(_0x3920ba(0xc5))/0xa*(-parseInt(_0x3920ba(0xd5))/0xb);if(_0x4b9946===_0x43df42)break;else _0x2d1350['push'](_0x2d1350['shift']());}catch(_0x14be30){_0x2d1350['push'](_0x2d1350['shift']());}}}(a34_0x1945,0x6fcbe));import{getBffScriptInfo}from'../../core/api-client.js';export const bffDetail={'service':a34_0x304bba(0xc9),'command':a34_0x304bba(0xcb),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a34_0x304bba(0xc4),'flags':[{'name':'id','type':a34_0x304bba(0xc0),'required':!![],'description':a34_0x304bba(0xc2)},{'name':a34_0x304bba(0xc7),'type':a34_0x304bba(0xcc),'description':a34_0x304bba(0xc6)}],async 'execute'(_0x19ee4b){const _0x56c6e8=a34_0x304bba,_0x19a1d6=await getBffScriptInfo(_0x19ee4b[_0x56c6e8(0xd0)]('id')),_0x2d59e3=_0x19ee4b[_0x56c6e8(0xbf)](_0x56c6e8(0xc7));if(_0x2d59e3)return{'ok':!![],'data':_0x19a1d6};return{'ok':!![],'data':{'id':_0x19a1d6['id'],'appCode':_0x19a1d6[_0x56c6e8(0xd2)],'scriptType':_0x19a1d6[_0x56c6e8(0xc8)],'description':_0x19a1d6[_0x56c6e8(0xca)]||_0x56c6e8(0xce),'createdTime':_0x19a1d6['createdTime']??'','updatedTime':_0x19a1d6[_0x56c6e8(0xc3)]??'','scriptContent':_0x19a1d6['scriptContent']??''}};}};function a34_0x1439(_0x225794,_0x51c112){_0x225794=_0x225794-0xbe;const _0x19452c=a34_0x1945();let _0x1439c6=_0x19452c[_0x225794];return _0x1439c6;}function a34_0x1945(){const _0x295553=['115jXasYW','appCode','215094fzoXdh','5908518iBZOwQ','77SWujBe','35hMfvUL','1114688RCzttb','35596CUOYET','bool','number','279OLxBls','Script\x20ID','updatedTime','read','1025840OXGjfk','Return\x20full\x20raw\x20script\x20object','verbose','scriptType','bff','description','detail','boolean','232710hgmAWQ','(none)','899244hmABkU','num'];a34_0x1945=function(){return _0x295553;};return a34_0x1945();}
@@ -1 +1 @@
1
- (function(_0x5d0b4d,_0x297e2b){const _0x2cb414=a35_0x40fd,_0x58947b=_0x5d0b4d();while(!![]){try{const _0x32dcb9=parseInt(_0x2cb414(0x180))/0x1*(parseInt(_0x2cb414(0x177))/0x2)+parseInt(_0x2cb414(0x17d))/0x3*(parseInt(_0x2cb414(0x17a))/0x4)+-parseInt(_0x2cb414(0x17c))/0x5*(-parseInt(_0x2cb414(0x178))/0x6)+parseInt(_0x2cb414(0x181))/0x7+-parseInt(_0x2cb414(0x17b))/0x8+parseInt(_0x2cb414(0x182))/0x9*(-parseInt(_0x2cb414(0x17f))/0xa)+parseInt(_0x2cb414(0x17e))/0xb*(-parseInt(_0x2cb414(0x179))/0xc);if(_0x32dcb9===_0x297e2b)break;else _0x58947b['push'](_0x58947b['shift']());}catch(_0x1b9fca){_0x58947b['push'](_0x58947b['shift']());}}}(a35_0x134a,0x3daa5));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 a35_0x40fd(_0x204351,_0x38895e){_0x204351=_0x204351-0x177;const _0x134a4a=a35_0x134a();let _0x40fd2b=_0x134a4a[_0x204351];return _0x40fd2b;}import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';function a35_0x134a(){const _0x408fba=['146946STcdHM','81372KyJore','7084XkmOSk','1563912krFAJn','85yhAWps','246tmNDpd','803TZZYij','107620dfldXK','3bWjKGI','768663ipKYJc','72ZGKkMI','238534jHDvOQ'];a35_0x134a=function(){return _0x408fba;};return a35_0x134a();}export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
1
+ (function(_0x416f64,_0x13aa8e){const _0xbf99=a35_0x3255,_0x760a45=_0x416f64();while(!![]){try{const _0x614253=parseInt(_0xbf99(0x19c))/0x1+-parseInt(_0xbf99(0x19d))/0x2*(-parseInt(_0xbf99(0x1a2))/0x3)+-parseInt(_0xbf99(0x1a3))/0x4*(parseInt(_0xbf99(0x19e))/0x5)+-parseInt(_0xbf99(0x1a1))/0x6+-parseInt(_0xbf99(0x19b))/0x7+parseInt(_0xbf99(0x19f))/0x8+parseInt(_0xbf99(0x1a0))/0x9;if(_0x614253===_0x13aa8e)break;else _0x760a45['push'](_0x760a45['shift']());}catch(_0x3a14f6){_0x760a45['push'](_0x760a45['shift']());}}}(a35_0x59f9,0xd7073));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';function a35_0x59f9(){const _0x55dd10=['8747742eCLwZQ','165786eSrgQW','8444wagrOV','6611801eYnNxX','1552477PxHmWJ','48KVIMSW','1035GJecTg','6010720oqSCmN','811143vBMSee'];a35_0x59f9=function(){return _0x55dd10;};return a35_0x59f9();}import{bffPush}from'../../commands/bff/push.js';function a35_0x3255(_0x5fb095,_0x40ad73){_0x5fb095=_0x5fb095-0x19b;const _0x59f9d5=a35_0x59f9();let _0x325507=_0x59f9d5[_0x5fb095];return _0x325507;}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 a36_0x56feb5=a36_0x164f;function a36_0x164f(_0x12c25b,_0x4c33e3){_0x12c25b=_0x12c25b-0x11d;const _0x244ce1=a36_0x244c();let _0x164f59=_0x244ce1[_0x12c25b];return _0x164f59;}(function(_0x441a36,_0x2970da){const _0xda1f91=a36_0x164f,_0x4dd600=_0x441a36();while(!![]){try{const _0x5eb186=-parseInt(_0xda1f91(0x12d))/0x1*(parseInt(_0xda1f91(0x121))/0x2)+parseInt(_0xda1f91(0x131))/0x3*(-parseInt(_0xda1f91(0x12a))/0x4)+parseInt(_0xda1f91(0x124))/0x5+-parseInt(_0xda1f91(0x130))/0x6*(parseInt(_0xda1f91(0x129))/0x7)+parseInt(_0xda1f91(0x125))/0x8*(-parseInt(_0xda1f91(0x12f))/0x9)+-parseInt(_0xda1f91(0x136))/0xa*(parseInt(_0xda1f91(0x120))/0xb)+parseInt(_0xda1f91(0x134))/0xc;if(_0x5eb186===_0x2970da)break;else _0x4dd600['push'](_0x4dd600['shift']());}catch(_0x507ef9){_0x4dd600['push'](_0x4dd600['shift']());}}}(a36_0x244c,0xf12f9));function a36_0x244c(){const _0x5c937e=['642696bcYBDx','ENDPOINT','bff','4XJeEhn','list','306648tuuzqs','6tdWbLT','6DrukKg','map','type','64254516WoeihS','name','10ZYmGqh','List\x20BFF\x20scripts','Filter\x20by\x20script\x20name','description','appCode','No\x20BFF\x20scripts\x20found.','str','length','7573379MSJhVY','902498tFRWCT','string','Script\x20type\x20filter','338420GtKhbu','184NCsWxa','(unnamed)','verbose','bool','5850887shkOot'];a36_0x244c=function(){return _0x5c937e;};return a36_0x244c();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a36_0x56feb5(0x12c),'command':a36_0x56feb5(0x12e),'description':a36_0x56feb5(0x137),'risk':'read','flags':[{'name':a36_0x56feb5(0x133),'type':a36_0x56feb5(0x122),'description':a36_0x56feb5(0x123),'default':a36_0x56feb5(0x12b),'enum':[a36_0x56feb5(0x12b),'COMMON']},{'name':a36_0x56feb5(0x135),'type':a36_0x56feb5(0x122),'description':a36_0x56feb5(0x138)},{'name':a36_0x56feb5(0x127),'type':'boolean','description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x1f087c){const _0x185682=a36_0x56feb5,_0x38f6b5=await listBffScripts(_0x1f087c[_0x185682(0x13a)],_0x1f087c[_0x185682(0x11e)](_0x185682(0x133)),{'scriptName':_0x1f087c[_0x185682(0x11e)](_0x185682(0x135))||undefined}),_0x4c2c46=_0x1f087c[_0x185682(0x128)](_0x185682(0x127));return{'ok':!![],'data':_0x4c2c46?_0x38f6b5:_0x38f6b5[_0x185682(0x132)](_0x2d582b=>({'id':_0x2d582b['id'],'functionName':_0x2d582b['functionName']??'','description':_0x2d582b[_0x185682(0x139)]||_0x185682(0x126),'scriptType':_0x2d582b['scriptType']})),'message':_0x38f6b5[_0x185682(0x11f)]===0x0?_0x185682(0x11d):undefined};}};
1
+ const a36_0x45a0f5=a36_0x49d3;function a36_0x49d3(_0x3c00a1,_0x178e6f){_0x3c00a1=_0x3c00a1-0xcd;const _0x44a964=a36_0x44a9();let _0x49d3ec=_0x44a964[_0x3c00a1];return _0x49d3ec;}function a36_0x44a9(){const _0x1169fa=['56rfEoiJ','1789722TlwbzY','ENDPOINT','functionName','type','7391769iDKKiU','read','bff','length','COMMON','1568mtajJO','40395TLlgQv','No\x20BFF\x20scripts\x20found.','name','appCode','35141140OLzpEO','description','Return\x20full\x20script\x20objects','11hBiFpB','1KMaGos','2205986XGBbIt','scriptType','bool','verbose','str','list','1472058PWlFic','List\x20BFF\x20scripts','5187LcZfNQ','string'];a36_0x44a9=function(){return _0x1169fa;};return a36_0x44a9();}(function(_0x1a6e20,_0x3926d0){const _0x139e84=a36_0x49d3,_0x49302c=_0x1a6e20();while(!![]){try{const _0x5a1dde=-parseInt(_0x139e84(0xdc))/0x1*(parseInt(_0x139e84(0xdd))/0x2)+parseInt(_0x139e84(0xe5))/0x3*(parseInt(_0x139e84(0xd3))/0x4)+parseInt(_0x139e84(0xd4))/0x5+-parseInt(_0x139e84(0xe8))/0x6+-parseInt(_0x139e84(0xce))/0x7+parseInt(_0x139e84(0xe7))/0x8*(-parseInt(_0x139e84(0xe3))/0x9)+parseInt(_0x139e84(0xd8))/0xa*(parseInt(_0x139e84(0xdb))/0xb);if(_0x5a1dde===_0x3926d0)break;else _0x49302c['push'](_0x49302c['shift']());}catch(_0x46367f){_0x49302c['push'](_0x49302c['shift']());}}}(a36_0x44a9,0x91f14));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a36_0x45a0f5(0xd0),'command':a36_0x45a0f5(0xe2),'description':a36_0x45a0f5(0xe4),'risk':a36_0x45a0f5(0xcf),'flags':[{'name':a36_0x45a0f5(0xcd),'type':'string','description':'Script\x20type\x20filter','default':a36_0x45a0f5(0xe9),'enum':[a36_0x45a0f5(0xe9),a36_0x45a0f5(0xd2)]},{'name':a36_0x45a0f5(0xd6),'type':a36_0x45a0f5(0xe6),'description':'Filter\x20by\x20script\x20name'},{'name':a36_0x45a0f5(0xe0),'type':'boolean','description':a36_0x45a0f5(0xda)}],async 'execute'(_0x4fabf2){const _0x1d57a3=a36_0x45a0f5,_0x89a50c=await listBffScripts(_0x4fabf2[_0x1d57a3(0xd7)],_0x4fabf2[_0x1d57a3(0xe1)](_0x1d57a3(0xcd)),{'scriptName':_0x4fabf2[_0x1d57a3(0xe1)](_0x1d57a3(0xd6))||undefined}),_0x36b7dd=_0x4fabf2[_0x1d57a3(0xdf)](_0x1d57a3(0xe0));return{'ok':!![],'data':_0x36b7dd?_0x89a50c:_0x89a50c['map'](_0x4ffa7d=>({'id':_0x4ffa7d['id'],'functionName':_0x4ffa7d[_0x1d57a3(0xea)]??'','description':_0x4ffa7d[_0x1d57a3(0xd9)]||'(unnamed)','scriptType':_0x4ffa7d[_0x1d57a3(0xde)]})),'message':_0x89a50c[_0x1d57a3(0xd1)]===0x0?_0x1d57a3(0xd5):undefined};}};
@@ -1 +1 @@
1
- const a37_0x4d5d7f=a37_0x54f3;function a37_0x54f3(_0x1589c7,_0x55d6b9){_0x1589c7=_0x1589c7-0x1ae;const _0x353243=a37_0x3532();let _0x54f34d=_0x353243[_0x1589c7];return _0x54f34d;}(function(_0x2368b5,_0x1622b0){const _0x1135f6=a37_0x54f3,_0x59ea7f=_0x2368b5();while(!![]){try{const _0x2cd354=parseInt(_0x1135f6(0x1dd))/0x1+parseInt(_0x1135f6(0x1d3))/0x2*(-parseInt(_0x1135f6(0x1cb))/0x3)+-parseInt(_0x1135f6(0x1be))/0x4*(parseInt(_0x1135f6(0x1cd))/0x5)+parseInt(_0x1135f6(0x1bd))/0x6*(parseInt(_0x1135f6(0x1d6))/0x7)+parseInt(_0x1135f6(0x1ee))/0x8*(-parseInt(_0x1135f6(0x1b7))/0x9)+-parseInt(_0x1135f6(0x1c6))/0xa*(-parseInt(_0x1135f6(0x1eb))/0xb)+parseInt(_0x1135f6(0x1b3))/0xc;if(_0x2cd354===_0x1622b0)break;else _0x59ea7f['push'](_0x59ea7f['shift']());}catch(_0x3bc4bd){_0x59ea7f['push'](_0x59ea7f['shift']());}}}(a37_0x3532,0xca537));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';function a37_0x3532(){const _0x2628fc=['filePath','hookLocation','unresolvable\x20target\x20path','cancelled','Lock\x20scope\x20for\x20app\x20\x22','operationType','Force\x20overwrite\x20local\x20unsynced\x20changes','Force\x20pull\x20cancelled.','No\x20remote\x20BFF\x20scripts\x20found.','scriptContent','type','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','lastSync','&type=','toISOString','validation','utf8','stdin','bff','Remote\x20script\x20missing\x20content.','boolean','13881564dJxiwt','\x20failed','pull','trim','132714HELcJM','datasetCode','alias','functionName','force','functionNode','3500916WHUNXe','4ugdxSj','hash','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','lockKey','close','Would\x20inspect\x20','\x20skipped,\x20','280EuUbFL','\x22\x20not\x20found\x20after\x20ensureLockScope.','appCode','push','nonInteractive','1542759pAPzmp','scriptType','2807240JIVcaj','conflict','yes','str','\x20remote\x20BFF\x20script(s)\x20for\x20pull','skipped','4btdSBL','apiDir','stringify','7chtnZd','functions','all','lockFilePath','COMMON','stderr','scriptsRoot','993608OJLzMA','parse','/api/management/library/scripts/list?appCode=','Pull\x20complete:\x20','Pull\x20only\x20this\x20script\x20type','string','map','toLowerCase','bool','HOOK','would_pull','message','ENDPOINT','version','322234BJRnBJ','length','includes','616fRRQnt'];a37_0x3532=function(){return _0x2628fc;};return a37_0x3532();}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a37_0x4d5d7f(0x1b0),'command':a37_0x4d5d7f(0x1b5),'description':a37_0x4d5d7f(0x1fa),'risk':'write','flags':[{'name':a37_0x4d5d7f(0x1f9),'type':a37_0x4d5d7f(0x1e2),'description':a37_0x4d5d7f(0x1e1),'enum':[a37_0x4d5d7f(0x1da),a37_0x4d5d7f(0x1e9),'HOOK']},{'name':a37_0x4d5d7f(0x1bb),'type':a37_0x4d5d7f(0x1b2),'description':a37_0x4d5d7f(0x1f5)}],async 'dryRun'(_0x548517){const _0x5cacba=a37_0x4d5d7f,_0x3c622e=loadBffProjectConfig(_0x548517[_0x5cacba(0x1c8)]),_0x18d7b7=await readBffLockFile(_0x3c622e['lockFilePath']),{appLock:_0x45fc8a}=ensureLockScope(_0x18d7b7??createEmptyBffLock(),_0x548517['appCode'],_0x3c622e[_0x5cacba(0x1dc)],_0x5cacba(0x1b5)),_0x27a043=normalizeBffType(_0x548517[_0x5cacba(0x1d0)](_0x5cacba(0x1f9)))??undefined,_0x57a243=buildDatasetCodeToAliasMap(_0x548517[_0x5cacba(0x1d4)],_0x548517[_0x5cacba(0x1c8)]),[_0x2f2958,_0x5e4097]=await Promise[_0x5cacba(0x1d8)]([listBffScripts(_0x548517[_0x5cacba(0x1c8)],_0x27a043),getBffScriptStatistics(_0x548517[_0x5cacba(0x1c8)])]),_0x42402d=createHookLocationMap(_0x5e4097),_0x22808c=[];for(const _0x4077b7 of _0x2f2958){const _0x55eafc=resolveRemoteScriptTarget(_0x3c622e,_0x4077b7,_0x42402d,_0x45fc8a[_0x5cacba(0x1d7)],_0x57a243);if(!_0x55eafc){_0x22808c[_0x5cacba(0x1c9)]({'scriptType':_0x4077b7[_0x5cacba(0x1cc)],'functionName':_0x4077b7[_0x5cacba(0x1ba)]??'','status':_0x5cacba(0x1d2),'reason':'unresolvable\x20target\x20path'});continue;}const _0x6294d8=_0x45fc8a[_0x5cacba(0x1d7)][_0x55eafc[_0x5cacba(0x1c2)]],_0x401475=_0x4077b7[_0x5cacba(0x1f8)]!=null?computeContentHash(_0x4077b7['scriptContent']):undefined,_0x56bcc6=await hasUnsyncedLocalChanges(_0x55eafc[_0x5cacba(0x1ef)],_0x6294d8,_0x401475);_0x22808c['push']({'lockKey':_0x55eafc['lockKey'],'filePath':_0x55eafc[_0x5cacba(0x1ef)],'remoteId':_0x4077b7['id']??null,'status':_0x56bcc6?_0x5cacba(0x1ce):_0x5cacba(0x1e7)});}return{'method':'GET','url':_0x5cacba(0x1df)+_0x548517[_0x5cacba(0x1c8)]+(_0x27a043?_0x5cacba(0x1fc)+_0x27a043:''),'body':{'appCode':_0x548517['appCode'],'filterType':_0x27a043??null,'files':_0x22808c},'description':_0x5cacba(0x1c4)+_0x22808c[_0x5cacba(0x1ec)]+_0x5cacba(0x1d1)};},async 'execute'(_0x535574){const _0x587daa=a37_0x4d5d7f,_0x1aa117=loadBffProjectConfig(_0x535574[_0x587daa(0x1c8)]),_0x271007=await readBffLockFile(_0x1aa117[_0x587daa(0x1d9)]),{lockData:_0x469259,appLock:_0x58261c}=ensureLockScope(_0x271007??createEmptyBffLock(),_0x535574[_0x587daa(0x1c8)],_0x1aa117[_0x587daa(0x1dc)],_0x587daa(0x1b5)),_0x53c788=normalizeBffType(_0x535574[_0x587daa(0x1d0)](_0x587daa(0x1f9)))??undefined;if(_0x535574[_0x587daa(0x1d0)](_0x587daa(0x1f9))&&!_0x53c788)throw CliErrors[_0x587daa(0x1fe)](_0x587daa(0x1c1));const [_0x6d2b06,_0xb0139a]=await Promise[_0x587daa(0x1d8)]([listBffScripts(_0x535574['appCode'],_0x53c788),getBffScriptStatistics(_0x535574[_0x587daa(0x1c8)])]);if(_0x6d2b06[_0x587daa(0x1ec)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x587daa(0x1f7)};const _0x2342d3=_0x535574[_0x587daa(0x1e5)](_0x587daa(0x1bb));if(_0x2342d3&&!_0x535574[_0x587daa(0x1ca)]){const _0x120f54=await confirmForce();if(!_0x120f54)throw CliErrors[_0x587daa(0x1f2)](_0x587daa(0x1f6));}if(_0x2342d3&&_0x535574[_0x587daa(0x1ca)]){}const _0xd9617c=buildDatasetCodeToAliasMap(_0x535574[_0x587daa(0x1d4)],_0x535574[_0x587daa(0x1c8)]),_0x12b7f2=createHookLocationMap(_0xb0139a),_0x8eae99=JSON[_0x587daa(0x1de)](JSON[_0x587daa(0x1d5)](_0x469259)),_0x572e49=_0x535574[_0x587daa(0x1c8)],_0x89ba93=_0x8eae99['apps'][_0x572e49];if(!_0x89ba93)throw new Error(_0x587daa(0x1f3)+_0x572e49+_0x587daa(0x1c7));const _0x38bae7=[],_0x37aa91=[],_0x4b133c=[];for(const _0x1c12af of _0x6d2b06){const _0x39b52e=resolveRemoteScriptTarget(_0x1aa117,_0x1c12af,_0x12b7f2,_0x58261c[_0x587daa(0x1d7)],_0xd9617c);if(!_0x39b52e){_0x37aa91[_0x587daa(0x1c9)]({'lockKey':_0x1c12af[_0x587daa(0x1cc)]+'/'+_0x1c12af['functionName'],'reason':_0x587daa(0x1f1)});continue;}const _0xe5283a=_0x58261c[_0x587daa(0x1d7)][_0x39b52e[_0x587daa(0x1c2)]];try{if(!_0x1c12af['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x1c12af[_0x587daa(0x1f8)]==null)throw new Error(_0x587daa(0x1b1));const _0xd18304=_0x1c12af[_0x587daa(0x1f8)],_0x768d5c=computeContentHash(_0xd18304);if(!_0x2342d3){const _0xe8edf1=await hasUnsyncedLocalChanges(_0x39b52e[_0x587daa(0x1ef)],_0xe5283a,_0x768d5c);if(_0xe8edf1){_0x37aa91[_0x587daa(0x1c9)]({'lockKey':_0x39b52e[_0x587daa(0x1c2)],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x39b52e['filePath']),await writeFile(_0x39b52e[_0x587daa(0x1ef)],_0xd18304,_0x587daa(0x1ae));const _0x527174={'hash':_0x768d5c,'remoteId':_0x1c12af['id'],'version':_0x1c12af[_0x587daa(0x1ea)]};_0x39b52e['type']===_0x587daa(0x1e6)&&_0x39b52e[_0x587daa(0x1f0)]&&(_0x527174[_0x587daa(0x1b9)]=_0x39b52e[_0x587daa(0x1f0)][_0x587daa(0x1b9)],_0x527174['datasetCode']=_0x39b52e[_0x587daa(0x1f0)][_0x587daa(0x1b8)],_0x527174['operationType']=_0x39b52e[_0x587daa(0x1f0)][_0x587daa(0x1f4)],_0x527174[_0x587daa(0x1bc)]=_0x39b52e[_0x587daa(0x1f0)]['functionNode']),_0x89ba93[_0x587daa(0x1d7)][_0x39b52e[_0x587daa(0x1c2)]]=_0x527174,_0x38bae7[_0x587daa(0x1c9)]({'lockKey':_0x39b52e['lockKey'],'remoteId':_0x1c12af['id']});}catch(_0x4f7291){_0x4b133c[_0x587daa(0x1c9)]({'lockKey':_0x39b52e[_0x587daa(0x1c2)],'error':_0x4f7291 instanceof Error?_0x4f7291[_0x587daa(0x1e8)]:String(_0x4f7291)});}}return _0x89ba93[_0x587daa(0x1fb)]=new Date()[_0x587daa(0x1fd)](),await writeBffLockFile(_0x1aa117['lockFilePath'],_0x8eae99),{'ok':_0x4b133c[_0x587daa(0x1ec)]===0x0,'data':{'pulled':_0x38bae7,'skipped':_0x37aa91,'failed':_0x4b133c},'message':_0x587daa(0x1e0)+_0x38bae7[_0x587daa(0x1ec)]+'\x20pulled,\x20'+_0x37aa91[_0x587daa(0x1ec)]+_0x587daa(0x1c5)+_0x4b133c[_0x587daa(0x1ec)]+_0x587daa(0x1b4)};}};async function hasUnsyncedLocalChanges(_0x15629e,_0x163ca8,_0x568196){const _0x20f15d=a37_0x4d5d7f;if(!await fileExists(_0x15629e))return![];const _0x3515a1=await computeFileHash(_0x15629e);if(!_0x163ca8)return _0x568196?_0x3515a1!==_0x568196:!![];return _0x3515a1!==_0x163ca8[_0x20f15d(0x1bf)];}function buildDatasetCodeToAliasMap(_0x2ccdf5,_0x4fc45b){const _0x5a023b=a37_0x4d5d7f,_0x5616ab=loadAliasMap(_0x2ccdf5,undefined,resolveApiFilePath(_0x2ccdf5,_0x4fc45b));return new Map(_0x5616ab[_0x5a023b(0x1e3)](_0x30e0cf=>[_0x30e0cf[_0x5a023b(0x1b8)],_0x30e0cf[_0x5a023b(0x1b9)]]));}async function confirmForce(){const _0x55ec39=a37_0x4d5d7f,_0x315c33=createInterface({'input':process[_0x55ec39(0x1af)],'output':process[_0x55ec39(0x1db)]}),_0x5e442a=await new Promise(_0x3789f2=>{const _0x55acd0=_0x55ec39;_0x315c33['question'](_0x55acd0(0x1c0),_0x3789f2);});return _0x315c33[_0x55ec39(0x1c3)](),['y',_0x55ec39(0x1cf)][_0x55ec39(0x1ed)](_0x5e442a[_0x55ec39(0x1b6)]()[_0x55ec39(0x1e4)]());}
1
+ const a37_0x4612b6=a37_0x4ecc;(function(_0x486716,_0xcba80d){const _0x49ee1c=a37_0x4ecc,_0x2e777b=_0x486716();while(!![]){try{const _0x43b580=parseInt(_0x49ee1c(0x18a))/0x1+-parseInt(_0x49ee1c(0x16f))/0x2+-parseInt(_0x49ee1c(0x18b))/0x3+-parseInt(_0x49ee1c(0x194))/0x4+-parseInt(_0x49ee1c(0x164))/0x5*(parseInt(_0x49ee1c(0x17e))/0x6)+parseInt(_0x49ee1c(0x186))/0x7*(-parseInt(_0x49ee1c(0x178))/0x8)+parseInt(_0x49ee1c(0x16e))/0x9;if(_0x43b580===_0xcba80d)break;else _0x2e777b['push'](_0x2e777b['shift']());}catch(_0x111c25){_0x2e777b['push'](_0x2e777b['shift']());}}}(a37_0x37a7,0xf25fa));import{createInterface}from'node:readline';function a37_0x37a7(){const _0xb5f8d=['functions','alias','toLowerCase','HOOK','Lock\x20scope\x20for\x20app\x20\x22','operationType','scriptsRoot','string','pull','skipped','/api/management/library/scripts/list?appCode=','Pull\x20only\x20this\x20script\x20type','version','type','datasetCode','1190395zDjfQx','scriptType','Would\x20inspect\x20','bff','cancelled','length','force','hookLocation','appCode','\x20skipped,\x20','43737345mlNSWN','839120aBGbpF','trim','local\x20unsynced\x20changes','write','yes','stdin','lockFilePath','COMMON','lockKey','2221312vOodWj','scriptContent','functionNode','lastSync','Remote\x20script\x20missing\x20content.','str','18MEvlzs','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','ENDPOINT','includes','message','question','Pull\x20complete:\x20','bool','28lqWsQq','\x22\x20not\x20found\x20after\x20ensureLockScope.','nonInteractive','push','117086UoNDPS','847017MBucfO','would_pull','Force\x20pull\x20cancelled.','hash','Remote\x20script\x20missing\x20id.','\x20remote\x20BFF\x20script(s)\x20for\x20pull','close','all','GET','5828948oVdjGb','apiDir','filePath','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','functionName'];a37_0x37a7=function(){return _0xb5f8d;};return a37_0x37a7();}import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a37_0x4ecc(_0x287f34,_0x1e6ce2){_0x287f34=_0x287f34-0x15f;const _0x37a7cb=a37_0x37a7();let _0x4ecc00=_0x37a7cb[_0x287f34];return _0x4ecc00;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a37_0x4612b6(0x167),'command':a37_0x4612b6(0x1a1),'description':a37_0x4612b6(0x17f),'risk':a37_0x4612b6(0x172),'flags':[{'name':a37_0x4612b6(0x162),'type':a37_0x4612b6(0x1a0),'description':a37_0x4612b6(0x160),'enum':[a37_0x4612b6(0x176),a37_0x4612b6(0x180),'HOOK']},{'name':a37_0x4612b6(0x16a),'type':'boolean','description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x2c2493){const _0x4ad6b0=a37_0x4612b6,_0x4485cd=loadBffProjectConfig(_0x2c2493[_0x4ad6b0(0x16c)]),_0x250b03=await readBffLockFile(_0x4485cd[_0x4ad6b0(0x175)]),{appLock:_0x2babaa}=ensureLockScope(_0x250b03??createEmptyBffLock(),_0x2c2493[_0x4ad6b0(0x16c)],_0x4485cd[_0x4ad6b0(0x19f)],'pull'),_0x471204=normalizeBffType(_0x2c2493[_0x4ad6b0(0x17d)](_0x4ad6b0(0x162)))??undefined,_0x212ab5=buildDatasetCodeToAliasMap(_0x2c2493[_0x4ad6b0(0x195)],_0x2c2493[_0x4ad6b0(0x16c)]),[_0x6a53a8,_0x51681a]=await Promise[_0x4ad6b0(0x192)]([listBffScripts(_0x2c2493[_0x4ad6b0(0x16c)],_0x471204),getBffScriptStatistics(_0x2c2493[_0x4ad6b0(0x16c)])]),_0x5901bc=createHookLocationMap(_0x51681a),_0x55f093=[];for(const _0x14b341 of _0x6a53a8){const _0x573466=resolveRemoteScriptTarget(_0x4485cd,_0x14b341,_0x5901bc,_0x2babaa[_0x4ad6b0(0x199)],_0x212ab5);if(!_0x573466){_0x55f093[_0x4ad6b0(0x189)]({'scriptType':_0x14b341[_0x4ad6b0(0x165)],'functionName':_0x14b341[_0x4ad6b0(0x198)]??'','status':_0x4ad6b0(0x1a2),'reason':'unresolvable\x20target\x20path'});continue;}const _0x5cf9ec=_0x2babaa[_0x4ad6b0(0x199)][_0x573466[_0x4ad6b0(0x177)]],_0x2eb7ab=_0x14b341[_0x4ad6b0(0x179)]!=null?computeContentHash(_0x14b341[_0x4ad6b0(0x179)]):undefined,_0x2603ee=await hasUnsyncedLocalChanges(_0x573466['filePath'],_0x5cf9ec,_0x2eb7ab);_0x55f093[_0x4ad6b0(0x189)]({'lockKey':_0x573466[_0x4ad6b0(0x177)],'filePath':_0x573466[_0x4ad6b0(0x196)],'remoteId':_0x14b341['id']??null,'status':_0x2603ee?'conflict':_0x4ad6b0(0x18c)});}return{'method':_0x4ad6b0(0x193),'url':_0x4ad6b0(0x15f)+_0x2c2493['appCode']+(_0x471204?'&type='+_0x471204:''),'body':{'appCode':_0x2c2493[_0x4ad6b0(0x16c)],'filterType':_0x471204??null,'files':_0x55f093},'description':_0x4ad6b0(0x166)+_0x55f093['length']+_0x4ad6b0(0x190)};},async 'execute'(_0x1a51b3){const _0x137e84=a37_0x4612b6,_0x44ade8=loadBffProjectConfig(_0x1a51b3[_0x137e84(0x16c)]),_0x3c063d=await readBffLockFile(_0x44ade8[_0x137e84(0x175)]),{lockData:_0x18e8fb,appLock:_0xbdf66}=ensureLockScope(_0x3c063d??createEmptyBffLock(),_0x1a51b3['appCode'],_0x44ade8[_0x137e84(0x19f)],_0x137e84(0x1a1)),_0x5254b0=normalizeBffType(_0x1a51b3['str']('type'))??undefined;if(_0x1a51b3['str']('type')&&!_0x5254b0)throw CliErrors['validation'](_0x137e84(0x197));const [_0x20f323,_0x32ce6f]=await Promise[_0x137e84(0x192)]([listBffScripts(_0x1a51b3[_0x137e84(0x16c)],_0x5254b0),getBffScriptStatistics(_0x1a51b3['appCode'])]);if(_0x20f323['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x1522da=_0x1a51b3[_0x137e84(0x185)](_0x137e84(0x16a));if(_0x1522da&&!_0x1a51b3[_0x137e84(0x188)]){const _0x227ced=await confirmForce();if(!_0x227ced)throw CliErrors[_0x137e84(0x168)](_0x137e84(0x18d));}if(_0x1522da&&_0x1a51b3[_0x137e84(0x188)]){}const _0x1eafb1=buildDatasetCodeToAliasMap(_0x1a51b3['apiDir'],_0x1a51b3[_0x137e84(0x16c)]),_0xb74329=createHookLocationMap(_0x32ce6f),_0x5aba65=JSON['parse'](JSON['stringify'](_0x18e8fb)),_0x3985fb=_0x1a51b3[_0x137e84(0x16c)],_0x2f8967=_0x5aba65['apps'][_0x3985fb];if(!_0x2f8967)throw new Error(_0x137e84(0x19d)+_0x3985fb+_0x137e84(0x187));const _0xaf263c=[],_0x275940=[],_0x519597=[];for(const _0x273e77 of _0x20f323){const _0x5afa01=resolveRemoteScriptTarget(_0x44ade8,_0x273e77,_0xb74329,_0xbdf66[_0x137e84(0x199)],_0x1eafb1);if(!_0x5afa01){_0x275940[_0x137e84(0x189)]({'lockKey':_0x273e77[_0x137e84(0x165)]+'/'+_0x273e77['functionName'],'reason':'unresolvable\x20target\x20path'});continue;}const _0x55028e=_0xbdf66[_0x137e84(0x199)][_0x5afa01['lockKey']];try{if(!_0x273e77['id'])throw new Error(_0x137e84(0x18f));if(_0x273e77['scriptContent']==null)throw new Error(_0x137e84(0x17c));const _0x3f5636=_0x273e77[_0x137e84(0x179)],_0x3d936c=computeContentHash(_0x3f5636);if(!_0x1522da){const _0x16e492=await hasUnsyncedLocalChanges(_0x5afa01[_0x137e84(0x196)],_0x55028e,_0x3d936c);if(_0x16e492){_0x275940['push']({'lockKey':_0x5afa01[_0x137e84(0x177)],'reason':_0x137e84(0x171)});continue;}}await ensureParentDirectory(_0x5afa01[_0x137e84(0x196)]),await writeFile(_0x5afa01[_0x137e84(0x196)],_0x3f5636,'utf8');const _0x1a33d9={'hash':_0x3d936c,'remoteId':_0x273e77['id'],'version':_0x273e77[_0x137e84(0x161)]};_0x5afa01[_0x137e84(0x162)]===_0x137e84(0x19c)&&_0x5afa01[_0x137e84(0x16b)]&&(_0x1a33d9[_0x137e84(0x19a)]=_0x5afa01['hookLocation'][_0x137e84(0x19a)],_0x1a33d9[_0x137e84(0x163)]=_0x5afa01[_0x137e84(0x16b)]['datasetCode'],_0x1a33d9['operationType']=_0x5afa01[_0x137e84(0x16b)][_0x137e84(0x19e)],_0x1a33d9[_0x137e84(0x17a)]=_0x5afa01['hookLocation'][_0x137e84(0x17a)]),_0x2f8967[_0x137e84(0x199)][_0x5afa01[_0x137e84(0x177)]]=_0x1a33d9,_0xaf263c['push']({'lockKey':_0x5afa01[_0x137e84(0x177)],'remoteId':_0x273e77['id']});}catch(_0x4f69c8){_0x519597[_0x137e84(0x189)]({'lockKey':_0x5afa01['lockKey'],'error':_0x4f69c8 instanceof Error?_0x4f69c8[_0x137e84(0x182)]:String(_0x4f69c8)});}}return _0x2f8967[_0x137e84(0x17b)]=new Date()['toISOString'](),await writeBffLockFile(_0x44ade8['lockFilePath'],_0x5aba65),{'ok':_0x519597[_0x137e84(0x169)]===0x0,'data':{'pulled':_0xaf263c,'skipped':_0x275940,'failed':_0x519597},'message':_0x137e84(0x184)+_0xaf263c['length']+'\x20pulled,\x20'+_0x275940[_0x137e84(0x169)]+_0x137e84(0x16d)+_0x519597[_0x137e84(0x169)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x35c2c9,_0x4c44f2,_0x13fdb5){const _0x1ed090=a37_0x4612b6;if(!await fileExists(_0x35c2c9))return![];const _0x15a3a3=await computeFileHash(_0x35c2c9);if(!_0x4c44f2)return _0x13fdb5?_0x15a3a3!==_0x13fdb5:!![];return _0x15a3a3!==_0x4c44f2[_0x1ed090(0x18e)];}function buildDatasetCodeToAliasMap(_0x4abe30,_0x34059c){const _0x43faa6=a37_0x4612b6,_0x4c1a54=loadAliasMap(_0x4abe30,undefined,resolveApiFilePath(_0x4abe30,_0x34059c));return new Map(_0x4c1a54['map'](_0xb1fb18=>[_0xb1fb18['datasetCode'],_0xb1fb18[_0x43faa6(0x19a)]]));}async function confirmForce(){const _0x5c93a2=a37_0x4612b6,_0x11c4c4=createInterface({'input':process[_0x5c93a2(0x174)],'output':process['stderr']}),_0x59d95b=await new Promise(_0x1fc37d=>{const _0x15f7e7=_0x5c93a2;_0x11c4c4[_0x15f7e7(0x183)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x1fc37d);});return _0x11c4c4[_0x5c93a2(0x191)](),['y',_0x5c93a2(0x173)][_0x5c93a2(0x181)](_0x59d95b[_0x5c93a2(0x170)]()[_0x5c93a2(0x19b)]());}
@@ -1 +1 @@
1
- const a38_0x2664fe=a38_0x5462;(function(_0x11c402,_0x1e0937){const _0x2441ff=a38_0x5462,_0x3ad508=_0x11c402();while(!![]){try{const _0x1f785c=-parseInt(_0x2441ff(0x84))/0x1*(parseInt(_0x2441ff(0x9a))/0x2)+parseInt(_0x2441ff(0x9b))/0x3*(parseInt(_0x2441ff(0x7a))/0x4)+-parseInt(_0x2441ff(0x96))/0x5+-parseInt(_0x2441ff(0x9f))/0x6*(-parseInt(_0x2441ff(0xb4))/0x7)+parseInt(_0x2441ff(0x8a))/0x8+-parseInt(_0x2441ff(0x87))/0x9+parseInt(_0x2441ff(0x7c))/0xa*(parseInt(_0x2441ff(0x92))/0xb);if(_0x1f785c===_0x1e0937)break;else _0x3ad508['push'](_0x3ad508['shift']());}catch(_0x51083c){_0x3ad508['push'](_0x3ad508['shift']());}}}(a38_0x4a52,0xc6b9f));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a38_0x5462(_0x26c90a,_0x502564){_0x26c90a=_0x26c90a-0x74;const _0x4a5281=a38_0x4a52();let _0x5462b0=_0x4a5281[_0x26c90a];return _0x5462b0;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a38_0x4a52(){const _0x2f6e91=['lockKey','No\x20local\x20BFF\x20functions\x20found.','get','description','11KxggOU','hash','Lock\x20scope\x20for\x20app\x20\x22','filePath','4910855ppyhLQ','would_push','version','Incomplete\x20HOOK\x20path:\x20','1103458zhYUWm','3RVJoGY','lastSync','\x20failed,\x20','unchanged','17820MSLYaI','Push\x20complete:\x20','some','message','script','has','name','high-risk-write','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','functionNode','Cannot\x20resolve\x20dataset\x20for\x20\x22','POST','functions','string','\x22.\x20','aliasToDatasetCode','status','toISOString','create','attempted','938IPdatL','every','bool','utf8','cleared','values','Local\x20function\x20not\x20found:\x20','runtime\x20cache\x20not\x20needed','force','runtime\x20cache\x20clear\x20failed','alias','bff','validation','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','datasetId','scriptsRoot','Would\x20inspect\x20','type','appCode','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','\x20uploaded,\x20','apiDir','datasetCode','operationType','4477392hdHSwv','parse','11331830EHQBIM',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','length','Push\x20local\x20BFF\x20scripts\x20to\x20remote','boolean','str','Push\x20only\x20this\x20script\x20type','lockFilePath','1tUzCiu','remoteId','map','8404236eeKfeL','Runtime\x20script\x20cache\x20cleared.','ENDPOINT','5049408EpwzdB','push','update','HOOK'];a38_0x4a52=function(){return _0x2f6e91;};return a38_0x4a52();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a38_0x2664fe(0xbf),'command':a38_0x2664fe(0x8b),'description':a38_0x2664fe(0x7f),'risk':a38_0x2664fe(0xa6),'flags':[{'name':a38_0x2664fe(0xc5),'type':a38_0x2664fe(0xad),'description':a38_0x2664fe(0x82),'enum':['COMMON',a38_0x2664fe(0x89),a38_0x2664fe(0x8d)]},{'name':'name','type':a38_0x2664fe(0xad),'description':a38_0x2664fe(0x75)},{'name':'force','type':a38_0x2664fe(0x80),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x8d7457){const _0x5a7a01=a38_0x2664fe,_0xabc29f=loadBffProjectConfig(_0x8d7457[_0x5a7a01(0x74)]),_0xbdf8b8=await readBffLockFile(_0xabc29f['lockFilePath']),{appLock:_0x3f3eb2}=ensureLockScope(_0xbdf8b8??createEmptyBffLock(),_0x8d7457['appCode'],_0xabc29f['scriptsRoot'],_0x5a7a01(0x8b)),_0x2522a6=await getTargetFunctions(_0xabc29f,_0x8d7457),_0x50d059=_0x8d7457[_0x5a7a01(0xb6)]('force'),_0x2f0294=[];for(const _0x295e81 of _0x2522a6){const _0x26d71c=await computeFileHash(_0x295e81[_0x5a7a01(0x95)]),_0x3e8b3b=_0x3f3eb2[_0x5a7a01(0xac)][_0x295e81['lockKey']],_0x1814fe=!!_0x3e8b3b&&_0x3e8b3b[_0x5a7a01(0x93)]===_0x26d71c;_0x2f0294[_0x5a7a01(0x8b)]({'lockKey':_0x295e81['lockKey'],'filePath':_0x295e81[_0x5a7a01(0x95)],'remoteId':_0x3e8b3b?.[_0x5a7a01(0x85)]??null,'mode':_0x3e8b3b?.[_0x5a7a01(0x85)]?_0x5a7a01(0x8c):_0x5a7a01(0xb2),'status':!_0x50d059&&_0x1814fe?_0x5a7a01(0x9e):_0x5a7a01(0x97)});}return{'method':_0x5a7a01(0xab),'url':'/api/management/library/scripts/save','body':{'appCode':_0x8d7457[_0x5a7a01(0x74)],'force':_0x50d059,'files':_0x2f0294,'cacheClearAtRuntime':_0x2f0294[_0x5a7a01(0xa1)](_0x3fc028=>_0x3fc028[_0x5a7a01(0xb0)]===_0x5a7a01(0x97)),'cacheClearAtRuntimeTimes':_0x2f0294[_0x5a7a01(0xa1)](_0x19c0e4=>_0x19c0e4['status']===_0x5a7a01(0x97))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x5a7a01(0xc4)+_0x2f0294['length']+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x4c0fb){const _0x4b52e5=a38_0x2664fe,_0x1250cb=loadBffProjectConfig(_0x4c0fb['appCode']),_0x130e49=await readBffLockFile(_0x1250cb[_0x4b52e5(0x83)]),{lockData:_0x55d496,appLock:_0x4cf875}=ensureLockScope(_0x130e49??createEmptyBffLock(),_0x4c0fb[_0x4b52e5(0x74)],_0x1250cb[_0x4b52e5(0xc3)],_0x4b52e5(0x8b)),_0x2344fb=await getTargetFunctions(_0x1250cb,_0x4c0fb);if(_0x2344fb[_0x4b52e5(0x7e)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4b52e5(0x8f)};const _0x2e63b0=_0x4c0fb[_0x4b52e5(0xb6)](_0x4b52e5(0xbc)),_0x4362b6=JSON[_0x4b52e5(0x7b)](JSON['stringify'](_0x55d496)),_0x7847b7=_0x4362b6['apps'][_0x4c0fb[_0x4b52e5(0x74)]];if(!_0x7847b7)throw new Error(_0x4b52e5(0x94)+_0x4c0fb[_0x4b52e5(0x74)]+_0x4b52e5(0xa7));const _0x548d14=await buildHookMaps(_0x4c0fb[_0x4b52e5(0x74)],_0x4c0fb[_0x4b52e5(0x77)],_0x2344fb,_0x7847b7),_0x59f268=[],_0x528060=[],_0x130939=[];for(const _0x227906 of _0x2344fb){const _0x4da732=await computeFileHash(_0x227906[_0x4b52e5(0x95)]),_0x2b5f84=_0x7847b7[_0x4b52e5(0xac)][_0x227906[_0x4b52e5(0x8e)]];if(!_0x2e63b0&&_0x2b5f84&&_0x2b5f84[_0x4b52e5(0x93)]===_0x4da732){_0x528060[_0x4b52e5(0x8b)]({'lockKey':_0x227906[_0x4b52e5(0x8e)],'reason':_0x4b52e5(0x9e)});continue;}try{await uploadSingleFunction(_0x4c0fb[_0x4b52e5(0x74)],_0x227906,_0x7847b7,_0x548d14);const _0x43a46c=_0x7847b7[_0x4b52e5(0xac)][_0x227906[_0x4b52e5(0x8e)]];_0x59f268[_0x4b52e5(0x8b)]({'lockKey':_0x227906[_0x4b52e5(0x8e)],'remoteId':_0x43a46c?.[_0x4b52e5(0x85)]??0x0});}catch(_0x54721f){_0x130939['push']({'lockKey':_0x227906[_0x4b52e5(0x8e)],'error':_0x54721f instanceof Error?_0x54721f[_0x4b52e5(0xa2)]:String(_0x54721f)});}}_0x7847b7[_0x4b52e5(0x9c)]=new Date()[_0x4b52e5(0xb1)](),await writeBffLockFile(_0x1250cb['lockFilePath'],_0x4362b6),await waitForUploadedLockEntries(_0x1250cb['lockFilePath'],_0x4c0fb['appCode'],_0x59f268[_0x4b52e5(0x86)](_0xb8a6ab=>_0xb8a6ab[_0x4b52e5(0x8e)]));let _0x4ce759={'attempted':![],'cleared':![]};if(_0x59f268[_0x4b52e5(0x7e)]>0x0)try{let _0x74e762='';for(let _0x51dca8=0x0;_0x51dca8<CACHE_CLEAR_ATTEMPTS;_0x51dca8+=0x1){_0x74e762=await clearBffScriptCache(),_0x51dca8<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4ce759={'attempted':!![],'cleared':!![],'message':_0x74e762||_0x4b52e5(0x88)};}catch(_0x2aa9de){_0x4ce759={'attempted':!![],'cleared':![],'error':_0x2aa9de instanceof Error?_0x2aa9de[_0x4b52e5(0xa2)]:String(_0x2aa9de)};}const _0x5dff16=_0x130939[_0x4b52e5(0x7e)]===0x0&&(_0x4ce759['attempted']?_0x4ce759['cleared']:!![]),_0x1231b1=_0x4ce759[_0x4b52e5(0xb3)]?_0x4ce759[_0x4b52e5(0xb8)]?'runtime\x20cache\x20cleared':_0x4b52e5(0xbd):_0x4b52e5(0xbb);return{'ok':_0x5dff16,'data':{'uploaded':_0x59f268,'skipped':_0x528060,'failed':_0x130939,'cacheClear':_0x4ce759},'message':_0x4b52e5(0xa0)+_0x59f268[_0x4b52e5(0x7e)]+_0x4b52e5(0x76)+_0x528060[_0x4b52e5(0x7e)]+'\x20skipped,\x20'+_0x130939['length']+_0x4b52e5(0x9d)+_0x1231b1};}};async function getTargetFunctions(_0x1a5654,_0x2036a0){const _0x55232a=a38_0x2664fe,_0x4614fb=_0x2036a0['str']('type'),_0x520c55=_0x2036a0[_0x55232a(0x81)](_0x55232a(0xa5)),_0x35b1e0=normalizeBffType(_0x4614fb)??undefined;if(_0x520c55&&!_0x35b1e0)throw CliErrors[_0x55232a(0xc0)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x58a2f5=await scanLocalBffFunctions(_0x1a5654,_0x35b1e0);if(_0x520c55){const _0x3abb8f=_0x58a2f5['filter'](_0x1896ab=>_0x1896ab[_0x55232a(0xa5)]===_0x520c55);if(_0x3abb8f[_0x55232a(0x7e)]===0x0)throw CliErrors[_0x55232a(0xc0)](_0x55232a(0xba)+_0x35b1e0+'/'+_0x520c55);return _0x3abb8f;}return _0x58a2f5;}async function buildHookMaps(_0x94ca94,_0x395179,_0x7411c0,_0x421476){const _0x14a8c9=a38_0x2664fe,_0x30938f=_0x7411c0[_0x14a8c9(0xa1)](_0x184dc7=>_0x184dc7[_0x14a8c9(0xc5)]===_0x14a8c9(0x8d));if(!_0x30938f)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5753d6=loadAliasMap(_0x395179,undefined,resolveApiFilePath(_0x395179,_0x94ca94)),_0x5c65f0=new Map(_0x5753d6[_0x14a8c9(0x86)](_0x2f7576=>[_0x2f7576[_0x14a8c9(0xbe)],_0x2f7576[_0x14a8c9(0x78)]]));for(const _0x4c07ae of Object[_0x14a8c9(0xb9)](_0x421476['functions'])){_0x4c07ae['alias']&&_0x4c07ae[_0x14a8c9(0x78)]&&!_0x5c65f0['has'](_0x4c07ae[_0x14a8c9(0xbe)])&&_0x5c65f0['set'](_0x4c07ae[_0x14a8c9(0xbe)],_0x4c07ae[_0x14a8c9(0x78)]);}const _0x2ff789=await listDatasets(_0x94ca94),_0xb4301d=new Map(_0x2ff789[_0x14a8c9(0x86)](_0x59d896=>[_0x59d896['code'],_0x59d896]));return{'aliasToDatasetCode':_0x5c65f0,'datasetCodeToDataset':_0xb4301d};}async function uploadSingleFunction(_0x34353d,_0x359029,_0x1e7ccc,_0x20ac3b){const _0x18b04f=a38_0x2664fe,_0x3ab1e7=await readFile(_0x359029[_0x18b04f(0x95)],_0x18b04f(0xb7)),_0x2d3066=await computeFileHash(_0x359029['filePath']),_0x4aef94=_0x1e7ccc[_0x18b04f(0xac)][_0x359029[_0x18b04f(0x8e)]];if(_0x4aef94?.['remoteId']&&_0x4aef94[_0x18b04f(0x98)]==null)throw CliErrors[_0x18b04f(0xc0)](_0x359029[_0x18b04f(0x8e)]+_0x18b04f(0x7d));let _0x3d3730=extractScriptDescription(_0x3ab1e7);if(!_0x3d3730&&_0x4aef94?.[_0x18b04f(0x85)]){const _0xed8b30=await getBffScriptInfo(_0x4aef94[_0x18b04f(0x85)]);_0x3d3730=_0xed8b30[_0x18b04f(0x91)]||undefined;}const _0x1ae780={'appCode':_0x34353d,'functionName':_0x359029[_0x18b04f(0xa5)],'scriptType':_0x359029[_0x18b04f(0xc5)],'scriptContent':_0x3ab1e7};if(_0x4aef94?.[_0x18b04f(0x85)])_0x1ae780['id']=_0x4aef94[_0x18b04f(0x85)];if(_0x4aef94?.['version']!=null)_0x1ae780[_0x18b04f(0x98)]=_0x4aef94[_0x18b04f(0x98)];if(_0x3d3730)_0x1ae780[_0x18b04f(0x91)]=_0x3d3730;if(_0x359029['type']==='HOOK'){const _0x4a40b6=_0x359029['alias'];if(!_0x4a40b6||!_0x359029['operationType']||!_0x359029[_0x18b04f(0xa9)])throw CliErrors[_0x18b04f(0xc0)](_0x18b04f(0x99)+_0x359029[_0x18b04f(0x8e)]);const _0x4191ec=_0x20ac3b[_0x18b04f(0xaf)][_0x18b04f(0x90)](_0x4a40b6)??_0x4aef94?.[_0x18b04f(0x78)]??_0x4a40b6,_0x39ba85=_0x20ac3b['datasetCodeToDataset']['get'](_0x4191ec);if(!_0x39ba85)throw CliErrors['validation'](_0x18b04f(0xaa)+_0x4a40b6+_0x18b04f(0xae)+('Run\x20`'+CLI_BIN_NAME+_0x18b04f(0xc1)));_0x1ae780[_0x18b04f(0xc2)]=_0x39ba85['id'],_0x1ae780[_0x18b04f(0x79)]=_0x359029[_0x18b04f(0x79)],_0x1ae780[_0x18b04f(0xa9)]=_0x359029[_0x18b04f(0xa9)];}const _0x6b539e=await saveBffScript(_0x1ae780),_0x203f4d=_0x6b539e['id'],_0x17f825=_0x6b539e[_0x18b04f(0xa3)]??await getBffScriptInfo(_0x203f4d),_0x2a9d27={'hash':_0x2d3066,'remoteId':_0x203f4d,'version':_0x17f825[_0x18b04f(0x98)]};if(_0x359029[_0x18b04f(0xc5)]==='HOOK'){const _0x1fff94=_0x359029['alias'],_0x597674=_0x20ac3b[_0x18b04f(0xaf)][_0x18b04f(0x90)](_0x1fff94)??_0x4aef94?.[_0x18b04f(0x78)]??_0x1fff94;_0x20ac3b[_0x18b04f(0xaf)][_0x18b04f(0xa4)](_0x1fff94)?_0x2a9d27[_0x18b04f(0xbe)]=_0x1fff94:_0x2a9d27[_0x18b04f(0xbe)]=_0x4aef94?.[_0x18b04f(0xbe)],_0x2a9d27[_0x18b04f(0x78)]=_0x597674,_0x2a9d27[_0x18b04f(0x79)]=_0x359029['operationType'],_0x2a9d27[_0x18b04f(0xa9)]=_0x359029['functionNode'];}_0x1e7ccc[_0x18b04f(0xac)][_0x359029['lockKey']]=_0x2a9d27;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5547c5,_0x3a40f4,_0x270d37){const _0x2dcef1=a38_0x2664fe;if(_0x270d37[_0x2dcef1(0x7e)]===0x0)return;for(let _0x22d557=0x0;_0x22d557<LOCK_SETTLE_RETRY_COUNT;_0x22d557+=0x1){const _0x3a590f=await readBffLockFile(_0x5547c5),_0x4a65b1=_0x3a590f?.[_0x2dcef1(0xa8)]?.[_0x3a40f4]?.['functions']??{},_0x4bd0cf=_0x270d37[_0x2dcef1(0xb5)](_0x1ddfa1=>!!_0x4a65b1[_0x1ddfa1]?.[_0x2dcef1(0x85)]);if(_0x4bd0cf)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x270d37['join'](',\x20')+'.');}
1
+ const a38_0x27f1a4=a38_0x42b7;(function(_0x207535,_0x27b2e0){const _0x46970c=a38_0x42b7,_0x1ece60=_0x207535();while(!![]){try{const _0x8702ca=parseInt(_0x46970c(0x172))/0x1*(-parseInt(_0x46970c(0x1a7))/0x2)+parseInt(_0x46970c(0x190))/0x3*(-parseInt(_0x46970c(0x1aa))/0x4)+-parseInt(_0x46970c(0x179))/0x5*(-parseInt(_0x46970c(0x1ad))/0x6)+-parseInt(_0x46970c(0x1a6))/0x7+parseInt(_0x46970c(0x1ae))/0x8*(parseInt(_0x46970c(0x173))/0x9)+-parseInt(_0x46970c(0x16f))/0xa*(parseInt(_0x46970c(0x19e))/0xb)+parseInt(_0x46970c(0x17a))/0xc*(parseInt(_0x46970c(0x177))/0xd);if(_0x8702ca===_0x27b2e0)break;else _0x1ece60['push'](_0x1ece60['shift']());}catch(_0x10873e){_0x1ece60['push'](_0x1ece60['shift']());}}}(a38_0x440d,0x9a183));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a38_0x440d(){const _0x54dda3=['would_push','get',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','name','some','Local\x20function\x20not\x20found:\x20','force','/api/management/library/scripts/save','toISOString','apiDir','update','filePath','length','6SmUIso','scriptsRoot','apps','COMMON','\x20failed,\x20','datasetCodeToDataset','aliasToDatasetCode','string','create','cleared','functions','Incomplete\x20HOOK\x20path:\x20','set','remoteId','42691vKqDNT','values','bff','validation','datasetId','alias','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','Cannot\x20resolve\x20dataset\x20for\x20\x22','1024674WAFUax','10KaSsPE','parse','lockFilePath','851684blIFnT','datasetCode','has','755622VyHOYd','1319560UbFTtK','join','description','runtime\x20cache\x20cleared','ENDPOINT','HOOK','lockKey','Would\x20inspect\x20','code','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','\x20uploaded,\x20','appCode','runtime\x20cache\x20not\x20needed','script','functionNode','push','bool','POST','version','Push\x20only\x20this\x20script\x20type','Force\x20push\x20ignoring\x20hash\x20protection','message','\x22\x20not\x20found\x20after\x20ensureLockScope.','map','lastSync','high-risk-write','No\x20local\x20BFF\x20functions\x20found.','2230JXpaCr','Runtime\x20script\x20cache\x20cleared.','hash','30589VprKLU','9FrdSDA','Push\x20local\x20BFF\x20scripts\x20to\x20remote','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','type','1686659BXwYMl','status','25pRnrjD','132KskvyP','operationType','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','utf8','str','filter','unchanged','every','\x22.\x20'];a38_0x440d=function(){return _0x54dda3;};return a38_0x440d();}import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';function a38_0x42b7(_0x4f4ffd,_0x53c18c){_0x4f4ffd=_0x4f4ffd-0x16f;const _0x440deb=a38_0x440d();let _0x42b74e=_0x440deb[_0x4f4ffd];return _0x42b74e;}import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a38_0x27f1a4(0x1a0),'command':a38_0x27f1a4(0x1bd),'description':a38_0x27f1a4(0x174),'risk':a38_0x27f1a4(0x1c7),'flags':[{'name':a38_0x27f1a4(0x176),'type':'string','description':a38_0x27f1a4(0x1c1),'enum':[a38_0x27f1a4(0x193),a38_0x27f1a4(0x1b2),a38_0x27f1a4(0x1b3)]},{'name':'name','type':a38_0x27f1a4(0x197),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a38_0x27f1a4(0x189),'type':'boolean','description':a38_0x27f1a4(0x1c2)}],async 'dryRun'(_0x55b3ed){const _0x276290=a38_0x27f1a4,_0x59cb36=loadBffProjectConfig(_0x55b3ed[_0x276290(0x1b9)]),_0x4949e7=await readBffLockFile(_0x59cb36[_0x276290(0x1a9)]),{appLock:_0x3df64a}=ensureLockScope(_0x4949e7??createEmptyBffLock(),_0x55b3ed[_0x276290(0x1b9)],_0x59cb36[_0x276290(0x191)],_0x276290(0x1bd)),_0xf578ea=await getTargetFunctions(_0x59cb36,_0x55b3ed),_0xf713e3=_0x55b3ed[_0x276290(0x1be)](_0x276290(0x189)),_0x2a1743=[];for(const _0x44928b of _0xf578ea){const _0x54af6f=await computeFileHash(_0x44928b[_0x276290(0x18e)]),_0x4b5190=_0x3df64a[_0x276290(0x19a)][_0x44928b['lockKey']],_0x5cf78e=!!_0x4b5190&&_0x4b5190[_0x276290(0x171)]===_0x54af6f;_0x2a1743[_0x276290(0x1bd)]({'lockKey':_0x44928b['lockKey'],'filePath':_0x44928b[_0x276290(0x18e)],'remoteId':_0x4b5190?.[_0x276290(0x19d)]??null,'mode':_0x4b5190?.[_0x276290(0x19d)]?_0x276290(0x18d):_0x276290(0x198),'status':!_0xf713e3&&_0x5cf78e?_0x276290(0x180):_0x276290(0x183)});}return{'method':_0x276290(0x1bf),'url':_0x276290(0x18a),'body':{'appCode':_0x55b3ed['appCode'],'force':_0xf713e3,'files':_0x2a1743,'cacheClearAtRuntime':_0x2a1743['some'](_0x1ef921=>_0x1ef921[_0x276290(0x178)]==='would_push'),'cacheClearAtRuntimeTimes':_0x2a1743['some'](_0x3b49aa=>_0x3b49aa[_0x276290(0x178)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x276290(0x1b5)+_0x2a1743[_0x276290(0x18f)]+_0x276290(0x1b7)};},async 'execute'(_0x499e27){const _0x2b2da3=a38_0x27f1a4,_0x2c5e4b=loadBffProjectConfig(_0x499e27[_0x2b2da3(0x1b9)]),_0x17c180=await readBffLockFile(_0x2c5e4b[_0x2b2da3(0x1a9)]),{lockData:_0x40a812,appLock:_0x4e4a9d}=ensureLockScope(_0x17c180??createEmptyBffLock(),_0x499e27['appCode'],_0x2c5e4b[_0x2b2da3(0x191)],_0x2b2da3(0x1bd)),_0x7ecf65=await getTargetFunctions(_0x2c5e4b,_0x499e27);if(_0x7ecf65[_0x2b2da3(0x18f)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x2b2da3(0x1c8)};const _0xa827cf=_0x499e27[_0x2b2da3(0x1be)](_0x2b2da3(0x189)),_0x589b0e=JSON[_0x2b2da3(0x1a8)](JSON['stringify'](_0x40a812)),_0x1cc90e=_0x589b0e['apps'][_0x499e27[_0x2b2da3(0x1b9)]];if(!_0x1cc90e)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x499e27[_0x2b2da3(0x1b9)]+_0x2b2da3(0x1c4));const _0x373a9e=await buildHookMaps(_0x499e27[_0x2b2da3(0x1b9)],_0x499e27[_0x2b2da3(0x18c)],_0x7ecf65,_0x1cc90e),_0x41a287=[],_0x1f2017=[],_0x629c4c=[];for(const _0x4253a0 of _0x7ecf65){const _0x200e06=await computeFileHash(_0x4253a0[_0x2b2da3(0x18e)]),_0x2077ad=_0x1cc90e[_0x2b2da3(0x19a)][_0x4253a0[_0x2b2da3(0x1b4)]];if(!_0xa827cf&&_0x2077ad&&_0x2077ad[_0x2b2da3(0x171)]===_0x200e06){_0x1f2017['push']({'lockKey':_0x4253a0['lockKey'],'reason':_0x2b2da3(0x180)});continue;}try{await uploadSingleFunction(_0x499e27[_0x2b2da3(0x1b9)],_0x4253a0,_0x1cc90e,_0x373a9e);const _0x340177=_0x1cc90e['functions'][_0x4253a0[_0x2b2da3(0x1b4)]];_0x41a287['push']({'lockKey':_0x4253a0[_0x2b2da3(0x1b4)],'remoteId':_0x340177?.['remoteId']??0x0});}catch(_0x45798d){_0x629c4c[_0x2b2da3(0x1bd)]({'lockKey':_0x4253a0[_0x2b2da3(0x1b4)],'error':_0x45798d instanceof Error?_0x45798d[_0x2b2da3(0x1c3)]:String(_0x45798d)});}}_0x1cc90e[_0x2b2da3(0x1c6)]=new Date()[_0x2b2da3(0x18b)](),await writeBffLockFile(_0x2c5e4b[_0x2b2da3(0x1a9)],_0x589b0e),await waitForUploadedLockEntries(_0x2c5e4b[_0x2b2da3(0x1a9)],_0x499e27[_0x2b2da3(0x1b9)],_0x41a287[_0x2b2da3(0x1c5)](_0xd8840a=>_0xd8840a[_0x2b2da3(0x1b4)]));let _0x1ed22b={'attempted':![],'cleared':![]};if(_0x41a287[_0x2b2da3(0x18f)]>0x0)try{let _0x38c63a='';for(let _0x393657=0x0;_0x393657<CACHE_CLEAR_ATTEMPTS;_0x393657+=0x1){_0x38c63a=await clearBffScriptCache(),_0x393657<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x1ed22b={'attempted':!![],'cleared':!![],'message':_0x38c63a||_0x2b2da3(0x170)};}catch(_0x2a2474){_0x1ed22b={'attempted':!![],'cleared':![],'error':_0x2a2474 instanceof Error?_0x2a2474[_0x2b2da3(0x1c3)]:String(_0x2a2474)};}const _0x1539d6=_0x629c4c[_0x2b2da3(0x18f)]===0x0&&(_0x1ed22b['attempted']?_0x1ed22b[_0x2b2da3(0x199)]:!![]),_0x4aab29=_0x1ed22b['attempted']?_0x1ed22b[_0x2b2da3(0x199)]?_0x2b2da3(0x1b1):'runtime\x20cache\x20clear\x20failed':_0x2b2da3(0x1ba);return{'ok':_0x1539d6,'data':{'uploaded':_0x41a287,'skipped':_0x1f2017,'failed':_0x629c4c,'cacheClear':_0x1ed22b},'message':'Push\x20complete:\x20'+_0x41a287[_0x2b2da3(0x18f)]+_0x2b2da3(0x1b8)+_0x1f2017[_0x2b2da3(0x18f)]+'\x20skipped,\x20'+_0x629c4c[_0x2b2da3(0x18f)]+_0x2b2da3(0x194)+_0x4aab29};}};async function getTargetFunctions(_0x3b8d2d,_0xef9a29){const _0x2cdc78=a38_0x27f1a4,_0x43dc4c=_0xef9a29['str'](_0x2cdc78(0x176)),_0x267b5a=_0xef9a29[_0x2cdc78(0x17e)](_0x2cdc78(0x186)),_0x5102fe=normalizeBffType(_0x43dc4c)??undefined;if(_0x267b5a&&!_0x5102fe)throw CliErrors[_0x2cdc78(0x1a1)](_0x2cdc78(0x17c));const _0x28b391=await scanLocalBffFunctions(_0x3b8d2d,_0x5102fe);if(_0x267b5a){const _0x1b629f=_0x28b391[_0x2cdc78(0x17f)](_0xda5e64=>_0xda5e64[_0x2cdc78(0x186)]===_0x267b5a);if(_0x1b629f[_0x2cdc78(0x18f)]===0x0)throw CliErrors['validation'](_0x2cdc78(0x188)+_0x5102fe+'/'+_0x267b5a);return _0x1b629f;}return _0x28b391;}async function buildHookMaps(_0x15c533,_0x3a6b1f,_0x2d8300,_0x209422){const _0x1dc841=a38_0x27f1a4,_0xd6009f=_0x2d8300[_0x1dc841(0x187)](_0x10ef56=>_0x10ef56[_0x1dc841(0x176)]==='HOOK');if(!_0xd6009f)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x1e1d0b=loadAliasMap(_0x3a6b1f,undefined,resolveApiFilePath(_0x3a6b1f,_0x15c533)),_0x42efe5=new Map(_0x1e1d0b[_0x1dc841(0x1c5)](_0x1a7aac=>[_0x1a7aac['alias'],_0x1a7aac[_0x1dc841(0x1ab)]]));for(const _0x301661 of Object[_0x1dc841(0x19f)](_0x209422[_0x1dc841(0x19a)])){_0x301661['alias']&&_0x301661[_0x1dc841(0x1ab)]&&!_0x42efe5[_0x1dc841(0x1ac)](_0x301661['alias'])&&_0x42efe5[_0x1dc841(0x19c)](_0x301661[_0x1dc841(0x1a3)],_0x301661['datasetCode']);}const _0x90eaba=await listDatasets(_0x15c533),_0x306820=new Map(_0x90eaba[_0x1dc841(0x1c5)](_0x1d0fa4=>[_0x1d0fa4[_0x1dc841(0x1b6)],_0x1d0fa4]));return{'aliasToDatasetCode':_0x42efe5,'datasetCodeToDataset':_0x306820};}async function uploadSingleFunction(_0x4c395f,_0x2eb215,_0x120deb,_0x31972a){const _0x1a2e17=a38_0x27f1a4,_0x2673e2=await readFile(_0x2eb215['filePath'],_0x1a2e17(0x17d)),_0x8e4b54=await computeFileHash(_0x2eb215[_0x1a2e17(0x18e)]),_0x4c4610=_0x120deb['functions'][_0x2eb215[_0x1a2e17(0x1b4)]];if(_0x4c4610?.[_0x1a2e17(0x19d)]&&_0x4c4610[_0x1a2e17(0x1c0)]==null)throw CliErrors[_0x1a2e17(0x1a1)](_0x2eb215[_0x1a2e17(0x1b4)]+_0x1a2e17(0x185));let _0x2e70da=extractScriptDescription(_0x2673e2);if(!_0x2e70da&&_0x4c4610?.[_0x1a2e17(0x19d)]){const _0x3e6e1c=await getBffScriptInfo(_0x4c4610[_0x1a2e17(0x19d)]);_0x2e70da=_0x3e6e1c[_0x1a2e17(0x1b0)]||undefined;}const _0x48e15e={'appCode':_0x4c395f,'functionName':_0x2eb215['name'],'scriptType':_0x2eb215[_0x1a2e17(0x176)],'scriptContent':_0x2673e2};if(_0x4c4610?.[_0x1a2e17(0x19d)])_0x48e15e['id']=_0x4c4610[_0x1a2e17(0x19d)];if(_0x4c4610?.[_0x1a2e17(0x1c0)]!=null)_0x48e15e[_0x1a2e17(0x1c0)]=_0x4c4610['version'];if(_0x2e70da)_0x48e15e['description']=_0x2e70da;if(_0x2eb215['type']===_0x1a2e17(0x1b3)){const _0x3c9174=_0x2eb215[_0x1a2e17(0x1a3)];if(!_0x3c9174||!_0x2eb215[_0x1a2e17(0x17b)]||!_0x2eb215[_0x1a2e17(0x1bc)])throw CliErrors['validation'](_0x1a2e17(0x19b)+_0x2eb215['lockKey']);const _0x5f238b=_0x31972a['aliasToDatasetCode']['get'](_0x3c9174)??_0x4c4610?.[_0x1a2e17(0x1ab)]??_0x3c9174,_0x39488a=_0x31972a[_0x1a2e17(0x195)][_0x1a2e17(0x184)](_0x5f238b);if(!_0x39488a)throw CliErrors[_0x1a2e17(0x1a1)](_0x1a2e17(0x1a5)+_0x3c9174+_0x1a2e17(0x182)+('Run\x20`'+CLI_BIN_NAME+_0x1a2e17(0x1a4)));_0x48e15e[_0x1a2e17(0x1a2)]=_0x39488a['id'],_0x48e15e[_0x1a2e17(0x17b)]=_0x2eb215[_0x1a2e17(0x17b)],_0x48e15e[_0x1a2e17(0x1bc)]=_0x2eb215['functionNode'];}const _0x1ddc8f=await saveBffScript(_0x48e15e),_0x22d354=_0x1ddc8f['id'],_0x213d0d=_0x1ddc8f[_0x1a2e17(0x1bb)]??await getBffScriptInfo(_0x22d354),_0x2f823e={'hash':_0x8e4b54,'remoteId':_0x22d354,'version':_0x213d0d[_0x1a2e17(0x1c0)]};if(_0x2eb215[_0x1a2e17(0x176)]===_0x1a2e17(0x1b3)){const _0x3cf99b=_0x2eb215[_0x1a2e17(0x1a3)],_0x58eb38=_0x31972a[_0x1a2e17(0x196)][_0x1a2e17(0x184)](_0x3cf99b)??_0x4c4610?.['datasetCode']??_0x3cf99b;_0x31972a['aliasToDatasetCode']['has'](_0x3cf99b)?_0x2f823e[_0x1a2e17(0x1a3)]=_0x3cf99b:_0x2f823e[_0x1a2e17(0x1a3)]=_0x4c4610?.[_0x1a2e17(0x1a3)],_0x2f823e[_0x1a2e17(0x1ab)]=_0x58eb38,_0x2f823e[_0x1a2e17(0x17b)]=_0x2eb215[_0x1a2e17(0x17b)],_0x2f823e[_0x1a2e17(0x1bc)]=_0x2eb215[_0x1a2e17(0x1bc)];}_0x120deb[_0x1a2e17(0x19a)][_0x2eb215[_0x1a2e17(0x1b4)]]=_0x2f823e;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x4e1dc4,_0x581f55,_0x219bb6){const _0x483c73=a38_0x27f1a4;if(_0x219bb6['length']===0x0)return;for(let _0x13884b=0x0;_0x13884b<LOCK_SETTLE_RETRY_COUNT;_0x13884b+=0x1){const _0x302dfe=await readBffLockFile(_0x4e1dc4),_0x2eb09a=_0x302dfe?.[_0x483c73(0x192)]?.[_0x581f55]?.[_0x483c73(0x19a)]??{},_0x5183cd=_0x219bb6[_0x483c73(0x181)](_0x337e56=>!!_0x2eb09a[_0x337e56]?.[_0x483c73(0x19d)]);if(_0x5183cd)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x483c73(0x175)+_0x219bb6[_0x483c73(0x1af)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a39_0x5d129c=a39_0x55ba;(function(_0x426613,_0x45afaa){const _0x433174=a39_0x55ba,_0x44772d=_0x426613();while(!![]){try{const _0x4b64b9=parseInt(_0x433174(0x1dc))/0x1+parseInt(_0x433174(0x1e4))/0x2+-parseInt(_0x433174(0x1ee))/0x3+-parseInt(_0x433174(0x1e7))/0x4*(parseInt(_0x433174(0x1d8))/0x5)+-parseInt(_0x433174(0x1d4))/0x6*(-parseInt(_0x433174(0x1d2))/0x7)+parseInt(_0x433174(0x1e2))/0x8+-parseInt(_0x433174(0x1e8))/0x9;if(_0x4b64b9===_0x45afaa)break;else _0x44772d['push'](_0x44772d['shift']());}catch(_0x210caa){_0x44772d['push'](_0x44772d['shift']());}}}(a39_0xc268,0x75778));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a39_0x55ba(_0x14daa2,_0xee6873){_0x14daa2=_0x14daa2-0x1cf;const _0xc268e=a39_0xc268();let _0x55bab9=_0xc268e[_0x14daa2];return _0x55bab9;}function a39_0xc268(){const _0x281bea=['appCode','hash','datasetCode','10vdVfsO','\x20added,\x20','remote','lockFilePath','861374jOoPox','\x20unchanged','read','lockKey','bff','scriptsRoot','826256MNUvun','apiDir','1185822cypiBw','alias','has','943316SHfepV','6753915kgnEbc','bool','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','length','\x20modified,\x20','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','400149TVMsdC','filePath','map','functions','2527hZwQLM','push','4638VnapeZ'];a39_0xc268=function(){return _0x281bea;};return a39_0xc268();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a39_0x5d129c(0x1e0),'command':'status','description':a39_0x5d129c(0x1ed),'risk':a39_0x5d129c(0x1de),'flags':[{'name':'remote','type':'boolean','description':a39_0x5d129c(0x1ea)}],async 'execute'(_0x36efee){const _0x1615fa=a39_0x5d129c,_0x457a33=loadBffProjectConfig(_0x36efee[_0x1615fa(0x1d5)]),_0x2af399=await readBffLockFile(_0x457a33[_0x1615fa(0x1db)]),{appLock:_0x2b4d51}=ensureLockScope(_0x2af399??createEmptyBffLock(),_0x36efee['appCode'],_0x457a33[_0x1615fa(0x1e1)],'status'),_0x56b032=await scanLocalBffFunctions(_0x457a33),_0xac6544=[],_0x1d1784=[],_0x4f3b8f=[];for(const _0x7bca08 of _0x56b032){const _0x590426=await computeFileHash(_0x7bca08[_0x1615fa(0x1cf)]),_0x51b8ea=_0x2b4d51['functions'][_0x7bca08[_0x1615fa(0x1df)]];if(!_0x51b8ea)_0xac6544[_0x1615fa(0x1d3)](_0x7bca08['lockKey']);else _0x51b8ea[_0x1615fa(0x1d6)]!==_0x590426?_0x1d1784[_0x1615fa(0x1d3)](_0x7bca08[_0x1615fa(0x1df)]):_0x4f3b8f[_0x1615fa(0x1d3)](_0x7bca08['lockKey']);}const _0x24e106=[];if(_0x36efee[_0x1615fa(0x1e9)](_0x1615fa(0x1da))){const _0x5bb426=loadAliasMap(_0x36efee[_0x1615fa(0x1e3)],undefined,resolveApiFilePath(_0x36efee[_0x1615fa(0x1e3)],_0x36efee[_0x1615fa(0x1d5)])),_0x211ba0=new Map(_0x5bb426['map'](_0x7d705e=>[_0x7d705e[_0x1615fa(0x1d7)],_0x7d705e[_0x1615fa(0x1e5)]])),[_0x38e15a,_0x3c2258]=await Promise['all']([listBffScripts(_0x36efee[_0x1615fa(0x1d5)]),getBffScriptStatistics(_0x36efee['appCode'])]),_0xcd320a=createHookLocationMap(_0x3c2258),_0x27871f=new Set(_0x56b032[_0x1615fa(0x1d0)](_0x504cc8=>_0x504cc8[_0x1615fa(0x1df)]));for(const _0x247910 of _0x38e15a){const _0x347f86=resolveRemoteScriptTarget(_0x457a33,_0x247910,_0xcd320a,_0x2b4d51[_0x1615fa(0x1d1)],_0x211ba0);_0x347f86&&!_0x27871f[_0x1615fa(0x1e6)](_0x347f86['lockKey'])&&_0x24e106[_0x1615fa(0x1d3)](_0x347f86[_0x1615fa(0x1df)]);}}const _0x350eae=_0xac6544['length']===0x0&&_0x1d1784['length']===0x0&&_0x24e106['length']===0x0;return{'ok':!![],'data':{'added':_0xac6544,'modified':_0x1d1784,'unchanged':_0x4f3b8f,'remoteOnly':_0x24e106},'message':_0x350eae?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0xac6544[_0x1615fa(0x1eb)]+_0x1615fa(0x1d9)+_0x1d1784[_0x1615fa(0x1eb)]+_0x1615fa(0x1ec)+_0x4f3b8f[_0x1615fa(0x1eb)]+_0x1615fa(0x1dd)+(_0x24e106[_0x1615fa(0x1eb)]>0x0?',\x20'+_0x24e106[_0x1615fa(0x1eb)]+'\x20remote-only':'')};}};
1
+ function a39_0xea46(){const _0x995e7c=['1517810YYIXHh','datasetCode','28386TheFTK','275588wMXMeC','filePath','lockKey','status','\x20modified,\x20','hash','push','map','1184ySzTor','all','\x20added,\x20','2397250eviKuB','bool','49893YduDUG','scriptsRoot','19373544MUwGYL','4OvQIMc','functions','length','126pfQnem','\x20remote-only','read','33SKccpD','appCode','9FjvbkE','lockFilePath','All\x20BFF\x20scripts\x20are\x20in\x20sync.','bff','112986cfwCqa','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','remote'];a39_0xea46=function(){return _0x995e7c;};return a39_0xea46();}const a39_0x2589c1=a39_0x38cc;(function(_0xc91656,_0xd5bc2c){const _0x497e81=a39_0x38cc,_0x3f4b7a=_0xc91656();while(!![]){try{const _0x4dfe3=parseInt(_0x497e81(0xcc))/0x1*(-parseInt(_0x497e81(0xcf))/0x2)+parseInt(_0x497e81(0xd7))/0x3*(-parseInt(_0x497e81(0xe2))/0x4)+-parseInt(_0x497e81(0xca))/0x5+-parseInt(_0x497e81(0xdb))/0x6*(-parseInt(_0x497e81(0xd2))/0x7)+parseInt(_0x497e81(0xea))/0x8*(-parseInt(_0x497e81(0xe1))/0x9)+-parseInt(_0x497e81(0xdf))/0xa*(parseInt(_0x497e81(0xd5))/0xb)+parseInt(_0x497e81(0xce))/0xc;if(_0x4dfe3===_0xd5bc2c)break;else _0x3f4b7a['push'](_0x3f4b7a['shift']());}catch(_0x69a1e8){_0x3f4b7a['push'](_0x3f4b7a['shift']());}}}(a39_0xea46,0x3be6e));function a39_0x38cc(_0x4699e5,_0x450ddf){_0x4699e5=_0x4699e5-0xca;const _0xea4649=a39_0xea46();let _0x38cc83=_0xea4649[_0x4699e5];return _0x38cc83;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a39_0x2589c1(0xda),'command':'status','description':a39_0x2589c1(0xdd),'risk':a39_0x2589c1(0xd4),'flags':[{'name':a39_0x2589c1(0xde),'type':'boolean','description':a39_0x2589c1(0xdc)}],async 'execute'(_0xecc36c){const _0x18201c=a39_0x2589c1,_0x33829e=loadBffProjectConfig(_0xecc36c['appCode']),_0x51e76f=await readBffLockFile(_0x33829e[_0x18201c(0xd8)]),{appLock:_0x14cc54}=ensureLockScope(_0x51e76f??createEmptyBffLock(),_0xecc36c[_0x18201c(0xd6)],_0x33829e[_0x18201c(0xcd)],_0x18201c(0xe5)),_0xa8bda3=await scanLocalBffFunctions(_0x33829e),_0x555a7f=[],_0x5f36f3=[],_0x4d1858=[];for(const _0x1edcac of _0xa8bda3){const _0x43db8d=await computeFileHash(_0x1edcac[_0x18201c(0xe3)]),_0x3c5569=_0x14cc54['functions'][_0x1edcac[_0x18201c(0xe4)]];if(!_0x3c5569)_0x555a7f[_0x18201c(0xe8)](_0x1edcac[_0x18201c(0xe4)]);else _0x3c5569[_0x18201c(0xe7)]!==_0x43db8d?_0x5f36f3[_0x18201c(0xe8)](_0x1edcac[_0x18201c(0xe4)]):_0x4d1858[_0x18201c(0xe8)](_0x1edcac[_0x18201c(0xe4)]);}const _0x1c9860=[];if(_0xecc36c[_0x18201c(0xcb)](_0x18201c(0xde))){const _0x3284b4=loadAliasMap(_0xecc36c['apiDir'],undefined,resolveApiFilePath(_0xecc36c['apiDir'],_0xecc36c[_0x18201c(0xd6)])),_0x819ae8=new Map(_0x3284b4[_0x18201c(0xe9)](_0x19f2a1=>[_0x19f2a1[_0x18201c(0xe0)],_0x19f2a1['alias']])),[_0x5e7ec3,_0x408a63]=await Promise[_0x18201c(0xeb)]([listBffScripts(_0xecc36c[_0x18201c(0xd6)]),getBffScriptStatistics(_0xecc36c['appCode'])]),_0x3b49a3=createHookLocationMap(_0x408a63),_0x3492a9=new Set(_0xa8bda3['map'](_0x3dac23=>_0x3dac23[_0x18201c(0xe4)]));for(const _0x115684 of _0x5e7ec3){const _0x3ba0e9=resolveRemoteScriptTarget(_0x33829e,_0x115684,_0x3b49a3,_0x14cc54[_0x18201c(0xd0)],_0x819ae8);_0x3ba0e9&&!_0x3492a9['has'](_0x3ba0e9['lockKey'])&&_0x1c9860[_0x18201c(0xe8)](_0x3ba0e9[_0x18201c(0xe4)]);}}const _0x2c2906=_0x555a7f[_0x18201c(0xd1)]===0x0&&_0x5f36f3['length']===0x0&&_0x1c9860['length']===0x0;return{'ok':!![],'data':{'added':_0x555a7f,'modified':_0x5f36f3,'unchanged':_0x4d1858,'remoteOnly':_0x1c9860},'message':_0x2c2906?_0x18201c(0xd9):_0x555a7f[_0x18201c(0xd1)]+_0x18201c(0xec)+_0x5f36f3[_0x18201c(0xd1)]+_0x18201c(0xe6)+_0x4d1858[_0x18201c(0xd1)]+'\x20unchanged'+(_0x1c9860['length']>0x0?',\x20'+_0x1c9860[_0x18201c(0xd1)]+_0x18201c(0xd3):'')};}};
@@ -0,0 +1 @@
1
+ const a40_0x14bcca=a40_0x3e70;(function(_0x33a8d0,_0x11dc02){const _0x16a341=a40_0x3e70,_0x588c53=_0x33a8d0();while(!![]){try{const _0x3a2e20=-parseInt(_0x16a341(0x1af))/0x1+-parseInt(_0x16a341(0x1a7))/0x2+parseInt(_0x16a341(0x1b1))/0x3+parseInt(_0x16a341(0x1aa))/0x4*(parseInt(_0x16a341(0x1b3))/0x5)+parseInt(_0x16a341(0x1b0))/0x6+parseInt(_0x16a341(0x1a8))/0x7+-parseInt(_0x16a341(0x1b7))/0x8;if(_0x3a2e20===_0x11dc02)break;else _0x588c53['push'](_0x588c53['shift']());}catch(_0x245c21){_0x588c53['push'](_0x588c53['shift']());}}}(a40_0x23da,0xd9572));import{CliErrors}from'../../errors.js';function a40_0x3e70(_0x382eb3,_0x334b9d){_0x382eb3=_0x382eb3-0x1a2;const _0x23dab9=a40_0x23da();let _0x3e709c=_0x23dab9[_0x382eb3];return _0x3e709c;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':'install','description':a40_0x14bcca(0x1ae),'risk':a40_0x14bcca(0x1a2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x33ce9d){const _0x426f16=a40_0x14bcca;logger['setLogPath'](process[_0x426f16(0x1a9)]()),logger['info']('cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x23b259,RABETBASE_SKILL_SOURCE:_0x48bbd1,runNpxSkillsAddGlobal:_0x5abfc0}=await import(_0x426f16(0x1a3)),_0x4beca6=_0x33ce9d[_0x426f16(0x1a5)]?_0x426f16(0x1b6):'inherit';console[_0x426f16(0x1b2)](_0x426f16(0x1b5)+_0x23b259+_0x426f16(0x1b8));const _0x5746cf=_0x5abfc0(process[_0x426f16(0x1a9)](),_0x48bbd1,{'stdio':_0x4beca6});if(_0x5746cf[_0x426f16(0x1ab)])console[_0x426f16(0x1b2)](_0x426f16(0x1a4));else{if(_0x5746cf['ok'])console['log'](_0x426f16(0x1a6));else throw CliErrors['apiError'](_0x426f16(0x1ad)+(_0x5746cf[_0x426f16(0x1b9)]||_0x426f16(0x1ac)),_0x426f16(0x1b4)+_0x23b259);}return{'ok':!![]};}}];function a40_0x23da(){const _0xcc0f1c=['write','../../skills/npx-skills-add.js','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','nonInteractive','CLI\x20Built-in\x20Skill\x20installed','509736DQjCVR','9711555daVFRJ','cwd','4cVMurR','skipped','unknown','npx\x20skills\x20add\x20failed:\x20','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','571343fAjrhr','1341978JFWDBx','3273807jpDuOj','log','2209205GAEKJN','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','pipe','11421608hkZyPI',')...','error'];a40_0x23da=function(){return _0xcc0f1c;};return a40_0x23da();}
@@ -1 +1 @@
1
- const a40_0x8fd598=a40_0x4340;function a40_0x4340(_0x1abfdf,_0x1a0fcc){_0x1abfdf=_0x1abfdf-0x189;const _0x1dedbd=a40_0x1ded();let _0x434027=_0x1dedbd[_0x1abfdf];return _0x434027;}(function(_0x43d68e,_0x2d5f78){const _0x48e786=a40_0x4340,_0x37311c=_0x43d68e();while(!![]){try{const _0x302415=-parseInt(_0x48e786(0x1b7))/0x1*(parseInt(_0x48e786(0x1a4))/0x2)+-parseInt(_0x48e786(0x1ab))/0x3*(parseInt(_0x48e786(0x189))/0x4)+parseInt(_0x48e786(0x1be))/0x5*(parseInt(_0x48e786(0x1bf))/0x6)+-parseInt(_0x48e786(0x1b1))/0x7+parseInt(_0x48e786(0x1aa))/0x8*(parseInt(_0x48e786(0x1d1))/0x9)+parseInt(_0x48e786(0x1a0))/0xa+parseInt(_0x48e786(0x19d))/0xb;if(_0x302415===_0x2d5f78)break;else _0x37311c['push'](_0x37311c['shift']());}catch(_0x758625){_0x37311c['push'](_0x37311c['shift']());}}}(a40_0x1ded,0xefee1));import a40_0x66258d from'chalk';import a40_0x13385b from'ora';import a40_0x5f3711 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x2a05a6=a40_0x4340;return GIT_COMMIT!==_0x2a05a6(0x19e)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2a05a6(0x1b4)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x65ebef=a40_0x4340,_0x4e19bf=process[_0x65ebef(0x196)][_0x65ebef(0x1bd)]();if(_0x4e19bf[_0x65ebef(0x18b)](_0x65ebef(0x1ce)))return _0x65ebef(0x1ce);return'npm';}const updateFlags=[{'name':'beta','type':a40_0x8fd598(0x18e),'description':a40_0x8fd598(0x1b6),'default':![]},{'name':'version','type':a40_0x8fd598(0x1ae),'description':a40_0x8fd598(0x1a2)},{'name':a40_0x8fd598(0x1c2),'type':a40_0x8fd598(0x18e),'description':a40_0x8fd598(0x1ac),'default':![]},{'name':a40_0x8fd598(0x1a9),'type':a40_0x8fd598(0x18e),'description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x2219c4){const _0x29fb05=a40_0x8fd598;return _0x2219c4[_0x29fb05(0x1b9)](_0x29fb05(0x194))[_0x29fb05(0x199)]();}function shouldSkipOfficialSkill(_0x30e70d){const _0x45533e=a40_0x8fd598;return _0x30e70d[_0x45533e(0x1c3)]('no-skills')||_0x30e70d[_0x45533e(0x1c4)]('skills')===![];}async function validateUpdateFlags(_0x4188b7){const _0x5de750=a40_0x8fd598,_0x359677=_0x4188b7[_0x5de750(0x1c3)](_0x5de750(0x1a5)),_0x223402=getRequestedVersion(_0x4188b7);if(_0x359677&&_0x223402)throw CliErrors[_0x5de750(0x19b)](_0x5de750(0x1bb),_0x5de750(0x1c7));if(_0x223402&&!a40_0x5f3711['valid'](_0x223402))throw CliErrors[_0x5de750(0x19b)]('Invalid\x20version:\x20'+_0x223402,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0xf8a506=a40_0x8fd598;try{const _0x43b4a9=await fetch(_0xf8a506(0x1cc)+encodeURIComponent(NPM_PACKAGE_NAME)+_0xf8a506(0x1bc),{'signal':AbortSignal[_0xf8a506(0x18f)](0x2710)});if(!_0x43b4a9['ok'])return null;const _0x234b02=await _0x43b4a9[_0xf8a506(0x1c1)]();if(!_0x234b02||typeof _0x234b02!==_0xf8a506(0x18c))return null;return Object['fromEntries'](Object['entries'](_0x234b02)['filter'](([,_0x4cfc88])=>typeof _0x4cfc88==='string'&&_0x4cfc88['trim']()['length']>0x0)[_0xf8a506(0x1d3)](([_0x337734,_0x18d055])=>[_0x337734,String(_0x18d055)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x54f069){const _0x96ac2f=await fetchNpmDistTags();return _0x96ac2f?.[_0x54f069]??null;}function a40_0x1ded(){const _0x5a579f=['Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','boolean','timeout','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','install','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','inherit','version','pipe','execPath','\x20→\x20','Requested\x20version:\x20','trim','fail','validation','message','28248253MYkbdH','unknown','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','6872510wiapkn','yellow','Install\x20a\x20specific\x20CLI\x20version','Update\x20available:\x20','50564puCFPX','beta','Checking\x20official\x20skill\x20package...','green','log','skills','10069432cTVLDD','244227KjmFEJ','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','warn','string','nonInteractive','gray','11924829VROMbx','succeed','error','slice','\x20\x20Try\x20manually:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','66uYAvsP','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','str','npm','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','/dist-tags','toLowerCase','1655ZJAolx','11874GtaRQU','write','json','no-skills','bool','flag','Skipping\x20official\x20skill\x20package\x20(--no-skills).','source','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Version\x20comparison\x20failed','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','Updated\x20to\x20v','Checking\x20for\x20updates...','https://registry.npmjs.org/-/package/','run','bun','\x20\x20Official\x20skill\x20update\x20failed:\x20','info','9kvFbwS','latest','map','...','40IsnXNV','start','includes','object'];a40_0x1ded=function(){return _0x5a579f;};return a40_0x1ded();}async function fetchLatestVersion(){const _0x1094a0=a40_0x8fd598;return fetchNpmDistTagVersion(_0x1094a0(0x1d2));}async function resolveTargetVersion(_0x1af967){const _0x5bdd34=a40_0x8fd598,_0x52117e=getRequestedVersion(_0x1af967);if(_0x52117e)return{'version':_0x52117e,'source':_0x5bdd34(0x194)};if(_0x1af967[_0x5bdd34(0x1c3)](_0x5bdd34(0x1a5))){const _0x3f9886=await fetchNpmDistTagVersion(_0x5bdd34(0x1a5));if(!_0x3f9886)return null;return{'version':_0x3f9886,'source':_0x5bdd34(0x1a5)};}const _0x2dbf0d=await fetchLatestVersion();if(!_0x2dbf0d)return null;return{'version':_0x2dbf0d,'source':_0x5bdd34(0x1d2)};}function shouldInstallTarget(_0x5a3362,_0x43ff92){const _0x57d0df=a40_0x8fd598;if(_0x43ff92['source']==='version'||_0x43ff92['source']===_0x57d0df(0x1a5))return!a40_0x5f3711['eq'](_0x5a3362,_0x43ff92['version']);return a40_0x5f3711['lt'](_0x5a3362,_0x43ff92['version']);}function getInstallPlanLabel(_0x5b384e,_0x2a8601){const _0x5714f5=a40_0x8fd598;switch(_0x2a8601[_0x5714f5(0x1c6)]){case'beta':return'Beta\x20version:\x20'+a40_0x66258d['yellow'](_0x5b384e)+'\x20→\x20'+a40_0x66258d[_0x5714f5(0x1a7)](_0x2a8601[_0x5714f5(0x194)]);case _0x5714f5(0x194):return _0x5714f5(0x198)+a40_0x66258d[_0x5714f5(0x1a1)](_0x5b384e)+_0x5714f5(0x197)+a40_0x66258d[_0x5714f5(0x1a7)](_0x2a8601[_0x5714f5(0x194)]);case _0x5714f5(0x1d2):default:return _0x5714f5(0x1a3)+a40_0x66258d[_0x5714f5(0x1a1)](_0x5b384e)+_0x5714f5(0x197)+a40_0x66258d[_0x5714f5(0x1a7)](_0x2a8601[_0x5714f5(0x194)]);}}async function installOfficialSkill(_0x480904){const _0x56e0c8=a40_0x8fd598;console['log'](a40_0x66258d[_0x56e0c8(0x1b0)](_0x56e0c8(0x1a6)));const _0x571595=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x480904?_0x56e0c8(0x195):_0x56e0c8(0x193)});if(_0x571595['skipped']){console['log'](a40_0x66258d[_0x56e0c8(0x1b0)](_0x56e0c8(0x19f)));return;}if(_0x571595['ok']){console[_0x56e0c8(0x1a8)](a40_0x66258d[_0x56e0c8(0x1b0)](_0x56e0c8(0x1c9)));return;}console[_0x56e0c8(0x1ad)](a40_0x66258d[_0x56e0c8(0x1a1)](_0x56e0c8(0x1cf)+(_0x571595[_0x56e0c8(0x1b3)]||_0x56e0c8(0x19e)))),console[_0x56e0c8(0x1a8)](a40_0x66258d[_0x56e0c8(0x1b0)]('\x20\x20Run\x20manually:\x20'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x468f01){const _0x332b6f=a40_0x8fd598;await validateUpdateFlags(_0x468f01);const _0x38be87=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x38be87);const _0x3562e2=a40_0x13385b(_0x332b6f(0x1cb))['start'](),_0x910eeb=await resolveTargetVersion(_0x468f01);if(!_0x910eeb){const _0x478f8a=_0x468f01[_0x332b6f(0x1c3)]('beta')?_0x332b6f(0x1b8):_0x332b6f(0x192);return _0x3562e2[_0x332b6f(0x19a)](_0x478f8a),console[_0x332b6f(0x1a8)](a40_0x66258d[_0x332b6f(0x1b0)](_0x332b6f(0x190)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x478f8a};}const _0x5b9661=a40_0x5f3711['valid'](VERSION),_0x529460=a40_0x5f3711['valid'](_0x910eeb['version']);if(!_0x5b9661||!_0x529460)return _0x3562e2[_0x332b6f(0x19a)](_0x332b6f(0x1c8)),{'ok':![],'message':_0x332b6f(0x1c8)};if(!shouldInstallTarget(_0x5b9661,_0x910eeb)){const _0x20eb3f=_0x910eeb[_0x332b6f(0x1c6)]==='version'?'Already\x20on\x20requested\x20version\x20(v'+_0x910eeb['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x910eeb[_0x332b6f(0x194)]+')';return _0x3562e2[_0x332b6f(0x1b2)](_0x20eb3f),shouldSkipOfficialSkill(_0x468f01)?console[_0x332b6f(0x1a8)](a40_0x66258d['gray'](_0x332b6f(0x1c5))):await installOfficialSkill(_0x468f01[_0x332b6f(0x1af)]),{'ok':!![]};}_0x3562e2[_0x332b6f(0x1d0)](getInstallPlanLabel(_0x38be87,_0x910eeb));const _0x966377=detectPackageManager(),_0x1c8c41=_0x966377===_0x332b6f(0x1ba)?resolveNpmBin(_0x332b6f(0x1ba)):_0x966377,_0x267ac3=a40_0x13385b('Updating\x20via\x20'+_0x966377+_0x332b6f(0x1d4))[_0x332b6f(0x18a)]();try{return await execa(_0x1c8c41,[_0x332b6f(0x191),'-g',NPM_PACKAGE_NAME+'@'+_0x910eeb['version']],{'stdio':_0x332b6f(0x195)}),_0x267ac3['succeed'](_0x332b6f(0x1ca)+_0x910eeb[_0x332b6f(0x194)]),console['log'](a40_0x66258d[_0x332b6f(0x1b0)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipOfficialSkill(_0x468f01)?console['log'](a40_0x66258d[_0x332b6f(0x1b0)](_0x332b6f(0x1c5))):await installOfficialSkill(_0x468f01[_0x332b6f(0x1af)]),{'ok':!![]};}catch(_0x98715e){return _0x267ac3[_0x332b6f(0x19a)]('Update\x20failed'),console['error'](a40_0x66258d['red']('\x20\x20'+_0x98715e['message'])),console['log'](a40_0x66258d[_0x332b6f(0x1b0)](_0x332b6f(0x1b5)+_0x966377+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x910eeb['version'])),{'ok':![],'message':_0x98715e[_0x332b6f(0x19c)]};}}export const updateDefinition={'service':'update','command':a40_0x8fd598(0x1cd),'description':a40_0x8fd598(0x18d),'risk':a40_0x8fd598(0x1c0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a41_0x23e2a8=a41_0x2813;function a41_0x2813(_0x3c15a4,_0x314f6a){_0x3c15a4=_0x3c15a4-0x6a;const _0x4407cd=a41_0x4407();let _0x281390=_0x4407cd[_0x3c15a4];return _0x281390;}(function(_0xacb301,_0x47064a){const _0x2c7796=a41_0x2813,_0x3527bf=_0xacb301();while(!![]){try{const _0x2b27a7=-parseInt(_0x2c7796(0xb9))/0x1*(parseInt(_0x2c7796(0xb7))/0x2)+-parseInt(_0x2c7796(0xbc))/0x3*(parseInt(_0x2c7796(0x8b))/0x4)+parseInt(_0x2c7796(0xa8))/0x5+parseInt(_0x2c7796(0x76))/0x6+parseInt(_0x2c7796(0xad))/0x7*(parseInt(_0x2c7796(0xb6))/0x8)+parseInt(_0x2c7796(0xa7))/0x9+-parseInt(_0x2c7796(0xa0))/0xa;if(_0x2b27a7===_0x47064a)break;else _0x3527bf['push'](_0x3527bf['shift']());}catch(_0x3c45ab){_0x3527bf['push'](_0x3527bf['shift']());}}}(a41_0x4407,0x2bc32));import a41_0x2f524c from'chalk';import a41_0x18fa42 from'ora';import a41_0x5ddc38 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x2d7e58=a41_0x2813;return GIT_COMMIT!==_0x2d7e58(0x85)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x558445=a41_0x2813,_0x3d5d0b=process[_0x558445(0x94)][_0x558445(0x74)]();if(_0x3d5d0b[_0x558445(0xac)](_0x558445(0x84)))return _0x558445(0x84);return'npm';}const updateFlags=[{'name':a41_0x23e2a8(0x6c),'type':'boolean','description':a41_0x23e2a8(0x78),'default':![]},{'name':a41_0x23e2a8(0xbd),'type':a41_0x23e2a8(0xaa),'description':a41_0x23e2a8(0x9f)},{'name':a41_0x23e2a8(0x73),'type':a41_0x23e2a8(0x89),'description':a41_0x23e2a8(0x86),'default':![]},{'name':a41_0x23e2a8(0x7c),'type':a41_0x23e2a8(0x89),'description':a41_0x23e2a8(0x8a),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x43b44d){const _0x25c2ce=a41_0x23e2a8;return _0x43b44d[_0x25c2ce(0x99)]('version')['trim']();}function shouldSkipCliSkill(_0x37d153){const _0x3bc1e9=a41_0x23e2a8;return _0x37d153['bool']('no-skills')||_0x37d153[_0x3bc1e9(0x75)](_0x3bc1e9(0x7c))===![];}async function validateUpdateFlags(_0x4ff4ea){const _0x27ed36=a41_0x23e2a8,_0x2e5dd5=_0x4ff4ea['bool'](_0x27ed36(0x6c)),_0x50b684=getRequestedVersion(_0x4ff4ea);if(_0x2e5dd5&&_0x50b684)throw CliErrors[_0x27ed36(0x92)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x27ed36(0x6f));if(_0x50b684&&!a41_0x5ddc38[_0x27ed36(0x71)](_0x50b684))throw CliErrors[_0x27ed36(0x92)](_0x27ed36(0x8d)+_0x50b684,_0x27ed36(0x98));}function a41_0x4407(){const _0x3d3159=['Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Checking\x20for\x20updates...','error','Beta\x20version:\x20','skills','inherit','Checking\x20CLI\x20Built-in\x20Skill...','skipped','map','log','succeed','/dist-tags','bun','unknown','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','Updated\x20to\x20v','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','boolean','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','1404sRgBjt','timeout','Invalid\x20version:\x20','green','npm','message','yellow','validation','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','execPath','fromEntries','object','@latest','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','str','write','length','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Update\x20available:\x20','run','Install\x20a\x20specific\x20CLI\x20version','8350010SNhHrt','cwd','bool','Current\x20version:\x20','trim','latest','entries','1702341UgCDKX','1456105wgcSqe','\x20\x20Try\x20manually:\x20','string','pipe','includes','9877bMdZgS','\x20\x20Run\x20manually:\x20','filter','https://registry.npmjs.org/-/package/','Requested\x20version:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','fail','Already\x20up\x20to\x20date\x20(v','gray','1952JqjXcg','62eRuyrH','Updating\x20via\x20','2841Exdrji','source','start','546IJkIeC','version','warn','info','beta','...','update','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','nonInteractive','valid','\x20→\x20','no-skills','toLowerCase','flag','2049300BQfnyx','Version\x20comparison\x20failed'];a41_0x4407=function(){return _0x3d3159;};return a41_0x4407();}async function fetchNpmDistTags(){const _0x7fc89a=a41_0x23e2a8;try{const _0x3389c8=await fetch(_0x7fc89a(0xb0)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x7fc89a(0x83),{'signal':AbortSignal[_0x7fc89a(0x8c)](0x2710)});if(!_0x3389c8['ok'])return null;const _0x441ae1=await _0x3389c8['json']();if(!_0x441ae1||typeof _0x441ae1!==_0x7fc89a(0x96))return null;return Object[_0x7fc89a(0x95)](Object[_0x7fc89a(0xa6)](_0x441ae1)[_0x7fc89a(0xaf)](([,_0x38116e])=>typeof _0x38116e===_0x7fc89a(0xaa)&&_0x38116e[_0x7fc89a(0xa4)]()[_0x7fc89a(0x9b)]>0x0)[_0x7fc89a(0x80)](([_0x49e7cd,_0x4c09f5])=>[_0x49e7cd,String(_0x4c09f5)[_0x7fc89a(0xa4)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0xaded94){const _0x46b23a=await fetchNpmDistTags();return _0x46b23a?.[_0xaded94]??null;}async function fetchLatestVersion(){const _0xf844a0=a41_0x23e2a8;return fetchNpmDistTagVersion(_0xf844a0(0xa5));}async function resolveTargetVersion(_0x50f583){const _0x4a59c4=a41_0x23e2a8,_0x1d2e8b=getRequestedVersion(_0x50f583);if(_0x1d2e8b)return{'version':_0x1d2e8b,'source':_0x4a59c4(0xbd)};if(_0x50f583[_0x4a59c4(0xa2)](_0x4a59c4(0x6c))){const _0x126400=await fetchNpmDistTagVersion(_0x4a59c4(0x6c));if(!_0x126400)return null;return{'version':_0x126400,'source':_0x4a59c4(0x6c)};}const _0x52071d=await fetchLatestVersion();if(!_0x52071d)return null;return{'version':_0x52071d,'source':_0x4a59c4(0xa5)};}function shouldInstallTarget(_0x2ce5a2,_0x77e5e9){const _0x30638f=a41_0x23e2a8;if(_0x77e5e9[_0x30638f(0xba)]===_0x30638f(0xbd)||_0x77e5e9[_0x30638f(0xba)]===_0x30638f(0x6c))return!a41_0x5ddc38['eq'](_0x2ce5a2,_0x77e5e9[_0x30638f(0xbd)]);return a41_0x5ddc38['lt'](_0x2ce5a2,_0x77e5e9['version']);}function getInstallPlanLabel(_0x21108c,_0x30470a){const _0x3150b4=a41_0x23e2a8;switch(_0x30470a[_0x3150b4(0xba)]){case _0x3150b4(0x6c):return _0x3150b4(0x7b)+a41_0x2f524c[_0x3150b4(0x91)](_0x21108c)+_0x3150b4(0x72)+a41_0x2f524c['green'](_0x30470a[_0x3150b4(0xbd)]);case _0x3150b4(0xbd):return _0x3150b4(0xb1)+a41_0x2f524c[_0x3150b4(0x91)](_0x21108c)+'\x20→\x20'+a41_0x2f524c['green'](_0x30470a[_0x3150b4(0xbd)]);case _0x3150b4(0xa5):default:return _0x3150b4(0x9d)+a41_0x2f524c[_0x3150b4(0x91)](_0x21108c)+'\x20→\x20'+a41_0x2f524c[_0x3150b4(0x8e)](_0x30470a['version']);}}async function installCliSkill(_0x5373bc){const _0x14e8e0=a41_0x23e2a8;console[_0x14e8e0(0x81)](a41_0x2f524c[_0x14e8e0(0xb5)](_0x14e8e0(0x7e)));const _0x4f2ad7=runNpxSkillsAddGlobal(process[_0x14e8e0(0xa1)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5373bc?_0x14e8e0(0xab):_0x14e8e0(0x7d)});if(_0x4f2ad7[_0x14e8e0(0x7f)]){console[_0x14e8e0(0x81)](a41_0x2f524c[_0x14e8e0(0xb5)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x4f2ad7['ok']){console['log'](a41_0x2f524c[_0x14e8e0(0xb5)](_0x14e8e0(0x9c)));return;}console[_0x14e8e0(0x6a)](a41_0x2f524c['yellow']('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x4f2ad7['error']||'unknown'))),console[_0x14e8e0(0x81)](a41_0x2f524c[_0x14e8e0(0xb5)](_0x14e8e0(0xae)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x38607e){const _0x271631=a41_0x23e2a8;await validateUpdateFlags(_0x38607e);const _0x2e1006=getCurrentVersion();console[_0x271631(0x81)](_0x271631(0xa3)+_0x2e1006);const _0x5157fd=a41_0x18fa42(_0x271631(0x79))['start'](),_0x809538=await resolveTargetVersion(_0x38607e);if(!_0x809538){const _0x5da65d=_0x38607e[_0x271631(0xa2)](_0x271631(0x6c))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x271631(0xb2);return _0x5157fd[_0x271631(0xb3)](_0x5da65d),console[_0x271631(0x81)](a41_0x2f524c['gray']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x271631(0x97))),{'ok':![],'message':_0x5da65d};}const _0x1d64ac=a41_0x5ddc38[_0x271631(0x71)](VERSION),_0x2d2ce0=a41_0x5ddc38[_0x271631(0x71)](_0x809538[_0x271631(0xbd)]);if(!_0x1d64ac||!_0x2d2ce0)return _0x5157fd[_0x271631(0xb3)](_0x271631(0x77)),{'ok':![],'message':_0x271631(0x77)};if(!shouldInstallTarget(_0x1d64ac,_0x809538)){const _0x33314f=_0x809538[_0x271631(0xba)]===_0x271631(0xbd)?'Already\x20on\x20requested\x20version\x20(v'+_0x809538[_0x271631(0xbd)]+')':_0x271631(0xb4)+_0x809538[_0x271631(0xbd)]+')';return _0x5157fd[_0x271631(0x82)](_0x33314f),shouldSkipCliSkill(_0x38607e)?console[_0x271631(0x81)](a41_0x2f524c[_0x271631(0xb5)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x38607e['nonInteractive']),{'ok':!![]};}_0x5157fd[_0x271631(0x6b)](getInstallPlanLabel(_0x2e1006,_0x809538));const _0x2b0615=detectPackageManager(),_0x22df43=_0x2b0615===_0x271631(0x8f)?resolveNpmBin(_0x271631(0x8f)):_0x2b0615,_0x3603a3=a41_0x18fa42(_0x271631(0xb8)+_0x2b0615+_0x271631(0x6d))[_0x271631(0xbb)]();try{return await execa(_0x22df43,['install','-g',NPM_PACKAGE_NAME+'@'+_0x809538[_0x271631(0xbd)]],{'stdio':_0x271631(0xab)}),_0x3603a3[_0x271631(0x82)](_0x271631(0x87)+_0x809538['version']),console[_0x271631(0x81)](a41_0x2f524c[_0x271631(0xb5)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x38607e)?console[_0x271631(0x81)](a41_0x2f524c[_0x271631(0xb5)](_0x271631(0x88))):await installCliSkill(_0x38607e[_0x271631(0x70)]),{'ok':!![]};}catch(_0x4bab76){return _0x3603a3[_0x271631(0xb3)]('Update\x20failed'),console[_0x271631(0x7a)](a41_0x2f524c['red']('\x20\x20'+_0x4bab76['message'])),console[_0x271631(0x81)](a41_0x2f524c[_0x271631(0xb5)](_0x271631(0xa9)+_0x2b0615+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x809538[_0x271631(0xbd)])),{'ok':![],'message':_0x4bab76[_0x271631(0x90)]};}}export const updateDefinition={'service':a41_0x23e2a8(0x6e),'command':a41_0x23e2a8(0x9e),'description':a41_0x23e2a8(0x93),'risk':a41_0x23e2a8(0x9a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x503e49,_0x133e9c){const _0x37e6b5=a41_0x2642,_0x43fb4d=_0x503e49();while(!![]){try{const _0x338132=parseInt(_0x37e6b5(0x155))/0x1+parseInt(_0x37e6b5(0x153))/0x2+-parseInt(_0x37e6b5(0x156))/0x3+-parseInt(_0x37e6b5(0x158))/0x4*(-parseInt(_0x37e6b5(0x159))/0x5)+-parseInt(_0x37e6b5(0x157))/0x6+-parseInt(_0x37e6b5(0x154))/0x7+parseInt(_0x37e6b5(0x15a))/0x8;if(_0x338132===_0x133e9c)break;else _0x43fb4d['push'](_0x43fb4d['shift']());}catch(_0x4020be){_0x43fb4d['push'](_0x43fb4d['shift']());}}}(a41_0x59fb,0xc34ea));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x2642(_0x1bd453,_0x3aeccc){_0x1bd453=_0x1bd453-0x153;const _0x59fbe0=a41_0x59fb();let _0x26423c=_0x59fbe0[_0x1bd453];return _0x26423c;}function a41_0x59fb(){const _0x4feb0f=['556394fOGVpf','3779739QgmKWZ','2193870tWdsol','65180JxHBwl','170kOFpBO','9449504SHLEFZ','2000578KDQQHe','6064555vXDqQa'];a41_0x59fb=function(){return _0x4feb0f;};return a41_0x59fb();}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a42_0x71db(){const _0x4c8f69=['3570UFgNET','3173862sLPXEd','1392688LnjRiV','1250565vnurRW','974292huNggZ','1736SWDMiU','28395384kfNDle','3928008hUOfSv'];a42_0x71db=function(){return _0x4c8f69;};return a42_0x71db();}(function(_0x49f558,_0x202ff7){const _0x3c5ea2=a42_0x76a9,_0x3c2ca0=_0x49f558();while(!![]){try{const _0x38aacb=-parseInt(_0x3c5ea2(0xab))/0x1+parseInt(_0x3c5ea2(0xad))/0x2+-parseInt(_0x3c5ea2(0xac))/0x3+parseInt(_0x3c5ea2(0xa6))/0x4*(-parseInt(_0x3c5ea2(0xa9))/0x5)+-parseInt(_0x3c5ea2(0xaa))/0x6+-parseInt(_0x3c5ea2(0xa8))/0x7+parseInt(_0x3c5ea2(0xa7))/0x8;if(_0x38aacb===_0x202ff7)break;else _0x3c2ca0['push'](_0x3c2ca0['shift']());}catch(_0x3101c7){_0x3c2ca0['push'](_0x3c2ca0['shift']());}}}(a42_0x71db,0xc9e95));import{codegenSdk}from'../../commands/codegen/sdk.js';function a42_0x76a9(_0x39d01c,_0x1c8dc1){_0x39d01c=_0x39d01c-0xa6;const _0x71db=a42_0x71db();let _0x76a9d=_0x71db[_0x39d01c];return _0x76a9d;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a42_0xa6011d=a42_0x3f88;(function(_0x3a849a,_0x119e0d){const _0x5a7edb=a42_0x3f88,_0x1f01d8=_0x3a849a();while(!![]){try{const _0x411df6=-parseInt(_0x5a7edb(0xd0))/0x1*(parseInt(_0x5a7edb(0xc9))/0x2)+-parseInt(_0x5a7edb(0xcb))/0x3*(-parseInt(_0x5a7edb(0xc7))/0x4)+-parseInt(_0x5a7edb(0xd5))/0x5+parseInt(_0x5a7edb(0xd3))/0x6*(-parseInt(_0x5a7edb(0xcc))/0x7)+-parseInt(_0x5a7edb(0xbc))/0x8+-parseInt(_0x5a7edb(0xbb))/0x9*(-parseInt(_0x5a7edb(0xca))/0xa)+-parseInt(_0x5a7edb(0xc5))/0xb*(-parseInt(_0x5a7edb(0xcd))/0xc);if(_0x411df6===_0x119e0d)break;else _0x1f01d8['push'](_0x1f01d8['shift']());}catch(_0x1c7cd9){_0x1f01d8['push'](_0x1f01d8['shift']());}}}(a42_0x2fd7,0x4fa88));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x3f88(_0x2d9a4e,_0x778c87){_0x2d9a4e=_0x2d9a4e-0xba;const _0x2fd742=a42_0x2fd7();let _0x3f8898=_0x2fd742[_0x2d9a4e];return _0x3f8898;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x2fd7(){const _0x7f8cc5=['sdk','name','71kJhcOU','boolean','tableName','1491822QgTYZN','Omit\x20import\x20statements\x20from\x20generated\x20code','930615TsGHDx','bool','3997881nlGurB','3793640BvrUmy','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','code','string','read','alias','skip-imports','22kRyeLr','operation','11576djQFwa','str','844yDAiIV','10vozgLq','453wyxuuE','7wSYfpX','2304024qGrdcE'];a42_0x2fd7=function(){return _0x7f8cc5;};return a42_0x2fd7();}export const codegenSdk={'service':'codegen','command':a42_0xa6011d(0xce),'description':a42_0xa6011d(0xbf),'risk':a42_0xa6011d(0xc2),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0xa6011d(0xc3),'type':'string','description':a42_0xa6011d(0xbd)},{'name':a42_0xa6011d(0xc6),'type':a42_0xa6011d(0xc1),'required':!![],'description':a42_0xa6011d(0xbe)},{'name':a42_0xa6011d(0xc4),'type':a42_0xa6011d(0xd1),'description':a42_0xa6011d(0xd4)}],async 'execute'(_0x2b9276){const _0x198aaf=a42_0xa6011d,{dataset:_0x1090b3,operation:_0x29a233}=await getOperationDetail(_0x2b9276['appCode'],_0x2b9276[_0x198aaf(0xc8)](_0x198aaf(0xc0)),_0x2b9276[_0x198aaf(0xc8)](_0x198aaf(0xc6))),_0xb869da=generateSdkCode(_0x1090b3,_0x29a233,{'includeImports':!_0x2b9276[_0x198aaf(0xba)](_0x198aaf(0xc4))});return{'ok':!![],'data':{'dataset':{'name':_0x1090b3[_0x198aaf(0xcf)],'code':_0x1090b3[_0x198aaf(0xc0)],'tableName':_0x1090b3[_0x198aaf(0xd2)]},'operation':_0x2b9276[_0x198aaf(0xc8)]('operation'),'code':_0xb869da}};}};
1
+ function a43_0x3243(){const _0x4aaadc=['7774986sGnkDF','skip-imports','alias','string','7NnMPvt','codegen','read','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','sdk','code','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','tableName','31280823fiXIzM','operation','appCode','1160734aCqELK','str','boolean','4wYwgbO','10454224TkwusI','2133350sSDvvb','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','4777560UpcMic','4171041WvjiXm','Omit\x20import\x20statements\x20from\x20generated\x20code'];a43_0x3243=function(){return _0x4aaadc;};return a43_0x3243();}const a43_0x1c005b=a43_0x4194;(function(_0x52cf00,_0x6fc26d){const _0x17572a=a43_0x4194,_0x3a6edd=_0x52cf00();while(!![]){try{const _0x3a549a=parseInt(_0x17572a(0x14a))/0x1+parseInt(_0x17572a(0x14f))/0x2+-parseInt(_0x17572a(0x152))/0x3+parseInt(_0x17572a(0x14d))/0x4*(-parseInt(_0x17572a(0x151))/0x5)+-parseInt(_0x17572a(0x154))/0x6+parseInt(_0x17572a(0x158))/0x7*(-parseInt(_0x17572a(0x14e))/0x8)+parseInt(_0x17572a(0x147))/0x9;if(_0x3a549a===_0x6fc26d)break;else _0x3a6edd['push'](_0x3a6edd['shift']());}catch(_0x4c21ba){_0x3a6edd['push'](_0x3a6edd['shift']());}}}(a43_0x3243,0xb839c));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a43_0x4194(_0x23189b,_0x2de75d){_0x23189b=_0x23189b-0x142;const _0x3243aa=a43_0x3243();let _0x41945e=_0x3243aa[_0x23189b];return _0x41945e;}export const codegenSdk={'service':a43_0x1c005b(0x159),'command':a43_0x1c005b(0x143),'description':a43_0x1c005b(0x142),'risk':a43_0x1c005b(0x15a),'flags':[CODE_FLAG_OPTIONAL,{'name':a43_0x1c005b(0x156),'type':a43_0x1c005b(0x157),'description':a43_0x1c005b(0x145)},{'name':a43_0x1c005b(0x148),'type':'string','required':!![],'description':a43_0x1c005b(0x150)},{'name':a43_0x1c005b(0x155),'type':a43_0x1c005b(0x14c),'description':a43_0x1c005b(0x153)}],async 'execute'(_0x41dec0){const _0x2937fb=a43_0x1c005b,{dataset:_0x500ef7,operation:_0x1f2b60}=await getOperationDetail(_0x41dec0[_0x2937fb(0x149)],_0x41dec0[_0x2937fb(0x14b)](_0x2937fb(0x144)),_0x41dec0[_0x2937fb(0x14b)](_0x2937fb(0x148))),_0x380d35=generateSdkCode(_0x500ef7,_0x1f2b60,{'includeImports':!_0x41dec0['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x500ef7['name'],'code':_0x500ef7[_0x2937fb(0x144)],'tableName':_0x500ef7[_0x2937fb(0x146)]},'operation':_0x41dec0[_0x2937fb(0x14b)](_0x2937fb(0x148)),'code':_0x380d35}};}};
@@ -1 +1 @@
1
- const a43_0xa242e9=a43_0x13ee;function a43_0x13ee(_0x311f30,_0x27be8a){_0x311f30=_0x311f30-0x1c4;const _0x5a94d1=a43_0x5a94();let _0x13ee8a=_0x5a94d1[_0x311f30];return _0x13ee8a;}(function(_0x18d61d,_0x24bdad){const _0x2fedc5=a43_0x13ee,_0x1f3ceb=_0x18d61d();while(!![]){try{const _0x50bfbb=-parseInt(_0x2fedc5(0x1ca))/0x1*(-parseInt(_0x2fedc5(0x1d7))/0x2)+parseInt(_0x2fedc5(0x1c8))/0x3+parseInt(_0x2fedc5(0x1d5))/0x4+-parseInt(_0x2fedc5(0x1d0))/0x5+parseInt(_0x2fedc5(0x1d9))/0x6+parseInt(_0x2fedc5(0x1d4))/0x7*(-parseInt(_0x2fedc5(0x1c6))/0x8)+parseInt(_0x2fedc5(0x1d2))/0x9*(-parseInt(_0x2fedc5(0x1c7))/0xa);if(_0x50bfbb===_0x24bdad)break;else _0x1f3ceb['push'](_0x1f3ceb['shift']());}catch(_0x2cfc6e){_0x1f3ceb['push'](_0x1f3ceb['shift']());}}}(a43_0x5a94,0xb7082));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x5a94(){const _0x3dfc70=['7698624QEzjMk','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bool','674904IXVAvw','110VbQQHg','4028301prOyar','appCode','42MmJqyj','sqlCode','sdk','string','str','codegen','5516540dZqamm','bff','2659671QNdoso','sql','21irYqeX','5986716KitYCG','no-imports','58774PqSJoo','target'];a43_0x5a94=function(){return _0x3dfc70;};return a43_0x5a94();}export const codegenSql={'service':a43_0xa242e9(0x1cf),'command':a43_0xa242e9(0x1d3),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':'read','flags':[SQLCODE_FLAG,{'name':a43_0xa242e9(0x1d8),'type':a43_0xa242e9(0x1cd),'description':a43_0xa242e9(0x1c4),'default':a43_0xa242e9(0x1cc),'enum':['sdk',a43_0xa242e9(0x1d1)]},{'name':a43_0xa242e9(0x1d6),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x38ddbb){const _0x2d0820=a43_0xa242e9,_0x289afc=await getSqlQueryInfo(_0x38ddbb[_0x2d0820(0x1c9)],_0x38ddbb['str']('sqlcode')),_0x1e76c2=_0x38ddbb[_0x2d0820(0x1ce)]('target')||_0x2d0820(0x1cc),_0x57ae03=generateSqlCodeTemplate(_0x289afc,{'target':_0x1e76c2,'includeImports':!_0x38ddbb[_0x2d0820(0x1c5)](_0x2d0820(0x1d6))});return{'ok':!![],'data':{'sqlCode':_0x289afc[_0x2d0820(0x1cb)],'sqlName':_0x289afc['sqlName'],'target':_0x1e76c2,'code':_0x57ae03}};}};
1
+ const a44_0x54ba59=a44_0x344a;(function(_0x2e76fc,_0x1ccc3a){const _0x44fa7e=a44_0x344a,_0x347b9d=_0x2e76fc();while(!![]){try{const _0x448095=-parseInt(_0x44fa7e(0x1cb))/0x1+parseInt(_0x44fa7e(0x1bf))/0x2+parseInt(_0x44fa7e(0x1cf))/0x3+-parseInt(_0x44fa7e(0x1cd))/0x4*(parseInt(_0x44fa7e(0x1bd))/0x5)+parseInt(_0x44fa7e(0x1d0))/0x6+-parseInt(_0x44fa7e(0x1c2))/0x7*(-parseInt(_0x44fa7e(0x1cc))/0x8)+parseInt(_0x44fa7e(0x1c6))/0x9;if(_0x448095===_0x1ccc3a)break;else _0x347b9d['push'](_0x347b9d['shift']());}catch(_0x9e9e4a){_0x347b9d['push'](_0x347b9d['shift']());}}}(a44_0x50ba,0xef0a7));function a44_0x344a(_0x5b930e,_0x148c85){_0x5b930e=_0x5b930e-0x1ba;const _0x50ba6b=a44_0x50ba();let _0x344a01=_0x50ba6b[_0x5b930e];return _0x344a01;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a44_0x50ba(){const _0x2b41d2=['bff','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','string','230EvdWbr','target','631440IHcoef','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','bool','21BfCQGF','sqlcode','sdk','sqlCode','10104318OUYHSE','sqlName','Omit\x20import\x20statements\x20from\x20generated\x20code','no-imports','boolean','1927047skLLnq','1961968xYluMn','113140mHcmeB','str','5400387TqqvpR','1397874ghucrv','codegen'];a44_0x50ba=function(){return _0x2b41d2;};return a44_0x50ba();}export const codegenSql={'service':a44_0x54ba59(0x1d1),'command':'sql','description':a44_0x54ba59(0x1c0),'risk':'read','flags':[SQLCODE_FLAG,{'name':'target','type':a44_0x54ba59(0x1bc),'description':a44_0x54ba59(0x1bb),'default':a44_0x54ba59(0x1c4),'enum':[a44_0x54ba59(0x1c4),a44_0x54ba59(0x1ba)]},{'name':'no-imports','type':a44_0x54ba59(0x1ca),'description':a44_0x54ba59(0x1c8)}],async 'execute'(_0x36c2a0){const _0x4cea3a=a44_0x54ba59,_0x412ea0=await getSqlQueryInfo(_0x36c2a0['appCode'],_0x36c2a0[_0x4cea3a(0x1ce)](_0x4cea3a(0x1c3))),_0x4c65f1=_0x36c2a0['str'](_0x4cea3a(0x1be))||_0x4cea3a(0x1c4),_0x28f267=generateSqlCodeTemplate(_0x412ea0,{'target':_0x4c65f1,'includeImports':!_0x36c2a0[_0x4cea3a(0x1c1)](_0x4cea3a(0x1c9))});return{'ok':!![],'data':{'sqlCode':_0x412ea0[_0x4cea3a(0x1c5)],'sqlName':_0x412ea0[_0x4cea3a(0x1c7)],'target':_0x4c65f1,'code':_0x28f267}};}};
@@ -1 +1 @@
1
- function a44_0x4168(_0x14f49d,_0x3afa9e){_0x14f49d=_0x14f49d-0x1f4;const _0x5937a8=a44_0x5937();let _0x4168f3=_0x5937a8[_0x14f49d];return _0x4168f3;}(function(_0x3b4685,_0x163a37){const _0x3fcb1f=a44_0x4168,_0x167c2b=_0x3b4685();while(!![]){try{const _0x396047=parseInt(_0x3fcb1f(0x209))/0x1+parseInt(_0x3fcb1f(0x20f))/0x2+parseInt(_0x3fcb1f(0x1f6))/0x3+parseInt(_0x3fcb1f(0x216))/0x4*(parseInt(_0x3fcb1f(0x1fd))/0x5)+-parseInt(_0x3fcb1f(0x211))/0x6*(parseInt(_0x3fcb1f(0x1fb))/0x7)+parseInt(_0x3fcb1f(0x1f5))/0x8+-parseInt(_0x3fcb1f(0x20d))/0x9;if(_0x396047===_0x163a37)break;else _0x167c2b['push'](_0x167c2b['shift']());}catch(_0x5a6c16){_0x167c2b['push'](_0x167c2b['shift']());}}}(a44_0x5937,0x1f89c));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x5188dd from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a44_0x5937(){const _0x25447e=['appCode','7TUgVGq','find','800Ytpgzr','map','cyan','appName','custom','\x20\x20(','\x0a未找到可用应用。','未找到可用应用。','无法获取远程应用列表,请手动输入。','请选择要绑定的应用:','(跳过,稍后配置)','yellow','257541SJeXcc','trim','\x0a无法获取远程应用列表,请手动输入。','skip','3370941cvAZpj','manual','410894ZKfEkF','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','1290858oulTwN','Invalid\x20App\x20Code','✎\x20自定义输入\x20appcode','✎\x20手动输入','message','3944feCveD','valid','gray','请输入\x20App\x20Code:','166808wJYmtB','231819DgPnWa','length','App\x20Code:','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)'];a44_0x5937=function(){return _0x25447e;};return a44_0x5937();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x12eab5=a44_0x4168,_0x5f3f14=await input({'message':_0x12eab5(0x1f4),'validate':_0xa48c79=>{const _0x268738=_0x12eab5,_0x11ed90=validateAppcode(_0xa48c79['trim']());return _0x11ed90[_0x268738(0x217)]||_0x11ed90[_0x268738(0x215)]||_0x268738(0x212);}});return _0x5f3f14[_0x12eab5(0x20a)]();}export async function promptAppSelection(_0x4098f3){const _0x4a78de=a44_0x4168,_0x224c53=[{'name':a44_0x5188dd[_0x4a78de(0x208)](_0x4a78de(0x213)),'value':-0x1},..._0x4098f3[_0x4a78de(0x1fe)]((_0x2dc1aa,_0x2f5221)=>({'name':_0x2dc1aa[_0x4a78de(0x200)]+'\x20\x20'+a44_0x5188dd[_0x4a78de(0x218)]('('+_0x2dc1aa['appCode']+')'),'value':_0x2f5221}))],_0x59eec6=await checkbox({'message':'获取到\x20'+a44_0x5188dd[_0x4a78de(0x1ff)](_0x4098f3['length'])+_0x4a78de(0x210),'choices':_0x224c53,'loop':![]});if(_0x59eec6['includes'](-0x1))return'custom';if(_0x59eec6['length']===0x0)return _0x4a78de(0x201);return _0x59eec6[_0x4a78de(0x1fe)](_0x27575e=>_0x4098f3[_0x27575e]);}export async function promptSingleAppSelection(_0x326482){const _0x4d01f5=a44_0x4168,_0x548621=[{'name':a44_0x5188dd[_0x4d01f5(0x218)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x4d01f5(0x20c)},{'name':a44_0x5188dd[_0x4d01f5(0x208)]('✎\x20自定义输入\x20appcode'),'value':'custom'},..._0x326482[_0x4d01f5(0x1fe)](_0x2dadc2=>({'name':_0x2dadc2[_0x4d01f5(0x200)]+'\x20\x20'+a44_0x5188dd['gray']('('+_0x2dadc2[_0x4d01f5(0x1fa)]+')'),'value':_0x2dadc2[_0x4d01f5(0x1fa)]}))],_0x59ae85=await select({'message':_0x4d01f5(0x206),'choices':_0x548621});if(_0x59ae85===_0x4d01f5(0x20c))return _0x4d01f5(0x20c);if(_0x59ae85===_0x4d01f5(0x201))return _0x4d01f5(0x201);return _0x326482[_0x4d01f5(0x1fc)](_0xc8c315=>_0xc8c315['appCode']===_0x59ae85);}export async function selectSingleAppcode(_0x3adf1b){const _0x1e5ba2=a44_0x4168;if(!_0x3adf1b)return writeCliSideChannelLine(a44_0x5188dd[_0x1e5ba2(0x218)](_0x1e5ba2(0x1f9))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x4b4768;try{_0x4b4768=await withActiveCookie(_0x3adf1b,()=>listRemoteApps());}catch(_0xf9f050){writeCliSideChannelLine(a44_0x5188dd[_0x1e5ba2(0x208)](_0x1e5ba2(0x205)));if(_0xf9f050 instanceof Error)writeCliSideChannelLine(a44_0x5188dd['gray']('\x20\x20('+_0xf9f050['message']+')'));return _fallbackOrSkip();}if(_0x4b4768[_0x1e5ba2(0x1f7)]===0x0)return writeCliSideChannelLine(a44_0x5188dd[_0x1e5ba2(0x208)](_0x1e5ba2(0x204))),_fallbackOrSkip();const _0x3e1311=await promptSingleAppSelection(_0x4b4768);if(_0x3e1311===_0x1e5ba2(0x20c))return'';if(_0x3e1311===_0x1e5ba2(0x201))return promptCustomAppcode();return _0x3e1311[_0x1e5ba2(0x1fa)];}export async function selectMultipleApps(_0x503c3d){const _0x59ad4b=a44_0x4168;writeCliSideChannelLine('正在获取可用应用列表...');let _0x1479cb;try{_0x1479cb=await withActiveCookie(_0x503c3d,()=>listRemoteApps());}catch(_0x55d995){writeCliSideChannelLine(_0x59ad4b(0x20b));if(_0x55d995 instanceof Error)writeCliSideChannelLine(_0x59ad4b(0x202)+_0x55d995[_0x59ad4b(0x215)]+')');return _0x59ad4b(0x201);}if(_0x1479cb[_0x59ad4b(0x1f7)]===0x0)return writeCliSideChannelLine(_0x59ad4b(0x203)),_0x59ad4b(0x201);return promptAppSelection(_0x1479cb);}async function _fallbackOrSkip(){const _0x5d5ecb=a44_0x4168,_0x2cbcc8=await select({'message':_0x5d5ecb(0x1f8),'choices':[{'name':a44_0x5188dd[_0x5d5ecb(0x218)](_0x5d5ecb(0x207)),'value':_0x5d5ecb(0x20c)},{'name':a44_0x5188dd[_0x5d5ecb(0x208)](_0x5d5ecb(0x214)),'value':_0x5d5ecb(0x20e)}]});if(_0x2cbcc8===_0x5d5ecb(0x20c))return'';return promptCustomAppcode();}
1
+ (function(_0x4ba9ec,_0x4fe596){const _0x3332c3=a45_0x37ea,_0x533bb7=_0x4ba9ec();while(!![]){try{const _0x392ad7=-parseInt(_0x3332c3(0x13f))/0x1*(parseInt(_0x3332c3(0x143))/0x2)+parseInt(_0x3332c3(0x134))/0x3*(-parseInt(_0x3332c3(0x145))/0x4)+-parseInt(_0x3332c3(0x139))/0x5+parseInt(_0x3332c3(0x148))/0x6*(parseInt(_0x3332c3(0x14d))/0x7)+parseInt(_0x3332c3(0x14a))/0x8*(-parseInt(_0x3332c3(0x12d))/0x9)+parseInt(_0x3332c3(0x12f))/0xa+-parseInt(_0x3332c3(0x127))/0xb*(-parseInt(_0x3332c3(0x130))/0xc);if(_0x392ad7===_0x4fe596)break;else _0x533bb7['push'](_0x533bb7['shift']());}catch(_0x26bd75){_0x533bb7['push'](_0x533bb7['shift']());}}}(a45_0xc3c8,0xe9c59));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x5d6ea4 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a45_0xc3c8(){const _0x10620e=['(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','102nEdIuq','map','请选择要绑定的应用:','valid','find','2281155Wccoti','appCode','includes','✎\x20手动输入','\x0a无法获取远程应用列表,请手动输入。','\x20\x20(','1115ofQyev','custom','appName','yellow','2460swevoR','message','119836geFBpI','正在获取可用应用列表...','获取到\x20','6LSpeAX','(跳过,稍后配置)','152KrpRsM','无法获取远程应用列表,请手动输入。','length','385987IGBqAw','未找到可用应用。','gray','Invalid\x20App\x20Code','275eXByBM','请输入\x20App\x20Code:','manual','trim','skip','✎\x20自定义输入\x20appcode','578718VdWsCa','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','10937880gucINU','1860780mTSlcy','\x0a未找到可用应用。','App\x20Code:'];a45_0xc3c8=function(){return _0x10620e;};return a45_0xc3c8();}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x21df90=a45_0x37ea,_0x5c6d42=await input({'message':_0x21df90(0x128),'validate':_0x53cd25=>{const _0x225841=_0x21df90,_0x283775=validateAppcode(_0x53cd25[_0x225841(0x12a)]());return _0x283775[_0x225841(0x137)]||_0x283775[_0x225841(0x144)]||_0x225841(0x126);}});return _0x5c6d42[_0x21df90(0x12a)]();}export async function promptAppSelection(_0x2adf6){const _0x2d2e53=a45_0x37ea,_0xbe3604=[{'name':a45_0x5d6ea4[_0x2d2e53(0x142)](_0x2d2e53(0x12c)),'value':-0x1},..._0x2adf6[_0x2d2e53(0x135)]((_0x205bb6,_0x32dd70)=>({'name':_0x205bb6[_0x2d2e53(0x141)]+'\x20\x20'+a45_0x5d6ea4[_0x2d2e53(0x125)]('('+_0x205bb6[_0x2d2e53(0x13a)]+')'),'value':_0x32dd70}))],_0x5565cf=await checkbox({'message':_0x2d2e53(0x147)+a45_0x5d6ea4['cyan'](_0x2adf6['length'])+_0x2d2e53(0x12e),'choices':_0xbe3604,'loop':![]});if(_0x5565cf[_0x2d2e53(0x13b)](-0x1))return'custom';if(_0x5565cf[_0x2d2e53(0x14c)]===0x0)return'custom';return _0x5565cf[_0x2d2e53(0x135)](_0x2c801a=>_0x2adf6[_0x2c801a]);}export async function promptSingleAppSelection(_0x497537){const _0x157926=a45_0x37ea,_0x286b8c=[{'name':a45_0x5d6ea4[_0x157926(0x125)](_0x157926(0x133)),'value':_0x157926(0x12b)},{'name':a45_0x5d6ea4[_0x157926(0x142)]('✎\x20自定义输入\x20appcode'),'value':_0x157926(0x140)},..._0x497537[_0x157926(0x135)](_0x136b2a=>({'name':_0x136b2a['appName']+'\x20\x20'+a45_0x5d6ea4['gray']('('+_0x136b2a[_0x157926(0x13a)]+')'),'value':_0x136b2a[_0x157926(0x13a)]}))],_0x654de7=await select({'message':_0x157926(0x136),'choices':_0x286b8c});if(_0x654de7===_0x157926(0x12b))return'skip';if(_0x654de7===_0x157926(0x140))return _0x157926(0x140);return _0x497537[_0x157926(0x138)](_0x110bdb=>_0x110bdb['appCode']===_0x654de7);}function a45_0x37ea(_0x1f74ee,_0x1ac96a){_0x1f74ee=_0x1f74ee-0x124;const _0xc3c8d1=a45_0xc3c8();let _0x37ea8a=_0xc3c8d1[_0x1f74ee];return _0x37ea8a;}export async function selectSingleAppcode(_0x522aab){const _0x2819b4=a45_0x37ea;if(!_0x522aab)return writeCliSideChannelLine(a45_0x5d6ea4[_0x2819b4(0x125)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine(_0x2819b4(0x146));let _0x1720dd;try{_0x1720dd=await withActiveCookie(_0x522aab,()=>listRemoteApps());}catch(_0x219d01){writeCliSideChannelLine(a45_0x5d6ea4[_0x2819b4(0x142)](_0x2819b4(0x14b)));if(_0x219d01 instanceof Error)writeCliSideChannelLine(a45_0x5d6ea4['gray']('\x20\x20('+_0x219d01['message']+')'));return _fallbackOrSkip();}if(_0x1720dd['length']===0x0)return writeCliSideChannelLine(a45_0x5d6ea4['yellow'](_0x2819b4(0x124))),_fallbackOrSkip();const _0x3a7fe7=await promptSingleAppSelection(_0x1720dd);if(_0x3a7fe7===_0x2819b4(0x12b))return'';if(_0x3a7fe7===_0x2819b4(0x140))return promptCustomAppcode();return _0x3a7fe7['appCode'];}export async function selectMultipleApps(_0x3950cc){const _0x2ac060=a45_0x37ea;writeCliSideChannelLine(_0x2ac060(0x146));let _0x558143;try{_0x558143=await withActiveCookie(_0x3950cc,()=>listRemoteApps());}catch(_0x43cacc){writeCliSideChannelLine(_0x2ac060(0x13d));if(_0x43cacc instanceof Error)writeCliSideChannelLine(_0x2ac060(0x13e)+_0x43cacc[_0x2ac060(0x144)]+')');return _0x2ac060(0x140);}if(_0x558143['length']===0x0)return writeCliSideChannelLine(_0x2ac060(0x131)),_0x2ac060(0x140);return promptAppSelection(_0x558143);}async function _fallbackOrSkip(){const _0x225d06=a45_0x37ea,_0x1a0d1a=await select({'message':_0x225d06(0x132),'choices':[{'name':a45_0x5d6ea4[_0x225d06(0x125)](_0x225d06(0x149)),'value':_0x225d06(0x12b)},{'name':a45_0x5d6ea4['yellow'](_0x225d06(0x13c)),'value':_0x225d06(0x129)}]});if(_0x1a0d1a==='skip')return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a45_0x379aea=a45_0x4619;(function(_0x5230e9,_0x4103f0){const _0x1ba7f5=a45_0x4619,_0x388758=_0x5230e9();while(!![]){try{const _0x2d1f4a=parseInt(_0x1ba7f5(0xc1))/0x1+parseInt(_0x1ba7f5(0xcd))/0x2*(-parseInt(_0x1ba7f5(0xcf))/0x3)+-parseInt(_0x1ba7f5(0xbd))/0x4+-parseInt(_0x1ba7f5(0xbf))/0x5*(-parseInt(_0x1ba7f5(0xc2))/0x6)+-parseInt(_0x1ba7f5(0xc9))/0x7*(parseInt(_0x1ba7f5(0xce))/0x8)+parseInt(_0x1ba7f5(0xcc))/0x9+parseInt(_0x1ba7f5(0xc4))/0xa;if(_0x2d1f4a===_0x4103f0)break;else _0x388758['push'](_0x388758['shift']());}catch(_0xc76525){_0x388758['push'](_0x388758['shift']());}}}(a45_0x55c4,0x9568f));function a45_0x55c4(){const _0x119a23=['1692929ukcvsT','appcode','sqlcode','3917079uhUOlO','666286FeKzyy','16xspxAF','3ewNynV','code','string','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','2991808plYUEt','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','6485Laldne','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','628715sqLVrg','1212ZCdafY','Dataset\x20code\x20(32-char\x20hex\x20UUID)','8508320uopubH','number','datasetcode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','POSTGRESQL'];a45_0x55c4=function(){return _0x119a23;};return a45_0x55c4();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a45_0x379aea(0xd2)};function a45_0x4619(_0x3d63b,_0x111957){_0x3d63b=_0x3d63b-0xbd;const _0x55c401=a45_0x55c4();let _0x4619a5=_0x55c401[_0x3d63b];return _0x4619a5;}export const CODE_FLAG={'name':a45_0x379aea(0xd0),'type':a45_0x379aea(0xd1),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a45_0x379aea(0xc6),'description':a45_0x379aea(0xc3)};export const SQLCODE_FLAG={'name':a45_0x379aea(0xcb),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a45_0x379aea(0xbe)}};export const APPCODE_FLAG_OPTIONAL={'name':a45_0x379aea(0xca),'type':a45_0x379aea(0xd1),'required':![],'description':a45_0x379aea(0xc0)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a45_0x379aea(0xc5),'required':!![],'description':a45_0x379aea(0xc7)};export const DB_TYPE_FLAG={'name':'dbtype','type':a45_0x379aea(0xd1),'required':!![],'description':'Database\x20product\x20type','enum':['MYSQL',a45_0x379aea(0xc8)]};
1
+ const a46_0x393086=a46_0x9185;(function(_0x4d4a44,_0x3d7e16){const _0x52f8fb=a46_0x9185,_0x3f8725=_0x4d4a44();while(!![]){try{const _0x1ea11e=-parseInt(_0x52f8fb(0x11c))/0x1+parseInt(_0x52f8fb(0x11b))/0x2+-parseInt(_0x52f8fb(0x123))/0x3+parseInt(_0x52f8fb(0x127))/0x4*(parseInt(_0x52f8fb(0x124))/0x5)+parseInt(_0x52f8fb(0x122))/0x6*(parseInt(_0x52f8fb(0x120))/0x7)+-parseInt(_0x52f8fb(0x126))/0x8+parseInt(_0x52f8fb(0x115))/0x9;if(_0x1ea11e===_0x3d7e16)break;else _0x3f8725['push'](_0x3f8725['shift']());}catch(_0xf488f){_0x3f8725['push'](_0x3f8725['shift']());}}}(a46_0x4cb7,0x9bd55));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a46_0x393086(0x11d)};function a46_0x9185(_0x4305c3,_0x20027b){_0x4305c3=_0x4305c3-0x114;const _0x4cb7c4=a46_0x4cb7();let _0x918593=_0x4cb7c4[_0x4305c3];return _0x918593;}export const CODE_FLAG={'name':a46_0x393086(0x114),'type':a46_0x393086(0x116),'required':!![],'description':a46_0x393086(0x11a),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a46_0x393086(0x119),'description':a46_0x393086(0x11a)};export const SQLCODE_FLAG={'name':'sqlcode','type':a46_0x393086(0x116),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a46_0x393086(0x118)}};export const APPCODE_FLAG_OPTIONAL={'name':a46_0x393086(0x121),'type':a46_0x393086(0x116),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a46_0x393086(0x11e),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a46_0x393086(0x125),'type':'string','required':!![],'description':a46_0x393086(0x11f),'enum':['MYSQL',a46_0x393086(0x117)]};function a46_0x4cb7(){const _0x42294a=['SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','datasetcode','Dataset\x20code\x20(32-char\x20hex\x20UUID)','363640euoSkr','1193362uwhMku','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','number','Database\x20product\x20type','1752709CCdvID','appcode','12FavMhf','880920uZCKWK','2195oRyrRw','dbtype','249544IhpHIW','4912tDPOQv','code','8413218TFFqni','string','POSTGRESQL'];a46_0x4cb7=function(){return _0x42294a;};return a46_0x4cb7();}
@@ -1 +1 @@
1
- (function(_0x1b3f60,_0xbeaf08){const _0x20db9a=a46_0x32d4,_0x34236d=_0x1b3f60();while(!![]){try{const _0x24ba41=parseInt(_0x20db9a(0x115))/0x1*(-parseInt(_0x20db9a(0x116))/0x2)+-parseInt(_0x20db9a(0x112))/0x3+parseInt(_0x20db9a(0x11c))/0x4+-parseInt(_0x20db9a(0x11e))/0x5+parseInt(_0x20db9a(0x11a))/0x6*(-parseInt(_0x20db9a(0x118))/0x7)+parseInt(_0x20db9a(0x11d))/0x8+parseInt(_0x20db9a(0x119))/0x9;if(_0x24ba41===_0xbeaf08)break;else _0x34236d['push'](_0x34236d['shift']());}catch(_0x14fbaa){_0x34236d['push'](_0x34236d['shift']());}}}(a46_0x35f3,0x95bc6));export function validateAppcode(_0x168b7a){const _0x31aa8c=a46_0x32d4,_0x1b672c=_0x168b7a[_0x31aa8c(0x117)]();if(!_0x1b672c)return{'valid':![],'message':_0x31aa8c(0x114)};if(_0x1b672c['length']>0x64)return{'valid':![],'message':_0x31aa8c(0x113)};if(!/^[A-Za-z0-9_-]+$/[_0x31aa8c(0x11b)](_0x1b672c))return{'valid':![],'message':_0x31aa8c(0x111)};return{'valid':!![]};}function a46_0x32d4(_0x2c2802,_0x4af73f){_0x2c2802=_0x2c2802-0x111;const _0x35f39b=a46_0x35f3();let _0x32d4fa=_0x35f39b[_0x2c2802];return _0x32d4fa;}function a46_0x35f3(){const _0x375cd3=['App\x20Code\x20cannot\x20be\x20empty','602913RvKSoq','2jpdBdc','trim','14OPYoTG','28982628KCwZNT','1923018tYwKfO','test','635912wOcAqC','5053568wAbiZl','5711790piQbfP','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','3034113DxvCzt','App\x20Code\x20cannot\x20exceed\x20100\x20characters'];a46_0x35f3=function(){return _0x375cd3;};return a46_0x35f3();}
1
+ function a47_0x193b(_0x5164ae,_0x52bbca){_0x5164ae=_0x5164ae-0x182;const _0x202277=a47_0x2022();let _0x193b9f=_0x202277[_0x5164ae];return _0x193b9f;}(function(_0x59f945,_0x3ff292){const _0x8c9ef7=a47_0x193b,_0x5a628f=_0x59f945();while(!![]){try{const _0x549c9d=-parseInt(_0x8c9ef7(0x187))/0x1*(-parseInt(_0x8c9ef7(0x18d))/0x2)+parseInt(_0x8c9ef7(0x18e))/0x3*(-parseInt(_0x8c9ef7(0x182))/0x4)+-parseInt(_0x8c9ef7(0x191))/0x5+-parseInt(_0x8c9ef7(0x18a))/0x6+parseInt(_0x8c9ef7(0x18b))/0x7+parseInt(_0x8c9ef7(0x184))/0x8*(parseInt(_0x8c9ef7(0x18f))/0x9)+parseInt(_0x8c9ef7(0x185))/0xa*(parseInt(_0x8c9ef7(0x188))/0xb);if(_0x549c9d===_0x3ff292)break;else _0x5a628f['push'](_0x5a628f['shift']());}catch(_0x43b497){_0x5a628f['push'](_0x5a628f['shift']());}}}(a47_0x2022,0x6728d));function a47_0x2022(){const _0x33f1e2=['Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','1651310sjbWcF','12GzjQdA','App\x20Code\x20cannot\x20exceed\x20100\x20characters','16mRNVZf','9990FDkqix','test','70922lTsiaJ','3751BSrJko','length','1489776xIYBQH','265279ltkAtK','trim','22sDVsHt','426507CXcHiK','1210086crRlWU'];a47_0x2022=function(){return _0x33f1e2;};return a47_0x2022();}export function validateAppcode(_0x7d1f20){const _0x8c6cc5=a47_0x193b,_0x338083=_0x7d1f20[_0x8c6cc5(0x18c)]();if(!_0x338083)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x338083[_0x8c6cc5(0x189)]>0x64)return{'valid':![],'message':_0x8c6cc5(0x183)};if(!/^[A-Za-z0-9_-]+$/[_0x8c6cc5(0x186)](_0x338083))return{'valid':![],'message':_0x8c6cc5(0x190)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a47_0x360463=a47_0x35ed;(function(_0x1a64a4,_0x596693){const _0x271c07=a47_0x35ed,_0x45d414=_0x1a64a4();while(!![]){try{const _0x143372=parseInt(_0x271c07(0xb8))/0x1*(parseInt(_0x271c07(0xa3))/0x2)+-parseInt(_0x271c07(0xa5))/0x3+-parseInt(_0x271c07(0xac))/0x4*(-parseInt(_0x271c07(0xb4))/0x5)+-parseInt(_0x271c07(0xae))/0x6*(parseInt(_0x271c07(0xaf))/0x7)+parseInt(_0x271c07(0xa6))/0x8+parseInt(_0x271c07(0xb2))/0x9+parseInt(_0x271c07(0xa0))/0xa*(-parseInt(_0x271c07(0xa9))/0xb);if(_0x143372===_0x596693)break;else _0x45d414['push'](_0x45d414['shift']());}catch(_0x3294d3){_0x45d414['push'](_0x45d414['shift']());}}}(a47_0x370a,0x3354b));import{CliErrors}from'../../errors.js';function a47_0x35ed(_0x464d01,_0x30ecaf){_0x464d01=_0x464d01-0xa0;const _0x370abc=a47_0x370a();let _0x35ede6=_0x370abc[_0x464d01];return _0x35ede6;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2d0fea){const _0x508ce9=a47_0x35ed,_0x2ba56=_0x2d0fea[_0x508ce9(0xa1)](_0x508ce9(0xad));if(!_0x2ba56)throw CliErrors[_0x508ce9(0xa4)](_0x508ce9(0xb7),_0x508ce9(0xa8)+CLI_BIN_NAME+_0x508ce9(0xa2));const _0x42e7dd=readConfig(),_0xb78a4b=_0x2ba56===_0x508ce9(0xb0)?_0x508ce9(0xb6):_0x2ba56,_0x342235=_0x42e7dd[_0xb78a4b];if(_0x342235===undefined)throw CliErrors[_0x508ce9(0xa4)]('Key\x20not\x20found:\x20'+_0x2ba56);return{'ok':!![],'data':typeof _0x342235===_0x508ce9(0xab)?_0x342235:{[_0xb78a4b]:_0x342235},'message':typeof _0x342235==='object'?undefined:String(_0x342235)};}export const configGetDefinition={'service':a47_0x360463(0xb3),'command':a47_0x360463(0xb1),'description':a47_0x360463(0xa7),'risk':a47_0x360463(0xb5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a47_0x360463(0xad),'type':a47_0x360463(0xaa),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a47_0x370a(){const _0x16efce=['5131hBGcwc','app','get','718614gyqlsf','config','2535YtXXmU','read','appcode','Missing\x20key.','2trsNDA','4274570jHjzRx','str','\x20config\x20get\x20--key\x20<key>','164354iiyzbn','validation','903645WAnkjH','3091296sBcGrR','Get\x20a\x20config\x20value\x20by\x20key','Usage:\x20','11GcqIye','string','object','2444GOWTrS','key','12QCTyvv'];a47_0x370a=function(){return _0x16efce;};return a47_0x370a();}
1
+ const a48_0x25f1ee=a48_0x3012;function a48_0x3f56(){const _0x28606c=['Key\x20not\x20found:\x20','30xqhPBb','validation','config','Missing\x20key.','appcode','read','object','Get\x20a\x20config\x20value\x20by\x20key','391720qixJLN','3619964qDCpZR','1316TGgrvo','7830930rURKpa','2416653FxkUuI','37457aaBJQN','2215008MyZGXE','str','string','424Uqbmfc','7245uBXMQU','Usage:\x20','\x20config\x20get\x20--key\x20<key>','key'];a48_0x3f56=function(){return _0x28606c;};return a48_0x3f56();}(function(_0x42b46c,_0x4b4e70){const _0x21a07e=a48_0x3012,_0xe7fd3d=_0x42b46c();while(!![]){try{const _0x50e972=-parseInt(_0x21a07e(0x170))/0x1+-parseInt(_0x21a07e(0x172))/0x2*(-parseInt(_0x21a07e(0x17a))/0x3)+-parseInt(_0x21a07e(0x171))/0x4+parseInt(_0x21a07e(0x173))/0x5+-parseInt(_0x21a07e(0x176))/0x6+parseInt(_0x21a07e(0x175))/0x7*(parseInt(_0x21a07e(0x179))/0x8)+-parseInt(_0x21a07e(0x174))/0x9*(parseInt(_0x21a07e(0x168))/0xa);if(_0x50e972===_0x4b4e70)break;else _0xe7fd3d['push'](_0xe7fd3d['shift']());}catch(_0x1e3dfb){_0xe7fd3d['push'](_0xe7fd3d['shift']());}}}(a48_0x3f56,0xec305));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a48_0x3012(_0xdb8d1c,_0x3c5e4d){_0xdb8d1c=_0xdb8d1c-0x164;const _0x3f56d1=a48_0x3f56();let _0x301258=_0x3f56d1[_0xdb8d1c];return _0x301258;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x18efe9){const _0xa66a52=a48_0x3012,_0x1c0035=_0x18efe9[_0xa66a52(0x177)](_0xa66a52(0x166));if(!_0x1c0035)throw CliErrors[_0xa66a52(0x169)](_0xa66a52(0x16b),_0xa66a52(0x164)+CLI_BIN_NAME+_0xa66a52(0x165));const _0x2ec4f7=readConfig(),_0x42768f=_0x1c0035==='app'?_0xa66a52(0x16c):_0x1c0035,_0x2e7e7a=_0x2ec4f7[_0x42768f];if(_0x2e7e7a===undefined)throw CliErrors[_0xa66a52(0x169)](_0xa66a52(0x167)+_0x1c0035);return{'ok':!![],'data':typeof _0x2e7e7a===_0xa66a52(0x16e)?_0x2e7e7a:{[_0x42768f]:_0x2e7e7a},'message':typeof _0x2e7e7a===_0xa66a52(0x16e)?undefined:String(_0x2e7e7a)};}export const configGetDefinition={'service':a48_0x25f1ee(0x16a),'command':'get','description':a48_0x25f1ee(0x16f),'risk':a48_0x25f1ee(0x16d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a48_0x25f1ee(0x178),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- function a48_0x1a89(){const _0x243d1a=['3658344rQMqKO','462359sOusbf','28pwumzM','1228356zURpFL','7lfDEAm','4977396ClKLee','894396mSyHDy','1154718gBVHNP','420STkEAh'];a48_0x1a89=function(){return _0x243d1a;};return a48_0x1a89();}(function(_0x13810f,_0x299b5b){const _0x29172e=a48_0x3c84,_0x5a3f92=_0x13810f();while(!![]){try{const _0x34da35=parseInt(_0x29172e(0x16b))/0x1+-parseInt(_0x29172e(0x170))/0x2+parseInt(_0x29172e(0x171))/0x3+-parseInt(_0x29172e(0x16c))/0x4*(parseInt(_0x29172e(0x172))/0x5)+-parseInt(_0x29172e(0x16d))/0x6+parseInt(_0x29172e(0x16e))/0x7*(-parseInt(_0x29172e(0x16a))/0x8)+parseInt(_0x29172e(0x16f))/0x9;if(_0x34da35===_0x299b5b)break;else _0x5a3f92['push'](_0x5a3f92['shift']());}catch(_0x5e2c8d){_0x5a3f92['push'](_0x5a3f92['shift']());}}}(a48_0x1a89,0x46ec8));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a48_0x3c84(_0x341364,_0x5c5ef6){_0x341364=_0x341364-0x16a;const _0x1a89e6=a48_0x1a89();let _0x3c84db=_0x1a89e6[_0x341364];return _0x3c84db;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ function a49_0x5534(_0xfde80d,_0x4030aa){_0xfde80d=_0xfde80d-0x153;const _0x1a746c=a49_0x1a74();let _0x553486=_0x1a746c[_0xfde80d];return _0x553486;}function a49_0x1a74(){const _0x2455ab=['24406gRVLLm','1076728pjDGrd','7566SPIGQY','1135CJcZbo','4066425MzXeQy','3218100TjnriH','5776TitvKN','6176577Naezob','7mjAeMw','888XHauBK','1mekEmJ'];a49_0x1a74=function(){return _0x2455ab;};return a49_0x1a74();}(function(_0x3d1ee1,_0x24f580){const _0x1819a7=a49_0x5534,_0x557be2=_0x3d1ee1();while(!![]){try{const _0x837bf=parseInt(_0x1819a7(0x15a))/0x1*(parseInt(_0x1819a7(0x15b))/0x2)+-parseInt(_0x1819a7(0x159))/0x3*(-parseInt(_0x1819a7(0x156))/0x4)+parseInt(_0x1819a7(0x153))/0x5*(parseInt(_0x1819a7(0x15d))/0x6)+-parseInt(_0x1819a7(0x158))/0x7*(-parseInt(_0x1819a7(0x15c))/0x8)+-parseInt(_0x1819a7(0x154))/0x9+-parseInt(_0x1819a7(0x155))/0xa+parseInt(_0x1819a7(0x157))/0xb;if(_0x837bf===_0x24f580)break;else _0x557be2['push'](_0x557be2['shift']());}catch(_0x27028c){_0x557be2['push'](_0x557be2['shift']());}}}(a49_0x1a74,0x9e491));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];