@lovrabet/rabetbase-cli 2.3.15-beta.1 → 2.3.15-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) 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/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/rename.js +1 -0
  113. package/lib/commands/menu/shared/compare-table.js +1 -1
  114. package/lib/commands/menu/shared/delete-plan.js +1 -1
  115. package/lib/commands/menu/shared/facts.js +1 -1
  116. package/lib/commands/menu/shared/index.js +1 -1
  117. package/lib/commands/menu/shared/inquirer.js +1 -1
  118. package/lib/commands/menu/shared/local-pages.js +1 -1
  119. package/lib/commands/menu/shared/logic.js +1 -1
  120. package/lib/commands/menu/shared/mutations.js +1 -1
  121. package/lib/commands/menu/shared/service.js +1 -1
  122. package/lib/commands/menu/shared/sync-core.js +1 -1
  123. package/lib/commands/menu/shared/update-core.js +1 -1
  124. package/lib/commands/menu/shared/valid-url.js +1 -1
  125. package/lib/commands/menu/sync.js +1 -1
  126. package/lib/commands/notification/config-list.js +1 -1
  127. package/lib/commands/notification/index.js +1 -1
  128. package/lib/commands/ocr/index.js +1 -1
  129. package/lib/commands/page/generate-start.js +1 -1
  130. package/lib/commands/page/generate-status.js +1 -1
  131. package/lib/commands/page/index.js +1 -1
  132. package/lib/commands/page/pull.js +1 -1
  133. package/lib/commands/page/push.js +1 -1
  134. package/lib/commands/page/relation-audit.js +1 -1
  135. package/lib/commands/page/restore.js +1 -1
  136. package/lib/commands/page/shared.js +1 -1
  137. package/lib/commands/page/standard-page-status.js +1 -1
  138. package/lib/commands/page/sync.js +1 -1
  139. package/lib/commands/permit/index.js +1 -1
  140. package/lib/commands/permit/page-get.js +1 -1
  141. package/lib/commands/permit/page-set.js +1 -1
  142. package/lib/commands/permit/role-apis-set.js +1 -1
  143. package/lib/commands/permit/role-menus-set.js +1 -1
  144. package/lib/commands/permit/role-menus.js +1 -1
  145. package/lib/commands/permit/shared.js +1 -1
  146. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  147. package/lib/commands/project/create/format-elapsed.js +1 -1
  148. package/lib/commands/project/create/main.js +1 -1
  149. package/lib/commands/project/create/non-interactive.js +1 -1
  150. package/lib/commands/project/create/project-template-path.js +1 -1
  151. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  152. package/lib/commands/project/create/use-format-code.js +1 -1
  153. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  154. package/lib/commands/project/index.js +1 -1
  155. package/lib/commands/project/init.js +1 -1
  156. package/lib/commands/project/upgrade.js +1 -1
  157. package/lib/commands/registry.js +1 -1
  158. package/lib/commands/role/create.js +1 -1
  159. package/lib/commands/role/delete.js +1 -1
  160. package/lib/commands/role/detail.js +1 -1
  161. package/lib/commands/role/index.js +1 -1
  162. package/lib/commands/role/list.js +1 -1
  163. package/lib/commands/role/shared.js +1 -1
  164. package/lib/commands/role/update.js +1 -1
  165. package/lib/commands/role/user-add.js +1 -1
  166. package/lib/commands/role/user-remove.js +1 -1
  167. package/lib/commands/role/user-resolve.js +1 -1
  168. package/lib/commands/run/index.js +1 -1
  169. package/lib/commands/schema.js +1 -1
  170. package/lib/commands/sql/create.js +1 -1
  171. package/lib/commands/sql/delete.js +1 -1
  172. package/lib/commands/sql/detail.js +1 -1
  173. package/lib/commands/sql/exec.js +1 -1
  174. package/lib/commands/sql/index.js +1 -1
  175. package/lib/commands/sql/list.js +1 -1
  176. package/lib/commands/sql/pull.js +1 -1
  177. package/lib/commands/sql/push.js +1 -1
  178. package/lib/commands/sql/save.js +1 -1
  179. package/lib/commands/sql/shared.js +1 -1
  180. package/lib/commands/sql/status.js +1 -1
  181. package/lib/commands/sql/validate.js +1 -1
  182. package/lib/commands/task/index.js +1 -1
  183. package/lib/commands/task/status.js +1 -1
  184. package/lib/commands/workspace/add.js +1 -1
  185. package/lib/commands/workspace/index.js +1 -1
  186. package/lib/commands/workspace/remove.js +1 -1
  187. package/lib/config/schema.js +1 -1
  188. package/lib/constant/cdn.js +1 -1
  189. package/lib/constant/cli.js +1 -1
  190. package/lib/constant/defaults.js +1 -1
  191. package/lib/constant/domain.js +1 -1
  192. package/lib/constant/env.js +1 -1
  193. package/lib/constant/output.js +1 -1
  194. package/lib/constant/paths.js +1 -1
  195. package/lib/constant/risk.js +1 -1
  196. package/lib/context/app-resolver.js +1 -1
  197. package/lib/context/auth-resolver.js +1 -1
  198. package/lib/context/config-loader.js +1 -1
  199. package/lib/context.js +1 -1
  200. package/lib/core/alias-resolver.js +1 -1
  201. package/lib/core/api-client.js +1 -1
  202. package/lib/core/bff/config.js +1 -1
  203. package/lib/core/bff/file-system.js +1 -1
  204. package/lib/core/bff/hash.js +1 -1
  205. package/lib/core/bff/lock.js +1 -1
  206. package/lib/core/bff/utils.js +1 -1
  207. package/lib/core/db-resolver.js +1 -1
  208. package/lib/core/page/file-system.js +1 -1
  209. package/lib/core/page/hash.js +1 -1
  210. package/lib/core/page/lock.js +1 -1
  211. package/lib/core/sql-index-auditor.js +1 -1
  212. package/lib/core/sql-sync/config.js +1 -1
  213. package/lib/core/sql-sync/file-system.js +1 -1
  214. package/lib/core/sql-sync/hash.js +1 -1
  215. package/lib/core/sql-sync/lock.js +1 -1
  216. package/lib/core/sql-sync/utils.js +1 -1
  217. package/lib/core/sql-validator.js +1 -1
  218. package/lib/errors.js +1 -1
  219. package/lib/framework/build-all-flags.js +1 -1
  220. package/lib/framework/error-output.js +1 -1
  221. package/lib/framework/explicit-yes.js +1 -1
  222. package/lib/framework/flags.js +1 -1
  223. package/lib/framework/help.js +1 -1
  224. package/lib/framework/index.js +1 -1
  225. package/lib/framework/output.js +1 -1
  226. package/lib/framework/response.js +1 -1
  227. package/lib/framework/runner-alias.js +1 -1
  228. package/lib/framework/runner.js +1 -1
  229. package/lib/framework/schema-export.js +1 -1
  230. package/lib/framework/types.js +1 -1
  231. package/lib/generated/build-info.js +1 -1
  232. package/lib/help.js +1 -1
  233. package/lib/skills/main.js +1 -1
  234. package/lib/skills/npx-skills-add.js +1 -1
  235. package/lib/telemetry/cli-command-trace.js +1 -1
  236. package/lib/telemetry/cli-help-trace.js +1 -1
  237. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  238. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  239. package/lib/telemetry/send-cli-trace-log.js +1 -1
  240. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  241. package/lib/utils/ai_config.js +1 -1
  242. package/lib/utils/apply-jq-filter.js +1 -1
  243. package/lib/utils/cdn-config.js +1 -1
  244. package/lib/utils/check-sdk-version.js +1 -1
  245. package/lib/utils/cli-version-check.js +1 -1
  246. package/lib/utils/cli-version-policy.js +1 -1
  247. package/lib/utils/config.js +1 -1
  248. package/lib/utils/copy-directory.js +1 -1
  249. package/lib/utils/entity-with-id.js +1 -1
  250. package/lib/utils/file-utils.js +1 -1
  251. package/lib/utils/guides-cdn.js +1 -1
  252. package/lib/utils/http-client.js +1 -1
  253. package/lib/utils/is-non-interactive.js +1 -1
  254. package/lib/utils/logger.js +1 -1
  255. package/lib/utils/params.js +1 -1
  256. package/lib/utils/platform.js +1 -1
  257. package/lib/utils/rules-cdn.js +1 -1
  258. package/lib/utils/sleep.js +1 -1
  259. package/lib/utils/template-replacer.js +1 -1
  260. package/lib/utils/update-notice.js +1 -1
  261. package/lib/utils/version.js +1 -1
  262. package/lib/utils/with-active-cookie.js +1 -1
  263. package/lib/utils/write-cli-side-channel.js +1 -1
  264. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x44f73c=a36_0x5213;(function(_0x4eb81b,_0x5f48d6){const _0x3b90f6=a36_0x5213,_0x1948d1=_0x4eb81b();while(!![]){try{const _0x16859b=parseInt(_0x3b90f6(0xeb))/0x1*(-parseInt(_0x3b90f6(0xd1))/0x2)+parseInt(_0x3b90f6(0xdb))/0x3+-parseInt(_0x3b90f6(0x113))/0x4*(-parseInt(_0x3b90f6(0xf9))/0x5)+-parseInt(_0x3b90f6(0xdf))/0x6+parseInt(_0x3b90f6(0xd4))/0x7*(-parseInt(_0x3b90f6(0x105))/0x8)+-parseInt(_0x3b90f6(0xd7))/0x9+parseInt(_0x3b90f6(0xfb))/0xa*(parseInt(_0x3b90f6(0xdc))/0xb);if(_0x16859b===_0x5f48d6)break;else _0x1948d1['push'](_0x1948d1['shift']());}catch(_0x5e2c7d){_0x1948d1['push'](_0x1948d1['shift']());}}}(a36_0x482d,0xcca7a));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a36_0x482d(){const _0x4a3f0a=['scriptContent','COMMON','force','bool','Pull\x20complete:\x20','includes','lockKey','map','utf8','Force\x20overwrite\x20local\x20unsynced\x20changes','\x22\x20not\x20found\x20after\x20ensureLockScope.','25481jDQnUd','apiDir','HOOK','would_pull','Remote\x20script\x20missing\x20content.','alias','\x20skipped,\x20','ENDPOINT','all','apps','toLowerCase','type','message','functions','24435QZELYP','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','4123520IEtZrp','Remote\x20script\x20missing\x20id.','yes','&type=','local\x20unsynced\x20changes','conflict','trim','Would\x20inspect\x20','length','filePath','16RxyQVm','Pull\x20only\x20this\x20script\x20type','scriptType','hash','skipped','close','operationType','appCode','question','pull','functionNode','\x20failed','stdin','push','4ASNJkR','Force\x20pull\x20cancelled.','stringify','str','hookLocation','datasetCode','No\x20remote\x20BFF\x20scripts\x20found.','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','lastSync','22tztldg','cancelled','unresolvable\x20target\x20path','1830577XwbXBN','write','lockFilePath','12278493mPdUQD','nonInteractive','/api/management/library/scripts/list?appCode=','scriptsRoot','2107860HikkUc','77LZFNWq','functionName','\x20remote\x20BFF\x20script(s)\x20for\x20pull','3528690VrueEW'];a36_0x482d=function(){return _0x4a3f0a;};return a36_0x482d();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a36_0x44f73c(0x10e),'description':a36_0x44f73c(0xfa),'risk':a36_0x44f73c(0xd5),'flags':[{'name':a36_0x44f73c(0xf6),'type':'string','description':a36_0x44f73c(0x106),'enum':[a36_0x44f73c(0xe1),a36_0x44f73c(0xf2),a36_0x44f73c(0xed)]},{'name':a36_0x44f73c(0xe2),'type':'boolean','description':a36_0x44f73c(0xe9)}],async 'dryRun'(_0x1d82ed){const _0x546025=a36_0x44f73c,_0x3e66fc=loadBffProjectConfig(_0x1d82ed['appCode']),_0x5cbade=await readBffLockFile(_0x3e66fc[_0x546025(0xd6)]),{appLock:_0x37c065}=ensureLockScope(_0x5cbade??createEmptyBffLock(),_0x1d82ed[_0x546025(0x10c)],_0x3e66fc[_0x546025(0xda)],_0x546025(0x10e)),_0x392b3c=normalizeBffType(_0x1d82ed[_0x546025(0xcb)](_0x546025(0xf6)))??undefined,_0x140682=buildDatasetCodeToAliasMap(_0x1d82ed[_0x546025(0xec)],_0x1d82ed['appCode']),[_0x5c2fe9,_0x304a70]=await Promise[_0x546025(0xf3)]([listBffScripts(_0x1d82ed[_0x546025(0x10c)],_0x392b3c),getBffScriptStatistics(_0x1d82ed['appCode'])]),_0x15b761=createHookLocationMap(_0x304a70),_0x5b1343=[];for(const _0xf84d82 of _0x5c2fe9){const _0x40eff9=resolveRemoteScriptTarget(_0x3e66fc,_0xf84d82,_0x15b761,_0x37c065[_0x546025(0xf8)],_0x140682);if(!_0x40eff9){_0x5b1343[_0x546025(0x112)]({'scriptType':_0xf84d82['scriptType'],'functionName':_0xf84d82[_0x546025(0xdd)]??'','status':_0x546025(0x109),'reason':_0x546025(0xd3)});continue;}const _0x171617=_0x37c065[_0x546025(0xf8)][_0x40eff9['lockKey']],_0x320cbd=_0xf84d82[_0x546025(0xe0)]!=null?computeContentHash(_0xf84d82[_0x546025(0xe0)]):undefined,_0x282502=await hasUnsyncedLocalChanges(_0x40eff9['filePath'],_0x171617,_0x320cbd);_0x5b1343['push']({'lockKey':_0x40eff9['lockKey'],'filePath':_0x40eff9[_0x546025(0x104)],'remoteId':_0xf84d82['id']??null,'status':_0x282502?_0x546025(0x100):_0x546025(0xee)});}return{'method':'GET','url':_0x546025(0xd9)+_0x1d82ed['appCode']+(_0x392b3c?_0x546025(0xfe)+_0x392b3c:''),'body':{'appCode':_0x1d82ed[_0x546025(0x10c)],'filterType':_0x392b3c??null,'files':_0x5b1343},'description':_0x546025(0x102)+_0x5b1343[_0x546025(0x103)]+_0x546025(0xde)};},async 'execute'(_0x169fdb){const _0x32fdd3=a36_0x44f73c,_0x512cd3=loadBffProjectConfig(_0x169fdb[_0x32fdd3(0x10c)]),_0x2fd807=await readBffLockFile(_0x512cd3[_0x32fdd3(0xd6)]),{lockData:_0x45d59b,appLock:_0x3f97f3}=ensureLockScope(_0x2fd807??createEmptyBffLock(),_0x169fdb['appCode'],_0x512cd3[_0x32fdd3(0xda)],_0x32fdd3(0x10e)),_0x6fc702=normalizeBffType(_0x169fdb['str'](_0x32fdd3(0xf6)))??undefined;if(_0x169fdb['str'](_0x32fdd3(0xf6))&&!_0x6fc702)throw CliErrors['validation'](_0x32fdd3(0xcf));const [_0x1b6754,_0x2f1d99]=await Promise[_0x32fdd3(0xf3)]([listBffScripts(_0x169fdb[_0x32fdd3(0x10c)],_0x6fc702),getBffScriptStatistics(_0x169fdb[_0x32fdd3(0x10c)])]);if(_0x1b6754[_0x32fdd3(0x103)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x32fdd3(0xce)};const _0x107d20=_0x169fdb[_0x32fdd3(0xe3)](_0x32fdd3(0xe2));if(_0x107d20&&!_0x169fdb[_0x32fdd3(0xd8)]){const _0x555d6b=await confirmForce();if(!_0x555d6b)throw CliErrors[_0x32fdd3(0xd2)](_0x32fdd3(0x114));}if(_0x107d20&&_0x169fdb['nonInteractive']){}const _0x1a8509=buildDatasetCodeToAliasMap(_0x169fdb[_0x32fdd3(0xec)],_0x169fdb[_0x32fdd3(0x10c)]),_0x39810f=createHookLocationMap(_0x2f1d99),_0x29ac6d=JSON['parse'](JSON[_0x32fdd3(0xca)](_0x45d59b)),_0x480a79=_0x169fdb['appCode'],_0x16b631=_0x29ac6d[_0x32fdd3(0xf4)][_0x480a79];if(!_0x16b631)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x480a79+_0x32fdd3(0xea));const _0x14b7f3=[],_0x5e8e29=[],_0x59a6ea=[];for(const _0x27ff9b of _0x1b6754){const _0x1b497f=resolveRemoteScriptTarget(_0x512cd3,_0x27ff9b,_0x39810f,_0x3f97f3[_0x32fdd3(0xf8)],_0x1a8509);if(!_0x1b497f){_0x5e8e29[_0x32fdd3(0x112)]({'lockKey':_0x27ff9b[_0x32fdd3(0x107)]+'/'+_0x27ff9b[_0x32fdd3(0xdd)],'reason':_0x32fdd3(0xd3)});continue;}const _0x9ac62=_0x3f97f3[_0x32fdd3(0xf8)][_0x1b497f['lockKey']];try{if(!_0x27ff9b['id'])throw new Error(_0x32fdd3(0xfc));if(_0x27ff9b['scriptContent']==null)throw new Error(_0x32fdd3(0xef));const _0x266b36=_0x27ff9b[_0x32fdd3(0xe0)],_0xed31e0=computeContentHash(_0x266b36);if(!_0x107d20){const _0x47a165=await hasUnsyncedLocalChanges(_0x1b497f[_0x32fdd3(0x104)],_0x9ac62,_0xed31e0);if(_0x47a165){_0x5e8e29[_0x32fdd3(0x112)]({'lockKey':_0x1b497f[_0x32fdd3(0xe6)],'reason':_0x32fdd3(0xff)});continue;}}await ensureParentDirectory(_0x1b497f['filePath']),await writeFile(_0x1b497f[_0x32fdd3(0x104)],_0x266b36,_0x32fdd3(0xe8));const _0x53c14c={'hash':_0xed31e0,'remoteId':_0x27ff9b['id'],'version':_0x27ff9b['version']};_0x1b497f[_0x32fdd3(0xf6)]===_0x32fdd3(0xed)&&_0x1b497f['hookLocation']&&(_0x53c14c['alias']=_0x1b497f[_0x32fdd3(0xcc)][_0x32fdd3(0xf0)],_0x53c14c[_0x32fdd3(0xcd)]=_0x1b497f[_0x32fdd3(0xcc)]['datasetCode'],_0x53c14c['operationType']=_0x1b497f[_0x32fdd3(0xcc)][_0x32fdd3(0x10b)],_0x53c14c[_0x32fdd3(0x10f)]=_0x1b497f['hookLocation']['functionNode']),_0x16b631[_0x32fdd3(0xf8)][_0x1b497f[_0x32fdd3(0xe6)]]=_0x53c14c,_0x14b7f3[_0x32fdd3(0x112)]({'lockKey':_0x1b497f['lockKey'],'remoteId':_0x27ff9b['id']});}catch(_0x3152ec){_0x59a6ea[_0x32fdd3(0x112)]({'lockKey':_0x1b497f[_0x32fdd3(0xe6)],'error':_0x3152ec instanceof Error?_0x3152ec[_0x32fdd3(0xf7)]:String(_0x3152ec)});}}return _0x16b631[_0x32fdd3(0xd0)]=new Date()['toISOString'](),await writeBffLockFile(_0x512cd3[_0x32fdd3(0xd6)],_0x29ac6d),{'ok':_0x59a6ea[_0x32fdd3(0x103)]===0x0,'data':{'pulled':_0x14b7f3,'skipped':_0x5e8e29,'failed':_0x59a6ea},'message':_0x32fdd3(0xe4)+_0x14b7f3[_0x32fdd3(0x103)]+'\x20pulled,\x20'+_0x5e8e29['length']+_0x32fdd3(0xf1)+_0x59a6ea[_0x32fdd3(0x103)]+_0x32fdd3(0x110)};}};async function hasUnsyncedLocalChanges(_0x5483fc,_0x2eb72e,_0x474acf){const _0x27425f=a36_0x44f73c;if(!await fileExists(_0x5483fc))return![];const _0x31adfc=await computeFileHash(_0x5483fc);if(!_0x2eb72e)return _0x474acf?_0x31adfc!==_0x474acf:!![];return _0x31adfc!==_0x2eb72e[_0x27425f(0x108)];}function a36_0x5213(_0x9d049e,_0x453c47){_0x9d049e=_0x9d049e-0xca;const _0x482d50=a36_0x482d();let _0x52139d=_0x482d50[_0x9d049e];return _0x52139d;}function buildDatasetCodeToAliasMap(_0x5d3269,_0x5f3ea5){const _0x4cff3f=a36_0x44f73c,_0x414174=loadAliasMap(_0x5d3269,undefined,resolveApiFilePath(_0x5d3269,_0x5f3ea5));return new Map(_0x414174[_0x4cff3f(0xe7)](_0x512591=>[_0x512591[_0x4cff3f(0xcd)],_0x512591['alias']]));}async function confirmForce(){const _0x41fd7e=a36_0x44f73c,_0x22c720=createInterface({'input':process[_0x41fd7e(0x111)],'output':process['stderr']}),_0x13fbda=await new Promise(_0x2ef2ea=>{const _0x268420=_0x41fd7e;_0x22c720[_0x268420(0x10d)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x2ef2ea);});return _0x22c720[_0x41fd7e(0x10a)](),['y',_0x41fd7e(0xfd)][_0x41fd7e(0xe5)](_0x13fbda[_0x41fd7e(0x101)]()[_0x41fd7e(0xf5)]());}
1
+ const a36_0x1bad75=a36_0x2732;(function(_0x3d37b3,_0x269b28){const _0x31491c=a36_0x2732,_0x4a9c3b=_0x3d37b3();while(!![]){try{const _0x4f70f7=-parseInt(_0x31491c(0x1c7))/0x1+parseInt(_0x31491c(0x1aa))/0x2+parseInt(_0x31491c(0x1a8))/0x3*(parseInt(_0x31491c(0x1da))/0x4)+parseInt(_0x31491c(0x1d4))/0x5+-parseInt(_0x31491c(0x1d2))/0x6*(parseInt(_0x31491c(0x1d8))/0x7)+parseInt(_0x31491c(0x1b2))/0x8+parseInt(_0x31491c(0x1d0))/0x9;if(_0x4f70f7===_0x269b28)break;else _0x4a9c3b['push'](_0x4a9c3b['shift']());}catch(_0x929e8a){_0x4a9c3b['push'](_0x4a9c3b['shift']());}}}(a36_0x47be,0x7f5e9));function a36_0x47be(){const _0x31588f=['yes','local\x20unsynced\x20changes','alias','boolean','No\x20remote\x20BFF\x20scripts\x20found.','unresolvable\x20target\x20path','toLowerCase','scriptContent','\x20pulled,\x20','stringify','filePath','question','&type=','map','lockFilePath','str','993430XzIGwd','force','lastSync','COMMON','push','length','Pull\x20complete:\x20','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','parse','4771242EuqjsI','Force\x20pull\x20cancelled.','644994kYmXVK','version','418025iWyGRp','GET','Pull\x20only\x20this\x20script\x20type','functions','49dAELcq','toISOString','12CkAvEk','hookLocation','HOOK','bff','bool','message','Remote\x20script\x20missing\x20id.','nonInteractive','\x20failed','Force\x20overwrite\x20local\x20unsynced\x20changes','datasetCode','apps','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','lockKey','string','would_pull','ENDPOINT','functionNode','close','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','all','701082MstQcR','functionName','1747886RODUos','stderr','scriptType','type','utf8','validation','appCode','pull','630880WljavO','stdin','operationType','skipped','write'];a36_0x47be=function(){return _0x31588f;};return a36_0x47be();}import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x1bad75(0x1dd),'command':'pull','description':a36_0x1bad75(0x19f),'risk':a36_0x1bad75(0x1b6),'flags':[{'name':'type','type':a36_0x1bad75(0x1a1),'description':a36_0x1bad75(0x1d6),'enum':[a36_0x1bad75(0x1ca),a36_0x1bad75(0x1a3),a36_0x1bad75(0x1dc)]},{'name':'force','type':a36_0x1bad75(0x1ba),'description':a36_0x1bad75(0x1e3)}],async 'dryRun'(_0x577745){const _0x3ca20d=a36_0x1bad75,_0x4e829a=loadBffProjectConfig(_0x577745['appCode']),_0xedd1b8=await readBffLockFile(_0x4e829a[_0x3ca20d(0x1c5)]),{appLock:_0x438955}=ensureLockScope(_0xedd1b8??createEmptyBffLock(),_0x577745[_0x3ca20d(0x1b0)],_0x4e829a['scriptsRoot'],_0x3ca20d(0x1b1)),_0x19dba3=normalizeBffType(_0x577745['str']('type'))??undefined,_0x8f3b5f=buildDatasetCodeToAliasMap(_0x577745['apiDir'],_0x577745[_0x3ca20d(0x1b0)]),[_0x580b0c,_0x1a4552]=await Promise[_0x3ca20d(0x1a7)]([listBffScripts(_0x577745['appCode'],_0x19dba3),getBffScriptStatistics(_0x577745[_0x3ca20d(0x1b0)])]),_0xc64589=createHookLocationMap(_0x1a4552),_0x345586=[];for(const _0x4a9aaf of _0x580b0c){const _0x212968=resolveRemoteScriptTarget(_0x4e829a,_0x4a9aaf,_0xc64589,_0x438955[_0x3ca20d(0x1d7)],_0x8f3b5f);if(!_0x212968){_0x345586[_0x3ca20d(0x1cb)]({'scriptType':_0x4a9aaf[_0x3ca20d(0x1ac)],'functionName':_0x4a9aaf['functionName']??'','status':_0x3ca20d(0x1b5),'reason':_0x3ca20d(0x1bc)});continue;}const _0x161ab7=_0x438955[_0x3ca20d(0x1d7)][_0x212968['lockKey']],_0x556f26=_0x4a9aaf['scriptContent']!=null?computeContentHash(_0x4a9aaf[_0x3ca20d(0x1be)]):undefined,_0x372c5e=await hasUnsyncedLocalChanges(_0x212968[_0x3ca20d(0x1c1)],_0x161ab7,_0x556f26);_0x345586[_0x3ca20d(0x1cb)]({'lockKey':_0x212968[_0x3ca20d(0x1a0)],'filePath':_0x212968[_0x3ca20d(0x1c1)],'remoteId':_0x4a9aaf['id']??null,'status':_0x372c5e?'conflict':_0x3ca20d(0x1a2)});}return{'method':_0x3ca20d(0x1d5),'url':'/api/management/library/scripts/list?appCode='+_0x577745[_0x3ca20d(0x1b0)]+(_0x19dba3?_0x3ca20d(0x1c3)+_0x19dba3:''),'body':{'appCode':_0x577745[_0x3ca20d(0x1b0)],'filterType':_0x19dba3??null,'files':_0x345586},'description':'Would\x20inspect\x20'+_0x345586[_0x3ca20d(0x1cc)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x42786a){const _0x49da5e=a36_0x1bad75,_0xce2345=loadBffProjectConfig(_0x42786a[_0x49da5e(0x1b0)]),_0xd26a05=await readBffLockFile(_0xce2345[_0x49da5e(0x1c5)]),{lockData:_0xe524c7,appLock:_0xc5cc21}=ensureLockScope(_0xd26a05??createEmptyBffLock(),_0x42786a['appCode'],_0xce2345['scriptsRoot'],'pull'),_0x5716a9=normalizeBffType(_0x42786a['str'](_0x49da5e(0x1ad)))??undefined;if(_0x42786a[_0x49da5e(0x1c6)](_0x49da5e(0x1ad))&&!_0x5716a9)throw CliErrors[_0x49da5e(0x1af)](_0x49da5e(0x1a6));const [_0x4fc399,_0x141cba]=await Promise[_0x49da5e(0x1a7)]([listBffScripts(_0x42786a['appCode'],_0x5716a9),getBffScriptStatistics(_0x42786a[_0x49da5e(0x1b0)])]);if(_0x4fc399[_0x49da5e(0x1cc)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x49da5e(0x1bb)};const _0x4c1f56=_0x42786a[_0x49da5e(0x1de)](_0x49da5e(0x1c8));if(_0x4c1f56&&!_0x42786a['nonInteractive']){const _0x13a90b=await confirmForce();if(!_0x13a90b)throw CliErrors['cancelled'](_0x49da5e(0x1d1));}if(_0x4c1f56&&_0x42786a[_0x49da5e(0x1e1)]){}const _0x403ae0=buildDatasetCodeToAliasMap(_0x42786a['apiDir'],_0x42786a[_0x49da5e(0x1b0)]),_0x2f1bab=createHookLocationMap(_0x141cba),_0x5699f4=JSON[_0x49da5e(0x1cf)](JSON[_0x49da5e(0x1c0)](_0xe524c7)),_0x127b64=_0x42786a[_0x49da5e(0x1b0)],_0x185a1e=_0x5699f4[_0x49da5e(0x19e)][_0x127b64];if(!_0x185a1e)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x127b64+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x1d4d71=[],_0x37b018=[],_0x3f5bca=[];for(const _0xbb1bca of _0x4fc399){const _0x4bf268=resolveRemoteScriptTarget(_0xce2345,_0xbb1bca,_0x2f1bab,_0xc5cc21[_0x49da5e(0x1d7)],_0x403ae0);if(!_0x4bf268){_0x37b018['push']({'lockKey':_0xbb1bca[_0x49da5e(0x1ac)]+'/'+_0xbb1bca[_0x49da5e(0x1a9)],'reason':_0x49da5e(0x1bc)});continue;}const _0x54d7e3=_0xc5cc21[_0x49da5e(0x1d7)][_0x4bf268['lockKey']];try{if(!_0xbb1bca['id'])throw new Error(_0x49da5e(0x1e0));if(_0xbb1bca['scriptContent']==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x314589=_0xbb1bca[_0x49da5e(0x1be)],_0x4504e6=computeContentHash(_0x314589);if(!_0x4c1f56){const _0x37a576=await hasUnsyncedLocalChanges(_0x4bf268['filePath'],_0x54d7e3,_0x4504e6);if(_0x37a576){_0x37b018['push']({'lockKey':_0x4bf268[_0x49da5e(0x1a0)],'reason':_0x49da5e(0x1b8)});continue;}}await ensureParentDirectory(_0x4bf268[_0x49da5e(0x1c1)]),await writeFile(_0x4bf268[_0x49da5e(0x1c1)],_0x314589,_0x49da5e(0x1ae));const _0x22da90={'hash':_0x4504e6,'remoteId':_0xbb1bca['id'],'version':_0xbb1bca[_0x49da5e(0x1d3)]};_0x4bf268[_0x49da5e(0x1ad)]==='HOOK'&&_0x4bf268[_0x49da5e(0x1db)]&&(_0x22da90['alias']=_0x4bf268['hookLocation']['alias'],_0x22da90[_0x49da5e(0x19d)]=_0x4bf268[_0x49da5e(0x1db)][_0x49da5e(0x19d)],_0x22da90[_0x49da5e(0x1b4)]=_0x4bf268[_0x49da5e(0x1db)]['operationType'],_0x22da90[_0x49da5e(0x1a4)]=_0x4bf268['hookLocation'][_0x49da5e(0x1a4)]),_0x185a1e['functions'][_0x4bf268['lockKey']]=_0x22da90,_0x1d4d71[_0x49da5e(0x1cb)]({'lockKey':_0x4bf268[_0x49da5e(0x1a0)],'remoteId':_0xbb1bca['id']});}catch(_0x3c16f1){_0x3f5bca[_0x49da5e(0x1cb)]({'lockKey':_0x4bf268['lockKey'],'error':_0x3c16f1 instanceof Error?_0x3c16f1[_0x49da5e(0x1df)]:String(_0x3c16f1)});}}return _0x185a1e[_0x49da5e(0x1c9)]=new Date()[_0x49da5e(0x1d9)](),await writeBffLockFile(_0xce2345['lockFilePath'],_0x5699f4),{'ok':_0x3f5bca[_0x49da5e(0x1cc)]===0x0,'data':{'pulled':_0x1d4d71,'skipped':_0x37b018,'failed':_0x3f5bca},'message':_0x49da5e(0x1cd)+_0x1d4d71[_0x49da5e(0x1cc)]+_0x49da5e(0x1bf)+_0x37b018[_0x49da5e(0x1cc)]+'\x20skipped,\x20'+_0x3f5bca[_0x49da5e(0x1cc)]+_0x49da5e(0x1e2)};}};async function hasUnsyncedLocalChanges(_0x1942d5,_0x997d11,_0x3ca7bc){if(!await fileExists(_0x1942d5))return![];const _0xa94ab7=await computeFileHash(_0x1942d5);if(!_0x997d11)return _0x3ca7bc?_0xa94ab7!==_0x3ca7bc:!![];return _0xa94ab7!==_0x997d11['hash'];}function buildDatasetCodeToAliasMap(_0x164b0d,_0x6896fe){const _0x1d0b2b=a36_0x1bad75,_0x50c64b=loadAliasMap(_0x164b0d,undefined,resolveApiFilePath(_0x164b0d,_0x6896fe));return new Map(_0x50c64b[_0x1d0b2b(0x1c4)](_0x1a1a51=>[_0x1a1a51[_0x1d0b2b(0x19d)],_0x1a1a51[_0x1d0b2b(0x1b9)]]));}function a36_0x2732(_0x5baa20,_0x1ff296){_0x5baa20=_0x5baa20-0x19d;const _0x47be9f=a36_0x47be();let _0x273230=_0x47be9f[_0x5baa20];return _0x273230;}async function confirmForce(){const _0x43f7ff=a36_0x1bad75,_0x5f32a3=createInterface({'input':process[_0x43f7ff(0x1b3)],'output':process[_0x43f7ff(0x1ab)]}),_0x43aa5d=await new Promise(_0x207b96=>{const _0x1c74c5=_0x43f7ff;_0x5f32a3[_0x1c74c5(0x1c2)](_0x1c74c5(0x1ce),_0x207b96);});return _0x5f32a3[_0x43f7ff(0x1a5)](),['y',_0x43f7ff(0x1b7)]['includes'](_0x43aa5d['trim']()[_0x43f7ff(0x1bd)]());}
@@ -1 +1 @@
1
- const a37_0xd26f8c=a37_0x196b;(function(_0x19422a,_0x1921b5){const _0x269a82=a37_0x196b,_0x484d09=_0x19422a();while(!![]){try{const _0x41e06d=-parseInt(_0x269a82(0x18d))/0x1*(-parseInt(_0x269a82(0x1ac))/0x2)+parseInt(_0x269a82(0x1cb))/0x3+-parseInt(_0x269a82(0x19f))/0x4+-parseInt(_0x269a82(0x1b3))/0x5+-parseInt(_0x269a82(0x1b2))/0x6*(parseInt(_0x269a82(0x1a3))/0x7)+-parseInt(_0x269a82(0x1a8))/0x8+parseInt(_0x269a82(0x1cf))/0x9*(parseInt(_0x269a82(0x190))/0xa);if(_0x41e06d===_0x1921b5)break;else _0x484d09['push'](_0x484d09['shift']());}catch(_0x43902c){_0x484d09['push'](_0x484d09['shift']());}}}(a37_0xf10f,0xc990b));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a37_0xf10f(){const _0xb57916=['--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','4250869kCgnHb','join','functions','\x20failed,\x20','\x20skipped,\x20','8463808bvFaso','Local\x20function\x20not\x20found:\x20','apps','get','13724KCZvwf','str','some','ENDPOINT','COMMON','scriptsRoot','12rVXLgd','4788555YrGPWm','appCode','hash','description','lockFilePath','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','HOOK','boolean','version','would_push','update','force','length','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','bff','Push\x20local\x20BFF\x20scripts\x20to\x20remote','status','parse','name','functionNode','values','push','apiDir','message','4368453RWRemq','map','Force\x20push\x20ignoring\x20hash\x20protection','lastSync','805941mqeEsX','alias','datasetCodeToDataset',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','stringify','has','type','No\x20local\x20BFF\x20functions\x20found.','attempted','aliasToDatasetCode','validation','Incomplete\x20HOOK\x20path:\x20','operationType','137TLrYTn','Cannot\x20resolve\x20dataset\x20for\x20\x22','create','250geidHV','\x22.\x20','runtime\x20cache\x20cleared','string','datasetCode','cleared','POST','/api/management/library/scripts/save','unchanged','Run\x20`','Push\x20complete:\x20','filter','toISOString','lockKey','filePath','2316552anRGGi','remoteId','every'];a37_0xf10f=function(){return _0xb57916;};return a37_0xf10f();}const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0xd26f8c(0x1c1),'command':a37_0xd26f8c(0x1c8),'description':a37_0xd26f8c(0x1c2),'risk':'high-risk-write','flags':[{'name':a37_0xd26f8c(0x186),'type':a37_0xd26f8c(0x193),'description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0xd26f8c(0x1b0),a37_0xd26f8c(0x1af),'HOOK']},{'name':a37_0xd26f8c(0x1c5),'type':a37_0xd26f8c(0x193),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0xd26f8c(0x1be),'type':a37_0xd26f8c(0x1ba),'description':a37_0xd26f8c(0x1cd)}],async 'dryRun'(_0x581f1b){const _0x1952fe=a37_0xd26f8c,_0x57be17=loadBffProjectConfig(_0x581f1b[_0x1952fe(0x1b4)]),_0x9fe7b9=await readBffLockFile(_0x57be17[_0x1952fe(0x1b7)]),{appLock:_0x50e41d}=ensureLockScope(_0x9fe7b9??createEmptyBffLock(),_0x581f1b[_0x1952fe(0x1b4)],_0x57be17[_0x1952fe(0x1b1)],'push'),_0x23bc8a=await getTargetFunctions(_0x57be17,_0x581f1b),_0x269aab=_0x581f1b['bool'](_0x1952fe(0x1be)),_0x39bdb6=[];for(const _0x544c07 of _0x23bc8a){const _0x31ce98=await computeFileHash(_0x544c07[_0x1952fe(0x19e)]),_0x1c8c7b=_0x50e41d[_0x1952fe(0x1a5)][_0x544c07[_0x1952fe(0x19d)]],_0x5e19c0=!!_0x1c8c7b&&_0x1c8c7b[_0x1952fe(0x1b5)]===_0x31ce98;_0x39bdb6[_0x1952fe(0x1c8)]({'lockKey':_0x544c07[_0x1952fe(0x19d)],'filePath':_0x544c07['filePath'],'remoteId':_0x1c8c7b?.[_0x1952fe(0x1a0)]??null,'mode':_0x1c8c7b?.['remoteId']?_0x1952fe(0x1bd):_0x1952fe(0x18f),'status':!_0x269aab&&_0x5e19c0?_0x1952fe(0x198):_0x1952fe(0x1bc)});}return{'method':_0x1952fe(0x196),'url':_0x1952fe(0x197),'body':{'appCode':_0x581f1b['appCode'],'force':_0x269aab,'files':_0x39bdb6,'cacheClearAtRuntime':_0x39bdb6[_0x1952fe(0x1ae)](_0x249d9a=>_0x249d9a[_0x1952fe(0x1c3)]===_0x1952fe(0x1bc)),'cacheClearAtRuntimeTimes':_0x39bdb6[_0x1952fe(0x1ae)](_0x2c842e=>_0x2c842e[_0x1952fe(0x1c3)]===_0x1952fe(0x1bc))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x39bdb6[_0x1952fe(0x1bf)]+_0x1952fe(0x1b8)};},async 'execute'(_0x1683a5){const _0x2cb05e=a37_0xd26f8c,_0x5814ef=loadBffProjectConfig(_0x1683a5[_0x2cb05e(0x1b4)]),_0x405d0c=await readBffLockFile(_0x5814ef[_0x2cb05e(0x1b7)]),{lockData:_0x4dcd41,appLock:_0xe7d48b}=ensureLockScope(_0x405d0c??createEmptyBffLock(),_0x1683a5['appCode'],_0x5814ef[_0x2cb05e(0x1b1)],'push'),_0x5c57c8=await getTargetFunctions(_0x5814ef,_0x1683a5);if(_0x5c57c8[_0x2cb05e(0x1bf)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x2cb05e(0x187)};const _0x2a92c2=_0x1683a5['bool'](_0x2cb05e(0x1be)),_0x3c5d84=JSON[_0x2cb05e(0x1c4)](JSON[_0x2cb05e(0x184)](_0x4dcd41)),_0x464f28=_0x3c5d84['apps'][_0x1683a5[_0x2cb05e(0x1b4)]];if(!_0x464f28)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x1683a5[_0x2cb05e(0x1b4)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x3e1955=await buildHookMaps(_0x1683a5[_0x2cb05e(0x1b4)],_0x1683a5[_0x2cb05e(0x1c9)],_0x5c57c8,_0x464f28),_0x2ffe21=[],_0x42eb83=[],_0x46c22f=[];for(const _0x1f56bc of _0x5c57c8){const _0x296637=await computeFileHash(_0x1f56bc[_0x2cb05e(0x19e)]),_0x1832d1=_0x464f28[_0x2cb05e(0x1a5)][_0x1f56bc['lockKey']];if(!_0x2a92c2&&_0x1832d1&&_0x1832d1[_0x2cb05e(0x1b5)]===_0x296637){_0x42eb83[_0x2cb05e(0x1c8)]({'lockKey':_0x1f56bc['lockKey'],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x1683a5['appCode'],_0x1f56bc,_0x464f28,_0x3e1955);const _0x3adef8=_0x464f28[_0x2cb05e(0x1a5)][_0x1f56bc[_0x2cb05e(0x19d)]];_0x2ffe21[_0x2cb05e(0x1c8)]({'lockKey':_0x1f56bc['lockKey'],'remoteId':_0x3adef8?.[_0x2cb05e(0x1a0)]??0x0});}catch(_0x9505f6){_0x46c22f['push']({'lockKey':_0x1f56bc[_0x2cb05e(0x19d)],'error':_0x9505f6 instanceof Error?_0x9505f6[_0x2cb05e(0x1ca)]:String(_0x9505f6)});}}_0x464f28[_0x2cb05e(0x1ce)]=new Date()[_0x2cb05e(0x19c)](),await writeBffLockFile(_0x5814ef[_0x2cb05e(0x1b7)],_0x3c5d84),await waitForUploadedLockEntries(_0x5814ef[_0x2cb05e(0x1b7)],_0x1683a5['appCode'],_0x2ffe21[_0x2cb05e(0x1cc)](_0x59a340=>_0x59a340[_0x2cb05e(0x19d)]));let _0x14c4ba={'attempted':![],'cleared':![]};if(_0x2ffe21[_0x2cb05e(0x1bf)]>0x0)try{let _0x2db482='';for(let _0x586622=0x0;_0x586622<CACHE_CLEAR_ATTEMPTS;_0x586622+=0x1){_0x2db482=await clearBffScriptCache(),_0x586622<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x14c4ba={'attempted':!![],'cleared':!![],'message':_0x2db482||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0xdceaee){_0x14c4ba={'attempted':!![],'cleared':![],'error':_0xdceaee instanceof Error?_0xdceaee['message']:String(_0xdceaee)};}const _0x28d53c=_0x46c22f[_0x2cb05e(0x1bf)]===0x0&&(_0x14c4ba[_0x2cb05e(0x188)]?_0x14c4ba[_0x2cb05e(0x195)]:!![]),_0x29465e=_0x14c4ba[_0x2cb05e(0x188)]?_0x14c4ba[_0x2cb05e(0x195)]?_0x2cb05e(0x192):'runtime\x20cache\x20clear\x20failed':'runtime\x20cache\x20not\x20needed';return{'ok':_0x28d53c,'data':{'uploaded':_0x2ffe21,'skipped':_0x42eb83,'failed':_0x46c22f,'cacheClear':_0x14c4ba},'message':_0x2cb05e(0x19a)+_0x2ffe21[_0x2cb05e(0x1bf)]+'\x20uploaded,\x20'+_0x42eb83[_0x2cb05e(0x1bf)]+_0x2cb05e(0x1a7)+_0x46c22f[_0x2cb05e(0x1bf)]+_0x2cb05e(0x1a6)+_0x29465e};}};async function getTargetFunctions(_0x2090bb,_0x3029bb){const _0x1e96ae=a37_0xd26f8c,_0x43a90f=_0x3029bb[_0x1e96ae(0x1ad)]('type'),_0x367efe=_0x3029bb[_0x1e96ae(0x1ad)](_0x1e96ae(0x1c5)),_0x2487d0=normalizeBffType(_0x43a90f)??undefined;if(_0x367efe&&!_0x2487d0)throw CliErrors['validation'](_0x1e96ae(0x1a2));const _0x57cac0=await scanLocalBffFunctions(_0x2090bb,_0x2487d0);if(_0x367efe){const _0x41dbb2=_0x57cac0[_0x1e96ae(0x19b)](_0x51633b=>_0x51633b[_0x1e96ae(0x1c5)]===_0x367efe);if(_0x41dbb2['length']===0x0)throw CliErrors[_0x1e96ae(0x18a)](_0x1e96ae(0x1a9)+_0x2487d0+'/'+_0x367efe);return _0x41dbb2;}return _0x57cac0;}async function buildHookMaps(_0x7144af,_0x3bf2e3,_0x2b1dee,_0x51c8d8){const _0x3359e7=a37_0xd26f8c,_0x4f9f27=_0x2b1dee[_0x3359e7(0x1ae)](_0x3d3e96=>_0x3d3e96[_0x3359e7(0x186)]===_0x3359e7(0x1b9));if(!_0x4f9f27)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0xbef487=loadAliasMap(_0x3bf2e3,undefined,resolveApiFilePath(_0x3bf2e3,_0x7144af)),_0x33c0e4=new Map(_0xbef487[_0x3359e7(0x1cc)](_0x2a2535=>[_0x2a2535[_0x3359e7(0x181)],_0x2a2535[_0x3359e7(0x194)]]));for(const _0xf18e6a of Object[_0x3359e7(0x1c7)](_0x51c8d8[_0x3359e7(0x1a5)])){_0xf18e6a[_0x3359e7(0x181)]&&_0xf18e6a[_0x3359e7(0x194)]&&!_0x33c0e4[_0x3359e7(0x185)](_0xf18e6a[_0x3359e7(0x181)])&&_0x33c0e4['set'](_0xf18e6a[_0x3359e7(0x181)],_0xf18e6a[_0x3359e7(0x194)]);}const _0x5da346=await listDatasets(_0x7144af),_0x206c29=new Map(_0x5da346['map'](_0xa7b17c=>[_0xa7b17c['code'],_0xa7b17c]));return{'aliasToDatasetCode':_0x33c0e4,'datasetCodeToDataset':_0x206c29};}function a37_0x196b(_0x1b1cb9,_0x29a14f){_0x1b1cb9=_0x1b1cb9-0x181;const _0xf10f85=a37_0xf10f();let _0x196b14=_0xf10f85[_0x1b1cb9];return _0x196b14;}async function uploadSingleFunction(_0x138729,_0x20cdae,_0x25ad8a,_0xa5f7f7){const _0x1ac030=a37_0xd26f8c,_0x170e56=await readFile(_0x20cdae[_0x1ac030(0x19e)],'utf8'),_0x28ce2c=await computeFileHash(_0x20cdae['filePath']),_0x222c3f=_0x25ad8a[_0x1ac030(0x1a5)][_0x20cdae[_0x1ac030(0x19d)]];if(_0x222c3f?.[_0x1ac030(0x1a0)]&&_0x222c3f[_0x1ac030(0x1bb)]==null)throw CliErrors[_0x1ac030(0x18a)](_0x20cdae['lockKey']+_0x1ac030(0x183));let _0x5be730=extractScriptDescription(_0x170e56);if(!_0x5be730&&_0x222c3f?.[_0x1ac030(0x1a0)]){const _0x378dde=await getBffScriptInfo(_0x222c3f[_0x1ac030(0x1a0)]);_0x5be730=_0x378dde[_0x1ac030(0x1b6)]||undefined;}const _0x1dfa04={'appCode':_0x138729,'functionName':_0x20cdae[_0x1ac030(0x1c5)],'scriptType':_0x20cdae[_0x1ac030(0x186)],'scriptContent':_0x170e56};if(_0x222c3f?.[_0x1ac030(0x1a0)])_0x1dfa04['id']=_0x222c3f[_0x1ac030(0x1a0)];if(_0x222c3f?.[_0x1ac030(0x1bb)]!=null)_0x1dfa04[_0x1ac030(0x1bb)]=_0x222c3f['version'];if(_0x5be730)_0x1dfa04[_0x1ac030(0x1b6)]=_0x5be730;if(_0x20cdae[_0x1ac030(0x186)]==='HOOK'){const _0x6d3e3b=_0x20cdae['alias'];if(!_0x6d3e3b||!_0x20cdae[_0x1ac030(0x18c)]||!_0x20cdae[_0x1ac030(0x1c6)])throw CliErrors[_0x1ac030(0x18a)](_0x1ac030(0x18b)+_0x20cdae[_0x1ac030(0x19d)]);const _0x23248d=_0xa5f7f7[_0x1ac030(0x189)][_0x1ac030(0x1ab)](_0x6d3e3b)??_0x222c3f?.[_0x1ac030(0x194)]??_0x6d3e3b,_0x4be3fa=_0xa5f7f7[_0x1ac030(0x182)][_0x1ac030(0x1ab)](_0x23248d);if(!_0x4be3fa)throw CliErrors[_0x1ac030(0x18a)](_0x1ac030(0x18e)+_0x6d3e3b+_0x1ac030(0x191)+(_0x1ac030(0x199)+CLI_BIN_NAME+_0x1ac030(0x1c0)));_0x1dfa04['datasetId']=_0x4be3fa['id'],_0x1dfa04[_0x1ac030(0x18c)]=_0x20cdae[_0x1ac030(0x18c)],_0x1dfa04[_0x1ac030(0x1c6)]=_0x20cdae[_0x1ac030(0x1c6)];}const _0x5173ec=await saveBffScript(_0x1dfa04),_0x50b28b=_0x5173ec['id'],_0x22ff03=_0x5173ec['script']??await getBffScriptInfo(_0x50b28b),_0x3b3811={'hash':_0x28ce2c,'remoteId':_0x50b28b,'version':_0x22ff03['version']};if(_0x20cdae['type']===_0x1ac030(0x1b9)){const _0x40660e=_0x20cdae[_0x1ac030(0x181)],_0x10a421=_0xa5f7f7['aliasToDatasetCode'][_0x1ac030(0x1ab)](_0x40660e)??_0x222c3f?.[_0x1ac030(0x194)]??_0x40660e;_0xa5f7f7[_0x1ac030(0x189)][_0x1ac030(0x185)](_0x40660e)?_0x3b3811[_0x1ac030(0x181)]=_0x40660e:_0x3b3811[_0x1ac030(0x181)]=_0x222c3f?.['alias'],_0x3b3811['datasetCode']=_0x10a421,_0x3b3811[_0x1ac030(0x18c)]=_0x20cdae['operationType'],_0x3b3811[_0x1ac030(0x1c6)]=_0x20cdae[_0x1ac030(0x1c6)];}_0x25ad8a[_0x1ac030(0x1a5)][_0x20cdae[_0x1ac030(0x19d)]]=_0x3b3811;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x23e21f,_0x524070,_0x561591){const _0x89cb4e=a37_0xd26f8c;if(_0x561591[_0x89cb4e(0x1bf)]===0x0)return;for(let _0x5e7ab4=0x0;_0x5e7ab4<LOCK_SETTLE_RETRY_COUNT;_0x5e7ab4+=0x1){const _0x343c95=await readBffLockFile(_0x23e21f),_0x438c5f=_0x343c95?.[_0x89cb4e(0x1aa)]?.[_0x524070]?.[_0x89cb4e(0x1a5)]??{},_0x58d301=_0x561591[_0x89cb4e(0x1a1)](_0xecb7e8=>!!_0x438c5f[_0xecb7e8]?.['remoteId']);if(_0x58d301)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x561591[_0x89cb4e(0x1a4)](',\x20')+'.');}
1
+ const a37_0xd2ff64=a37_0xcf02;(function(_0x531542,_0x4086d6){const _0x234a8d=a37_0xcf02,_0x5aa2b3=_0x531542();while(!![]){try{const _0x4dcde2=-parseInt(_0x234a8d(0x14a))/0x1*(-parseInt(_0x234a8d(0x14b))/0x2)+-parseInt(_0x234a8d(0x14e))/0x3+-parseInt(_0x234a8d(0x175))/0x4+-parseInt(_0x234a8d(0x142))/0x5*(parseInt(_0x234a8d(0x13e))/0x6)+parseInt(_0x234a8d(0x162))/0x7+parseInt(_0x234a8d(0x13f))/0x8*(-parseInt(_0x234a8d(0x179))/0x9)+parseInt(_0x234a8d(0x16d))/0xa;if(_0x4dcde2===_0x4086d6)break;else _0x5aa2b3['push'](_0x5aa2b3['shift']());}catch(_0x2f100e){_0x5aa2b3['push'](_0x5aa2b3['shift']());}}}(a37_0x4099,0xdf56a));function a37_0xcf02(_0x459e67,_0x107549){_0x459e67=_0x459e67-0x132;const _0x409999=a37_0x4099();let _0xcf0206=_0x409999[_0x459e67];return _0xcf0206;}import{readFile}from'node:fs/promises';function a37_0x4099(){const _0x377ddf=['Force\x20push\x20ignoring\x20hash\x20protection','6471tPSopS','runtime\x20cache\x20clear\x20failed','name','lockKey','every','lockFilePath','push','description','message','aliasToDatasetCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','functionNode','HOOK','would_push','functions','join','Lock\x20scope\x20for\x20app\x20\x22','79938kWzhHr','19744qNknXu','Run\x20`','datasetCode','110wHxcAp',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Push\x20complete:\x20','datasetCodeToDataset','POST','appCode','force','hash','7FzOlYS','164594MkxSbT','status','type','395955TCCSGl','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','high-risk-write','lastSync','filePath','scriptsRoot','\x20uploaded,\x20','operationType','validation','str','\x20skipped,\x20','values','bool','Cannot\x20resolve\x20dataset\x20for\x20\x22','string','toISOString','Push\x20local\x20BFF\x20scripts\x20to\x20remote','has','code','cleared','7199710IqITzU','remoteId','get','datasetId','filter','some','unchanged','map','apiDir','runtime\x20cache\x20not\x20needed','version','24357680IBgjNo','Push\x20only\x20this\x20script\x20type','\x22\x20not\x20found\x20after\x20ensureLockScope.','Local\x20function\x20not\x20found:\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','\x20failed,\x20','alias','set','3704000cIYRSo','apps','length'];a37_0x4099=function(){return _0x377ddf;};return a37_0x4099();}import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a37_0xd2ff64(0x133),'description':a37_0xd2ff64(0x15e),'risk':a37_0xd2ff64(0x150),'flags':[{'name':a37_0xd2ff64(0x14d),'type':a37_0xd2ff64(0x15c),'description':a37_0xd2ff64(0x16e),'enum':['COMMON','ENDPOINT',a37_0xd2ff64(0x139)]},{'name':a37_0xd2ff64(0x17b),'type':'string','description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0xd2ff64(0x148),'type':'boolean','description':a37_0xd2ff64(0x178)}],async 'dryRun'(_0x5a476d){const _0x351a8a=a37_0xd2ff64,_0x79b018=loadBffProjectConfig(_0x5a476d['appCode']),_0xb46fd3=await readBffLockFile(_0x79b018[_0x351a8a(0x132)]),{appLock:_0x2dcb1a}=ensureLockScope(_0xb46fd3??createEmptyBffLock(),_0x5a476d[_0x351a8a(0x147)],_0x79b018[_0x351a8a(0x153)],_0x351a8a(0x133)),_0x3404bc=await getTargetFunctions(_0x79b018,_0x5a476d),_0x3ca6f2=_0x5a476d[_0x351a8a(0x15a)]('force'),_0x37426d=[];for(const _0x3f71b1 of _0x3404bc){const _0x3d126c=await computeFileHash(_0x3f71b1[_0x351a8a(0x152)]),_0xa87cd1=_0x2dcb1a[_0x351a8a(0x13b)][_0x3f71b1['lockKey']],_0x1b6b9a=!!_0xa87cd1&&_0xa87cd1[_0x351a8a(0x149)]===_0x3d126c;_0x37426d[_0x351a8a(0x133)]({'lockKey':_0x3f71b1['lockKey'],'filePath':_0x3f71b1[_0x351a8a(0x152)],'remoteId':_0xa87cd1?.[_0x351a8a(0x163)]??null,'mode':_0xa87cd1?.['remoteId']?'update':'create','status':!_0x3ca6f2&&_0x1b6b9a?_0x351a8a(0x168):'would_push'});}return{'method':_0x351a8a(0x146),'url':'/api/management/library/scripts/save','body':{'appCode':_0x5a476d[_0x351a8a(0x147)],'force':_0x3ca6f2,'files':_0x37426d,'cacheClearAtRuntime':_0x37426d[_0x351a8a(0x167)](_0x4fb951=>_0x4fb951[_0x351a8a(0x14c)]===_0x351a8a(0x13a)),'cacheClearAtRuntimeTimes':_0x37426d[_0x351a8a(0x167)](_0x6db9a3=>_0x6db9a3['status']===_0x351a8a(0x13a))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x37426d[_0x351a8a(0x177)]+_0x351a8a(0x171)};},async 'execute'(_0x541d63){const _0x31e6bc=a37_0xd2ff64,_0x303ce4=loadBffProjectConfig(_0x541d63[_0x31e6bc(0x147)]),_0x5ab605=await readBffLockFile(_0x303ce4[_0x31e6bc(0x132)]),{lockData:_0x492a86,appLock:_0x529381}=ensureLockScope(_0x5ab605??createEmptyBffLock(),_0x541d63[_0x31e6bc(0x147)],_0x303ce4['scriptsRoot'],'push'),_0x3e37fd=await getTargetFunctions(_0x303ce4,_0x541d63);if(_0x3e37fd[_0x31e6bc(0x177)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x15abf3=_0x541d63[_0x31e6bc(0x15a)](_0x31e6bc(0x148)),_0x37af74=JSON['parse'](JSON['stringify'](_0x492a86)),_0x1f3f78=_0x37af74['apps'][_0x541d63[_0x31e6bc(0x147)]];if(!_0x1f3f78)throw new Error(_0x31e6bc(0x13d)+_0x541d63[_0x31e6bc(0x147)]+_0x31e6bc(0x16f));const _0x9bc529=await buildHookMaps(_0x541d63[_0x31e6bc(0x147)],_0x541d63[_0x31e6bc(0x16a)],_0x3e37fd,_0x1f3f78),_0x4ff540=[],_0x13dc2a=[],_0x1d60ba=[];for(const _0x44a857 of _0x3e37fd){const _0x8e1a2c=await computeFileHash(_0x44a857[_0x31e6bc(0x152)]),_0x2eacf2=_0x1f3f78[_0x31e6bc(0x13b)][_0x44a857['lockKey']];if(!_0x15abf3&&_0x2eacf2&&_0x2eacf2[_0x31e6bc(0x149)]===_0x8e1a2c){_0x13dc2a[_0x31e6bc(0x133)]({'lockKey':_0x44a857['lockKey'],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x541d63[_0x31e6bc(0x147)],_0x44a857,_0x1f3f78,_0x9bc529);const _0x23788d=_0x1f3f78['functions'][_0x44a857[_0x31e6bc(0x17c)]];_0x4ff540[_0x31e6bc(0x133)]({'lockKey':_0x44a857[_0x31e6bc(0x17c)],'remoteId':_0x23788d?.[_0x31e6bc(0x163)]??0x0});}catch(_0x37aecc){_0x1d60ba['push']({'lockKey':_0x44a857['lockKey'],'error':_0x37aecc instanceof Error?_0x37aecc['message']:String(_0x37aecc)});}}_0x1f3f78[_0x31e6bc(0x151)]=new Date()[_0x31e6bc(0x15d)](),await writeBffLockFile(_0x303ce4['lockFilePath'],_0x37af74),await waitForUploadedLockEntries(_0x303ce4[_0x31e6bc(0x132)],_0x541d63['appCode'],_0x4ff540[_0x31e6bc(0x169)](_0x378001=>_0x378001[_0x31e6bc(0x17c)]));let _0x4f7614={'attempted':![],'cleared':![]};if(_0x4ff540[_0x31e6bc(0x177)]>0x0)try{let _0x2e36c8='';for(let _0x2568bb=0x0;_0x2568bb<CACHE_CLEAR_ATTEMPTS;_0x2568bb+=0x1){_0x2e36c8=await clearBffScriptCache(),_0x2568bb<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4f7614={'attempted':!![],'cleared':!![],'message':_0x2e36c8||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x3c1b0f){_0x4f7614={'attempted':!![],'cleared':![],'error':_0x3c1b0f instanceof Error?_0x3c1b0f[_0x31e6bc(0x135)]:String(_0x3c1b0f)};}const _0x3288a7=_0x1d60ba[_0x31e6bc(0x177)]===0x0&&(_0x4f7614['attempted']?_0x4f7614[_0x31e6bc(0x161)]:!![]),_0x3e92a9=_0x4f7614['attempted']?_0x4f7614[_0x31e6bc(0x161)]?'runtime\x20cache\x20cleared':_0x31e6bc(0x17a):_0x31e6bc(0x16b);return{'ok':_0x3288a7,'data':{'uploaded':_0x4ff540,'skipped':_0x13dc2a,'failed':_0x1d60ba,'cacheClear':_0x4f7614},'message':_0x31e6bc(0x144)+_0x4ff540['length']+_0x31e6bc(0x154)+_0x13dc2a[_0x31e6bc(0x177)]+_0x31e6bc(0x158)+_0x1d60ba['length']+_0x31e6bc(0x172)+_0x3e92a9};}};async function getTargetFunctions(_0x531fa9,_0x421e8e){const _0x3f9f1c=a37_0xd2ff64,_0x4669fb=_0x421e8e[_0x3f9f1c(0x157)]('type'),_0x45eda1=_0x421e8e['str']('name'),_0x1613e1=normalizeBffType(_0x4669fb)??undefined;if(_0x45eda1&&!_0x1613e1)throw CliErrors[_0x3f9f1c(0x156)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x245795=await scanLocalBffFunctions(_0x531fa9,_0x1613e1);if(_0x45eda1){const _0x570051=_0x245795[_0x3f9f1c(0x166)](_0x50660b=>_0x50660b[_0x3f9f1c(0x17b)]===_0x45eda1);if(_0x570051['length']===0x0)throw CliErrors['validation'](_0x3f9f1c(0x170)+_0x1613e1+'/'+_0x45eda1);return _0x570051;}return _0x245795;}async function buildHookMaps(_0x565168,_0x2adae3,_0x2e75ee,_0x887fdc){const _0x405509=a37_0xd2ff64,_0x2efcba=_0x2e75ee[_0x405509(0x167)](_0x1f6d1d=>_0x1f6d1d[_0x405509(0x14d)]==='HOOK');if(!_0x2efcba)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2dc6f3=loadAliasMap(_0x2adae3,undefined,resolveApiFilePath(_0x2adae3,_0x565168)),_0x42e3ce=new Map(_0x2dc6f3[_0x405509(0x169)](_0x409f35=>[_0x409f35[_0x405509(0x173)],_0x409f35[_0x405509(0x141)]]));for(const _0x20ed77 of Object[_0x405509(0x159)](_0x887fdc[_0x405509(0x13b)])){_0x20ed77[_0x405509(0x173)]&&_0x20ed77[_0x405509(0x141)]&&!_0x42e3ce[_0x405509(0x15f)](_0x20ed77['alias'])&&_0x42e3ce[_0x405509(0x174)](_0x20ed77[_0x405509(0x173)],_0x20ed77['datasetCode']);}const _0x5047d6=await listDatasets(_0x565168),_0x289154=new Map(_0x5047d6[_0x405509(0x169)](_0x247c41=>[_0x247c41[_0x405509(0x160)],_0x247c41]));return{'aliasToDatasetCode':_0x42e3ce,'datasetCodeToDataset':_0x289154};}async function uploadSingleFunction(_0x2ad5aa,_0x5553c1,_0x431c6a,_0x122bbf){const _0x17d61f=a37_0xd2ff64,_0xb401fa=await readFile(_0x5553c1[_0x17d61f(0x152)],'utf8'),_0x4e8f17=await computeFileHash(_0x5553c1[_0x17d61f(0x152)]),_0x34aeb6=_0x431c6a[_0x17d61f(0x13b)][_0x5553c1[_0x17d61f(0x17c)]];if(_0x34aeb6?.[_0x17d61f(0x163)]&&_0x34aeb6['version']==null)throw CliErrors[_0x17d61f(0x156)](_0x5553c1[_0x17d61f(0x17c)]+_0x17d61f(0x143));let _0x226aad=extractScriptDescription(_0xb401fa);if(!_0x226aad&&_0x34aeb6?.[_0x17d61f(0x163)]){const _0x979b70=await getBffScriptInfo(_0x34aeb6['remoteId']);_0x226aad=_0x979b70[_0x17d61f(0x134)]||undefined;}const _0x4d1e15={'appCode':_0x2ad5aa,'functionName':_0x5553c1[_0x17d61f(0x17b)],'scriptType':_0x5553c1[_0x17d61f(0x14d)],'scriptContent':_0xb401fa};if(_0x34aeb6?.[_0x17d61f(0x163)])_0x4d1e15['id']=_0x34aeb6[_0x17d61f(0x163)];if(_0x34aeb6?.[_0x17d61f(0x16c)]!=null)_0x4d1e15['version']=_0x34aeb6[_0x17d61f(0x16c)];if(_0x226aad)_0x4d1e15[_0x17d61f(0x134)]=_0x226aad;if(_0x5553c1['type']==='HOOK'){const _0x394409=_0x5553c1['alias'];if(!_0x394409||!_0x5553c1[_0x17d61f(0x155)]||!_0x5553c1['functionNode'])throw CliErrors[_0x17d61f(0x156)]('Incomplete\x20HOOK\x20path:\x20'+_0x5553c1[_0x17d61f(0x17c)]);const _0x11f153=_0x122bbf[_0x17d61f(0x136)][_0x17d61f(0x164)](_0x394409)??_0x34aeb6?.[_0x17d61f(0x141)]??_0x394409,_0x3d4042=_0x122bbf[_0x17d61f(0x145)][_0x17d61f(0x164)](_0x11f153);if(!_0x3d4042)throw CliErrors[_0x17d61f(0x156)](_0x17d61f(0x15b)+_0x394409+'\x22.\x20'+(_0x17d61f(0x140)+CLI_BIN_NAME+_0x17d61f(0x14f)));_0x4d1e15[_0x17d61f(0x165)]=_0x3d4042['id'],_0x4d1e15[_0x17d61f(0x155)]=_0x5553c1[_0x17d61f(0x155)],_0x4d1e15[_0x17d61f(0x138)]=_0x5553c1[_0x17d61f(0x138)];}const _0x1236d1=await saveBffScript(_0x4d1e15),_0x4f480e=_0x1236d1['id'],_0x119030=_0x1236d1['script']??await getBffScriptInfo(_0x4f480e),_0x317fc5={'hash':_0x4e8f17,'remoteId':_0x4f480e,'version':_0x119030[_0x17d61f(0x16c)]};if(_0x5553c1[_0x17d61f(0x14d)]===_0x17d61f(0x139)){const _0x969c99=_0x5553c1[_0x17d61f(0x173)],_0x16feca=_0x122bbf[_0x17d61f(0x136)]['get'](_0x969c99)??_0x34aeb6?.[_0x17d61f(0x141)]??_0x969c99;_0x122bbf[_0x17d61f(0x136)][_0x17d61f(0x15f)](_0x969c99)?_0x317fc5[_0x17d61f(0x173)]=_0x969c99:_0x317fc5[_0x17d61f(0x173)]=_0x34aeb6?.[_0x17d61f(0x173)],_0x317fc5['datasetCode']=_0x16feca,_0x317fc5[_0x17d61f(0x155)]=_0x5553c1[_0x17d61f(0x155)],_0x317fc5[_0x17d61f(0x138)]=_0x5553c1[_0x17d61f(0x138)];}_0x431c6a[_0x17d61f(0x13b)][_0x5553c1[_0x17d61f(0x17c)]]=_0x317fc5;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x296ac7,_0x1f2857,_0x385263){const _0xe848ae=a37_0xd2ff64;if(_0x385263['length']===0x0)return;for(let _0x51022a=0x0;_0x51022a<LOCK_SETTLE_RETRY_COUNT;_0x51022a+=0x1){const _0x23b093=await readBffLockFile(_0x296ac7),_0x5afb2d=_0x23b093?.[_0xe848ae(0x176)]?.[_0x1f2857]?.['functions']??{},_0x4d6140=_0x385263[_0xe848ae(0x17d)](_0x1b26f3=>!!_0x5afb2d[_0x1b26f3]?.['remoteId']);if(_0x4d6140)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0xe848ae(0x137)+_0x385263[_0xe848ae(0x13c)](',\x20')+'.');}
@@ -1 +1 @@
1
- function a38_0x353a(_0x43b3d6,_0x24928d){_0x43b3d6=_0x43b3d6-0xab;const _0x118c70=a38_0x118c();let _0x353a5d=_0x118c70[_0x43b3d6];return _0x353a5d;}const a38_0x1c7167=a38_0x353a;(function(_0x295e00,_0x8e3c1a){const _0x4211a3=a38_0x353a,_0x2e3d3d=_0x295e00();while(!![]){try{const _0x368e98=parseInt(_0x4211a3(0xb6))/0x1+-parseInt(_0x4211a3(0xb4))/0x2*(-parseInt(_0x4211a3(0xb8))/0x3)+-parseInt(_0x4211a3(0xc4))/0x4+-parseInt(_0x4211a3(0xca))/0x5+-parseInt(_0x4211a3(0xb0))/0x6+parseInt(_0x4211a3(0xab))/0x7*(parseInt(_0x4211a3(0xba))/0x8)+parseInt(_0x4211a3(0xc7))/0x9;if(_0x368e98===_0x8e3c1a)break;else _0x2e3d3d['push'](_0x2e3d3d['shift']());}catch(_0x337418){_0x2e3d3d['push'](_0x2e3d3d['shift']());}}}(a38_0x118c,0x60b46));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a38_0x118c(){const _0x3a6328=['remote','all','3048600uLhkvR','appCode','length','bool','206yRJcmt','\x20remote-only','458171tEQaWH','\x20added,\x20','16539xTzlmz','All\x20BFF\x20scripts\x20are\x20in\x20sync.','186648dywKjr','status','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','read','functions','lockKey','filePath','push','map','\x20unchanged','309016dFFPOl','bff','lockFilePath','1458369PNCyZF','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','alias','1382940oLtgUh','apiDir','\x20modified,\x20','21HFvSVJ','scriptsRoot','has'];a38_0x118c=function(){return _0x3a6328;};return a38_0x118c();}export const bffStatus={'service':a38_0x1c7167(0xc5),'command':a38_0x1c7167(0xbb),'description':a38_0x1c7167(0xc8),'risk':a38_0x1c7167(0xbd),'flags':[{'name':a38_0x1c7167(0xae),'type':'boolean','description':a38_0x1c7167(0xbc)}],async 'execute'(_0x4ea356){const _0x5df3dc=a38_0x1c7167,_0xc8db3d=loadBffProjectConfig(_0x4ea356[_0x5df3dc(0xb1)]),_0x31ee37=await readBffLockFile(_0xc8db3d[_0x5df3dc(0xc6)]),{appLock:_0x3860c2}=ensureLockScope(_0x31ee37??createEmptyBffLock(),_0x4ea356[_0x5df3dc(0xb1)],_0xc8db3d[_0x5df3dc(0xac)],_0x5df3dc(0xbb)),_0x456285=await scanLocalBffFunctions(_0xc8db3d),_0x33b75b=[],_0x338254=[],_0x41ca16=[];for(const _0xc5ec9d of _0x456285){const _0x1ed36c=await computeFileHash(_0xc5ec9d[_0x5df3dc(0xc0)]),_0x20676a=_0x3860c2[_0x5df3dc(0xbe)][_0xc5ec9d['lockKey']];if(!_0x20676a)_0x33b75b[_0x5df3dc(0xc1)](_0xc5ec9d[_0x5df3dc(0xbf)]);else _0x20676a['hash']!==_0x1ed36c?_0x338254[_0x5df3dc(0xc1)](_0xc5ec9d['lockKey']):_0x41ca16[_0x5df3dc(0xc1)](_0xc5ec9d[_0x5df3dc(0xbf)]);}const _0x16c613=[];if(_0x4ea356[_0x5df3dc(0xb3)](_0x5df3dc(0xae))){const _0x547ac3=loadAliasMap(_0x4ea356[_0x5df3dc(0xcb)],undefined,resolveApiFilePath(_0x4ea356[_0x5df3dc(0xcb)],_0x4ea356[_0x5df3dc(0xb1)])),_0x27399a=new Map(_0x547ac3[_0x5df3dc(0xc2)](_0x30489=>[_0x30489['datasetCode'],_0x30489[_0x5df3dc(0xc9)]])),[_0x728e0a,_0x368b81]=await Promise[_0x5df3dc(0xaf)]([listBffScripts(_0x4ea356['appCode']),getBffScriptStatistics(_0x4ea356[_0x5df3dc(0xb1)])]),_0xbf0ce9=createHookLocationMap(_0x368b81),_0x543039=new Set(_0x456285['map'](_0xee42a6=>_0xee42a6[_0x5df3dc(0xbf)]));for(const _0x3d283d of _0x728e0a){const _0x591a8c=resolveRemoteScriptTarget(_0xc8db3d,_0x3d283d,_0xbf0ce9,_0x3860c2['functions'],_0x27399a);_0x591a8c&&!_0x543039[_0x5df3dc(0xad)](_0x591a8c[_0x5df3dc(0xbf)])&&_0x16c613[_0x5df3dc(0xc1)](_0x591a8c[_0x5df3dc(0xbf)]);}}const _0x47ce85=_0x33b75b[_0x5df3dc(0xb2)]===0x0&&_0x338254['length']===0x0&&_0x16c613[_0x5df3dc(0xb2)]===0x0;return{'ok':!![],'data':{'added':_0x33b75b,'modified':_0x338254,'unchanged':_0x41ca16,'remoteOnly':_0x16c613},'message':_0x47ce85?_0x5df3dc(0xb9):_0x33b75b['length']+_0x5df3dc(0xb7)+_0x338254[_0x5df3dc(0xb2)]+_0x5df3dc(0xcc)+_0x41ca16[_0x5df3dc(0xb2)]+_0x5df3dc(0xc3)+(_0x16c613[_0x5df3dc(0xb2)]>0x0?',\x20'+_0x16c613[_0x5df3dc(0xb2)]+_0x5df3dc(0xb5):'')};}};
1
+ function a38_0x50a0(_0x2ee4ed,_0x23fda9){_0x2ee4ed=_0x2ee4ed-0xc5;const _0x1989cf=a38_0x1989();let _0x50a07a=_0x1989cf[_0x2ee4ed];return _0x50a07a;}const a38_0x561814=a38_0x50a0;(function(_0x22a37b,_0x169524){const _0x56ec50=a38_0x50a0,_0x47ec4c=_0x22a37b();while(!![]){try{const _0x1dea97=-parseInt(_0x56ec50(0xc8))/0x1*(-parseInt(_0x56ec50(0xce))/0x2)+parseInt(_0x56ec50(0xd4))/0x3+-parseInt(_0x56ec50(0xdc))/0x4*(parseInt(_0x56ec50(0xcd))/0x5)+parseInt(_0x56ec50(0xd6))/0x6+-parseInt(_0x56ec50(0xe3))/0x7*(parseInt(_0x56ec50(0xd8))/0x8)+-parseInt(_0x56ec50(0xd1))/0x9+parseInt(_0x56ec50(0xd2))/0xa*(-parseInt(_0x56ec50(0xd3))/0xb);if(_0x1dea97===_0x169524)break;else _0x47ec4c['push'](_0x47ec4c['shift']());}catch(_0x436dbb){_0x47ec4c['push'](_0x47ec4c['shift']());}}}(a38_0x1989,0xd4f9a));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_0x1989(){const _0x6b624f=['scriptsRoot','371664qTFrnR','5267590PnKcDl','11RoYTlE','4345704AejlhG','functions','10399818pgQCIV','lockKey','272VkewYH','filePath','all','appCode','4CwdmgD','has','All\x20BFF\x20scripts\x20are\x20in\x20sync.','bff','\x20remote-only','push','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','294000SfXpgO','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','lockFilePath','length','alias','datasetCode','69tiPlXv','bool','\x20unchanged','boolean','status','6183795fJIQiH','26762iUHkrD','remote'];a38_0x1989=function(){return _0x6b624f;};return a38_0x1989();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x561814(0xdf),'command':a38_0x561814(0xcc),'description':a38_0x561814(0xe4),'risk':'read','flags':[{'name':a38_0x561814(0xcf),'type':a38_0x561814(0xcb),'description':a38_0x561814(0xe2)}],async 'execute'(_0x48b9cc){const _0x491041=a38_0x561814,_0x37abf0=loadBffProjectConfig(_0x48b9cc['appCode']),_0x5b9845=await readBffLockFile(_0x37abf0[_0x491041(0xe5)]),{appLock:_0x7bb058}=ensureLockScope(_0x5b9845??createEmptyBffLock(),_0x48b9cc[_0x491041(0xdb)],_0x37abf0[_0x491041(0xd0)],'status'),_0x3701c6=await scanLocalBffFunctions(_0x37abf0),_0x3897b9=[],_0x333207=[],_0x4ea287=[];for(const _0x4cddf6 of _0x3701c6){const _0x3ab09f=await computeFileHash(_0x4cddf6[_0x491041(0xd9)]),_0xb4faff=_0x7bb058[_0x491041(0xd5)][_0x4cddf6[_0x491041(0xd7)]];if(!_0xb4faff)_0x3897b9['push'](_0x4cddf6[_0x491041(0xd7)]);else _0xb4faff['hash']!==_0x3ab09f?_0x333207[_0x491041(0xe1)](_0x4cddf6[_0x491041(0xd7)]):_0x4ea287[_0x491041(0xe1)](_0x4cddf6[_0x491041(0xd7)]);}const _0x5b0e81=[];if(_0x48b9cc[_0x491041(0xc9)](_0x491041(0xcf))){const _0x33392e=loadAliasMap(_0x48b9cc['apiDir'],undefined,resolveApiFilePath(_0x48b9cc['apiDir'],_0x48b9cc[_0x491041(0xdb)])),_0x2a6fcd=new Map(_0x33392e['map'](_0x392991=>[_0x392991[_0x491041(0xc7)],_0x392991[_0x491041(0xc6)]])),[_0x2d85b6,_0xfba5a3]=await Promise[_0x491041(0xda)]([listBffScripts(_0x48b9cc['appCode']),getBffScriptStatistics(_0x48b9cc[_0x491041(0xdb)])]),_0xe9d7a0=createHookLocationMap(_0xfba5a3),_0x1ce190=new Set(_0x3701c6['map'](_0x35da7a=>_0x35da7a[_0x491041(0xd7)]));for(const _0x3f1072 of _0x2d85b6){const _0x15545f=resolveRemoteScriptTarget(_0x37abf0,_0x3f1072,_0xe9d7a0,_0x7bb058[_0x491041(0xd5)],_0x2a6fcd);_0x15545f&&!_0x1ce190[_0x491041(0xdd)](_0x15545f['lockKey'])&&_0x5b0e81['push'](_0x15545f['lockKey']);}}const _0x4a6cf6=_0x3897b9[_0x491041(0xc5)]===0x0&&_0x333207['length']===0x0&&_0x5b0e81[_0x491041(0xc5)]===0x0;return{'ok':!![],'data':{'added':_0x3897b9,'modified':_0x333207,'unchanged':_0x4ea287,'remoteOnly':_0x5b0e81},'message':_0x4a6cf6?_0x491041(0xde):_0x3897b9['length']+'\x20added,\x20'+_0x333207[_0x491041(0xc5)]+'\x20modified,\x20'+_0x4ea287[_0x491041(0xc5)]+_0x491041(0xca)+(_0x5b0e81[_0x491041(0xc5)]>0x0?',\x20'+_0x5b0e81[_0x491041(0xc5)]+_0x491041(0xe0):'')};}};
@@ -1 +1 @@
1
- const a39_0xce503d=a39_0x3175;(function(_0x3bd6b5,_0x37c38c){const _0x437cfb=a39_0x3175,_0x10cab1=_0x3bd6b5();while(!![]){try{const _0x49b65f=-parseInt(_0x437cfb(0x1f3))/0x1*(parseInt(_0x437cfb(0x1eb))/0x2)+-parseInt(_0x437cfb(0x1ff))/0x3+-parseInt(_0x437cfb(0x205))/0x4*(parseInt(_0x437cfb(0x204))/0x5)+parseInt(_0x437cfb(0x1ed))/0x6*(-parseInt(_0x437cfb(0x1f2))/0x7)+-parseInt(_0x437cfb(0x202))/0x8*(parseInt(_0x437cfb(0x1f4))/0x9)+-parseInt(_0x437cfb(0x1f6))/0xa+-parseInt(_0x437cfb(0x1f8))/0xb*(-parseInt(_0x437cfb(0x1ef))/0xc);if(_0x49b65f===_0x37c38c)break;else _0x10cab1['push'](_0x10cab1['shift']());}catch(_0x1c4a0f){_0x10cab1['push'](_0x10cab1['shift']());}}}(a39_0x3573,0x7f2b4));import{CliErrors}from'../../errors.js';function a39_0x3175(_0x4b1ee7,_0x8d411){_0x4b1ee7=_0x4b1ee7-0x1e9;const _0x3573cc=a39_0x3573();let _0x31752d=_0x3573cc[_0x4b1ee7];return _0x31752d;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0xce503d(0x1fc),'command':a39_0xce503d(0x1f1),'description':a39_0xce503d(0x203),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x85b04d){const _0x54e37e=a39_0xce503d;logger[_0x54e37e(0x1f5)](process[_0x54e37e(0x1e9)]()),logger['info'](_0x54e37e(0x1fd),_0x54e37e(0x200));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x13820c,RABETBASE_SKILL_SOURCE:_0x21be4d,runNpxSkillsAddGlobal:_0x29dcff}=await import(_0x54e37e(0x1fa)),_0x28fb78=_0x85b04d[_0x54e37e(0x1f7)]?_0x54e37e(0x1ea):_0x54e37e(0x1f9);console[_0x54e37e(0x207)](_0x54e37e(0x1ec)+_0x13820c+_0x54e37e(0x206));const _0x25c190=_0x29dcff(process[_0x54e37e(0x1e9)](),_0x21be4d,{'stdio':_0x28fb78});if(_0x25c190['skipped'])console[_0x54e37e(0x207)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x25c190['ok'])console[_0x54e37e(0x207)]('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0x54e37e(0x1fb)](_0x54e37e(0x201)+(_0x25c190[_0x54e37e(0x1ee)]||_0x54e37e(0x1fe)),_0x54e37e(0x1f0)+_0x13820c);}return{'ok':!![]};}}];function a39_0x3573(){const _0x31c69b=['apiError','cli-skill','cli-skill-install','unknown','2412237bAiVIp','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','npx\x20skills\x20add\x20failed:\x20','27944owFaPR','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','221675OpCGdu','20mKdnuv',')...','log','cwd','pipe','8152SaPsRM','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','12hkmcUC','error','55128QNvdQV','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','install','3085985CJNjXF','16nmqKfJ','630zLTwwS','setLogPath','4409740NxvcID','nonInteractive','7612QmyrhU','inherit','../../skills/npx-skills-add.js'];a39_0x3573=function(){return _0x31c69b;};return a39_0x3573();}
1
+ const a39_0x5da00d=a39_0x5ec6;(function(_0x3e8953,_0x13411b){const _0x1e90f7=a39_0x5ec6,_0x14d949=_0x3e8953();while(!![]){try{const _0x38e3e4=-parseInt(_0x1e90f7(0x140))/0x1*(parseInt(_0x1e90f7(0x13c))/0x2)+-parseInt(_0x1e90f7(0x14e))/0x3*(parseInt(_0x1e90f7(0x148))/0x4)+parseInt(_0x1e90f7(0x131))/0x5+parseInt(_0x1e90f7(0x142))/0x6+-parseInt(_0x1e90f7(0x145))/0x7+-parseInt(_0x1e90f7(0x14a))/0x8*(parseInt(_0x1e90f7(0x13b))/0x9)+parseInt(_0x1e90f7(0x12f))/0xa*(parseInt(_0x1e90f7(0x146))/0xb);if(_0x38e3e4===_0x13411b)break;else _0x14d949['push'](_0x14d949['shift']());}catch(_0x1e4349){_0x14d949['push'](_0x14d949['shift']());}}}(a39_0x1487,0xc9f59));function a39_0x1487(){const _0x5587a2=['1zpuOgi','cli-skill-install','4020612ApnzxL','inherit','cli-skill','1553181UrSJlj','132GmBYOb','apiError','12NFKssC','skipped','3984nUPRHb','log','pipe','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','961131ilQUwL','2347790bYZHVS',')...','720255NmyHMe','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','CLI\x20Built-in\x20Skill\x20installed','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','npx\x20skills\x20add\x20failed:\x20','nonInteractive','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','info','cwd','9333cAozAR','2209672PHadrk','../../skills/npx-skills-add.js','write','unknown'];a39_0x1487=function(){return _0x5587a2;};return a39_0x1487();}function a39_0x5ec6(_0x38c268,_0x468d17){_0x38c268=_0x38c268-0x12f;const _0x148763=a39_0x1487();let _0x5ec60e=_0x148763[_0x38c268];return _0x5ec60e;}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x5da00d(0x144),'command':'install','description':a39_0x5da00d(0x133),'risk':a39_0x5da00d(0x13e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x11257d){const _0x452221=a39_0x5da00d;logger['setLogPath'](process[_0x452221(0x13a)]()),logger[_0x452221(0x139)](_0x452221(0x141),_0x452221(0x135));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0xaf0c6,RABETBASE_SKILL_SOURCE:_0x5ee77e,runNpxSkillsAddGlobal:_0x521d4d}=await import(_0x452221(0x13d)),_0x4d8bef=_0x11257d[_0x452221(0x137)]?_0x452221(0x14c):_0x452221(0x143);console['log'](_0x452221(0x138)+_0xaf0c6+_0x452221(0x130));const _0x265a53=_0x521d4d(process[_0x452221(0x13a)](),_0x5ee77e,{'stdio':_0x4d8bef});if(_0x265a53[_0x452221(0x149)])console[_0x452221(0x14b)](_0x452221(0x132));else{if(_0x265a53['ok'])console[_0x452221(0x14b)](_0x452221(0x134));else throw CliErrors[_0x452221(0x147)](_0x452221(0x136)+(_0x265a53['error']||_0x452221(0x13f)),_0x452221(0x14d)+_0xaf0c6);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x14057d=a40_0x328e;(function(_0xa6f14,_0x2dc7cf){const _0x45dfb3=a40_0x328e,_0x3c47ca=_0xa6f14();while(!![]){try{const _0x3c1d76=parseInt(_0x45dfb3(0xc8))/0x1*(parseInt(_0x45dfb3(0xc6))/0x2)+-parseInt(_0x45dfb3(0x90))/0x3+-parseInt(_0x45dfb3(0x79))/0x4+-parseInt(_0x45dfb3(0x7b))/0x5+-parseInt(_0x45dfb3(0xbf))/0x6*(-parseInt(_0x45dfb3(0xc2))/0x7)+parseInt(_0x45dfb3(0x7f))/0x8*(parseInt(_0x45dfb3(0xb6))/0x9)+-parseInt(_0x45dfb3(0xc5))/0xa*(parseInt(_0x45dfb3(0x85))/0xb);if(_0x3c1d76===_0x2dc7cf)break;else _0x3c47ca['push'](_0x3c47ca['shift']());}catch(_0x12f7e5){_0x3c47ca['push'](_0x3c47ca['shift']());}}}(a40_0x2acc,0x99ead));function a40_0x2acc(){const _0x509ddc=['flag','5224XnCwMZ','Install\x20a\x20specific\x20CLI\x20version','validation','valid','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','bool','44CLewHq','update','Version\x20comparison\x20failed','toLowerCase','@latest','gray','start','Current\x20version:\x20','\x20\x20Run\x20manually:\x20','Checking\x20for\x20updates...','includes','1601844QxVEKn','Update\x20failed','trim','slice','skills','pipe','bun','succeed','green','info','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20install\x20-g\x20','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','\x20→\x20','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','yellow','log','Update\x20available:\x20','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','https://registry.npmjs.org/-/package/','timeout','Already\x20up\x20to\x20date\x20(v','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','fail','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','message','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20cli-skill\x20install','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Updating\x20via\x20','error','boolean','/dist-tags','npm','beta','source','nonInteractive','version','738egUBjn','run','red','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','fromEntries','length','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','unknown','no-skills','2010sqvcDM','warn','inherit','15197wrsKoM','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','latest','747290QhQLFe','3714SInJuT','Invalid\x20version:\x20','549JggEDa','string','\x20\x20Try\x20manually:\x20','Updated\x20to\x20v','str','map','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','1168376wLPAjX','object','224605UgFFzR','skipped','write'];a40_0x2acc=function(){return _0x509ddc;};return a40_0x2acc();}import a40_0x2068a7 from'chalk';import a40_0x1dc441 from'ora';import a40_0x314ff9 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function a40_0x328e(_0xe4f121,_0x52d244){_0xe4f121=_0xe4f121-0x78;const _0x2accc0=a40_0x2acc();let _0x328e00=_0x2accc0[_0xe4f121];return _0x328e00;}function getCurrentVersion(){const _0x263db7=a40_0x328e;return GIT_COMMIT!==_0x263db7(0xbd)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x263db7(0x93)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3b4e83=a40_0x328e,_0x79cad7=process['execPath'][_0x3b4e83(0x88)]();if(_0x79cad7[_0x3b4e83(0x8f)](_0x3b4e83(0x96)))return _0x3b4e83(0x96);return _0x3b4e83(0xb1);}const updateFlags=[{'name':'beta','type':a40_0x14057d(0xaf),'description':a40_0x14057d(0x83),'default':![]},{'name':a40_0x14057d(0xb5),'type':'string','description':a40_0x14057d(0x80)},{'name':a40_0x14057d(0xbe),'type':'boolean','description':a40_0x14057d(0x9c),'default':![]},{'name':a40_0x14057d(0x94),'type':a40_0x14057d(0xaf),'description':a40_0x14057d(0x78),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x5ba4b2){const _0x87fc13=a40_0x14057d;return _0x5ba4b2[_0x87fc13(0xcc)](_0x87fc13(0xb5))[_0x87fc13(0x92)]();}function shouldSkipCliSkill(_0x5a6546){const _0x4c9cc0=a40_0x14057d;return _0x5a6546[_0x4c9cc0(0x84)](_0x4c9cc0(0xbe))||_0x5a6546[_0x4c9cc0(0x7e)](_0x4c9cc0(0x94))===![];}async function validateUpdateFlags(_0x212fe){const _0x4ee06f=a40_0x14057d,_0x1e0547=_0x212fe[_0x4ee06f(0x84)]('beta'),_0x38eba7=getRequestedVersion(_0x212fe);if(_0x1e0547&&_0x38eba7)throw CliErrors[_0x4ee06f(0x81)](_0x4ee06f(0xaa),_0x4ee06f(0xbc));if(_0x38eba7&&!a40_0x314ff9[_0x4ee06f(0x82)](_0x38eba7))throw CliErrors[_0x4ee06f(0x81)](_0x4ee06f(0xc7)+_0x38eba7,_0x4ee06f(0xa6));}async function fetchNpmDistTags(){const _0x2c916f=a40_0x14057d;try{const _0x48742d=await fetch(_0x2c916f(0xa3)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2c916f(0xb0),{'signal':AbortSignal[_0x2c916f(0xa4)](0x2710)});if(!_0x48742d['ok'])return null;const _0x5c1b3f=await _0x48742d['json']();if(!_0x5c1b3f||typeof _0x5c1b3f!==_0x2c916f(0x7a))return null;return Object[_0x2c916f(0xba)](Object['entries'](_0x5c1b3f)['filter'](([,_0x1a947f])=>typeof _0x1a947f===_0x2c916f(0xc9)&&_0x1a947f['trim']()[_0x2c916f(0xbb)]>0x0)[_0x2c916f(0xcd)](([_0x2502cf,_0x1c9f61])=>[_0x2502cf,String(_0x1c9f61)[_0x2c916f(0x92)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x429e28){const _0x56f720=await fetchNpmDistTags();return _0x56f720?.[_0x429e28]??null;}async function fetchLatestVersion(){const _0x5f0df1=a40_0x14057d;return fetchNpmDistTagVersion(_0x5f0df1(0xc4));}async function resolveTargetVersion(_0x4f7207){const _0x3ba325=a40_0x14057d,_0x3dc69a=getRequestedVersion(_0x4f7207);if(_0x3dc69a)return{'version':_0x3dc69a,'source':_0x3ba325(0xb5)};if(_0x4f7207[_0x3ba325(0x84)](_0x3ba325(0xb2))){const _0x58b110=await fetchNpmDistTagVersion(_0x3ba325(0xb2));if(!_0x58b110)return null;return{'version':_0x58b110,'source':_0x3ba325(0xb2)};}const _0x45dd06=await fetchLatestVersion();if(!_0x45dd06)return null;return{'version':_0x45dd06,'source':_0x3ba325(0xc4)};}function shouldInstallTarget(_0x1b8249,_0x227f41){const _0x547654=a40_0x14057d;if(_0x227f41['source']===_0x547654(0xb5)||_0x227f41[_0x547654(0xb3)]===_0x547654(0xb2))return!a40_0x314ff9['eq'](_0x1b8249,_0x227f41[_0x547654(0xb5)]);return a40_0x314ff9['lt'](_0x1b8249,_0x227f41['version']);}function getInstallPlanLabel(_0x20662e,_0x38dcf3){const _0x450f5d=a40_0x14057d;switch(_0x38dcf3[_0x450f5d(0xb3)]){case _0x450f5d(0xb2):return'Beta\x20version:\x20'+a40_0x2068a7[_0x450f5d(0x9f)](_0x20662e)+_0x450f5d(0x9d)+a40_0x2068a7['green'](_0x38dcf3[_0x450f5d(0xb5)]);case _0x450f5d(0xb5):return'Requested\x20version:\x20'+a40_0x2068a7['yellow'](_0x20662e)+_0x450f5d(0x9d)+a40_0x2068a7[_0x450f5d(0x98)](_0x38dcf3[_0x450f5d(0xb5)]);case _0x450f5d(0xc4):default:return _0x450f5d(0xa1)+a40_0x2068a7['yellow'](_0x20662e)+_0x450f5d(0x9d)+a40_0x2068a7[_0x450f5d(0x98)](_0x38dcf3[_0x450f5d(0xb5)]);}}async function installCliSkill(_0x2c0005){const _0x48d6b0=a40_0x14057d;console['log'](a40_0x2068a7[_0x48d6b0(0x8a)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x14824e=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x2c0005?_0x48d6b0(0x95):_0x48d6b0(0xc1)});if(_0x14824e[_0x48d6b0(0x7c)]){console['log'](a40_0x2068a7[_0x48d6b0(0x8a)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x14824e['ok']){console[_0x48d6b0(0xa0)](a40_0x2068a7['gray'](_0x48d6b0(0x9e)));return;}console[_0x48d6b0(0xc0)](a40_0x2068a7[_0x48d6b0(0x9f)](_0x48d6b0(0xac)+(_0x14824e['error']||'unknown'))),console['log'](a40_0x2068a7[_0x48d6b0(0x8a)](_0x48d6b0(0x8d)+CLI_BIN_NAME+_0x48d6b0(0xab)));}async function execute(_0x50d2ef){const _0x1500c9=a40_0x14057d;await validateUpdateFlags(_0x50d2ef);const _0x5aab8f=getCurrentVersion();console['log'](_0x1500c9(0x8c)+_0x5aab8f);const _0x2d9e8d=a40_0x1dc441(_0x1500c9(0x8e))[_0x1500c9(0x8b)](),_0x4d0d49=await resolveTargetVersion(_0x50d2ef);if(!_0x4d0d49){const _0x283819=_0x50d2ef[_0x1500c9(0x84)](_0x1500c9(0xb2))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x1500c9(0xb9);return _0x2d9e8d[_0x1500c9(0xa7)](_0x283819),console[_0x1500c9(0xa0)](a40_0x2068a7[_0x1500c9(0x8a)](_0x1500c9(0xc3)+NPM_PACKAGE_NAME+_0x1500c9(0x89))),{'ok':![],'message':_0x283819};}const _0x9367c4=a40_0x314ff9[_0x1500c9(0x82)](VERSION),_0x1c7fe9=a40_0x314ff9[_0x1500c9(0x82)](_0x4d0d49[_0x1500c9(0xb5)]);if(!_0x9367c4||!_0x1c7fe9)return _0x2d9e8d['fail']('Version\x20comparison\x20failed'),{'ok':![],'message':_0x1500c9(0x87)};if(!shouldInstallTarget(_0x9367c4,_0x4d0d49)){const _0x5ccf3c=_0x4d0d49[_0x1500c9(0xb3)]===_0x1500c9(0xb5)?'Already\x20on\x20requested\x20version\x20(v'+_0x4d0d49['version']+')':_0x1500c9(0xa5)+_0x4d0d49[_0x1500c9(0xb5)]+')';return _0x2d9e8d[_0x1500c9(0x97)](_0x5ccf3c),shouldSkipCliSkill(_0x50d2ef)?console[_0x1500c9(0xa0)](a40_0x2068a7[_0x1500c9(0x8a)](_0x1500c9(0xa2))):await installCliSkill(_0x50d2ef[_0x1500c9(0xb4)]),{'ok':!![]};}_0x2d9e8d[_0x1500c9(0x99)](getInstallPlanLabel(_0x5aab8f,_0x4d0d49));const _0x2784e4=detectPackageManager(),_0x376aa1=_0x2784e4===_0x1500c9(0xb1)?resolveNpmBin(_0x1500c9(0xb1)):_0x2784e4,_0x555087=a40_0x1dc441(_0x1500c9(0xad)+_0x2784e4+'...')[_0x1500c9(0x8b)]();try{return await execa(_0x376aa1,['install','-g',NPM_PACKAGE_NAME+'@'+_0x4d0d49[_0x1500c9(0xb5)]],{'stdio':_0x1500c9(0x95)}),_0x555087[_0x1500c9(0x97)](_0x1500c9(0xcb)+_0x4d0d49[_0x1500c9(0xb5)]),console[_0x1500c9(0xa0)](a40_0x2068a7[_0x1500c9(0x8a)](_0x1500c9(0x9a))),shouldSkipCliSkill(_0x50d2ef)?console[_0x1500c9(0xa0)](a40_0x2068a7[_0x1500c9(0x8a)](_0x1500c9(0xa2))):await installCliSkill(_0x50d2ef[_0x1500c9(0xb4)]),{'ok':!![]};}catch(_0x367a09){return _0x555087['fail'](_0x1500c9(0x91)),console[_0x1500c9(0xae)](a40_0x2068a7[_0x1500c9(0xb8)]('\x20\x20'+_0x367a09[_0x1500c9(0xa9)])),console[_0x1500c9(0xa0)](a40_0x2068a7[_0x1500c9(0x8a)](_0x1500c9(0xca)+_0x2784e4+_0x1500c9(0x9b)+NPM_PACKAGE_NAME+'@'+_0x4d0d49[_0x1500c9(0xb5)])),{'ok':![],'message':_0x367a09[_0x1500c9(0xa9)]};}}export const updateDefinition={'service':a40_0x14057d(0x86),'command':a40_0x14057d(0xb7),'description':a40_0x14057d(0xa8),'risk':a40_0x14057d(0x7d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0x260e5c=a40_0x238e;(function(_0x46cafe,_0x4df652){const _0x488bc6=a40_0x238e,_0x2310d2=_0x46cafe();while(!![]){try{const _0x406b57=-parseInt(_0x488bc6(0x162))/0x1*(-parseInt(_0x488bc6(0x147))/0x2)+-parseInt(_0x488bc6(0x173))/0x3+parseInt(_0x488bc6(0x164))/0x4+parseInt(_0x488bc6(0x143))/0x5+parseInt(_0x488bc6(0x165))/0x6+parseInt(_0x488bc6(0x16a))/0x7*(-parseInt(_0x488bc6(0x16c))/0x8)+parseInt(_0x488bc6(0x14a))/0x9;if(_0x406b57===_0x4df652)break;else _0x2310d2['push'](_0x2310d2['shift']());}catch(_0x28bc2e){_0x2310d2['push'](_0x2310d2['shift']());}}}(a40_0x5d38,0x5a5a9));import a40_0x3bce2f from'chalk';import a40_0x549b44 from'ora';function a40_0x5d38(){const _0x155db6=['red','671785KZqLWE','start','run','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','1298CmuRRL','Checking\x20for\x20updates...','boolean','5113476izPNFw','skipped','nonInteractive','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Checking\x20CLI\x20Built-in\x20Skill...','\x20\x20Try\x20manually:\x20','pipe','map','Already\x20up\x20to\x20date\x20(v','\x20install\x20-g\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','@latest','str','skills','Beta\x20version:\x20','install','includes','gray','timeout','fail','trim','valid','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','version','166aREUnE','filter','6124XxCESM','1503690lWBgvZ','slice','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','inherit','1878989TVVhCk','beta','16MNdYea','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','latest','warn','...','/dist-tags','source','466374QMmARg','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','validation','cwd','green','yellow','Requested\x20version:\x20','bool','succeed','object','json','entries','Already\x20on\x20requested\x20version\x20(v','bun','Update\x20failed','error','https://registry.npmjs.org/-/package/','\x20\x20Run\x20manually:\x20','Updating\x20via\x20','message','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','flag','Update\x20available:\x20','Install\x20a\x20specific\x20CLI\x20version','npm','no-skills','log','fromEntries','Version\x20comparison\x20failed','Invalid\x20version:\x20','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','Current\x20version:\x20','unknown','string','\x20→\x20'];a40_0x5d38=function(){return _0x155db6;};return a40_0x5d38();}import a40_0x16ebb2 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x3c07d5=a40_0x238e;return GIT_COMMIT!==_0x3c07d5(0x13f)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3c07d5(0x166)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1ded4c=a40_0x238e,_0x242b72=process['execPath']['toLowerCase']();if(_0x242b72[_0x1ded4c(0x15a)](_0x1ded4c(0x180)))return _0x1ded4c(0x180);return _0x1ded4c(0x137);}function a40_0x238e(_0x3fcc25,_0x52c31b){_0x3fcc25=_0x3fcc25-0x133;const _0x5d387d=a40_0x5d38();let _0x238e83=_0x5d387d[_0x3fcc25];return _0x238e83;}const updateFlags=[{'name':a40_0x260e5c(0x16b),'type':a40_0x260e5c(0x149),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0x260e5c(0x161),'type':'string','description':a40_0x260e5c(0x136)},{'name':'no-skills','type':a40_0x260e5c(0x149),'description':a40_0x260e5c(0x13d),'default':![]},{'name':a40_0x260e5c(0x157),'type':a40_0x260e5c(0x149),'description':a40_0x260e5c(0x167),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x127946){const _0x231a55=a40_0x260e5c;return _0x127946[_0x231a55(0x156)](_0x231a55(0x161))[_0x231a55(0x15e)]();}function shouldSkipCliSkill(_0x3b7c22){const _0x2ad880=a40_0x260e5c;return _0x3b7c22[_0x2ad880(0x17a)](_0x2ad880(0x138))||_0x3b7c22[_0x2ad880(0x134)](_0x2ad880(0x157))===![];}async function validateUpdateFlags(_0x3f254f){const _0x1175d0=a40_0x260e5c,_0x57c94f=_0x3f254f[_0x1175d0(0x17a)]('beta'),_0x91471a=getRequestedVersion(_0x3f254f);if(_0x57c94f&&_0x91471a)throw CliErrors['validation'](_0x1175d0(0x133),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x91471a&&!a40_0x16ebb2['valid'](_0x91471a))throw CliErrors[_0x1175d0(0x175)](_0x1175d0(0x13c)+_0x91471a,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x125492=a40_0x260e5c;try{const _0x35231b=await fetch(_0x125492(0x183)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x125492(0x171),{'signal':AbortSignal[_0x125492(0x15c)](0x2710)});if(!_0x35231b['ok'])return null;const _0x5f2c55=await _0x35231b[_0x125492(0x17d)]();if(!_0x5f2c55||typeof _0x5f2c55!==_0x125492(0x17c))return null;return Object[_0x125492(0x13a)](Object[_0x125492(0x17e)](_0x5f2c55)[_0x125492(0x163)](([,_0x49498a])=>typeof _0x49498a===_0x125492(0x140)&&_0x49498a[_0x125492(0x15e)]()['length']>0x0)[_0x125492(0x151)](([_0x3b61d1,_0x4a7bac])=>[_0x3b61d1,String(_0x4a7bac)[_0x125492(0x15e)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2d3735){const _0x28a0ba=await fetchNpmDistTags();return _0x28a0ba?.[_0x2d3735]??null;}async function fetchLatestVersion(){const _0x1bcbc4=a40_0x260e5c;return fetchNpmDistTagVersion(_0x1bcbc4(0x16e));}async function resolveTargetVersion(_0xedf73f){const _0x537f13=a40_0x260e5c,_0x8f046b=getRequestedVersion(_0xedf73f);if(_0x8f046b)return{'version':_0x8f046b,'source':_0x537f13(0x161)};if(_0xedf73f['bool'](_0x537f13(0x16b))){const _0x2fc9ca=await fetchNpmDistTagVersion(_0x537f13(0x16b));if(!_0x2fc9ca)return null;return{'version':_0x2fc9ca,'source':_0x537f13(0x16b)};}const _0x22625d=await fetchLatestVersion();if(!_0x22625d)return null;return{'version':_0x22625d,'source':'latest'};}function shouldInstallTarget(_0x2bacb0,_0x1b6ab7){const _0x2d10d1=a40_0x260e5c;if(_0x1b6ab7['source']===_0x2d10d1(0x161)||_0x1b6ab7[_0x2d10d1(0x172)]===_0x2d10d1(0x16b))return!a40_0x16ebb2['eq'](_0x2bacb0,_0x1b6ab7[_0x2d10d1(0x161)]);return a40_0x16ebb2['lt'](_0x2bacb0,_0x1b6ab7['version']);}function getInstallPlanLabel(_0x75161e,_0x19fe86){const _0x58ac93=a40_0x260e5c;switch(_0x19fe86['source']){case'beta':return _0x58ac93(0x158)+a40_0x3bce2f[_0x58ac93(0x178)](_0x75161e)+_0x58ac93(0x141)+a40_0x3bce2f[_0x58ac93(0x177)](_0x19fe86[_0x58ac93(0x161)]);case _0x58ac93(0x161):return _0x58ac93(0x179)+a40_0x3bce2f['yellow'](_0x75161e)+_0x58ac93(0x141)+a40_0x3bce2f['green'](_0x19fe86[_0x58ac93(0x161)]);case'latest':default:return _0x58ac93(0x135)+a40_0x3bce2f['yellow'](_0x75161e)+_0x58ac93(0x141)+a40_0x3bce2f[_0x58ac93(0x177)](_0x19fe86[_0x58ac93(0x161)]);}}async function installCliSkill(_0xc7909a){const _0xab2dd3=a40_0x260e5c;console[_0xab2dd3(0x139)](a40_0x3bce2f[_0xab2dd3(0x15b)](_0xab2dd3(0x14e)));const _0x3537ae=runNpxSkillsAddGlobal(process[_0xab2dd3(0x176)](),RABETBASE_SKILL_SOURCE,{'stdio':_0xc7909a?_0xab2dd3(0x150):_0xab2dd3(0x169)});if(_0x3537ae[_0xab2dd3(0x14b)]){console['log'](a40_0x3bce2f[_0xab2dd3(0x15b)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x3537ae['ok']){console['log'](a40_0x3bce2f[_0xab2dd3(0x15b)](_0xab2dd3(0x146)));return;}console[_0xab2dd3(0x16f)](a40_0x3bce2f[_0xab2dd3(0x178)](_0xab2dd3(0x168)+(_0x3537ae[_0xab2dd3(0x182)]||_0xab2dd3(0x13f)))),console[_0xab2dd3(0x139)](a40_0x3bce2f[_0xab2dd3(0x15b)](_0xab2dd3(0x184)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x1a7513){const _0x533111=a40_0x260e5c;await validateUpdateFlags(_0x1a7513);const _0x52e88d=getCurrentVersion();console[_0x533111(0x139)](_0x533111(0x13e)+_0x52e88d);const _0x3da502=a40_0x549b44(_0x533111(0x148))[_0x533111(0x144)](),_0x24732f=await resolveTargetVersion(_0x1a7513);if(!_0x24732f){const _0x2ffe87=_0x1a7513[_0x533111(0x17a)](_0x533111(0x16b))?_0x533111(0x16d):_0x533111(0x174);return _0x3da502['fail'](_0x2ffe87),console['log'](a40_0x3bce2f['gray'](_0x533111(0x154)+NPM_PACKAGE_NAME+_0x533111(0x155))),{'ok':![],'message':_0x2ffe87};}const _0x3848e4=a40_0x16ebb2[_0x533111(0x15f)](VERSION),_0x49058d=a40_0x16ebb2[_0x533111(0x15f)](_0x24732f[_0x533111(0x161)]);if(!_0x3848e4||!_0x49058d)return _0x3da502['fail'](_0x533111(0x13b)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x3848e4,_0x24732f)){const _0x48fd1c=_0x24732f[_0x533111(0x172)]===_0x533111(0x161)?_0x533111(0x17f)+_0x24732f[_0x533111(0x161)]+')':_0x533111(0x152)+_0x24732f[_0x533111(0x161)]+')';return _0x3da502['succeed'](_0x48fd1c),shouldSkipCliSkill(_0x1a7513)?console['log'](a40_0x3bce2f[_0x533111(0x15b)](_0x533111(0x14d))):await installCliSkill(_0x1a7513[_0x533111(0x14c)]),{'ok':!![]};}_0x3da502['info'](getInstallPlanLabel(_0x52e88d,_0x24732f));const _0x5ea5b6=detectPackageManager(),_0x438e1d=_0x5ea5b6==='npm'?resolveNpmBin(_0x533111(0x137)):_0x5ea5b6,_0x310ffe=a40_0x549b44(_0x533111(0x185)+_0x5ea5b6+_0x533111(0x170))['start']();try{return await execa(_0x438e1d,[_0x533111(0x159),'-g',NPM_PACKAGE_NAME+'@'+_0x24732f['version']],{'stdio':'pipe'}),_0x310ffe[_0x533111(0x17b)]('Updated\x20to\x20v'+_0x24732f[_0x533111(0x161)]),console[_0x533111(0x139)](a40_0x3bce2f[_0x533111(0x15b)](_0x533111(0x160))),shouldSkipCliSkill(_0x1a7513)?console[_0x533111(0x139)](a40_0x3bce2f[_0x533111(0x15b)](_0x533111(0x14d))):await installCliSkill(_0x1a7513[_0x533111(0x14c)]),{'ok':!![]};}catch(_0x575927){return _0x310ffe[_0x533111(0x15d)](_0x533111(0x181)),console[_0x533111(0x182)](a40_0x3bce2f[_0x533111(0x142)]('\x20\x20'+_0x575927[_0x533111(0x186)])),console[_0x533111(0x139)](a40_0x3bce2f['gray'](_0x533111(0x14f)+_0x5ea5b6+_0x533111(0x153)+NPM_PACKAGE_NAME+'@'+_0x24732f['version'])),{'ok':![],'message':_0x575927['message']};}}export const updateDefinition={'service':'update','command':a40_0x260e5c(0x145),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a41_0x31be(_0x4c943d,_0x1a0f57){_0x4c943d=_0x4c943d-0xcd;const _0x23fc5a=a41_0x23fc();let _0x31be24=_0x23fc5a[_0x4c943d];return _0x31be24;}function a41_0x23fc(){const _0x51e239=['289BOYhDG','9YYcGRD','7LnWCfe','55tGjbDN','2351055pDeaZL','44450758iYQyaJ','4479378eVHlzL','7546560nnlIRm','264904jqvxwD','5042712eesmsB','2008NWinxa'];a41_0x23fc=function(){return _0x51e239;};return a41_0x23fc();}(function(_0x404c1a,_0x3a7f83){const _0xb46280=a41_0x31be,_0x4fd466=_0x404c1a();while(!![]){try{const _0x59ae31=parseInt(_0xb46280(0xd7))/0x1*(parseInt(_0xb46280(0xd6))/0x2)+-parseInt(_0xb46280(0xd0))/0x3+-parseInt(_0xb46280(0xd4))/0x4*(parseInt(_0xb46280(0xcf))/0x5)+-parseInt(_0xb46280(0xd2))/0x6*(parseInt(_0xb46280(0xce))/0x7)+parseInt(_0xb46280(0xd5))/0x8*(-parseInt(_0xb46280(0xcd))/0x9)+-parseInt(_0xb46280(0xd3))/0xa+parseInt(_0xb46280(0xd1))/0xb;if(_0x59ae31===_0x3a7f83)break;else _0x4fd466['push'](_0x4fd466['shift']());}catch(_0x5d1a3a){_0x4fd466['push'](_0x4fd466['shift']());}}}(a41_0x23fc,0xa7d2d));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a41_0x2666(_0x16c637,_0x43fc80){_0x16c637=_0x16c637-0x156;const _0x41f834=a41_0x41f8();let _0x266657=_0x41f834[_0x16c637];return _0x266657;}(function(_0x1925db,_0x23659e){const _0x25edd6=a41_0x2666,_0x2f8aff=_0x1925db();while(!![]){try{const _0x550745=-parseInt(_0x25edd6(0x15d))/0x1+parseInt(_0x25edd6(0x15c))/0x2*(parseInt(_0x25edd6(0x157))/0x3)+-parseInt(_0x25edd6(0x15e))/0x4*(parseInt(_0x25edd6(0x159))/0x5)+parseInt(_0x25edd6(0x15a))/0x6+parseInt(_0x25edd6(0x15f))/0x7+-parseInt(_0x25edd6(0x158))/0x8+-parseInt(_0x25edd6(0x156))/0x9*(-parseInt(_0x25edd6(0x15b))/0xa);if(_0x550745===_0x23659e)break;else _0x2f8aff['push'](_0x2f8aff['shift']());}catch(_0x5bdfdb){_0x2f8aff['push'](_0x2f8aff['shift']());}}}(a41_0x41f8,0xe12ce));import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x41f8(){const _0x569575=['278397khiJSL','9KnFmQa','653960vKjveD','7265VxDOaH','4202700ItwRIM','370rtULVq','844330QsNwHq','1391141jhbAiG','2440VKTfmK','1190476LWbRgu'];a41_0x41f8=function(){return _0x569575;};return a41_0x41f8();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a42_0x351b96=a42_0x322a;(function(_0x1da17d,_0x235b3d){const _0x121eb7=a42_0x322a,_0x82cbc3=_0x1da17d();while(!![]){try{const _0x12b495=parseInt(_0x121eb7(0xab))/0x1+-parseInt(_0x121eb7(0xac))/0x2*(parseInt(_0x121eb7(0xb6))/0x3)+-parseInt(_0x121eb7(0xaf))/0x4+parseInt(_0x121eb7(0xae))/0x5+-parseInt(_0x121eb7(0xa1))/0x6+parseInt(_0x121eb7(0xb2))/0x7*(parseInt(_0x121eb7(0xb4))/0x8)+-parseInt(_0x121eb7(0xad))/0x9*(-parseInt(_0x121eb7(0xa8))/0xa);if(_0x12b495===_0x235b3d)break;else _0x82cbc3['push'](_0x82cbc3['shift']());}catch(_0x2d01d4){_0x82cbc3['push'](_0x82cbc3['shift']());}}}(a42_0x5e11,0xab13c));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x322a(_0x1c1d7c,_0x57a09a){_0x1c1d7c=_0x1c1d7c-0xa1;const _0x5e11f0=a42_0x5e11();let _0x322ac3=_0x5e11f0[_0x1c1d7c];return _0x322ac3;}export const codegenSdk={'service':a42_0x351b96(0xa7),'command':a42_0x351b96(0xb1),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a42_0x351b96(0xaa),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x351b96(0xa2),'type':a42_0x351b96(0xa9),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':'operation','type':a42_0x351b96(0xa9),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a42_0x351b96(0xb0),'type':a42_0x351b96(0xb3),'description':a42_0x351b96(0xa4)}],async 'execute'(_0x3383fc){const _0x281593=a42_0x351b96,{dataset:_0xc0c971,operation:_0x3fc60d}=await getOperationDetail(_0x3383fc['appCode'],_0x3383fc[_0x281593(0xb7)](_0x281593(0xa6)),_0x3383fc['str'](_0x281593(0xa3))),_0x4c97e2=generateSdkCode(_0xc0c971,_0x3fc60d,{'includeImports':!_0x3383fc['bool'](_0x281593(0xb0))});return{'ok':!![],'data':{'dataset':{'name':_0xc0c971[_0x281593(0xa5)],'code':_0xc0c971[_0x281593(0xa6)],'tableName':_0xc0c971[_0x281593(0xb5)]},'operation':_0x3383fc['str'](_0x281593(0xa3)),'code':_0x4c97e2}};}};function a42_0x5e11(){const _0x5cd020=['4223300UiXJbN','4886588OXcVvW','skip-imports','sdk','1638IUykQa','boolean','3832kWOBEe','tableName','48xPqcPA','str','279996uCIkQd','alias','operation','Omit\x20import\x20statements\x20from\x20generated\x20code','name','code','codegen','163940WBCPLI','string','read','549421Mtjdfk','63046kNMtHk','531vjghft'];a42_0x5e11=function(){return _0x5cd020;};return a42_0x5e11();}
1
+ const a42_0x4b6c41=a42_0x8696;function a42_0x298a(){const _0x353f04=['7110025nrGEpJ','str','operation','1109856FkClTW','skip-imports','codegen','305240ZJEboS','appCode','1278WKCluj','1058NkOvKe','alias','string','8HXoTFd','bool','1422GfuUmD','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','name','read','sdk','1488208iCOzlf','boolean','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','11224052Ntmwfr','3745242fBXIYr'];a42_0x298a=function(){return _0x353f04;};return a42_0x298a();}function a42_0x8696(_0x2d3ef0,_0x45ca57){_0x2d3ef0=_0x2d3ef0-0x181;const _0x298a89=a42_0x298a();let _0x869684=_0x298a89[_0x2d3ef0];return _0x869684;}(function(_0x505fbf,_0x45615d){const _0x531fb1=a42_0x8696,_0x5f50ba=_0x505fbf();while(!![]){try{const _0x243dac=-parseInt(_0x531fb1(0x187))/0x1+-parseInt(_0x531fb1(0x195))/0x2*(-parseInt(_0x531fb1(0x194))/0x3)+-parseInt(_0x531fb1(0x18f))/0x4+-parseInt(_0x531fb1(0x18c))/0x5+parseInt(_0x531fb1(0x18b))/0x6+parseInt(_0x531fb1(0x18a))/0x7*(-parseInt(_0x531fb1(0x198))/0x8)+-parseInt(_0x531fb1(0x181))/0x9*(-parseInt(_0x531fb1(0x192))/0xa);if(_0x243dac===_0x45615d)break;else _0x5f50ba['push'](_0x5f50ba['shift']());}catch(_0x26ca9b){_0x5f50ba['push'](_0x5f50ba['shift']());}}}(a42_0x298a,0xd7258));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x4b6c41(0x191),'command':a42_0x4b6c41(0x186),'description':a42_0x4b6c41(0x189),'risk':a42_0x4b6c41(0x185),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x4b6c41(0x196),'type':a42_0x4b6c41(0x197),'description':a42_0x4b6c41(0x183)},{'name':a42_0x4b6c41(0x18e),'type':a42_0x4b6c41(0x197),'required':!![],'description':a42_0x4b6c41(0x182)},{'name':a42_0x4b6c41(0x190),'type':a42_0x4b6c41(0x188),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x26e957){const _0x4bd2e3=a42_0x4b6c41,{dataset:_0x885414,operation:_0x56d627}=await getOperationDetail(_0x26e957[_0x4bd2e3(0x193)],_0x26e957['str']('code'),_0x26e957[_0x4bd2e3(0x18d)](_0x4bd2e3(0x18e))),_0x3949d2=generateSdkCode(_0x885414,_0x56d627,{'includeImports':!_0x26e957[_0x4bd2e3(0x199)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x885414[_0x4bd2e3(0x184)],'code':_0x885414['code'],'tableName':_0x885414['tableName']},'operation':_0x26e957[_0x4bd2e3(0x18d)](_0x4bd2e3(0x18e)),'code':_0x3949d2}};}};
@@ -1 +1 @@
1
- function a43_0x2a8f(_0x5402cd,_0x555cca){_0x5402cd=_0x5402cd-0x1ea;const _0xfc617=a43_0xfc61();let _0x2a8feb=_0xfc617[_0x5402cd];return _0x2a8feb;}const a43_0x4ef11f=a43_0x2a8f;(function(_0x2b72bc,_0x4e92d8){const _0x16ed95=a43_0x2a8f,_0x1a67ff=_0x2b72bc();while(!![]){try{const _0x456d87=parseInt(_0x16ed95(0x1ea))/0x1+-parseInt(_0x16ed95(0x1eb))/0x2*(parseInt(_0x16ed95(0x1f4))/0x3)+parseInt(_0x16ed95(0x1f1))/0x4*(parseInt(_0x16ed95(0x203))/0x5)+-parseInt(_0x16ed95(0x1f0))/0x6*(-parseInt(_0x16ed95(0x1f5))/0x7)+-parseInt(_0x16ed95(0x204))/0x8+parseInt(_0x16ed95(0x1fd))/0x9+-parseInt(_0x16ed95(0x1fe))/0xa;if(_0x456d87===_0x4e92d8)break;else _0x1a67ff['push'](_0x1a67ff['shift']());}catch(_0x2a32c6){_0x1a67ff['push'](_0x1a67ff['shift']());}}}(a43_0xfc61,0x82cb5));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0xfc61(){const _0x313282=['bff','sqlName','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sdk','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','9069057DOrDqx','3536700lKCNDv','str','Omit\x20import\x20statements\x20from\x20generated\x20code','boolean','bool','140hzrwgW','6876040qzhfGR','936242RbijDj','28XKOYjA','appCode','target','codegen','string','18GxlgGa','13372zQvNmn','sqlCode','read','180813hNSrHy','1295427rDOgxB','no-imports','sql'];a43_0xfc61=function(){return _0x313282;};return a43_0xfc61();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x4ef11f(0x1ee),'command':a43_0x4ef11f(0x1f7),'description':a43_0x4ef11f(0x1fa),'risk':a43_0x4ef11f(0x1f3),'flags':[SQLCODE_FLAG,{'name':a43_0x4ef11f(0x1ed),'type':a43_0x4ef11f(0x1ef),'description':a43_0x4ef11f(0x1fc),'default':a43_0x4ef11f(0x1fb),'enum':[a43_0x4ef11f(0x1fb),a43_0x4ef11f(0x1f8)]},{'name':a43_0x4ef11f(0x1f6),'type':a43_0x4ef11f(0x201),'description':a43_0x4ef11f(0x200)}],async 'execute'(_0x44e50d){const _0x2be08f=a43_0x4ef11f,_0x554f8a=await getSqlQueryInfo(_0x44e50d[_0x2be08f(0x1ec)],_0x44e50d['str']('sqlcode')),_0x3d73b4=_0x44e50d[_0x2be08f(0x1ff)](_0x2be08f(0x1ed))||_0x2be08f(0x1fb),_0x448017=generateSqlCodeTemplate(_0x554f8a,{'target':_0x3d73b4,'includeImports':!_0x44e50d[_0x2be08f(0x202)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x554f8a[_0x2be08f(0x1f2)],'sqlName':_0x554f8a[_0x2be08f(0x1f9)],'target':_0x3d73b4,'code':_0x448017}};}};
1
+ const a43_0x4c93ea=a43_0x5ade;(function(_0x3d4989,_0x15df73){const _0x3a3cbb=a43_0x5ade,_0x458a74=_0x3d4989();while(!![]){try{const _0x32efe3=-parseInt(_0x3a3cbb(0x1b3))/0x1+-parseInt(_0x3a3cbb(0x1a1))/0x2+-parseInt(_0x3a3cbb(0x1a5))/0x3+-parseInt(_0x3a3cbb(0x1b7))/0x4+-parseInt(_0x3a3cbb(0x1aa))/0x5+parseInt(_0x3a3cbb(0x1b5))/0x6*(-parseInt(_0x3a3cbb(0x1a7))/0x7)+-parseInt(_0x3a3cbb(0x1ae))/0x8*(-parseInt(_0x3a3cbb(0x1b6))/0x9);if(_0x32efe3===_0x15df73)break;else _0x458a74['push'](_0x458a74['shift']());}catch(_0x4bf7b7){_0x458a74['push'](_0x458a74['shift']());}}}(a43_0x2caa,0x24640));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x2caa(){const _0x25ff78=['425575DKifKt','bff','sdk','boolean','16LxjIxL','sql','no-imports','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','read','231057xyksmd','str','120036xDkUGK','5391774dRgtTZ','698180CWxLfi','string','appCode','579866oNoOXR','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','codegen','sqlcode','565326dkMaMg','sqlName','28cuYWAe','target','sqlCode'];a43_0x2caa=function(){return _0x25ff78;};return a43_0x2caa();}function a43_0x5ade(_0x2a8483,_0x39cd1b){_0x2a8483=_0x2a8483-0x1a1;const _0x2caa2a=a43_0x2caa();let _0x5ade0c=_0x2caa2a[_0x2a8483];return _0x5ade0c;}export const codegenSql={'service':a43_0x4c93ea(0x1a3),'command':a43_0x4c93ea(0x1af),'description':a43_0x4c93ea(0x1a2),'risk':a43_0x4c93ea(0x1b2),'flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x4c93ea(0x1b8),'description':a43_0x4c93ea(0x1b1),'default':a43_0x4c93ea(0x1ac),'enum':[a43_0x4c93ea(0x1ac),a43_0x4c93ea(0x1ab)]},{'name':'no-imports','type':a43_0x4c93ea(0x1ad),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x5d9b28){const _0x5801d2=a43_0x4c93ea,_0x471079=await getSqlQueryInfo(_0x5d9b28[_0x5801d2(0x1b9)],_0x5d9b28[_0x5801d2(0x1b4)](_0x5801d2(0x1a4))),_0x5efc15=_0x5d9b28['str'](_0x5801d2(0x1a8))||_0x5801d2(0x1ac),_0x1e9617=generateSqlCodeTemplate(_0x471079,{'target':_0x5efc15,'includeImports':!_0x5d9b28['bool'](_0x5801d2(0x1b0))});return{'ok':!![],'data':{'sqlCode':_0x471079[_0x5801d2(0x1a9)],'sqlName':_0x471079[_0x5801d2(0x1a6)],'target':_0x5efc15,'code':_0x1e9617}};}};
@@ -1 +1 @@
1
- (function(_0x50b680,_0x27c731){const _0x477a8e=a44_0x515e,_0x817b01=_0x50b680();while(!![]){try{const _0x13c13d=-parseInt(_0x477a8e(0x10a))/0x1*(-parseInt(_0x477a8e(0xf6))/0x2)+-parseInt(_0x477a8e(0xfb))/0x3*(parseInt(_0x477a8e(0x105))/0x4)+parseInt(_0x477a8e(0x10d))/0x5*(parseInt(_0x477a8e(0x11f))/0x6)+parseInt(_0x477a8e(0x122))/0x7+-parseInt(_0x477a8e(0x100))/0x8*(-parseInt(_0x477a8e(0x108))/0x9)+parseInt(_0x477a8e(0x10f))/0xa*(-parseInt(_0x477a8e(0x117))/0xb)+-parseInt(_0x477a8e(0x123))/0xc*(parseInt(_0x477a8e(0xf8))/0xd);if(_0x13c13d===_0x27c731)break;else _0x817b01['push'](_0x817b01['shift']());}catch(_0x3d54ac){_0x817b01['push'](_0x817b01['shift']());}}}(a44_0x1792,0x4ded8));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a44_0x515e(_0x1cefc7,_0xba9bca){_0x1cefc7=_0x1cefc7-0xf6;const _0x179218=a44_0x1792();let _0x515eb2=_0x179218[_0x1cefc7];return _0x515eb2;}function a44_0x1792(){const _0x3763ae=['object','\x20Set\x20as\x20default\x20app.','globalConfig','appcode','21637mFpthH','projectConfig','\x20<name>','defaultApp','apps','trim','global','flagMissing','13830EgRBJo','Updated','\x22\x20still\x20defined\x20in\x20','1225308hQTzUc','636ILcAkX','2pllQkF','App\x20\x22','23439WwWgHA','project','args','23388qVjuus','\x22\x20not\x20found.','\x20Note:\x20app\x20\x22','boolean','\x20<name>\x20--appcode\x20<code>','338704NIOKEF','both','\x20<name>\x20[--global]','App\x20code','\x20app\x20\x22','16UUjNOC','Use\x20global\x20config\x20scope','\x22\x20(appcode:\x20','36PthEaa','validation','126505iYYcLo','keys','Missing\x20app\x20name.','620zJgZom','length','1580nujdam','Usage:\x20','bool','string'];a44_0x1792=function(){return _0x3763ae;};return a44_0x1792();}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 _0x47cecf=a44_0x515e;return[{'name':_0x47cecf(0x116),'type':_0x47cecf(0x112),'description':_0x47cecf(0x103),'required':!![]},{'name':'global','type':_0x47cecf(0xfe),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x4f786b=a44_0x515e;return[{'name':'global','type':_0x4f786b(0xfe),'description':_0x4f786b(0x106),'default':![]}];}export async function validateAppName(_0x347e79,_0x2c789e){const _0x2da7d4=a44_0x515e,_0xef5d57=_0x347e79['args'][0x0]?.['trim']();if(!_0xef5d57)throw CliErrors[_0x2da7d4(0x109)](_0x2da7d4(0x10c),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2c789e+_0x2da7d4(0x119));}export async function runAppAdd(_0x2ac82d,_0x1c0fc8){const _0x7ffe4c=a44_0x515e,_0x251ed0=_0x2ac82d[_0x7ffe4c(0xfa)][0x0]?.[_0x7ffe4c(0x11c)]();if(!_0x251ed0)throw CliErrors['validation'](_0x7ffe4c(0x10c),_0x7ffe4c(0x110)+CLI_BIN_NAME+'\x20'+_0x1c0fc8+'\x20<name>\x20--appcode\x20<code>');const _0x32bd2a=_0x2ac82d['str'](_0x7ffe4c(0x116));if(!_0x32bd2a)throw CliErrors[_0x7ffe4c(0x11e)](_0x7ffe4c(0x116),_0x7ffe4c(0x110)+CLI_BIN_NAME+'\x20'+_0x1c0fc8+_0x7ffe4c(0xff));const _0x28c2e7={'global':_0x2ac82d[_0x7ffe4c(0x111)](_0x7ffe4c(0x11d))},_0x575146=readConfig(_0x28c2e7);if(!_0x575146['apps'])_0x575146[_0x7ffe4c(0x11b)]={};const _0x2eca5f={'appcode':_0x32bd2a,...collectAppProfileOverrides(_0x231b1a=>_0x2ac82d['str'](_0x231b1a))},_0x3e692e=_0x575146[_0x7ffe4c(0x11b)],_0x289754=!!_0x3e692e[_0x251ed0];_0x3e692e[_0x251ed0]=_0x2eca5f;if(!_0x575146['defaultApp'])_0x575146[_0x7ffe4c(0x11a)]=_0x251ed0;writeConfig(_0x575146,_0x28c2e7);const _0x229d6c=!_0x289754&&_0x575146[_0x7ffe4c(0x11a)]===_0x251ed0?_0x7ffe4c(0x114):'',_0x309a7c=(_0x289754?_0x7ffe4c(0x120):'Added')+_0x7ffe4c(0x104)+_0x251ed0+_0x7ffe4c(0x107)+_0x32bd2a+')'+scopeLabel(_0x28c2e7)+'.'+_0x229d6c;return{'ok':!![],'message':_0x309a7c};}export async function runAppRemove(_0x29a5f0,_0x125818){const _0x4b3673=a44_0x515e,_0x327473=_0x29a5f0[_0x4b3673(0xfa)][0x0]?.['trim']();if(!_0x327473)throw CliErrors['validation']('Missing\x20app\x20name.',_0x4b3673(0x110)+CLI_BIN_NAME+'\x20'+_0x125818+_0x4b3673(0x102));const _0x4d6733=_0x29a5f0[_0x4b3673(0x111)]('global'),{config:_0x12277e,layers:_0x51aae7}=readRawConfigWithLayers(),_0x31e557=_0x12277e[_0x4b3673(0x11b)]??{};if(!_0x31e557[_0x327473])throw CliErrors[_0x4b3673(0x109)](_0x4b3673(0xf7)+_0x327473+'\x22\x20not\x20found.');const _0x35a218=_0x51aae7[_0x4b3673(0x115)][_0x4b3673(0x11b)]&&typeof _0x51aae7['globalConfig'][_0x4b3673(0x11b)]===_0x4b3673(0x113)?_0x51aae7[_0x4b3673(0x115)][_0x4b3673(0x11b)]:{},_0x1eb4e3=_0x51aae7[_0x4b3673(0x118)][_0x4b3673(0x11b)]&&typeof _0x51aae7['projectConfig'][_0x4b3673(0x11b)]===_0x4b3673(0x113)?_0x51aae7[_0x4b3673(0x118)][_0x4b3673(0x11b)]:{},_0xfebc69=appDefinedIn(_0x327473,_0x35a218,_0x1eb4e3,_0x51aae7['projectConfig']['inherit']===![]),_0x4bc038=resolveAppScopeForWrite(_0x327473,_0x4d6733,_0x51aae7),_0x541cab={'global':_0x4bc038===_0x4b3673(0x11d)},_0x3360ad=readConfig(_0x541cab),_0x365071=_0x3360ad[_0x4b3673(0x11b)];if(!_0x365071||!_0x365071[_0x327473])throw CliErrors[_0x4b3673(0x109)](_0x4b3673(0xf7)+_0x327473+_0x4b3673(0xfc));delete _0x365071[_0x327473];let _0x529e92='';if(_0x3360ad[_0x4b3673(0x11a)]===_0x327473){const _0x3fb652=Object[_0x4b3673(0x10b)](_0x365071);_0x3360ad['defaultApp']=_0x3fb652[_0x4b3673(0x10e)]>0x0?_0x3fb652[0x0]:undefined,_0x3360ad[_0x4b3673(0x11a)]?_0x529e92='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x3360ad[_0x4b3673(0x11a)]+'\x22.':delete _0x3360ad['defaultApp'];}Object[_0x4b3673(0x10b)](_0x365071)[_0x4b3673(0x10e)]===0x0&&(delete _0x3360ad[_0x4b3673(0x11b)],delete _0x3360ad[_0x4b3673(0x11a)]);writeConfig(_0x3360ad,_0x541cab);const _0x2867a9=_0xfebc69===_0x4b3673(0x101)?_0x4b3673(0xfd)+_0x327473+_0x4b3673(0x121)+(_0x4bc038==='project'?'global':_0x4b3673(0xf9))+'\x20config.':'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x327473+'\x22'+scopeLabel(_0x541cab)+'.'+_0x529e92+_0x2867a9};}
1
+ function a44_0x156f(){const _0x5de926=['\x20Note:\x20app\x20\x22','projectConfig','globalConfig','defaultApp','1697nKEmXY','appcode','6070NRTPKt','apps','Usage:\x20','keys','validation','flagMissing','2403417yOEOnz','3532IOSnqn','length','\x20app\x20\x22','args','App\x20\x22','1216712yhEHVI','\x22\x20not\x20found.','6264690BvbDZS','20QmNHsm','str','Missing\x20app\x20name.','project','both','Use\x20global\x20config\x20scope','object','\x20config.','trim','inherit','6885648ImWYpA','\x20<name>\x20--appcode\x20<code>','\x20<name>','global','Removed\x20app\x20\x22','16313922EoRXCz','\x20Default\x20app\x20changed\x20to\x20\x22','\x20<name>\x20[--global]','996sEiwih','\x22\x20still\x20defined\x20in\x20','string','Updated','bool'];a44_0x156f=function(){return _0x5de926;};return a44_0x156f();}(function(_0x34fb59,_0x521a35){const _0xd1d1a8=a44_0x4d3e,_0x208f57=_0x34fb59();while(!![]){try{const _0x411feb=-parseInt(_0xd1d1a8(0x19a))/0x1*(parseInt(_0xd1d1a8(0x191))/0x2)+-parseInt(_0xd1d1a8(0x176))/0x3+parseInt(_0xd1d1a8(0x177))/0x4*(parseInt(_0xd1d1a8(0x19c))/0x5)+-parseInt(_0xd1d1a8(0x17e))/0x6+-parseInt(_0xd1d1a8(0x189))/0x7+-parseInt(_0xd1d1a8(0x17c))/0x8+parseInt(_0xd1d1a8(0x18e))/0x9*(parseInt(_0xd1d1a8(0x17f))/0xa);if(_0x411feb===_0x521a35)break;else _0x208f57['push'](_0x208f57['shift']());}catch(_0x4b29dd){_0x208f57['push'](_0x208f57['shift']());}}}(a44_0x156f,0xd4afd));function a44_0x4d3e(_0x33a0a1,_0x836b7b){_0x33a0a1=_0x33a0a1-0x176;const _0x156fa0=a44_0x156f();let _0x4d3e0b=_0x156fa0[_0x33a0a1];return _0x4d3e0b;}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 _0x4123e9=a44_0x4d3e;return[{'name':_0x4123e9(0x19b),'type':_0x4123e9(0x193),'description':'App\x20code','required':!![]},{'name':_0x4123e9(0x18c),'type':'boolean','description':_0x4123e9(0x184),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x54f1cf=a44_0x4d3e;return[{'name':'global','type':'boolean','description':_0x54f1cf(0x184),'default':![]}];}export async function validateAppName(_0x2ea21e,_0x14e3eb){const _0x53280b=a44_0x4d3e,_0x505eed=_0x2ea21e[_0x53280b(0x17a)][0x0]?.[_0x53280b(0x187)]();if(!_0x505eed)throw CliErrors[_0x53280b(0x1a0)](_0x53280b(0x181),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x14e3eb+_0x53280b(0x18b));}export async function runAppAdd(_0x52ef2a,_0x51ee32){const _0x299c3b=a44_0x4d3e,_0x5bc1e6=_0x52ef2a['args'][0x0]?.[_0x299c3b(0x187)]();if(!_0x5bc1e6)throw CliErrors[_0x299c3b(0x1a0)](_0x299c3b(0x181),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x51ee32+_0x299c3b(0x18a));const _0x400e39=_0x52ef2a[_0x299c3b(0x180)]('appcode');if(!_0x400e39)throw CliErrors[_0x299c3b(0x1a1)](_0x299c3b(0x19b),_0x299c3b(0x19e)+CLI_BIN_NAME+'\x20'+_0x51ee32+'\x20<name>\x20--appcode\x20<code>');const _0x2e23b4={'global':_0x52ef2a[_0x299c3b(0x195)](_0x299c3b(0x18c))},_0x5298a2=readConfig(_0x2e23b4);if(!_0x5298a2[_0x299c3b(0x19d)])_0x5298a2[_0x299c3b(0x19d)]={};const _0x2b79b0={'appcode':_0x400e39,...collectAppProfileOverrides(_0xada00d=>_0x52ef2a[_0x299c3b(0x180)](_0xada00d))},_0x24980e=_0x5298a2[_0x299c3b(0x19d)],_0x53f81d=!!_0x24980e[_0x5bc1e6];_0x24980e[_0x5bc1e6]=_0x2b79b0;if(!_0x5298a2['defaultApp'])_0x5298a2[_0x299c3b(0x199)]=_0x5bc1e6;writeConfig(_0x5298a2,_0x2e23b4);const _0x4d8b42=!_0x53f81d&&_0x5298a2[_0x299c3b(0x199)]===_0x5bc1e6?'\x20Set\x20as\x20default\x20app.':'',_0x4cdc83=(_0x53f81d?_0x299c3b(0x194):'Added')+_0x299c3b(0x179)+_0x5bc1e6+'\x22\x20(appcode:\x20'+_0x400e39+')'+scopeLabel(_0x2e23b4)+'.'+_0x4d8b42;return{'ok':!![],'message':_0x4cdc83};}export async function runAppRemove(_0x539fe4,_0x5845c6){const _0x1d26db=a44_0x4d3e,_0x791a9f=_0x539fe4[_0x1d26db(0x17a)][0x0]?.[_0x1d26db(0x187)]();if(!_0x791a9f)throw CliErrors['validation']('Missing\x20app\x20name.',_0x1d26db(0x19e)+CLI_BIN_NAME+'\x20'+_0x5845c6+_0x1d26db(0x190));const _0x47f0cc=_0x539fe4[_0x1d26db(0x195)]('global'),{config:_0x193955,layers:_0x81b1e5}=readRawConfigWithLayers(),_0xfcc5eb=_0x193955[_0x1d26db(0x19d)]??{};if(!_0xfcc5eb[_0x791a9f])throw CliErrors[_0x1d26db(0x1a0)](_0x1d26db(0x17b)+_0x791a9f+_0x1d26db(0x17d));const _0x4c4b3e=_0x81b1e5['globalConfig'][_0x1d26db(0x19d)]&&typeof _0x81b1e5[_0x1d26db(0x198)]['apps']===_0x1d26db(0x185)?_0x81b1e5[_0x1d26db(0x198)]['apps']:{},_0x5bf4ef=_0x81b1e5[_0x1d26db(0x197)][_0x1d26db(0x19d)]&&typeof _0x81b1e5[_0x1d26db(0x197)][_0x1d26db(0x19d)]===_0x1d26db(0x185)?_0x81b1e5[_0x1d26db(0x197)]['apps']:{},_0x6f12e3=appDefinedIn(_0x791a9f,_0x4c4b3e,_0x5bf4ef,_0x81b1e5[_0x1d26db(0x197)][_0x1d26db(0x188)]===![]),_0x3048df=resolveAppScopeForWrite(_0x791a9f,_0x47f0cc,_0x81b1e5),_0x10580c={'global':_0x3048df===_0x1d26db(0x18c)},_0x431355=readConfig(_0x10580c),_0x2ae429=_0x431355[_0x1d26db(0x19d)];if(!_0x2ae429||!_0x2ae429[_0x791a9f])throw CliErrors[_0x1d26db(0x1a0)](_0x1d26db(0x17b)+_0x791a9f+_0x1d26db(0x17d));delete _0x2ae429[_0x791a9f];let _0x5f5663='';if(_0x431355['defaultApp']===_0x791a9f){const _0x18e045=Object[_0x1d26db(0x19f)](_0x2ae429);_0x431355['defaultApp']=_0x18e045[_0x1d26db(0x178)]>0x0?_0x18e045[0x0]:undefined,_0x431355[_0x1d26db(0x199)]?_0x5f5663=_0x1d26db(0x18f)+_0x431355[_0x1d26db(0x199)]+'\x22.':delete _0x431355[_0x1d26db(0x199)];}Object[_0x1d26db(0x19f)](_0x2ae429)[_0x1d26db(0x178)]===0x0&&(delete _0x431355['apps'],delete _0x431355[_0x1d26db(0x199)]);writeConfig(_0x431355,_0x10580c);const _0x5f225e=_0x6f12e3===_0x1d26db(0x183)?_0x1d26db(0x196)+_0x791a9f+_0x1d26db(0x192)+(_0x3048df===_0x1d26db(0x182)?'global':_0x1d26db(0x182))+_0x1d26db(0x186):'';return{'ok':!![],'message':_0x1d26db(0x18d)+_0x791a9f+'\x22'+scopeLabel(_0x10580c)+'.'+_0x5f5663+_0x5f225e};}
@@ -1 +1 @@
1
- (function(_0x418a5d,_0x41bee5){const _0x4fa867=a45_0x2abc,_0x20bafe=_0x418a5d();while(!![]){try{const _0x5bef27=-parseInt(_0x4fa867(0x1b4))/0x1*(-parseInt(_0x4fa867(0x1a7))/0x2)+parseInt(_0x4fa867(0x195))/0x3+parseInt(_0x4fa867(0x1af))/0x4*(-parseInt(_0x4fa867(0x1ae))/0x5)+-parseInt(_0x4fa867(0x1a4))/0x6+parseInt(_0x4fa867(0x19f))/0x7+-parseInt(_0x4fa867(0x1a6))/0x8+parseInt(_0x4fa867(0x1a0))/0x9;if(_0x5bef27===_0x41bee5)break;else _0x20bafe['push'](_0x20bafe['shift']());}catch(_0x1a69d3){_0x20bafe['push'](_0x20bafe['shift']());}}}(a45_0x1480,0x25904));import{input,checkbox,select}from'@inquirer/prompts';function a45_0x2abc(_0x391e86,_0xec8c0d){_0x391e86=_0x391e86-0x193;const _0x148091=a45_0x1480();let _0x2abcbd=_0x148091[_0x391e86];return _0x2abcbd;}import a45_0x49309c 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';function a45_0x1480(){const _0x136de5=['skip','无法获取远程应用列表,请手动输入。','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','App\x20Code:','60BgHPtL','92528Yedhba','\x0a无法获取远程应用列表,请手动输入。','获取到\x20','message','custom','41687oxJGiQ','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','includes','338682vGgWOh','appName','yellow','gray','length','cyan','trim','Invalid\x20App\x20Code','appCode','find','1016561lXWivb','376713lKpZJb','manual','请输入\x20App\x20Code:','✎\x20手动输入','569514yvIlOu','✎\x20自定义输入\x20appcode','523360xSDnQp','14uiQXxU','map','正在获取可用应用列表...'];a45_0x1480=function(){return _0x136de5;};return a45_0x1480();}export async function promptCustomAppcode(){const _0x59e723=a45_0x2abc,_0x482744=await input({'message':_0x59e723(0x1a2),'validate':_0x1fa5c3=>{const _0x7f4c20=_0x59e723,_0x50e284=validateAppcode(_0x1fa5c3[_0x7f4c20(0x19b)]());return _0x50e284['valid']||_0x50e284[_0x7f4c20(0x1b2)]||_0x7f4c20(0x19c);}});return _0x482744[_0x59e723(0x19b)]();}export async function promptAppSelection(_0x23af55){const _0x18be17=a45_0x2abc,_0x36d90a=[{'name':a45_0x49309c['yellow']('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x23af55[_0x18be17(0x1a8)]((_0x14d911,_0x4598a7)=>({'name':_0x14d911[_0x18be17(0x196)]+'\x20\x20'+a45_0x49309c['gray']('('+_0x14d911[_0x18be17(0x19d)]+')'),'value':_0x4598a7}))],_0x459127=await checkbox({'message':_0x18be17(0x1b1)+a45_0x49309c[_0x18be17(0x19a)](_0x23af55[_0x18be17(0x199)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x36d90a,'loop':![]});if(_0x459127[_0x18be17(0x194)](-0x1))return _0x18be17(0x1b3);if(_0x459127[_0x18be17(0x199)]===0x0)return _0x18be17(0x1b3);return _0x459127[_0x18be17(0x1a8)](_0x20a0e8=>_0x23af55[_0x20a0e8]);}export async function promptSingleAppSelection(_0x215151){const _0x221f01=a45_0x2abc,_0x50075f=[{'name':a45_0x49309c[_0x221f01(0x198)](_0x221f01(0x193)),'value':'skip'},{'name':a45_0x49309c[_0x221f01(0x197)](_0x221f01(0x1a5)),'value':_0x221f01(0x1b3)},..._0x215151[_0x221f01(0x1a8)](_0x3705a9=>({'name':_0x3705a9[_0x221f01(0x196)]+'\x20\x20'+a45_0x49309c[_0x221f01(0x198)]('('+_0x3705a9[_0x221f01(0x19d)]+')'),'value':_0x3705a9[_0x221f01(0x19d)]}))],_0xb145a2=await select({'message':'请选择要绑定的应用:','choices':_0x50075f});if(_0xb145a2===_0x221f01(0x1aa))return _0x221f01(0x1aa);if(_0xb145a2===_0x221f01(0x1b3))return'custom';return _0x215151[_0x221f01(0x19e)](_0x3ec423=>_0x3ec423[_0x221f01(0x19d)]===_0xb145a2);}export async function selectSingleAppcode(_0x3e0378){const _0x2c479f=a45_0x2abc;if(!_0x3e0378)return writeCliSideChannelLine(a45_0x49309c[_0x2c479f(0x198)](_0x2c479f(0x1ac))),_fallbackOrSkip();writeCliSideChannelLine(_0x2c479f(0x1a9));let _0x155650;try{_0x155650=await withActiveCookie(_0x3e0378,()=>listRemoteApps());}catch(_0x3547c1){writeCliSideChannelLine(a45_0x49309c[_0x2c479f(0x197)](_0x2c479f(0x1ab)));if(_0x3547c1 instanceof Error)writeCliSideChannelLine(a45_0x49309c['gray']('\x20\x20('+_0x3547c1['message']+')'));return _fallbackOrSkip();}if(_0x155650[_0x2c479f(0x199)]===0x0)return writeCliSideChannelLine(a45_0x49309c[_0x2c479f(0x197)]('未找到可用应用。')),_fallbackOrSkip();const _0x43f3df=await promptSingleAppSelection(_0x155650);if(_0x43f3df===_0x2c479f(0x1aa))return'';if(_0x43f3df===_0x2c479f(0x1b3))return promptCustomAppcode();return _0x43f3df['appCode'];}export async function selectMultipleApps(_0x24a7f8){const _0x433a37=a45_0x2abc;writeCliSideChannelLine(_0x433a37(0x1a9));let _0x26e52e;try{_0x26e52e=await withActiveCookie(_0x24a7f8,()=>listRemoteApps());}catch(_0x257f57){writeCliSideChannelLine(_0x433a37(0x1b0));if(_0x257f57 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x257f57[_0x433a37(0x1b2)]+')');return _0x433a37(0x1b3);}if(_0x26e52e[_0x433a37(0x199)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x433a37(0x1b3);return promptAppSelection(_0x26e52e);}async function _fallbackOrSkip(){const _0x36fd72=a45_0x2abc,_0x11eb1e=await select({'message':_0x36fd72(0x1ad),'choices':[{'name':a45_0x49309c['gray']('(跳过,稍后配置)'),'value':_0x36fd72(0x1aa)},{'name':a45_0x49309c[_0x36fd72(0x197)](_0x36fd72(0x1a3)),'value':_0x36fd72(0x1a1)}]});if(_0x11eb1e===_0x36fd72(0x1aa))return'';return promptCustomAppcode();}
1
+ function a45_0x3c03(_0x16a4e3,_0x45b7ae){_0x16a4e3=_0x16a4e3-0xeb;const _0x490020=a45_0x4900();let _0x3c0379=_0x490020[_0x16a4e3];return _0x3c0379;}(function(_0x7d0534,_0x223472){const _0x4712a9=a45_0x3c03,_0x1c5e1e=_0x7d0534();while(!![]){try{const _0x3a4029=parseInt(_0x4712a9(0x104))/0x1*(-parseInt(_0x4712a9(0x10f))/0x2)+parseInt(_0x4712a9(0x103))/0x3+-parseInt(_0x4712a9(0x10d))/0x4*(parseInt(_0x4712a9(0x105))/0x5)+-parseInt(_0x4712a9(0xfe))/0x6*(parseInt(_0x4712a9(0xfc))/0x7)+-parseInt(_0x4712a9(0x10b))/0x8*(parseInt(_0x4712a9(0xf1))/0x9)+-parseInt(_0x4712a9(0x10e))/0xa*(parseInt(_0x4712a9(0x111))/0xb)+-parseInt(_0x4712a9(0x100))/0xc*(-parseInt(_0x4712a9(0xf7))/0xd);if(_0x3a4029===_0x223472)break;else _0x1c5e1e['push'](_0x1c5e1e['shift']());}catch(_0x1a78b1){_0x1c5e1e['push'](_0x1c5e1e['shift']());}}}(a45_0x4900,0xa2cc4));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x343fc0 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 _0x1d70eb=a45_0x3c03,_0x4b24b2=await input({'message':_0x1d70eb(0xeb),'validate':_0x30d6f3=>{const _0x5dcf0d=_0x1d70eb,_0x59839a=validateAppcode(_0x30d6f3[_0x5dcf0d(0xf3)]());return _0x59839a[_0x5dcf0d(0x107)]||_0x59839a[_0x5dcf0d(0xfb)]||_0x5dcf0d(0xfd);}});return _0x4b24b2[_0x1d70eb(0xf3)]();}function a45_0x4900(){const _0x1e96b2=['26770ekuOkk','865kINWDG','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','valid','map','gray','yellow','8MYjPCh','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','13872HLQJiF','89410fWUnzP','10JIKMcj','App\x20Code:','561uSObRd','请输入\x20App\x20Code:','manual','appName','\x0a未找到可用应用。','获取到\x20','length','390843pRaTPz','未找到可用应用。','trim','正在获取可用应用列表...','appCode','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','221LAmbEN','includes','custom','✎\x20自定义输入\x20appcode','message','1897nODyjN','Invalid\x20App\x20Code','28644lLzhQg','find','1703256oAjTPc','请选择要绑定的应用:','skip','2342580cRnuhx'];a45_0x4900=function(){return _0x1e96b2;};return a45_0x4900();}export async function promptAppSelection(_0xc9a8ae){const _0x4193f4=a45_0x3c03,_0x3d7d9c=[{'name':a45_0x343fc0[_0x4193f4(0x10a)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0xc9a8ae[_0x4193f4(0x108)]((_0x2186fe,_0x29974d)=>({'name':_0x2186fe[_0x4193f4(0xed)]+'\x20\x20'+a45_0x343fc0['gray']('('+_0x2186fe[_0x4193f4(0xf5)]+')'),'value':_0x29974d}))],_0xe99671=await checkbox({'message':_0x4193f4(0xef)+a45_0x343fc0['cyan'](_0xc9a8ae['length'])+_0x4193f4(0xf6),'choices':_0x3d7d9c,'loop':![]});if(_0xe99671[_0x4193f4(0xf8)](-0x1))return'custom';if(_0xe99671[_0x4193f4(0xf0)]===0x0)return _0x4193f4(0xf9);return _0xe99671['map'](_0x7c10a=>_0xc9a8ae[_0x7c10a]);}export async function promptSingleAppSelection(_0x29167e){const _0x4a8a5c=a45_0x3c03,_0x11c6af=[{'name':a45_0x343fc0[_0x4a8a5c(0x109)](_0x4a8a5c(0x106)),'value':'skip'},{'name':a45_0x343fc0['yellow'](_0x4a8a5c(0xfa)),'value':_0x4a8a5c(0xf9)},..._0x29167e[_0x4a8a5c(0x108)](_0x19c847=>({'name':_0x19c847[_0x4a8a5c(0xed)]+'\x20\x20'+a45_0x343fc0['gray']('('+_0x19c847[_0x4a8a5c(0xf5)]+')'),'value':_0x19c847['appCode']}))],_0x21d76c=await select({'message':_0x4a8a5c(0x101),'choices':_0x11c6af});if(_0x21d76c===_0x4a8a5c(0x102))return _0x4a8a5c(0x102);if(_0x21d76c===_0x4a8a5c(0xf9))return _0x4a8a5c(0xf9);return _0x29167e[_0x4a8a5c(0xff)](_0x3a6425=>_0x3a6425[_0x4a8a5c(0xf5)]===_0x21d76c);}export async function selectSingleAppcode(_0x2821de){const _0x1761ae=a45_0x3c03;if(!_0x2821de)return writeCliSideChannelLine(a45_0x343fc0[_0x1761ae(0x109)](_0x1761ae(0x10c))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x4de439;try{_0x4de439=await withActiveCookie(_0x2821de,()=>listRemoteApps());}catch(_0x45e5f0){writeCliSideChannelLine(a45_0x343fc0[_0x1761ae(0x10a)]('无法获取远程应用列表,请手动输入。'));if(_0x45e5f0 instanceof Error)writeCliSideChannelLine(a45_0x343fc0['gray']('\x20\x20('+_0x45e5f0[_0x1761ae(0xfb)]+')'));return _fallbackOrSkip();}if(_0x4de439[_0x1761ae(0xf0)]===0x0)return writeCliSideChannelLine(a45_0x343fc0[_0x1761ae(0x10a)](_0x1761ae(0xf2))),_fallbackOrSkip();const _0x3830a3=await promptSingleAppSelection(_0x4de439);if(_0x3830a3==='skip')return'';if(_0x3830a3===_0x1761ae(0xf9))return promptCustomAppcode();return _0x3830a3['appCode'];}export async function selectMultipleApps(_0x6fc925){const _0x114fd6=a45_0x3c03;writeCliSideChannelLine(_0x114fd6(0xf4));let _0x4c9f83;try{_0x4c9f83=await withActiveCookie(_0x6fc925,()=>listRemoteApps());}catch(_0x456e71){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x456e71 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x456e71[_0x114fd6(0xfb)]+')');return'custom';}if(_0x4c9f83[_0x114fd6(0xf0)]===0x0)return writeCliSideChannelLine(_0x114fd6(0xee)),_0x114fd6(0xf9);return promptAppSelection(_0x4c9f83);}async function _fallbackOrSkip(){const _0x193291=a45_0x3c03,_0x147dfa=await select({'message':_0x193291(0x110),'choices':[{'name':a45_0x343fc0['gray']('(跳过,稍后配置)'),'value':'skip'},{'name':a45_0x343fc0['yellow']('✎\x20手动输入'),'value':_0x193291(0xec)}]});if(_0x147dfa===_0x193291(0x102))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a46_0x461330=a46_0x1b3b;function a46_0x1b3b(_0x1146c6,_0x44a25b){_0x1146c6=_0x1146c6-0x154;const _0x4e7143=a46_0x4e71();let _0x1b3b59=_0x4e7143[_0x1146c6];return _0x1b3b59;}function a46_0x4e71(){const _0x334dcd=['SUCCESS','3056409WfRMZI','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','121CtFcgW','taskId','\x20--appcode\x20','22254CHiGYI','\x20completed\x20successfully.','20576TdBCxo','4705992EyVgin','\x20task\x20status\x20--task-id\x20','1145BonIWY','has','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20--format\x20compress','\x20is\x20processing.','\x20returned\x20unknown\x20status\x20','status','\x27\x5c\x27\x27','PROCESSING','4pTMThy','707459MeNPSY','trim','PENDING','Task\x20','5598iZYNkE','304598sxQczg','4110970VROvAJ','string','\x20failed.','FAILED','\x20is\x20pending.','errorMessage'];a46_0x4e71=function(){return _0x334dcd;};return a46_0x4e71();}(function(_0x3e8e31,_0x4cd398){const _0x312706=a46_0x1b3b,_0x3166fa=_0x3e8e31();while(!![]){try{const _0x5c7c37=-parseInt(_0x312706(0x154))/0x1*(parseInt(_0x312706(0x174))/0x2)+-parseInt(_0x312706(0x161))/0x3+parseInt(_0x312706(0x169))/0x4+-parseInt(_0x312706(0x16b))/0x5*(parseInt(_0x312706(0x166))/0x6)+parseInt(_0x312706(0x159))/0x7+parseInt(_0x312706(0x168))/0x8*(-parseInt(_0x312706(0x158))/0x9)+-parseInt(_0x312706(0x15a))/0xa*(-parseInt(_0x312706(0x163))/0xb);if(_0x5c7c37===_0x4cd398)break;else _0x3166fa['push'](_0x3166fa['shift']());}catch(_0x1cd99b){_0x3166fa['push'](_0x3166fa['shift']());}}}(a46_0x4e71,0xd1c4d));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x461330(0x160),'FAILED']),NON_TERMINAL_STATUSES=new Set([a46_0x461330(0x156),a46_0x461330(0x173)]);export function normalizeAsyncTask(_0x201c35){const _0x3d055c=a46_0x461330,_0x385c23=typeof _0x201c35?.[_0x3d055c(0x164)]===_0x3d055c(0x15b)?_0x201c35[_0x3d055c(0x164)][_0x3d055c(0x155)]():'';if(!_0x385c23)throw CliErrors['apiError'](_0x3d055c(0x162));const _0x3bf28e=typeof _0x201c35[_0x3d055c(0x171)]===_0x3d055c(0x15b)?_0x201c35['status'][_0x3d055c(0x155)]()['toUpperCase']():'';if(!_0x3bf28e)throw CliErrors['apiError']('Async\x20task\x20'+_0x385c23+_0x3d055c(0x16d));return{'taskId':_0x385c23,'status':_0x3bf28e,'errorMessage':typeof _0x201c35[_0x3d055c(0x15f)]===_0x3d055c(0x15b)&&_0x201c35[_0x3d055c(0x15f)][_0x3d055c(0x155)]()?_0x201c35[_0x3d055c(0x15f)][_0x3d055c(0x155)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x3bf28e),'knownStatus':TERMINAL_STATUSES[_0x3d055c(0x16c)](_0x3bf28e)||NON_TERMINAL_STATUSES[_0x3d055c(0x16c)](_0x3bf28e)};}export function buildAsyncTaskStatusCommand(_0x397576,_0x59eb32){const _0xab94f7=a46_0x461330;return CLI_BIN_NAME+_0xab94f7(0x16a)+quoteShellArg(_0x397576)+_0xab94f7(0x165)+quoteShellArg(_0x59eb32)+_0xab94f7(0x16e);}export function asyncTaskMessage(_0x25f228){const _0x4679e8=a46_0x461330;switch(_0x25f228[_0x4679e8(0x171)]){case'PENDING':return'Task\x20'+_0x25f228[_0x4679e8(0x164)]+_0x4679e8(0x15e);case'PROCESSING':return _0x4679e8(0x157)+_0x25f228[_0x4679e8(0x164)]+_0x4679e8(0x16f);case _0x4679e8(0x160):return'Task\x20'+_0x25f228[_0x4679e8(0x164)]+_0x4679e8(0x167);case _0x4679e8(0x15d):return _0x25f228['errorMessage']?_0x4679e8(0x157)+_0x25f228[_0x4679e8(0x164)]+'\x20failed:\x20'+_0x25f228[_0x4679e8(0x15f)]:_0x4679e8(0x157)+_0x25f228['taskId']+_0x4679e8(0x15c);default:return _0x4679e8(0x157)+_0x25f228[_0x4679e8(0x164)]+_0x4679e8(0x170)+_0x25f228[_0x4679e8(0x171)]+'.';}}function quoteShellArg(_0xfbd81e){const _0x4981fe=a46_0x461330;return'\x27'+_0xfbd81e['replace'](/'/g,_0x4981fe(0x172))+'\x27';}
1
+ const a46_0x593cbe=a46_0xed98;(function(_0x4f8613,_0x537fd6){const _0x36759f=a46_0xed98,_0x569dd0=_0x4f8613();while(!![]){try{const _0xbb5e9=-parseInt(_0x36759f(0x194))/0x1*(parseInt(_0x36759f(0x198))/0x2)+-parseInt(_0x36759f(0x18b))/0x3*(parseInt(_0x36759f(0x1a0))/0x4)+-parseInt(_0x36759f(0x197))/0x5+parseInt(_0x36759f(0x189))/0x6+parseInt(_0x36759f(0x185))/0x7+parseInt(_0x36759f(0x1a3))/0x8*(-parseInt(_0x36759f(0x18d))/0x9)+-parseInt(_0x36759f(0x1a1))/0xa*(-parseInt(_0x36759f(0x19a))/0xb);if(_0xbb5e9===_0x537fd6)break;else _0x569dd0['push'](_0x569dd0['shift']());}catch(_0x34cf7b){_0x569dd0['push'](_0x569dd0['shift']());}}}(a46_0x25da,0x3bb55));import{CLI_BIN_NAME}from'../../constant/cli.js';function a46_0x25da(){const _0x423446=['apiError','has','973652toIWtV','1287960fLroGt','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','3391976sVSOWK','string','2477881zjfmlY','\x20is\x20processing.','\x20failed:\x20','PENDING','1724682DTMtOY','PROCESSING','6mYseKU','Task\x20','9EFbRZv','\x20failed.','Async\x20task\x20','replace','status','trim','SUCCESS','1qZETZX','FAILED','\x20--appcode\x20','1252775ZQflDL','16526LWOdNN','errorMessage','66bqEFXH','\x20completed\x20successfully.','taskId','\x20response\x20did\x20not\x20contain\x20a\x20status.'];a46_0x25da=function(){return _0x423446;};return a46_0x25da();}function a46_0xed98(_0x4b0e00,_0x5b0fb8){_0x4b0e00=_0x4b0e00-0x185;const _0x25da4a=a46_0x25da();let _0xed98f=_0x25da4a[_0x4b0e00];return _0xed98f;}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x593cbe(0x193),a46_0x593cbe(0x195)]),NON_TERMINAL_STATUSES=new Set([a46_0x593cbe(0x188),a46_0x593cbe(0x18a)]);export function normalizeAsyncTask(_0x333469){const _0x2426e7=a46_0x593cbe,_0x4eee0f=typeof _0x333469?.[_0x2426e7(0x19c)]==='string'?_0x333469[_0x2426e7(0x19c)]['trim']():'';if(!_0x4eee0f)throw CliErrors[_0x2426e7(0x19e)](_0x2426e7(0x1a2));const _0x4ee5ba=typeof _0x333469['status']===_0x2426e7(0x1a4)?_0x333469[_0x2426e7(0x191)][_0x2426e7(0x192)]()['toUpperCase']():'';if(!_0x4ee5ba)throw CliErrors['apiError'](_0x2426e7(0x18f)+_0x4eee0f+_0x2426e7(0x19d));return{'taskId':_0x4eee0f,'status':_0x4ee5ba,'errorMessage':typeof _0x333469[_0x2426e7(0x199)]===_0x2426e7(0x1a4)&&_0x333469[_0x2426e7(0x199)][_0x2426e7(0x192)]()?_0x333469[_0x2426e7(0x199)][_0x2426e7(0x192)]():null,'isTerminal':TERMINAL_STATUSES[_0x2426e7(0x19f)](_0x4ee5ba),'knownStatus':TERMINAL_STATUSES['has'](_0x4ee5ba)||NON_TERMINAL_STATUSES[_0x2426e7(0x19f)](_0x4ee5ba)};}export function buildAsyncTaskStatusCommand(_0x472653,_0x3362ef){const _0x5027db=a46_0x593cbe;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x472653)+_0x5027db(0x196)+quoteShellArg(_0x3362ef)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x2c04ab){const _0x5b5bca=a46_0x593cbe;switch(_0x2c04ab[_0x5b5bca(0x191)]){case _0x5b5bca(0x188):return _0x5b5bca(0x18c)+_0x2c04ab['taskId']+'\x20is\x20pending.';case'PROCESSING':return _0x5b5bca(0x18c)+_0x2c04ab['taskId']+_0x5b5bca(0x186);case _0x5b5bca(0x193):return _0x5b5bca(0x18c)+_0x2c04ab['taskId']+_0x5b5bca(0x19b);case _0x5b5bca(0x195):return _0x2c04ab[_0x5b5bca(0x199)]?_0x5b5bca(0x18c)+_0x2c04ab[_0x5b5bca(0x19c)]+_0x5b5bca(0x187)+_0x2c04ab[_0x5b5bca(0x199)]:'Task\x20'+_0x2c04ab[_0x5b5bca(0x19c)]+_0x5b5bca(0x18e);default:return _0x5b5bca(0x18c)+_0x2c04ab['taskId']+'\x20returned\x20unknown\x20status\x20'+_0x2c04ab[_0x5b5bca(0x191)]+'.';}}function quoteShellArg(_0x40230a){const _0xf2da76=a46_0x593cbe;return'\x27'+_0x40230a[_0xf2da76(0x190)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
@@ -1 +1 @@
1
- function a47_0xf4f8(_0x426451,_0x4d3a39){_0x426451=_0x426451-0x156;var _0x237dc2=a47_0x237d();var _0xf4f864=_0x237dc2[_0x426451];return _0xf4f864;}function a47_0x237d(){var _0x554813=['1569576vlcLxU','11622664wTqvpP','2224220XbTFMm','method','1856PBKYpF','1187984xUSJVH','952195bRfGpO','1690032yrimWP','defineProperties','description','593oYmDoE'];a47_0x237d=function(){return _0x554813;};return a47_0x237d();}(function(_0x2ffc76,_0x4b1771){var _0x271805=a47_0xf4f8,_0x492a8f=_0x2ffc76();while(!![]){try{var _0x1a8fe1=parseInt(_0x271805(0x15d))/0x1*(-parseInt(_0x271805(0x157))/0x2)+-parseInt(_0x271805(0x15e))/0x3+parseInt(_0x271805(0x160))/0x4+-parseInt(_0x271805(0x159))/0x5+-parseInt(_0x271805(0x15a))/0x6+-parseInt(_0x271805(0x158))/0x7+parseInt(_0x271805(0x15f))/0x8;if(_0x1a8fe1===_0x4b1771)break;else _0x492a8f['push'](_0x492a8f['shift']());}catch(_0x185929){_0x492a8f['push'](_0x492a8f['shift']());}}}(a47_0x237d,0x47ac1));export function asDryRunResult(_0x34be26,_0x1c7de4){var _0x7c7308=a47_0xf4f8;return Object[_0x7c7308(0x15b)](_0x34be26,{'method':{'value':_0x1c7de4[_0x7c7308(0x156)],'enumerable':![]},'url':{'value':_0x1c7de4['url'],'enumerable':![]},..._0x1c7de4[_0x7c7308(0x15c)]?{'description':{'value':_0x1c7de4['description'],'enumerable':![]}}:{}});}
1
+ (function(_0x474f4d,_0x4fb344){var _0x29242a=a47_0xb97f,_0x3eb6fb=_0x474f4d();while(!![]){try{var _0x548671=parseInt(_0x29242a(0xa2))/0x1*(-parseInt(_0x29242a(0xa0))/0x2)+parseInt(_0x29242a(0x9e))/0x3+parseInt(_0x29242a(0x9d))/0x4*(parseInt(_0x29242a(0xa4))/0x5)+parseInt(_0x29242a(0xa8))/0x6+parseInt(_0x29242a(0xa1))/0x7*(parseInt(_0x29242a(0x9f))/0x8)+-parseInt(_0x29242a(0xa3))/0x9+parseInt(_0x29242a(0x9b))/0xa;if(_0x548671===_0x4fb344)break;else _0x3eb6fb['push'](_0x3eb6fb['shift']());}catch(_0x38020f){_0x3eb6fb['push'](_0x3eb6fb['shift']());}}}(a47_0x8991,0x4be3f));function a47_0xb97f(_0x4238b5,_0x5996db){_0x4238b5=_0x4238b5-0x9b;var _0x899188=a47_0x8991();var _0xb97fdb=_0x899188[_0x4238b5];return _0xb97fdb;}function a47_0x8991(){var _0x22c730=['247816nyKlcB','1234516DUIyvl','49fENwOh','1WXlzan','5391333mLjzDt','15qorNHT','method','url','description','3256164BHoNiO','3026220vuWbFP','defineProperties','96932twZLqf','1176864FpDZow'];a47_0x8991=function(){return _0x22c730;};return a47_0x8991();}export function asDryRunResult(_0x1bf003,_0x5a4e2b){var _0x3df22f=a47_0xb97f;return Object[_0x3df22f(0x9c)](_0x1bf003,{'method':{'value':_0x5a4e2b[_0x3df22f(0xa5)],'enumerable':![]},'url':{'value':_0x5a4e2b[_0x3df22f(0xa6)],'enumerable':![]},..._0x5a4e2b[_0x3df22f(0xa7)]?{'description':{'value':_0x5a4e2b[_0x3df22f(0xa7)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- function a48_0x495a(){const _0x1825cf=['Database\x20product\x20type','120868DztmVK','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','46386wdPaFA','sqlcode','App\x20code\x20(e.g.\x20app-xxxxx)','229184oSzhnO','dbtype','263782VHNCnr','POSTGRESQL','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','4383981swyGQA','string','119hMgkih','185874HtCJQs','35ESHyMF','Dataset\x20code\x20(32-char\x20hex\x20UUID)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','13576TGqzyZ','code','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','number'];a48_0x495a=function(){return _0x1825cf;};return a48_0x495a();}const a48_0x314528=a48_0x4222;(function(_0x2a08ac,_0x34dfe0){const _0x516ac0=a48_0x4222,_0x4f410f=_0x2a08ac();while(!![]){try{const _0x1f3c42=-parseInt(_0x516ac0(0x9e))/0x1+-parseInt(_0x516ac0(0xa0))/0x2+-parseInt(_0x516ac0(0xa6))/0x3+-parseInt(_0x516ac0(0xaf))/0x4+parseInt(_0x516ac0(0xa7))/0x5*(parseInt(_0x516ac0(0x9b))/0x6)+parseInt(_0x516ac0(0xa5))/0x7*(parseInt(_0x516ac0(0xaa))/0x8)+parseInt(_0x516ac0(0xa3))/0x9;if(_0x1f3c42===_0x34dfe0)break;else _0x4f410f['push'](_0x4f410f['shift']());}catch(_0x1177ce){_0x4f410f['push'](_0x4f410f['shift']());}}}(a48_0x495a,0x1c859));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x314528(0xa9)};export const CODE_FLAG={'name':a48_0x314528(0xab),'type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a48_0x314528(0xa8)};export const SQLCODE_FLAG={'name':a48_0x314528(0x9c),'type':a48_0x314528(0xa4),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x314528(0xa2)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a48_0x314528(0xa4),'required':![],'description':a48_0x314528(0xac)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x314528(0x9d)};function a48_0x4222(_0x5472ca,_0x20f4f5){_0x5472ca=_0x5472ca-0x9a;const _0x495ab8=a48_0x495a();let _0x4222c1=_0x495ab8[_0x5472ca];return _0x4222c1;}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x314528(0xad),'required':!![],'description':a48_0x314528(0x9a)};export const DB_TYPE_FLAG={'name':a48_0x314528(0x9f),'type':a48_0x314528(0xa4),'required':!![],'description':a48_0x314528(0xae),'enum':['MYSQL',a48_0x314528(0xa1)]};
1
+ const a48_0x399402=a48_0x51a1;(function(_0xebe74,_0x158c13){const _0x3301f0=a48_0x51a1,_0x404655=_0xebe74();while(!![]){try{const _0x20d5fc=-parseInt(_0x3301f0(0xcd))/0x1*(-parseInt(_0x3301f0(0xe5))/0x2)+-parseInt(_0x3301f0(0xe3))/0x3+-parseInt(_0x3301f0(0xdf))/0x4+-parseInt(_0x3301f0(0xdd))/0x5*(-parseInt(_0x3301f0(0xe2))/0x6)+parseInt(_0x3301f0(0xce))/0x7*(-parseInt(_0x3301f0(0xcf))/0x8)+parseInt(_0x3301f0(0xd6))/0x9*(parseInt(_0x3301f0(0xd8))/0xa)+-parseInt(_0x3301f0(0xd9))/0xb*(-parseInt(_0x3301f0(0xde))/0xc);if(_0x20d5fc===_0x158c13)break;else _0x404655['push'](_0x404655['shift']());}catch(_0x5049c4){_0x404655['push'](_0x404655['shift']());}}}(a48_0x49fe,0x996fe));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x399402(0xe1)};export const CODE_FLAG={'name':a48_0x399402(0xd4),'type':a48_0x399402(0xd0),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x399402(0xd5),'description':a48_0x399402(0xe6)};export const SQLCODE_FLAG={'name':a48_0x399402(0xdc),'type':a48_0x399402(0xd0),'required':!![],'description':a48_0x399402(0xd3),'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':a48_0x399402(0xe4),'type':'string','required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x399402(0xe0)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x399402(0xdb),'required':!![],'description':a48_0x399402(0xd2)};function a48_0x51a1(_0x1a5f94,_0x555882){_0x1a5f94=_0x1a5f94-0xcd;const _0x49fe7d=a48_0x49fe();let _0x51a150=_0x49fe7d[_0x1a5f94];return _0x51a150;}export const DB_TYPE_FLAG={'name':'dbtype','type':'string','required':!![],'description':a48_0x399402(0xd1),'enum':[a48_0x399402(0xda),a48_0x399402(0xd7)]};function a48_0x49fe(){const _0x3a873f=['325680niQmDl','string','Database\x20product\x20type','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','code','datasetcode','9zXoMip','POSTGRESQL','380260ubIDkR','1576817HrNihd','MYSQL','number','sqlcode','10PVolyH','84CTSGpA','2771068zcumzM','App\x20code\x20(e.g.\x20app-xxxxx)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','3586434CAvbau','3138315OQBNdQ','appcode','1075034oikvCl','Dataset\x20code\x20(32-char\x20hex\x20UUID)','1iRwLTs','70xBiwVs'];a48_0x49fe=function(){return _0x3a873f;};return a48_0x49fe();}
@@ -1 +1 @@
1
- (function(_0x5bdbdf,_0xd08a30){const _0x27ec6b=a49_0x23a8,_0x17c76c=_0x5bdbdf();while(!![]){try{const _0x15436a=-parseInt(_0x27ec6b(0x1bd))/0x1*(-parseInt(_0x27ec6b(0x1be))/0x2)+parseInt(_0x27ec6b(0x1cb))/0x3+-parseInt(_0x27ec6b(0x1ba))/0x4+-parseInt(_0x27ec6b(0x1c2))/0x5+parseInt(_0x27ec6b(0x1cd))/0x6+parseInt(_0x27ec6b(0x1cc))/0x7*(-parseInt(_0x27ec6b(0x1c4))/0x8)+-parseInt(_0x27ec6b(0x1ca))/0x9*(-parseInt(_0x27ec6b(0x1c6))/0xa);if(_0x15436a===_0xd08a30)break;else _0x17c76c['push'](_0x17c76c['shift']());}catch(_0x5268aa){_0x17c76c['push'](_0x17c76c['shift']());}}}(a49_0x3edc,0x3da50));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x23a8(_0x325263,_0x533647){_0x325263=_0x325263-0x1ba;const _0x3edc09=a49_0x3edc();let _0x23a83=_0x3edc09[_0x325263];return _0x23a83;}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x539191){const _0x340095=a49_0x23a8;if(_0x539191>=BYTES_PER_MB){const _0x351e61=Math[_0x340095(0x1c1)](_0x539191/BYTES_PER_MB*0x64)/0x64;return _0x351e61[_0x340095(0x1bb)](0x2)+_0x340095(0x1c3);}return _0x539191+'\x20B';}function a49_0x3edc(){const _0x4999f7=['7rWFLnf','699258qvgJax','768548hXsifm','toFixed','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','1jfugjg','847142EBIMup','File\x20not\x20found:\x20','File\x20is\x20not\x20a\x20regular\x20file:\x20','ceil','1265655qvmhEE','\x20MB','1236952wqGstL','\x20path\x20is\x20required.','10Gpeqdk','validation','size','isFile','2511846qjYUki','99525hDzCSN'];a49_0x3edc=function(){return _0x4999f7;};return a49_0x3edc();}export function requireDevelopmentUploadFile(_0x1aa767,_0x120e35){const _0x21b033=a49_0x23a8,_0x3276b1=_0x1aa767['trim']();if(!_0x3276b1)throw CliErrors[_0x21b033(0x1c7)](_0x120e35+_0x21b033(0x1c5));if(!existsSync(_0x3276b1))throw CliErrors[_0x21b033(0x1c7)](_0x21b033(0x1bf)+_0x3276b1);const _0x9cd456=statSync(_0x3276b1);if(!_0x9cd456[_0x21b033(0x1c9)]())throw CliErrors['validation'](_0x21b033(0x1c0)+_0x3276b1);if(_0x9cd456[_0x21b033(0x1c8)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x21b033(0x1c7)](_0x21b033(0x1bc)+_0x3276b1+'\x20('+formatBytes(_0x9cd456[_0x21b033(0x1c8)])+')');return{'path':_0x3276b1,'size':_0x9cd456[_0x21b033(0x1c8)]};}
1
+ function a49_0x1172(_0x5c6378,_0x5f1f23){_0x5c6378=_0x5c6378-0x7f;const _0x35af53=a49_0x35af();let _0x117251=_0x35af53[_0x5c6378];return _0x117251;}function a49_0x35af(){const _0x2b6be6=['validation','27oqVzEm','\x20MB','1644038oBWHef','File\x20not\x20found:\x20','1026GUZfmU','ceil','size','928260RCkbPF','43592OJmUlo','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','File\x20is\x20not\x20a\x20regular\x20file:\x20','4930YuHOUs','7vRkNEp','trim','1356705jTYYgw','204syWrIx','isFile','428076MoxVGQ','\x20path\x20is\x20required.','8NYLmGD','4444448jvFDGK'];a49_0x35af=function(){return _0x2b6be6;};return a49_0x35af();}(function(_0x30440d,_0x27facf){const _0x4f8411=a49_0x1172,_0x26f7c1=_0x30440d();while(!![]){try{const _0x1e662a=-parseInt(_0x4f8411(0x90))/0x1*(parseInt(_0x4f8411(0x82))/0x2)+-parseInt(_0x4f8411(0x81))/0x3+parseInt(_0x4f8411(0x8d))/0x4*(-parseInt(_0x4f8411(0x88))/0x5)+-parseInt(_0x4f8411(0x8b))/0x6*(-parseInt(_0x4f8411(0x86))/0x7)+-parseInt(_0x4f8411(0x8e))/0x8+parseInt(_0x4f8411(0x94))/0x9*(-parseInt(_0x4f8411(0x85))/0xa)+-parseInt(_0x4f8411(0x92))/0xb*(-parseInt(_0x4f8411(0x89))/0xc);if(_0x1e662a===_0x27facf)break;else _0x26f7c1['push'](_0x26f7c1['shift']());}catch(_0x5954ee){_0x26f7c1['push'](_0x26f7c1['shift']());}}}(a49_0x35af,0x88aa4));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x2df15b){const _0x3a8ad6=a49_0x1172;if(_0x2df15b>=BYTES_PER_MB){const _0x2ca4ad=Math[_0x3a8ad6(0x7f)](_0x2df15b/BYTES_PER_MB*0x64)/0x64;return _0x2ca4ad['toFixed'](0x2)+_0x3a8ad6(0x91);}return _0x2df15b+'\x20B';}export function requireDevelopmentUploadFile(_0x1c3f75,_0x3ef282){const _0x4468d1=a49_0x1172,_0x2d01b1=_0x1c3f75[_0x4468d1(0x87)]();if(!_0x2d01b1)throw CliErrors[_0x4468d1(0x8f)](_0x3ef282+_0x4468d1(0x8c));if(!existsSync(_0x2d01b1))throw CliErrors[_0x4468d1(0x8f)](_0x4468d1(0x93)+_0x2d01b1);const _0x2910f8=statSync(_0x2d01b1);if(!_0x2910f8[_0x4468d1(0x8a)]())throw CliErrors[_0x4468d1(0x8f)](_0x4468d1(0x84)+_0x2d01b1);if(_0x2910f8['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x4468d1(0x8f)](_0x4468d1(0x83)+_0x2d01b1+'\x20('+formatBytes(_0x2910f8[_0x4468d1(0x80)])+')');return{'path':_0x2d01b1,'size':_0x2910f8[_0x4468d1(0x80)]};}
@@ -1 +1 @@
1
- function a50_0x226e(_0x8c1141,_0x30b486){_0x8c1141=_0x8c1141-0x92;const _0x518825=a50_0x5188();let _0x226ee5=_0x518825[_0x8c1141];return _0x226ee5;}function a50_0x5188(){const _0x4f319c=['Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','2157576WFlwSz','App\x20Code\x20cannot\x20exceed\x20100\x20characters','length','23lBntQr','test','37953245yUgTar','5226486lmXFou','8934247EwEFLB','2071340kXHwcA','App\x20Code\x20cannot\x20be\x20empty','trim','27jsbIWd','5862780qQoEqf','51950JTHuzd','10LytKuA','8wZTVcv'];a50_0x5188=function(){return _0x4f319c;};return a50_0x5188();}(function(_0x998212,_0x9b6b7a){const _0xbc91ad=a50_0x226e,_0x170d6e=_0x998212();while(!![]){try{const _0x138681=-parseInt(_0xbc91ad(0x97))/0x1*(-parseInt(_0xbc91ad(0xa1))/0x2)+-parseInt(_0xbc91ad(0x9a))/0x3+parseInt(_0xbc91ad(0x94))/0x4*(-parseInt(_0xbc91ad(0xa2))/0x5)+-parseInt(_0xbc91ad(0xa0))/0x6+-parseInt(_0xbc91ad(0x9b))/0x7*(-parseInt(_0xbc91ad(0x92))/0x8)+-parseInt(_0xbc91ad(0x9f))/0x9*(parseInt(_0xbc91ad(0x9c))/0xa)+parseInt(_0xbc91ad(0x99))/0xb;if(_0x138681===_0x9b6b7a)break;else _0x170d6e['push'](_0x170d6e['shift']());}catch(_0x16eee7){_0x170d6e['push'](_0x170d6e['shift']());}}}(a50_0x5188,0xdcd6f));export function validateAppcode(_0x39d388){const _0x38c437=a50_0x226e,_0x470cca=_0x39d388[_0x38c437(0x9e)]();if(!_0x470cca)return{'valid':![],'message':_0x38c437(0x9d)};if(_0x470cca[_0x38c437(0x96)]>0x64)return{'valid':![],'message':_0x38c437(0x95)};if(!/^[A-Za-z0-9_-]+$/[_0x38c437(0x98)](_0x470cca))return{'valid':![],'message':_0x38c437(0x93)};return{'valid':!![]};}
1
+ function a50_0x3168(_0xcfcea8,_0x254b7a){_0xcfcea8=_0xcfcea8-0x65;const _0x336bbd=a50_0x336b();let _0x316838=_0x336bbd[_0xcfcea8];return _0x316838;}(function(_0x37e87d,_0x313569){const _0x2e9c97=a50_0x3168,_0x746792=_0x37e87d();while(!![]){try{const _0x52ae0d=parseInt(_0x2e9c97(0x73))/0x1+parseInt(_0x2e9c97(0x6b))/0x2*(parseInt(_0x2e9c97(0x72))/0x3)+-parseInt(_0x2e9c97(0x6f))/0x4+-parseInt(_0x2e9c97(0x6c))/0x5*(-parseInt(_0x2e9c97(0x6d))/0x6)+-parseInt(_0x2e9c97(0x68))/0x7+parseInt(_0x2e9c97(0x66))/0x8*(parseInt(_0x2e9c97(0x71))/0x9)+-parseInt(_0x2e9c97(0x6a))/0xa*(parseInt(_0x2e9c97(0x74))/0xb);if(_0x52ae0d===_0x313569)break;else _0x746792['push'](_0x746792['shift']());}catch(_0x5b0d49){_0x746792['push'](_0x746792['shift']());}}}(a50_0x336b,0x3800a));function a50_0x336b(){const _0x516e9d=['3806RtUtOt','length','test','3032PWBTLO','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','762293elmYTZ','App\x20Code\x20cannot\x20be\x20empty','19810VoYyjR','26nKckzS','2130010iIPTXT','6mlBshK','App\x20Code\x20cannot\x20exceed\x20100\x20characters','760192qIzViU','trim','9459wvbtGd','22017XRtTEw','294021cWEIPG'];a50_0x336b=function(){return _0x516e9d;};return a50_0x336b();}export function validateAppcode(_0xccabbe){const _0x5331b8=a50_0x3168,_0x220e8f=_0xccabbe[_0x5331b8(0x70)]();if(!_0x220e8f)return{'valid':![],'message':_0x5331b8(0x69)};if(_0x220e8f[_0x5331b8(0x75)]>0x64)return{'valid':![],'message':_0x5331b8(0x6e)};if(!/^[A-Za-z0-9_-]+$/[_0x5331b8(0x65)](_0x220e8f))return{'valid':![],'message':_0x5331b8(0x67)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a51_0x605cab=a51_0x49d2;(function(_0x1d9ded,_0x54cbb7){const _0x5ddf24=a51_0x49d2,_0x34adaf=_0x1d9ded();while(!![]){try{const _0x3bb949=parseInt(_0x5ddf24(0x1a8))/0x1+parseInt(_0x5ddf24(0x196))/0x2*(parseInt(_0x5ddf24(0x1a2))/0x3)+parseInt(_0x5ddf24(0x19a))/0x4+-parseInt(_0x5ddf24(0x197))/0x5*(-parseInt(_0x5ddf24(0x198))/0x6)+parseInt(_0x5ddf24(0x1a1))/0x7+-parseInt(_0x5ddf24(0x1a3))/0x8+-parseInt(_0x5ddf24(0x1aa))/0x9*(-parseInt(_0x5ddf24(0x1a7))/0xa);if(_0x3bb949===_0x54cbb7)break;else _0x34adaf['push'](_0x34adaf['shift']());}catch(_0x384a4f){_0x34adaf['push'](_0x34adaf['shift']());}}}(a51_0x2e27,0xd7713));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a51_0x49d2(_0x2bd779,_0x403310){_0x2bd779=_0x2bd779-0x195;const _0x2e27fb=a51_0x2e27();let _0x49d272=_0x2e27fb[_0x2bd779];return _0x49d272;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a51_0x2e27(){const _0x226b34=['95538caWFRe','key','627596RWGakq','Get\x20a\x20config\x20value\x20by\x20key','Missing\x20key.','app','Key\x20not\x20found:\x20','object','\x20config\x20get\x20--key\x20<key>','5198375QtZCpu','10593KaiuiY','12765160ouyZGB','read','config','Usage:\x20','1643520DPAksV','191464fkjtZq','str','63oIfNwy','validation','116rZZizl','10IPfVix'];a51_0x2e27=function(){return _0x226b34;};return a51_0x2e27();}async function execute(_0x37343e){const _0x37a1ac=a51_0x49d2,_0x37af1f=_0x37343e[_0x37a1ac(0x1a9)]('key');if(!_0x37af1f)throw CliErrors[_0x37a1ac(0x195)](_0x37a1ac(0x19c),_0x37a1ac(0x1a6)+CLI_BIN_NAME+_0x37a1ac(0x1a0));const _0x443ba3=readConfig(),_0x3d0b2a=_0x37af1f===_0x37a1ac(0x19d)?'appcode':_0x37af1f,_0x25b9e3=_0x443ba3[_0x3d0b2a];if(_0x25b9e3===undefined)throw CliErrors['validation'](_0x37a1ac(0x19e)+_0x37af1f);return{'ok':!![],'data':typeof _0x25b9e3===_0x37a1ac(0x19f)?_0x25b9e3:{[_0x3d0b2a]:_0x25b9e3},'message':typeof _0x25b9e3==='object'?undefined:String(_0x25b9e3)};}export const configGetDefinition={'service':a51_0x605cab(0x1a5),'command':'get','description':a51_0x605cab(0x19b),'risk':a51_0x605cab(0x1a4),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x605cab(0x199),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a51_0x27c498=a51_0x295f;(function(_0x5004e7,_0x19deba){const _0x1e5d10=a51_0x295f,_0x506cb7=_0x5004e7();while(!![]){try{const _0x3e413a=-parseInt(_0x1e5d10(0xcd))/0x1*(-parseInt(_0x1e5d10(0xca))/0x2)+-parseInt(_0x1e5d10(0xcc))/0x3*(parseInt(_0x1e5d10(0xc6))/0x4)+parseInt(_0x1e5d10(0xd4))/0x5*(-parseInt(_0x1e5d10(0xc4))/0x6)+parseInt(_0x1e5d10(0xc2))/0x7+-parseInt(_0x1e5d10(0xd5))/0x8+-parseInt(_0x1e5d10(0xd1))/0x9+parseInt(_0x1e5d10(0xce))/0xa;if(_0x3e413a===_0x19deba)break;else _0x506cb7['push'](_0x506cb7['shift']());}catch(_0x1431b5){_0x506cb7['push'](_0x506cb7['shift']());}}}(a51_0x57b3,0x6996b));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a51_0x295f(_0x3847a0,_0x442425){_0x3847a0=_0x3847a0-0xc1;const _0x57b317=a51_0x57b3();let _0x295ff8=_0x57b317[_0x3847a0];return _0x295ff8;}import{CLI_BIN_NAME}from'../../constant/cli.js';function a51_0x57b3(){const _0x5a42b2=['validation','6lZUjhg','appcode','3IntWwx','7591dMxVrI','10546360KmQbqu','Usage:\x20','Key\x20not\x20found:\x20','1769814vdgnxD','get','str','124435fpkNay','6033440VNyKaQ','key','4543882wYfrbU','app','66ySEKzf','\x20config\x20get\x20--key\x20<key>','277844KmfVOb','object','Get\x20a\x20config\x20value\x20by\x20key'];a51_0x57b3=function(){return _0x5a42b2;};return a51_0x57b3();}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0xc5f907){const _0x31bbcc=a51_0x295f,_0x2cb0d2=_0xc5f907[_0x31bbcc(0xd3)]('key');if(!_0x2cb0d2)throw CliErrors[_0x31bbcc(0xc9)]('Missing\x20key.',_0x31bbcc(0xcf)+CLI_BIN_NAME+_0x31bbcc(0xc5));const _0x21d708=readConfig(),_0x57c353=_0x2cb0d2===_0x31bbcc(0xc3)?_0x31bbcc(0xcb):_0x2cb0d2,_0x3f0e22=_0x21d708[_0x57c353];if(_0x3f0e22===undefined)throw CliErrors[_0x31bbcc(0xc9)](_0x31bbcc(0xd0)+_0x2cb0d2);return{'ok':!![],'data':typeof _0x3f0e22===_0x31bbcc(0xc7)?_0x3f0e22:{[_0x57c353]:_0x3f0e22},'message':typeof _0x3f0e22===_0x31bbcc(0xc7)?undefined:String(_0x3f0e22)};}export const configGetDefinition={'service':'config','command':a51_0x27c498(0xd2),'description':a51_0x27c498(0xc8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x27c498(0xc1),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};