@lovrabet/rabetbase-cli 2.3.12-beta.1 → 2.3.13-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) 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/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x56da08=a36_0x2142;function a36_0x1e88(){const _0x1a8d16=['close','645754TtTJdf','No\x20remote\x20BFF\x20scripts\x20found.','includes','str','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','functionNode','nonInteractive','local\x20unsynced\x20changes','alias','unresolvable\x20target\x20path','lockFilePath','scriptContent','384908rjRmcm','type','force','2064018oqyXig','write','stringify','pull','bff','utf8','version','Remote\x20script\x20missing\x20content.','map','apps','filePath','HOOK','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','boolean','662KkgRHc','scriptType','bool','conflict','question','stdin','validation','15993nflNeK','5186203ryLEeq','\x20remote\x20BFF\x20script(s)\x20for\x20pull','appCode','message','15smqnNo','skipped','Force\x20overwrite\x20local\x20unsynced\x20changes','1777720KDCFFx','/api/management/library/scripts/list?appCode=','ENDPOINT','1384JTsvkA','datasetCode','Force\x20pull\x20cancelled.','operationType','lockKey','Pull\x20only\x20this\x20script\x20type','hash','\x22\x20not\x20found\x20after\x20ensureLockScope.','functionName','length','24YtmqtS','4242lfLYCz','functions','scriptsRoot','all','GET','hookLocation','apiDir','14pNFoZX','string','stderr','push'];a36_0x1e88=function(){return _0x1a8d16;};return a36_0x1e88();}(function(_0x50ad0c,_0x53e342){const _0x43b8a3=a36_0x2142,_0x59c8b7=_0x50ad0c();while(!![]){try{const _0xdac684=-parseInt(_0x43b8a3(0xaa))/0x1+-parseInt(_0x43b8a3(0xc7))/0x2*(parseInt(_0x43b8a3(0x9e))/0x3)+parseInt(_0x43b8a3(0xb6))/0x4*(-parseInt(_0x43b8a3(0x8d))/0x5)+parseInt(_0x43b8a3(0xb9))/0x6*(parseInt(_0x43b8a3(0xa5))/0x7)+-parseInt(_0x43b8a3(0x93))/0x8*(-parseInt(_0x43b8a3(0x88))/0x9)+-parseInt(_0x43b8a3(0x90))/0xa+-parseInt(_0x43b8a3(0x89))/0xb*(-parseInt(_0x43b8a3(0x9d))/0xc);if(_0xdac684===_0x53e342)break;else _0x59c8b7['push'](_0x59c8b7['shift']());}catch(_0x5c6206){_0x59c8b7['push'](_0x59c8b7['shift']());}}}(a36_0x1e88,0x576f4));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_0x56da08(0xbd),'command':'pull','description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':a36_0x56da08(0xba),'flags':[{'name':a36_0x56da08(0xb7),'type':a36_0x56da08(0xa6),'description':a36_0x56da08(0x98),'enum':['COMMON',a36_0x56da08(0x92),'HOOK']},{'name':a36_0x56da08(0xb8),'type':a36_0x56da08(0xc6),'description':a36_0x56da08(0x8f)}],async 'dryRun'(_0x55b348){const _0x372aca=a36_0x56da08,_0x202ab3=loadBffProjectConfig(_0x55b348['appCode']),_0x491b68=await readBffLockFile(_0x202ab3[_0x372aca(0xb4)]),{appLock:_0x193aa6}=ensureLockScope(_0x491b68??createEmptyBffLock(),_0x55b348['appCode'],_0x202ab3[_0x372aca(0xa0)],_0x372aca(0xbc)),_0x432f75=normalizeBffType(_0x55b348[_0x372aca(0xad)]('type'))??undefined,_0x506941=buildDatasetCodeToAliasMap(_0x55b348[_0x372aca(0xa4)],_0x55b348[_0x372aca(0x8b)]),[_0x345fba,_0x39804a]=await Promise[_0x372aca(0xa1)]([listBffScripts(_0x55b348[_0x372aca(0x8b)],_0x432f75),getBffScriptStatistics(_0x55b348[_0x372aca(0x8b)])]),_0x128708=createHookLocationMap(_0x39804a),_0x5a5093=[];for(const _0x56f6d7 of _0x345fba){const _0x5c08a5=resolveRemoteScriptTarget(_0x202ab3,_0x56f6d7,_0x128708,_0x193aa6[_0x372aca(0x9f)],_0x506941);if(!_0x5c08a5){_0x5a5093[_0x372aca(0xa8)]({'scriptType':_0x56f6d7[_0x372aca(0xc8)],'functionName':_0x56f6d7[_0x372aca(0x9b)]??'','status':_0x372aca(0x8e),'reason':_0x372aca(0xb3)});continue;}const _0xf0a3e2=_0x193aa6[_0x372aca(0x9f)][_0x5c08a5['lockKey']],_0x4500fe=_0x56f6d7['scriptContent']!=null?computeContentHash(_0x56f6d7['scriptContent']):undefined,_0x2c31ec=await hasUnsyncedLocalChanges(_0x5c08a5[_0x372aca(0xc3)],_0xf0a3e2,_0x4500fe);_0x5a5093[_0x372aca(0xa8)]({'lockKey':_0x5c08a5[_0x372aca(0x97)],'filePath':_0x5c08a5[_0x372aca(0xc3)],'remoteId':_0x56f6d7['id']??null,'status':_0x2c31ec?_0x372aca(0xca):'would_pull'});}return{'method':_0x372aca(0xa2),'url':_0x372aca(0x91)+_0x55b348[_0x372aca(0x8b)]+(_0x432f75?'&type='+_0x432f75:''),'body':{'appCode':_0x55b348[_0x372aca(0x8b)],'filterType':_0x432f75??null,'files':_0x5a5093},'description':'Would\x20inspect\x20'+_0x5a5093[_0x372aca(0x9c)]+_0x372aca(0x8a)};},async 'execute'(_0x45ac45){const _0x4b9ffd=a36_0x56da08,_0x452875=loadBffProjectConfig(_0x45ac45[_0x4b9ffd(0x8b)]),_0x4f2a4d=await readBffLockFile(_0x452875[_0x4b9ffd(0xb4)]),{lockData:_0x1dad43,appLock:_0x421dd0}=ensureLockScope(_0x4f2a4d??createEmptyBffLock(),_0x45ac45[_0x4b9ffd(0x8b)],_0x452875[_0x4b9ffd(0xa0)],_0x4b9ffd(0xbc)),_0x38a445=normalizeBffType(_0x45ac45[_0x4b9ffd(0xad)](_0x4b9ffd(0xb7)))??undefined;if(_0x45ac45[_0x4b9ffd(0xad)](_0x4b9ffd(0xb7))&&!_0x38a445)throw CliErrors[_0x4b9ffd(0xcd)](_0x4b9ffd(0xae));const [_0x44743a,_0x4f89a8]=await Promise[_0x4b9ffd(0xa1)]([listBffScripts(_0x45ac45[_0x4b9ffd(0x8b)],_0x38a445),getBffScriptStatistics(_0x45ac45['appCode'])]);if(_0x44743a[_0x4b9ffd(0x9c)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x4b9ffd(0xab)};const _0x16c7d5=_0x45ac45[_0x4b9ffd(0xc9)](_0x4b9ffd(0xb8));if(_0x16c7d5&&!_0x45ac45[_0x4b9ffd(0xb0)]){const _0x21da46=await confirmForce();if(!_0x21da46)throw CliErrors['cancelled'](_0x4b9ffd(0x95));}if(_0x16c7d5&&_0x45ac45[_0x4b9ffd(0xb0)]){}const _0x3acfeb=buildDatasetCodeToAliasMap(_0x45ac45[_0x4b9ffd(0xa4)],_0x45ac45['appCode']),_0x141e14=createHookLocationMap(_0x4f89a8),_0x2b88bb=JSON['parse'](JSON[_0x4b9ffd(0xbb)](_0x1dad43)),_0x29df8a=_0x45ac45[_0x4b9ffd(0x8b)],_0x542000=_0x2b88bb[_0x4b9ffd(0xc2)][_0x29df8a];if(!_0x542000)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x29df8a+_0x4b9ffd(0x9a));const _0x364846=[],_0x2f0bfe=[],_0x225de6=[];for(const _0x8e577b of _0x44743a){const _0x18a3a2=resolveRemoteScriptTarget(_0x452875,_0x8e577b,_0x141e14,_0x421dd0[_0x4b9ffd(0x9f)],_0x3acfeb);if(!_0x18a3a2){_0x2f0bfe[_0x4b9ffd(0xa8)]({'lockKey':_0x8e577b['scriptType']+'/'+_0x8e577b[_0x4b9ffd(0x9b)],'reason':'unresolvable\x20target\x20path'});continue;}const _0xe3b001=_0x421dd0[_0x4b9ffd(0x9f)][_0x18a3a2[_0x4b9ffd(0x97)]];try{if(!_0x8e577b['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x8e577b[_0x4b9ffd(0xb5)]==null)throw new Error(_0x4b9ffd(0xc0));const _0x4151fb=_0x8e577b[_0x4b9ffd(0xb5)],_0x220477=computeContentHash(_0x4151fb);if(!_0x16c7d5){const _0x169d11=await hasUnsyncedLocalChanges(_0x18a3a2[_0x4b9ffd(0xc3)],_0xe3b001,_0x220477);if(_0x169d11){_0x2f0bfe[_0x4b9ffd(0xa8)]({'lockKey':_0x18a3a2[_0x4b9ffd(0x97)],'reason':_0x4b9ffd(0xb1)});continue;}}await ensureParentDirectory(_0x18a3a2[_0x4b9ffd(0xc3)]),await writeFile(_0x18a3a2[_0x4b9ffd(0xc3)],_0x4151fb,_0x4b9ffd(0xbe));const _0x1e0054={'hash':_0x220477,'remoteId':_0x8e577b['id'],'version':_0x8e577b[_0x4b9ffd(0xbf)]};_0x18a3a2['type']===_0x4b9ffd(0xc4)&&_0x18a3a2['hookLocation']&&(_0x1e0054['alias']=_0x18a3a2[_0x4b9ffd(0xa3)][_0x4b9ffd(0xb2)],_0x1e0054[_0x4b9ffd(0x94)]=_0x18a3a2[_0x4b9ffd(0xa3)][_0x4b9ffd(0x94)],_0x1e0054['operationType']=_0x18a3a2[_0x4b9ffd(0xa3)][_0x4b9ffd(0x96)],_0x1e0054[_0x4b9ffd(0xaf)]=_0x18a3a2[_0x4b9ffd(0xa3)][_0x4b9ffd(0xaf)]),_0x542000['functions'][_0x18a3a2['lockKey']]=_0x1e0054,_0x364846[_0x4b9ffd(0xa8)]({'lockKey':_0x18a3a2[_0x4b9ffd(0x97)],'remoteId':_0x8e577b['id']});}catch(_0x29ff5e){_0x225de6[_0x4b9ffd(0xa8)]({'lockKey':_0x18a3a2[_0x4b9ffd(0x97)],'error':_0x29ff5e instanceof Error?_0x29ff5e[_0x4b9ffd(0x8c)]:String(_0x29ff5e)});}}return _0x542000['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x452875[_0x4b9ffd(0xb4)],_0x2b88bb),{'ok':_0x225de6[_0x4b9ffd(0x9c)]===0x0,'data':{'pulled':_0x364846,'skipped':_0x2f0bfe,'failed':_0x225de6},'message':'Pull\x20complete:\x20'+_0x364846[_0x4b9ffd(0x9c)]+'\x20pulled,\x20'+_0x2f0bfe[_0x4b9ffd(0x9c)]+'\x20skipped,\x20'+_0x225de6[_0x4b9ffd(0x9c)]+'\x20failed'};}};function a36_0x2142(_0x3c949d,_0x133313){_0x3c949d=_0x3c949d-0x88;const _0x1e880a=a36_0x1e88();let _0x2142bf=_0x1e880a[_0x3c949d];return _0x2142bf;}async function hasUnsyncedLocalChanges(_0x2a022f,_0x2adb31,_0x158379){const _0x1ae571=a36_0x56da08;if(!await fileExists(_0x2a022f))return![];const _0x349740=await computeFileHash(_0x2a022f);if(!_0x2adb31)return _0x158379?_0x349740!==_0x158379:!![];return _0x349740!==_0x2adb31[_0x1ae571(0x99)];}function buildDatasetCodeToAliasMap(_0x121e9e,_0x36aaaa){const _0x1bd55d=a36_0x56da08,_0x2d70b7=loadAliasMap(_0x121e9e,undefined,resolveApiFilePath(_0x121e9e,_0x36aaaa));return new Map(_0x2d70b7[_0x1bd55d(0xc1)](_0x56e985=>[_0x56e985['datasetCode'],_0x56e985[_0x1bd55d(0xb2)]]));}async function confirmForce(){const _0x304373=a36_0x56da08,_0xbc786c=createInterface({'input':process[_0x304373(0xcc)],'output':process[_0x304373(0xa7)]}),_0x23ccf0=await new Promise(_0x52d109=>{const _0x5daf4d=_0x304373;_0xbc786c[_0x5daf4d(0xcb)](_0x5daf4d(0xc5),_0x52d109);});return _0xbc786c[_0x304373(0xa9)](),['y','yes'][_0x304373(0xac)](_0x23ccf0['trim']()['toLowerCase']());}
1
+ const a36_0x1e7be4=a36_0x2e79;(function(_0x2f689b,_0x118d2a){const _0x116a6c=a36_0x2e79,_0x958076=_0x2f689b();while(!![]){try{const _0x4cefac=-parseInt(_0x116a6c(0x1ea))/0x1+parseInt(_0x116a6c(0x1e3))/0x2+parseInt(_0x116a6c(0x1ee))/0x3*(parseInt(_0x116a6c(0x1de))/0x4)+parseInt(_0x116a6c(0x208))/0x5+-parseInt(_0x116a6c(0x1d6))/0x6+parseInt(_0x116a6c(0x1e6))/0x7*(-parseInt(_0x116a6c(0x212))/0x8)+parseInt(_0x116a6c(0x1fb))/0x9;if(_0x4cefac===_0x118d2a)break;else _0x958076['push'](_0x958076['shift']());}catch(_0x230450){_0x958076['push'](_0x958076['shift']());}}}(a36_0xab19,0x97bca));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';function a36_0x2e79(_0x55ed6f,_0xf3a3e2){_0x55ed6f=_0x55ed6f-0x1d3;const _0xab1952=a36_0xab19();let _0x2e7952=_0xab1952[_0x55ed6f];return _0x2e7952;}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_0x1e7be4(0x203),'command':a36_0x1e7be4(0x1f0),'description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':a36_0x1e7be4(0x206),'flags':[{'name':'type','type':a36_0x1e7be4(0x20c),'description':a36_0x1e7be4(0x1ff),'enum':[a36_0x1e7be4(0x1ec),a36_0x1e7be4(0x1e0),a36_0x1e7be4(0x209)]},{'name':a36_0x1e7be4(0x1e7),'type':a36_0x1e7be4(0x211),'description':a36_0x1e7be4(0x1d3)}],async 'dryRun'(_0x42ed93){const _0x33ab94=a36_0x1e7be4,_0x50247a=loadBffProjectConfig(_0x42ed93['appCode']),_0x2668fd=await readBffLockFile(_0x50247a[_0x33ab94(0x20f)]),{appLock:_0x804379}=ensureLockScope(_0x2668fd??createEmptyBffLock(),_0x42ed93['appCode'],_0x50247a['scriptsRoot'],_0x33ab94(0x1f0)),_0x3aa67=normalizeBffType(_0x42ed93[_0x33ab94(0x1df)](_0x33ab94(0x1f6)))??undefined,_0x1423dc=buildDatasetCodeToAliasMap(_0x42ed93[_0x33ab94(0x1fc)],_0x42ed93[_0x33ab94(0x1d7)]),[_0x5dad51,_0x3b09ff]=await Promise[_0x33ab94(0x21c)]([listBffScripts(_0x42ed93[_0x33ab94(0x1d7)],_0x3aa67),getBffScriptStatistics(_0x42ed93[_0x33ab94(0x1d7)])]),_0x2feb22=createHookLocationMap(_0x3b09ff),_0x4265a1=[];for(const _0x18a5ab of _0x5dad51){const _0x473e99=resolveRemoteScriptTarget(_0x50247a,_0x18a5ab,_0x2feb22,_0x804379[_0x33ab94(0x20e)],_0x1423dc);if(!_0x473e99){_0x4265a1[_0x33ab94(0x1d8)]({'scriptType':_0x18a5ab['scriptType'],'functionName':_0x18a5ab[_0x33ab94(0x213)]??'','status':_0x33ab94(0x214),'reason':'unresolvable\x20target\x20path'});continue;}const _0x193112=_0x804379[_0x33ab94(0x20e)][_0x473e99['lockKey']],_0x29fdc2=_0x18a5ab[_0x33ab94(0x1e8)]!=null?computeContentHash(_0x18a5ab[_0x33ab94(0x1e8)]):undefined,_0x45a26f=await hasUnsyncedLocalChanges(_0x473e99[_0x33ab94(0x217)],_0x193112,_0x29fdc2);_0x4265a1[_0x33ab94(0x1d8)]({'lockKey':_0x473e99[_0x33ab94(0x1f2)],'filePath':_0x473e99[_0x33ab94(0x217)],'remoteId':_0x18a5ab['id']??null,'status':_0x45a26f?_0x33ab94(0x1fa):'would_pull'});}return{'method':_0x33ab94(0x20d),'url':_0x33ab94(0x1e9)+_0x42ed93[_0x33ab94(0x1d7)]+(_0x3aa67?'&type='+_0x3aa67:''),'body':{'appCode':_0x42ed93[_0x33ab94(0x1d7)],'filterType':_0x3aa67??null,'files':_0x4265a1},'description':_0x33ab94(0x1f1)+_0x4265a1[_0x33ab94(0x207)]+_0x33ab94(0x20b)};},async 'execute'(_0x444f0f){const _0x5a5a9a=a36_0x1e7be4,_0x1083c1=loadBffProjectConfig(_0x444f0f[_0x5a5a9a(0x1d7)]),_0x375ee4=await readBffLockFile(_0x1083c1[_0x5a5a9a(0x20f)]),{lockData:_0x5dc03a,appLock:_0x5e5e34}=ensureLockScope(_0x375ee4??createEmptyBffLock(),_0x444f0f[_0x5a5a9a(0x1d7)],_0x1083c1['scriptsRoot'],_0x5a5a9a(0x1f0)),_0x9bb371=normalizeBffType(_0x444f0f[_0x5a5a9a(0x1df)](_0x5a5a9a(0x1f6)))??undefined;if(_0x444f0f['str'](_0x5a5a9a(0x1f6))&&!_0x9bb371)throw CliErrors[_0x5a5a9a(0x202)](_0x5a5a9a(0x1dc));const [_0x3ff207,_0x27d7c9]=await Promise['all']([listBffScripts(_0x444f0f[_0x5a5a9a(0x1d7)],_0x9bb371),getBffScriptStatistics(_0x444f0f['appCode'])]);if(_0x3ff207[_0x5a5a9a(0x207)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x34e804=_0x444f0f[_0x5a5a9a(0x1d9)](_0x5a5a9a(0x1e7));if(_0x34e804&&!_0x444f0f[_0x5a5a9a(0x1f4)]){const _0x17734a=await confirmForce();if(!_0x17734a)throw CliErrors['cancelled'](_0x5a5a9a(0x215));}if(_0x34e804&&_0x444f0f[_0x5a5a9a(0x1f4)]){}const _0xf549eb=buildDatasetCodeToAliasMap(_0x444f0f[_0x5a5a9a(0x1fc)],_0x444f0f[_0x5a5a9a(0x1d7)]),_0x1f58fe=createHookLocationMap(_0x27d7c9),_0xb5e1b8=JSON[_0x5a5a9a(0x1fe)](JSON[_0x5a5a9a(0x201)](_0x5dc03a)),_0x2d8c80=_0x444f0f['appCode'],_0xe453f2=_0xb5e1b8[_0x5a5a9a(0x1e5)][_0x2d8c80];if(!_0xe453f2)throw new Error(_0x5a5a9a(0x1f3)+_0x2d8c80+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x1ef017=[],_0x3e1fe8=[],_0x3e5eab=[];for(const _0x3df337 of _0x3ff207){const _0x38f61d=resolveRemoteScriptTarget(_0x1083c1,_0x3df337,_0x1f58fe,_0x5e5e34[_0x5a5a9a(0x20e)],_0xf549eb);if(!_0x38f61d){_0x3e1fe8[_0x5a5a9a(0x1d8)]({'lockKey':_0x3df337[_0x5a5a9a(0x1e4)]+'/'+_0x3df337['functionName'],'reason':'unresolvable\x20target\x20path'});continue;}const _0x236d0a=_0x5e5e34['functions'][_0x38f61d['lockKey']];try{if(!_0x3df337['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x3df337[_0x5a5a9a(0x1e8)]==null)throw new Error(_0x5a5a9a(0x20a));const _0x6af627=_0x3df337[_0x5a5a9a(0x1e8)],_0x19e9f9=computeContentHash(_0x6af627);if(!_0x34e804){const _0x75db87=await hasUnsyncedLocalChanges(_0x38f61d[_0x5a5a9a(0x217)],_0x236d0a,_0x19e9f9);if(_0x75db87){_0x3e1fe8[_0x5a5a9a(0x1d8)]({'lockKey':_0x38f61d[_0x5a5a9a(0x1f2)],'reason':_0x5a5a9a(0x1d4)});continue;}}await ensureParentDirectory(_0x38f61d[_0x5a5a9a(0x217)]),await writeFile(_0x38f61d[_0x5a5a9a(0x217)],_0x6af627,_0x5a5a9a(0x1db));const _0x5ab878={'hash':_0x19e9f9,'remoteId':_0x3df337['id'],'version':_0x3df337[_0x5a5a9a(0x1da)]};_0x38f61d[_0x5a5a9a(0x1f6)]===_0x5a5a9a(0x209)&&_0x38f61d[_0x5a5a9a(0x218)]&&(_0x5ab878[_0x5a5a9a(0x1fd)]=_0x38f61d[_0x5a5a9a(0x218)]['alias'],_0x5ab878['datasetCode']=_0x38f61d[_0x5a5a9a(0x218)][_0x5a5a9a(0x1f9)],_0x5ab878[_0x5a5a9a(0x1e2)]=_0x38f61d[_0x5a5a9a(0x218)]['operationType'],_0x5ab878[_0x5a5a9a(0x1eb)]=_0x38f61d[_0x5a5a9a(0x218)]['functionNode']),_0xe453f2['functions'][_0x38f61d[_0x5a5a9a(0x1f2)]]=_0x5ab878,_0x1ef017[_0x5a5a9a(0x1d8)]({'lockKey':_0x38f61d[_0x5a5a9a(0x1f2)],'remoteId':_0x3df337['id']});}catch(_0x3db111){_0x3e5eab[_0x5a5a9a(0x1d8)]({'lockKey':_0x38f61d[_0x5a5a9a(0x1f2)],'error':_0x3db111 instanceof Error?_0x3db111[_0x5a5a9a(0x1ed)]:String(_0x3db111)});}}return _0xe453f2['lastSync']=new Date()[_0x5a5a9a(0x1f8)](),await writeBffLockFile(_0x1083c1[_0x5a5a9a(0x20f)],_0xb5e1b8),{'ok':_0x3e5eab[_0x5a5a9a(0x207)]===0x0,'data':{'pulled':_0x1ef017,'skipped':_0x3e1fe8,'failed':_0x3e5eab},'message':_0x5a5a9a(0x1dd)+_0x1ef017[_0x5a5a9a(0x207)]+_0x5a5a9a(0x204)+_0x3e1fe8[_0x5a5a9a(0x207)]+_0x5a5a9a(0x219)+_0x3e5eab[_0x5a5a9a(0x207)]+_0x5a5a9a(0x216)};}};function a36_0xab19(){const _0x493d67=['COMMON','message','341244GTtVlF','stdin','pull','Would\x20inspect\x20','lockKey','Lock\x20scope\x20for\x20app\x20\x22','nonInteractive','map','type','yes','toISOString','datasetCode','conflict','2705679YvycXk','apiDir','alias','parse','Pull\x20only\x20this\x20script\x20type','hash','stringify','validation','bff','\x20pulled,\x20','stderr','write','length','6004145QxaSDU','HOOK','Remote\x20script\x20missing\x20content.','\x20remote\x20BFF\x20script(s)\x20for\x20pull','string','GET','functions','lockFilePath','question','boolean','779392sEJTaq','functionName','skipped','Force\x20pull\x20cancelled.','\x20failed','filePath','hookLocation','\x20skipped,\x20','trim','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','all','Force\x20overwrite\x20local\x20unsynced\x20changes','local\x20unsynced\x20changes','includes','2390418udWdze','appCode','push','bool','version','utf8','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','Pull\x20complete:\x20','16ESHQvi','str','ENDPOINT','close','operationType','244678zXyXlk','scriptType','apps','56ATBzRw','force','scriptContent','/api/management/library/scripts/list?appCode=','279482nhzWob','functionNode'];a36_0xab19=function(){return _0x493d67;};return a36_0xab19();}async function hasUnsyncedLocalChanges(_0x225f79,_0x2834bd,_0x41973b){const _0xa7150e=a36_0x1e7be4;if(!await fileExists(_0x225f79))return![];const _0x214241=await computeFileHash(_0x225f79);if(!_0x2834bd)return _0x41973b?_0x214241!==_0x41973b:!![];return _0x214241!==_0x2834bd[_0xa7150e(0x200)];}function buildDatasetCodeToAliasMap(_0x1ef7f8,_0x7d6507){const _0x1e8111=a36_0x1e7be4,_0x16ab08=loadAliasMap(_0x1ef7f8,undefined,resolveApiFilePath(_0x1ef7f8,_0x7d6507));return new Map(_0x16ab08[_0x1e8111(0x1f5)](_0x3002d1=>[_0x3002d1['datasetCode'],_0x3002d1[_0x1e8111(0x1fd)]]));}async function confirmForce(){const _0x4adea2=a36_0x1e7be4,_0x39f12a=createInterface({'input':process[_0x4adea2(0x1ef)],'output':process[_0x4adea2(0x205)]}),_0x582fb9=await new Promise(_0x1f8301=>{const _0x44b3d1=_0x4adea2;_0x39f12a[_0x44b3d1(0x210)](_0x44b3d1(0x21b),_0x1f8301);});return _0x39f12a[_0x4adea2(0x1e1)](),['y',_0x4adea2(0x1f7)][_0x4adea2(0x1d5)](_0x582fb9[_0x4adea2(0x21a)]()['toLowerCase']());}
@@ -1 +1 @@
1
- const a37_0x158eae=a37_0x1df4;(function(_0x76b118,_0x42d388){const _0x427581=a37_0x1df4,_0x56ea23=_0x76b118();while(!![]){try{const _0x37d66e=parseInt(_0x427581(0x180))/0x1+parseInt(_0x427581(0x179))/0x2*(parseInt(_0x427581(0x172))/0x3)+-parseInt(_0x427581(0x1a4))/0x4*(parseInt(_0x427581(0x184))/0x5)+-parseInt(_0x427581(0x168))/0x6+parseInt(_0x427581(0x189))/0x7*(parseInt(_0x427581(0x1b0))/0x8)+-parseInt(_0x427581(0x18f))/0x9*(parseInt(_0x427581(0x162))/0xa)+-parseInt(_0x427581(0x164))/0xb;if(_0x37d66e===_0x42d388)break;else _0x56ea23['push'](_0x56ea23['shift']());}catch(_0x29b63a){_0x56ea23['push'](_0x56ea23['shift']());}}}(a37_0x40f0,0x3b43c));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';function a37_0x40f0(){const _0x3a4b0b=['--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','bool','bff','type','85172pTMSla','functions','high-risk-write','force','5kmoeiV','unchanged','functionNode','join','\x20uploaded,\x20','91wguTNU','push','lockKey','Local\x20function\x20not\x20found:\x20','Push\x20local\x20BFF\x20scripts\x20to\x20remote','hash','9LyiIKy','\x20skipped,\x20','Push\x20only\x20this\x20script\x20type','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','filePath','Push\x20complete:\x20','utf8','apps','aliasToDatasetCode','runtime\x20cache\x20clear\x20failed','string','COMMON','description','cleared','\x20failed,\x20','some','apiDir',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Cannot\x20resolve\x20dataset\x20for\x20\x22','create','446932gPUabb','update','operationType','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','length','alias','\x22.\x20','version','Force\x20push\x20ignoring\x20hash\x20protection','every','remoteId','POST','101392IIXVoY','name','Would\x20inspect\x20','scriptsRoot','would_push','attempted','script','has','459350UrOzPp','status','2194357utiywP','datasetCode','validation','stringify','447090spUgTw','Runtime\x20script\x20cache\x20cleared.','appCode','lockFilePath','toISOString','message','Lock\x20scope\x20for\x20app\x20\x22','No\x20local\x20BFF\x20functions\x20found.','parse','get','318363lQLIsx','filter','HOOK','map','lastSync','code','values','8QVFJaV','str','/api/management/library/scripts/save'];a37_0x40f0=function(){return _0x3a4b0b;};return a37_0x40f0();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a37_0x1df4(_0x5b0a20,_0x162974){_0x5b0a20=_0x5b0a20-0x15e;const _0x40f02e=a37_0x40f0();let _0x1df413=_0x40f02e[_0x5b0a20];return _0x1df413;}export const bffPush={'service':a37_0x158eae(0x17e),'command':a37_0x158eae(0x18a),'description':a37_0x158eae(0x18d),'risk':a37_0x158eae(0x182),'flags':[{'name':'type','type':a37_0x158eae(0x19a),'description':a37_0x158eae(0x191),'enum':[a37_0x158eae(0x19b),'ENDPOINT',a37_0x158eae(0x174)]},{'name':'name','type':a37_0x158eae(0x19a),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0x158eae(0x183),'type':'boolean','description':a37_0x158eae(0x1ac)}],async 'dryRun'(_0x52f18a){const _0x2102f5=a37_0x158eae,_0x25b533=loadBffProjectConfig(_0x52f18a[_0x2102f5(0x16a)]),_0x3d9de4=await readBffLockFile(_0x25b533['lockFilePath']),{appLock:_0x5ab622}=ensureLockScope(_0x3d9de4??createEmptyBffLock(),_0x52f18a[_0x2102f5(0x16a)],_0x25b533[_0x2102f5(0x1b3)],_0x2102f5(0x18a)),_0x5cb0b0=await getTargetFunctions(_0x25b533,_0x52f18a),_0x7f3af=_0x52f18a[_0x2102f5(0x17d)](_0x2102f5(0x183)),_0x435172=[];for(const _0x591687 of _0x5cb0b0){const _0x2515f6=await computeFileHash(_0x591687[_0x2102f5(0x194)]),_0x182db5=_0x5ab622[_0x2102f5(0x181)][_0x591687['lockKey']],_0x43a6dd=!!_0x182db5&&_0x182db5['hash']===_0x2515f6;_0x435172[_0x2102f5(0x18a)]({'lockKey':_0x591687[_0x2102f5(0x18b)],'filePath':_0x591687[_0x2102f5(0x194)],'remoteId':_0x182db5?.['remoteId']??null,'mode':_0x182db5?.[_0x2102f5(0x1ae)]?_0x2102f5(0x1a5):_0x2102f5(0x1a3),'status':!_0x7f3af&&_0x43a6dd?_0x2102f5(0x185):_0x2102f5(0x15e)});}return{'method':_0x2102f5(0x1af),'url':_0x2102f5(0x17b),'body':{'appCode':_0x52f18a['appCode'],'force':_0x7f3af,'files':_0x435172,'cacheClearAtRuntime':_0x435172[_0x2102f5(0x19f)](_0x5ccd0a=>_0x5ccd0a[_0x2102f5(0x163)]==='would_push'),'cacheClearAtRuntimeTimes':_0x435172['some'](_0x6ff237=>_0x6ff237[_0x2102f5(0x163)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x2102f5(0x1b2)+_0x435172['length']+_0x2102f5(0x193)};},async 'execute'(_0x1f5a06){const _0xd52c5f=a37_0x158eae,_0x579006=loadBffProjectConfig(_0x1f5a06[_0xd52c5f(0x16a)]),_0x1b0e12=await readBffLockFile(_0x579006[_0xd52c5f(0x16b)]),{lockData:_0xbfae41,appLock:_0x560c40}=ensureLockScope(_0x1b0e12??createEmptyBffLock(),_0x1f5a06['appCode'],_0x579006[_0xd52c5f(0x1b3)],_0xd52c5f(0x18a)),_0xde2aee=await getTargetFunctions(_0x579006,_0x1f5a06);if(_0xde2aee['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0xd52c5f(0x16f)};const _0x1ceae7=_0x1f5a06[_0xd52c5f(0x17d)]('force'),_0x5be1d8=JSON[_0xd52c5f(0x170)](JSON[_0xd52c5f(0x167)](_0xbfae41)),_0x27494d=_0x5be1d8[_0xd52c5f(0x197)][_0x1f5a06[_0xd52c5f(0x16a)]];if(!_0x27494d)throw new Error(_0xd52c5f(0x16e)+_0x1f5a06[_0xd52c5f(0x16a)]+_0xd52c5f(0x192));const _0x38a93e=await buildHookMaps(_0x1f5a06[_0xd52c5f(0x16a)],_0x1f5a06[_0xd52c5f(0x1a0)],_0xde2aee,_0x27494d),_0x279b0f=[],_0xdb8103=[],_0x25ad95=[];for(const _0x5a1fee of _0xde2aee){const _0x5d2d0c=await computeFileHash(_0x5a1fee[_0xd52c5f(0x194)]),_0x61e64b=_0x27494d['functions'][_0x5a1fee[_0xd52c5f(0x18b)]];if(!_0x1ceae7&&_0x61e64b&&_0x61e64b[_0xd52c5f(0x18e)]===_0x5d2d0c){_0xdb8103['push']({'lockKey':_0x5a1fee['lockKey'],'reason':_0xd52c5f(0x185)});continue;}try{await uploadSingleFunction(_0x1f5a06[_0xd52c5f(0x16a)],_0x5a1fee,_0x27494d,_0x38a93e);const _0x2bada2=_0x27494d[_0xd52c5f(0x181)][_0x5a1fee[_0xd52c5f(0x18b)]];_0x279b0f[_0xd52c5f(0x18a)]({'lockKey':_0x5a1fee['lockKey'],'remoteId':_0x2bada2?.[_0xd52c5f(0x1ae)]??0x0});}catch(_0x593bed){_0x25ad95[_0xd52c5f(0x18a)]({'lockKey':_0x5a1fee['lockKey'],'error':_0x593bed instanceof Error?_0x593bed[_0xd52c5f(0x16d)]:String(_0x593bed)});}}_0x27494d[_0xd52c5f(0x176)]=new Date()[_0xd52c5f(0x16c)](),await writeBffLockFile(_0x579006[_0xd52c5f(0x16b)],_0x5be1d8),await waitForUploadedLockEntries(_0x579006[_0xd52c5f(0x16b)],_0x1f5a06[_0xd52c5f(0x16a)],_0x279b0f[_0xd52c5f(0x175)](_0x11dc0d=>_0x11dc0d[_0xd52c5f(0x18b)]));let _0x1d6c43={'attempted':![],'cleared':![]};if(_0x279b0f[_0xd52c5f(0x1a8)]>0x0)try{let _0x3b2b94='';for(let _0x21a4bd=0x0;_0x21a4bd<CACHE_CLEAR_ATTEMPTS;_0x21a4bd+=0x1){_0x3b2b94=await clearBffScriptCache(),_0x21a4bd<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x1d6c43={'attempted':!![],'cleared':!![],'message':_0x3b2b94||_0xd52c5f(0x169)};}catch(_0x17a398){_0x1d6c43={'attempted':!![],'cleared':![],'error':_0x17a398 instanceof Error?_0x17a398[_0xd52c5f(0x16d)]:String(_0x17a398)};}const _0x2bc582=_0x25ad95[_0xd52c5f(0x1a8)]===0x0&&(_0x1d6c43[_0xd52c5f(0x15f)]?_0x1d6c43[_0xd52c5f(0x19d)]:!![]),_0x405c90=_0x1d6c43[_0xd52c5f(0x15f)]?_0x1d6c43[_0xd52c5f(0x19d)]?'runtime\x20cache\x20cleared':_0xd52c5f(0x199):'runtime\x20cache\x20not\x20needed';return{'ok':_0x2bc582,'data':{'uploaded':_0x279b0f,'skipped':_0xdb8103,'failed':_0x25ad95,'cacheClear':_0x1d6c43},'message':_0xd52c5f(0x195)+_0x279b0f['length']+_0xd52c5f(0x188)+_0xdb8103[_0xd52c5f(0x1a8)]+_0xd52c5f(0x190)+_0x25ad95[_0xd52c5f(0x1a8)]+_0xd52c5f(0x19e)+_0x405c90};}};async function getTargetFunctions(_0x43a353,_0x41b5a5){const _0xedab1=a37_0x158eae,_0xde6a73=_0x41b5a5[_0xedab1(0x17a)](_0xedab1(0x17f)),_0xc6214f=_0x41b5a5['str'](_0xedab1(0x1b1)),_0x2b1f7f=normalizeBffType(_0xde6a73)??undefined;if(_0xc6214f&&!_0x2b1f7f)throw CliErrors[_0xedab1(0x166)](_0xedab1(0x17c));const _0x376a41=await scanLocalBffFunctions(_0x43a353,_0x2b1f7f);if(_0xc6214f){const _0x5bf8a9=_0x376a41[_0xedab1(0x173)](_0x3c4900=>_0x3c4900[_0xedab1(0x1b1)]===_0xc6214f);if(_0x5bf8a9[_0xedab1(0x1a8)]===0x0)throw CliErrors[_0xedab1(0x166)](_0xedab1(0x18c)+_0x2b1f7f+'/'+_0xc6214f);return _0x5bf8a9;}return _0x376a41;}async function buildHookMaps(_0x30e01b,_0x229fd6,_0x3066e7,_0x4beaf1){const _0xaa80de=a37_0x158eae,_0x110531=_0x3066e7[_0xaa80de(0x19f)](_0x261a58=>_0x261a58[_0xaa80de(0x17f)]===_0xaa80de(0x174));if(!_0x110531)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x28ffb7=loadAliasMap(_0x229fd6,undefined,resolveApiFilePath(_0x229fd6,_0x30e01b)),_0x11e99e=new Map(_0x28ffb7['map'](_0x3e6c1e=>[_0x3e6c1e[_0xaa80de(0x1a9)],_0x3e6c1e[_0xaa80de(0x165)]]));for(const _0x412a17 of Object[_0xaa80de(0x178)](_0x4beaf1[_0xaa80de(0x181)])){_0x412a17[_0xaa80de(0x1a9)]&&_0x412a17[_0xaa80de(0x165)]&&!_0x11e99e[_0xaa80de(0x161)](_0x412a17[_0xaa80de(0x1a9)])&&_0x11e99e['set'](_0x412a17['alias'],_0x412a17['datasetCode']);}const _0x1676c5=await listDatasets(_0x30e01b),_0x10a69c=new Map(_0x1676c5[_0xaa80de(0x175)](_0x56ecb7=>[_0x56ecb7[_0xaa80de(0x177)],_0x56ecb7]));return{'aliasToDatasetCode':_0x11e99e,'datasetCodeToDataset':_0x10a69c};}async function uploadSingleFunction(_0x5885c2,_0x83fe6d,_0x4c055d,_0x185b43){const _0x433281=a37_0x158eae,_0x1bb32f=await readFile(_0x83fe6d[_0x433281(0x194)],_0x433281(0x196)),_0x26c596=await computeFileHash(_0x83fe6d[_0x433281(0x194)]),_0x233835=_0x4c055d[_0x433281(0x181)][_0x83fe6d[_0x433281(0x18b)]];if(_0x233835?.[_0x433281(0x1ae)]&&_0x233835[_0x433281(0x1ab)]==null)throw CliErrors[_0x433281(0x166)](_0x83fe6d['lockKey']+_0x433281(0x1a1));let _0x11187c=extractScriptDescription(_0x1bb32f);if(!_0x11187c&&_0x233835?.[_0x433281(0x1ae)]){const _0x410227=await getBffScriptInfo(_0x233835[_0x433281(0x1ae)]);_0x11187c=_0x410227[_0x433281(0x19c)]||undefined;}const _0xac55d={'appCode':_0x5885c2,'functionName':_0x83fe6d['name'],'scriptType':_0x83fe6d[_0x433281(0x17f)],'scriptContent':_0x1bb32f};if(_0x233835?.[_0x433281(0x1ae)])_0xac55d['id']=_0x233835['remoteId'];if(_0x233835?.[_0x433281(0x1ab)]!=null)_0xac55d[_0x433281(0x1ab)]=_0x233835[_0x433281(0x1ab)];if(_0x11187c)_0xac55d[_0x433281(0x19c)]=_0x11187c;if(_0x83fe6d[_0x433281(0x17f)]===_0x433281(0x174)){const _0x68a47c=_0x83fe6d['alias'];if(!_0x68a47c||!_0x83fe6d[_0x433281(0x1a6)]||!_0x83fe6d['functionNode'])throw CliErrors[_0x433281(0x166)]('Incomplete\x20HOOK\x20path:\x20'+_0x83fe6d[_0x433281(0x18b)]);const _0xc8129=_0x185b43[_0x433281(0x198)]['get'](_0x68a47c)??_0x233835?.['datasetCode']??_0x68a47c,_0x3b2d29=_0x185b43['datasetCodeToDataset'][_0x433281(0x171)](_0xc8129);if(!_0x3b2d29)throw CliErrors['validation'](_0x433281(0x1a2)+_0x68a47c+_0x433281(0x1aa)+('Run\x20`'+CLI_BIN_NAME+_0x433281(0x1a7)));_0xac55d['datasetId']=_0x3b2d29['id'],_0xac55d[_0x433281(0x1a6)]=_0x83fe6d[_0x433281(0x1a6)],_0xac55d[_0x433281(0x186)]=_0x83fe6d[_0x433281(0x186)];}const _0x2a608e=await saveBffScript(_0xac55d),_0x343785=_0x2a608e['id'],_0x17cf43=_0x2a608e[_0x433281(0x160)]??await getBffScriptInfo(_0x343785),_0x579982={'hash':_0x26c596,'remoteId':_0x343785,'version':_0x17cf43[_0x433281(0x1ab)]};if(_0x83fe6d[_0x433281(0x17f)]==='HOOK'){const _0x880c7=_0x83fe6d[_0x433281(0x1a9)],_0x31a696=_0x185b43[_0x433281(0x198)]['get'](_0x880c7)??_0x233835?.[_0x433281(0x165)]??_0x880c7;_0x185b43['aliasToDatasetCode'][_0x433281(0x161)](_0x880c7)?_0x579982[_0x433281(0x1a9)]=_0x880c7:_0x579982[_0x433281(0x1a9)]=_0x233835?.[_0x433281(0x1a9)],_0x579982[_0x433281(0x165)]=_0x31a696,_0x579982[_0x433281(0x1a6)]=_0x83fe6d[_0x433281(0x1a6)],_0x579982[_0x433281(0x186)]=_0x83fe6d[_0x433281(0x186)];}_0x4c055d['functions'][_0x83fe6d[_0x433281(0x18b)]]=_0x579982;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x101fe3,_0x16cf97,_0x13ea8d){const _0x29036f=a37_0x158eae;if(_0x13ea8d[_0x29036f(0x1a8)]===0x0)return;for(let _0x28b09a=0x0;_0x28b09a<LOCK_SETTLE_RETRY_COUNT;_0x28b09a+=0x1){const _0x563602=await readBffLockFile(_0x101fe3),_0x1faaad=_0x563602?.[_0x29036f(0x197)]?.[_0x16cf97]?.[_0x29036f(0x181)]??{},_0x134c84=_0x13ea8d[_0x29036f(0x1ad)](_0xb6248c=>!!_0x1faaad[_0xb6248c]?.[_0x29036f(0x1ae)]);if(_0x134c84)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x13ea8d[_0x29036f(0x187)](',\x20')+'.');}
1
+ const a37_0x5f1928=a37_0x2a8c;(function(_0x4fb3a0,_0x255677){const _0x3613c6=a37_0x2a8c,_0x1e0008=_0x4fb3a0();while(!![]){try{const _0x3e01b2=parseInt(_0x3613c6(0x8f))/0x1*(parseInt(_0x3613c6(0xa3))/0x2)+-parseInt(_0x3613c6(0xc6))/0x3+parseInt(_0x3613c6(0xc1))/0x4*(parseInt(_0x3613c6(0xc9))/0x5)+-parseInt(_0x3613c6(0xaa))/0x6+-parseInt(_0x3613c6(0xdf))/0x7+parseInt(_0x3613c6(0xdb))/0x8*(-parseInt(_0x3613c6(0xda))/0x9)+-parseInt(_0x3613c6(0xa2))/0xa*(-parseInt(_0x3613c6(0xce))/0xb);if(_0x3e01b2===_0x255677)break;else _0x1e0008['push'](_0x1e0008['shift']());}catch(_0x2aa856){_0x1e0008['push'](_0x1e0008['shift']());}}}(a37_0xa95d,0xc4c69));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_0xa95d(){const _0x255167=['some','unchanged','lastSync','4839558Ecxstg','Runtime\x20script\x20cache\x20cleared.','runtime\x20cache\x20clear\x20failed','No\x20local\x20BFF\x20functions\x20found.','create','functions','bool','name','appCode','ENDPOINT','filePath','would_push','Lock\x20scope\x20for\x20app\x20\x22','attempted','cleared','join','datasetCode','Incomplete\x20HOOK\x20path:\x20','COMMON','high-risk-write','values','Would\x20inspect\x20','aliasToDatasetCode','2464856QyugTs','script','every','\x22\x20not\x20found\x20after\x20ensureLockScope.','Push\x20complete:\x20','4448775koTUnA','length','remoteId','5aEsJDi','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','description','datasetId','str','3718CeTvZz','hash','status','\x20skipped,\x20','code','type','scriptsRoot','lockFilePath','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','datasetCodeToDataset','string','map','198oukJvX','298672ivMonI','stringify','apps','get','1275764XNkemx','filter','force','HOOK','has','Cannot\x20resolve\x20dataset\x20for\x20\x22','toISOString','463IyFgKk','/api/management/library/scripts/save','lockKey','update','bff','operationType','message','validation','Push\x20only\x20this\x20script\x20type','POST','Local\x20function\x20not\x20found:\x20',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','\x20failed,\x20','alias','\x22.\x20','version','utf8','push','95250YHnPIz','1138mMcHhv','functionNode','Force\x20push\x20ignoring\x20hash\x20protection','apiDir'];a37_0xa95d=function(){return _0x255167;};return a37_0xa95d();}const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x5f1928(0x93),'command':a37_0x5f1928(0xa1),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a37_0x5f1928(0xbd),'flags':[{'name':a37_0x5f1928(0xd3),'type':a37_0x5f1928(0xd8),'description':a37_0x5f1928(0x97),'enum':[a37_0x5f1928(0xbc),a37_0x5f1928(0xb3),'HOOK']},{'name':a37_0x5f1928(0xb1),'type':'string','description':a37_0x5f1928(0x9b)},{'name':a37_0x5f1928(0x8a),'type':'boolean','description':a37_0x5f1928(0xa5)}],async 'dryRun'(_0x17df58){const _0x3cffdc=a37_0x5f1928,_0xf8af56=loadBffProjectConfig(_0x17df58[_0x3cffdc(0xb2)]),_0x54ae52=await readBffLockFile(_0xf8af56[_0x3cffdc(0xd5)]),{appLock:_0x4c1608}=ensureLockScope(_0x54ae52??createEmptyBffLock(),_0x17df58[_0x3cffdc(0xb2)],_0xf8af56[_0x3cffdc(0xd4)],_0x3cffdc(0xa1)),_0x45b888=await getTargetFunctions(_0xf8af56,_0x17df58),_0x57e8bb=_0x17df58[_0x3cffdc(0xb0)](_0x3cffdc(0x8a)),_0x48b0d9=[];for(const _0x534e0e of _0x45b888){const _0x1dee6c=await computeFileHash(_0x534e0e[_0x3cffdc(0xb4)]),_0x43fc72=_0x4c1608['functions'][_0x534e0e[_0x3cffdc(0x91)]],_0x328304=!!_0x43fc72&&_0x43fc72[_0x3cffdc(0xcf)]===_0x1dee6c;_0x48b0d9[_0x3cffdc(0xa1)]({'lockKey':_0x534e0e[_0x3cffdc(0x91)],'filePath':_0x534e0e[_0x3cffdc(0xb4)],'remoteId':_0x43fc72?.[_0x3cffdc(0xc8)]??null,'mode':_0x43fc72?.[_0x3cffdc(0xc8)]?_0x3cffdc(0x92):_0x3cffdc(0xae),'status':!_0x57e8bb&&_0x328304?'unchanged':_0x3cffdc(0xb5)});}return{'method':_0x3cffdc(0x98),'url':_0x3cffdc(0x90),'body':{'appCode':_0x17df58['appCode'],'force':_0x57e8bb,'files':_0x48b0d9,'cacheClearAtRuntime':_0x48b0d9[_0x3cffdc(0xa7)](_0x4a2f86=>_0x4a2f86[_0x3cffdc(0xd0)]==='would_push'),'cacheClearAtRuntimeTimes':_0x48b0d9[_0x3cffdc(0xa7)](_0x13f0a3=>_0x13f0a3[_0x3cffdc(0xd0)]===_0x3cffdc(0xb5))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3cffdc(0xbf)+_0x48b0d9[_0x3cffdc(0xc7)]+_0x3cffdc(0xca)};},async 'execute'(_0x4d5a6c){const _0x24bb1b=a37_0x5f1928,_0x163035=loadBffProjectConfig(_0x4d5a6c['appCode']),_0x3734e7=await readBffLockFile(_0x163035['lockFilePath']),{lockData:_0x28c602,appLock:_0x1cd62e}=ensureLockScope(_0x3734e7??createEmptyBffLock(),_0x4d5a6c[_0x24bb1b(0xb2)],_0x163035[_0x24bb1b(0xd4)],'push'),_0x45dfda=await getTargetFunctions(_0x163035,_0x4d5a6c);if(_0x45dfda['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x24bb1b(0xad)};const _0x2eb790=_0x4d5a6c[_0x24bb1b(0xb0)](_0x24bb1b(0x8a)),_0x17e81f=JSON['parse'](JSON[_0x24bb1b(0xdc)](_0x28c602)),_0x47f925=_0x17e81f[_0x24bb1b(0xdd)][_0x4d5a6c[_0x24bb1b(0xb2)]];if(!_0x47f925)throw new Error(_0x24bb1b(0xb6)+_0x4d5a6c[_0x24bb1b(0xb2)]+_0x24bb1b(0xc4));const _0x4ad40e=await buildHookMaps(_0x4d5a6c['appCode'],_0x4d5a6c[_0x24bb1b(0xa6)],_0x45dfda,_0x47f925),_0x5325db=[],_0x1ed6e0=[],_0x4774df=[];for(const _0x21e94f of _0x45dfda){const _0x35ee84=await computeFileHash(_0x21e94f[_0x24bb1b(0xb4)]),_0x4081cd=_0x47f925[_0x24bb1b(0xaf)][_0x21e94f[_0x24bb1b(0x91)]];if(!_0x2eb790&&_0x4081cd&&_0x4081cd[_0x24bb1b(0xcf)]===_0x35ee84){_0x1ed6e0['push']({'lockKey':_0x21e94f['lockKey'],'reason':_0x24bb1b(0xa8)});continue;}try{await uploadSingleFunction(_0x4d5a6c[_0x24bb1b(0xb2)],_0x21e94f,_0x47f925,_0x4ad40e);const _0x21cc64=_0x47f925[_0x24bb1b(0xaf)][_0x21e94f['lockKey']];_0x5325db['push']({'lockKey':_0x21e94f[_0x24bb1b(0x91)],'remoteId':_0x21cc64?.[_0x24bb1b(0xc8)]??0x0});}catch(_0x4e1d80){_0x4774df[_0x24bb1b(0xa1)]({'lockKey':_0x21e94f[_0x24bb1b(0x91)],'error':_0x4e1d80 instanceof Error?_0x4e1d80[_0x24bb1b(0x95)]:String(_0x4e1d80)});}}_0x47f925[_0x24bb1b(0xa9)]=new Date()[_0x24bb1b(0x8e)](),await writeBffLockFile(_0x163035[_0x24bb1b(0xd5)],_0x17e81f),await waitForUploadedLockEntries(_0x163035[_0x24bb1b(0xd5)],_0x4d5a6c[_0x24bb1b(0xb2)],_0x5325db[_0x24bb1b(0xd9)](_0x384e77=>_0x384e77[_0x24bb1b(0x91)]));let _0x47370c={'attempted':![],'cleared':![]};if(_0x5325db[_0x24bb1b(0xc7)]>0x0)try{let _0xf7e670='';for(let _0x1c9ce3=0x0;_0x1c9ce3<CACHE_CLEAR_ATTEMPTS;_0x1c9ce3+=0x1){_0xf7e670=await clearBffScriptCache(),_0x1c9ce3<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x47370c={'attempted':!![],'cleared':!![],'message':_0xf7e670||_0x24bb1b(0xab)};}catch(_0x4fceef){_0x47370c={'attempted':!![],'cleared':![],'error':_0x4fceef instanceof Error?_0x4fceef[_0x24bb1b(0x95)]:String(_0x4fceef)};}const _0x5673c4=_0x4774df[_0x24bb1b(0xc7)]===0x0&&(_0x47370c[_0x24bb1b(0xb7)]?_0x47370c[_0x24bb1b(0xb8)]:!![]),_0x3d5ff1=_0x47370c[_0x24bb1b(0xb7)]?_0x47370c[_0x24bb1b(0xb8)]?'runtime\x20cache\x20cleared':_0x24bb1b(0xac):'runtime\x20cache\x20not\x20needed';return{'ok':_0x5673c4,'data':{'uploaded':_0x5325db,'skipped':_0x1ed6e0,'failed':_0x4774df,'cacheClear':_0x47370c},'message':_0x24bb1b(0xc5)+_0x5325db[_0x24bb1b(0xc7)]+'\x20uploaded,\x20'+_0x1ed6e0[_0x24bb1b(0xc7)]+_0x24bb1b(0xd1)+_0x4774df[_0x24bb1b(0xc7)]+_0x24bb1b(0x9c)+_0x3d5ff1};}};function a37_0x2a8c(_0x20b25a,_0x37a192){_0x20b25a=_0x20b25a-0x8a;const _0xa95df=a37_0xa95d();let _0x2a8c8c=_0xa95df[_0x20b25a];return _0x2a8c8c;}async function getTargetFunctions(_0x208f70,_0x10c375){const _0x2710ef=a37_0x5f1928,_0x256457=_0x10c375[_0x2710ef(0xcd)](_0x2710ef(0xd3)),_0x590ff1=_0x10c375[_0x2710ef(0xcd)](_0x2710ef(0xb1)),_0x198a3e=normalizeBffType(_0x256457)??undefined;if(_0x590ff1&&!_0x198a3e)throw CliErrors[_0x2710ef(0x96)](_0x2710ef(0xd6));const _0x556fd1=await scanLocalBffFunctions(_0x208f70,_0x198a3e);if(_0x590ff1){const _0x28c4bf=_0x556fd1[_0x2710ef(0xe0)](_0x1eeb93=>_0x1eeb93['name']===_0x590ff1);if(_0x28c4bf[_0x2710ef(0xc7)]===0x0)throw CliErrors[_0x2710ef(0x96)](_0x2710ef(0x99)+_0x198a3e+'/'+_0x590ff1);return _0x28c4bf;}return _0x556fd1;}async function buildHookMaps(_0x56d4b9,_0x3564c5,_0x53f7df,_0x1538fc){const _0x2f9c39=a37_0x5f1928,_0x5cf583=_0x53f7df[_0x2f9c39(0xa7)](_0x5131fd=>_0x5131fd['type']===_0x2f9c39(0x8b));if(!_0x5cf583)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x193f62=loadAliasMap(_0x3564c5,undefined,resolveApiFilePath(_0x3564c5,_0x56d4b9)),_0x564588=new Map(_0x193f62['map'](_0x1b68cb=>[_0x1b68cb[_0x2f9c39(0x9d)],_0x1b68cb['datasetCode']]));for(const _0x4680d3 of Object[_0x2f9c39(0xbe)](_0x1538fc[_0x2f9c39(0xaf)])){_0x4680d3['alias']&&_0x4680d3[_0x2f9c39(0xba)]&&!_0x564588[_0x2f9c39(0x8c)](_0x4680d3[_0x2f9c39(0x9d)])&&_0x564588['set'](_0x4680d3[_0x2f9c39(0x9d)],_0x4680d3[_0x2f9c39(0xba)]);}const _0x21ffd9=await listDatasets(_0x56d4b9),_0x59afe2=new Map(_0x21ffd9['map'](_0xbc37df=>[_0xbc37df[_0x2f9c39(0xd2)],_0xbc37df]));return{'aliasToDatasetCode':_0x564588,'datasetCodeToDataset':_0x59afe2};}async function uploadSingleFunction(_0x119501,_0x1b4677,_0x192474,_0x9b083a){const _0x2b395e=a37_0x5f1928,_0x2d75aa=await readFile(_0x1b4677[_0x2b395e(0xb4)],_0x2b395e(0xa0)),_0x11545b=await computeFileHash(_0x1b4677[_0x2b395e(0xb4)]),_0x24d697=_0x192474[_0x2b395e(0xaf)][_0x1b4677['lockKey']];if(_0x24d697?.[_0x2b395e(0xc8)]&&_0x24d697[_0x2b395e(0x9f)]==null)throw CliErrors[_0x2b395e(0x96)](_0x1b4677[_0x2b395e(0x91)]+_0x2b395e(0x9a));let _0x332d8b=extractScriptDescription(_0x2d75aa);if(!_0x332d8b&&_0x24d697?.[_0x2b395e(0xc8)]){const _0x3ed766=await getBffScriptInfo(_0x24d697[_0x2b395e(0xc8)]);_0x332d8b=_0x3ed766[_0x2b395e(0xcb)]||undefined;}const _0x1ae1d5={'appCode':_0x119501,'functionName':_0x1b4677[_0x2b395e(0xb1)],'scriptType':_0x1b4677['type'],'scriptContent':_0x2d75aa};if(_0x24d697?.[_0x2b395e(0xc8)])_0x1ae1d5['id']=_0x24d697['remoteId'];if(_0x24d697?.[_0x2b395e(0x9f)]!=null)_0x1ae1d5['version']=_0x24d697[_0x2b395e(0x9f)];if(_0x332d8b)_0x1ae1d5[_0x2b395e(0xcb)]=_0x332d8b;if(_0x1b4677[_0x2b395e(0xd3)]==='HOOK'){const _0x3a319b=_0x1b4677[_0x2b395e(0x9d)];if(!_0x3a319b||!_0x1b4677[_0x2b395e(0x94)]||!_0x1b4677[_0x2b395e(0xa4)])throw CliErrors[_0x2b395e(0x96)](_0x2b395e(0xbb)+_0x1b4677[_0x2b395e(0x91)]);const _0x4f74cd=_0x9b083a[_0x2b395e(0xc0)][_0x2b395e(0xde)](_0x3a319b)??_0x24d697?.[_0x2b395e(0xba)]??_0x3a319b,_0x3e71ff=_0x9b083a[_0x2b395e(0xd7)][_0x2b395e(0xde)](_0x4f74cd);if(!_0x3e71ff)throw CliErrors[_0x2b395e(0x96)](_0x2b395e(0x8d)+_0x3a319b+_0x2b395e(0x9e)+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x1ae1d5[_0x2b395e(0xcc)]=_0x3e71ff['id'],_0x1ae1d5[_0x2b395e(0x94)]=_0x1b4677['operationType'],_0x1ae1d5[_0x2b395e(0xa4)]=_0x1b4677['functionNode'];}const _0x5bdfb7=await saveBffScript(_0x1ae1d5),_0xc498d9=_0x5bdfb7['id'],_0x51b355=_0x5bdfb7[_0x2b395e(0xc2)]??await getBffScriptInfo(_0xc498d9),_0x14393d={'hash':_0x11545b,'remoteId':_0xc498d9,'version':_0x51b355[_0x2b395e(0x9f)]};if(_0x1b4677[_0x2b395e(0xd3)]===_0x2b395e(0x8b)){const _0x8e37f1=_0x1b4677[_0x2b395e(0x9d)],_0xd60dd6=_0x9b083a[_0x2b395e(0xc0)][_0x2b395e(0xde)](_0x8e37f1)??_0x24d697?.['datasetCode']??_0x8e37f1;_0x9b083a[_0x2b395e(0xc0)][_0x2b395e(0x8c)](_0x8e37f1)?_0x14393d[_0x2b395e(0x9d)]=_0x8e37f1:_0x14393d[_0x2b395e(0x9d)]=_0x24d697?.[_0x2b395e(0x9d)],_0x14393d[_0x2b395e(0xba)]=_0xd60dd6,_0x14393d['operationType']=_0x1b4677[_0x2b395e(0x94)],_0x14393d[_0x2b395e(0xa4)]=_0x1b4677[_0x2b395e(0xa4)];}_0x192474[_0x2b395e(0xaf)][_0x1b4677[_0x2b395e(0x91)]]=_0x14393d;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x376be6,_0x48c307,_0x5dcc49){const _0xc9309a=a37_0x5f1928;if(_0x5dcc49['length']===0x0)return;for(let _0x55a894=0x0;_0x55a894<LOCK_SETTLE_RETRY_COUNT;_0x55a894+=0x1){const _0xb0dbb6=await readBffLockFile(_0x376be6),_0x1b22fb=_0xb0dbb6?.[_0xc9309a(0xdd)]?.[_0x48c307]?.[_0xc9309a(0xaf)]??{},_0x294420=_0x5dcc49[_0xc9309a(0xc3)](_0x11b0f4=>!!_0x1b22fb[_0x11b0f4]?.[_0xc9309a(0xc8)]);if(_0x294420)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x5dcc49[_0xc9309a(0xb9)](',\x20')+'.');}
@@ -1 +1 @@
1
- function a38_0x4d29(_0x219f49,_0x238cd9){_0x219f49=_0x219f49-0x1f3;const _0x21edfc=a38_0x21ed();let _0x4d29d0=_0x21edfc[_0x219f49];return _0x4d29d0;}const a38_0x16e6cd=a38_0x4d29;(function(_0x57ff84,_0x436c42){const _0x30dc81=a38_0x4d29,_0x20627b=_0x57ff84();while(!![]){try{const _0x5606da=-parseInt(_0x30dc81(0x206))/0x1*(-parseInt(_0x30dc81(0x1f3))/0x2)+-parseInt(_0x30dc81(0x1ff))/0x3+-parseInt(_0x30dc81(0x1f6))/0x4+-parseInt(_0x30dc81(0x211))/0x5*(-parseInt(_0x30dc81(0x209))/0x6)+-parseInt(_0x30dc81(0x213))/0x7+-parseInt(_0x30dc81(0x210))/0x8*(-parseInt(_0x30dc81(0x207))/0x9)+-parseInt(_0x30dc81(0x202))/0xa;if(_0x5606da===_0x436c42)break;else _0x20627b['push'](_0x20627b['shift']());}catch(_0x54581d){_0x20627b['push'](_0x20627b['shift']());}}}(a38_0x21ed,0x869dd));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_0x16e6cd(0x20f),'command':'status','description':a38_0x16e6cd(0x201),'risk':a38_0x16e6cd(0x1f9),'flags':[{'name':a38_0x16e6cd(0x20b),'type':a38_0x16e6cd(0x1fd),'description':a38_0x16e6cd(0x205)}],async 'execute'(_0x24b9e1){const _0x519d94=a38_0x16e6cd,_0x3e4429=loadBffProjectConfig(_0x24b9e1[_0x519d94(0x20c)]),_0x2e0feb=await readBffLockFile(_0x3e4429['lockFilePath']),{appLock:_0x5d501f}=ensureLockScope(_0x2e0feb??createEmptyBffLock(),_0x24b9e1[_0x519d94(0x20c)],_0x3e4429['scriptsRoot'],_0x519d94(0x1fa)),_0x90fb98=await scanLocalBffFunctions(_0x3e4429),_0x34be7f=[],_0x2cff14=[],_0x2f85c1=[];for(const _0x21eb1f of _0x90fb98){const _0x24b1e9=await computeFileHash(_0x21eb1f[_0x519d94(0x20d)]),_0x2d320b=_0x5d501f['functions'][_0x21eb1f[_0x519d94(0x20e)]];if(!_0x2d320b)_0x34be7f[_0x519d94(0x200)](_0x21eb1f[_0x519d94(0x20e)]);else _0x2d320b['hash']!==_0x24b1e9?_0x2cff14[_0x519d94(0x200)](_0x21eb1f[_0x519d94(0x20e)]):_0x2f85c1[_0x519d94(0x200)](_0x21eb1f[_0x519d94(0x20e)]);}const _0x183587=[];if(_0x24b9e1[_0x519d94(0x1f4)](_0x519d94(0x20b))){const _0x5b6769=loadAliasMap(_0x24b9e1[_0x519d94(0x203)],undefined,resolveApiFilePath(_0x24b9e1[_0x519d94(0x203)],_0x24b9e1['appCode'])),_0x1247a9=new Map(_0x5b6769[_0x519d94(0x1f5)](_0x189538=>[_0x189538[_0x519d94(0x1f7)],_0x189538['alias']])),[_0x265661,_0x52bcc6]=await Promise[_0x519d94(0x1f8)]([listBffScripts(_0x24b9e1['appCode']),getBffScriptStatistics(_0x24b9e1[_0x519d94(0x20c)])]),_0x56755e=createHookLocationMap(_0x52bcc6),_0x643627=new Set(_0x90fb98[_0x519d94(0x1f5)](_0x3f75c0=>_0x3f75c0['lockKey']));for(const _0x587095 of _0x265661){const _0x2585c7=resolveRemoteScriptTarget(_0x3e4429,_0x587095,_0x56755e,_0x5d501f[_0x519d94(0x212)],_0x1247a9);_0x2585c7&&!_0x643627['has'](_0x2585c7['lockKey'])&&_0x183587[_0x519d94(0x200)](_0x2585c7[_0x519d94(0x20e)]);}}const _0x12b488=_0x34be7f['length']===0x0&&_0x2cff14['length']===0x0&&_0x183587['length']===0x0;return{'ok':!![],'data':{'added':_0x34be7f,'modified':_0x2cff14,'unchanged':_0x2f85c1,'remoteOnly':_0x183587},'message':_0x12b488?_0x519d94(0x1fc):_0x34be7f[_0x519d94(0x1fb)]+_0x519d94(0x20a)+_0x2cff14['length']+_0x519d94(0x204)+_0x2f85c1[_0x519d94(0x1fb)]+_0x519d94(0x208)+(_0x183587['length']>0x0?',\x20'+_0x183587['length']+_0x519d94(0x1fe):'')};}};function a38_0x21ed(){const _0x3a42b4=['push','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','5600600CutsFN','apiDir','\x20modified,\x20','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','71184EiMQxq','135fFeOjM','\x20unchanged','48MkrrWo','\x20added,\x20','remote','appCode','filePath','lockKey','bff','483376pUIpNA','682445cniyBX','functions','907893lAetGv','24hPvSCG','bool','map','2885544wXDNym','datasetCode','all','read','status','length','All\x20BFF\x20scripts\x20are\x20in\x20sync.','boolean','\x20remote-only','2669748ffvcGd'];a38_0x21ed=function(){return _0x3a42b4;};return a38_0x21ed();}
1
+ const a38_0x185568=a38_0x48ee;(function(_0x5ab77a,_0x15d513){const _0x4d28a9=a38_0x48ee,_0x3bc38a=_0x5ab77a();while(!![]){try{const _0x41e28f=parseInt(_0x4d28a9(0xd2))/0x1*(parseInt(_0x4d28a9(0xc3))/0x2)+-parseInt(_0x4d28a9(0xc2))/0x3*(parseInt(_0x4d28a9(0xd1))/0x4)+parseInt(_0x4d28a9(0xce))/0x5+-parseInt(_0x4d28a9(0xd4))/0x6+-parseInt(_0x4d28a9(0xc7))/0x7+-parseInt(_0x4d28a9(0xcb))/0x8*(-parseInt(_0x4d28a9(0xcd))/0x9)+-parseInt(_0x4d28a9(0xd0))/0xa*(-parseInt(_0x4d28a9(0xd9))/0xb);if(_0x41e28f===_0x15d513)break;else _0x3bc38a['push'](_0x3bc38a['shift']());}catch(_0x37b92d){_0x3bc38a['push'](_0x3bc38a['shift']());}}}(a38_0x7e66,0x2392b));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a38_0x7e66(){const _0x56da14=['249884fDeJRO','142933aCsnwk','lockFilePath','723726XALomg','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','\x20added,\x20','read','length','393459YTWjdu','map','boolean','functions','status','push','apiDir','filePath','9MwHCUx','4FeJLXK','alias','hash','lockKey','33810uqCDcL','scriptsRoot','appCode','datasetCode','67680YhBYGB','\x20modified,\x20','9YDfION','463535IdCJPU','\x20unchanged','20yxbVQa'];a38_0x7e66=function(){return _0x56da14;};return a38_0x7e66();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a38_0x48ee(_0x120add,_0x29d048){_0x120add=_0x120add-0xc1;const _0x7e66c8=a38_0x7e66();let _0x48eeb0=_0x7e66c8[_0x120add];return _0x48eeb0;}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a38_0x185568(0xdd),'description':a38_0x185568(0xd5),'risk':a38_0x185568(0xd7),'flags':[{'name':'remote','type':a38_0x185568(0xdb),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x14629e){const _0x298bb3=a38_0x185568,_0x391067=loadBffProjectConfig(_0x14629e[_0x298bb3(0xc9)]),_0x142b26=await readBffLockFile(_0x391067[_0x298bb3(0xd3)]),{appLock:_0x5240e4}=ensureLockScope(_0x142b26??createEmptyBffLock(),_0x14629e[_0x298bb3(0xc9)],_0x391067[_0x298bb3(0xc8)],'status'),_0x20b5b0=await scanLocalBffFunctions(_0x391067),_0x4c8dff=[],_0x4dbe23=[],_0x10257a=[];for(const _0x210449 of _0x20b5b0){const _0x1b8680=await computeFileHash(_0x210449[_0x298bb3(0xc1)]),_0x1378ae=_0x5240e4[_0x298bb3(0xdc)][_0x210449['lockKey']];if(!_0x1378ae)_0x4c8dff[_0x298bb3(0xde)](_0x210449[_0x298bb3(0xc6)]);else _0x1378ae[_0x298bb3(0xc5)]!==_0x1b8680?_0x4dbe23[_0x298bb3(0xde)](_0x210449['lockKey']):_0x10257a[_0x298bb3(0xde)](_0x210449['lockKey']);}const _0x55da56=[];if(_0x14629e['bool']('remote')){const _0x16ef39=loadAliasMap(_0x14629e[_0x298bb3(0xdf)],undefined,resolveApiFilePath(_0x14629e['apiDir'],_0x14629e[_0x298bb3(0xc9)])),_0x541a7d=new Map(_0x16ef39[_0x298bb3(0xda)](_0x1d61b2=>[_0x1d61b2[_0x298bb3(0xca)],_0x1d61b2[_0x298bb3(0xc4)]])),[_0x5a710d,_0x4af2a3]=await Promise['all']([listBffScripts(_0x14629e[_0x298bb3(0xc9)]),getBffScriptStatistics(_0x14629e[_0x298bb3(0xc9)])]),_0x383760=createHookLocationMap(_0x4af2a3),_0x156dbd=new Set(_0x20b5b0[_0x298bb3(0xda)](_0x17b998=>_0x17b998[_0x298bb3(0xc6)]));for(const _0x2a7c24 of _0x5a710d){const _0x5c8734=resolveRemoteScriptTarget(_0x391067,_0x2a7c24,_0x383760,_0x5240e4[_0x298bb3(0xdc)],_0x541a7d);_0x5c8734&&!_0x156dbd['has'](_0x5c8734['lockKey'])&&_0x55da56[_0x298bb3(0xde)](_0x5c8734[_0x298bb3(0xc6)]);}}const _0x88ceba=_0x4c8dff['length']===0x0&&_0x4dbe23[_0x298bb3(0xd8)]===0x0&&_0x55da56[_0x298bb3(0xd8)]===0x0;return{'ok':!![],'data':{'added':_0x4c8dff,'modified':_0x4dbe23,'unchanged':_0x10257a,'remoteOnly':_0x55da56},'message':_0x88ceba?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x4c8dff[_0x298bb3(0xd8)]+_0x298bb3(0xd6)+_0x4dbe23[_0x298bb3(0xd8)]+_0x298bb3(0xcc)+_0x10257a[_0x298bb3(0xd8)]+_0x298bb3(0xcf)+(_0x55da56[_0x298bb3(0xd8)]>0x0?',\x20'+_0x55da56[_0x298bb3(0xd8)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- function a39_0x5253(){const _0x36f526=['1699695jDRUaO','nonInteractive','npx\x20skills\x20add\x20failed:\x20','CLI\x20Built-in\x20Skill\x20installed','write','177WPIIfe','161RulKUU','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','5052XYtKtO','apiError','../../skills/npx-skills-add.js','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','log','pipe','15977AVcYzh','install','info','5vBfyHa','11eOLIbk','7286SnAMmc','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','cli-skill-install','skipped','3858RYBlst','error','113788pwsFcd','8miZHiV','inherit','1998330xDvgqn','382468WAHelE','cwd'];a39_0x5253=function(){return _0x36f526;};return a39_0x5253();}function a39_0x2554(_0x6c7c4c,_0x41abc8){_0x6c7c4c=_0x6c7c4c-0x103;const _0x52535b=a39_0x5253();let _0x25549b=_0x52535b[_0x6c7c4c];return _0x25549b;}const a39_0x15890f=a39_0x2554;(function(_0x58dd81,_0x35ac1f){const _0x130752=a39_0x2554,_0x49a63c=_0x58dd81();while(!![]){try{const _0x46ec1a=-parseInt(_0x130752(0x112))/0x1+-parseInt(_0x130752(0x10c))/0x2*(-parseInt(_0x130752(0x11d))/0x3)+parseInt(_0x130752(0x116))/0x4*(-parseInt(_0x130752(0x10a))/0x5)+parseInt(_0x130752(0x110))/0x6*(-parseInt(_0x130752(0x11e))/0x7)+-parseInt(_0x130752(0x113))/0x8*(parseInt(_0x130752(0x118))/0x9)+parseInt(_0x130752(0x115))/0xa*(-parseInt(_0x130752(0x10b))/0xb)+-parseInt(_0x130752(0x120))/0xc*(-parseInt(_0x130752(0x107))/0xd);if(_0x46ec1a===_0x35ac1f)break;else _0x49a63c['push'](_0x49a63c['shift']());}catch(_0x688c3e){_0x49a63c['push'](_0x49a63c['shift']());}}}(a39_0x5253,0x1d2a8));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':'cli-skill','command':a39_0x15890f(0x108),'description':a39_0x15890f(0x104),'risk':a39_0x15890f(0x11c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x50e491){const _0x3ed437=a39_0x15890f;logger['setLogPath'](process[_0x3ed437(0x117)]()),logger[_0x3ed437(0x109)](_0x3ed437(0x10e),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x488321,RABETBASE_SKILL_SOURCE:_0x7a7559,runNpxSkillsAddGlobal:_0x14a1a5}=await import(_0x3ed437(0x103)),_0x573dd0=_0x50e491[_0x3ed437(0x119)]?_0x3ed437(0x106):_0x3ed437(0x114);console[_0x3ed437(0x105)](_0x3ed437(0x11f)+_0x488321+')...');const _0x1ad6f4=_0x14a1a5(process[_0x3ed437(0x117)](),_0x7a7559,{'stdio':_0x573dd0});if(_0x1ad6f4[_0x3ed437(0x10f)])console[_0x3ed437(0x105)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x1ad6f4['ok'])console[_0x3ed437(0x105)](_0x3ed437(0x11b));else throw CliErrors[_0x3ed437(0x121)](_0x3ed437(0x11a)+(_0x1ad6f4[_0x3ed437(0x111)]||'unknown'),_0x3ed437(0x10d)+_0x488321);}return{'ok':!![]};}}];
1
+ const a39_0xf906ed=a39_0x399c;(function(_0x358538,_0x413777){const _0x121813=a39_0x399c,_0x31a1b8=_0x358538();while(!![]){try{const _0x3cb686=-parseInt(_0x121813(0x1fe))/0x1*(-parseInt(_0x121813(0x1f6))/0x2)+parseInt(_0x121813(0x1f7))/0x3+-parseInt(_0x121813(0x207))/0x4*(-parseInt(_0x121813(0x1f5))/0x5)+-parseInt(_0x121813(0x209))/0x6*(-parseInt(_0x121813(0x20c))/0x7)+-parseInt(_0x121813(0x210))/0x8+-parseInt(_0x121813(0x201))/0x9+parseInt(_0x121813(0x20d))/0xa*(-parseInt(_0x121813(0x200))/0xb);if(_0x3cb686===_0x413777)break;else _0x31a1b8['push'](_0x31a1b8['shift']());}catch(_0x1c741b){_0x31a1b8['push'](_0x31a1b8['shift']());}}}(a39_0x2770,0x21428));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a39_0x399c(_0x47f535,_0x5cd642){_0x47f535=_0x47f535-0x1f3;const _0x277080=a39_0x2770();let _0x399c1c=_0x277080[_0x47f535];return _0x399c1c;}export const cliSkillDefinitions=[{'service':'cli-skill','command':a39_0xf906ed(0x206),'description':a39_0xf906ed(0x1fa),'risk':a39_0xf906ed(0x1f8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x216192){const _0xcf72d3=a39_0xf906ed;logger['setLogPath'](process[_0xcf72d3(0x1fb)]()),logger[_0xcf72d3(0x203)](_0xcf72d3(0x202),_0xcf72d3(0x1f4));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x4d38ac,RABETBASE_SKILL_SOURCE:_0x34337f,runNpxSkillsAddGlobal:_0x49da04}=await import(_0xcf72d3(0x208)),_0x134e68=_0x216192[_0xcf72d3(0x1fd)]?'pipe':_0xcf72d3(0x1f9);console[_0xcf72d3(0x20e)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('+_0x4d38ac+_0xcf72d3(0x20f));const _0x3ca0ec=_0x49da04(process[_0xcf72d3(0x1fb)](),_0x34337f,{'stdio':_0x134e68});if(_0x3ca0ec[_0xcf72d3(0x1ff)])console[_0xcf72d3(0x20e)](_0xcf72d3(0x204));else{if(_0x3ca0ec['ok'])console['log'](_0xcf72d3(0x20b));else throw CliErrors[_0xcf72d3(0x1f3)](_0xcf72d3(0x20a)+(_0x3ca0ec['error']||_0xcf72d3(0x1fc)),_0xcf72d3(0x205)+_0x4d38ac);}return{'ok':!![]};}}];function a39_0x2770(){const _0x4edffb=['Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','5nOFbTH','14242ztodlc','334821KKuCzb','write','inherit','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','cwd','unknown','nonInteractive','23JwWTMO','skipped','1496627uzzJTM','893988ZcykLM','cli-skill-install','info','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','install','495476qMhVXb','../../skills/npx-skills-add.js','11970kfsUQE','npx\x20skills\x20add\x20failed:\x20','CLI\x20Built-in\x20Skill\x20installed','609yfpLYm','20XvVDhM','log',')...','521168xOTztT','apiError'];a39_0x2770=function(){return _0x4edffb;};return a39_0x2770();}
@@ -1 +1 @@
1
- const a40_0x1c4dc5=a40_0x5b27;(function(_0x2809fc,_0x1a11c3){const _0x5749cf=a40_0x5b27,_0x346314=_0x2809fc();while(!![]){try{const _0x1a0eb3=-parseInt(_0x5749cf(0x102))/0x1*(parseInt(_0x5749cf(0x135))/0x2)+-parseInt(_0x5749cf(0x122))/0x3+parseInt(_0x5749cf(0x12d))/0x4+-parseInt(_0x5749cf(0x145))/0x5+parseInt(_0x5749cf(0x12a))/0x6*(-parseInt(_0x5749cf(0x127))/0x7)+-parseInt(_0x5749cf(0x119))/0x8*(-parseInt(_0x5749cf(0x113))/0x9)+-parseInt(_0x5749cf(0x11c))/0xa*(-parseInt(_0x5749cf(0x12b))/0xb);if(_0x1a0eb3===_0x1a11c3)break;else _0x346314['push'](_0x346314['shift']());}catch(_0x5b2785){_0x346314['push'](_0x346314['shift']());}}}(a40_0x2ba6,0x79a2f));import a40_0x58e928 from'chalk';import a40_0x3586a4 from'ora';import a40_0x110399 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';function a40_0x5b27(_0x2cf8f7,_0x427389){_0x2cf8f7=_0x2cf8f7-0xfc;const _0x2ba617=a40_0x2ba6();let _0x5b279a=_0x2ba617[_0x2cf8f7];return _0x5b279a;}import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x19956b=a40_0x5b27;return GIT_COMMIT!==_0x19956b(0x11a)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3ed59f=a40_0x5b27,_0x5e6106=process[_0x3ed59f(0x133)][_0x3ed59f(0x100)]();if(_0x5e6106[_0x3ed59f(0x144)]('bun'))return _0x3ed59f(0x128);return _0x3ed59f(0x123);}const updateFlags=[{'name':a40_0x1c4dc5(0x105),'type':a40_0x1c4dc5(0x12f),'description':a40_0x1c4dc5(0x106),'default':![]},{'name':a40_0x1c4dc5(0x114),'type':a40_0x1c4dc5(0x126),'description':a40_0x1c4dc5(0x134)},{'name':'no-skills','type':a40_0x1c4dc5(0x12f),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0x1c4dc5(0x139),'type':'boolean','description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x41653e){const _0x54417d=a40_0x1c4dc5;return _0x41653e[_0x54417d(0x10a)](_0x54417d(0x114))['trim']();}function shouldSkipCliSkill(_0x531f13){const _0x1a71ff=a40_0x1c4dc5;return _0x531f13[_0x1a71ff(0x116)](_0x1a71ff(0x13e))||_0x531f13[_0x1a71ff(0x115)](_0x1a71ff(0x139))===![];}async function validateUpdateFlags(_0x4f9b4b){const _0x38bdd9=a40_0x1c4dc5,_0x54369b=_0x4f9b4b['bool'](_0x38bdd9(0x105)),_0xe91588=getRequestedVersion(_0x4f9b4b);if(_0x54369b&&_0xe91588)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x38bdd9(0x111));if(_0xe91588&&!a40_0x110399['valid'](_0xe91588))throw CliErrors['validation'](_0x38bdd9(0x140)+_0xe91588,_0x38bdd9(0x143));}async function fetchNpmDistTags(){const _0x453e3d=a40_0x1c4dc5;try{const _0x417a50=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x453e3d(0x101),{'signal':AbortSignal[_0x453e3d(0x14b)](0x2710)});if(!_0x417a50['ok'])return null;const _0x19e249=await _0x417a50['json']();if(!_0x19e249||typeof _0x19e249!==_0x453e3d(0x109))return null;return Object['fromEntries'](Object[_0x453e3d(0x11f)](_0x19e249)['filter'](([,_0x115983])=>typeof _0x115983===_0x453e3d(0x126)&&_0x115983[_0x453e3d(0x138)]()[_0x453e3d(0x137)]>0x0)[_0x453e3d(0x146)](([_0x13f539,_0x4c5ac5])=>[_0x13f539,String(_0x4c5ac5)[_0x453e3d(0x138)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4325c2){const _0x4912f7=await fetchNpmDistTags();return _0x4912f7?.[_0x4325c2]??null;}async function fetchLatestVersion(){const _0x2a0964=a40_0x1c4dc5;return fetchNpmDistTagVersion(_0x2a0964(0x104));}async function resolveTargetVersion(_0xa76fc7){const _0x3d108a=a40_0x1c4dc5,_0x4ebaa6=getRequestedVersion(_0xa76fc7);if(_0x4ebaa6)return{'version':_0x4ebaa6,'source':_0x3d108a(0x114)};if(_0xa76fc7[_0x3d108a(0x116)]('beta')){const _0x45d2f1=await fetchNpmDistTagVersion(_0x3d108a(0x105));if(!_0x45d2f1)return null;return{'version':_0x45d2f1,'source':'beta'};}const _0x10727b=await fetchLatestVersion();if(!_0x10727b)return null;return{'version':_0x10727b,'source':_0x3d108a(0x104)};}function a40_0x2ba6(){const _0x5e569f=['nonInteractive','no-skills','log','Invalid\x20version:\x20','start','red','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','includes','3420965QybUCF','map','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','green','gray','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','timeout','Checking\x20for\x20updates...','@latest','Update\x20failed','message','toLowerCase','/dist-tags','887jfRPRr','\x20install\x20-g\x20','latest','beta','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','yellow','warn','object','str','Current\x20version:\x20','Updated\x20to\x20v','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','run','update','Already\x20up\x20to\x20date\x20(v','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','702AmVRmG','version','flag','bool','source','cwd','8256eLOvCd','unknown','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','10ncuBtH','Checking\x20CLI\x20Built-in\x20Skill...','fail','entries','...','\x20\x20Run\x20manually:\x20','137010QAQtid','npm','pipe','valid','string','123095cOUPRt','bun','inherit','138tWiXEK','12532707iWUNpC','skipped','1856616BRsuXg','Beta\x20version:\x20','boolean','write','succeed','Already\x20on\x20requested\x20version\x20(v','execPath','Install\x20a\x20specific\x20CLI\x20version','116TodinX','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','length','trim','skills','Version\x20comparison\x20failed','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','info'];a40_0x2ba6=function(){return _0x5e569f;};return a40_0x2ba6();}function shouldInstallTarget(_0x466d00,_0x29498f){const _0x30be9c=a40_0x1c4dc5;if(_0x29498f['source']===_0x30be9c(0x114)||_0x29498f[_0x30be9c(0x117)]==='beta')return!a40_0x110399['eq'](_0x466d00,_0x29498f[_0x30be9c(0x114)]);return a40_0x110399['lt'](_0x466d00,_0x29498f[_0x30be9c(0x114)]);}function getInstallPlanLabel(_0x2c9c42,_0xc5eb5b){const _0xf2dc61=a40_0x1c4dc5;switch(_0xc5eb5b[_0xf2dc61(0x117)]){case _0xf2dc61(0x105):return _0xf2dc61(0x12e)+a40_0x58e928[_0xf2dc61(0x107)](_0x2c9c42)+'\x20→\x20'+a40_0x58e928['green'](_0xc5eb5b['version']);case _0xf2dc61(0x114):return'Requested\x20version:\x20'+a40_0x58e928['yellow'](_0x2c9c42)+'\x20→\x20'+a40_0x58e928[_0xf2dc61(0x148)](_0xc5eb5b['version']);case _0xf2dc61(0x104):default:return'Update\x20available:\x20'+a40_0x58e928[_0xf2dc61(0x107)](_0x2c9c42)+'\x20→\x20'+a40_0x58e928[_0xf2dc61(0x148)](_0xc5eb5b['version']);}}async function installCliSkill(_0x5d5bb7){const _0x5d84d1=a40_0x1c4dc5;console['log'](a40_0x58e928[_0x5d84d1(0x149)](_0x5d84d1(0x11d)));const _0x46db09=runNpxSkillsAddGlobal(process[_0x5d84d1(0x118)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5d5bb7?_0x5d84d1(0x124):_0x5d84d1(0x129)});if(_0x46db09[_0x5d84d1(0x12c)]){console[_0x5d84d1(0x13f)](a40_0x58e928[_0x5d84d1(0x149)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x46db09['ok']){console['log'](a40_0x58e928['gray'](_0x5d84d1(0x13b)));return;}console[_0x5d84d1(0x108)](a40_0x58e928[_0x5d84d1(0x107)](_0x5d84d1(0x147)+(_0x46db09['error']||_0x5d84d1(0x11a)))),console[_0x5d84d1(0x13f)](a40_0x58e928[_0x5d84d1(0x149)](_0x5d84d1(0x121)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x59ce77){const _0x2f799a=a40_0x1c4dc5;await validateUpdateFlags(_0x59ce77);const _0x16c60c=getCurrentVersion();console[_0x2f799a(0x13f)](_0x2f799a(0x10b)+_0x16c60c);const _0x46cada=a40_0x3586a4(_0x2f799a(0xfc))[_0x2f799a(0x141)](),_0x1acca9=await resolveTargetVersion(_0x59ce77);if(!_0x1acca9){const _0x9cd52e=_0x59ce77['bool']('beta')?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x2f799a(0x11b);return _0x46cada[_0x2f799a(0x11e)](_0x9cd52e),console[_0x2f799a(0x13f)](a40_0x58e928[_0x2f799a(0x149)](_0x2f799a(0x14a)+NPM_PACKAGE_NAME+_0x2f799a(0xfd))),{'ok':![],'message':_0x9cd52e};}const _0x1b6898=a40_0x110399[_0x2f799a(0x125)](VERSION),_0x25d061=a40_0x110399[_0x2f799a(0x125)](_0x1acca9[_0x2f799a(0x114)]);if(!_0x1b6898||!_0x25d061)return _0x46cada[_0x2f799a(0x11e)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x2f799a(0x13a)};if(!shouldInstallTarget(_0x1b6898,_0x1acca9)){const _0x46132b=_0x1acca9[_0x2f799a(0x117)]===_0x2f799a(0x114)?_0x2f799a(0x132)+_0x1acca9[_0x2f799a(0x114)]+')':_0x2f799a(0x110)+_0x1acca9[_0x2f799a(0x114)]+')';return _0x46cada[_0x2f799a(0x131)](_0x46132b),shouldSkipCliSkill(_0x59ce77)?console[_0x2f799a(0x13f)](a40_0x58e928['gray'](_0x2f799a(0x10d))):await installCliSkill(_0x59ce77['nonInteractive']),{'ok':!![]};}_0x46cada[_0x2f799a(0x13c)](getInstallPlanLabel(_0x16c60c,_0x1acca9));const _0xa6fc53=detectPackageManager(),_0xb2f371=_0xa6fc53===_0x2f799a(0x123)?resolveNpmBin(_0x2f799a(0x123)):_0xa6fc53,_0x54c056=a40_0x3586a4('Updating\x20via\x20'+_0xa6fc53+_0x2f799a(0x120))[_0x2f799a(0x141)]();try{return await execa(_0xb2f371,['install','-g',NPM_PACKAGE_NAME+'@'+_0x1acca9[_0x2f799a(0x114)]],{'stdio':_0x2f799a(0x124)}),_0x54c056[_0x2f799a(0x131)](_0x2f799a(0x10c)+_0x1acca9[_0x2f799a(0x114)]),console[_0x2f799a(0x13f)](a40_0x58e928[_0x2f799a(0x149)](_0x2f799a(0x136))),shouldSkipCliSkill(_0x59ce77)?console[_0x2f799a(0x13f)](a40_0x58e928[_0x2f799a(0x149)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x59ce77[_0x2f799a(0x13d)]),{'ok':!![]};}catch(_0x5004ac){return _0x54c056['fail'](_0x2f799a(0xfe)),console['error'](a40_0x58e928[_0x2f799a(0x142)]('\x20\x20'+_0x5004ac[_0x2f799a(0xff)])),console[_0x2f799a(0x13f)](a40_0x58e928[_0x2f799a(0x149)]('\x20\x20Try\x20manually:\x20'+_0xa6fc53+_0x2f799a(0x103)+NPM_PACKAGE_NAME+'@'+_0x1acca9[_0x2f799a(0x114)])),{'ok':![],'message':_0x5004ac[_0x2f799a(0xff)]};}}export const updateDefinition={'service':a40_0x1c4dc5(0x10f),'command':a40_0x1c4dc5(0x10e),'description':a40_0x1c4dc5(0x112),'risk':a40_0x1c4dc5(0x130),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0x312b49=a40_0x427f;(function(_0x30f584,_0xa26007){const _0x36f5f2=a40_0x427f,_0x1f8d4a=_0x30f584();while(!![]){try{const _0x40c7c2=-parseInt(_0x36f5f2(0x1c7))/0x1+parseInt(_0x36f5f2(0x1c8))/0x2*(-parseInt(_0x36f5f2(0x1ad))/0x3)+-parseInt(_0x36f5f2(0x1dc))/0x4+-parseInt(_0x36f5f2(0x19d))/0x5*(-parseInt(_0x36f5f2(0x19a))/0x6)+-parseInt(_0x36f5f2(0x1d6))/0x7+parseInt(_0x36f5f2(0x1a4))/0x8*(-parseInt(_0x36f5f2(0x1a9))/0x9)+parseInt(_0x36f5f2(0x1a2))/0xa;if(_0x40c7c2===_0xa26007)break;else _0x1f8d4a['push'](_0x1f8d4a['shift']());}catch(_0x12aa22){_0x1f8d4a['push'](_0x1f8d4a['shift']());}}}(a40_0x40cf,0x66e81));import a40_0x5b2989 from'chalk';import a40_0x222ec7 from'ora';function a40_0x427f(_0x5a32fa,_0x4c1cb2){_0x5a32fa=_0x5a32fa-0x19a;const _0x40cf7a=a40_0x40cf();let _0x427f65=_0x40cf7a[_0x5a32fa];return _0x427f65;}import a40_0x4a26fa 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 _0x1f7d61=a40_0x427f;return GIT_COMMIT!==_0x1f7d61(0x1db)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x1f7d61(0x1cc)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3e7ee5=a40_0x427f,_0x46242e=process[_0x3e7ee5(0x1a1)][_0x3e7ee5(0x19e)]();if(_0x46242e['includes'](_0x3e7ee5(0x1e3)))return _0x3e7ee5(0x1e3);return _0x3e7ee5(0x1aa);}const updateFlags=[{'name':a40_0x312b49(0x1b7),'type':'boolean','description':a40_0x312b49(0x19b),'default':![]},{'name':a40_0x312b49(0x1d3),'type':a40_0x312b49(0x1b8),'description':a40_0x312b49(0x1ca)},{'name':a40_0x312b49(0x1a6),'type':'boolean','description':a40_0x312b49(0x1a5),'default':![]},{'name':a40_0x312b49(0x1cf),'type':a40_0x312b49(0x1d1),'description':a40_0x312b49(0x1b0),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x27d0ea){const _0x23c27a=a40_0x312b49;return _0x27d0ea['str'](_0x23c27a(0x1d3))[_0x23c27a(0x1df)]();}function shouldSkipCliSkill(_0x29334c){const _0x4ec2e2=a40_0x312b49;return _0x29334c['bool'](_0x4ec2e2(0x1a6))||_0x29334c[_0x4ec2e2(0x1b2)](_0x4ec2e2(0x1cf))===![];}async function validateUpdateFlags(_0x469329){const _0x1dba05=a40_0x312b49,_0x3e3d52=_0x469329[_0x1dba05(0x1b3)](_0x1dba05(0x1b7)),_0xf2a2ef=getRequestedVersion(_0x469329);if(_0x3e3d52&&_0xf2a2ef)throw CliErrors['validation'](_0x1dba05(0x1b6),_0x1dba05(0x1dd));if(_0xf2a2ef&&!a40_0x4a26fa['valid'](_0xf2a2ef))throw CliErrors[_0x1dba05(0x19f)]('Invalid\x20version:\x20'+_0xf2a2ef,_0x1dba05(0x1b4));}async function fetchNpmDistTags(){const _0x27e902=a40_0x312b49;try{const _0x2275f5=await fetch(_0x27e902(0x1be)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x27e902(0x1af)](0x2710)});if(!_0x2275f5['ok'])return null;const _0x25b70a=await _0x2275f5['json']();if(!_0x25b70a||typeof _0x25b70a!=='object')return null;return Object['fromEntries'](Object[_0x27e902(0x1e4)](_0x25b70a)[_0x27e902(0x1b1)](([,_0x3b4ac7])=>typeof _0x3b4ac7==='string'&&_0x3b4ac7[_0x27e902(0x1df)]()['length']>0x0)['map'](([_0xfe3681,_0x296333])=>[_0xfe3681,String(_0x296333)[_0x27e902(0x1df)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x6410b5){const _0x12463d=await fetchNpmDistTags();return _0x12463d?.[_0x6410b5]??null;}function a40_0x40cf(){const _0x581e66=['Update\x20failed','latest','update','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Requested\x20version:\x20','Checking\x20CLI\x20Built-in\x20Skill...','743236mClHzN','302YLWMGI','Update\x20available:\x20','Install\x20a\x20specific\x20CLI\x20version','skipped','slice','succeed','message','skills','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','boolean','\x20install\x20-g\x20','version','nonInteractive','warn','1372364zFJSBP','source','@latest','Version\x20comparison\x20failed','\x20\x20Try\x20manually:\x20','unknown','1950420pfoUgh','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Already\x20on\x20requested\x20version\x20(v','trim','valid','Beta\x20version:\x20','inherit','bun','entries','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Updated\x20to\x20v','174vaoUNR','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','gray','71015WGfyNT','toLowerCase','validation','yellow','execPath','22038340fOJGRt','...','8zbSPvj','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','no-skills','start','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','6456078zLxPUb','npm','install','info','993mSgXzq','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','timeout','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','filter','flag','bool','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','green','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','beta','string','\x20\x20Run\x20manually:\x20','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','fail','log','\x20→\x20','https://registry.npmjs.org/-/package/','error','run'];a40_0x40cf=function(){return _0x581e66;};return a40_0x40cf();}async function fetchLatestVersion(){const _0x30bdbc=a40_0x312b49;return fetchNpmDistTagVersion(_0x30bdbc(0x1c2));}async function resolveTargetVersion(_0x2a654a){const _0x357388=a40_0x312b49,_0x1b5d94=getRequestedVersion(_0x2a654a);if(_0x1b5d94)return{'version':_0x1b5d94,'source':_0x357388(0x1d3)};if(_0x2a654a[_0x357388(0x1b3)](_0x357388(0x1b7))){const _0x322cc7=await fetchNpmDistTagVersion(_0x357388(0x1b7));if(!_0x322cc7)return null;return{'version':_0x322cc7,'source':'beta'};}const _0x3ddf83=await fetchLatestVersion();if(!_0x3ddf83)return null;return{'version':_0x3ddf83,'source':_0x357388(0x1c2)};}function shouldInstallTarget(_0x21ab38,_0x2ec19e){const _0xb15392=a40_0x312b49;if(_0x2ec19e[_0xb15392(0x1d7)]===_0xb15392(0x1d3)||_0x2ec19e[_0xb15392(0x1d7)]===_0xb15392(0x1b7))return!a40_0x4a26fa['eq'](_0x21ab38,_0x2ec19e[_0xb15392(0x1d3)]);return a40_0x4a26fa['lt'](_0x21ab38,_0x2ec19e[_0xb15392(0x1d3)]);}function getInstallPlanLabel(_0x1a9021,_0x461e07){const _0xa20e42=a40_0x312b49;switch(_0x461e07['source']){case _0xa20e42(0x1b7):return _0xa20e42(0x1e1)+a40_0x5b2989[_0xa20e42(0x1a0)](_0x1a9021)+_0xa20e42(0x1bd)+a40_0x5b2989['green'](_0x461e07[_0xa20e42(0x1d3)]);case'version':return _0xa20e42(0x1c5)+a40_0x5b2989[_0xa20e42(0x1a0)](_0x1a9021)+_0xa20e42(0x1bd)+a40_0x5b2989[_0xa20e42(0x1b5)](_0x461e07['version']);case _0xa20e42(0x1c2):default:return _0xa20e42(0x1c9)+a40_0x5b2989[_0xa20e42(0x1a0)](_0x1a9021)+_0xa20e42(0x1bd)+a40_0x5b2989[_0xa20e42(0x1b5)](_0x461e07[_0xa20e42(0x1d3)]);}}async function installCliSkill(_0x11b742){const _0x441d40=a40_0x312b49;console[_0x441d40(0x1bc)](a40_0x5b2989[_0x441d40(0x19c)](_0x441d40(0x1c6)));const _0x267faf=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x11b742?'pipe':_0x441d40(0x1e2)});if(_0x267faf[_0x441d40(0x1cb)]){console[_0x441d40(0x1bc)](a40_0x5b2989[_0x441d40(0x19c)](_0x441d40(0x1ba)));return;}if(_0x267faf['ok']){console[_0x441d40(0x1bc)](a40_0x5b2989[_0x441d40(0x19c)](_0x441d40(0x1ae)));return;}console[_0x441d40(0x1d5)](a40_0x5b2989['yellow']('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x267faf['error']||_0x441d40(0x1db)))),console[_0x441d40(0x1bc)](a40_0x5b2989[_0x441d40(0x19c)](_0x441d40(0x1b9)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x17a2f7){const _0x11af89=a40_0x312b49;await validateUpdateFlags(_0x17a2f7);const _0xa40dae=getCurrentVersion();console[_0x11af89(0x1bc)]('Current\x20version:\x20'+_0xa40dae);const _0x58aa91=a40_0x222ec7('Checking\x20for\x20updates...')[_0x11af89(0x1a7)](),_0x47ea29=await resolveTargetVersion(_0x17a2f7);if(!_0x47ea29){const _0x26a77e=_0x17a2f7['bool']('beta')?_0x11af89(0x1c4):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x58aa91[_0x11af89(0x1bb)](_0x26a77e),console[_0x11af89(0x1bc)](a40_0x5b2989['gray'](_0x11af89(0x1d0)+NPM_PACKAGE_NAME+_0x11af89(0x1d8))),{'ok':![],'message':_0x26a77e};}const _0x10fe2f=a40_0x4a26fa[_0x11af89(0x1e0)](VERSION),_0x5a754c=a40_0x4a26fa[_0x11af89(0x1e0)](_0x47ea29[_0x11af89(0x1d3)]);if(!_0x10fe2f||!_0x5a754c)return _0x58aa91[_0x11af89(0x1bb)](_0x11af89(0x1d9)),{'ok':![],'message':_0x11af89(0x1d9)};if(!shouldInstallTarget(_0x10fe2f,_0x47ea29)){const _0x22bd49=_0x47ea29[_0x11af89(0x1d7)]===_0x11af89(0x1d3)?_0x11af89(0x1de)+_0x47ea29['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x47ea29['version']+')';return _0x58aa91['succeed'](_0x22bd49),shouldSkipCliSkill(_0x17a2f7)?console[_0x11af89(0x1bc)](a40_0x5b2989['gray'](_0x11af89(0x1e5))):await installCliSkill(_0x17a2f7[_0x11af89(0x1d4)]),{'ok':!![]};}_0x58aa91[_0x11af89(0x1ac)](getInstallPlanLabel(_0xa40dae,_0x47ea29));const _0x110910=detectPackageManager(),_0x45a6d4=_0x110910==='npm'?resolveNpmBin(_0x11af89(0x1aa)):_0x110910,_0x14e048=a40_0x222ec7('Updating\x20via\x20'+_0x110910+_0x11af89(0x1a3))[_0x11af89(0x1a7)]();try{return await execa(_0x45a6d4,[_0x11af89(0x1ab),'-g',NPM_PACKAGE_NAME+'@'+_0x47ea29['version']],{'stdio':'pipe'}),_0x14e048[_0x11af89(0x1cd)](_0x11af89(0x1e6)+_0x47ea29[_0x11af89(0x1d3)]),console[_0x11af89(0x1bc)](a40_0x5b2989[_0x11af89(0x19c)](_0x11af89(0x1a8))),shouldSkipCliSkill(_0x17a2f7)?console[_0x11af89(0x1bc)](a40_0x5b2989[_0x11af89(0x19c)](_0x11af89(0x1e5))):await installCliSkill(_0x17a2f7[_0x11af89(0x1d4)]),{'ok':!![]};}catch(_0x1d032d){return _0x14e048['fail'](_0x11af89(0x1c1)),console[_0x11af89(0x1bf)](a40_0x5b2989['red']('\x20\x20'+_0x1d032d[_0x11af89(0x1ce)])),console['log'](a40_0x5b2989[_0x11af89(0x19c)](_0x11af89(0x1da)+_0x110910+_0x11af89(0x1d2)+NPM_PACKAGE_NAME+'@'+_0x47ea29[_0x11af89(0x1d3)])),{'ok':![],'message':_0x1d032d[_0x11af89(0x1ce)]};}}export const updateDefinition={'service':a40_0x312b49(0x1c3),'command':a40_0x312b49(0x1c0),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x28b750,_0x5e0231){const _0x4f5dc7=a41_0x5de3,_0x510567=_0x28b750();while(!![]){try{const _0x1ee014=-parseInt(_0x4f5dc7(0x11b))/0x1*(-parseInt(_0x4f5dc7(0x11c))/0x2)+parseInt(_0x4f5dc7(0x117))/0x3+parseInt(_0x4f5dc7(0x120))/0x4*(-parseInt(_0x4f5dc7(0x11f))/0x5)+-parseInt(_0x4f5dc7(0x11e))/0x6*(-parseInt(_0x4f5dc7(0x11d))/0x7)+parseInt(_0x4f5dc7(0x118))/0x8+parseInt(_0x4f5dc7(0x116))/0x9+parseInt(_0x4f5dc7(0x119))/0xa*(-parseInt(_0x4f5dc7(0x11a))/0xb);if(_0x1ee014===_0x5e0231)break;else _0x510567['push'](_0x510567['shift']());}catch(_0x285182){_0x510567['push'](_0x510567['shift']());}}}(a41_0x28de,0x96a68));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x5de3(_0x22412a,_0x53abdd){_0x22412a=_0x22412a-0x116;const _0x28dea7=a41_0x28de();let _0x5de3db=_0x28dea7[_0x22412a];return _0x5de3db;}function a41_0x28de(){const _0x42dffe=['1060KQmprf','300003dZgiMd','169DAaadL','14102jLLSSv','55811EAYHmv','570QlmjrS','4219835ZdCarG','4cHshvp','9822051DmJzeE','2907036gFNjmw','2740512msXmGc'];a41_0x28de=function(){return _0x42dffe;};return a41_0x28de();}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a41_0x3f6e(_0xc40281,_0x3a2052){_0xc40281=_0xc40281-0x100;const _0x3507fd=a41_0x3507();let _0x3f6eea=_0x3507fd[_0xc40281];return _0x3f6eea;}(function(_0x56f13c,_0x55dc95){const _0x3adcb8=a41_0x3f6e,_0x50fd62=_0x56f13c();while(!![]){try{const _0x593702=parseInt(_0x3adcb8(0x107))/0x1*(parseInt(_0x3adcb8(0x105))/0x2)+-parseInt(_0x3adcb8(0x101))/0x3+-parseInt(_0x3adcb8(0x108))/0x4*(-parseInt(_0x3adcb8(0x100))/0x5)+-parseInt(_0x3adcb8(0x103))/0x6+parseInt(_0x3adcb8(0x104))/0x7+-parseInt(_0x3adcb8(0x106))/0x8*(parseInt(_0x3adcb8(0x109))/0x9)+parseInt(_0x3adcb8(0x102))/0xa;if(_0x593702===_0x55dc95)break;else _0x50fd62['push'](_0x50fd62['shift']());}catch(_0x2e1487){_0x50fd62['push'](_0x50fd62['shift']());}}}(a41_0x3507,0x9fdfe));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x3507(){const _0x1304a2=['3212964uAYwVo','8207400hgnVam','2070066uCQwpo','5113591bgmRXr','30essnlJ','561832LDnOXA','6121VVcluE','944924uROkiQ','36DErqIG','15vMkZpT'];a41_0x3507=function(){return _0x1304a2;};return a41_0x3507();}
@@ -1 +1 @@
1
- const a42_0x12927b=a42_0x531e;(function(_0x48ed66,_0x2c13e1){const _0xf1ffc3=a42_0x531e,_0x1fdc2c=_0x48ed66();while(!![]){try{const _0x4e04e9=parseInt(_0xf1ffc3(0xc6))/0x1+parseInt(_0xf1ffc3(0xcb))/0x2*(-parseInt(_0xf1ffc3(0xc2))/0x3)+parseInt(_0xf1ffc3(0xce))/0x4+parseInt(_0xf1ffc3(0xcd))/0x5*(-parseInt(_0xf1ffc3(0xc9))/0x6)+-parseInt(_0xf1ffc3(0xd3))/0x7*(parseInt(_0xf1ffc3(0xcf))/0x8)+parseInt(_0xf1ffc3(0xc7))/0x9*(-parseInt(_0xf1ffc3(0xcc))/0xa)+-parseInt(_0xf1ffc3(0xd1))/0xb*(-parseInt(_0xf1ffc3(0xc3))/0xc);if(_0x4e04e9===_0x2c13e1)break;else _0x1fdc2c['push'](_0x1fdc2c['shift']());}catch(_0x3e6819){_0x1fdc2c['push'](_0x1fdc2c['shift']());}}}(a42_0x5d5c,0xc6dc8));function a42_0x5d5c(){const _0x3d8aac=['Omit\x20import\x20statements\x20from\x20generated\x20code','boolean','read','code','608457iEmtnQ','12rLHyIt','operation','bool','1430588TrFAbP','1865007yjTOpE','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','188112vwBerr','alias','6lDVVtq','30jzLdIY','145RPlmwB','3381880zpfVZR','274160OARRon','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','10848662eIBQOz','skip-imports','63OTXFjo','str','name','string','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','codegen'];a42_0x5d5c=function(){return _0x3d8aac;};return a42_0x5d5c();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x531e(_0x4c33bc,_0x5a0322){_0x4c33bc=_0x4c33bc-0xbe;const _0x5d5c90=a42_0x5d5c();let _0x531e07=_0x5d5c90[_0x4c33bc];return _0x531e07;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x12927b(0xd8),'command':'sdk','description':a42_0x12927b(0xd0),'risk':a42_0x12927b(0xc0),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x12927b(0xca),'type':a42_0x12927b(0xd6),'description':a42_0x12927b(0xc8)},{'name':a42_0x12927b(0xc4),'type':'string','required':!![],'description':a42_0x12927b(0xd7)},{'name':a42_0x12927b(0xd2),'type':a42_0x12927b(0xbf),'description':a42_0x12927b(0xbe)}],async 'execute'(_0x3d9511){const _0x4c0142=a42_0x12927b,{dataset:_0x11dab2,operation:_0x467df6}=await getOperationDetail(_0x3d9511['appCode'],_0x3d9511[_0x4c0142(0xd4)]('code'),_0x3d9511[_0x4c0142(0xd4)]('operation')),_0x414c72=generateSdkCode(_0x11dab2,_0x467df6,{'includeImports':!_0x3d9511[_0x4c0142(0xc5)](_0x4c0142(0xd2))});return{'ok':!![],'data':{'dataset':{'name':_0x11dab2[_0x4c0142(0xd5)],'code':_0x11dab2[_0x4c0142(0xc1)],'tableName':_0x11dab2['tableName']},'operation':_0x3d9511[_0x4c0142(0xd4)](_0x4c0142(0xc4)),'code':_0x414c72}};}};
1
+ const a42_0x296ea6=a42_0x3842;(function(_0x595d85,_0x20e59e){const _0x6672e6=a42_0x3842,_0x3e1f1d=_0x595d85();while(!![]){try{const _0x30d0bc=-parseInt(_0x6672e6(0x131))/0x1*(-parseInt(_0x6672e6(0x132))/0x2)+-parseInt(_0x6672e6(0x12d))/0x3*(-parseInt(_0x6672e6(0x12c))/0x4)+parseInt(_0x6672e6(0x139))/0x5*(-parseInt(_0x6672e6(0x138))/0x6)+parseInt(_0x6672e6(0x122))/0x7+-parseInt(_0x6672e6(0x127))/0x8+-parseInt(_0x6672e6(0x121))/0x9*(-parseInt(_0x6672e6(0x128))/0xa)+parseInt(_0x6672e6(0x129))/0xb*(-parseInt(_0x6672e6(0x12e))/0xc);if(_0x30d0bc===_0x20e59e)break;else _0x3e1f1d['push'](_0x3e1f1d['shift']());}catch(_0x4a6b09){_0x3e1f1d['push'](_0x3e1f1d['shift']());}}}(a42_0x2e6c,0x6504b));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x296ea6(0x134),'command':a42_0x296ea6(0x12b),'description':a42_0x296ea6(0x125),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x296ea6(0x130),'type':a42_0x296ea6(0x120),'description':a42_0x296ea6(0x126)},{'name':a42_0x296ea6(0x124),'type':a42_0x296ea6(0x120),'required':!![],'description':a42_0x296ea6(0x11f)},{'name':a42_0x296ea6(0x136),'type':a42_0x296ea6(0x123),'description':a42_0x296ea6(0x12a)}],async 'execute'(_0x2ed41e){const _0x4a6d3e=a42_0x296ea6,{dataset:_0x1c315e,operation:_0x8d9e77}=await getOperationDetail(_0x2ed41e['appCode'],_0x2ed41e[_0x4a6d3e(0x137)]('code'),_0x2ed41e[_0x4a6d3e(0x137)](_0x4a6d3e(0x124))),_0x3cd1b8=generateSdkCode(_0x1c315e,_0x8d9e77,{'includeImports':!_0x2ed41e[_0x4a6d3e(0x135)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x1c315e[_0x4a6d3e(0x12f)],'code':_0x1c315e['code'],'tableName':_0x1c315e[_0x4a6d3e(0x133)]},'operation':_0x2ed41e['str'](_0x4a6d3e(0x124)),'code':_0x3cd1b8}};}};function a42_0x3842(_0x1652b7,_0x2fabc4){_0x1652b7=_0x1652b7-0x11f;const _0x2e6ce6=a42_0x2e6c();let _0x384225=_0x2e6ce6[_0x1652b7];return _0x384225;}function a42_0x2e6c(){const _0xc9da3c=['boolean','operation','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','3173568KLRZzU','6380WiUfgG','11PAohiT','Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','56mpBJmu','141285JMHyJH','9281544EMRcKh','name','alias','130189IYUnCi','12xVvGxY','tableName','codegen','bool','skip-imports','str','68334OKdDEW','35cMLAyu','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','string','1395nTBoUf','870086KWmSJk'];a42_0x2e6c=function(){return _0xc9da3c;};return a42_0x2e6c();}
@@ -1 +1 @@
1
- const a43_0x3cb1fb=a43_0x1acc;(function(_0x20beef,_0x178556){const _0x5247d0=a43_0x1acc,_0x199039=_0x20beef();while(!![]){try{const _0x5df527=parseInt(_0x5247d0(0x10e))/0x1+parseInt(_0x5247d0(0x103))/0x2+-parseInt(_0x5247d0(0x10d))/0x3+-parseInt(_0x5247d0(0x114))/0x4+-parseInt(_0x5247d0(0x10f))/0x5*(parseInt(_0x5247d0(0x10b))/0x6)+parseInt(_0x5247d0(0x105))/0x7+-parseInt(_0x5247d0(0x116))/0x8*(-parseInt(_0x5247d0(0x10c))/0x9);if(_0x5df527===_0x178556)break;else _0x199039['push'](_0x199039['shift']());}catch(_0x4d267){_0x199039['push'](_0x199039['shift']());}}}(a43_0x5325,0xa94ce));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x1acc(_0x53918e,_0x13affc){_0x53918e=_0x53918e-0xff;const _0x53251c=a43_0x5325();let _0x1acc1b=_0x53251c[_0x53918e];return _0x1acc1b;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x5325(){const _0x23c245=['codegen','1664088awpZqr','str','read','sqlcode','sql','766954aJUpIV','bff','4116700QGyich','sdk','Omit\x20import\x20statements\x20from\x20generated\x20code','appCode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sqlCode','816tYzmVT','63KCVJaT','3097950DAaVJz','937216NXwvrB','37165xPWLIJ','string','boolean','no-imports','target','2511512adjkdq'];a43_0x5325=function(){return _0x23c245;};return a43_0x5325();}export const codegenSql={'service':a43_0x3cb1fb(0x115),'command':a43_0x3cb1fb(0x102),'description':a43_0x3cb1fb(0x109),'risk':a43_0x3cb1fb(0x100),'flags':[SQLCODE_FLAG,{'name':a43_0x3cb1fb(0x113),'type':a43_0x3cb1fb(0x110),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x3cb1fb(0x106),'enum':['sdk',a43_0x3cb1fb(0x104)]},{'name':'no-imports','type':a43_0x3cb1fb(0x111),'description':a43_0x3cb1fb(0x107)}],async 'execute'(_0x3c9e75){const _0x41fc21=a43_0x3cb1fb,_0x186afc=await getSqlQueryInfo(_0x3c9e75[_0x41fc21(0x108)],_0x3c9e75[_0x41fc21(0xff)](_0x41fc21(0x101))),_0x24efda=_0x3c9e75['str'](_0x41fc21(0x113))||_0x41fc21(0x106),_0x46117a=generateSqlCodeTemplate(_0x186afc,{'target':_0x24efda,'includeImports':!_0x3c9e75['bool'](_0x41fc21(0x112))});return{'ok':!![],'data':{'sqlCode':_0x186afc[_0x41fc21(0x10a)],'sqlName':_0x186afc['sqlName'],'target':_0x24efda,'code':_0x46117a}};}};
1
+ const a43_0x32acc1=a43_0x58e5;(function(_0x536fcb,_0x5e19bd){const _0x2c334a=a43_0x58e5,_0xa1bae3=_0x536fcb();while(!![]){try{const _0x52ad49=parseInt(_0x2c334a(0x124))/0x1*(parseInt(_0x2c334a(0x130))/0x2)+parseInt(_0x2c334a(0x133))/0x3*(parseInt(_0x2c334a(0x11d))/0x4)+parseInt(_0x2c334a(0x12e))/0x5*(parseInt(_0x2c334a(0x121))/0x6)+parseInt(_0x2c334a(0x126))/0x7+parseInt(_0x2c334a(0x12b))/0x8*(parseInt(_0x2c334a(0x128))/0x9)+-parseInt(_0x2c334a(0x134))/0xa+-parseInt(_0x2c334a(0x12c))/0xb*(parseInt(_0x2c334a(0x11e))/0xc);if(_0x52ad49===_0x5e19bd)break;else _0xa1bae3['push'](_0xa1bae3['shift']());}catch(_0x261913){_0xa1bae3['push'](_0xa1bae3['shift']());}}}(a43_0x30b9,0x752e1));function a43_0x58e5(_0x3acbea,_0x4c8309){_0x3acbea=_0x3acbea-0x11b;const _0x30b98d=a43_0x30b9();let _0x58e559=_0x30b98d[_0x3acbea];return _0x58e559;}function a43_0x30b9(){const _0x22c55a=['1VUAFwu','Omit\x20import\x20statements\x20from\x20generated\x20code','4787307SYVtjA','bool','18UjUbVv','sqlName','target','3283696BEFpZc','29893160NGmamH','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','3685750QmyrQL','sqlcode','1215778sxEQaH','boolean','bff','6umgxpx','1301790IhOWAl','sdk','read','955688ksgEij','12sIxDhv','sqlCode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','6RpDksQ','str','codegen'];a43_0x30b9=function(){return _0x22c55a;};return a43_0x30b9();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x32acc1(0x123),'command':'sql','description':a43_0x32acc1(0x120),'risk':a43_0x32acc1(0x11c),'flags':[SQLCODE_FLAG,{'name':a43_0x32acc1(0x12a),'type':'string','description':a43_0x32acc1(0x12d),'default':'sdk','enum':[a43_0x32acc1(0x11b),a43_0x32acc1(0x132)]},{'name':'no-imports','type':a43_0x32acc1(0x131),'description':a43_0x32acc1(0x125)}],async 'execute'(_0x454168){const _0x3a3d71=a43_0x32acc1,_0x135701=await getSqlQueryInfo(_0x454168['appCode'],_0x454168[_0x3a3d71(0x122)](_0x3a3d71(0x12f))),_0x2fa7ea=_0x454168[_0x3a3d71(0x122)]('target')||_0x3a3d71(0x11b),_0x1360b0=generateSqlCodeTemplate(_0x135701,{'target':_0x2fa7ea,'includeImports':!_0x454168[_0x3a3d71(0x127)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x135701[_0x3a3d71(0x11f)],'sqlName':_0x135701[_0x3a3d71(0x129)],'target':_0x2fa7ea,'code':_0x1360b0}};}};
@@ -1 +1 @@
1
- (function(_0x208202,_0x4d58cc){const _0x233f84=a44_0x1b1f,_0x3654be=_0x208202();while(!![]){try{const _0x59c6fd=-parseInt(_0x233f84(0x1c2))/0x1*(parseInt(_0x233f84(0x1ba))/0x2)+parseInt(_0x233f84(0x1b9))/0x3+-parseInt(_0x233f84(0x1be))/0x4+parseInt(_0x233f84(0x1d6))/0x5+parseInt(_0x233f84(0x1ce))/0x6*(-parseInt(_0x233f84(0x1b0))/0x7)+parseInt(_0x233f84(0x1ab))/0x8+parseInt(_0x233f84(0x1c6))/0x9;if(_0x59c6fd===_0x4d58cc)break;else _0x3654be['push'](_0x3654be['shift']());}catch(_0xc27da9){_0x3654be['push'](_0x3654be['shift']());}}}(a44_0x3756,0x666e3));import{CliErrors}from'../../errors.js';function a44_0x1b1f(_0x4c954e,_0xe3002f){_0x4c954e=_0x4c954e-0x1ab;const _0x375641=a44_0x3756();let _0x1b1fce=_0x375641[_0x4c954e];return _0x1b1fce;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x1e3fcb=a44_0x1b1f;return[{'name':_0x1e3fcb(0x1b7),'type':_0x1e3fcb(0x1ac),'description':_0x1e3fcb(0x1cc),'required':!![]},{'name':_0x1e3fcb(0x1cd),'type':_0x1e3fcb(0x1b3),'description':_0x1e3fcb(0x1c1),'default':![]},...getAppProfileFlagDefs()];}function a44_0x3756(){const _0x17757f=['2688200NfQJax','4543928lUpRDD','string','projectConfig','Removed\x20app\x20\x22','args','5430873KGtsRS','\x20app\x20\x22','App\x20\x22','boolean','str','Added','bool','appcode','length','1848612lXrJFr','16962QliUoK','Usage:\x20','\x20Note:\x20app\x20\x22','project','3309188hVEwxP','\x22\x20still\x20defined\x20in\x20','validation','Use\x20global\x20config\x20scope','14SVvBak','\x20<name>\x20--appcode\x20<code>','trim','\x22\x20(appcode:\x20','3776310gexqDV','keys','inherit','\x20Set\x20as\x20default\x20app.','defaultApp','\x22\x20not\x20found.','App\x20code','global','6afzhxG','object','apps','\x20Default\x20app\x20changed\x20to\x20\x22','Updated','Missing\x20app\x20name.','globalConfig','both'];a44_0x3756=function(){return _0x17757f;};return a44_0x3756();}export function buildAppRemoveFlags(){const _0x13ebfb=a44_0x1b1f;return[{'name':_0x13ebfb(0x1cd),'type':_0x13ebfb(0x1b3),'description':_0x13ebfb(0x1c1),'default':![]}];}export async function validateAppName(_0x4621c1,_0x4122d5){const _0x3c80c9=a44_0x1b1f,_0x549b8d=_0x4621c1[_0x3c80c9(0x1af)][0x0]?.['trim']();if(!_0x549b8d)throw CliErrors['validation'](_0x3c80c9(0x1d3),_0x3c80c9(0x1bb)+CLI_BIN_NAME+'\x20'+_0x4122d5+'\x20<name>');}export async function runAppAdd(_0x80bbc3,_0x263e6e){const _0x13fe50=a44_0x1b1f,_0x24f8a2=_0x80bbc3['args'][0x0]?.[_0x13fe50(0x1c4)]();if(!_0x24f8a2)throw CliErrors[_0x13fe50(0x1c0)](_0x13fe50(0x1d3),_0x13fe50(0x1bb)+CLI_BIN_NAME+'\x20'+_0x263e6e+_0x13fe50(0x1c3));const _0x45847f=_0x80bbc3[_0x13fe50(0x1b4)](_0x13fe50(0x1b7));if(!_0x45847f)throw CliErrors['flagMissing'](_0x13fe50(0x1b7),_0x13fe50(0x1bb)+CLI_BIN_NAME+'\x20'+_0x263e6e+'\x20<name>\x20--appcode\x20<code>');const _0x351934={'global':_0x80bbc3[_0x13fe50(0x1b6)](_0x13fe50(0x1cd))},_0x18b36e=readConfig(_0x351934);if(!_0x18b36e[_0x13fe50(0x1d0)])_0x18b36e[_0x13fe50(0x1d0)]={};const _0x35ff30={'appcode':_0x45847f,...collectAppProfileOverrides(_0x7ffccf=>_0x80bbc3[_0x13fe50(0x1b4)](_0x7ffccf))},_0x22c43b=_0x18b36e['apps'],_0x1320a9=!!_0x22c43b[_0x24f8a2];_0x22c43b[_0x24f8a2]=_0x35ff30;if(!_0x18b36e[_0x13fe50(0x1ca)])_0x18b36e['defaultApp']=_0x24f8a2;writeConfig(_0x18b36e,_0x351934);const _0x5a9bda=!_0x1320a9&&_0x18b36e[_0x13fe50(0x1ca)]===_0x24f8a2?_0x13fe50(0x1c9):'',_0x31ef24=(_0x1320a9?_0x13fe50(0x1d2):_0x13fe50(0x1b5))+_0x13fe50(0x1b1)+_0x24f8a2+_0x13fe50(0x1c5)+_0x45847f+')'+scopeLabel(_0x351934)+'.'+_0x5a9bda;return{'ok':!![],'message':_0x31ef24};}export async function runAppRemove(_0x3d6917,_0x1845b4){const _0x16f034=a44_0x1b1f,_0x15bfdb=_0x3d6917['args'][0x0]?.[_0x16f034(0x1c4)]();if(!_0x15bfdb)throw CliErrors[_0x16f034(0x1c0)](_0x16f034(0x1d3),_0x16f034(0x1bb)+CLI_BIN_NAME+'\x20'+_0x1845b4+'\x20<name>\x20[--global]');const _0x4a4252=_0x3d6917['bool'](_0x16f034(0x1cd)),{config:_0x58bcc8,layers:_0x5f5532}=readRawConfigWithLayers(),_0x2ca239=_0x58bcc8['apps']??{};if(!_0x2ca239[_0x15bfdb])throw CliErrors[_0x16f034(0x1c0)](_0x16f034(0x1b2)+_0x15bfdb+_0x16f034(0x1cb));const _0x31f124=_0x5f5532['globalConfig']['apps']&&typeof _0x5f5532[_0x16f034(0x1d4)][_0x16f034(0x1d0)]===_0x16f034(0x1cf)?_0x5f5532['globalConfig']['apps']:{},_0x243647=_0x5f5532[_0x16f034(0x1ad)]['apps']&&typeof _0x5f5532[_0x16f034(0x1ad)][_0x16f034(0x1d0)]===_0x16f034(0x1cf)?_0x5f5532['projectConfig']['apps']:{},_0x11bbca=appDefinedIn(_0x15bfdb,_0x31f124,_0x243647,_0x5f5532[_0x16f034(0x1ad)][_0x16f034(0x1c8)]===![]),_0x1e8de7=resolveAppScopeForWrite(_0x15bfdb,_0x4a4252,_0x5f5532),_0x1fc4f4={'global':_0x1e8de7===_0x16f034(0x1cd)},_0x51aeb3=readConfig(_0x1fc4f4),_0x40af90=_0x51aeb3[_0x16f034(0x1d0)];if(!_0x40af90||!_0x40af90[_0x15bfdb])throw CliErrors[_0x16f034(0x1c0)](_0x16f034(0x1b2)+_0x15bfdb+_0x16f034(0x1cb));delete _0x40af90[_0x15bfdb];let _0x4adaae='';if(_0x51aeb3['defaultApp']===_0x15bfdb){const _0x20f0ed=Object[_0x16f034(0x1c7)](_0x40af90);_0x51aeb3[_0x16f034(0x1ca)]=_0x20f0ed[_0x16f034(0x1b8)]>0x0?_0x20f0ed[0x0]:undefined,_0x51aeb3[_0x16f034(0x1ca)]?_0x4adaae=_0x16f034(0x1d1)+_0x51aeb3[_0x16f034(0x1ca)]+'\x22.':delete _0x51aeb3[_0x16f034(0x1ca)];}Object[_0x16f034(0x1c7)](_0x40af90)[_0x16f034(0x1b8)]===0x0&&(delete _0x51aeb3['apps'],delete _0x51aeb3[_0x16f034(0x1ca)]);writeConfig(_0x51aeb3,_0x1fc4f4);const _0x32a746=_0x11bbca===_0x16f034(0x1d5)?_0x16f034(0x1bc)+_0x15bfdb+_0x16f034(0x1bf)+(_0x1e8de7===_0x16f034(0x1bd)?_0x16f034(0x1cd):'project')+'\x20config.':'';return{'ok':!![],'message':_0x16f034(0x1ae)+_0x15bfdb+'\x22'+scopeLabel(_0x1fc4f4)+'.'+_0x4adaae+_0x32a746};}
1
+ (function(_0xaee4c2,_0x1f2877){const _0x4ae6b0=a44_0x4f7b,_0x3cfd3e=_0xaee4c2();while(!![]){try{const _0x143ddb=parseInt(_0x4ae6b0(0x185))/0x1*(-parseInt(_0x4ae6b0(0x162))/0x2)+parseInt(_0x4ae6b0(0x17a))/0x3+parseInt(_0x4ae6b0(0x189))/0x4+parseInt(_0x4ae6b0(0x183))/0x5*(-parseInt(_0x4ae6b0(0x160))/0x6)+parseInt(_0x4ae6b0(0x176))/0x7+-parseInt(_0x4ae6b0(0x175))/0x8*(parseInt(_0x4ae6b0(0x17c))/0x9)+-parseInt(_0x4ae6b0(0x167))/0xa;if(_0x143ddb===_0x1f2877)break;else _0x3cfd3e['push'](_0x3cfd3e['shift']());}catch(_0x212e62){_0x3cfd3e['push'](_0x3cfd3e['shift']());}}}(a44_0x57af,0xa724d));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a44_0x4f7b(_0x792654,_0x22aa3a){_0x792654=_0x792654-0x15f;const _0x57afeb=a44_0x57af();let _0x4f7b70=_0x57afeb[_0x792654];return _0x4f7b70;}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 _0x5d5b75=a44_0x4f7b;return[{'name':_0x5d5b75(0x188),'type':_0x5d5b75(0x16f),'description':_0x5d5b75(0x168),'required':!![]},{'name':_0x5d5b75(0x164),'type':_0x5d5b75(0x18a),'description':_0x5d5b75(0x17b),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x290876=a44_0x4f7b;return[{'name':_0x290876(0x164),'type':'boolean','description':_0x290876(0x17b),'default':![]}];}export async function validateAppName(_0xcac488,_0x97d295){const _0x2af2a9=a44_0x4f7b,_0x4ce1a4=_0xcac488[_0x2af2a9(0x170)][0x0]?.['trim']();if(!_0x4ce1a4)throw CliErrors[_0x2af2a9(0x16b)](_0x2af2a9(0x172),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x97d295+_0x2af2a9(0x16d));}export async function runAppAdd(_0x5d9d63,_0x185b80){const _0x488488=a44_0x4f7b,_0xb3b42=_0x5d9d63[_0x488488(0x170)][0x0]?.[_0x488488(0x181)]();if(!_0xb3b42)throw CliErrors[_0x488488(0x16b)](_0x488488(0x172),_0x488488(0x166)+CLI_BIN_NAME+'\x20'+_0x185b80+_0x488488(0x161));const _0x10eb2a=_0x5d9d63['str'](_0x488488(0x188));if(!_0x10eb2a)throw CliErrors[_0x488488(0x177)](_0x488488(0x188),_0x488488(0x166)+CLI_BIN_NAME+'\x20'+_0x185b80+'\x20<name>\x20--appcode\x20<code>');const _0x3529ee={'global':_0x5d9d63[_0x488488(0x16e)]('global')},_0x5094e7=readConfig(_0x3529ee);if(!_0x5094e7[_0x488488(0x16a)])_0x5094e7[_0x488488(0x16a)]={};const _0x9772c6={'appcode':_0x10eb2a,...collectAppProfileOverrides(_0x2f0db8=>_0x5d9d63[_0x488488(0x16c)](_0x2f0db8))},_0x51affc=_0x5094e7[_0x488488(0x16a)],_0x1cd5cf=!!_0x51affc[_0xb3b42];_0x51affc[_0xb3b42]=_0x9772c6;if(!_0x5094e7['defaultApp'])_0x5094e7['defaultApp']=_0xb3b42;writeConfig(_0x5094e7,_0x3529ee);const _0x1e6a90=!_0x1cd5cf&&_0x5094e7['defaultApp']===_0xb3b42?_0x488488(0x15f):'',_0x376fc0=(_0x1cd5cf?_0x488488(0x184):_0x488488(0x17f))+_0x488488(0x186)+_0xb3b42+_0x488488(0x182)+_0x10eb2a+')'+scopeLabel(_0x3529ee)+'.'+_0x1e6a90;return{'ok':!![],'message':_0x376fc0};}export async function runAppRemove(_0xd3448f,_0x579ab6){const _0x316d37=a44_0x4f7b,_0x196fa3=_0xd3448f[_0x316d37(0x170)][0x0]?.[_0x316d37(0x181)]();if(!_0x196fa3)throw CliErrors[_0x316d37(0x16b)](_0x316d37(0x172),_0x316d37(0x166)+CLI_BIN_NAME+'\x20'+_0x579ab6+_0x316d37(0x173));const _0x414313=_0xd3448f[_0x316d37(0x16e)](_0x316d37(0x164)),{config:_0x39d1eb,layers:_0x10412a}=readRawConfigWithLayers(),_0x168d27=_0x39d1eb[_0x316d37(0x16a)]??{};if(!_0x168d27[_0x196fa3])throw CliErrors[_0x316d37(0x16b)](_0x316d37(0x174)+_0x196fa3+_0x316d37(0x17e));const _0x2a8d2a=_0x10412a[_0x316d37(0x17d)][_0x316d37(0x16a)]&&typeof _0x10412a[_0x316d37(0x17d)][_0x316d37(0x16a)]==='object'?_0x10412a[_0x316d37(0x17d)][_0x316d37(0x16a)]:{},_0x4516ee=_0x10412a[_0x316d37(0x187)][_0x316d37(0x16a)]&&typeof _0x10412a[_0x316d37(0x187)][_0x316d37(0x16a)]==='object'?_0x10412a[_0x316d37(0x187)][_0x316d37(0x16a)]:{},_0xed241f=appDefinedIn(_0x196fa3,_0x2a8d2a,_0x4516ee,_0x10412a['projectConfig'][_0x316d37(0x179)]===![]),_0x36b983=resolveAppScopeForWrite(_0x196fa3,_0x414313,_0x10412a),_0xa69567={'global':_0x36b983===_0x316d37(0x164)},_0x2707b8=readConfig(_0xa69567),_0x1f330e=_0x2707b8[_0x316d37(0x16a)];if(!_0x1f330e||!_0x1f330e[_0x196fa3])throw CliErrors[_0x316d37(0x16b)]('App\x20\x22'+_0x196fa3+_0x316d37(0x17e));delete _0x1f330e[_0x196fa3];let _0x4436d1='';if(_0x2707b8[_0x316d37(0x180)]===_0x196fa3){const _0x1fecb3=Object[_0x316d37(0x178)](_0x1f330e);_0x2707b8[_0x316d37(0x180)]=_0x1fecb3[_0x316d37(0x165)]>0x0?_0x1fecb3[0x0]:undefined,_0x2707b8[_0x316d37(0x180)]?_0x4436d1='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x2707b8[_0x316d37(0x180)]+'\x22.':delete _0x2707b8[_0x316d37(0x180)];}Object[_0x316d37(0x178)](_0x1f330e)['length']===0x0&&(delete _0x2707b8[_0x316d37(0x16a)],delete _0x2707b8[_0x316d37(0x180)]);writeConfig(_0x2707b8,_0xa69567);const _0x506dca=_0xed241f==='both'?_0x316d37(0x163)+_0x196fa3+_0x316d37(0x169)+(_0x36b983==='project'?_0x316d37(0x164):'project')+_0x316d37(0x171):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x196fa3+'\x22'+scopeLabel(_0xa69567)+'.'+_0x4436d1+_0x506dca};}function a44_0x57af(){const _0x149654=['inherit','503427mluetU','Use\x20global\x20config\x20scope','81yWfkFC','globalConfig','\x22\x20not\x20found.','Added','defaultApp','trim','\x22\x20(appcode:\x20','1373800IlHnTz','Updated','89038XkJZdN','\x20app\x20\x22','projectConfig','appcode','5075928iRHVDY','boolean','\x20Set\x20as\x20default\x20app.','6saXwAh','\x20<name>\x20--appcode\x20<code>','8UnWhSc','\x20Note:\x20app\x20\x22','global','length','Usage:\x20','4740770UsZOHL','App\x20code','\x22\x20still\x20defined\x20in\x20','apps','validation','str','\x20<name>','bool','string','args','\x20config.','Missing\x20app\x20name.','\x20<name>\x20[--global]','App\x20\x22','714632haAXrj','8097460SIBNKu','flagMissing','keys'];a44_0x57af=function(){return _0x149654;};return a44_0x57af();}
@@ -1 +1 @@
1
- (function(_0x5b10cf,_0x3ab27f){const _0x5d1809=a45_0x3b37,_0x199baf=_0x5b10cf();while(!![]){try{const _0x1034d7=parseInt(_0x5d1809(0x161))/0x1*(-parseInt(_0x5d1809(0x158))/0x2)+parseInt(_0x5d1809(0x156))/0x3+-parseInt(_0x5d1809(0x163))/0x4*(-parseInt(_0x5d1809(0x15a))/0x5)+-parseInt(_0x5d1809(0x169))/0x6*(parseInt(_0x5d1809(0x150))/0x7)+-parseInt(_0x5d1809(0x16b))/0x8+parseInt(_0x5d1809(0x14f))/0x9+parseInt(_0x5d1809(0x152))/0xa*(-parseInt(_0x5d1809(0x15e))/0xb);if(_0x1034d7===_0x3ab27f)break;else _0x199baf['push'](_0x199baf['shift']());}catch(_0x450292){_0x199baf['push'](_0x199baf['shift']());}}}(a45_0x1118,0xbf113));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x390120 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 _0x15763f=a45_0x3b37,_0x4f5c15=await input({'message':'请输入\x20App\x20Code:','validate':_0x54b55f=>{const _0x404378=a45_0x3b37,_0x1d5a80=validateAppcode(_0x54b55f[_0x404378(0x16d)]());return _0x1d5a80['valid']||_0x1d5a80[_0x404378(0x15f)]||_0x404378(0x15b);}});return _0x4f5c15[_0x15763f(0x16d)]();}function a45_0x1118(){const _0x183fba=['15065479hKkUHF','message','无法获取远程应用列表,请手动输入。','659338hCTeNh','skip','56uiWNFR','yellow','find','appName','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','gray','12HYMgCt','\x20\x20(','496920fGQwka','\x0a无法获取远程应用列表,请手动输入。','trim','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','custom','cyan','✎\x20自定义输入\x20appcode','includes','获取到\x20','13891788HCzpLl','1207171pfKqnO','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','10VfYASL','未找到可用应用。','map','✎\x20手动输入','3629547TIlwpw','\x0a未找到可用应用。','2PbNiNs','正在获取可用应用列表...','166135JnblwI','Invalid\x20App\x20Code','length','appCode'];a45_0x1118=function(){return _0x183fba;};return a45_0x1118();}export async function promptAppSelection(_0x1d8b4f){const _0x28421a=a45_0x3b37,_0x305742=[{'name':a45_0x390120[_0x28421a(0x164)](_0x28421a(0x14c)),'value':-0x1},..._0x1d8b4f[_0x28421a(0x154)]((_0x40a2fc,_0x2a748a)=>({'name':_0x40a2fc[_0x28421a(0x166)]+'\x20\x20'+a45_0x390120[_0x28421a(0x168)]('('+_0x40a2fc[_0x28421a(0x15d)]+')'),'value':_0x2a748a}))],_0x13c02d=await checkbox({'message':_0x28421a(0x14e)+a45_0x390120[_0x28421a(0x14b)](_0x1d8b4f[_0x28421a(0x15c)])+_0x28421a(0x151),'choices':_0x305742,'loop':![]});if(_0x13c02d[_0x28421a(0x14d)](-0x1))return _0x28421a(0x16f);if(_0x13c02d[_0x28421a(0x15c)]===0x0)return _0x28421a(0x16f);return _0x13c02d['map'](_0x5914bf=>_0x1d8b4f[_0x5914bf]);}export async function promptSingleAppSelection(_0x36dd91){const _0x459e34=a45_0x3b37,_0x2a0ccd=[{'name':a45_0x390120['gray'](_0x459e34(0x167)),'value':_0x459e34(0x162)},{'name':a45_0x390120[_0x459e34(0x164)](_0x459e34(0x14c)),'value':'custom'},..._0x36dd91['map'](_0x5a04e7=>({'name':_0x5a04e7['appName']+'\x20\x20'+a45_0x390120[_0x459e34(0x168)]('('+_0x5a04e7[_0x459e34(0x15d)]+')'),'value':_0x5a04e7[_0x459e34(0x15d)]}))],_0x221ef6=await select({'message':'请选择要绑定的应用:','choices':_0x2a0ccd});if(_0x221ef6==='skip')return _0x459e34(0x162);if(_0x221ef6===_0x459e34(0x16f))return _0x459e34(0x16f);return _0x36dd91[_0x459e34(0x165)](_0x360106=>_0x360106['appCode']===_0x221ef6);}export async function selectSingleAppcode(_0x5170b2){const _0x3400d1=a45_0x3b37;if(!_0x5170b2)return writeCliSideChannelLine(a45_0x390120[_0x3400d1(0x168)](_0x3400d1(0x16e))),_fallbackOrSkip();writeCliSideChannelLine(_0x3400d1(0x159));let _0x5e50e8;try{_0x5e50e8=await withActiveCookie(_0x5170b2,()=>listRemoteApps());}catch(_0x811118){writeCliSideChannelLine(a45_0x390120[_0x3400d1(0x164)](_0x3400d1(0x160)));if(_0x811118 instanceof Error)writeCliSideChannelLine(a45_0x390120['gray'](_0x3400d1(0x16a)+_0x811118[_0x3400d1(0x15f)]+')'));return _fallbackOrSkip();}if(_0x5e50e8[_0x3400d1(0x15c)]===0x0)return writeCliSideChannelLine(a45_0x390120[_0x3400d1(0x164)](_0x3400d1(0x153))),_fallbackOrSkip();const _0xdfa5d9=await promptSingleAppSelection(_0x5e50e8);if(_0xdfa5d9===_0x3400d1(0x162))return'';if(_0xdfa5d9===_0x3400d1(0x16f))return promptCustomAppcode();return _0xdfa5d9[_0x3400d1(0x15d)];}export async function selectMultipleApps(_0x1222a1){const _0x4db953=a45_0x3b37;writeCliSideChannelLine(_0x4db953(0x159));let _0x128eed;try{_0x128eed=await withActiveCookie(_0x1222a1,()=>listRemoteApps());}catch(_0x1c4ba9){writeCliSideChannelLine(_0x4db953(0x16c));if(_0x1c4ba9 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x1c4ba9[_0x4db953(0x15f)]+')');return'custom';}if(_0x128eed[_0x4db953(0x15c)]===0x0)return writeCliSideChannelLine(_0x4db953(0x157)),_0x4db953(0x16f);return promptAppSelection(_0x128eed);}function a45_0x3b37(_0x5a4b34,_0x4de8b0){_0x5a4b34=_0x5a4b34-0x14b;const _0x1118b4=a45_0x1118();let _0x3b37a4=_0x1118b4[_0x5a4b34];return _0x3b37a4;}async function _fallbackOrSkip(){const _0x13e47f=a45_0x3b37,_0x3ea17f=await select({'message':'App\x20Code:','choices':[{'name':a45_0x390120[_0x13e47f(0x168)]('(跳过,稍后配置)'),'value':_0x13e47f(0x162)},{'name':a45_0x390120[_0x13e47f(0x164)](_0x13e47f(0x155)),'value':'manual'}]});if(_0x3ea17f==='skip')return'';return promptCustomAppcode();}
1
+ (function(_0x168d00,_0x26dfef){const _0x5b0200=a45_0x159c,_0x163bbf=_0x168d00();while(!![]){try{const _0x35ed4a=-parseInt(_0x5b0200(0x13d))/0x1*(-parseInt(_0x5b0200(0x143))/0x2)+parseInt(_0x5b0200(0x13a))/0x3+-parseInt(_0x5b0200(0x13c))/0x4*(-parseInt(_0x5b0200(0x157))/0x5)+-parseInt(_0x5b0200(0x144))/0x6+parseInt(_0x5b0200(0x139))/0x7+-parseInt(_0x5b0200(0x138))/0x8*(-parseInt(_0x5b0200(0x13f))/0x9)+-parseInt(_0x5b0200(0x149))/0xa;if(_0x35ed4a===_0x26dfef)break;else _0x163bbf['push'](_0x163bbf['shift']());}catch(_0x1c8471){_0x163bbf['push'](_0x163bbf['shift']());}}}(a45_0x2c8c,0xca9f0));function a45_0x159c(_0x4d1ebc,_0x1068ad){_0x4d1ebc=_0x4d1ebc-0x135;const _0x2c8cb1=a45_0x2c8c();let _0x159c28=_0x2c8cb1[_0x4d1ebc];return _0x159c28;}import{input,checkbox,select}from'@inquirer/prompts';import a45_0x57053b 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 _0x250229=a45_0x159c,_0x1f8215=await input({'message':_0x250229(0x145),'validate':_0x588d6e=>{const _0x4077d0=_0x250229,_0x357430=validateAppcode(_0x588d6e['trim']());return _0x357430['valid']||_0x357430[_0x4077d0(0x14e)]||_0x4077d0(0x141);}});return _0x1f8215[_0x250229(0x154)]();}export async function promptAppSelection(_0x32efc7){const _0x5277ad=a45_0x159c,_0x35ffe3=[{'name':a45_0x57053b[_0x5277ad(0x152)](_0x5277ad(0x14b)),'value':-0x1},..._0x32efc7[_0x5277ad(0x13b)]((_0x29496c,_0x26644b)=>({'name':_0x29496c[_0x5277ad(0x14c)]+'\x20\x20'+a45_0x57053b[_0x5277ad(0x148)]('('+_0x29496c[_0x5277ad(0x137)]+')'),'value':_0x26644b}))],_0x1168f8=await checkbox({'message':'获取到\x20'+a45_0x57053b[_0x5277ad(0x153)](_0x32efc7['length'])+_0x5277ad(0x14d),'choices':_0x35ffe3,'loop':![]});if(_0x1168f8[_0x5277ad(0x142)](-0x1))return'custom';if(_0x1168f8[_0x5277ad(0x151)]===0x0)return _0x5277ad(0x156);return _0x1168f8[_0x5277ad(0x13b)](_0x512af6=>_0x32efc7[_0x512af6]);}export async function promptSingleAppSelection(_0x10dae5){const _0x23708c=a45_0x159c,_0x2e3310=[{'name':a45_0x57053b[_0x23708c(0x148)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x23708c(0x14a)},{'name':a45_0x57053b['yellow']('✎\x20自定义输入\x20appcode'),'value':_0x23708c(0x156)},..._0x10dae5[_0x23708c(0x13b)](_0x6147fe=>({'name':_0x6147fe[_0x23708c(0x14c)]+'\x20\x20'+a45_0x57053b[_0x23708c(0x148)]('('+_0x6147fe['appCode']+')'),'value':_0x6147fe['appCode']}))],_0x8706c6=await select({'message':_0x23708c(0x136),'choices':_0x2e3310});if(_0x8706c6===_0x23708c(0x14a))return _0x23708c(0x14a);if(_0x8706c6==='custom')return _0x23708c(0x156);return _0x10dae5[_0x23708c(0x146)](_0xeba48c=>_0xeba48c[_0x23708c(0x137)]===_0x8706c6);}export async function selectSingleAppcode(_0x4e6a3a){const _0x3ddf9e=a45_0x159c;if(!_0x4e6a3a)return writeCliSideChannelLine(a45_0x57053b[_0x3ddf9e(0x148)](_0x3ddf9e(0x147))),_fallbackOrSkip();writeCliSideChannelLine(_0x3ddf9e(0x13e));let _0x1baa7b;try{_0x1baa7b=await withActiveCookie(_0x4e6a3a,()=>listRemoteApps());}catch(_0x4c2007){writeCliSideChannelLine(a45_0x57053b['yellow'](_0x3ddf9e(0x135)));if(_0x4c2007 instanceof Error)writeCliSideChannelLine(a45_0x57053b[_0x3ddf9e(0x148)](_0x3ddf9e(0x155)+_0x4c2007[_0x3ddf9e(0x14e)]+')'));return _fallbackOrSkip();}if(_0x1baa7b[_0x3ddf9e(0x151)]===0x0)return writeCliSideChannelLine(a45_0x57053b['yellow'](_0x3ddf9e(0x150))),_fallbackOrSkip();const _0x255af8=await promptSingleAppSelection(_0x1baa7b);if(_0x255af8===_0x3ddf9e(0x14a))return'';if(_0x255af8===_0x3ddf9e(0x156))return promptCustomAppcode();return _0x255af8['appCode'];}function a45_0x2c8c(){const _0x5bb304=['appCode','8692184YimpxJ','5160344fYkeFd','3295806NgwzGw','map','3528LtRjNZ','4475rlRIcv','正在获取可用应用列表...','9liyuiD','\x0a未找到可用应用。','Invalid\x20App\x20Code','includes','680aejIJC','7632486PQTBaN','请输入\x20App\x20Code:','find','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','gray','25517160YqyaWV','skip','✎\x20自定义输入\x20appcode','appName','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','message','manual','未找到可用应用。','length','yellow','cyan','trim','\x20\x20(','custom','1190ljtEYg','\x0a无法获取远程应用列表,请手动输入。','无法获取远程应用列表,请手动输入。','请选择要绑定的应用:'];a45_0x2c8c=function(){return _0x5bb304;};return a45_0x2c8c();}export async function selectMultipleApps(_0x489249){const _0x3fa608=a45_0x159c;writeCliSideChannelLine('正在获取可用应用列表...');let _0x12fba2;try{_0x12fba2=await withActiveCookie(_0x489249,()=>listRemoteApps());}catch(_0x382ae9){writeCliSideChannelLine(_0x3fa608(0x158));if(_0x382ae9 instanceof Error)writeCliSideChannelLine(_0x3fa608(0x155)+_0x382ae9[_0x3fa608(0x14e)]+')');return'custom';}if(_0x12fba2[_0x3fa608(0x151)]===0x0)return writeCliSideChannelLine(_0x3fa608(0x140)),_0x3fa608(0x156);return promptAppSelection(_0x12fba2);}async function _fallbackOrSkip(){const _0x2ae1ea=a45_0x159c,_0x2ca7dd=await select({'message':'App\x20Code:','choices':[{'name':a45_0x57053b['gray']('(跳过,稍后配置)'),'value':_0x2ae1ea(0x14a)},{'name':a45_0x57053b[_0x2ae1ea(0x152)]('✎\x20手动输入'),'value':_0x2ae1ea(0x14f)}]});if(_0x2ca7dd==='skip')return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a46_0x52b0ae=a46_0x3d1a;(function(_0x3c66e5,_0x2ef789){const _0x586e24=a46_0x3d1a,_0x4ed0aa=_0x3c66e5();while(!![]){try{const _0x54cefd=parseInt(_0x586e24(0x1d4))/0x1+-parseInt(_0x586e24(0x1e1))/0x2*(parseInt(_0x586e24(0x1c9))/0x3)+parseInt(_0x586e24(0x1e5))/0x4*(-parseInt(_0x586e24(0x1e4))/0x5)+parseInt(_0x586e24(0x1c7))/0x6+-parseInt(_0x586e24(0x1da))/0x7*(parseInt(_0x586e24(0x1c6))/0x8)+parseInt(_0x586e24(0x1cb))/0x9+parseInt(_0x586e24(0x1d2))/0xa;if(_0x54cefd===_0x2ef789)break;else _0x4ed0aa['push'](_0x4ed0aa['shift']());}catch(_0x10e078){_0x4ed0aa['push'](_0x4ed0aa['shift']());}}}(a46_0x41b4,0x391b6));import{CLI_BIN_NAME}from'../../constant/cli.js';function a46_0x3d1a(_0x3166c0,_0x2b3a43){_0x3166c0=_0x3166c0-0x1c4;const _0x41b4a2=a46_0x41b4();let _0x3d1a9a=_0x41b4a2[_0x3166c0];return _0x3d1a9a;}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x52b0ae(0x1db),a46_0x52b0ae(0x1d8)]),NON_TERMINAL_STATUSES=new Set(['PENDING',a46_0x52b0ae(0x1e0)]);function a46_0x41b4(){const _0x4e468f=['\x20returned\x20unknown\x20status\x20','482920NyHRcQ','8wfhigh','has','\x20is\x20processing.','24ESMsqt','240846ltZmZB','trim','195666shRCEv','Task\x20','1322307ZFSZWT','toUpperCase','\x20task\x20status\x20--task-id\x20','apiError','\x20response\x20did\x20not\x20contain\x20a\x20status.','errorMessage','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','6902940ACWowR','\x20failed.','325241FQBkQa','Async\x20task\x20','\x27\x5c\x27\x27','taskId','FAILED','\x20--appcode\x20','896441RZKbHh','SUCCESS','string','\x20--format\x20compress','\x20is\x20pending.','status','PROCESSING','12nGVybc','\x20completed\x20successfully.'];a46_0x41b4=function(){return _0x4e468f;};return a46_0x41b4();}export function normalizeAsyncTask(_0x42305b){const _0x1b8bfc=a46_0x52b0ae,_0x1a476c=typeof _0x42305b?.[_0x1b8bfc(0x1d7)]===_0x1b8bfc(0x1dc)?_0x42305b['taskId'][_0x1b8bfc(0x1c8)]():'';if(!_0x1a476c)throw CliErrors[_0x1b8bfc(0x1ce)](_0x1b8bfc(0x1d1));const _0x155e1f=typeof _0x42305b['status']==='string'?_0x42305b['status']['trim']()[_0x1b8bfc(0x1cc)]():'';if(!_0x155e1f)throw CliErrors['apiError'](_0x1b8bfc(0x1d5)+_0x1a476c+_0x1b8bfc(0x1cf));return{'taskId':_0x1a476c,'status':_0x155e1f,'errorMessage':typeof _0x42305b['errorMessage']===_0x1b8bfc(0x1dc)&&_0x42305b['errorMessage'][_0x1b8bfc(0x1c8)]()?_0x42305b['errorMessage'][_0x1b8bfc(0x1c8)]():null,'isTerminal':TERMINAL_STATUSES[_0x1b8bfc(0x1c4)](_0x155e1f),'knownStatus':TERMINAL_STATUSES[_0x1b8bfc(0x1c4)](_0x155e1f)||NON_TERMINAL_STATUSES[_0x1b8bfc(0x1c4)](_0x155e1f)};}export function buildAsyncTaskStatusCommand(_0x200001,_0x50b151){const _0xc64449=a46_0x52b0ae;return CLI_BIN_NAME+_0xc64449(0x1cd)+quoteShellArg(_0x200001)+_0xc64449(0x1d9)+quoteShellArg(_0x50b151)+_0xc64449(0x1dd);}export function asyncTaskMessage(_0x2f11eb){const _0x5b2790=a46_0x52b0ae;switch(_0x2f11eb[_0x5b2790(0x1df)]){case'PENDING':return _0x5b2790(0x1ca)+_0x2f11eb['taskId']+_0x5b2790(0x1de);case'PROCESSING':return'Task\x20'+_0x2f11eb[_0x5b2790(0x1d7)]+_0x5b2790(0x1c5);case'SUCCESS':return _0x5b2790(0x1ca)+_0x2f11eb[_0x5b2790(0x1d7)]+_0x5b2790(0x1e2);case _0x5b2790(0x1d8):return _0x2f11eb[_0x5b2790(0x1d0)]?_0x5b2790(0x1ca)+_0x2f11eb[_0x5b2790(0x1d7)]+'\x20failed:\x20'+_0x2f11eb[_0x5b2790(0x1d0)]:_0x5b2790(0x1ca)+_0x2f11eb['taskId']+_0x5b2790(0x1d3);default:return _0x5b2790(0x1ca)+_0x2f11eb[_0x5b2790(0x1d7)]+_0x5b2790(0x1e3)+_0x2f11eb[_0x5b2790(0x1df)]+'.';}}function quoteShellArg(_0x1a8822){const _0x4021c0=a46_0x52b0ae;return'\x27'+_0x1a8822['replace'](/'/g,_0x4021c0(0x1d6))+'\x27';}
1
+ function a46_0x408c(){const _0x297a55=['SUCCESS','\x20returned\x20unknown\x20status\x20','8060qGTDai','\x20failed:\x20','Async\x20task\x20','FAILED','taskId','\x20is\x20processing.','\x20task\x20status\x20--task-id\x20','22682PDoIVf','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20--format\x20compress','148qZWePc','6834lvPmLy','trim','15myjFKD','3228NRhkcC','9BahBEa','\x27\x5c\x27\x27','6099860dRaBwB','PENDING','status','PROCESSING','\x20completed\x20successfully.','replace','201271qevQOH','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','errorMessage','2401bbUUNH','90085tZZGet','2995296BIAyGj','has','\x20failed.','\x20is\x20pending.','toUpperCase','string','Task\x20','\x20--appcode\x20'];a46_0x408c=function(){return _0x297a55;};return a46_0x408c();}const a46_0x6071df=a46_0x2017;(function(_0x1418aa,_0x12269d){const _0x56e1ac=a46_0x2017,_0x181824=_0x1418aa();while(!![]){try{const _0x47e69c=parseInt(_0x56e1ac(0x20e))/0x1+-parseInt(_0x56e1ac(0x1f7))/0x2*(parseInt(_0x56e1ac(0x204))/0x3)+parseInt(_0x56e1ac(0x201))/0x4*(-parseInt(_0x56e1ac(0x1ec))/0x5)+parseInt(_0x56e1ac(0x202))/0x6*(parseInt(_0x56e1ac(0x1eb))/0x7)+-parseInt(_0x56e1ac(0x1ed))/0x8*(-parseInt(_0x56e1ac(0x206))/0x9)+parseInt(_0x56e1ac(0x208))/0xa+parseInt(_0x56e1ac(0x1fe))/0xb*(-parseInt(_0x56e1ac(0x205))/0xc);if(_0x47e69c===_0x12269d)break;else _0x181824['push'](_0x181824['shift']());}catch(_0x36e8e2){_0x181824['push'](_0x181824['shift']());}}}(a46_0x408c,0x51c29));import{CLI_BIN_NAME}from'../../constant/cli.js';function a46_0x2017(_0xa5de78,_0x2b4b91){_0xa5de78=_0xa5de78-0x1eb;const _0x408cbf=a46_0x408c();let _0x2017f1=_0x408cbf[_0xa5de78];return _0x2017f1;}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x6071df(0x1f5),a46_0x6071df(0x1fa)]),NON_TERMINAL_STATUSES=new Set([a46_0x6071df(0x209),a46_0x6071df(0x20b)]);export function normalizeAsyncTask(_0x5c17b0){const _0x100461=a46_0x6071df,_0x330aa7=typeof _0x5c17b0?.[_0x100461(0x1fb)]===_0x100461(0x1f2)?_0x5c17b0[_0x100461(0x1fb)][_0x100461(0x203)]():'';if(!_0x330aa7)throw CliErrors['apiError'](_0x100461(0x20f));const _0x1d0f9c=typeof _0x5c17b0[_0x100461(0x20a)]==='string'?_0x5c17b0['status'][_0x100461(0x203)]()[_0x100461(0x1f1)]():'';if(!_0x1d0f9c)throw CliErrors['apiError'](_0x100461(0x1f9)+_0x330aa7+_0x100461(0x1ff));return{'taskId':_0x330aa7,'status':_0x1d0f9c,'errorMessage':typeof _0x5c17b0[_0x100461(0x210)]===_0x100461(0x1f2)&&_0x5c17b0['errorMessage']['trim']()?_0x5c17b0[_0x100461(0x210)][_0x100461(0x203)]():null,'isTerminal':TERMINAL_STATUSES[_0x100461(0x1ee)](_0x1d0f9c),'knownStatus':TERMINAL_STATUSES[_0x100461(0x1ee)](_0x1d0f9c)||NON_TERMINAL_STATUSES[_0x100461(0x1ee)](_0x1d0f9c)};}export function buildAsyncTaskStatusCommand(_0x416fc2,_0x726370){const _0x1bd4e4=a46_0x6071df;return CLI_BIN_NAME+_0x1bd4e4(0x1fd)+quoteShellArg(_0x416fc2)+_0x1bd4e4(0x1f4)+quoteShellArg(_0x726370)+_0x1bd4e4(0x200);}export function asyncTaskMessage(_0x2941dd){const _0x43cac3=a46_0x6071df;switch(_0x2941dd[_0x43cac3(0x20a)]){case _0x43cac3(0x209):return _0x43cac3(0x1f3)+_0x2941dd[_0x43cac3(0x1fb)]+_0x43cac3(0x1f0);case _0x43cac3(0x20b):return'Task\x20'+_0x2941dd[_0x43cac3(0x1fb)]+_0x43cac3(0x1fc);case _0x43cac3(0x1f5):return _0x43cac3(0x1f3)+_0x2941dd[_0x43cac3(0x1fb)]+_0x43cac3(0x20c);case _0x43cac3(0x1fa):return _0x2941dd[_0x43cac3(0x210)]?_0x43cac3(0x1f3)+_0x2941dd[_0x43cac3(0x1fb)]+_0x43cac3(0x1f8)+_0x2941dd[_0x43cac3(0x210)]:_0x43cac3(0x1f3)+_0x2941dd[_0x43cac3(0x1fb)]+_0x43cac3(0x1ef);default:return _0x43cac3(0x1f3)+_0x2941dd[_0x43cac3(0x1fb)]+_0x43cac3(0x1f6)+_0x2941dd['status']+'.';}}function quoteShellArg(_0x155a12){const _0x20629a=a46_0x6071df;return'\x27'+_0x155a12[_0x20629a(0x20d)](/'/g,_0x20629a(0x207))+'\x27';}
@@ -1 +1 @@
1
- (function(_0x10d252,_0x3e1398){var _0x46813e=a47_0x5712,_0x24a67d=_0x10d252();while(!![]){try{var _0x3a49c5=parseInt(_0x46813e(0x141))/0x1+-parseInt(_0x46813e(0x142))/0x2+-parseInt(_0x46813e(0x145))/0x3*(-parseInt(_0x46813e(0x147))/0x4)+-parseInt(_0x46813e(0x143))/0x5+-parseInt(_0x46813e(0x144))/0x6+parseInt(_0x46813e(0x149))/0x7+parseInt(_0x46813e(0x146))/0x8*(parseInt(_0x46813e(0x14a))/0x9);if(_0x3a49c5===_0x3e1398)break;else _0x24a67d['push'](_0x24a67d['shift']());}catch(_0xae198d){_0x24a67d['push'](_0x24a67d['shift']());}}}(a47_0x4fe7,0x6aa28));function a47_0x4fe7(){var _0x982395=['8uKOjnM','1156khVTGK','defineProperties','5472446wJoRMF','3796614QWjOVB','description','550559yWWQOm','1283764RRKpju','3768395yDfBhn','3996126bierHS','7725kJOqEd'];a47_0x4fe7=function(){return _0x982395;};return a47_0x4fe7();}function a47_0x5712(_0xe290db,_0x5e9b49){_0xe290db=_0xe290db-0x140;var _0x4fe785=a47_0x4fe7();var _0x571281=_0x4fe785[_0xe290db];return _0x571281;}export function asDryRunResult(_0x4a8744,_0x5507c5){var _0x172713=a47_0x5712;return Object[_0x172713(0x148)](_0x4a8744,{'method':{'value':_0x5507c5['method'],'enumerable':![]},'url':{'value':_0x5507c5['url'],'enumerable':![]},..._0x5507c5['description']?{'description':{'value':_0x5507c5[_0x172713(0x140)],'enumerable':![]}}:{}});}
1
+ function a47_0x10ff(){var _0x1d953e=['2956812QDoPOt','2616390Rxutnu','method','478330AerKhe','31QvTUTm','13880QVgCtZ','62114LwuVmQ','16603551iWkSZt','802304tfPWPq','786RvXcXg','description'];a47_0x10ff=function(){return _0x1d953e;};return a47_0x10ff();}(function(_0x558b02,_0x5eed62){var _0x472d91=a47_0x3f5c,_0x62594f=_0x558b02();while(!![]){try{var _0x5cc636=-parseInt(_0x472d91(0x16f))/0x1*(-parseInt(_0x472d91(0x171))/0x2)+parseInt(_0x472d91(0x174))/0x3*(parseInt(_0x472d91(0x170))/0x4)+parseInt(_0x472d91(0x16e))/0x5+parseInt(_0x472d91(0x176))/0x6+parseInt(_0x472d91(0x16c))/0x7+-parseInt(_0x472d91(0x173))/0x8+-parseInt(_0x472d91(0x172))/0x9;if(_0x5cc636===_0x5eed62)break;else _0x62594f['push'](_0x62594f['shift']());}catch(_0x35a334){_0x62594f['push'](_0x62594f['shift']());}}}(a47_0x10ff,0xd90ba));function a47_0x3f5c(_0x5aaf88,_0x1d7e96){_0x5aaf88=_0x5aaf88-0x16c;var _0x10ff89=a47_0x10ff();var _0x3f5cbf=_0x10ff89[_0x5aaf88];return _0x3f5cbf;}export function asDryRunResult(_0x5373f3,_0x421c18){var _0x425eaa=a47_0x3f5c;return Object['defineProperties'](_0x5373f3,{'method':{'value':_0x421c18[_0x425eaa(0x16d)],'enumerable':![]},'url':{'value':_0x421c18['url'],'enumerable':![]},..._0x421c18[_0x425eaa(0x175)]?{'description':{'value':_0x421c18[_0x425eaa(0x175)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a48_0x29eb74=a48_0x2840;(function(_0x3c0087,_0x448188){const _0xea14eb=a48_0x2840,_0x2615d3=_0x3c0087();while(!![]){try{const _0xa4fedb=parseInt(_0xea14eb(0x8d))/0x1*(parseInt(_0xea14eb(0x94))/0x2)+parseInt(_0xea14eb(0x84))/0x3*(-parseInt(_0xea14eb(0x95))/0x4)+-parseInt(_0xea14eb(0x97))/0x5+-parseInt(_0xea14eb(0x8a))/0x6*(-parseInt(_0xea14eb(0x91))/0x7)+parseInt(_0xea14eb(0x8b))/0x8+-parseInt(_0xea14eb(0x89))/0x9+parseInt(_0xea14eb(0x83))/0xa;if(_0xa4fedb===_0x448188)break;else _0x2615d3['push'](_0x2615d3['shift']());}catch(_0x42697a){_0x2615d3['push'](_0x2615d3['shift']());}}}(a48_0x5476,0x1d997));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x29eb74(0x8c)};export const CODE_FLAG={'name':'code','type':a48_0x29eb74(0x98),'required':!![],'description':a48_0x29eb74(0x96),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x29eb74(0x85),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};function a48_0x5476(){const _0x3b5e27=['72RARGsK','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','dbtype','POSTGRESQL','568351MVtglf','Database\x20product\x20type','App\x20code\x20(e.g.\x20app-xxxxx)','5514qMwImC','39428oQNZBU','Dataset\x20code\x20(32-char\x20hex\x20UUID)','1093750HiYVnK','string','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','2573350UgRcso','54lxbqau','datasetcode','sqlcode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','number','262539VhsxXt','6VKoExt','76432tJWFHf','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'];a48_0x5476=function(){return _0x3b5e27;};return a48_0x5476();}function a48_0x2840(_0x364be4,_0x4315f0){_0x364be4=_0x364be4-0x83;const _0x547606=a48_0x5476();let _0x284068=_0x547606[_0x364be4];return _0x284068;}export const SQLCODE_FLAG={'name':a48_0x29eb74(0x86),'type':a48_0x29eb74(0x98),'required':!![],'description':a48_0x29eb74(0x99),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x29eb74(0x8e)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a48_0x29eb74(0x98),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x29eb74(0x93)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x29eb74(0x88),'required':!![],'description':a48_0x29eb74(0x87)};export const DB_TYPE_FLAG={'name':a48_0x29eb74(0x8f),'type':a48_0x29eb74(0x98),'required':!![],'description':a48_0x29eb74(0x92),'enum':['MYSQL',a48_0x29eb74(0x90)]};
1
+ const a48_0xb64d0a=a48_0x386b;(function(_0x13ccc3,_0xb50892){const _0x24a693=a48_0x386b,_0x4ee045=_0x13ccc3();while(!![]){try{const _0xabce30=-parseInt(_0x24a693(0x81))/0x1*(-parseInt(_0x24a693(0x90))/0x2)+-parseInt(_0x24a693(0x85))/0x3*(-parseInt(_0x24a693(0x8f))/0x4)+-parseInt(_0x24a693(0x94))/0x5+parseInt(_0x24a693(0x8c))/0x6+parseInt(_0x24a693(0x88))/0x7*(parseInt(_0x24a693(0x89))/0x8)+parseInt(_0x24a693(0x83))/0x9+parseInt(_0x24a693(0x93))/0xa*(-parseInt(_0x24a693(0x87))/0xb);if(_0xabce30===_0xb50892)break;else _0x4ee045['push'](_0x4ee045['shift']());}catch(_0x2d3077){_0x4ee045['push'](_0x4ee045['shift']());}}}(a48_0x1147,0xdc2a6));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};function a48_0x386b(_0x511796,_0x30a9c3){_0x511796=_0x511796-0x80;const _0x1147ff=a48_0x1147();let _0x386b6=_0x1147ff[_0x511796];return _0x386b6;}function a48_0x1147(){const _0x5504a2=['string','1460682fEiTXK','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','datasetcode','1604QnYwxk','10ndKUtp','MYSQL','POSTGRESQL','610tCrEbb','6211440nvwKkr','dbtype','291013FQnMTb','number','6375231BhFJrL','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','5574joQsur','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','259083NbFROt','38990qdNBOa','616eJCeWN','sqlcode'];a48_0x1147=function(){return _0x5504a2;};return a48_0x1147();}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0xb64d0a(0x8e),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a48_0xb64d0a(0x8a),'type':'string','required':!![],'description':a48_0xb64d0a(0x8d),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0xb64d0a(0x84)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a48_0xb64d0a(0x8b),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0xb64d0a(0x82),'required':!![],'description':a48_0xb64d0a(0x86)};export const DB_TYPE_FLAG={'name':a48_0xb64d0a(0x80),'type':a48_0xb64d0a(0x8b),'required':!![],'description':'Database\x20product\x20type','enum':[a48_0xb64d0a(0x91),a48_0xb64d0a(0x92)]};
@@ -1 +1 @@
1
- function a49_0x3511(){const _0x4deb68=['trim','2290878ragtih','6goWnzT','1539034YOQMAx','ceil','toFixed','File\x20is\x20not\x20a\x20regular\x20file:\x20','validation','6Fvrodd','1163228KEFphk','3878510AcmHyT','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','isFile','8XovatX','590540MDbRVc','166833Jivrxi','\x20MB','237826vjYNyM','size','File\x20not\x20found:\x20'];a49_0x3511=function(){return _0x4deb68;};return a49_0x3511();}(function(_0x355a01,_0x352d7d){const _0x591927=a49_0x24c4,_0x5a384e=_0x355a01();while(!![]){try{const _0x26c9b7=parseInt(_0x591927(0x1a1))/0x1+-parseInt(_0x591927(0x1a3))/0x2*(-parseInt(_0x591927(0x19a))/0x3)+parseInt(_0x591927(0x19b))/0x4+-parseInt(_0x591927(0x1a0))/0x5*(parseInt(_0x591927(0x1a8))/0x6)+parseInt(_0x591927(0x1a9))/0x7+-parseInt(_0x591927(0x19f))/0x8*(parseInt(_0x591927(0x1a7))/0x9)+-parseInt(_0x591927(0x19c))/0xa;if(_0x26c9b7===_0x352d7d)break;else _0x5a384e['push'](_0x5a384e['shift']());}catch(_0x4f4549){_0x5a384e['push'](_0x5a384e['shift']());}}}(a49_0x3511,0x25ccb));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x24c4(_0x2ad3f2,_0x2c247a){_0x2ad3f2=_0x2ad3f2-0x197;const _0x351127=a49_0x3511();let _0x24c45f=_0x351127[_0x2ad3f2];return _0x24c45f;}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x1ff7da){const _0x27bac8=a49_0x24c4;if(_0x1ff7da>=BYTES_PER_MB){const _0x26267c=Math[_0x27bac8(0x1aa)](_0x1ff7da/BYTES_PER_MB*0x64)/0x64;return _0x26267c[_0x27bac8(0x197)](0x2)+_0x27bac8(0x1a2);}return _0x1ff7da+'\x20B';}export function requireDevelopmentUploadFile(_0x19d64c,_0x5bd7cc){const _0x28c9f4=a49_0x24c4,_0x984540=_0x19d64c[_0x28c9f4(0x1a6)]();if(!_0x984540)throw CliErrors[_0x28c9f4(0x199)](_0x5bd7cc+'\x20path\x20is\x20required.');if(!existsSync(_0x984540))throw CliErrors[_0x28c9f4(0x199)](_0x28c9f4(0x1a5)+_0x984540);const _0x4286b1=statSync(_0x984540);if(!_0x4286b1[_0x28c9f4(0x19e)]())throw CliErrors[_0x28c9f4(0x199)](_0x28c9f4(0x198)+_0x984540);if(_0x4286b1[_0x28c9f4(0x1a4)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x28c9f4(0x19d)+_0x984540+'\x20('+formatBytes(_0x4286b1['size'])+')');return{'path':_0x984540,'size':_0x4286b1[_0x28c9f4(0x1a4)]};}
1
+ (function(_0x38ca43,_0x239f02){const _0x4986e9=a49_0x55fe,_0x574eb4=_0x38ca43();while(!![]){try{const _0x5a09fd=parseInt(_0x4986e9(0x124))/0x1+parseInt(_0x4986e9(0x125))/0x2*(-parseInt(_0x4986e9(0x114))/0x3)+parseInt(_0x4986e9(0x117))/0x4*(parseInt(_0x4986e9(0x113))/0x5)+-parseInt(_0x4986e9(0x115))/0x6*(parseInt(_0x4986e9(0x11c))/0x7)+parseInt(_0x4986e9(0x11b))/0x8*(parseInt(_0x4986e9(0x123))/0x9)+-parseInt(_0x4986e9(0x11f))/0xa*(parseInt(_0x4986e9(0x11e))/0xb)+-parseInt(_0x4986e9(0x119))/0xc*(parseInt(_0x4986e9(0x118))/0xd);if(_0x5a09fd===_0x239f02)break;else _0x574eb4['push'](_0x574eb4['shift']());}catch(_0x481ed1){_0x574eb4['push'](_0x574eb4['shift']());}}}(a49_0x3346,0x47984));function a49_0x55fe(_0x44a1c6,_0x361726){_0x44a1c6=_0x44a1c6-0x113;const _0x334613=a49_0x3346();let _0x55fecd=_0x334613[_0x44a1c6];return _0x55fecd;}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(_0x29dba2){const _0x441158=a49_0x55fe;if(_0x29dba2>=BYTES_PER_MB){const _0x1f0bdd=Math[_0x441158(0x120)](_0x29dba2/BYTES_PER_MB*0x64)/0x64;return _0x1f0bdd[_0x441158(0x11a)](0x2)+'\x20MB';}return _0x29dba2+'\x20B';}function a49_0x3346(){const _0x50277d=['9816xNvrTH','size','1691805AdjHcx','54dMJium','2422878qSPDDA','\x20path\x20is\x20required.','4vljCKk','39RQZObx','140472yIMJWg','toFixed','1898280uhWbsp','7CBUcjt','trim','44BfswUH','750140ycuHFI','ceil','isFile','validation','9WuJknM','544937ddkdAr'];a49_0x3346=function(){return _0x50277d;};return a49_0x3346();}export function requireDevelopmentUploadFile(_0x249e02,_0x5824e8){const _0x578416=a49_0x55fe,_0x5112f0=_0x249e02[_0x578416(0x11d)]();if(!_0x5112f0)throw CliErrors['validation'](_0x5824e8+_0x578416(0x116));if(!existsSync(_0x5112f0))throw CliErrors[_0x578416(0x122)]('File\x20not\x20found:\x20'+_0x5112f0);const _0x86bae6=statSync(_0x5112f0);if(!_0x86bae6[_0x578416(0x121)]())throw CliErrors[_0x578416(0x122)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5112f0);if(_0x86bae6[_0x578416(0x126)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x578416(0x122)]('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x5112f0+'\x20('+formatBytes(_0x86bae6[_0x578416(0x126)])+')');return{'path':_0x5112f0,'size':_0x86bae6[_0x578416(0x126)]};}
@@ -1 +1 @@
1
- function a50_0xdbf7(_0x5f14a9,_0x17b27c){_0x5f14a9=_0x5f14a9-0x1b9;const _0x3c23e3=a50_0x3c23();let _0xdbf72e=_0x3c23e3[_0x5f14a9];return _0xdbf72e;}function a50_0x3c23(){const _0xc7a19c=['App\x20Code\x20cannot\x20exceed\x20100\x20characters','511izaEwo','5440THpSXt','2128818CdrViE','2719260szmFpj','1859160xkSNlQ','29296uqmGgo','3FwxhRL','205782sUxvPZ','length','15480960UnKXgn','test','2464WkxyhM','App\x20Code\x20cannot\x20be\x20empty','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'];a50_0x3c23=function(){return _0xc7a19c;};return a50_0x3c23();}(function(_0xcfb267,_0x16becc){const _0x48f542=a50_0xdbf7,_0x1f5065=_0xcfb267();while(!![]){try{const _0x30ff99=parseInt(_0x48f542(0x1bb))/0x1*(-parseInt(_0x48f542(0x1bc))/0x2)+parseInt(_0x48f542(0x1c6))/0x3+-parseInt(_0x48f542(0x1c0))/0x4*(parseInt(_0x48f542(0x1c5))/0x5)+-parseInt(_0x48f542(0x1b9))/0x6+-parseInt(_0x48f542(0x1c4))/0x7*(parseInt(_0x48f542(0x1ba))/0x8)+-parseInt(_0x48f542(0x1c7))/0x9+parseInt(_0x48f542(0x1be))/0xa;if(_0x30ff99===_0x16becc)break;else _0x1f5065['push'](_0x1f5065['shift']());}catch(_0x4dd0f3){_0x1f5065['push'](_0x1f5065['shift']());}}}(a50_0x3c23,0x61887));export function validateAppcode(_0x57bc8d){const _0x3e20d8=a50_0xdbf7,_0xa65373=_0x57bc8d['trim']();if(!_0xa65373)return{'valid':![],'message':_0x3e20d8(0x1c1)};if(_0xa65373[_0x3e20d8(0x1bd)]>0x64)return{'valid':![],'message':_0x3e20d8(0x1c3)};if(!/^[A-Za-z0-9_-]+$/[_0x3e20d8(0x1bf)](_0xa65373))return{'valid':![],'message':_0x3e20d8(0x1c2)};return{'valid':!![]};}
1
+ (function(_0x17ab9c,_0x5d2c2a){const _0xac0169=a50_0x1466,_0x50d872=_0x17ab9c();while(!![]){try{const _0x587af3=parseInt(_0xac0169(0x12f))/0x1+-parseInt(_0xac0169(0x12a))/0x2+parseInt(_0xac0169(0x137))/0x3+parseInt(_0xac0169(0x134))/0x4+parseInt(_0xac0169(0x12d))/0x5+-parseInt(_0xac0169(0x133))/0x6+parseInt(_0xac0169(0x12c))/0x7*(-parseInt(_0xac0169(0x135))/0x8);if(_0x587af3===_0x5d2c2a)break;else _0x50d872['push'](_0x50d872['shift']());}catch(_0x4a49bd){_0x50d872['push'](_0x50d872['shift']());}}}(a50_0x4231,0x3d476));function a50_0x1466(_0x5f3137,_0x1840f8){_0x5f3137=_0x5f3137-0x12a;const _0x423168=a50_0x4231();let _0x146657=_0x423168[_0x5f3137];return _0x146657;}export function validateAppcode(_0x3945d6){const _0x1d0648=a50_0x1466,_0x574bcd=_0x3945d6[_0x1d0648(0x12e)]();if(!_0x574bcd)return{'valid':![],'message':_0x1d0648(0x136)};if(_0x574bcd[_0x1d0648(0x12b)]>0x64)return{'valid':![],'message':_0x1d0648(0x130)};if(!/^[A-Za-z0-9_-]+$/[_0x1d0648(0x131)](_0x574bcd))return{'valid':![],'message':_0x1d0648(0x132)};return{'valid':!![]};}function a50_0x4231(){const _0x5ad6d4=['trim','142374clPved','App\x20Code\x20cannot\x20exceed\x20100\x20characters','test','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','1192368aShRbG','1572800bUqUTZ','8ksrlFR','App\x20Code\x20cannot\x20be\x20empty','833565vChBRW','393958hnzVma','length','4614106lUrCXe','2462170SEFzvp'];a50_0x4231=function(){return _0x5ad6d4;};return a50_0x4231();}
@@ -1 +1 @@
1
- const a51_0xaca1d5=a51_0x19ca;(function(_0x2c79f1,_0x1beee5){const _0x136410=a51_0x19ca,_0x3443d5=_0x2c79f1();while(!![]){try{const _0x69cc44=parseInt(_0x136410(0x1a9))/0x1*(-parseInt(_0x136410(0x1ab))/0x2)+parseInt(_0x136410(0x1b0))/0x3+parseInt(_0x136410(0x1b8))/0x4+parseInt(_0x136410(0x1b9))/0x5+-parseInt(_0x136410(0x1bb))/0x6+parseInt(_0x136410(0x1be))/0x7*(parseInt(_0x136410(0x1bc))/0x8)+parseInt(_0x136410(0x1b3))/0x9*(-parseInt(_0x136410(0x1b7))/0xa);if(_0x69cc44===_0x1beee5)break;else _0x3443d5['push'](_0x3443d5['shift']());}catch(_0x171181){_0x3443d5['push'](_0x3443d5['shift']());}}}(a51_0x276c,0xd8f3a));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a51_0x276c(){const _0x290ae7=['9wjgzxH','Missing\x20key.','Get\x20a\x20config\x20value\x20by\x20key','Key\x20not\x20found:\x20','14283290ACwICJ','2581924iskkXK','7456825ZiTpWx','get','909720MMRgvy','43024FtJxTr','string','1463ijuSXd','13382qQcrZL','read','248LaYXXo','validation','\x20config\x20get\x20--key\x20<key>','str','object','2601309qcuZXC','app','Usage:\x20'];a51_0x276c=function(){return _0x290ae7;};return a51_0x276c();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a51_0x19ca(_0x327cc4,_0x9001e){_0x327cc4=_0x327cc4-0x1a9;const _0x276c4f=a51_0x276c();let _0x19ca50=_0x276c4f[_0x327cc4];return _0x19ca50;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3febef){const _0x5cab39=a51_0x19ca,_0x10d982=_0x3febef[_0x5cab39(0x1ae)]('key');if(!_0x10d982)throw CliErrors[_0x5cab39(0x1ac)](_0x5cab39(0x1b4),_0x5cab39(0x1b2)+CLI_BIN_NAME+_0x5cab39(0x1ad));const _0x172a0a=readConfig(),_0x22d1d3=_0x10d982===_0x5cab39(0x1b1)?'appcode':_0x10d982,_0xc3cba2=_0x172a0a[_0x22d1d3];if(_0xc3cba2===undefined)throw CliErrors[_0x5cab39(0x1ac)](_0x5cab39(0x1b6)+_0x10d982);return{'ok':!![],'data':typeof _0xc3cba2==='object'?_0xc3cba2:{[_0x22d1d3]:_0xc3cba2},'message':typeof _0xc3cba2===_0x5cab39(0x1af)?undefined:String(_0xc3cba2)};}export const configGetDefinition={'service':'config','command':a51_0xaca1d5(0x1ba),'description':a51_0xaca1d5(0x1b5),'risk':a51_0xaca1d5(0x1aa),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0xaca1d5(0x1bd),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ function a51_0x5a67(){const _0x572ca3=['Usage:\x20','528241SyjaPY','117qdQmPt','228132LOqtDJ','8XiVcbT','243237kOcyQl','55cptYQZ','appcode','app','2711643lzNHYr','validation','17496PzIYJM','4608gsDAUL','48ayrWbF','2435811dyjYQY','205036HrJYGF','config','key','string','20FnjAnm','\x20config\x20get\x20--key\x20<key>','read','object'];a51_0x5a67=function(){return _0x572ca3;};return a51_0x5a67();}const a51_0xcc1a73=a51_0x5a3f;(function(_0xa1d3,_0x32ef36){const _0x960315=a51_0x5a3f,_0x5aa50c=_0xa1d3();while(!![]){try{const _0x7e2a9d=-parseInt(_0x960315(0x11d))/0x1*(parseInt(_0x960315(0x11c))/0x2)+parseInt(_0x960315(0x126))/0x3+parseInt(_0x960315(0x127))/0x4*(parseInt(_0x960315(0x11e))/0x5)+-parseInt(_0x960315(0x125))/0x6*(parseInt(_0x960315(0x119))/0x7)+parseInt(_0x960315(0x124))/0x8*(parseInt(_0x960315(0x123))/0x9)+-parseInt(_0x960315(0x12b))/0xa*(parseInt(_0x960315(0x121))/0xb)+parseInt(_0x960315(0x11b))/0xc*(parseInt(_0x960315(0x11a))/0xd);if(_0x7e2a9d===_0x32ef36)break;else _0x5aa50c['push'](_0x5aa50c['shift']());}catch(_0x296ec5){_0x5aa50c['push'](_0x5aa50c['shift']());}}}(a51_0x5a67,0x91bd7));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x4e4f2b){const _0x5ef589=a51_0x5a3f,_0x281a5d=_0x4e4f2b['str'](_0x5ef589(0x129));if(!_0x281a5d)throw CliErrors['validation']('Missing\x20key.',_0x5ef589(0x118)+CLI_BIN_NAME+_0x5ef589(0x115));const _0x27441a=readConfig(),_0x54a6c9=_0x281a5d===_0x5ef589(0x120)?_0x5ef589(0x11f):_0x281a5d,_0x397f40=_0x27441a[_0x54a6c9];if(_0x397f40===undefined)throw CliErrors[_0x5ef589(0x122)]('Key\x20not\x20found:\x20'+_0x281a5d);return{'ok':!![],'data':typeof _0x397f40===_0x5ef589(0x117)?_0x397f40:{[_0x54a6c9]:_0x397f40},'message':typeof _0x397f40===_0x5ef589(0x117)?undefined:String(_0x397f40)};}function a51_0x5a3f(_0x5a69f0,_0x368fc0){_0x5a69f0=_0x5a69f0-0x115;const _0x5a6730=a51_0x5a67();let _0x5a3f84=_0x5a6730[_0x5a69f0];return _0x5a3f84;}export const configGetDefinition={'service':a51_0xcc1a73(0x128),'command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a51_0xcc1a73(0x116),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0xcc1a73(0x12a),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- function a52_0x1594(){const _0x577292=['3818691qnownO','860276zkvQPI','24frPnjH','3042456zelDey','3820397zFjTEr','4375368RBEeeA','8WcvMEI','1749565zLSzQv','23714ftLhKP'];a52_0x1594=function(){return _0x577292;};return a52_0x1594();}function a52_0x5da6(_0x20b19a,_0x3b026e){_0x20b19a=_0x20b19a-0x184;const _0x1594e8=a52_0x1594();let _0x5da67d=_0x1594e8[_0x20b19a];return _0x5da67d;}(function(_0x280c66,_0x295b77){const _0x45167b=a52_0x5da6,_0x327f10=_0x280c66();while(!![]){try{const _0x55b37d=-parseInt(_0x45167b(0x189))/0x1*(parseInt(_0x45167b(0x18c))/0x2)+parseInt(_0x45167b(0x184))/0x3+-parseInt(_0x45167b(0x18b))/0x4+parseInt(_0x45167b(0x188))/0x5+parseInt(_0x45167b(0x186))/0x6+parseInt(_0x45167b(0x185))/0x7*(-parseInt(_0x45167b(0x187))/0x8)+-parseInt(_0x45167b(0x18a))/0x9;if(_0x55b37d===_0x295b77)break;else _0x327f10['push'](_0x327f10['shift']());}catch(_0x57367d){_0x327f10['push'](_0x327f10['shift']());}}}(a52_0x1594,0x983e2));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ function a52_0x49b5(){const _0xe93c51=['8153831wYvAse','1189120wzVuHL','6MRAjgq','173630hGAdoW','27mNYXrb','1048jTYsGv','1207122BDpzZE','837550EjBHIe','9033FUKvPZ','254075XSXkvO'];a52_0x49b5=function(){return _0xe93c51;};return a52_0x49b5();}(function(_0x35d7d5,_0x8b7718){const _0xfb11ee=a52_0x44e1,_0x2de49d=_0x35d7d5();while(!![]){try{const _0x4b5dad=parseInt(_0xfb11ee(0x6b))/0x1+parseInt(_0xfb11ee(0x6c))/0x2+parseInt(_0xfb11ee(0x6d))/0x3*(parseInt(_0xfb11ee(0x6a))/0x4)+-parseInt(_0xfb11ee(0x64))/0x5+parseInt(_0xfb11ee(0x67))/0x6*(-parseInt(_0xfb11ee(0x65))/0x7)+parseInt(_0xfb11ee(0x66))/0x8*(-parseInt(_0xfb11ee(0x69))/0x9)+-parseInt(_0xfb11ee(0x68))/0xa;if(_0x4b5dad===_0x8b7718)break;else _0x2de49d['push'](_0x2de49d['shift']());}catch(_0x1e5a2f){_0x2de49d['push'](_0x2de49d['shift']());}}}(a52_0x49b5,0xb3a68));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a52_0x44e1(_0x43b3d1,_0x8ddc51){_0x43b3d1=_0x43b3d1-0x64;const _0x49b531=a52_0x49b5();let _0x44e154=_0x49b531[_0x43b3d1];return _0x44e154;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];