@lovrabet/rabetbase-cli 2.3.7-beta.1 → 2.3.7-beta.3

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 (243) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -0
  79. package/lib/commands/db/analyze-batch-plan.js +1 -0
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/logs/index.js +1 -1
  101. package/lib/commands/menu/index.js +1 -1
  102. package/lib/commands/menu/list.js +1 -1
  103. package/lib/commands/menu/shared/compare-table.js +1 -1
  104. package/lib/commands/menu/shared/index.js +1 -1
  105. package/lib/commands/menu/shared/inquirer.js +1 -1
  106. package/lib/commands/menu/shared/local-pages.js +1 -1
  107. package/lib/commands/menu/shared/logic.js +1 -1
  108. package/lib/commands/menu/shared/service.js +1 -1
  109. package/lib/commands/menu/shared/sync-core.js +1 -1
  110. package/lib/commands/menu/shared/update-core.js +1 -1
  111. package/lib/commands/menu/shared/valid-url.js +1 -1
  112. package/lib/commands/menu/sync.js +1 -1
  113. package/lib/commands/menu/update.js +1 -1
  114. package/lib/commands/page/generate-start.js +1 -1
  115. package/lib/commands/page/generate-status.js +1 -1
  116. package/lib/commands/page/index.js +1 -1
  117. package/lib/commands/page/pull.js +1 -1
  118. package/lib/commands/page/push.js +1 -1
  119. package/lib/commands/page/relation-audit.js +1 -1
  120. package/lib/commands/page/shared.js +1 -1
  121. package/lib/commands/page/standard-page-status.js +1 -1
  122. package/lib/commands/page/sync.js +1 -1
  123. package/lib/commands/permit/index.js +1 -1
  124. package/lib/commands/permit/page-get.js +1 -1
  125. package/lib/commands/permit/page-set.js +1 -1
  126. package/lib/commands/permit/role-apis-set.js +1 -1
  127. package/lib/commands/permit/role-menus-set.js +1 -1
  128. package/lib/commands/permit/role-menus.js +1 -1
  129. package/lib/commands/permit/shared.js +1 -1
  130. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  131. package/lib/commands/project/create/format-elapsed.js +1 -1
  132. package/lib/commands/project/create/main.js +1 -1
  133. package/lib/commands/project/create/non-interactive.js +1 -1
  134. package/lib/commands/project/create/project-template-path.js +1 -1
  135. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  136. package/lib/commands/project/create/use-format-code.js +1 -1
  137. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  138. package/lib/commands/project/index.js +1 -1
  139. package/lib/commands/project/init.js +1 -1
  140. package/lib/commands/project/upgrade.js +1 -1
  141. package/lib/commands/registry.js +1 -1
  142. package/lib/commands/role/create.js +1 -1
  143. package/lib/commands/role/delete.js +1 -1
  144. package/lib/commands/role/detail.js +1 -1
  145. package/lib/commands/role/index.js +1 -1
  146. package/lib/commands/role/list.js +1 -1
  147. package/lib/commands/role/shared.js +1 -1
  148. package/lib/commands/role/update.js +1 -1
  149. package/lib/commands/role/user-add.js +1 -1
  150. package/lib/commands/role/user-remove.js +1 -1
  151. package/lib/commands/role/user-resolve.js +1 -1
  152. package/lib/commands/run/index.js +1 -1
  153. package/lib/commands/schema.js +1 -1
  154. package/lib/commands/sql/create.js +1 -1
  155. package/lib/commands/sql/delete.js +1 -1
  156. package/lib/commands/sql/detail.js +1 -1
  157. package/lib/commands/sql/exec.js +1 -1
  158. package/lib/commands/sql/index.js +1 -1
  159. package/lib/commands/sql/list.js +1 -1
  160. package/lib/commands/sql/pull.js +1 -1
  161. package/lib/commands/sql/push.js +1 -1
  162. package/lib/commands/sql/save.js +1 -1
  163. package/lib/commands/sql/shared.js +1 -1
  164. package/lib/commands/sql/status.js +1 -1
  165. package/lib/commands/sql/validate.js +1 -1
  166. package/lib/commands/workspace/add.js +1 -1
  167. package/lib/commands/workspace/index.js +1 -1
  168. package/lib/commands/workspace/remove.js +1 -1
  169. package/lib/config/schema.js +1 -1
  170. package/lib/constant/cdn.js +1 -1
  171. package/lib/constant/cli.js +1 -1
  172. package/lib/constant/defaults.js +1 -1
  173. package/lib/constant/domain.js +1 -1
  174. package/lib/constant/env.js +1 -1
  175. package/lib/constant/output.js +1 -1
  176. package/lib/constant/paths.js +1 -1
  177. package/lib/constant/risk.js +1 -1
  178. package/lib/context/app-resolver.js +1 -1
  179. package/lib/context/auth-resolver.js +1 -1
  180. package/lib/context/config-loader.js +1 -1
  181. package/lib/context.js +1 -1
  182. package/lib/core/alias-resolver.js +1 -1
  183. package/lib/core/api-client.js +1 -1
  184. package/lib/core/bff/config.js +1 -1
  185. package/lib/core/bff/file-system.js +1 -1
  186. package/lib/core/bff/hash.js +1 -1
  187. package/lib/core/bff/lock.js +1 -1
  188. package/lib/core/bff/utils.js +1 -1
  189. package/lib/core/db-resolver.js +1 -1
  190. package/lib/core/page/file-system.js +1 -1
  191. package/lib/core/page/hash.js +1 -1
  192. package/lib/core/page/lock.js +1 -1
  193. package/lib/core/sql-sync/config.js +1 -1
  194. package/lib/core/sql-sync/file-system.js +1 -1
  195. package/lib/core/sql-sync/hash.js +1 -1
  196. package/lib/core/sql-sync/lock.js +1 -1
  197. package/lib/core/sql-sync/utils.js +1 -1
  198. package/lib/core/sql-validator.js +1 -1
  199. package/lib/errors.js +1 -1
  200. package/lib/framework/build-all-flags.js +1 -1
  201. package/lib/framework/flags.js +1 -1
  202. package/lib/framework/help.js +1 -1
  203. package/lib/framework/index.js +1 -1
  204. package/lib/framework/output.js +1 -1
  205. package/lib/framework/response.js +1 -1
  206. package/lib/framework/runner-alias.js +1 -1
  207. package/lib/framework/runner.js +1 -1
  208. package/lib/framework/schema-export.js +1 -1
  209. package/lib/framework/types.js +1 -1
  210. package/lib/generated/build-info.js +1 -1
  211. package/lib/help.js +1 -1
  212. package/lib/skills/main.js +1 -1
  213. package/lib/skills/npx-skills-add.js +1 -1
  214. package/lib/telemetry/cli-command-trace.js +1 -1
  215. package/lib/telemetry/cli-help-trace.js +1 -1
  216. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  217. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  218. package/lib/telemetry/send-cli-trace-log.js +1 -1
  219. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  220. package/lib/utils/ai_config.js +1 -1
  221. package/lib/utils/apply-jq-filter.js +1 -1
  222. package/lib/utils/cdn-config.js +1 -1
  223. package/lib/utils/check-sdk-version.js +1 -1
  224. package/lib/utils/cli-version-check.js +1 -1
  225. package/lib/utils/cli-version-policy.js +1 -1
  226. package/lib/utils/config.js +1 -1
  227. package/lib/utils/copy-directory.js +1 -1
  228. package/lib/utils/entity-with-id.js +1 -1
  229. package/lib/utils/file-utils.js +1 -1
  230. package/lib/utils/guides-cdn.js +1 -1
  231. package/lib/utils/http-client.js +1 -1
  232. package/lib/utils/is-non-interactive.js +1 -1
  233. package/lib/utils/logger.js +1 -1
  234. package/lib/utils/params.js +1 -1
  235. package/lib/utils/platform.js +1 -1
  236. package/lib/utils/rules-cdn.js +1 -1
  237. package/lib/utils/sleep.js +1 -1
  238. package/lib/utils/template-replacer.js +1 -1
  239. package/lib/utils/update-notice.js +1 -1
  240. package/lib/utils/version.js +1 -1
  241. package/lib/utils/with-active-cookie.js +1 -1
  242. package/lib/utils/write-cli-side-channel.js +1 -1
  243. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x27df16=a36_0x345d;(function(_0x3f2808,_0x4b6b68){const _0x41152a=a36_0x345d,_0x827b02=_0x3f2808();while(!![]){try{const _0x961a49=parseInt(_0x41152a(0x15b))/0x1+parseInt(_0x41152a(0x164))/0x2*(-parseInt(_0x41152a(0x16c))/0x3)+parseInt(_0x41152a(0x15f))/0x4*(-parseInt(_0x41152a(0x14e))/0x5)+parseInt(_0x41152a(0x154))/0x6*(-parseInt(_0x41152a(0x16d))/0x7)+-parseInt(_0x41152a(0x15a))/0x8*(-parseInt(_0x41152a(0x174))/0x9)+parseInt(_0x41152a(0x165))/0xa+parseInt(_0x41152a(0x177))/0xb;if(_0x961a49===_0x4b6b68)break;else _0x827b02['push'](_0x827b02['shift']());}catch(_0x2af436){_0x827b02['push'](_0x827b02['shift']());}}}(a36_0x3264,0xaa1d7));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a36_0x345d(_0x56ba57,_0x20612d){_0x56ba57=_0x56ba57-0x146;const _0x3264f4=a36_0x3264();let _0x345dfa=_0x3264f4[_0x56ba57];return _0x345dfa;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a36_0x3264(){const _0x7327=['apps','functions','trim','scriptType','No\x20remote\x20BFF\x20scripts\x20found.','156HdsAec','conflict','nonInteractive','appCode','message','Would\x20inspect\x20','316752HJoBXT','470891tsLhnT','functionName','lockFilePath','length','10708wWuaYB','string','\x20failed','write','lastSync','6cNjFlI','12266180VzEqHf','Force\x20pull\x20cancelled.','scriptContent','\x20remote\x20BFF\x20script(s)\x20for\x20pull','question','cancelled','Force\x20overwrite\x20local\x20unsynced\x20changes','1183704jSEcLI','167062SUmLqs','Lock\x20scope\x20for\x20app\x20\x22','parse','force','stderr','lockKey','alias','9dreGUq','toLowerCase','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','13732895fZJNWW','filePath','datasetCode','bool','\x22\x20not\x20found\x20after\x20ensureLockScope.','operationType','would_pull','pull','type','unresolvable\x20target\x20path','bff','GET','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','hash','push','Remote\x20script\x20missing\x20id.','HOOK','boolean','str','toISOString','skipped','all','hookLocation','apiDir','functionNode','utf8','905TPIUWY'];a36_0x3264=function(){return _0x7327;};return a36_0x3264();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x27df16(0x181),'command':'pull','description':a36_0x27df16(0x183),'risk':a36_0x27df16(0x162),'flags':[{'name':a36_0x27df16(0x17f),'type':a36_0x27df16(0x160),'description':'Pull\x20only\x20this\x20script\x20type','enum':['COMMON','ENDPOINT',a36_0x27df16(0x187)]},{'name':a36_0x27df16(0x170),'type':a36_0x27df16(0x188),'description':a36_0x27df16(0x16b)}],async 'dryRun'(_0xc95710){const _0x1fead0=a36_0x27df16,_0x2f825c=loadBffProjectConfig(_0xc95710[_0x1fead0(0x157)]),_0x34dbca=await readBffLockFile(_0x2f825c[_0x1fead0(0x15d)]),{appLock:_0x939571}=ensureLockScope(_0x34dbca??createEmptyBffLock(),_0xc95710[_0x1fead0(0x157)],_0x2f825c['scriptsRoot'],_0x1fead0(0x17e)),_0x1ad7f0=normalizeBffType(_0xc95710[_0x1fead0(0x146)](_0x1fead0(0x17f)))??undefined,_0x410315=buildDatasetCodeToAliasMap(_0xc95710[_0x1fead0(0x14b)],_0xc95710[_0x1fead0(0x157)]),[_0x29e29c,_0x532096]=await Promise[_0x1fead0(0x149)]([listBffScripts(_0xc95710[_0x1fead0(0x157)],_0x1ad7f0),getBffScriptStatistics(_0xc95710[_0x1fead0(0x157)])]),_0x4fa5f5=createHookLocationMap(_0x532096),_0x58cd95=[];for(const _0x490abd of _0x29e29c){const _0x2146f7=resolveRemoteScriptTarget(_0x2f825c,_0x490abd,_0x4fa5f5,_0x939571[_0x1fead0(0x150)],_0x410315);if(!_0x2146f7){_0x58cd95[_0x1fead0(0x185)]({'scriptType':_0x490abd[_0x1fead0(0x152)],'functionName':_0x490abd[_0x1fead0(0x15c)]??'','status':_0x1fead0(0x148),'reason':'unresolvable\x20target\x20path'});continue;}const _0x31e77f=_0x939571[_0x1fead0(0x150)][_0x2146f7[_0x1fead0(0x172)]],_0x11b0bd=_0x490abd['scriptContent']!=null?computeContentHash(_0x490abd['scriptContent']):undefined,_0x30e6fa=await hasUnsyncedLocalChanges(_0x2146f7[_0x1fead0(0x178)],_0x31e77f,_0x11b0bd);_0x58cd95[_0x1fead0(0x185)]({'lockKey':_0x2146f7['lockKey'],'filePath':_0x2146f7[_0x1fead0(0x178)],'remoteId':_0x490abd['id']??null,'status':_0x30e6fa?_0x1fead0(0x155):_0x1fead0(0x17d)});}return{'method':_0x1fead0(0x182),'url':'/api/management/library/scripts/list?appCode='+_0xc95710[_0x1fead0(0x157)]+(_0x1ad7f0?'&type='+_0x1ad7f0:''),'body':{'appCode':_0xc95710['appCode'],'filterType':_0x1ad7f0??null,'files':_0x58cd95},'description':_0x1fead0(0x159)+_0x58cd95['length']+_0x1fead0(0x168)};},async 'execute'(_0xcf4f03){const _0x49845a=a36_0x27df16,_0x117048=loadBffProjectConfig(_0xcf4f03['appCode']),_0x2ac86e=await readBffLockFile(_0x117048['lockFilePath']),{lockData:_0x5dc97b,appLock:_0x49bf48}=ensureLockScope(_0x2ac86e??createEmptyBffLock(),_0xcf4f03[_0x49845a(0x157)],_0x117048['scriptsRoot'],_0x49845a(0x17e)),_0x1b02f4=normalizeBffType(_0xcf4f03[_0x49845a(0x146)]('type'))??undefined;if(_0xcf4f03[_0x49845a(0x146)](_0x49845a(0x17f))&&!_0x1b02f4)throw CliErrors['validation']('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x38d6e7,_0x587e51]=await Promise[_0x49845a(0x149)]([listBffScripts(_0xcf4f03[_0x49845a(0x157)],_0x1b02f4),getBffScriptStatistics(_0xcf4f03[_0x49845a(0x157)])]);if(_0x38d6e7[_0x49845a(0x15e)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x49845a(0x153)};const _0x7f0588=_0xcf4f03[_0x49845a(0x17a)](_0x49845a(0x170));if(_0x7f0588&&!_0xcf4f03[_0x49845a(0x156)]){const _0x4f99b5=await confirmForce();if(!_0x4f99b5)throw CliErrors[_0x49845a(0x16a)](_0x49845a(0x166));}if(_0x7f0588&&_0xcf4f03[_0x49845a(0x156)]){}const _0x37c8b4=buildDatasetCodeToAliasMap(_0xcf4f03[_0x49845a(0x14b)],_0xcf4f03[_0x49845a(0x157)]),_0x24b7b6=createHookLocationMap(_0x587e51),_0x2e85cc=JSON[_0x49845a(0x16f)](JSON['stringify'](_0x5dc97b)),_0x1bfef1=_0xcf4f03[_0x49845a(0x157)],_0x4ca529=_0x2e85cc[_0x49845a(0x14f)][_0x1bfef1];if(!_0x4ca529)throw new Error(_0x49845a(0x16e)+_0x1bfef1+_0x49845a(0x17b));const _0x5ce7ef=[],_0x57afaa=[],_0x30f676=[];for(const _0x17fb2f of _0x38d6e7){const _0x12f2f0=resolveRemoteScriptTarget(_0x117048,_0x17fb2f,_0x24b7b6,_0x49bf48[_0x49845a(0x150)],_0x37c8b4);if(!_0x12f2f0){_0x57afaa[_0x49845a(0x185)]({'lockKey':_0x17fb2f[_0x49845a(0x152)]+'/'+_0x17fb2f[_0x49845a(0x15c)],'reason':_0x49845a(0x180)});continue;}const _0x24ca03=_0x49bf48[_0x49845a(0x150)][_0x12f2f0['lockKey']];try{if(!_0x17fb2f['id'])throw new Error(_0x49845a(0x186));if(_0x17fb2f['scriptContent']==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x1ef95c=_0x17fb2f[_0x49845a(0x167)],_0x3eb19a=computeContentHash(_0x1ef95c);if(!_0x7f0588){const _0x457e08=await hasUnsyncedLocalChanges(_0x12f2f0[_0x49845a(0x178)],_0x24ca03,_0x3eb19a);if(_0x457e08){_0x57afaa[_0x49845a(0x185)]({'lockKey':_0x12f2f0[_0x49845a(0x172)],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x12f2f0[_0x49845a(0x178)]),await writeFile(_0x12f2f0[_0x49845a(0x178)],_0x1ef95c,_0x49845a(0x14d));const _0x411324={'hash':_0x3eb19a,'remoteId':_0x17fb2f['id'],'version':_0x17fb2f['version']};_0x12f2f0[_0x49845a(0x17f)]===_0x49845a(0x187)&&_0x12f2f0[_0x49845a(0x14a)]&&(_0x411324[_0x49845a(0x173)]=_0x12f2f0[_0x49845a(0x14a)][_0x49845a(0x173)],_0x411324[_0x49845a(0x179)]=_0x12f2f0[_0x49845a(0x14a)][_0x49845a(0x179)],_0x411324[_0x49845a(0x17c)]=_0x12f2f0['hookLocation'][_0x49845a(0x17c)],_0x411324[_0x49845a(0x14c)]=_0x12f2f0[_0x49845a(0x14a)][_0x49845a(0x14c)]),_0x4ca529[_0x49845a(0x150)][_0x12f2f0[_0x49845a(0x172)]]=_0x411324,_0x5ce7ef[_0x49845a(0x185)]({'lockKey':_0x12f2f0[_0x49845a(0x172)],'remoteId':_0x17fb2f['id']});}catch(_0x13d9c9){_0x30f676[_0x49845a(0x185)]({'lockKey':_0x12f2f0[_0x49845a(0x172)],'error':_0x13d9c9 instanceof Error?_0x13d9c9[_0x49845a(0x158)]:String(_0x13d9c9)});}}return _0x4ca529[_0x49845a(0x163)]=new Date()[_0x49845a(0x147)](),await writeBffLockFile(_0x117048[_0x49845a(0x15d)],_0x2e85cc),{'ok':_0x30f676[_0x49845a(0x15e)]===0x0,'data':{'pulled':_0x5ce7ef,'skipped':_0x57afaa,'failed':_0x30f676},'message':'Pull\x20complete:\x20'+_0x5ce7ef[_0x49845a(0x15e)]+'\x20pulled,\x20'+_0x57afaa[_0x49845a(0x15e)]+'\x20skipped,\x20'+_0x30f676[_0x49845a(0x15e)]+_0x49845a(0x161)};}};async function hasUnsyncedLocalChanges(_0xbdad36,_0x43914f,_0x4bc927){const _0x94cf72=a36_0x27df16;if(!await fileExists(_0xbdad36))return![];const _0x515c1f=await computeFileHash(_0xbdad36);if(!_0x43914f)return _0x4bc927?_0x515c1f!==_0x4bc927:!![];return _0x515c1f!==_0x43914f[_0x94cf72(0x184)];}function buildDatasetCodeToAliasMap(_0x34c3b7,_0x43a329){const _0x24aad6=loadAliasMap(_0x34c3b7,undefined,resolveApiFilePath(_0x34c3b7,_0x43a329));return new Map(_0x24aad6['map'](_0x2b058d=>[_0x2b058d['datasetCode'],_0x2b058d['alias']]));}async function confirmForce(){const _0x327aeb=a36_0x27df16,_0x16922c=createInterface({'input':process['stdin'],'output':process[_0x327aeb(0x171)]}),_0x37f62c=await new Promise(_0x49c43e=>{const _0x4a2c78=_0x327aeb;_0x16922c[_0x4a2c78(0x169)](_0x4a2c78(0x176),_0x49c43e);});return _0x16922c['close'](),['y','yes']['includes'](_0x37f62c[_0x327aeb(0x151)]()[_0x327aeb(0x175)]());}
1
+ const a36_0x40d201=a36_0x1f8e;(function(_0x55242a,_0x51134d){const _0x487cc8=a36_0x1f8e,_0x16e0ec=_0x55242a();while(!![]){try{const _0x595de7=-parseInt(_0x487cc8(0x10b))/0x1+-parseInt(_0x487cc8(0x118))/0x2+-parseInt(_0x487cc8(0x125))/0x3*(-parseInt(_0x487cc8(0x110))/0x4)+-parseInt(_0x487cc8(0x113))/0x5+-parseInt(_0x487cc8(0x117))/0x6+parseInt(_0x487cc8(0x126))/0x7+parseInt(_0x487cc8(0x115))/0x8*(parseInt(_0x487cc8(0x10d))/0x9);if(_0x595de7===_0x51134d)break;else _0x16e0ec['push'](_0x16e0ec['shift']());}catch(_0x1bab1f){_0x16e0ec['push'](_0x16e0ec['shift']());}}}(a36_0x56e2,0x2e1bf));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';function a36_0x1f8e(_0x582a37,_0x120491){_0x582a37=_0x582a37-0x109;const _0x56e22c=a36_0x56e2();let _0x1f8edb=_0x56e22c[_0x582a37];return _0x1f8edb;}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';function a36_0x56e2(){const _0x10fae8=['Pull\x20complete:\x20','Remote\x20script\x20missing\x20content.','trim','type','nonInteractive','all','lastSync','\x20pulled,\x20','map','315029ALrFxK','pull','67617ggiZuG','Would\x20inspect\x20','alias','8WaaGCP','toISOString','str','1453310MtmTtU','includes','1112eRZSif','force','1835604itLnxD','663156ZnLjaB','parse','scriptContent','HOOK','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','Force\x20overwrite\x20local\x20unsynced\x20changes','Remote\x20script\x20missing\x20id.','would_pull','stringify','validation','functionName','Pull\x20only\x20this\x20script\x20type','scriptType','280089bBxATb','1407231rKPsIO','filePath','appCode','datasetCode','\x20failed','hash','GET','ENDPOINT','write','local\x20unsynced\x20changes','question','stderr','version','functions','yes','functionNode','\x20remote\x20BFF\x20script(s)\x20for\x20pull','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','push','utf8','lockFilePath','conflict','length','apiDir','&type=','boolean','Force\x20pull\x20cancelled.','hookLocation','message','lockKey'];a36_0x56e2=function(){return _0x10fae8;};return a36_0x56e2();}import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a36_0x40d201(0x10c),'description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':a36_0x40d201(0x12e),'flags':[{'name':a36_0x40d201(0x147),'type':'string','description':a36_0x40d201(0x123),'enum':['COMMON',a36_0x40d201(0x12d),a36_0x40d201(0x11b)]},{'name':a36_0x40d201(0x116),'type':a36_0x40d201(0x13f),'description':a36_0x40d201(0x11d)}],async 'dryRun'(_0x2cb8eb){const _0x35d5a7=a36_0x40d201,_0x46b4e2=loadBffProjectConfig(_0x2cb8eb[_0x35d5a7(0x128)]),_0x1937b=await readBffLockFile(_0x46b4e2[_0x35d5a7(0x13a)]),{appLock:_0x2e288b}=ensureLockScope(_0x1937b??createEmptyBffLock(),_0x2cb8eb[_0x35d5a7(0x128)],_0x46b4e2['scriptsRoot'],_0x35d5a7(0x10c)),_0x21bb5f=normalizeBffType(_0x2cb8eb['str'](_0x35d5a7(0x147)))??undefined,_0x142c02=buildDatasetCodeToAliasMap(_0x2cb8eb[_0x35d5a7(0x13d)],_0x2cb8eb['appCode']),[_0x5ae92b,_0x5da81c]=await Promise[_0x35d5a7(0x149)]([listBffScripts(_0x2cb8eb[_0x35d5a7(0x128)],_0x21bb5f),getBffScriptStatistics(_0x2cb8eb[_0x35d5a7(0x128)])]),_0x33338f=createHookLocationMap(_0x5da81c),_0xb57462=[];for(const _0x17c1a2 of _0x5ae92b){const _0x436321=resolveRemoteScriptTarget(_0x46b4e2,_0x17c1a2,_0x33338f,_0x2e288b[_0x35d5a7(0x133)],_0x142c02);if(!_0x436321){_0xb57462[_0x35d5a7(0x138)]({'scriptType':_0x17c1a2['scriptType'],'functionName':_0x17c1a2[_0x35d5a7(0x122)]??'','status':'skipped','reason':'unresolvable\x20target\x20path'});continue;}const _0x4d506e=_0x2e288b[_0x35d5a7(0x133)][_0x436321[_0x35d5a7(0x143)]],_0x195138=_0x17c1a2[_0x35d5a7(0x11a)]!=null?computeContentHash(_0x17c1a2['scriptContent']):undefined,_0x564b95=await hasUnsyncedLocalChanges(_0x436321[_0x35d5a7(0x127)],_0x4d506e,_0x195138);_0xb57462[_0x35d5a7(0x138)]({'lockKey':_0x436321[_0x35d5a7(0x143)],'filePath':_0x436321['filePath'],'remoteId':_0x17c1a2['id']??null,'status':_0x564b95?_0x35d5a7(0x13b):_0x35d5a7(0x11f)});}return{'method':_0x35d5a7(0x12c),'url':'/api/management/library/scripts/list?appCode='+_0x2cb8eb['appCode']+(_0x21bb5f?_0x35d5a7(0x13e)+_0x21bb5f:''),'body':{'appCode':_0x2cb8eb[_0x35d5a7(0x128)],'filterType':_0x21bb5f??null,'files':_0xb57462},'description':_0x35d5a7(0x10e)+_0xb57462[_0x35d5a7(0x13c)]+_0x35d5a7(0x136)};},async 'execute'(_0x382e67){const _0x36f650=a36_0x40d201,_0xe79479=loadBffProjectConfig(_0x382e67[_0x36f650(0x128)]),_0x2af23f=await readBffLockFile(_0xe79479[_0x36f650(0x13a)]),{lockData:_0x1c5215,appLock:_0x5cf2e0}=ensureLockScope(_0x2af23f??createEmptyBffLock(),_0x382e67[_0x36f650(0x128)],_0xe79479['scriptsRoot'],'pull'),_0x366689=normalizeBffType(_0x382e67['str'](_0x36f650(0x147)))??undefined;if(_0x382e67[_0x36f650(0x112)]('type')&&!_0x366689)throw CliErrors[_0x36f650(0x121)](_0x36f650(0x137));const [_0x5e4064,_0x33c6f4]=await Promise[_0x36f650(0x149)]([listBffScripts(_0x382e67['appCode'],_0x366689),getBffScriptStatistics(_0x382e67[_0x36f650(0x128)])]);if(_0x5e4064[_0x36f650(0x13c)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x408698=_0x382e67['bool'](_0x36f650(0x116));if(_0x408698&&!_0x382e67[_0x36f650(0x148)]){const _0x3d12b7=await confirmForce();if(!_0x3d12b7)throw CliErrors['cancelled'](_0x36f650(0x140));}if(_0x408698&&_0x382e67['nonInteractive']){}const _0x210678=buildDatasetCodeToAliasMap(_0x382e67[_0x36f650(0x13d)],_0x382e67[_0x36f650(0x128)]),_0x50e14b=createHookLocationMap(_0x33c6f4),_0x1b0fab=JSON[_0x36f650(0x119)](JSON[_0x36f650(0x120)](_0x1c5215)),_0x3fd536=_0x382e67['appCode'],_0x401190=_0x1b0fab['apps'][_0x3fd536];if(!_0x401190)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x3fd536+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x13154a=[],_0x3cc789=[],_0x5e5848=[];for(const _0x86f388 of _0x5e4064){const _0x1f245b=resolveRemoteScriptTarget(_0xe79479,_0x86f388,_0x50e14b,_0x5cf2e0['functions'],_0x210678);if(!_0x1f245b){_0x3cc789[_0x36f650(0x138)]({'lockKey':_0x86f388[_0x36f650(0x124)]+'/'+_0x86f388[_0x36f650(0x122)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x41b258=_0x5cf2e0[_0x36f650(0x133)][_0x1f245b[_0x36f650(0x143)]];try{if(!_0x86f388['id'])throw new Error(_0x36f650(0x11e));if(_0x86f388['scriptContent']==null)throw new Error(_0x36f650(0x145));const _0xabff7f=_0x86f388[_0x36f650(0x11a)],_0x1104b7=computeContentHash(_0xabff7f);if(!_0x408698){const _0x5c0235=await hasUnsyncedLocalChanges(_0x1f245b[_0x36f650(0x127)],_0x41b258,_0x1104b7);if(_0x5c0235){_0x3cc789[_0x36f650(0x138)]({'lockKey':_0x1f245b['lockKey'],'reason':_0x36f650(0x12f)});continue;}}await ensureParentDirectory(_0x1f245b[_0x36f650(0x127)]),await writeFile(_0x1f245b[_0x36f650(0x127)],_0xabff7f,_0x36f650(0x139));const _0x6302eb={'hash':_0x1104b7,'remoteId':_0x86f388['id'],'version':_0x86f388[_0x36f650(0x132)]};_0x1f245b[_0x36f650(0x147)]===_0x36f650(0x11b)&&_0x1f245b['hookLocation']&&(_0x6302eb[_0x36f650(0x10f)]=_0x1f245b[_0x36f650(0x141)]['alias'],_0x6302eb[_0x36f650(0x129)]=_0x1f245b[_0x36f650(0x141)]['datasetCode'],_0x6302eb['operationType']=_0x1f245b[_0x36f650(0x141)]['operationType'],_0x6302eb[_0x36f650(0x135)]=_0x1f245b[_0x36f650(0x141)]['functionNode']),_0x401190[_0x36f650(0x133)][_0x1f245b[_0x36f650(0x143)]]=_0x6302eb,_0x13154a[_0x36f650(0x138)]({'lockKey':_0x1f245b[_0x36f650(0x143)],'remoteId':_0x86f388['id']});}catch(_0x23c419){_0x5e5848[_0x36f650(0x138)]({'lockKey':_0x1f245b[_0x36f650(0x143)],'error':_0x23c419 instanceof Error?_0x23c419[_0x36f650(0x142)]:String(_0x23c419)});}}return _0x401190[_0x36f650(0x14a)]=new Date()[_0x36f650(0x111)](),await writeBffLockFile(_0xe79479['lockFilePath'],_0x1b0fab),{'ok':_0x5e5848[_0x36f650(0x13c)]===0x0,'data':{'pulled':_0x13154a,'skipped':_0x3cc789,'failed':_0x5e5848},'message':_0x36f650(0x144)+_0x13154a[_0x36f650(0x13c)]+_0x36f650(0x109)+_0x3cc789[_0x36f650(0x13c)]+'\x20skipped,\x20'+_0x5e5848[_0x36f650(0x13c)]+_0x36f650(0x12a)};}};async function hasUnsyncedLocalChanges(_0xac66e2,_0x2d6f7a,_0x38cf78){const _0x50941d=a36_0x40d201;if(!await fileExists(_0xac66e2))return![];const _0x188ec7=await computeFileHash(_0xac66e2);if(!_0x2d6f7a)return _0x38cf78?_0x188ec7!==_0x38cf78:!![];return _0x188ec7!==_0x2d6f7a[_0x50941d(0x12b)];}function buildDatasetCodeToAliasMap(_0x1cf09f,_0x59f6da){const _0x412b61=a36_0x40d201,_0xb1ef35=loadAliasMap(_0x1cf09f,undefined,resolveApiFilePath(_0x1cf09f,_0x59f6da));return new Map(_0xb1ef35[_0x412b61(0x10a)](_0x33e51c=>[_0x33e51c['datasetCode'],_0x33e51c[_0x412b61(0x10f)]]));}async function confirmForce(){const _0x122d92=a36_0x40d201,_0x5ed2d0=createInterface({'input':process['stdin'],'output':process[_0x122d92(0x131)]}),_0x31f536=await new Promise(_0x22b076=>{const _0x2a56c3=_0x122d92;_0x5ed2d0[_0x2a56c3(0x130)](_0x2a56c3(0x11c),_0x22b076);});return _0x5ed2d0['close'](),['y',_0x122d92(0x134)][_0x122d92(0x114)](_0x31f536[_0x122d92(0x146)]()['toLowerCase']());}
@@ -1 +1 @@
1
- const a37_0xb60557=a37_0x188b;(function(_0x23aaa2,_0x3dc299){const _0x23e117=a37_0x188b,_0x3535cb=_0x23aaa2();while(!![]){try{const _0x396a91=-parseInt(_0x23e117(0x1b4))/0x1*(-parseInt(_0x23e117(0x198))/0x2)+-parseInt(_0x23e117(0x1d4))/0x3+-parseInt(_0x23e117(0x1cd))/0x4+-parseInt(_0x23e117(0x1b1))/0x5*(-parseInt(_0x23e117(0x1bc))/0x6)+parseInt(_0x23e117(0x1d5))/0x7+parseInt(_0x23e117(0x1ba))/0x8+-parseInt(_0x23e117(0x1a0))/0x9;if(_0x396a91===_0x3dc299)break;else _0x3535cb['push'](_0x3535cb['shift']());}catch(_0x32652e){_0x3535cb['push'](_0x3535cb['shift']());}}}(a37_0x1ed3,0x2efdd));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a37_0x188b(_0x21a359,_0x1f5847){_0x21a359=_0x21a359-0x18c;const _0x1ed347=a37_0x1ed3();let _0x188be2=_0x1ed347[_0x21a359];return _0x188be2;}function a37_0x1ed3(){const _0x4cd972=['lockFilePath','remoteId','filePath','functionNode','values','62415IIveLv','1737638qfQGKV','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','code',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','description','lockKey','\x22\x20not\x20found\x20after\x20ensureLockScope.','str','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','map','force','HOOK','apiDir','datasetCode','operationType','COMMON','\x20uploaded,\x20','status','would_push','Local\x20function\x20not\x20found:\x20','bool','/api/management/library/scripts/save','371036sIayjV','some','create','lastSync','filter','hash','get','attempted','5284350EemGTp','functions','\x20failed,\x20','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','Push\x20complete:\x20','Run\x20`','type','script','Incomplete\x20HOOK\x20path:\x20','runtime\x20cache\x20not\x20needed','push','runtime\x20cache\x20clear\x20failed','datasetId','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Push\x20only\x20this\x20script\x20type','unchanged','datasetCodeToDataset','189795vmeUKD','string','set','1eYltnB','every','apps','stringify','No\x20local\x20BFF\x20functions\x20found.','Force\x20push\x20ignoring\x20hash\x20protection','2985048PlcrgL','message','30dkiyOH','ENDPOINT','name','POST','has','cleared','validation','Runtime\x20script\x20cache\x20cleared.','scriptsRoot','\x20skipped,\x20','appCode','\x22.\x20','version','utf8','aliasToDatasetCode','Push\x20local\x20BFF\x20scripts\x20to\x20remote','length','784984iFHkYr','alias'];a37_0x1ed3=function(){return _0x4cd972;};return a37_0x1ed3();}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':'bff','command':a37_0xb60557(0x1aa),'description':a37_0xb60557(0x1cb),'risk':'high-risk-write','flags':[{'name':a37_0xb60557(0x1a6),'type':a37_0xb60557(0x1b2),'description':a37_0xb60557(0x1ae),'enum':[a37_0xb60557(0x191),a37_0xb60557(0x1bd),a37_0xb60557(0x18d)]},{'name':a37_0xb60557(0x1be),'type':a37_0xb60557(0x1b2),'description':a37_0xb60557(0x1dd)},{'name':a37_0xb60557(0x18c),'type':'boolean','description':a37_0xb60557(0x1b9)}],async 'dryRun'(_0x2664a2){const _0x3021ad=a37_0xb60557,_0x12d1c2=loadBffProjectConfig(_0x2664a2['appCode']),_0x1393e1=await readBffLockFile(_0x12d1c2[_0x3021ad(0x1cf)]),{appLock:_0x90da3b}=ensureLockScope(_0x1393e1??createEmptyBffLock(),_0x2664a2[_0x3021ad(0x1c6)],_0x12d1c2[_0x3021ad(0x1c4)],_0x3021ad(0x1aa)),_0x2da0fd=await getTargetFunctions(_0x12d1c2,_0x2664a2),_0x5c4751=_0x2664a2[_0x3021ad(0x196)](_0x3021ad(0x18c)),_0x42bcbe=[];for(const _0x1611db of _0x2da0fd){const _0x25ed14=await computeFileHash(_0x1611db[_0x3021ad(0x1d1)]),_0x230717=_0x90da3b[_0x3021ad(0x1a1)][_0x1611db[_0x3021ad(0x1da)]],_0x556036=!!_0x230717&&_0x230717[_0x3021ad(0x19d)]===_0x25ed14;_0x42bcbe[_0x3021ad(0x1aa)]({'lockKey':_0x1611db[_0x3021ad(0x1da)],'filePath':_0x1611db['filePath'],'remoteId':_0x230717?.[_0x3021ad(0x1d0)]??null,'mode':_0x230717?.['remoteId']?'update':_0x3021ad(0x19a),'status':!_0x5c4751&&_0x556036?'unchanged':_0x3021ad(0x194)});}return{'method':_0x3021ad(0x1bf),'url':_0x3021ad(0x197),'body':{'appCode':_0x2664a2[_0x3021ad(0x1c6)],'force':_0x5c4751,'files':_0x42bcbe,'cacheClearAtRuntime':_0x42bcbe[_0x3021ad(0x199)](_0x149bc7=>_0x149bc7[_0x3021ad(0x193)]===_0x3021ad(0x194)),'cacheClearAtRuntimeTimes':_0x42bcbe['some'](_0xcd0b1d=>_0xcd0b1d[_0x3021ad(0x193)]===_0x3021ad(0x194))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x42bcbe[_0x3021ad(0x1cc)]+_0x3021ad(0x1d6)};},async 'execute'(_0x4b6afd){const _0x4118e5=a37_0xb60557,_0x5718f6=loadBffProjectConfig(_0x4b6afd['appCode']),_0x12579e=await readBffLockFile(_0x5718f6[_0x4118e5(0x1cf)]),{lockData:_0x539a5a,appLock:_0x496388}=ensureLockScope(_0x12579e??createEmptyBffLock(),_0x4b6afd[_0x4118e5(0x1c6)],_0x5718f6[_0x4118e5(0x1c4)],_0x4118e5(0x1aa)),_0x4cae7a=await getTargetFunctions(_0x5718f6,_0x4b6afd);if(_0x4cae7a['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4118e5(0x1b8)};const _0xd8030d=_0x4b6afd[_0x4118e5(0x196)](_0x4118e5(0x18c)),_0x1ad0b7=JSON['parse'](JSON[_0x4118e5(0x1b7)](_0x539a5a)),_0x5041b3=_0x1ad0b7[_0x4118e5(0x1b6)][_0x4b6afd[_0x4118e5(0x1c6)]];if(!_0x5041b3)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x4b6afd['appCode']+_0x4118e5(0x1db));const _0x5901e4=await buildHookMaps(_0x4b6afd[_0x4118e5(0x1c6)],_0x4b6afd[_0x4118e5(0x18e)],_0x4cae7a,_0x5041b3),_0x88a128=[],_0x28dcaa=[],_0x192ad1=[];for(const _0x5a440b of _0x4cae7a){const _0x1b69bd=await computeFileHash(_0x5a440b[_0x4118e5(0x1d1)]),_0x3215dc=_0x5041b3[_0x4118e5(0x1a1)][_0x5a440b[_0x4118e5(0x1da)]];if(!_0xd8030d&&_0x3215dc&&_0x3215dc['hash']===_0x1b69bd){_0x28dcaa[_0x4118e5(0x1aa)]({'lockKey':_0x5a440b[_0x4118e5(0x1da)],'reason':_0x4118e5(0x1af)});continue;}try{await uploadSingleFunction(_0x4b6afd[_0x4118e5(0x1c6)],_0x5a440b,_0x5041b3,_0x5901e4);const _0x5e0c17=_0x5041b3[_0x4118e5(0x1a1)][_0x5a440b[_0x4118e5(0x1da)]];_0x88a128[_0x4118e5(0x1aa)]({'lockKey':_0x5a440b[_0x4118e5(0x1da)],'remoteId':_0x5e0c17?.[_0x4118e5(0x1d0)]??0x0});}catch(_0x17c617){_0x192ad1[_0x4118e5(0x1aa)]({'lockKey':_0x5a440b[_0x4118e5(0x1da)],'error':_0x17c617 instanceof Error?_0x17c617[_0x4118e5(0x1bb)]:String(_0x17c617)});}}_0x5041b3[_0x4118e5(0x19b)]=new Date()['toISOString'](),await writeBffLockFile(_0x5718f6['lockFilePath'],_0x1ad0b7),await waitForUploadedLockEntries(_0x5718f6['lockFilePath'],_0x4b6afd[_0x4118e5(0x1c6)],_0x88a128[_0x4118e5(0x1de)](_0x2e12a5=>_0x2e12a5[_0x4118e5(0x1da)]));let _0x26832d={'attempted':![],'cleared':![]};if(_0x88a128['length']>0x0)try{let _0x15c88b='';for(let _0x359a27=0x0;_0x359a27<CACHE_CLEAR_ATTEMPTS;_0x359a27+=0x1){_0x15c88b=await clearBffScriptCache(),_0x359a27<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x26832d={'attempted':!![],'cleared':!![],'message':_0x15c88b||_0x4118e5(0x1c3)};}catch(_0x45d3b8){_0x26832d={'attempted':!![],'cleared':![],'error':_0x45d3b8 instanceof Error?_0x45d3b8[_0x4118e5(0x1bb)]:String(_0x45d3b8)};}const _0x1611e4=_0x192ad1[_0x4118e5(0x1cc)]===0x0&&(_0x26832d[_0x4118e5(0x19f)]?_0x26832d[_0x4118e5(0x1c1)]:!![]),_0xecc9f3=_0x26832d['attempted']?_0x26832d['cleared']?'runtime\x20cache\x20cleared':_0x4118e5(0x1ab):_0x4118e5(0x1a9);return{'ok':_0x1611e4,'data':{'uploaded':_0x88a128,'skipped':_0x28dcaa,'failed':_0x192ad1,'cacheClear':_0x26832d},'message':_0x4118e5(0x1a4)+_0x88a128['length']+_0x4118e5(0x192)+_0x28dcaa[_0x4118e5(0x1cc)]+_0x4118e5(0x1c5)+_0x192ad1[_0x4118e5(0x1cc)]+_0x4118e5(0x1a2)+_0xecc9f3};}};async function getTargetFunctions(_0x130245,_0x40b4b6){const _0x3dda71=a37_0xb60557,_0x1eb763=_0x40b4b6[_0x3dda71(0x1dc)]('type'),_0x5c9730=_0x40b4b6['str'](_0x3dda71(0x1be)),_0xd3b0ac=normalizeBffType(_0x1eb763)??undefined;if(_0x5c9730&&!_0xd3b0ac)throw CliErrors[_0x3dda71(0x1c2)](_0x3dda71(0x1ad));const _0xa8dd16=await scanLocalBffFunctions(_0x130245,_0xd3b0ac);if(_0x5c9730){const _0x1b1ca4=_0xa8dd16[_0x3dda71(0x19c)](_0x3c23fe=>_0x3c23fe[_0x3dda71(0x1be)]===_0x5c9730);if(_0x1b1ca4['length']===0x0)throw CliErrors['validation'](_0x3dda71(0x195)+_0xd3b0ac+'/'+_0x5c9730);return _0x1b1ca4;}return _0xa8dd16;}async function buildHookMaps(_0x232ec0,_0x5297d5,_0x2e3923,_0x46b12d){const _0x3f883f=a37_0xb60557,_0x104df1=_0x2e3923[_0x3f883f(0x199)](_0xf934ec=>_0xf934ec['type']===_0x3f883f(0x18d));if(!_0x104df1)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x234ae0=loadAliasMap(_0x5297d5,undefined,resolveApiFilePath(_0x5297d5,_0x232ec0)),_0x37dccb=new Map(_0x234ae0[_0x3f883f(0x1de)](_0x39d337=>[_0x39d337[_0x3f883f(0x1ce)],_0x39d337['datasetCode']]));for(const _0x496a01 of Object[_0x3f883f(0x1d3)](_0x46b12d[_0x3f883f(0x1a1)])){_0x496a01[_0x3f883f(0x1ce)]&&_0x496a01[_0x3f883f(0x18f)]&&!_0x37dccb[_0x3f883f(0x1c0)](_0x496a01[_0x3f883f(0x1ce)])&&_0x37dccb[_0x3f883f(0x1b3)](_0x496a01['alias'],_0x496a01[_0x3f883f(0x18f)]);}const _0x3bd289=await listDatasets(_0x232ec0),_0x4c9978=new Map(_0x3bd289[_0x3f883f(0x1de)](_0x426982=>[_0x426982[_0x3f883f(0x1d7)],_0x426982]));return{'aliasToDatasetCode':_0x37dccb,'datasetCodeToDataset':_0x4c9978};}async function uploadSingleFunction(_0x5e1ab7,_0x48381b,_0x452fe4,_0x5b5ca4){const _0x32f8c1=a37_0xb60557,_0x5454d4=await readFile(_0x48381b['filePath'],_0x32f8c1(0x1c9)),_0x5ac0bc=await computeFileHash(_0x48381b[_0x32f8c1(0x1d1)]),_0x2093ee=_0x452fe4[_0x32f8c1(0x1a1)][_0x48381b[_0x32f8c1(0x1da)]];if(_0x2093ee?.[_0x32f8c1(0x1d0)]&&_0x2093ee[_0x32f8c1(0x1c8)]==null)throw CliErrors[_0x32f8c1(0x1c2)](_0x48381b[_0x32f8c1(0x1da)]+_0x32f8c1(0x1d8));let _0x2075f7=extractScriptDescription(_0x5454d4);if(!_0x2075f7&&_0x2093ee?.[_0x32f8c1(0x1d0)]){const _0x4832fa=await getBffScriptInfo(_0x2093ee['remoteId']);_0x2075f7=_0x4832fa[_0x32f8c1(0x1d9)]||undefined;}const _0x2724bd={'appCode':_0x5e1ab7,'functionName':_0x48381b[_0x32f8c1(0x1be)],'scriptType':_0x48381b[_0x32f8c1(0x1a6)],'scriptContent':_0x5454d4};if(_0x2093ee?.['remoteId'])_0x2724bd['id']=_0x2093ee['remoteId'];if(_0x2093ee?.[_0x32f8c1(0x1c8)]!=null)_0x2724bd[_0x32f8c1(0x1c8)]=_0x2093ee[_0x32f8c1(0x1c8)];if(_0x2075f7)_0x2724bd[_0x32f8c1(0x1d9)]=_0x2075f7;if(_0x48381b[_0x32f8c1(0x1a6)]===_0x32f8c1(0x18d)){const _0x503b80=_0x48381b[_0x32f8c1(0x1ce)];if(!_0x503b80||!_0x48381b['operationType']||!_0x48381b['functionNode'])throw CliErrors[_0x32f8c1(0x1c2)](_0x32f8c1(0x1a8)+_0x48381b[_0x32f8c1(0x1da)]);const _0x2bf758=_0x5b5ca4[_0x32f8c1(0x1ca)][_0x32f8c1(0x19e)](_0x503b80)??_0x2093ee?.['datasetCode']??_0x503b80,_0xedb55b=_0x5b5ca4[_0x32f8c1(0x1b0)][_0x32f8c1(0x19e)](_0x2bf758);if(!_0xedb55b)throw CliErrors[_0x32f8c1(0x1c2)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x503b80+_0x32f8c1(0x1c7)+(_0x32f8c1(0x1a5)+CLI_BIN_NAME+_0x32f8c1(0x1a3)));_0x2724bd[_0x32f8c1(0x1ac)]=_0xedb55b['id'],_0x2724bd[_0x32f8c1(0x190)]=_0x48381b['operationType'],_0x2724bd[_0x32f8c1(0x1d2)]=_0x48381b[_0x32f8c1(0x1d2)];}const _0x2de728=await saveBffScript(_0x2724bd),_0x365367=_0x2de728['id'],_0x2ba464=_0x2de728[_0x32f8c1(0x1a7)]??await getBffScriptInfo(_0x365367),_0xbef901={'hash':_0x5ac0bc,'remoteId':_0x365367,'version':_0x2ba464[_0x32f8c1(0x1c8)]};if(_0x48381b[_0x32f8c1(0x1a6)]===_0x32f8c1(0x18d)){const _0x4cb8a4=_0x48381b[_0x32f8c1(0x1ce)],_0x20f107=_0x5b5ca4[_0x32f8c1(0x1ca)]['get'](_0x4cb8a4)??_0x2093ee?.['datasetCode']??_0x4cb8a4;_0x5b5ca4[_0x32f8c1(0x1ca)][_0x32f8c1(0x1c0)](_0x4cb8a4)?_0xbef901[_0x32f8c1(0x1ce)]=_0x4cb8a4:_0xbef901[_0x32f8c1(0x1ce)]=_0x2093ee?.['alias'],_0xbef901[_0x32f8c1(0x18f)]=_0x20f107,_0xbef901['operationType']=_0x48381b[_0x32f8c1(0x190)],_0xbef901[_0x32f8c1(0x1d2)]=_0x48381b[_0x32f8c1(0x1d2)];}_0x452fe4[_0x32f8c1(0x1a1)][_0x48381b[_0x32f8c1(0x1da)]]=_0xbef901;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5c2d22,_0x4d6bf0,_0x5dbef7){const _0x5d3d70=a37_0xb60557;if(_0x5dbef7['length']===0x0)return;for(let _0x228857=0x0;_0x228857<LOCK_SETTLE_RETRY_COUNT;_0x228857+=0x1){const _0x542010=await readBffLockFile(_0x5c2d22),_0x344bfd=_0x542010?.['apps']?.[_0x4d6bf0]?.['functions']??{},_0x46393=_0x5dbef7[_0x5d3d70(0x1b5)](_0x2471b0=>!!_0x344bfd[_0x2471b0]?.[_0x5d3d70(0x1d0)]);if(_0x46393)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x5dbef7['join'](',\x20')+'.');}
1
+ const a37_0x6d6115=a37_0x51bf;(function(_0x1d1124,_0x9abe8){const _0x182f4c=a37_0x51bf,_0x57c71b=_0x1d1124();while(!![]){try{const _0x20cd21=parseInt(_0x182f4c(0x1d8))/0x1*(parseInt(_0x182f4c(0x1c0))/0x2)+parseInt(_0x182f4c(0x1b7))/0x3+-parseInt(_0x182f4c(0x1ca))/0x4+-parseInt(_0x182f4c(0x1db))/0x5+-parseInt(_0x182f4c(0x1fc))/0x6*(-parseInt(_0x182f4c(0x1b0))/0x7)+parseInt(_0x182f4c(0x1d7))/0x8*(-parseInt(_0x182f4c(0x1c3))/0x9)+parseInt(_0x182f4c(0x1b2))/0xa*(-parseInt(_0x182f4c(0x1e8))/0xb);if(_0x20cd21===_0x9abe8)break;else _0x57c71b['push'](_0x57c71b['shift']());}catch(_0x41da03){_0x57c71b['push'](_0x57c71b['shift']());}}}(a37_0x2fc3,0x6fa4d));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';function a37_0x2fc3(){const _0xcb3b4=['has','runtime\x20cache\x20clear\x20failed','hash','alias','Local\x20function\x20not\x20found:\x20','lockFilePath','cleared','datasetCode','validation','635056iTFZfP','1814lvTBRi','\x20skipped,\x20','datasetCodeToDataset','2053985gWCSrb','length','Push\x20local\x20BFF\x20scripts\x20to\x20remote','values','HOOK','Push\x20complete:\x20','push','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','join','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Runtime\x20script\x20cache\x20cleared.','type','some','363TgucBA','Push\x20only\x20this\x20script\x20type','Run\x20`','parse','str','lockKey','Force\x20push\x20ignoring\x20hash\x20protection','map','/api/management/library/scripts/save','code','\x20uploaded,\x20','scriptsRoot','force','ENDPOINT','utf8','version','would_push','datasetId','functionNode','\x22\x20not\x20found\x20after\x20ensureLockScope.','12414DhMvIV','filter','lastSync','get','remoteId','high-risk-write','343wcevEg','every','12030NknYhH','Incomplete\x20HOOK\x20path:\x20','unchanged','functions','script','2459787DsrXMI','aliasToDatasetCode','status','Would\x20inspect\x20','apiDir','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','Cannot\x20resolve\x20dataset\x20for\x20\x22','name','filePath','808yKZVKQ','description','No\x20local\x20BFF\x20functions\x20found.','81fCHSBT','runtime\x20cache\x20cleared','attempted','bool','\x22.\x20','set','message','127756yqklOv','operationType','runtime\x20cache\x20not\x20needed','appCode'];a37_0x2fc3=function(){return _0xcb3b4;};return a37_0x2fc3();}import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a37_0x6d6115(0x1e1),'description':a37_0x6d6115(0x1dd),'risk':a37_0x6d6115(0x1af),'flags':[{'name':'type','type':'string','description':a37_0x6d6115(0x1e9),'enum':['COMMON',a37_0x6d6115(0x1f5),'HOOK']},{'name':'name','type':'string','description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0x6d6115(0x1f4),'type':'boolean','description':a37_0x6d6115(0x1ee)}],async 'dryRun'(_0x461414){const _0x2ef1d2=a37_0x6d6115,_0x52c095=loadBffProjectConfig(_0x461414[_0x2ef1d2(0x1cd)]),_0x4c65f4=await readBffLockFile(_0x52c095[_0x2ef1d2(0x1d3)]),{appLock:_0xf77437}=ensureLockScope(_0x4c65f4??createEmptyBffLock(),_0x461414[_0x2ef1d2(0x1cd)],_0x52c095[_0x2ef1d2(0x1f3)],_0x2ef1d2(0x1e1)),_0x48c11d=await getTargetFunctions(_0x52c095,_0x461414),_0x123352=_0x461414[_0x2ef1d2(0x1c6)](_0x2ef1d2(0x1f4)),_0x85169a=[];for(const _0x21f729 of _0x48c11d){const _0x2f1b46=await computeFileHash(_0x21f729[_0x2ef1d2(0x1bf)]),_0x45d56c=_0xf77437[_0x2ef1d2(0x1b5)][_0x21f729['lockKey']],_0x31c00b=!!_0x45d56c&&_0x45d56c[_0x2ef1d2(0x1d0)]===_0x2f1b46;_0x85169a[_0x2ef1d2(0x1e1)]({'lockKey':_0x21f729[_0x2ef1d2(0x1ed)],'filePath':_0x21f729[_0x2ef1d2(0x1bf)],'remoteId':_0x45d56c?.[_0x2ef1d2(0x200)]??null,'mode':_0x45d56c?.[_0x2ef1d2(0x200)]?'update':'create','status':!_0x123352&&_0x31c00b?_0x2ef1d2(0x1b4):_0x2ef1d2(0x1f8)});}return{'method':'POST','url':_0x2ef1d2(0x1f0),'body':{'appCode':_0x461414[_0x2ef1d2(0x1cd)],'force':_0x123352,'files':_0x85169a,'cacheClearAtRuntime':_0x85169a[_0x2ef1d2(0x1e7)](_0x343e62=>_0x343e62[_0x2ef1d2(0x1b9)]==='would_push'),'cacheClearAtRuntimeTimes':_0x85169a[_0x2ef1d2(0x1e7)](_0x3f4ab5=>_0x3f4ab5[_0x2ef1d2(0x1b9)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x2ef1d2(0x1ba)+_0x85169a[_0x2ef1d2(0x1dc)]+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x1787fd){const _0x3aa2e2=a37_0x6d6115,_0x2c0920=loadBffProjectConfig(_0x1787fd[_0x3aa2e2(0x1cd)]),_0x5c274a=await readBffLockFile(_0x2c0920[_0x3aa2e2(0x1d3)]),{lockData:_0x1bf4f7,appLock:_0x5374df}=ensureLockScope(_0x5c274a??createEmptyBffLock(),_0x1787fd[_0x3aa2e2(0x1cd)],_0x2c0920[_0x3aa2e2(0x1f3)],_0x3aa2e2(0x1e1)),_0x8f5538=await getTargetFunctions(_0x2c0920,_0x1787fd);if(_0x8f5538[_0x3aa2e2(0x1dc)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x3aa2e2(0x1c2)};const _0x3496db=_0x1787fd['bool']('force'),_0x2c4e52=JSON[_0x3aa2e2(0x1eb)](JSON['stringify'](_0x1bf4f7)),_0x1bf952=_0x2c4e52['apps'][_0x1787fd[_0x3aa2e2(0x1cd)]];if(!_0x1bf952)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x1787fd[_0x3aa2e2(0x1cd)]+_0x3aa2e2(0x1fb));const _0x3a9bbc=await buildHookMaps(_0x1787fd[_0x3aa2e2(0x1cd)],_0x1787fd[_0x3aa2e2(0x1bb)],_0x8f5538,_0x1bf952),_0x8e1f68=[],_0x2c02f8=[],_0x8958db=[];for(const _0x3fc767 of _0x8f5538){const _0x56100b=await computeFileHash(_0x3fc767[_0x3aa2e2(0x1bf)]),_0x3810fd=_0x1bf952[_0x3aa2e2(0x1b5)][_0x3fc767[_0x3aa2e2(0x1ed)]];if(!_0x3496db&&_0x3810fd&&_0x3810fd[_0x3aa2e2(0x1d0)]===_0x56100b){_0x2c02f8[_0x3aa2e2(0x1e1)]({'lockKey':_0x3fc767[_0x3aa2e2(0x1ed)],'reason':_0x3aa2e2(0x1b4)});continue;}try{await uploadSingleFunction(_0x1787fd[_0x3aa2e2(0x1cd)],_0x3fc767,_0x1bf952,_0x3a9bbc);const _0x13c47e=_0x1bf952[_0x3aa2e2(0x1b5)][_0x3fc767[_0x3aa2e2(0x1ed)]];_0x8e1f68[_0x3aa2e2(0x1e1)]({'lockKey':_0x3fc767[_0x3aa2e2(0x1ed)],'remoteId':_0x13c47e?.[_0x3aa2e2(0x200)]??0x0});}catch(_0x553600){_0x8958db['push']({'lockKey':_0x3fc767[_0x3aa2e2(0x1ed)],'error':_0x553600 instanceof Error?_0x553600[_0x3aa2e2(0x1c9)]:String(_0x553600)});}}_0x1bf952[_0x3aa2e2(0x1fe)]=new Date()['toISOString'](),await writeBffLockFile(_0x2c0920[_0x3aa2e2(0x1d3)],_0x2c4e52),await waitForUploadedLockEntries(_0x2c0920[_0x3aa2e2(0x1d3)],_0x1787fd[_0x3aa2e2(0x1cd)],_0x8e1f68[_0x3aa2e2(0x1ef)](_0x324f87=>_0x324f87[_0x3aa2e2(0x1ed)]));let _0x55b83b={'attempted':![],'cleared':![]};if(_0x8e1f68[_0x3aa2e2(0x1dc)]>0x0)try{let _0x167cad='';for(let _0x401896=0x0;_0x401896<CACHE_CLEAR_ATTEMPTS;_0x401896+=0x1){_0x167cad=await clearBffScriptCache(),_0x401896<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x55b83b={'attempted':!![],'cleared':!![],'message':_0x167cad||_0x3aa2e2(0x1e5)};}catch(_0x334376){_0x55b83b={'attempted':!![],'cleared':![],'error':_0x334376 instanceof Error?_0x334376['message']:String(_0x334376)};}const _0x3598d3=_0x8958db['length']===0x0&&(_0x55b83b[_0x3aa2e2(0x1c5)]?_0x55b83b[_0x3aa2e2(0x1d4)]:!![]),_0x1cd849=_0x55b83b['attempted']?_0x55b83b[_0x3aa2e2(0x1d4)]?_0x3aa2e2(0x1c4):_0x3aa2e2(0x1cf):_0x3aa2e2(0x1cc);return{'ok':_0x3598d3,'data':{'uploaded':_0x8e1f68,'skipped':_0x2c02f8,'failed':_0x8958db,'cacheClear':_0x55b83b},'message':_0x3aa2e2(0x1e0)+_0x8e1f68[_0x3aa2e2(0x1dc)]+_0x3aa2e2(0x1f2)+_0x2c02f8['length']+_0x3aa2e2(0x1d9)+_0x8958db['length']+'\x20failed,\x20'+_0x1cd849};}};async function getTargetFunctions(_0x3f2a93,_0x12953e){const _0x15a08b=a37_0x6d6115,_0x335c14=_0x12953e[_0x15a08b(0x1ec)]('type'),_0x3d450f=_0x12953e['str'](_0x15a08b(0x1be)),_0x41f9ff=normalizeBffType(_0x335c14)??undefined;if(_0x3d450f&&!_0x41f9ff)throw CliErrors[_0x15a08b(0x1d6)](_0x15a08b(0x1e4));const _0x3c31da=await scanLocalBffFunctions(_0x3f2a93,_0x41f9ff);if(_0x3d450f){const _0x5cb874=_0x3c31da[_0x15a08b(0x1fd)](_0x5a5574=>_0x5a5574['name']===_0x3d450f);if(_0x5cb874[_0x15a08b(0x1dc)]===0x0)throw CliErrors[_0x15a08b(0x1d6)](_0x15a08b(0x1d2)+_0x41f9ff+'/'+_0x3d450f);return _0x5cb874;}return _0x3c31da;}async function buildHookMaps(_0x1bac1a,_0x44ad23,_0x2f6127,_0x574aa8){const _0x1bee98=a37_0x6d6115,_0x5270e0=_0x2f6127[_0x1bee98(0x1e7)](_0x28c431=>_0x28c431['type']===_0x1bee98(0x1df));if(!_0x5270e0)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x46ea89=loadAliasMap(_0x44ad23,undefined,resolveApiFilePath(_0x44ad23,_0x1bac1a)),_0xed1738=new Map(_0x46ea89[_0x1bee98(0x1ef)](_0x3f04f7=>[_0x3f04f7['alias'],_0x3f04f7[_0x1bee98(0x1d5)]]));for(const _0x3e02ac of Object[_0x1bee98(0x1de)](_0x574aa8['functions'])){_0x3e02ac[_0x1bee98(0x1d1)]&&_0x3e02ac['datasetCode']&&!_0xed1738[_0x1bee98(0x1ce)](_0x3e02ac['alias'])&&_0xed1738[_0x1bee98(0x1c8)](_0x3e02ac[_0x1bee98(0x1d1)],_0x3e02ac[_0x1bee98(0x1d5)]);}const _0x33274b=await listDatasets(_0x1bac1a),_0x37a8e4=new Map(_0x33274b[_0x1bee98(0x1ef)](_0x413546=>[_0x413546[_0x1bee98(0x1f1)],_0x413546]));return{'aliasToDatasetCode':_0xed1738,'datasetCodeToDataset':_0x37a8e4};}async function uploadSingleFunction(_0x54a1ea,_0x1b8a06,_0xc65c56,_0x39fdbf){const _0x2def43=a37_0x6d6115,_0x6572ec=await readFile(_0x1b8a06[_0x2def43(0x1bf)],_0x2def43(0x1f6)),_0x29a27d=await computeFileHash(_0x1b8a06['filePath']),_0x2331a1=_0xc65c56[_0x2def43(0x1b5)][_0x1b8a06[_0x2def43(0x1ed)]];if(_0x2331a1?.[_0x2def43(0x200)]&&_0x2331a1[_0x2def43(0x1f7)]==null)throw CliErrors[_0x2def43(0x1d6)](_0x1b8a06['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x2683f6=extractScriptDescription(_0x6572ec);if(!_0x2683f6&&_0x2331a1?.[_0x2def43(0x200)]){const _0x2e04ae=await getBffScriptInfo(_0x2331a1[_0x2def43(0x200)]);_0x2683f6=_0x2e04ae[_0x2def43(0x1c1)]||undefined;}const _0x469aff={'appCode':_0x54a1ea,'functionName':_0x1b8a06['name'],'scriptType':_0x1b8a06[_0x2def43(0x1e6)],'scriptContent':_0x6572ec};if(_0x2331a1?.[_0x2def43(0x200)])_0x469aff['id']=_0x2331a1[_0x2def43(0x200)];if(_0x2331a1?.[_0x2def43(0x1f7)]!=null)_0x469aff[_0x2def43(0x1f7)]=_0x2331a1['version'];if(_0x2683f6)_0x469aff[_0x2def43(0x1c1)]=_0x2683f6;if(_0x1b8a06[_0x2def43(0x1e6)]===_0x2def43(0x1df)){const _0x2c14e2=_0x1b8a06[_0x2def43(0x1d1)];if(!_0x2c14e2||!_0x1b8a06[_0x2def43(0x1cb)]||!_0x1b8a06[_0x2def43(0x1fa)])throw CliErrors[_0x2def43(0x1d6)](_0x2def43(0x1b3)+_0x1b8a06[_0x2def43(0x1ed)]);const _0xd2b3db=_0x39fdbf[_0x2def43(0x1b8)]['get'](_0x2c14e2)??_0x2331a1?.[_0x2def43(0x1d5)]??_0x2c14e2,_0x41020d=_0x39fdbf[_0x2def43(0x1da)][_0x2def43(0x1ff)](_0xd2b3db);if(!_0x41020d)throw CliErrors[_0x2def43(0x1d6)](_0x2def43(0x1bd)+_0x2c14e2+_0x2def43(0x1c7)+(_0x2def43(0x1ea)+CLI_BIN_NAME+_0x2def43(0x1bc)));_0x469aff[_0x2def43(0x1f9)]=_0x41020d['id'],_0x469aff[_0x2def43(0x1cb)]=_0x1b8a06[_0x2def43(0x1cb)],_0x469aff[_0x2def43(0x1fa)]=_0x1b8a06['functionNode'];}const _0x434858=await saveBffScript(_0x469aff),_0x587e2c=_0x434858['id'],_0x3cc2c0=_0x434858[_0x2def43(0x1b6)]??await getBffScriptInfo(_0x587e2c),_0x199df5={'hash':_0x29a27d,'remoteId':_0x587e2c,'version':_0x3cc2c0[_0x2def43(0x1f7)]};if(_0x1b8a06[_0x2def43(0x1e6)]===_0x2def43(0x1df)){const _0x289e1c=_0x1b8a06[_0x2def43(0x1d1)],_0x59fc3b=_0x39fdbf[_0x2def43(0x1b8)]['get'](_0x289e1c)??_0x2331a1?.[_0x2def43(0x1d5)]??_0x289e1c;_0x39fdbf['aliasToDatasetCode'][_0x2def43(0x1ce)](_0x289e1c)?_0x199df5[_0x2def43(0x1d1)]=_0x289e1c:_0x199df5[_0x2def43(0x1d1)]=_0x2331a1?.[_0x2def43(0x1d1)],_0x199df5[_0x2def43(0x1d5)]=_0x59fc3b,_0x199df5[_0x2def43(0x1cb)]=_0x1b8a06['operationType'],_0x199df5[_0x2def43(0x1fa)]=_0x1b8a06['functionNode'];}_0xc65c56[_0x2def43(0x1b5)][_0x1b8a06[_0x2def43(0x1ed)]]=_0x199df5;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a37_0x51bf(_0x1af4e2,_0x5c1cf1){_0x1af4e2=_0x1af4e2-0x1af;const _0x2fc3d9=a37_0x2fc3();let _0x51bf90=_0x2fc3d9[_0x1af4e2];return _0x51bf90;}async function waitForUploadedLockEntries(_0x22535d,_0x5abb78,_0x427e01){const _0x53b9b9=a37_0x6d6115;if(_0x427e01['length']===0x0)return;for(let _0x41b1af=0x0;_0x41b1af<LOCK_SETTLE_RETRY_COUNT;_0x41b1af+=0x1){const _0x1b51df=await readBffLockFile(_0x22535d),_0x48f6a1=_0x1b51df?.['apps']?.[_0x5abb78]?.[_0x53b9b9(0x1b5)]??{},_0x5ae8eb=_0x427e01[_0x53b9b9(0x1b1)](_0x2d58b7=>!!_0x48f6a1[_0x2d58b7]?.[_0x53b9b9(0x200)]);if(_0x5ae8eb)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x53b9b9(0x1e2)+_0x427e01[_0x53b9b9(0x1e3)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a38_0xa11be0=a38_0x2c9a;function a38_0x53d7(){const _0x1c517c=['\x20added,\x20','appCode','read','datasetCode','19wIHvUO','\x20unchanged','\x20modified,\x20','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','push','\x20remote-only','1010104uXYcID','alias','apiDir','15SJSBMZ','1001121hjwmYg','873786widwvi','status','lockKey','remote','scriptsRoot','74968CAhdiq','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','bff','58454XrZoyf','bool','length','filePath','all','675JWJIlM','2200702XNtjEY','503660bbqzqD'];a38_0x53d7=function(){return _0x1c517c;};return a38_0x53d7();}(function(_0x519e35,_0x341386){const _0x1d9642=a38_0x2c9a,_0x42be41=_0x519e35();while(!![]){try{const _0x3f9485=parseInt(_0x1d9642(0xc9))/0x1*(parseInt(_0x1d9642(0xbd))/0x2)+-parseInt(_0x1d9642(0xb4))/0x3+-parseInt(_0x1d9642(0xb0))/0x4*(parseInt(_0x1d9642(0xb3))/0x5)+-parseInt(_0x1d9642(0xb5))/0x6+parseInt(_0x1d9642(0xc3))/0x7+parseInt(_0x1d9642(0xba))/0x8*(parseInt(_0x1d9642(0xc2))/0x9)+parseInt(_0x1d9642(0xc4))/0xa;if(_0x3f9485===_0x341386)break;else _0x42be41['push'](_0x42be41['shift']());}catch(_0x14fac7){_0x42be41['push'](_0x42be41['shift']());}}}(a38_0x53d7,0x5e3b6));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a38_0x2c9a(_0x5012f2,_0x51e44b){_0x5012f2=_0x5012f2-0xae;const _0x53d7d1=a38_0x53d7();let _0x2c9ac8=_0x53d7d1[_0x5012f2];return _0x2c9ac8;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0xa11be0(0xbc),'command':a38_0xa11be0(0xb6),'description':a38_0xa11be0(0xcc),'risk':a38_0xa11be0(0xc7),'flags':[{'name':a38_0xa11be0(0xb8),'type':'boolean','description':a38_0xa11be0(0xbb)}],async 'execute'(_0xad90f9){const _0xbe5ad9=a38_0xa11be0,_0x51a05a=loadBffProjectConfig(_0xad90f9[_0xbe5ad9(0xc6)]),_0x296436=await readBffLockFile(_0x51a05a['lockFilePath']),{appLock:_0x4548f6}=ensureLockScope(_0x296436??createEmptyBffLock(),_0xad90f9['appCode'],_0x51a05a[_0xbe5ad9(0xb9)],_0xbe5ad9(0xb6)),_0x1338a9=await scanLocalBffFunctions(_0x51a05a),_0x577f17=[],_0x570c98=[],_0x3c161b=[];for(const _0x2e1a89 of _0x1338a9){const _0x26e9b5=await computeFileHash(_0x2e1a89[_0xbe5ad9(0xc0)]),_0x48e021=_0x4548f6['functions'][_0x2e1a89['lockKey']];if(!_0x48e021)_0x577f17['push'](_0x2e1a89[_0xbe5ad9(0xb7)]);else _0x48e021['hash']!==_0x26e9b5?_0x570c98[_0xbe5ad9(0xae)](_0x2e1a89['lockKey']):_0x3c161b[_0xbe5ad9(0xae)](_0x2e1a89[_0xbe5ad9(0xb7)]);}const _0x3bab2=[];if(_0xad90f9[_0xbe5ad9(0xbe)](_0xbe5ad9(0xb8))){const _0x1997f1=loadAliasMap(_0xad90f9[_0xbe5ad9(0xb2)],undefined,resolveApiFilePath(_0xad90f9['apiDir'],_0xad90f9[_0xbe5ad9(0xc6)])),_0xc46028=new Map(_0x1997f1['map'](_0x3ef5ac=>[_0x3ef5ac[_0xbe5ad9(0xc8)],_0x3ef5ac[_0xbe5ad9(0xb1)]])),[_0x51815c,_0x1f3d81]=await Promise[_0xbe5ad9(0xc1)]([listBffScripts(_0xad90f9[_0xbe5ad9(0xc6)]),getBffScriptStatistics(_0xad90f9['appCode'])]),_0x2ca094=createHookLocationMap(_0x1f3d81),_0x5c3225=new Set(_0x1338a9['map'](_0x297ac4=>_0x297ac4[_0xbe5ad9(0xb7)]));for(const _0x2baeaf of _0x51815c){const _0x41541e=resolveRemoteScriptTarget(_0x51a05a,_0x2baeaf,_0x2ca094,_0x4548f6['functions'],_0xc46028);_0x41541e&&!_0x5c3225['has'](_0x41541e[_0xbe5ad9(0xb7)])&&_0x3bab2[_0xbe5ad9(0xae)](_0x41541e['lockKey']);}}const _0x5bee28=_0x577f17[_0xbe5ad9(0xbf)]===0x0&&_0x570c98[_0xbe5ad9(0xbf)]===0x0&&_0x3bab2['length']===0x0;return{'ok':!![],'data':{'added':_0x577f17,'modified':_0x570c98,'unchanged':_0x3c161b,'remoteOnly':_0x3bab2},'message':_0x5bee28?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x577f17['length']+_0xbe5ad9(0xc5)+_0x570c98[_0xbe5ad9(0xbf)]+_0xbe5ad9(0xcb)+_0x3c161b[_0xbe5ad9(0xbf)]+_0xbe5ad9(0xca)+(_0x3bab2[_0xbe5ad9(0xbf)]>0x0?',\x20'+_0x3bab2[_0xbe5ad9(0xbf)]+_0xbe5ad9(0xaf):'')};}};
1
+ const a38_0x4d6839=a38_0x40ad;(function(_0x4e8adc,_0x36681e){const _0x1213af=a38_0x40ad,_0x5e5060=_0x4e8adc();while(!![]){try{const _0x37858f=-parseInt(_0x1213af(0xfe))/0x1+parseInt(_0x1213af(0xef))/0x2+-parseInt(_0x1213af(0xf4))/0x3*(parseInt(_0x1213af(0x103))/0x4)+-parseInt(_0x1213af(0xed))/0x5*(-parseInt(_0x1213af(0xfb))/0x6)+-parseInt(_0x1213af(0x10a))/0x7+parseInt(_0x1213af(0xf5))/0x8+-parseInt(_0x1213af(0x100))/0x9*(parseInt(_0x1213af(0xeb))/0xa);if(_0x37858f===_0x36681e)break;else _0x5e5060['push'](_0x5e5060['shift']());}catch(_0xffad2d){_0x5e5060['push'](_0x5e5060['shift']());}}}(a38_0x3984,0x4a3cc));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a38_0x3984(){const _0x59a669=['Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','map','124FBsIMh','appCode','remote','\x20modified,\x20','read','\x20remote-only','boolean','3704400BBqNia','datasetCode','553450teDtkJ','\x20added,\x20','1180295burWTt','all','836792svGwnj','All\x20BFF\x20scripts\x20are\x20in\x20sync.','lockKey','apiDir','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','27846SAfErb','2761192DnvBQl','has','push','lockFilePath','alias','bff','12RJFGDJ','hash','functions','59300ALomDJ','length','9hiEZxY'];a38_0x3984=function(){return _0x59a669;};return a38_0x3984();}import{loadBffProjectConfig}from'../../core/bff/config.js';function a38_0x40ad(_0xd143d5,_0x1abbad){_0xd143d5=_0xd143d5-0xeb;const _0x3984f0=a38_0x3984();let _0x40add7=_0x3984f0[_0xd143d5];return _0x40add7;}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x4d6839(0xfa),'command':'status','description':a38_0x4d6839(0x101),'risk':a38_0x4d6839(0x107),'flags':[{'name':'remote','type':a38_0x4d6839(0x109),'description':a38_0x4d6839(0xf3)}],async 'execute'(_0xfc1aec){const _0x19a160=a38_0x4d6839,_0x3f82c3=loadBffProjectConfig(_0xfc1aec[_0x19a160(0x104)]),_0x2c499d=await readBffLockFile(_0x3f82c3[_0x19a160(0xf8)]),{appLock:_0x1cea8c}=ensureLockScope(_0x2c499d??createEmptyBffLock(),_0xfc1aec[_0x19a160(0x104)],_0x3f82c3['scriptsRoot'],'status'),_0x25c068=await scanLocalBffFunctions(_0x3f82c3),_0x5aca2f=[],_0x4bdf33=[],_0x399a36=[];for(const _0x5a81fc of _0x25c068){const _0x1045e=await computeFileHash(_0x5a81fc['filePath']),_0x2f6daa=_0x1cea8c[_0x19a160(0xfd)][_0x5a81fc['lockKey']];if(!_0x2f6daa)_0x5aca2f[_0x19a160(0xf7)](_0x5a81fc[_0x19a160(0xf1)]);else _0x2f6daa[_0x19a160(0xfc)]!==_0x1045e?_0x4bdf33[_0x19a160(0xf7)](_0x5a81fc['lockKey']):_0x399a36[_0x19a160(0xf7)](_0x5a81fc[_0x19a160(0xf1)]);}const _0x1914e4=[];if(_0xfc1aec['bool'](_0x19a160(0x105))){const _0x3154c1=loadAliasMap(_0xfc1aec[_0x19a160(0xf2)],undefined,resolveApiFilePath(_0xfc1aec[_0x19a160(0xf2)],_0xfc1aec['appCode'])),_0x4450b3=new Map(_0x3154c1[_0x19a160(0x102)](_0x21daa9=>[_0x21daa9[_0x19a160(0x10b)],_0x21daa9[_0x19a160(0xf9)]])),[_0x43516e,_0xe60a9]=await Promise[_0x19a160(0xee)]([listBffScripts(_0xfc1aec[_0x19a160(0x104)]),getBffScriptStatistics(_0xfc1aec[_0x19a160(0x104)])]),_0x4d2387=createHookLocationMap(_0xe60a9),_0x4cc1a4=new Set(_0x25c068['map'](_0x594ffb=>_0x594ffb[_0x19a160(0xf1)]));for(const _0x12abc8 of _0x43516e){const _0x18e1eb=resolveRemoteScriptTarget(_0x3f82c3,_0x12abc8,_0x4d2387,_0x1cea8c[_0x19a160(0xfd)],_0x4450b3);_0x18e1eb&&!_0x4cc1a4[_0x19a160(0xf6)](_0x18e1eb[_0x19a160(0xf1)])&&_0x1914e4[_0x19a160(0xf7)](_0x18e1eb[_0x19a160(0xf1)]);}}const _0x242f81=_0x5aca2f['length']===0x0&&_0x4bdf33[_0x19a160(0xff)]===0x0&&_0x1914e4[_0x19a160(0xff)]===0x0;return{'ok':!![],'data':{'added':_0x5aca2f,'modified':_0x4bdf33,'unchanged':_0x399a36,'remoteOnly':_0x1914e4},'message':_0x242f81?_0x19a160(0xf0):_0x5aca2f[_0x19a160(0xff)]+_0x19a160(0xec)+_0x4bdf33['length']+_0x19a160(0x106)+_0x399a36[_0x19a160(0xff)]+'\x20unchanged'+(_0x1914e4[_0x19a160(0xff)]>0x0?',\x20'+_0x1914e4[_0x19a160(0xff)]+_0x19a160(0x108):'')};}};
@@ -1 +1 @@
1
- const a39_0x16c46c=a39_0x5f1a;(function(_0x38d359,_0x345bfa){const _0x21618e=a39_0x5f1a,_0x5e15c5=_0x38d359();while(!![]){try{const _0x2e5048=parseInt(_0x21618e(0x75))/0x1*(parseInt(_0x21618e(0x72))/0x2)+-parseInt(_0x21618e(0x70))/0x3+parseInt(_0x21618e(0x86))/0x4*(-parseInt(_0x21618e(0x80))/0x5)+parseInt(_0x21618e(0x6b))/0x6+parseInt(_0x21618e(0x81))/0x7+parseInt(_0x21618e(0x77))/0x8+-parseInt(_0x21618e(0x7b))/0x9*(-parseInt(_0x21618e(0x7e))/0xa);if(_0x2e5048===_0x345bfa)break;else _0x5e15c5['push'](_0x5e15c5['shift']());}catch(_0x1c37e4){_0x5e15c5['push'](_0x5e15c5['shift']());}}}(a39_0x16f7,0x76a0d));import{CliErrors}from'../../errors.js';function a39_0x16f7(){const _0x5590be=['2426170nLbroT','log','580535tdlioD','502642TeFMfS','install','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','28vxkDfJ','cli-skill-install','inherit','nonInteractive','write','2479752aAEcIh','cwd','npx\x20skills\x20add\x20failed:\x20','cli-skill','error','2496198HNfjSV','setLogPath','28572lbiqGG','skipped','unknown','49DyFdVj','info','5623896XDXFBQ','CLI\x20Built-in\x20Skill\x20installed','pipe','apiError','9NXmVva',')...','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('];a39_0x16f7=function(){return _0x5590be;};return a39_0x16f7();}import{logger}from'../../utils/logger.js';function a39_0x5f1a(_0x5b2110,_0x13b0c7){_0x5b2110=_0x5b2110-0x6a;const _0x16f758=a39_0x16f7();let _0x5f1a7d=_0x16f758[_0x5b2110];return _0x5f1a7d;}export const cliSkillDefinitions=[{'service':a39_0x16c46c(0x6e),'command':a39_0x16c46c(0x82),'description':a39_0x16c46c(0x83),'risk':a39_0x16c46c(0x6a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4624c8){const _0x3aee7f=a39_0x16c46c;logger[_0x3aee7f(0x71)](process[_0x3aee7f(0x6c)]()),logger[_0x3aee7f(0x76)](_0x3aee7f(0x87),_0x3aee7f(0x85));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x2986aa,RABETBASE_SKILL_SOURCE:_0x5cf941,runNpxSkillsAddGlobal:_0x13704f}=await import('../../skills/npx-skills-add.js'),_0x381fde=_0x4624c8[_0x3aee7f(0x89)]?_0x3aee7f(0x79):_0x3aee7f(0x88);console['log'](_0x3aee7f(0x7d)+_0x2986aa+_0x3aee7f(0x7c));const _0x476dd3=_0x13704f(process[_0x3aee7f(0x6c)](),_0x5cf941,{'stdio':_0x381fde});if(_0x476dd3[_0x3aee7f(0x73)])console[_0x3aee7f(0x7f)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x476dd3['ok'])console[_0x3aee7f(0x7f)](_0x3aee7f(0x78));else throw CliErrors[_0x3aee7f(0x7a)](_0x3aee7f(0x6d)+(_0x476dd3[_0x3aee7f(0x6f)]||_0x3aee7f(0x74)),_0x3aee7f(0x84)+_0x2986aa);}return{'ok':!![]};}}];
1
+ function a39_0x1023(){const _0x36869e=['186CUqcHQ','apiError','npx\x20skills\x20add\x20failed:\x20','24KPkSMz','6774572gqcAEe','log','1768696AXAhVU','cwd','../../skills/npx-skills-add.js','2wlTWhJ','60TtdPxU','CLI\x20Built-in\x20Skill\x20installed','46719804UlKzVf',')...','76773fbLBFq','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','108Cmzsgn','1765819xOwlae','cli-skill','install','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','pipe','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','cli-skill-install','nonInteractive','info','99335eAfJkh','1602909lzDgto','unknown'];a39_0x1023=function(){return _0x36869e;};return a39_0x1023();}const a39_0x230098=a39_0x5ab4;(function(_0x34b8aa,_0x4b3bb1){const _0x57fcd8=a39_0x5ab4,_0x332971=_0x34b8aa();while(!![]){try{const _0x4632a2=parseInt(_0x57fcd8(0x1d9))/0x1*(-parseInt(_0x57fcd8(0x1d6))/0x2)+parseInt(_0x57fcd8(0x1c1))/0x3*(parseInt(_0x57fcd8(0x1c3))/0x4)+-parseInt(_0x57fcd8(0x1cd))/0x5*(-parseInt(_0x57fcd8(0x1d0))/0x6)+-parseInt(_0x57fcd8(0x1d4))/0x7+-parseInt(_0x57fcd8(0x1d3))/0x8*(parseInt(_0x57fcd8(0x1ce))/0x9)+parseInt(_0x57fcd8(0x1bd))/0xa*(-parseInt(_0x57fcd8(0x1c4))/0xb)+parseInt(_0x57fcd8(0x1bf))/0xc;if(_0x4632a2===_0x4b3bb1)break;else _0x332971['push'](_0x332971['shift']());}catch(_0x1c31cb){_0x332971['push'](_0x332971['shift']());}}}(a39_0x1023,0xebe26));function a39_0x5ab4(_0x53fb6f,_0x5f02d8){_0x53fb6f=_0x53fb6f-0x1bd;const _0x1023ea=a39_0x1023();let _0x5ab463=_0x1023ea[_0x53fb6f];return _0x5ab463;}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x230098(0x1c5),'command':a39_0x230098(0x1c6),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3bbcce){const _0x499a35=a39_0x230098;logger['setLogPath'](process[_0x499a35(0x1d7)]()),logger[_0x499a35(0x1cc)](_0x499a35(0x1ca),_0x499a35(0x1c2));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x13fbb7,RABETBASE_SKILL_SOURCE:_0x2c971c,runNpxSkillsAddGlobal:_0x35a013}=await import(_0x499a35(0x1d8)),_0x5b525c=_0x3bbcce[_0x499a35(0x1cb)]?_0x499a35(0x1c8):'inherit';console[_0x499a35(0x1d5)](_0x499a35(0x1c7)+_0x13fbb7+_0x499a35(0x1c0));const _0xa8dea2=_0x35a013(process[_0x499a35(0x1d7)](),_0x2c971c,{'stdio':_0x5b525c});if(_0xa8dea2['skipped'])console[_0x499a35(0x1d5)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0xa8dea2['ok'])console[_0x499a35(0x1d5)](_0x499a35(0x1be));else throw CliErrors[_0x499a35(0x1d1)](_0x499a35(0x1d2)+(_0xa8dea2['error']||_0x499a35(0x1cf)),_0x499a35(0x1c9)+_0x13fbb7);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x3d4de1=a40_0x1770;(function(_0x4d1e92,_0x3060dc){const _0x234241=a40_0x1770,_0x3c919f=_0x4d1e92();while(!![]){try{const _0x587bb6=-parseInt(_0x234241(0xdd))/0x1+-parseInt(_0x234241(0xcb))/0x2+-parseInt(_0x234241(0xeb))/0x3*(-parseInt(_0x234241(0xd0))/0x4)+-parseInt(_0x234241(0xea))/0x5+-parseInt(_0x234241(0xee))/0x6+-parseInt(_0x234241(0xb8))/0x7+parseInt(_0x234241(0xda))/0x8;if(_0x587bb6===_0x3060dc)break;else _0x3c919f['push'](_0x3c919f['shift']());}catch(_0x58268f){_0x3c919f['push'](_0x3c919f['shift']());}}}(a40_0xb032,0xc5b9f));function a40_0x1770(_0x1769b1,_0x320c33){_0x1769b1=_0x1769b1-0xb3;const _0xb03255=a40_0xb032();let _0x1770d1=_0xb03255[_0x1769b1];return _0x1770d1;}import a40_0x4d0540 from'chalk';import a40_0x3fbf from'ora';import a40_0x250c65 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 _0x560717=a40_0x1770;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x560717(0xe1)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1f2ee9=a40_0x1770,_0x3c7031=process[_0x1f2ee9(0xd3)][_0x1f2ee9(0xc7)]();if(_0x3c7031[_0x1f2ee9(0xf7)](_0x1f2ee9(0xfc)))return'bun';return'npm';}const updateFlags=[{'name':a40_0x3d4de1(0xe3),'type':'boolean','description':a40_0x3d4de1(0xed),'default':![]},{'name':a40_0x3d4de1(0xf1),'type':'string','description':a40_0x3d4de1(0x104)},{'name':a40_0x3d4de1(0xf2),'type':a40_0x3d4de1(0xb6),'description':a40_0x3d4de1(0xbb),'default':![]},{'name':a40_0x3d4de1(0xbe),'type':a40_0x3d4de1(0xb6),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function a40_0xb032(){const _0xe6feca=['...','boolean','validation','1531698FOzeoM','write','start','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','\x20\x20Try\x20manually:\x20','warn','skills','cwd','nonInteractive','red','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Invalid\x20version:\x20','Updated\x20to\x20v','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','entries','toLowerCase','\x20install\x20-g\x20','Version\x20comparison\x20failed','\x20→\x20','1799564ojIaTI','/dist-tags','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Checking\x20for\x20updates...','map','720kPemHW','Update\x20failed','log','execPath','Update\x20available:\x20','@latest','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Updating\x20via\x20','https://registry.npmjs.org/-/package/','27776264lgnkuN','fromEntries','length','91759urruOe','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','gray','flag','slice','yellow','beta','Beta\x20version:\x20','fail','\x20\x20Run\x20manually:\x20','green','latest','npm','1705525TiRLhe','4971BJamnZ','error','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','8453676iuIseQ','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','update','version','no-skills','\x20cli-skill\x20install','succeed','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Requested\x20version:\x20','includes','Already\x20on\x20requested\x20version\x20(v','string','inherit','valid','bun','filter','message','Already\x20up\x20to\x20date\x20(v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Current\x20version:\x20','pipe','source','Install\x20a\x20specific\x20CLI\x20version','object','trim','bool','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','json'];a40_0xb032=function(){return _0xe6feca;};return a40_0xb032();}function getRequestedVersion(_0xc93792){const _0x4b2113=a40_0x3d4de1;return _0xc93792['str'](_0x4b2113(0xf1))[_0x4b2113(0x106)]();}function shouldSkipCliSkill(_0x4b56ac){const _0x49607f=a40_0x3d4de1;return _0x4b56ac[_0x49607f(0x107)](_0x49607f(0xf2))||_0x4b56ac[_0x49607f(0xe0)]('skills')===![];}async function validateUpdateFlags(_0x156db9){const _0x3d4ef7=a40_0x3d4de1,_0x442cdc=_0x156db9['bool'](_0x3d4ef7(0xe3)),_0x57a053=getRequestedVersion(_0x156db9);if(_0x442cdc&&_0x57a053)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x3d4ef7(0xd7));if(_0x57a053&&!a40_0x250c65[_0x3d4ef7(0xfb)](_0x57a053))throw CliErrors[_0x3d4ef7(0xb7)](_0x3d4ef7(0xc3)+_0x57a053,_0x3d4ef7(0xb3));}async function fetchNpmDistTags(){const _0x3081b7=a40_0x3d4de1;try{const _0x87abf=await fetch(_0x3081b7(0xd9)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3081b7(0xcc),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x87abf['ok'])return null;const _0x440b95=await _0x87abf[_0x3081b7(0xb4)]();if(!_0x440b95||typeof _0x440b95!==_0x3081b7(0x105))return null;return Object[_0x3081b7(0xdb)](Object[_0x3081b7(0xc6)](_0x440b95)[_0x3081b7(0xfd)](([,_0x490977])=>typeof _0x490977===_0x3081b7(0xf9)&&_0x490977[_0x3081b7(0x106)]()[_0x3081b7(0xdc)]>0x0)[_0x3081b7(0xcf)](([_0x6d027f,_0x40eba1])=>[_0x6d027f,String(_0x40eba1)[_0x3081b7(0x106)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0xa5c2e5){const _0x28af72=await fetchNpmDistTags();return _0x28af72?.[_0xa5c2e5]??null;}async function fetchLatestVersion(){const _0x28667d=a40_0x3d4de1;return fetchNpmDistTagVersion(_0x28667d(0xe8));}async function resolveTargetVersion(_0x1cf97d){const _0x2382fd=a40_0x3d4de1,_0x5d776a=getRequestedVersion(_0x1cf97d);if(_0x5d776a)return{'version':_0x5d776a,'source':_0x2382fd(0xf1)};if(_0x1cf97d[_0x2382fd(0x107)](_0x2382fd(0xe3))){const _0xeabe86=await fetchNpmDistTagVersion(_0x2382fd(0xe3));if(!_0xeabe86)return null;return{'version':_0xeabe86,'source':_0x2382fd(0xe3)};}const _0x5a1112=await fetchLatestVersion();if(!_0x5a1112)return null;return{'version':_0x5a1112,'source':_0x2382fd(0xe8)};}function shouldInstallTarget(_0x4a4367,_0xde6e4b){const _0x2241d4=a40_0x3d4de1;if(_0xde6e4b[_0x2241d4(0x103)]==='version'||_0xde6e4b[_0x2241d4(0x103)]==='beta')return!a40_0x250c65['eq'](_0x4a4367,_0xde6e4b[_0x2241d4(0xf1)]);return a40_0x250c65['lt'](_0x4a4367,_0xde6e4b['version']);}function getInstallPlanLabel(_0xf1d627,_0x1ceb06){const _0x2b396f=a40_0x3d4de1;switch(_0x1ceb06[_0x2b396f(0x103)]){case _0x2b396f(0xe3):return _0x2b396f(0xe4)+a40_0x4d0540[_0x2b396f(0xe2)](_0xf1d627)+_0x2b396f(0xca)+a40_0x4d0540['green'](_0x1ceb06[_0x2b396f(0xf1)]);case _0x2b396f(0xf1):return _0x2b396f(0xf6)+a40_0x4d0540[_0x2b396f(0xe2)](_0xf1d627)+'\x20→\x20'+a40_0x4d0540[_0x2b396f(0xe7)](_0x1ceb06['version']);case'latest':default:return _0x2b396f(0xd4)+a40_0x4d0540['yellow'](_0xf1d627)+_0x2b396f(0xca)+a40_0x4d0540['green'](_0x1ceb06['version']);}}async function installCliSkill(_0x3aa08b){const _0x15c7ea=a40_0x3d4de1;console['log'](a40_0x4d0540[_0x15c7ea(0xdf)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x2d5537=runNpxSkillsAddGlobal(process[_0x15c7ea(0xbf)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x3aa08b?_0x15c7ea(0x102):_0x15c7ea(0xfa)});if(_0x2d5537['skipped']){console[_0x15c7ea(0xd2)](a40_0x4d0540['gray'](_0x15c7ea(0xd6)));return;}if(_0x2d5537['ok']){console[_0x15c7ea(0xd2)](a40_0x4d0540[_0x15c7ea(0xdf)](_0x15c7ea(0xc5)));return;}console[_0x15c7ea(0xbd)](a40_0x4d0540['yellow']('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x2d5537['error']||'unknown'))),console[_0x15c7ea(0xd2)](a40_0x4d0540[_0x15c7ea(0xdf)](_0x15c7ea(0xe6)+CLI_BIN_NAME+_0x15c7ea(0xf3)));}async function execute(_0x44317a){const _0x3caccc=a40_0x3d4de1;await validateUpdateFlags(_0x44317a);const _0x44af32=getCurrentVersion();console[_0x3caccc(0xd2)](_0x3caccc(0x101)+_0x44af32);const _0x341c2d=a40_0x3fbf(_0x3caccc(0xce))[_0x3caccc(0xba)](),_0x3c1db3=await resolveTargetVersion(_0x44317a);if(!_0x3c1db3){const _0x42f499=_0x44317a['bool'](_0x3caccc(0xe3))?_0x3caccc(0xc2):_0x3caccc(0xf5);return _0x341c2d[_0x3caccc(0xe5)](_0x42f499),console[_0x3caccc(0xd2)](a40_0x4d0540['gray'](_0x3caccc(0xde)+NPM_PACKAGE_NAME+_0x3caccc(0xd5))),{'ok':![],'message':_0x42f499};}const _0x15885a=a40_0x250c65['valid'](VERSION),_0x17d1b4=a40_0x250c65['valid'](_0x3c1db3[_0x3caccc(0xf1)]);if(!_0x15885a||!_0x17d1b4)return _0x341c2d['fail'](_0x3caccc(0xc9)),{'ok':![],'message':_0x3caccc(0xc9)};if(!shouldInstallTarget(_0x15885a,_0x3c1db3)){const _0x2af8bf=_0x3c1db3[_0x3caccc(0x103)]===_0x3caccc(0xf1)?_0x3caccc(0xf8)+_0x3c1db3[_0x3caccc(0xf1)]+')':_0x3caccc(0xff)+_0x3c1db3[_0x3caccc(0xf1)]+')';return _0x341c2d[_0x3caccc(0xf4)](_0x2af8bf),shouldSkipCliSkill(_0x44317a)?console[_0x3caccc(0xd2)](a40_0x4d0540[_0x3caccc(0xdf)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x44317a[_0x3caccc(0xc0)]),{'ok':!![]};}_0x341c2d['info'](getInstallPlanLabel(_0x44af32,_0x3c1db3));const _0x5467a1=detectPackageManager(),_0x81278c=_0x5467a1===_0x3caccc(0xe9)?resolveNpmBin('npm'):_0x5467a1,_0x22766b=a40_0x3fbf(_0x3caccc(0xd8)+_0x5467a1+_0x3caccc(0xb5))['start']();try{return await execa(_0x81278c,['install','-g',NPM_PACKAGE_NAME+'@'+_0x3c1db3[_0x3caccc(0xf1)]],{'stdio':_0x3caccc(0x102)}),_0x22766b[_0x3caccc(0xf4)](_0x3caccc(0xc4)+_0x3c1db3[_0x3caccc(0xf1)]),console[_0x3caccc(0xd2)](a40_0x4d0540[_0x3caccc(0xdf)](_0x3caccc(0x100))),shouldSkipCliSkill(_0x44317a)?console[_0x3caccc(0xd2)](a40_0x4d0540[_0x3caccc(0xdf)](_0x3caccc(0xef))):await installCliSkill(_0x44317a[_0x3caccc(0xc0)]),{'ok':!![]};}catch(_0x3765fb){return _0x22766b[_0x3caccc(0xe5)](_0x3caccc(0xd1)),console[_0x3caccc(0xec)](a40_0x4d0540[_0x3caccc(0xc1)]('\x20\x20'+_0x3765fb['message'])),console['log'](a40_0x4d0540['gray'](_0x3caccc(0xbc)+_0x5467a1+_0x3caccc(0xc8)+NPM_PACKAGE_NAME+'@'+_0x3c1db3[_0x3caccc(0xf1)])),{'ok':![],'message':_0x3765fb[_0x3caccc(0xfe)]};}}export const updateDefinition={'service':a40_0x3d4de1(0xf0),'command':'run','description':a40_0x3d4de1(0xcd),'risk':a40_0x3d4de1(0xb9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0x4688e1=a40_0x4193;(function(_0x1186ee,_0x488b38){const _0x1640af=a40_0x4193,_0x44a31d=_0x1186ee();while(!![]){try{const _0x1c0398=parseInt(_0x1640af(0x1a2))/0x1+-parseInt(_0x1640af(0x1e4))/0x2*(parseInt(_0x1640af(0x1cb))/0x3)+parseInt(_0x1640af(0x1a1))/0x4*(-parseInt(_0x1640af(0x1b1))/0x5)+parseInt(_0x1640af(0x1b3))/0x6+-parseInt(_0x1640af(0x1d0))/0x7*(parseInt(_0x1640af(0x1cc))/0x8)+parseInt(_0x1640af(0x1d8))/0x9*(-parseInt(_0x1640af(0x19f))/0xa)+-parseInt(_0x1640af(0x1ca))/0xb*(-parseInt(_0x1640af(0x193))/0xc);if(_0x1c0398===_0x488b38)break;else _0x44a31d['push'](_0x44a31d['shift']());}catch(_0x61aee8){_0x44a31d['push'](_0x44a31d['shift']());}}}(a40_0x33f6,0x689d8));import a40_0xf8a132 from'chalk';import a40_0x2b047e from'ora';import a40_0x1da2aa 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 _0x3901f7=a40_0x4193;return GIT_COMMIT!==_0x3901f7(0x1b5)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x560b2e=a40_0x4193,_0x148987=process[_0x560b2e(0x1b6)][_0x560b2e(0x1ce)]();if(_0x148987[_0x560b2e(0x1b8)]('bun'))return'bun';return _0x560b2e(0x199);}const updateFlags=[{'name':a40_0x4688e1(0x1de),'type':'boolean','description':a40_0x4688e1(0x1ac),'default':![]},{'name':a40_0x4688e1(0x1d4),'type':a40_0x4688e1(0x1cf),'description':a40_0x4688e1(0x1d7)},{'name':a40_0x4688e1(0x1d2),'type':a40_0x4688e1(0x1bc),'description':a40_0x4688e1(0x197),'default':![]},{'name':'skills','type':a40_0x4688e1(0x1bc),'description':a40_0x4688e1(0x19e),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x2ca196){const _0x358526=a40_0x4688e1;return _0x2ca196[_0x358526(0x1ab)]('version')[_0x358526(0x1c4)]();}function shouldSkipCliSkill(_0x593fb2){const _0x4b5fb1=a40_0x4688e1;return _0x593fb2[_0x4b5fb1(0x1c0)](_0x4b5fb1(0x1d2))||_0x593fb2['flag'](_0x4b5fb1(0x192))===![];}async function validateUpdateFlags(_0x1d509f){const _0x435b58=a40_0x4688e1,_0x281046=_0x1d509f[_0x435b58(0x1c0)](_0x435b58(0x1de)),_0x22a821=getRequestedVersion(_0x1d509f);if(_0x281046&&_0x22a821)throw CliErrors['validation'](_0x435b58(0x1c7),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x22a821&&!a40_0x1da2aa[_0x435b58(0x1a5)](_0x22a821))throw CliErrors[_0x435b58(0x198)](_0x435b58(0x1ad)+_0x22a821,_0x435b58(0x1dd));}async function fetchNpmDistTags(){const _0x2ed0f3=a40_0x4688e1;try{const _0x2d8fcf=await fetch(_0x2ed0f3(0x1db)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2ed0f3(0x1bf),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x2d8fcf['ok'])return null;const _0x396cf5=await _0x2d8fcf[_0x2ed0f3(0x1e0)]();if(!_0x396cf5||typeof _0x396cf5!==_0x2ed0f3(0x1b0))return null;return Object['fromEntries'](Object['entries'](_0x396cf5)[_0x2ed0f3(0x1d3)](([,_0x33c280])=>typeof _0x33c280===_0x2ed0f3(0x1cf)&&_0x33c280[_0x2ed0f3(0x1c4)]()[_0x2ed0f3(0x1e3)]>0x0)[_0x2ed0f3(0x19b)](([_0x2d8fa2,_0x3a787a])=>[_0x2d8fa2,String(_0x3a787a)[_0x2ed0f3(0x1c4)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x47e746){const _0x17c0a6=await fetchNpmDistTags();return _0x17c0a6?.[_0x47e746]??null;}async function fetchLatestVersion(){const _0x57c068=a40_0x4688e1;return fetchNpmDistTagVersion(_0x57c068(0x1a9));}async function resolveTargetVersion(_0x50e873){const _0x885ce7=a40_0x4688e1,_0x6f024f=getRequestedVersion(_0x50e873);if(_0x6f024f)return{'version':_0x6f024f,'source':_0x885ce7(0x1d4)};if(_0x50e873[_0x885ce7(0x1c0)]('beta')){const _0x43ee80=await fetchNpmDistTagVersion(_0x885ce7(0x1de));if(!_0x43ee80)return null;return{'version':_0x43ee80,'source':_0x885ce7(0x1de)};}const _0x259364=await fetchLatestVersion();if(!_0x259364)return null;return{'version':_0x259364,'source':_0x885ce7(0x1a9)};}function shouldInstallTarget(_0x2e4dbf,_0x2ef49a){const _0x462c15=a40_0x4688e1;if(_0x2ef49a['source']==='version'||_0x2ef49a['source']==='beta')return!a40_0x1da2aa['eq'](_0x2e4dbf,_0x2ef49a[_0x462c15(0x1d4)]);return a40_0x1da2aa['lt'](_0x2e4dbf,_0x2ef49a[_0x462c15(0x1d4)]);}function getInstallPlanLabel(_0x7d876e,_0x4f89ed){const _0x5e0dd5=a40_0x4688e1;switch(_0x4f89ed['source']){case'beta':return _0x5e0dd5(0x1e5)+a40_0xf8a132[_0x5e0dd5(0x1dc)](_0x7d876e)+_0x5e0dd5(0x1d5)+a40_0xf8a132[_0x5e0dd5(0x1a4)](_0x4f89ed['version']);case _0x5e0dd5(0x1d4):return _0x5e0dd5(0x1b4)+a40_0xf8a132['yellow'](_0x7d876e)+'\x20→\x20'+a40_0xf8a132[_0x5e0dd5(0x1a4)](_0x4f89ed[_0x5e0dd5(0x1d4)]);case'latest':default:return _0x5e0dd5(0x1c8)+a40_0xf8a132['yellow'](_0x7d876e)+_0x5e0dd5(0x1d5)+a40_0xf8a132[_0x5e0dd5(0x1a4)](_0x4f89ed[_0x5e0dd5(0x1d4)]);}}async function installCliSkill(_0x53b73f){const _0x3f0568=a40_0x4688e1;console[_0x3f0568(0x19a)](a40_0xf8a132[_0x3f0568(0x1c6)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x3a9266=runNpxSkillsAddGlobal(process[_0x3f0568(0x1aa)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x53b73f?_0x3f0568(0x1bb):_0x3f0568(0x1e2)});if(_0x3a9266[_0x3f0568(0x1a6)]){console[_0x3f0568(0x19a)](a40_0xf8a132[_0x3f0568(0x1c6)](_0x3f0568(0x1e6)));return;}if(_0x3a9266['ok']){console['log'](a40_0xf8a132[_0x3f0568(0x1c6)](_0x3f0568(0x196)));return;}console[_0x3f0568(0x1c9)](a40_0xf8a132[_0x3f0568(0x1dc)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x3a9266[_0x3f0568(0x1c5)]||_0x3f0568(0x1b5)))),console[_0x3f0568(0x19a)](a40_0xf8a132[_0x3f0568(0x1c6)](_0x3f0568(0x1c3)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x3ae273){const _0x400bfa=a40_0x4688e1;await validateUpdateFlags(_0x3ae273);const _0x900e24=getCurrentVersion();console[_0x400bfa(0x19a)]('Current\x20version:\x20'+_0x900e24);const _0x431302=a40_0x2b047e(_0x400bfa(0x1b2))[_0x400bfa(0x1c2)](),_0x57d6a1=await resolveTargetVersion(_0x3ae273);if(!_0x57d6a1){const _0x210e87=_0x3ae273[_0x400bfa(0x1c0)](_0x400bfa(0x1de))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x400bfa(0x19c);return _0x431302['fail'](_0x210e87),console[_0x400bfa(0x19a)](a40_0xf8a132[_0x400bfa(0x1c6)](_0x400bfa(0x1a3)+NPM_PACKAGE_NAME+_0x400bfa(0x1af))),{'ok':![],'message':_0x210e87};}const _0x3e3ec9=a40_0x1da2aa[_0x400bfa(0x1a5)](VERSION),_0x919f16=a40_0x1da2aa[_0x400bfa(0x1a5)](_0x57d6a1[_0x400bfa(0x1d4)]);if(!_0x3e3ec9||!_0x919f16)return _0x431302['fail'](_0x400bfa(0x1b7)),{'ok':![],'message':_0x400bfa(0x1b7)};if(!shouldInstallTarget(_0x3e3ec9,_0x57d6a1)){const _0x5c95e8=_0x57d6a1[_0x400bfa(0x1d1)]==='version'?_0x400bfa(0x1d6)+_0x57d6a1[_0x400bfa(0x1d4)]+')':_0x400bfa(0x1a0)+_0x57d6a1[_0x400bfa(0x1d4)]+')';return _0x431302['succeed'](_0x5c95e8),shouldSkipCliSkill(_0x3ae273)?console['log'](a40_0xf8a132[_0x400bfa(0x1c6)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x3ae273[_0x400bfa(0x1cd)]),{'ok':!![]};}_0x431302[_0x400bfa(0x195)](getInstallPlanLabel(_0x900e24,_0x57d6a1));const _0x187303=detectPackageManager(),_0x54e8cd=_0x187303===_0x400bfa(0x199)?resolveNpmBin(_0x400bfa(0x199)):_0x187303,_0xeddcd4=a40_0x2b047e('Updating\x20via\x20'+_0x187303+_0x400bfa(0x1bd))['start']();try{return await execa(_0x54e8cd,[_0x400bfa(0x1e1),'-g',NPM_PACKAGE_NAME+'@'+_0x57d6a1[_0x400bfa(0x1d4)]],{'stdio':_0x400bfa(0x1bb)}),_0xeddcd4['succeed'](_0x400bfa(0x1ba)+_0x57d6a1[_0x400bfa(0x1d4)]),console[_0x400bfa(0x19a)](a40_0xf8a132['gray'](_0x400bfa(0x1df))),shouldSkipCliSkill(_0x3ae273)?console[_0x400bfa(0x19a)](a40_0xf8a132[_0x400bfa(0x1c6)](_0x400bfa(0x1d9))):await installCliSkill(_0x3ae273['nonInteractive']),{'ok':!![]};}catch(_0x9df973){return _0xeddcd4[_0x400bfa(0x19d)]('Update\x20failed'),console[_0x400bfa(0x1c5)](a40_0xf8a132[_0x400bfa(0x1c1)]('\x20\x20'+_0x9df973[_0x400bfa(0x1da)])),console[_0x400bfa(0x19a)](a40_0xf8a132['gray'](_0x400bfa(0x1b9)+_0x187303+_0x400bfa(0x1ae)+NPM_PACKAGE_NAME+'@'+_0x57d6a1['version'])),{'ok':![],'message':_0x9df973[_0x400bfa(0x1da)]};}}function a40_0x4193(_0x15cf49,_0x30e5fe){_0x15cf49=_0x15cf49-0x192;const _0x33f6f9=a40_0x33f6();let _0x41938f=_0x33f6f9[_0x15cf49];return _0x41938f;}function a40_0x33f6(){const _0x1f9a59=['nonInteractive','toLowerCase','string','16114KvedmO','source','no-skills','filter','version','\x20→\x20','Already\x20on\x20requested\x20version\x20(v','Install\x20a\x20specific\x20CLI\x20version','1209078dPAZhW','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','message','https://registry.npmjs.org/-/package/','yellow','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','beta','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','json','install','inherit','length','2DSosIe','Beta\x20version:\x20','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','skills','4164YBkCmp','update','info','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','validation','npm','log','map','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','fail','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','60DlKBKm','Already\x20up\x20to\x20date\x20(v','416716OASRkM','441773sAPRwM','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','green','valid','skipped','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','run','latest','cwd','str','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Invalid\x20version:\x20','\x20install\x20-g\x20','@latest','object','10mFaFWY','Checking\x20for\x20updates...','785274gVoozI','Requested\x20version:\x20','unknown','execPath','Version\x20comparison\x20failed','includes','\x20\x20Try\x20manually:\x20','Updated\x20to\x20v','pipe','boolean','...','write','/dist-tags','bool','red','start','\x20\x20Run\x20manually:\x20','trim','error','gray','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Update\x20available:\x20','warn','54307pJgbeM','1278645lOUPzO','1448lpYlXr'];a40_0x33f6=function(){return _0x1f9a59;};return a40_0x33f6();}export const updateDefinition={'service':a40_0x4688e1(0x194),'command':a40_0x4688e1(0x1a8),'description':a40_0x4688e1(0x1a7),'risk':a40_0x4688e1(0x1be),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x4088a2,_0x2ad104){const _0x315fbc=a41_0x54a1,_0x2c6f2f=_0x4088a2();while(!![]){try{const _0x2fd2c8=parseInt(_0x315fbc(0x1a3))/0x1*(-parseInt(_0x315fbc(0x1a5))/0x2)+-parseInt(_0x315fbc(0x1a9))/0x3+parseInt(_0x315fbc(0x1ac))/0x4*(-parseInt(_0x315fbc(0x1a7))/0x5)+-parseInt(_0x315fbc(0x1ab))/0x6*(parseInt(_0x315fbc(0x1aa))/0x7)+-parseInt(_0x315fbc(0x1a6))/0x8+-parseInt(_0x315fbc(0x1a4))/0x9+parseInt(_0x315fbc(0x1a8))/0xa;if(_0x2fd2c8===_0x2ad104)break;else _0x2c6f2f['push'](_0x2c6f2f['shift']());}catch(_0x58bf4e){_0x2c6f2f['push'](_0x2c6f2f['shift']());}}}(a41_0x12bf,0xa5b59));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x54a1(_0x1dfa03,_0x24a017){_0x1dfa03=_0x1dfa03-0x1a3;const _0x12bf3d=a41_0x12bf();let _0x54a14c=_0x12bf3d[_0x1dfa03];return _0x54a14c;}function a41_0x12bf(){const _0x3d4041=['308995bKrvht','51313680cLmeDU','1902687kisRdX','189798aZvgTC','114ttZhAq','76iHtHLU','7sDolQT','12061746tlejWJ','65958fldpRB','4464000jTtsuK'];a41_0x12bf=function(){return _0x3d4041;};return a41_0x12bf();}
1
+ (function(_0x2141e6,_0x2f9903){const _0x1850e1=a41_0x1c67,_0x118a09=_0x2141e6();while(!![]){try{const _0x2aca96=-parseInt(_0x1850e1(0x179))/0x1*(parseInt(_0x1850e1(0x17d))/0x2)+parseInt(_0x1850e1(0x17b))/0x3+parseInt(_0x1850e1(0x180))/0x4*(parseInt(_0x1850e1(0x178))/0x5)+-parseInt(_0x1850e1(0x181))/0x6*(-parseInt(_0x1850e1(0x17f))/0x7)+-parseInt(_0x1850e1(0x17a))/0x8+-parseInt(_0x1850e1(0x17c))/0x9*(parseInt(_0x1850e1(0x17e))/0xa)+parseInt(_0x1850e1(0x182))/0xb;if(_0x2aca96===_0x2f9903)break;else _0x118a09['push'](_0x118a09['shift']());}catch(_0x1d3b2f){_0x118a09['push'](_0x118a09['shift']());}}}(a41_0x3293,0x9ea8b));import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x1c67(_0x5434ae,_0x4124ea){_0x5434ae=_0x5434ae-0x178;const _0x329356=a41_0x3293();let _0x1c673c=_0x329356[_0x5434ae];return _0x1c673c;}function a41_0x3293(){const _0x33a480=['2789344rJYEhl','798jyrRzV','3318337VPpKmQ','5bQqKBu','6GuMrkq','9922536sAxrrB','2993253szJWFJ','144513lgVHie','109132MfYfPX','530wDcboD','56413eksYoL'];a41_0x3293=function(){return _0x33a480;};return a41_0x3293();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- function a42_0xc3e3(_0x1d8b36,_0x1cd0be){_0x1d8b36=_0x1d8b36-0x149;const _0x2076f1=a42_0x2076();let _0xc3e33d=_0x2076f1[_0x1d8b36];return _0xc3e33d;}function a42_0x2076(){const _0x4c98c3=['10krvSjx','operation','6603920gpQUIZ','code','54203FAzaWU','4415564Ursiva','894222HAUTIh','bool','5ytxGgK','boolean','9OUWXeS','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','str','name','string','skip-imports','4930800tNinxK','appCode','read','2100344SkXziP','6821922GqtBDa','alias','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Omit\x20import\x20statements\x20from\x20generated\x20code','tableName'];a42_0x2076=function(){return _0x4c98c3;};return a42_0x2076();}const a42_0x2f82aa=a42_0xc3e3;(function(_0x19ec13,_0x11fb82){const _0x506070=a42_0xc3e3,_0xe5118b=_0x19ec13();while(!![]){try{const _0x19cc10=parseInt(_0x506070(0x14b))/0x1*(-parseInt(_0x506070(0x160))/0x2)+parseInt(_0x506070(0x14d))/0x3+parseInt(_0x506070(0x14c))/0x4*(parseInt(_0x506070(0x14f))/0x5)+parseInt(_0x506070(0x15b))/0x6+-parseInt(_0x506070(0x157))/0x7+-parseInt(_0x506070(0x15a))/0x8+-parseInt(_0x506070(0x151))/0x9*(parseInt(_0x506070(0x149))/0xa);if(_0x19cc10===_0x11fb82)break;else _0xe5118b['push'](_0xe5118b['shift']());}catch(_0x553844){_0xe5118b['push'](_0xe5118b['shift']());}}}(a42_0x2076,0x9c65a));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a42_0x2f82aa(0x159),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x2f82aa(0x15c),'type':'string','description':a42_0x2f82aa(0x15d)},{'name':'operation','type':a42_0x2f82aa(0x155),'required':!![],'description':a42_0x2f82aa(0x152)},{'name':a42_0x2f82aa(0x156),'type':a42_0x2f82aa(0x150),'description':a42_0x2f82aa(0x15e)}],async 'execute'(_0x388714){const _0x22999f=a42_0x2f82aa,{dataset:_0x41cc79,operation:_0x20089e}=await getOperationDetail(_0x388714[_0x22999f(0x158)],_0x388714['str'](_0x22999f(0x14a)),_0x388714[_0x22999f(0x153)](_0x22999f(0x161))),_0x48d6a5=generateSdkCode(_0x41cc79,_0x20089e,{'includeImports':!_0x388714[_0x22999f(0x14e)](_0x22999f(0x156))});return{'ok':!![],'data':{'dataset':{'name':_0x41cc79[_0x22999f(0x154)],'code':_0x41cc79['code'],'tableName':_0x41cc79[_0x22999f(0x15f)]},'operation':_0x388714['str'](_0x22999f(0x161)),'code':_0x48d6a5}};}};
1
+ const a42_0x33dc0a=a42_0x3597;(function(_0x16cdab,_0xf24583){const _0x150a3a=a42_0x3597,_0x6c6ec1=_0x16cdab();while(!![]){try{const _0x48e764=parseInt(_0x150a3a(0x1ce))/0x1+-parseInt(_0x150a3a(0x1ca))/0x2+-parseInt(_0x150a3a(0x1be))/0x3+-parseInt(_0x150a3a(0x1c1))/0x4+parseInt(_0x150a3a(0x1c0))/0x5+parseInt(_0x150a3a(0x1c5))/0x6*(-parseInt(_0x150a3a(0x1bb))/0x7)+-parseInt(_0x150a3a(0x1cc))/0x8*(-parseInt(_0x150a3a(0x1ba))/0x9);if(_0x48e764===_0xf24583)break;else _0x6c6ec1['push'](_0x6c6ec1['shift']());}catch(_0x2f519c){_0x6c6ec1['push'](_0x6c6ec1['shift']());}}}(a42_0x38c5,0xc11d9));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x3597(_0x59334f,_0x598a41){_0x59334f=_0x59334f-0x1ba;const _0x38c5c1=a42_0x38c5();let _0x359755=_0x38c5c1[_0x59334f];return _0x359755;}function a42_0x38c5(){const _0x410810=['27133240QbizaG','string','703120rhYqMz','sdk','9UZdrmt','21RIPcIg','str','boolean','812085drYIry','Omit\x20import\x20statements\x20from\x20generated\x20code','6694305PnHjiI','5233840HOckAC','bool','read','code','2981922LuSBhS','operation','appCode','skip-imports','alias','3145038bilfCa','tableName'];a42_0x38c5=function(){return _0x410810;};return a42_0x38c5();}export const codegenSdk={'service':'codegen','command':a42_0x33dc0a(0x1cf),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a42_0x33dc0a(0x1c3),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x33dc0a(0x1c9),'type':a42_0x33dc0a(0x1cd),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x33dc0a(0x1c6),'type':a42_0x33dc0a(0x1cd),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a42_0x33dc0a(0x1c8),'type':a42_0x33dc0a(0x1bd),'description':a42_0x33dc0a(0x1bf)}],async 'execute'(_0x32fdb3){const _0x2312b6=a42_0x33dc0a,{dataset:_0x2f2c7e,operation:_0x87ff03}=await getOperationDetail(_0x32fdb3[_0x2312b6(0x1c7)],_0x32fdb3[_0x2312b6(0x1bc)]('code'),_0x32fdb3[_0x2312b6(0x1bc)]('operation')),_0xf89863=generateSdkCode(_0x2f2c7e,_0x87ff03,{'includeImports':!_0x32fdb3[_0x2312b6(0x1c2)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x2f2c7e['name'],'code':_0x2f2c7e[_0x2312b6(0x1c4)],'tableName':_0x2f2c7e[_0x2312b6(0x1cb)]},'operation':_0x32fdb3[_0x2312b6(0x1bc)](_0x2312b6(0x1c6)),'code':_0xf89863}};}};
@@ -1 +1 @@
1
- function a43_0x1703(_0x2998b3,_0x5e3ef6){_0x2998b3=_0x2998b3-0xf7;const _0x4b6182=a43_0x4b61();let _0x170390=_0x4b6182[_0x2998b3];return _0x170390;}const a43_0x58148f=a43_0x1703;(function(_0x2a58a8,_0x4e5f4e){const _0x14c317=a43_0x1703,_0x5b3ebf=_0x2a58a8();while(!![]){try{const _0xe8d939=parseInt(_0x14c317(0x104))/0x1*(-parseInt(_0x14c317(0xfe))/0x2)+parseInt(_0x14c317(0x10a))/0x3+parseInt(_0x14c317(0x107))/0x4*(parseInt(_0x14c317(0xfd))/0x5)+-parseInt(_0x14c317(0xf7))/0x6*(parseInt(_0x14c317(0xfb))/0x7)+parseInt(_0x14c317(0x109))/0x8*(parseInt(_0x14c317(0x10c))/0x9)+-parseInt(_0x14c317(0x102))/0xa+-parseInt(_0x14c317(0xf9))/0xb*(-parseInt(_0x14c317(0xfc))/0xc);if(_0xe8d939===_0x4e5f4e)break;else _0x5b3ebf['push'](_0x5b3ebf['shift']());}catch(_0xabf5ae){_0x5b3ebf['push'](_0x5b3ebf['shift']());}}}(a43_0x4b61,0xc5262));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x4b61(){const _0x491545=['sqlName','sdk','sql','sqlcode','933582QxckFK','codegen','748cvwNyq','appCode','21HjmVft','284496ipCPPi','5378125OUkGDT','389932SVVJIB','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','boolean','7308390gfWwHZ','bool','7AOTYcx','bff','sqlCode','4eJeZIr','read','1114712UEUSOk','1210401ExdkRF','target','18cgQuCk','Omit\x20import\x20statements\x20from\x20generated\x20code','str'];a43_0x4b61=function(){return _0x491545;};return a43_0x4b61();}export const codegenSql={'service':a43_0x58148f(0xf8),'command':a43_0x58148f(0x111),'description':a43_0x58148f(0xff),'risk':a43_0x58148f(0x108),'flags':[SQLCODE_FLAG,{'name':a43_0x58148f(0x10b),'type':'string','description':a43_0x58148f(0x100),'default':a43_0x58148f(0x110),'enum':['sdk',a43_0x58148f(0x105)]},{'name':'no-imports','type':a43_0x58148f(0x101),'description':a43_0x58148f(0x10d)}],async 'execute'(_0x512073){const _0x5f1327=a43_0x58148f,_0x412249=await getSqlQueryInfo(_0x512073[_0x5f1327(0xfa)],_0x512073[_0x5f1327(0x10e)](_0x5f1327(0x112))),_0x43eb82=_0x512073[_0x5f1327(0x10e)](_0x5f1327(0x10b))||_0x5f1327(0x110),_0x308bd3=generateSqlCodeTemplate(_0x412249,{'target':_0x43eb82,'includeImports':!_0x512073[_0x5f1327(0x103)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x412249[_0x5f1327(0x106)],'sqlName':_0x412249[_0x5f1327(0x10f)],'target':_0x43eb82,'code':_0x308bd3}};}};
1
+ const a43_0x56d2f8=a43_0x32d5;function a43_0x32d5(_0x5a7993,_0xf056a6){_0x5a7993=_0x5a7993-0xfb;const _0x4beaf8=a43_0x4bea();let _0x32d5ad=_0x4beaf8[_0x5a7993];return _0x32d5ad;}(function(_0x2e9b8c,_0x25dda0){const _0xb14fb5=a43_0x32d5,_0xbaf8=_0x2e9b8c();while(!![]){try{const _0x40a9d8=parseInt(_0xb14fb5(0x10c))/0x1*(parseInt(_0xb14fb5(0xfc))/0x2)+parseInt(_0xb14fb5(0x112))/0x3*(-parseInt(_0xb14fb5(0x103))/0x4)+-parseInt(_0xb14fb5(0x110))/0x5*(parseInt(_0xb14fb5(0x107))/0x6)+parseInt(_0xb14fb5(0x115))/0x7+parseInt(_0xb14fb5(0xfe))/0x8+-parseInt(_0xb14fb5(0x106))/0x9+parseInt(_0xb14fb5(0x113))/0xa*(-parseInt(_0xb14fb5(0x104))/0xb);if(_0x40a9d8===_0x25dda0)break;else _0xbaf8['push'](_0xbaf8['shift']());}catch(_0x46dee5){_0xbaf8['push'](_0xbaf8['shift']());}}}(a43_0x4bea,0xa01aa));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x56d2f8(0xfb),'command':a43_0x56d2f8(0x10b),'description':a43_0x56d2f8(0x10a),'risk':'read','flags':[SQLCODE_FLAG,{'name':a43_0x56d2f8(0x10d),'type':'string','description':a43_0x56d2f8(0xfd),'default':a43_0x56d2f8(0x105),'enum':['sdk',a43_0x56d2f8(0x10e)]},{'name':a43_0x56d2f8(0x108),'type':a43_0x56d2f8(0x10f),'description':a43_0x56d2f8(0x109)}],async 'execute'(_0x1919d8){const _0x434edc=a43_0x56d2f8,_0x5296f9=await getSqlQueryInfo(_0x1919d8[_0x434edc(0x101)],_0x1919d8[_0x434edc(0xff)](_0x434edc(0x100))),_0x255136=_0x1919d8['str'](_0x434edc(0x10d))||_0x434edc(0x105),_0x4e18cc=generateSqlCodeTemplate(_0x5296f9,{'target':_0x255136,'includeImports':!_0x1919d8[_0x434edc(0x102)](_0x434edc(0x108))});return{'ok':!![],'data':{'sqlCode':_0x5296f9[_0x434edc(0x114)],'sqlName':_0x5296f9[_0x434edc(0x111)],'target':_0x255136,'code':_0x4e18cc}};}};function a43_0x4bea(){const _0x266e23=['bool','36EflHMS','33GLPPFo','sdk','4845996xhVIju','12GIUAuu','no-imports','Omit\x20import\x20statements\x20from\x20generated\x20code','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sql','113358bADfvv','target','bff','boolean','2376070lTzXuR','sqlName','49548xPnZRf','1292920pJiLWG','sqlCode','8412054gVIvbh','codegen','4mmpBPi','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','10021920ZeaZOI','str','sqlcode','appCode'];a43_0x4bea=function(){return _0x266e23;};return a43_0x4bea();}
@@ -1 +1 @@
1
- (function(_0xdbce6f,_0x4d598a){const _0x7b7da3=a44_0x4626,_0x1ee5c1=_0xdbce6f();while(!![]){try{const _0x18a799=-parseInt(_0x7b7da3(0x18b))/0x1+parseInt(_0x7b7da3(0x1a6))/0x2+-parseInt(_0x7b7da3(0x184))/0x3+parseInt(_0x7b7da3(0x1a3))/0x4*(parseInt(_0x7b7da3(0x195))/0x5)+-parseInt(_0x7b7da3(0x1a1))/0x6*(parseInt(_0x7b7da3(0x18a))/0x7)+parseInt(_0x7b7da3(0x186))/0x8*(-parseInt(_0x7b7da3(0x199))/0x9)+parseInt(_0x7b7da3(0x18d))/0xa;if(_0x18a799===_0x4d598a)break;else _0x1ee5c1['push'](_0x1ee5c1['shift']());}catch(_0x223c56){_0x1ee5c1['push'](_0x1ee5c1['shift']());}}}(a44_0x4c76,0x93f13));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a44_0x4c76(){const _0x495da9=['Usage:\x20','both','length','7UczpOF','1097589jYgQRh','keys','20142080lTGErl','\x20Note:\x20app\x20\x22','\x20<name>\x20--appcode\x20<code>','project','Removed\x20app\x20\x22','inherit','globalConfig','validation','5tgLnBQ','\x22\x20(appcode:\x20','object','Added','38502JUQuWf','\x20Set\x20as\x20default\x20app.','flagMissing','apps','\x20app\x20\x22','\x20config.','Updated','projectConfig','4006194kUlcmf','defaultApp','1795348TgXCLC','trim','App\x20code','1112710nKPQdn','appcode','Use\x20global\x20config\x20scope','args','\x22\x20still\x20defined\x20in\x20','Missing\x20app\x20name.','global','1161549AVtanh','str','488wYGceb'];a44_0x4c76=function(){return _0x495da9;};return a44_0x4c76();}import{readRawConfigWithLayers}from'../../context.js';function a44_0x4626(_0x12a5bd,_0x3f0216){_0x12a5bd=_0x12a5bd-0x17f;const _0x4c7675=a44_0x4c76();let _0x46260b=_0x4c7675[_0x12a5bd];return _0x46260b;}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x2b2c69=a44_0x4626;return[{'name':'appcode','type':'string','description':_0x2b2c69(0x1a5),'required':!![]},{'name':'global','type':'boolean','description':_0x2b2c69(0x17f),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x38c951=a44_0x4626;return[{'name':_0x38c951(0x183),'type':'boolean','description':_0x38c951(0x17f),'default':![]}];}export async function validateAppName(_0xa8e337,_0x27e2ab){const _0x19f36b=a44_0x4626,_0x1f0c1d=_0xa8e337[_0x19f36b(0x180)][0x0]?.[_0x19f36b(0x1a4)]();if(!_0x1f0c1d)throw CliErrors[_0x19f36b(0x194)](_0x19f36b(0x182),_0x19f36b(0x187)+CLI_BIN_NAME+'\x20'+_0x27e2ab+'\x20<name>');}export async function runAppAdd(_0x41906e,_0x2ecc17){const _0x373cea=a44_0x4626,_0x5a7d7d=_0x41906e[_0x373cea(0x180)][0x0]?.[_0x373cea(0x1a4)]();if(!_0x5a7d7d)throw CliErrors['validation'](_0x373cea(0x182),_0x373cea(0x187)+CLI_BIN_NAME+'\x20'+_0x2ecc17+'\x20<name>\x20--appcode\x20<code>');const _0x5397e1=_0x41906e[_0x373cea(0x185)](_0x373cea(0x1a7));if(!_0x5397e1)throw CliErrors[_0x373cea(0x19b)]('appcode',_0x373cea(0x187)+CLI_BIN_NAME+'\x20'+_0x2ecc17+_0x373cea(0x18f));const _0x56b744={'global':_0x41906e['bool']('global')},_0x55e45b=readConfig(_0x56b744);if(!_0x55e45b[_0x373cea(0x19c)])_0x55e45b['apps']={};const _0x3c90b4={'appcode':_0x5397e1,...collectAppProfileOverrides(_0x207748=>_0x41906e['str'](_0x207748))},_0x290e6d=_0x55e45b['apps'],_0x241020=!!_0x290e6d[_0x5a7d7d];_0x290e6d[_0x5a7d7d]=_0x3c90b4;if(!_0x55e45b[_0x373cea(0x1a2)])_0x55e45b[_0x373cea(0x1a2)]=_0x5a7d7d;writeConfig(_0x55e45b,_0x56b744);const _0x3a3d72=!_0x241020&&_0x55e45b[_0x373cea(0x1a2)]===_0x5a7d7d?_0x373cea(0x19a):'',_0x154927=(_0x241020?_0x373cea(0x19f):_0x373cea(0x198))+_0x373cea(0x19d)+_0x5a7d7d+_0x373cea(0x196)+_0x5397e1+')'+scopeLabel(_0x56b744)+'.'+_0x3a3d72;return{'ok':!![],'message':_0x154927};}export async function runAppRemove(_0x250d4f,_0x2a4450){const _0xde006f=a44_0x4626,_0x5e8a3a=_0x250d4f['args'][0x0]?.[_0xde006f(0x1a4)]();if(!_0x5e8a3a)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2a4450+'\x20<name>\x20[--global]');const _0x272c5f=_0x250d4f['bool'](_0xde006f(0x183)),{config:_0x2f38a9,layers:_0x7e74a7}=readRawConfigWithLayers(),_0xcfff6d=_0x2f38a9[_0xde006f(0x19c)]??{};if(!_0xcfff6d[_0x5e8a3a])throw CliErrors[_0xde006f(0x194)]('App\x20\x22'+_0x5e8a3a+'\x22\x20not\x20found.');const _0x754b58=_0x7e74a7[_0xde006f(0x193)]['apps']&&typeof _0x7e74a7[_0xde006f(0x193)][_0xde006f(0x19c)]===_0xde006f(0x197)?_0x7e74a7[_0xde006f(0x193)]['apps']:{},_0x4abefa=_0x7e74a7[_0xde006f(0x1a0)][_0xde006f(0x19c)]&&typeof _0x7e74a7[_0xde006f(0x1a0)][_0xde006f(0x19c)]===_0xde006f(0x197)?_0x7e74a7[_0xde006f(0x1a0)][_0xde006f(0x19c)]:{},_0x431a5c=appDefinedIn(_0x5e8a3a,_0x754b58,_0x4abefa,_0x7e74a7[_0xde006f(0x1a0)][_0xde006f(0x192)]===![]),_0x47741f=resolveAppScopeForWrite(_0x5e8a3a,_0x272c5f,_0x7e74a7),_0x4dbf15={'global':_0x47741f===_0xde006f(0x183)},_0x49fa76=readConfig(_0x4dbf15),_0x5c9a42=_0x49fa76[_0xde006f(0x19c)];if(!_0x5c9a42||!_0x5c9a42[_0x5e8a3a])throw CliErrors[_0xde006f(0x194)]('App\x20\x22'+_0x5e8a3a+'\x22\x20not\x20found.');delete _0x5c9a42[_0x5e8a3a];let _0x5523d9='';if(_0x49fa76[_0xde006f(0x1a2)]===_0x5e8a3a){const _0x53e402=Object[_0xde006f(0x18c)](_0x5c9a42);_0x49fa76[_0xde006f(0x1a2)]=_0x53e402[_0xde006f(0x189)]>0x0?_0x53e402[0x0]:undefined,_0x49fa76[_0xde006f(0x1a2)]?_0x5523d9='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x49fa76['defaultApp']+'\x22.':delete _0x49fa76['defaultApp'];}Object[_0xde006f(0x18c)](_0x5c9a42)[_0xde006f(0x189)]===0x0&&(delete _0x49fa76[_0xde006f(0x19c)],delete _0x49fa76[_0xde006f(0x1a2)]);writeConfig(_0x49fa76,_0x4dbf15);const _0x2b62bd=_0x431a5c===_0xde006f(0x188)?_0xde006f(0x18e)+_0x5e8a3a+_0xde006f(0x181)+(_0x47741f==='project'?'global':_0xde006f(0x190))+_0xde006f(0x19e):'';return{'ok':!![],'message':_0xde006f(0x191)+_0x5e8a3a+'\x22'+scopeLabel(_0x4dbf15)+'.'+_0x5523d9+_0x2b62bd};}
1
+ (function(_0x1c2ed9,_0x50a4a3){const _0x4c6b13=a44_0x2902,_0x313121=_0x1c2ed9();while(!![]){try{const _0x1f09e9=parseInt(_0x4c6b13(0x1ca))/0x1+-parseInt(_0x4c6b13(0x1be))/0x2*(-parseInt(_0x4c6b13(0x1dc))/0x3)+parseInt(_0x4c6b13(0x1d9))/0x4+-parseInt(_0x4c6b13(0x1bd))/0x5*(parseInt(_0x4c6b13(0x1d4))/0x6)+parseInt(_0x4c6b13(0x1db))/0x7+parseInt(_0x4c6b13(0x1c1))/0x8+-parseInt(_0x4c6b13(0x1d0))/0x9;if(_0x1f09e9===_0x50a4a3)break;else _0x313121['push'](_0x313121['shift']());}catch(_0x37f993){_0x313121['push'](_0x313121['shift']());}}}(a44_0x5a58,0xa07d6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a44_0x5a58(){const _0x1ebe91=['126ABsBwf','trim','flagMissing','4049144vGBfWu','\x22\x20still\x20defined\x20in\x20','projectConfig','str','defaultApp','args','appcode','\x20Set\x20as\x20default\x20app.','boolean','448771uysJtR','keys','both','Use\x20global\x20config\x20scope','length','Removed\x20app\x20\x22','23186367xwshZw','apps','global','\x20Default\x20app\x20changed\x20to\x20\x22','6eqxeou','\x20Note:\x20app\x20\x22','\x20<name>\x20--appcode\x20<code>','\x22\x20(appcode:\x20','App\x20\x22','4135580qeOJfC','\x22\x20not\x20found.','4393298bZgwON','58173KtAnmG','globalConfig','\x20app\x20\x22','validation','\x20<name>\x20[--global]','project','object','Usage:\x20','inherit','Added','Missing\x20app\x20name.','3022135pKtJDY'];a44_0x5a58=function(){return _0x1ebe91;};return a44_0x5a58();}import{readRawConfigWithLayers}from'../../context.js';function a44_0x2902(_0x20493b,_0x3100f3){_0x20493b=_0x20493b-0x1b8;const _0x5a5871=a44_0x5a58();let _0x29020d=_0x5a5871[_0x20493b];return _0x29020d;}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x31232a=a44_0x2902;return[{'name':'appcode','type':'string','description':'App\x20code','required':!![]},{'name':_0x31232a(0x1d2),'type':_0x31232a(0x1c9),'description':_0x31232a(0x1cd),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x1dcdf3=a44_0x2902;return[{'name':'global','type':'boolean','description':_0x1dcdf3(0x1cd),'default':![]}];}export async function validateAppName(_0x2a3e4c,_0x2fb234){const _0x4972bd=a44_0x2902,_0x4210c8=_0x2a3e4c['args'][0x0]?.[_0x4972bd(0x1bf)]();if(!_0x4210c8)throw CliErrors[_0x4972bd(0x1df)](_0x4972bd(0x1bc),_0x4972bd(0x1b9)+CLI_BIN_NAME+'\x20'+_0x2fb234+'\x20<name>');}export async function runAppAdd(_0x2f06e7,_0x1a9bb3){const _0x3ee666=a44_0x2902,_0x163771=_0x2f06e7[_0x3ee666(0x1c6)][0x0]?.[_0x3ee666(0x1bf)]();if(!_0x163771)throw CliErrors['validation'](_0x3ee666(0x1bc),_0x3ee666(0x1b9)+CLI_BIN_NAME+'\x20'+_0x1a9bb3+_0x3ee666(0x1d6));const _0x717fe8=_0x2f06e7['str'](_0x3ee666(0x1c7));if(!_0x717fe8)throw CliErrors[_0x3ee666(0x1c0)](_0x3ee666(0x1c7),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1a9bb3+_0x3ee666(0x1d6));const _0x2b687c={'global':_0x2f06e7['bool'](_0x3ee666(0x1d2))},_0x5ba55d=readConfig(_0x2b687c);if(!_0x5ba55d[_0x3ee666(0x1d1)])_0x5ba55d[_0x3ee666(0x1d1)]={};const _0x49a916={'appcode':_0x717fe8,...collectAppProfileOverrides(_0xb1aa79=>_0x2f06e7[_0x3ee666(0x1c4)](_0xb1aa79))},_0x555634=_0x5ba55d[_0x3ee666(0x1d1)],_0x5cde3f=!!_0x555634[_0x163771];_0x555634[_0x163771]=_0x49a916;if(!_0x5ba55d['defaultApp'])_0x5ba55d['defaultApp']=_0x163771;writeConfig(_0x5ba55d,_0x2b687c);const _0xdb76d5=!_0x5cde3f&&_0x5ba55d[_0x3ee666(0x1c5)]===_0x163771?_0x3ee666(0x1c8):'',_0x89d2f3=(_0x5cde3f?'Updated':_0x3ee666(0x1bb))+_0x3ee666(0x1de)+_0x163771+_0x3ee666(0x1d7)+_0x717fe8+')'+scopeLabel(_0x2b687c)+'.'+_0xdb76d5;return{'ok':!![],'message':_0x89d2f3};}export async function runAppRemove(_0x4567df,_0x447557){const _0x2e3aca=a44_0x2902,_0x3b55b0=_0x4567df[_0x2e3aca(0x1c6)][0x0]?.[_0x2e3aca(0x1bf)]();if(!_0x3b55b0)throw CliErrors[_0x2e3aca(0x1df)](_0x2e3aca(0x1bc),_0x2e3aca(0x1b9)+CLI_BIN_NAME+'\x20'+_0x447557+_0x2e3aca(0x1e0));const _0x4469e9=_0x4567df['bool']('global'),{config:_0x204f14,layers:_0x563ea8}=readRawConfigWithLayers(),_0xde82e2=_0x204f14[_0x2e3aca(0x1d1)]??{};if(!_0xde82e2[_0x3b55b0])throw CliErrors[_0x2e3aca(0x1df)](_0x2e3aca(0x1d8)+_0x3b55b0+_0x2e3aca(0x1da));const _0x9a33=_0x563ea8[_0x2e3aca(0x1dd)][_0x2e3aca(0x1d1)]&&typeof _0x563ea8[_0x2e3aca(0x1dd)]['apps']===_0x2e3aca(0x1b8)?_0x563ea8[_0x2e3aca(0x1dd)][_0x2e3aca(0x1d1)]:{},_0x44c489=_0x563ea8[_0x2e3aca(0x1c3)][_0x2e3aca(0x1d1)]&&typeof _0x563ea8['projectConfig'][_0x2e3aca(0x1d1)]==='object'?_0x563ea8['projectConfig']['apps']:{},_0x52851a=appDefinedIn(_0x3b55b0,_0x9a33,_0x44c489,_0x563ea8[_0x2e3aca(0x1c3)][_0x2e3aca(0x1ba)]===![]),_0x335fbf=resolveAppScopeForWrite(_0x3b55b0,_0x4469e9,_0x563ea8),_0x3a4d52={'global':_0x335fbf===_0x2e3aca(0x1d2)},_0x267a9e=readConfig(_0x3a4d52),_0x22986e=_0x267a9e[_0x2e3aca(0x1d1)];if(!_0x22986e||!_0x22986e[_0x3b55b0])throw CliErrors['validation'](_0x2e3aca(0x1d8)+_0x3b55b0+_0x2e3aca(0x1da));delete _0x22986e[_0x3b55b0];let _0x3aee92='';if(_0x267a9e[_0x2e3aca(0x1c5)]===_0x3b55b0){const _0x470ec0=Object['keys'](_0x22986e);_0x267a9e[_0x2e3aca(0x1c5)]=_0x470ec0['length']>0x0?_0x470ec0[0x0]:undefined,_0x267a9e[_0x2e3aca(0x1c5)]?_0x3aee92=_0x2e3aca(0x1d3)+_0x267a9e[_0x2e3aca(0x1c5)]+'\x22.':delete _0x267a9e['defaultApp'];}Object[_0x2e3aca(0x1cb)](_0x22986e)[_0x2e3aca(0x1ce)]===0x0&&(delete _0x267a9e[_0x2e3aca(0x1d1)],delete _0x267a9e[_0x2e3aca(0x1c5)]);writeConfig(_0x267a9e,_0x3a4d52);const _0x5bc888=_0x52851a===_0x2e3aca(0x1cc)?_0x2e3aca(0x1d5)+_0x3b55b0+_0x2e3aca(0x1c2)+(_0x335fbf===_0x2e3aca(0x1e1)?'global':_0x2e3aca(0x1e1))+'\x20config.':'';return{'ok':!![],'message':_0x2e3aca(0x1cf)+_0x3b55b0+'\x22'+scopeLabel(_0x3a4d52)+'.'+_0x3aee92+_0x5bc888};}
@@ -1 +1 @@
1
- function a45_0x3d56(){const _0x20f064=['642303gqOYJQ','290TVhagT','valid','1998290qrAxqx','message','✎\x20自定义输入\x20appcode','yellow','length','appName','正在获取可用应用列表...','无法获取远程应用列表,请手动输入。','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','\x20\x20(','\x0a未找到可用应用。','manual','custom','\x0a无法获取远程应用列表,请手动输入。','trim','14626rUrItc','请输入\x20App\x20Code:','319110LEIKMF','map','find','18841JjUkNI','3082303DUGUoh','8nQJwze','gray','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','201vlKyAy','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','请选择要绑定的应用:','includes','1477008ImBIda','获取到\x20','Invalid\x20App\x20Code','skip','cyan','(跳过,稍后配置)','appCode'];a45_0x3d56=function(){return _0x20f064;};return a45_0x3d56();}(function(_0x25e211,_0x16e1d5){const _0x157676=a45_0x4b4a,_0x20c15e=_0x25e211();while(!![]){try{const _0x2479b9=-parseInt(_0x157676(0x1af))/0x1+parseInt(_0x157676(0x1aa))/0x2*(-parseInt(_0x157676(0x1b4))/0x3)+-parseInt(_0x157676(0x1b8))/0x4+-parseInt(_0x157676(0x1c2))/0x5+-parseInt(_0x157676(0x1ac))/0x6+-parseInt(_0x157676(0x1b0))/0x7*(parseInt(_0x157676(0x1b1))/0x8)+-parseInt(_0x157676(0x1bf))/0x9*(-parseInt(_0x157676(0x1c0))/0xa);if(_0x2479b9===_0x16e1d5)break;else _0x20c15e['push'](_0x20c15e['shift']());}catch(_0x46a7b2){_0x20c15e['push'](_0x20c15e['shift']());}}}(a45_0x3d56,0x48da7));import{input,checkbox,select}from'@inquirer/prompts';import a45_0xc93b32 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 _0x71c51e=a45_0x4b4a,_0x45bf8c=await input({'message':_0x71c51e(0x1ab),'validate':_0x5f5045=>{const _0x6ea90d=_0x71c51e,_0x23d7b3=validateAppcode(_0x5f5045[_0x6ea90d(0x1a9)]());return _0x23d7b3[_0x6ea90d(0x1c1)]||_0x23d7b3[_0x6ea90d(0x1c3)]||_0x6ea90d(0x1ba);}});return _0x45bf8c[_0x71c51e(0x1a9)]();}function a45_0x4b4a(_0x281bba,_0x5410b9){_0x281bba=_0x281bba-0x1a8;const _0x3d5664=a45_0x3d56();let _0x4b4a57=_0x3d5664[_0x281bba];return _0x4b4a57;}export async function promptAppSelection(_0xc6ed1c){const _0x1d9e7d=a45_0x4b4a,_0x1deb04=[{'name':a45_0xc93b32['yellow'](_0x1d9e7d(0x1c4)),'value':-0x1},..._0xc6ed1c[_0x1d9e7d(0x1ad)]((_0x446c55,_0x35e285)=>({'name':_0x446c55[_0x1d9e7d(0x1c7)]+'\x20\x20'+a45_0xc93b32[_0x1d9e7d(0x1b2)]('('+_0x446c55[_0x1d9e7d(0x1be)]+')'),'value':_0x35e285}))],_0x1e7dab=await checkbox({'message':_0x1d9e7d(0x1b9)+a45_0xc93b32[_0x1d9e7d(0x1bc)](_0xc6ed1c[_0x1d9e7d(0x1c6)])+_0x1d9e7d(0x1ca),'choices':_0x1deb04,'loop':![]});if(_0x1e7dab[_0x1d9e7d(0x1b7)](-0x1))return _0x1d9e7d(0x1ce);if(_0x1e7dab['length']===0x0)return'custom';return _0x1e7dab['map'](_0x2769d1=>_0xc6ed1c[_0x2769d1]);}export async function promptSingleAppSelection(_0x440259){const _0x3d98a1=a45_0x4b4a,_0x46ad6a=[{'name':a45_0xc93b32[_0x3d98a1(0x1b2)](_0x3d98a1(0x1b3)),'value':_0x3d98a1(0x1bb)},{'name':a45_0xc93b32[_0x3d98a1(0x1c5)]('✎\x20自定义输入\x20appcode'),'value':'custom'},..._0x440259['map'](_0x238a2e=>({'name':_0x238a2e[_0x3d98a1(0x1c7)]+'\x20\x20'+a45_0xc93b32[_0x3d98a1(0x1b2)]('('+_0x238a2e['appCode']+')'),'value':_0x238a2e[_0x3d98a1(0x1be)]}))],_0x4fb2b3=await select({'message':_0x3d98a1(0x1b6),'choices':_0x46ad6a});if(_0x4fb2b3==='skip')return _0x3d98a1(0x1bb);if(_0x4fb2b3===_0x3d98a1(0x1ce))return _0x3d98a1(0x1ce);return _0x440259[_0x3d98a1(0x1ae)](_0x22462a=>_0x22462a[_0x3d98a1(0x1be)]===_0x4fb2b3);}export async function selectSingleAppcode(_0x1defdb){const _0xb2d710=a45_0x4b4a;if(!_0x1defdb)return writeCliSideChannelLine(a45_0xc93b32['gray'](_0xb2d710(0x1b5))),_fallbackOrSkip();writeCliSideChannelLine(_0xb2d710(0x1c8));let _0x8c7696;try{_0x8c7696=await withActiveCookie(_0x1defdb,()=>listRemoteApps());}catch(_0x38e5f3){writeCliSideChannelLine(a45_0xc93b32[_0xb2d710(0x1c5)](_0xb2d710(0x1c9)));if(_0x38e5f3 instanceof Error)writeCliSideChannelLine(a45_0xc93b32['gray'](_0xb2d710(0x1cb)+_0x38e5f3['message']+')'));return _fallbackOrSkip();}if(_0x8c7696[_0xb2d710(0x1c6)]===0x0)return writeCliSideChannelLine(a45_0xc93b32[_0xb2d710(0x1c5)]('未找到可用应用。')),_fallbackOrSkip();const _0x42d222=await promptSingleAppSelection(_0x8c7696);if(_0x42d222===_0xb2d710(0x1bb))return'';if(_0x42d222===_0xb2d710(0x1ce))return promptCustomAppcode();return _0x42d222[_0xb2d710(0x1be)];}export async function selectMultipleApps(_0x9790d){const _0x1c8aec=a45_0x4b4a;writeCliSideChannelLine(_0x1c8aec(0x1c8));let _0x32b1ad;try{_0x32b1ad=await withActiveCookie(_0x9790d,()=>listRemoteApps());}catch(_0x44ebf5){writeCliSideChannelLine(_0x1c8aec(0x1a8));if(_0x44ebf5 instanceof Error)writeCliSideChannelLine(_0x1c8aec(0x1cb)+_0x44ebf5['message']+')');return _0x1c8aec(0x1ce);}if(_0x32b1ad[_0x1c8aec(0x1c6)]===0x0)return writeCliSideChannelLine(_0x1c8aec(0x1cc)),_0x1c8aec(0x1ce);return promptAppSelection(_0x32b1ad);}async function _fallbackOrSkip(){const _0x25299b=a45_0x4b4a,_0x2e6fa8=await select({'message':'App\x20Code:','choices':[{'name':a45_0xc93b32[_0x25299b(0x1b2)](_0x25299b(0x1bd)),'value':'skip'},{'name':a45_0xc93b32[_0x25299b(0x1c5)]('✎\x20手动输入'),'value':_0x25299b(0x1cd)}]});if(_0x2e6fa8==='skip')return'';return promptCustomAppcode();}
1
+ (function(_0x2a33c3,_0x2be876){const _0x23ea77=a45_0x452b,_0x2f72c4=_0x2a33c3();while(!![]){try{const _0x129189=parseInt(_0x23ea77(0x10a))/0x1*(parseInt(_0x23ea77(0x10e))/0x2)+parseInt(_0x23ea77(0x110))/0x3+-parseInt(_0x23ea77(0x10c))/0x4*(parseInt(_0x23ea77(0x102))/0x5)+-parseInt(_0x23ea77(0x112))/0x6*(parseInt(_0x23ea77(0xfc))/0x7)+parseInt(_0x23ea77(0x100))/0x8+-parseInt(_0x23ea77(0x11c))/0x9*(parseInt(_0x23ea77(0xff))/0xa)+parseInt(_0x23ea77(0x104))/0xb;if(_0x129189===_0x2be876)break;else _0x2f72c4['push'](_0x2f72c4['shift']());}catch(_0x4fbd30){_0x2f72c4['push'](_0x2f72c4['shift']());}}}(a45_0x10db,0x94d76));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x4b7981 from'chalk';function a45_0x452b(_0x47dc7a,_0x3dbe7b){_0x47dc7a=_0x47dc7a-0xfb;const _0x10db6e=a45_0x10db();let _0x452bbe=_0x10db6e[_0x47dc7a];return _0x452bbe;}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 _0x464069=a45_0x452b,_0x91a7b8=await input({'message':'请输入\x20App\x20Code:','validate':_0x3ea513=>{const _0x46c03e=a45_0x452b,_0x8f8e0c=validateAppcode(_0x3ea513[_0x46c03e(0x103)]());return _0x8f8e0c[_0x46c03e(0xfb)]||_0x8f8e0c['message']||_0x46c03e(0x115);}});return _0x91a7b8[_0x464069(0x103)]();}export async function promptAppSelection(_0x156e58){const _0x3f43db=a45_0x452b,_0x5216b8=[{'name':a45_0x4b7981['yellow'](_0x3f43db(0x11d)),'value':-0x1},..._0x156e58['map']((_0x55e18d,_0x33c6dd)=>({'name':_0x55e18d['appName']+'\x20\x20'+a45_0x4b7981[_0x3f43db(0x116)]('('+_0x55e18d[_0x3f43db(0x10b)]+')'),'value':_0x33c6dd}))],_0x3fe5cd=await checkbox({'message':'获取到\x20'+a45_0x4b7981['cyan'](_0x156e58[_0x3f43db(0x10f)])+_0x3f43db(0x119),'choices':_0x5216b8,'loop':![]});if(_0x3fe5cd[_0x3f43db(0x111)](-0x1))return _0x3f43db(0x118);if(_0x3fe5cd[_0x3f43db(0x10f)]===0x0)return'custom';return _0x3fe5cd['map'](_0xc03374=>_0x156e58[_0xc03374]);}export async function promptSingleAppSelection(_0x12a8be){const _0x42daa5=a45_0x452b,_0x2fa7fc=[{'name':a45_0x4b7981[_0x42daa5(0x116)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x42daa5(0x117)},{'name':a45_0x4b7981['yellow'](_0x42daa5(0x11d)),'value':_0x42daa5(0x118)},..._0x12a8be[_0x42daa5(0x108)](_0xb88b67=>({'name':_0xb88b67[_0x42daa5(0x101)]+'\x20\x20'+a45_0x4b7981['gray']('('+_0xb88b67[_0x42daa5(0x10b)]+')'),'value':_0xb88b67['appCode']}))],_0x40cb21=await select({'message':'请选择要绑定的应用:','choices':_0x2fa7fc});if(_0x40cb21===_0x42daa5(0x117))return _0x42daa5(0x117);if(_0x40cb21==='custom')return _0x42daa5(0x118);return _0x12a8be[_0x42daa5(0x10d)](_0x2164fe=>_0x2164fe[_0x42daa5(0x10b)]===_0x40cb21);}export async function selectSingleAppcode(_0x357731){const _0xd7f6b5=a45_0x452b;if(!_0x357731)return writeCliSideChannelLine(a45_0x4b7981[_0xd7f6b5(0x116)](_0xd7f6b5(0xfd))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x5501f8;try{_0x5501f8=await withActiveCookie(_0x357731,()=>listRemoteApps());}catch(_0x28850c){writeCliSideChannelLine(a45_0x4b7981[_0xd7f6b5(0x109)](_0xd7f6b5(0x113)));if(_0x28850c instanceof Error)writeCliSideChannelLine(a45_0x4b7981[_0xd7f6b5(0x116)]('\x20\x20('+_0x28850c[_0xd7f6b5(0x114)]+')'));return _fallbackOrSkip();}if(_0x5501f8[_0xd7f6b5(0x10f)]===0x0)return writeCliSideChannelLine(a45_0x4b7981['yellow'](_0xd7f6b5(0xfe))),_fallbackOrSkip();const _0x22ae4f=await promptSingleAppSelection(_0x5501f8);if(_0x22ae4f===_0xd7f6b5(0x117))return'';if(_0x22ae4f==='custom')return promptCustomAppcode();return _0x22ae4f['appCode'];}export async function selectMultipleApps(_0x2752c9){const _0x5bab9e=a45_0x452b;writeCliSideChannelLine(_0x5bab9e(0x106));let _0x400e01;try{_0x400e01=await withActiveCookie(_0x2752c9,()=>listRemoteApps());}catch(_0x3d411e){writeCliSideChannelLine(_0x5bab9e(0x105));if(_0x3d411e instanceof Error)writeCliSideChannelLine(_0x5bab9e(0x11a)+_0x3d411e[_0x5bab9e(0x114)]+')');return _0x5bab9e(0x118);}if(_0x400e01[_0x5bab9e(0x10f)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x5bab9e(0x118);return promptAppSelection(_0x400e01);}async function _fallbackOrSkip(){const _0x4a633f=a45_0x452b,_0x59d5eb=await select({'message':'App\x20Code:','choices':[{'name':a45_0x4b7981['gray']('(跳过,稍后配置)'),'value':_0x4a633f(0x117)},{'name':a45_0x4b7981[_0x4a633f(0x109)](_0x4a633f(0x107)),'value':_0x4a633f(0x11b)}]});if(_0x59d5eb===_0x4a633f(0x117))return'';return promptCustomAppcode();}function a45_0x10db(){const _0x27c415=['appCode','1244eTWWzh','find','8vPLRZJ','length','818073NFUjVp','includes','114ZcRyRT','无法获取远程应用列表,请手动输入。','message','Invalid\x20App\x20Code','gray','skip','custom','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','\x20\x20(','manual','9171234WMbtPM','✎\x20自定义输入\x20appcode','valid','244349MwCwXg','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','未找到可用应用。','10EJqXCy','8454088bfYlXm','appName','18620xjiCyy','trim','18338111cCkZoW','\x0a无法获取远程应用列表,请手动输入。','正在获取可用应用列表...','✎\x20手动输入','map','yellow','113381ptogMS'];a45_0x10db=function(){return _0x27c415;};return a45_0x10db();}
@@ -1 +1 @@
1
- (function(_0xbdbebf,_0x5910d6){var _0x471c53=a46_0x16ac,_0x14a102=_0xbdbebf();while(!![]){try{var _0x3bf831=parseInt(_0x471c53(0x134))/0x1+-parseInt(_0x471c53(0x13d))/0x2+parseInt(_0x471c53(0x135))/0x3+parseInt(_0x471c53(0x13a))/0x4*(-parseInt(_0x471c53(0x13c))/0x5)+-parseInt(_0x471c53(0x131))/0x6*(-parseInt(_0x471c53(0x133))/0x7)+-parseInt(_0x471c53(0x136))/0x8+-parseInt(_0x471c53(0x137))/0x9*(-parseInt(_0x471c53(0x138))/0xa);if(_0x3bf831===_0x5910d6)break;else _0x14a102['push'](_0x14a102['shift']());}catch(_0x36a56b){_0x14a102['push'](_0x14a102['shift']());}}}(a46_0x5dc3,0xc259e));function a46_0x16ac(_0x4b1c2a,_0x383d75){_0x4b1c2a=_0x4b1c2a-0x131;var _0x5dc3ae=a46_0x5dc3();var _0x16ac97=_0x5dc3ae[_0x4b1c2a];return _0x16ac97;}function a46_0x5dc3(){var _0x35b61e=['method','1176DXDoTG','752589ctpHTf','1383501mvdeDi','2810712agQymO','6361407jfvsqf','10IJsVoN','url','2972adphyO','description','8085Snqbej','915558MkHSiN','31644nPoUoO'];a46_0x5dc3=function(){return _0x35b61e;};return a46_0x5dc3();}export function asDryRunResult(_0x1e6a00,_0x4514ce){var _0x1f4092=a46_0x16ac;return Object['defineProperties'](_0x1e6a00,{'method':{'value':_0x4514ce[_0x1f4092(0x132)],'enumerable':![]},'url':{'value':_0x4514ce[_0x1f4092(0x139)],'enumerable':![]},..._0x4514ce[_0x1f4092(0x13b)]?{'description':{'value':_0x4514ce[_0x1f4092(0x13b)],'enumerable':![]}}:{}});}
1
+ function a46_0x5ee5(_0xcc122,_0x3d7b98){_0xcc122=_0xcc122-0xad;var _0x196554=a46_0x1965();var _0x5ee54e=_0x196554[_0xcc122];return _0x5ee54e;}(function(_0x3aee16,_0x458e6c){var _0x5d0e04=a46_0x5ee5,_0x5ee185=_0x3aee16();while(!![]){try{var _0x20606c=parseInt(_0x5d0e04(0xb9))/0x1*(-parseInt(_0x5d0e04(0xb3))/0x2)+-parseInt(_0x5d0e04(0xb8))/0x3*(parseInt(_0x5d0e04(0xb4))/0x4)+-parseInt(_0x5d0e04(0xb0))/0x5*(-parseInt(_0x5d0e04(0xb5))/0x6)+-parseInt(_0x5d0e04(0xb6))/0x7+parseInt(_0x5d0e04(0xae))/0x8*(parseInt(_0x5d0e04(0xbb))/0x9)+-parseInt(_0x5d0e04(0xb7))/0xa*(parseInt(_0x5d0e04(0xb2))/0xb)+parseInt(_0x5d0e04(0xad))/0xc;if(_0x20606c===_0x458e6c)break;else _0x5ee185['push'](_0x5ee185['shift']());}catch(_0x59b174){_0x5ee185['push'](_0x5ee185['shift']());}}}(a46_0x1965,0x52bee));function a46_0x1965(){var _0x28612f=['3876026HWfHzo','11600WvXHnX','543TVDMac','1FRRuHR','description','9tdrhoR','url','20189016kXDfJx','3707672lXlIbb','defineProperties','1204690bWnjDw','method','5797KUfcZQ','1057992UsyDnz','7820AAbYsl','6meEogj'];a46_0x1965=function(){return _0x28612f;};return a46_0x1965();}export function asDryRunResult(_0x386201,_0x2e997d){var _0xc6a6ab=a46_0x5ee5;return Object[_0xc6a6ab(0xaf)](_0x386201,{'method':{'value':_0x2e997d[_0xc6a6ab(0xb1)],'enumerable':![]},'url':{'value':_0x2e997d[_0xc6a6ab(0xbc)],'enumerable':![]},..._0x2e997d[_0xc6a6ab(0xba)]?{'description':{'value':_0x2e997d['description'],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a47_0x417136=a47_0xdd04;function a47_0xdd04(_0x210cc1,_0x47e56b){_0x210cc1=_0x210cc1-0x1b9;const _0x2e758b=a47_0x2e75();let _0xdd04d7=_0x2e758b[_0x210cc1];return _0xdd04d7;}(function(_0x5d4e5f,_0x2bd53d){const _0x5b0b6c=a47_0xdd04,_0xa72906=_0x5d4e5f();while(!![]){try{const _0x1d99e3=parseInt(_0x5b0b6c(0x1c5))/0x1+parseInt(_0x5b0b6c(0x1c0))/0x2*(parseInt(_0x5b0b6c(0x1cf))/0x3)+-parseInt(_0x5b0b6c(0x1cc))/0x4*(-parseInt(_0x5b0b6c(0x1bf))/0x5)+parseInt(_0x5b0b6c(0x1c1))/0x6*(parseInt(_0x5b0b6c(0x1d4))/0x7)+-parseInt(_0x5b0b6c(0x1d0))/0x8*(-parseInt(_0x5b0b6c(0x1c3))/0x9)+-parseInt(_0x5b0b6c(0x1bd))/0xa*(parseInt(_0x5b0b6c(0x1c9))/0xb)+parseInt(_0x5b0b6c(0x1c7))/0xc*(-parseInt(_0x5b0b6c(0x1c8))/0xd);if(_0x1d99e3===_0x2bd53d)break;else _0xa72906['push'](_0xa72906['shift']());}catch(_0x89bf33){_0xa72906['push'](_0xa72906['shift']());}}}(a47_0x2e75,0xad117));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x417136(0x1b9)};export const CODE_FLAG={'name':a47_0x417136(0x1ca),'type':'string','required':!![],'description':a47_0x417136(0x1d2),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x417136(0x1d1),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a47_0x417136(0x1c2),'type':a47_0x417136(0x1bb),'required':!![],'description':a47_0x417136(0x1cb),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x417136(0x1c6)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x417136(0x1ba),'type':'string','required':![],'description':a47_0x417136(0x1bc)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x417136(0x1d3)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x417136(0x1be),'required':!![],'description':a47_0x417136(0x1c4)};export const DB_TYPE_FLAG={'name':a47_0x417136(0x1ce),'type':a47_0x417136(0x1bb),'required':!![],'description':'Database\x20product\x20type','enum':[a47_0x417136(0x1cd),'POSTGRESQL']};function a47_0x2e75(){const _0x21d426=['3odrIMd','160920jxxuJK','datasetcode','Dataset\x20code\x20(32-char\x20hex\x20UUID)','App\x20code\x20(e.g.\x20app-xxxxx)','2370676zvfjPz','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','appcode','string','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','3786650IMynGq','number','270mmFPGg','2014182LWAbOC','18HXysfx','sqlcode','81tHOuLB','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','73217ewEjUI','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','25522932neWblD','13JIaksS','11lPtRlM','code','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','69416VKTxto','MYSQL','dbtype'];a47_0x2e75=function(){return _0x21d426;};return a47_0x2e75();}
1
+ const a47_0x1b5183=a47_0x27e9;(function(_0x3796a2,_0x13ab38){const _0x804eaf=a47_0x27e9,_0x3e1966=_0x3796a2();while(!![]){try{const _0x268934=parseInt(_0x804eaf(0x192))/0x1+-parseInt(_0x804eaf(0x181))/0x2+parseInt(_0x804eaf(0x188))/0x3+parseInt(_0x804eaf(0x18d))/0x4+-parseInt(_0x804eaf(0x17e))/0x5*(parseInt(_0x804eaf(0x183))/0x6)+parseInt(_0x804eaf(0x182))/0x7*(parseInt(_0x804eaf(0x190))/0x8)+-parseInt(_0x804eaf(0x17c))/0x9*(parseInt(_0x804eaf(0x18b))/0xa);if(_0x268934===_0x13ab38)break;else _0x3e1966['push'](_0x3e1966['shift']());}catch(_0x130834){_0x3e1966['push'](_0x3e1966['shift']());}}}(a47_0x3b7e,0xb9b23));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};function a47_0x27e9(_0x47bc03,_0x10a5c4){_0x47bc03=_0x47bc03-0x17b;const _0x3b7e03=a47_0x3b7e();let _0x27e958=_0x3b7e03[_0x47bc03];return _0x27e958;}function a47_0x3b7e(){const _0x51bcb5=['694631julnfx','350706koehkw','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','dbtype','code','4126701mJbBrI','App\x20code\x20(e.g.\x20app-xxxxx)','Dataset\x20code\x20(32-char\x20hex\x20UUID)','1234020EkMRmA','datasetcode','5849036aqzcGu','string','MYSQL','56ZaLFsJ','number','835711cMoauf','Database\x20product\x20type','144nVPMBo','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','60VCQidz','sqlcode','appcode','1863426BfBGCm'];a47_0x3b7e=function(){return _0x51bcb5;};return a47_0x3b7e();}export const CODE_FLAG={'name':a47_0x1b5183(0x187),'type':a47_0x1b5183(0x18e),'required':!![],'description':a47_0x1b5183(0x18a),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x1b5183(0x18c),'description':a47_0x1b5183(0x18a)};export const SQLCODE_FLAG={'name':a47_0x1b5183(0x17f),'type':a47_0x1b5183(0x18e),'required':!![],'description':a47_0x1b5183(0x185),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a47_0x1b5183(0x17d)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x1b5183(0x180),'type':a47_0x1b5183(0x18e),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x1b5183(0x189)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x1b5183(0x191),'required':!![],'description':a47_0x1b5183(0x184)};export const DB_TYPE_FLAG={'name':a47_0x1b5183(0x186),'type':a47_0x1b5183(0x18e),'required':!![],'description':a47_0x1b5183(0x17b),'enum':[a47_0x1b5183(0x18f),'POSTGRESQL']};
@@ -1 +1 @@
1
- (function(_0x36451,_0x587659){const _0x31f69b=a48_0x3838,_0x336136=_0x36451();while(!![]){try{const _0x55effd=-parseInt(_0x31f69b(0x195))/0x1+-parseInt(_0x31f69b(0x192))/0x2+parseInt(_0x31f69b(0x197))/0x3*(parseInt(_0x31f69b(0x191))/0x4)+parseInt(_0x31f69b(0x193))/0x5+parseInt(_0x31f69b(0x187))/0x6*(parseInt(_0x31f69b(0x198))/0x7)+-parseInt(_0x31f69b(0x18a))/0x8*(-parseInt(_0x31f69b(0x196))/0x9)+parseInt(_0x31f69b(0x19a))/0xa*(-parseInt(_0x31f69b(0x194))/0xb);if(_0x55effd===_0x587659)break;else _0x336136['push'](_0x336136['shift']());}catch(_0x4971d0){_0x336136['push'](_0x336136['shift']());}}}(a48_0x285a,0xbf3ef));import{existsSync,statSync}from'node:fs';function a48_0x3838(_0x395e63,_0x43754c){_0x395e63=_0x395e63-0x187;const _0x285adc=a48_0x285a();let _0x3838aa=_0x285adc[_0x395e63];return _0x3838aa;}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a48_0x285a(){const _0x4a032b=['2387NhEFEE','914752VTOHTn','145413brGpxN','21lBgpwP','4207Pdhjbt','toFixed','29660cpPwgv','11478xHeHue','\x20path\x20is\x20required.','File\x20is\x20not\x20a\x20regular\x20file:\x20','272wyKItL','validation','\x20MB','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','ceil','size','trim','401564rjUvbO','2463302UYSbIo','5857900zCEryc'];a48_0x285a=function(){return _0x4a032b;};return a48_0x285a();}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x5a75e9){const _0x125c4c=a48_0x3838;if(_0x5a75e9>=BYTES_PER_MB){const _0x2f060e=Math[_0x125c4c(0x18e)](_0x5a75e9/BYTES_PER_MB*0x64)/0x64;return _0x2f060e[_0x125c4c(0x199)](0x2)+_0x125c4c(0x18c);}return _0x5a75e9+'\x20B';}export function requireDevelopmentUploadFile(_0x3866ca,_0x398c21){const _0x4dbebd=a48_0x3838,_0x41edb4=_0x3866ca[_0x4dbebd(0x190)]();if(!_0x41edb4)throw CliErrors['validation'](_0x398c21+_0x4dbebd(0x188));if(!existsSync(_0x41edb4))throw CliErrors[_0x4dbebd(0x18b)]('File\x20not\x20found:\x20'+_0x41edb4);const _0x4a9e4e=statSync(_0x41edb4);if(!_0x4a9e4e['isFile']())throw CliErrors[_0x4dbebd(0x18b)](_0x4dbebd(0x189)+_0x41edb4);if(_0x4a9e4e['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x4dbebd(0x18b)](_0x4dbebd(0x18d)+_0x41edb4+'\x20('+formatBytes(_0x4a9e4e['size'])+')');return{'path':_0x41edb4,'size':_0x4a9e4e[_0x4dbebd(0x18f)]};}
1
+ function a48_0xfbf1(_0x47632d,_0x213e32){_0x47632d=_0x47632d-0xb5;const _0x283ce2=a48_0x283c();let _0xfbf1b=_0x283ce2[_0x47632d];return _0xfbf1b;}(function(_0x1acdf0,_0x3dfdb7){const _0x26919e=a48_0xfbf1,_0x399e1f=_0x1acdf0();while(!![]){try{const _0x32a15b=parseInt(_0x26919e(0xc3))/0x1+-parseInt(_0x26919e(0xca))/0x2*(parseInt(_0x26919e(0xc6))/0x3)+parseInt(_0x26919e(0xb7))/0x4*(parseInt(_0x26919e(0xb6))/0x5)+parseInt(_0x26919e(0xc0))/0x6+parseInt(_0x26919e(0xc5))/0x7*(parseInt(_0x26919e(0xc9))/0x8)+parseInt(_0x26919e(0xbe))/0x9*(parseInt(_0x26919e(0xc8))/0xa)+-parseInt(_0x26919e(0xc1))/0xb*(parseInt(_0x26919e(0xc4))/0xc);if(_0x32a15b===_0x3dfdb7)break;else _0x399e1f['push'](_0x399e1f['shift']());}catch(_0x18f3e6){_0x399e1f['push'](_0x399e1f['shift']());}}}(a48_0x283c,0xf0b0f));import{existsSync,statSync}from'node:fs';function a48_0x283c(){const _0x354dc3=['3qQdxNT','validation','90eJlGlm','8qABhoM','1944812nzFuEq','\x20path\x20is\x20required.','775475hOXMsp','8FhODhy','ceil','trim','\x20MB','toFixed','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20not\x20found:\x20','626895NXWRmU','size','10179012KnYbUH','33IzEwjh','isFile','646639UxXeDy','10225008vTfyvH','8640121efsZOC'];a48_0x283c=function(){return _0x354dc3;};return a48_0x283c();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0xf4667b){const _0x352436=a48_0xfbf1;if(_0xf4667b>=BYTES_PER_MB){const _0x62ce3f=Math[_0x352436(0xb8)](_0xf4667b/BYTES_PER_MB*0x64)/0x64;return _0x62ce3f[_0x352436(0xbb)](0x2)+_0x352436(0xba);}return _0xf4667b+'\x20B';}export function requireDevelopmentUploadFile(_0x4b3a77,_0x246f37){const _0x57d69e=a48_0xfbf1,_0x339117=_0x4b3a77[_0x57d69e(0xb9)]();if(!_0x339117)throw CliErrors[_0x57d69e(0xc7)](_0x246f37+_0x57d69e(0xb5));if(!existsSync(_0x339117))throw CliErrors['validation'](_0x57d69e(0xbd)+_0x339117);const _0x363a31=statSync(_0x339117);if(!_0x363a31[_0x57d69e(0xc2)]())throw CliErrors[_0x57d69e(0xc7)](_0x57d69e(0xbc)+_0x339117);if(_0x363a31[_0x57d69e(0xbf)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x57d69e(0xc7)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x339117+'\x20('+formatBytes(_0x363a31[_0x57d69e(0xbf)])+')');return{'path':_0x339117,'size':_0x363a31[_0x57d69e(0xbf)]};}
@@ -1 +1 @@
1
- function a49_0x438a(_0x3c325d,_0x17c2e0){_0x3c325d=_0x3c325d-0x1e1;const _0x1e9691=a49_0x1e96();let _0x438a8d=_0x1e9691[_0x3c325d];return _0x438a8d;}(function(_0x48e423,_0x797ec){const _0x180878=a49_0x438a,_0x90c4ff=_0x48e423();while(!![]){try{const _0x34a09a=parseInt(_0x180878(0x1e1))/0x1*(parseInt(_0x180878(0x1ea))/0x2)+-parseInt(_0x180878(0x1e2))/0x3+-parseInt(_0x180878(0x1e3))/0x4*(-parseInt(_0x180878(0x1f0))/0x5)+-parseInt(_0x180878(0x1e7))/0x6*(parseInt(_0x180878(0x1e5))/0x7)+parseInt(_0x180878(0x1e4))/0x8+parseInt(_0x180878(0x1e8))/0x9*(-parseInt(_0x180878(0x1ed))/0xa)+parseInt(_0x180878(0x1ec))/0xb;if(_0x34a09a===_0x797ec)break;else _0x90c4ff['push'](_0x90c4ff['shift']());}catch(_0x5b27ad){_0x90c4ff['push'](_0x90c4ff['shift']());}}}(a49_0x1e96,0x28516));export function validateAppcode(_0x380400){const _0xed7726=a49_0x438a,_0x3af8d2=_0x380400[_0xed7726(0x1e6)]();if(!_0x3af8d2)return{'valid':![],'message':_0xed7726(0x1ef)};if(_0x3af8d2[_0xed7726(0x1eb)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0xed7726(0x1e9)](_0x3af8d2))return{'valid':![],'message':_0xed7726(0x1ee)};return{'valid':!![]};}function a49_0x1e96(){const _0x28821f=['test','8486qnKmWH','length','480150DJycOW','142490wEiReP','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','App\x20Code\x20cannot\x20be\x20empty','5dPPUVy','64SKGWiE','391569SsGBgC','87344ADIrki','2347960KlMSoY','875ecnWbf','trim','11286oepEgh','63SkSAWr'];a49_0x1e96=function(){return _0x28821f;};return a49_0x1e96();}
1
+ function a49_0x3329(){const _0x523422=['14416809WKpAMu','test','90WXozjE','4908RKamoT','259762AYOoic','379344yGATTt','668691bsdSiA','405FwUGXB','6TqSFRe','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','823928XixYtF','App\x20Code\x20cannot\x20be\x20empty','111920dNWNGE','trim','56KsyPeF','App\x20Code\x20cannot\x20exceed\x20100\x20characters'];a49_0x3329=function(){return _0x523422;};return a49_0x3329();}(function(_0x35ed9e,_0x201a5d){const _0x4dd31b=a49_0xbac5,_0x947d36=_0x35ed9e();while(!![]){try{const _0x22623b=-parseInt(_0x4dd31b(0x16d))/0x1+-parseInt(_0x4dd31b(0x173))/0x2+parseInt(_0x4dd31b(0x171))/0x3*(parseInt(_0x4dd31b(0x175))/0x4)+parseInt(_0x4dd31b(0x170))/0x5*(parseInt(_0x4dd31b(0x17c))/0x6)+-parseInt(_0x4dd31b(0x177))/0x7*(-parseInt(_0x4dd31b(0x16e))/0x8)+parseInt(_0x4dd31b(0x16f))/0x9*(-parseInt(_0x4dd31b(0x17b))/0xa)+parseInt(_0x4dd31b(0x179))/0xb;if(_0x22623b===_0x201a5d)break;else _0x947d36['push'](_0x947d36['shift']());}catch(_0x4c443e){_0x947d36['push'](_0x947d36['shift']());}}}(a49_0x3329,0x732d4));function a49_0xbac5(_0x32c206,_0x496030){_0x32c206=_0x32c206-0x16d;const _0x332980=a49_0x3329();let _0xbac5ee=_0x332980[_0x32c206];return _0xbac5ee;}export function validateAppcode(_0x5bc7cc){const _0x3869d4=a49_0xbac5,_0x17e201=_0x5bc7cc[_0x3869d4(0x176)]();if(!_0x17e201)return{'valid':![],'message':_0x3869d4(0x174)};if(_0x17e201['length']>0x64)return{'valid':![],'message':_0x3869d4(0x178)};if(!/^[A-Za-z0-9_-]+$/[_0x3869d4(0x17a)](_0x17e201))return{'valid':![],'message':_0x3869d4(0x172)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a50_0x490c85=a50_0x15a0;(function(_0x3e1c3b,_0x4e3b90){const _0x297a32=a50_0x15a0,_0x139dee=_0x3e1c3b();while(!![]){try{const _0x552843=parseInt(_0x297a32(0x151))/0x1+-parseInt(_0x297a32(0x157))/0x2+-parseInt(_0x297a32(0x154))/0x3+-parseInt(_0x297a32(0x159))/0x4+-parseInt(_0x297a32(0x15e))/0x5+-parseInt(_0x297a32(0x163))/0x6*(-parseInt(_0x297a32(0x15f))/0x7)+-parseInt(_0x297a32(0x150))/0x8*(-parseInt(_0x297a32(0x15b))/0x9);if(_0x552843===_0x4e3b90)break;else _0x139dee['push'](_0x139dee['shift']());}catch(_0x3dc8f6){_0x139dee['push'](_0x139dee['shift']());}}}(a50_0x2447,0xa88fa));function a50_0x2447(){const _0xd8b7c7=['\x20config\x20get\x20--key\x20<key>','1755224wJvHWf','key','3936596DZsSKE','string','2024406SncfKj','Missing\x20key.','object','2591440cXRPym','2793JhTWLi','Key\x20not\x20found:\x20','config','Usage:\x20','18966puVqzZ','validation','Get\x20a\x20config\x20value\x20by\x20key','64yfomQw','689543KeEDub','read','get','2039337OrlRto','str'];a50_0x2447=function(){return _0xd8b7c7;};return a50_0x2447();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a50_0x15a0(_0xf0c08d,_0x4ae4ae){_0xf0c08d=_0xf0c08d-0x150;const _0x244766=a50_0x2447();let _0x15a067=_0x244766[_0xf0c08d];return _0x15a067;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x494c71){const _0x17a98b=a50_0x15a0,_0x36c278=_0x494c71[_0x17a98b(0x155)](_0x17a98b(0x158));if(!_0x36c278)throw CliErrors[_0x17a98b(0x164)](_0x17a98b(0x15c),_0x17a98b(0x162)+CLI_BIN_NAME+_0x17a98b(0x156));const _0x350e62=readConfig(),_0x2a6163=_0x36c278==='app'?'appcode':_0x36c278,_0x42fee2=_0x350e62[_0x2a6163];if(_0x42fee2===undefined)throw CliErrors[_0x17a98b(0x164)](_0x17a98b(0x160)+_0x36c278);return{'ok':!![],'data':typeof _0x42fee2==='object'?_0x42fee2:{[_0x2a6163]:_0x42fee2},'message':typeof _0x42fee2===_0x17a98b(0x15d)?undefined:String(_0x42fee2)};}export const configGetDefinition={'service':a50_0x490c85(0x161),'command':a50_0x490c85(0x153),'description':a50_0x490c85(0x165),'risk':a50_0x490c85(0x152),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0x490c85(0x158),'type':a50_0x490c85(0x15a),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a50_0x184a3e=a50_0x1dcd;function a50_0x1dcd(_0x34d2a2,_0x64c54d){_0x34d2a2=_0x34d2a2-0x116;const _0x28d1b5=a50_0x28d1();let _0x1dcd24=_0x28d1b5[_0x34d2a2];return _0x1dcd24;}function a50_0x28d1(){const _0x5623be=['3313308KkysGp','app','str','object','validation','3768340hanTZp','7IdBLrx','2914972sEXtij','2456751FpEhEH','Usage:\x20','config','get','read','appcode','string','10706480SBaLSM','\x20config\x20get\x20--key\x20<key>','842246yOkHjD','Get\x20a\x20config\x20value\x20by\x20key','410096gMzYZt'];a50_0x28d1=function(){return _0x5623be;};return a50_0x28d1();}(function(_0xc72f1c,_0x5be4a5){const _0x45f49c=a50_0x1dcd,_0x1bc762=_0xc72f1c();while(!![]){try{const _0x55beb1=-parseInt(_0x45f49c(0x11e))/0x1+-parseInt(_0x45f49c(0x120))/0x2+parseInt(_0x45f49c(0x129))/0x3+parseInt(_0x45f49c(0x128))/0x4+parseInt(_0x45f49c(0x126))/0x5+parseInt(_0x45f49c(0x121))/0x6*(parseInt(_0x45f49c(0x127))/0x7)+-parseInt(_0x45f49c(0x11c))/0x8;if(_0x55beb1===_0x5be4a5)break;else _0x1bc762['push'](_0x1bc762['shift']());}catch(_0x1e8267){_0x1bc762['push'](_0x1bc762['shift']());}}}(a50_0x28d1,0x723e6));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x193a78){const _0x10d26a=a50_0x1dcd,_0x21241b=_0x193a78[_0x10d26a(0x123)]('key');if(!_0x21241b)throw CliErrors[_0x10d26a(0x125)]('Missing\x20key.',_0x10d26a(0x116)+CLI_BIN_NAME+_0x10d26a(0x11d));const _0x7369de=readConfig(),_0x1e12a8=_0x21241b===_0x10d26a(0x122)?_0x10d26a(0x11a):_0x21241b,_0x295a2f=_0x7369de[_0x1e12a8];if(_0x295a2f===undefined)throw CliErrors[_0x10d26a(0x125)]('Key\x20not\x20found:\x20'+_0x21241b);return{'ok':!![],'data':typeof _0x295a2f===_0x10d26a(0x124)?_0x295a2f:{[_0x1e12a8]:_0x295a2f},'message':typeof _0x295a2f===_0x10d26a(0x124)?undefined:String(_0x295a2f)};}export const configGetDefinition={'service':a50_0x184a3e(0x117),'command':a50_0x184a3e(0x118),'description':a50_0x184a3e(0x11f),'risk':a50_0x184a3e(0x119),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a50_0x184a3e(0x11b),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- function a51_0xf036(){const _0x1d2aeb=['6PXZhPj','2154060EnchrJ','2981160FtLhBT','147798ZzbHoL','9505804CltoSx','9uHkdrR','245562FeIlkB','935848HjVWph','26928uaFdbx'];a51_0xf036=function(){return _0x1d2aeb;};return a51_0xf036();}(function(_0x5b4e6e,_0x2e6aa0){const _0x1c34b2=a51_0x5147,_0x25669f=_0x5b4e6e();while(!![]){try{const _0x2d4cc6=-parseInt(_0x1c34b2(0xb9))/0x1+-parseInt(_0x1c34b2(0xb5))/0x2+-parseInt(_0x1c34b2(0xbc))/0x3+-parseInt(_0x1c34b2(0xb8))/0x4+parseInt(_0x1c34b2(0xb7))/0x5*(parseInt(_0x1c34b2(0xb6))/0x6)+parseInt(_0x1c34b2(0xba))/0x7+-parseInt(_0x1c34b2(0xbd))/0x8*(parseInt(_0x1c34b2(0xbb))/0x9);if(_0x2d4cc6===_0x2e6aa0)break;else _0x25669f['push'](_0x25669f['shift']());}catch(_0x5cd933){_0x25669f['push'](_0x25669f['shift']());}}}(a51_0xf036,0xa6d85));function a51_0x5147(_0x329448,_0x522dda){_0x329448=_0x329448-0xb5;const _0xf03667=a51_0xf036();let _0x51471e=_0xf03667[_0x329448];return _0x51471e;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ (function(_0x54939a,_0x5dd310){const _0x324b19=a51_0x4048,_0x2aeaf4=_0x54939a();while(!![]){try{const _0xfbb0bc=-parseInt(_0x324b19(0x181))/0x1+parseInt(_0x324b19(0x180))/0x2+parseInt(_0x324b19(0x184))/0x3*(-parseInt(_0x324b19(0x185))/0x4)+-parseInt(_0x324b19(0x17f))/0x5+-parseInt(_0x324b19(0x17d))/0x6*(parseInt(_0x324b19(0x182))/0x7)+-parseInt(_0x324b19(0x17e))/0x8+parseInt(_0x324b19(0x183))/0x9;if(_0xfbb0bc===_0x5dd310)break;else _0x2aeaf4['push'](_0x2aeaf4['shift']());}catch(_0x1b1d56){_0x2aeaf4['push'](_0x2aeaf4['shift']());}}}(a51_0x2fa2,0x49e1b));function a51_0x2fa2(){const _0x4232ae=['7YaeioA','8077104bxUTyk','1176ItdUOy','412WkduAD','852486XtRbdf','2181704RelvhF','1826250IfEqRm','928564NOnxem','238699qtdJOT'];a51_0x2fa2=function(){return _0x4232ae;};return a51_0x2fa2();}function a51_0x4048(_0x5a6b50,_0x30b1f2){_0x5a6b50=_0x5a6b50-0x17d;const _0x2fa2d5=a51_0x2fa2();let _0x40480b=_0x2fa2d5[_0x5a6b50];return _0x40480b;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- const a52_0x247839=a52_0x3a61;(function(_0x3bea13,_0x44efe0){const _0x461793=a52_0x3a61,_0x4cf6c5=_0x3bea13();while(!![]){try{const _0x3b4fe1=-parseInt(_0x461793(0xc2))/0x1+-parseInt(_0x461793(0xcc))/0x2+parseInt(_0x461793(0xc5))/0x3*(-parseInt(_0x461793(0xca))/0x4)+parseInt(_0x461793(0xc6))/0x5+parseInt(_0x461793(0xce))/0x6+-parseInt(_0x461793(0xc9))/0x7+parseInt(_0x461793(0xcd))/0x8*(parseInt(_0x461793(0xcb))/0x9);if(_0x3b4fe1===_0x44efe0)break;else _0x4cf6c5['push'](_0x4cf6c5['shift']());}catch(_0x1d4149){_0x4cf6c5['push'](_0x4cf6c5['shift']());}}}(a52_0x1b1f,0xb8394));import{readScopedConfig}from'../../commands/config/shared.js';function a52_0x3a61(_0x195070,_0x436aa6){_0x195070=_0x195070-0xc1;const _0x1b1fe3=a52_0x1b1f();let _0x3a61df=_0x1b1fe3[_0x195070];return _0x3a61df;}import{readConfig}from'../../utils/config.js';async function execute(_0x51719f){const _0x1ad174=a52_0x3a61,_0x13534c=_0x51719f[_0x1ad174(0xc3)](_0x1ad174(0xc8))?readScopedConfig(_0x1ad174(0xc8)):readConfig();return{'ok':!![],'data':_0x13534c};}export const configListDefinition={'service':'config','command':'list','description':a52_0x247839(0xc1),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x247839(0xc8),'type':a52_0x247839(0xc4),'description':a52_0x247839(0xc7),'default':![]}],'execute':execute};function a52_0x1b1f(){const _0x43983e=['3rzhLdG','6283920OEiwJi','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','global','1936655GwaJna','4737544lUQYwS','3843YlUiJy','2346328OwmFPU','47528rWNQrJ','387930YPkGsU','List\x20all\x20config\x20values','469451ijZYXq','bool','boolean'];a52_0x1b1f=function(){return _0x43983e;};return a52_0x1b1f();}
1
+ const a52_0x187c59=a52_0x54ce;function a52_0x54ce(_0x3abe58,_0x2f1ea6){_0x3abe58=_0x3abe58-0xa4;const _0xc7870=a52_0xc787();let _0x54ce5d=_0xc7870[_0x3abe58];return _0x54ce5d;}(function(_0x49da37,_0x2ca334){const _0x29e595=a52_0x54ce,_0x33bf80=_0x49da37();while(!![]){try{const _0x493eff=-parseInt(_0x29e595(0xa4))/0x1+parseInt(_0x29e595(0xaa))/0x2*(-parseInt(_0x29e595(0xaf))/0x3)+parseInt(_0x29e595(0xb2))/0x4*(parseInt(_0x29e595(0xa5))/0x5)+-parseInt(_0x29e595(0xa7))/0x6+parseInt(_0x29e595(0xad))/0x7*(parseInt(_0x29e595(0xb1))/0x8)+parseInt(_0x29e595(0xac))/0x9+parseInt(_0x29e595(0xa6))/0xa;if(_0x493eff===_0x2ca334)break;else _0x33bf80['push'](_0x33bf80['shift']());}catch(_0x69f91){_0x33bf80['push'](_0x33bf80['shift']());}}}(a52_0xc787,0x8da2d));function a52_0xc787(){const _0x4abc94=['list','bool','113228nLFNYX','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','4920975wLNRXj','1082039rhBFno','List\x20all\x20config\x20values','24EEwkrN','global','8jrOwQf','265836upLuZn','boolean','1083659RtvJXv','20FBNJUr','17489730biaxGg','3596694lbdgQc'];a52_0xc787=function(){return _0x4abc94;};return a52_0xc787();}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x49bc9d){const _0x163321=a52_0x54ce,_0x1087fe=_0x49bc9d[_0x163321(0xa9)](_0x163321(0xb0))?readScopedConfig(_0x163321(0xb0)):readConfig();return{'ok':!![],'data':_0x1087fe};}export const configListDefinition={'service':'config','command':a52_0x187c59(0xa8),'description':a52_0x187c59(0xae),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x187c59(0xb0),'type':a52_0x187c59(0xb3),'description':a52_0x187c59(0xab),'default':![]}],'execute':execute};