@lovrabet/rabetbase-cli 2.3.3-beta.1 → 2.3.3-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 (219) 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 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-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/generate.js +1 -1
  65. package/lib/commands/dataset/index.js +1 -1
  66. package/lib/commands/dataset/list.js +1 -1
  67. package/lib/commands/dataset/operations.js +1 -1
  68. package/lib/commands/dataset/relation-audit.js +1 -1
  69. package/lib/commands/dataset/relation-create.js +1 -1
  70. package/lib/commands/dataset/relation-delete.js +1 -1
  71. package/lib/commands/dataset/relation-shared.js +1 -1
  72. package/lib/commands/dataset/relation-update.js +1 -1
  73. package/lib/commands/dataset/relations.js +1 -1
  74. package/lib/commands/dataset/rename.js +1 -1
  75. package/lib/commands/dataset/restore.js +1 -1
  76. package/lib/commands/db/analyze-cancel.js +1 -1
  77. package/lib/commands/db/analyze-start.js +1 -1
  78. package/lib/commands/db/analyze-status.js +1 -1
  79. package/lib/commands/db/create.js +1 -1
  80. package/lib/commands/db/delete.js +1 -1
  81. package/lib/commands/db/detail.js +1 -1
  82. package/lib/commands/db/diff.js +1 -1
  83. package/lib/commands/db/index.js +1 -1
  84. package/lib/commands/db/list.js +1 -1
  85. package/lib/commands/db/shared.js +1 -1
  86. package/lib/commands/db/tables.js +1 -1
  87. package/lib/commands/db/test.js +1 -1
  88. package/lib/commands/db/update.js +1 -1
  89. package/lib/commands/doctor.js +1 -1
  90. package/lib/commands/init/index.js +1 -1
  91. package/lib/commands/issue/index.js +1 -1
  92. package/lib/commands/issue/nudge.js +1 -1
  93. package/lib/commands/issue/report.js +1 -1
  94. package/lib/commands/issue/shared.js +1 -1
  95. package/lib/commands/logs/index.js +1 -1
  96. package/lib/commands/menu/index.js +1 -1
  97. package/lib/commands/menu/list.js +1 -1
  98. package/lib/commands/menu/shared/compare-table.js +1 -1
  99. package/lib/commands/menu/shared/index.js +1 -1
  100. package/lib/commands/menu/shared/inquirer.js +1 -1
  101. package/lib/commands/menu/shared/local-pages.js +1 -1
  102. package/lib/commands/menu/shared/logic.js +1 -1
  103. package/lib/commands/menu/shared/service.js +1 -1
  104. package/lib/commands/menu/shared/sync-core.js +1 -1
  105. package/lib/commands/menu/shared/update-core.js +1 -1
  106. package/lib/commands/menu/shared/valid-url.js +1 -1
  107. package/lib/commands/menu/sync.js +1 -1
  108. package/lib/commands/menu/update.js +1 -1
  109. package/lib/commands/page/generate-start.js +1 -1
  110. package/lib/commands/page/generate-status.js +1 -1
  111. package/lib/commands/page/index.js +1 -1
  112. package/lib/commands/page/pull.js +1 -1
  113. package/lib/commands/page/push.js +1 -1
  114. package/lib/commands/page/relation-audit.js +1 -1
  115. package/lib/commands/page/shared.js +1 -1
  116. package/lib/commands/page/standard-page-status.js +1 -1
  117. package/lib/commands/page/sync.js +1 -1
  118. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  119. package/lib/commands/project/create/format-elapsed.js +1 -1
  120. package/lib/commands/project/create/main.js +1 -1
  121. package/lib/commands/project/create/non-interactive.js +1 -1
  122. package/lib/commands/project/create/project-template-path.js +1 -1
  123. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  124. package/lib/commands/project/create/use-format-code.js +1 -1
  125. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  126. package/lib/commands/project/index.js +1 -1
  127. package/lib/commands/project/init.js +1 -1
  128. package/lib/commands/project/upgrade.js +1 -1
  129. package/lib/commands/registry.js +1 -1
  130. package/lib/commands/run/index.js +1 -1
  131. package/lib/commands/schema.js +1 -1
  132. package/lib/commands/sql/create.js +1 -1
  133. package/lib/commands/sql/delete.js +1 -1
  134. package/lib/commands/sql/detail.js +1 -1
  135. package/lib/commands/sql/exec.js +1 -1
  136. package/lib/commands/sql/index.js +1 -1
  137. package/lib/commands/sql/list.js +1 -1
  138. package/lib/commands/sql/pull.js +1 -1
  139. package/lib/commands/sql/push.js +1 -1
  140. package/lib/commands/sql/save.js +1 -1
  141. package/lib/commands/sql/shared.js +1 -1
  142. package/lib/commands/sql/status.js +1 -1
  143. package/lib/commands/sql/validate.js +1 -1
  144. package/lib/commands/workspace/index.js +1 -1
  145. package/lib/config/schema.js +1 -1
  146. package/lib/constant/cdn.js +1 -1
  147. package/lib/constant/cli.js +1 -1
  148. package/lib/constant/defaults.js +1 -1
  149. package/lib/constant/domain.js +1 -1
  150. package/lib/constant/env.js +1 -1
  151. package/lib/constant/output.js +1 -1
  152. package/lib/constant/paths.js +1 -1
  153. package/lib/constant/risk.js +1 -1
  154. package/lib/context/app-resolver.js +1 -1
  155. package/lib/context/auth-resolver.js +1 -1
  156. package/lib/context/config-loader.js +1 -1
  157. package/lib/context.js +1 -1
  158. package/lib/core/alias-resolver.js +1 -1
  159. package/lib/core/api-client.js +1 -1
  160. package/lib/core/bff/config.js +1 -1
  161. package/lib/core/bff/file-system.js +1 -1
  162. package/lib/core/bff/hash.js +1 -1
  163. package/lib/core/bff/lock.js +1 -1
  164. package/lib/core/bff/utils.js +1 -1
  165. package/lib/core/db-resolver.js +1 -1
  166. package/lib/core/page/file-system.js +1 -1
  167. package/lib/core/page/hash.js +1 -1
  168. package/lib/core/page/lock.js +1 -1
  169. package/lib/core/sql-sync/config.js +1 -1
  170. package/lib/core/sql-sync/file-system.js +1 -1
  171. package/lib/core/sql-sync/hash.js +1 -1
  172. package/lib/core/sql-sync/lock.js +1 -1
  173. package/lib/core/sql-sync/utils.js +1 -1
  174. package/lib/core/sql-validator.js +1 -1
  175. package/lib/errors.js +1 -1
  176. package/lib/framework/build-all-flags.js +1 -1
  177. package/lib/framework/flags.js +1 -1
  178. package/lib/framework/help.js +1 -1
  179. package/lib/framework/index.js +1 -1
  180. package/lib/framework/output.js +1 -1
  181. package/lib/framework/response.js +1 -1
  182. package/lib/framework/runner-alias.js +1 -1
  183. package/lib/framework/runner.js +1 -1
  184. package/lib/framework/schema-export.js +1 -1
  185. package/lib/framework/types.js +1 -1
  186. package/lib/generated/build-info.js +1 -1
  187. package/lib/help.js +1 -1
  188. package/lib/skills/main.js +1 -1
  189. package/lib/skills/npx-skills-add.js +1 -1
  190. package/lib/telemetry/cli-command-trace.js +1 -1
  191. package/lib/telemetry/cli-help-trace.js +1 -1
  192. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  193. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  194. package/lib/telemetry/send-cli-trace-log.js +1 -1
  195. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  196. package/lib/utils/ai_config.js +1 -1
  197. package/lib/utils/apply-jq-filter.js +1 -1
  198. package/lib/utils/cdn-config.js +1 -1
  199. package/lib/utils/check-sdk-version.js +1 -1
  200. package/lib/utils/cli-version-check.js +1 -1
  201. package/lib/utils/cli-version-policy.js +1 -1
  202. package/lib/utils/config.js +1 -1
  203. package/lib/utils/copy-directory.js +1 -1
  204. package/lib/utils/entity-with-id.js +1 -1
  205. package/lib/utils/file-utils.js +1 -1
  206. package/lib/utils/guides-cdn.js +1 -1
  207. package/lib/utils/http-client.js +1 -1
  208. package/lib/utils/is-non-interactive.js +1 -1
  209. package/lib/utils/logger.js +1 -1
  210. package/lib/utils/params.js +1 -1
  211. package/lib/utils/platform.js +1 -1
  212. package/lib/utils/rules-cdn.js +1 -1
  213. package/lib/utils/sleep.js +1 -1
  214. package/lib/utils/template-replacer.js +1 -1
  215. package/lib/utils/update-notice.js +1 -1
  216. package/lib/utils/version.js +1 -1
  217. package/lib/utils/with-active-cookie.js +1 -1
  218. package/lib/utils/write-cli-side-channel.js +1 -1
  219. package/package.json +1 -1
@@ -1 +1 @@
1
- const a33_0x515958=a33_0x1ed6;(function(_0x4fb50c,_0x4a0b38){const _0x18a082=a33_0x1ed6,_0x369feb=_0x4fb50c();while(!![]){try{const _0x299a95=-parseInt(_0x18a082(0x21c))/0x1*(parseInt(_0x18a082(0x211))/0x2)+-parseInt(_0x18a082(0x20b))/0x3+-parseInt(_0x18a082(0x216))/0x4+parseInt(_0x18a082(0x219))/0x5*(-parseInt(_0x18a082(0x21b))/0x6)+-parseInt(_0x18a082(0x21d))/0x7+parseInt(_0x18a082(0x1fd))/0x8+-parseInt(_0x18a082(0x1f5))/0x9*(-parseInt(_0x18a082(0x1fc))/0xa);if(_0x299a95===_0x4a0b38)break;else _0x369feb['push'](_0x369feb['shift']());}catch(_0x52460e){_0x369feb['push'](_0x369feb['shift']());}}}(a33_0x719d,0x292f7));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_0x515958(0x218),'command':a33_0x515958(0x220),'description':a33_0x515958(0x1f7),'risk':a33_0x515958(0x1fb),'flags':[{'name':a33_0x515958(0x20c),'type':a33_0x515958(0x210),'required':!![],'description':a33_0x515958(0x1fe)}],async 'validate'(_0x3c0a2b){const _0x53ae4a=a33_0x515958,_0xc92e71=loadBffProjectConfig(_0x3c0a2b[_0x53ae4a(0x201)]),_0x5e7698=await readBffLockFile(_0xc92e71[_0x53ae4a(0x1f3)]);if(!_0x5e7698)throw CliErrors[_0x53ae4a(0x202)](_0x53ae4a(0x1f9));},async 'dryRun'(_0x23bea1){const _0x51c920=a33_0x515958,_0x4604a3=loadBffProjectConfig(_0x23bea1['appCode']),_0x62e13c=await readBffLockFile(_0x4604a3[_0x51c920(0x1f3)]);if(!_0x62e13c)throw CliErrors['validation'](_0x51c920(0x1f6));const {appLock:_0x4e1702}=ensureLockScope(_0x62e13c,_0x23bea1[_0x51c920(0x201)],_0x4604a3['scriptsRoot'],'delete'),_0x3fa5b0=_0x23bea1[_0x51c920(0x213)](_0x51c920(0x20c)),_0x1f8ca4=Object[_0x51c920(0x1f2)](_0x4e1702[_0x51c920(0x1f8)]),_0x5f06b3=resolveDeleteTarget(_0x3fa5b0,_0x1f8ca4),_0x57e6af=_0x4e1702['functions'][_0x5f06b3];if(!_0x57e6af)throw CliErrors[_0x51c920(0x202)](_0x51c920(0x21e)+_0x5f06b3+'\x22.');const _0x2f1e32=resolveLocalFilePathFromLockKey(_0x4604a3,_0x5f06b3),_0x5f44bb=relative(_0x4604a3[_0x51c920(0x224)],_0x2f1e32),_0x300f82=join(_0x4604a3[_0x51c920(0x209)],_0x51c920(0x203),_0x5f44bb);return{'method':_0x51c920(0x20d),'url':_0x51c920(0x21a),'body':{'appCode':_0x23bea1[_0x51c920(0x201)],'target':_0x5f06b3,'remoteId':_0x57e6af['remoteId'],'localFilePath':_0x2f1e32,'trashedPath':_0x300f82},'description':'Would\x20delete\x20'+_0x5f06b3+_0x51c920(0x208)};},async 'execute'(_0x5c8b46){const _0x695070=a33_0x515958,_0x189b78=loadBffProjectConfig(_0x5c8b46['appCode']),_0x3ba52d=await readBffLockFile(_0x189b78[_0x695070(0x1f3)]);if(!_0x3ba52d)throw CliErrors[_0x695070(0x202)]('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x3432c5,appLock:_0x4730bc}=ensureLockScope(_0x3ba52d,_0x5c8b46[_0x695070(0x201)],_0x189b78[_0x695070(0x1ff)],_0x695070(0x220)),_0x35c30a=JSON[_0x695070(0x214)](JSON[_0x695070(0x20a)](_0x3432c5)),_0xd1f5af=_0x35c30a[_0x695070(0x229)][_0x5c8b46['appCode']];if(!_0xd1f5af)throw new Error(_0x695070(0x217)+_0x5c8b46[_0x695070(0x201)]+_0x695070(0x205));const _0x5c5c94=_0x5c8b46[_0x695070(0x213)](_0x695070(0x20c)),_0x3d0f21=Object[_0x695070(0x1f2)](_0xd1f5af['functions']),_0x4df3f1=resolveDeleteTarget(_0x5c5c94,_0x3d0f21),_0x2101d5=_0xd1f5af[_0x695070(0x1f8)][_0x4df3f1];if(!_0x2101d5)throw CliErrors['validation'](_0x695070(0x21e)+_0x4df3f1+'\x22.');await deleteBffScript(_0x2101d5[_0x695070(0x225)]),delete _0xd1f5af[_0x695070(0x1f8)][_0x4df3f1],_0xd1f5af[_0x695070(0x222)]=new Date()[_0x695070(0x227)](),await writeBffLockFile(_0x189b78[_0x695070(0x1f3)],_0x35c30a);const _0x351f84=resolveLocalFilePathFromLockKey(_0x189b78,_0x4df3f1);let _0x309d1c;await fileExists(_0x351f84)&&(_0x309d1c=await moveToTrash(_0x189b78['projectRoot'],_0x189b78[_0x695070(0x209)],_0x351f84),await cleanupEmptyDirectories(dirname(_0x351f84),_0x189b78[_0x695070(0x206)]));await waitForDeleteSettlement(_0x189b78[_0x695070(0x1f3)],_0x5c8b46[_0x695070(0x201)],_0x4df3f1,_0x351f84),await sleep(0x96);const _0xa936dc={'deleted':_0x4df3f1,'remoteId':_0x2101d5['remoteId']};if(_0x309d1c)_0xa936dc[_0x695070(0x212)]=_0x309d1c;return{'ok':!![],'data':_0xa936dc,'message':_0x695070(0x204)+_0x4df3f1+(_0x309d1c?_0x695070(0x1f1):'')};}};function resolveDeleteTarget(_0x110afc,_0x4e0a78){const _0x5899ab=a33_0x515958;if(_0x110afc[_0x5899ab(0x215)]('/')){const _0x2770a3=_0x4e0a78[_0x5899ab(0x22a)](_0x6b643b=>_0x6b643b===_0x110afc);if(!_0x2770a3)throw CliErrors['validation'](_0x5899ab(0x228)+_0x110afc);return _0x2770a3;}const _0x2c51b7=_0x4e0a78[_0x5899ab(0x223)](_0x4e4309=>_0x4e4309['split']('/')['at'](-0x1)===_0x110afc);if(_0x2c51b7[_0x5899ab(0x200)]===0x0)throw CliErrors[_0x5899ab(0x202)](_0x5899ab(0x228)+_0x110afc);if(_0x2c51b7[_0x5899ab(0x200)]>0x1)throw CliErrors[_0x5899ab(0x202)](_0x5899ab(0x1fa)+_0x110afc+_0x5899ab(0x207)+_0x2c51b7[_0x5899ab(0x20f)](_0x44ef0b=>_0x5899ab(0x21f)+_0x44ef0b)[_0x5899ab(0x226)]('\x0a'));return _0x2c51b7[0x0];}async function moveToTrash(_0x27bf87,_0x519438,_0x4528af){const _0x1e69ab=a33_0x515958,_0x3471c4=new Date()['toISOString']()[_0x1e69ab(0x1f4)](/[:.]/g,'-'),_0x20f906=relative(_0x27bf87,_0x4528af),_0x7464ee=join(_0x519438,_0x3471c4,_0x20f906);return await mkdir(dirname(_0x7464ee),{'recursive':!![]}),await rename(_0x4528af,_0x7464ee),_0x7464ee;}function a33_0x1ed6(_0x30e6d6,_0x483e7c){_0x30e6d6=_0x30e6d6-0x1f1;const _0x719ddd=a33_0x719d();let _0x1ed622=_0x719ddd[_0x30e6d6];return _0x1ed622;}async function cleanupEmptyDirectories(_0x1d66a1,_0x2d1c33){const _0x2760df=a33_0x515958;let _0x36ec31=resolve(_0x1d66a1);const _0x5377be=resolve(_0x2d1c33);while(_0x36ec31[_0x2760df(0x221)](''+_0x5377be+sep)||_0x36ec31===_0x5377be){if(_0x36ec31===_0x5377be)return;try{const _0x390ffd=await readdir(_0x36ec31);if(_0x390ffd[_0x2760df(0x200)]>0x0)return;await rmdir(_0x36ec31);}catch{return;}_0x36ec31=dirname(_0x36ec31);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x10a9c9,_0x24931c,_0x38932c,_0x2b277e){const _0x556087=a33_0x515958;for(let _0x3a9a23=0x0;_0x3a9a23<DELETE_SETTLE_RETRY_COUNT;_0x3a9a23+=0x1){const _0x44737a=await readBffLockFile(_0x10a9c9),_0x5a660c=!!_0x44737a?.[_0x556087(0x229)]?.[_0x24931c]?.['functions']?.[_0x38932c],_0x1e76a6=await fileExists(_0x2b277e);if(!_0x5a660c&&!_0x1e76a6)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x556087(0x20e)+_0x38932c+'.');}function a33_0x719d(){const _0x5d06ff=['2602360dGPXrf','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','scriptsRoot','length','appCode','validation','<timestamp>','Deleted\x20','\x22\x20not\x20found\x20after\x20ensureLockScope.','scriptsRootDir','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','trashDir','stringify','218451LmktuX','target','POST','Local\x20delete\x20not\x20settled\x20for\x20','map','string','634vWKJsq','trashedTo','str','parse','includes','11060foKSaH','Lock\x20scope\x20for\x20app\x20\x22','bff','85DaLdIK','/api/management/library/scripts/delete','38904cTsaxR','689bXcowS','2147117SLJbvT','No\x20lock\x20entry\x20found\x20for\x20\x22','\x20\x20-\x20','delete','startsWith','lastSync','filter','projectRoot','remoteId','join','toISOString','Function\x20not\x20found:\x20','apps','find','\x20(local\x20file\x20moved\x20to\x20trash)','keys','lockFilePath','replace','2494593tXyQIT','BFF\x20lock\x20file\x20not\x20found.','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','functions','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','Multiple\x20functions\x20match\x20\x22','high-risk-write','20bEgCwB'];a33_0x719d=function(){return _0x5d06ff;};return a33_0x719d();}
1
+ const a33_0x274736=a33_0x43fa;(function(_0x56a749,_0x2dff5c){const _0x5dfe64=a33_0x43fa,_0x3538d0=_0x56a749();while(!![]){try{const _0x299772=-parseInt(_0x5dfe64(0x208))/0x1*(parseInt(_0x5dfe64(0x1e6))/0x2)+-parseInt(_0x5dfe64(0x1e4))/0x3*(parseInt(_0x5dfe64(0x1e7))/0x4)+parseInt(_0x5dfe64(0x1f6))/0x5+-parseInt(_0x5dfe64(0x1ea))/0x6*(parseInt(_0x5dfe64(0x1f3))/0x7)+parseInt(_0x5dfe64(0x20a))/0x8*(-parseInt(_0x5dfe64(0x1df))/0x9)+parseInt(_0x5dfe64(0x1dd))/0xa*(-parseInt(_0x5dfe64(0x1ed))/0xb)+parseInt(_0x5dfe64(0x1e2))/0xc;if(_0x299772===_0x2dff5c)break;else _0x3538d0['push'](_0x3538d0['shift']());}catch(_0x14c2f3){_0x3538d0['push'](_0x3538d0['shift']());}}}(a33_0x3bb7,0x4522c));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';function a33_0x43fa(_0x3214d1,_0x1a863d){_0x3214d1=_0x3214d1-0x1da;const _0x3bb71c=a33_0x3bb7();let _0x43fa6d=_0x3bb71c[_0x3214d1];return _0x43fa6d;}import{dirname,join,relative,resolve,sep}from'node:path';import{deleteBffScript}from'../../core/api-client.js';function a33_0x3bb7(){const _0x426861=['appCode','startsWith','Deleted\x20','Function\x20not\x20found:\x20','7713ieWyXs','Multiple\x20functions\x20match\x20\x22','8AwKrLb','\x20(local\x20file\x20moved\x20to\x20trash)','lastSync','scriptsRoot','Delete\x20a\x20BFF\x20script\x20from\x20remote\x20and\x20local','Local\x20delete\x20not\x20settled\x20for\x20','430avUlSk','toISOString','825867TuoKQw','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20trash','str','11627700bZEatr','Lock\x20key\x20(e.g.\x20ENDPOINT/createOrder)\x20or\x20short\x20function\x20name','5853ipyFqY','BFF\x20lock\x20file\x20not\x20found.\x20Run\x20`push`\x20or\x20`pull`\x20first\x20to\x20initialize\x20sync\x20state.','58UDWkLy','632sLhkrT','Lock\x20scope\x20for\x20app\x20\x22','stringify','6FmesZf','POST','keys','43714UiIKQX','join','split','projectRoot','\x22.\x20Use\x20the\x20full\x20lock\x20key:\x0a','map','2224418jXvYLA','delete','scriptsRootDir','2132795vVZnDe','functions','string','find','parse','trashDir','lockFilePath','<timestamp>','high-risk-write','trashedTo','\x20\x20-\x20','validation','No\x20lock\x20entry\x20found\x20for\x20\x22','length'];a33_0x3bb7=function(){return _0x426861;};return a33_0x3bb7();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{fileExists,resolveLocalFilePathFromLockKey}from'../../core/bff/file-system.js';import{ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';import{sleep}from'../../utils/sleep.js';export const bffDelete={'service':'bff','command':a33_0x274736(0x1f4),'description':a33_0x274736(0x1db),'risk':a33_0x274736(0x1fe),'flags':[{'name':'target','type':a33_0x274736(0x1f8),'required':!![],'description':a33_0x274736(0x1e3)}],async 'validate'(_0x34c3a0){const _0x39afe9=a33_0x274736,_0x25a323=loadBffProjectConfig(_0x34c3a0['appCode']),_0x2c026b=await readBffLockFile(_0x25a323[_0x39afe9(0x1fc)]);if(!_0x2c026b)throw CliErrors[_0x39afe9(0x201)](_0x39afe9(0x1e5));},async 'dryRun'(_0x1d0404){const _0x129cf8=a33_0x274736,_0x51a649=loadBffProjectConfig(_0x1d0404[_0x129cf8(0x204)]),_0x3d2dc5=await readBffLockFile(_0x51a649[_0x129cf8(0x1fc)]);if(!_0x3d2dc5)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.');const {appLock:_0x26b1cf}=ensureLockScope(_0x3d2dc5,_0x1d0404['appCode'],_0x51a649[_0x129cf8(0x1da)],_0x129cf8(0x1f4)),_0x2e69d6=_0x1d0404[_0x129cf8(0x1e1)]('target'),_0x438121=Object[_0x129cf8(0x1ec)](_0x26b1cf[_0x129cf8(0x1f7)]),_0xd49195=resolveDeleteTarget(_0x2e69d6,_0x438121),_0x3c311a=_0x26b1cf[_0x129cf8(0x1f7)][_0xd49195];if(!_0x3c311a)throw CliErrors[_0x129cf8(0x201)](_0x129cf8(0x202)+_0xd49195+'\x22.');const _0x5895d2=resolveLocalFilePathFromLockKey(_0x51a649,_0xd49195),_0xa67237=relative(_0x51a649[_0x129cf8(0x1f0)],_0x5895d2),_0x44b071=join(_0x51a649[_0x129cf8(0x1fb)],_0x129cf8(0x1fd),_0xa67237);return{'method':_0x129cf8(0x1eb),'url':'/api/management/library/scripts/delete','body':{'appCode':_0x1d0404[_0x129cf8(0x204)],'target':_0xd49195,'remoteId':_0x3c311a['remoteId'],'localFilePath':_0x5895d2,'trashedPath':_0x44b071},'description':'Would\x20delete\x20'+_0xd49195+_0x129cf8(0x1e0)};},async 'execute'(_0x1af0ab){const _0x43ffe1=a33_0x274736,_0x1ef113=loadBffProjectConfig(_0x1af0ab[_0x43ffe1(0x204)]),_0x50de21=await readBffLockFile(_0x1ef113[_0x43ffe1(0x1fc)]);if(!_0x50de21)throw CliErrors['validation']('BFF\x20lock\x20file\x20not\x20found.');const {lockData:_0x4e3606,appLock:_0x1adad1}=ensureLockScope(_0x50de21,_0x1af0ab['appCode'],_0x1ef113[_0x43ffe1(0x1da)],_0x43ffe1(0x1f4)),_0x6ac8d3=JSON[_0x43ffe1(0x1fa)](JSON[_0x43ffe1(0x1e9)](_0x4e3606)),_0x1eae9d=_0x6ac8d3['apps'][_0x1af0ab[_0x43ffe1(0x204)]];if(!_0x1eae9d)throw new Error(_0x43ffe1(0x1e8)+_0x1af0ab[_0x43ffe1(0x204)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x18ec3a=_0x1af0ab[_0x43ffe1(0x1e1)]('target'),_0x57a5bc=Object[_0x43ffe1(0x1ec)](_0x1eae9d['functions']),_0x4165a9=resolveDeleteTarget(_0x18ec3a,_0x57a5bc),_0x52b8cd=_0x1eae9d[_0x43ffe1(0x1f7)][_0x4165a9];if(!_0x52b8cd)throw CliErrors[_0x43ffe1(0x201)](_0x43ffe1(0x202)+_0x4165a9+'\x22.');await deleteBffScript(_0x52b8cd['remoteId']),delete _0x1eae9d[_0x43ffe1(0x1f7)][_0x4165a9],_0x1eae9d[_0x43ffe1(0x20c)]=new Date()['toISOString'](),await writeBffLockFile(_0x1ef113[_0x43ffe1(0x1fc)],_0x6ac8d3);const _0x574a63=resolveLocalFilePathFromLockKey(_0x1ef113,_0x4165a9);let _0x1cd54e;await fileExists(_0x574a63)&&(_0x1cd54e=await moveToTrash(_0x1ef113[_0x43ffe1(0x1f0)],_0x1ef113[_0x43ffe1(0x1fb)],_0x574a63),await cleanupEmptyDirectories(dirname(_0x574a63),_0x1ef113[_0x43ffe1(0x1f5)]));await waitForDeleteSettlement(_0x1ef113[_0x43ffe1(0x1fc)],_0x1af0ab['appCode'],_0x4165a9,_0x574a63),await sleep(0x96);const _0x765589={'deleted':_0x4165a9,'remoteId':_0x52b8cd['remoteId']};if(_0x1cd54e)_0x765589[_0x43ffe1(0x1ff)]=_0x1cd54e;return{'ok':!![],'data':_0x765589,'message':_0x43ffe1(0x206)+_0x4165a9+(_0x1cd54e?_0x43ffe1(0x20b):'')};}};function resolveDeleteTarget(_0x41d293,_0x584c05){const _0x123e2f=a33_0x274736;if(_0x41d293['includes']('/')){const _0x10afb6=_0x584c05[_0x123e2f(0x1f9)](_0x5ea81a=>_0x5ea81a===_0x41d293);if(!_0x10afb6)throw CliErrors[_0x123e2f(0x201)](_0x123e2f(0x207)+_0x41d293);return _0x10afb6;}const _0x27e027=_0x584c05['filter'](_0x482d0b=>_0x482d0b[_0x123e2f(0x1ef)]('/')['at'](-0x1)===_0x41d293);if(_0x27e027[_0x123e2f(0x203)]===0x0)throw CliErrors['validation'](_0x123e2f(0x207)+_0x41d293);if(_0x27e027[_0x123e2f(0x203)]>0x1)throw CliErrors[_0x123e2f(0x201)](_0x123e2f(0x209)+_0x41d293+_0x123e2f(0x1f1)+_0x27e027[_0x123e2f(0x1f2)](_0x243283=>_0x123e2f(0x200)+_0x243283)[_0x123e2f(0x1ee)]('\x0a'));return _0x27e027[0x0];}async function moveToTrash(_0x3a3805,_0xacd3ba,_0x2b3ab3){const _0x4fa7e3=a33_0x274736,_0xd0b526=new Date()[_0x4fa7e3(0x1de)]()['replace'](/[:.]/g,'-'),_0x2c5ec1=relative(_0x3a3805,_0x2b3ab3),_0x5c9a9a=join(_0xacd3ba,_0xd0b526,_0x2c5ec1);return await mkdir(dirname(_0x5c9a9a),{'recursive':!![]}),await rename(_0x2b3ab3,_0x5c9a9a),_0x5c9a9a;}async function cleanupEmptyDirectories(_0x418729,_0x5668a6){const _0x23326c=a33_0x274736;let _0x1322c8=resolve(_0x418729);const _0x33bb43=resolve(_0x5668a6);while(_0x1322c8[_0x23326c(0x205)](''+_0x33bb43+sep)||_0x1322c8===_0x33bb43){if(_0x1322c8===_0x33bb43)return;try{const _0x120394=await readdir(_0x1322c8);if(_0x120394['length']>0x0)return;await rmdir(_0x1322c8);}catch{return;}_0x1322c8=dirname(_0x1322c8);}}const DELETE_SETTLE_RETRY_COUNT=0x14,DELETE_SETTLE_DELAY_MS=0x64;async function waitForDeleteSettlement(_0x5cbdc1,_0x36752d,_0x473ce4,_0x32cea8){const _0x3d085d=a33_0x274736;for(let _0x2ffbd7=0x0;_0x2ffbd7<DELETE_SETTLE_RETRY_COUNT;_0x2ffbd7+=0x1){const _0x138a4f=await readBffLockFile(_0x5cbdc1),_0x3b0f99=!!_0x138a4f?.['apps']?.[_0x36752d]?.[_0x3d085d(0x1f7)]?.[_0x473ce4],_0x52bbe6=await fileExists(_0x32cea8);if(!_0x3b0f99&&!_0x52bbe6)return;await sleep(DELETE_SETTLE_DELAY_MS);}throw new Error(_0x3d085d(0x1dc)+_0x473ce4+'.');}
@@ -1 +1 @@
1
- const a34_0x2b3950=a34_0x311c;(function(_0x438f7d,_0x584373){const _0x5790fd=a34_0x311c,_0x617dfb=_0x438f7d();while(!![]){try{const _0xbf4617=parseInt(_0x5790fd(0x1a8))/0x1+parseInt(_0x5790fd(0x1b0))/0x2+-parseInt(_0x5790fd(0x1a3))/0x3*(-parseInt(_0x5790fd(0x1b8))/0x4)+parseInt(_0x5790fd(0x1ae))/0x5*(parseInt(_0x5790fd(0x1a5))/0x6)+parseInt(_0x5790fd(0x1ad))/0x7+parseInt(_0x5790fd(0x1aa))/0x8*(parseInt(_0x5790fd(0x1b6))/0x9)+parseInt(_0x5790fd(0x1af))/0xa*(-parseInt(_0x5790fd(0x1ac))/0xb);if(_0xbf4617===_0x584373)break;else _0x617dfb['push'](_0x617dfb['shift']());}catch(_0x43988d){_0x617dfb['push'](_0x617dfb['shift']());}}}(a34_0x484a,0xa50fc));import{getBffScriptInfo}from'../../core/api-client.js';function a34_0x484a(){const _0x212035=['detail','407uWooGC','2627289PlqXxM','1040txOHUO','1081260BpqKPB','776948RGUaCL','(none)','Get\x20BFF\x20script\x20details\x20by\x20ID','bff','boolean','read','9JlnWvv','createdTime','744924YctAcY','verbose','num','15IQoQMs','scriptType','35202klSYfN','bool','scriptContent','1307260bEfZMg','appCode','3633616mYpNfm'];a34_0x484a=function(){return _0x212035;};return a34_0x484a();}function a34_0x311c(_0x1e714f,_0x328343){_0x1e714f=_0x1e714f-0x1a1;const _0x484a45=a34_0x484a();let _0x311cf4=_0x484a45[_0x1e714f];return _0x311cf4;}export const bffDetail={'service':a34_0x2b3950(0x1b3),'command':a34_0x2b3950(0x1ab),'description':a34_0x2b3950(0x1b2),'risk':a34_0x2b3950(0x1b5),'flags':[{'name':'id','type':'number','required':!![],'description':'Script\x20ID'},{'name':a34_0x2b3950(0x1a1),'type':a34_0x2b3950(0x1b4),'description':'Return\x20full\x20raw\x20script\x20object'}],async 'execute'(_0x3910f7){const _0x48e853=a34_0x2b3950,_0x37358b=await getBffScriptInfo(_0x3910f7[_0x48e853(0x1a2)]('id')),_0x979d1c=_0x3910f7[_0x48e853(0x1a6)](_0x48e853(0x1a1));if(_0x979d1c)return{'ok':!![],'data':_0x37358b};return{'ok':!![],'data':{'id':_0x37358b['id'],'appCode':_0x37358b[_0x48e853(0x1a9)],'scriptType':_0x37358b[_0x48e853(0x1a4)],'description':_0x37358b['description']||_0x48e853(0x1b1),'createdTime':_0x37358b[_0x48e853(0x1b7)]??'','updatedTime':_0x37358b['updatedTime']??'','scriptContent':_0x37358b[_0x48e853(0x1a7)]??''}};}};
1
+ function a34_0x3a85(){const _0x498835=['18192vZruNY','num','190dNLvuR','87436wuyFUn','boolean','updatedTime','bff','576876HMsPIW','scriptContent','Get\x20BFF\x20script\x20details\x20by\x20ID','description','15oXlRHm','1142880mqlPPZ','195687TaMtjm','read','verbose','1043PAQGWN','2111232addYFB','(none)','Return\x20full\x20raw\x20script\x20object','number','577815EJWtQI','appCode','bool','Script\x20ID'];a34_0x3a85=function(){return _0x498835;};return a34_0x3a85();}const a34_0x22941e=a34_0x41e1;(function(_0x123575,_0x2ee8a1){const _0x2babd2=a34_0x41e1,_0x5975ee=_0x123575();while(!![]){try{const _0x415e76=parseInt(_0x2babd2(0x90))/0x1+-parseInt(_0x2babd2(0x97))/0x2*(parseInt(_0x2babd2(0x9f))/0x3)+-parseInt(_0x2babd2(0x9b))/0x4+parseInt(_0x2babd2(0xa0))/0x5+-parseInt(_0x2babd2(0x94))/0x6*(parseInt(_0x2babd2(0x8b))/0x7)+parseInt(_0x2babd2(0x8c))/0x8+parseInt(_0x2babd2(0xa1))/0x9*(parseInt(_0x2babd2(0x96))/0xa);if(_0x415e76===_0x2ee8a1)break;else _0x5975ee['push'](_0x5975ee['shift']());}catch(_0x2a95ca){_0x5975ee['push'](_0x5975ee['shift']());}}}(a34_0x3a85,0xa34a3));import{getBffScriptInfo}from'../../core/api-client.js';function a34_0x41e1(_0x50fc3f,_0x4a6c80){_0x50fc3f=_0x50fc3f-0x8a;const _0x3a85f1=a34_0x3a85();let _0x41e1b8=_0x3a85f1[_0x50fc3f];return _0x41e1b8;}export const bffDetail={'service':a34_0x22941e(0x9a),'command':'detail','description':a34_0x22941e(0x9d),'risk':a34_0x22941e(0xa2),'flags':[{'name':'id','type':a34_0x22941e(0x8f),'required':!![],'description':a34_0x22941e(0x93)},{'name':a34_0x22941e(0x8a),'type':a34_0x22941e(0x98),'description':a34_0x22941e(0x8e)}],async 'execute'(_0x2b8eef){const _0x4152e3=a34_0x22941e,_0x4f730b=await getBffScriptInfo(_0x2b8eef[_0x4152e3(0x95)]('id')),_0x1b318e=_0x2b8eef[_0x4152e3(0x92)](_0x4152e3(0x8a));if(_0x1b318e)return{'ok':!![],'data':_0x4f730b};return{'ok':!![],'data':{'id':_0x4f730b['id'],'appCode':_0x4f730b[_0x4152e3(0x91)],'scriptType':_0x4f730b['scriptType'],'description':_0x4f730b[_0x4152e3(0x9e)]||_0x4152e3(0x8d),'createdTime':_0x4f730b['createdTime']??'','updatedTime':_0x4f730b[_0x4152e3(0x99)]??'','scriptContent':_0x4f730b[_0x4152e3(0x9c)]??''}};}};
@@ -1 +1 @@
1
- (function(_0x2cc881,_0x3ed910){const _0x798221=a35_0x393c,_0x44decb=_0x2cc881();while(!![]){try{const _0x4b8e7f=-parseInt(_0x798221(0x162))/0x1*(parseInt(_0x798221(0x16a))/0x2)+-parseInt(_0x798221(0x169))/0x3*(parseInt(_0x798221(0x168))/0x4)+-parseInt(_0x798221(0x16d))/0x5*(parseInt(_0x798221(0x164))/0x6)+parseInt(_0x798221(0x16b))/0x7+-parseInt(_0x798221(0x167))/0x8*(-parseInt(_0x798221(0x16c))/0x9)+-parseInt(_0x798221(0x163))/0xa*(-parseInt(_0x798221(0x165))/0xb)+parseInt(_0x798221(0x166))/0xc;if(_0x4b8e7f===_0x3ed910)break;else _0x44decb['push'](_0x44decb['shift']());}catch(_0x5bc54b){_0x44decb['push'](_0x44decb['shift']());}}}(a35_0x31ab,0xc541e));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';function a35_0x31ab(){const _0x104b39=['18KegtLC','12769361JjUTmE','4908828eaTfMO','363936sxfLir','136okthmg','116958ItnXEp','21288FPrqXP','573671HFBWKP','234CDwgFD','317105GbSVLs','48pHQBBW','10fEcxHw'];a35_0x31ab=function(){return _0x104b39;};return a35_0x31ab();}function a35_0x393c(_0x3f9623,_0x965002){_0x3f9623=_0x3f9623-0x162;const _0x31ab79=a35_0x31ab();let _0x393ca8=_0x31ab79[_0x3f9623];return _0x393ca8;}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
+ (function(_0x2ce23e,_0x59ac6c){const _0x8d6d5d=a35_0x90d8,_0x47cc92=_0x2ce23e();while(!![]){try{const _0x1b1273=parseInt(_0x8d6d5d(0x6c))/0x1+-parseInt(_0x8d6d5d(0x6f))/0x2+-parseInt(_0x8d6d5d(0x68))/0x3+parseInt(_0x8d6d5d(0x6e))/0x4+parseInt(_0x8d6d5d(0x6b))/0x5+parseInt(_0x8d6d5d(0x6a))/0x6*(parseInt(_0x8d6d5d(0x69))/0x7)+-parseInt(_0x8d6d5d(0x6d))/0x8;if(_0x1b1273===_0x59ac6c)break;else _0x47cc92['push'](_0x47cc92['shift']());}catch(_0x1c756a){_0x47cc92['push'](_0x47cc92['shift']());}}}(a35_0x239b,0xc724f));import{bffList}from'../../commands/bff/list.js';import{bffDetail}from'../../commands/bff/detail.js';function a35_0x239b(){const _0x459871=['2048100JcMxCv','1692735EshKSo','2136036JzGzCX','18CJTAoB','7791745vXeTKa','1498183xPyHAO','25059800JQjvVI','6257956QRvEWA'];a35_0x239b=function(){return _0x459871;};return a35_0x239b();}function a35_0x90d8(_0x57d48,_0x37b8bc){_0x57d48=_0x57d48-0x68;const _0x239b11=a35_0x239b();let _0x90d85b=_0x239b11[_0x57d48];return _0x90d85b;}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_0x314a4b=a36_0x2497;function a36_0x511e(){const _0x2cb598=['1683020JtqGmy','511791SEbkaZ','2010TQutTF','30KHxWws','572480cmQglO','(unnamed)','ENDPOINT','37377zFLYqg','read','bool','type','verbose','List\x20BFF\x20scripts','name','6JrJUis','boolean','316595xLPWad','3588624ZuepZX','appCode','No\x20BFF\x20scripts\x20found.','Script\x20type\x20filter','length','Return\x20full\x20script\x20objects','description','2279151HFVfEU','string','map','scriptType','str'];a36_0x511e=function(){return _0x2cb598;};return a36_0x511e();}(function(_0x135840,_0x579cc5){const _0x1a8554=a36_0x2497,_0x4e90d9=_0x135840();while(!![]){try{const _0x4ca97d=-parseInt(_0x1a8554(0x180))/0x1+-parseInt(_0x1a8554(0x17e))/0x2*(-parseInt(_0x1a8554(0x18e))/0x3)+-parseInt(_0x1a8554(0x18d))/0x4+-parseInt(_0x1a8554(0x174))/0x5*(-parseInt(_0x1a8554(0x190))/0x6)+parseInt(_0x1a8554(0x188))/0x7+parseInt(_0x1a8554(0x181))/0x8+-parseInt(_0x1a8554(0x177))/0x9*(parseInt(_0x1a8554(0x18f))/0xa);if(_0x4ca97d===_0x579cc5)break;else _0x4e90d9['push'](_0x4e90d9['shift']());}catch(_0x1d5466){_0x4e90d9['push'](_0x4e90d9['shift']());}}}(a36_0x511e,0x45e83));function a36_0x2497(_0x51a8cd,_0x2114ea){_0x51a8cd=_0x51a8cd-0x174;const _0x511e94=a36_0x511e();let _0x249702=_0x511e94[_0x51a8cd];return _0x249702;}import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':'bff','command':'list','description':a36_0x314a4b(0x17c),'risk':a36_0x314a4b(0x178),'flags':[{'name':a36_0x314a4b(0x17a),'type':a36_0x314a4b(0x189),'description':a36_0x314a4b(0x184),'default':a36_0x314a4b(0x176),'enum':['ENDPOINT','COMMON']},{'name':a36_0x314a4b(0x17d),'type':a36_0x314a4b(0x189),'description':'Filter\x20by\x20script\x20name'},{'name':a36_0x314a4b(0x17b),'type':a36_0x314a4b(0x17f),'description':a36_0x314a4b(0x186)}],async 'execute'(_0x2d1f00){const _0x599e6b=a36_0x314a4b,_0x5be762=await listBffScripts(_0x2d1f00[_0x599e6b(0x182)],_0x2d1f00[_0x599e6b(0x18c)](_0x599e6b(0x17a)),{'scriptName':_0x2d1f00[_0x599e6b(0x18c)](_0x599e6b(0x17d))||undefined}),_0x1214dc=_0x2d1f00[_0x599e6b(0x179)](_0x599e6b(0x17b));return{'ok':!![],'data':_0x1214dc?_0x5be762:_0x5be762[_0x599e6b(0x18a)](_0x1143c7=>({'id':_0x1143c7['id'],'functionName':_0x1143c7['functionName']??'','description':_0x1143c7[_0x599e6b(0x187)]||_0x599e6b(0x175),'scriptType':_0x1143c7[_0x599e6b(0x18b)]})),'message':_0x5be762[_0x599e6b(0x185)]===0x0?_0x599e6b(0x183):undefined};}};
1
+ const a36_0x30d41f=a36_0x1f6b;(function(_0x4d85f1,_0x149ed6){const _0x489bf6=a36_0x1f6b,_0x23f4dd=_0x4d85f1();while(!![]){try{const _0xb0085=-parseInt(_0x489bf6(0x1e3))/0x1+-parseInt(_0x489bf6(0x1fd))/0x2*(-parseInt(_0x489bf6(0x1f1))/0x3)+parseInt(_0x489bf6(0x1e1))/0x4*(parseInt(_0x489bf6(0x1f5))/0x5)+parseInt(_0x489bf6(0x1fb))/0x6+-parseInt(_0x489bf6(0x1fa))/0x7+parseInt(_0x489bf6(0x1e9))/0x8+parseInt(_0x489bf6(0x1e8))/0x9*(-parseInt(_0x489bf6(0x1ee))/0xa);if(_0xb0085===_0x149ed6)break;else _0x23f4dd['push'](_0x23f4dd['shift']());}catch(_0x1baf02){_0x23f4dd['push'](_0x23f4dd['shift']());}}}(a36_0xa63e,0x35c31));import{listBffScripts}from'../../core/api-client.js';export const bffList={'service':a36_0x30d41f(0x1f2),'command':a36_0x30d41f(0x1f8),'description':'List\x20BFF\x20scripts','risk':a36_0x30d41f(0x1e5),'flags':[{'name':'type','type':'string','description':a36_0x30d41f(0x1f6),'default':a36_0x30d41f(0x1fe),'enum':[a36_0x30d41f(0x1fe),a36_0x30d41f(0x1f4)]},{'name':'name','type':a36_0x30d41f(0x1e6),'description':'Filter\x20by\x20script\x20name'},{'name':a36_0x30d41f(0x1e7),'type':a36_0x30d41f(0x1e2),'description':a36_0x30d41f(0x1f7)}],async 'execute'(_0x4d9fa7){const _0x3629f5=a36_0x30d41f,_0x2dbee7=await listBffScripts(_0x4d9fa7[_0x3629f5(0x1ea)],_0x4d9fa7[_0x3629f5(0x1f3)](_0x3629f5(0x1ec)),{'scriptName':_0x4d9fa7['str']('name')||undefined}),_0x4a84cb=_0x4d9fa7[_0x3629f5(0x1eb)]('verbose');return{'ok':!![],'data':_0x4a84cb?_0x2dbee7:_0x2dbee7[_0x3629f5(0x1fc)](_0x40e1df=>({'id':_0x40e1df['id'],'functionName':_0x40e1df[_0x3629f5(0x1e4)]??'','description':_0x40e1df[_0x3629f5(0x1ef)]||_0x3629f5(0x1f9),'scriptType':_0x40e1df['scriptType']})),'message':_0x2dbee7[_0x3629f5(0x1f0)]===0x0?_0x3629f5(0x1ed):undefined};}};function a36_0x1f6b(_0x12c4ea,_0x21c422){_0x12c4ea=_0x12c4ea-0x1e1;const _0xa63edc=a36_0xa63e();let _0x1f6b47=_0xa63edc[_0x12c4ea];return _0x1f6b47;}function a36_0xa63e(){const _0xf64157=['127315bqSZXU','Script\x20type\x20filter','Return\x20full\x20script\x20objects','list','(unnamed)','762832NIJIIm','483048PWTVju','map','582698ZqhiFJ','ENDPOINT','68EjTEUY','boolean','344873GjvXeN','functionName','read','string','verbose','15057lUsjxl','1711744GItyfR','appCode','bool','type','No\x20BFF\x20scripts\x20found.','2060QvbtBD','description','length','3YdbDSQ','bff','str','COMMON'];a36_0xa63e=function(){return _0xf64157;};return a36_0xa63e();}
@@ -1 +1 @@
1
- const a37_0x108758=a37_0x52ee;(function(_0x2f95ba,_0x43f48e){const _0x274c71=a37_0x52ee,_0x49b07c=_0x2f95ba();while(!![]){try{const _0x58b9a0=-parseInt(_0x274c71(0xe7))/0x1*(-parseInt(_0x274c71(0x10d))/0x2)+-parseInt(_0x274c71(0x116))/0x3+-parseInt(_0x274c71(0x102))/0x4*(-parseInt(_0x274c71(0x101))/0x5)+-parseInt(_0x274c71(0xfe))/0x6*(-parseInt(_0x274c71(0x113))/0x7)+parseInt(_0x274c71(0x123))/0x8*(-parseInt(_0x274c71(0x10a))/0x9)+parseInt(_0x274c71(0xf7))/0xa*(parseInt(_0x274c71(0x124))/0xb)+parseInt(_0x274c71(0xe9))/0xc*(parseInt(_0x274c71(0x12d))/0xd);if(_0x58b9a0===_0x43f48e)break;else _0x49b07c['push'](_0x49b07c['shift']());}catch(_0x339371){_0x49b07c['push'](_0x49b07c['shift']());}}}(a37_0x1d41,0xb74cb));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_0x1d41(){const _0x550460=['HOOK','functionName','4533648TlBIgI','alias','Pull\x20complete:\x20','525288sLoAkB','yes','lastSync','functions','lockKey','scriptsRoot','apps','lockFilePath','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','Pull\x20only\x20this\x20script\x20type','No\x20remote\x20BFF\x20scripts\x20found.','map','toISOString','17528DbOGKd','7249PaSIcV','would_pull','\x20pulled,\x20','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','Remote\x20script\x20missing\x20content.','COMMON','all','stderr','force','26uuNFTZ','GET','length','10003cddKiW','hash','680172BwgFSK','Lock\x20scope\x20for\x20app\x20\x22','Force\x20pull\x20cancelled.','bff','filePath','pull','version','utf8','stdin','type','bool','\x20skipped,\x20','nonInteractive','skipped','3570xTHpCw','string','stringify','ENDPOINT','operationType','scriptContent','push','6lVDLlN','conflict','appCode','5PxdqwM','779524PBAlyc','boolean','str','\x22\x20not\x20found\x20after\x20ensureLockScope.','includes','message','toLowerCase','datasetCode','2610eAKyJq','scriptType','local\x20unsynced\x20changes','74WWIuMc','question','hookLocation','apiDir'];a37_0x1d41=function(){return _0x550460;};return a37_0x1d41();}import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';function a37_0x52ee(_0x4fffa4,_0x3ae2fd){_0x4fffa4=_0x4fffa4-0xe5;const _0x1d4163=a37_0x1d41();let _0x52eecc=_0x1d4163[_0x4fffa4];return _0x52eecc;}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_0x108758(0xec),'command':a37_0x108758(0xee),'description':a37_0x108758(0x127),'risk':'write','flags':[{'name':'type','type':a37_0x108758(0xf8),'description':a37_0x108758(0x11f),'enum':[a37_0x108758(0x129),a37_0x108758(0xfa),a37_0x108758(0x111)]},{'name':a37_0x108758(0x12c),'type':a37_0x108758(0x103),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x419815){const _0x45b9b2=a37_0x108758,_0x9c0174=loadBffProjectConfig(_0x419815['appCode']),_0x2952f4=await readBffLockFile(_0x9c0174[_0x45b9b2(0x11d)]),{appLock:_0x338916}=ensureLockScope(_0x2952f4??createEmptyBffLock(),_0x419815[_0x45b9b2(0x100)],_0x9c0174[_0x45b9b2(0x11b)],_0x45b9b2(0xee)),_0xd8c67c=normalizeBffType(_0x419815[_0x45b9b2(0x104)](_0x45b9b2(0xf2)))??undefined,_0x4742e5=buildDatasetCodeToAliasMap(_0x419815[_0x45b9b2(0x110)],_0x419815['appCode']),[_0x12ddc4,_0x103ca1]=await Promise['all']([listBffScripts(_0x419815[_0x45b9b2(0x100)],_0xd8c67c),getBffScriptStatistics(_0x419815[_0x45b9b2(0x100)])]),_0x5b0c8e=createHookLocationMap(_0x103ca1),_0x51357c=[];for(const _0x20bf25 of _0x12ddc4){const _0x233763=resolveRemoteScriptTarget(_0x9c0174,_0x20bf25,_0x5b0c8e,_0x338916[_0x45b9b2(0x119)],_0x4742e5);if(!_0x233763){_0x51357c[_0x45b9b2(0xfd)]({'scriptType':_0x20bf25[_0x45b9b2(0x10b)],'functionName':_0x20bf25[_0x45b9b2(0x112)]??'','status':_0x45b9b2(0xf6),'reason':'unresolvable\x20target\x20path'});continue;}const _0x4dc930=_0x338916['functions'][_0x233763['lockKey']],_0x46ad0a=_0x20bf25['scriptContent']!=null?computeContentHash(_0x20bf25[_0x45b9b2(0xfc)]):undefined,_0x210734=await hasUnsyncedLocalChanges(_0x233763[_0x45b9b2(0xed)],_0x4dc930,_0x46ad0a);_0x51357c[_0x45b9b2(0xfd)]({'lockKey':_0x233763[_0x45b9b2(0x11a)],'filePath':_0x233763['filePath'],'remoteId':_0x20bf25['id']??null,'status':_0x210734?_0x45b9b2(0xff):_0x45b9b2(0x125)});}return{'method':_0x45b9b2(0xe5),'url':'/api/management/library/scripts/list?appCode='+_0x419815[_0x45b9b2(0x100)]+(_0xd8c67c?'&type='+_0xd8c67c:''),'body':{'appCode':_0x419815[_0x45b9b2(0x100)],'filterType':_0xd8c67c??null,'files':_0x51357c},'description':'Would\x20inspect\x20'+_0x51357c[_0x45b9b2(0xe6)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x5e693d){const _0x12049f=a37_0x108758,_0x5e2266=loadBffProjectConfig(_0x5e693d['appCode']),_0x232288=await readBffLockFile(_0x5e2266['lockFilePath']),{lockData:_0x2cd3cb,appLock:_0x3e78e2}=ensureLockScope(_0x232288??createEmptyBffLock(),_0x5e693d[_0x12049f(0x100)],_0x5e2266[_0x12049f(0x11b)],_0x12049f(0xee)),_0x2f525c=normalizeBffType(_0x5e693d[_0x12049f(0x104)](_0x12049f(0xf2)))??undefined;if(_0x5e693d[_0x12049f(0x104)]('type')&&!_0x2f525c)throw CliErrors['validation']('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x3e44f7,_0x34222f]=await Promise[_0x12049f(0x12a)]([listBffScripts(_0x5e693d['appCode'],_0x2f525c),getBffScriptStatistics(_0x5e693d[_0x12049f(0x100)])]);if(_0x3e44f7[_0x12049f(0xe6)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x12049f(0x120)};const _0x111c80=_0x5e693d[_0x12049f(0xf3)](_0x12049f(0x12c));if(_0x111c80&&!_0x5e693d['nonInteractive']){const _0x590abb=await confirmForce();if(!_0x590abb)throw CliErrors['cancelled'](_0x12049f(0xeb));}if(_0x111c80&&_0x5e693d[_0x12049f(0xf5)]){}const _0x19654f=buildDatasetCodeToAliasMap(_0x5e693d[_0x12049f(0x110)],_0x5e693d[_0x12049f(0x100)]),_0x3ad9f7=createHookLocationMap(_0x34222f),_0x38e5fb=JSON['parse'](JSON[_0x12049f(0xf9)](_0x2cd3cb)),_0x3f2573=_0x5e693d[_0x12049f(0x100)],_0x474f28=_0x38e5fb[_0x12049f(0x11c)][_0x3f2573];if(!_0x474f28)throw new Error(_0x12049f(0xea)+_0x3f2573+_0x12049f(0x105));const _0x421cad=[],_0x459127=[],_0x4464f1=[];for(const _0xea3e16 of _0x3e44f7){const _0xb1269f=resolveRemoteScriptTarget(_0x5e2266,_0xea3e16,_0x3ad9f7,_0x3e78e2['functions'],_0x19654f);if(!_0xb1269f){_0x459127['push']({'lockKey':_0xea3e16[_0x12049f(0x10b)]+'/'+_0xea3e16[_0x12049f(0x112)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x5890ce=_0x3e78e2[_0x12049f(0x119)][_0xb1269f[_0x12049f(0x11a)]];try{if(!_0xea3e16['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0xea3e16[_0x12049f(0xfc)]==null)throw new Error(_0x12049f(0x128));const _0x31221c=_0xea3e16[_0x12049f(0xfc)],_0x21c4cf=computeContentHash(_0x31221c);if(!_0x111c80){const _0x29cc93=await hasUnsyncedLocalChanges(_0xb1269f[_0x12049f(0xed)],_0x5890ce,_0x21c4cf);if(_0x29cc93){_0x459127['push']({'lockKey':_0xb1269f[_0x12049f(0x11a)],'reason':_0x12049f(0x10c)});continue;}}await ensureParentDirectory(_0xb1269f[_0x12049f(0xed)]),await writeFile(_0xb1269f['filePath'],_0x31221c,_0x12049f(0xf0));const _0x15739d={'hash':_0x21c4cf,'remoteId':_0xea3e16['id'],'version':_0xea3e16[_0x12049f(0xef)]};_0xb1269f[_0x12049f(0xf2)]===_0x12049f(0x111)&&_0xb1269f['hookLocation']&&(_0x15739d[_0x12049f(0x114)]=_0xb1269f[_0x12049f(0x10f)][_0x12049f(0x114)],_0x15739d[_0x12049f(0x109)]=_0xb1269f[_0x12049f(0x10f)]['datasetCode'],_0x15739d[_0x12049f(0xfb)]=_0xb1269f[_0x12049f(0x10f)][_0x12049f(0xfb)],_0x15739d['functionNode']=_0xb1269f[_0x12049f(0x10f)]['functionNode']),_0x474f28['functions'][_0xb1269f[_0x12049f(0x11a)]]=_0x15739d,_0x421cad[_0x12049f(0xfd)]({'lockKey':_0xb1269f['lockKey'],'remoteId':_0xea3e16['id']});}catch(_0x330258){_0x4464f1[_0x12049f(0xfd)]({'lockKey':_0xb1269f[_0x12049f(0x11a)],'error':_0x330258 instanceof Error?_0x330258[_0x12049f(0x107)]:String(_0x330258)});}}return _0x474f28[_0x12049f(0x118)]=new Date()[_0x12049f(0x122)](),await writeBffLockFile(_0x5e2266[_0x12049f(0x11d)],_0x38e5fb),{'ok':_0x4464f1[_0x12049f(0xe6)]===0x0,'data':{'pulled':_0x421cad,'skipped':_0x459127,'failed':_0x4464f1},'message':_0x12049f(0x115)+_0x421cad[_0x12049f(0xe6)]+_0x12049f(0x126)+_0x459127[_0x12049f(0xe6)]+_0x12049f(0xf4)+_0x4464f1[_0x12049f(0xe6)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0xcf70b3,_0x50513c,_0x10a3d6){const _0x2a17ce=a37_0x108758;if(!await fileExists(_0xcf70b3))return![];const _0x2b4275=await computeFileHash(_0xcf70b3);if(!_0x50513c)return _0x10a3d6?_0x2b4275!==_0x10a3d6:!![];return _0x2b4275!==_0x50513c[_0x2a17ce(0xe8)];}function buildDatasetCodeToAliasMap(_0x4bce6e,_0x2c6b69){const _0x50e0d9=a37_0x108758,_0x3e7c54=loadAliasMap(_0x4bce6e,undefined,resolveApiFilePath(_0x4bce6e,_0x2c6b69));return new Map(_0x3e7c54[_0x50e0d9(0x121)](_0x376b1a=>[_0x376b1a['datasetCode'],_0x376b1a[_0x50e0d9(0x114)]]));}async function confirmForce(){const _0x129fa0=a37_0x108758,_0x21f946=createInterface({'input':process[_0x129fa0(0xf1)],'output':process[_0x129fa0(0x12b)]}),_0x428c81=await new Promise(_0x197d97=>{const _0x3bd8f6=_0x129fa0;_0x21f946[_0x3bd8f6(0x10e)](_0x3bd8f6(0x11e),_0x197d97);});return _0x21f946['close'](),['y',_0x129fa0(0x117)][_0x129fa0(0x106)](_0x428c81['trim']()[_0x129fa0(0x108)]());}
1
+ const a37_0x45abdf=a37_0x36ae;(function(_0x135005,_0x5758e2){const _0x566e6f=a37_0x36ae,_0x29977f=_0x135005();while(!![]){try{const _0x289c70=-parseInt(_0x566e6f(0x1a3))/0x1+-parseInt(_0x566e6f(0x187))/0x2*(-parseInt(_0x566e6f(0x1a4))/0x3)+-parseInt(_0x566e6f(0x19b))/0x4*(-parseInt(_0x566e6f(0x1a2))/0x5)+-parseInt(_0x566e6f(0x184))/0x6+parseInt(_0x566e6f(0x198))/0x7+-parseInt(_0x566e6f(0x1a0))/0x8*(-parseInt(_0x566e6f(0x195))/0x9)+parseInt(_0x566e6f(0x19e))/0xa;if(_0x289c70===_0x5758e2)break;else _0x29977f['push'](_0x29977f['shift']());}catch(_0x558792){_0x29977f['push'](_0x29977f['shift']());}}}(a37_0x4c0e,0x2f750));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';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';function a37_0x4c0e(){const _0x499e8f=['2098257tofykj','filePath','Remote\x20script\x20missing\x20content.','4ShBwiH','force','operationType','2106120wsqBSu','\x20skipped,\x20','2776Eyzfaz','cancelled','259905phYiyP','243127eNOtJT','39513qKUbnk','COMMON','version','hookLocation','lastSync','includes','&type=','functions','all','string','apiDir','write','Force\x20overwrite\x20local\x20unsynced\x20changes','nonInteractive','map','length','boolean','scriptContent','question','close','hash','GET','No\x20remote\x20BFF\x20scripts\x20found.','functionNode','\x22\x20not\x20found\x20after\x20ensureLockScope.','Remote\x20script\x20missing\x20id.','Would\x20inspect\x20','toLowerCase','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','bool','local\x20unsynced\x20changes','appCode','str','stderr','unresolvable\x20target\x20path','Pull\x20complete:\x20','/api/management/library/scripts/list?appCode=','scriptType','toISOString','scriptsRoot','stdin','push','functionName','skipped','bff','2055594EIXDaG','yes','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','20lcChsF','Pull\x20only\x20this\x20script\x20type','lockFilePath','Lock\x20scope\x20for\x20app\x20\x22','pull','validation','would_pull','lockKey','type','conflict','utf8','datasetCode','HOOK','parse','2232XZOhKm','alias','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20'];a37_0x4c0e=function(){return _0x499e8f;};return a37_0x4c0e();}export const bffPull={'service':a37_0x45abdf(0x183),'command':a37_0x45abdf(0x18b),'description':a37_0x45abdf(0x1c0),'risk':a37_0x45abdf(0x1af),'flags':[{'name':'type','type':a37_0x45abdf(0x1ad),'description':a37_0x45abdf(0x188),'enum':[a37_0x45abdf(0x1a5),'ENDPOINT','HOOK']},{'name':a37_0x45abdf(0x19c),'type':a37_0x45abdf(0x1b4),'description':a37_0x45abdf(0x1b0)}],async 'dryRun'(_0x1816e8){const _0x1223ee=a37_0x45abdf,_0xce34dd=loadBffProjectConfig(_0x1816e8[_0x1223ee(0x1c3)]),_0x51b79d=await readBffLockFile(_0xce34dd[_0x1223ee(0x189)]),{appLock:_0x19111b}=ensureLockScope(_0x51b79d??createEmptyBffLock(),_0x1816e8['appCode'],_0xce34dd[_0x1223ee(0x1cb)],'pull'),_0x48ddd9=normalizeBffType(_0x1816e8[_0x1223ee(0x1c4)](_0x1223ee(0x18f)))??undefined,_0xa1c3cb=buildDatasetCodeToAliasMap(_0x1816e8[_0x1223ee(0x1ae)],_0x1816e8['appCode']),[_0x5bcc79,_0x4620fa]=await Promise['all']([listBffScripts(_0x1816e8['appCode'],_0x48ddd9),getBffScriptStatistics(_0x1816e8[_0x1223ee(0x1c3)])]),_0x34396b=createHookLocationMap(_0x4620fa),_0x50418b=[];for(const _0x55d8a6 of _0x5bcc79){const _0x4695e1=resolveRemoteScriptTarget(_0xce34dd,_0x55d8a6,_0x34396b,_0x19111b[_0x1223ee(0x1ab)],_0xa1c3cb);if(!_0x4695e1){_0x50418b[_0x1223ee(0x180)]({'scriptType':_0x55d8a6[_0x1223ee(0x1c9)],'functionName':_0x55d8a6[_0x1223ee(0x181)]??'','status':_0x1223ee(0x182),'reason':_0x1223ee(0x1c6)});continue;}const _0x390ffb=_0x19111b[_0x1223ee(0x1ab)][_0x4695e1[_0x1223ee(0x18e)]],_0x122490=_0x55d8a6[_0x1223ee(0x1b5)]!=null?computeContentHash(_0x55d8a6[_0x1223ee(0x1b5)]):undefined,_0x39198f=await hasUnsyncedLocalChanges(_0x4695e1[_0x1223ee(0x199)],_0x390ffb,_0x122490);_0x50418b[_0x1223ee(0x180)]({'lockKey':_0x4695e1[_0x1223ee(0x18e)],'filePath':_0x4695e1['filePath'],'remoteId':_0x55d8a6['id']??null,'status':_0x39198f?_0x1223ee(0x190):_0x1223ee(0x18d)});}return{'method':_0x1223ee(0x1b9),'url':_0x1223ee(0x1c8)+_0x1816e8[_0x1223ee(0x1c3)]+(_0x48ddd9?_0x1223ee(0x1aa)+_0x48ddd9:''),'body':{'appCode':_0x1816e8['appCode'],'filterType':_0x48ddd9??null,'files':_0x50418b},'description':_0x1223ee(0x1be)+_0x50418b[_0x1223ee(0x1b3)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x152aa0){const _0x59927a=a37_0x45abdf,_0x24be75=loadBffProjectConfig(_0x152aa0[_0x59927a(0x1c3)]),_0x4648e4=await readBffLockFile(_0x24be75[_0x59927a(0x189)]),{lockData:_0x12ae18,appLock:_0x43447a}=ensureLockScope(_0x4648e4??createEmptyBffLock(),_0x152aa0[_0x59927a(0x1c3)],_0x24be75[_0x59927a(0x1cb)],_0x59927a(0x18b)),_0x56b6b8=normalizeBffType(_0x152aa0['str']('type'))??undefined;if(_0x152aa0['str']('type')&&!_0x56b6b8)throw CliErrors[_0x59927a(0x18c)](_0x59927a(0x186));const [_0x346e28,_0x56afde]=await Promise[_0x59927a(0x1ac)]([listBffScripts(_0x152aa0[_0x59927a(0x1c3)],_0x56b6b8),getBffScriptStatistics(_0x152aa0[_0x59927a(0x1c3)])]);if(_0x346e28['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x59927a(0x1ba)};const _0x10eed4=_0x152aa0[_0x59927a(0x1c1)](_0x59927a(0x19c));if(_0x10eed4&&!_0x152aa0['nonInteractive']){const _0x2be159=await confirmForce();if(!_0x2be159)throw CliErrors[_0x59927a(0x1a1)]('Force\x20pull\x20cancelled.');}if(_0x10eed4&&_0x152aa0[_0x59927a(0x1b1)]){}const _0x5054a7=buildDatasetCodeToAliasMap(_0x152aa0[_0x59927a(0x1ae)],_0x152aa0[_0x59927a(0x1c3)]),_0x286feb=createHookLocationMap(_0x56afde),_0x43065a=JSON[_0x59927a(0x194)](JSON['stringify'](_0x12ae18)),_0x2d23d9=_0x152aa0[_0x59927a(0x1c3)],_0x3baa64=_0x43065a['apps'][_0x2d23d9];if(!_0x3baa64)throw new Error(_0x59927a(0x18a)+_0x2d23d9+_0x59927a(0x1bc));const _0x3ff2a8=[],_0xbe854d=[],_0x2f32bd=[];for(const _0x40d11f of _0x346e28){const _0x1ce8d9=resolveRemoteScriptTarget(_0x24be75,_0x40d11f,_0x286feb,_0x43447a[_0x59927a(0x1ab)],_0x5054a7);if(!_0x1ce8d9){_0xbe854d[_0x59927a(0x180)]({'lockKey':_0x40d11f[_0x59927a(0x1c9)]+'/'+_0x40d11f[_0x59927a(0x181)],'reason':_0x59927a(0x1c6)});continue;}const _0x5452ef=_0x43447a[_0x59927a(0x1ab)][_0x1ce8d9['lockKey']];try{if(!_0x40d11f['id'])throw new Error(_0x59927a(0x1bd));if(_0x40d11f[_0x59927a(0x1b5)]==null)throw new Error(_0x59927a(0x19a));const _0x621f5b=_0x40d11f[_0x59927a(0x1b5)],_0x3d931d=computeContentHash(_0x621f5b);if(!_0x10eed4){const _0x14aebc=await hasUnsyncedLocalChanges(_0x1ce8d9['filePath'],_0x5452ef,_0x3d931d);if(_0x14aebc){_0xbe854d['push']({'lockKey':_0x1ce8d9[_0x59927a(0x18e)],'reason':_0x59927a(0x1c2)});continue;}}await ensureParentDirectory(_0x1ce8d9['filePath']),await writeFile(_0x1ce8d9[_0x59927a(0x199)],_0x621f5b,_0x59927a(0x191));const _0xee0f13={'hash':_0x3d931d,'remoteId':_0x40d11f['id'],'version':_0x40d11f[_0x59927a(0x1a6)]};_0x1ce8d9[_0x59927a(0x18f)]===_0x59927a(0x193)&&_0x1ce8d9[_0x59927a(0x1a7)]&&(_0xee0f13[_0x59927a(0x196)]=_0x1ce8d9[_0x59927a(0x1a7)]['alias'],_0xee0f13[_0x59927a(0x192)]=_0x1ce8d9[_0x59927a(0x1a7)][_0x59927a(0x192)],_0xee0f13[_0x59927a(0x19d)]=_0x1ce8d9[_0x59927a(0x1a7)]['operationType'],_0xee0f13[_0x59927a(0x1bb)]=_0x1ce8d9[_0x59927a(0x1a7)]['functionNode']),_0x3baa64[_0x59927a(0x1ab)][_0x1ce8d9[_0x59927a(0x18e)]]=_0xee0f13,_0x3ff2a8['push']({'lockKey':_0x1ce8d9['lockKey'],'remoteId':_0x40d11f['id']});}catch(_0x55d5f3){_0x2f32bd[_0x59927a(0x180)]({'lockKey':_0x1ce8d9[_0x59927a(0x18e)],'error':_0x55d5f3 instanceof Error?_0x55d5f3['message']:String(_0x55d5f3)});}}return _0x3baa64[_0x59927a(0x1a8)]=new Date()[_0x59927a(0x1ca)](),await writeBffLockFile(_0x24be75[_0x59927a(0x189)],_0x43065a),{'ok':_0x2f32bd[_0x59927a(0x1b3)]===0x0,'data':{'pulled':_0x3ff2a8,'skipped':_0xbe854d,'failed':_0x2f32bd},'message':_0x59927a(0x1c7)+_0x3ff2a8[_0x59927a(0x1b3)]+'\x20pulled,\x20'+_0xbe854d['length']+_0x59927a(0x19f)+_0x2f32bd[_0x59927a(0x1b3)]+'\x20failed'};}};function a37_0x36ae(_0x3ff551,_0x70fccc){_0x3ff551=_0x3ff551-0x17f;const _0x4c0eec=a37_0x4c0e();let _0x36ae23=_0x4c0eec[_0x3ff551];return _0x36ae23;}async function hasUnsyncedLocalChanges(_0x5a0b56,_0x3266ff,_0x2598e9){const _0x305c59=a37_0x45abdf;if(!await fileExists(_0x5a0b56))return![];const _0x534d24=await computeFileHash(_0x5a0b56);if(!_0x3266ff)return _0x2598e9?_0x534d24!==_0x2598e9:!![];return _0x534d24!==_0x3266ff[_0x305c59(0x1b8)];}function buildDatasetCodeToAliasMap(_0x67d24a,_0x58dfdf){const _0x11aa91=a37_0x45abdf,_0x360743=loadAliasMap(_0x67d24a,undefined,resolveApiFilePath(_0x67d24a,_0x58dfdf));return new Map(_0x360743[_0x11aa91(0x1b2)](_0x43f4d9=>[_0x43f4d9[_0x11aa91(0x192)],_0x43f4d9[_0x11aa91(0x196)]]));}async function confirmForce(){const _0x2da2d7=a37_0x45abdf,_0x3a5a13=createInterface({'input':process[_0x2da2d7(0x17f)],'output':process[_0x2da2d7(0x1c5)]}),_0x3367d3=await new Promise(_0x1f56f2=>{const _0x1a2caf=_0x2da2d7;_0x3a5a13[_0x1a2caf(0x1b6)](_0x1a2caf(0x197),_0x1f56f2);});return _0x3a5a13[_0x2da2d7(0x1b7)](),['y',_0x2da2d7(0x185)][_0x2da2d7(0x1a9)](_0x3367d3['trim']()[_0x2da2d7(0x1bf)]());}
@@ -1 +1 @@
1
- function a38_0x2c1a(){const _0x18dc97=['values','27276aZqEJG','parse','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','cleared','set','\x22\x20not\x20found\x20after\x20ensureLockScope.','lastSync','type','Incomplete\x20HOOK\x20path:\x20','alias','some','boolean','aliasToDatasetCode','appCode','status','code','get','has','lockKey','396252ajsKCV','Push\x20local\x20BFF\x20scripts\x20to\x20remote','unchanged','Push\x20complete:\x20','update','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','datasetId','push','1547142NphPYG','59226lZQQPy','3763930YjFBSY','script','bool',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','bff','\x20uploaded,\x20','1892AltZRl','Lock\x20scope\x20for\x20app\x20\x22','7JEMToT','str','9LqXPjP','message','length','functionNode','map','Run\x20`','attempted','force','operationType','\x22.\x20','\x20failed,\x20','Force\x20push\x20ignoring\x20hash\x20protection','datasetCodeToDataset','functions','\x20skipped,\x20','datasetCode','POST','scriptsRoot','runtime\x20cache\x20cleared','ENDPOINT','stringify','8ymlrYm','validation','Push\x20only\x20this\x20script\x20type','apps','high-risk-write','hash','version','439724NymUDF','COMMON','string','create','description','Would\x20inspect\x20','join','name','remoteId','filePath','lockFilePath','10ZooxCM','runtime\x20cache\x20clear\x20failed','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','HOOK','3723488okpeVO','would_push'];a38_0x2c1a=function(){return _0x18dc97;};return a38_0x2c1a();}const a38_0x57b252=a38_0x48ec;(function(_0x4392b8,_0x45667d){const _0x15783c=a38_0x48ec,_0x489f0a=_0x4392b8();while(!![]){try{const _0x38f276=-parseInt(_0x15783c(0x134))/0x1+parseInt(_0x15783c(0x12d))/0x2*(-parseInt(_0x15783c(0x10d))/0x3)+-parseInt(_0x15783c(0x104))/0x4*(-parseInt(_0x15783c(0xe9))/0x5)+parseInt(_0x15783c(0x10c))/0x6*(parseInt(_0x15783c(0x116))/0x7)+-parseInt(_0x15783c(0xed))/0x8*(parseInt(_0x15783c(0x118))/0x9)+parseInt(_0x15783c(0x10e))/0xa+-parseInt(_0x15783c(0x114))/0xb*(-parseInt(_0x15783c(0xf0))/0xc);if(_0x38f276===_0x45667d)break;else _0x489f0a['push'](_0x489f0a['shift']());}catch(_0x4182ce){_0x489f0a['push'](_0x489f0a['shift']());}}}(a38_0x2c1a,0x3a664));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';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_0x57b252(0x112),'command':a38_0x57b252(0x10b),'description':a38_0x57b252(0x105),'risk':a38_0x57b252(0x131),'flags':[{'name':a38_0x57b252(0xf8),'type':a38_0x57b252(0x136),'description':a38_0x57b252(0x12f),'enum':[a38_0x57b252(0x135),a38_0x57b252(0x12b),a38_0x57b252(0xec)]},{'name':'name','type':a38_0x57b252(0x136),'description':a38_0x57b252(0xf2)},{'name':'force','type':a38_0x57b252(0xfc),'description':a38_0x57b252(0x123)}],async 'dryRun'(_0x43d859){const _0xceb9f8=a38_0x57b252,_0x1c4e75=loadBffProjectConfig(_0x43d859[_0xceb9f8(0xfe)]),_0x5c4167=await readBffLockFile(_0x1c4e75[_0xceb9f8(0xe8)]),{appLock:_0x2318ee}=ensureLockScope(_0x5c4167??createEmptyBffLock(),_0x43d859[_0xceb9f8(0xfe)],_0x1c4e75[_0xceb9f8(0x129)],_0xceb9f8(0x10b)),_0x2361f6=await getTargetFunctions(_0x1c4e75,_0x43d859),_0x4c36b8=_0x43d859[_0xceb9f8(0x110)](_0xceb9f8(0x11f)),_0x7f55cf=[];for(const _0xa33794 of _0x2361f6){const _0x1b9cc7=await computeFileHash(_0xa33794['filePath']),_0x2a3917=_0x2318ee[_0xceb9f8(0x125)][_0xa33794[_0xceb9f8(0x103)]],_0x3c0073=!!_0x2a3917&&_0x2a3917[_0xceb9f8(0x132)]===_0x1b9cc7;_0x7f55cf[_0xceb9f8(0x10b)]({'lockKey':_0xa33794['lockKey'],'filePath':_0xa33794[_0xceb9f8(0xe7)],'remoteId':_0x2a3917?.[_0xceb9f8(0xe6)]??null,'mode':_0x2a3917?.[_0xceb9f8(0xe6)]?_0xceb9f8(0x108):_0xceb9f8(0x137),'status':!_0x4c36b8&&_0x3c0073?_0xceb9f8(0x106):_0xceb9f8(0xee)});}return{'method':_0xceb9f8(0x128),'url':'/api/management/library/scripts/save','body':{'appCode':_0x43d859[_0xceb9f8(0xfe)],'force':_0x4c36b8,'files':_0x7f55cf,'cacheClearAtRuntime':_0x7f55cf[_0xceb9f8(0xfb)](_0x4ecc6a=>_0x4ecc6a['status']===_0xceb9f8(0xee)),'cacheClearAtRuntimeTimes':_0x7f55cf[_0xceb9f8(0xfb)](_0x5ddc1d=>_0x5ddc1d[_0xceb9f8(0xff)]===_0xceb9f8(0xee))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0xceb9f8(0x139)+_0x7f55cf['length']+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x1fa870){const _0xf56435=a38_0x57b252,_0x3696aa=loadBffProjectConfig(_0x1fa870[_0xf56435(0xfe)]),_0x48b74a=await readBffLockFile(_0x3696aa['lockFilePath']),{lockData:_0x50af19,appLock:_0x895a1}=ensureLockScope(_0x48b74a??createEmptyBffLock(),_0x1fa870[_0xf56435(0xfe)],_0x3696aa[_0xf56435(0x129)],_0xf56435(0x10b)),_0x231666=await getTargetFunctions(_0x3696aa,_0x1fa870);if(_0x231666['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x3b1c99=_0x1fa870[_0xf56435(0x110)](_0xf56435(0x11f)),_0x15d6b0=JSON[_0xf56435(0xf1)](JSON[_0xf56435(0x12c)](_0x50af19)),_0x52d5d2=_0x15d6b0[_0xf56435(0x130)][_0x1fa870[_0xf56435(0xfe)]];if(!_0x52d5d2)throw new Error(_0xf56435(0x115)+_0x1fa870[_0xf56435(0xfe)]+_0xf56435(0xf6));const _0x3fb509=await buildHookMaps(_0x1fa870['appCode'],_0x1fa870['apiDir'],_0x231666,_0x52d5d2),_0x4412a3=[],_0x473566=[],_0x34be0a=[];for(const _0x224c90 of _0x231666){const _0x2e9bb7=await computeFileHash(_0x224c90[_0xf56435(0xe7)]),_0x23d421=_0x52d5d2['functions'][_0x224c90[_0xf56435(0x103)]];if(!_0x3b1c99&&_0x23d421&&_0x23d421[_0xf56435(0x132)]===_0x2e9bb7){_0x473566[_0xf56435(0x10b)]({'lockKey':_0x224c90[_0xf56435(0x103)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x1fa870['appCode'],_0x224c90,_0x52d5d2,_0x3fb509);const _0x5ee947=_0x52d5d2[_0xf56435(0x125)][_0x224c90['lockKey']];_0x4412a3[_0xf56435(0x10b)]({'lockKey':_0x224c90[_0xf56435(0x103)],'remoteId':_0x5ee947?.[_0xf56435(0xe6)]??0x0});}catch(_0x334fad){_0x34be0a[_0xf56435(0x10b)]({'lockKey':_0x224c90[_0xf56435(0x103)],'error':_0x334fad instanceof Error?_0x334fad[_0xf56435(0x119)]:String(_0x334fad)});}}_0x52d5d2[_0xf56435(0xf7)]=new Date()['toISOString'](),await writeBffLockFile(_0x3696aa[_0xf56435(0xe8)],_0x15d6b0),await waitForUploadedLockEntries(_0x3696aa['lockFilePath'],_0x1fa870[_0xf56435(0xfe)],_0x4412a3['map'](_0x33100d=>_0x33100d['lockKey']));let _0x4f4a60={'attempted':![],'cleared':![]};if(_0x4412a3[_0xf56435(0x11a)]>0x0)try{let _0x3e30ad='';for(let _0x2acc44=0x0;_0x2acc44<CACHE_CLEAR_ATTEMPTS;_0x2acc44+=0x1){_0x3e30ad=await clearBffScriptCache(),_0x2acc44<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4f4a60={'attempted':!![],'cleared':!![],'message':_0x3e30ad||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x4ca97c){_0x4f4a60={'attempted':!![],'cleared':![],'error':_0x4ca97c instanceof Error?_0x4ca97c[_0xf56435(0x119)]:String(_0x4ca97c)};}const _0x2e82bb=_0x34be0a[_0xf56435(0x11a)]===0x0&&(_0x4f4a60[_0xf56435(0x11e)]?_0x4f4a60[_0xf56435(0xf4)]:!![]),_0x31e3c5=_0x4f4a60['attempted']?_0x4f4a60['cleared']?_0xf56435(0x12a):_0xf56435(0xea):'runtime\x20cache\x20not\x20needed';return{'ok':_0x2e82bb,'data':{'uploaded':_0x4412a3,'skipped':_0x473566,'failed':_0x34be0a,'cacheClear':_0x4f4a60},'message':_0xf56435(0x107)+_0x4412a3['length']+_0xf56435(0x113)+_0x473566[_0xf56435(0x11a)]+_0xf56435(0x126)+_0x34be0a[_0xf56435(0x11a)]+_0xf56435(0x122)+_0x31e3c5};}};async function getTargetFunctions(_0x3fce26,_0x191487){const _0x7d5ca=a38_0x57b252,_0x148758=_0x191487[_0x7d5ca(0x117)](_0x7d5ca(0xf8)),_0x414f66=_0x191487[_0x7d5ca(0x117)](_0x7d5ca(0x13b)),_0x304542=normalizeBffType(_0x148758)??undefined;if(_0x414f66&&!_0x304542)throw CliErrors[_0x7d5ca(0x12e)](_0x7d5ca(0xf3));const _0x2cc331=await scanLocalBffFunctions(_0x3fce26,_0x304542);if(_0x414f66){const _0x406884=_0x2cc331['filter'](_0x151f48=>_0x151f48[_0x7d5ca(0x13b)]===_0x414f66);if(_0x406884['length']===0x0)throw CliErrors[_0x7d5ca(0x12e)]('Local\x20function\x20not\x20found:\x20'+_0x304542+'/'+_0x414f66);return _0x406884;}return _0x2cc331;}async function buildHookMaps(_0x8fa5f8,_0x288682,_0x8e108,_0x1312c1){const _0x4f5394=a38_0x57b252,_0x20b8d6=_0x8e108['some'](_0x265878=>_0x265878['type']==='HOOK');if(!_0x20b8d6)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x50412e=loadAliasMap(_0x288682,undefined,resolveApiFilePath(_0x288682,_0x8fa5f8)),_0x52b708=new Map(_0x50412e[_0x4f5394(0x11c)](_0x2534d7=>[_0x2534d7[_0x4f5394(0xfa)],_0x2534d7['datasetCode']]));for(const _0x348432 of Object[_0x4f5394(0xef)](_0x1312c1['functions'])){_0x348432[_0x4f5394(0xfa)]&&_0x348432[_0x4f5394(0x127)]&&!_0x52b708[_0x4f5394(0x102)](_0x348432[_0x4f5394(0xfa)])&&_0x52b708[_0x4f5394(0xf5)](_0x348432['alias'],_0x348432[_0x4f5394(0x127)]);}const _0x228b61=await listDatasets(_0x8fa5f8),_0x57d685=new Map(_0x228b61['map'](_0x408881=>[_0x408881[_0x4f5394(0x100)],_0x408881]));return{'aliasToDatasetCode':_0x52b708,'datasetCodeToDataset':_0x57d685};}async function uploadSingleFunction(_0xf6df37,_0x57e9b0,_0x34bc1d,_0x5b641d){const _0x4c77c6=a38_0x57b252,_0x5d01b5=await readFile(_0x57e9b0[_0x4c77c6(0xe7)],'utf8'),_0x237142=await computeFileHash(_0x57e9b0['filePath']),_0x56f25e=_0x34bc1d[_0x4c77c6(0x125)][_0x57e9b0['lockKey']];if(_0x56f25e?.[_0x4c77c6(0xe6)]&&_0x56f25e[_0x4c77c6(0x133)]==null)throw CliErrors[_0x4c77c6(0x12e)](_0x57e9b0[_0x4c77c6(0x103)]+_0x4c77c6(0x111));let _0x29f88c=extractScriptDescription(_0x5d01b5);if(!_0x29f88c&&_0x56f25e?.[_0x4c77c6(0xe6)]){const _0x59b794=await getBffScriptInfo(_0x56f25e[_0x4c77c6(0xe6)]);_0x29f88c=_0x59b794[_0x4c77c6(0x138)]||undefined;}const _0x36c4c8={'appCode':_0xf6df37,'functionName':_0x57e9b0[_0x4c77c6(0x13b)],'scriptType':_0x57e9b0[_0x4c77c6(0xf8)],'scriptContent':_0x5d01b5};if(_0x56f25e?.[_0x4c77c6(0xe6)])_0x36c4c8['id']=_0x56f25e[_0x4c77c6(0xe6)];if(_0x56f25e?.[_0x4c77c6(0x133)]!=null)_0x36c4c8[_0x4c77c6(0x133)]=_0x56f25e['version'];if(_0x29f88c)_0x36c4c8[_0x4c77c6(0x138)]=_0x29f88c;if(_0x57e9b0[_0x4c77c6(0xf8)]==='HOOK'){const _0x42e114=_0x57e9b0[_0x4c77c6(0xfa)];if(!_0x42e114||!_0x57e9b0['operationType']||!_0x57e9b0['functionNode'])throw CliErrors[_0x4c77c6(0x12e)](_0x4c77c6(0xf9)+_0x57e9b0['lockKey']);const _0x30ff2d=_0x5b641d[_0x4c77c6(0xfd)][_0x4c77c6(0x101)](_0x42e114)??_0x56f25e?.[_0x4c77c6(0x127)]??_0x42e114,_0x4046e7=_0x5b641d[_0x4c77c6(0x124)][_0x4c77c6(0x101)](_0x30ff2d);if(!_0x4046e7)throw CliErrors[_0x4c77c6(0x12e)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x42e114+_0x4c77c6(0x121)+(_0x4c77c6(0x11d)+CLI_BIN_NAME+_0x4c77c6(0x109)));_0x36c4c8[_0x4c77c6(0x10a)]=_0x4046e7['id'],_0x36c4c8[_0x4c77c6(0x120)]=_0x57e9b0['operationType'],_0x36c4c8[_0x4c77c6(0x11b)]=_0x57e9b0[_0x4c77c6(0x11b)];}const _0x5159f9=await saveBffScript(_0x36c4c8),_0xb0068d=_0x5159f9['id'],_0x37ce78=_0x5159f9[_0x4c77c6(0x10f)]??await getBffScriptInfo(_0xb0068d),_0x461d9d={'hash':_0x237142,'remoteId':_0xb0068d,'version':_0x37ce78[_0x4c77c6(0x133)]};if(_0x57e9b0[_0x4c77c6(0xf8)]==='HOOK'){const _0x14c6ef=_0x57e9b0[_0x4c77c6(0xfa)],_0x45bbe9=_0x5b641d[_0x4c77c6(0xfd)][_0x4c77c6(0x101)](_0x14c6ef)??_0x56f25e?.[_0x4c77c6(0x127)]??_0x14c6ef;_0x5b641d[_0x4c77c6(0xfd)]['has'](_0x14c6ef)?_0x461d9d['alias']=_0x14c6ef:_0x461d9d[_0x4c77c6(0xfa)]=_0x56f25e?.[_0x4c77c6(0xfa)],_0x461d9d[_0x4c77c6(0x127)]=_0x45bbe9,_0x461d9d[_0x4c77c6(0x120)]=_0x57e9b0['operationType'],_0x461d9d[_0x4c77c6(0x11b)]=_0x57e9b0[_0x4c77c6(0x11b)];}_0x34bc1d[_0x4c77c6(0x125)][_0x57e9b0[_0x4c77c6(0x103)]]=_0x461d9d;}function a38_0x48ec(_0x502df1,_0x274fe5){_0x502df1=_0x502df1-0xe6;const _0x2c1ad9=a38_0x2c1a();let _0x48ec48=_0x2c1ad9[_0x502df1];return _0x48ec48;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x2c7324,_0xfebdc7,_0x4161db){const _0x51a3ee=a38_0x57b252;if(_0x4161db[_0x51a3ee(0x11a)]===0x0)return;for(let _0x46af1b=0x0;_0x46af1b<LOCK_SETTLE_RETRY_COUNT;_0x46af1b+=0x1){const _0x48a0e6=await readBffLockFile(_0x2c7324),_0x5e86a7=_0x48a0e6?.['apps']?.[_0xfebdc7]?.[_0x51a3ee(0x125)]??{},_0x221240=_0x4161db['every'](_0x316232=>!!_0x5e86a7[_0x316232]?.[_0x51a3ee(0xe6)]);if(_0x221240)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x51a3ee(0xeb)+_0x4161db[_0x51a3ee(0x13a)](',\x20')+'.');}
1
+ const a38_0x242470=a38_0x4280;(function(_0x141b2b,_0x3ec7db){const _0x3882c7=a38_0x4280,_0x125ab8=_0x141b2b();while(!![]){try{const _0x1376ce=-parseInt(_0x3882c7(0x12b))/0x1*(-parseInt(_0x3882c7(0x134))/0x2)+parseInt(_0x3882c7(0x110))/0x3*(parseInt(_0x3882c7(0x11e))/0x4)+parseInt(_0x3882c7(0x128))/0x5*(parseInt(_0x3882c7(0x130))/0x6)+parseInt(_0x3882c7(0x13a))/0x7+parseInt(_0x3882c7(0xff))/0x8+-parseInt(_0x3882c7(0x136))/0x9+-parseInt(_0x3882c7(0x11a))/0xa;if(_0x1376ce===_0x3ec7db)break;else _0x125ab8['push'](_0x125ab8['shift']());}catch(_0x1a7212){_0x125ab8['push'](_0x125ab8['shift']());}}}(a38_0x3209,0x7dde0));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_0x4280(_0x2e328f,_0x512539){_0x2e328f=_0x2e328f-0xf3;const _0x3209b3=a38_0x3209();let _0x4280ce=_0x3209b3[_0x2e328f];return _0x4280ce;}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;function a38_0x3209(){const _0x1a21af=['cleared','type','Local\x20function\x20not\x20found:\x20','apps','string','functionNode','would_push','set','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','26642500CawRLR','\x22.\x20','str','datasetCode','4cPLsGN','runtime\x20cache\x20clear\x20failed','update','runtime\x20cache\x20cleared','/api/management/library/scripts/save','push','has','alias','functions','lastSync','25RWELFN','version','\x20skipped,\x20','25WMJUzW','\x20failed,\x20','Incomplete\x20HOOK\x20path:\x20','bool','Runtime\x20script\x20cache\x20cleared.','770082qTuEeD','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','force','COMMON','72134YZtmvK','apiDir','1510515Bfnltj','POST','parse','get','3520363hubXgv','Would\x20inspect\x20','lockFilePath','length','appCode','unchanged','filePath','\x22\x20not\x20found\x20after\x20ensureLockScope.','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','description','boolean','high-risk-write','create','bff','every','runtime\x20cache\x20not\x20needed','No\x20local\x20BFF\x20functions\x20found.','operationType','remoteId','validation','Push\x20complete:\x20','HOOK','4814088rvBUWW','message','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','datasetId','map','attempted','aliasToDatasetCode','scriptsRoot','lockKey',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','datasetCodeToDataset','some','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','values','\x20uploaded,\x20','Push\x20local\x20BFF\x20scripts\x20to\x20remote','name','2098671gADtZn'];a38_0x3209=function(){return _0x1a21af;};return a38_0x3209();}export const bffPush={'service':a38_0x242470(0xf6),'command':a38_0x242470(0x123),'description':a38_0x242470(0x10e),'risk':a38_0x242470(0xf4),'flags':[{'name':a38_0x242470(0x112),'type':a38_0x242470(0x115),'description':'Push\x20only\x20this\x20script\x20type','enum':[a38_0x242470(0x133),'ENDPOINT',a38_0x242470(0xfe)]},{'name':a38_0x242470(0x10f),'type':'string','description':a38_0x242470(0x10b)},{'name':'force','type':a38_0x242470(0xf3),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x218757){const _0x3a7f74=a38_0x242470,_0x288943=loadBffProjectConfig(_0x218757[_0x3a7f74(0x13e)]),_0x4a5dd8=await readBffLockFile(_0x288943['lockFilePath']),{appLock:_0x1bff64}=ensureLockScope(_0x4a5dd8??createEmptyBffLock(),_0x218757['appCode'],_0x288943[_0x3a7f74(0x106)],'push'),_0x101586=await getTargetFunctions(_0x288943,_0x218757),_0x105886=_0x218757[_0x3a7f74(0x12e)]('force'),_0xbad205=[];for(const _0x164c07 of _0x101586){const _0x3e1806=await computeFileHash(_0x164c07[_0x3a7f74(0x140)]),_0x46d8cb=_0x1bff64[_0x3a7f74(0x126)][_0x164c07['lockKey']],_0x45b327=!!_0x46d8cb&&_0x46d8cb['hash']===_0x3e1806;_0xbad205['push']({'lockKey':_0x164c07[_0x3a7f74(0x107)],'filePath':_0x164c07[_0x3a7f74(0x140)],'remoteId':_0x46d8cb?.[_0x3a7f74(0xfb)]??null,'mode':_0x46d8cb?.[_0x3a7f74(0xfb)]?_0x3a7f74(0x120):_0x3a7f74(0xf5),'status':!_0x105886&&_0x45b327?_0x3a7f74(0x13f):_0x3a7f74(0x117)});}return{'method':_0x3a7f74(0x137),'url':_0x3a7f74(0x122),'body':{'appCode':_0x218757['appCode'],'force':_0x105886,'files':_0xbad205,'cacheClearAtRuntime':_0xbad205[_0x3a7f74(0x10a)](_0x316f71=>_0x316f71['status']===_0x3a7f74(0x117)),'cacheClearAtRuntimeTimes':_0xbad205[_0x3a7f74(0x10a)](_0x3b6c79=>_0x3b6c79['status']==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3a7f74(0x13b)+_0xbad205[_0x3a7f74(0x13d)]+_0x3a7f74(0x101)};},async 'execute'(_0x3eb809){const _0x3fe588=a38_0x242470,_0x421b3d=loadBffProjectConfig(_0x3eb809[_0x3fe588(0x13e)]),_0x4ea397=await readBffLockFile(_0x421b3d[_0x3fe588(0x13c)]),{lockData:_0x54cdce,appLock:_0x25c6a1}=ensureLockScope(_0x4ea397??createEmptyBffLock(),_0x3eb809[_0x3fe588(0x13e)],_0x421b3d['scriptsRoot'],_0x3fe588(0x123)),_0x44081f=await getTargetFunctions(_0x421b3d,_0x3eb809);if(_0x44081f[_0x3fe588(0x13d)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x3fe588(0xf9)};const _0x41d2f4=_0x3eb809['bool'](_0x3fe588(0x132)),_0x1951b0=JSON[_0x3fe588(0x138)](JSON['stringify'](_0x54cdce)),_0x2b3a96=_0x1951b0[_0x3fe588(0x114)][_0x3eb809['appCode']];if(!_0x2b3a96)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x3eb809['appCode']+_0x3fe588(0x141));const _0x18ee2a=await buildHookMaps(_0x3eb809['appCode'],_0x3eb809[_0x3fe588(0x135)],_0x44081f,_0x2b3a96),_0x23ea7f=[],_0x291cd7=[],_0x24cce1=[];for(const _0x12d874 of _0x44081f){const _0xb981e7=await computeFileHash(_0x12d874['filePath']),_0x154351=_0x2b3a96[_0x3fe588(0x126)][_0x12d874[_0x3fe588(0x107)]];if(!_0x41d2f4&&_0x154351&&_0x154351['hash']===_0xb981e7){_0x291cd7[_0x3fe588(0x123)]({'lockKey':_0x12d874['lockKey'],'reason':_0x3fe588(0x13f)});continue;}try{await uploadSingleFunction(_0x3eb809[_0x3fe588(0x13e)],_0x12d874,_0x2b3a96,_0x18ee2a);const _0x21a3fa=_0x2b3a96['functions'][_0x12d874[_0x3fe588(0x107)]];_0x23ea7f['push']({'lockKey':_0x12d874[_0x3fe588(0x107)],'remoteId':_0x21a3fa?.[_0x3fe588(0xfb)]??0x0});}catch(_0x5f57c9){_0x24cce1['push']({'lockKey':_0x12d874[_0x3fe588(0x107)],'error':_0x5f57c9 instanceof Error?_0x5f57c9[_0x3fe588(0x100)]:String(_0x5f57c9)});}}_0x2b3a96[_0x3fe588(0x127)]=new Date()['toISOString'](),await writeBffLockFile(_0x421b3d[_0x3fe588(0x13c)],_0x1951b0),await waitForUploadedLockEntries(_0x421b3d[_0x3fe588(0x13c)],_0x3eb809[_0x3fe588(0x13e)],_0x23ea7f[_0x3fe588(0x103)](_0x1e55aa=>_0x1e55aa[_0x3fe588(0x107)]));let _0x6740c2={'attempted':![],'cleared':![]};if(_0x23ea7f[_0x3fe588(0x13d)]>0x0)try{let _0x2714dc='';for(let _0x137123=0x0;_0x137123<CACHE_CLEAR_ATTEMPTS;_0x137123+=0x1){_0x2714dc=await clearBffScriptCache(),_0x137123<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x6740c2={'attempted':!![],'cleared':!![],'message':_0x2714dc||_0x3fe588(0x12f)};}catch(_0x3c9fd6){_0x6740c2={'attempted':!![],'cleared':![],'error':_0x3c9fd6 instanceof Error?_0x3c9fd6['message']:String(_0x3c9fd6)};}const _0x15cb50=_0x24cce1[_0x3fe588(0x13d)]===0x0&&(_0x6740c2[_0x3fe588(0x104)]?_0x6740c2[_0x3fe588(0x111)]:!![]),_0x830ff1=_0x6740c2['attempted']?_0x6740c2[_0x3fe588(0x111)]?_0x3fe588(0x121):_0x3fe588(0x11f):_0x3fe588(0xf8);return{'ok':_0x15cb50,'data':{'uploaded':_0x23ea7f,'skipped':_0x291cd7,'failed':_0x24cce1,'cacheClear':_0x6740c2},'message':_0x3fe588(0xfd)+_0x23ea7f[_0x3fe588(0x13d)]+_0x3fe588(0x10d)+_0x291cd7[_0x3fe588(0x13d)]+_0x3fe588(0x12a)+_0x24cce1[_0x3fe588(0x13d)]+_0x3fe588(0x12c)+_0x830ff1};}};async function getTargetFunctions(_0x40562b,_0x321b58){const _0x5e1411=a38_0x242470,_0x44ceee=_0x321b58[_0x5e1411(0x11c)]('type'),_0x93f8d=_0x321b58[_0x5e1411(0x11c)](_0x5e1411(0x10f)),_0x50975c=normalizeBffType(_0x44ceee)??undefined;if(_0x93f8d&&!_0x50975c)throw CliErrors['validation'](_0x5e1411(0x142));const _0x36d5eb=await scanLocalBffFunctions(_0x40562b,_0x50975c);if(_0x93f8d){const _0xd64238=_0x36d5eb['filter'](_0x48ef9c=>_0x48ef9c[_0x5e1411(0x10f)]===_0x93f8d);if(_0xd64238['length']===0x0)throw CliErrors[_0x5e1411(0xfc)](_0x5e1411(0x113)+_0x50975c+'/'+_0x93f8d);return _0xd64238;}return _0x36d5eb;}async function buildHookMaps(_0x5ef5ce,_0x5a16d7,_0x4935f3,_0x2debdb){const _0xd89c36=a38_0x242470,_0x109556=_0x4935f3['some'](_0x5a29af=>_0x5a29af[_0xd89c36(0x112)]===_0xd89c36(0xfe));if(!_0x109556)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x493604=loadAliasMap(_0x5a16d7,undefined,resolveApiFilePath(_0x5a16d7,_0x5ef5ce)),_0xa16b2=new Map(_0x493604[_0xd89c36(0x103)](_0x40b703=>[_0x40b703[_0xd89c36(0x125)],_0x40b703[_0xd89c36(0x11d)]]));for(const _0xcf607f of Object[_0xd89c36(0x10c)](_0x2debdb[_0xd89c36(0x126)])){_0xcf607f[_0xd89c36(0x125)]&&_0xcf607f[_0xd89c36(0x11d)]&&!_0xa16b2[_0xd89c36(0x124)](_0xcf607f[_0xd89c36(0x125)])&&_0xa16b2[_0xd89c36(0x118)](_0xcf607f[_0xd89c36(0x125)],_0xcf607f[_0xd89c36(0x11d)]);}const _0x1e10f0=await listDatasets(_0x5ef5ce),_0x30265b=new Map(_0x1e10f0[_0xd89c36(0x103)](_0x520811=>[_0x520811['code'],_0x520811]));return{'aliasToDatasetCode':_0xa16b2,'datasetCodeToDataset':_0x30265b};}async function uploadSingleFunction(_0x5eaaab,_0x4bb013,_0x3a21b6,_0x4603b5){const _0x44b505=a38_0x242470,_0x10bb12=await readFile(_0x4bb013[_0x44b505(0x140)],'utf8'),_0xb6df5e=await computeFileHash(_0x4bb013['filePath']),_0x2e28c8=_0x3a21b6[_0x44b505(0x126)][_0x4bb013[_0x44b505(0x107)]];if(_0x2e28c8?.[_0x44b505(0xfb)]&&_0x2e28c8['version']==null)throw CliErrors[_0x44b505(0xfc)](_0x4bb013['lockKey']+_0x44b505(0x108));let _0xd105c1=extractScriptDescription(_0x10bb12);if(!_0xd105c1&&_0x2e28c8?.['remoteId']){const _0x2e17e3=await getBffScriptInfo(_0x2e28c8[_0x44b505(0xfb)]);_0xd105c1=_0x2e17e3[_0x44b505(0x143)]||undefined;}const _0x105ef6={'appCode':_0x5eaaab,'functionName':_0x4bb013[_0x44b505(0x10f)],'scriptType':_0x4bb013[_0x44b505(0x112)],'scriptContent':_0x10bb12};if(_0x2e28c8?.['remoteId'])_0x105ef6['id']=_0x2e28c8[_0x44b505(0xfb)];if(_0x2e28c8?.[_0x44b505(0x129)]!=null)_0x105ef6[_0x44b505(0x129)]=_0x2e28c8[_0x44b505(0x129)];if(_0xd105c1)_0x105ef6[_0x44b505(0x143)]=_0xd105c1;if(_0x4bb013[_0x44b505(0x112)]===_0x44b505(0xfe)){const _0x4f67fb=_0x4bb013['alias'];if(!_0x4f67fb||!_0x4bb013['operationType']||!_0x4bb013[_0x44b505(0x116)])throw CliErrors[_0x44b505(0xfc)](_0x44b505(0x12d)+_0x4bb013['lockKey']);const _0x43e15a=_0x4603b5[_0x44b505(0x105)][_0x44b505(0x139)](_0x4f67fb)??_0x2e28c8?.['datasetCode']??_0x4f67fb,_0x2915c5=_0x4603b5[_0x44b505(0x109)][_0x44b505(0x139)](_0x43e15a);if(!_0x2915c5)throw CliErrors['validation']('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x4f67fb+_0x44b505(0x11b)+('Run\x20`'+CLI_BIN_NAME+_0x44b505(0x131)));_0x105ef6[_0x44b505(0x102)]=_0x2915c5['id'],_0x105ef6[_0x44b505(0xfa)]=_0x4bb013['operationType'],_0x105ef6['functionNode']=_0x4bb013['functionNode'];}const _0xdc31fd=await saveBffScript(_0x105ef6),_0x1eb1b4=_0xdc31fd['id'],_0x33f619=_0xdc31fd['script']??await getBffScriptInfo(_0x1eb1b4),_0x19880a={'hash':_0xb6df5e,'remoteId':_0x1eb1b4,'version':_0x33f619[_0x44b505(0x129)]};if(_0x4bb013[_0x44b505(0x112)]===_0x44b505(0xfe)){const _0x24e0d5=_0x4bb013[_0x44b505(0x125)],_0x3f113f=_0x4603b5[_0x44b505(0x105)][_0x44b505(0x139)](_0x24e0d5)??_0x2e28c8?.[_0x44b505(0x11d)]??_0x24e0d5;_0x4603b5['aliasToDatasetCode']['has'](_0x24e0d5)?_0x19880a[_0x44b505(0x125)]=_0x24e0d5:_0x19880a[_0x44b505(0x125)]=_0x2e28c8?.['alias'],_0x19880a[_0x44b505(0x11d)]=_0x3f113f,_0x19880a[_0x44b505(0xfa)]=_0x4bb013[_0x44b505(0xfa)],_0x19880a[_0x44b505(0x116)]=_0x4bb013[_0x44b505(0x116)];}_0x3a21b6[_0x44b505(0x126)][_0x4bb013[_0x44b505(0x107)]]=_0x19880a;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1fb1ad,_0x3f8775,_0x3c0c30){const _0x2e089e=a38_0x242470;if(_0x3c0c30[_0x2e089e(0x13d)]===0x0)return;for(let _0x378c44=0x0;_0x378c44<LOCK_SETTLE_RETRY_COUNT;_0x378c44+=0x1){const _0x388ee0=await readBffLockFile(_0x1fb1ad),_0x477353=_0x388ee0?.[_0x2e089e(0x114)]?.[_0x3f8775]?.[_0x2e089e(0x126)]??{},_0x3abf01=_0x3c0c30[_0x2e089e(0xf7)](_0x77083e=>!!_0x477353[_0x77083e]?.[_0x2e089e(0xfb)]);if(_0x3abf01)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2e089e(0x119)+_0x3c0c30['join'](',\x20')+'.');}
@@ -1 +1 @@
1
- const a39_0x31990a=a39_0x1e7b;(function(_0x24d031,_0x4e74d7){const _0x2a4106=a39_0x1e7b,_0x12dc11=_0x24d031();while(!![]){try{const _0x505d18=-parseInt(_0x2a4106(0x1e1))/0x1+-parseInt(_0x2a4106(0x1e4))/0x2*(-parseInt(_0x2a4106(0x1e3))/0x3)+-parseInt(_0x2a4106(0x1d4))/0x4*(parseInt(_0x2a4106(0x1ec))/0x5)+parseInt(_0x2a4106(0x1e2))/0x6+-parseInt(_0x2a4106(0x1d6))/0x7*(parseInt(_0x2a4106(0x1e6))/0x8)+parseInt(_0x2a4106(0x1ed))/0x9+parseInt(_0x2a4106(0x1eb))/0xa*(parseInt(_0x2a4106(0x1d7))/0xb);if(_0x505d18===_0x4e74d7)break;else _0x12dc11['push'](_0x12dc11['shift']());}catch(_0xb5d52){_0x12dc11['push'](_0x12dc11['shift']());}}}(a39_0x2391,0xcd1fa));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a39_0x1e7b(_0x57fdae,_0x261b36){_0x57fdae=_0x57fdae-0x1d2;const _0x2391bd=a39_0x2391();let _0x1e7b93=_0x2391bd[_0x57fdae];return _0x1e7b93;}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';function a39_0x2391(){const _0x5c1e61=['map','21534060rLFJVz','160svKlJH','662166vpuNkt','\x20unchanged','has','alias','filePath','functions','\x20modified,\x20','lockKey','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','push','125012ecbKvN','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','7VhncoI','11EAJyiO','datasetCode','hash','\x20added,\x20','length','status','lockFilePath','All\x20BFF\x20scripts\x20are\x20in\x20sync.','\x20remote-only','remote','1421770PfzUAl','1343286fmgjnp','75gwQjwc','76730LxzoGc','apiDir','1183472uCCsal','scriptsRoot','appCode','all'];a39_0x2391=function(){return _0x5c1e61;};return a39_0x2391();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':'status','description':a39_0x31990a(0x1d2),'risk':'read','flags':[{'name':'remote','type':'boolean','description':a39_0x31990a(0x1d5)}],async 'execute'(_0x532496){const _0xd9a573=a39_0x31990a,_0x4c211b=loadBffProjectConfig(_0x532496[_0xd9a573(0x1e8)]),_0x4da211=await readBffLockFile(_0x4c211b[_0xd9a573(0x1dd)]),{appLock:_0x4bd3cc}=ensureLockScope(_0x4da211??createEmptyBffLock(),_0x532496[_0xd9a573(0x1e8)],_0x4c211b[_0xd9a573(0x1e7)],_0xd9a573(0x1dc)),_0x3b3c86=await scanLocalBffFunctions(_0x4c211b),_0x2aa530=[],_0x580379=[],_0x56939f=[];for(const _0x14a16a of _0x3b3c86){const _0x34c067=await computeFileHash(_0x14a16a[_0xd9a573(0x1f1)]),_0x44b6b8=_0x4bd3cc[_0xd9a573(0x1f2)][_0x14a16a[_0xd9a573(0x1f4)]];if(!_0x44b6b8)_0x2aa530[_0xd9a573(0x1d3)](_0x14a16a[_0xd9a573(0x1f4)]);else _0x44b6b8[_0xd9a573(0x1d9)]!==_0x34c067?_0x580379[_0xd9a573(0x1d3)](_0x14a16a[_0xd9a573(0x1f4)]):_0x56939f[_0xd9a573(0x1d3)](_0x14a16a[_0xd9a573(0x1f4)]);}const _0x5a0982=[];if(_0x532496['bool'](_0xd9a573(0x1e0))){const _0x78d58=loadAliasMap(_0x532496[_0xd9a573(0x1e5)],undefined,resolveApiFilePath(_0x532496['apiDir'],_0x532496[_0xd9a573(0x1e8)])),_0x9313b0=new Map(_0x78d58[_0xd9a573(0x1ea)](_0x298c07=>[_0x298c07[_0xd9a573(0x1d8)],_0x298c07[_0xd9a573(0x1f0)]])),[_0x6d5537,_0x4a35c7]=await Promise[_0xd9a573(0x1e9)]([listBffScripts(_0x532496[_0xd9a573(0x1e8)]),getBffScriptStatistics(_0x532496['appCode'])]),_0x279ba2=createHookLocationMap(_0x4a35c7),_0xba268f=new Set(_0x3b3c86[_0xd9a573(0x1ea)](_0x49758b=>_0x49758b[_0xd9a573(0x1f4)]));for(const _0x5388f1 of _0x6d5537){const _0x2ad0c3=resolveRemoteScriptTarget(_0x4c211b,_0x5388f1,_0x279ba2,_0x4bd3cc['functions'],_0x9313b0);_0x2ad0c3&&!_0xba268f[_0xd9a573(0x1ef)](_0x2ad0c3[_0xd9a573(0x1f4)])&&_0x5a0982[_0xd9a573(0x1d3)](_0x2ad0c3[_0xd9a573(0x1f4)]);}}const _0x18e830=_0x2aa530[_0xd9a573(0x1db)]===0x0&&_0x580379[_0xd9a573(0x1db)]===0x0&&_0x5a0982[_0xd9a573(0x1db)]===0x0;return{'ok':!![],'data':{'added':_0x2aa530,'modified':_0x580379,'unchanged':_0x56939f,'remoteOnly':_0x5a0982},'message':_0x18e830?_0xd9a573(0x1de):_0x2aa530['length']+_0xd9a573(0x1da)+_0x580379[_0xd9a573(0x1db)]+_0xd9a573(0x1f3)+_0x56939f['length']+_0xd9a573(0x1ee)+(_0x5a0982[_0xd9a573(0x1db)]>0x0?',\x20'+_0x5a0982['length']+_0xd9a573(0x1df):'')};}};
1
+ const a39_0xecc36e=a39_0x3d5e;(function(_0x383392,_0x184658){const _0x36cb76=a39_0x3d5e,_0x21a329=_0x383392();while(!![]){try{const _0x4d1137=-parseInt(_0x36cb76(0xc5))/0x1+parseInt(_0x36cb76(0xda))/0x2+-parseInt(_0x36cb76(0xc2))/0x3*(parseInt(_0x36cb76(0xc6))/0x4)+-parseInt(_0x36cb76(0xd3))/0x5*(parseInt(_0x36cb76(0xc3))/0x6)+parseInt(_0x36cb76(0xcb))/0x7+-parseInt(_0x36cb76(0xc7))/0x8+parseInt(_0x36cb76(0xcf))/0x9*(parseInt(_0x36cb76(0xcc))/0xa);if(_0x4d1137===_0x184658)break;else _0x21a329['push'](_0x21a329['shift']());}catch(_0x42bde5){_0x21a329['push'](_0x21a329['shift']());}}}(a39_0x500e,0x25272));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_0x500e(){const _0x33794a=['bff','\x20added,\x20','alias','push','all','86457rNhDzz','65454FOLceO','scriptsRoot','278793mkktza','36cPAUvF','1292632jKYcAW','lockKey','status','apiDir','1057987YUEfUt','20OQBgOh','boolean','All\x20BFF\x20scripts\x20are\x20in\x20sync.','3061098NxmvpF','length','\x20modified,\x20','read','125WpsulL','map','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','filePath','datasetCode','hash','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','586522BWvmmr','appCode','remote','\x20remote-only'];a39_0x500e=function(){return _0x33794a;};return a39_0x500e();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a39_0x3d5e(_0x5c960e,_0x4a7652){_0x5c960e=_0x5c960e-0xbc;const _0x500e76=a39_0x500e();let _0x3d5e6b=_0x500e76[_0x5c960e];return _0x3d5e6b;}export const bffStatus={'service':a39_0xecc36e(0xbd),'command':a39_0xecc36e(0xc9),'description':a39_0xecc36e(0xd5),'risk':a39_0xecc36e(0xd2),'flags':[{'name':a39_0xecc36e(0xdc),'type':a39_0xecc36e(0xcd),'description':a39_0xecc36e(0xd9)}],async 'execute'(_0x46d2f8){const _0x21e669=a39_0xecc36e,_0x14a692=loadBffProjectConfig(_0x46d2f8[_0x21e669(0xdb)]),_0x599400=await readBffLockFile(_0x14a692['lockFilePath']),{appLock:_0x4c468f}=ensureLockScope(_0x599400??createEmptyBffLock(),_0x46d2f8['appCode'],_0x14a692[_0x21e669(0xc4)],_0x21e669(0xc9)),_0x50758e=await scanLocalBffFunctions(_0x14a692),_0x111253=[],_0x6832e=[],_0x13a856=[];for(const _0xc605eb of _0x50758e){const _0x4089b9=await computeFileHash(_0xc605eb[_0x21e669(0xd6)]),_0x4244e7=_0x4c468f['functions'][_0xc605eb['lockKey']];if(!_0x4244e7)_0x111253[_0x21e669(0xc0)](_0xc605eb['lockKey']);else _0x4244e7[_0x21e669(0xd8)]!==_0x4089b9?_0x6832e[_0x21e669(0xc0)](_0xc605eb['lockKey']):_0x13a856[_0x21e669(0xc0)](_0xc605eb[_0x21e669(0xc8)]);}const _0x5d2ae9=[];if(_0x46d2f8['bool'](_0x21e669(0xdc))){const _0x320e55=loadAliasMap(_0x46d2f8[_0x21e669(0xca)],undefined,resolveApiFilePath(_0x46d2f8[_0x21e669(0xca)],_0x46d2f8[_0x21e669(0xdb)])),_0x4e0552=new Map(_0x320e55[_0x21e669(0xd4)](_0x4ea746=>[_0x4ea746[_0x21e669(0xd7)],_0x4ea746[_0x21e669(0xbf)]])),[_0x2537e8,_0x397ddc]=await Promise[_0x21e669(0xc1)]([listBffScripts(_0x46d2f8[_0x21e669(0xdb)]),getBffScriptStatistics(_0x46d2f8['appCode'])]),_0x4bfcab=createHookLocationMap(_0x397ddc),_0x2b7926=new Set(_0x50758e[_0x21e669(0xd4)](_0x4d225c=>_0x4d225c[_0x21e669(0xc8)]));for(const _0xc88f8c of _0x2537e8){const _0x29aa01=resolveRemoteScriptTarget(_0x14a692,_0xc88f8c,_0x4bfcab,_0x4c468f['functions'],_0x4e0552);_0x29aa01&&!_0x2b7926['has'](_0x29aa01['lockKey'])&&_0x5d2ae9[_0x21e669(0xc0)](_0x29aa01[_0x21e669(0xc8)]);}}const _0x78b415=_0x111253['length']===0x0&&_0x6832e[_0x21e669(0xd0)]===0x0&&_0x5d2ae9[_0x21e669(0xd0)]===0x0;return{'ok':!![],'data':{'added':_0x111253,'modified':_0x6832e,'unchanged':_0x13a856,'remoteOnly':_0x5d2ae9},'message':_0x78b415?_0x21e669(0xce):_0x111253['length']+_0x21e669(0xbe)+_0x6832e[_0x21e669(0xd0)]+_0x21e669(0xd1)+_0x13a856[_0x21e669(0xd0)]+'\x20unchanged'+(_0x5d2ae9['length']>0x0?',\x20'+_0x5d2ae9['length']+_0x21e669(0xbc):'')};}};
@@ -1 +1 @@
1
- const a40_0x379975=a40_0x5646;function a40_0x5646(_0x3bfbfd,_0x5bfa4d){_0x3bfbfd=_0x3bfbfd-0x114;const _0x2fbd67=a40_0x2fbd();let _0x5646a8=_0x2fbd67[_0x3bfbfd];return _0x5646a8;}function a40_0x2fbd(){const _0xa7400=['128917kENXjO','apiError','709744VAdvip','8sWGhEb',')...','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','1338318IpVIZi','CLI\x20Built-in\x20Skill\x20installed','inherit','pipe','log','npx\x20skills\x20add\x20failed:\x20','nonInteractive','401864EsQxxn','9dixsYl','install','info','2wgRSsC','error','write','cwd','6494900YOadaL','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','setLogPath','cli-skill-install','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','82161mivzlr','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','1001590yChEkD'];a40_0x2fbd=function(){return _0xa7400;};return a40_0x2fbd();}(function(_0x16018e,_0x3a97e0){const _0x3fd700=a40_0x5646,_0x452200=_0x16018e();while(!![]){try{const _0x4d1cf5=-parseInt(_0x3fd700(0x118))/0x1*(-parseInt(_0x3fd700(0x129))/0x2)+parseInt(_0x3fd700(0x115))/0x3+parseInt(_0x3fd700(0x125))/0x4+parseInt(_0x3fd700(0x117))/0x5+parseInt(_0x3fd700(0x11e))/0x6+parseInt(_0x3fd700(0x11a))/0x7*(parseInt(_0x3fd700(0x11b))/0x8)+parseInt(_0x3fd700(0x126))/0x9*(-parseInt(_0x3fd700(0x12d))/0xa);if(_0x4d1cf5===_0x3a97e0)break;else _0x452200['push'](_0x452200['shift']());}catch(_0x1a4a5c){_0x452200['push'](_0x452200['shift']());}}}(a40_0x2fbd,0x203cb));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a40_0x379975(0x127),'description':a40_0x379975(0x116),'risk':a40_0x379975(0x12b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x57dfdb){const _0x3ebe31=a40_0x379975;logger[_0x3ebe31(0x12f)](process[_0x3ebe31(0x12c)]()),logger[_0x3ebe31(0x128)](_0x3ebe31(0x130),_0x3ebe31(0x11d));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x21017f,RABETBASE_SKILL_SOURCE:_0x2ab00e,runNpxSkillsAddGlobal:_0x3d89bb}=await import('../../skills/npx-skills-add.js'),_0x41885e=_0x57dfdb[_0x3ebe31(0x124)]?_0x3ebe31(0x121):_0x3ebe31(0x120);console[_0x3ebe31(0x122)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('+_0x21017f+_0x3ebe31(0x11c));const _0x4f4ebe=_0x3d89bb(process[_0x3ebe31(0x12c)](),_0x2ab00e,{'stdio':_0x41885e});if(_0x4f4ebe['skipped'])console[_0x3ebe31(0x122)](_0x3ebe31(0x114));else{if(_0x4f4ebe['ok'])console[_0x3ebe31(0x122)](_0x3ebe31(0x11f));else throw CliErrors[_0x3ebe31(0x119)](_0x3ebe31(0x123)+(_0x4f4ebe[_0x3ebe31(0x12a)]||'unknown'),_0x3ebe31(0x12e)+_0x21017f);}return{'ok':!![]};}}];
1
+ const a40_0x145912=a40_0x2b92;(function(_0x3d7145,_0x18c411){const _0x296fdd=a40_0x2b92,_0x3cd682=_0x3d7145();while(!![]){try{const _0x28ea26=parseInt(_0x296fdd(0x1f5))/0x1*(-parseInt(_0x296fdd(0x20c))/0x2)+parseInt(_0x296fdd(0x207))/0x3+parseInt(_0x296fdd(0x1fd))/0x4+parseInt(_0x296fdd(0x20b))/0x5*(-parseInt(_0x296fdd(0x1f8))/0x6)+parseInt(_0x296fdd(0x1fe))/0x7*(parseInt(_0x296fdd(0x1f3))/0x8)+-parseInt(_0x296fdd(0x200))/0x9+parseInt(_0x296fdd(0x205))/0xa;if(_0x28ea26===_0x18c411)break;else _0x3cd682['push'](_0x3cd682['shift']());}catch(_0x4a7847){_0x3cd682['push'](_0x3cd682['shift']());}}}(a40_0x3b23,0xab835));function a40_0x2b92(_0x4f262a,_0x44afec){_0x4f262a=_0x4f262a-0x1f3;const _0x3b23ad=a40_0x3b23();let _0x2b9208=_0x3b23ad[_0x4f262a];return _0x2b9208;}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a40_0x3b23(){const _0x5ddfa7=['10701660HemzOc','pipe','148305ziQSMv','setLogPath','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','435935hLVZSW','551308sQuLCe','cwd','cli-skill-install','11472cWrKLd','info','1tXBPOc','log','../../skills/npx-skills-add.js','30cXvWbo','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','error','inherit','npx\x20skills\x20add\x20failed:\x20','896188QLCSGI','2422zrinfa','nonInteractive','3831354wHXYug','install','skipped','cli-skill','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill'];a40_0x3b23=function(){return _0x5ddfa7;};return a40_0x3b23();}export const cliSkillDefinitions=[{'service':a40_0x145912(0x203),'command':a40_0x145912(0x201),'description':a40_0x145912(0x204),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4c1dbd){const _0x184af3=a40_0x145912;logger[_0x184af3(0x208)](process['cwd']()),logger[_0x184af3(0x1f4)](_0x184af3(0x20e),_0x184af3(0x20a));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x413564,RABETBASE_SKILL_SOURCE:_0x106e15,runNpxSkillsAddGlobal:_0x28ede8}=await import(_0x184af3(0x1f7)),_0x44b45d=_0x4c1dbd[_0x184af3(0x1ff)]?_0x184af3(0x206):_0x184af3(0x1fb);console[_0x184af3(0x1f6)](_0x184af3(0x209)+_0x413564+')...');const _0x2aec80=_0x28ede8(process[_0x184af3(0x20d)](),_0x106e15,{'stdio':_0x44b45d});if(_0x2aec80[_0x184af3(0x202)])console[_0x184af3(0x1f6)](_0x184af3(0x1f9));else{if(_0x2aec80['ok'])console['log']('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors['apiError'](_0x184af3(0x1fc)+(_0x2aec80[_0x184af3(0x1fa)]||'unknown'),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x413564);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a41_0xc4b0e4=a41_0x5dc5;(function(_0x337f77,_0x55c39e){const _0x54eec6=a41_0x5dc5,_0x1fe716=_0x337f77();while(!![]){try{const _0x1ac2e9=parseInt(_0x54eec6(0x9e))/0x1+parseInt(_0x54eec6(0x90))/0x2*(parseInt(_0x54eec6(0xb8))/0x3)+-parseInt(_0x54eec6(0xa1))/0x4+-parseInt(_0x54eec6(0xca))/0x5+parseInt(_0x54eec6(0xa6))/0x6+parseInt(_0x54eec6(0xbe))/0x7*(-parseInt(_0x54eec6(0xc9))/0x8)+parseInt(_0x54eec6(0xbd))/0x9*(-parseInt(_0x54eec6(0xce))/0xa);if(_0x1ac2e9===_0x55c39e)break;else _0x1fe716['push'](_0x1fe716['shift']());}catch(_0x29913e){_0x1fe716['push'](_0x1fe716['shift']());}}}(a41_0x171e,0x9c0e6));import a41_0xac1cad from'chalk';import a41_0x4d93cf from'ora';import a41_0x5885d6 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x197a66=a41_0x5dc5;return GIT_COMMIT!==_0x197a66(0x97)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x197a66(0x99)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2e8dd0=a41_0x5dc5,_0x23aaa9=process[_0x2e8dd0(0x91)][_0x2e8dd0(0x8b)]();if(_0x23aaa9[_0x2e8dd0(0xb3)]('bun'))return _0x2e8dd0(0xa0);return _0x2e8dd0(0xab);}const updateFlags=[{'name':a41_0xc4b0e4(0xa2),'type':a41_0xc4b0e4(0x94),'description':a41_0xc4b0e4(0x9c),'default':![]},{'name':a41_0xc4b0e4(0x89),'type':a41_0xc4b0e4(0xb1),'description':a41_0xc4b0e4(0xcc)},{'name':'no-skills','type':'boolean','description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a41_0xc4b0e4(0xc4),'type':a41_0xc4b0e4(0x94),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x2fec2c){const _0x5d83ac=a41_0xc4b0e4;return _0x2fec2c[_0x5d83ac(0xc8)](_0x5d83ac(0x89))[_0x5d83ac(0xac)]();}function a41_0x5dc5(_0x94458f,_0x6f9465){_0x94458f=_0x94458f-0x7f;const _0x171efc=a41_0x171e();let _0x5dc503=_0x171efc[_0x94458f];return _0x5dc503;}function a41_0x171e(){const _0x5b6634=['error','npm','trim','log','validation','Already\x20on\x20requested\x20version\x20(v','start','string','inherit','includes','nonInteractive','\x20install\x20-g\x20','map','no-skills','3ICsTYT','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','update','Update\x20available:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','9tQpNHb','804902Oltzus','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','\x20\x20Try\x20manually:\x20','\x20→\x20','pipe','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','skills','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','https://registry.npmjs.org/-/package/','length','str','8XEKsbO','3175750qjKbin','gray','Install\x20a\x20specific\x20CLI\x20version','Updated\x20to\x20v','4395570sqJnkC','install','Update\x20failed','latest','skipped','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','@latest','Already\x20up\x20to\x20date\x20(v','run','green','yellow','Invalid\x20version:\x20','version','valid','toLowerCase','message','Beta\x20version:\x20','Current\x20version:\x20','Checking\x20CLI\x20Built-in\x20Skill...','1006506JSPLQZ','execPath','cwd','json','boolean','Version\x20comparison\x20failed','Requested\x20version:\x20','unknown','fail','slice','bool','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','926384ATsHEe','succeed','bun','893740DpEBbx','beta','filter','warn','red','3736182nZjqPz','Checking\x20for\x20updates...','object','source'];a41_0x171e=function(){return _0x5b6634;};return a41_0x171e();}function shouldSkipCliSkill(_0x348f26){const _0x6b04d8=a41_0xc4b0e4;return _0x348f26[_0x6b04d8(0x9a)](_0x6b04d8(0xb7))||_0x348f26['flag']('skills')===![];}async function validateUpdateFlags(_0x463022){const _0x2a24b0=a41_0xc4b0e4,_0x38da3f=_0x463022['bool']('beta'),_0x4fb139=getRequestedVersion(_0x463022);if(_0x38da3f&&_0x4fb139)throw CliErrors[_0x2a24b0(0xae)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x2a24b0(0xc5));if(_0x4fb139&&!a41_0x5885d6[_0x2a24b0(0x8a)](_0x4fb139))throw CliErrors[_0x2a24b0(0xae)](_0x2a24b0(0x88)+_0x4fb139,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x2d285b=a41_0xc4b0e4;try{const _0x408c25=await fetch(_0x2d285b(0xc6)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal['timeout'](0x2710)});if(!_0x408c25['ok'])return null;const _0x145366=await _0x408c25[_0x2d285b(0x93)]();if(!_0x145366||typeof _0x145366!==_0x2d285b(0xa8))return null;return Object['fromEntries'](Object['entries'](_0x145366)[_0x2d285b(0xa3)](([,_0x3b4623])=>typeof _0x3b4623===_0x2d285b(0xb1)&&_0x3b4623[_0x2d285b(0xac)]()[_0x2d285b(0xc7)]>0x0)[_0x2d285b(0xb6)](([_0xc38ecf,_0x63aae2])=>[_0xc38ecf,String(_0x63aae2)[_0x2d285b(0xac)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4b482c){const _0x4f2d41=await fetchNpmDistTags();return _0x4f2d41?.[_0x4b482c]??null;}async function fetchLatestVersion(){const _0x221498=a41_0xc4b0e4;return fetchNpmDistTagVersion(_0x221498(0x80));}async function resolveTargetVersion(_0x37bbad){const _0x293ad8=a41_0xc4b0e4,_0x1f5f1e=getRequestedVersion(_0x37bbad);if(_0x1f5f1e)return{'version':_0x1f5f1e,'source':_0x293ad8(0x89)};if(_0x37bbad['bool'](_0x293ad8(0xa2))){const _0x3bf923=await fetchNpmDistTagVersion(_0x293ad8(0xa2));if(!_0x3bf923)return null;return{'version':_0x3bf923,'source':_0x293ad8(0xa2)};}const _0x56459f=await fetchLatestVersion();if(!_0x56459f)return null;return{'version':_0x56459f,'source':_0x293ad8(0x80)};}function shouldInstallTarget(_0x11e6b6,_0x473ae5){const _0xe3fc57=a41_0xc4b0e4;if(_0x473ae5[_0xe3fc57(0xa9)]===_0xe3fc57(0x89)||_0x473ae5['source']===_0xe3fc57(0xa2))return!a41_0x5885d6['eq'](_0x11e6b6,_0x473ae5[_0xe3fc57(0x89)]);return a41_0x5885d6['lt'](_0x11e6b6,_0x473ae5['version']);}function getInstallPlanLabel(_0x32834f,_0x4a6aa9){const _0x3fdfed=a41_0xc4b0e4;switch(_0x4a6aa9['source']){case _0x3fdfed(0xa2):return _0x3fdfed(0x8d)+a41_0xac1cad['yellow'](_0x32834f)+'\x20→\x20'+a41_0xac1cad[_0x3fdfed(0x86)](_0x4a6aa9[_0x3fdfed(0x89)]);case _0x3fdfed(0x89):return _0x3fdfed(0x96)+a41_0xac1cad[_0x3fdfed(0x87)](_0x32834f)+_0x3fdfed(0xc1)+a41_0xac1cad[_0x3fdfed(0x86)](_0x4a6aa9[_0x3fdfed(0x89)]);case _0x3fdfed(0x80):default:return _0x3fdfed(0xbb)+a41_0xac1cad['yellow'](_0x32834f)+_0x3fdfed(0xc1)+a41_0xac1cad[_0x3fdfed(0x86)](_0x4a6aa9[_0x3fdfed(0x89)]);}}async function installCliSkill(_0x235984){const _0x32b30b=a41_0xc4b0e4;console[_0x32b30b(0xad)](a41_0xac1cad[_0x32b30b(0xcb)](_0x32b30b(0x8f)));const _0x4ef157=runNpxSkillsAddGlobal(process[_0x32b30b(0x92)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x235984?_0x32b30b(0xc2):_0x32b30b(0xb2)});if(_0x4ef157[_0x32b30b(0x81)]){console[_0x32b30b(0xad)](a41_0xac1cad[_0x32b30b(0xcb)](_0x32b30b(0xbf)));return;}if(_0x4ef157['ok']){console[_0x32b30b(0xad)](a41_0xac1cad[_0x32b30b(0xcb)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console[_0x32b30b(0xa4)](a41_0xac1cad['yellow'](_0x32b30b(0x82)+(_0x4ef157['error']||_0x32b30b(0x97)))),console['log'](a41_0xac1cad['gray']('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x23bcf1){const _0x5e40d3=a41_0xc4b0e4;await validateUpdateFlags(_0x23bcf1);const _0x208cac=getCurrentVersion();console[_0x5e40d3(0xad)](_0x5e40d3(0x8e)+_0x208cac);const _0x12a1f2=a41_0x4d93cf(_0x5e40d3(0xa7))[_0x5e40d3(0xb0)](),_0x237443=await resolveTargetVersion(_0x23bcf1);if(!_0x237443){const _0x336bd8=_0x23bcf1['bool'](_0x5e40d3(0xa2))?_0x5e40d3(0xbc):_0x5e40d3(0x9b);return _0x12a1f2[_0x5e40d3(0x98)](_0x336bd8),console['log'](a41_0xac1cad[_0x5e40d3(0xcb)](_0x5e40d3(0x9d)+NPM_PACKAGE_NAME+_0x5e40d3(0x83))),{'ok':![],'message':_0x336bd8};}const _0x21c27d=a41_0x5885d6[_0x5e40d3(0x8a)](VERSION),_0x339ac2=a41_0x5885d6[_0x5e40d3(0x8a)](_0x237443[_0x5e40d3(0x89)]);if(!_0x21c27d||!_0x339ac2)return _0x12a1f2[_0x5e40d3(0x98)](_0x5e40d3(0x95)),{'ok':![],'message':_0x5e40d3(0x95)};if(!shouldInstallTarget(_0x21c27d,_0x237443)){const _0x41d49c=_0x237443[_0x5e40d3(0xa9)]==='version'?_0x5e40d3(0xaf)+_0x237443[_0x5e40d3(0x89)]+')':_0x5e40d3(0x84)+_0x237443['version']+')';return _0x12a1f2[_0x5e40d3(0x9f)](_0x41d49c),shouldSkipCliSkill(_0x23bcf1)?console['log'](a41_0xac1cad[_0x5e40d3(0xcb)](_0x5e40d3(0xc3))):await installCliSkill(_0x23bcf1[_0x5e40d3(0xb4)]),{'ok':!![]};}_0x12a1f2['info'](getInstallPlanLabel(_0x208cac,_0x237443));const _0x5590f0=detectPackageManager(),_0x408e2b=_0x5590f0===_0x5e40d3(0xab)?resolveNpmBin(_0x5e40d3(0xab)):_0x5590f0,_0x18876e=a41_0x4d93cf('Updating\x20via\x20'+_0x5590f0+'...')[_0x5e40d3(0xb0)]();try{return await execa(_0x408e2b,[_0x5e40d3(0xcf),'-g',NPM_PACKAGE_NAME+'@'+_0x237443[_0x5e40d3(0x89)]],{'stdio':'pipe'}),_0x18876e[_0x5e40d3(0x9f)](_0x5e40d3(0xcd)+_0x237443['version']),console['log'](a41_0xac1cad[_0x5e40d3(0xcb)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x23bcf1)?console[_0x5e40d3(0xad)](a41_0xac1cad[_0x5e40d3(0xcb)](_0x5e40d3(0xc3))):await installCliSkill(_0x23bcf1['nonInteractive']),{'ok':!![]};}catch(_0x1e2bae){return _0x18876e[_0x5e40d3(0x98)](_0x5e40d3(0x7f)),console[_0x5e40d3(0xaa)](a41_0xac1cad[_0x5e40d3(0xa5)]('\x20\x20'+_0x1e2bae[_0x5e40d3(0x8c)])),console[_0x5e40d3(0xad)](a41_0xac1cad['gray'](_0x5e40d3(0xc0)+_0x5590f0+_0x5e40d3(0xb5)+NPM_PACKAGE_NAME+'@'+_0x237443[_0x5e40d3(0x89)])),{'ok':![],'message':_0x1e2bae[_0x5e40d3(0x8c)]};}}export const updateDefinition={'service':a41_0xc4b0e4(0xba),'command':a41_0xc4b0e4(0x85),'description':a41_0xc4b0e4(0xb9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a41_0x50a413=a41_0x3c1e;(function(_0x55ca6a,_0x117895){const _0x176494=a41_0x3c1e,_0x42c072=_0x55ca6a();while(!![]){try{const _0xdb9ef6=-parseInt(_0x176494(0x1ee))/0x1+-parseInt(_0x176494(0x1c1))/0x2*(-parseInt(_0x176494(0x1e4))/0x3)+-parseInt(_0x176494(0x200))/0x4+parseInt(_0x176494(0x1af))/0x5*(parseInt(_0x176494(0x1d7))/0x6)+-parseInt(_0x176494(0x1d2))/0x7*(parseInt(_0x176494(0x1f3))/0x8)+-parseInt(_0x176494(0x1b4))/0x9*(parseInt(_0x176494(0x1da))/0xa)+parseInt(_0x176494(0x201))/0xb*(parseInt(_0x176494(0x1cc))/0xc);if(_0xdb9ef6===_0x117895)break;else _0x42c072['push'](_0x42c072['shift']());}catch(_0x20fe76){_0x42c072['push'](_0x42c072['shift']());}}}(a41_0x15da,0xd7770));import a41_0x3c126d from'chalk';import a41_0x5e683d from'ora';import a41_0x5c3399 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a41_0x15da(){const _0x6c9777=['24BbRnro','error','Already\x20on\x20requested\x20version\x20(v','boolean','source','fail','8533BScTRP','valid','red','string','green','589032gYvAJj','gray','start','1268350AoUMiZ','Update\x20available:\x20','\x20\x20Try\x20manually:\x20','execPath','Current\x20version:\x20','no-skills','unknown','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','validation','Already\x20up\x20to\x20date\x20(v','3rjVYBM','warn','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Update\x20failed','inherit','Beta\x20version:\x20','Requested\x20version:\x20','toLowerCase','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','bool','1463553zYJGXS','pipe','Invalid\x20version:\x20','...','Updating\x20via\x20','6168GbRMvv','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','npm','cwd','\x20\x20Run\x20manually:\x20','nonInteractive','map','timeout','Version\x20comparison\x20failed','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','slice','4359704oKSGOM','17944663YcITsB','yellow','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','50YxVmPP','fromEntries','Updated\x20to\x20v','/dist-tags','beta','27xwwDtW','\x20→\x20','info','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','\x20cli-skill\x20install','json','message','skills','write','latest','Install\x20a\x20specific\x20CLI\x20version','\x20install\x20-g\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','1023982GLNxsL','Checking\x20for\x20updates...','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','filter','trim','@latest','object','log','version','run'];a41_0x15da=function(){return _0x6c9777;};return a41_0x15da();}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 _0x46b960=a41_0x3c1e;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x46b960(0x1ff)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4928c1=a41_0x3c1e,_0x2a8b78=process[_0x4928c1(0x1dd)][_0x4928c1(0x1eb)]();if(_0x2a8b78['includes']('bun'))return'bun';return'npm';}const updateFlags=[{'name':a41_0x50a413(0x1b3),'type':a41_0x50a413(0x1cf),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a41_0x50a413(0x1ca),'type':a41_0x50a413(0x1d5),'description':a41_0x50a413(0x1be)},{'name':a41_0x50a413(0x1df),'type':'boolean','description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':'skills','type':a41_0x50a413(0x1cf),'description':a41_0x50a413(0x1c3),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x23088d){const _0x51cef3=a41_0x50a413;return _0x23088d['str'](_0x51cef3(0x1ca))['trim']();}function shouldSkipCliSkill(_0x5a3c49){const _0x3d2fd0=a41_0x50a413;return _0x5a3c49['bool'](_0x3d2fd0(0x1df))||_0x5a3c49['flag'](_0x3d2fd0(0x1bb))===![];}async function validateUpdateFlags(_0x381865){const _0x4f88ea=a41_0x50a413,_0x5888e1=_0x381865[_0x4f88ea(0x1ed)](_0x4f88ea(0x1b3)),_0x25fcc4=getRequestedVersion(_0x381865);if(_0x5888e1&&_0x25fcc4)throw CliErrors[_0x4f88ea(0x1e2)](_0x4f88ea(0x1fd),_0x4f88ea(0x1ec));if(_0x25fcc4&&!a41_0x5c3399[_0x4f88ea(0x1d3)](_0x25fcc4))throw CliErrors[_0x4f88ea(0x1e2)](_0x4f88ea(0x1f0)+_0x25fcc4,_0x4f88ea(0x1c4));}function a41_0x3c1e(_0x470a7d,_0x118b2e){_0x470a7d=_0x470a7d-0x1ad;const _0x15daa9=a41_0x15da();let _0x3c1e7f=_0x15daa9[_0x470a7d];return _0x3c1e7f;}async function fetchNpmDistTags(){const _0x314bee=a41_0x50a413;try{const _0x4d3b32=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x314bee(0x1b2),{'signal':AbortSignal[_0x314bee(0x1fb)](0x2710)});if(!_0x4d3b32['ok'])return null;const _0x532cc8=await _0x4d3b32[_0x314bee(0x1b9)]();if(!_0x532cc8||typeof _0x532cc8!==_0x314bee(0x1c8))return null;return Object[_0x314bee(0x1b0)](Object['entries'](_0x532cc8)[_0x314bee(0x1c5)](([,_0x3a39c1])=>typeof _0x3a39c1===_0x314bee(0x1d5)&&_0x3a39c1[_0x314bee(0x1c6)]()['length']>0x0)[_0x314bee(0x1fa)](([_0x509fdf,_0x10ffec])=>[_0x509fdf,String(_0x10ffec)[_0x314bee(0x1c6)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x552970){const _0x52c3b3=await fetchNpmDistTags();return _0x52c3b3?.[_0x552970]??null;}async function fetchLatestVersion(){const _0xe93840=a41_0x50a413;return fetchNpmDistTagVersion(_0xe93840(0x1bd));}async function resolveTargetVersion(_0x1d0f4a){const _0x2ae0db=a41_0x50a413,_0x9b44e8=getRequestedVersion(_0x1d0f4a);if(_0x9b44e8)return{'version':_0x9b44e8,'source':_0x2ae0db(0x1ca)};if(_0x1d0f4a[_0x2ae0db(0x1ed)](_0x2ae0db(0x1b3))){const _0x33ec0b=await fetchNpmDistTagVersion('beta');if(!_0x33ec0b)return null;return{'version':_0x33ec0b,'source':_0x2ae0db(0x1b3)};}const _0x51d703=await fetchLatestVersion();if(!_0x51d703)return null;return{'version':_0x51d703,'source':_0x2ae0db(0x1bd)};}function shouldInstallTarget(_0x14735e,_0x181607){const _0x94ecdf=a41_0x50a413;if(_0x181607[_0x94ecdf(0x1d0)]===_0x94ecdf(0x1ca)||_0x181607[_0x94ecdf(0x1d0)]===_0x94ecdf(0x1b3))return!a41_0x5c3399['eq'](_0x14735e,_0x181607[_0x94ecdf(0x1ca)]);return a41_0x5c3399['lt'](_0x14735e,_0x181607[_0x94ecdf(0x1ca)]);}function getInstallPlanLabel(_0x55a142,_0x2ff519){const _0x183ba0=a41_0x50a413;switch(_0x2ff519[_0x183ba0(0x1d0)]){case _0x183ba0(0x1b3):return _0x183ba0(0x1e9)+a41_0x3c126d[_0x183ba0(0x1ad)](_0x55a142)+_0x183ba0(0x1b5)+a41_0x3c126d[_0x183ba0(0x1d6)](_0x2ff519[_0x183ba0(0x1ca)]);case _0x183ba0(0x1ca):return _0x183ba0(0x1ea)+a41_0x3c126d['yellow'](_0x55a142)+_0x183ba0(0x1b5)+a41_0x3c126d[_0x183ba0(0x1d6)](_0x2ff519[_0x183ba0(0x1ca)]);case _0x183ba0(0x1bd):default:return _0x183ba0(0x1db)+a41_0x3c126d[_0x183ba0(0x1ad)](_0x55a142)+'\x20→\x20'+a41_0x3c126d[_0x183ba0(0x1d6)](_0x2ff519[_0x183ba0(0x1ca)]);}}async function installCliSkill(_0x2bb3d4){const _0x22c55d=a41_0x50a413;console['log'](a41_0x3c126d[_0x22c55d(0x1d8)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x37189e=runNpxSkillsAddGlobal(process[_0x22c55d(0x1f7)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x2bb3d4?'pipe':_0x22c55d(0x1e8)});if(_0x37189e['skipped']){console[_0x22c55d(0x1c9)](a41_0x3c126d[_0x22c55d(0x1d8)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x37189e['ok']){console[_0x22c55d(0x1c9)](a41_0x3c126d[_0x22c55d(0x1d8)](_0x22c55d(0x1f4)));return;}console[_0x22c55d(0x1e5)](a41_0x3c126d[_0x22c55d(0x1ad)](_0x22c55d(0x1e6)+(_0x37189e[_0x22c55d(0x1cd)]||_0x22c55d(0x1e0)))),console[_0x22c55d(0x1c9)](a41_0x3c126d[_0x22c55d(0x1d8)](_0x22c55d(0x1f8)+CLI_BIN_NAME+_0x22c55d(0x1b8)));}async function execute(_0x168157){const _0x1854bd=a41_0x50a413;await validateUpdateFlags(_0x168157);const _0x440d70=getCurrentVersion();console[_0x1854bd(0x1c9)](_0x1854bd(0x1de)+_0x440d70);const _0x56cea3=a41_0x5e683d(_0x1854bd(0x1c2))[_0x1854bd(0x1d9)](),_0x370955=await resolveTargetVersion(_0x168157);if(!_0x370955){const _0x35f0f3=_0x168157[_0x1854bd(0x1ed)](_0x1854bd(0x1b3))?_0x1854bd(0x1c0):_0x1854bd(0x1fe);return _0x56cea3['fail'](_0x35f0f3),console['log'](a41_0x3c126d[_0x1854bd(0x1d8)](_0x1854bd(0x1f5)+NPM_PACKAGE_NAME+_0x1854bd(0x1c7))),{'ok':![],'message':_0x35f0f3};}const _0x572ce6=a41_0x5c3399[_0x1854bd(0x1d3)](VERSION),_0x1143c6=a41_0x5c3399[_0x1854bd(0x1d3)](_0x370955[_0x1854bd(0x1ca)]);if(!_0x572ce6||!_0x1143c6)return _0x56cea3[_0x1854bd(0x1d1)](_0x1854bd(0x1fc)),{'ok':![],'message':_0x1854bd(0x1fc)};if(!shouldInstallTarget(_0x572ce6,_0x370955)){const _0x1ece2d=_0x370955[_0x1854bd(0x1d0)]===_0x1854bd(0x1ca)?_0x1854bd(0x1ce)+_0x370955[_0x1854bd(0x1ca)]+')':_0x1854bd(0x1e3)+_0x370955[_0x1854bd(0x1ca)]+')';return _0x56cea3['succeed'](_0x1ece2d),shouldSkipCliSkill(_0x168157)?console[_0x1854bd(0x1c9)](a41_0x3c126d['gray'](_0x1854bd(0x1b7))):await installCliSkill(_0x168157[_0x1854bd(0x1f9)]),{'ok':!![]};}_0x56cea3[_0x1854bd(0x1b6)](getInstallPlanLabel(_0x440d70,_0x370955));const _0x3947f6=detectPackageManager(),_0x41ec5b=_0x3947f6===_0x1854bd(0x1f6)?resolveNpmBin(_0x1854bd(0x1f6)):_0x3947f6,_0x3cb0e5=a41_0x5e683d(_0x1854bd(0x1f2)+_0x3947f6+_0x1854bd(0x1f1))[_0x1854bd(0x1d9)]();try{return await execa(_0x41ec5b,['install','-g',NPM_PACKAGE_NAME+'@'+_0x370955[_0x1854bd(0x1ca)]],{'stdio':_0x1854bd(0x1ef)}),_0x3cb0e5['succeed'](_0x1854bd(0x1b1)+_0x370955[_0x1854bd(0x1ca)]),console[_0x1854bd(0x1c9)](a41_0x3c126d[_0x1854bd(0x1d8)](_0x1854bd(0x1ae))),shouldSkipCliSkill(_0x168157)?console[_0x1854bd(0x1c9)](a41_0x3c126d['gray'](_0x1854bd(0x1b7))):await installCliSkill(_0x168157['nonInteractive']),{'ok':!![]};}catch(_0x289a43){return _0x3cb0e5[_0x1854bd(0x1d1)](_0x1854bd(0x1e7)),console['error'](a41_0x3c126d[_0x1854bd(0x1d4)]('\x20\x20'+_0x289a43[_0x1854bd(0x1ba)])),console[_0x1854bd(0x1c9)](a41_0x3c126d[_0x1854bd(0x1d8)](_0x1854bd(0x1dc)+_0x3947f6+_0x1854bd(0x1bf)+NPM_PACKAGE_NAME+'@'+_0x370955[_0x1854bd(0x1ca)])),{'ok':![],'message':_0x289a43['message']};}}export const updateDefinition={'service':'update','command':a41_0x50a413(0x1cb),'description':a41_0x50a413(0x1e1),'risk':a41_0x50a413(0x1bc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a42_0x52c2(){const _0xb2bc74=['7380884heaAUk','5ZmVerp','7622340xhEFBe','261veYoKc','51926kDgsda','170648lziKfg','6059170rCNGpd','1273986VfLKxi','2285ADUjWo','8948SxeVki'];a42_0x52c2=function(){return _0xb2bc74;};return a42_0x52c2();}(function(_0x2186ae,_0x8a9537){const _0x5083a4=a42_0x1f33,_0x2dd0bc=_0x2186ae();while(!![]){try{const _0x73c912=-parseInt(_0x5083a4(0x18c))/0x1*(parseInt(_0x5083a4(0x18f))/0x2)+-parseInt(_0x5083a4(0x192))/0x3+-parseInt(_0x5083a4(0x194))/0x4*(-parseInt(_0x5083a4(0x193))/0x5)+parseInt(_0x5083a4(0x18d))/0x6+-parseInt(_0x5083a4(0x195))/0x7+-parseInt(_0x5083a4(0x190))/0x8*(parseInt(_0x5083a4(0x18e))/0x9)+parseInt(_0x5083a4(0x191))/0xa;if(_0x73c912===_0x8a9537)break;else _0x2dd0bc['push'](_0x2dd0bc['shift']());}catch(_0x3dd5e3){_0x2dd0bc['push'](_0x2dd0bc['shift']());}}}(a42_0x52c2,0xa3d98));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a42_0x1f33(_0x2b81e9,_0x229693){_0x2b81e9=_0x2b81e9-0x18c;const _0x52c21f=a42_0x52c2();let _0x1f3348=_0x52c21f[_0x2b81e9];return _0x1f3348;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a42_0x49b9(){const _0x1552f5=['5DQgpsm','3292Lywvgq','42590TBLhHY','371796nitWIf','411GyboqD','493815VpuAkc','1671744KNdEAZ','13996cOAziA','129969sFwdLf'];a42_0x49b9=function(){return _0x1552f5;};return a42_0x49b9();}(function(_0x33b1b1,_0x1d992b){const _0x331f17=a42_0x3432,_0x291143=_0x33b1b1();while(!![]){try{const _0x45df60=parseInt(_0x331f17(0x1b3))/0x1+parseInt(_0x331f17(0x1af))/0x2+parseInt(_0x331f17(0x1b5))/0x3*(-parseInt(_0x331f17(0x1b2))/0x4)+parseInt(_0x331f17(0x1b1))/0x5*(-parseInt(_0x331f17(0x1b4))/0x6)+parseInt(_0x331f17(0x1ad))/0x7+parseInt(_0x331f17(0x1ae))/0x8+-parseInt(_0x331f17(0x1b0))/0x9;if(_0x45df60===_0x1d992b)break;else _0x291143['push'](_0x291143['shift']());}catch(_0x4bace7){_0x291143['push'](_0x291143['shift']());}}}(a42_0x49b9,0x222a7));function a42_0x3432(_0x2aede5,_0x5c6488){_0x2aede5=_0x2aede5-0x1ad;const _0x49b96e=a42_0x49b9();let _0x3432a7=_0x49b96e[_0x2aede5];return _0x3432a7;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a43_0x3df795=a43_0x21f4;(function(_0x506ee7,_0x2abb41){const _0x2dd7a9=a43_0x21f4,_0x1a9853=_0x506ee7();while(!![]){try{const _0x5cf593=parseInt(_0x2dd7a9(0x1ce))/0x1*(-parseInt(_0x2dd7a9(0x1c1))/0x2)+-parseInt(_0x2dd7a9(0x1c6))/0x3+parseInt(_0x2dd7a9(0x1c2))/0x4*(-parseInt(_0x2dd7a9(0x1c8))/0x5)+-parseInt(_0x2dd7a9(0x1c7))/0x6+-parseInt(_0x2dd7a9(0x1cc))/0x7+parseInt(_0x2dd7a9(0x1d2))/0x8+parseInt(_0x2dd7a9(0x1d1))/0x9;if(_0x5cf593===_0x2abb41)break;else _0x1a9853['push'](_0x1a9853['shift']());}catch(_0x1f8fd1){_0x1a9853['push'](_0x1a9853['shift']());}}}(a43_0x30a8,0xae672));function a43_0x21f4(_0x59a5ec,_0x1fc634){_0x59a5ec=_0x59a5ec-0x1be;const _0x30a8db=a43_0x30a8();let _0x21f493=_0x30a8db[_0x59a5ec];return _0x21f493;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a43_0x30a8(){const _0x24290f=['tableName','code','30984651pzmRfR','7116160pTgHey','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','string','str','alias','skip-imports','28KKGlfB','112724CAcsbG','Omit\x20import\x20statements\x20from\x20generated\x20code','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','appCode','3116526Ztvaww','6093126BpLOXg','15CItDuB','bool','name','read','6168589gtSoTC','codegen','42698MFREVF'];a43_0x30a8=function(){return _0x24290f;};return a43_0x30a8();}export const codegenSdk={'service':a43_0x3df795(0x1cd),'command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a43_0x3df795(0x1cb),'flags':[CODE_FLAG_OPTIONAL,{'name':a43_0x3df795(0x1bf),'type':a43_0x3df795(0x1d4),'description':a43_0x3df795(0x1c4)},{'name':'operation','type':a43_0x3df795(0x1d4),'required':!![],'description':a43_0x3df795(0x1d3)},{'name':a43_0x3df795(0x1c0),'type':'boolean','description':a43_0x3df795(0x1c3)}],async 'execute'(_0x3dbdfb){const _0x4c89d2=a43_0x3df795,{dataset:_0x178296,operation:_0x2ae216}=await getOperationDetail(_0x3dbdfb[_0x4c89d2(0x1c5)],_0x3dbdfb[_0x4c89d2(0x1be)](_0x4c89d2(0x1d0)),_0x3dbdfb[_0x4c89d2(0x1be)]('operation')),_0x526bee=generateSdkCode(_0x178296,_0x2ae216,{'includeImports':!_0x3dbdfb[_0x4c89d2(0x1c9)](_0x4c89d2(0x1c0))});return{'ok':!![],'data':{'dataset':{'name':_0x178296[_0x4c89d2(0x1ca)],'code':_0x178296[_0x4c89d2(0x1d0)],'tableName':_0x178296[_0x4c89d2(0x1cf)]},'operation':_0x3dbdfb[_0x4c89d2(0x1be)]('operation'),'code':_0x526bee}};}};
1
+ function a43_0x43e8(){const _0x978cf1=['sdk','alias','516530iwLtkW','2996094WgoLsv','name','string','read','1843260SghHmR','1194zYbPHt','283060OtTMpd','576742rJfKHz','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','appCode','str','skip-imports','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','code','bool','4840SpCbVI','612WHZGok','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','294728oqFZsD','77yFNIep'];a43_0x43e8=function(){return _0x978cf1;};return a43_0x43e8();}const a43_0x15dacc=a43_0x3e4e;(function(_0x40a8be,_0x5db7af){const _0x2b23a0=a43_0x3e4e,_0x2a8f47=_0x40a8be();while(!![]){try{const _0x204973=-parseInt(_0x2b23a0(0x101))/0x1+-parseInt(_0x2b23a0(0x109))/0x2+parseInt(_0x2b23a0(0x107))/0x3*(-parseInt(_0x2b23a0(0xfa))/0x4)+-parseInt(_0x2b23a0(0x106))/0x5+parseInt(_0x2b23a0(0x102))/0x6+parseInt(_0x2b23a0(0xfe))/0x7*(-parseInt(_0x2b23a0(0xfd))/0x8)+parseInt(_0x2b23a0(0xfb))/0x9*(parseInt(_0x2b23a0(0x108))/0xa);if(_0x204973===_0x5db7af)break;else _0x2a8f47['push'](_0x2a8f47['shift']());}catch(_0x3381b6){_0x2a8f47['push'](_0x2a8f47['shift']());}}}(a43_0x43e8,0x58cfd));function a43_0x3e4e(_0x2909f7,_0x167b8a){_0x2909f7=_0x2909f7-0xf4;const _0x43e8eb=a43_0x43e8();let _0x3e4e63=_0x43e8eb[_0x2909f7];return _0x3e4e63;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a43_0x15dacc(0xff),'description':a43_0x15dacc(0x10a),'risk':a43_0x15dacc(0x105),'flags':[CODE_FLAG_OPTIONAL,{'name':a43_0x15dacc(0x100),'type':a43_0x15dacc(0x104),'description':a43_0x15dacc(0xfc)},{'name':'operation','type':'string','required':!![],'description':a43_0x15dacc(0xf7)},{'name':a43_0x15dacc(0xf6),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x579ca3){const _0x362aa6=a43_0x15dacc,{dataset:_0x46e4f7,operation:_0x311f04}=await getOperationDetail(_0x579ca3[_0x362aa6(0xf4)],_0x579ca3[_0x362aa6(0xf5)](_0x362aa6(0xf8)),_0x579ca3[_0x362aa6(0xf5)]('operation')),_0x584a1c=generateSdkCode(_0x46e4f7,_0x311f04,{'includeImports':!_0x579ca3[_0x362aa6(0xf9)](_0x362aa6(0xf6))});return{'ok':!![],'data':{'dataset':{'name':_0x46e4f7[_0x362aa6(0x103)],'code':_0x46e4f7[_0x362aa6(0xf8)],'tableName':_0x46e4f7['tableName']},'operation':_0x579ca3[_0x362aa6(0xf5)]('operation'),'code':_0x584a1c}};}};
@@ -1 +1 @@
1
- const a44_0x2e6cac=a44_0xe217;function a44_0x5e05(){const _0x24404c=['5350518USOgES','971985gxXqrI','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','11BSSkvD','bool','7ToZEbC','1150zdEPVQ','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sdk','target','10041CFKVfy','no-imports','4551704FyWlLl','appCode','11013396uvcCzI','read','str','sqlcode','sqlCode','62973iZtqGJ','Omit\x20import\x20statements\x20from\x20generated\x20code','460195BZcxjD','4OQRioC','string','sql','44zkMOiL'];a44_0x5e05=function(){return _0x24404c;};return a44_0x5e05();}(function(_0x13640f,_0xf00a3){const _0x1961ad=a44_0xe217,_0x5e92da=_0x13640f();while(!![]){try{const _0x56244b=parseInt(_0x1961ad(0x1c1))/0x1+-parseInt(_0x1961ad(0x1bf))/0x2*(parseInt(_0x1961ad(0x1ca))/0x3)+parseInt(_0x1961ad(0x1bc))/0x4*(-parseInt(_0x1961ad(0x1bb))/0x5)+-parseInt(_0x1961ad(0x1c0))/0x6+-parseInt(_0x1961ad(0x1c5))/0x7*(-parseInt(_0x1961ad(0x1cc))/0x8)+parseInt(_0x1961ad(0x1b9))/0x9*(-parseInt(_0x1961ad(0x1c6))/0xa)+parseInt(_0x1961ad(0x1c3))/0xb*(parseInt(_0x1961ad(0x1ce))/0xc);if(_0x56244b===_0xf00a3)break;else _0x5e92da['push'](_0x5e92da['shift']());}catch(_0x46da36){_0x5e92da['push'](_0x5e92da['shift']());}}}(a44_0x5e05,0x91aaa));function a44_0xe217(_0x1a00cc,_0x20dd5a){_0x1a00cc=_0x1a00cc-0x1b9;const _0x5e0554=a44_0x5e05();let _0xe217f4=_0x5e0554[_0x1a00cc];return _0xe217f4;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a44_0x2e6cac(0x1be),'description':a44_0x2e6cac(0x1c7),'risk':a44_0x2e6cac(0x1cf),'flags':[SQLCODE_FLAG,{'name':'target','type':a44_0x2e6cac(0x1bd),'description':a44_0x2e6cac(0x1c2),'default':'sdk','enum':[a44_0x2e6cac(0x1c8),'bff']},{'name':a44_0x2e6cac(0x1cb),'type':'boolean','description':a44_0x2e6cac(0x1ba)}],async 'execute'(_0x1978c3){const _0x425713=a44_0x2e6cac,_0x2b5489=await getSqlQueryInfo(_0x1978c3[_0x425713(0x1cd)],_0x1978c3['str'](_0x425713(0x1d1))),_0x2f30e2=_0x1978c3[_0x425713(0x1d0)](_0x425713(0x1c9))||'sdk',_0x1d4914=generateSqlCodeTemplate(_0x2b5489,{'target':_0x2f30e2,'includeImports':!_0x1978c3[_0x425713(0x1c4)](_0x425713(0x1cb))});return{'ok':!![],'data':{'sqlCode':_0x2b5489[_0x425713(0x1d2)],'sqlName':_0x2b5489['sqlName'],'target':_0x2f30e2,'code':_0x1d4914}};}};
1
+ function a44_0x4bbc(_0xa9a82c,_0xd8fe44){_0xa9a82c=_0xa9a82c-0x163;const _0x420a32=a44_0x420a();let _0x4bbc07=_0x420a32[_0xa9a82c];return _0x4bbc07;}const a44_0x8d1be4=a44_0x4bbc;(function(_0x1f266e,_0x2e64af){const _0x4a2741=a44_0x4bbc,_0x203994=_0x1f266e();while(!![]){try{const _0x2a2fb1=parseInt(_0x4a2741(0x176))/0x1*(-parseInt(_0x4a2741(0x178))/0x2)+parseInt(_0x4a2741(0x16b))/0x3+-parseInt(_0x4a2741(0x174))/0x4+-parseInt(_0x4a2741(0x172))/0x5+-parseInt(_0x4a2741(0x163))/0x6*(-parseInt(_0x4a2741(0x179))/0x7)+-parseInt(_0x4a2741(0x16d))/0x8*(parseInt(_0x4a2741(0x177))/0x9)+parseInt(_0x4a2741(0x170))/0xa*(parseInt(_0x4a2741(0x175))/0xb);if(_0x2a2fb1===_0x2e64af)break;else _0x203994['push'](_0x203994['shift']());}catch(_0x556376){_0x203994['push'](_0x203994['shift']());}}}(a44_0x420a,0xf1675));function a44_0x420a(){const _0x5c4d2e=['string','8JljPlS','str','sqlCode','10ntFEZq','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','4519255ZhoxXT','target','558704fANLGa','36753497oSxtJR','920314dwvdZv','13643874kGFhFV','4DdIAsJ','434bZSsMJ','bool','codegen','sdk','172266EZWIUW','bff','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sqlName','no-imports','sql','boolean','appCode','802863wlnNDR'];a44_0x420a=function(){return _0x5c4d2e;};return a44_0x420a();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a44_0x8d1be4(0x17b),'command':a44_0x8d1be4(0x168),'description':a44_0x8d1be4(0x171),'risk':'read','flags':[SQLCODE_FLAG,{'name':a44_0x8d1be4(0x173),'type':a44_0x8d1be4(0x16c),'description':a44_0x8d1be4(0x165),'default':a44_0x8d1be4(0x17c),'enum':[a44_0x8d1be4(0x17c),a44_0x8d1be4(0x164)]},{'name':a44_0x8d1be4(0x167),'type':a44_0x8d1be4(0x169),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x548e20){const _0x9a57a3=a44_0x8d1be4,_0x3a5cd6=await getSqlQueryInfo(_0x548e20[_0x9a57a3(0x16a)],_0x548e20[_0x9a57a3(0x16e)]('sqlcode')),_0x3e06ae=_0x548e20['str'](_0x9a57a3(0x173))||_0x9a57a3(0x17c),_0xa374a9=generateSqlCodeTemplate(_0x3a5cd6,{'target':_0x3e06ae,'includeImports':!_0x548e20[_0x9a57a3(0x17a)](_0x9a57a3(0x167))});return{'ok':!![],'data':{'sqlCode':_0x3a5cd6[_0x9a57a3(0x16f)],'sqlName':_0x3a5cd6[_0x9a57a3(0x166)],'target':_0x3e06ae,'code':_0xa374a9}};}};
@@ -1 +1 @@
1
- (function(_0x165a0a,_0x9db0b3){const _0x7cba3d=a45_0x5304,_0x105481=_0x165a0a();while(!![]){try{const _0x669024=parseInt(_0x7cba3d(0xd1))/0x1*(parseInt(_0x7cba3d(0xdd))/0x2)+parseInt(_0x7cba3d(0xcf))/0x3*(-parseInt(_0x7cba3d(0xcd))/0x4)+-parseInt(_0x7cba3d(0xc6))/0x5+parseInt(_0x7cba3d(0xc9))/0x6*(-parseInt(_0x7cba3d(0xc4))/0x7)+parseInt(_0x7cba3d(0xde))/0x8+-parseInt(_0x7cba3d(0xe4))/0x9*(-parseInt(_0x7cba3d(0xc8))/0xa)+parseInt(_0x7cba3d(0xe0))/0xb;if(_0x669024===_0x9db0b3)break;else _0x105481['push'](_0x105481['shift']());}catch(_0x1ad2b6){_0x105481['push'](_0x105481['shift']());}}}(a45_0x5b35,0x725ab));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x469ac7 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a45_0x5304(_0x27edfe,_0x1bf61a){_0x27edfe=_0x27edfe-0xc3;const _0x5b35e1=a45_0x5b35();let _0x5304e8=_0x5b35e1[_0x27edfe];return _0x5304e8;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x4461d9=a45_0x5304,_0x238aa4=await input({'message':_0x4461d9(0xd2),'validate':_0x4385ce=>{const _0x1177d8=_0x4461d9,_0x560727=validateAppcode(_0x4385ce['trim']());return _0x560727['valid']||_0x560727[_0x1177d8(0xe2)]||_0x1177d8(0xdc);}});return _0x238aa4['trim']();}export async function promptAppSelection(_0x3a3497){const _0x31c827=a45_0x5304,_0xd67fd5=[{'name':a45_0x469ac7[_0x31c827(0xd7)](_0x31c827(0xd5)),'value':-0x1},..._0x3a3497['map']((_0x5504a6,_0x44933f)=>({'name':_0x5504a6[_0x31c827(0xce)]+'\x20\x20'+a45_0x469ac7[_0x31c827(0xd4)]('('+_0x5504a6['appCode']+')'),'value':_0x44933f}))],_0x53739f=await checkbox({'message':'获取到\x20'+a45_0x469ac7[_0x31c827(0xd9)](_0x3a3497[_0x31c827(0xcb)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0xd67fd5,'loop':![]});if(_0x53739f['includes'](-0x1))return _0x31c827(0xc3);if(_0x53739f[_0x31c827(0xcb)]===0x0)return _0x31c827(0xc3);return _0x53739f[_0x31c827(0xd0)](_0x4aed59=>_0x3a3497[_0x4aed59]);}export async function promptSingleAppSelection(_0x37c5c4){const _0x15d377=a45_0x5304,_0xfc5f53=[{'name':a45_0x469ac7[_0x15d377(0xd4)](_0x15d377(0xc7)),'value':_0x15d377(0xe1)},{'name':a45_0x469ac7[_0x15d377(0xd7)](_0x15d377(0xd5)),'value':_0x15d377(0xc3)},..._0x37c5c4['map'](_0x1ae013=>({'name':_0x1ae013['appName']+'\x20\x20'+a45_0x469ac7[_0x15d377(0xd4)]('('+_0x1ae013[_0x15d377(0xda)]+')'),'value':_0x1ae013['appCode']}))],_0x18d9df=await select({'message':_0x15d377(0xca),'choices':_0xfc5f53});if(_0x18d9df===_0x15d377(0xe1))return _0x15d377(0xe1);if(_0x18d9df===_0x15d377(0xc3))return _0x15d377(0xc3);return _0x37c5c4[_0x15d377(0xd8)](_0xfc6884=>_0xfc6884[_0x15d377(0xda)]===_0x18d9df);}export async function selectSingleAppcode(_0x2dbd06){const _0x1a9258=a45_0x5304;if(!_0x2dbd06)return writeCliSideChannelLine(a45_0x469ac7[_0x1a9258(0xd4)](_0x1a9258(0xdb))),_fallbackOrSkip();writeCliSideChannelLine(_0x1a9258(0xcc));let _0x23b5bd;try{_0x23b5bd=await withActiveCookie(_0x2dbd06,()=>listRemoteApps());}catch(_0x5000d9){writeCliSideChannelLine(a45_0x469ac7[_0x1a9258(0xd7)]('无法获取远程应用列表,请手动输入。'));if(_0x5000d9 instanceof Error)writeCliSideChannelLine(a45_0x469ac7[_0x1a9258(0xd4)](_0x1a9258(0xdf)+_0x5000d9[_0x1a9258(0xe2)]+')'));return _fallbackOrSkip();}if(_0x23b5bd['length']===0x0)return writeCliSideChannelLine(a45_0x469ac7[_0x1a9258(0xd7)](_0x1a9258(0xc5))),_fallbackOrSkip();const _0x517648=await promptSingleAppSelection(_0x23b5bd);if(_0x517648===_0x1a9258(0xe1))return'';if(_0x517648===_0x1a9258(0xc3))return promptCustomAppcode();return _0x517648[_0x1a9258(0xda)];}export async function selectMultipleApps(_0x109315){const _0x42f3f5=a45_0x5304;writeCliSideChannelLine(_0x42f3f5(0xcc));let _0x30b3a4;try{_0x30b3a4=await withActiveCookie(_0x109315,()=>listRemoteApps());}catch(_0x39e533){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x39e533 instanceof Error)writeCliSideChannelLine(_0x42f3f5(0xdf)+_0x39e533[_0x42f3f5(0xe2)]+')');return _0x42f3f5(0xc3);}if(_0x30b3a4[_0x42f3f5(0xcb)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x42f3f5(0xc3);return promptAppSelection(_0x30b3a4);}async function _fallbackOrSkip(){const _0x44512f=a45_0x5304,_0xfd09eb=await select({'message':_0x44512f(0xd3),'choices':[{'name':a45_0x469ac7[_0x44512f(0xd4)](_0x44512f(0xd6)),'value':_0x44512f(0xe1)},{'name':a45_0x469ac7[_0x44512f(0xd7)](_0x44512f(0xe3)),'value':'manual'}]});if(_0xfd09eb==='skip')return'';return promptCustomAppcode();}function a45_0x5b35(){const _0x51ff8d=['✎\x20手动输入','9054ZFEpQD','custom','91TaffUX','未找到可用应用。','1080670qLNZKj','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','2260jsiyjz','129126jIsBHy','请选择要绑定的应用:','length','正在获取可用应用列表...','147452cqfCRY','appName','9JQUYkU','map','4315hqADJm','请输入\x20App\x20Code:','App\x20Code:','gray','✎\x20自定义输入\x20appcode','(跳过,稍后配置)','yellow','find','cyan','appCode','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','Invalid\x20App\x20Code','162PKpaRb','2055872YhGRMf','\x20\x20(','2651396zXRrFp','skip','message'];a45_0x5b35=function(){return _0x51ff8d;};return a45_0x5b35();}
1
+ function a45_0x30f7(_0x41f70a,_0x33e23b){_0x41f70a=_0x41f70a-0x17e;const _0xa49429=a45_0xa494();let _0x30f7fd=_0xa49429[_0x41f70a];return _0x30f7fd;}(function(_0xf41c56,_0x5da8e4){const _0x49b235=a45_0x30f7,_0x3dc010=_0xf41c56();while(!![]){try{const _0x4feaad=parseInt(_0x49b235(0x181))/0x1+-parseInt(_0x49b235(0x199))/0x2*(-parseInt(_0x49b235(0x1a0))/0x3)+parseInt(_0x49b235(0x18e))/0x4+-parseInt(_0x49b235(0x190))/0x5*(parseInt(_0x49b235(0x184))/0x6)+-parseInt(_0x49b235(0x193))/0x7*(parseInt(_0x49b235(0x18f))/0x8)+parseInt(_0x49b235(0x182))/0x9*(parseInt(_0x49b235(0x183))/0xa)+parseInt(_0x49b235(0x197))/0xb*(-parseInt(_0x49b235(0x18b))/0xc);if(_0x4feaad===_0x5da8e4)break;else _0x3dc010['push'](_0x3dc010['shift']());}catch(_0x5f0c21){_0x3dc010['push'](_0x3dc010['shift']());}}}(a45_0xa494,0x307a4));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x4c0445 from'chalk';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 _0x33bddd=await input({'message':'请输入\x20App\x20Code:','validate':_0x1915a7=>{const _0x198103=a45_0x30f7,_0x57ef9a=validateAppcode(_0x1915a7[_0x198103(0x19b)]());return _0x57ef9a[_0x198103(0x19e)]||_0x57ef9a[_0x198103(0x188)]||_0x198103(0x194);}});return _0x33bddd['trim']();}export async function promptAppSelection(_0x370740){const _0x5a7a42=a45_0x30f7,_0x1e29fc=[{'name':a45_0x4c0445[_0x5a7a42(0x18a)](_0x5a7a42(0x18c)),'value':-0x1},..._0x370740[_0x5a7a42(0x17f)]((_0x3fa939,_0x2cd696)=>({'name':_0x3fa939[_0x5a7a42(0x189)]+'\x20\x20'+a45_0x4c0445[_0x5a7a42(0x187)]('('+_0x3fa939[_0x5a7a42(0x1a3)]+')'),'value':_0x2cd696}))],_0x1180a9=await checkbox({'message':_0x5a7a42(0x19f)+a45_0x4c0445['cyan'](_0x370740[_0x5a7a42(0x196)])+_0x5a7a42(0x198),'choices':_0x1e29fc,'loop':![]});if(_0x1180a9['includes'](-0x1))return'custom';if(_0x1180a9[_0x5a7a42(0x196)]===0x0)return _0x5a7a42(0x1a2);return _0x1180a9['map'](_0x35184d=>_0x370740[_0x35184d]);}function a45_0xa494(){const _0x1c4901=['无法获取远程应用列表,请手动输入。','find','valid','获取到\x20','3conPiB','(跳过,稍后配置)','custom','appCode','skip','map','App\x20Code:','155175rZczuu','46674JeOfCy','90fcXYKM','14466VaESCP','\x0a未找到可用应用。','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','gray','message','appName','yellow','84sWizAD','✎\x20自定义输入\x20appcode','正在获取可用应用列表...','282856fToUAB','147584YeJIGI','305gzjFSW','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','\x0a无法获取远程应用列表,请手动输入。','70fyAFvT','Invalid\x20App\x20Code','\x20\x20(','length','141933arUNqM','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','695746SLRhGi','请选择要绑定的应用:','trim'];a45_0xa494=function(){return _0x1c4901;};return a45_0xa494();}export async function promptSingleAppSelection(_0x3d2e6f){const _0x74b6fa=a45_0x30f7,_0x5e9bfe=[{'name':a45_0x4c0445[_0x74b6fa(0x187)](_0x74b6fa(0x191)),'value':'skip'},{'name':a45_0x4c0445[_0x74b6fa(0x18a)](_0x74b6fa(0x18c)),'value':_0x74b6fa(0x1a2)},..._0x3d2e6f[_0x74b6fa(0x17f)](_0x4e9f72=>({'name':_0x4e9f72['appName']+'\x20\x20'+a45_0x4c0445[_0x74b6fa(0x187)]('('+_0x4e9f72[_0x74b6fa(0x1a3)]+')'),'value':_0x4e9f72[_0x74b6fa(0x1a3)]}))],_0x3e1cf7=await select({'message':_0x74b6fa(0x19a),'choices':_0x5e9bfe});if(_0x3e1cf7===_0x74b6fa(0x17e))return _0x74b6fa(0x17e);if(_0x3e1cf7===_0x74b6fa(0x1a2))return _0x74b6fa(0x1a2);return _0x3d2e6f[_0x74b6fa(0x19d)](_0xd8cf24=>_0xd8cf24['appCode']===_0x3e1cf7);}export async function selectSingleAppcode(_0x3b3d02){const _0x2d86cd=a45_0x30f7;if(!_0x3b3d02)return writeCliSideChannelLine(a45_0x4c0445[_0x2d86cd(0x187)](_0x2d86cd(0x186))),_fallbackOrSkip();writeCliSideChannelLine(_0x2d86cd(0x18d));let _0x3e9bdc;try{_0x3e9bdc=await withActiveCookie(_0x3b3d02,()=>listRemoteApps());}catch(_0x31238d){writeCliSideChannelLine(a45_0x4c0445['yellow'](_0x2d86cd(0x19c)));if(_0x31238d instanceof Error)writeCliSideChannelLine(a45_0x4c0445[_0x2d86cd(0x187)](_0x2d86cd(0x195)+_0x31238d[_0x2d86cd(0x188)]+')'));return _fallbackOrSkip();}if(_0x3e9bdc[_0x2d86cd(0x196)]===0x0)return writeCliSideChannelLine(a45_0x4c0445[_0x2d86cd(0x18a)]('未找到可用应用。')),_fallbackOrSkip();const _0x34013a=await promptSingleAppSelection(_0x3e9bdc);if(_0x34013a===_0x2d86cd(0x17e))return'';if(_0x34013a===_0x2d86cd(0x1a2))return promptCustomAppcode();return _0x34013a[_0x2d86cd(0x1a3)];}export async function selectMultipleApps(_0x33a941){const _0x3f1dde=a45_0x30f7;writeCliSideChannelLine(_0x3f1dde(0x18d));let _0xa9bd06;try{_0xa9bd06=await withActiveCookie(_0x33a941,()=>listRemoteApps());}catch(_0x2e17a8){writeCliSideChannelLine(_0x3f1dde(0x192));if(_0x2e17a8 instanceof Error)writeCliSideChannelLine(_0x3f1dde(0x195)+_0x2e17a8[_0x3f1dde(0x188)]+')');return _0x3f1dde(0x1a2);}if(_0xa9bd06['length']===0x0)return writeCliSideChannelLine(_0x3f1dde(0x185)),_0x3f1dde(0x1a2);return promptAppSelection(_0xa9bd06);}async function _fallbackOrSkip(){const _0x5a3014=a45_0x30f7,_0x28799a=await select({'message':_0x5a3014(0x180),'choices':[{'name':a45_0x4c0445[_0x5a3014(0x187)](_0x5a3014(0x1a1)),'value':_0x5a3014(0x17e)},{'name':a45_0x4c0445['yellow']('✎\x20手动输入'),'value':'manual'}]});if(_0x28799a===_0x5a3014(0x17e))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a46_0x545758=a46_0x238b;function a46_0x238b(_0x5127d4,_0x2170b3){_0x5127d4=_0x5127d4-0x1b1;const _0x4668a9=a46_0x4668();let _0x238b7e=_0x4668a9[_0x5127d4];return _0x238b7e;}(function(_0x5a09d8,_0xe093c1){const _0x572d9c=a46_0x238b,_0x165222=_0x5a09d8();while(!![]){try{const _0x5329cd=parseInt(_0x572d9c(0x1b7))/0x1+-parseInt(_0x572d9c(0x1bc))/0x2+-parseInt(_0x572d9c(0x1c5))/0x3+-parseInt(_0x572d9c(0x1bd))/0x4*(-parseInt(_0x572d9c(0x1c4))/0x5)+-parseInt(_0x572d9c(0x1b1))/0x6+-parseInt(_0x572d9c(0x1c6))/0x7+parseInt(_0x572d9c(0x1ba))/0x8;if(_0x5329cd===_0xe093c1)break;else _0x165222['push'](_0x165222['shift']());}catch(_0x1f3160){_0x165222['push'](_0x165222['shift']());}}}(a46_0x4668,0xc1072));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a46_0x545758(0x1c0)};export const CODE_FLAG={'name':'code','type':a46_0x545758(0x1c3),'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':a46_0x545758(0x1c1),'description':a46_0x545758(0x1b6)};export const SQLCODE_FLAG={'name':a46_0x545758(0x1b9),'type':a46_0x545758(0x1c3),'required':!![],'description':a46_0x545758(0x1b5),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a46_0x545758(0x1c2)}};function a46_0x4668(){const _0x4d9586=['907647uWCbeh','Database\x20product\x20type','sqlcode','10994872bwmLCR','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','1087114cTxcRL','3178052mrVZRw','MYSQL','POSTGRESQL','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','datasetcode','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','string','5yNhnAY','320784eDmZxR','7269094rPoJvk','3581700OvYRBP','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','number','appcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Dataset\x20code\x20(32-char\x20hex\x20UUID)'];a46_0x4668=function(){return _0x4d9586;};return a46_0x4668();}export const APPCODE_FLAG_OPTIONAL={'name':a46_0x545758(0x1b4),'type':a46_0x545758(0x1c3),'required':![],'description':a46_0x545758(0x1b2)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a46_0x545758(0x1b3),'required':!![],'description':a46_0x545758(0x1bb)};export const DB_TYPE_FLAG={'name':'dbtype','type':a46_0x545758(0x1c3),'required':!![],'description':a46_0x545758(0x1b8),'enum':[a46_0x545758(0x1be),a46_0x545758(0x1bf)]};
1
+ function a46_0x1234(_0x5ab5f6,_0x20146c){_0x5ab5f6=_0x5ab5f6-0x154;const _0x241b78=a46_0x241b();let _0x1234f2=_0x241b78[_0x5ab5f6];return _0x1234f2;}const a46_0x135251=a46_0x1234;function a46_0x241b(){const _0x5191cb=['appcode','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','273012QPzCsj','datasetcode','sqlcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','55RyoBZM','1143FvkmyL','Database\x20product\x20type','POSTGRESQL','code','174BPNDGa','28610lAhsme','162225wYGIyA','number','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','6086405hRPvDz','MYSQL','8047488gRdgMS','707726xPSSLs','4gphhXf','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','3hjXTso','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','466498BlzPov','string','Dataset\x20code\x20(32-char\x20hex\x20UUID)'];a46_0x241b=function(){return _0x5191cb;};return a46_0x241b();}(function(_0x24fd9f,_0x2f0cb4){const _0x11c65b=a46_0x1234,_0x3c881b=_0x24fd9f();while(!![]){try{const _0x4c6c1c=parseInt(_0x11c65b(0x159))/0x1+parseInt(_0x11c65b(0x154))/0x2*(-parseInt(_0x11c65b(0x157))/0x3)+-parseInt(_0x11c65b(0x155))/0x4*(parseInt(_0x11c65b(0x16c))/0x5)+-parseInt(_0x11c65b(0x167))/0x6*(-parseInt(_0x11c65b(0x169))/0x7)+parseInt(_0x11c65b(0x16e))/0x8+parseInt(_0x11c65b(0x163))/0x9*(parseInt(_0x11c65b(0x168))/0xa)+-parseInt(_0x11c65b(0x162))/0xb*(parseInt(_0x11c65b(0x15e))/0xc);if(_0x4c6c1c===_0x2f0cb4)break;else _0x3c881b['push'](_0x3c881b['shift']());}catch(_0x53b27c){_0x3c881b['push'](_0x3c881b['shift']());}}}(a46_0x241b,0xc8ead));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a46_0x135251(0x156)};export const CODE_FLAG={'name':a46_0x135251(0x166),'type':a46_0x135251(0x15a),'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':a46_0x135251(0x15f),'description':a46_0x135251(0x15b)};export const SQLCODE_FLAG={'name':a46_0x135251(0x160),'type':a46_0x135251(0x15a),'required':!![],'description':a46_0x135251(0x161),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a46_0x135251(0x158)}};export const APPCODE_FLAG_OPTIONAL={'name':a46_0x135251(0x15c),'type':a46_0x135251(0x15a),'required':![],'description':a46_0x135251(0x15d)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a46_0x135251(0x16a),'required':!![],'description':a46_0x135251(0x16b)};export const DB_TYPE_FLAG={'name':'dbtype','type':a46_0x135251(0x15a),'required':!![],'description':a46_0x135251(0x164),'enum':[a46_0x135251(0x16d),a46_0x135251(0x165)]};
@@ -1 +1 @@
1
- function a47_0x9c36(){const _0x4550dc=['774XMcaMx','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','length','3zgySmm','App\x20Code\x20cannot\x20be\x20empty','7205796iWCxtC','1616012jmUrTB','test','13722643JAZLwz','530817TUlDdT','120ywpWJy','256448PWhfPn','231KrHucF','16140zzcxwB','168010PYyKdy'];a47_0x9c36=function(){return _0x4550dc;};return a47_0x9c36();}(function(_0x4541bf,_0x5ca71f){const _0x3cc19a=a47_0x5c7e,_0x22d58e=_0x4541bf();while(!![]){try{const _0xbdb092=parseInt(_0x3cc19a(0xed))/0x1+-parseInt(_0x3cc19a(0xea))/0x2*(-parseInt(_0x3cc19a(0xf6))/0x3)+parseInt(_0x3cc19a(0xee))/0x4*(parseInt(_0x3cc19a(0xf2))/0x5)+-parseInt(_0x3cc19a(0xf8))/0x6+-parseInt(_0x3cc19a(0xf0))/0x7*(-parseInt(_0x3cc19a(0xef))/0x8)+-parseInt(_0x3cc19a(0xf3))/0x9*(parseInt(_0x3cc19a(0xf1))/0xa)+-parseInt(_0x3cc19a(0xec))/0xb;if(_0xbdb092===_0x5ca71f)break;else _0x22d58e['push'](_0x22d58e['shift']());}catch(_0x49aca0){_0x22d58e['push'](_0x22d58e['shift']());}}}(a47_0x9c36,0xc7928));function a47_0x5c7e(_0x1777eb,_0xd10ad){_0x1777eb=_0x1777eb-0xea;const _0x9c36b9=a47_0x9c36();let _0x5c7e82=_0x9c36b9[_0x1777eb];return _0x5c7e82;}export function validateAppcode(_0x288105){const _0x412848=a47_0x5c7e,_0x56e846=_0x288105['trim']();if(!_0x56e846)return{'valid':![],'message':_0x412848(0xf7)};if(_0x56e846[_0x412848(0xf5)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x412848(0xeb)](_0x56e846))return{'valid':![],'message':_0x412848(0xf4)};return{'valid':!![]};}
1
+ function a47_0x3d39(_0x56d31f,_0x4addcc){_0x56d31f=_0x56d31f-0x124;const _0x24e054=a47_0x24e0();let _0x3d39f3=_0x24e054[_0x56d31f];return _0x3d39f3;}function a47_0x24e0(){const _0x3224f3=['4EurdVB','1053LQMEgP','App\x20Code\x20cannot\x20exceed\x20100\x20characters','122552WmPYzk','1fqayAe','3542937TMtgGy','16422362EvRUWQ','1069900jIVGBW','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','60BlUFrR','test','2990555vmXqch','length','768243QuXTUY','App\x20Code\x20cannot\x20be\x20empty','2312606GnIioX'];a47_0x24e0=function(){return _0x3224f3;};return a47_0x24e0();}(function(_0x498e2a,_0x31829b){const _0x3fa069=a47_0x3d39,_0x4dfd29=_0x498e2a();while(!![]){try{const _0x470c2d=parseInt(_0x3fa069(0x124))/0x1*(-parseInt(_0x3fa069(0x12f))/0x2)+parseInt(_0x3fa069(0x125))/0x3*(parseInt(_0x3fa069(0x130))/0x4)+-parseInt(_0x3fa069(0x12b))/0x5+parseInt(_0x3fa069(0x129))/0x6*(parseInt(_0x3fa069(0x12d))/0x7)+-parseInt(_0x3fa069(0x133))/0x8*(-parseInt(_0x3fa069(0x131))/0x9)+parseInt(_0x3fa069(0x127))/0xa+-parseInt(_0x3fa069(0x126))/0xb;if(_0x470c2d===_0x31829b)break;else _0x4dfd29['push'](_0x4dfd29['shift']());}catch(_0x5b029d){_0x4dfd29['push'](_0x4dfd29['shift']());}}}(a47_0x24e0,0xe327a));export function validateAppcode(_0x19fd66){const _0x1efffe=a47_0x3d39,_0x5ebf25=_0x19fd66['trim']();if(!_0x5ebf25)return{'valid':![],'message':_0x1efffe(0x12e)};if(_0x5ebf25[_0x1efffe(0x12c)]>0x64)return{'valid':![],'message':_0x1efffe(0x132)};if(!/^[A-Za-z0-9_-]+$/[_0x1efffe(0x12a)](_0x5ebf25))return{'valid':![],'message':_0x1efffe(0x128)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a48_0x4c1932=a48_0x427c;(function(_0x8d1498,_0x56b943){const _0x1e4d12=a48_0x427c,_0x13b238=_0x8d1498();while(!![]){try{const _0x84de75=-parseInt(_0x1e4d12(0xe1))/0x1*(parseInt(_0x1e4d12(0xdc))/0x2)+parseInt(_0x1e4d12(0xd8))/0x3*(parseInt(_0x1e4d12(0xd3))/0x4)+parseInt(_0x1e4d12(0xe3))/0x5+parseInt(_0x1e4d12(0xd0))/0x6*(-parseInt(_0x1e4d12(0xd6))/0x7)+-parseInt(_0x1e4d12(0xdb))/0x8*(-parseInt(_0x1e4d12(0xd4))/0x9)+-parseInt(_0x1e4d12(0xdf))/0xa*(parseInt(_0x1e4d12(0xd7))/0xb)+-parseInt(_0x1e4d12(0xd5))/0xc*(-parseInt(_0x1e4d12(0xd9))/0xd);if(_0x84de75===_0x56b943)break;else _0x13b238['push'](_0x13b238['shift']());}catch(_0x70aa7b){_0x13b238['push'](_0x13b238['shift']());}}}(a48_0x3574,0x729ea));import{CliErrors}from'../../errors.js';function a48_0x427c(_0xb71341,_0x1eeba4){_0xb71341=_0xb71341-0xd0;const _0x35744d=a48_0x3574();let _0x427c85=_0x35744d[_0xb71341];return _0x427c85;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3a3ba1){const _0x45b4ee=a48_0x427c,_0x17b225=_0x3a3ba1['str'](_0x45b4ee(0xd1));if(!_0x17b225)throw CliErrors['validation'](_0x45b4ee(0xd2),'Usage:\x20'+CLI_BIN_NAME+_0x45b4ee(0xe4));const _0x34ee3c=readConfig(),_0x352d6a=_0x17b225===_0x45b4ee(0xe7)?_0x45b4ee(0xe6):_0x17b225,_0x568325=_0x34ee3c[_0x352d6a];if(_0x568325===undefined)throw CliErrors[_0x45b4ee(0xe2)](_0x45b4ee(0xe5)+_0x17b225);return{'ok':!![],'data':typeof _0x568325===_0x45b4ee(0xda)?_0x568325:{[_0x352d6a]:_0x568325},'message':typeof _0x568325===_0x45b4ee(0xda)?undefined:String(_0x568325)};}export const configGetDefinition={'service':a48_0x4c1932(0xde),'command':a48_0x4c1932(0xe0),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a48_0x4c1932(0xdd),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a48_0x4c1932(0xd1),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a48_0x3574(){const _0x2caeac=['20oULpnC','get','1ZmedyG','validation','543360eMuHBp','\x20config\x20get\x20--key\x20<key>','Key\x20not\x20found:\x20','appcode','app','6eHnAtw','key','Missing\x20key.','4PJtxDh','3105qydsvH','11771484RYsZTG','2321039OXXxNk','4965356OUvDWU','473082sjWkzi','13xvBwSh','object','21768NTBYzT','964434ljXTYw','read','config'];a48_0x3574=function(){return _0x2caeac;};return a48_0x3574();}
1
+ const a48_0x59e960=a48_0x2386;(function(_0x57dc90,_0x4e8f3c){const _0x97be30=a48_0x2386,_0xbd892c=_0x57dc90();while(!![]){try{const _0x31737f=-parseInt(_0x97be30(0x114))/0x1+parseInt(_0x97be30(0x11c))/0x2+parseInt(_0x97be30(0x119))/0x3*(-parseInt(_0x97be30(0x116))/0x4)+parseInt(_0x97be30(0x11d))/0x5*(parseInt(_0x97be30(0x10b))/0x6)+parseInt(_0x97be30(0x11e))/0x7+-parseInt(_0x97be30(0x113))/0x8*(-parseInt(_0x97be30(0x10c))/0x9)+-parseInt(_0x97be30(0x10f))/0xa;if(_0x31737f===_0x4e8f3c)break;else _0xbd892c['push'](_0xbd892c['shift']());}catch(_0x276478){_0xbd892c['push'](_0xbd892c['shift']());}}}(a48_0x42a2,0xe1b5c));import{CliErrors}from'../../errors.js';function a48_0x2386(_0x13ac0a,_0x9d4696){_0x13ac0a=_0x13ac0a-0x10b;const _0x42a249=a48_0x42a2();let _0x2386bd=_0x42a249[_0x13ac0a];return _0x2386bd;}function a48_0x42a2(){const _0x2c3db2=['Usage:\x20','20175980CXpCKP','key','validation','str','80312PPgnNB','484327GKvjQR','string','4uHpJXG','Missing\x20key.','Get\x20a\x20config\x20value\x20by\x20key','312933DzTzmn','Key\x20not\x20found:\x20','config','2138026qITuKb','6236365ZobAGA','8079568kYsNkJ','get','app','6JrdhAK','54xyiFJT','object'];a48_0x42a2=function(){return _0x2c3db2;};return a48_0x42a2();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x27fe73){const _0x55400c=a48_0x2386,_0x28daa3=_0x27fe73[_0x55400c(0x112)]('key');if(!_0x28daa3)throw CliErrors[_0x55400c(0x111)](_0x55400c(0x117),_0x55400c(0x10e)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x596148=readConfig(),_0x5869b3=_0x28daa3===_0x55400c(0x120)?'appcode':_0x28daa3,_0x1c239e=_0x596148[_0x5869b3];if(_0x1c239e===undefined)throw CliErrors[_0x55400c(0x111)](_0x55400c(0x11a)+_0x28daa3);return{'ok':!![],'data':typeof _0x1c239e===_0x55400c(0x10d)?_0x1c239e:{[_0x5869b3]:_0x1c239e},'message':typeof _0x1c239e===_0x55400c(0x10d)?undefined:String(_0x1c239e)};}export const configGetDefinition={'service':a48_0x59e960(0x11b),'command':a48_0x59e960(0x11f),'description':a48_0x59e960(0x118),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a48_0x59e960(0x110),'type':a48_0x59e960(0x115),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};