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

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_0x35367b=a36_0x3bb3;function a36_0x3bb3(_0x426982,_0x2d85fa){_0x426982=_0x426982-0x144;const _0x294f05=a36_0x294f();let _0x3bb315=_0x294f05[_0x426982];return _0x3bb315;}function a36_0x294f(){const _0x4f93b9=['94746wiNejG','/api/management/library/scripts/list?appCode=','scriptContent','Force\x20overwrite\x20local\x20unsynced\x20changes','574354TkMHOG','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','HOOK','Remote\x20script\x20missing\x20content.','Remote\x20script\x20missing\x20id.','functionNode','88624EiwDIg','string','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','50GkqDFF','validation','2799aIGJAR','datasetCode','651716FMqFkr','filePath','toLowerCase','hash','stdin','yes','would_pull','boolean','unresolvable\x20target\x20path','type','functionName','stderr','functions','5190vXbRrK','\x22\x20not\x20found\x20after\x20ensureLockScope.','length','message','local\x20unsynced\x20changes','lockKey','4386907cRxqTX','Lock\x20scope\x20for\x20app\x20\x22','cancelled','ENDPOINT','lastSync','bff','version','includes','lockFilePath','\x20failed','No\x20remote\x20BFF\x20scripts\x20found.','apiDir','\x20remote\x20BFF\x20script(s)\x20for\x20pull','conflict','map','write','pull','8XXRvBI','&type=','all','Force\x20pull\x20cancelled.','\x20pulled,\x20','\x20skipped,\x20','hookLocation','utf8','trim','Pull\x20complete:\x20','str','apps','push','scriptsRoot','question','scriptType','Would\x20inspect\x20','stringify','nonInteractive','appCode','976284HxMmDd','toISOString','alias'];a36_0x294f=function(){return _0x4f93b9;};return a36_0x294f();}(function(_0x179f23,_0x8c784b){const _0x5bc112=a36_0x3bb3,_0x4e2b2e=_0x179f23();while(!![]){try{const _0x223b6d=-parseInt(_0x5bc112(0x18b))/0x1+parseInt(_0x5bc112(0x17e))/0x2+parseInt(_0x5bc112(0x177))/0x3+parseInt(_0x5bc112(0x184))/0x4+-parseInt(_0x5bc112(0x187))/0x5*(parseInt(_0x5bc112(0x17a))/0x6)+-parseInt(_0x5bc112(0x152))/0x7*(-parseInt(_0x5bc112(0x163))/0x8)+parseInt(_0x5bc112(0x189))/0x9*(parseInt(_0x5bc112(0x14c))/0xa);if(_0x223b6d===_0x8c784b)break;else _0x4e2b2e['push'](_0x4e2b2e['shift']());}catch(_0x5d412f){_0x4e2b2e['push'](_0x4e2b2e['shift']());}}}(a36_0x294f,0x95b7d));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_0x35367b(0x157),'command':a36_0x35367b(0x162),'description':a36_0x35367b(0x186),'risk':a36_0x35367b(0x161),'flags':[{'name':a36_0x35367b(0x148),'type':a36_0x35367b(0x185),'description':'Pull\x20only\x20this\x20script\x20type','enum':['COMMON',a36_0x35367b(0x155),a36_0x35367b(0x180)]},{'name':'force','type':a36_0x35367b(0x146),'description':a36_0x35367b(0x17d)}],async 'dryRun'(_0xa62aea){const _0x19d59a=a36_0x35367b,_0x1964c3=loadBffProjectConfig(_0xa62aea[_0x19d59a(0x176)]),_0x468769=await readBffLockFile(_0x1964c3[_0x19d59a(0x15a)]),{appLock:_0x12a4c6}=ensureLockScope(_0x468769??createEmptyBffLock(),_0xa62aea[_0x19d59a(0x176)],_0x1964c3[_0x19d59a(0x170)],_0x19d59a(0x162)),_0x34d89b=normalizeBffType(_0xa62aea[_0x19d59a(0x16d)](_0x19d59a(0x148)))??undefined,_0x56da37=buildDatasetCodeToAliasMap(_0xa62aea[_0x19d59a(0x15d)],_0xa62aea[_0x19d59a(0x176)]),[_0x5427b2,_0x142702]=await Promise[_0x19d59a(0x165)]([listBffScripts(_0xa62aea[_0x19d59a(0x176)],_0x34d89b),getBffScriptStatistics(_0xa62aea[_0x19d59a(0x176)])]),_0x1e33a9=createHookLocationMap(_0x142702),_0x274218=[];for(const _0x3abe66 of _0x5427b2){const _0x29adf1=resolveRemoteScriptTarget(_0x1964c3,_0x3abe66,_0x1e33a9,_0x12a4c6[_0x19d59a(0x14b)],_0x56da37);if(!_0x29adf1){_0x274218[_0x19d59a(0x16f)]({'scriptType':_0x3abe66['scriptType'],'functionName':_0x3abe66[_0x19d59a(0x149)]??'','status':'skipped','reason':_0x19d59a(0x147)});continue;}const _0x48c845=_0x12a4c6[_0x19d59a(0x14b)][_0x29adf1['lockKey']],_0x780864=_0x3abe66[_0x19d59a(0x17c)]!=null?computeContentHash(_0x3abe66[_0x19d59a(0x17c)]):undefined,_0x360828=await hasUnsyncedLocalChanges(_0x29adf1[_0x19d59a(0x18c)],_0x48c845,_0x780864);_0x274218[_0x19d59a(0x16f)]({'lockKey':_0x29adf1[_0x19d59a(0x151)],'filePath':_0x29adf1[_0x19d59a(0x18c)],'remoteId':_0x3abe66['id']??null,'status':_0x360828?_0x19d59a(0x15f):_0x19d59a(0x145)});}return{'method':'GET','url':_0x19d59a(0x17b)+_0xa62aea['appCode']+(_0x34d89b?_0x19d59a(0x164)+_0x34d89b:''),'body':{'appCode':_0xa62aea[_0x19d59a(0x176)],'filterType':_0x34d89b??null,'files':_0x274218},'description':_0x19d59a(0x173)+_0x274218['length']+_0x19d59a(0x15e)};},async 'execute'(_0x5b8886){const _0x103d04=a36_0x35367b,_0x4de4ff=loadBffProjectConfig(_0x5b8886[_0x103d04(0x176)]),_0x1ac24d=await readBffLockFile(_0x4de4ff['lockFilePath']),{lockData:_0x22d0b9,appLock:_0x390568}=ensureLockScope(_0x1ac24d??createEmptyBffLock(),_0x5b8886[_0x103d04(0x176)],_0x4de4ff[_0x103d04(0x170)],_0x103d04(0x162)),_0x13618e=normalizeBffType(_0x5b8886[_0x103d04(0x16d)]('type'))??undefined;if(_0x5b8886[_0x103d04(0x16d)]('type')&&!_0x13618e)throw CliErrors[_0x103d04(0x188)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x227a0d,_0x5dc9d7]=await Promise['all']([listBffScripts(_0x5b8886[_0x103d04(0x176)],_0x13618e),getBffScriptStatistics(_0x5b8886['appCode'])]);if(_0x227a0d[_0x103d04(0x14e)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x103d04(0x15c)};const _0x45f34f=_0x5b8886['bool']('force');if(_0x45f34f&&!_0x5b8886['nonInteractive']){const _0x34a990=await confirmForce();if(!_0x34a990)throw CliErrors[_0x103d04(0x154)](_0x103d04(0x166));}if(_0x45f34f&&_0x5b8886[_0x103d04(0x175)]){}const _0x30e5d3=buildDatasetCodeToAliasMap(_0x5b8886[_0x103d04(0x15d)],_0x5b8886['appCode']),_0x5850be=createHookLocationMap(_0x5dc9d7),_0x2fd241=JSON['parse'](JSON[_0x103d04(0x174)](_0x22d0b9)),_0x247ae4=_0x5b8886[_0x103d04(0x176)],_0x551233=_0x2fd241[_0x103d04(0x16e)][_0x247ae4];if(!_0x551233)throw new Error(_0x103d04(0x153)+_0x247ae4+_0x103d04(0x14d));const _0x285df8=[],_0x1b73b9=[],_0x1a2a0a=[];for(const _0x5be375 of _0x227a0d){const _0x3e60c0=resolveRemoteScriptTarget(_0x4de4ff,_0x5be375,_0x5850be,_0x390568[_0x103d04(0x14b)],_0x30e5d3);if(!_0x3e60c0){_0x1b73b9['push']({'lockKey':_0x5be375[_0x103d04(0x172)]+'/'+_0x5be375['functionName'],'reason':'unresolvable\x20target\x20path'});continue;}const _0x428fdc=_0x390568[_0x103d04(0x14b)][_0x3e60c0[_0x103d04(0x151)]];try{if(!_0x5be375['id'])throw new Error(_0x103d04(0x182));if(_0x5be375[_0x103d04(0x17c)]==null)throw new Error(_0x103d04(0x181));const _0x47bb13=_0x5be375['scriptContent'],_0x2d9eb=computeContentHash(_0x47bb13);if(!_0x45f34f){const _0x13937e=await hasUnsyncedLocalChanges(_0x3e60c0[_0x103d04(0x18c)],_0x428fdc,_0x2d9eb);if(_0x13937e){_0x1b73b9[_0x103d04(0x16f)]({'lockKey':_0x3e60c0['lockKey'],'reason':_0x103d04(0x150)});continue;}}await ensureParentDirectory(_0x3e60c0[_0x103d04(0x18c)]),await writeFile(_0x3e60c0['filePath'],_0x47bb13,_0x103d04(0x16a));const _0x3a73e4={'hash':_0x2d9eb,'remoteId':_0x5be375['id'],'version':_0x5be375[_0x103d04(0x158)]};_0x3e60c0[_0x103d04(0x148)]===_0x103d04(0x180)&&_0x3e60c0['hookLocation']&&(_0x3a73e4[_0x103d04(0x179)]=_0x3e60c0['hookLocation'][_0x103d04(0x179)],_0x3a73e4[_0x103d04(0x18a)]=_0x3e60c0[_0x103d04(0x169)][_0x103d04(0x18a)],_0x3a73e4['operationType']=_0x3e60c0[_0x103d04(0x169)]['operationType'],_0x3a73e4['functionNode']=_0x3e60c0['hookLocation'][_0x103d04(0x183)]),_0x551233[_0x103d04(0x14b)][_0x3e60c0[_0x103d04(0x151)]]=_0x3a73e4,_0x285df8[_0x103d04(0x16f)]({'lockKey':_0x3e60c0[_0x103d04(0x151)],'remoteId':_0x5be375['id']});}catch(_0x171971){_0x1a2a0a[_0x103d04(0x16f)]({'lockKey':_0x3e60c0[_0x103d04(0x151)],'error':_0x171971 instanceof Error?_0x171971[_0x103d04(0x14f)]:String(_0x171971)});}}return _0x551233[_0x103d04(0x156)]=new Date()[_0x103d04(0x178)](),await writeBffLockFile(_0x4de4ff[_0x103d04(0x15a)],_0x2fd241),{'ok':_0x1a2a0a['length']===0x0,'data':{'pulled':_0x285df8,'skipped':_0x1b73b9,'failed':_0x1a2a0a},'message':_0x103d04(0x16c)+_0x285df8['length']+_0x103d04(0x167)+_0x1b73b9['length']+_0x103d04(0x168)+_0x1a2a0a[_0x103d04(0x14e)]+_0x103d04(0x15b)};}};async function hasUnsyncedLocalChanges(_0x5d81b5,_0x42b744,_0x5020b7){const _0x3f41b7=a36_0x35367b;if(!await fileExists(_0x5d81b5))return![];const _0xb564e6=await computeFileHash(_0x5d81b5);if(!_0x42b744)return _0x5020b7?_0xb564e6!==_0x5020b7:!![];return _0xb564e6!==_0x42b744[_0x3f41b7(0x18e)];}function buildDatasetCodeToAliasMap(_0x211c4b,_0x5126a4){const _0x3e324e=a36_0x35367b,_0x42c455=loadAliasMap(_0x211c4b,undefined,resolveApiFilePath(_0x211c4b,_0x5126a4));return new Map(_0x42c455[_0x3e324e(0x160)](_0x5b09fb=>[_0x5b09fb[_0x3e324e(0x18a)],_0x5b09fb[_0x3e324e(0x179)]]));}async function confirmForce(){const _0x40cc97=a36_0x35367b,_0x1330b2=createInterface({'input':process[_0x40cc97(0x18f)],'output':process[_0x40cc97(0x14a)]}),_0x3b2ebe=await new Promise(_0x56812a=>{const _0x144951=_0x40cc97;_0x1330b2[_0x144951(0x171)](_0x144951(0x17f),_0x56812a);});return _0x1330b2['close'](),['y',_0x40cc97(0x144)][_0x40cc97(0x159)](_0x3b2ebe[_0x40cc97(0x16b)]()[_0x40cc97(0x18d)]());}
@@ -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_0x30a808=a37_0x1910;(function(_0x4d7373,_0x3ae97d){const _0x88ac83=a37_0x1910,_0x5cd0a2=_0x4d7373();while(!![]){try{const _0x4faa08=-parseInt(_0x88ac83(0x1e0))/0x1+parseInt(_0x88ac83(0x218))/0x2+parseInt(_0x88ac83(0x1f3))/0x3*(-parseInt(_0x88ac83(0x1fe))/0x4)+parseInt(_0x88ac83(0x21e))/0x5*(-parseInt(_0x88ac83(0x1fa))/0x6)+parseInt(_0x88ac83(0x21a))/0x7+-parseInt(_0x88ac83(0x1f9))/0x8+parseInt(_0x88ac83(0x1e3))/0x9;if(_0x4faa08===_0x3ae97d)break;else _0x5cd0a2['push'](_0x5cd0a2['shift']());}catch(_0x667363){_0x5cd0a2['push'](_0x5cd0a2['shift']());}}}(a37_0x4da4,0x5bd6a));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';function a37_0x1910(_0x394e6e,_0x31d8bc){_0x394e6e=_0x394e6e-0x1d9;const _0x4da490=a37_0x4da4();let _0x191061=_0x4da490[_0x394e6e];return _0x191061;}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';function a37_0x4da4(){const _0x41e01c=['str','4079488UemKcm','operationType','Lock\x20scope\x20for\x20app\x20\x22','boolean','1379515Zkryjx','/api/management/library/scripts/save','\x20uploaded,\x20','message','name','Local\x20function\x20not\x20found:\x20','\x20failed,\x20','appCode','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','would_push','validation','bool','unchanged','remoteId','211270BYHeHE','ENDPOINT','map','3993642SguFKM','Incomplete\x20HOOK\x20path:\x20','values','alias','lastSync','script','apps','No\x20local\x20BFF\x20functions\x20found.','scriptsRoot','status','code','update','toISOString','datasetCode','get','HOOK','47694aFtlbB','Cannot\x20resolve\x20dataset\x20for\x20\x22','has','push','lockFilePath','string','3021528DrYfny','6lMWTkQ','version','\x22.\x20','cleared','64tJsDSK','aliasToDatasetCode','\x22\x20not\x20found\x20after\x20ensureLockScope.','functionNode','Push\x20only\x20this\x20script\x20type','apiDir','filePath','functions','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','set','attempted','lockKey','description','runtime\x20cache\x20not\x20needed','\x20skipped,\x20','Force\x20push\x20ignoring\x20hash\x20protection','Would\x20inspect\x20',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','force','Push\x20local\x20BFF\x20scripts\x20to\x20remote','length','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','type','POST','some','937760gAxJJc'];a37_0x4da4=function(){return _0x41e01c;};return a37_0x4da4();}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_0x30a808(0x1f6),'description':a37_0x30a808(0x212),'risk':'high-risk-write','flags':[{'name':a37_0x30a808(0x215),'type':a37_0x30a808(0x1f8),'description':a37_0x30a808(0x202),'enum':['COMMON',a37_0x30a808(0x1e1),a37_0x30a808(0x1f2)]},{'name':a37_0x30a808(0x222),'type':a37_0x30a808(0x1f8),'description':a37_0x30a808(0x1da)},{'name':a37_0x30a808(0x211),'type':a37_0x30a808(0x21d),'description':a37_0x30a808(0x20d)}],async 'dryRun'(_0x366fee){const _0xd834c2=a37_0x30a808,_0x20f556=loadBffProjectConfig(_0x366fee[_0xd834c2(0x1d9)]),_0x4cd1a0=await readBffLockFile(_0x20f556[_0xd834c2(0x1f7)]),{appLock:_0x43c430}=ensureLockScope(_0x4cd1a0??createEmptyBffLock(),_0x366fee[_0xd834c2(0x1d9)],_0x20f556[_0xd834c2(0x1eb)],'push'),_0x3950c2=await getTargetFunctions(_0x20f556,_0x366fee),_0x4b61d1=_0x366fee[_0xd834c2(0x1dd)](_0xd834c2(0x211)),_0x447895=[];for(const _0x2b31eb of _0x3950c2){const _0x5305e6=await computeFileHash(_0x2b31eb[_0xd834c2(0x204)]),_0x57c841=_0x43c430['functions'][_0x2b31eb[_0xd834c2(0x209)]],_0x489cd7=!!_0x57c841&&_0x57c841['hash']===_0x5305e6;_0x447895['push']({'lockKey':_0x2b31eb['lockKey'],'filePath':_0x2b31eb['filePath'],'remoteId':_0x57c841?.[_0xd834c2(0x1df)]??null,'mode':_0x57c841?.[_0xd834c2(0x1df)]?_0xd834c2(0x1ee):'create','status':!_0x4b61d1&&_0x489cd7?'unchanged':_0xd834c2(0x1db)});}return{'method':_0xd834c2(0x216),'url':_0xd834c2(0x21f),'body':{'appCode':_0x366fee['appCode'],'force':_0x4b61d1,'files':_0x447895,'cacheClearAtRuntime':_0x447895['some'](_0xf3ff0f=>_0xf3ff0f[_0xd834c2(0x1ec)]==='would_push'),'cacheClearAtRuntimeTimes':_0x447895[_0xd834c2(0x217)](_0x2dbe2f=>_0x2dbe2f['status']===_0xd834c2(0x1db))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0xd834c2(0x20e)+_0x447895[_0xd834c2(0x213)]+_0xd834c2(0x214)};},async 'execute'(_0x183aa4){const _0xe94b7b=a37_0x30a808,_0x357228=loadBffProjectConfig(_0x183aa4[_0xe94b7b(0x1d9)]),_0x2f9094=await readBffLockFile(_0x357228['lockFilePath']),{lockData:_0x326a5e,appLock:_0x5cfd07}=ensureLockScope(_0x2f9094??createEmptyBffLock(),_0x183aa4[_0xe94b7b(0x1d9)],_0x357228[_0xe94b7b(0x1eb)],_0xe94b7b(0x1f6)),_0x5c90e1=await getTargetFunctions(_0x357228,_0x183aa4);if(_0x5c90e1[_0xe94b7b(0x213)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0xe94b7b(0x1ea)};const _0x482257=_0x183aa4[_0xe94b7b(0x1dd)](_0xe94b7b(0x211)),_0x540a87=JSON['parse'](JSON['stringify'](_0x326a5e)),_0x54fe06=_0x540a87[_0xe94b7b(0x1e9)][_0x183aa4[_0xe94b7b(0x1d9)]];if(!_0x54fe06)throw new Error(_0xe94b7b(0x21c)+_0x183aa4['appCode']+_0xe94b7b(0x200));const _0x4e74fe=await buildHookMaps(_0x183aa4[_0xe94b7b(0x1d9)],_0x183aa4[_0xe94b7b(0x203)],_0x5c90e1,_0x54fe06),_0x3344fc=[],_0x2437e5=[],_0x46b355=[];for(const _0x593676 of _0x5c90e1){const _0x9742e6=await computeFileHash(_0x593676['filePath']),_0x1c942c=_0x54fe06[_0xe94b7b(0x205)][_0x593676[_0xe94b7b(0x209)]];if(!_0x482257&&_0x1c942c&&_0x1c942c['hash']===_0x9742e6){_0x2437e5[_0xe94b7b(0x1f6)]({'lockKey':_0x593676[_0xe94b7b(0x209)],'reason':_0xe94b7b(0x1de)});continue;}try{await uploadSingleFunction(_0x183aa4[_0xe94b7b(0x1d9)],_0x593676,_0x54fe06,_0x4e74fe);const _0x1ad068=_0x54fe06['functions'][_0x593676[_0xe94b7b(0x209)]];_0x3344fc[_0xe94b7b(0x1f6)]({'lockKey':_0x593676[_0xe94b7b(0x209)],'remoteId':_0x1ad068?.[_0xe94b7b(0x1df)]??0x0});}catch(_0x13b0e2){_0x46b355['push']({'lockKey':_0x593676[_0xe94b7b(0x209)],'error':_0x13b0e2 instanceof Error?_0x13b0e2[_0xe94b7b(0x221)]:String(_0x13b0e2)});}}_0x54fe06[_0xe94b7b(0x1e7)]=new Date()[_0xe94b7b(0x1ef)](),await writeBffLockFile(_0x357228[_0xe94b7b(0x1f7)],_0x540a87),await waitForUploadedLockEntries(_0x357228[_0xe94b7b(0x1f7)],_0x183aa4['appCode'],_0x3344fc[_0xe94b7b(0x1e2)](_0x57053d=>_0x57053d['lockKey']));let _0x242bef={'attempted':![],'cleared':![]};if(_0x3344fc['length']>0x0)try{let _0x2a10f5='';for(let _0x51fe93=0x0;_0x51fe93<CACHE_CLEAR_ATTEMPTS;_0x51fe93+=0x1){_0x2a10f5=await clearBffScriptCache(),_0x51fe93<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x242bef={'attempted':!![],'cleared':!![],'message':_0x2a10f5||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x3eb874){_0x242bef={'attempted':!![],'cleared':![],'error':_0x3eb874 instanceof Error?_0x3eb874[_0xe94b7b(0x221)]:String(_0x3eb874)};}const _0x262506=_0x46b355[_0xe94b7b(0x213)]===0x0&&(_0x242bef[_0xe94b7b(0x208)]?_0x242bef[_0xe94b7b(0x1fd)]:!![]),_0x3a2830=_0x242bef[_0xe94b7b(0x208)]?_0x242bef[_0xe94b7b(0x1fd)]?'runtime\x20cache\x20cleared':'runtime\x20cache\x20clear\x20failed':_0xe94b7b(0x20b);return{'ok':_0x262506,'data':{'uploaded':_0x3344fc,'skipped':_0x2437e5,'failed':_0x46b355,'cacheClear':_0x242bef},'message':'Push\x20complete:\x20'+_0x3344fc[_0xe94b7b(0x213)]+_0xe94b7b(0x220)+_0x2437e5[_0xe94b7b(0x213)]+_0xe94b7b(0x20c)+_0x46b355[_0xe94b7b(0x213)]+_0xe94b7b(0x224)+_0x3a2830};}};async function getTargetFunctions(_0x53ff3b,_0x37db0c){const _0x3f7d9a=a37_0x30a808,_0x3ab795=_0x37db0c[_0x3f7d9a(0x219)](_0x3f7d9a(0x215)),_0x37953f=_0x37db0c['str']('name'),_0x3e1d69=normalizeBffType(_0x3ab795)??undefined;if(_0x37953f&&!_0x3e1d69)throw CliErrors[_0x3f7d9a(0x1dc)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x5cd795=await scanLocalBffFunctions(_0x53ff3b,_0x3e1d69);if(_0x37953f){const _0x5d6d5e=_0x5cd795['filter'](_0x512e00=>_0x512e00[_0x3f7d9a(0x222)]===_0x37953f);if(_0x5d6d5e[_0x3f7d9a(0x213)]===0x0)throw CliErrors['validation'](_0x3f7d9a(0x223)+_0x3e1d69+'/'+_0x37953f);return _0x5d6d5e;}return _0x5cd795;}async function buildHookMaps(_0x5a4773,_0x20d46b,_0x134e50,_0x32b845){const _0x4c26c7=a37_0x30a808,_0x215b81=_0x134e50[_0x4c26c7(0x217)](_0x34b20b=>_0x34b20b['type']===_0x4c26c7(0x1f2));if(!_0x215b81)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x3aaee6=loadAliasMap(_0x20d46b,undefined,resolveApiFilePath(_0x20d46b,_0x5a4773)),_0x372cc1=new Map(_0x3aaee6['map'](_0x230ff6=>[_0x230ff6['alias'],_0x230ff6['datasetCode']]));for(const _0x283f17 of Object[_0x4c26c7(0x1e5)](_0x32b845[_0x4c26c7(0x205)])){_0x283f17['alias']&&_0x283f17[_0x4c26c7(0x1f0)]&&!_0x372cc1[_0x4c26c7(0x1f5)](_0x283f17[_0x4c26c7(0x1e6)])&&_0x372cc1[_0x4c26c7(0x207)](_0x283f17['alias'],_0x283f17[_0x4c26c7(0x1f0)]);}const _0x451cc6=await listDatasets(_0x5a4773),_0x2bda12=new Map(_0x451cc6[_0x4c26c7(0x1e2)](_0x793e6=>[_0x793e6[_0x4c26c7(0x1ed)],_0x793e6]));return{'aliasToDatasetCode':_0x372cc1,'datasetCodeToDataset':_0x2bda12};}async function uploadSingleFunction(_0x38f297,_0x4dbf33,_0x54e29d,_0x2e38b9){const _0x11d9bc=a37_0x30a808,_0x47053c=await readFile(_0x4dbf33[_0x11d9bc(0x204)],'utf8'),_0xceace8=await computeFileHash(_0x4dbf33[_0x11d9bc(0x204)]),_0x3cb534=_0x54e29d[_0x11d9bc(0x205)][_0x4dbf33[_0x11d9bc(0x209)]];if(_0x3cb534?.['remoteId']&&_0x3cb534[_0x11d9bc(0x1fb)]==null)throw CliErrors['validation'](_0x4dbf33[_0x11d9bc(0x209)]+_0x11d9bc(0x20f));let _0x3130e6=extractScriptDescription(_0x47053c);if(!_0x3130e6&&_0x3cb534?.['remoteId']){const _0x498a47=await getBffScriptInfo(_0x3cb534['remoteId']);_0x3130e6=_0x498a47[_0x11d9bc(0x20a)]||undefined;}const _0x154838={'appCode':_0x38f297,'functionName':_0x4dbf33[_0x11d9bc(0x222)],'scriptType':_0x4dbf33[_0x11d9bc(0x215)],'scriptContent':_0x47053c};if(_0x3cb534?.[_0x11d9bc(0x1df)])_0x154838['id']=_0x3cb534[_0x11d9bc(0x1df)];if(_0x3cb534?.['version']!=null)_0x154838[_0x11d9bc(0x1fb)]=_0x3cb534[_0x11d9bc(0x1fb)];if(_0x3130e6)_0x154838[_0x11d9bc(0x20a)]=_0x3130e6;if(_0x4dbf33['type']===_0x11d9bc(0x1f2)){const _0x299dbd=_0x4dbf33[_0x11d9bc(0x1e6)];if(!_0x299dbd||!_0x4dbf33['operationType']||!_0x4dbf33[_0x11d9bc(0x201)])throw CliErrors[_0x11d9bc(0x1dc)](_0x11d9bc(0x1e4)+_0x4dbf33['lockKey']);const _0x514fb0=_0x2e38b9[_0x11d9bc(0x1ff)][_0x11d9bc(0x1f1)](_0x299dbd)??_0x3cb534?.[_0x11d9bc(0x1f0)]??_0x299dbd,_0x7604d4=_0x2e38b9['datasetCodeToDataset'][_0x11d9bc(0x1f1)](_0x514fb0);if(!_0x7604d4)throw CliErrors[_0x11d9bc(0x1dc)](_0x11d9bc(0x1f4)+_0x299dbd+_0x11d9bc(0x1fc)+('Run\x20`'+CLI_BIN_NAME+_0x11d9bc(0x206)));_0x154838['datasetId']=_0x7604d4['id'],_0x154838[_0x11d9bc(0x21b)]=_0x4dbf33['operationType'],_0x154838[_0x11d9bc(0x201)]=_0x4dbf33[_0x11d9bc(0x201)];}const _0x243052=await saveBffScript(_0x154838),_0x349918=_0x243052['id'],_0x381131=_0x243052[_0x11d9bc(0x1e8)]??await getBffScriptInfo(_0x349918),_0x369ba3={'hash':_0xceace8,'remoteId':_0x349918,'version':_0x381131[_0x11d9bc(0x1fb)]};if(_0x4dbf33[_0x11d9bc(0x215)]===_0x11d9bc(0x1f2)){const _0x446209=_0x4dbf33[_0x11d9bc(0x1e6)],_0x5cbd54=_0x2e38b9[_0x11d9bc(0x1ff)][_0x11d9bc(0x1f1)](_0x446209)??_0x3cb534?.[_0x11d9bc(0x1f0)]??_0x446209;_0x2e38b9['aliasToDatasetCode']['has'](_0x446209)?_0x369ba3['alias']=_0x446209:_0x369ba3[_0x11d9bc(0x1e6)]=_0x3cb534?.[_0x11d9bc(0x1e6)],_0x369ba3[_0x11d9bc(0x1f0)]=_0x5cbd54,_0x369ba3[_0x11d9bc(0x21b)]=_0x4dbf33[_0x11d9bc(0x21b)],_0x369ba3[_0x11d9bc(0x201)]=_0x4dbf33[_0x11d9bc(0x201)];}_0x54e29d[_0x11d9bc(0x205)][_0x4dbf33[_0x11d9bc(0x209)]]=_0x369ba3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1299ed,_0x30d30b,_0xae867d){const _0x1c1038=a37_0x30a808;if(_0xae867d[_0x1c1038(0x213)]===0x0)return;for(let _0x4865d1=0x0;_0x4865d1<LOCK_SETTLE_RETRY_COUNT;_0x4865d1+=0x1){const _0x2bb155=await readBffLockFile(_0x1299ed),_0x40873c=_0x2bb155?.[_0x1c1038(0x1e9)]?.[_0x30d30b]?.[_0x1c1038(0x205)]??{},_0x14d6e0=_0xae867d['every'](_0xa59a24=>!!_0x40873c[_0xa59a24]?.[_0x1c1038(0x1df)]);if(_0x14d6e0)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1c1038(0x210)+_0xae867d['join'](',\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
+ const a38_0x526c5b=a38_0x5e9a;function a38_0xa336(){const _0x15d8bc=['boolean','lockKey','appCode','push','\x20added,\x20','remote','apiDir','119gAgIHn','hash','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','\x20modified,\x20','All\x20BFF\x20scripts\x20are\x20in\x20sync.','map','bff','4kPTnKK','all','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','11505zuIEpe','80hulZYZ','has','lockFilePath','datasetCode','bool','\x20unchanged','764285CYFSmY','554481YhXbyb','read','1437880mDvjdm','scriptsRoot','status','length','143057ckVrqz','65944WBOomk','functions','757218VvgiBg'];a38_0xa336=function(){return _0x15d8bc;};return a38_0xa336();}(function(_0x342176,_0x1b52a4){const _0x6225f=a38_0x5e9a,_0x3fe876=_0x342176();while(!![]){try{const _0x5642b1=parseInt(_0x6225f(0x189))/0x1+-parseInt(_0x6225f(0x17c))/0x2*(-parseInt(_0x6225f(0x17b))/0x3)+-parseInt(_0x6225f(0x178))/0x4*(-parseInt(_0x6225f(0x182))/0x5)+-parseInt(_0x6225f(0x18c))/0x6+parseInt(_0x6225f(0x171))/0x7*(-parseInt(_0x6225f(0x18a))/0x8)+parseInt(_0x6225f(0x183))/0x9+-parseInt(_0x6225f(0x185))/0xa;if(_0x5642b1===_0x1b52a4)break;else _0x3fe876['push'](_0x3fe876['shift']());}catch(_0x163ef7){_0x3fe876['push'](_0x3fe876['shift']());}}}(a38_0xa336,0x189c1));function a38_0x5e9a(_0x12d3da,_0x1a451e){_0x12d3da=_0x12d3da-0x16d;const _0xa33652=a38_0xa336();let _0x5e9ab0=_0xa33652[_0x12d3da];return _0x5e9ab0;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x526c5b(0x177),'command':a38_0x526c5b(0x187),'description':a38_0x526c5b(0x173),'risk':a38_0x526c5b(0x184),'flags':[{'name':a38_0x526c5b(0x16f),'type':a38_0x526c5b(0x18d),'description':a38_0x526c5b(0x17a)}],async 'execute'(_0x166d89){const _0x42d7ff=a38_0x526c5b,_0x3337a6=loadBffProjectConfig(_0x166d89[_0x42d7ff(0x18f)]),_0x65f1e4=await readBffLockFile(_0x3337a6[_0x42d7ff(0x17e)]),{appLock:_0x14c75a}=ensureLockScope(_0x65f1e4??createEmptyBffLock(),_0x166d89[_0x42d7ff(0x18f)],_0x3337a6[_0x42d7ff(0x186)],_0x42d7ff(0x187)),_0x31e7cc=await scanLocalBffFunctions(_0x3337a6),_0x2a42df=[],_0x402ee7=[],_0x37b2e2=[];for(const _0x470269 of _0x31e7cc){const _0x17a104=await computeFileHash(_0x470269['filePath']),_0x2b56c1=_0x14c75a[_0x42d7ff(0x18b)][_0x470269['lockKey']];if(!_0x2b56c1)_0x2a42df[_0x42d7ff(0x16d)](_0x470269[_0x42d7ff(0x18e)]);else _0x2b56c1[_0x42d7ff(0x172)]!==_0x17a104?_0x402ee7[_0x42d7ff(0x16d)](_0x470269['lockKey']):_0x37b2e2[_0x42d7ff(0x16d)](_0x470269['lockKey']);}const _0x5b7c68=[];if(_0x166d89[_0x42d7ff(0x180)](_0x42d7ff(0x16f))){const _0x21e7d7=loadAliasMap(_0x166d89[_0x42d7ff(0x170)],undefined,resolveApiFilePath(_0x166d89[_0x42d7ff(0x170)],_0x166d89['appCode'])),_0x7a0e73=new Map(_0x21e7d7['map'](_0x22fedb=>[_0x22fedb[_0x42d7ff(0x17f)],_0x22fedb['alias']])),[_0x3ee9ac,_0x31099d]=await Promise[_0x42d7ff(0x179)]([listBffScripts(_0x166d89[_0x42d7ff(0x18f)]),getBffScriptStatistics(_0x166d89['appCode'])]),_0x86761=createHookLocationMap(_0x31099d),_0x224fd9=new Set(_0x31e7cc[_0x42d7ff(0x176)](_0x24ba3e=>_0x24ba3e[_0x42d7ff(0x18e)]));for(const _0x325951 of _0x3ee9ac){const _0x4ced90=resolveRemoteScriptTarget(_0x3337a6,_0x325951,_0x86761,_0x14c75a['functions'],_0x7a0e73);_0x4ced90&&!_0x224fd9[_0x42d7ff(0x17d)](_0x4ced90[_0x42d7ff(0x18e)])&&_0x5b7c68[_0x42d7ff(0x16d)](_0x4ced90['lockKey']);}}const _0x335495=_0x2a42df['length']===0x0&&_0x402ee7[_0x42d7ff(0x188)]===0x0&&_0x5b7c68[_0x42d7ff(0x188)]===0x0;return{'ok':!![],'data':{'added':_0x2a42df,'modified':_0x402ee7,'unchanged':_0x37b2e2,'remoteOnly':_0x5b7c68},'message':_0x335495?_0x42d7ff(0x175):_0x2a42df['length']+_0x42d7ff(0x16e)+_0x402ee7[_0x42d7ff(0x188)]+_0x42d7ff(0x174)+_0x37b2e2['length']+_0x42d7ff(0x181)+(_0x5b7c68['length']>0x0?',\x20'+_0x5b7c68[_0x42d7ff(0x188)]+'\x20remote-only':'')};}};
@@ -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_0x2eb530=a39_0x3086;(function(_0x30640f,_0x1dfb7c){const _0x2bf7fd=a39_0x3086,_0x558750=_0x30640f();while(!![]){try{const _0x10f2d0=parseInt(_0x2bf7fd(0x137))/0x1+-parseInt(_0x2bf7fd(0x122))/0x2*(-parseInt(_0x2bf7fd(0x12d))/0x3)+-parseInt(_0x2bf7fd(0x11e))/0x4*(-parseInt(_0x2bf7fd(0x123))/0x5)+parseInt(_0x2bf7fd(0x139))/0x6+parseInt(_0x2bf7fd(0x134))/0x7*(parseInt(_0x2bf7fd(0x127))/0x8)+parseInt(_0x2bf7fd(0x129))/0x9*(parseInt(_0x2bf7fd(0x12c))/0xa)+parseInt(_0x2bf7fd(0x12e))/0xb*(-parseInt(_0x2bf7fd(0x125))/0xc);if(_0x10f2d0===_0x1dfb7c)break;else _0x558750['push'](_0x558750['shift']());}catch(_0x3aa3f2){_0x558750['push'](_0x558750['shift']());}}}(a39_0xcbfd,0x5a908));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a39_0x3086(_0x2818ec,_0x38d5c5){_0x2818ec=_0x2818ec-0x11e;const _0xcbfdc3=a39_0xcbfd();let _0x3086b0=_0xcbfdc3[_0x2818ec];return _0x3086b0;}function a39_0xcbfd(){const _0x2d08db=['Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','4141949ISskNK','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','apiError','320232MQIcJk','../../skills/npx-skills-add.js','1457502WSSTAg','cwd','CLI\x20Built-in\x20Skill\x20installed','install','info','2228XdaDHV','error','setLogPath','cli-skill-install','18dauyim','1030RHItvk','cli-skill','12DePdnq','pipe','8JLTARq','unknown','235584uTBhKz','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','inherit','80wlpmAZ','21186UsaKfS','12887732vrlEsj','log','npx\x20skills\x20add\x20failed:\x20','write','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.'];a39_0xcbfd=function(){return _0x2d08db;};return a39_0xcbfd();}export const cliSkillDefinitions=[{'service':a39_0x2eb530(0x124),'command':a39_0x2eb530(0x13c),'description':a39_0x2eb530(0x135),'risk':a39_0x2eb530(0x131),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4ac6b4){const _0x2411d5=a39_0x2eb530;logger[_0x2411d5(0x120)](process[_0x2411d5(0x13a)]()),logger[_0x2411d5(0x13d)](_0x2411d5(0x121),_0x2411d5(0x132));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x4fb620,RABETBASE_SKILL_SOURCE:_0x35f4c7,runNpxSkillsAddGlobal:_0x3ab17b}=await import(_0x2411d5(0x138)),_0x490ac3=_0x4ac6b4['nonInteractive']?_0x2411d5(0x126):_0x2411d5(0x12b);console[_0x2411d5(0x12f)](_0x2411d5(0x133)+_0x4fb620+')...');const _0x3ceba0=_0x3ab17b(process[_0x2411d5(0x13a)](),_0x35f4c7,{'stdio':_0x490ac3});if(_0x3ceba0['skipped'])console[_0x2411d5(0x12f)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x3ceba0['ok'])console[_0x2411d5(0x12f)](_0x2411d5(0x13b));else throw CliErrors[_0x2411d5(0x136)](_0x2411d5(0x130)+(_0x3ceba0[_0x2411d5(0x11f)]||_0x2411d5(0x128)),_0x2411d5(0x12a)+_0x4fb620);}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_0xa9880=a40_0x3d28;(function(_0x3a7cf5,_0x185539){const _0x2a30b7=a40_0x3d28,_0x461396=_0x3a7cf5();while(!![]){try{const _0x597bfe=parseInt(_0x2a30b7(0x150))/0x1+parseInt(_0x2a30b7(0x143))/0x2+parseInt(_0x2a30b7(0x11e))/0x3+-parseInt(_0x2a30b7(0x12c))/0x4*(-parseInt(_0x2a30b7(0x145))/0x5)+-parseInt(_0x2a30b7(0x153))/0x6*(parseInt(_0x2a30b7(0x136))/0x7)+parseInt(_0x2a30b7(0x108))/0x8+parseInt(_0x2a30b7(0x133))/0x9*(-parseInt(_0x2a30b7(0x118))/0xa);if(_0x597bfe===_0x185539)break;else _0x461396['push'](_0x461396['shift']());}catch(_0x386ac4){_0x461396['push'](_0x461396['shift']());}}}(a40_0x6f92,0xe53f7));function a40_0x6f92(){const _0x3d8706=['skipped','green','version','Invalid\x20version:\x20','fail','988704rcxANI','nonInteractive','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','update','Checking\x20for\x20updates...','write','filter','start','no-skills','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','boolean','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','info','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','/dist-tags','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','160XEqzfJ','@latest','install','source','error','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','4072059GYEXqO','validation','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','length','pipe','https://registry.npmjs.org/-/package/','Updating\x20via\x20','\x20cli-skill\x20install','unknown','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20\x20Run\x20manually:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','message','4GtIQsE','warn','gray','cwd','bool','skills','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','2165391HrrIEm','Already\x20on\x20requested\x20version\x20(v','fromEntries','259lPbxUS','red','npm','bun','succeed','Updated\x20to\x20v','yellow','run','Install\x20a\x20specific\x20CLI\x20version','Requested\x20version:\x20','\x20install\x20-g\x20','beta','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','3677098DJxYuW','trim','6595075wwXTbG','str','latest','Version\x20comparison\x20failed','\x20\x20Try\x20manually:\x20','Update\x20failed','\x20→\x20','Checking\x20CLI\x20Built-in\x20Skill...','slice','log','Current\x20version:\x20','1231884BmQMCU','string','toLowerCase','175428BJhZiU','valid'];a40_0x6f92=function(){return _0x3d8706;};return a40_0x6f92();}import a40_0x373fb8 from'chalk';import a40_0x22ca1e from'ora';import a40_0x29fa1c 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 _0x33f374=a40_0x3d28;return GIT_COMMIT!==_0x33f374(0x127)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x33f374(0x14d)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x43625c=a40_0x3d28,_0x5de0fd=process['execPath'][_0x43625c(0x152)]();if(_0x5de0fd['includes']('bun'))return _0x43625c(0x139);return _0x43625c(0x138);}const updateFlags=[{'name':a40_0xa9880(0x141),'type':a40_0xa9880(0x112),'description':a40_0xa9880(0x142),'default':![]},{'name':a40_0xa9880(0x105),'type':'string','description':a40_0xa9880(0x13e)},{'name':a40_0xa9880(0x110),'type':a40_0xa9880(0x112),'description':a40_0xa9880(0x113),'default':![]},{'name':a40_0xa9880(0x131),'type':a40_0xa9880(0x112),'description':a40_0xa9880(0x11d),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x50ecd6){const _0x4156be=a40_0xa9880;return _0x50ecd6[_0x4156be(0x146)](_0x4156be(0x105))[_0x4156be(0x144)]();}function shouldSkipCliSkill(_0x38d22e){const _0x3cc7ef=a40_0xa9880;return _0x38d22e[_0x3cc7ef(0x130)]('no-skills')||_0x38d22e['flag']('skills')===![];}async function validateUpdateFlags(_0x462e0d){const _0x4bfebb=a40_0xa9880,_0x1b60d1=_0x462e0d[_0x4bfebb(0x130)](_0x4bfebb(0x141)),_0x4a7668=getRequestedVersion(_0x462e0d);if(_0x1b60d1&&_0x4a7668)throw CliErrors['validation'](_0x4bfebb(0x128),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x4a7668&&!a40_0x29fa1c['valid'](_0x4a7668))throw CliErrors[_0x4bfebb(0x11f)](_0x4bfebb(0x106)+_0x4a7668,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x2bb079=a40_0xa9880;try{const _0x44ca39=await fetch(_0x2bb079(0x124)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2bb079(0x116),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x44ca39['ok'])return null;const _0x32321e=await _0x44ca39['json']();if(!_0x32321e||typeof _0x32321e!=='object')return null;return Object[_0x2bb079(0x135)](Object['entries'](_0x32321e)[_0x2bb079(0x10e)](([,_0x134d1b])=>typeof _0x134d1b===_0x2bb079(0x151)&&_0x134d1b[_0x2bb079(0x144)]()[_0x2bb079(0x122)]>0x0)['map'](([_0x3c9596,_0x154ad1])=>[_0x3c9596,String(_0x154ad1)[_0x2bb079(0x144)]()]));}catch{return null;}}function a40_0x3d28(_0x383057,_0x10cd87){_0x383057=_0x383057-0x104;const _0x6f9277=a40_0x6f92();let _0x3d282b=_0x6f9277[_0x383057];return _0x3d282b;}async function fetchNpmDistTagVersion(_0x2a87c6){const _0x727136=await fetchNpmDistTags();return _0x727136?.[_0x2a87c6]??null;}async function fetchLatestVersion(){const _0x5899da=a40_0xa9880;return fetchNpmDistTagVersion(_0x5899da(0x147));}async function resolveTargetVersion(_0x57e877){const _0x39f386=a40_0xa9880,_0x3c1ca9=getRequestedVersion(_0x57e877);if(_0x3c1ca9)return{'version':_0x3c1ca9,'source':_0x39f386(0x105)};if(_0x57e877['bool']('beta')){const _0x3b2746=await fetchNpmDistTagVersion(_0x39f386(0x141));if(!_0x3b2746)return null;return{'version':_0x3b2746,'source':'beta'};}const _0x4e5b0f=await fetchLatestVersion();if(!_0x4e5b0f)return null;return{'version':_0x4e5b0f,'source':_0x39f386(0x147)};}function shouldInstallTarget(_0x38fa66,_0x4ac87e){const _0x342901=a40_0xa9880;if(_0x4ac87e[_0x342901(0x11b)]===_0x342901(0x105)||_0x4ac87e[_0x342901(0x11b)]===_0x342901(0x141))return!a40_0x29fa1c['eq'](_0x38fa66,_0x4ac87e[_0x342901(0x105)]);return a40_0x29fa1c['lt'](_0x38fa66,_0x4ac87e[_0x342901(0x105)]);}function getInstallPlanLabel(_0x140000,_0x2716e3){const _0x5f5c58=a40_0xa9880;switch(_0x2716e3['source']){case'beta':return'Beta\x20version:\x20'+a40_0x373fb8['yellow'](_0x140000)+_0x5f5c58(0x14b)+a40_0x373fb8['green'](_0x2716e3[_0x5f5c58(0x105)]);case _0x5f5c58(0x105):return _0x5f5c58(0x13f)+a40_0x373fb8[_0x5f5c58(0x13c)](_0x140000)+_0x5f5c58(0x14b)+a40_0x373fb8['green'](_0x2716e3[_0x5f5c58(0x105)]);case _0x5f5c58(0x147):default:return'Update\x20available:\x20'+a40_0x373fb8[_0x5f5c58(0x13c)](_0x140000)+_0x5f5c58(0x14b)+a40_0x373fb8[_0x5f5c58(0x104)](_0x2716e3[_0x5f5c58(0x105)]);}}async function installCliSkill(_0x3704bb){const _0x1920f4=a40_0xa9880;console[_0x1920f4(0x14e)](a40_0x373fb8[_0x1920f4(0x12e)](_0x1920f4(0x14c)));const _0x1f35b3=runNpxSkillsAddGlobal(process[_0x1920f4(0x12f)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x3704bb?_0x1920f4(0x123):'inherit'});if(_0x1f35b3[_0x1920f4(0x155)]){console[_0x1920f4(0x14e)](a40_0x373fb8[_0x1920f4(0x12e)](_0x1920f4(0x132)));return;}if(_0x1f35b3['ok']){console[_0x1920f4(0x14e)](a40_0x373fb8[_0x1920f4(0x12e)](_0x1920f4(0x111)));return;}console[_0x1920f4(0x12d)](a40_0x373fb8[_0x1920f4(0x13c)](_0x1920f4(0x12a)+(_0x1f35b3[_0x1920f4(0x11c)]||'unknown'))),console[_0x1920f4(0x14e)](a40_0x373fb8[_0x1920f4(0x12e)](_0x1920f4(0x129)+CLI_BIN_NAME+_0x1920f4(0x126)));}async function execute(_0x55ca74){const _0x2b3e44=a40_0xa9880;await validateUpdateFlags(_0x55ca74);const _0x55402b=getCurrentVersion();console[_0x2b3e44(0x14e)](_0x2b3e44(0x14f)+_0x55402b);const _0x20dc77=a40_0x22ca1e(_0x2b3e44(0x10c))[_0x2b3e44(0x10f)](),_0x257348=await resolveTargetVersion(_0x55ca74);if(!_0x257348){const _0x470f18=_0x55ca74['bool'](_0x2b3e44(0x141))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x2b3e44(0x10a);return _0x20dc77[_0x2b3e44(0x107)](_0x470f18),console[_0x2b3e44(0x14e)](a40_0x373fb8['gray'](_0x2b3e44(0x120)+NPM_PACKAGE_NAME+_0x2b3e44(0x119))),{'ok':![],'message':_0x470f18};}const _0xabc6f2=a40_0x29fa1c[_0x2b3e44(0x154)](VERSION),_0xb988d4=a40_0x29fa1c[_0x2b3e44(0x154)](_0x257348[_0x2b3e44(0x105)]);if(!_0xabc6f2||!_0xb988d4)return _0x20dc77[_0x2b3e44(0x107)](_0x2b3e44(0x148)),{'ok':![],'message':_0x2b3e44(0x148)};if(!shouldInstallTarget(_0xabc6f2,_0x257348)){const _0x2da88a=_0x257348[_0x2b3e44(0x11b)]===_0x2b3e44(0x105)?_0x2b3e44(0x134)+_0x257348['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x257348[_0x2b3e44(0x105)]+')';return _0x20dc77[_0x2b3e44(0x13a)](_0x2da88a),shouldSkipCliSkill(_0x55ca74)?console[_0x2b3e44(0x14e)](a40_0x373fb8[_0x2b3e44(0x12e)](_0x2b3e44(0x117))):await installCliSkill(_0x55ca74[_0x2b3e44(0x109)]),{'ok':!![]};}_0x20dc77[_0x2b3e44(0x114)](getInstallPlanLabel(_0x55402b,_0x257348));const _0x25ce1b=detectPackageManager(),_0x59b77b=_0x25ce1b===_0x2b3e44(0x138)?resolveNpmBin('npm'):_0x25ce1b,_0x40cfb1=a40_0x22ca1e(_0x2b3e44(0x125)+_0x25ce1b+'...')['start']();try{return await execa(_0x59b77b,[_0x2b3e44(0x11a),'-g',NPM_PACKAGE_NAME+'@'+_0x257348[_0x2b3e44(0x105)]],{'stdio':_0x2b3e44(0x123)}),_0x40cfb1['succeed'](_0x2b3e44(0x13b)+_0x257348[_0x2b3e44(0x105)]),console[_0x2b3e44(0x14e)](a40_0x373fb8[_0x2b3e44(0x12e)](_0x2b3e44(0x121))),shouldSkipCliSkill(_0x55ca74)?console[_0x2b3e44(0x14e)](a40_0x373fb8[_0x2b3e44(0x12e)](_0x2b3e44(0x117))):await installCliSkill(_0x55ca74[_0x2b3e44(0x109)]),{'ok':!![]};}catch(_0x2b2633){return _0x40cfb1[_0x2b3e44(0x107)](_0x2b3e44(0x14a)),console[_0x2b3e44(0x11c)](a40_0x373fb8[_0x2b3e44(0x137)]('\x20\x20'+_0x2b2633['message'])),console[_0x2b3e44(0x14e)](a40_0x373fb8['gray'](_0x2b3e44(0x149)+_0x25ce1b+_0x2b3e44(0x140)+NPM_PACKAGE_NAME+'@'+_0x257348[_0x2b3e44(0x105)])),{'ok':![],'message':_0x2b2633[_0x2b3e44(0x12b)]};}}export const updateDefinition={'service':a40_0xa9880(0x10b),'command':a40_0xa9880(0x13d),'description':a40_0xa9880(0x115),'risk':a40_0xa9880(0x10d),'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(_0x2de5d3,_0x5e64f4){const _0x2a1729=a41_0x4f2f,_0x4c8dd8=_0x2de5d3();while(!![]){try{const _0x1bde04=parseInt(_0x2a1729(0xff))/0x1+parseInt(_0x2a1729(0x102))/0x2*(parseInt(_0x2a1729(0x101))/0x3)+-parseInt(_0x2a1729(0xfb))/0x4+parseInt(_0x2a1729(0xfd))/0x5+parseInt(_0x2a1729(0xfc))/0x6+-parseInt(_0x2a1729(0xfe))/0x7+parseInt(_0x2a1729(0x100))/0x8*(-parseInt(_0x2a1729(0x103))/0x9);if(_0x1bde04===_0x5e64f4)break;else _0x4c8dd8['push'](_0x4c8dd8['shift']());}catch(_0x468e2a){_0x4c8dd8['push'](_0x4c8dd8['shift']());}}}(a41_0x466d,0xe2cf7));function a41_0x4f2f(_0x5ae8d0,_0x21afd4){_0x5ae8d0=_0x5ae8d0-0xfb;const _0x466dab=a41_0x466d();let _0x4f2f94=_0x466dab[_0x5ae8d0];return _0x4f2f94;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x466d(){const _0x2c73a9=['120lhUEEu','3fiAZUf','1842424CUWlzi','30627ZCMsXM','2367996bXVHcN','403020iWHvLK','7354335enMmaB','6282689CStlmG','10337wmCNSS'];a41_0x466d=function(){return _0x2c73a9;};return a41_0x466d();}
@@ -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
+ function a42_0x556c(){const _0x40658c=['3469TEzoHQ','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','alias','operation','50iUQmfI','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','read','string','4ZmzKzl','267619lrlSQk','14MvigXW','bool','725230SjNKhJ','563361hpRCEU','code','369558enQBTP','sdk','730560dOkiMV','skip-imports','120YaoNuL','71856bMWxdZ','336IPIsBW','codegen','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','str'];a42_0x556c=function(){return _0x40658c;};return a42_0x556c();}const a42_0x41917f=a42_0x3c2f;function a42_0x3c2f(_0x5e1a5c,_0xbcbcdd){_0x5e1a5c=_0x5e1a5c-0xf7;const _0x556c0b=a42_0x556c();let _0x3c2f98=_0x556c0b[_0x5e1a5c];return _0x3c2f98;}(function(_0x4335c3,_0x4ef312){const _0x72de08=a42_0x3c2f,_0x79cb95=_0x4335c3();while(!![]){try{const _0x262cd7=parseInt(_0x72de08(0x105))/0x1*(parseInt(_0x72de08(0x109))/0x2)+parseInt(_0x72de08(0xf9))/0x3*(-parseInt(_0x72de08(0x10d))/0x4)+-parseInt(_0x72de08(0xf8))/0x5+parseInt(_0x72de08(0xfb))/0x6*(-parseInt(_0x72de08(0x10f))/0x7)+-parseInt(_0x72de08(0xfd))/0x8+-parseInt(_0x72de08(0x100))/0x9*(parseInt(_0x72de08(0xff))/0xa)+parseInt(_0x72de08(0x10e))/0xb*(parseInt(_0x72de08(0x101))/0xc);if(_0x262cd7===_0x4ef312)break;else _0x79cb95['push'](_0x79cb95['shift']());}catch(_0x189e83){_0x79cb95['push'](_0x79cb95['shift']());}}}(a42_0x556c,0x1e776));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x41917f(0x102),'command':a42_0x41917f(0xfc),'description':a42_0x41917f(0x10a),'risk':a42_0x41917f(0x10b),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x41917f(0x107),'type':a42_0x41917f(0x10c),'description':a42_0x41917f(0x103)},{'name':a42_0x41917f(0x108),'type':a42_0x41917f(0x10c),'required':!![],'description':a42_0x41917f(0x106)},{'name':a42_0x41917f(0xfe),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x1f954d){const _0x130ecd=a42_0x41917f,{dataset:_0x4c0a46,operation:_0x23208b}=await getOperationDetail(_0x1f954d['appCode'],_0x1f954d[_0x130ecd(0x104)](_0x130ecd(0xfa)),_0x1f954d['str'](_0x130ecd(0x108))),_0x56b05d=generateSdkCode(_0x4c0a46,_0x23208b,{'includeImports':!_0x1f954d[_0x130ecd(0xf7)](_0x130ecd(0xfe))});return{'ok':!![],'data':{'dataset':{'name':_0x4c0a46['name'],'code':_0x4c0a46[_0x130ecd(0xfa)],'tableName':_0x4c0a46['tableName']},'operation':_0x1f954d[_0x130ecd(0x104)]('operation'),'code':_0x56b05d}};}};
@@ -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_0x324e7f=a43_0x4404;(function(_0x3aaf87,_0x354f06){const _0x2e39b7=a43_0x4404,_0x39d9d4=_0x3aaf87();while(!![]){try{const _0x2b1f5a=-parseInt(_0x2e39b7(0xba))/0x1+-parseInt(_0x2e39b7(0xc7))/0x2+parseInt(_0x2e39b7(0xbd))/0x3*(parseInt(_0x2e39b7(0xb9))/0x4)+parseInt(_0x2e39b7(0xbc))/0x5*(parseInt(_0x2e39b7(0xc2))/0x6)+parseInt(_0x2e39b7(0xc0))/0x7+parseInt(_0x2e39b7(0xb3))/0x8+-parseInt(_0x2e39b7(0xbe))/0x9;if(_0x2b1f5a===_0x354f06)break;else _0x39d9d4['push'](_0x39d9d4['shift']());}catch(_0x4526a8){_0x39d9d4['push'](_0x39d9d4['shift']());}}}(a43_0x24bb,0x5bc1a));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x4404(_0x513001,_0x49d2c5){_0x513001=_0x513001-0xb2;const _0x24bbb5=a43_0x24bb();let _0x44042e=_0x24bbb5[_0x513001];return _0x44042e;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x24bb(){const _0xf968ad=['appCode','487490JROGrc','2649TVnWPY','2309715HtuWKh','sdk','2977254esLomU','str','30gJDGqu','Omit\x20import\x20statements\x20from\x20generated\x20code','read','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sqlcode','389568UnrsAa','sql','no-imports','4309432JxlkNk','target','bool','sqlCode','boolean','sqlName','556qnvDpg','746975gwtUvF'];a43_0x24bb=function(){return _0xf968ad;};return a43_0x24bb();}export const codegenSql={'service':'codegen','command':a43_0x324e7f(0xc8),'description':a43_0x324e7f(0xc5),'risk':a43_0x324e7f(0xc4),'flags':[SQLCODE_FLAG,{'name':a43_0x324e7f(0xb4),'type':'string','description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x324e7f(0xbf),'enum':['sdk','bff']},{'name':a43_0x324e7f(0xb2),'type':a43_0x324e7f(0xb7),'description':a43_0x324e7f(0xc3)}],async 'execute'(_0x645e6b){const _0x525dbe=a43_0x324e7f,_0x18e375=await getSqlQueryInfo(_0x645e6b[_0x525dbe(0xbb)],_0x645e6b[_0x525dbe(0xc1)](_0x525dbe(0xc6))),_0x1e73ea=_0x645e6b[_0x525dbe(0xc1)](_0x525dbe(0xb4))||_0x525dbe(0xbf),_0x20a9a3=generateSqlCodeTemplate(_0x18e375,{'target':_0x1e73ea,'includeImports':!_0x645e6b[_0x525dbe(0xb5)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x18e375[_0x525dbe(0xb6)],'sqlName':_0x18e375[_0x525dbe(0xb8)],'target':_0x1e73ea,'code':_0x20a9a3}};}};
@@ -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(_0xc4f2e0,_0x345867){const _0x28df93=a44_0x4ff0,_0x23637c=_0xc4f2e0();while(!![]){try{const _0xab8dd3=-parseInt(_0x28df93(0xb2))/0x1*(parseInt(_0x28df93(0xa9))/0x2)+-parseInt(_0x28df93(0xaa))/0x3*(parseInt(_0x28df93(0xcb))/0x4)+-parseInt(_0x28df93(0xca))/0x5+parseInt(_0x28df93(0xd3))/0x6+parseInt(_0x28df93(0xae))/0x7*(-parseInt(_0x28df93(0xd4))/0x8)+parseInt(_0x28df93(0xb0))/0x9+parseInt(_0x28df93(0xcf))/0xa;if(_0xab8dd3===_0x345867)break;else _0x23637c['push'](_0x23637c['shift']());}catch(_0x1cbdd2){_0x23637c['push'](_0x23637c['shift']());}}}(a44_0xcc8e,0xa0f54));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';function a44_0xcc8e(){const _0x44d752=['\x20<name>\x20--appcode\x20<code>','\x20config.','str','\x20Note:\x20app\x20\x22','Missing\x20app\x20name.','flagMissing','boolean','3264360FzkqxS','172oJqvqw','object','string','\x20<name>\x20[--global]','18417740CghqVW','\x22\x20(appcode:\x20','\x22\x20still\x20defined\x20in\x20','validation','1983606oFLgTn','145264ZcPAeV','project','Removed\x20app\x20\x22','global','50766bmoDCe','252ZnMsnG','trim','projectConfig','Added','385AmsVbl','\x22\x20not\x20found.','6304581rmdxTQ','Updated','22kbMwZh','apps','\x20<name>','inherit','\x20Set\x20as\x20default\x20app.','keys','args','\x20Default\x20app\x20changed\x20to\x20\x22','\x20app\x20\x22','appcode','App\x20\x22','bool','defaultApp','Use\x20global\x20config\x20scope','globalConfig','Usage:\x20','App\x20code'];a44_0xcc8e=function(){return _0x44d752;};return a44_0xcc8e();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x5e2674=a44_0x4ff0;return[{'name':_0x5e2674(0xbb),'type':_0x5e2674(0xcd),'description':_0x5e2674(0xc2),'required':!![]},{'name':_0x5e2674(0xa8),'type':_0x5e2674(0xc9),'description':_0x5e2674(0xbf),'default':![]},...getAppProfileFlagDefs()];}function a44_0x4ff0(_0x45d1cc,_0x8e973c){_0x45d1cc=_0x45d1cc-0xa8;const _0xcc8e14=a44_0xcc8e();let _0x4ff036=_0xcc8e14[_0x45d1cc];return _0x4ff036;}export function buildAppRemoveFlags(){const _0x11f44d=a44_0x4ff0;return[{'name':'global','type':_0x11f44d(0xc9),'description':_0x11f44d(0xbf),'default':![]}];}export async function validateAppName(_0x277062,_0x368b7c){const _0x6195be=a44_0x4ff0,_0x326c6b=_0x277062['args'][0x0]?.[_0x6195be(0xab)]();if(!_0x326c6b)throw CliErrors['validation'](_0x6195be(0xc7),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x368b7c+_0x6195be(0xb4));}export async function runAppAdd(_0x1ce533,_0x29c15d){const _0x213950=a44_0x4ff0,_0x4c7185=_0x1ce533[_0x213950(0xb8)][0x0]?.[_0x213950(0xab)]();if(!_0x4c7185)throw CliErrors[_0x213950(0xd2)]('Missing\x20app\x20name.',_0x213950(0xc1)+CLI_BIN_NAME+'\x20'+_0x29c15d+_0x213950(0xc3));const _0x1fd0bc=_0x1ce533[_0x213950(0xc5)](_0x213950(0xbb));if(!_0x1fd0bc)throw CliErrors[_0x213950(0xc8)](_0x213950(0xbb),_0x213950(0xc1)+CLI_BIN_NAME+'\x20'+_0x29c15d+_0x213950(0xc3));const _0x43f5f3={'global':_0x1ce533[_0x213950(0xbd)](_0x213950(0xa8))},_0x3383d8=readConfig(_0x43f5f3);if(!_0x3383d8[_0x213950(0xb3)])_0x3383d8['apps']={};const _0xcceea7={'appcode':_0x1fd0bc,...collectAppProfileOverrides(_0x3b6c04=>_0x1ce533[_0x213950(0xc5)](_0x3b6c04))},_0x5a4fd0=_0x3383d8[_0x213950(0xb3)],_0x4d2a95=!!_0x5a4fd0[_0x4c7185];_0x5a4fd0[_0x4c7185]=_0xcceea7;if(!_0x3383d8[_0x213950(0xbe)])_0x3383d8[_0x213950(0xbe)]=_0x4c7185;writeConfig(_0x3383d8,_0x43f5f3);const _0x21855d=!_0x4d2a95&&_0x3383d8[_0x213950(0xbe)]===_0x4c7185?_0x213950(0xb6):'',_0x36b3a6=(_0x4d2a95?_0x213950(0xb1):_0x213950(0xad))+_0x213950(0xba)+_0x4c7185+_0x213950(0xd0)+_0x1fd0bc+')'+scopeLabel(_0x43f5f3)+'.'+_0x21855d;return{'ok':!![],'message':_0x36b3a6};}export async function runAppRemove(_0x378810,_0x486294){const _0x348dbb=a44_0x4ff0,_0x1ca6d1=_0x378810['args'][0x0]?.[_0x348dbb(0xab)]();if(!_0x1ca6d1)throw CliErrors['validation'](_0x348dbb(0xc7),_0x348dbb(0xc1)+CLI_BIN_NAME+'\x20'+_0x486294+_0x348dbb(0xce));const _0x286e80=_0x378810[_0x348dbb(0xbd)](_0x348dbb(0xa8)),{config:_0x4381a1,layers:_0x27212b}=readRawConfigWithLayers(),_0xd4ded5=_0x4381a1[_0x348dbb(0xb3)]??{};if(!_0xd4ded5[_0x1ca6d1])throw CliErrors['validation'](_0x348dbb(0xbc)+_0x1ca6d1+_0x348dbb(0xaf));const _0x191e5f=_0x27212b[_0x348dbb(0xc0)][_0x348dbb(0xb3)]&&typeof _0x27212b['globalConfig'][_0x348dbb(0xb3)]===_0x348dbb(0xcc)?_0x27212b[_0x348dbb(0xc0)][_0x348dbb(0xb3)]:{},_0x1e2abe=_0x27212b[_0x348dbb(0xac)]['apps']&&typeof _0x27212b[_0x348dbb(0xac)][_0x348dbb(0xb3)]==='object'?_0x27212b[_0x348dbb(0xac)][_0x348dbb(0xb3)]:{},_0x1f3eae=appDefinedIn(_0x1ca6d1,_0x191e5f,_0x1e2abe,_0x27212b[_0x348dbb(0xac)][_0x348dbb(0xb5)]===![]),_0x4291c1=resolveAppScopeForWrite(_0x1ca6d1,_0x286e80,_0x27212b),_0x378d22={'global':_0x4291c1==='global'},_0x15ec0e=readConfig(_0x378d22),_0x129c00=_0x15ec0e['apps'];if(!_0x129c00||!_0x129c00[_0x1ca6d1])throw CliErrors[_0x348dbb(0xd2)](_0x348dbb(0xbc)+_0x1ca6d1+'\x22\x20not\x20found.');delete _0x129c00[_0x1ca6d1];let _0x1b76eb='';if(_0x15ec0e[_0x348dbb(0xbe)]===_0x1ca6d1){const _0x246fb1=Object[_0x348dbb(0xb7)](_0x129c00);_0x15ec0e['defaultApp']=_0x246fb1['length']>0x0?_0x246fb1[0x0]:undefined,_0x15ec0e[_0x348dbb(0xbe)]?_0x1b76eb=_0x348dbb(0xb9)+_0x15ec0e[_0x348dbb(0xbe)]+'\x22.':delete _0x15ec0e[_0x348dbb(0xbe)];}Object[_0x348dbb(0xb7)](_0x129c00)['length']===0x0&&(delete _0x15ec0e['apps'],delete _0x15ec0e['defaultApp']);writeConfig(_0x15ec0e,_0x378d22);const _0x46f1fc=_0x1f3eae==='both'?_0x348dbb(0xc6)+_0x1ca6d1+_0x348dbb(0xd1)+(_0x4291c1==='project'?'global':_0x348dbb(0xd5))+_0x348dbb(0xc4):'';return{'ok':!![],'message':_0x348dbb(0xd6)+_0x1ca6d1+'\x22'+scopeLabel(_0x378d22)+'.'+_0x1b76eb+_0x46f1fc};}
@@ -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(_0x4efaed,_0x55f56a){const _0x97e8a5=a45_0x2f90,_0x36fd02=_0x4efaed();while(!![]){try{const _0x410a8e=-parseInt(_0x97e8a5(0xc0))/0x1+parseInt(_0x97e8a5(0xc9))/0x2+-parseInt(_0x97e8a5(0xc5))/0x3+-parseInt(_0x97e8a5(0xcd))/0x4+-parseInt(_0x97e8a5(0xdf))/0x5+-parseInt(_0x97e8a5(0xd2))/0x6+-parseInt(_0x97e8a5(0xdb))/0x7*(-parseInt(_0x97e8a5(0xc1))/0x8);if(_0x410a8e===_0x55f56a)break;else _0x36fd02['push'](_0x36fd02['shift']());}catch(_0x58c456){_0x36fd02['push'](_0x36fd02['shift']());}}}(a45_0xfd5a,0x65bfa));import{input,checkbox,select}from'@inquirer/prompts';function a45_0xfd5a(){const _0x233120=['2585996hUTnnu','map','未找到可用应用。','✎\x20自定义输入\x20appcode','valid','1804542ekLoKa','yellow','无法获取远程应用列表,请手动输入。','trim','skip','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','✎\x20手动输入','获取到\x20','请选择要绑定的应用:','21OTLkBP','message','cyan','length','2510725OKxBMd','App\x20Code:','custom','605744GSTQJp','5785864hMjDKB','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','\x0a无法获取远程应用列表,请手动输入。','appCode','1181973psBbgm','find','Invalid\x20App\x20Code','正在获取可用应用列表...','1392398enzOrl','(跳过,稍后配置)','gray','\x0a未找到可用应用。'];a45_0xfd5a=function(){return _0x233120;};return a45_0xfd5a();}function a45_0x2f90(_0x53a32a,_0x5f447d){_0x53a32a=_0x53a32a-0xbf;const _0xfd5af9=a45_0xfd5a();let _0x2f907b=_0xfd5af9[_0x53a32a];return _0x2f907b;}import a45_0x3140a2 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 _0x4e4bc9=a45_0x2f90,_0x33cf32=await input({'message':'请输入\x20App\x20Code:','validate':_0x39db83=>{const _0x38be7f=a45_0x2f90,_0x23c4ac=validateAppcode(_0x39db83[_0x38be7f(0xd5)]());return _0x23c4ac[_0x38be7f(0xd1)]||_0x23c4ac[_0x38be7f(0xdc)]||_0x38be7f(0xc7);}});return _0x33cf32[_0x4e4bc9(0xd5)]();}export async function promptAppSelection(_0x3ab374){const _0x6e168a=a45_0x2f90,_0x3286dd=[{'name':a45_0x3140a2['yellow']('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x3ab374[_0x6e168a(0xce)]((_0x29c095,_0x272ab1)=>({'name':_0x29c095['appName']+'\x20\x20'+a45_0x3140a2[_0x6e168a(0xcb)]('('+_0x29c095[_0x6e168a(0xc4)]+')'),'value':_0x272ab1}))],_0x406ce7=await checkbox({'message':_0x6e168a(0xd9)+a45_0x3140a2[_0x6e168a(0xdd)](_0x3ab374[_0x6e168a(0xde)])+_0x6e168a(0xd7),'choices':_0x3286dd,'loop':![]});if(_0x406ce7['includes'](-0x1))return _0x6e168a(0xbf);if(_0x406ce7[_0x6e168a(0xde)]===0x0)return _0x6e168a(0xbf);return _0x406ce7[_0x6e168a(0xce)](_0x2c80a0=>_0x3ab374[_0x2c80a0]);}export async function promptSingleAppSelection(_0x3ba293){const _0x48668f=a45_0x2f90,_0x3d48d0=[{'name':a45_0x3140a2[_0x48668f(0xcb)](_0x48668f(0xc2)),'value':_0x48668f(0xd6)},{'name':a45_0x3140a2[_0x48668f(0xd3)](_0x48668f(0xd0)),'value':_0x48668f(0xbf)},..._0x3ba293['map'](_0x316916=>({'name':_0x316916['appName']+'\x20\x20'+a45_0x3140a2[_0x48668f(0xcb)]('('+_0x316916['appCode']+')'),'value':_0x316916[_0x48668f(0xc4)]}))],_0x11ca83=await select({'message':_0x48668f(0xda),'choices':_0x3d48d0});if(_0x11ca83===_0x48668f(0xd6))return _0x48668f(0xd6);if(_0x11ca83===_0x48668f(0xbf))return _0x48668f(0xbf);return _0x3ba293[_0x48668f(0xc6)](_0x4b9bbb=>_0x4b9bbb['appCode']===_0x11ca83);}export async function selectSingleAppcode(_0xa21a49){const _0x8a459c=a45_0x2f90;if(!_0xa21a49)return writeCliSideChannelLine(a45_0x3140a2[_0x8a459c(0xcb)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x241ed8;try{_0x241ed8=await withActiveCookie(_0xa21a49,()=>listRemoteApps());}catch(_0x4e7415){writeCliSideChannelLine(a45_0x3140a2[_0x8a459c(0xd3)](_0x8a459c(0xd4)));if(_0x4e7415 instanceof Error)writeCliSideChannelLine(a45_0x3140a2[_0x8a459c(0xcb)]('\x20\x20('+_0x4e7415['message']+')'));return _fallbackOrSkip();}if(_0x241ed8['length']===0x0)return writeCliSideChannelLine(a45_0x3140a2[_0x8a459c(0xd3)](_0x8a459c(0xcf))),_fallbackOrSkip();const _0x8fb5ff=await promptSingleAppSelection(_0x241ed8);if(_0x8fb5ff==='skip')return'';if(_0x8fb5ff===_0x8a459c(0xbf))return promptCustomAppcode();return _0x8fb5ff[_0x8a459c(0xc4)];}export async function selectMultipleApps(_0x1b0d7d){const _0x2373d4=a45_0x2f90;writeCliSideChannelLine(_0x2373d4(0xc8));let _0x47632d;try{_0x47632d=await withActiveCookie(_0x1b0d7d,()=>listRemoteApps());}catch(_0x26efc0){writeCliSideChannelLine(_0x2373d4(0xc3));if(_0x26efc0 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x26efc0[_0x2373d4(0xdc)]+')');return'custom';}if(_0x47632d[_0x2373d4(0xde)]===0x0)return writeCliSideChannelLine(_0x2373d4(0xcc)),_0x2373d4(0xbf);return promptAppSelection(_0x47632d);}async function _fallbackOrSkip(){const _0x1dd469=a45_0x2f90,_0x4df6b3=await select({'message':_0x1dd469(0xe0),'choices':[{'name':a45_0x3140a2[_0x1dd469(0xcb)](_0x1dd469(0xca)),'value':_0x1dd469(0xd6)},{'name':a45_0x3140a2[_0x1dd469(0xd3)](_0x1dd469(0xd8)),'value':'manual'}]});if(_0x4df6b3==='skip')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_0x15a1c7=a46_0x3fb6;(function(_0x49abfd,_0x57e304){const _0x17d72d=a46_0x3fb6,_0x32d164=_0x49abfd();while(!![]){try{const _0x3387c4=-parseInt(_0x17d72d(0xbd))/0x1*(-parseInt(_0x17d72d(0xc0))/0x2)+parseInt(_0x17d72d(0xda))/0x3+parseInt(_0x17d72d(0xcf))/0x4+parseInt(_0x17d72d(0xd2))/0x5+-parseInt(_0x17d72d(0xd3))/0x6+-parseInt(_0x17d72d(0xc3))/0x7*(-parseInt(_0x17d72d(0xc1))/0x8)+-parseInt(_0x17d72d(0xbe))/0x9*(parseInt(_0x17d72d(0xd4))/0xa);if(_0x3387c4===_0x57e304)break;else _0x32d164['push'](_0x32d164['shift']());}catch(_0x32ff8d){_0x32d164['push'](_0x32d164['shift']());}}}(a46_0x1916,0x58758));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a46_0x15a1c7(0xd6)]),NON_TERMINAL_STATUSES=new Set([a46_0x15a1c7(0xd5),a46_0x15a1c7(0xd8)]);export function normalizeAsyncTask(_0x2857ad){const _0x28f5f2=a46_0x15a1c7,_0x24b835=typeof _0x2857ad?.['taskId']==='string'?_0x2857ad[_0x28f5f2(0xca)]['trim']():'';if(!_0x24b835)throw CliErrors[_0x28f5f2(0xcd)](_0x28f5f2(0xc8));const _0xe8013a=typeof _0x2857ad[_0x28f5f2(0xd0)]==='string'?_0x2857ad[_0x28f5f2(0xd0)][_0x28f5f2(0xcb)]()[_0x28f5f2(0xc2)]():'';if(!_0xe8013a)throw CliErrors[_0x28f5f2(0xcd)](_0x28f5f2(0xc9)+_0x24b835+_0x28f5f2(0xcc));return{'taskId':_0x24b835,'status':_0xe8013a,'errorMessage':typeof _0x2857ad[_0x28f5f2(0xbf)]===_0x28f5f2(0xc7)&&_0x2857ad['errorMessage'][_0x28f5f2(0xcb)]()?_0x2857ad[_0x28f5f2(0xbf)][_0x28f5f2(0xcb)]():null,'isTerminal':TERMINAL_STATUSES[_0x28f5f2(0xdb)](_0xe8013a),'knownStatus':TERMINAL_STATUSES['has'](_0xe8013a)||NON_TERMINAL_STATUSES[_0x28f5f2(0xdb)](_0xe8013a)};}export function buildAsyncTaskStatusCommand(_0xfad33b,_0x28ef6a){const _0x4730fc=a46_0x15a1c7;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0xfad33b)+'\x20--appcode\x20'+quoteShellArg(_0x28ef6a)+_0x4730fc(0xc4);}export function asyncTaskMessage(_0x5600f8){const _0x426f52=a46_0x15a1c7;switch(_0x5600f8[_0x426f52(0xd0)]){case _0x426f52(0xd5):return _0x426f52(0xd7)+_0x5600f8[_0x426f52(0xca)]+'\x20is\x20pending.';case'PROCESSING':return'Task\x20'+_0x5600f8[_0x426f52(0xca)]+_0x426f52(0xd9);case'SUCCESS':return _0x426f52(0xd7)+_0x5600f8[_0x426f52(0xca)]+'\x20completed\x20successfully.';case _0x426f52(0xd6):return _0x5600f8[_0x426f52(0xbf)]?'Task\x20'+_0x5600f8[_0x426f52(0xca)]+'\x20failed:\x20'+_0x5600f8[_0x426f52(0xbf)]:_0x426f52(0xd7)+_0x5600f8[_0x426f52(0xca)]+_0x426f52(0xc6);default:return'Task\x20'+_0x5600f8[_0x426f52(0xca)]+_0x426f52(0xd1)+_0x5600f8[_0x426f52(0xd0)]+'.';}}function quoteShellArg(_0x10ea38){const _0x589302=a46_0x15a1c7;return'\x27'+_0x10ea38[_0x589302(0xce)](/'/g,_0x589302(0xc5))+'\x27';}function a46_0x3fb6(_0x4aa1e5,_0x174589){_0x4aa1e5=_0x4aa1e5-0xbd;const _0x191654=a46_0x1916();let _0x3fb619=_0x191654[_0x4aa1e5];return _0x3fb619;}function a46_0x1916(){const _0x3696d8=['replace','2030088fFkGTJ','status','\x20returned\x20unknown\x20status\x20','3280710SLAUlT','533190ayJmnp','10KGtjWf','PENDING','FAILED','Task\x20','PROCESSING','\x20is\x20processing.','807930gEsvDT','has','1jmsomi','11370852dCoAJB','errorMessage','54886nUpqQn','32aNxdom','toUpperCase','444857VJtfUh','\x20--format\x20compress','\x27\x5c\x27\x27','\x20failed.','string','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','Async\x20task\x20','taskId','trim','\x20response\x20did\x20not\x20contain\x20a\x20status.','apiError'];a46_0x1916=function(){return _0x3696d8;};return a46_0x1916();}
@@ -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 a47_0x146f(_0x42ba7b,_0x32a606){_0x42ba7b=_0x42ba7b-0xb0;var _0x3ff346=a47_0x3ff3();var _0x146fd9=_0x3ff346[_0x42ba7b];return _0x146fd9;}(function(_0x3e855b,_0x1b2aea){var _0x52ffbf=a47_0x146f,_0x210dec=_0x3e855b();while(!![]){try{var _0x30319f=parseInt(_0x52ffbf(0xb4))/0x1*(-parseInt(_0x52ffbf(0xb0))/0x2)+-parseInt(_0x52ffbf(0xbb))/0x3*(parseInt(_0x52ffbf(0xb2))/0x4)+-parseInt(_0x52ffbf(0xbe))/0x5*(-parseInt(_0x52ffbf(0xb1))/0x6)+parseInt(_0x52ffbf(0xb3))/0x7+-parseInt(_0x52ffbf(0xbd))/0x8*(parseInt(_0x52ffbf(0xb5))/0x9)+-parseInt(_0x52ffbf(0xb7))/0xa*(parseInt(_0x52ffbf(0xbf))/0xb)+parseInt(_0x52ffbf(0xbc))/0xc;if(_0x30319f===_0x1b2aea)break;else _0x210dec['push'](_0x210dec['shift']());}catch(_0x5555c6){_0x210dec['push'](_0x210dec['shift']());}}}(a47_0x3ff3,0x507f6));export function asDryRunResult(_0x57b3b0,_0x45ed98){var _0x5df886=a47_0x146f;return Object[_0x5df886(0xb8)](_0x57b3b0,{'method':{'value':_0x45ed98[_0x5df886(0xba)],'enumerable':![]},'url':{'value':_0x45ed98[_0x5df886(0xb6)],'enumerable':![]},..._0x45ed98[_0x5df886(0xb9)]?{'description':{'value':_0x45ed98[_0x5df886(0xb9)],'enumerable':![]}}:{}});}function a47_0x3ff3(){var _0x38553b=['description','method','209091gOPrOS','9399804JOMHXt','40bxYlOb','676745uzehmi','143ysFlqJ','1010cwvsBS','12Eaftjy','4aJuxDM','192612ZVGclW','518NfQxqw','168507WfQvfk','url','251470nbmtun','defineProperties'];a47_0x3ff3=function(){return _0x38553b;};return a47_0x3ff3();}
@@ -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_0x57f27f=a48_0x3b6d;(function(_0x239070,_0x2df7df){const _0x4f4d47=a48_0x3b6d,_0x1ccdc1=_0x239070();while(!![]){try{const _0x3a234b=-parseInt(_0x4f4d47(0xd0))/0x1+parseInt(_0x4f4d47(0xd2))/0x2+parseInt(_0x4f4d47(0xcd))/0x3+parseInt(_0x4f4d47(0xd9))/0x4+parseInt(_0x4f4d47(0xd6))/0x5*(parseInt(_0x4f4d47(0xcf))/0x6)+-parseInt(_0x4f4d47(0xce))/0x7+parseInt(_0x4f4d47(0xc8))/0x8*(-parseInt(_0x4f4d47(0xca))/0x9);if(_0x3a234b===_0x2df7df)break;else _0x1ccdc1['push'](_0x1ccdc1['shift']());}catch(_0x199865){_0x1ccdc1['push'](_0x1ccdc1['shift']());}}}(a48_0x58b1,0x2c2bb));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x57f27f(0xd1)};function a48_0x3b6d(_0xab3875,_0x321001){_0xab3875=_0xab3875-0xc3;const _0x58b1aa=a48_0x58b1();let _0x3b6d9c=_0x58b1aa[_0xab3875];return _0x3b6d9c;}export const CODE_FLAG={'name':a48_0x57f27f(0xc6),'type':a48_0x57f27f(0xd8),'required':!![],'description':a48_0x57f27f(0xc4),'pattern':DATASET_CODE_PATTERN};function a48_0x58b1(){const _0x2fea28=['SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Dataset\x20code\x20(32-char\x20hex\x20UUID)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','code','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','3600136UiYLxY','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','9pUXcqK','App\x20code\x20(e.g.\x20app-xxxxx)','number','848169gusfyJ','2282714SmiVBj','1663878ejbYMr','157021cSHdbI','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','470460sWklpT','dbtype','Database\x20product\x20type','POSTGRESQL','5GgYopr','MYSQL','string','1275188NsHSPx'];a48_0x58b1=function(){return _0x2fea28;};return a48_0x58b1();}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a48_0x57f27f(0xc4)};export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0x57f27f(0xd8),'required':!![],'description':a48_0x57f27f(0xc3),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x57f27f(0xc9)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a48_0x57f27f(0xd8),'required':![],'description':a48_0x57f27f(0xc5)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x57f27f(0xcb)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x57f27f(0xcc),'required':!![],'description':a48_0x57f27f(0xc7)};export const DB_TYPE_FLAG={'name':a48_0x57f27f(0xd3),'type':a48_0x57f27f(0xd8),'required':!![],'description':a48_0x57f27f(0xd4),'enum':[a48_0x57f27f(0xd7),a48_0x57f27f(0xd5)]};
@@ -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_0x5912(_0x1231b3,_0x1fda25){_0x1231b3=_0x1231b3-0x16f;const _0x5e2e9a=a49_0x5e2e();let _0x591203=_0x5e2e9a[_0x1231b3];return _0x591203;}function a49_0x5e2e(){const _0x443274=['validation','File\x20is\x20not\x20a\x20regular\x20file:\x20','trim','ceil','11ewTEid','54MNtFmx','isFile','1DpTrze','312910gfHEdf','200412equacr','size','File\x20not\x20found:\x20','467112QbDKNW','885386PqyvjA','\x20MB','19698eVqbeT','96xgpRhi','452820PeqKXR','667608fnUbxa'];a49_0x5e2e=function(){return _0x443274;};return a49_0x5e2e();}(function(_0x2479d0,_0x3a90ab){const _0x52c47d=a49_0x5912,_0x6419ad=_0x2479d0();while(!![]){try{const _0x48200f=parseInt(_0x52c47d(0x176))/0x1*(parseInt(_0x52c47d(0x17c))/0x2)+parseInt(_0x52c47d(0x181))/0x3+parseInt(_0x52c47d(0x178))/0x4+-parseInt(_0x52c47d(0x180))/0x5+parseInt(_0x52c47d(0x17f))/0x6*(parseInt(_0x52c47d(0x17e))/0x7)+parseInt(_0x52c47d(0x17b))/0x8*(-parseInt(_0x52c47d(0x174))/0x9)+parseInt(_0x52c47d(0x177))/0xa*(-parseInt(_0x52c47d(0x173))/0xb);if(_0x48200f===_0x3a90ab)break;else _0x6419ad['push'](_0x6419ad['shift']());}catch(_0x1b558){_0x6419ad['push'](_0x6419ad['shift']());}}}(a49_0x5e2e,0x465a7));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(_0x1d9c75){const _0x3813a3=a49_0x5912;if(_0x1d9c75>=BYTES_PER_MB){const _0x487c65=Math[_0x3813a3(0x172)](_0x1d9c75/BYTES_PER_MB*0x64)/0x64;return _0x487c65['toFixed'](0x2)+_0x3813a3(0x17d);}return _0x1d9c75+'\x20B';}export function requireDevelopmentUploadFile(_0x44f6d4,_0x35a666){const _0x514650=a49_0x5912,_0x313629=_0x44f6d4[_0x514650(0x171)]();if(!_0x313629)throw CliErrors['validation'](_0x35a666+'\x20path\x20is\x20required.');if(!existsSync(_0x313629))throw CliErrors['validation'](_0x514650(0x17a)+_0x313629);const _0x5bd1eb=statSync(_0x313629);if(!_0x5bd1eb[_0x514650(0x175)]())throw CliErrors[_0x514650(0x16f)](_0x514650(0x170)+_0x313629);if(_0x5bd1eb[_0x514650(0x179)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation']('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x313629+'\x20('+formatBytes(_0x5bd1eb['size'])+')');return{'path':_0x313629,'size':_0x5bd1eb[_0x514650(0x179)]};}
@@ -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_0x5222(_0xcdb95a,_0x8197d1){_0xcdb95a=_0xcdb95a-0x1ca;const _0x2760e1=a50_0x2760();let _0x522268=_0x2760e1[_0xcdb95a];return _0x522268;}(function(_0x1fd7c2,_0x55da5){const _0x134f04=a50_0x5222,_0x2dca44=_0x1fd7c2();while(!![]){try{const _0x2563ac=-parseInt(_0x134f04(0x1d5))/0x1*(-parseInt(_0x134f04(0x1ce))/0x2)+-parseInt(_0x134f04(0x1d8))/0x3*(parseInt(_0x134f04(0x1cc))/0x4)+-parseInt(_0x134f04(0x1d6))/0x5+parseInt(_0x134f04(0x1d9))/0x6+-parseInt(_0x134f04(0x1d3))/0x7+parseInt(_0x134f04(0x1d7))/0x8+-parseInt(_0x134f04(0x1d0))/0x9*(-parseInt(_0x134f04(0x1d2))/0xa);if(_0x2563ac===_0x55da5)break;else _0x2dca44['push'](_0x2dca44['shift']());}catch(_0x4fd3b5){_0x2dca44['push'](_0x2dca44['shift']());}}}(a50_0x2760,0xa9f64));function a50_0x2760(){const _0x4bcc7d=['12ejJlVN','App\x20Code\x20cannot\x20exceed\x20100\x20characters','138076vjsBaJ','trim','1818KCPxri','App\x20Code\x20cannot\x20be\x20empty','29910gSkIKi','5217597ZYJXsD','test','1OagGhx','3436960hRMvPW','6494368IATaxh','300993ClBNkT','5669424MyCgQI','length','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'];a50_0x2760=function(){return _0x4bcc7d;};return a50_0x2760();}export function validateAppcode(_0x5d7752){const _0x447c5a=a50_0x5222,_0x1405d9=_0x5d7752[_0x447c5a(0x1cf)]();if(!_0x1405d9)return{'valid':![],'message':_0x447c5a(0x1d1)};if(_0x1405d9[_0x447c5a(0x1ca)]>0x64)return{'valid':![],'message':_0x447c5a(0x1cd)};if(!/^[A-Za-z0-9_-]+$/[_0x447c5a(0x1d4)](_0x1405d9))return{'valid':![],'message':_0x447c5a(0x1cb)};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_0x2dfc0b=a51_0x1ca5;(function(_0x57328e,_0x2dd503){const _0x43719b=a51_0x1ca5,_0x434712=_0x57328e();while(!![]){try{const _0x24f641=-parseInt(_0x43719b(0x108))/0x1+-parseInt(_0x43719b(0x117))/0x2*(parseInt(_0x43719b(0x103))/0x3)+parseInt(_0x43719b(0x10b))/0x4*(parseInt(_0x43719b(0x110))/0x5)+-parseInt(_0x43719b(0x112))/0x6*(parseInt(_0x43719b(0x10c))/0x7)+-parseInt(_0x43719b(0x10a))/0x8*(parseInt(_0x43719b(0x114))/0x9)+-parseInt(_0x43719b(0x115))/0xa+-parseInt(_0x43719b(0x10d))/0xb*(-parseInt(_0x43719b(0x111))/0xc);if(_0x24f641===_0x2dd503)break;else _0x434712['push'](_0x434712['shift']());}catch(_0x2f767d){_0x434712['push'](_0x434712['shift']());}}}(a51_0x37b4,0xf0ff7));function a51_0x1ca5(_0x5793c4,_0x53f302){_0x5793c4=_0x5793c4-0x100;const _0x37b430=a51_0x37b4();let _0x1ca54e=_0x37b430[_0x5793c4];return _0x1ca54e;}import{CliErrors}from'../../errors.js';function a51_0x37b4(){const _0x521d90=['get','Key\x20not\x20found:\x20','685wrwHUX','44929716RbWhTe','348qVBdQg','validation','81Bsthly','297790NNqJGj','string','158bIdPuh','app','read','key','30930qUjKCS','object','Get\x20a\x20config\x20value\x20by\x20key','appcode','Missing\x20key.','406891ckYAPv','str','1265848zbHrRu','36524zabdeu','160846jTHMem','11uAcjAJ'];a51_0x37b4=function(){return _0x521d90;};return a51_0x37b4();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2da5e9){const _0x2f0972=a51_0x1ca5,_0x349610=_0x2da5e9[_0x2f0972(0x109)](_0x2f0972(0x102));if(!_0x349610)throw CliErrors['validation'](_0x2f0972(0x107),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x935a02=readConfig(),_0x329ff2=_0x349610===_0x2f0972(0x100)?_0x2f0972(0x106):_0x349610,_0x547b20=_0x935a02[_0x329ff2];if(_0x547b20===undefined)throw CliErrors[_0x2f0972(0x113)](_0x2f0972(0x10f)+_0x349610);return{'ok':!![],'data':typeof _0x547b20===_0x2f0972(0x104)?_0x547b20:{[_0x329ff2]:_0x547b20},'message':typeof _0x547b20===_0x2f0972(0x104)?undefined:String(_0x547b20)};}export const configGetDefinition={'service':'config','command':a51_0x2dfc0b(0x10e),'description':a51_0x2dfc0b(0x105),'risk':a51_0x2dfc0b(0x101),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0x2dfc0b(0x116),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};