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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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_0x1b4693=a33_0x331a;(function(_0x286d4a,_0x9cf468){const _0x76754c=a33_0x331a,_0x489d60=_0x286d4a();while(!![]){try{const _0x5ce75f=-parseInt(_0x76754c(0x14f))/0x1*(-parseInt(_0x76754c(0x13d))/0x2)+-parseInt(_0x76754c(0x15b))/0x3*(-parseInt(_0x76754c(0x150))/0x4)+-parseInt(_0x76754c(0x131))/0x5+parseInt(_0x76754c(0x159))/0x6*(-parseInt(_0x76754c(0x124))/0x7)+-parseInt(_0x76754c(0x12d))/0x8+-parseInt(_0x76754c(0x139))/0x9*(parseInt(_0x76754c(0x152))/0xa)+-parseInt(_0x76754c(0x125))/0xb*(-parseInt(_0x76754c(0x133))/0xc);if(_0x5ce75f===_0x9cf468)break;else _0x489d60['push'](_0x489d60['shift']());}catch(_0x429735){_0x489d60['push'](_0x489d60['shift']());}}}(a33_0x39a6,0x22fd5));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':a33_0x1b4693(0x12f),'command':a33_0x1b4693(0x132),'description':a33_0x1b4693(0x12c),'risk':'high-risk-write','flags':[{'name':a33_0x1b4693(0x129),'type':a33_0x1b4693(0x157),'required':!![],'description':a33_0x1b4693(0x14d)}],async 'validate'(_0x3d7ec7){const _0x2b4222=a33_0x1b4693,_0x520660=loadBffProjectConfig(_0x3d7ec7[_0x2b4222(0x128)]),_0x25e970=await readBffLockFile(_0x520660[_0x2b4222(0x158)]);if(!_0x25e970)throw CliErrors[_0x2b4222(0x130)](_0x2b4222(0x154));},async 'dryRun'(_0x34afd5){const _0x212433=a33_0x1b4693,_0x96391=loadBffProjectConfig(_0x34afd5['appCode']),_0x614865=await readBffLockFile(_0x96391[_0x212433(0x158)]);if(!_0x614865)throw CliErrors[_0x212433(0x130)](_0x212433(0x149));const {appLock:_0x40d996}=ensureLockScope(_0x614865,_0x34afd5[_0x212433(0x128)],_0x96391['scriptsRoot'],_0x212433(0x132)),_0x2e89a7=_0x34afd5[_0x212433(0x13f)](_0x212433(0x129)),_0x342f4f=Object['keys'](_0x40d996[_0x212433(0x148)]),_0x2261fa=resolveDeleteTarget(_0x2e89a7,_0x342f4f),_0x328b54=_0x40d996['functions'][_0x2261fa];if(!_0x328b54)throw CliErrors[_0x212433(0x130)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x2261fa+'\x22.');const _0x2450f5=resolveLocalFilePathFromLockKey(_0x96391,_0x2261fa),_0x5ebdd7=relative(_0x96391[_0x212433(0x142)],_0x2450f5),_0x4a62e2=join(_0x96391['trashDir'],_0x212433(0x12e),_0x5ebdd7);return{'method':'POST','url':_0x212433(0x138),'body':{'appCode':_0x34afd5[_0x212433(0x128)],'target':_0x2261fa,'remoteId':_0x328b54[_0x212433(0x127)],'localFilePath':_0x2450f5,'trashedPath':_0x4a62e2},'description':_0x212433(0x126)+_0x2261fa+_0x212433(0x14b)};},async 'execute'(_0x407b53){const _0x134fea=a33_0x1b4693,_0x5f02c2=loadBffProjectConfig(_0x407b53[_0x134fea(0x128)]),_0x3e0bdb=await readBffLockFile(_0x5f02c2[_0x134fea(0x158)]);if(!_0x3e0bdb)throw CliErrors['validation'](_0x134fea(0x149));const {lockData:_0x31556b,appLock:_0x53a228}=ensureLockScope(_0x3e0bdb,_0x407b53[_0x134fea(0x128)],_0x5f02c2[_0x134fea(0x147)],_0x134fea(0x132)),_0x2faada=JSON[_0x134fea(0x140)](JSON[_0x134fea(0x14c)](_0x31556b)),_0x2835f2=_0x2faada[_0x134fea(0x143)][_0x407b53[_0x134fea(0x128)]];if(!_0x2835f2)throw new Error(_0x134fea(0x12b)+_0x407b53['appCode']+_0x134fea(0x14e));const _0x3fd8b4=_0x407b53['str'](_0x134fea(0x129)),_0x111875=Object[_0x134fea(0x13a)](_0x2835f2[_0x134fea(0x148)]),_0x4bdb54=resolveDeleteTarget(_0x3fd8b4,_0x111875),_0x276275=_0x2835f2[_0x134fea(0x148)][_0x4bdb54];if(!_0x276275)throw CliErrors[_0x134fea(0x130)]('No\x20lock\x20entry\x20found\x20for\x20\x22'+_0x4bdb54+'\x22.');await deleteBffScript(_0x276275[_0x134fea(0x127)]),delete _0x2835f2[_0x134fea(0x148)][_0x4bdb54],_0x2835f2[_0x134fea(0x136)]=new Date()['toISOString'](),await writeBffLockFile(_0x5f02c2['lockFilePath'],_0x2faada);const _0x18bbcb=resolveLocalFilePathFromLockKey(_0x5f02c2,_0x4bdb54);let _0x3e0ca0;await fileExists(_0x18bbcb)&&(_0x3e0ca0=await moveToTrash(_0x5f02c2[_0x134fea(0x142)],_0x5f02c2[_0x134fea(0x135)],_0x18bbcb),await cleanupEmptyDirectories(dirname(_0x18bbcb),_0x5f02c2[_0x134fea(0x155)]));await waitForDeleteSettlement(_0x5f02c2['lockFilePath'],_0x407b53['appCode'],_0x4bdb54,_0x18bbcb),await sleep(0x96);const _0x558705={'deleted':_0x4bdb54,'remoteId':_0x276275[_0x134fea(0x127)]};if(_0x3e0ca0)_0x558705['trashedTo']=_0x3e0ca0;return{'ok':!![],'data':_0x558705,'message':_0x134fea(0x13c)+_0x4bdb54+(_0x3e0ca0?_0x134fea(0x144):'')};}};function resolveDeleteTarget(_0x106bce,_0x150ae8){const _0x5d6b57=a33_0x1b4693;if(_0x106bce[_0x5d6b57(0x141)]('/')){const _0x472152=_0x150ae8['find'](_0xd60035=>_0xd60035===_0x106bce);if(!_0x472152)throw CliErrors['validation'](_0x5d6b57(0x14a)+_0x106bce);return _0x472152;}const _0x2f1891=_0x150ae8[_0x5d6b57(0x13e)](_0x315f0e=>_0x315f0e[_0x5d6b57(0x153)]('/')['at'](-0x1)===_0x106bce);if(_0x2f1891[_0x5d6b57(0x15a)]===0x0)throw CliErrors[_0x5d6b57(0x130)](_0x5d6b57(0x14a)+_0x106bce);if(_0x2f1891[_0x5d6b57(0x15a)]>0x1)throw CliErrors['validation'](_0x5d6b57(0x13b)+_0x106bce+_0x5d6b57(0x145)+_0x2f1891[_0x5d6b57(0x137)](_0x47e103=>_0x5d6b57(0x156)+_0x47e103)[_0x5d6b57(0x134)]('\x0a'));return _0x2f1891[0x0];}async function moveToTrash(_0x1a5f10,_0x1d0617,_0x247753){const _0xe5067b=a33_0x1b4693,_0x350f93=new Date()[_0xe5067b(0x12a)]()['replace'](/[:.]/g,'-'),_0x4b1e57=relative(_0x1a5f10,_0x247753),_0x2ef572=join(_0x1d0617,_0x350f93,_0x4b1e57);return await mkdir(dirname(_0x2ef572),{'recursive':!![]}),await rename(_0x247753,_0x2ef572),_0x2ef572;}async function cleanupEmptyDirectories(_0x216d27,_0x1e1e94){const _0x1d1fb9=a33_0x1b4693;let _0x5989e1=resolve(_0x216d27);const _0x36305d=resolve(_0x1e1e94);while(_0x5989e1[_0x1d1fb9(0x151)](''+_0x36305d+sep)||_0x5989e1===_0x36305d){if(_0x5989e1===_0x36305d)return;try{const _0x4bab11=await readdir(_0x5989e1);if(_0x4bab11[_0x1d1fb9(0x15a)]>0x0)return;await rmdir(_0x5989e1);}catch{return;}_0x5989e1=dirname(_0x5989e1);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;function a33_0x331a(_0x2310a4,_0x2586b8){_0x2310a4=_0x2310a4-0x124;const _0x39a6d4=a33_0x39a6();let _0x331a67=_0x39a6d4[_0x2310a4];return _0x331a67;}function a33_0x39a6(){const _0x5b2b81=['appCode','target','toISOString','Lock\x20scope\x20for\x20app\x20\x22','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','103168HjuHmA','<timestamp>','bff','validation','44180rvoNuw','delete','29076DnGjNN','join','trashDir','lastSync','map','/api/management/library/scripts/delete','9nNmdWP','keys','Multiple\x20functions\x20match\x20\x22','Deleted\x20','8mvJTbb','filter','str','parse','includes','projectRoot','apps','\x20(local\x20file\x20moved\x20to\x20trash)','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','Local\x20delete\x20not\x20settled\x20for\x20','scriptsRoot','functions','BFF\x20lock\x20file\x20not\x20found.','Function\x20not\x20found:\x20','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','stringify','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','\x22\x20not\x20found\x20after\x20ensureLockScope.','32356dDTUhp','508iPoWCf','startsWith','435390acYLNt','split','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','scriptsRootDir','\x20\x20-\x20','string','lockFilePath','18JyDowN','length','1443jDwYxl','336616JRmrLz','737bmxGKO','Would\x20delete\x20','remoteId'];a33_0x39a6=function(){return _0x5b2b81;};return a33_0x39a6();}async function waitForDeleteSettlement(_0x1c4af0,_0x454d51,_0xa08a50,_0x4cc725){const _0x4f5c63=a33_0x1b4693;for(let _0x45762d=0x0;_0x45762d<DELETE_SETTLE_RETRY_COUNT;_0x45762d+=0x1){const _0x117859=await readBffLockFile(_0x1c4af0),_0x26aa53=!!_0x117859?.[_0x4f5c63(0x143)]?.[_0x454d51]?.['functions']?.[_0xa08a50],_0xdf3908=await fileExists(_0x4cc725);if(!_0x26aa53&&!_0xdf3908)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x4f5c63(0x146)+_0xa08a50+'.');}
@@ -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_0x38f88a=a34_0x1315;(function(_0x10fd9e,_0x4cf473){const _0x3e8db7=a34_0x1315,_0x5793e0=_0x10fd9e();while(!![]){try{const _0xe4c417=parseInt(_0x3e8db7(0x105))/0x1*(-parseInt(_0x3e8db7(0x110))/0x2)+parseInt(_0x3e8db7(0x10d))/0x3*(parseInt(_0x3e8db7(0x109))/0x4)+-parseInt(_0x3e8db7(0x104))/0x5+parseInt(_0x3e8db7(0x111))/0x6+-parseInt(_0x3e8db7(0x10b))/0x7*(parseInt(_0x3e8db7(0xf9))/0x8)+-parseInt(_0x3e8db7(0x101))/0x9*(parseInt(_0x3e8db7(0x10a))/0xa)+-parseInt(_0x3e8db7(0xfd))/0xb*(-parseInt(_0x3e8db7(0x106))/0xc);if(_0xe4c417===_0x4cf473)break;else _0x5793e0['push'](_0x5793e0['shift']());}catch(_0x22cd9e){_0x5793e0['push'](_0x5793e0['shift']());}}}(a34_0x5542,0xd0b82));import{getBffScriptInfo}from'../../core/api-client.js';function a34_0x1315(_0x48d437,_0x1e5f56){_0x48d437=_0x48d437-0xf9;const _0x5542f6=a34_0x5542();let _0x1315da=_0x5542f6[_0x48d437];return _0x1315da;}function a34_0x5542(){const _0x220ffa=['2971461WTfXOC','read','boolean','922TlSkcy','8815464XVbcbn','updatedTime','description','160scNiLr','detail','Script\x20ID','verbose','3439161QwUBZf','scriptContent','num','appCode','9MsqFKP','(none)','createdTime','6014475MeuOkC','3254RjqQTw','108utPNdV','bool','scriptType','4WGMwzX','11487670VsAFkx','198422xWyLMR','Return\x20full\x20raw\x20script\x20object'];a34_0x5542=function(){return _0x220ffa;};return a34_0x5542();}export const bffDetail={'service':'bff','command':a34_0x38f88a(0xfa),'description':'Get\x20BFF\x20script\x20details\x20by\x20ID','risk':a34_0x38f88a(0x10e),'flags':[{'name':'id','type':'number','required':!![],'description':a34_0x38f88a(0xfb)},{'name':'verbose','type':a34_0x38f88a(0x10f),'description':a34_0x38f88a(0x10c)}],async 'execute'(_0x80241d){const _0x40d238=a34_0x38f88a,_0x34bf86=await getBffScriptInfo(_0x80241d[_0x40d238(0xff)]('id')),_0x393835=_0x80241d[_0x40d238(0x107)](_0x40d238(0xfc));if(_0x393835)return{'ok':!![],'data':_0x34bf86};return{'ok':!![],'data':{'id':_0x34bf86['id'],'appCode':_0x34bf86[_0x40d238(0x100)],'scriptType':_0x34bf86[_0x40d238(0x108)],'description':_0x34bf86[_0x40d238(0x113)]||_0x40d238(0x102),'createdTime':_0x34bf86[_0x40d238(0x103)]??'','updatedTime':_0x34bf86[_0x40d238(0x112)]??'','scriptContent':_0x34bf86[_0x40d238(0xfe)]??''}};}};
@@ -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(_0x1952d0,_0x249d39){const _0x2837c2=a35_0xa36f,_0x5a2613=_0x1952d0();while(!![]){try{const _0x22c7f9=-parseInt(_0x2837c2(0x189))/0x1*(-parseInt(_0x2837c2(0x18d))/0x2)+parseInt(_0x2837c2(0x18f))/0x3*(-parseInt(_0x2837c2(0x190))/0x4)+parseInt(_0x2837c2(0x18b))/0x5+parseInt(_0x2837c2(0x18e))/0x6+-parseInt(_0x2837c2(0x187))/0x7*(-parseInt(_0x2837c2(0x18c))/0x8)+parseInt(_0x2837c2(0x18a))/0x9+-parseInt(_0x2837c2(0x188))/0xa;if(_0x22c7f9===_0x249d39)break;else _0x5a2613['push'](_0x5a2613['shift']());}catch(_0x4fee18){_0x5a2613['push'](_0x5a2613['shift']());}}}(a35_0x56d9,0xcb4a9));import{bffList}from'../../commands/bff/list.js';function a35_0xa36f(_0x504fd9,_0x4aad44){_0x504fd9=_0x504fd9-0x187;const _0x56d945=a35_0x56d9();let _0xa36f39=_0x56d945[_0x504fd9];return _0xa36f39;}function a35_0x56d9(){const _0x4303f0=['454240UwssWq','248rPbIEn','10zbaznQ','1570032FIvvZa','213yIscNP','31804EwtJAL','334894MsTLbo','9816830HXrSmW','16927wRBvUd','4127652ehzDxb'];a35_0x56d9=function(){return _0x4303f0;};return a35_0x56d9();}import{bffDetail}from'../../commands/bff/detail.js';import{bffStatus}from'../../commands/bff/status.js';import{bffCreate}from'../../commands/bff/create.js';import{bffPush}from'../../commands/bff/push.js';import{bffPull}from'../../commands/bff/pull.js';import{bffDelete}from'../../commands/bff/delete.js';export const bffDefinitions=[bffList,bffDetail,bffStatus,bffCreate,bffPush,bffPull,bffDelete];
@@ -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_0x188de4=a36_0x45b0;(function(_0x42a45d,_0x36052c){const _0x5a5cae=a36_0x45b0,_0x379cf4=_0x42a45d();while(!![]){try{const _0x18feba=-parseInt(_0x5a5cae(0x1ae))/0x1+-parseInt(_0x5a5cae(0x1b3))/0x2+parseInt(_0x5a5cae(0x1b2))/0x3*(-parseInt(_0x5a5cae(0x1ad))/0x4)+parseInt(_0x5a5cae(0x1ac))/0x5*(parseInt(_0x5a5cae(0x1a3))/0x6)+-parseInt(_0x5a5cae(0x1b5))/0x7+-parseInt(_0x5a5cae(0x19c))/0x8+parseInt(_0x5a5cae(0x1a9))/0x9*(parseInt(_0x5a5cae(0x1b4))/0xa);if(_0x18feba===_0x36052c)break;else _0x379cf4['push'](_0x379cf4['shift']());}catch(_0x495980){_0x379cf4['push'](_0x379cf4['shift']());}}}(a36_0x156c,0x52823));function a36_0x45b0(_0xba996f,_0x21483a){_0xba996f=_0xba996f-0x19c;const _0x156c0a=a36_0x156c();let _0x45b0d1=_0x156c0a[_0xba996f];return _0x45b0d1;}function a36_0x156c(){const _0x20613f=['scriptType','COMMON','list','bool','6CjmlnV','bff','Filter\x20by\x20script\x20name','string','length','functionName','27TDunUq','description','name','978785ajWSGZ','68yhGnvh','83396jxLPFr','ENDPOINT','No\x20BFF\x20scripts\x20found.','Script\x20type\x20filter','65640tidTal','1169058eDdApJ','6813390fNXeDc','3633581tRoYgc','appCode','boolean','2742808MnBbrz','type','verbose'];a36_0x156c=function(){return _0x20613f;};return a36_0x156c();}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a36_0x188de4(0x1a4),'command':a36_0x188de4(0x1a1),'description':'List\x20BFF\x20scripts','risk':'read','flags':[{'name':a36_0x188de4(0x19d),'type':a36_0x188de4(0x1a6),'description':a36_0x188de4(0x1b1),'default':a36_0x188de4(0x1af),'enum':['ENDPOINT',a36_0x188de4(0x1a0)]},{'name':a36_0x188de4(0x1ab),'type':a36_0x188de4(0x1a6),'description':a36_0x188de4(0x1a5)},{'name':a36_0x188de4(0x19e),'type':a36_0x188de4(0x1b7),'description':'Return\x20full\x20script\x20objects'}],async 'execute'(_0x4b3aa6){const _0x149994=a36_0x188de4,_0x1d683d=await listBffScripts(_0x4b3aa6[_0x149994(0x1b6)],_0x4b3aa6['str'](_0x149994(0x19d)),{'scriptName':_0x4b3aa6['str'](_0x149994(0x1ab))||undefined}),_0x35ccc=_0x4b3aa6[_0x149994(0x1a2)](_0x149994(0x19e));return{'ok':!![],'data':_0x35ccc?_0x1d683d:_0x1d683d['map'](_0x34426a=>({'id':_0x34426a['id'],'functionName':_0x34426a[_0x149994(0x1a8)]??'','description':_0x34426a[_0x149994(0x1aa)]||'(unnamed)','scriptType':_0x34426a[_0x149994(0x19f)]})),'message':_0x1d683d[_0x149994(0x1a7)]===0x0?_0x149994(0x1b0):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
+ function a37_0x1006(_0x422ac3,_0x158ee7){_0x422ac3=_0x422ac3-0x1cc;const _0x3c412d=a37_0x3c41();let _0x100639=_0x3c412d[_0x422ac3];return _0x100639;}const a37_0x409741=a37_0x1006;(function(_0x33e92c,_0x6f15a9){const _0x227554=a37_0x1006,_0x56e7bb=_0x33e92c();while(!![]){try{const _0x526276=-parseInt(_0x227554(0x200))/0x1+-parseInt(_0x227554(0x1fa))/0x2+-parseInt(_0x227554(0x1fe))/0x3+parseInt(_0x227554(0x1d1))/0x4+parseInt(_0x227554(0x20f))/0x5+parseInt(_0x227554(0x1cd))/0x6*(-parseInt(_0x227554(0x1da))/0x7)+-parseInt(_0x227554(0x1e8))/0x8*(-parseInt(_0x227554(0x1e6))/0x9);if(_0x526276===_0x6f15a9)break;else _0x56e7bb['push'](_0x56e7bb['shift']());}catch(_0x1a6180){_0x56e7bb['push'](_0x56e7bb['shift']());}}}(a37_0x3c41,0x72bb3));import{createInterface}from'node:readline';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';import{loadBffProjectConfig}from'../../core/bff/config.js';function a37_0x3c41(){const _0x1c73ec=['unresolvable\x20target\x20path','functions','bool','map','scriptsRoot','COMMON','close','all','write','str','functionName','1449FwXCYS','filePath','44168TvnWvi','nonInteractive','scriptType','lastSync','bff','local\x20unsynced\x20changes','push','lockKey','functionNode','toLowerCase','stringify','trim','scriptContent','skipped','hash','alias','length','string','1307558LWcxwx','\x22\x20not\x20found\x20after\x20ensureLockScope.','version','appCode','335580XnQMSQ','includes','826175MIfHCV','pull','datasetCode','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','question','Lock\x20scope\x20for\x20app\x20\x22','lockFilePath','hookLocation','GET','Remote\x20script\x20missing\x20id.','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','force','operationType','\x20skipped,\x20','\x20failed','1877925DBrpJx','would_pull','30CyMiSo','Pull\x20complete:\x20','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','HOOK','3608808nlCXHV','\x20pulled,\x20','conflict','/api/management/library/scripts/list?appCode=','apiDir','type','stderr','parse','Would\x20inspect\x20','146881HGvQHs'];a37_0x3c41=function(){return _0x1c73ec;};return a37_0x3c41();}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_0x409741(0x1ec),'command':a37_0x409741(0x201),'description':a37_0x409741(0x20a),'risk':a37_0x409741(0x1e3),'flags':[{'name':'type','type':a37_0x409741(0x1f9),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a37_0x409741(0x1e0),'ENDPOINT',a37_0x409741(0x1d0)]},{'name':a37_0x409741(0x20b),'type':'boolean','description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x4c8a2a){const _0x1cf54d=a37_0x409741,_0x4b078d=loadBffProjectConfig(_0x4c8a2a['appCode']),_0x51ed7e=await readBffLockFile(_0x4b078d[_0x1cf54d(0x206)]),{appLock:_0x1879fe}=ensureLockScope(_0x51ed7e??createEmptyBffLock(),_0x4c8a2a['appCode'],_0x4b078d[_0x1cf54d(0x1df)],_0x1cf54d(0x201)),_0x529527=normalizeBffType(_0x4c8a2a['str'](_0x1cf54d(0x1d6)))??undefined,_0x576f38=buildDatasetCodeToAliasMap(_0x4c8a2a['apiDir'],_0x4c8a2a[_0x1cf54d(0x1fd)]),[_0x2b995,_0x46684b]=await Promise[_0x1cf54d(0x1e2)]([listBffScripts(_0x4c8a2a[_0x1cf54d(0x1fd)],_0x529527),getBffScriptStatistics(_0x4c8a2a[_0x1cf54d(0x1fd)])]),_0x15325f=createHookLocationMap(_0x46684b),_0x21be27=[];for(const _0x37aa31 of _0x2b995){const _0x174a5a=resolveRemoteScriptTarget(_0x4b078d,_0x37aa31,_0x15325f,_0x1879fe[_0x1cf54d(0x1dc)],_0x576f38);if(!_0x174a5a){_0x21be27[_0x1cf54d(0x1ee)]({'scriptType':_0x37aa31[_0x1cf54d(0x1ea)],'functionName':_0x37aa31[_0x1cf54d(0x1e5)]??'','status':_0x1cf54d(0x1f5),'reason':_0x1cf54d(0x1db)});continue;}const _0x2cb7dc=_0x1879fe['functions'][_0x174a5a[_0x1cf54d(0x1ef)]],_0x264c31=_0x37aa31[_0x1cf54d(0x1f4)]!=null?computeContentHash(_0x37aa31[_0x1cf54d(0x1f4)]):undefined,_0x398dcd=await hasUnsyncedLocalChanges(_0x174a5a[_0x1cf54d(0x1e7)],_0x2cb7dc,_0x264c31);_0x21be27[_0x1cf54d(0x1ee)]({'lockKey':_0x174a5a[_0x1cf54d(0x1ef)],'filePath':_0x174a5a[_0x1cf54d(0x1e7)],'remoteId':_0x37aa31['id']??null,'status':_0x398dcd?_0x1cf54d(0x1d3):_0x1cf54d(0x1cc)});}return{'method':_0x1cf54d(0x208),'url':_0x1cf54d(0x1d4)+_0x4c8a2a[_0x1cf54d(0x1fd)]+(_0x529527?'&type='+_0x529527:''),'body':{'appCode':_0x4c8a2a[_0x1cf54d(0x1fd)],'filterType':_0x529527??null,'files':_0x21be27},'description':_0x1cf54d(0x1d9)+_0x21be27[_0x1cf54d(0x1f8)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0xe018d2){const _0x2d9755=a37_0x409741,_0x58fc54=loadBffProjectConfig(_0xe018d2[_0x2d9755(0x1fd)]),_0x5e5896=await readBffLockFile(_0x58fc54[_0x2d9755(0x206)]),{lockData:_0x32aaed,appLock:_0x36cb5c}=ensureLockScope(_0x5e5896??createEmptyBffLock(),_0xe018d2[_0x2d9755(0x1fd)],_0x58fc54[_0x2d9755(0x1df)],_0x2d9755(0x201)),_0x3f7db2=normalizeBffType(_0xe018d2[_0x2d9755(0x1e4)]('type'))??undefined;if(_0xe018d2[_0x2d9755(0x1e4)](_0x2d9755(0x1d6))&&!_0x3f7db2)throw CliErrors['validation'](_0x2d9755(0x1cf));const [_0x14ef16,_0x2f5f56]=await Promise[_0x2d9755(0x1e2)]([listBffScripts(_0xe018d2[_0x2d9755(0x1fd)],_0x3f7db2),getBffScriptStatistics(_0xe018d2[_0x2d9755(0x1fd)])]);if(_0x14ef16[_0x2d9755(0x1f8)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x3af99c=_0xe018d2[_0x2d9755(0x1dd)](_0x2d9755(0x20b));if(_0x3af99c&&!_0xe018d2[_0x2d9755(0x1e9)]){const _0x132a48=await confirmForce();if(!_0x132a48)throw CliErrors['cancelled']('Force\x20pull\x20cancelled.');}if(_0x3af99c&&_0xe018d2['nonInteractive']){}const _0x540077=buildDatasetCodeToAliasMap(_0xe018d2[_0x2d9755(0x1d5)],_0xe018d2[_0x2d9755(0x1fd)]),_0xbddbc5=createHookLocationMap(_0x2f5f56),_0x30a08a=JSON[_0x2d9755(0x1d8)](JSON[_0x2d9755(0x1f2)](_0x32aaed)),_0x5ec3ea=_0xe018d2[_0x2d9755(0x1fd)],_0x1ed36c=_0x30a08a['apps'][_0x5ec3ea];if(!_0x1ed36c)throw new Error(_0x2d9755(0x205)+_0x5ec3ea+_0x2d9755(0x1fb));const _0x2bc9dd=[],_0x1e0c36=[],_0x398c3d=[];for(const _0x513f20 of _0x14ef16){const _0xcf398=resolveRemoteScriptTarget(_0x58fc54,_0x513f20,_0xbddbc5,_0x36cb5c['functions'],_0x540077);if(!_0xcf398){_0x1e0c36[_0x2d9755(0x1ee)]({'lockKey':_0x513f20['scriptType']+'/'+_0x513f20[_0x2d9755(0x1e5)],'reason':_0x2d9755(0x1db)});continue;}const _0x5f44a9=_0x36cb5c[_0x2d9755(0x1dc)][_0xcf398[_0x2d9755(0x1ef)]];try{if(!_0x513f20['id'])throw new Error(_0x2d9755(0x209));if(_0x513f20['scriptContent']==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x41adb3=_0x513f20[_0x2d9755(0x1f4)],_0x78fc9e=computeContentHash(_0x41adb3);if(!_0x3af99c){const _0x29af43=await hasUnsyncedLocalChanges(_0xcf398['filePath'],_0x5f44a9,_0x78fc9e);if(_0x29af43){_0x1e0c36['push']({'lockKey':_0xcf398[_0x2d9755(0x1ef)],'reason':_0x2d9755(0x1ed)});continue;}}await ensureParentDirectory(_0xcf398[_0x2d9755(0x1e7)]),await writeFile(_0xcf398[_0x2d9755(0x1e7)],_0x41adb3,'utf8');const _0x1e7118={'hash':_0x78fc9e,'remoteId':_0x513f20['id'],'version':_0x513f20[_0x2d9755(0x1fc)]};_0xcf398[_0x2d9755(0x1d6)]===_0x2d9755(0x1d0)&&_0xcf398[_0x2d9755(0x207)]&&(_0x1e7118[_0x2d9755(0x1f7)]=_0xcf398[_0x2d9755(0x207)][_0x2d9755(0x1f7)],_0x1e7118[_0x2d9755(0x202)]=_0xcf398['hookLocation'][_0x2d9755(0x202)],_0x1e7118[_0x2d9755(0x20c)]=_0xcf398[_0x2d9755(0x207)][_0x2d9755(0x20c)],_0x1e7118[_0x2d9755(0x1f0)]=_0xcf398[_0x2d9755(0x207)][_0x2d9755(0x1f0)]),_0x1ed36c[_0x2d9755(0x1dc)][_0xcf398[_0x2d9755(0x1ef)]]=_0x1e7118,_0x2bc9dd[_0x2d9755(0x1ee)]({'lockKey':_0xcf398[_0x2d9755(0x1ef)],'remoteId':_0x513f20['id']});}catch(_0x8f460a){_0x398c3d[_0x2d9755(0x1ee)]({'lockKey':_0xcf398[_0x2d9755(0x1ef)],'error':_0x8f460a instanceof Error?_0x8f460a['message']:String(_0x8f460a)});}}return _0x1ed36c[_0x2d9755(0x1eb)]=new Date()['toISOString'](),await writeBffLockFile(_0x58fc54['lockFilePath'],_0x30a08a),{'ok':_0x398c3d[_0x2d9755(0x1f8)]===0x0,'data':{'pulled':_0x2bc9dd,'skipped':_0x1e0c36,'failed':_0x398c3d},'message':_0x2d9755(0x1ce)+_0x2bc9dd[_0x2d9755(0x1f8)]+_0x2d9755(0x1d2)+_0x1e0c36[_0x2d9755(0x1f8)]+_0x2d9755(0x20d)+_0x398c3d[_0x2d9755(0x1f8)]+_0x2d9755(0x20e)};}};async function hasUnsyncedLocalChanges(_0x4f88d7,_0x354109,_0x382a42){const _0x3e9187=a37_0x409741;if(!await fileExists(_0x4f88d7))return![];const _0x3cb2a6=await computeFileHash(_0x4f88d7);if(!_0x354109)return _0x382a42?_0x3cb2a6!==_0x382a42:!![];return _0x3cb2a6!==_0x354109[_0x3e9187(0x1f6)];}function buildDatasetCodeToAliasMap(_0x506965,_0x19c4d5){const _0x4b3d47=a37_0x409741,_0x16f7b0=loadAliasMap(_0x506965,undefined,resolveApiFilePath(_0x506965,_0x19c4d5));return new Map(_0x16f7b0[_0x4b3d47(0x1de)](_0x14d6dc=>[_0x14d6dc['datasetCode'],_0x14d6dc[_0x4b3d47(0x1f7)]]));}async function confirmForce(){const _0x48314e=a37_0x409741,_0x4306dd=createInterface({'input':process['stdin'],'output':process[_0x48314e(0x1d7)]}),_0x5f216e=await new Promise(_0x2d9f74=>{const _0x3ee7a9=_0x48314e;_0x4306dd[_0x3ee7a9(0x204)](_0x3ee7a9(0x203),_0x2d9f74);});return _0x4306dd[_0x48314e(0x1e1)](),['y','yes'][_0x48314e(0x1ff)](_0x5f216e[_0x48314e(0x1f3)]()[_0x48314e(0x1f1)]());}
@@ -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_0x5f374a=a38_0x438f;(function(_0x3a5e2e,_0x585e10){const _0x3b1c32=a38_0x438f,_0x28ffa9=_0x3a5e2e();while(!![]){try{const _0x36cca6=parseInt(_0x3b1c32(0x12b))/0x1*(parseInt(_0x3b1c32(0x15c))/0x2)+parseInt(_0x3b1c32(0x134))/0x3+parseInt(_0x3b1c32(0x14a))/0x4+-parseInt(_0x3b1c32(0x16c))/0x5+parseInt(_0x3b1c32(0x12f))/0x6+-parseInt(_0x3b1c32(0x133))/0x7*(-parseInt(_0x3b1c32(0x15b))/0x8)+-parseInt(_0x3b1c32(0x16d))/0x9;if(_0x36cca6===_0x585e10)break;else _0x28ffa9['push'](_0x28ffa9['shift']());}catch(_0x3cc1d6){_0x28ffa9['push'](_0x28ffa9['shift']());}}}(a38_0x4e7e,0x635d3));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_0x4e7e(){const _0x5845e4=['operationType','1747664jMjssn','attempted','utf8','stringify','Runtime\x20script\x20cache\x20cleared.','scriptsRoot','bool','cleared','has','apiDir','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','runtime\x20cache\x20clear\x20failed','string','boolean','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','high-risk-write','lockKey','72656XBcKnM','126PYWblm','\x22\x20not\x20found\x20after\x20ensureLockScope.','map','aliasToDatasetCode','filePath','remoteId','functionNode','Push\x20complete:\x20','appCode','unchanged','Push\x20local\x20BFF\x20scripts\x20to\x20remote','values','lastSync','bff','set','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','1209240KIEAYU','15568092BaPPcG','\x20skipped,\x20','length','POST','message','some','ENDPOINT','status','join','Would\x20inspect\x20','Incomplete\x20HOOK\x20path:\x20','apps','get','\x22.\x20','version','validation','Run\x20`','10549UBuOuK','COMMON','every',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','1031712YVsnvy','type','parse','datasetCodeToDataset','427gbJWBz','1653522aQFqeL','toISOString','functions','str','name','push','/api/management/library/scripts/save','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','lockFilePath','would_push','No\x20local\x20BFF\x20functions\x20found.','hash','alias','Force\x20push\x20ignoring\x20hash\x20protection','datasetCode','\x20uploaded,\x20','force','create','Cannot\x20resolve\x20dataset\x20for\x20\x22','HOOK','Local\x20function\x20not\x20found:\x20'];a38_0x4e7e=function(){return _0x5845e4;};return a38_0x4e7e();}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';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_0x5f374a(0x169),'command':a38_0x5f374a(0x139),'description':a38_0x5f374a(0x166),'risk':a38_0x5f374a(0x159),'flags':[{'name':a38_0x5f374a(0x130),'type':a38_0x5f374a(0x156),'description':'Push\x20only\x20this\x20script\x20type','enum':[a38_0x5f374a(0x12c),a38_0x5f374a(0x120),a38_0x5f374a(0x147)]},{'name':'name','type':a38_0x5f374a(0x156),'description':a38_0x5f374a(0x158)},{'name':a38_0x5f374a(0x144),'type':a38_0x5f374a(0x157),'description':a38_0x5f374a(0x141)}],async 'dryRun'(_0x3e2b93){const _0x49ba1e=a38_0x5f374a,_0x49fa79=loadBffProjectConfig(_0x3e2b93[_0x49ba1e(0x164)]),_0x482734=await readBffLockFile(_0x49fa79[_0x49ba1e(0x13c)]),{appLock:_0x1b6be3}=ensureLockScope(_0x482734??createEmptyBffLock(),_0x3e2b93[_0x49ba1e(0x164)],_0x49fa79['scriptsRoot'],'push'),_0xed8f6b=await getTargetFunctions(_0x49fa79,_0x3e2b93),_0x3a8c3f=_0x3e2b93[_0x49ba1e(0x150)]('force'),_0x53941a=[];for(const _0x46093a of _0xed8f6b){const _0x52c74f=await computeFileHash(_0x46093a['filePath']),_0x26acf1=_0x1b6be3[_0x49ba1e(0x136)][_0x46093a[_0x49ba1e(0x15a)]],_0x3e7b2d=!!_0x26acf1&&_0x26acf1[_0x49ba1e(0x13f)]===_0x52c74f;_0x53941a[_0x49ba1e(0x139)]({'lockKey':_0x46093a[_0x49ba1e(0x15a)],'filePath':_0x46093a[_0x49ba1e(0x160)],'remoteId':_0x26acf1?.[_0x49ba1e(0x161)]??null,'mode':_0x26acf1?.[_0x49ba1e(0x161)]?'update':_0x49ba1e(0x145),'status':!_0x3a8c3f&&_0x3e7b2d?'unchanged':_0x49ba1e(0x13d)});}return{'method':_0x49ba1e(0x170),'url':_0x49ba1e(0x13a),'body':{'appCode':_0x3e2b93[_0x49ba1e(0x164)],'force':_0x3a8c3f,'files':_0x53941a,'cacheClearAtRuntime':_0x53941a['some'](_0x32e76b=>_0x32e76b[_0x49ba1e(0x121)]==='would_push'),'cacheClearAtRuntimeTimes':_0x53941a[_0x49ba1e(0x172)](_0x408dc5=>_0x408dc5[_0x49ba1e(0x121)]===_0x49ba1e(0x13d))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x49ba1e(0x123)+_0x53941a[_0x49ba1e(0x16f)]+_0x49ba1e(0x154)};},async 'execute'(_0x531dfa){const _0x5bcf96=a38_0x5f374a,_0x23f6af=loadBffProjectConfig(_0x531dfa['appCode']),_0x16a90e=await readBffLockFile(_0x23f6af[_0x5bcf96(0x13c)]),{lockData:_0x2f5829,appLock:_0x594b3f}=ensureLockScope(_0x16a90e??createEmptyBffLock(),_0x531dfa[_0x5bcf96(0x164)],_0x23f6af[_0x5bcf96(0x14f)],_0x5bcf96(0x139)),_0x587904=await getTargetFunctions(_0x23f6af,_0x531dfa);if(_0x587904[_0x5bcf96(0x16f)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x5bcf96(0x13e)};const _0x4c13be=_0x531dfa[_0x5bcf96(0x150)]('force'),_0x56cf41=JSON[_0x5bcf96(0x131)](JSON[_0x5bcf96(0x14d)](_0x2f5829)),_0x3bf00f=_0x56cf41[_0x5bcf96(0x125)][_0x531dfa[_0x5bcf96(0x164)]];if(!_0x3bf00f)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x531dfa['appCode']+_0x5bcf96(0x15d));const _0x25e4de=await buildHookMaps(_0x531dfa[_0x5bcf96(0x164)],_0x531dfa[_0x5bcf96(0x153)],_0x587904,_0x3bf00f),_0x22632d=[],_0x8a49d3=[],_0x38cc15=[];for(const _0x23210d of _0x587904){const _0x5c40e3=await computeFileHash(_0x23210d[_0x5bcf96(0x160)]),_0x2384fd=_0x3bf00f[_0x5bcf96(0x136)][_0x23210d['lockKey']];if(!_0x4c13be&&_0x2384fd&&_0x2384fd[_0x5bcf96(0x13f)]===_0x5c40e3){_0x8a49d3[_0x5bcf96(0x139)]({'lockKey':_0x23210d[_0x5bcf96(0x15a)],'reason':_0x5bcf96(0x165)});continue;}try{await uploadSingleFunction(_0x531dfa[_0x5bcf96(0x164)],_0x23210d,_0x3bf00f,_0x25e4de);const _0x135784=_0x3bf00f[_0x5bcf96(0x136)][_0x23210d[_0x5bcf96(0x15a)]];_0x22632d[_0x5bcf96(0x139)]({'lockKey':_0x23210d[_0x5bcf96(0x15a)],'remoteId':_0x135784?.[_0x5bcf96(0x161)]??0x0});}catch(_0x4cd64a){_0x38cc15[_0x5bcf96(0x139)]({'lockKey':_0x23210d['lockKey'],'error':_0x4cd64a instanceof Error?_0x4cd64a[_0x5bcf96(0x171)]:String(_0x4cd64a)});}}_0x3bf00f[_0x5bcf96(0x168)]=new Date()[_0x5bcf96(0x135)](),await writeBffLockFile(_0x23f6af[_0x5bcf96(0x13c)],_0x56cf41),await waitForUploadedLockEntries(_0x23f6af[_0x5bcf96(0x13c)],_0x531dfa[_0x5bcf96(0x164)],_0x22632d[_0x5bcf96(0x15e)](_0x87b793=>_0x87b793[_0x5bcf96(0x15a)]));let _0x29d9a1={'attempted':![],'cleared':![]};if(_0x22632d[_0x5bcf96(0x16f)]>0x0)try{let _0x3946c6='';for(let _0x4c4549=0x0;_0x4c4549<CACHE_CLEAR_ATTEMPTS;_0x4c4549+=0x1){_0x3946c6=await clearBffScriptCache(),_0x4c4549<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x29d9a1={'attempted':!![],'cleared':!![],'message':_0x3946c6||_0x5bcf96(0x14e)};}catch(_0x51c72a){_0x29d9a1={'attempted':!![],'cleared':![],'error':_0x51c72a instanceof Error?_0x51c72a[_0x5bcf96(0x171)]:String(_0x51c72a)};}const _0x43fe8f=_0x38cc15[_0x5bcf96(0x16f)]===0x0&&(_0x29d9a1[_0x5bcf96(0x14b)]?_0x29d9a1[_0x5bcf96(0x151)]:!![]),_0x2629b3=_0x29d9a1[_0x5bcf96(0x14b)]?_0x29d9a1[_0x5bcf96(0x151)]?'runtime\x20cache\x20cleared':_0x5bcf96(0x155):'runtime\x20cache\x20not\x20needed';return{'ok':_0x43fe8f,'data':{'uploaded':_0x22632d,'skipped':_0x8a49d3,'failed':_0x38cc15,'cacheClear':_0x29d9a1},'message':_0x5bcf96(0x163)+_0x22632d[_0x5bcf96(0x16f)]+_0x5bcf96(0x143)+_0x8a49d3['length']+_0x5bcf96(0x16e)+_0x38cc15['length']+'\x20failed,\x20'+_0x2629b3};}};async function getTargetFunctions(_0x1195f8,_0x10434c){const _0x5615a9=a38_0x5f374a,_0x32722c=_0x10434c[_0x5615a9(0x137)](_0x5615a9(0x130)),_0x46cce4=_0x10434c[_0x5615a9(0x137)](_0x5615a9(0x138)),_0x578046=normalizeBffType(_0x32722c)??undefined;if(_0x46cce4&&!_0x578046)throw CliErrors[_0x5615a9(0x129)](_0x5615a9(0x16b));const _0x29cd38=await scanLocalBffFunctions(_0x1195f8,_0x578046);if(_0x46cce4){const _0xd49fbd=_0x29cd38['filter'](_0x40b750=>_0x40b750['name']===_0x46cce4);if(_0xd49fbd[_0x5615a9(0x16f)]===0x0)throw CliErrors[_0x5615a9(0x129)](_0x5615a9(0x148)+_0x578046+'/'+_0x46cce4);return _0xd49fbd;}return _0x29cd38;}async function buildHookMaps(_0x394118,_0x380182,_0x55c403,_0x4912ab){const _0x1a961d=a38_0x5f374a,_0xa394d3=_0x55c403[_0x1a961d(0x172)](_0x111d06=>_0x111d06[_0x1a961d(0x130)]==='HOOK');if(!_0xa394d3)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x7d26af=loadAliasMap(_0x380182,undefined,resolveApiFilePath(_0x380182,_0x394118)),_0x86b97a=new Map(_0x7d26af[_0x1a961d(0x15e)](_0xbbe82c=>[_0xbbe82c[_0x1a961d(0x140)],_0xbbe82c[_0x1a961d(0x142)]]));for(const _0x5ecd02 of Object[_0x1a961d(0x167)](_0x4912ab[_0x1a961d(0x136)])){_0x5ecd02[_0x1a961d(0x140)]&&_0x5ecd02[_0x1a961d(0x142)]&&!_0x86b97a[_0x1a961d(0x152)](_0x5ecd02[_0x1a961d(0x140)])&&_0x86b97a[_0x1a961d(0x16a)](_0x5ecd02[_0x1a961d(0x140)],_0x5ecd02[_0x1a961d(0x142)]);}const _0x44bbe6=await listDatasets(_0x394118),_0x4f5ff1=new Map(_0x44bbe6[_0x1a961d(0x15e)](_0x284b9d=>[_0x284b9d['code'],_0x284b9d]));return{'aliasToDatasetCode':_0x86b97a,'datasetCodeToDataset':_0x4f5ff1};}function a38_0x438f(_0x3cbf36,_0x3fd5eb){_0x3cbf36=_0x3cbf36-0x120;const _0x4e7e5b=a38_0x4e7e();let _0x438f1c=_0x4e7e5b[_0x3cbf36];return _0x438f1c;}async function uploadSingleFunction(_0x18c9e8,_0x14125e,_0x79e2f0,_0x5c5e6a){const _0x739aad=a38_0x5f374a,_0x187343=await readFile(_0x14125e['filePath'],_0x739aad(0x14c)),_0x2eea30=await computeFileHash(_0x14125e[_0x739aad(0x160)]),_0x4138d1=_0x79e2f0[_0x739aad(0x136)][_0x14125e['lockKey']];if(_0x4138d1?.[_0x739aad(0x161)]&&_0x4138d1[_0x739aad(0x128)]==null)throw CliErrors[_0x739aad(0x129)](_0x14125e[_0x739aad(0x15a)]+_0x739aad(0x12e));let _0xd17231=extractScriptDescription(_0x187343);if(!_0xd17231&&_0x4138d1?.[_0x739aad(0x161)]){const _0x1992fd=await getBffScriptInfo(_0x4138d1[_0x739aad(0x161)]);_0xd17231=_0x1992fd['description']||undefined;}const _0x46d806={'appCode':_0x18c9e8,'functionName':_0x14125e[_0x739aad(0x138)],'scriptType':_0x14125e[_0x739aad(0x130)],'scriptContent':_0x187343};if(_0x4138d1?.[_0x739aad(0x161)])_0x46d806['id']=_0x4138d1[_0x739aad(0x161)];if(_0x4138d1?.[_0x739aad(0x128)]!=null)_0x46d806[_0x739aad(0x128)]=_0x4138d1[_0x739aad(0x128)];if(_0xd17231)_0x46d806['description']=_0xd17231;if(_0x14125e[_0x739aad(0x130)]==='HOOK'){const _0x5d8d3d=_0x14125e[_0x739aad(0x140)];if(!_0x5d8d3d||!_0x14125e[_0x739aad(0x149)]||!_0x14125e[_0x739aad(0x162)])throw CliErrors['validation'](_0x739aad(0x124)+_0x14125e[_0x739aad(0x15a)]);const _0x15c93e=_0x5c5e6a[_0x739aad(0x15f)][_0x739aad(0x126)](_0x5d8d3d)??_0x4138d1?.[_0x739aad(0x142)]??_0x5d8d3d,_0x4e671d=_0x5c5e6a[_0x739aad(0x132)][_0x739aad(0x126)](_0x15c93e);if(!_0x4e671d)throw CliErrors[_0x739aad(0x129)](_0x739aad(0x146)+_0x5d8d3d+_0x739aad(0x127)+(_0x739aad(0x12a)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x46d806['datasetId']=_0x4e671d['id'],_0x46d806[_0x739aad(0x149)]=_0x14125e[_0x739aad(0x149)],_0x46d806[_0x739aad(0x162)]=_0x14125e[_0x739aad(0x162)];}const _0x1c6650=await saveBffScript(_0x46d806),_0x27379d=_0x1c6650['id'],_0x344f99=_0x1c6650['script']??await getBffScriptInfo(_0x27379d),_0x2a4201={'hash':_0x2eea30,'remoteId':_0x27379d,'version':_0x344f99['version']};if(_0x14125e['type']===_0x739aad(0x147)){const _0x59b22c=_0x14125e[_0x739aad(0x140)],_0x1dd012=_0x5c5e6a[_0x739aad(0x15f)][_0x739aad(0x126)](_0x59b22c)??_0x4138d1?.[_0x739aad(0x142)]??_0x59b22c;_0x5c5e6a['aliasToDatasetCode'][_0x739aad(0x152)](_0x59b22c)?_0x2a4201[_0x739aad(0x140)]=_0x59b22c:_0x2a4201[_0x739aad(0x140)]=_0x4138d1?.[_0x739aad(0x140)],_0x2a4201[_0x739aad(0x142)]=_0x1dd012,_0x2a4201[_0x739aad(0x149)]=_0x14125e['operationType'],_0x2a4201[_0x739aad(0x162)]=_0x14125e[_0x739aad(0x162)];}_0x79e2f0['functions'][_0x14125e['lockKey']]=_0x2a4201;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x59e1c6,_0x27b962,_0x21c9c9){const _0x2e8f1b=a38_0x5f374a;if(_0x21c9c9['length']===0x0)return;for(let _0xac6123=0x0;_0xac6123<LOCK_SETTLE_RETRY_COUNT;_0xac6123+=0x1){const _0x4db85b=await readBffLockFile(_0x59e1c6),_0x15aafc=_0x4db85b?.['apps']?.[_0x27b962]?.['functions']??{},_0x3af8e8=_0x21c9c9[_0x2e8f1b(0x12d)](_0x457beb=>!!_0x15aafc[_0x457beb]?.[_0x2e8f1b(0x161)]);if(_0x3af8e8)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2e8f1b(0x13b)+_0x21c9c9[_0x2e8f1b(0x122)](',\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_0x4f2b(_0x39d069,_0x5ac6a6){_0x39d069=_0x39d069-0x112;const _0x3bec07=a39_0x3bec();let _0x4f2b0f=_0x3bec07[_0x39d069];return _0x4f2b0f;}const a39_0xcf72e=a39_0x4f2b;(function(_0x2a706e,_0x42af9a){const _0xd03602=a39_0x4f2b,_0x48b9f2=_0x2a706e();while(!![]){try{const _0xca6cd9=parseInt(_0xd03602(0x122))/0x1+parseInt(_0xd03602(0x129))/0x2+parseInt(_0xd03602(0x117))/0x3*(parseInt(_0xd03602(0x127))/0x4)+parseInt(_0xd03602(0x123))/0x5+-parseInt(_0xd03602(0x128))/0x6*(-parseInt(_0xd03602(0x124))/0x7)+-parseInt(_0xd03602(0x11e))/0x8+-parseInt(_0xd03602(0x11d))/0x9;if(_0xca6cd9===_0x42af9a)break;else _0x48b9f2['push'](_0x48b9f2['shift']());}catch(_0x2cc23d){_0x48b9f2['push'](_0x48b9f2['shift']());}}}(a39_0x3bec,0x2dec5));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';function a39_0x3bec(){const _0x36bc09=['15969pQQoBA','filePath','appCode','lockKey','alias','remote','4690746QfrufL','576488dPojHE','bool','apiDir','\x20added,\x20','204459eEKsog','689715ercvHR','6958NUXznB','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','push','4bCQlfl','1338wvrZwh','423938yozYzF','datasetCode','map','read','lockFilePath','length','functions','has'];a39_0x3bec=function(){return _0x36bc09;};return a39_0x3bec();}export const bffStatus={'service':'bff','command':'status','description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a39_0xcf72e(0x112),'flags':[{'name':a39_0xcf72e(0x11c),'type':'boolean','description':a39_0xcf72e(0x125)}],async 'execute'(_0x1a59cc){const _0xda4cff=a39_0xcf72e,_0x3c9291=loadBffProjectConfig(_0x1a59cc[_0xda4cff(0x119)]),_0x45e491=await readBffLockFile(_0x3c9291[_0xda4cff(0x113)]),{appLock:_0x175067}=ensureLockScope(_0x45e491??createEmptyBffLock(),_0x1a59cc[_0xda4cff(0x119)],_0x3c9291['scriptsRoot'],'status'),_0xa77a72=await scanLocalBffFunctions(_0x3c9291),_0x1ce245=[],_0xfb281f=[],_0x504d19=[];for(const _0x489446 of _0xa77a72){const _0x24c921=await computeFileHash(_0x489446[_0xda4cff(0x118)]),_0x125a3b=_0x175067[_0xda4cff(0x115)][_0x489446[_0xda4cff(0x11a)]];if(!_0x125a3b)_0x1ce245[_0xda4cff(0x126)](_0x489446[_0xda4cff(0x11a)]);else _0x125a3b['hash']!==_0x24c921?_0xfb281f[_0xda4cff(0x126)](_0x489446[_0xda4cff(0x11a)]):_0x504d19[_0xda4cff(0x126)](_0x489446[_0xda4cff(0x11a)]);}const _0x4da4a4=[];if(_0x1a59cc[_0xda4cff(0x11f)]('remote')){const _0x2fdebd=loadAliasMap(_0x1a59cc[_0xda4cff(0x120)],undefined,resolveApiFilePath(_0x1a59cc[_0xda4cff(0x120)],_0x1a59cc[_0xda4cff(0x119)])),_0x4386bd=new Map(_0x2fdebd[_0xda4cff(0x12b)](_0x39405b=>[_0x39405b[_0xda4cff(0x12a)],_0x39405b[_0xda4cff(0x11b)]])),[_0x3ec93f,_0x1d067f]=await Promise['all']([listBffScripts(_0x1a59cc[_0xda4cff(0x119)]),getBffScriptStatistics(_0x1a59cc[_0xda4cff(0x119)])]),_0x522151=createHookLocationMap(_0x1d067f),_0x23f67c=new Set(_0xa77a72['map'](_0x2f0d3c=>_0x2f0d3c[_0xda4cff(0x11a)]));for(const _0xfcf4e0 of _0x3ec93f){const _0x781f6f=resolveRemoteScriptTarget(_0x3c9291,_0xfcf4e0,_0x522151,_0x175067[_0xda4cff(0x115)],_0x4386bd);_0x781f6f&&!_0x23f67c[_0xda4cff(0x116)](_0x781f6f[_0xda4cff(0x11a)])&&_0x4da4a4[_0xda4cff(0x126)](_0x781f6f[_0xda4cff(0x11a)]);}}const _0xbd4273=_0x1ce245[_0xda4cff(0x114)]===0x0&&_0xfb281f[_0xda4cff(0x114)]===0x0&&_0x4da4a4[_0xda4cff(0x114)]===0x0;return{'ok':!![],'data':{'added':_0x1ce245,'modified':_0xfb281f,'unchanged':_0x504d19,'remoteOnly':_0x4da4a4},'message':_0xbd4273?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x1ce245[_0xda4cff(0x114)]+_0xda4cff(0x121)+_0xfb281f['length']+'\x20modified,\x20'+_0x504d19['length']+'\x20unchanged'+(_0x4da4a4['length']>0x0?',\x20'+_0x4da4a4[_0xda4cff(0x114)]+'\x20remote-only':'')};}};
@@ -0,0 +1 @@
1
+ function a40_0x49a8(_0xc76b8a,_0x529fcb){_0xc76b8a=_0xc76b8a-0x92;const _0x1a1529=a40_0x1a15();let _0x49a836=_0x1a1529[_0xc76b8a];return _0x49a836;}const a40_0x130273=a40_0x49a8;(function(_0x73a07c,_0x2b5103){const _0x43a21e=a40_0x49a8,_0x37b0bb=_0x73a07c();while(!![]){try{const _0x5f54bc=parseInt(_0x43a21e(0xaa))/0x1*(parseInt(_0x43a21e(0x9f))/0x2)+-parseInt(_0x43a21e(0x9d))/0x3*(parseInt(_0x43a21e(0x96))/0x4)+parseInt(_0x43a21e(0x93))/0x5+-parseInt(_0x43a21e(0xa9))/0x6+parseInt(_0x43a21e(0xae))/0x7+-parseInt(_0x43a21e(0xab))/0x8+-parseInt(_0x43a21e(0xac))/0x9*(-parseInt(_0x43a21e(0xa3))/0xa);if(_0x5f54bc===_0x2b5103)break;else _0x37b0bb['push'](_0x37b0bb['shift']());}catch(_0x213c4f){_0x37b0bb['push'](_0x37b0bb['shift']());}}}(a40_0x1a15,0x5f6a5));function a40_0x1a15(){const _0x2c516d=['495055CSrzDx','5266888WuWWIw','279ScxiKH','nonInteractive','1524957qyFdNN','log','apiError','274865xJAxEj','inherit','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','872ztoeKb','unknown','npx\x20skills\x20add\x20failed:\x20','../../skills/npx-skills-add.js','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','info','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','3882qdMbDG','cli-skill','2HNoWUw','cwd','pipe','skipped','282410wrigam','error','install','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.',')...','write','1872456QInrmO'];a40_0x1a15=function(){return _0x2c516d;};return a40_0x1a15();}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a40_0x130273(0x9e),'command':a40_0x130273(0xa5),'description':a40_0x130273(0x9c),'risk':a40_0x130273(0xa8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1ce6c5){const _0x2f44cb=a40_0x130273;logger['setLogPath'](process[_0x2f44cb(0xa0)]()),logger[_0x2f44cb(0x9b)]('cli-skill-install',_0x2f44cb(0xa6));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x505685,RABETBASE_SKILL_SOURCE:_0x567e96,runNpxSkillsAddGlobal:_0x4d636c}=await import(_0x2f44cb(0x99)),_0x4676e5=_0x1ce6c5[_0x2f44cb(0xad)]?_0x2f44cb(0xa1):_0x2f44cb(0x94);console[_0x2f44cb(0xaf)](_0x2f44cb(0x9a)+_0x505685+_0x2f44cb(0xa7));const _0x36a2b1=_0x4d636c(process['cwd'](),_0x567e96,{'stdio':_0x4676e5});if(_0x36a2b1[_0x2f44cb(0xa2)])console[_0x2f44cb(0xaf)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x36a2b1['ok'])console[_0x2f44cb(0xaf)]('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0x2f44cb(0x92)](_0x2f44cb(0x98)+(_0x36a2b1[_0x2f44cb(0xa4)]||_0x2f44cb(0x97)),_0x2f44cb(0x95)+_0x505685);}return{'ok':!![]};}}];
@@ -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_0x213f01=a41_0x1169;(function(_0x47669b,_0x2949aa){const _0x594bcb=a41_0x1169,_0x490763=_0x47669b();while(!![]){try{const _0x123513=-parseInt(_0x594bcb(0x161))/0x1*(parseInt(_0x594bcb(0x13e))/0x2)+-parseInt(_0x594bcb(0x142))/0x3*(parseInt(_0x594bcb(0x14b))/0x4)+parseInt(_0x594bcb(0x125))/0x5+-parseInt(_0x594bcb(0x132))/0x6*(parseInt(_0x594bcb(0x128))/0x7)+parseInt(_0x594bcb(0x14e))/0x8*(parseInt(_0x594bcb(0x12e))/0x9)+parseInt(_0x594bcb(0x12b))/0xa+-parseInt(_0x594bcb(0x150))/0xb*(parseInt(_0x594bcb(0x13c))/0xc);if(_0x123513===_0x2949aa)break;else _0x490763['push'](_0x490763['shift']());}catch(_0x5c05a5){_0x490763['push'](_0x490763['shift']());}}}(a41_0x1844,0x3fddb));import a41_0x3ff246 from'chalk';import a41_0xb1f1b4 from'ora';import a41_0x17e20a from'semver';function a41_0x1169(_0x11b31b,_0x349e7d){_0x11b31b=_0x11b31b-0x110;const _0x1844a2=a41_0x1844();let _0x11697a=_0x1844a2[_0x11b31b];return _0x11697a;}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 _0x50001f=a41_0x1169;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x50001f(0x145)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3cf285=a41_0x1169,_0x42358e=process[_0x3cf285(0x12d)][_0x3cf285(0x140)]();if(_0x42358e[_0x3cf285(0x11b)](_0x3cf285(0x14a)))return'bun';return'npm';}const updateFlags=[{'name':a41_0x213f01(0x126),'type':a41_0x213f01(0x15c),'description':a41_0x213f01(0x116),'default':![]},{'name':a41_0x213f01(0x149),'type':'string','description':a41_0x213f01(0x153)},{'name':'no-skills','type':a41_0x213f01(0x15c),'description':a41_0x213f01(0x119),'default':![]},{'name':a41_0x213f01(0x162),'type':'boolean','description':a41_0x213f01(0x158),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x343e49){const _0x420013=a41_0x213f01;return _0x343e49[_0x420013(0x14f)]('version')['trim']();}function shouldSkipCliSkill(_0x454b4e){const _0x12737f=a41_0x213f01;return _0x454b4e[_0x12737f(0x143)](_0x12737f(0x12a))||_0x454b4e[_0x12737f(0x114)](_0x12737f(0x162))===![];}async function validateUpdateFlags(_0x4042fc){const _0x5d7434=a41_0x213f01,_0x5a6918=_0x4042fc['bool'](_0x5d7434(0x126)),_0x402c61=getRequestedVersion(_0x4042fc);if(_0x5a6918&&_0x402c61)throw CliErrors[_0x5d7434(0x155)](_0x5d7434(0x138),_0x5d7434(0x152));if(_0x402c61&&!a41_0x17e20a[_0x5d7434(0x11e)](_0x402c61))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x402c61,_0x5d7434(0x163));}async function fetchNpmDistTags(){const _0x2c9b93=a41_0x213f01;try{const _0x449267=await fetch(_0x2c9b93(0x157)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2c9b93(0x141),{'signal':AbortSignal[_0x2c9b93(0x147)](0x2710)});if(!_0x449267['ok'])return null;const _0x223fe4=await _0x449267[_0x2c9b93(0x164)]();if(!_0x223fe4||typeof _0x223fe4!==_0x2c9b93(0x151))return null;return Object['fromEntries'](Object[_0x2c9b93(0x15d)](_0x223fe4)[_0x2c9b93(0x11a)](([,_0x51b5a3])=>typeof _0x51b5a3===_0x2c9b93(0x146)&&_0x51b5a3[_0x2c9b93(0x137)]()['length']>0x0)['map'](([_0xc71bbf,_0x511071])=>[_0xc71bbf,String(_0x511071)[_0x2c9b93(0x137)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x1488f3){const _0xce48d7=await fetchNpmDistTags();return _0xce48d7?.[_0x1488f3]??null;}async function fetchLatestVersion(){const _0x590e86=a41_0x213f01;return fetchNpmDistTagVersion(_0x590e86(0x13b));}function a41_0x1844(){const _0x1edbab=['Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','filter','includes','error','skipped','valid','Requested\x20version:\x20','run','Current\x20version:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','yellow','1082715cHIYXp','beta','cwd','21tufxEQ','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','no-skills','4453960jZXdpl','npm','execPath','36YdbBOY','...','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','log','942078ypvrhv','start','Already\x20on\x20requested\x20version\x20(v','fail','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','trim','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','red','succeed','latest','24XCUBoP','Beta\x20version:\x20','406wKqkAN','warn','toLowerCase','/dist-tags','114378AibseH','bool','green','slice','string','timeout','Checking\x20CLI\x20Built-in\x20Skill...','version','bun','4PluOKk','source','\x20→\x20','914192hNSnEn','str','87802nmJMyi','object','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Install\x20a\x20specific\x20CLI\x20version','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','validation','Update\x20failed','https://registry.npmjs.org/-/package/','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','\x20\x20Try\x20manually:\x20','inherit','gray','boolean','entries','Update\x20available:\x20','pipe','Already\x20up\x20to\x20date\x20(v','1637FeDJux','skills','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','json','Version\x20comparison\x20failed','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','message','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','flag','install','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Updating\x20via\x20','nonInteractive'];a41_0x1844=function(){return _0x1edbab;};return a41_0x1844();}async function resolveTargetVersion(_0x404622){const _0x1253ee=a41_0x213f01,_0x2991d4=getRequestedVersion(_0x404622);if(_0x2991d4)return{'version':_0x2991d4,'source':_0x1253ee(0x149)};if(_0x404622[_0x1253ee(0x143)](_0x1253ee(0x126))){const _0x1d0ba9=await fetchNpmDistTagVersion('beta');if(!_0x1d0ba9)return null;return{'version':_0x1d0ba9,'source':_0x1253ee(0x126)};}const _0x5d371d=await fetchLatestVersion();if(!_0x5d371d)return null;return{'version':_0x5d371d,'source':_0x1253ee(0x13b)};}function shouldInstallTarget(_0x7f3fe4,_0x1aa10c){const _0x55d62d=a41_0x213f01;if(_0x1aa10c[_0x55d62d(0x14c)]===_0x55d62d(0x149)||_0x1aa10c['source']===_0x55d62d(0x126))return!a41_0x17e20a['eq'](_0x7f3fe4,_0x1aa10c['version']);return a41_0x17e20a['lt'](_0x7f3fe4,_0x1aa10c[_0x55d62d(0x149)]);}function getInstallPlanLabel(_0xf60394,_0x454061){const _0x1cd332=a41_0x213f01;switch(_0x454061[_0x1cd332(0x14c)]){case _0x1cd332(0x126):return _0x1cd332(0x13d)+a41_0x3ff246[_0x1cd332(0x124)](_0xf60394)+_0x1cd332(0x14d)+a41_0x3ff246[_0x1cd332(0x144)](_0x454061[_0x1cd332(0x149)]);case'version':return _0x1cd332(0x11f)+a41_0x3ff246[_0x1cd332(0x124)](_0xf60394)+_0x1cd332(0x14d)+a41_0x3ff246[_0x1cd332(0x144)](_0x454061[_0x1cd332(0x149)]);case _0x1cd332(0x13b):default:return _0x1cd332(0x15e)+a41_0x3ff246[_0x1cd332(0x124)](_0xf60394)+_0x1cd332(0x14d)+a41_0x3ff246['green'](_0x454061[_0x1cd332(0x149)]);}}async function installCliSkill(_0x3b9dfd){const _0xe3faad=a41_0x213f01;console['log'](a41_0x3ff246[_0xe3faad(0x15b)](_0xe3faad(0x148)));const _0x31d145=runNpxSkillsAddGlobal(process[_0xe3faad(0x127)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x3b9dfd?_0xe3faad(0x15f):_0xe3faad(0x15a)});if(_0x31d145[_0xe3faad(0x11d)]){console[_0xe3faad(0x131)](a41_0x3ff246[_0xe3faad(0x15b)](_0xe3faad(0x129)));return;}if(_0x31d145['ok']){console[_0xe3faad(0x131)](a41_0x3ff246[_0xe3faad(0x15b)](_0xe3faad(0x130)));return;}console[_0xe3faad(0x13f)](a41_0x3ff246['yellow'](_0xe3faad(0x111)+(_0x31d145[_0xe3faad(0x11c)]||'unknown'))),console[_0xe3faad(0x131)](a41_0x3ff246[_0xe3faad(0x15b)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x165087){const _0xcc923c=a41_0x213f01;await validateUpdateFlags(_0x165087);const _0x3b5b2a=getCurrentVersion();console[_0xcc923c(0x131)](_0xcc923c(0x121)+_0x3b5b2a);const _0x5428b3=a41_0xb1f1b4('Checking\x20for\x20updates...')[_0xcc923c(0x133)](),_0x105f30=await resolveTargetVersion(_0x165087);if(!_0x105f30){const _0x1ce4ca=_0x165087[_0xcc923c(0x143)](_0xcc923c(0x126))?_0xcc923c(0x154):_0xcc923c(0x122);return _0x5428b3[_0xcc923c(0x135)](_0x1ce4ca),console['log'](a41_0x3ff246[_0xcc923c(0x15b)](_0xcc923c(0x113)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x1ce4ca};}const _0x401363=a41_0x17e20a[_0xcc923c(0x11e)](VERSION),_0x1e911a=a41_0x17e20a[_0xcc923c(0x11e)](_0x105f30[_0xcc923c(0x149)]);if(!_0x401363||!_0x1e911a)return _0x5428b3[_0xcc923c(0x135)](_0xcc923c(0x110)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x401363,_0x105f30)){const _0x3f2928=_0x105f30[_0xcc923c(0x14c)]===_0xcc923c(0x149)?_0xcc923c(0x134)+_0x105f30[_0xcc923c(0x149)]+')':_0xcc923c(0x160)+_0x105f30[_0xcc923c(0x149)]+')';return _0x5428b3[_0xcc923c(0x13a)](_0x3f2928),shouldSkipCliSkill(_0x165087)?console[_0xcc923c(0x131)](a41_0x3ff246[_0xcc923c(0x15b)](_0xcc923c(0x136))):await installCliSkill(_0x165087['nonInteractive']),{'ok':!![]};}_0x5428b3['info'](getInstallPlanLabel(_0x3b5b2a,_0x105f30));const _0x181ad6=detectPackageManager(),_0x2dd88e=_0x181ad6===_0xcc923c(0x12c)?resolveNpmBin(_0xcc923c(0x12c)):_0x181ad6,_0x115665=a41_0xb1f1b4(_0xcc923c(0x117)+_0x181ad6+_0xcc923c(0x12f))[_0xcc923c(0x133)]();try{return await execa(_0x2dd88e,[_0xcc923c(0x115),'-g',NPM_PACKAGE_NAME+'@'+_0x105f30[_0xcc923c(0x149)]],{'stdio':_0xcc923c(0x15f)}),_0x115665[_0xcc923c(0x13a)]('Updated\x20to\x20v'+_0x105f30['version']),console[_0xcc923c(0x131)](a41_0x3ff246[_0xcc923c(0x15b)](_0xcc923c(0x123))),shouldSkipCliSkill(_0x165087)?console[_0xcc923c(0x131)](a41_0x3ff246[_0xcc923c(0x15b)](_0xcc923c(0x136))):await installCliSkill(_0x165087[_0xcc923c(0x118)]),{'ok':!![]};}catch(_0x434807){return _0x115665[_0xcc923c(0x135)](_0xcc923c(0x156)),console['error'](a41_0x3ff246[_0xcc923c(0x139)]('\x20\x20'+_0x434807[_0xcc923c(0x112)])),console[_0xcc923c(0x131)](a41_0x3ff246[_0xcc923c(0x15b)](_0xcc923c(0x159)+_0x181ad6+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x105f30[_0xcc923c(0x149)])),{'ok':![],'message':_0x434807[_0xcc923c(0x112)]};}}export const updateDefinition={'service':'update','command':a41_0x213f01(0x120),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'write','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_0x2ef9(_0x399e14,_0x1ca40d){_0x399e14=_0x399e14-0x1b3;const _0x15b6f1=a42_0x15b6();let _0x2ef95d=_0x15b6f1[_0x399e14];return _0x2ef95d;}function a42_0x15b6(){const _0x4ba6eb=['5984343dKrisr','1462540Dnnamb','1106550gRQdsX','147983ykVbEf','1906420weLdQR','1462592jCbXRR','10byjLNB','63wJetAX','7622442bFRden'];a42_0x15b6=function(){return _0x4ba6eb;};return a42_0x15b6();}(function(_0x417cfe,_0x2e6a89){const _0x2a63bd=a42_0x2ef9,_0x300de8=_0x417cfe();while(!![]){try{const _0x1d1e6c=-parseInt(_0x2a63bd(0x1b8))/0x1*(parseInt(_0x2a63bd(0x1bb))/0x2)+-parseInt(_0x2a63bd(0x1b7))/0x3+-parseInt(_0x2a63bd(0x1b9))/0x4+parseInt(_0x2a63bd(0x1b6))/0x5+parseInt(_0x2a63bd(0x1b4))/0x6+-parseInt(_0x2a63bd(0x1b3))/0x7*(-parseInt(_0x2a63bd(0x1ba))/0x8)+-parseInt(_0x2a63bd(0x1b5))/0x9;if(_0x1d1e6c===_0x2e6a89)break;else _0x300de8['push'](_0x300de8['shift']());}catch(_0x4c21f5){_0x300de8['push'](_0x300de8['shift']());}}}(a42_0x15b6,0xe9e52));import{codegenSdk}from'../../commands/codegen/sdk.js';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_0x4ea0(_0x523ed7,_0x316656){_0x523ed7=_0x523ed7-0xec;const _0x4558cf=a43_0x4558();let _0x4ea023=_0x4558cf[_0x523ed7];return _0x4ea023;}const a43_0x2f8811=a43_0x4ea0;function a43_0x4558(){const _0xd1dfbb=['82287vHIGAN','name','114586RakFnK','890nPeHUg','19707gJdAWU','185921iCbtDf','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','4221024GHWXLC','1480185XpEGBm','operation','code','skip-imports','20qBYOTW','930yWxEMc','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','492sIJzwc','str','codegen','read','bool','string'];a43_0x4558=function(){return _0xd1dfbb;};return a43_0x4558();}(function(_0x34a8a0,_0x156915){const _0x117288=a43_0x4ea0,_0x3c391b=_0x34a8a0();while(!![]){try{const _0x149c05=parseInt(_0x117288(0xee))/0x1+-parseInt(_0x117288(0x101))/0x2+parseInt(_0x117288(0xed))/0x3*(parseInt(_0x117288(0xf5))/0x4)+-parseInt(_0x117288(0xec))/0x5*(-parseInt(_0x117288(0xf9))/0x6)+-parseInt(_0x117288(0xf1))/0x7+-parseInt(_0x117288(0xf0))/0x8+-parseInt(_0x117288(0xff))/0x9*(-parseInt(_0x117288(0xf6))/0xa);if(_0x149c05===_0x156915)break;else _0x3c391b['push'](_0x3c391b['shift']());}catch(_0x4ced3a){_0x3c391b['push'](_0x3c391b['shift']());}}}(a43_0x4558,0x46235));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a43_0x2f8811(0xfb),'command':'sdk','description':a43_0x2f8811(0xf7),'risk':a43_0x2f8811(0xfc),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a43_0x2f8811(0xfe),'description':a43_0x2f8811(0xef)},{'name':a43_0x2f8811(0xf2),'type':'string','required':!![],'description':a43_0x2f8811(0xf8)},{'name':a43_0x2f8811(0xf4),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x11f635){const _0x284fc2=a43_0x2f8811,{dataset:_0x564b8a,operation:_0x1b2893}=await getOperationDetail(_0x11f635['appCode'],_0x11f635[_0x284fc2(0xfa)]('code'),_0x11f635[_0x284fc2(0xfa)]('operation')),_0x436c29=generateSdkCode(_0x564b8a,_0x1b2893,{'includeImports':!_0x11f635[_0x284fc2(0xfd)](_0x284fc2(0xf4))});return{'ok':!![],'data':{'dataset':{'name':_0x564b8a[_0x284fc2(0x100)],'code':_0x564b8a[_0x284fc2(0xf3)],'tableName':_0x564b8a['tableName']},'operation':_0x11f635[_0x284fc2(0xfa)](_0x284fc2(0xf2)),'code':_0x436c29}};}};
@@ -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
+ function a44_0x4fad(){const _0x3c9b20=['68DdgKYo','164576mOiIlz','2878638ldfMQU','sql','23238578KoADBI','sdk','562240UPjqzp','appCode','read','string','2313hBHaoI','35470rqOtHI','boolean','no-imports','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sqlName','bff','8490DInePl','48XmsZtj','bool','Omit\x20import\x20statements\x20from\x20generated\x20code','sqlcode','str','13391DltSrz','target','918PpfhdB'];a44_0x4fad=function(){return _0x3c9b20;};return a44_0x4fad();}const a44_0x521b83=a44_0x38f8;(function(_0x12a480,_0x345b7d){const _0x1b1dbd=a44_0x38f8,_0x5b7625=_0x12a480();while(!![]){try{const _0x50f1c7=parseInt(_0x1b1dbd(0x1d7))/0x1*(parseInt(_0x1b1dbd(0x1da))/0x2)+parseInt(_0x1b1dbd(0x1c2))/0x3+-parseInt(_0x1b1dbd(0x1c1))/0x4+parseInt(_0x1b1dbd(0x1cb))/0x5*(parseInt(_0x1b1dbd(0x1d9))/0x6)+-parseInt(_0x1b1dbd(0x1c6))/0x7*(-parseInt(_0x1b1dbd(0x1d2))/0x8)+-parseInt(_0x1b1dbd(0x1ca))/0x9*(parseInt(_0x1b1dbd(0x1d1))/0xa)+-parseInt(_0x1b1dbd(0x1c4))/0xb;if(_0x50f1c7===_0x345b7d)break;else _0x5b7625['push'](_0x5b7625['shift']());}catch(_0x297395){_0x5b7625['push'](_0x5b7625['shift']());}}}(a44_0x4fad,0x94f9f));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a44_0x38f8(_0x1cdd27,_0x1aaa0a){_0x1cdd27=_0x1cdd27-0x1c1;const _0x4fad16=a44_0x4fad();let _0x38f867=_0x4fad16[_0x1cdd27];return _0x38f867;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a44_0x521b83(0x1c3),'description':a44_0x521b83(0x1ce),'risk':a44_0x521b83(0x1c8),'flags':[SQLCODE_FLAG,{'name':a44_0x521b83(0x1d8),'type':a44_0x521b83(0x1c9),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a44_0x521b83(0x1c5),'enum':[a44_0x521b83(0x1c5),a44_0x521b83(0x1d0)]},{'name':a44_0x521b83(0x1cd),'type':a44_0x521b83(0x1cc),'description':a44_0x521b83(0x1d4)}],async 'execute'(_0x1ee82b){const _0x4301b0=a44_0x521b83,_0x51b6d7=await getSqlQueryInfo(_0x1ee82b[_0x4301b0(0x1c7)],_0x1ee82b[_0x4301b0(0x1d6)](_0x4301b0(0x1d5))),_0x1d8122=_0x1ee82b[_0x4301b0(0x1d6)](_0x4301b0(0x1d8))||_0x4301b0(0x1c5),_0x27d99d=generateSqlCodeTemplate(_0x51b6d7,{'target':_0x1d8122,'includeImports':!_0x1ee82b[_0x4301b0(0x1d3)](_0x4301b0(0x1cd))});return{'ok':!![],'data':{'sqlCode':_0x51b6d7['sqlCode'],'sqlName':_0x51b6d7[_0x4301b0(0x1cf)],'target':_0x1d8122,'code':_0x27d99d}};}};
@@ -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(_0x202fee,_0x342c01){const _0x2da56a=a45_0x14c2,_0x5d313e=_0x202fee();while(!![]){try{const _0x463a29=-parseInt(_0x2da56a(0xc6))/0x1*(-parseInt(_0x2da56a(0xe6))/0x2)+parseInt(_0x2da56a(0xe1))/0x3*(parseInt(_0x2da56a(0xe2))/0x4)+-parseInt(_0x2da56a(0xcc))/0x5+parseInt(_0x2da56a(0xd9))/0x6*(parseInt(_0x2da56a(0xd5))/0x7)+parseInt(_0x2da56a(0xc8))/0x8+-parseInt(_0x2da56a(0xce))/0x9*(-parseInt(_0x2da56a(0xd0))/0xa)+-parseInt(_0x2da56a(0xd6))/0xb*(parseInt(_0x2da56a(0xcd))/0xc);if(_0x463a29===_0x342c01)break;else _0x5d313e['push'](_0x5d313e['shift']());}catch(_0xbf63e9){_0x5d313e['push'](_0x5d313e['shift']());}}}(a45_0x3b48,0xa1a01));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x2e6de3 from'chalk';function a45_0x3b48(){const _0x33c458=['✎\x20手动输入','1899616SHOQXa','✎\x20自定义输入\x20appcode','正在获取可用应用列表...','length','2768505cdHktQ','192uuPIyI','10863999pYsMJt','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','10cabbbU','custom','skip','gray','获取到\x20','120659wkfYYS','1726769GbiMCz','message','cyan','132xBpxSX','appCode','includes','\x20\x20(','appName','yellow','manual','\x0a未找到可用应用。','3426657XCJDAy','4PMrZmx','trim','map','find','1522772UhXmFZ','(跳过,稍后配置)','请选择要绑定的应用:','valid','无法获取远程应用列表,请手动输入。','1bqeLfz'];a45_0x3b48=function(){return _0x33c458;};return a45_0x3b48();}import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x41c0c2=await input({'message':'请输入\x20App\x20Code:','validate':_0x2182c3=>{const _0x487e5c=a45_0x14c2,_0x120c5c=validateAppcode(_0x2182c3[_0x487e5c(0xe3)]());return _0x120c5c[_0x487e5c(0xc4)]||_0x120c5c[_0x487e5c(0xd7)]||'Invalid\x20App\x20Code';}});return _0x41c0c2['trim']();}export async function promptAppSelection(_0x39bc5d){const _0x16cae2=a45_0x14c2,_0x3c7ec1=[{'name':a45_0x2e6de3[_0x16cae2(0xde)](_0x16cae2(0xc9)),'value':-0x1},..._0x39bc5d[_0x16cae2(0xe4)]((_0x153ecd,_0x3bd4a4)=>({'name':_0x153ecd[_0x16cae2(0xdd)]+'\x20\x20'+a45_0x2e6de3['gray']('('+_0x153ecd['appCode']+')'),'value':_0x3bd4a4}))],_0x37ebab=await checkbox({'message':_0x16cae2(0xd4)+a45_0x2e6de3[_0x16cae2(0xd8)](_0x39bc5d[_0x16cae2(0xcb)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x3c7ec1,'loop':![]});if(_0x37ebab[_0x16cae2(0xdb)](-0x1))return _0x16cae2(0xd1);if(_0x37ebab[_0x16cae2(0xcb)]===0x0)return _0x16cae2(0xd1);return _0x37ebab['map'](_0x508e7e=>_0x39bc5d[_0x508e7e]);}function a45_0x14c2(_0x146512,_0x215e6c){_0x146512=_0x146512-0xc4;const _0x3b4847=a45_0x3b48();let _0x14c205=_0x3b4847[_0x146512];return _0x14c205;}export async function promptSingleAppSelection(_0x513982){const _0x548b65=a45_0x14c2,_0x12de91=[{'name':a45_0x2e6de3['gray']('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x548b65(0xd2)},{'name':a45_0x2e6de3[_0x548b65(0xde)](_0x548b65(0xc9)),'value':_0x548b65(0xd1)},..._0x513982['map'](_0x4fb2bc=>({'name':_0x4fb2bc[_0x548b65(0xdd)]+'\x20\x20'+a45_0x2e6de3[_0x548b65(0xd3)]('('+_0x4fb2bc[_0x548b65(0xda)]+')'),'value':_0x4fb2bc[_0x548b65(0xda)]}))],_0x73012b=await select({'message':_0x548b65(0xe8),'choices':_0x12de91});if(_0x73012b===_0x548b65(0xd2))return'skip';if(_0x73012b===_0x548b65(0xd1))return _0x548b65(0xd1);return _0x513982[_0x548b65(0xe5)](_0x1e39f1=>_0x1e39f1[_0x548b65(0xda)]===_0x73012b);}export async function selectSingleAppcode(_0x15b3be){const _0x2b4f83=a45_0x14c2;if(!_0x15b3be)return writeCliSideChannelLine(a45_0x2e6de3[_0x2b4f83(0xd3)](_0x2b4f83(0xcf))),_fallbackOrSkip();writeCliSideChannelLine(_0x2b4f83(0xca));let _0x209fcb;try{_0x209fcb=await withActiveCookie(_0x15b3be,()=>listRemoteApps());}catch(_0x83285e){writeCliSideChannelLine(a45_0x2e6de3[_0x2b4f83(0xde)](_0x2b4f83(0xc5)));if(_0x83285e instanceof Error)writeCliSideChannelLine(a45_0x2e6de3['gray'](_0x2b4f83(0xdc)+_0x83285e[_0x2b4f83(0xd7)]+')'));return _fallbackOrSkip();}if(_0x209fcb[_0x2b4f83(0xcb)]===0x0)return writeCliSideChannelLine(a45_0x2e6de3[_0x2b4f83(0xde)]('未找到可用应用。')),_fallbackOrSkip();const _0xc968a6=await promptSingleAppSelection(_0x209fcb);if(_0xc968a6==='skip')return'';if(_0xc968a6===_0x2b4f83(0xd1))return promptCustomAppcode();return _0xc968a6[_0x2b4f83(0xda)];}export async function selectMultipleApps(_0x40584f){const _0x218270=a45_0x14c2;writeCliSideChannelLine(_0x218270(0xca));let _0xd8c6ee;try{_0xd8c6ee=await withActiveCookie(_0x40584f,()=>listRemoteApps());}catch(_0xb61361){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0xb61361 instanceof Error)writeCliSideChannelLine(_0x218270(0xdc)+_0xb61361['message']+')');return _0x218270(0xd1);}if(_0xd8c6ee[_0x218270(0xcb)]===0x0)return writeCliSideChannelLine(_0x218270(0xe0)),_0x218270(0xd1);return promptAppSelection(_0xd8c6ee);}async function _fallbackOrSkip(){const _0x5b90ce=a45_0x14c2,_0x392dd6=await select({'message':'App\x20Code:','choices':[{'name':a45_0x2e6de3[_0x5b90ce(0xd3)](_0x5b90ce(0xe7)),'value':_0x5b90ce(0xd2)},{'name':a45_0x2e6de3[_0x5b90ce(0xde)](_0x5b90ce(0xc7)),'value':_0x5b90ce(0xdf)}]});if(_0x392dd6===_0x5b90ce(0xd2))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
+ function a46_0x50b9(){const _0x165e2f=['9PQtBwE','449421nhOBea','1629064WMehxE','number','130505lwaayR','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','301615vIVZSH','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','string','1878OiTBUH','2875288sKdiSM','dbtype','MYSQL','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','datasetcode','4605399DwXhxm','code','Dataset\x20code\x20(32-char\x20hex\x20UUID)','sqlcode','18KHwgRb','POSTGRESQL'];a46_0x50b9=function(){return _0x165e2f;};return a46_0x50b9();}const a46_0x1eca74=a46_0x5483;(function(_0xb62647,_0x37718c){const _0x55eefa=a46_0x5483,_0x1c69cd=_0xb62647();while(!![]){try{const _0x5acd1a=parseInt(_0x55eefa(0x1ef))/0x1+parseInt(_0x55eefa(0x1dd))/0x2*(-parseInt(_0x55eefa(0x1e9))/0x3)+-parseInt(_0x55eefa(0x1eb))/0x4+-parseInt(_0x55eefa(0x1ed))/0x5+parseInt(_0x55eefa(0x1e7))/0x6*(parseInt(_0x55eefa(0x1ea))/0x7)+-parseInt(_0x55eefa(0x1de))/0x8+parseInt(_0x55eefa(0x1e3))/0x9;if(_0x5acd1a===_0x37718c)break;else _0x1c69cd['push'](_0x1c69cd['shift']());}catch(_0x1b69c2){_0x1c69cd['push'](_0x1c69cd['shift']());}}}(a46_0x50b9,0x335a4));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a46_0x1eca74(0x1ee)};export const CODE_FLAG={'name':a46_0x1eca74(0x1e4),'type':'string','required':!![],'description':a46_0x1eca74(0x1e5),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a46_0x1eca74(0x1e2),'description':a46_0x1eca74(0x1e5)};export const SQLCODE_FLAG={'name':a46_0x1eca74(0x1e6),'type':a46_0x1eca74(0x1dc),'required':!![],'description':a46_0x1eca74(0x1e1),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a46_0x1eca74(0x1db)}};function a46_0x5483(_0x22c19c,_0x4dc305){_0x22c19c=_0x22c19c-0x1db;const _0x50b9ce=a46_0x50b9();let _0x5483b1=_0x50b9ce[_0x22c19c];return _0x5483b1;}export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':'string','required':![],'description':a46_0x1eca74(0x1f0)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a46_0x1eca74(0x1ec),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a46_0x1eca74(0x1df),'type':a46_0x1eca74(0x1dc),'required':!![],'description':'Database\x20product\x20type','enum':[a46_0x1eca74(0x1e0),a46_0x1eca74(0x1e8)]};
@@ -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_0x5a25(){const _0x464291=['App\x20Code\x20cannot\x20be\x20empty','test','60MvjIRF','App\x20Code\x20cannot\x20exceed\x20100\x20characters','900Qaciwg','trim','2237998dqcqJr','1606275dWRWZQ','23010FiooxC','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','520482bNxnxI','737LnieBj','3508vAmNYS','143274ReSaUD','7384SazjDW','1hfXHjO'];a47_0x5a25=function(){return _0x464291;};return a47_0x5a25();}function a47_0x4386(_0x25bbd2,_0x3cbb68){_0x25bbd2=_0x25bbd2-0x11a;const _0x5a251f=a47_0x5a25();let _0x438679=_0x5a251f[_0x25bbd2];return _0x438679;}(function(_0x48cc47,_0x1a4ab0){const _0x3bae28=a47_0x4386,_0x29c41f=_0x48cc47();while(!![]){try{const _0x5606f2=parseInt(_0x3bae28(0x11b))/0x1*(parseInt(_0x3bae28(0x129))/0x2)+-parseInt(_0x3bae28(0x11e))/0x3*(parseInt(_0x3bae28(0x128))/0x4)+parseInt(_0x3bae28(0x123))/0x5+parseInt(_0x3bae28(0x126))/0x6+-parseInt(_0x3bae28(0x122))/0x7+-parseInt(_0x3bae28(0x11a))/0x8*(parseInt(_0x3bae28(0x120))/0x9)+-parseInt(_0x3bae28(0x124))/0xa*(-parseInt(_0x3bae28(0x127))/0xb);if(_0x5606f2===_0x1a4ab0)break;else _0x29c41f['push'](_0x29c41f['shift']());}catch(_0x207e4e){_0x29c41f['push'](_0x29c41f['shift']());}}}(a47_0x5a25,0x31ddc));export function validateAppcode(_0x28e39e){const _0x3d73ba=a47_0x4386,_0x3a815d=_0x28e39e[_0x3d73ba(0x121)]();if(!_0x3a815d)return{'valid':![],'message':_0x3d73ba(0x11c)};if(_0x3a815d['length']>0x64)return{'valid':![],'message':_0x3d73ba(0x11f)};if(!/^[A-Za-z0-9_-]+$/[_0x3d73ba(0x11d)](_0x3a815d))return{'valid':![],'message':_0x3d73ba(0x125)};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_0x29dd7b=a48_0x309f;(function(_0x261ff7,_0x7b2e7f){const _0x55c1f6=a48_0x309f,_0x507ba8=_0x261ff7();while(!![]){try{const _0x55fffd=parseInt(_0x55c1f6(0xd9))/0x1+-parseInt(_0x55c1f6(0xc6))/0x2*(parseInt(_0x55c1f6(0xce))/0x3)+-parseInt(_0x55c1f6(0xc8))/0x4+parseInt(_0x55c1f6(0xcb))/0x5+-parseInt(_0x55c1f6(0xda))/0x6*(parseInt(_0x55c1f6(0xc9))/0x7)+-parseInt(_0x55c1f6(0xd0))/0x8*(parseInt(_0x55c1f6(0xd2))/0x9)+parseInt(_0x55c1f6(0xca))/0xa;if(_0x55fffd===_0x7b2e7f)break;else _0x507ba8['push'](_0x507ba8['shift']());}catch(_0x20affb){_0x507ba8['push'](_0x507ba8['shift']());}}}(a48_0x41d2,0xe87c3));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x30db25){const _0x32e9e9=a48_0x309f,_0x47e7f1=_0x30db25['str'](_0x32e9e9(0xdb));if(!_0x47e7f1)throw CliErrors[_0x32e9e9(0xd5)](_0x32e9e9(0xd4),_0x32e9e9(0xcf)+CLI_BIN_NAME+_0x32e9e9(0xd7));const _0x2dd378=readConfig(),_0x4ec950=_0x47e7f1==='app'?_0x32e9e9(0xc7):_0x47e7f1,_0xd9c509=_0x2dd378[_0x4ec950];if(_0xd9c509===undefined)throw CliErrors[_0x32e9e9(0xd5)]('Key\x20not\x20found:\x20'+_0x47e7f1);return{'ok':!![],'data':typeof _0xd9c509===_0x32e9e9(0xd1)?_0xd9c509:{[_0x4ec950]:_0xd9c509},'message':typeof _0xd9c509===_0x32e9e9(0xd1)?undefined:String(_0xd9c509)};}function a48_0x309f(_0x27e843,_0x12266f){_0x27e843=_0x27e843-0xc6;const _0x41d280=a48_0x41d2();let _0x309ff0=_0x41d280[_0x27e843];return _0x309ff0;}export const configGetDefinition={'service':a48_0x29dd7b(0xcd),'command':a48_0x29dd7b(0xd3),'description':a48_0x29dd7b(0xd6),'risk':a48_0x29dd7b(0xcc),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a48_0x29dd7b(0xd8),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a48_0x41d2(){const _0x5e3955=['Usage:\x20','8gWlCMQ','object','8390178NzYDoQ','get','Missing\x20key.','validation','Get\x20a\x20config\x20value\x20by\x20key','\x20config\x20get\x20--key\x20<key>','string','1368062HomZtN','8780082scieeD','key','10haHgrJ','appcode','2516236dFaKZj','7WJAZQS','24994660QdJnVL','4694620EmvACs','read','config','497727sBQkKb'];a48_0x41d2=function(){return _0x5e3955;};return a48_0x41d2();}
@@ -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_0x2ec0(_0x501893,_0x335c24){_0x501893=_0x501893-0x19e;const _0x2f049e=a49_0x2f04();let _0x2ec06d=_0x2f049e[_0x501893];return _0x2ec06d;}(function(_0x4ddbfe,_0x2c136c){const _0x3f2919=a49_0x2ec0,_0x3a7c60=_0x4ddbfe();while(!![]){try{const _0xaaec42=-parseInt(_0x3f2919(0x1a2))/0x1+-parseInt(_0x3f2919(0x19f))/0x2+parseInt(_0x3f2919(0x1a3))/0x3*(-parseInt(_0x3f2919(0x1a6))/0x4)+parseInt(_0x3f2919(0x1a4))/0x5+parseInt(_0x3f2919(0x19e))/0x6+-parseInt(_0x3f2919(0x1a1))/0x7*(parseInt(_0x3f2919(0x1a5))/0x8)+parseInt(_0x3f2919(0x1a0))/0x9;if(_0xaaec42===_0x2c136c)break;else _0x3a7c60['push'](_0x3a7c60['shift']());}catch(_0x4f84c0){_0x3a7c60['push'](_0x3a7c60['shift']());}}}(a49_0x2f04,0x6cda0));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a49_0x2f04(){const _0x2f5400=['2853CHoWWE','278915hLZlHn','422808YvlWJr','3748SANbPb','3175074aYMxoS','1482212RtzQQb','21264444nXzFnv','21mAvqLb','711076oajgIW'];a49_0x2f04=function(){return _0x2f5400;};return a49_0x2f04();}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];