@lovrabet/rabetbase-cli 2.3.5 → 2.3.6-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) 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/validate.js +1 -1
  50. package/lib/commands/config/get.js +1 -1
  51. package/lib/commands/config/index.js +1 -1
  52. package/lib/commands/config/list.js +1 -1
  53. package/lib/commands/config/set.js +1 -1
  54. package/lib/commands/config/shared.js +1 -1
  55. package/lib/commands/data/filter.js +1 -1
  56. package/lib/commands/data/getOne.js +1 -1
  57. package/lib/commands/data/index.js +1 -1
  58. package/lib/commands/data/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/capability.js +1 -1
  61. package/lib/commands/dataset/delete.js +1 -1
  62. package/lib/commands/dataset/detail.js +1 -1
  63. package/lib/commands/dataset/extend-update.js +1 -1
  64. package/lib/commands/dataset/field-update.js +1 -1
  65. package/lib/commands/dataset/generate.js +1 -1
  66. package/lib/commands/dataset/index.js +1 -1
  67. package/lib/commands/dataset/list.js +1 -1
  68. package/lib/commands/dataset/operations.js +1 -1
  69. package/lib/commands/dataset/relation-audit.js +1 -1
  70. package/lib/commands/dataset/relation-create.js +1 -1
  71. package/lib/commands/dataset/relation-delete.js +1 -1
  72. package/lib/commands/dataset/relation-shared.js +1 -1
  73. package/lib/commands/dataset/relation-update.js +1 -1
  74. package/lib/commands/dataset/relations.js +1 -1
  75. package/lib/commands/dataset/rename.js +1 -1
  76. package/lib/commands/dataset/restore.js +1 -1
  77. package/lib/commands/db/analyze-cancel.js +1 -1
  78. package/lib/commands/db/analyze-start.js +1 -1
  79. package/lib/commands/db/analyze-status.js +1 -1
  80. package/lib/commands/db/create.js +1 -1
  81. package/lib/commands/db/delete.js +1 -1
  82. package/lib/commands/db/detail.js +1 -1
  83. package/lib/commands/db/diff.js +1 -1
  84. package/lib/commands/db/index.js +1 -1
  85. package/lib/commands/db/list.js +1 -1
  86. package/lib/commands/db/shared.js +1 -1
  87. package/lib/commands/db/tables.js +1 -1
  88. package/lib/commands/db/test.js +1 -1
  89. package/lib/commands/db/update.js +1 -1
  90. package/lib/commands/doctor.js +1 -1
  91. package/lib/commands/init/index.js +1 -1
  92. package/lib/commands/issue/index.js +1 -1
  93. package/lib/commands/issue/nudge.js +1 -1
  94. package/lib/commands/issue/report.js +1 -1
  95. package/lib/commands/issue/shared.js +1 -1
  96. package/lib/commands/logs/index.js +1 -1
  97. package/lib/commands/menu/index.js +1 -1
  98. package/lib/commands/menu/list.js +1 -1
  99. package/lib/commands/menu/shared/compare-table.js +1 -1
  100. package/lib/commands/menu/shared/index.js +1 -1
  101. package/lib/commands/menu/shared/inquirer.js +1 -1
  102. package/lib/commands/menu/shared/local-pages.js +1 -1
  103. package/lib/commands/menu/shared/logic.js +1 -1
  104. package/lib/commands/menu/shared/service.js +1 -1
  105. package/lib/commands/menu/shared/sync-core.js +1 -1
  106. package/lib/commands/menu/shared/update-core.js +1 -1
  107. package/lib/commands/menu/shared/valid-url.js +1 -1
  108. package/lib/commands/menu/sync.js +1 -1
  109. package/lib/commands/menu/update.js +1 -1
  110. package/lib/commands/page/generate-start.js +1 -1
  111. package/lib/commands/page/generate-status.js +1 -1
  112. package/lib/commands/page/index.js +1 -1
  113. package/lib/commands/page/pull.js +1 -1
  114. package/lib/commands/page/push.js +1 -1
  115. package/lib/commands/page/relation-audit.js +1 -1
  116. package/lib/commands/page/shared.js +1 -1
  117. package/lib/commands/page/standard-page-status.js +1 -1
  118. package/lib/commands/page/sync.js +1 -1
  119. package/lib/commands/permit/index.js +1 -1
  120. package/lib/commands/permit/page-get.js +1 -1
  121. package/lib/commands/permit/page-set.js +1 -1
  122. package/lib/commands/permit/role-apis-set.js +1 -1
  123. package/lib/commands/permit/role-menus-set.js +1 -1
  124. package/lib/commands/permit/role-menus.js +1 -1
  125. package/lib/commands/permit/shared.js +1 -1
  126. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  127. package/lib/commands/project/create/format-elapsed.js +1 -1
  128. package/lib/commands/project/create/main.js +1 -1
  129. package/lib/commands/project/create/non-interactive.js +1 -1
  130. package/lib/commands/project/create/project-template-path.js +1 -1
  131. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  132. package/lib/commands/project/create/use-format-code.js +1 -1
  133. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  134. package/lib/commands/project/index.js +1 -1
  135. package/lib/commands/project/init.js +1 -1
  136. package/lib/commands/project/upgrade.js +1 -1
  137. package/lib/commands/registry.js +1 -1
  138. package/lib/commands/role/create.js +1 -1
  139. package/lib/commands/role/delete.js +1 -1
  140. package/lib/commands/role/detail.js +1 -1
  141. package/lib/commands/role/index.js +1 -1
  142. package/lib/commands/role/list.js +1 -1
  143. package/lib/commands/role/shared.js +1 -1
  144. package/lib/commands/role/update.js +1 -1
  145. package/lib/commands/role/user-add.js +1 -1
  146. package/lib/commands/role/user-remove.js +1 -1
  147. package/lib/commands/role/user-resolve.js +1 -1
  148. package/lib/commands/run/index.js +1 -1
  149. package/lib/commands/schema.js +1 -1
  150. package/lib/commands/sql/create.js +1 -1
  151. package/lib/commands/sql/delete.js +1 -1
  152. package/lib/commands/sql/detail.js +1 -1
  153. package/lib/commands/sql/exec.js +1 -1
  154. package/lib/commands/sql/index.js +1 -1
  155. package/lib/commands/sql/list.js +1 -1
  156. package/lib/commands/sql/pull.js +1 -1
  157. package/lib/commands/sql/push.js +1 -1
  158. package/lib/commands/sql/save.js +1 -1
  159. package/lib/commands/sql/shared.js +1 -1
  160. package/lib/commands/sql/status.js +1 -1
  161. package/lib/commands/sql/validate.js +1 -1
  162. package/lib/commands/workspace/add.js +1 -1
  163. package/lib/commands/workspace/index.js +1 -1
  164. package/lib/commands/workspace/remove.js +1 -1
  165. package/lib/config/schema.js +1 -1
  166. package/lib/constant/cdn.js +1 -1
  167. package/lib/constant/cli.js +1 -1
  168. package/lib/constant/defaults.js +1 -1
  169. package/lib/constant/domain.js +1 -1
  170. package/lib/constant/env.js +1 -1
  171. package/lib/constant/output.js +1 -1
  172. package/lib/constant/paths.js +1 -1
  173. package/lib/constant/risk.js +1 -1
  174. package/lib/context/app-resolver.js +1 -1
  175. package/lib/context/auth-resolver.js +1 -1
  176. package/lib/context/config-loader.js +1 -1
  177. package/lib/context.js +1 -1
  178. package/lib/core/alias-resolver.js +1 -1
  179. package/lib/core/api-client.js +1 -1
  180. package/lib/core/bff/config.js +1 -1
  181. package/lib/core/bff/file-system.js +1 -1
  182. package/lib/core/bff/hash.js +1 -1
  183. package/lib/core/bff/lock.js +1 -1
  184. package/lib/core/bff/utils.js +1 -1
  185. package/lib/core/db-resolver.js +1 -1
  186. package/lib/core/page/file-system.js +1 -1
  187. package/lib/core/page/hash.js +1 -1
  188. package/lib/core/page/lock.js +1 -1
  189. package/lib/core/sql-sync/config.js +1 -1
  190. package/lib/core/sql-sync/file-system.js +1 -1
  191. package/lib/core/sql-sync/hash.js +1 -1
  192. package/lib/core/sql-sync/lock.js +1 -1
  193. package/lib/core/sql-sync/utils.js +1 -1
  194. package/lib/core/sql-validator.js +1 -1
  195. package/lib/errors.js +1 -1
  196. package/lib/framework/build-all-flags.js +1 -1
  197. package/lib/framework/flags.js +1 -1
  198. package/lib/framework/help.js +1 -1
  199. package/lib/framework/index.js +1 -1
  200. package/lib/framework/output.js +1 -1
  201. package/lib/framework/response.js +1 -1
  202. package/lib/framework/runner-alias.js +1 -1
  203. package/lib/framework/runner.js +1 -1
  204. package/lib/framework/schema-export.js +1 -1
  205. package/lib/framework/types.js +1 -1
  206. package/lib/generated/build-info.js +1 -1
  207. package/lib/help.js +1 -1
  208. package/lib/skills/main.js +1 -1
  209. package/lib/skills/npx-skills-add.js +1 -1
  210. package/lib/telemetry/cli-command-trace.js +1 -1
  211. package/lib/telemetry/cli-help-trace.js +1 -1
  212. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  213. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  214. package/lib/telemetry/send-cli-trace-log.js +1 -1
  215. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  216. package/lib/utils/ai_config.js +1 -1
  217. package/lib/utils/apply-jq-filter.js +1 -1
  218. package/lib/utils/cdn-config.js +1 -1
  219. package/lib/utils/check-sdk-version.js +1 -1
  220. package/lib/utils/cli-version-check.js +1 -1
  221. package/lib/utils/cli-version-policy.js +1 -1
  222. package/lib/utils/config.js +1 -1
  223. package/lib/utils/copy-directory.js +1 -1
  224. package/lib/utils/entity-with-id.js +1 -1
  225. package/lib/utils/file-utils.js +1 -1
  226. package/lib/utils/guides-cdn.js +1 -1
  227. package/lib/utils/http-client.js +1 -1
  228. package/lib/utils/is-non-interactive.js +1 -1
  229. package/lib/utils/logger.js +1 -1
  230. package/lib/utils/params.js +1 -1
  231. package/lib/utils/platform.js +1 -1
  232. package/lib/utils/rules-cdn.js +1 -1
  233. package/lib/utils/sleep.js +1 -1
  234. package/lib/utils/template-replacer.js +1 -1
  235. package/lib/utils/update-notice.js +1 -1
  236. package/lib/utils/version.js +1 -1
  237. package/lib/utils/with-active-cookie.js +1 -1
  238. package/lib/utils/write-cli-side-channel.js +1 -1
  239. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x58a541=a36_0x397a;(function(_0x294ed4,_0x356aae){const _0x28bdf8=a36_0x397a,_0x4b93d5=_0x294ed4();while(!![]){try{const _0x569b85=-parseInt(_0x28bdf8(0x16e))/0x1*(-parseInt(_0x28bdf8(0x1b5))/0x2)+-parseInt(_0x28bdf8(0x16f))/0x3+-parseInt(_0x28bdf8(0x1ae))/0x4+parseInt(_0x28bdf8(0x1ad))/0x5+-parseInt(_0x28bdf8(0x1b2))/0x6*(parseInt(_0x28bdf8(0x1a3))/0x7)+-parseInt(_0x28bdf8(0x189))/0x8*(-parseInt(_0x28bdf8(0x1ab))/0x9)+parseInt(_0x28bdf8(0x199))/0xa;if(_0x569b85===_0x356aae)break;else _0x4b93d5['push'](_0x4b93d5['shift']());}catch(_0x191629){_0x4b93d5['push'](_0x4b93d5['shift']());}}}(a36_0x47d0,0xa392a));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a36_0x397a(_0x35507e,_0x5d1684){_0x35507e=_0x35507e-0x16e;const _0x47d0f5=a36_0x47d0();let _0x397a0f=_0x47d0f5[_0x35507e];return _0x397a0f;}import{loadAliasMap}from'../../core/alias-resolver.js';function a36_0x47d0(){const _0x2ae525=['1JsiRfN','3937869eQqDte','/api/management/library/scripts/list?appCode=','length','stringify','utf8','No\x20remote\x20BFF\x20scripts\x20found.','GET','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x20pulled,\x20','stderr','bool','\x20failed','bff','apps','ENDPOINT','unresolvable\x20target\x20path','\x20remote\x20BFF\x20script(s)\x20for\x20pull','includes','close','would_pull','Lock\x20scope\x20for\x20app\x20\x22','skipped','str','all','functionNode','pull','188432gycvnV','Force\x20pull\x20cancelled.','hookLocation','map','lockKey','string','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','write','operationType','datasetCode','functionName','HOOK','push','type','force','message','7123360BLrlVl','functions','scriptContent','local\x20unsynced\x20changes','Remote\x20script\x20missing\x20content.','cancelled','scriptType','toISOString','Force\x20overwrite\x20local\x20unsynced\x20changes','Remote\x20script\x20missing\x20id.','1176zXLgoB','scriptsRoot','appCode','nonInteractive','conflict','Pull\x20only\x20this\x20script\x20type','parse','toLowerCase','351hWGRHD','validation','978695lTVInq','317184IEEUdc','yes','apiDir','alias','6276pDUTCs','filePath','boolean','821920kEtnin','lockFilePath'];a36_0x47d0=function(){return _0x2ae525;};return a36_0x47d0();}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x58a541(0x17b),'command':a36_0x58a541(0x188),'description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':a36_0x58a541(0x190),'flags':[{'name':'type','type':a36_0x58a541(0x18e),'description':a36_0x58a541(0x1a8),'enum':['COMMON',a36_0x58a541(0x17d),a36_0x58a541(0x194)]},{'name':a36_0x58a541(0x197),'type':a36_0x58a541(0x1b4),'description':a36_0x58a541(0x1a1)}],async 'dryRun'(_0xb785f3){const _0x466f09=a36_0x58a541,_0x4e8735=loadBffProjectConfig(_0xb785f3[_0x466f09(0x1a5)]),_0x26e748=await readBffLockFile(_0x4e8735['lockFilePath']),{appLock:_0x390e9a}=ensureLockScope(_0x26e748??createEmptyBffLock(),_0xb785f3[_0x466f09(0x1a5)],_0x4e8735[_0x466f09(0x1a4)],'pull'),_0x8a72a3=normalizeBffType(_0xb785f3[_0x466f09(0x185)](_0x466f09(0x196)))??undefined,_0x1aaf42=buildDatasetCodeToAliasMap(_0xb785f3[_0x466f09(0x1b0)],_0xb785f3[_0x466f09(0x1a5)]),[_0x3d98e2,_0x173fc4]=await Promise[_0x466f09(0x186)]([listBffScripts(_0xb785f3[_0x466f09(0x1a5)],_0x8a72a3),getBffScriptStatistics(_0xb785f3[_0x466f09(0x1a5)])]),_0xdeebcb=createHookLocationMap(_0x173fc4),_0x5b44f9=[];for(const _0x55ebe7 of _0x3d98e2){const _0x130c97=resolveRemoteScriptTarget(_0x4e8735,_0x55ebe7,_0xdeebcb,_0x390e9a[_0x466f09(0x19a)],_0x1aaf42);if(!_0x130c97){_0x5b44f9[_0x466f09(0x195)]({'scriptType':_0x55ebe7[_0x466f09(0x19f)],'functionName':_0x55ebe7['functionName']??'','status':_0x466f09(0x184),'reason':_0x466f09(0x17e)});continue;}const _0x2d51d6=_0x390e9a[_0x466f09(0x19a)][_0x130c97[_0x466f09(0x18d)]],_0x480c79=_0x55ebe7[_0x466f09(0x19b)]!=null?computeContentHash(_0x55ebe7['scriptContent']):undefined,_0x414146=await hasUnsyncedLocalChanges(_0x130c97[_0x466f09(0x1b3)],_0x2d51d6,_0x480c79);_0x5b44f9['push']({'lockKey':_0x130c97[_0x466f09(0x18d)],'filePath':_0x130c97[_0x466f09(0x1b3)],'remoteId':_0x55ebe7['id']??null,'status':_0x414146?_0x466f09(0x1a7):_0x466f09(0x182)});}return{'method':_0x466f09(0x175),'url':_0x466f09(0x170)+_0xb785f3[_0x466f09(0x1a5)]+(_0x8a72a3?'&type='+_0x8a72a3:''),'body':{'appCode':_0xb785f3[_0x466f09(0x1a5)],'filterType':_0x8a72a3??null,'files':_0x5b44f9},'description':'Would\x20inspect\x20'+_0x5b44f9[_0x466f09(0x171)]+_0x466f09(0x17f)};},async 'execute'(_0x4ec52b){const _0x5745bc=a36_0x58a541,_0x3f9b04=loadBffProjectConfig(_0x4ec52b[_0x5745bc(0x1a5)]),_0x38fa7d=await readBffLockFile(_0x3f9b04[_0x5745bc(0x1b6)]),{lockData:_0x4d1eb2,appLock:_0x33f437}=ensureLockScope(_0x38fa7d??createEmptyBffLock(),_0x4ec52b['appCode'],_0x3f9b04[_0x5745bc(0x1a4)],_0x5745bc(0x188)),_0x2d2c6a=normalizeBffType(_0x4ec52b[_0x5745bc(0x185)](_0x5745bc(0x196)))??undefined;if(_0x4ec52b[_0x5745bc(0x185)](_0x5745bc(0x196))&&!_0x2d2c6a)throw CliErrors[_0x5745bc(0x1ac)](_0x5745bc(0x18f));const [_0x547091,_0x123a85]=await Promise[_0x5745bc(0x186)]([listBffScripts(_0x4ec52b[_0x5745bc(0x1a5)],_0x2d2c6a),getBffScriptStatistics(_0x4ec52b[_0x5745bc(0x1a5)])]);if(_0x547091[_0x5745bc(0x171)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x5745bc(0x174)};const _0x184898=_0x4ec52b[_0x5745bc(0x179)]('force');if(_0x184898&&!_0x4ec52b['nonInteractive']){const _0x44a001=await confirmForce();if(!_0x44a001)throw CliErrors[_0x5745bc(0x19e)](_0x5745bc(0x18a));}if(_0x184898&&_0x4ec52b[_0x5745bc(0x1a6)]){}const _0x35dc0a=buildDatasetCodeToAliasMap(_0x4ec52b[_0x5745bc(0x1b0)],_0x4ec52b[_0x5745bc(0x1a5)]),_0x1e6fed=createHookLocationMap(_0x123a85),_0x3ba9fa=JSON[_0x5745bc(0x1a9)](JSON[_0x5745bc(0x172)](_0x4d1eb2)),_0x1225c8=_0x4ec52b[_0x5745bc(0x1a5)],_0x366519=_0x3ba9fa[_0x5745bc(0x17c)][_0x1225c8];if(!_0x366519)throw new Error(_0x5745bc(0x183)+_0x1225c8+_0x5745bc(0x176));const _0x418c2e=[],_0x5e5f3f=[],_0x184075=[];for(const _0x20ba47 of _0x547091){const _0x39d73f=resolveRemoteScriptTarget(_0x3f9b04,_0x20ba47,_0x1e6fed,_0x33f437['functions'],_0x35dc0a);if(!_0x39d73f){_0x5e5f3f[_0x5745bc(0x195)]({'lockKey':_0x20ba47['scriptType']+'/'+_0x20ba47[_0x5745bc(0x193)],'reason':_0x5745bc(0x17e)});continue;}const _0x10526a=_0x33f437['functions'][_0x39d73f[_0x5745bc(0x18d)]];try{if(!_0x20ba47['id'])throw new Error(_0x5745bc(0x1a2));if(_0x20ba47[_0x5745bc(0x19b)]==null)throw new Error(_0x5745bc(0x19d));const _0x4d2ae0=_0x20ba47[_0x5745bc(0x19b)],_0x1410d6=computeContentHash(_0x4d2ae0);if(!_0x184898){const _0x13fcf5=await hasUnsyncedLocalChanges(_0x39d73f[_0x5745bc(0x1b3)],_0x10526a,_0x1410d6);if(_0x13fcf5){_0x5e5f3f[_0x5745bc(0x195)]({'lockKey':_0x39d73f[_0x5745bc(0x18d)],'reason':_0x5745bc(0x19c)});continue;}}await ensureParentDirectory(_0x39d73f['filePath']),await writeFile(_0x39d73f[_0x5745bc(0x1b3)],_0x4d2ae0,_0x5745bc(0x173));const _0x55298d={'hash':_0x1410d6,'remoteId':_0x20ba47['id'],'version':_0x20ba47['version']};_0x39d73f[_0x5745bc(0x196)]===_0x5745bc(0x194)&&_0x39d73f[_0x5745bc(0x18b)]&&(_0x55298d[_0x5745bc(0x1b1)]=_0x39d73f['hookLocation'][_0x5745bc(0x1b1)],_0x55298d[_0x5745bc(0x192)]=_0x39d73f[_0x5745bc(0x18b)][_0x5745bc(0x192)],_0x55298d[_0x5745bc(0x191)]=_0x39d73f[_0x5745bc(0x18b)][_0x5745bc(0x191)],_0x55298d['functionNode']=_0x39d73f['hookLocation'][_0x5745bc(0x187)]),_0x366519[_0x5745bc(0x19a)][_0x39d73f[_0x5745bc(0x18d)]]=_0x55298d,_0x418c2e[_0x5745bc(0x195)]({'lockKey':_0x39d73f[_0x5745bc(0x18d)],'remoteId':_0x20ba47['id']});}catch(_0x559270){_0x184075[_0x5745bc(0x195)]({'lockKey':_0x39d73f[_0x5745bc(0x18d)],'error':_0x559270 instanceof Error?_0x559270[_0x5745bc(0x198)]:String(_0x559270)});}}return _0x366519['lastSync']=new Date()[_0x5745bc(0x1a0)](),await writeBffLockFile(_0x3f9b04[_0x5745bc(0x1b6)],_0x3ba9fa),{'ok':_0x184075[_0x5745bc(0x171)]===0x0,'data':{'pulled':_0x418c2e,'skipped':_0x5e5f3f,'failed':_0x184075},'message':'Pull\x20complete:\x20'+_0x418c2e[_0x5745bc(0x171)]+_0x5745bc(0x177)+_0x5e5f3f[_0x5745bc(0x171)]+'\x20skipped,\x20'+_0x184075[_0x5745bc(0x171)]+_0x5745bc(0x17a)};}};async function hasUnsyncedLocalChanges(_0x2a5048,_0x571196,_0x11c5fe){if(!await fileExists(_0x2a5048))return![];const _0x1ce437=await computeFileHash(_0x2a5048);if(!_0x571196)return _0x11c5fe?_0x1ce437!==_0x11c5fe:!![];return _0x1ce437!==_0x571196['hash'];}function buildDatasetCodeToAliasMap(_0x3a1711,_0x160d80){const _0x197514=a36_0x58a541,_0x5d9842=loadAliasMap(_0x3a1711,undefined,resolveApiFilePath(_0x3a1711,_0x160d80));return new Map(_0x5d9842[_0x197514(0x18c)](_0x33307a=>[_0x33307a[_0x197514(0x192)],_0x33307a[_0x197514(0x1b1)]]));}async function confirmForce(){const _0x274319=a36_0x58a541,_0x19edf1=createInterface({'input':process['stdin'],'output':process[_0x274319(0x178)]}),_0x168202=await new Promise(_0x215832=>{_0x19edf1['question']('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x215832);});return _0x19edf1[_0x274319(0x181)](),['y',_0x274319(0x1af)][_0x274319(0x180)](_0x168202['trim']()[_0x274319(0x1aa)]());}
1
+ const a36_0x485f5f=a36_0x314f;(function(_0x14563d,_0x293db8){const _0x3f6765=a36_0x314f,_0x23afbb=_0x14563d();while(!![]){try{const _0x504e18=-parseInt(_0x3f6765(0x16c))/0x1+-parseInt(_0x3f6765(0x18a))/0x2+-parseInt(_0x3f6765(0x17a))/0x3+parseInt(_0x3f6765(0x169))/0x4+-parseInt(_0x3f6765(0x17f))/0x5*(parseInt(_0x3f6765(0x180))/0x6)+parseInt(_0x3f6765(0x19e))/0x7+parseInt(_0x3f6765(0x1a3))/0x8;if(_0x504e18===_0x293db8)break;else _0x23afbb['push'](_0x23afbb['shift']());}catch(_0x2d3d5e){_0x23afbb['push'](_0x23afbb['shift']());}}}(a36_0x318a,0x4a787));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a36_0x314f(_0x2b487a,_0x211312){_0x2b487a=_0x2b487a-0x164;const _0x318af2=a36_0x318a();let _0x314f18=_0x318af2[_0x2b487a];return _0x314f18;}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x485f5f(0x174),'command':a36_0x485f5f(0x188),'description':a36_0x485f5f(0x193),'risk':a36_0x485f5f(0x1a7),'flags':[{'name':'type','type':a36_0x485f5f(0x195),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a36_0x485f5f(0x186),a36_0x485f5f(0x178),'HOOK']},{'name':a36_0x485f5f(0x16a),'type':a36_0x485f5f(0x199),'description':a36_0x485f5f(0x18e)}],async 'dryRun'(_0x3709df){const _0x3330bc=a36_0x485f5f,_0x39885d=loadBffProjectConfig(_0x3709df['appCode']),_0x34717c=await readBffLockFile(_0x39885d[_0x3330bc(0x165)]),{appLock:_0x4c35f8}=ensureLockScope(_0x34717c??createEmptyBffLock(),_0x3709df[_0x3330bc(0x190)],_0x39885d[_0x3330bc(0x166)],_0x3330bc(0x188)),_0x497b7e=normalizeBffType(_0x3709df['str'](_0x3330bc(0x19b)))??undefined,_0x187a96=buildDatasetCodeToAliasMap(_0x3709df[_0x3330bc(0x1a8)],_0x3709df['appCode']),[_0x282410,_0x1415c4]=await Promise[_0x3330bc(0x175)]([listBffScripts(_0x3709df[_0x3330bc(0x190)],_0x497b7e),getBffScriptStatistics(_0x3709df[_0x3330bc(0x190)])]),_0xd9871a=createHookLocationMap(_0x1415c4),_0x56fe1b=[];for(const _0x2d9f30 of _0x282410){const _0x100aff=resolveRemoteScriptTarget(_0x39885d,_0x2d9f30,_0xd9871a,_0x4c35f8[_0x3330bc(0x170)],_0x187a96);if(!_0x100aff){_0x56fe1b[_0x3330bc(0x1a5)]({'scriptType':_0x2d9f30[_0x3330bc(0x197)],'functionName':_0x2d9f30['functionName']??'','status':_0x3330bc(0x182),'reason':_0x3330bc(0x19a)});continue;}const _0x2abba8=_0x4c35f8[_0x3330bc(0x170)][_0x100aff[_0x3330bc(0x1a6)]],_0x37ff4d=_0x2d9f30['scriptContent']!=null?computeContentHash(_0x2d9f30[_0x3330bc(0x168)]):undefined,_0x3b678b=await hasUnsyncedLocalChanges(_0x100aff[_0x3330bc(0x1a0)],_0x2abba8,_0x37ff4d);_0x56fe1b['push']({'lockKey':_0x100aff[_0x3330bc(0x1a6)],'filePath':_0x100aff['filePath'],'remoteId':_0x2d9f30['id']??null,'status':_0x3b678b?_0x3330bc(0x18c):_0x3330bc(0x181)});}return{'method':_0x3330bc(0x194),'url':_0x3330bc(0x17e)+_0x3709df[_0x3330bc(0x190)]+(_0x497b7e?_0x3330bc(0x1aa)+_0x497b7e:''),'body':{'appCode':_0x3709df[_0x3330bc(0x190)],'filterType':_0x497b7e??null,'files':_0x56fe1b},'description':'Would\x20inspect\x20'+_0x56fe1b[_0x3330bc(0x1ad)]+_0x3330bc(0x177)};},async 'execute'(_0x4f9d87){const _0x4884c5=a36_0x485f5f,_0x194987=loadBffProjectConfig(_0x4f9d87[_0x4884c5(0x190)]),_0x22f9ba=await readBffLockFile(_0x194987['lockFilePath']),{lockData:_0x3b3033,appLock:_0x3551e0}=ensureLockScope(_0x22f9ba??createEmptyBffLock(),_0x4f9d87[_0x4884c5(0x190)],_0x194987[_0x4884c5(0x166)],_0x4884c5(0x188)),_0x3e6ad1=normalizeBffType(_0x4f9d87[_0x4884c5(0x167)](_0x4884c5(0x19b)))??undefined;if(_0x4f9d87['str'](_0x4884c5(0x19b))&&!_0x3e6ad1)throw CliErrors[_0x4884c5(0x1a2)](_0x4884c5(0x1ac));const [_0x39ae3c,_0x5891b3]=await Promise[_0x4884c5(0x175)]([listBffScripts(_0x4f9d87[_0x4884c5(0x190)],_0x3e6ad1),getBffScriptStatistics(_0x4f9d87[_0x4884c5(0x190)])]);if(_0x39ae3c[_0x4884c5(0x1ad)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x45f15c=_0x4f9d87[_0x4884c5(0x1a9)]('force');if(_0x45f15c&&!_0x4f9d87['nonInteractive']){const _0x4aa82f=await confirmForce();if(!_0x4aa82f)throw CliErrors[_0x4884c5(0x1a4)](_0x4884c5(0x184));}if(_0x45f15c&&_0x4f9d87[_0x4884c5(0x171)]){}const _0x375d8f=buildDatasetCodeToAliasMap(_0x4f9d87[_0x4884c5(0x1a8)],_0x4f9d87[_0x4884c5(0x190)]),_0x56976d=createHookLocationMap(_0x5891b3),_0x504868=JSON[_0x4884c5(0x19f)](JSON[_0x4884c5(0x1ab)](_0x3b3033)),_0x1f49f6=_0x4f9d87[_0x4884c5(0x190)],_0x4f8cde=_0x504868[_0x4884c5(0x19c)][_0x1f49f6];if(!_0x4f8cde)throw new Error(_0x4884c5(0x191)+_0x1f49f6+_0x4884c5(0x173));const _0x4c01a6=[],_0x1e3f86=[],_0x5b5607=[];for(const _0x3eef8a of _0x39ae3c){const _0x513567=resolveRemoteScriptTarget(_0x194987,_0x3eef8a,_0x56976d,_0x3551e0['functions'],_0x375d8f);if(!_0x513567){_0x1e3f86[_0x4884c5(0x1a5)]({'lockKey':_0x3eef8a[_0x4884c5(0x197)]+'/'+_0x3eef8a[_0x4884c5(0x183)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x2b4b8a=_0x3551e0[_0x4884c5(0x170)][_0x513567[_0x4884c5(0x1a6)]];try{if(!_0x3eef8a['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x3eef8a[_0x4884c5(0x168)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x1e3944=_0x3eef8a[_0x4884c5(0x168)],_0x469bf9=computeContentHash(_0x1e3944);if(!_0x45f15c){const _0x5beecc=await hasUnsyncedLocalChanges(_0x513567[_0x4884c5(0x1a0)],_0x2b4b8a,_0x469bf9);if(_0x5beecc){_0x1e3f86[_0x4884c5(0x1a5)]({'lockKey':_0x513567[_0x4884c5(0x1a6)],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x513567['filePath']),await writeFile(_0x513567[_0x4884c5(0x1a0)],_0x1e3944,_0x4884c5(0x187));const _0x3eda23={'hash':_0x469bf9,'remoteId':_0x3eef8a['id'],'version':_0x3eef8a[_0x4884c5(0x1a1)]};_0x513567[_0x4884c5(0x19b)]==='HOOK'&&_0x513567[_0x4884c5(0x16e)]&&(_0x3eda23[_0x4884c5(0x18f)]=_0x513567[_0x4884c5(0x16e)][_0x4884c5(0x18f)],_0x3eda23[_0x4884c5(0x196)]=_0x513567['hookLocation']['datasetCode'],_0x3eda23[_0x4884c5(0x17c)]=_0x513567[_0x4884c5(0x16e)][_0x4884c5(0x17c)],_0x3eda23[_0x4884c5(0x198)]=_0x513567[_0x4884c5(0x16e)]['functionNode']),_0x4f8cde[_0x4884c5(0x170)][_0x513567[_0x4884c5(0x1a6)]]=_0x3eda23,_0x4c01a6[_0x4884c5(0x1a5)]({'lockKey':_0x513567[_0x4884c5(0x1a6)],'remoteId':_0x3eef8a['id']});}catch(_0x334c77){_0x5b5607[_0x4884c5(0x1a5)]({'lockKey':_0x513567[_0x4884c5(0x1a6)],'error':_0x334c77 instanceof Error?_0x334c77[_0x4884c5(0x185)]:String(_0x334c77)});}}return _0x4f8cde[_0x4884c5(0x18b)]=new Date()[_0x4884c5(0x17b)](),await writeBffLockFile(_0x194987[_0x4884c5(0x165)],_0x504868),{'ok':_0x5b5607[_0x4884c5(0x1ad)]===0x0,'data':{'pulled':_0x4c01a6,'skipped':_0x1e3f86,'failed':_0x5b5607},'message':_0x4884c5(0x18d)+_0x4c01a6[_0x4884c5(0x1ad)]+_0x4884c5(0x16b)+_0x1e3f86[_0x4884c5(0x1ad)]+_0x4884c5(0x17d)+_0x5b5607[_0x4884c5(0x1ad)]+_0x4884c5(0x189)};}};async function hasUnsyncedLocalChanges(_0x1d7929,_0x22be74,_0xd33111){const _0x2eb70d=a36_0x485f5f;if(!await fileExists(_0x1d7929))return![];const _0xe9bf6c=await computeFileHash(_0x1d7929);if(!_0x22be74)return _0xd33111?_0xe9bf6c!==_0xd33111:!![];return _0xe9bf6c!==_0x22be74[_0x2eb70d(0x176)];}function buildDatasetCodeToAliasMap(_0x5a8088,_0x13e5e1){const _0x3d2bed=a36_0x485f5f,_0x264c81=loadAliasMap(_0x5a8088,undefined,resolveApiFilePath(_0x5a8088,_0x13e5e1));return new Map(_0x264c81[_0x3d2bed(0x19d)](_0x5a8cbc=>[_0x5a8cbc[_0x3d2bed(0x196)],_0x5a8cbc[_0x3d2bed(0x18f)]]));}async function confirmForce(){const _0x3c94fc=a36_0x485f5f,_0x320723=createInterface({'input':process['stdin'],'output':process[_0x3c94fc(0x164)]}),_0x4e75ce=await new Promise(_0x463fd7=>{const _0x408ccc=_0x3c94fc;_0x320723[_0x408ccc(0x179)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x463fd7);});return _0x320723[_0x3c94fc(0x16f)](),['y',_0x3c94fc(0x192)][_0x3c94fc(0x16d)](_0x4e75ce[_0x3c94fc(0x172)]()['toLowerCase']());}function a36_0x318a(){const _0x2e487d=['toISOString','operationType','\x20skipped,\x20','/api/management/library/scripts/list?appCode=','175325FJGnxW','30dFdTzU','would_pull','skipped','functionName','Force\x20pull\x20cancelled.','message','COMMON','utf8','pull','\x20failed','222230FRcrqs','lastSync','conflict','Pull\x20complete:\x20','Force\x20overwrite\x20local\x20unsynced\x20changes','alias','appCode','Lock\x20scope\x20for\x20app\x20\x22','yes','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','GET','string','datasetCode','scriptType','functionNode','boolean','unresolvable\x20target\x20path','type','apps','map','3897859qzQlTe','parse','filePath','version','validation','4000544JycudR','cancelled','push','lockKey','write','apiDir','bool','&type=','stringify','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','length','stderr','lockFilePath','scriptsRoot','str','scriptContent','1244292zCUCcJ','force','\x20pulled,\x20','303080cSdSyN','includes','hookLocation','close','functions','nonInteractive','trim','\x22\x20not\x20found\x20after\x20ensureLockScope.','bff','all','hash','\x20remote\x20BFF\x20script(s)\x20for\x20pull','ENDPOINT','question','1420281KEuAxm'];a36_0x318a=function(){return _0x2e487d;};return a36_0x318a();}
@@ -1 +1 @@
1
- const a37_0xb9388d=a37_0x4734;(function(_0x5ea6d0,_0x2ebdb5){const _0x5d24e7=a37_0x4734,_0x1aa691=_0x5ea6d0();while(!![]){try{const _0x54b6bd=-parseInt(_0x5d24e7(0x193))/0x1+-parseInt(_0x5d24e7(0x15c))/0x2*(parseInt(_0x5d24e7(0x167))/0x3)+-parseInt(_0x5d24e7(0x18c))/0x4+-parseInt(_0x5d24e7(0x154))/0x5+-parseInt(_0x5d24e7(0x159))/0x6+-parseInt(_0x5d24e7(0x168))/0x7+-parseInt(_0x5d24e7(0x181))/0x8*(-parseInt(_0x5d24e7(0x147))/0x9);if(_0x54b6bd===_0x2ebdb5)break;else _0x1aa691['push'](_0x1aa691['shift']());}catch(_0xc7b17d){_0x1aa691['push'](_0x1aa691['shift']());}}}(a37_0x5168,0x99f4f));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';function a37_0x4734(_0x362521,_0x45feeb){_0x362521=_0x362521-0x146;const _0x51680e=a37_0x5168();let _0x47340c=_0x51680e[_0x362521];return _0x47340c;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0xb9388d(0x187),'command':a37_0xb9388d(0x162),'description':a37_0xb9388d(0x15d),'risk':a37_0xb9388d(0x196),'flags':[{'name':a37_0xb9388d(0x195),'type':a37_0xb9388d(0x156),'description':a37_0xb9388d(0x16c),'enum':[a37_0xb9388d(0x17f),a37_0xb9388d(0x14b),a37_0xb9388d(0x14a)]},{'name':'name','type':a37_0xb9388d(0x156),'description':a37_0xb9388d(0x14e)},{'name':a37_0xb9388d(0x170),'type':a37_0xb9388d(0x15a),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x256a8f){const _0x368388=a37_0xb9388d,_0xff2935=loadBffProjectConfig(_0x256a8f[_0x368388(0x173)]),_0x6fb20a=await readBffLockFile(_0xff2935[_0x368388(0x185)]),{appLock:_0x33a1f7}=ensureLockScope(_0x6fb20a??createEmptyBffLock(),_0x256a8f[_0x368388(0x173)],_0xff2935[_0x368388(0x14c)],_0x368388(0x162)),_0x5e84f0=await getTargetFunctions(_0xff2935,_0x256a8f),_0xe03408=_0x256a8f[_0x368388(0x158)](_0x368388(0x170)),_0x349937=[];for(const _0x12c00d of _0x5e84f0){const _0x4f217f=await computeFileHash(_0x12c00d[_0x368388(0x16d)]),_0x4a0457=_0x33a1f7['functions'][_0x12c00d[_0x368388(0x18d)]],_0x5b1db2=!!_0x4a0457&&_0x4a0457[_0x368388(0x166)]===_0x4f217f;_0x349937[_0x368388(0x162)]({'lockKey':_0x12c00d[_0x368388(0x18d)],'filePath':_0x12c00d[_0x368388(0x16d)],'remoteId':_0x4a0457?.[_0x368388(0x14f)]??null,'mode':_0x4a0457?.[_0x368388(0x14f)]?_0x368388(0x16a):_0x368388(0x190),'status':!_0xe03408&&_0x5b1db2?_0x368388(0x16f):_0x368388(0x17d)});}return{'method':_0x368388(0x14d),'url':_0x368388(0x172),'body':{'appCode':_0x256a8f[_0x368388(0x173)],'force':_0xe03408,'files':_0x349937,'cacheClearAtRuntime':_0x349937[_0x368388(0x15b)](_0x3eddd2=>_0x3eddd2['status']===_0x368388(0x17d)),'cacheClearAtRuntimeTimes':_0x349937[_0x368388(0x15b)](_0x57212f=>_0x57212f[_0x368388(0x161)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x349937[_0x368388(0x149)]+_0x368388(0x192)};},async 'execute'(_0x2eebc7){const _0x52f439=a37_0xb9388d,_0x41e0b4=loadBffProjectConfig(_0x2eebc7[_0x52f439(0x173)]),_0x17ba2c=await readBffLockFile(_0x41e0b4[_0x52f439(0x185)]),{lockData:_0x434f6b,appLock:_0x19a2b1}=ensureLockScope(_0x17ba2c??createEmptyBffLock(),_0x2eebc7[_0x52f439(0x173)],_0x41e0b4['scriptsRoot'],_0x52f439(0x162)),_0x343058=await getTargetFunctions(_0x41e0b4,_0x2eebc7);if(_0x343058[_0x52f439(0x149)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x52f439(0x191)};const _0x539b1c=_0x2eebc7['bool']('force'),_0x2e012a=JSON['parse'](JSON[_0x52f439(0x177)](_0x434f6b)),_0xd299b1=_0x2e012a[_0x52f439(0x15f)][_0x2eebc7[_0x52f439(0x173)]];if(!_0xd299b1)throw new Error(_0x52f439(0x18b)+_0x2eebc7['appCode']+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x42a851=await buildHookMaps(_0x2eebc7[_0x52f439(0x173)],_0x2eebc7[_0x52f439(0x179)],_0x343058,_0xd299b1),_0x332c0e=[],_0x16c045=[],_0x5f322c=[];for(const _0x2a9b6b of _0x343058){const _0x2e9870=await computeFileHash(_0x2a9b6b[_0x52f439(0x16d)]),_0x13dcc5=_0xd299b1[_0x52f439(0x16e)][_0x2a9b6b[_0x52f439(0x18d)]];if(!_0x539b1c&&_0x13dcc5&&_0x13dcc5[_0x52f439(0x166)]===_0x2e9870){_0x16c045[_0x52f439(0x162)]({'lockKey':_0x2a9b6b['lockKey'],'reason':_0x52f439(0x16f)});continue;}try{await uploadSingleFunction(_0x2eebc7[_0x52f439(0x173)],_0x2a9b6b,_0xd299b1,_0x42a851);const _0x466223=_0xd299b1[_0x52f439(0x16e)][_0x2a9b6b[_0x52f439(0x18d)]];_0x332c0e[_0x52f439(0x162)]({'lockKey':_0x2a9b6b[_0x52f439(0x18d)],'remoteId':_0x466223?.[_0x52f439(0x14f)]??0x0});}catch(_0xadd9f9){_0x5f322c[_0x52f439(0x162)]({'lockKey':_0x2a9b6b[_0x52f439(0x18d)],'error':_0xadd9f9 instanceof Error?_0xadd9f9['message']:String(_0xadd9f9)});}}_0xd299b1[_0x52f439(0x18a)]=new Date()[_0x52f439(0x164)](),await writeBffLockFile(_0x41e0b4[_0x52f439(0x185)],_0x2e012a),await waitForUploadedLockEntries(_0x41e0b4['lockFilePath'],_0x2eebc7[_0x52f439(0x173)],_0x332c0e['map'](_0x130193=>_0x130193['lockKey']));let _0x58e993={'attempted':![],'cleared':![]};if(_0x332c0e['length']>0x0)try{let _0x561d2d='';for(let _0x1fb5c0=0x0;_0x1fb5c0<CACHE_CLEAR_ATTEMPTS;_0x1fb5c0+=0x1){_0x561d2d=await clearBffScriptCache(),_0x1fb5c0<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x58e993={'attempted':!![],'cleared':!![],'message':_0x561d2d||_0x52f439(0x163)};}catch(_0x216f9b){_0x58e993={'attempted':!![],'cleared':![],'error':_0x216f9b instanceof Error?_0x216f9b['message']:String(_0x216f9b)};}const _0x5c07ff=_0x5f322c[_0x52f439(0x149)]===0x0&&(_0x58e993[_0x52f439(0x188)]?_0x58e993[_0x52f439(0x17e)]:!![]),_0x35918b=_0x58e993[_0x52f439(0x188)]?_0x58e993[_0x52f439(0x17e)]?_0x52f439(0x146):_0x52f439(0x160):'runtime\x20cache\x20not\x20needed';return{'ok':_0x5c07ff,'data':{'uploaded':_0x332c0e,'skipped':_0x16c045,'failed':_0x5f322c,'cacheClear':_0x58e993},'message':_0x52f439(0x176)+_0x332c0e[_0x52f439(0x149)]+_0x52f439(0x182)+_0x16c045[_0x52f439(0x149)]+_0x52f439(0x171)+_0x5f322c[_0x52f439(0x149)]+'\x20failed,\x20'+_0x35918b};}};async function getTargetFunctions(_0x5cfbb8,_0x42b8a3){const _0x4b7133=a37_0xb9388d,_0x233373=_0x42b8a3[_0x4b7133(0x18e)](_0x4b7133(0x195)),_0x3e4443=_0x42b8a3[_0x4b7133(0x18e)](_0x4b7133(0x16b)),_0x190778=normalizeBffType(_0x233373)??undefined;if(_0x3e4443&&!_0x190778)throw CliErrors[_0x4b7133(0x186)](_0x4b7133(0x194));const _0x61e3c2=await scanLocalBffFunctions(_0x5cfbb8,_0x190778);if(_0x3e4443){const _0x44f15f=_0x61e3c2[_0x4b7133(0x151)](_0x4a71c8=>_0x4a71c8[_0x4b7133(0x16b)]===_0x3e4443);if(_0x44f15f[_0x4b7133(0x149)]===0x0)throw CliErrors[_0x4b7133(0x186)]('Local\x20function\x20not\x20found:\x20'+_0x190778+'/'+_0x3e4443);return _0x44f15f;}return _0x61e3c2;}async function buildHookMaps(_0x4debba,_0x5974ce,_0x43c5ea,_0x11cd3d){const _0x5c7adf=a37_0xb9388d,_0x80a108=_0x43c5ea[_0x5c7adf(0x15b)](_0x4392a4=>_0x4392a4[_0x5c7adf(0x195)]==='HOOK');if(!_0x80a108)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x1b1971=loadAliasMap(_0x5974ce,undefined,resolveApiFilePath(_0x5974ce,_0x4debba)),_0x12e5c2=new Map(_0x1b1971[_0x5c7adf(0x18f)](_0x379667=>[_0x379667['alias'],_0x379667[_0x5c7adf(0x174)]]));for(const _0x11edc6 of Object[_0x5c7adf(0x157)](_0x11cd3d[_0x5c7adf(0x16e)])){_0x11edc6[_0x5c7adf(0x178)]&&_0x11edc6[_0x5c7adf(0x174)]&&!_0x12e5c2['has'](_0x11edc6[_0x5c7adf(0x178)])&&_0x12e5c2[_0x5c7adf(0x169)](_0x11edc6[_0x5c7adf(0x178)],_0x11edc6[_0x5c7adf(0x174)]);}const _0x3f0342=await listDatasets(_0x4debba),_0x2f1726=new Map(_0x3f0342[_0x5c7adf(0x18f)](_0x4be90e=>[_0x4be90e['code'],_0x4be90e]));return{'aliasToDatasetCode':_0x12e5c2,'datasetCodeToDataset':_0x2f1726};}async function uploadSingleFunction(_0x711f58,_0x41ed0f,_0x2dd6f6,_0x54673f){const _0x36c7bd=a37_0xb9388d,_0x32a7f7=await readFile(_0x41ed0f[_0x36c7bd(0x16d)],_0x36c7bd(0x189)),_0x3e88d3=await computeFileHash(_0x41ed0f['filePath']),_0x452090=_0x2dd6f6[_0x36c7bd(0x16e)][_0x41ed0f[_0x36c7bd(0x18d)]];if(_0x452090?.[_0x36c7bd(0x14f)]&&_0x452090[_0x36c7bd(0x175)]==null)throw CliErrors[_0x36c7bd(0x186)](_0x41ed0f[_0x36c7bd(0x18d)]+_0x36c7bd(0x180));let _0xdc4df0=extractScriptDescription(_0x32a7f7);if(!_0xdc4df0&&_0x452090?.['remoteId']){const _0x1f0645=await getBffScriptInfo(_0x452090['remoteId']);_0xdc4df0=_0x1f0645[_0x36c7bd(0x184)]||undefined;}const _0x1e0c05={'appCode':_0x711f58,'functionName':_0x41ed0f[_0x36c7bd(0x16b)],'scriptType':_0x41ed0f[_0x36c7bd(0x195)],'scriptContent':_0x32a7f7};if(_0x452090?.[_0x36c7bd(0x14f)])_0x1e0c05['id']=_0x452090['remoteId'];if(_0x452090?.['version']!=null)_0x1e0c05[_0x36c7bd(0x175)]=_0x452090['version'];if(_0xdc4df0)_0x1e0c05['description']=_0xdc4df0;if(_0x41ed0f[_0x36c7bd(0x195)]===_0x36c7bd(0x14a)){const _0x893679=_0x41ed0f[_0x36c7bd(0x178)];if(!_0x893679||!_0x41ed0f[_0x36c7bd(0x153)]||!_0x41ed0f[_0x36c7bd(0x152)])throw CliErrors['validation']('Incomplete\x20HOOK\x20path:\x20'+_0x41ed0f[_0x36c7bd(0x18d)]);const _0x4339b5=_0x54673f[_0x36c7bd(0x165)][_0x36c7bd(0x15e)](_0x893679)??_0x452090?.[_0x36c7bd(0x174)]??_0x893679,_0x10aa50=_0x54673f[_0x36c7bd(0x155)][_0x36c7bd(0x15e)](_0x4339b5);if(!_0x10aa50)throw CliErrors[_0x36c7bd(0x186)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x893679+_0x36c7bd(0x17b)+(_0x36c7bd(0x183)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x1e0c05[_0x36c7bd(0x150)]=_0x10aa50['id'],_0x1e0c05['operationType']=_0x41ed0f[_0x36c7bd(0x153)],_0x1e0c05[_0x36c7bd(0x152)]=_0x41ed0f[_0x36c7bd(0x152)];}const _0x5e323b=await saveBffScript(_0x1e0c05),_0xdbb102=_0x5e323b['id'],_0xafca18=_0x5e323b[_0x36c7bd(0x17c)]??await getBffScriptInfo(_0xdbb102),_0x250eb9={'hash':_0x3e88d3,'remoteId':_0xdbb102,'version':_0xafca18[_0x36c7bd(0x175)]};if(_0x41ed0f[_0x36c7bd(0x195)]===_0x36c7bd(0x14a)){const _0xbc5c91=_0x41ed0f[_0x36c7bd(0x178)],_0x3123db=_0x54673f[_0x36c7bd(0x165)]['get'](_0xbc5c91)??_0x452090?.['datasetCode']??_0xbc5c91;_0x54673f[_0x36c7bd(0x165)][_0x36c7bd(0x17a)](_0xbc5c91)?_0x250eb9[_0x36c7bd(0x178)]=_0xbc5c91:_0x250eb9[_0x36c7bd(0x178)]=_0x452090?.[_0x36c7bd(0x178)],_0x250eb9[_0x36c7bd(0x174)]=_0x3123db,_0x250eb9[_0x36c7bd(0x153)]=_0x41ed0f[_0x36c7bd(0x153)],_0x250eb9['functionNode']=_0x41ed0f[_0x36c7bd(0x152)];}_0x2dd6f6[_0x36c7bd(0x16e)][_0x41ed0f[_0x36c7bd(0x18d)]]=_0x250eb9;}function a37_0x5168(){const _0xc292b4=['7445118sWiwWe','boolean','some','548LqcCTW','Push\x20local\x20BFF\x20scripts\x20to\x20remote','get','apps','runtime\x20cache\x20clear\x20failed','status','push','Runtime\x20script\x20cache\x20cleared.','toISOString','aliasToDatasetCode','hash','5883PvjcVt','4996838sSHBrs','set','update','name','Push\x20only\x20this\x20script\x20type','filePath','functions','unchanged','force','\x20skipped,\x20','/api/management/library/scripts/save','appCode','datasetCode','version','Push\x20complete:\x20','stringify','alias','apiDir','has','\x22.\x20','script','would_push','cleared','COMMON',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','64mmbJcI','\x20uploaded,\x20','Run\x20`','description','lockFilePath','validation','bff','attempted','utf8','lastSync','Lock\x20scope\x20for\x20app\x20\x22','193940IzWgNe','lockKey','str','map','create','No\x20local\x20BFF\x20functions\x20found.','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','504508EeBZdz','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','type','high-risk-write','every','runtime\x20cache\x20cleared','4799061DrfMzB','join','length','HOOK','ENDPOINT','scriptsRoot','POST','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','remoteId','datasetId','filter','functionNode','operationType','2951155bGKfwh','datasetCodeToDataset','string','values','bool'];a37_0x5168=function(){return _0xc292b4;};return a37_0x5168();}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3a2c65,_0x21c0fe,_0xbc7621){const _0x13c2d2=a37_0xb9388d;if(_0xbc7621[_0x13c2d2(0x149)]===0x0)return;for(let _0x2b4cb2=0x0;_0x2b4cb2<LOCK_SETTLE_RETRY_COUNT;_0x2b4cb2+=0x1){const _0x3983b7=await readBffLockFile(_0x3a2c65),_0x5fc808=_0x3983b7?.[_0x13c2d2(0x15f)]?.[_0x21c0fe]?.['functions']??{},_0x36e4fa=_0xbc7621[_0x13c2d2(0x197)](_0xbeb2ba=>!!_0x5fc808[_0xbeb2ba]?.['remoteId']);if(_0x36e4fa)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0xbc7621[_0x13c2d2(0x148)](',\x20')+'.');}
1
+ const a37_0x263ff2=a37_0x4d3d;(function(_0x3071e5,_0x3c36c3){const _0xcdde29=a37_0x4d3d,_0x1ea30e=_0x3071e5();while(!![]){try{const _0x2682aa=-parseInt(_0xcdde29(0x11f))/0x1+parseInt(_0xcdde29(0x160))/0x2+-parseInt(_0xcdde29(0x145))/0x3+parseInt(_0xcdde29(0x14d))/0x4*(parseInt(_0xcdde29(0x142))/0x5)+parseInt(_0xcdde29(0x14b))/0x6+parseInt(_0xcdde29(0x12f))/0x7*(parseInt(_0xcdde29(0x146))/0x8)+-parseInt(_0xcdde29(0x15d))/0x9;if(_0x2682aa===_0x3c36c3)break;else _0x1ea30e['push'](_0x1ea30e['shift']());}catch(_0x5966b1){_0x1ea30e['push'](_0x1ea30e['shift']());}}}(a37_0x33f4,0x4c341));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';function a37_0x33f4(){const _0x44e8e0=['1736fdSOLy','unchanged','alias','Run\x20`','message','3042732DmvegS','push','487012OlaPYx','datasetCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','HOOK','filter','hash','length','has','Local\x20function\x20not\x20found:\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','some','lockKey','create','toISOString','description','scriptsRoot','4719618cQVTmO','script','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','584630FPyQbW','\x22.\x20','get','update','cleared','Force\x20push\x20ignoring\x20hash\x20protection','every','datasetCodeToDataset','Incomplete\x20HOOK\x20path:\x20','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','/api/management/library/scripts/save','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','boolean','join','runtime\x20cache\x20clear\x20failed','\x20skipped,\x20','version','parse','validation','status','328575AIyKpm','string','high-risk-write','operationType','utf8','Push\x20only\x20this\x20script\x20type','Would\x20inspect\x20','datasetId','lockFilePath','COMMON','str','filePath','No\x20local\x20BFF\x20functions\x20found.','appCode','lastSync','\x20uploaded,\x20','4732ZBjZra','runtime\x20cache\x20not\x20needed','\x22\x20not\x20found\x20after\x20ensureLockScope.','would_push','values',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','map','functionNode','name','Lock\x20scope\x20for\x20app\x20\x22','remoteId','aliasToDatasetCode','apps','ENDPOINT','force','attempted','type','Push\x20complete:\x20','Cannot\x20resolve\x20dataset\x20for\x20\x22','15fwTtJX','stringify','functions','438846RHzIjv'];a37_0x33f4=function(){return _0x44e8e0;};return a37_0x33f4();}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_0x263ff2(0x14c),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a37_0x263ff2(0x121),'flags':[{'name':a37_0x263ff2(0x13f),'type':a37_0x263ff2(0x120),'description':a37_0x263ff2(0x124),'enum':[a37_0x263ff2(0x128),a37_0x263ff2(0x13c),a37_0x263ff2(0x150)]},{'name':'name','type':a37_0x263ff2(0x120),'description':a37_0x263ff2(0x114)},{'name':a37_0x263ff2(0x13d),'type':a37_0x263ff2(0x117),'description':a37_0x263ff2(0x110)}],async 'dryRun'(_0x412fad){const _0x334947=a37_0x263ff2,_0x17e00b=loadBffProjectConfig(_0x412fad[_0x334947(0x12c)]),_0x3eac18=await readBffLockFile(_0x17e00b[_0x334947(0x127)]),{appLock:_0x58bd7f}=ensureLockScope(_0x3eac18??createEmptyBffLock(),_0x412fad[_0x334947(0x12c)],_0x17e00b['scriptsRoot'],'push'),_0x2ff8f1=await getTargetFunctions(_0x17e00b,_0x412fad),_0x1e44dc=_0x412fad['bool'](_0x334947(0x13d)),_0x2bf97c=[];for(const _0x4ab753 of _0x2ff8f1){const _0x13e0b9=await computeFileHash(_0x4ab753[_0x334947(0x12a)]),_0x42e219=_0x58bd7f[_0x334947(0x144)][_0x4ab753[_0x334947(0x158)]],_0x389b07=!!_0x42e219&&_0x42e219[_0x334947(0x152)]===_0x13e0b9;_0x2bf97c[_0x334947(0x14c)]({'lockKey':_0x4ab753[_0x334947(0x158)],'filePath':_0x4ab753[_0x334947(0x12a)],'remoteId':_0x42e219?.['remoteId']??null,'mode':_0x42e219?.[_0x334947(0x139)]?_0x334947(0x10e):_0x334947(0x159),'status':!_0x1e44dc&&_0x389b07?_0x334947(0x147):_0x334947(0x132)});}return{'method':'POST','url':_0x334947(0x115),'body':{'appCode':_0x412fad[_0x334947(0x12c)],'force':_0x1e44dc,'files':_0x2bf97c,'cacheClearAtRuntime':_0x2bf97c[_0x334947(0x157)](_0x2a20ea=>_0x2a20ea[_0x334947(0x11e)]===_0x334947(0x132)),'cacheClearAtRuntimeTimes':_0x2bf97c[_0x334947(0x157)](_0x455337=>_0x455337[_0x334947(0x11e)]===_0x334947(0x132))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x334947(0x125)+_0x2bf97c['length']+_0x334947(0x156)};},async 'execute'(_0x4cbb53){const _0x4021b6=a37_0x263ff2,_0x1060e8=loadBffProjectConfig(_0x4cbb53[_0x4021b6(0x12c)]),_0x16b244=await readBffLockFile(_0x1060e8[_0x4021b6(0x127)]),{lockData:_0xa20550,appLock:_0x17bffe}=ensureLockScope(_0x16b244??createEmptyBffLock(),_0x4cbb53[_0x4021b6(0x12c)],_0x1060e8[_0x4021b6(0x15c)],'push'),_0x42d55b=await getTargetFunctions(_0x1060e8,_0x4cbb53);if(_0x42d55b['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4021b6(0x12b)};const _0x4a5072=_0x4cbb53['bool'](_0x4021b6(0x13d)),_0x5e7dec=JSON[_0x4021b6(0x11c)](JSON[_0x4021b6(0x143)](_0xa20550)),_0x5e41f2=_0x5e7dec[_0x4021b6(0x13b)][_0x4cbb53[_0x4021b6(0x12c)]];if(!_0x5e41f2)throw new Error(_0x4021b6(0x138)+_0x4cbb53['appCode']+_0x4021b6(0x131));const _0x1b2e82=await buildHookMaps(_0x4cbb53[_0x4021b6(0x12c)],_0x4cbb53['apiDir'],_0x42d55b,_0x5e41f2),_0x47620d=[],_0x4c2beb=[],_0x8a06e=[];for(const _0x4cdfeb of _0x42d55b){const _0x12accd=await computeFileHash(_0x4cdfeb[_0x4021b6(0x12a)]),_0x3977ca=_0x5e41f2['functions'][_0x4cdfeb[_0x4021b6(0x158)]];if(!_0x4a5072&&_0x3977ca&&_0x3977ca['hash']===_0x12accd){_0x4c2beb[_0x4021b6(0x14c)]({'lockKey':_0x4cdfeb[_0x4021b6(0x158)],'reason':_0x4021b6(0x147)});continue;}try{await uploadSingleFunction(_0x4cbb53[_0x4021b6(0x12c)],_0x4cdfeb,_0x5e41f2,_0x1b2e82);const _0x438e48=_0x5e41f2[_0x4021b6(0x144)][_0x4cdfeb[_0x4021b6(0x158)]];_0x47620d['push']({'lockKey':_0x4cdfeb[_0x4021b6(0x158)],'remoteId':_0x438e48?.[_0x4021b6(0x139)]??0x0});}catch(_0x59f5c5){_0x8a06e[_0x4021b6(0x14c)]({'lockKey':_0x4cdfeb['lockKey'],'error':_0x59f5c5 instanceof Error?_0x59f5c5[_0x4021b6(0x14a)]:String(_0x59f5c5)});}}_0x5e41f2[_0x4021b6(0x12d)]=new Date()[_0x4021b6(0x15a)](),await writeBffLockFile(_0x1060e8[_0x4021b6(0x127)],_0x5e7dec),await waitForUploadedLockEntries(_0x1060e8['lockFilePath'],_0x4cbb53[_0x4021b6(0x12c)],_0x47620d[_0x4021b6(0x135)](_0x3cad7e=>_0x3cad7e['lockKey']));let _0x413b7a={'attempted':![],'cleared':![]};if(_0x47620d['length']>0x0)try{let _0xc612b5='';for(let _0x386fc5=0x0;_0x386fc5<CACHE_CLEAR_ATTEMPTS;_0x386fc5+=0x1){_0xc612b5=await clearBffScriptCache(),_0x386fc5<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x413b7a={'attempted':!![],'cleared':!![],'message':_0xc612b5||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x3e1570){_0x413b7a={'attempted':!![],'cleared':![],'error':_0x3e1570 instanceof Error?_0x3e1570[_0x4021b6(0x14a)]:String(_0x3e1570)};}const _0x74a311=_0x8a06e[_0x4021b6(0x153)]===0x0&&(_0x413b7a[_0x4021b6(0x13e)]?_0x413b7a[_0x4021b6(0x10f)]:!![]),_0x3ab6c2=_0x413b7a['attempted']?_0x413b7a['cleared']?'runtime\x20cache\x20cleared':_0x4021b6(0x119):_0x4021b6(0x130);return{'ok':_0x74a311,'data':{'uploaded':_0x47620d,'skipped':_0x4c2beb,'failed':_0x8a06e,'cacheClear':_0x413b7a},'message':_0x4021b6(0x140)+_0x47620d[_0x4021b6(0x153)]+_0x4021b6(0x12e)+_0x4c2beb['length']+_0x4021b6(0x11a)+_0x8a06e[_0x4021b6(0x153)]+'\x20failed,\x20'+_0x3ab6c2};}};async function getTargetFunctions(_0x3ce83a,_0x2ce0a6){const _0x1d7589=a37_0x263ff2,_0x4f81af=_0x2ce0a6[_0x1d7589(0x129)]('type'),_0x1a9872=_0x2ce0a6[_0x1d7589(0x129)](_0x1d7589(0x137)),_0x181ebb=normalizeBffType(_0x4f81af)??undefined;if(_0x1a9872&&!_0x181ebb)throw CliErrors[_0x1d7589(0x11d)](_0x1d7589(0x116));const _0x1f453d=await scanLocalBffFunctions(_0x3ce83a,_0x181ebb);if(_0x1a9872){const _0x28b3e4=_0x1f453d[_0x1d7589(0x151)](_0x39f3d9=>_0x39f3d9[_0x1d7589(0x137)]===_0x1a9872);if(_0x28b3e4[_0x1d7589(0x153)]===0x0)throw CliErrors[_0x1d7589(0x11d)](_0x1d7589(0x155)+_0x181ebb+'/'+_0x1a9872);return _0x28b3e4;}return _0x1f453d;}async function buildHookMaps(_0x52679a,_0x4c803c,_0x216b90,_0x5b14b0){const _0x206fc8=a37_0x263ff2,_0x25cd96=_0x216b90[_0x206fc8(0x157)](_0xc7f4c7=>_0xc7f4c7['type']===_0x206fc8(0x150));if(!_0x25cd96)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0xdc48f9=loadAliasMap(_0x4c803c,undefined,resolveApiFilePath(_0x4c803c,_0x52679a)),_0x3b0aaf=new Map(_0xdc48f9[_0x206fc8(0x135)](_0x493131=>[_0x493131[_0x206fc8(0x148)],_0x493131[_0x206fc8(0x14e)]]));for(const _0x585aa0 of Object[_0x206fc8(0x133)](_0x5b14b0[_0x206fc8(0x144)])){_0x585aa0['alias']&&_0x585aa0[_0x206fc8(0x14e)]&&!_0x3b0aaf[_0x206fc8(0x154)](_0x585aa0['alias'])&&_0x3b0aaf['set'](_0x585aa0['alias'],_0x585aa0['datasetCode']);}const _0x1a6c2d=await listDatasets(_0x52679a),_0x78a145=new Map(_0x1a6c2d[_0x206fc8(0x135)](_0x58630d=>[_0x58630d['code'],_0x58630d]));return{'aliasToDatasetCode':_0x3b0aaf,'datasetCodeToDataset':_0x78a145};}async function uploadSingleFunction(_0x2f7a83,_0x3daabb,_0x3a3332,_0x4843b2){const _0x36d9bb=a37_0x263ff2,_0x43ea11=await readFile(_0x3daabb[_0x36d9bb(0x12a)],_0x36d9bb(0x123)),_0x1516f5=await computeFileHash(_0x3daabb[_0x36d9bb(0x12a)]),_0x438b29=_0x3a3332[_0x36d9bb(0x144)][_0x3daabb['lockKey']];if(_0x438b29?.['remoteId']&&_0x438b29[_0x36d9bb(0x11b)]==null)throw CliErrors['validation'](_0x3daabb['lockKey']+_0x36d9bb(0x134));let _0x9fa0e8=extractScriptDescription(_0x43ea11);if(!_0x9fa0e8&&_0x438b29?.['remoteId']){const _0x2220f9=await getBffScriptInfo(_0x438b29['remoteId']);_0x9fa0e8=_0x2220f9[_0x36d9bb(0x15b)]||undefined;}const _0x35938e={'appCode':_0x2f7a83,'functionName':_0x3daabb['name'],'scriptType':_0x3daabb[_0x36d9bb(0x13f)],'scriptContent':_0x43ea11};if(_0x438b29?.['remoteId'])_0x35938e['id']=_0x438b29[_0x36d9bb(0x139)];if(_0x438b29?.[_0x36d9bb(0x11b)]!=null)_0x35938e['version']=_0x438b29[_0x36d9bb(0x11b)];if(_0x9fa0e8)_0x35938e[_0x36d9bb(0x15b)]=_0x9fa0e8;if(_0x3daabb['type']==='HOOK'){const _0x2c46e2=_0x3daabb[_0x36d9bb(0x148)];if(!_0x2c46e2||!_0x3daabb[_0x36d9bb(0x122)]||!_0x3daabb['functionNode'])throw CliErrors[_0x36d9bb(0x11d)](_0x36d9bb(0x113)+_0x3daabb[_0x36d9bb(0x158)]);const _0x51c0ce=_0x4843b2[_0x36d9bb(0x13a)][_0x36d9bb(0x10d)](_0x2c46e2)??_0x438b29?.['datasetCode']??_0x2c46e2,_0x380ef0=_0x4843b2[_0x36d9bb(0x112)]['get'](_0x51c0ce);if(!_0x380ef0)throw CliErrors[_0x36d9bb(0x11d)](_0x36d9bb(0x141)+_0x2c46e2+_0x36d9bb(0x10c)+(_0x36d9bb(0x149)+CLI_BIN_NAME+_0x36d9bb(0x15f)));_0x35938e[_0x36d9bb(0x126)]=_0x380ef0['id'],_0x35938e[_0x36d9bb(0x122)]=_0x3daabb['operationType'],_0x35938e[_0x36d9bb(0x136)]=_0x3daabb[_0x36d9bb(0x136)];}const _0x2f9375=await saveBffScript(_0x35938e),_0x45bc9e=_0x2f9375['id'],_0x5edf45=_0x2f9375[_0x36d9bb(0x15e)]??await getBffScriptInfo(_0x45bc9e),_0x29e285={'hash':_0x1516f5,'remoteId':_0x45bc9e,'version':_0x5edf45[_0x36d9bb(0x11b)]};if(_0x3daabb[_0x36d9bb(0x13f)]===_0x36d9bb(0x150)){const _0x22a8ba=_0x3daabb[_0x36d9bb(0x148)],_0x49458f=_0x4843b2[_0x36d9bb(0x13a)][_0x36d9bb(0x10d)](_0x22a8ba)??_0x438b29?.['datasetCode']??_0x22a8ba;_0x4843b2[_0x36d9bb(0x13a)][_0x36d9bb(0x154)](_0x22a8ba)?_0x29e285['alias']=_0x22a8ba:_0x29e285[_0x36d9bb(0x148)]=_0x438b29?.[_0x36d9bb(0x148)],_0x29e285[_0x36d9bb(0x14e)]=_0x49458f,_0x29e285['operationType']=_0x3daabb[_0x36d9bb(0x122)],_0x29e285[_0x36d9bb(0x136)]=_0x3daabb[_0x36d9bb(0x136)];}_0x3a3332[_0x36d9bb(0x144)][_0x3daabb['lockKey']]=_0x29e285;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a37_0x4d3d(_0x5081d2,_0x18d152){_0x5081d2=_0x5081d2-0x10c;const _0x33f43e=a37_0x33f4();let _0x4d3d46=_0x33f43e[_0x5081d2];return _0x4d3d46;}async function waitForUploadedLockEntries(_0x3f1373,_0x4c1a7b,_0x1b6557){const _0x4c2f19=a37_0x263ff2;if(_0x1b6557[_0x4c2f19(0x153)]===0x0)return;for(let _0x3024a2=0x0;_0x3024a2<LOCK_SETTLE_RETRY_COUNT;_0x3024a2+=0x1){const _0x421612=await readBffLockFile(_0x3f1373),_0x47d56e=_0x421612?.['apps']?.[_0x4c1a7b]?.[_0x4c2f19(0x144)]??{},_0x497138=_0x1b6557[_0x4c2f19(0x111)](_0x46e86b=>!!_0x47d56e[_0x46e86b]?.['remoteId']);if(_0x497138)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4c2f19(0x14f)+_0x1b6557[_0x4c2f19(0x118)](',\x20')+'.');}
@@ -1 +1 @@
1
- function a38_0x2647(){const _0x2dc956=['15701928kBPAWZ','lockFilePath','201825JkSsgB','boolean','push','appCode','1105168BkXfvG','6rKMtkc','3721302ooHNjV','functions','21TOBTPC','All\x20BFF\x20scripts\x20are\x20in\x20sync.','scriptsRoot','map','length','\x20remote-only','1009359NOykTv','remote','datasetCode','\x20unchanged','576375QOyTLd','apiDir','lockKey','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','20cphmll','hash','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','543177vEGtHA','\x20modified,\x20','50zaFWmt','filePath'];a38_0x2647=function(){return _0x2dc956;};return a38_0x2647();}const a38_0x39464a=a38_0x1398;(function(_0xac2463,_0x52400b){const _0x175e38=a38_0x1398,_0x5a10a6=_0xac2463();while(!![]){try{const _0x54a15d=parseInt(_0x175e38(0x7a))/0x1+parseInt(_0x175e38(0x8c))/0x2*(parseInt(_0x175e38(0x81))/0x3)+-parseInt(_0x175e38(0x7e))/0x4*(-parseInt(_0x175e38(0x87))/0x5)+parseInt(_0x175e38(0x8d))/0x6+-parseInt(_0x175e38(0x8f))/0x7*(-parseInt(_0x175e38(0x8b))/0x8)+parseInt(_0x175e38(0x76))/0x9*(-parseInt(_0x175e38(0x83))/0xa)+-parseInt(_0x175e38(0x85))/0xb;if(_0x54a15d===_0x52400b)break;else _0x5a10a6['push'](_0x5a10a6['shift']());}catch(_0x4e1001){_0x5a10a6['push'](_0x5a10a6['shift']());}}}(a38_0x2647,0x59cd5));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_0x1398(_0x3d9d3,_0x325758){_0x3d9d3=_0x3d9d3-0x74;const _0x26470a=a38_0x2647();let _0x1398f1=_0x26470a[_0x3d9d3];return _0x1398f1;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':'status','description':a38_0x39464a(0x80),'risk':'read','flags':[{'name':a38_0x39464a(0x77),'type':a38_0x39464a(0x88),'description':a38_0x39464a(0x7d)}],async 'execute'(_0x5b4c0d){const _0x25788b=a38_0x39464a,_0xb23d26=loadBffProjectConfig(_0x5b4c0d[_0x25788b(0x8a)]),_0x3c12dc=await readBffLockFile(_0xb23d26[_0x25788b(0x86)]),{appLock:_0x1f6c66}=ensureLockScope(_0x3c12dc??createEmptyBffLock(),_0x5b4c0d['appCode'],_0xb23d26[_0x25788b(0x91)],'status'),_0x2ea3a8=await scanLocalBffFunctions(_0xb23d26),_0x41c73b=[],_0x7cfd48=[],_0x97bf40=[];for(const _0x11e1ec of _0x2ea3a8){const _0x41c3cb=await computeFileHash(_0x11e1ec[_0x25788b(0x84)]),_0x17f468=_0x1f6c66[_0x25788b(0x8e)][_0x11e1ec[_0x25788b(0x7c)]];if(!_0x17f468)_0x41c73b[_0x25788b(0x89)](_0x11e1ec[_0x25788b(0x7c)]);else _0x17f468[_0x25788b(0x7f)]!==_0x41c3cb?_0x7cfd48[_0x25788b(0x89)](_0x11e1ec[_0x25788b(0x7c)]):_0x97bf40['push'](_0x11e1ec[_0x25788b(0x7c)]);}const _0x50832b=[];if(_0x5b4c0d['bool']('remote')){const _0x2a7817=loadAliasMap(_0x5b4c0d[_0x25788b(0x7b)],undefined,resolveApiFilePath(_0x5b4c0d[_0x25788b(0x7b)],_0x5b4c0d[_0x25788b(0x8a)])),_0x53bd99=new Map(_0x2a7817['map'](_0x52de8c=>[_0x52de8c[_0x25788b(0x78)],_0x52de8c['alias']])),[_0x8028ab,_0x1ff4d6]=await Promise['all']([listBffScripts(_0x5b4c0d[_0x25788b(0x8a)]),getBffScriptStatistics(_0x5b4c0d[_0x25788b(0x8a)])]),_0x39d121=createHookLocationMap(_0x1ff4d6),_0x37c209=new Set(_0x2ea3a8[_0x25788b(0x92)](_0x163f04=>_0x163f04[_0x25788b(0x7c)]));for(const _0x2b0014 of _0x8028ab){const _0x25bd04=resolveRemoteScriptTarget(_0xb23d26,_0x2b0014,_0x39d121,_0x1f6c66[_0x25788b(0x8e)],_0x53bd99);_0x25bd04&&!_0x37c209['has'](_0x25bd04[_0x25788b(0x7c)])&&_0x50832b[_0x25788b(0x89)](_0x25bd04[_0x25788b(0x7c)]);}}const _0x1eabfe=_0x41c73b[_0x25788b(0x74)]===0x0&&_0x7cfd48[_0x25788b(0x74)]===0x0&&_0x50832b[_0x25788b(0x74)]===0x0;return{'ok':!![],'data':{'added':_0x41c73b,'modified':_0x7cfd48,'unchanged':_0x97bf40,'remoteOnly':_0x50832b},'message':_0x1eabfe?_0x25788b(0x90):_0x41c73b['length']+'\x20added,\x20'+_0x7cfd48[_0x25788b(0x74)]+_0x25788b(0x82)+_0x97bf40[_0x25788b(0x74)]+_0x25788b(0x79)+(_0x50832b[_0x25788b(0x74)]>0x0?',\x20'+_0x50832b[_0x25788b(0x74)]+_0x25788b(0x75):'')};}};
1
+ function a38_0x5284(){const _0x1d7cf4=['lockKey','boolean','152885WXnClY','All\x20BFF\x20scripts\x20are\x20in\x20sync.','927444cqNfuK','\x20added,\x20','1626636RfLTDy','datasetCode','hash','all','length','705483fBYcbK','bool','2226550BFTjzU','appCode','\x20unchanged','push','remote','14VhsXns','map','read','bff','functions','3452292FJtoxX','2mktIAy','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','52LlLInT','\x20modified,\x20','filePath','\x20remote-only','75640FXyYdJ','apiDir','has'];a38_0x5284=function(){return _0x1d7cf4;};return a38_0x5284();}const a38_0x307831=a38_0x1303;function a38_0x1303(_0x50a0fb,_0x53ed93){_0x50a0fb=_0x50a0fb-0x9b;const _0x5284e7=a38_0x5284();let _0x1303e0=_0x5284e7[_0x50a0fb];return _0x1303e0;}(function(_0x32edf4,_0x30f838){const _0x1c5ced=a38_0x1303,_0x3a7b62=_0x32edf4();while(!![]){try{const _0x13c550=parseInt(_0x1c5ced(0xae))/0x1+parseInt(_0x1c5ced(0xbb))/0x2*(parseInt(_0x1c5ced(0xa9))/0x3)+parseInt(_0x1c5ced(0x9c))/0x4*(-parseInt(_0x1c5ced(0xa5))/0x5)+parseInt(_0x1c5ced(0xa7))/0x6+parseInt(_0x1c5ced(0xb5))/0x7*(parseInt(_0x1c5ced(0xa0))/0x8)+-parseInt(_0x1c5ced(0xba))/0x9+-parseInt(_0x1c5ced(0xb0))/0xa;if(_0x13c550===_0x30f838)break;else _0x3a7b62['push'](_0x3a7b62['shift']());}catch(_0x85ab05){_0x3a7b62['push'](_0x3a7b62['shift']());}}}(a38_0x5284,0x65e9b));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x307831(0xb8),'command':'status','description':a38_0x307831(0x9b),'risk':a38_0x307831(0xb7),'flags':[{'name':'remote','type':a38_0x307831(0xa4),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x265f87){const _0xabb1aa=a38_0x307831,_0x4c9827=loadBffProjectConfig(_0x265f87[_0xabb1aa(0xb1)]),_0x3acd8f=await readBffLockFile(_0x4c9827['lockFilePath']),{appLock:_0x7b7511}=ensureLockScope(_0x3acd8f??createEmptyBffLock(),_0x265f87[_0xabb1aa(0xb1)],_0x4c9827['scriptsRoot'],'status'),_0x2c6d23=await scanLocalBffFunctions(_0x4c9827),_0x18b745=[],_0x5fcd2=[],_0x15065b=[];for(const _0x1db886 of _0x2c6d23){const _0x2e3f6b=await computeFileHash(_0x1db886[_0xabb1aa(0x9e)]),_0x59cf8d=_0x7b7511[_0xabb1aa(0xb9)][_0x1db886[_0xabb1aa(0xa3)]];if(!_0x59cf8d)_0x18b745['push'](_0x1db886[_0xabb1aa(0xa3)]);else _0x59cf8d[_0xabb1aa(0xab)]!==_0x2e3f6b?_0x5fcd2[_0xabb1aa(0xb3)](_0x1db886[_0xabb1aa(0xa3)]):_0x15065b[_0xabb1aa(0xb3)](_0x1db886[_0xabb1aa(0xa3)]);}const _0x4e31d=[];if(_0x265f87[_0xabb1aa(0xaf)](_0xabb1aa(0xb4))){const _0x274a83=loadAliasMap(_0x265f87[_0xabb1aa(0xa1)],undefined,resolveApiFilePath(_0x265f87[_0xabb1aa(0xa1)],_0x265f87[_0xabb1aa(0xb1)])),_0x1b3313=new Map(_0x274a83[_0xabb1aa(0xb6)](_0x3290c9=>[_0x3290c9[_0xabb1aa(0xaa)],_0x3290c9['alias']])),[_0x2f0ef5,_0x496f34]=await Promise[_0xabb1aa(0xac)]([listBffScripts(_0x265f87[_0xabb1aa(0xb1)]),getBffScriptStatistics(_0x265f87['appCode'])]),_0x334a16=createHookLocationMap(_0x496f34),_0xa7de64=new Set(_0x2c6d23['map'](_0x3ec688=>_0x3ec688['lockKey']));for(const _0x1706d1 of _0x2f0ef5){const _0x601019=resolveRemoteScriptTarget(_0x4c9827,_0x1706d1,_0x334a16,_0x7b7511['functions'],_0x1b3313);_0x601019&&!_0xa7de64[_0xabb1aa(0xa2)](_0x601019[_0xabb1aa(0xa3)])&&_0x4e31d[_0xabb1aa(0xb3)](_0x601019[_0xabb1aa(0xa3)]);}}const _0x3f14d6=_0x18b745[_0xabb1aa(0xad)]===0x0&&_0x5fcd2[_0xabb1aa(0xad)]===0x0&&_0x4e31d[_0xabb1aa(0xad)]===0x0;return{'ok':!![],'data':{'added':_0x18b745,'modified':_0x5fcd2,'unchanged':_0x15065b,'remoteOnly':_0x4e31d},'message':_0x3f14d6?_0xabb1aa(0xa6):_0x18b745[_0xabb1aa(0xad)]+_0xabb1aa(0xa8)+_0x5fcd2[_0xabb1aa(0xad)]+_0xabb1aa(0x9d)+_0x15065b[_0xabb1aa(0xad)]+_0xabb1aa(0xb2)+(_0x4e31d[_0xabb1aa(0xad)]>0x0?',\x20'+_0x4e31d['length']+_0xabb1aa(0x9f):'')};}};
@@ -1 +1 @@
1
- function a39_0x2c89(){const _0x9ca40c=['unknown','error','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','846304taSkkb','1742112RnweQo','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','cwd','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','npx\x20skills\x20add\x20failed:\x20','620HVwoki','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','../../skills/npx-skills-add.js','cli-skill','setLogPath','969660hPhqHD','inherit','54678gxAXsC','install','log','99Fwmcjp','info',')...','CLI\x20Built-in\x20Skill\x20installed','apiError','pipe','984721JiSuFD','9775556FmJJLf','3067688alkavk','skipped'];a39_0x2c89=function(){return _0x9ca40c;};return a39_0x2c89();}const a39_0x59517d=a39_0x1828;(function(_0x197d63,_0x1f543a){const _0x232795=a39_0x1828,_0x37856f=_0x197d63();while(!![]){try{const _0x5a20f5=-parseInt(_0x232795(0x14b))/0x1+parseInt(_0x232795(0x153))/0x2+parseInt(_0x232795(0x140))/0x3+-parseInt(_0x232795(0x14d))/0x4+parseInt(_0x232795(0x13b))/0x5*(-parseInt(_0x232795(0x142))/0x6)+parseInt(_0x232795(0x14c))/0x7+-parseInt(_0x232795(0x152))/0x8*(-parseInt(_0x232795(0x145))/0x9);if(_0x5a20f5===_0x1f543a)break;else _0x37856f['push'](_0x37856f['shift']());}catch(_0x17352c){_0x37856f['push'](_0x37856f['shift']());}}}(a39_0x2c89,0xd515d));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a39_0x1828(_0x2f5fd6,_0x1767b6){_0x2f5fd6=_0x2f5fd6-0x137;const _0x2c8904=a39_0x2c89();let _0x182873=_0x2c8904[_0x2f5fd6];return _0x182873;}export const cliSkillDefinitions=[{'service':a39_0x59517d(0x13e),'command':a39_0x59517d(0x143),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x251f42){const _0x42847b=a39_0x59517d;logger[_0x42847b(0x13f)](process[_0x42847b(0x138)]()),logger[_0x42847b(0x146)]('cli-skill-install',_0x42847b(0x151));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x4351a8,RABETBASE_SKILL_SOURCE:_0x509840,runNpxSkillsAddGlobal:_0xc8f2cf}=await import(_0x42847b(0x13d)),_0x52e2ad=_0x251f42['nonInteractive']?_0x42847b(0x14a):_0x42847b(0x141);console['log'](_0x42847b(0x137)+_0x4351a8+_0x42847b(0x147));const _0x1681e2=_0xc8f2cf(process[_0x42847b(0x138)](),_0x509840,{'stdio':_0x52e2ad});if(_0x1681e2[_0x42847b(0x14e)])console['log'](_0x42847b(0x13c));else{if(_0x1681e2['ok'])console[_0x42847b(0x144)](_0x42847b(0x148));else throw CliErrors[_0x42847b(0x149)](_0x42847b(0x13a)+(_0x1681e2[_0x42847b(0x150)]||_0x42847b(0x14f)),_0x42847b(0x139)+_0x4351a8);}return{'ok':!![]};}}];
1
+ const a39_0x59cc88=a39_0x3e88;(function(_0x51e629,_0x7cd4c0){const _0x1d44d3=a39_0x3e88,_0x3265e9=_0x51e629();while(!![]){try{const _0x1bdc2e=parseInt(_0x1d44d3(0x15a))/0x1+parseInt(_0x1d44d3(0x159))/0x2+parseInt(_0x1d44d3(0x161))/0x3*(-parseInt(_0x1d44d3(0x152))/0x4)+-parseInt(_0x1d44d3(0x160))/0x5+-parseInt(_0x1d44d3(0x154))/0x6*(parseInt(_0x1d44d3(0x148))/0x7)+-parseInt(_0x1d44d3(0x15f))/0x8*(parseInt(_0x1d44d3(0x158))/0x9)+-parseInt(_0x1d44d3(0x14f))/0xa*(-parseInt(_0x1d44d3(0x14d))/0xb);if(_0x1bdc2e===_0x7cd4c0)break;else _0x3265e9['push'](_0x3265e9['shift']());}catch(_0x69b3a8){_0x3265e9['push'](_0x3265e9['shift']());}}}(a39_0x3fb3,0xe7b4c));import{CliErrors}from'../../errors.js';function a39_0x3e88(_0x4d7033,_0x571a53){_0x4d7033=_0x4d7033-0x145;const _0x3fb38a=a39_0x3fb3();let _0x3e88d2=_0x3fb38a[_0x4d7033];return _0x3e88d2;}import{logger}from'../../utils/logger.js';function a39_0x3fb3(){const _0x198252=['9186291RHzFns','1908186GWjlLH','1393361fnYNwO','unknown','cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','skipped','8ozXhEh','4133435hOHIxc','2853159Dbbkex','npx\x20skills\x20add\x20failed:\x20','pipe','apiError','setLogPath','cwd','7sONzNB','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','write','CLI\x20Built-in\x20Skill\x20installed','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','539bSChIG',')...','479690YYDaDz','nonInteractive','info','4CoxSAg','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','5702568VPDypd','log','install','cli-skill'];a39_0x3fb3=function(){return _0x198252;};return a39_0x3fb3();}export const cliSkillDefinitions=[{'service':a39_0x59cc88(0x157),'command':a39_0x59cc88(0x156),'description':a39_0x59cc88(0x149),'risk':a39_0x59cc88(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x161e34){const _0x73ba20=a39_0x59cc88;logger[_0x73ba20(0x146)](process[_0x73ba20(0x147)]()),logger[_0x73ba20(0x151)](_0x73ba20(0x15c),_0x73ba20(0x153));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x57d48d,RABETBASE_SKILL_SOURCE:_0x3a177e,runNpxSkillsAddGlobal:_0x3b9d28}=await import('../../skills/npx-skills-add.js'),_0x371c7a=_0x161e34[_0x73ba20(0x150)]?_0x73ba20(0x163):'inherit';console[_0x73ba20(0x155)](_0x73ba20(0x15d)+_0x57d48d+_0x73ba20(0x14e));const _0xba110d=_0x3b9d28(process[_0x73ba20(0x147)](),_0x3a177e,{'stdio':_0x371c7a});if(_0xba110d[_0x73ba20(0x15e)])console[_0x73ba20(0x155)](_0x73ba20(0x14c));else{if(_0xba110d['ok'])console[_0x73ba20(0x155)](_0x73ba20(0x14b));else throw CliErrors[_0x73ba20(0x145)](_0x73ba20(0x162)+(_0xba110d['error']||_0x73ba20(0x15b)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x57d48d);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x256a87=a40_0x10ee;(function(_0x46311b,_0x2e6c2){const _0x440579=a40_0x10ee,_0x1e8efa=_0x46311b();while(!![]){try{const _0x2c6f4b=-parseInt(_0x440579(0x1d5))/0x1*(-parseInt(_0x440579(0x1dd))/0x2)+parseInt(_0x440579(0x1b5))/0x3*(parseInt(_0x440579(0x1c5))/0x4)+-parseInt(_0x440579(0x1b4))/0x5*(-parseInt(_0x440579(0x1ef))/0x6)+-parseInt(_0x440579(0x1cb))/0x7*(parseInt(_0x440579(0x1bd))/0x8)+-parseInt(_0x440579(0x1c0))/0x9+-parseInt(_0x440579(0x1c4))/0xa+parseInt(_0x440579(0x1de))/0xb;if(_0x2c6f4b===_0x2e6c2)break;else _0x1e8efa['push'](_0x1e8efa['shift']());}catch(_0x5735f1){_0x1e8efa['push'](_0x1e8efa['shift']());}}}(a40_0x1ce3,0xa9f7e));import a40_0x811839 from'chalk';import a40_0x35022f from'ora';import a40_0x3843f3 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a40_0x10ee(_0x3243a9,_0xb21163){_0x3243a9=_0x3243a9-0x1af;const _0x1ce366=a40_0x1ce3();let _0x10eebf=_0x1ce366[_0x3243a9];return _0x10eebf;}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 _0x1a6f72=a40_0x10ee;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x1a6f72(0x1f2)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x32ba79=a40_0x10ee,_0x2f80dc=process['execPath']['toLowerCase']();if(_0x2f80dc[_0x32ba79(0x1f9)](_0x32ba79(0x1e2)))return _0x32ba79(0x1e2);return'npm';}const updateFlags=[{'name':a40_0x256a87(0x1b7),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0x256a87(0x1cc),'type':'string','description':a40_0x256a87(0x1e1)},{'name':'no-skills','type':'boolean','description':a40_0x256a87(0x1d7),'default':![]},{'name':a40_0x256a87(0x1b9),'type':a40_0x256a87(0x1bb),'description':a40_0x256a87(0x1b6),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x58fee3){const _0x47a235=a40_0x256a87;return _0x58fee3[_0x47a235(0x1fd)](_0x47a235(0x1cc))['trim']();}function shouldSkipCliSkill(_0x486e17){const _0x26171a=a40_0x256a87;return _0x486e17[_0x26171a(0x1e3)](_0x26171a(0x1b2))||_0x486e17[_0x26171a(0x1f1)]('skills')===![];}function a40_0x1ce3(){const _0x56fc7f=['unknown','Updated\x20to\x20v','https://registry.npmjs.org/-/package/','valid','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','npm','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','length','\x20→\x20','yellow','entries','1758rqmAVe','error','flag','slice','start','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','map','trim','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','info','includes','fromEntries','timeout','/dist-tags','str','Current\x20version:\x20','skipped','string','succeed','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','no-skills','object','5105hUHict','1495173keUoum','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','beta','red','skills','Checking\x20CLI\x20Built-in\x20Skill...','boolean','message','120WadpHD','Beta\x20version:\x20','gray','6995520UtNSbm','update','Requested\x20version:\x20','Checking\x20for\x20updates...','10620430jOVdlg','8LnMTXQ','green','...','validation','filter','Version\x20comparison\x20failed','210315irGGFW','version','source','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','warn','latest','Update\x20failed','nonInteractive','\x20\x20Run\x20manually:\x20','3yATatW','Already\x20on\x20requested\x20version\x20(v','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','log','@latest','inherit','fail','run','89666osOGQM','17113294KlWebf','\x20cli-skill\x20install','Update\x20available:\x20','Install\x20a\x20specific\x20CLI\x20version','bun','bool'];a40_0x1ce3=function(){return _0x56fc7f;};return a40_0x1ce3();}async function validateUpdateFlags(_0x3d03eb){const _0x25e273=a40_0x256a87,_0xab7dfc=_0x3d03eb[_0x25e273(0x1e3)](_0x25e273(0x1b7)),_0x1801da=getRequestedVersion(_0x3d03eb);if(_0xab7dfc&&_0x1801da)throw CliErrors['validation'](_0x25e273(0x1e8),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x1801da&&!a40_0x3843f3[_0x25e273(0x1e7)](_0x1801da))throw CliErrors[_0x25e273(0x1c8)]('Invalid\x20version:\x20'+_0x1801da,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x29ed50=a40_0x256a87;try{const _0x7696a2=await fetch(_0x29ed50(0x1e6)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x29ed50(0x1fc),{'signal':AbortSignal[_0x29ed50(0x1fb)](0x2710)});if(!_0x7696a2['ok'])return null;const _0x1dcc0c=await _0x7696a2['json']();if(!_0x1dcc0c||typeof _0x1dcc0c!==_0x29ed50(0x1b3))return null;return Object[_0x29ed50(0x1fa)](Object[_0x29ed50(0x1ee)](_0x1dcc0c)[_0x29ed50(0x1c9)](([,_0x37c159])=>typeof _0x37c159===_0x29ed50(0x1af)&&_0x37c159[_0x29ed50(0x1f6)]()[_0x29ed50(0x1eb)]>0x0)[_0x29ed50(0x1f5)](([_0x4d250c,_0x4da74b])=>[_0x4d250c,String(_0x4da74b)[_0x29ed50(0x1f6)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x334903){const _0x339cec=await fetchNpmDistTags();return _0x339cec?.[_0x334903]??null;}async function fetchLatestVersion(){const _0x1943c2=a40_0x256a87;return fetchNpmDistTagVersion(_0x1943c2(0x1d1));}async function resolveTargetVersion(_0x249577){const _0x2a7d6b=a40_0x256a87,_0x5d7a78=getRequestedVersion(_0x249577);if(_0x5d7a78)return{'version':_0x5d7a78,'source':_0x2a7d6b(0x1cc)};if(_0x249577[_0x2a7d6b(0x1e3)](_0x2a7d6b(0x1b7))){const _0x4c12d4=await fetchNpmDistTagVersion(_0x2a7d6b(0x1b7));if(!_0x4c12d4)return null;return{'version':_0x4c12d4,'source':_0x2a7d6b(0x1b7)};}const _0x4cf191=await fetchLatestVersion();if(!_0x4cf191)return null;return{'version':_0x4cf191,'source':_0x2a7d6b(0x1d1)};}function shouldInstallTarget(_0x3f59ef,_0x26ba6f){const _0x4faab9=a40_0x256a87;if(_0x26ba6f[_0x4faab9(0x1cd)]===_0x4faab9(0x1cc)||_0x26ba6f[_0x4faab9(0x1cd)]===_0x4faab9(0x1b7))return!a40_0x3843f3['eq'](_0x3f59ef,_0x26ba6f[_0x4faab9(0x1cc)]);return a40_0x3843f3['lt'](_0x3f59ef,_0x26ba6f['version']);}function getInstallPlanLabel(_0x4ae00b,_0x4922c1){const _0x59bf03=a40_0x256a87;switch(_0x4922c1[_0x59bf03(0x1cd)]){case _0x59bf03(0x1b7):return _0x59bf03(0x1be)+a40_0x811839[_0x59bf03(0x1ed)](_0x4ae00b)+'\x20→\x20'+a40_0x811839['green'](_0x4922c1[_0x59bf03(0x1cc)]);case _0x59bf03(0x1cc):return _0x59bf03(0x1c2)+a40_0x811839['yellow'](_0x4ae00b)+_0x59bf03(0x1ec)+a40_0x811839['green'](_0x4922c1[_0x59bf03(0x1cc)]);case _0x59bf03(0x1d1):default:return _0x59bf03(0x1e0)+a40_0x811839[_0x59bf03(0x1ed)](_0x4ae00b)+_0x59bf03(0x1ec)+a40_0x811839[_0x59bf03(0x1c6)](_0x4922c1[_0x59bf03(0x1cc)]);}}async function installCliSkill(_0xc43fb5){const _0x14cf66=a40_0x256a87;console[_0x14cf66(0x1d8)](a40_0x811839[_0x14cf66(0x1bf)](_0x14cf66(0x1ba)));const _0x3b8e11=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0xc43fb5?'pipe':_0x14cf66(0x1da)});if(_0x3b8e11[_0x14cf66(0x1ff)]){console[_0x14cf66(0x1d8)](a40_0x811839[_0x14cf66(0x1bf)](_0x14cf66(0x1f7)));return;}if(_0x3b8e11['ok']){console[_0x14cf66(0x1d8)](a40_0x811839[_0x14cf66(0x1bf)](_0x14cf66(0x1f4)));return;}console[_0x14cf66(0x1d0)](a40_0x811839[_0x14cf66(0x1ed)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x3b8e11[_0x14cf66(0x1f0)]||_0x14cf66(0x1e4)))),console[_0x14cf66(0x1d8)](a40_0x811839[_0x14cf66(0x1bf)](_0x14cf66(0x1d4)+CLI_BIN_NAME+_0x14cf66(0x1df)));}async function execute(_0x48929a){const _0x171730=a40_0x256a87;await validateUpdateFlags(_0x48929a);const _0x54b36e=getCurrentVersion();console[_0x171730(0x1d8)](_0x171730(0x1fe)+_0x54b36e);const _0x1b7bda=a40_0x35022f(_0x171730(0x1c3))[_0x171730(0x1f3)](),_0x197912=await resolveTargetVersion(_0x48929a);if(!_0x197912){const _0xdfd72b=_0x48929a[_0x171730(0x1e3)](_0x171730(0x1b7))?_0x171730(0x1ea):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x1b7bda['fail'](_0xdfd72b),console[_0x171730(0x1d8)](a40_0x811839['gray'](_0x171730(0x1ce)+NPM_PACKAGE_NAME+_0x171730(0x1d9))),{'ok':![],'message':_0xdfd72b};}const _0x326ca3=a40_0x3843f3['valid'](VERSION),_0x5c5979=a40_0x3843f3[_0x171730(0x1e7)](_0x197912[_0x171730(0x1cc)]);if(!_0x326ca3||!_0x5c5979)return _0x1b7bda['fail'](_0x171730(0x1ca)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x326ca3,_0x197912)){const _0x12798f=_0x197912[_0x171730(0x1cd)]===_0x171730(0x1cc)?_0x171730(0x1d6)+_0x197912[_0x171730(0x1cc)]+')':'Already\x20up\x20to\x20date\x20(v'+_0x197912['version']+')';return _0x1b7bda[_0x171730(0x1b0)](_0x12798f),shouldSkipCliSkill(_0x48929a)?console[_0x171730(0x1d8)](a40_0x811839[_0x171730(0x1bf)](_0x171730(0x1cf))):await installCliSkill(_0x48929a['nonInteractive']),{'ok':!![]};}_0x1b7bda[_0x171730(0x1f8)](getInstallPlanLabel(_0x54b36e,_0x197912));const _0x26eabf=detectPackageManager(),_0x37e5a6=_0x26eabf===_0x171730(0x1e9)?resolveNpmBin(_0x171730(0x1e9)):_0x26eabf,_0x49c9d0=a40_0x35022f('Updating\x20via\x20'+_0x26eabf+_0x171730(0x1c7))['start']();try{return await execa(_0x37e5a6,['install','-g',NPM_PACKAGE_NAME+'@'+_0x197912[_0x171730(0x1cc)]],{'stdio':'pipe'}),_0x49c9d0['succeed'](_0x171730(0x1e5)+_0x197912[_0x171730(0x1cc)]),console[_0x171730(0x1d8)](a40_0x811839['gray'](_0x171730(0x1b1))),shouldSkipCliSkill(_0x48929a)?console[_0x171730(0x1d8)](a40_0x811839[_0x171730(0x1bf)](_0x171730(0x1cf))):await installCliSkill(_0x48929a[_0x171730(0x1d3)]),{'ok':!![]};}catch(_0x2e0076){return _0x49c9d0[_0x171730(0x1db)](_0x171730(0x1d2)),console[_0x171730(0x1f0)](a40_0x811839[_0x171730(0x1b8)]('\x20\x20'+_0x2e0076[_0x171730(0x1bc)])),console[_0x171730(0x1d8)](a40_0x811839[_0x171730(0x1bf)]('\x20\x20Try\x20manually:\x20'+_0x26eabf+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x197912[_0x171730(0x1cc)])),{'ok':![],'message':_0x2e0076[_0x171730(0x1bc)]};}}export const updateDefinition={'service':a40_0x256a87(0x1c1),'command':a40_0x256a87(0x1dc),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0x221cc5=a40_0x6ad7;(function(_0x5dc54d,_0x40db80){const _0x55e112=a40_0x6ad7,_0x9390bb=_0x5dc54d();while(!![]){try{const _0x4bdfd8=parseInt(_0x55e112(0x192))/0x1*(parseInt(_0x55e112(0x1c5))/0x2)+parseInt(_0x55e112(0x1c0))/0x3*(parseInt(_0x55e112(0x184))/0x4)+-parseInt(_0x55e112(0x1a8))/0x5+-parseInt(_0x55e112(0x186))/0x6*(-parseInt(_0x55e112(0x1cc))/0x7)+parseInt(_0x55e112(0x1d3))/0x8*(-parseInt(_0x55e112(0x198))/0x9)+-parseInt(_0x55e112(0x1a0))/0xa*(parseInt(_0x55e112(0x1bb))/0xb)+-parseInt(_0x55e112(0x187))/0xc*(-parseInt(_0x55e112(0x188))/0xd);if(_0x4bdfd8===_0x40db80)break;else _0x9390bb['push'](_0x9390bb['shift']());}catch(_0x17f105){_0x9390bb['push'](_0x9390bb['shift']());}}}(a40_0xf4b4,0x34f7d));import a40_0x496d91 from'chalk';import a40_0x1fa0d6 from'ora';import a40_0x4d4d95 from'semver';import{execa}from'execa';function a40_0x6ad7(_0xd5d0db,_0x558c16){_0xd5d0db=_0xd5d0db-0x182;const _0xf4b488=a40_0xf4b4();let _0x6ad7a4=_0xf4b488[_0xd5d0db];return _0x6ad7a4;}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 _0x47c663=a40_0x6ad7;return GIT_COMMIT!==_0x47c663(0x19d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4d500e=a40_0x6ad7,_0x1dcdf0=process[_0x4d500e(0x1a4)][_0x4d500e(0x1bf)]();if(_0x1dcdf0[_0x4d500e(0x1b0)](_0x4d500e(0x1a5)))return _0x4d500e(0x1a5);return _0x4d500e(0x1b7);}const updateFlags=[{'name':a40_0x221cc5(0x196),'type':a40_0x221cc5(0x1ba),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0x221cc5(0x1aa),'type':a40_0x221cc5(0x1bd),'description':a40_0x221cc5(0x1ad)},{'name':a40_0x221cc5(0x194),'type':a40_0x221cc5(0x1ba),'description':a40_0x221cc5(0x1c6),'default':![]},{'name':'skills','type':a40_0x221cc5(0x1ba),'description':a40_0x221cc5(0x190),'default':!![],'hidden':!![]}];function a40_0xf4b4(){const _0xb99ebb=['validation','9189qPoUuL','Requested\x20version:\x20','fromEntries','https://registry.npmjs.org/-/package/','/dist-tags','unknown','yellow','gray','80tLGeim','Beta\x20version:\x20','Invalid\x20version:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','execPath','bun','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Already\x20up\x20to\x20date\x20(v','2116550OvojXU','Version\x20comparison\x20failed','version','\x20\x20Run\x20manually:\x20','start','Install\x20a\x20specific\x20CLI\x20version','succeed','warn','includes','timeout','pipe','trim','Updating\x20via\x20','map','Current\x20version:\x20','npm','nonInteractive','Update\x20available:\x20','boolean','469348DIfkoH','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','string','valid','toLowerCase','6FPjkvi','\x20cli-skill\x20install','latest','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','skills','2hLpNIF','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','green','skipped','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','flag','filter','42bCAnQQ','log','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','install','bool','\x20→\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','2032luIhMr','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','message','red','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','source','fail','655888olLSHK','Already\x20on\x20requested\x20version\x20(v','104070HVljtb','3816drKpKQ','24817XZJvng','cwd','Checking\x20for\x20updates...','error','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','json','Checking\x20CLI\x20Built-in\x20Skill...','run','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','201869ngHGWy','Updated\x20to\x20v','no-skills','update','beta'];a40_0xf4b4=function(){return _0xb99ebb;};return a40_0xf4b4();}function getRequestedVersion(_0x3c90ce){const _0x52e944=a40_0x221cc5;return _0x3c90ce['str'](_0x52e944(0x1aa))['trim']();}function shouldSkipCliSkill(_0x1861a0){const _0x4147fd=a40_0x221cc5;return _0x1861a0[_0x4147fd(0x1d0)]('no-skills')||_0x1861a0[_0x4147fd(0x1ca)](_0x4147fd(0x1c4))===![];}async function validateUpdateFlags(_0x196fe6){const _0x207cad=a40_0x221cc5,_0x5cf5d5=_0x196fe6[_0x207cad(0x1d0)]('beta'),_0x40f778=getRequestedVersion(_0x196fe6);if(_0x5cf5d5&&_0x40f778)throw CliErrors[_0x207cad(0x197)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x207cad(0x1bc));if(_0x40f778&&!a40_0x4d4d95['valid'](_0x40f778))throw CliErrors[_0x207cad(0x197)](_0x207cad(0x1a2)+_0x40f778,_0x207cad(0x18c));}async function fetchNpmDistTags(){const _0x4ae0cd=a40_0x221cc5;try{const _0x3741d4=await fetch(_0x4ae0cd(0x19b)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x4ae0cd(0x19c),{'signal':AbortSignal[_0x4ae0cd(0x1b1)](0x2710)});if(!_0x3741d4['ok'])return null;const _0x3d2cc0=await _0x3741d4[_0x4ae0cd(0x18d)]();if(!_0x3d2cc0||typeof _0x3d2cc0!=='object')return null;return Object[_0x4ae0cd(0x19a)](Object['entries'](_0x3d2cc0)[_0x4ae0cd(0x1cb)](([,_0x7c313f])=>typeof _0x7c313f===_0x4ae0cd(0x1bd)&&_0x7c313f[_0x4ae0cd(0x1b3)]()['length']>0x0)[_0x4ae0cd(0x1b5)](([_0x3c978c,_0x2176b9])=>[_0x3c978c,String(_0x2176b9)[_0x4ae0cd(0x1b3)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x52cb14){const _0xccf315=await fetchNpmDistTags();return _0xccf315?.[_0x52cb14]??null;}async function fetchLatestVersion(){const _0x483dbb=a40_0x221cc5;return fetchNpmDistTagVersion(_0x483dbb(0x1c2));}async function resolveTargetVersion(_0x523db6){const _0x43ea26=a40_0x221cc5,_0x5ec78e=getRequestedVersion(_0x523db6);if(_0x5ec78e)return{'version':_0x5ec78e,'source':_0x43ea26(0x1aa)};if(_0x523db6[_0x43ea26(0x1d0)]('beta')){const _0x3858f9=await fetchNpmDistTagVersion(_0x43ea26(0x196));if(!_0x3858f9)return null;return{'version':_0x3858f9,'source':'beta'};}const _0x31217c=await fetchLatestVersion();if(!_0x31217c)return null;return{'version':_0x31217c,'source':_0x43ea26(0x1c2)};}function shouldInstallTarget(_0xe5baa9,_0x4cc11b){const _0x32cf24=a40_0x221cc5;if(_0x4cc11b['source']===_0x32cf24(0x1aa)||_0x4cc11b[_0x32cf24(0x182)]===_0x32cf24(0x196))return!a40_0x4d4d95['eq'](_0xe5baa9,_0x4cc11b[_0x32cf24(0x1aa)]);return a40_0x4d4d95['lt'](_0xe5baa9,_0x4cc11b[_0x32cf24(0x1aa)]);}function getInstallPlanLabel(_0x481505,_0x4fcaf2){const _0x85e33e=a40_0x221cc5;switch(_0x4fcaf2['source']){case _0x85e33e(0x196):return _0x85e33e(0x1a1)+a40_0x496d91['yellow'](_0x481505)+_0x85e33e(0x1d1)+a40_0x496d91[_0x85e33e(0x1c7)](_0x4fcaf2[_0x85e33e(0x1aa)]);case _0x85e33e(0x1aa):return _0x85e33e(0x199)+a40_0x496d91[_0x85e33e(0x19e)](_0x481505)+_0x85e33e(0x1d1)+a40_0x496d91[_0x85e33e(0x1c7)](_0x4fcaf2['version']);case _0x85e33e(0x1c2):default:return _0x85e33e(0x1b9)+a40_0x496d91[_0x85e33e(0x19e)](_0x481505)+'\x20→\x20'+a40_0x496d91[_0x85e33e(0x1c7)](_0x4fcaf2[_0x85e33e(0x1aa)]);}}async function installCliSkill(_0x5e5cc5){const _0x5d89ec=a40_0x221cc5;console[_0x5d89ec(0x1cd)](a40_0x496d91['gray'](_0x5d89ec(0x18e)));const _0xb0cf61=runNpxSkillsAddGlobal(process[_0x5d89ec(0x189)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5e5cc5?_0x5d89ec(0x1b2):'inherit'});if(_0xb0cf61[_0x5d89ec(0x1c8)]){console[_0x5d89ec(0x1cd)](a40_0x496d91[_0x5d89ec(0x19f)](_0x5d89ec(0x1ce)));return;}if(_0xb0cf61['ok']){console[_0x5d89ec(0x1cd)](a40_0x496d91[_0x5d89ec(0x19f)](_0x5d89ec(0x1c9)));return;}console[_0x5d89ec(0x1af)](a40_0x496d91['yellow'](_0x5d89ec(0x1d4)+(_0xb0cf61['error']||'unknown'))),console[_0x5d89ec(0x1cd)](a40_0x496d91[_0x5d89ec(0x19f)](_0x5d89ec(0x1ab)+CLI_BIN_NAME+_0x5d89ec(0x1c1)));}async function execute(_0x7d1591){const _0x89810=a40_0x221cc5;await validateUpdateFlags(_0x7d1591);const _0x20e91d=getCurrentVersion();console[_0x89810(0x1cd)](_0x89810(0x1b6)+_0x20e91d);const _0x362482=a40_0x1fa0d6(_0x89810(0x18a))[_0x89810(0x1ac)](),_0x4daead=await resolveTargetVersion(_0x7d1591);if(!_0x4daead){const _0x1bf8df=_0x7d1591['bool']('beta')?_0x89810(0x1a3):_0x89810(0x1d2);return _0x362482[_0x89810(0x183)](_0x1bf8df),console[_0x89810(0x1cd)](a40_0x496d91[_0x89810(0x19f)](_0x89810(0x191)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x1bf8df};}const _0x199f43=a40_0x4d4d95[_0x89810(0x1be)](VERSION),_0x439d60=a40_0x4d4d95['valid'](_0x4daead[_0x89810(0x1aa)]);if(!_0x199f43||!_0x439d60)return _0x362482['fail'](_0x89810(0x1a9)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x199f43,_0x4daead)){const _0x48535d=_0x4daead[_0x89810(0x182)]==='version'?_0x89810(0x185)+_0x4daead[_0x89810(0x1aa)]+')':_0x89810(0x1a7)+_0x4daead[_0x89810(0x1aa)]+')';return _0x362482[_0x89810(0x1ae)](_0x48535d),shouldSkipCliSkill(_0x7d1591)?console[_0x89810(0x1cd)](a40_0x496d91[_0x89810(0x19f)](_0x89810(0x1a6))):await installCliSkill(_0x7d1591[_0x89810(0x1b8)]),{'ok':!![]};}_0x362482['info'](getInstallPlanLabel(_0x20e91d,_0x4daead));const _0x4031fb=detectPackageManager(),_0x239fbd=_0x4031fb===_0x89810(0x1b7)?resolveNpmBin('npm'):_0x4031fb,_0x1b5e0b=a40_0x1fa0d6(_0x89810(0x1b4)+_0x4031fb+'...')['start']();try{return await execa(_0x239fbd,[_0x89810(0x1cf),'-g',NPM_PACKAGE_NAME+'@'+_0x4daead[_0x89810(0x1aa)]],{'stdio':_0x89810(0x1b2)}),_0x1b5e0b[_0x89810(0x1ae)](_0x89810(0x193)+_0x4daead['version']),console[_0x89810(0x1cd)](a40_0x496d91[_0x89810(0x19f)](_0x89810(0x1d7))),shouldSkipCliSkill(_0x7d1591)?console['log'](a40_0x496d91[_0x89810(0x19f)](_0x89810(0x1a6))):await installCliSkill(_0x7d1591[_0x89810(0x1b8)]),{'ok':!![]};}catch(_0x5e9cdf){return _0x1b5e0b[_0x89810(0x183)]('Update\x20failed'),console[_0x89810(0x18b)](a40_0x496d91[_0x89810(0x1d6)]('\x20\x20'+_0x5e9cdf[_0x89810(0x1d5)])),console[_0x89810(0x1cd)](a40_0x496d91['gray']('\x20\x20Try\x20manually:\x20'+_0x4031fb+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x4daead[_0x89810(0x1aa)])),{'ok':![],'message':_0x5e9cdf[_0x89810(0x1d5)]};}}export const updateDefinition={'service':a40_0x221cc5(0x195),'command':a40_0x221cc5(0x18f),'description':a40_0x221cc5(0x1c3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x334af9,_0xe06da2){const _0x580842=a41_0x347c,_0x4f4687=_0x334af9();while(!![]){try{const _0x2a7e13=parseInt(_0x580842(0x70))/0x1+parseInt(_0x580842(0x6f))/0x2+-parseInt(_0x580842(0x78))/0x3+parseInt(_0x580842(0x75))/0x4*(-parseInt(_0x580842(0x73))/0x5)+-parseInt(_0x580842(0x76))/0x6+-parseInt(_0x580842(0x71))/0x7*(parseInt(_0x580842(0x74))/0x8)+parseInt(_0x580842(0x77))/0x9*(parseInt(_0x580842(0x72))/0xa);if(_0x2a7e13===_0xe06da2)break;else _0x4f4687['push'](_0x4f4687['shift']());}catch(_0x480971){_0x4f4687['push'](_0x4f4687['shift']());}}}(a41_0x39c9,0x4c121));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x347c(_0x4a754a,_0x249e1b){_0x4a754a=_0x4a754a-0x6f;const _0x39c9e8=a41_0x39c9();let _0x347c41=_0x39c9e8[_0x4a754a];return _0x347c41;}function a41_0x39c9(){const _0x248e74=['116493VEyyMC','28PiuHaq','670lVLxAl','70KDmccy','815704BrvLrN','2052oywOVd','1488276RYwYsQ','119115TOBHDU','1205943sJooMN','746816IFuzLl'];a41_0x39c9=function(){return _0x248e74;};return a41_0x39c9();}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x4e4bdc,_0x4a1778){const _0x113e36=a41_0x2ec9,_0x27b262=_0x4e4bdc();while(!![]){try{const _0x368e39=parseInt(_0x113e36(0xef))/0x1*(parseInt(_0x113e36(0xf3))/0x2)+-parseInt(_0x113e36(0xf2))/0x3+-parseInt(_0x113e36(0xf4))/0x4*(parseInt(_0x113e36(0xed))/0x5)+parseInt(_0x113e36(0xf5))/0x6+-parseInt(_0x113e36(0xf1))/0x7*(-parseInt(_0x113e36(0xf0))/0x8)+-parseInt(_0x113e36(0xeb))/0x9*(parseInt(_0x113e36(0xec))/0xa)+-parseInt(_0x113e36(0xee))/0xb;if(_0x368e39===_0x4a1778)break;else _0x27b262['push'](_0x27b262['shift']());}catch(_0x4a8082){_0x27b262['push'](_0x27b262['shift']());}}}(a41_0x5be8,0xa5918));import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x5be8(){const _0x2a1c68=['314365efJFEv','40rhWCPS','1545257IuPvNv','2431161TeIYIQ','6IMqNMj','117084BmugNj','7557366jLODXh','388143obsQiv','20EWTgwS','55VOCyFh','15505831tIVOdq'];a41_0x5be8=function(){return _0x2a1c68;};return a41_0x5be8();}function a41_0x2ec9(_0x57b70c,_0x57275a){_0x57b70c=_0x57b70c-0xeb;const _0x5be8fe=a41_0x5be8();let _0x2ec943=_0x5be8fe[_0x57b70c];return _0x2ec943;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a42_0x22377d=a42_0x5f2c;(function(_0x432086,_0x24b80d){const _0x59dc74=a42_0x5f2c,_0x5338be=_0x432086();while(!![]){try{const _0x2acfda=parseInt(_0x59dc74(0xcb))/0x1+parseInt(_0x59dc74(0xde))/0x2+parseInt(_0x59dc74(0xce))/0x3*(-parseInt(_0x59dc74(0xd4))/0x4)+parseInt(_0x59dc74(0xd5))/0x5*(-parseInt(_0x59dc74(0xca))/0x6)+parseInt(_0x59dc74(0xc8))/0x7+parseInt(_0x59dc74(0xc9))/0x8+parseInt(_0x59dc74(0xcc))/0x9;if(_0x2acfda===_0x24b80d)break;else _0x5338be['push'](_0x5338be['shift']());}catch(_0x5b7234){_0x5338be['push'](_0x5338be['shift']());}}}(a42_0xf395,0x5a1c3));function a42_0x5f2c(_0x3cd31a,_0x5863b8){_0x3cd31a=_0x3cd31a-0xc7;const _0xf395ac=a42_0xf395();let _0x5f2c5c=_0xf395ac[_0x3cd31a];return _0x5f2c5c;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0xf395(){const _0x4b21a3=['boolean','147aTddtC','read','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','string','alias','sdk','27068LfIPsY','10FYdrPH','skip-imports','Omit\x20import\x20statements\x20from\x20generated\x20code','bool','code','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','appCode','operation','str','156404jibQDv','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','4852176oBdDIb','810856QjLWEH','1082454isLrOD','5311RCmXgn','1651086pGETOW'];a42_0xf395=function(){return _0x4b21a3;};return a42_0xf395();}export const codegenSdk={'service':'codegen','command':a42_0x22377d(0xd3),'description':a42_0x22377d(0xda),'risk':a42_0x22377d(0xcf),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x22377d(0xd2),'type':a42_0x22377d(0xd1),'description':a42_0x22377d(0xd0)},{'name':'operation','type':'string','required':!![],'description':a42_0x22377d(0xc7)},{'name':'skip-imports','type':a42_0x22377d(0xcd),'description':a42_0x22377d(0xd7)}],async 'execute'(_0x120d8e){const _0x314cd7=a42_0x22377d,{dataset:_0x4d07c4,operation:_0x3b7073}=await getOperationDetail(_0x120d8e[_0x314cd7(0xdb)],_0x120d8e['str']('code'),_0x120d8e['str'](_0x314cd7(0xdc))),_0x29974c=generateSdkCode(_0x4d07c4,_0x3b7073,{'includeImports':!_0x120d8e[_0x314cd7(0xd8)](_0x314cd7(0xd6))});return{'ok':!![],'data':{'dataset':{'name':_0x4d07c4['name'],'code':_0x4d07c4[_0x314cd7(0xd9)],'tableName':_0x4d07c4['tableName']},'operation':_0x120d8e[_0x314cd7(0xdd)](_0x314cd7(0xdc)),'code':_0x29974c}};}};
1
+ const a42_0x5ccbf0=a42_0x2a7d;(function(_0x368706,_0x460413){const _0x15c8d3=a42_0x2a7d,_0x1c1a65=_0x368706();while(!![]){try{const _0x4ae845=-parseInt(_0x15c8d3(0xa7))/0x1*(parseInt(_0x15c8d3(0x90))/0x2)+-parseInt(_0x15c8d3(0x98))/0x3*(parseInt(_0x15c8d3(0x8f))/0x4)+-parseInt(_0x15c8d3(0x96))/0x5+parseInt(_0x15c8d3(0x99))/0x6*(parseInt(_0x15c8d3(0xa5))/0x7)+-parseInt(_0x15c8d3(0xa2))/0x8*(parseInt(_0x15c8d3(0x9a))/0x9)+-parseInt(_0x15c8d3(0x9e))/0xa*(parseInt(_0x15c8d3(0xa6))/0xb)+parseInt(_0x15c8d3(0xa3))/0xc;if(_0x4ae845===_0x460413)break;else _0x1c1a65['push'](_0x1c1a65['shift']());}catch(_0x41ae76){_0x1c1a65['push'](_0x1c1a65['shift']());}}}(a42_0x3208,0x8450c));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x2a7d(_0x3a35d9,_0x48a9fe){_0x3a35d9=_0x3a35d9-0x8c;const _0x32086d=a42_0x3208();let _0x2a7dec=_0x32086d[_0x3a35d9];return _0x2a7dec;}export const codegenSdk={'service':a42_0x5ccbf0(0x94),'command':'sdk','description':a42_0x5ccbf0(0x8d),'risk':a42_0x5ccbf0(0x9d),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a42_0x5ccbf0(0x9c),'description':a42_0x5ccbf0(0xa0)},{'name':'operation','type':a42_0x5ccbf0(0x9c),'required':!![],'description':a42_0x5ccbf0(0xa1)},{'name':a42_0x5ccbf0(0x9f),'type':a42_0x5ccbf0(0x8c),'description':a42_0x5ccbf0(0xa4)}],async 'execute'(_0x4cdf6d){const _0x2ba0ab=a42_0x5ccbf0,{dataset:_0x20f0d3,operation:_0x12bdf6}=await getOperationDetail(_0x4cdf6d[_0x2ba0ab(0x92)],_0x4cdf6d['str'](_0x2ba0ab(0x97)),_0x4cdf6d[_0x2ba0ab(0x91)](_0x2ba0ab(0x93))),_0x4c1a54=generateSdkCode(_0x20f0d3,_0x12bdf6,{'includeImports':!_0x4cdf6d[_0x2ba0ab(0x8e)](_0x2ba0ab(0x9f))});return{'ok':!![],'data':{'dataset':{'name':_0x20f0d3[_0x2ba0ab(0x95)],'code':_0x20f0d3[_0x2ba0ab(0x97)],'tableName':_0x20f0d3[_0x2ba0ab(0x9b)]},'operation':_0x4cdf6d[_0x2ba0ab(0x91)]('operation'),'code':_0x4c1a54}};}};function a42_0x3208(){const _0xef0fa1=['6770ZKYULm','skip-imports','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','759464fGQNON','35176704omGNEn','Omit\x20import\x20statements\x20from\x20generated\x20code','1442lGzeho','8525BjeRHi','502701xgwJcq','boolean','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','bool','196dObLBc','4XxFIml','str','appCode','operation','codegen','name','3228870SkPwGj','code','44634GsZrct','17778dkNutD','9ygBcTl','tableName','string','read'];a42_0x3208=function(){return _0xef0fa1;};return a42_0x3208();}
@@ -1 +1 @@
1
- const a43_0x7a7fd1=a43_0x2a15;(function(_0x1c8839,_0x218e0f){const _0x13b6d4=a43_0x2a15,_0x14324e=_0x1c8839();while(!![]){try{const _0xb062e7=parseInt(_0x13b6d4(0x1a5))/0x1*(parseInt(_0x13b6d4(0x19d))/0x2)+-parseInt(_0x13b6d4(0x1af))/0x3*(-parseInt(_0x13b6d4(0x1a3))/0x4)+-parseInt(_0x13b6d4(0x1a7))/0x5*(-parseInt(_0x13b6d4(0x1b1))/0x6)+-parseInt(_0x13b6d4(0x19b))/0x7+parseInt(_0x13b6d4(0x1a2))/0x8+-parseInt(_0x13b6d4(0x1a0))/0x9+parseInt(_0x13b6d4(0x1a9))/0xa;if(_0xb062e7===_0x218e0f)break;else _0x14324e['push'](_0x14324e['shift']());}catch(_0x3d7c5c){_0x14324e['push'](_0x14324e['shift']());}}}(a43_0xd5a5,0x90a18));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0xd5a5(){const _0x236d45=['codegen','114hqkJuK','appCode','1753906mnhXAo','sdk','472JCxFTw','target','sqlcode','9072324ghYlNJ','sqlCode','834784LnSWWT','449576pDdksr','string','3063EhxqYI','bff','27135xOgNgi','read','8082790jCIsay','sqlName','str','sql','boolean','no-imports','3WFNpeZ'];a43_0xd5a5=function(){return _0x236d45;};return a43_0xd5a5();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x2a15(_0x5ecd50,_0x46ade7){_0x5ecd50=_0x5ecd50-0x19b;const _0xd5a5ee=a43_0xd5a5();let _0x2a15b8=_0xd5a5ee[_0x5ecd50];return _0x2a15b8;}export const codegenSql={'service':a43_0x7a7fd1(0x1b0),'command':a43_0x7a7fd1(0x1ac),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a43_0x7a7fd1(0x1a8),'flags':[SQLCODE_FLAG,{'name':a43_0x7a7fd1(0x19e),'type':a43_0x7a7fd1(0x1a4),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x7a7fd1(0x19c),'enum':[a43_0x7a7fd1(0x19c),a43_0x7a7fd1(0x1a6)]},{'name':a43_0x7a7fd1(0x1ae),'type':a43_0x7a7fd1(0x1ad),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x39b04e){const _0x545c0d=a43_0x7a7fd1,_0x5b44b3=await getSqlQueryInfo(_0x39b04e[_0x545c0d(0x1b2)],_0x39b04e[_0x545c0d(0x1ab)](_0x545c0d(0x19f))),_0x409ade=_0x39b04e[_0x545c0d(0x1ab)](_0x545c0d(0x19e))||_0x545c0d(0x19c),_0x2e0afc=generateSqlCodeTemplate(_0x5b44b3,{'target':_0x409ade,'includeImports':!_0x39b04e['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x5b44b3[_0x545c0d(0x1a1)],'sqlName':_0x5b44b3[_0x545c0d(0x1aa)],'target':_0x409ade,'code':_0x2e0afc}};}};
1
+ const a43_0xbd323f=a43_0x4e27;function a43_0x2044(){const _0x4b78f0=['Code\x20target:\x20sdk\x20(default)\x20or\x20bff','target','322254wPTFlD','read','sdk','2053176ugVbUT','5wWJxkS','2529736mReYZQ','sqlName','5209435VDLeqh','appCode','3454194JmgexF','bool','boolean','str','sqlcode','no-imports','555002BePyUd','string','sqlCode','codegen','298896gLNRja','sql'];a43_0x2044=function(){return _0x4b78f0;};return a43_0x2044();}function a43_0x4e27(_0x184cd0,_0x2ff556){_0x184cd0=_0x184cd0-0xb4;const _0x2044cd=a43_0x2044();let _0x4e27e7=_0x2044cd[_0x184cd0];return _0x4e27e7;}(function(_0x1f7b27,_0x335fab){const _0x16744e=a43_0x4e27,_0x4d3f3a=_0x1f7b27();while(!![]){try{const _0x4185e8=-parseInt(_0x16744e(0xc6))/0x1+-parseInt(_0x16744e(0xb7))/0x2+parseInt(_0x16744e(0xca))/0x3+-parseInt(_0x16744e(0xba))/0x4*(-parseInt(_0x16744e(0xbb))/0x5)+-parseInt(_0x16744e(0xc0))/0x6+parseInt(_0x16744e(0xbe))/0x7+parseInt(_0x16744e(0xbc))/0x8;if(_0x4185e8===_0x335fab)break;else _0x4d3f3a['push'](_0x4d3f3a['shift']());}catch(_0x478e8c){_0x4d3f3a['push'](_0x4d3f3a['shift']());}}}(a43_0x2044,0x5d250));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0xbd323f(0xc9),'command':a43_0xbd323f(0xb4),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a43_0xbd323f(0xb8),'flags':[SQLCODE_FLAG,{'name':a43_0xbd323f(0xb6),'type':a43_0xbd323f(0xc7),'description':a43_0xbd323f(0xb5),'default':a43_0xbd323f(0xb9),'enum':[a43_0xbd323f(0xb9),'bff']},{'name':a43_0xbd323f(0xc5),'type':a43_0xbd323f(0xc2),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x1dc3fd){const _0x198347=a43_0xbd323f,_0x3cf958=await getSqlQueryInfo(_0x1dc3fd[_0x198347(0xbf)],_0x1dc3fd[_0x198347(0xc3)](_0x198347(0xc4))),_0x33b239=_0x1dc3fd[_0x198347(0xc3)](_0x198347(0xb6))||_0x198347(0xb9),_0x543ede=generateSqlCodeTemplate(_0x3cf958,{'target':_0x33b239,'includeImports':!_0x1dc3fd[_0x198347(0xc1)](_0x198347(0xc5))});return{'ok':!![],'data':{'sqlCode':_0x3cf958[_0x198347(0xc8)],'sqlName':_0x3cf958[_0x198347(0xbd)],'target':_0x33b239,'code':_0x543ede}};}};
@@ -1 +1 @@
1
- function a44_0x3a30(){const _0x4f365a=['str','bool','2048100gfKHhB','1001068GZCkuQ','keys','18GXZAYH','trim','\x20Note:\x20app\x20\x22','\x22\x20not\x20found.','project','\x20config.','apps','boolean','projectConfig','\x20<name>\x20[--global]','\x22\x20still\x20defined\x20in\x20','1FOtDoF','defaultApp','8IpNfDv','217777lJLdlQ','\x22\x20(appcode:\x20','length','\x20<name>\x20--appcode\x20<code>','583920ZPxvpJ','object','both','Updated','string','appcode','App\x20code','\x20app\x20\x22','flagMissing','\x20Set\x20as\x20default\x20app.','Missing\x20app\x20name.','13120CEilCa','473aYRPng','\x20<name>','1648HsnFqY','Added','App\x20\x22','validation','globalConfig','99654QMijac','args','761532fNqfML','global','Usage:\x20','Removed\x20app\x20\x22','Use\x20global\x20config\x20scope'];a44_0x3a30=function(){return _0x4f365a;};return a44_0x3a30();}(function(_0x3d4d38,_0x1d135a){const _0x449da3=a44_0x45f2,_0x1c4c72=_0x3d4d38();while(!![]){try{const _0x19f397=-parseInt(_0x449da3(0x74))/0x1*(parseInt(_0x449da3(0x98))/0x2)+-parseInt(_0x449da3(0x8e))/0x3+parseInt(_0x449da3(0x89))/0x4*(-parseInt(_0x449da3(0x86))/0x5)+-parseInt(_0x449da3(0x7b))/0x6+-parseInt(_0x449da3(0x77))/0x7*(parseInt(_0x449da3(0x76))/0x8)+parseInt(_0x449da3(0x9a))/0x9*(-parseInt(_0x449da3(0x97))/0xa)+-parseInt(_0x449da3(0x87))/0xb*(-parseInt(_0x449da3(0x90))/0xc);if(_0x19f397===_0x1d135a)break;else _0x1c4c72['push'](_0x1c4c72['shift']());}catch(_0x3f8cd1){_0x1c4c72['push'](_0x1c4c72['shift']());}}}(a44_0x3a30,0x8c9bc));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x1d3104=a44_0x45f2;return[{'name':_0x1d3104(0x80),'type':_0x1d3104(0x7f),'description':_0x1d3104(0x81),'required':!![]},{'name':'global','type':_0x1d3104(0xa1),'description':_0x1d3104(0x94),'default':![]},...getAppProfileFlagDefs()];}function a44_0x45f2(_0x1427b2,_0x17f36e){_0x1427b2=_0x1427b2-0x73;const _0x3a308f=a44_0x3a30();let _0x45f281=_0x3a308f[_0x1427b2];return _0x45f281;}export function buildAppRemoveFlags(){const _0x2d28b0=a44_0x45f2;return[{'name':_0x2d28b0(0x91),'type':'boolean','description':_0x2d28b0(0x94),'default':![]}];}export async function validateAppName(_0x28a2ab,_0x34cd75){const _0x36919d=a44_0x45f2,_0xce8b4=_0x28a2ab['args'][0x0]?.['trim']();if(!_0xce8b4)throw CliErrors[_0x36919d(0x8c)](_0x36919d(0x85),_0x36919d(0x92)+CLI_BIN_NAME+'\x20'+_0x34cd75+_0x36919d(0x88));}export async function runAppAdd(_0x294c46,_0x32911b){const _0x19be7b=a44_0x45f2,_0x24c2fc=_0x294c46['args'][0x0]?.[_0x19be7b(0x9b)]();if(!_0x24c2fc)throw CliErrors[_0x19be7b(0x8c)](_0x19be7b(0x85),_0x19be7b(0x92)+CLI_BIN_NAME+'\x20'+_0x32911b+_0x19be7b(0x7a));const _0x265a6b=_0x294c46[_0x19be7b(0x95)](_0x19be7b(0x80));if(!_0x265a6b)throw CliErrors[_0x19be7b(0x83)](_0x19be7b(0x80),_0x19be7b(0x92)+CLI_BIN_NAME+'\x20'+_0x32911b+_0x19be7b(0x7a));const _0x170150={'global':_0x294c46[_0x19be7b(0x96)]('global')},_0x17b463=readConfig(_0x170150);if(!_0x17b463['apps'])_0x17b463['apps']={};const _0x32e9ad={'appcode':_0x265a6b,...collectAppProfileOverrides(_0x34a2b3=>_0x294c46[_0x19be7b(0x95)](_0x34a2b3))},_0x587d40=_0x17b463['apps'],_0x5ec445=!!_0x587d40[_0x24c2fc];_0x587d40[_0x24c2fc]=_0x32e9ad;if(!_0x17b463[_0x19be7b(0x75)])_0x17b463['defaultApp']=_0x24c2fc;writeConfig(_0x17b463,_0x170150);const _0x3820e7=!_0x5ec445&&_0x17b463[_0x19be7b(0x75)]===_0x24c2fc?_0x19be7b(0x84):'',_0x539f3e=(_0x5ec445?_0x19be7b(0x7e):_0x19be7b(0x8a))+_0x19be7b(0x82)+_0x24c2fc+_0x19be7b(0x78)+_0x265a6b+')'+scopeLabel(_0x170150)+'.'+_0x3820e7;return{'ok':!![],'message':_0x539f3e};}export async function runAppRemove(_0x9ddd2b,_0x3e5a63){const _0x43596d=a44_0x45f2,_0x2b7d64=_0x9ddd2b[_0x43596d(0x8f)][0x0]?.[_0x43596d(0x9b)]();if(!_0x2b7d64)throw CliErrors[_0x43596d(0x8c)]('Missing\x20app\x20name.',_0x43596d(0x92)+CLI_BIN_NAME+'\x20'+_0x3e5a63+_0x43596d(0xa3));const _0xd5630a=_0x9ddd2b[_0x43596d(0x96)]('global'),{config:_0x541661,layers:_0x554bb9}=readRawConfigWithLayers(),_0x436b15=_0x541661[_0x43596d(0xa0)]??{};if(!_0x436b15[_0x2b7d64])throw CliErrors[_0x43596d(0x8c)](_0x43596d(0x8b)+_0x2b7d64+_0x43596d(0x9d));const _0x7a6ae2=_0x554bb9[_0x43596d(0x8d)]['apps']&&typeof _0x554bb9[_0x43596d(0x8d)]['apps']===_0x43596d(0x7c)?_0x554bb9[_0x43596d(0x8d)][_0x43596d(0xa0)]:{},_0x55476e=_0x554bb9[_0x43596d(0xa2)][_0x43596d(0xa0)]&&typeof _0x554bb9[_0x43596d(0xa2)][_0x43596d(0xa0)]===_0x43596d(0x7c)?_0x554bb9[_0x43596d(0xa2)][_0x43596d(0xa0)]:{},_0x542eff=appDefinedIn(_0x2b7d64,_0x7a6ae2,_0x55476e,_0x554bb9['projectConfig']['inherit']===![]),_0x42c26f=resolveAppScopeForWrite(_0x2b7d64,_0xd5630a,_0x554bb9),_0x3d93fc={'global':_0x42c26f===_0x43596d(0x91)},_0x4bb583=readConfig(_0x3d93fc),_0x4070ef=_0x4bb583['apps'];if(!_0x4070ef||!_0x4070ef[_0x2b7d64])throw CliErrors[_0x43596d(0x8c)]('App\x20\x22'+_0x2b7d64+_0x43596d(0x9d));delete _0x4070ef[_0x2b7d64];let _0x177b7a='';if(_0x4bb583['defaultApp']===_0x2b7d64){const _0x3f4280=Object[_0x43596d(0x99)](_0x4070ef);_0x4bb583[_0x43596d(0x75)]=_0x3f4280[_0x43596d(0x79)]>0x0?_0x3f4280[0x0]:undefined,_0x4bb583[_0x43596d(0x75)]?_0x177b7a='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x4bb583[_0x43596d(0x75)]+'\x22.':delete _0x4bb583[_0x43596d(0x75)];}Object[_0x43596d(0x99)](_0x4070ef)[_0x43596d(0x79)]===0x0&&(delete _0x4bb583[_0x43596d(0xa0)],delete _0x4bb583[_0x43596d(0x75)]);writeConfig(_0x4bb583,_0x3d93fc);const _0x5407b1=_0x542eff===_0x43596d(0x7d)?_0x43596d(0x9c)+_0x2b7d64+_0x43596d(0x73)+(_0x42c26f==='project'?'global':_0x43596d(0x9e))+_0x43596d(0x9f):'';return{'ok':!![],'message':_0x43596d(0x93)+_0x2b7d64+'\x22'+scopeLabel(_0x3d93fc)+'.'+_0x177b7a+_0x5407b1};}
1
+ (function(_0x3bbc2f,_0x37fce3){const _0x1d1efc=a44_0x34e7,_0x2ba567=_0x3bbc2f();while(!![]){try{const _0x37742d=-parseInt(_0x1d1efc(0xae))/0x1+parseInt(_0x1d1efc(0xa5))/0x2+parseInt(_0x1d1efc(0xaf))/0x3+-parseInt(_0x1d1efc(0xc2))/0x4*(-parseInt(_0x1d1efc(0xb6))/0x5)+parseInt(_0x1d1efc(0xba))/0x6*(-parseInt(_0x1d1efc(0xc3))/0x7)+-parseInt(_0x1d1efc(0xa9))/0x8+-parseInt(_0x1d1efc(0xb8))/0x9*(-parseInt(_0x1d1efc(0x9e))/0xa);if(_0x37742d===_0x37fce3)break;else _0x2ba567['push'](_0x2ba567['shift']());}catch(_0x3d3319){_0x2ba567['push'](_0x2ba567['shift']());}}}(a44_0x2800,0x190f7));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';function a44_0x2800(){const _0x3f1fd2=['\x20app\x20\x22','defaultApp','length','1636944gdkDyP','args','App\x20\x22','str','global','109179kiHBHf','109110yIuHDC','appcode','Use\x20global\x20config\x20scope','validation','Removed\x20app\x20\x22','Updated','flagMissing','185vPlSqw','object','32616pLUCWh','Usage:\x20','6iMpIpK','string','\x20config.','boolean','\x20Set\x20as\x20default\x20app.','bool','globalConfig','\x20<name>\x20--appcode\x20<code>','17032BjFatO','578109qPhWZj','projectConfig','trim','Missing\x20app\x20name.','\x20Default\x20app\x20changed\x20to\x20\x22','apps','\x22\x20still\x20defined\x20in\x20','480VFwLPz','\x22\x20not\x20found.','App\x20code','\x20Note:\x20app\x20\x22','keys','project','Added','262326kfuBEQ'];a44_0x2800=function(){return _0x3f1fd2;};return a44_0x2800();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x3d68cd=a44_0x34e7;return[{'name':_0x3d68cd(0xb0),'type':_0x3d68cd(0xbb),'description':_0x3d68cd(0xa0),'required':!![]},{'name':_0x3d68cd(0xad),'type':_0x3d68cd(0xbd),'description':_0x3d68cd(0xb1),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0xd397a=a44_0x34e7;return[{'name':_0xd397a(0xad),'type':_0xd397a(0xbd),'description':_0xd397a(0xb1),'default':![]}];}export async function validateAppName(_0x33f546,_0x10d8aa){const _0x508739=a44_0x34e7,_0x5afa00=_0x33f546[_0x508739(0xaa)][0x0]?.[_0x508739(0xc5)]();if(!_0x5afa00)throw CliErrors['validation'](_0x508739(0xc6),_0x508739(0xb9)+CLI_BIN_NAME+'\x20'+_0x10d8aa+'\x20<name>');}function a44_0x34e7(_0x66f88f,_0x3df013){_0x66f88f=_0x66f88f-0x9c;const _0x28009c=a44_0x2800();let _0x34e7d4=_0x28009c[_0x66f88f];return _0x34e7d4;}export async function runAppAdd(_0xa91816,_0x2d7938){const _0x42935f=a44_0x34e7,_0x575247=_0xa91816[_0x42935f(0xaa)][0x0]?.[_0x42935f(0xc5)]();if(!_0x575247)throw CliErrors['validation'](_0x42935f(0xc6),_0x42935f(0xb9)+CLI_BIN_NAME+'\x20'+_0x2d7938+_0x42935f(0xc1));const _0xbb9116=_0xa91816[_0x42935f(0xac)](_0x42935f(0xb0));if(!_0xbb9116)throw CliErrors[_0x42935f(0xb5)](_0x42935f(0xb0),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2d7938+'\x20<name>\x20--appcode\x20<code>');const _0x5a13fc={'global':_0xa91816[_0x42935f(0xbf)](_0x42935f(0xad))},_0xc437c6=readConfig(_0x5a13fc);if(!_0xc437c6['apps'])_0xc437c6['apps']={};const _0x5364cf={'appcode':_0xbb9116,...collectAppProfileOverrides(_0x27613c=>_0xa91816['str'](_0x27613c))},_0x1c1698=_0xc437c6[_0x42935f(0x9c)],_0x506e2f=!!_0x1c1698[_0x575247];_0x1c1698[_0x575247]=_0x5364cf;if(!_0xc437c6['defaultApp'])_0xc437c6['defaultApp']=_0x575247;writeConfig(_0xc437c6,_0x5a13fc);const _0x460482=!_0x506e2f&&_0xc437c6[_0x42935f(0xa7)]===_0x575247?_0x42935f(0xbe):'',_0x3319f5=(_0x506e2f?_0x42935f(0xb4):_0x42935f(0xa4))+_0x42935f(0xa6)+_0x575247+'\x22\x20(appcode:\x20'+_0xbb9116+')'+scopeLabel(_0x5a13fc)+'.'+_0x460482;return{'ok':!![],'message':_0x3319f5};}export async function runAppRemove(_0x54e595,_0xae8a71){const _0x1bfd80=a44_0x34e7,_0x1c5eab=_0x54e595[_0x1bfd80(0xaa)][0x0]?.[_0x1bfd80(0xc5)]();if(!_0x1c5eab)throw CliErrors['validation'](_0x1bfd80(0xc6),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0xae8a71+'\x20<name>\x20[--global]');const _0x2f8991=_0x54e595['bool'](_0x1bfd80(0xad)),{config:_0x42d183,layers:_0xfb7a79}=readRawConfigWithLayers(),_0x5f22fb=_0x42d183[_0x1bfd80(0x9c)]??{};if(!_0x5f22fb[_0x1c5eab])throw CliErrors[_0x1bfd80(0xb2)]('App\x20\x22'+_0x1c5eab+_0x1bfd80(0x9f));const _0x1c7d2f=_0xfb7a79[_0x1bfd80(0xc0)][_0x1bfd80(0x9c)]&&typeof _0xfb7a79[_0x1bfd80(0xc0)][_0x1bfd80(0x9c)]===_0x1bfd80(0xb7)?_0xfb7a79[_0x1bfd80(0xc0)][_0x1bfd80(0x9c)]:{},_0x27e4a4=_0xfb7a79[_0x1bfd80(0xc4)][_0x1bfd80(0x9c)]&&typeof _0xfb7a79[_0x1bfd80(0xc4)][_0x1bfd80(0x9c)]===_0x1bfd80(0xb7)?_0xfb7a79[_0x1bfd80(0xc4)]['apps']:{},_0x56d8e9=appDefinedIn(_0x1c5eab,_0x1c7d2f,_0x27e4a4,_0xfb7a79[_0x1bfd80(0xc4)]['inherit']===![]),_0x360dca=resolveAppScopeForWrite(_0x1c5eab,_0x2f8991,_0xfb7a79),_0x316686={'global':_0x360dca==='global'},_0x27c040=readConfig(_0x316686),_0x4ff7bb=_0x27c040[_0x1bfd80(0x9c)];if(!_0x4ff7bb||!_0x4ff7bb[_0x1c5eab])throw CliErrors[_0x1bfd80(0xb2)](_0x1bfd80(0xab)+_0x1c5eab+_0x1bfd80(0x9f));delete _0x4ff7bb[_0x1c5eab];let _0x266a90='';if(_0x27c040[_0x1bfd80(0xa7)]===_0x1c5eab){const _0x466f01=Object[_0x1bfd80(0xa2)](_0x4ff7bb);_0x27c040[_0x1bfd80(0xa7)]=_0x466f01[_0x1bfd80(0xa8)]>0x0?_0x466f01[0x0]:undefined,_0x27c040[_0x1bfd80(0xa7)]?_0x266a90=_0x1bfd80(0xc7)+_0x27c040[_0x1bfd80(0xa7)]+'\x22.':delete _0x27c040[_0x1bfd80(0xa7)];}Object[_0x1bfd80(0xa2)](_0x4ff7bb)[_0x1bfd80(0xa8)]===0x0&&(delete _0x27c040[_0x1bfd80(0x9c)],delete _0x27c040['defaultApp']);writeConfig(_0x27c040,_0x316686);const _0x2be80a=_0x56d8e9==='both'?_0x1bfd80(0xa1)+_0x1c5eab+_0x1bfd80(0x9d)+(_0x360dca===_0x1bfd80(0xa3)?_0x1bfd80(0xad):_0x1bfd80(0xa3))+_0x1bfd80(0xbc):'';return{'ok':!![],'message':_0x1bfd80(0xb3)+_0x1c5eab+'\x22'+scopeLabel(_0x316686)+'.'+_0x266a90+_0x2be80a};}
@@ -1 +1 @@
1
- (function(_0x19ed1a,_0x361b37){const _0x413f44=a45_0x12da,_0x2121dd=_0x19ed1a();while(!![]){try{const _0x32942f=parseInt(_0x413f44(0xb6))/0x1*(parseInt(_0x413f44(0xcb))/0x2)+parseInt(_0x413f44(0xb8))/0x3*(parseInt(_0x413f44(0xc7))/0x4)+parseInt(_0x413f44(0xc9))/0x5+parseInt(_0x413f44(0xd3))/0x6*(-parseInt(_0x413f44(0xb2))/0x7)+parseInt(_0x413f44(0xbb))/0x8+-parseInt(_0x413f44(0xd4))/0x9+-parseInt(_0x413f44(0xca))/0xa*(-parseInt(_0x413f44(0xce))/0xb);if(_0x32942f===_0x361b37)break;else _0x2121dd['push'](_0x2121dd['shift']());}catch(_0x29e997){_0x2121dd['push'](_0x2121dd['shift']());}}}(a45_0x4ca7,0x60b13));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x5b9f68 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 _0x1bb9c5=a45_0x12da,_0x4e17e1=await input({'message':_0x1bb9c5(0xb5),'validate':_0x47a1d4=>{const _0x5caca7=_0x1bb9c5,_0x368252=validateAppcode(_0x47a1d4[_0x5caca7(0xc1)]());return _0x368252[_0x5caca7(0xbf)]||_0x368252[_0x5caca7(0xcf)]||_0x5caca7(0xc4);}});return _0x4e17e1[_0x1bb9c5(0xc1)]();}function a45_0x12da(_0x137188,_0x2b5270){_0x137188=_0x137188-0xb1;const _0x4ca736=a45_0x4ca7();let _0x12daf1=_0x4ca736[_0x137188];return _0x12daf1;}function a45_0x4ca7(){const _0x1714d4=['285298YLNYii','find','\x0a未找到可用应用。','22hcKoEd','message','appCode','skip','正在获取可用应用列表...','3252OaaUeF','6454782gmuOeD','cyan','6818PgiWkP','无法获取远程应用列表,请手动输入。','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','请输入\x20App\x20Code:','1SDzZHH','\x20\x20(','407523xvauxd','manual','\x0a无法获取远程应用列表,请手动输入。','4575064SVlYCB','appName','length','yellow','valid','map','trim','✎\x20自定义输入\x20appcode','✎\x20手动输入','Invalid\x20App\x20Code','custom','gray','12Qvdrvv','未找到可用应用。','66650FIsseE','2528860cKhTFg'];a45_0x4ca7=function(){return _0x1714d4;};return a45_0x4ca7();}export async function promptAppSelection(_0x108194){const _0xc19c6b=a45_0x12da,_0x3d0dd0=[{'name':a45_0x5b9f68[_0xc19c6b(0xbe)](_0xc19c6b(0xc2)),'value':-0x1},..._0x108194[_0xc19c6b(0xc0)]((_0x415118,_0x16ff54)=>({'name':_0x415118[_0xc19c6b(0xbc)]+'\x20\x20'+a45_0x5b9f68[_0xc19c6b(0xc6)]('('+_0x415118[_0xc19c6b(0xd0)]+')'),'value':_0x16ff54}))],_0x9b5f59=await checkbox({'message':'获取到\x20'+a45_0x5b9f68[_0xc19c6b(0xb1)](_0x108194['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x3d0dd0,'loop':![]});if(_0x9b5f59['includes'](-0x1))return _0xc19c6b(0xc5);if(_0x9b5f59[_0xc19c6b(0xbd)]===0x0)return _0xc19c6b(0xc5);return _0x9b5f59[_0xc19c6b(0xc0)](_0x58fc40=>_0x108194[_0x58fc40]);}export async function promptSingleAppSelection(_0x256885){const _0x5ac60c=a45_0x12da,_0xfbd215=[{'name':a45_0x5b9f68[_0x5ac60c(0xc6)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x5ac60c(0xd1)},{'name':a45_0x5b9f68['yellow']('✎\x20自定义输入\x20appcode'),'value':_0x5ac60c(0xc5)},..._0x256885['map'](_0x1ad7bb=>({'name':_0x1ad7bb[_0x5ac60c(0xbc)]+'\x20\x20'+a45_0x5b9f68[_0x5ac60c(0xc6)]('('+_0x1ad7bb['appCode']+')'),'value':_0x1ad7bb[_0x5ac60c(0xd0)]}))],_0x4294b8=await select({'message':'请选择要绑定的应用:','choices':_0xfbd215});if(_0x4294b8===_0x5ac60c(0xd1))return _0x5ac60c(0xd1);if(_0x4294b8===_0x5ac60c(0xc5))return _0x5ac60c(0xc5);return _0x256885[_0x5ac60c(0xcc)](_0x3cb59b=>_0x3cb59b['appCode']===_0x4294b8);}export async function selectSingleAppcode(_0x5b83c6){const _0x468860=a45_0x12da;if(!_0x5b83c6)return writeCliSideChannelLine(a45_0x5b9f68['gray'](_0x468860(0xb4))),_fallbackOrSkip();writeCliSideChannelLine(_0x468860(0xd2));let _0x5d3d5e;try{_0x5d3d5e=await withActiveCookie(_0x5b83c6,()=>listRemoteApps());}catch(_0x44ee0e){writeCliSideChannelLine(a45_0x5b9f68[_0x468860(0xbe)](_0x468860(0xb3)));if(_0x44ee0e instanceof Error)writeCliSideChannelLine(a45_0x5b9f68[_0x468860(0xc6)](_0x468860(0xb7)+_0x44ee0e[_0x468860(0xcf)]+')'));return _fallbackOrSkip();}if(_0x5d3d5e[_0x468860(0xbd)]===0x0)return writeCliSideChannelLine(a45_0x5b9f68[_0x468860(0xbe)](_0x468860(0xc8))),_fallbackOrSkip();const _0x2ed0ef=await promptSingleAppSelection(_0x5d3d5e);if(_0x2ed0ef===_0x468860(0xd1))return'';if(_0x2ed0ef===_0x468860(0xc5))return promptCustomAppcode();return _0x2ed0ef[_0x468860(0xd0)];}export async function selectMultipleApps(_0x12ba5d){const _0x503be4=a45_0x12da;writeCliSideChannelLine('正在获取可用应用列表...');let _0x42a5d1;try{_0x42a5d1=await withActiveCookie(_0x12ba5d,()=>listRemoteApps());}catch(_0x4d0d14){writeCliSideChannelLine(_0x503be4(0xba));if(_0x4d0d14 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x4d0d14[_0x503be4(0xcf)]+')');return _0x503be4(0xc5);}if(_0x42a5d1[_0x503be4(0xbd)]===0x0)return writeCliSideChannelLine(_0x503be4(0xcd)),'custom';return promptAppSelection(_0x42a5d1);}async function _fallbackOrSkip(){const _0x515503=a45_0x12da,_0x2866b3=await select({'message':'App\x20Code:','choices':[{'name':a45_0x5b9f68['gray']('(跳过,稍后配置)'),'value':'skip'},{'name':a45_0x5b9f68[_0x515503(0xbe)](_0x515503(0xc3)),'value':_0x515503(0xb9)}]});if(_0x2866b3===_0x515503(0xd1))return'';return promptCustomAppcode();}
1
+ (function(_0x2c16de,_0x2e8290){const _0x36e7e5=a45_0x3a78,_0x3affbb=_0x2c16de();while(!![]){try{const _0x5191e5=parseInt(_0x36e7e5(0x1b3))/0x1+-parseInt(_0x36e7e5(0x1a6))/0x2*(-parseInt(_0x36e7e5(0x1a2))/0x3)+parseInt(_0x36e7e5(0x1a9))/0x4+parseInt(_0x36e7e5(0x1ac))/0x5*(parseInt(_0x36e7e5(0x1ab))/0x6)+-parseInt(_0x36e7e5(0x199))/0x7+-parseInt(_0x36e7e5(0x1b6))/0x8*(parseInt(_0x36e7e5(0x19a))/0x9)+parseInt(_0x36e7e5(0x19d))/0xa;if(_0x5191e5===_0x2e8290)break;else _0x3affbb['push'](_0x3affbb['shift']());}catch(_0x335dbf){_0x3affbb['push'](_0x3affbb['shift']());}}}(a45_0xcaca,0xb8f2a));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x336b28 from'chalk';function a45_0x3a78(_0x4aa6ec,_0x4f225a){_0x4aa6ec=_0x4aa6ec-0x193;const _0xcaca91=a45_0xcaca();let _0x3a7812=_0xcaca91[_0x4aa6ec];return _0x3a7812;}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 _0x33e4bb=a45_0x3a78,_0x5a07c3=await input({'message':_0x33e4bb(0x197),'validate':_0x37841c=>{const _0x47f976=_0x33e4bb,_0x21572c=validateAppcode(_0x37841c['trim']());return _0x21572c[_0x47f976(0x1b5)]||_0x21572c[_0x47f976(0x1af)]||_0x47f976(0x195);}});return _0x5a07c3['trim']();}export async function promptAppSelection(_0x32b244){const _0x4fa5a5=a45_0x3a78,_0x3be61b=[{'name':a45_0x336b28[_0x4fa5a5(0x1ae)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x32b244[_0x4fa5a5(0x1aa)]((_0x4363b5,_0x287381)=>({'name':_0x4363b5[_0x4fa5a5(0x194)]+'\x20\x20'+a45_0x336b28['gray']('('+_0x4363b5[_0x4fa5a5(0x19f)]+')'),'value':_0x287381}))],_0x112263=await checkbox({'message':_0x4fa5a5(0x1a1)+a45_0x336b28[_0x4fa5a5(0x19c)](_0x32b244[_0x4fa5a5(0x1a0)])+_0x4fa5a5(0x1a7),'choices':_0x3be61b,'loop':![]});if(_0x112263[_0x4fa5a5(0x19e)](-0x1))return _0x4fa5a5(0x1b0);if(_0x112263[_0x4fa5a5(0x1a0)]===0x0)return _0x4fa5a5(0x1b0);return _0x112263[_0x4fa5a5(0x1aa)](_0x25b837=>_0x32b244[_0x25b837]);}export async function promptSingleAppSelection(_0x4dbc6f){const _0x1b3928=a45_0x3a78,_0x62d38=[{'name':a45_0x336b28[_0x1b3928(0x1a3)](_0x1b3928(0x1a4)),'value':'skip'},{'name':a45_0x336b28[_0x1b3928(0x1ae)]('✎\x20自定义输入\x20appcode'),'value':_0x1b3928(0x1b0)},..._0x4dbc6f['map'](_0x48a7e4=>({'name':_0x48a7e4[_0x1b3928(0x194)]+'\x20\x20'+a45_0x336b28[_0x1b3928(0x1a3)]('('+_0x48a7e4['appCode']+')'),'value':_0x48a7e4[_0x1b3928(0x19f)]}))],_0x2f050e=await select({'message':_0x1b3928(0x1a8),'choices':_0x62d38});if(_0x2f050e===_0x1b3928(0x1a5))return _0x1b3928(0x1a5);if(_0x2f050e==='custom')return _0x1b3928(0x1b0);return _0x4dbc6f[_0x1b3928(0x198)](_0x22c239=>_0x22c239[_0x1b3928(0x19f)]===_0x2f050e);}export async function selectSingleAppcode(_0x406f56){const _0x277ded=a45_0x3a78;if(!_0x406f56)return writeCliSideChannelLine(a45_0x336b28[_0x277ded(0x1a3)](_0x277ded(0x1b2))),_fallbackOrSkip();writeCliSideChannelLine(_0x277ded(0x1b4));let _0x32b7c3;try{_0x32b7c3=await withActiveCookie(_0x406f56,()=>listRemoteApps());}catch(_0x37d208){writeCliSideChannelLine(a45_0x336b28[_0x277ded(0x1ae)](_0x277ded(0x1ad)));if(_0x37d208 instanceof Error)writeCliSideChannelLine(a45_0x336b28['gray'](_0x277ded(0x196)+_0x37d208[_0x277ded(0x1af)]+')'));return _fallbackOrSkip();}if(_0x32b7c3[_0x277ded(0x1a0)]===0x0)return writeCliSideChannelLine(a45_0x336b28[_0x277ded(0x1ae)](_0x277ded(0x19b))),_fallbackOrSkip();const _0x309031=await promptSingleAppSelection(_0x32b7c3);if(_0x309031===_0x277ded(0x1a5))return'';if(_0x309031===_0x277ded(0x1b0))return promptCustomAppcode();return _0x309031['appCode'];}function a45_0xcaca(){const _0x505a46=['请输入\x20App\x20Code:','find','7517083LJkbQC','53127hABUpS','未找到可用应用。','cyan','6146730NQNium','includes','appCode','length','获取到\x20','9dPowfe','gray','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','skip','524242VISWsA','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','请选择要绑定的应用:','128840AsdPnm','map','12ydWinM','1468365PrErLe','无法获取远程应用列表,请手动输入。','yellow','message','custom','App\x20Code:','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','1233446bqPtKF','正在获取可用应用列表...','valid','1928EQEnaB','\x0a未找到可用应用。','✎\x20手动输入','appName','Invalid\x20App\x20Code','\x20\x20('];a45_0xcaca=function(){return _0x505a46;};return a45_0xcaca();}export async function selectMultipleApps(_0x1480d2){const _0x31e619=a45_0x3a78;writeCliSideChannelLine('正在获取可用应用列表...');let _0x495f99;try{_0x495f99=await withActiveCookie(_0x1480d2,()=>listRemoteApps());}catch(_0x202998){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x202998 instanceof Error)writeCliSideChannelLine(_0x31e619(0x196)+_0x202998[_0x31e619(0x1af)]+')');return _0x31e619(0x1b0);}if(_0x495f99[_0x31e619(0x1a0)]===0x0)return writeCliSideChannelLine(_0x31e619(0x1b7)),_0x31e619(0x1b0);return promptAppSelection(_0x495f99);}async function _fallbackOrSkip(){const _0x4904ab=a45_0x3a78,_0x42979a=await select({'message':_0x4904ab(0x1b1),'choices':[{'name':a45_0x336b28['gray']('(跳过,稍后配置)'),'value':_0x4904ab(0x1a5)},{'name':a45_0x336b28['yellow'](_0x4904ab(0x193)),'value':'manual'}]});if(_0x42979a===_0x4904ab(0x1a5))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- function a46_0x4678(_0x10b742,_0x338b10){_0x10b742=_0x10b742-0x144;var _0x5a730e=a46_0x5a73();var _0x4678af=_0x5a730e[_0x10b742];return _0x4678af;}function a46_0x5a73(){var _0x59db61=['6uVzCvd','defineProperties','12gPRWIr','7578615JabQkp','232870VQXHgd','439467NjryEi','description','3635200cVFBiX','458815aFMLEn','20MptTEX','method','29205QAFsYO','1584dhQJwC','url','294639aDIvcy'];a46_0x5a73=function(){return _0x59db61;};return a46_0x5a73();}(function(_0x69dca8,_0x2464aa){var _0x3ad411=a46_0x4678,_0x165cd6=_0x69dca8();while(!![]){try{var _0x3dcd77=parseInt(_0x3ad411(0x14c))/0x1+-parseInt(_0x3ad411(0x14b))/0x2+-parseInt(_0x3ad411(0x146))/0x3*(-parseInt(_0x3ad411(0x149))/0x4)+-parseInt(_0x3ad411(0x14e))/0x5+parseInt(_0x3ad411(0x147))/0x6*(-parseInt(_0x3ad411(0x14f))/0x7)+parseInt(_0x3ad411(0x144))/0x8*(-parseInt(_0x3ad411(0x152))/0x9)+-parseInt(_0x3ad411(0x150))/0xa*(-parseInt(_0x3ad411(0x14a))/0xb);if(_0x3dcd77===_0x2464aa)break;else _0x165cd6['push'](_0x165cd6['shift']());}catch(_0x47dead){_0x165cd6['push'](_0x165cd6['shift']());}}}(a46_0x5a73,0x88d7a));export function asDryRunResult(_0x5b18e6,_0x24724a){var _0x1c0bd3=a46_0x4678;return Object[_0x1c0bd3(0x148)](_0x5b18e6,{'method':{'value':_0x24724a[_0x1c0bd3(0x151)],'enumerable':![]},'url':{'value':_0x24724a[_0x1c0bd3(0x145)],'enumerable':![]},..._0x24724a[_0x1c0bd3(0x14d)]?{'description':{'value':_0x24724a[_0x1c0bd3(0x14d)],'enumerable':![]}}:{}});}
1
+ function a46_0x4e01(_0x5a852f,_0x3b3f34){_0x5a852f=_0x5a852f-0x1b1;var _0x14b55f=a46_0x14b5();var _0x4e0119=_0x14b55f[_0x5a852f];return _0x4e0119;}(function(_0x5d27c2,_0x4664fc){var _0x41cfc0=a46_0x4e01,_0x801ab8=_0x5d27c2();while(!![]){try{var _0x26db9f=-parseInt(_0x41cfc0(0x1b7))/0x1*(parseInt(_0x41cfc0(0x1b6))/0x2)+parseInt(_0x41cfc0(0x1b9))/0x3+-parseInt(_0x41cfc0(0x1b5))/0x4*(-parseInt(_0x41cfc0(0x1b2))/0x5)+-parseInt(_0x41cfc0(0x1bc))/0x6*(-parseInt(_0x41cfc0(0x1b3))/0x7)+parseInt(_0x41cfc0(0x1b1))/0x8+-parseInt(_0x41cfc0(0x1bd))/0x9+-parseInt(_0x41cfc0(0x1b8))/0xa;if(_0x26db9f===_0x4664fc)break;else _0x801ab8['push'](_0x801ab8['shift']());}catch(_0x41094a){_0x801ab8['push'](_0x801ab8['shift']());}}}(a46_0x14b5,0x7bb6c));function a46_0x14b5(){var _0x26397e=['4641265NPzGvE','35EMKPhl','url','4QajzDc','2KiXFdT','628379oUHNqZ','13113190VKiYAI','2229408dsnWQV','description','defineProperties','683454nxnLxM','517239fDZPkl','2103736fmIhlB'];a46_0x14b5=function(){return _0x26397e;};return a46_0x14b5();}export function asDryRunResult(_0x44574c,_0x519c5b){var _0x227502=a46_0x4e01;return Object[_0x227502(0x1bb)](_0x44574c,{'method':{'value':_0x519c5b['method'],'enumerable':![]},'url':{'value':_0x519c5b[_0x227502(0x1b4)],'enumerable':![]},..._0x519c5b['description']?{'description':{'value':_0x519c5b[_0x227502(0x1ba)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a47_0x1f09c5=a47_0x367d;(function(_0x45cb7f,_0x541dc4){const _0x1aa01b=a47_0x367d,_0x80160a=_0x45cb7f();while(!![]){try{const _0x422719=parseInt(_0x1aa01b(0x153))/0x1*(-parseInt(_0x1aa01b(0x154))/0x2)+parseInt(_0x1aa01b(0x15f))/0x3+-parseInt(_0x1aa01b(0x164))/0x4+parseInt(_0x1aa01b(0x156))/0x5*(parseInt(_0x1aa01b(0x163))/0x6)+parseInt(_0x1aa01b(0x160))/0x7*(parseInt(_0x1aa01b(0x155))/0x8)+parseInt(_0x1aa01b(0x157))/0x9*(-parseInt(_0x1aa01b(0x15c))/0xa)+parseInt(_0x1aa01b(0x152))/0xb;if(_0x422719===_0x541dc4)break;else _0x80160a['push'](_0x80160a['shift']());}catch(_0x19ac7b){_0x80160a['push'](_0x80160a['shift']());}}}(a47_0x4bb2,0x857bb));function a47_0x4bb2(){const _0x1afac0=['3004LzVRnN','296yFnzIN','2012840zIZPUB','3111084EQYliT','string','dbtype','MYSQL','POSTGRESQL','20zmptDS','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','number','1215342BKPJZW','53305QMOurJ','appcode','Dataset\x20code\x20(32-char\x20hex\x20UUID)','12YwqTJE','2805972QbcmZR','Database\x20product\x20type','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','11317471cqmAyF','387LwQxrh'];a47_0x4bb2=function(){return _0x1afac0;};return a47_0x4bb2();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':'code','type':a47_0x1f09c5(0x158),'required':!![],'description':a47_0x1f09c5(0x162),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a47_0x1f09c5(0x162)};export const SQLCODE_FLAG={'name':'sqlcode','type':a47_0x1f09c5(0x158),'required':!![],'description':a47_0x1f09c5(0x150),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};function a47_0x367d(_0x448744,_0x5e8f43){_0x448744=_0x448744-0x150;const _0x4bb276=a47_0x4bb2();let _0x367d33=_0x4bb276[_0x448744];return _0x367d33;}export const APPCODE_FLAG_OPTIONAL={'name':a47_0x1f09c5(0x161),'type':'string','required':![],'description':a47_0x1f09c5(0x15d)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x1f09c5(0x15e),'required':!![],'description':a47_0x1f09c5(0x151)};export const DB_TYPE_FLAG={'name':a47_0x1f09c5(0x159),'type':a47_0x1f09c5(0x158),'required':!![],'description':a47_0x1f09c5(0x165),'enum':[a47_0x1f09c5(0x15a),a47_0x1f09c5(0x15b)]};
1
+ const a47_0x446362=a47_0x33f1;(function(_0x512107,_0x2975cd){const _0x5649ea=a47_0x33f1,_0x14ed88=_0x512107();while(!![]){try{const _0xe5fffd=-parseInt(_0x5649ea(0x91))/0x1+parseInt(_0x5649ea(0x86))/0x2+parseInt(_0x5649ea(0x95))/0x3+-parseInt(_0x5649ea(0x8f))/0x4+-parseInt(_0x5649ea(0x8a))/0x5+-parseInt(_0x5649ea(0x87))/0x6*(parseInt(_0x5649ea(0x98))/0x7)+parseInt(_0x5649ea(0x8d))/0x8;if(_0xe5fffd===_0x2975cd)break;else _0x14ed88['push'](_0x14ed88['shift']());}catch(_0x4ef2e4){_0x14ed88['push'](_0x14ed88['shift']());}}}(a47_0x29ca,0x6b7a6));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x446362(0x8e)};function a47_0x33f1(_0x30e6d6,_0x10af88){_0x30e6d6=_0x30e6d6-0x86;const _0x29ca89=a47_0x29ca();let _0x33f187=_0x29ca89[_0x30e6d6];return _0x33f187;}export const CODE_FLAG={'name':a47_0x446362(0x88),'type':a47_0x446362(0x96),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};function a47_0x29ca(){const _0x5e2637=['appcode','1056207RNVolr','string','App\x20code\x20(e.g.\x20app-xxxxx)','2674OxcbtS','Dataset\x20code\x20(32-char\x20hex\x20UUID)','datasetcode','MYSQL','number','406732gJzhts','9522Cjarrv','code','POSTGRESQL','3734600LQZjYI','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','sqlcode','16268960HRfkFr','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','2556228qDFVaq','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','156614jkRHCF','dbtype','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'];a47_0x29ca=function(){return _0x5e2637;};return a47_0x29ca();}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x446362(0x9a),'description':a47_0x446362(0x99)};export const SQLCODE_FLAG={'name':a47_0x446362(0x8c),'type':a47_0x446362(0x96),'required':!![],'description':a47_0x446362(0x8b),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x446362(0x94),'type':'string','required':![],'description':a47_0x446362(0x90)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x446362(0x97)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x446362(0x9c),'required':!![],'description':a47_0x446362(0x93)};export const DB_TYPE_FLAG={'name':a47_0x446362(0x92),'type':a47_0x446362(0x96),'required':!![],'description':'Database\x20product\x20type','enum':[a47_0x446362(0x9b),a47_0x446362(0x89)]};
@@ -1 +1 @@
1
- (function(_0x53d353,_0xfba2e2){const _0x111e43=a48_0x7f1d,_0x5f4c61=_0x53d353();while(!![]){try{const _0x5faa2d=-parseInt(_0x111e43(0xdd))/0x1*(-parseInt(_0x111e43(0xe1))/0x2)+-parseInt(_0x111e43(0xdc))/0x3*(-parseInt(_0x111e43(0xdf))/0x4)+parseInt(_0x111e43(0xe2))/0x5+-parseInt(_0x111e43(0xd8))/0x6*(-parseInt(_0x111e43(0xd9))/0x7)+-parseInt(_0x111e43(0xe5))/0x8+-parseInt(_0x111e43(0xd7))/0x9*(parseInt(_0x111e43(0xda))/0xa)+parseInt(_0x111e43(0xe0))/0xb;if(_0x5faa2d===_0xfba2e2)break;else _0x5f4c61['push'](_0x5f4c61['shift']());}catch(_0x5304dc){_0x5f4c61['push'](_0x5f4c61['shift']());}}}(a48_0x58c9,0x478ae));function a48_0x7f1d(_0x1dcdeb,_0x5aeb8d){_0x1dcdeb=_0x1dcdeb-0xd7;const _0x58c926=a48_0x58c9();let _0x7f1d6=_0x58c926[_0x1dcdeb];return _0x7f1d6;}function a48_0x58c9(){const _0x375a17=['1KbmcwB','App\x20Code\x20cannot\x20be\x20empty','128agsqQs','4652604xXUnwo','207106wXjLjb','1955220iycgSf','trim','App\x20Code\x20cannot\x20exceed\x20100\x20characters','4592296OVYiqe','666dqOIdl','380496IvBtdE','14LuvELi','34950cjSDUq','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','7623WLuFPP'];a48_0x58c9=function(){return _0x375a17;};return a48_0x58c9();}export function validateAppcode(_0xac40ba){const _0xc2ca96=a48_0x7f1d,_0x3ee5f9=_0xac40ba[_0xc2ca96(0xe3)]();if(!_0x3ee5f9)return{'valid':![],'message':_0xc2ca96(0xde)};if(_0x3ee5f9['length']>0x64)return{'valid':![],'message':_0xc2ca96(0xe4)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x3ee5f9))return{'valid':![],'message':_0xc2ca96(0xdb)};return{'valid':!![]};}
1
+ (function(_0x9b3591,_0x3eaec0){const _0x47f0b3=a48_0x1ad0,_0x1a6117=_0x9b3591();while(!![]){try{const _0x5c8cee=parseInt(_0x47f0b3(0x91))/0x1+-parseInt(_0x47f0b3(0x8d))/0x2*(-parseInt(_0x47f0b3(0x88))/0x3)+-parseInt(_0x47f0b3(0x92))/0x4*(-parseInt(_0x47f0b3(0x90))/0x5)+-parseInt(_0x47f0b3(0x89))/0x6+parseInt(_0x47f0b3(0x95))/0x7*(-parseInt(_0x47f0b3(0x94))/0x8)+parseInt(_0x47f0b3(0x8e))/0x9+-parseInt(_0x47f0b3(0x8a))/0xa*(parseInt(_0x47f0b3(0x8b))/0xb);if(_0x5c8cee===_0x3eaec0)break;else _0x1a6117['push'](_0x1a6117['shift']());}catch(_0x2a4441){_0x1a6117['push'](_0x1a6117['shift']());}}}(a48_0x1ee6,0xace0d));export function validateAppcode(_0x114d27){const _0x1bc562=a48_0x1ad0,_0x4f69a5=_0x114d27[_0x1bc562(0x93)]();if(!_0x4f69a5)return{'valid':![],'message':_0x1bc562(0x8f)};if(_0x4f69a5['length']>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x4f69a5))return{'valid':![],'message':_0x1bc562(0x8c)};return{'valid':!![]};}function a48_0x1ad0(_0x463d6c,_0x16b127){_0x463d6c=_0x463d6c-0x88;const _0x1ee68=a48_0x1ee6();let _0x1ad058=_0x1ee68[_0x463d6c];return _0x1ad058;}function a48_0x1ee6(){const _0x26c4d4=['101540PiGxBq','8054199oNpxne','App\x20Code\x20cannot\x20be\x20empty','2710FPhfUo','519840yckQtX','3924AneBAy','trim','224qaeWQU','154819uKwrNl','42zDeJZq','4353054KggmJE','10EwwreN','6647729CXMoht','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'];a48_0x1ee6=function(){return _0x26c4d4;};return a48_0x1ee6();}
@@ -1 +1 @@
1
- const a49_0x2b1944=a49_0x2753;(function(_0x21f8ed,_0x4810b2){const _0x47cdeb=a49_0x2753,_0x101c0a=_0x21f8ed();while(!![]){try{const _0x530a65=parseInt(_0x47cdeb(0x7f))/0x1+parseInt(_0x47cdeb(0x92))/0x2+-parseInt(_0x47cdeb(0x88))/0x3+parseInt(_0x47cdeb(0x8d))/0x4*(-parseInt(_0x47cdeb(0x89))/0x5)+-parseInt(_0x47cdeb(0x91))/0x6*(-parseInt(_0x47cdeb(0x8a))/0x7)+parseInt(_0x47cdeb(0x8b))/0x8+-parseInt(_0x47cdeb(0x85))/0x9;if(_0x530a65===_0x4810b2)break;else _0x101c0a['push'](_0x101c0a['shift']());}catch(_0x584d38){_0x101c0a['push'](_0x101c0a['shift']());}}}(a49_0x3627,0xea4af));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a49_0x2753(_0x2ef2e8,_0x4963f7){_0x2ef2e8=_0x2ef2e8-0x7e;const _0x362780=a49_0x3627();let _0x2753aa=_0x362780[_0x2ef2e8];return _0x2753aa;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x458f60){const _0x546469=a49_0x2753,_0x46f86e=_0x458f60[_0x546469(0x7e)](_0x546469(0x8e));if(!_0x46f86e)throw CliErrors[_0x546469(0x83)](_0x546469(0x80),_0x546469(0x87)+CLI_BIN_NAME+_0x546469(0x90));const _0x3f4aef=readConfig(),_0x6d565a=_0x46f86e===_0x546469(0x8c)?_0x546469(0x82):_0x46f86e,_0x4585b2=_0x3f4aef[_0x6d565a];if(_0x4585b2===undefined)throw CliErrors[_0x546469(0x83)](_0x546469(0x8f)+_0x46f86e);return{'ok':!![],'data':typeof _0x4585b2==='object'?_0x4585b2:{[_0x6d565a]:_0x4585b2},'message':typeof _0x4585b2===_0x546469(0x84)?undefined:String(_0x4585b2)};}function a49_0x3627(){const _0x513120=['app','48RGNqNv','key','Key\x20not\x20found:\x20','\x20config\x20get\x20--key\x20<key>','685062HrQSkZ','1400112QcrhTA','str','143494tuZsPH','Missing\x20key.','read','appcode','validation','object','1240803TNJwMa','string','Usage:\x20','4596810IofEOi','163015WpQXAq','98LXNsPB','4632064lTXtLO'];a49_0x3627=function(){return _0x513120;};return a49_0x3627();}export const configGetDefinition={'service':'config','command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a49_0x2b1944(0x81),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a49_0x2b1944(0x8e),'type':a49_0x2b1944(0x86),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a49_0x58f36d=a49_0x3e71;(function(_0x44eb0b,_0x369ab5){const _0x59c20d=a49_0x3e71,_0x80722c=_0x44eb0b();while(!![]){try{const _0x3b0079=-parseInt(_0x59c20d(0xc9))/0x1+parseInt(_0x59c20d(0xca))/0x2+-parseInt(_0x59c20d(0xc2))/0x3*(parseInt(_0x59c20d(0xd0))/0x4)+-parseInt(_0x59c20d(0xc7))/0x5*(-parseInt(_0x59c20d(0xd4))/0x6)+-parseInt(_0x59c20d(0xc1))/0x7+-parseInt(_0x59c20d(0xd2))/0x8+parseInt(_0x59c20d(0xc8))/0x9;if(_0x3b0079===_0x369ab5)break;else _0x80722c['push'](_0x80722c['shift']());}catch(_0x1f9e63){_0x80722c['push'](_0x80722c['shift']());}}}(a49_0x5d5b,0xb2a51));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';function a49_0x3e71(_0x30399e,_0x48c943){_0x30399e=_0x30399e-0xbf;const _0x5d5b31=a49_0x5d5b();let _0x3e7194=_0x5d5b31[_0x30399e];return _0x3e7194;}function a49_0x5d5b(){const _0x29bb85=['12273336syHpKv','127953ppKRFv','2884376rvavCl','Get\x20a\x20config\x20value\x20by\x20key','validation','app','Usage:\x20','get','2022916vCGSTv','appcode','5462144SslfKo','read','246YhuvzB','Missing\x20key.','string','5524694HUkgsV','3AeOOyo','\x20config\x20get\x20--key\x20<key>','key','config','str','3845uEYnOS'];a49_0x5d5b=function(){return _0x29bb85;};return a49_0x5d5b();}async function execute(_0x471d61){const _0x3edb5e=a49_0x3e71,_0x55f462=_0x471d61[_0x3edb5e(0xc6)](_0x3edb5e(0xc4));if(!_0x55f462)throw CliErrors[_0x3edb5e(0xcc)](_0x3edb5e(0xbf),_0x3edb5e(0xce)+CLI_BIN_NAME+_0x3edb5e(0xc3));const _0x18da1f=readConfig(),_0x398e14=_0x55f462===_0x3edb5e(0xcd)?_0x3edb5e(0xd1):_0x55f462,_0x15b379=_0x18da1f[_0x398e14];if(_0x15b379===undefined)throw CliErrors[_0x3edb5e(0xcc)]('Key\x20not\x20found:\x20'+_0x55f462);return{'ok':!![],'data':typeof _0x15b379==='object'?_0x15b379:{[_0x398e14]:_0x15b379},'message':typeof _0x15b379==='object'?undefined:String(_0x15b379)};}export const configGetDefinition={'service':a49_0x58f36d(0xc5),'command':a49_0x58f36d(0xcf),'description':a49_0x58f36d(0xcb),'risk':a49_0x58f36d(0xd3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a49_0x58f36d(0xc4),'type':a49_0x58f36d(0xc0),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x12f5b2,_0x33bacc){const _0x7d6b61=a50_0x2ac8,_0x641206=_0x12f5b2();while(!![]){try{const _0x2cf7ca=parseInt(_0x7d6b61(0xe8))/0x1+parseInt(_0x7d6b61(0xe0))/0x2+parseInt(_0x7d6b61(0xe4))/0x3*(parseInt(_0x7d6b61(0xe1))/0x4)+parseInt(_0x7d6b61(0xe5))/0x5+-parseInt(_0x7d6b61(0xe7))/0x6+-parseInt(_0x7d6b61(0xe3))/0x7+parseInt(_0x7d6b61(0xe2))/0x8*(-parseInt(_0x7d6b61(0xe6))/0x9);if(_0x2cf7ca===_0x33bacc)break;else _0x641206['push'](_0x641206['shift']());}catch(_0x1b80d8){_0x641206['push'](_0x641206['shift']());}}}(a50_0x2438,0xc8ea6));import{configListDefinition}from'../../commands/config/list.js';function a50_0x2438(){const _0x309a65=['8990256jcUpxB','461604RWZCFQ','420874ZaBxcN','4csUMtq','1990424NZigVc','1118796JMDSQS','4492749jIVRtB','2801665NtkGei','9mObgXQ'];a50_0x2438=function(){return _0x309a65;};return a50_0x2438();}function a50_0x2ac8(_0x406d6d,_0x32fae9){_0x406d6d=_0x406d6d-0xe0;const _0x2438cc=a50_0x2438();let _0x2ac84f=_0x2438cc[_0x406d6d];return _0x2ac84f;}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ (function(_0x30446b,_0x31237b){const _0x2ca4b0=a50_0x4e54,_0x562020=_0x30446b();while(!![]){try{const _0x4cadc2=-parseInt(_0x2ca4b0(0x9a))/0x1*(parseInt(_0x2ca4b0(0xa3))/0x2)+parseInt(_0x2ca4b0(0x9f))/0x3*(-parseInt(_0x2ca4b0(0xa2))/0x4)+parseInt(_0x2ca4b0(0x9d))/0x5*(-parseInt(_0x2ca4b0(0xa5))/0x6)+parseInt(_0x2ca4b0(0x9c))/0x7+-parseInt(_0x2ca4b0(0xa1))/0x8+parseInt(_0x2ca4b0(0x9b))/0x9*(-parseInt(_0x2ca4b0(0x9e))/0xa)+parseInt(_0x2ca4b0(0xa0))/0xb*(parseInt(_0x2ca4b0(0xa4))/0xc);if(_0x4cadc2===_0x31237b)break;else _0x562020['push'](_0x562020['shift']());}catch(_0x38a9e2){_0x562020['push'](_0x562020['shift']());}}}(a50_0x2c5a,0x7a02a));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a50_0x2c5a(){const _0x53939d=['2NWBLtb','48MvhQOg','102rTLoan','204731xFjHNm','9jsHEXs','566832vzJBgn','127235IloIOQ','6244870vPwewx','1578trouFv','6397666NKbkOy','373720NMkLkr','4556fTHBxF'];a50_0x2c5a=function(){return _0x53939d;};return a50_0x2c5a();}function a50_0x4e54(_0x450c76,_0x49b95e){_0x450c76=_0x450c76-0x9a;const _0x2c5acb=a50_0x2c5a();let _0x4e5472=_0x2c5acb[_0x450c76];return _0x4e5472;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- const a51_0x210777=a51_0x46b9;(function(_0x1784b6,_0x146f77){const _0x537978=a51_0x46b9,_0x3cd51d=_0x1784b6();while(!![]){try{const _0x30a10c=-parseInt(_0x537978(0xbf))/0x1*(-parseInt(_0x537978(0xcd))/0x2)+parseInt(_0x537978(0xca))/0x3*(parseInt(_0x537978(0xc6))/0x4)+parseInt(_0x537978(0xc8))/0x5*(parseInt(_0x537978(0xc5))/0x6)+-parseInt(_0x537978(0xc4))/0x7+-parseInt(_0x537978(0xcc))/0x8*(-parseInt(_0x537978(0xc3))/0x9)+parseInt(_0x537978(0xcf))/0xa+-parseInt(_0x537978(0xc7))/0xb;if(_0x30a10c===_0x146f77)break;else _0x3cd51d['push'](_0x3cd51d['shift']());}catch(_0x1f971d){_0x3cd51d['push'](_0x3cd51d['shift']());}}}(a51_0x51ac,0x1fc48));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x2873e9){const _0x504337=a51_0x46b9,_0x53fac2=_0x2873e9[_0x504337(0xc9)]('global')?readScopedConfig(_0x504337(0xc2)):readConfig();return{'ok':!![],'data':_0x53fac2};}function a51_0x46b9(_0x135220,_0x3c8076){_0x135220=_0x135220-0xbf;const _0x51aca0=a51_0x51ac();let _0x46b925=_0x51aca0[_0x135220];return _0x46b925;}export const configListDefinition={'service':a51_0x210777(0xcb),'command':a51_0x210777(0xc1),'description':a51_0x210777(0xc0),'risk':a51_0x210777(0xce),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':a51_0x210777(0xd0),'description':a51_0x210777(0xd1),'default':![]}],'execute':execute};function a51_0x51ac(){const _0x337daa=['boolean','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','257kLAmrs','List\x20all\x20config\x20values','list','global','9wjKjud','1231447ybwPve','19602OUPbOZ','957564VyXazi','4719880ZpLqvT','45HRjVNY','bool','3qVhtJr','config','958368jJQMuQ','1642BzKtdm','read','1355340EGZQes'];a51_0x51ac=function(){return _0x337daa;};return a51_0x51ac();}
1
+ const a51_0x49ce4e=a51_0x4cb0;(function(_0x22b344,_0x574c72){const _0x2dda8a=a51_0x4cb0,_0x361ecb=_0x22b344();while(!![]){try{const _0x20ba62=parseInt(_0x2dda8a(0x15a))/0x1*(-parseInt(_0x2dda8a(0x14f))/0x2)+-parseInt(_0x2dda8a(0x155))/0x3+-parseInt(_0x2dda8a(0x151))/0x4+-parseInt(_0x2dda8a(0x157))/0x5*(parseInt(_0x2dda8a(0x15b))/0x6)+parseInt(_0x2dda8a(0x159))/0x7*(-parseInt(_0x2dda8a(0x153))/0x8)+-parseInt(_0x2dda8a(0x150))/0x9+parseInt(_0x2dda8a(0x152))/0xa;if(_0x20ba62===_0x574c72)break;else _0x361ecb['push'](_0x361ecb['shift']());}catch(_0x40c3a5){_0x361ecb['push'](_0x361ecb['shift']());}}}(a51_0x30f8,0xdc1a2));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x17a215){const _0x33de56=a51_0x4cb0,_0xb6c18e=_0x17a215['bool'](_0x33de56(0x154))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0xb6c18e};}function a51_0x4cb0(_0x5edcfa,_0x51722f){_0x5edcfa=_0x5edcfa-0x14f;const _0x30f8b7=a51_0x30f8();let _0x4cb0a9=_0x30f8b7[_0x5edcfa];return _0x4cb0a9;}function a51_0x30f8(){const _0x2d1160=['1580482OZJesB','16161597euHQPE','6590308ZozTex','84374550UtNeWE','8YQWrFb','global','3435021pKlvVT','config','480545uQjRYK','read','7028357MJCGKq','1hqtxpb','72NWOOiq'];a51_0x30f8=function(){return _0x2d1160;};return a51_0x30f8();}export const configListDefinition={'service':a51_0x49ce4e(0x156),'command':'list','description':'List\x20all\x20config\x20values','risk':a51_0x49ce4e(0x158),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x49ce4e(0x154),'type':'boolean','description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};