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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/rename.js +1 -1
  113. package/lib/commands/menu/shared/compare-table.js +1 -1
  114. package/lib/commands/menu/shared/delete-plan.js +1 -1
  115. package/lib/commands/menu/shared/facts.js +1 -1
  116. package/lib/commands/menu/shared/index.js +1 -1
  117. package/lib/commands/menu/shared/inquirer.js +1 -1
  118. package/lib/commands/menu/shared/local-pages.js +1 -1
  119. package/lib/commands/menu/shared/logic.js +1 -1
  120. package/lib/commands/menu/shared/mutations.js +1 -1
  121. package/lib/commands/menu/shared/service.js +1 -1
  122. package/lib/commands/menu/shared/sync-core.js +1 -1
  123. package/lib/commands/menu/shared/update-core.js +1 -1
  124. package/lib/commands/menu/shared/valid-url.js +1 -1
  125. package/lib/commands/menu/sync.js +1 -1
  126. package/lib/commands/notification/config-list.js +1 -1
  127. package/lib/commands/notification/index.js +1 -1
  128. package/lib/commands/ocr/index.js +1 -1
  129. package/lib/commands/page/generate-start.js +1 -1
  130. package/lib/commands/page/generate-status.js +1 -1
  131. package/lib/commands/page/index.js +1 -1
  132. package/lib/commands/page/pull.js +1 -1
  133. package/lib/commands/page/push.js +1 -1
  134. package/lib/commands/page/relation-audit.js +1 -1
  135. package/lib/commands/page/restore.js +1 -1
  136. package/lib/commands/page/shared.js +1 -1
  137. package/lib/commands/page/standard-page-status.js +1 -1
  138. package/lib/commands/page/sync.js +1 -1
  139. package/lib/commands/permit/index.js +1 -1
  140. package/lib/commands/permit/page-get.js +1 -1
  141. package/lib/commands/permit/page-set.js +1 -1
  142. package/lib/commands/permit/role-apis-set.js +1 -1
  143. package/lib/commands/permit/role-menus-set.js +1 -1
  144. package/lib/commands/permit/role-menus.js +1 -1
  145. package/lib/commands/permit/shared.js +1 -1
  146. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  147. package/lib/commands/project/create/format-elapsed.js +1 -1
  148. package/lib/commands/project/create/main.js +1 -1
  149. package/lib/commands/project/create/non-interactive.js +1 -1
  150. package/lib/commands/project/create/project-template-path.js +1 -1
  151. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  152. package/lib/commands/project/create/use-format-code.js +1 -1
  153. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  154. package/lib/commands/project/index.js +1 -1
  155. package/lib/commands/project/init.js +1 -1
  156. package/lib/commands/project/upgrade.js +1 -1
  157. package/lib/commands/registry.js +1 -1
  158. package/lib/commands/role/create.js +1 -1
  159. package/lib/commands/role/delete.js +1 -1
  160. package/lib/commands/role/detail.js +1 -1
  161. package/lib/commands/role/index.js +1 -1
  162. package/lib/commands/role/list.js +1 -1
  163. package/lib/commands/role/shared.js +1 -1
  164. package/lib/commands/role/update.js +1 -1
  165. package/lib/commands/role/user-add.js +1 -1
  166. package/lib/commands/role/user-remove.js +1 -1
  167. package/lib/commands/role/user-resolve.js +1 -1
  168. package/lib/commands/run/index.js +1 -1
  169. package/lib/commands/schema.js +1 -1
  170. package/lib/commands/sql/create.js +1 -1
  171. package/lib/commands/sql/delete.js +1 -1
  172. package/lib/commands/sql/detail.js +1 -1
  173. package/lib/commands/sql/exec.js +1 -1
  174. package/lib/commands/sql/index.js +1 -1
  175. package/lib/commands/sql/list.js +1 -1
  176. package/lib/commands/sql/pull.js +1 -1
  177. package/lib/commands/sql/push.js +1 -1
  178. package/lib/commands/sql/save.js +1 -1
  179. package/lib/commands/sql/shared.js +1 -1
  180. package/lib/commands/sql/status.js +1 -1
  181. package/lib/commands/sql/validate.js +1 -1
  182. package/lib/commands/task/index.js +1 -1
  183. package/lib/commands/task/status.js +1 -1
  184. package/lib/commands/workspace/add.js +1 -1
  185. package/lib/commands/workspace/index.js +1 -1
  186. package/lib/commands/workspace/remove.js +1 -1
  187. package/lib/config/schema.js +1 -1
  188. package/lib/constant/cdn.js +1 -1
  189. package/lib/constant/cli.js +1 -1
  190. package/lib/constant/defaults.js +1 -1
  191. package/lib/constant/domain.js +1 -1
  192. package/lib/constant/env.js +1 -1
  193. package/lib/constant/output.js +1 -1
  194. package/lib/constant/paths.js +1 -1
  195. package/lib/constant/risk.js +1 -1
  196. package/lib/context/app-resolver.js +1 -1
  197. package/lib/context/auth-resolver.js +1 -1
  198. package/lib/context/config-loader.js +1 -1
  199. package/lib/context.js +1 -1
  200. package/lib/core/alias-resolver.js +1 -1
  201. package/lib/core/api-client.js +1 -1
  202. package/lib/core/bff/config.js +1 -1
  203. package/lib/core/bff/file-system.js +1 -1
  204. package/lib/core/bff/hash.js +1 -1
  205. package/lib/core/bff/lock.js +1 -1
  206. package/lib/core/bff/utils.js +1 -1
  207. package/lib/core/db-resolver.js +1 -1
  208. package/lib/core/page/file-system.js +1 -1
  209. package/lib/core/page/hash.js +1 -1
  210. package/lib/core/page/lock.js +1 -1
  211. package/lib/core/sql-index-auditor.js +1 -1
  212. package/lib/core/sql-sync/config.js +1 -1
  213. package/lib/core/sql-sync/file-system.js +1 -1
  214. package/lib/core/sql-sync/hash.js +1 -1
  215. package/lib/core/sql-sync/lock.js +1 -1
  216. package/lib/core/sql-sync/utils.js +1 -1
  217. package/lib/core/sql-validator.js +1 -1
  218. package/lib/errors.js +1 -1
  219. package/lib/framework/build-all-flags.js +1 -1
  220. package/lib/framework/error-output.js +1 -1
  221. package/lib/framework/explicit-yes.js +1 -1
  222. package/lib/framework/flags.js +1 -1
  223. package/lib/framework/help.js +1 -1
  224. package/lib/framework/index.js +1 -1
  225. package/lib/framework/output.js +1 -1
  226. package/lib/framework/response.js +1 -1
  227. package/lib/framework/runner-alias.js +1 -1
  228. package/lib/framework/runner.js +1 -1
  229. package/lib/framework/schema-export.js +1 -1
  230. package/lib/framework/types.js +1 -1
  231. package/lib/generated/build-info.js +1 -1
  232. package/lib/help.js +1 -1
  233. package/lib/skills/main.js +1 -1
  234. package/lib/skills/npx-skills-add.js +1 -1
  235. package/lib/telemetry/cli-command-trace.js +1 -1
  236. package/lib/telemetry/cli-help-trace.js +1 -1
  237. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  238. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  239. package/lib/telemetry/send-cli-trace-log.js +1 -1
  240. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  241. package/lib/utils/ai_config.js +1 -1
  242. package/lib/utils/apply-jq-filter.js +1 -1
  243. package/lib/utils/cdn-config.js +1 -1
  244. package/lib/utils/check-sdk-version.js +1 -1
  245. package/lib/utils/cli-version-check.js +1 -1
  246. package/lib/utils/cli-version-policy.js +1 -1
  247. package/lib/utils/config.js +1 -1
  248. package/lib/utils/copy-directory.js +1 -1
  249. package/lib/utils/entity-with-id.js +1 -1
  250. package/lib/utils/file-utils.js +1 -1
  251. package/lib/utils/guides-cdn.js +1 -1
  252. package/lib/utils/http-client.js +1 -1
  253. package/lib/utils/is-non-interactive.js +1 -1
  254. package/lib/utils/logger.js +1 -1
  255. package/lib/utils/params.js +1 -1
  256. package/lib/utils/platform.js +1 -1
  257. package/lib/utils/rules-cdn.js +1 -1
  258. package/lib/utils/sleep.js +1 -1
  259. package/lib/utils/template-replacer.js +1 -1
  260. package/lib/utils/update-notice.js +1 -1
  261. package/lib/utils/version.js +1 -1
  262. package/lib/utils/with-active-cookie.js +1 -1
  263. package/lib/utils/write-cli-side-channel.js +1 -1
  264. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x1bad75=a36_0x2732;(function(_0x3d37b3,_0x269b28){const _0x31491c=a36_0x2732,_0x4a9c3b=_0x3d37b3();while(!![]){try{const _0x4f70f7=-parseInt(_0x31491c(0x1c7))/0x1+parseInt(_0x31491c(0x1aa))/0x2+parseInt(_0x31491c(0x1a8))/0x3*(parseInt(_0x31491c(0x1da))/0x4)+parseInt(_0x31491c(0x1d4))/0x5+-parseInt(_0x31491c(0x1d2))/0x6*(parseInt(_0x31491c(0x1d8))/0x7)+parseInt(_0x31491c(0x1b2))/0x8+parseInt(_0x31491c(0x1d0))/0x9;if(_0x4f70f7===_0x269b28)break;else _0x4a9c3b['push'](_0x4a9c3b['shift']());}catch(_0x929e8a){_0x4a9c3b['push'](_0x4a9c3b['shift']());}}}(a36_0x47be,0x7f5e9));function a36_0x47be(){const _0x31588f=['yes','local\x20unsynced\x20changes','alias','boolean','No\x20remote\x20BFF\x20scripts\x20found.','unresolvable\x20target\x20path','toLowerCase','scriptContent','\x20pulled,\x20','stringify','filePath','question','&type=','map','lockFilePath','str','993430XzIGwd','force','lastSync','COMMON','push','length','Pull\x20complete:\x20','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','parse','4771242EuqjsI','Force\x20pull\x20cancelled.','644994kYmXVK','version','418025iWyGRp','GET','Pull\x20only\x20this\x20script\x20type','functions','49dAELcq','toISOString','12CkAvEk','hookLocation','HOOK','bff','bool','message','Remote\x20script\x20missing\x20id.','nonInteractive','\x20failed','Force\x20overwrite\x20local\x20unsynced\x20changes','datasetCode','apps','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','lockKey','string','would_pull','ENDPOINT','functionNode','close','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','all','701082MstQcR','functionName','1747886RODUos','stderr','scriptType','type','utf8','validation','appCode','pull','630880WljavO','stdin','operationType','skipped','write'];a36_0x47be=function(){return _0x31588f;};return a36_0x47be();}import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x1bad75(0x1dd),'command':'pull','description':a36_0x1bad75(0x19f),'risk':a36_0x1bad75(0x1b6),'flags':[{'name':'type','type':a36_0x1bad75(0x1a1),'description':a36_0x1bad75(0x1d6),'enum':[a36_0x1bad75(0x1ca),a36_0x1bad75(0x1a3),a36_0x1bad75(0x1dc)]},{'name':'force','type':a36_0x1bad75(0x1ba),'description':a36_0x1bad75(0x1e3)}],async 'dryRun'(_0x577745){const _0x3ca20d=a36_0x1bad75,_0x4e829a=loadBffProjectConfig(_0x577745['appCode']),_0xedd1b8=await readBffLockFile(_0x4e829a[_0x3ca20d(0x1c5)]),{appLock:_0x438955}=ensureLockScope(_0xedd1b8??createEmptyBffLock(),_0x577745[_0x3ca20d(0x1b0)],_0x4e829a['scriptsRoot'],_0x3ca20d(0x1b1)),_0x19dba3=normalizeBffType(_0x577745['str']('type'))??undefined,_0x8f3b5f=buildDatasetCodeToAliasMap(_0x577745['apiDir'],_0x577745[_0x3ca20d(0x1b0)]),[_0x580b0c,_0x1a4552]=await Promise[_0x3ca20d(0x1a7)]([listBffScripts(_0x577745['appCode'],_0x19dba3),getBffScriptStatistics(_0x577745[_0x3ca20d(0x1b0)])]),_0xc64589=createHookLocationMap(_0x1a4552),_0x345586=[];for(const _0x4a9aaf of _0x580b0c){const _0x212968=resolveRemoteScriptTarget(_0x4e829a,_0x4a9aaf,_0xc64589,_0x438955[_0x3ca20d(0x1d7)],_0x8f3b5f);if(!_0x212968){_0x345586[_0x3ca20d(0x1cb)]({'scriptType':_0x4a9aaf[_0x3ca20d(0x1ac)],'functionName':_0x4a9aaf['functionName']??'','status':_0x3ca20d(0x1b5),'reason':_0x3ca20d(0x1bc)});continue;}const _0x161ab7=_0x438955[_0x3ca20d(0x1d7)][_0x212968['lockKey']],_0x556f26=_0x4a9aaf['scriptContent']!=null?computeContentHash(_0x4a9aaf[_0x3ca20d(0x1be)]):undefined,_0x372c5e=await hasUnsyncedLocalChanges(_0x212968[_0x3ca20d(0x1c1)],_0x161ab7,_0x556f26);_0x345586[_0x3ca20d(0x1cb)]({'lockKey':_0x212968[_0x3ca20d(0x1a0)],'filePath':_0x212968[_0x3ca20d(0x1c1)],'remoteId':_0x4a9aaf['id']??null,'status':_0x372c5e?'conflict':_0x3ca20d(0x1a2)});}return{'method':_0x3ca20d(0x1d5),'url':'/api/management/library/scripts/list?appCode='+_0x577745[_0x3ca20d(0x1b0)]+(_0x19dba3?_0x3ca20d(0x1c3)+_0x19dba3:''),'body':{'appCode':_0x577745[_0x3ca20d(0x1b0)],'filterType':_0x19dba3??null,'files':_0x345586},'description':'Would\x20inspect\x20'+_0x345586[_0x3ca20d(0x1cc)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x42786a){const _0x49da5e=a36_0x1bad75,_0xce2345=loadBffProjectConfig(_0x42786a[_0x49da5e(0x1b0)]),_0xd26a05=await readBffLockFile(_0xce2345[_0x49da5e(0x1c5)]),{lockData:_0xe524c7,appLock:_0xc5cc21}=ensureLockScope(_0xd26a05??createEmptyBffLock(),_0x42786a['appCode'],_0xce2345['scriptsRoot'],'pull'),_0x5716a9=normalizeBffType(_0x42786a['str'](_0x49da5e(0x1ad)))??undefined;if(_0x42786a[_0x49da5e(0x1c6)](_0x49da5e(0x1ad))&&!_0x5716a9)throw CliErrors[_0x49da5e(0x1af)](_0x49da5e(0x1a6));const [_0x4fc399,_0x141cba]=await Promise[_0x49da5e(0x1a7)]([listBffScripts(_0x42786a['appCode'],_0x5716a9),getBffScriptStatistics(_0x42786a[_0x49da5e(0x1b0)])]);if(_0x4fc399[_0x49da5e(0x1cc)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x49da5e(0x1bb)};const _0x4c1f56=_0x42786a[_0x49da5e(0x1de)](_0x49da5e(0x1c8));if(_0x4c1f56&&!_0x42786a['nonInteractive']){const _0x13a90b=await confirmForce();if(!_0x13a90b)throw CliErrors['cancelled'](_0x49da5e(0x1d1));}if(_0x4c1f56&&_0x42786a[_0x49da5e(0x1e1)]){}const _0x403ae0=buildDatasetCodeToAliasMap(_0x42786a['apiDir'],_0x42786a[_0x49da5e(0x1b0)]),_0x2f1bab=createHookLocationMap(_0x141cba),_0x5699f4=JSON[_0x49da5e(0x1cf)](JSON[_0x49da5e(0x1c0)](_0xe524c7)),_0x127b64=_0x42786a[_0x49da5e(0x1b0)],_0x185a1e=_0x5699f4[_0x49da5e(0x19e)][_0x127b64];if(!_0x185a1e)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x127b64+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x1d4d71=[],_0x37b018=[],_0x3f5bca=[];for(const _0xbb1bca of _0x4fc399){const _0x4bf268=resolveRemoteScriptTarget(_0xce2345,_0xbb1bca,_0x2f1bab,_0xc5cc21[_0x49da5e(0x1d7)],_0x403ae0);if(!_0x4bf268){_0x37b018['push']({'lockKey':_0xbb1bca[_0x49da5e(0x1ac)]+'/'+_0xbb1bca[_0x49da5e(0x1a9)],'reason':_0x49da5e(0x1bc)});continue;}const _0x54d7e3=_0xc5cc21[_0x49da5e(0x1d7)][_0x4bf268['lockKey']];try{if(!_0xbb1bca['id'])throw new Error(_0x49da5e(0x1e0));if(_0xbb1bca['scriptContent']==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x314589=_0xbb1bca[_0x49da5e(0x1be)],_0x4504e6=computeContentHash(_0x314589);if(!_0x4c1f56){const _0x37a576=await hasUnsyncedLocalChanges(_0x4bf268['filePath'],_0x54d7e3,_0x4504e6);if(_0x37a576){_0x37b018['push']({'lockKey':_0x4bf268[_0x49da5e(0x1a0)],'reason':_0x49da5e(0x1b8)});continue;}}await ensureParentDirectory(_0x4bf268[_0x49da5e(0x1c1)]),await writeFile(_0x4bf268[_0x49da5e(0x1c1)],_0x314589,_0x49da5e(0x1ae));const _0x22da90={'hash':_0x4504e6,'remoteId':_0xbb1bca['id'],'version':_0xbb1bca[_0x49da5e(0x1d3)]};_0x4bf268[_0x49da5e(0x1ad)]==='HOOK'&&_0x4bf268[_0x49da5e(0x1db)]&&(_0x22da90['alias']=_0x4bf268['hookLocation']['alias'],_0x22da90[_0x49da5e(0x19d)]=_0x4bf268[_0x49da5e(0x1db)][_0x49da5e(0x19d)],_0x22da90[_0x49da5e(0x1b4)]=_0x4bf268[_0x49da5e(0x1db)]['operationType'],_0x22da90[_0x49da5e(0x1a4)]=_0x4bf268['hookLocation'][_0x49da5e(0x1a4)]),_0x185a1e['functions'][_0x4bf268['lockKey']]=_0x22da90,_0x1d4d71[_0x49da5e(0x1cb)]({'lockKey':_0x4bf268[_0x49da5e(0x1a0)],'remoteId':_0xbb1bca['id']});}catch(_0x3c16f1){_0x3f5bca[_0x49da5e(0x1cb)]({'lockKey':_0x4bf268['lockKey'],'error':_0x3c16f1 instanceof Error?_0x3c16f1[_0x49da5e(0x1df)]:String(_0x3c16f1)});}}return _0x185a1e[_0x49da5e(0x1c9)]=new Date()[_0x49da5e(0x1d9)](),await writeBffLockFile(_0xce2345['lockFilePath'],_0x5699f4),{'ok':_0x3f5bca[_0x49da5e(0x1cc)]===0x0,'data':{'pulled':_0x1d4d71,'skipped':_0x37b018,'failed':_0x3f5bca},'message':_0x49da5e(0x1cd)+_0x1d4d71[_0x49da5e(0x1cc)]+_0x49da5e(0x1bf)+_0x37b018[_0x49da5e(0x1cc)]+'\x20skipped,\x20'+_0x3f5bca[_0x49da5e(0x1cc)]+_0x49da5e(0x1e2)};}};async function hasUnsyncedLocalChanges(_0x1942d5,_0x997d11,_0x3ca7bc){if(!await fileExists(_0x1942d5))return![];const _0xa94ab7=await computeFileHash(_0x1942d5);if(!_0x997d11)return _0x3ca7bc?_0xa94ab7!==_0x3ca7bc:!![];return _0xa94ab7!==_0x997d11['hash'];}function buildDatasetCodeToAliasMap(_0x164b0d,_0x6896fe){const _0x1d0b2b=a36_0x1bad75,_0x50c64b=loadAliasMap(_0x164b0d,undefined,resolveApiFilePath(_0x164b0d,_0x6896fe));return new Map(_0x50c64b[_0x1d0b2b(0x1c4)](_0x1a1a51=>[_0x1a1a51[_0x1d0b2b(0x19d)],_0x1a1a51[_0x1d0b2b(0x1b9)]]));}function a36_0x2732(_0x5baa20,_0x1ff296){_0x5baa20=_0x5baa20-0x19d;const _0x47be9f=a36_0x47be();let _0x273230=_0x47be9f[_0x5baa20];return _0x273230;}async function confirmForce(){const _0x43f7ff=a36_0x1bad75,_0x5f32a3=createInterface({'input':process[_0x43f7ff(0x1b3)],'output':process[_0x43f7ff(0x1ab)]}),_0x43aa5d=await new Promise(_0x207b96=>{const _0x1c74c5=_0x43f7ff;_0x5f32a3[_0x1c74c5(0x1c2)](_0x1c74c5(0x1ce),_0x207b96);});return _0x5f32a3[_0x43f7ff(0x1a5)](),['y',_0x43f7ff(0x1b7)]['includes'](_0x43aa5d['trim']()[_0x43f7ff(0x1bd)]());}
1
+ const a36_0x35367b=a36_0x3bb3;function a36_0x3bb3(_0x426982,_0x2d85fa){_0x426982=_0x426982-0x144;const _0x294f05=a36_0x294f();let _0x3bb315=_0x294f05[_0x426982];return _0x3bb315;}function a36_0x294f(){const _0x4f93b9=['94746wiNejG','/api/management/library/scripts/list?appCode=','scriptContent','Force\x20overwrite\x20local\x20unsynced\x20changes','574354TkMHOG','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','HOOK','Remote\x20script\x20missing\x20content.','Remote\x20script\x20missing\x20id.','functionNode','88624EiwDIg','string','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','50GkqDFF','validation','2799aIGJAR','datasetCode','651716FMqFkr','filePath','toLowerCase','hash','stdin','yes','would_pull','boolean','unresolvable\x20target\x20path','type','functionName','stderr','functions','5190vXbRrK','\x22\x20not\x20found\x20after\x20ensureLockScope.','length','message','local\x20unsynced\x20changes','lockKey','4386907cRxqTX','Lock\x20scope\x20for\x20app\x20\x22','cancelled','ENDPOINT','lastSync','bff','version','includes','lockFilePath','\x20failed','No\x20remote\x20BFF\x20scripts\x20found.','apiDir','\x20remote\x20BFF\x20script(s)\x20for\x20pull','conflict','map','write','pull','8XXRvBI','&type=','all','Force\x20pull\x20cancelled.','\x20pulled,\x20','\x20skipped,\x20','hookLocation','utf8','trim','Pull\x20complete:\x20','str','apps','push','scriptsRoot','question','scriptType','Would\x20inspect\x20','stringify','nonInteractive','appCode','976284HxMmDd','toISOString','alias'];a36_0x294f=function(){return _0x4f93b9;};return a36_0x294f();}(function(_0x179f23,_0x8c784b){const _0x5bc112=a36_0x3bb3,_0x4e2b2e=_0x179f23();while(!![]){try{const _0x223b6d=-parseInt(_0x5bc112(0x18b))/0x1+parseInt(_0x5bc112(0x17e))/0x2+parseInt(_0x5bc112(0x177))/0x3+parseInt(_0x5bc112(0x184))/0x4+-parseInt(_0x5bc112(0x187))/0x5*(parseInt(_0x5bc112(0x17a))/0x6)+-parseInt(_0x5bc112(0x152))/0x7*(-parseInt(_0x5bc112(0x163))/0x8)+parseInt(_0x5bc112(0x189))/0x9*(parseInt(_0x5bc112(0x14c))/0xa);if(_0x223b6d===_0x8c784b)break;else _0x4e2b2e['push'](_0x4e2b2e['shift']());}catch(_0x5d412f){_0x4e2b2e['push'](_0x4e2b2e['shift']());}}}(a36_0x294f,0x95b7d));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x35367b(0x157),'command':a36_0x35367b(0x162),'description':a36_0x35367b(0x186),'risk':a36_0x35367b(0x161),'flags':[{'name':a36_0x35367b(0x148),'type':a36_0x35367b(0x185),'description':'Pull\x20only\x20this\x20script\x20type','enum':['COMMON',a36_0x35367b(0x155),a36_0x35367b(0x180)]},{'name':'force','type':a36_0x35367b(0x146),'description':a36_0x35367b(0x17d)}],async 'dryRun'(_0xa62aea){const _0x19d59a=a36_0x35367b,_0x1964c3=loadBffProjectConfig(_0xa62aea[_0x19d59a(0x176)]),_0x468769=await readBffLockFile(_0x1964c3[_0x19d59a(0x15a)]),{appLock:_0x12a4c6}=ensureLockScope(_0x468769??createEmptyBffLock(),_0xa62aea[_0x19d59a(0x176)],_0x1964c3[_0x19d59a(0x170)],_0x19d59a(0x162)),_0x34d89b=normalizeBffType(_0xa62aea[_0x19d59a(0x16d)](_0x19d59a(0x148)))??undefined,_0x56da37=buildDatasetCodeToAliasMap(_0xa62aea[_0x19d59a(0x15d)],_0xa62aea[_0x19d59a(0x176)]),[_0x5427b2,_0x142702]=await Promise[_0x19d59a(0x165)]([listBffScripts(_0xa62aea[_0x19d59a(0x176)],_0x34d89b),getBffScriptStatistics(_0xa62aea[_0x19d59a(0x176)])]),_0x1e33a9=createHookLocationMap(_0x142702),_0x274218=[];for(const _0x3abe66 of _0x5427b2){const _0x29adf1=resolveRemoteScriptTarget(_0x1964c3,_0x3abe66,_0x1e33a9,_0x12a4c6[_0x19d59a(0x14b)],_0x56da37);if(!_0x29adf1){_0x274218[_0x19d59a(0x16f)]({'scriptType':_0x3abe66['scriptType'],'functionName':_0x3abe66[_0x19d59a(0x149)]??'','status':'skipped','reason':_0x19d59a(0x147)});continue;}const _0x48c845=_0x12a4c6[_0x19d59a(0x14b)][_0x29adf1['lockKey']],_0x780864=_0x3abe66[_0x19d59a(0x17c)]!=null?computeContentHash(_0x3abe66[_0x19d59a(0x17c)]):undefined,_0x360828=await hasUnsyncedLocalChanges(_0x29adf1[_0x19d59a(0x18c)],_0x48c845,_0x780864);_0x274218[_0x19d59a(0x16f)]({'lockKey':_0x29adf1[_0x19d59a(0x151)],'filePath':_0x29adf1[_0x19d59a(0x18c)],'remoteId':_0x3abe66['id']??null,'status':_0x360828?_0x19d59a(0x15f):_0x19d59a(0x145)});}return{'method':'GET','url':_0x19d59a(0x17b)+_0xa62aea['appCode']+(_0x34d89b?_0x19d59a(0x164)+_0x34d89b:''),'body':{'appCode':_0xa62aea[_0x19d59a(0x176)],'filterType':_0x34d89b??null,'files':_0x274218},'description':_0x19d59a(0x173)+_0x274218['length']+_0x19d59a(0x15e)};},async 'execute'(_0x5b8886){const _0x103d04=a36_0x35367b,_0x4de4ff=loadBffProjectConfig(_0x5b8886[_0x103d04(0x176)]),_0x1ac24d=await readBffLockFile(_0x4de4ff['lockFilePath']),{lockData:_0x22d0b9,appLock:_0x390568}=ensureLockScope(_0x1ac24d??createEmptyBffLock(),_0x5b8886[_0x103d04(0x176)],_0x4de4ff[_0x103d04(0x170)],_0x103d04(0x162)),_0x13618e=normalizeBffType(_0x5b8886[_0x103d04(0x16d)]('type'))??undefined;if(_0x5b8886[_0x103d04(0x16d)]('type')&&!_0x13618e)throw CliErrors[_0x103d04(0x188)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x227a0d,_0x5dc9d7]=await Promise['all']([listBffScripts(_0x5b8886[_0x103d04(0x176)],_0x13618e),getBffScriptStatistics(_0x5b8886['appCode'])]);if(_0x227a0d[_0x103d04(0x14e)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x103d04(0x15c)};const _0x45f34f=_0x5b8886['bool']('force');if(_0x45f34f&&!_0x5b8886['nonInteractive']){const _0x34a990=await confirmForce();if(!_0x34a990)throw CliErrors[_0x103d04(0x154)](_0x103d04(0x166));}if(_0x45f34f&&_0x5b8886[_0x103d04(0x175)]){}const _0x30e5d3=buildDatasetCodeToAliasMap(_0x5b8886[_0x103d04(0x15d)],_0x5b8886['appCode']),_0x5850be=createHookLocationMap(_0x5dc9d7),_0x2fd241=JSON['parse'](JSON[_0x103d04(0x174)](_0x22d0b9)),_0x247ae4=_0x5b8886[_0x103d04(0x176)],_0x551233=_0x2fd241[_0x103d04(0x16e)][_0x247ae4];if(!_0x551233)throw new Error(_0x103d04(0x153)+_0x247ae4+_0x103d04(0x14d));const _0x285df8=[],_0x1b73b9=[],_0x1a2a0a=[];for(const _0x5be375 of _0x227a0d){const _0x3e60c0=resolveRemoteScriptTarget(_0x4de4ff,_0x5be375,_0x5850be,_0x390568[_0x103d04(0x14b)],_0x30e5d3);if(!_0x3e60c0){_0x1b73b9['push']({'lockKey':_0x5be375[_0x103d04(0x172)]+'/'+_0x5be375['functionName'],'reason':'unresolvable\x20target\x20path'});continue;}const _0x428fdc=_0x390568[_0x103d04(0x14b)][_0x3e60c0[_0x103d04(0x151)]];try{if(!_0x5be375['id'])throw new Error(_0x103d04(0x182));if(_0x5be375[_0x103d04(0x17c)]==null)throw new Error(_0x103d04(0x181));const _0x47bb13=_0x5be375['scriptContent'],_0x2d9eb=computeContentHash(_0x47bb13);if(!_0x45f34f){const _0x13937e=await hasUnsyncedLocalChanges(_0x3e60c0[_0x103d04(0x18c)],_0x428fdc,_0x2d9eb);if(_0x13937e){_0x1b73b9[_0x103d04(0x16f)]({'lockKey':_0x3e60c0['lockKey'],'reason':_0x103d04(0x150)});continue;}}await ensureParentDirectory(_0x3e60c0[_0x103d04(0x18c)]),await writeFile(_0x3e60c0['filePath'],_0x47bb13,_0x103d04(0x16a));const _0x3a73e4={'hash':_0x2d9eb,'remoteId':_0x5be375['id'],'version':_0x5be375[_0x103d04(0x158)]};_0x3e60c0[_0x103d04(0x148)]===_0x103d04(0x180)&&_0x3e60c0['hookLocation']&&(_0x3a73e4[_0x103d04(0x179)]=_0x3e60c0['hookLocation'][_0x103d04(0x179)],_0x3a73e4[_0x103d04(0x18a)]=_0x3e60c0[_0x103d04(0x169)][_0x103d04(0x18a)],_0x3a73e4['operationType']=_0x3e60c0[_0x103d04(0x169)]['operationType'],_0x3a73e4['functionNode']=_0x3e60c0['hookLocation'][_0x103d04(0x183)]),_0x551233[_0x103d04(0x14b)][_0x3e60c0[_0x103d04(0x151)]]=_0x3a73e4,_0x285df8[_0x103d04(0x16f)]({'lockKey':_0x3e60c0[_0x103d04(0x151)],'remoteId':_0x5be375['id']});}catch(_0x171971){_0x1a2a0a[_0x103d04(0x16f)]({'lockKey':_0x3e60c0[_0x103d04(0x151)],'error':_0x171971 instanceof Error?_0x171971[_0x103d04(0x14f)]:String(_0x171971)});}}return _0x551233[_0x103d04(0x156)]=new Date()[_0x103d04(0x178)](),await writeBffLockFile(_0x4de4ff[_0x103d04(0x15a)],_0x2fd241),{'ok':_0x1a2a0a['length']===0x0,'data':{'pulled':_0x285df8,'skipped':_0x1b73b9,'failed':_0x1a2a0a},'message':_0x103d04(0x16c)+_0x285df8['length']+_0x103d04(0x167)+_0x1b73b9['length']+_0x103d04(0x168)+_0x1a2a0a[_0x103d04(0x14e)]+_0x103d04(0x15b)};}};async function hasUnsyncedLocalChanges(_0x5d81b5,_0x42b744,_0x5020b7){const _0x3f41b7=a36_0x35367b;if(!await fileExists(_0x5d81b5))return![];const _0xb564e6=await computeFileHash(_0x5d81b5);if(!_0x42b744)return _0x5020b7?_0xb564e6!==_0x5020b7:!![];return _0xb564e6!==_0x42b744[_0x3f41b7(0x18e)];}function buildDatasetCodeToAliasMap(_0x211c4b,_0x5126a4){const _0x3e324e=a36_0x35367b,_0x42c455=loadAliasMap(_0x211c4b,undefined,resolveApiFilePath(_0x211c4b,_0x5126a4));return new Map(_0x42c455[_0x3e324e(0x160)](_0x5b09fb=>[_0x5b09fb[_0x3e324e(0x18a)],_0x5b09fb[_0x3e324e(0x179)]]));}async function confirmForce(){const _0x40cc97=a36_0x35367b,_0x1330b2=createInterface({'input':process[_0x40cc97(0x18f)],'output':process[_0x40cc97(0x14a)]}),_0x3b2ebe=await new Promise(_0x56812a=>{const _0x144951=_0x40cc97;_0x1330b2[_0x144951(0x171)](_0x144951(0x17f),_0x56812a);});return _0x1330b2['close'](),['y',_0x40cc97(0x144)][_0x40cc97(0x159)](_0x3b2ebe[_0x40cc97(0x16b)]()[_0x40cc97(0x18d)]());}
@@ -1 +1 @@
1
- const a37_0xd2ff64=a37_0xcf02;(function(_0x531542,_0x4086d6){const _0x234a8d=a37_0xcf02,_0x5aa2b3=_0x531542();while(!![]){try{const _0x4dcde2=-parseInt(_0x234a8d(0x14a))/0x1*(-parseInt(_0x234a8d(0x14b))/0x2)+-parseInt(_0x234a8d(0x14e))/0x3+-parseInt(_0x234a8d(0x175))/0x4+-parseInt(_0x234a8d(0x142))/0x5*(parseInt(_0x234a8d(0x13e))/0x6)+parseInt(_0x234a8d(0x162))/0x7+parseInt(_0x234a8d(0x13f))/0x8*(-parseInt(_0x234a8d(0x179))/0x9)+parseInt(_0x234a8d(0x16d))/0xa;if(_0x4dcde2===_0x4086d6)break;else _0x5aa2b3['push'](_0x5aa2b3['shift']());}catch(_0x2f100e){_0x5aa2b3['push'](_0x5aa2b3['shift']());}}}(a37_0x4099,0xdf56a));function a37_0xcf02(_0x459e67,_0x107549){_0x459e67=_0x459e67-0x132;const _0x409999=a37_0x4099();let _0xcf0206=_0x409999[_0x459e67];return _0xcf0206;}import{readFile}from'node:fs/promises';function a37_0x4099(){const _0x377ddf=['Force\x20push\x20ignoring\x20hash\x20protection','6471tPSopS','runtime\x20cache\x20clear\x20failed','name','lockKey','every','lockFilePath','push','description','message','aliasToDatasetCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','functionNode','HOOK','would_push','functions','join','Lock\x20scope\x20for\x20app\x20\x22','79938kWzhHr','19744qNknXu','Run\x20`','datasetCode','110wHxcAp',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Push\x20complete:\x20','datasetCodeToDataset','POST','appCode','force','hash','7FzOlYS','164594MkxSbT','status','type','395955TCCSGl','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','high-risk-write','lastSync','filePath','scriptsRoot','\x20uploaded,\x20','operationType','validation','str','\x20skipped,\x20','values','bool','Cannot\x20resolve\x20dataset\x20for\x20\x22','string','toISOString','Push\x20local\x20BFF\x20scripts\x20to\x20remote','has','code','cleared','7199710IqITzU','remoteId','get','datasetId','filter','some','unchanged','map','apiDir','runtime\x20cache\x20not\x20needed','version','24357680IBgjNo','Push\x20only\x20this\x20script\x20type','\x22\x20not\x20found\x20after\x20ensureLockScope.','Local\x20function\x20not\x20found:\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','\x20failed,\x20','alias','set','3704000cIYRSo','apps','length'];a37_0x4099=function(){return _0x377ddf;};return a37_0x4099();}import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a37_0xd2ff64(0x133),'description':a37_0xd2ff64(0x15e),'risk':a37_0xd2ff64(0x150),'flags':[{'name':a37_0xd2ff64(0x14d),'type':a37_0xd2ff64(0x15c),'description':a37_0xd2ff64(0x16e),'enum':['COMMON','ENDPOINT',a37_0xd2ff64(0x139)]},{'name':a37_0xd2ff64(0x17b),'type':'string','description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0xd2ff64(0x148),'type':'boolean','description':a37_0xd2ff64(0x178)}],async 'dryRun'(_0x5a476d){const _0x351a8a=a37_0xd2ff64,_0x79b018=loadBffProjectConfig(_0x5a476d['appCode']),_0xb46fd3=await readBffLockFile(_0x79b018[_0x351a8a(0x132)]),{appLock:_0x2dcb1a}=ensureLockScope(_0xb46fd3??createEmptyBffLock(),_0x5a476d[_0x351a8a(0x147)],_0x79b018[_0x351a8a(0x153)],_0x351a8a(0x133)),_0x3404bc=await getTargetFunctions(_0x79b018,_0x5a476d),_0x3ca6f2=_0x5a476d[_0x351a8a(0x15a)]('force'),_0x37426d=[];for(const _0x3f71b1 of _0x3404bc){const _0x3d126c=await computeFileHash(_0x3f71b1[_0x351a8a(0x152)]),_0xa87cd1=_0x2dcb1a[_0x351a8a(0x13b)][_0x3f71b1['lockKey']],_0x1b6b9a=!!_0xa87cd1&&_0xa87cd1[_0x351a8a(0x149)]===_0x3d126c;_0x37426d[_0x351a8a(0x133)]({'lockKey':_0x3f71b1['lockKey'],'filePath':_0x3f71b1[_0x351a8a(0x152)],'remoteId':_0xa87cd1?.[_0x351a8a(0x163)]??null,'mode':_0xa87cd1?.['remoteId']?'update':'create','status':!_0x3ca6f2&&_0x1b6b9a?_0x351a8a(0x168):'would_push'});}return{'method':_0x351a8a(0x146),'url':'/api/management/library/scripts/save','body':{'appCode':_0x5a476d[_0x351a8a(0x147)],'force':_0x3ca6f2,'files':_0x37426d,'cacheClearAtRuntime':_0x37426d[_0x351a8a(0x167)](_0x4fb951=>_0x4fb951[_0x351a8a(0x14c)]===_0x351a8a(0x13a)),'cacheClearAtRuntimeTimes':_0x37426d[_0x351a8a(0x167)](_0x6db9a3=>_0x6db9a3['status']===_0x351a8a(0x13a))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x37426d[_0x351a8a(0x177)]+_0x351a8a(0x171)};},async 'execute'(_0x541d63){const _0x31e6bc=a37_0xd2ff64,_0x303ce4=loadBffProjectConfig(_0x541d63[_0x31e6bc(0x147)]),_0x5ab605=await readBffLockFile(_0x303ce4[_0x31e6bc(0x132)]),{lockData:_0x492a86,appLock:_0x529381}=ensureLockScope(_0x5ab605??createEmptyBffLock(),_0x541d63[_0x31e6bc(0x147)],_0x303ce4['scriptsRoot'],'push'),_0x3e37fd=await getTargetFunctions(_0x303ce4,_0x541d63);if(_0x3e37fd[_0x31e6bc(0x177)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x15abf3=_0x541d63[_0x31e6bc(0x15a)](_0x31e6bc(0x148)),_0x37af74=JSON['parse'](JSON['stringify'](_0x492a86)),_0x1f3f78=_0x37af74['apps'][_0x541d63[_0x31e6bc(0x147)]];if(!_0x1f3f78)throw new Error(_0x31e6bc(0x13d)+_0x541d63[_0x31e6bc(0x147)]+_0x31e6bc(0x16f));const _0x9bc529=await buildHookMaps(_0x541d63[_0x31e6bc(0x147)],_0x541d63[_0x31e6bc(0x16a)],_0x3e37fd,_0x1f3f78),_0x4ff540=[],_0x13dc2a=[],_0x1d60ba=[];for(const _0x44a857 of _0x3e37fd){const _0x8e1a2c=await computeFileHash(_0x44a857[_0x31e6bc(0x152)]),_0x2eacf2=_0x1f3f78[_0x31e6bc(0x13b)][_0x44a857['lockKey']];if(!_0x15abf3&&_0x2eacf2&&_0x2eacf2[_0x31e6bc(0x149)]===_0x8e1a2c){_0x13dc2a[_0x31e6bc(0x133)]({'lockKey':_0x44a857['lockKey'],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x541d63[_0x31e6bc(0x147)],_0x44a857,_0x1f3f78,_0x9bc529);const _0x23788d=_0x1f3f78['functions'][_0x44a857[_0x31e6bc(0x17c)]];_0x4ff540[_0x31e6bc(0x133)]({'lockKey':_0x44a857[_0x31e6bc(0x17c)],'remoteId':_0x23788d?.[_0x31e6bc(0x163)]??0x0});}catch(_0x37aecc){_0x1d60ba['push']({'lockKey':_0x44a857['lockKey'],'error':_0x37aecc instanceof Error?_0x37aecc['message']:String(_0x37aecc)});}}_0x1f3f78[_0x31e6bc(0x151)]=new Date()[_0x31e6bc(0x15d)](),await writeBffLockFile(_0x303ce4['lockFilePath'],_0x37af74),await waitForUploadedLockEntries(_0x303ce4[_0x31e6bc(0x132)],_0x541d63['appCode'],_0x4ff540[_0x31e6bc(0x169)](_0x378001=>_0x378001[_0x31e6bc(0x17c)]));let _0x4f7614={'attempted':![],'cleared':![]};if(_0x4ff540[_0x31e6bc(0x177)]>0x0)try{let _0x2e36c8='';for(let _0x2568bb=0x0;_0x2568bb<CACHE_CLEAR_ATTEMPTS;_0x2568bb+=0x1){_0x2e36c8=await clearBffScriptCache(),_0x2568bb<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4f7614={'attempted':!![],'cleared':!![],'message':_0x2e36c8||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x3c1b0f){_0x4f7614={'attempted':!![],'cleared':![],'error':_0x3c1b0f instanceof Error?_0x3c1b0f[_0x31e6bc(0x135)]:String(_0x3c1b0f)};}const _0x3288a7=_0x1d60ba[_0x31e6bc(0x177)]===0x0&&(_0x4f7614['attempted']?_0x4f7614[_0x31e6bc(0x161)]:!![]),_0x3e92a9=_0x4f7614['attempted']?_0x4f7614[_0x31e6bc(0x161)]?'runtime\x20cache\x20cleared':_0x31e6bc(0x17a):_0x31e6bc(0x16b);return{'ok':_0x3288a7,'data':{'uploaded':_0x4ff540,'skipped':_0x13dc2a,'failed':_0x1d60ba,'cacheClear':_0x4f7614},'message':_0x31e6bc(0x144)+_0x4ff540['length']+_0x31e6bc(0x154)+_0x13dc2a[_0x31e6bc(0x177)]+_0x31e6bc(0x158)+_0x1d60ba['length']+_0x31e6bc(0x172)+_0x3e92a9};}};async function getTargetFunctions(_0x531fa9,_0x421e8e){const _0x3f9f1c=a37_0xd2ff64,_0x4669fb=_0x421e8e[_0x3f9f1c(0x157)]('type'),_0x45eda1=_0x421e8e['str']('name'),_0x1613e1=normalizeBffType(_0x4669fb)??undefined;if(_0x45eda1&&!_0x1613e1)throw CliErrors[_0x3f9f1c(0x156)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x245795=await scanLocalBffFunctions(_0x531fa9,_0x1613e1);if(_0x45eda1){const _0x570051=_0x245795[_0x3f9f1c(0x166)](_0x50660b=>_0x50660b[_0x3f9f1c(0x17b)]===_0x45eda1);if(_0x570051['length']===0x0)throw CliErrors['validation'](_0x3f9f1c(0x170)+_0x1613e1+'/'+_0x45eda1);return _0x570051;}return _0x245795;}async function buildHookMaps(_0x565168,_0x2adae3,_0x2e75ee,_0x887fdc){const _0x405509=a37_0xd2ff64,_0x2efcba=_0x2e75ee[_0x405509(0x167)](_0x1f6d1d=>_0x1f6d1d[_0x405509(0x14d)]==='HOOK');if(!_0x2efcba)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2dc6f3=loadAliasMap(_0x2adae3,undefined,resolveApiFilePath(_0x2adae3,_0x565168)),_0x42e3ce=new Map(_0x2dc6f3[_0x405509(0x169)](_0x409f35=>[_0x409f35[_0x405509(0x173)],_0x409f35[_0x405509(0x141)]]));for(const _0x20ed77 of Object[_0x405509(0x159)](_0x887fdc[_0x405509(0x13b)])){_0x20ed77[_0x405509(0x173)]&&_0x20ed77[_0x405509(0x141)]&&!_0x42e3ce[_0x405509(0x15f)](_0x20ed77['alias'])&&_0x42e3ce[_0x405509(0x174)](_0x20ed77[_0x405509(0x173)],_0x20ed77['datasetCode']);}const _0x5047d6=await listDatasets(_0x565168),_0x289154=new Map(_0x5047d6[_0x405509(0x169)](_0x247c41=>[_0x247c41[_0x405509(0x160)],_0x247c41]));return{'aliasToDatasetCode':_0x42e3ce,'datasetCodeToDataset':_0x289154};}async function uploadSingleFunction(_0x2ad5aa,_0x5553c1,_0x431c6a,_0x122bbf){const _0x17d61f=a37_0xd2ff64,_0xb401fa=await readFile(_0x5553c1[_0x17d61f(0x152)],'utf8'),_0x4e8f17=await computeFileHash(_0x5553c1[_0x17d61f(0x152)]),_0x34aeb6=_0x431c6a[_0x17d61f(0x13b)][_0x5553c1[_0x17d61f(0x17c)]];if(_0x34aeb6?.[_0x17d61f(0x163)]&&_0x34aeb6['version']==null)throw CliErrors[_0x17d61f(0x156)](_0x5553c1[_0x17d61f(0x17c)]+_0x17d61f(0x143));let _0x226aad=extractScriptDescription(_0xb401fa);if(!_0x226aad&&_0x34aeb6?.[_0x17d61f(0x163)]){const _0x979b70=await getBffScriptInfo(_0x34aeb6['remoteId']);_0x226aad=_0x979b70[_0x17d61f(0x134)]||undefined;}const _0x4d1e15={'appCode':_0x2ad5aa,'functionName':_0x5553c1[_0x17d61f(0x17b)],'scriptType':_0x5553c1[_0x17d61f(0x14d)],'scriptContent':_0xb401fa};if(_0x34aeb6?.[_0x17d61f(0x163)])_0x4d1e15['id']=_0x34aeb6[_0x17d61f(0x163)];if(_0x34aeb6?.[_0x17d61f(0x16c)]!=null)_0x4d1e15['version']=_0x34aeb6[_0x17d61f(0x16c)];if(_0x226aad)_0x4d1e15[_0x17d61f(0x134)]=_0x226aad;if(_0x5553c1['type']==='HOOK'){const _0x394409=_0x5553c1['alias'];if(!_0x394409||!_0x5553c1[_0x17d61f(0x155)]||!_0x5553c1['functionNode'])throw CliErrors[_0x17d61f(0x156)]('Incomplete\x20HOOK\x20path:\x20'+_0x5553c1[_0x17d61f(0x17c)]);const _0x11f153=_0x122bbf[_0x17d61f(0x136)][_0x17d61f(0x164)](_0x394409)??_0x34aeb6?.[_0x17d61f(0x141)]??_0x394409,_0x3d4042=_0x122bbf[_0x17d61f(0x145)][_0x17d61f(0x164)](_0x11f153);if(!_0x3d4042)throw CliErrors[_0x17d61f(0x156)](_0x17d61f(0x15b)+_0x394409+'\x22.\x20'+(_0x17d61f(0x140)+CLI_BIN_NAME+_0x17d61f(0x14f)));_0x4d1e15[_0x17d61f(0x165)]=_0x3d4042['id'],_0x4d1e15[_0x17d61f(0x155)]=_0x5553c1[_0x17d61f(0x155)],_0x4d1e15[_0x17d61f(0x138)]=_0x5553c1[_0x17d61f(0x138)];}const _0x1236d1=await saveBffScript(_0x4d1e15),_0x4f480e=_0x1236d1['id'],_0x119030=_0x1236d1['script']??await getBffScriptInfo(_0x4f480e),_0x317fc5={'hash':_0x4e8f17,'remoteId':_0x4f480e,'version':_0x119030[_0x17d61f(0x16c)]};if(_0x5553c1[_0x17d61f(0x14d)]===_0x17d61f(0x139)){const _0x969c99=_0x5553c1[_0x17d61f(0x173)],_0x16feca=_0x122bbf[_0x17d61f(0x136)]['get'](_0x969c99)??_0x34aeb6?.[_0x17d61f(0x141)]??_0x969c99;_0x122bbf[_0x17d61f(0x136)][_0x17d61f(0x15f)](_0x969c99)?_0x317fc5[_0x17d61f(0x173)]=_0x969c99:_0x317fc5[_0x17d61f(0x173)]=_0x34aeb6?.[_0x17d61f(0x173)],_0x317fc5['datasetCode']=_0x16feca,_0x317fc5[_0x17d61f(0x155)]=_0x5553c1[_0x17d61f(0x155)],_0x317fc5[_0x17d61f(0x138)]=_0x5553c1[_0x17d61f(0x138)];}_0x431c6a[_0x17d61f(0x13b)][_0x5553c1[_0x17d61f(0x17c)]]=_0x317fc5;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x296ac7,_0x1f2857,_0x385263){const _0xe848ae=a37_0xd2ff64;if(_0x385263['length']===0x0)return;for(let _0x51022a=0x0;_0x51022a<LOCK_SETTLE_RETRY_COUNT;_0x51022a+=0x1){const _0x23b093=await readBffLockFile(_0x296ac7),_0x5afb2d=_0x23b093?.[_0xe848ae(0x176)]?.[_0x1f2857]?.['functions']??{},_0x4d6140=_0x385263[_0xe848ae(0x17d)](_0x1b26f3=>!!_0x5afb2d[_0x1b26f3]?.['remoteId']);if(_0x4d6140)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0xe848ae(0x137)+_0x385263[_0xe848ae(0x13c)](',\x20')+'.');}
1
+ const a37_0x30a808=a37_0x1910;(function(_0x4d7373,_0x3ae97d){const _0x88ac83=a37_0x1910,_0x5cd0a2=_0x4d7373();while(!![]){try{const _0x4faa08=-parseInt(_0x88ac83(0x1e0))/0x1+parseInt(_0x88ac83(0x218))/0x2+parseInt(_0x88ac83(0x1f3))/0x3*(-parseInt(_0x88ac83(0x1fe))/0x4)+parseInt(_0x88ac83(0x21e))/0x5*(-parseInt(_0x88ac83(0x1fa))/0x6)+parseInt(_0x88ac83(0x21a))/0x7+-parseInt(_0x88ac83(0x1f9))/0x8+parseInt(_0x88ac83(0x1e3))/0x9;if(_0x4faa08===_0x3ae97d)break;else _0x5cd0a2['push'](_0x5cd0a2['shift']());}catch(_0x667363){_0x5cd0a2['push'](_0x5cd0a2['shift']());}}}(a37_0x4da4,0x5bd6a));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';function a37_0x1910(_0x394e6e,_0x31d8bc){_0x394e6e=_0x394e6e-0x1d9;const _0x4da490=a37_0x4da4();let _0x191061=_0x4da490[_0x394e6e];return _0x191061;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x4da4(){const _0x41e01c=['str','4079488UemKcm','operationType','Lock\x20scope\x20for\x20app\x20\x22','boolean','1379515Zkryjx','/api/management/library/scripts/save','\x20uploaded,\x20','message','name','Local\x20function\x20not\x20found:\x20','\x20failed,\x20','appCode','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','would_push','validation','bool','unchanged','remoteId','211270BYHeHE','ENDPOINT','map','3993642SguFKM','Incomplete\x20HOOK\x20path:\x20','values','alias','lastSync','script','apps','No\x20local\x20BFF\x20functions\x20found.','scriptsRoot','status','code','update','toISOString','datasetCode','get','HOOK','47694aFtlbB','Cannot\x20resolve\x20dataset\x20for\x20\x22','has','push','lockFilePath','string','3021528DrYfny','6lMWTkQ','version','\x22.\x20','cleared','64tJsDSK','aliasToDatasetCode','\x22\x20not\x20found\x20after\x20ensureLockScope.','functionNode','Push\x20only\x20this\x20script\x20type','apiDir','filePath','functions','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','set','attempted','lockKey','description','runtime\x20cache\x20not\x20needed','\x20skipped,\x20','Force\x20push\x20ignoring\x20hash\x20protection','Would\x20inspect\x20',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','force','Push\x20local\x20BFF\x20scripts\x20to\x20remote','length','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','type','POST','some','937760gAxJJc'];a37_0x4da4=function(){return _0x41e01c;};return a37_0x4da4();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a37_0x30a808(0x1f6),'description':a37_0x30a808(0x212),'risk':'high-risk-write','flags':[{'name':a37_0x30a808(0x215),'type':a37_0x30a808(0x1f8),'description':a37_0x30a808(0x202),'enum':['COMMON',a37_0x30a808(0x1e1),a37_0x30a808(0x1f2)]},{'name':a37_0x30a808(0x222),'type':a37_0x30a808(0x1f8),'description':a37_0x30a808(0x1da)},{'name':a37_0x30a808(0x211),'type':a37_0x30a808(0x21d),'description':a37_0x30a808(0x20d)}],async 'dryRun'(_0x366fee){const _0xd834c2=a37_0x30a808,_0x20f556=loadBffProjectConfig(_0x366fee[_0xd834c2(0x1d9)]),_0x4cd1a0=await readBffLockFile(_0x20f556[_0xd834c2(0x1f7)]),{appLock:_0x43c430}=ensureLockScope(_0x4cd1a0??createEmptyBffLock(),_0x366fee[_0xd834c2(0x1d9)],_0x20f556[_0xd834c2(0x1eb)],'push'),_0x3950c2=await getTargetFunctions(_0x20f556,_0x366fee),_0x4b61d1=_0x366fee[_0xd834c2(0x1dd)](_0xd834c2(0x211)),_0x447895=[];for(const _0x2b31eb of _0x3950c2){const _0x5305e6=await computeFileHash(_0x2b31eb[_0xd834c2(0x204)]),_0x57c841=_0x43c430['functions'][_0x2b31eb[_0xd834c2(0x209)]],_0x489cd7=!!_0x57c841&&_0x57c841['hash']===_0x5305e6;_0x447895['push']({'lockKey':_0x2b31eb['lockKey'],'filePath':_0x2b31eb['filePath'],'remoteId':_0x57c841?.[_0xd834c2(0x1df)]??null,'mode':_0x57c841?.[_0xd834c2(0x1df)]?_0xd834c2(0x1ee):'create','status':!_0x4b61d1&&_0x489cd7?'unchanged':_0xd834c2(0x1db)});}return{'method':_0xd834c2(0x216),'url':_0xd834c2(0x21f),'body':{'appCode':_0x366fee['appCode'],'force':_0x4b61d1,'files':_0x447895,'cacheClearAtRuntime':_0x447895['some'](_0xf3ff0f=>_0xf3ff0f[_0xd834c2(0x1ec)]==='would_push'),'cacheClearAtRuntimeTimes':_0x447895[_0xd834c2(0x217)](_0x2dbe2f=>_0x2dbe2f['status']===_0xd834c2(0x1db))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0xd834c2(0x20e)+_0x447895[_0xd834c2(0x213)]+_0xd834c2(0x214)};},async 'execute'(_0x183aa4){const _0xe94b7b=a37_0x30a808,_0x357228=loadBffProjectConfig(_0x183aa4[_0xe94b7b(0x1d9)]),_0x2f9094=await readBffLockFile(_0x357228['lockFilePath']),{lockData:_0x326a5e,appLock:_0x5cfd07}=ensureLockScope(_0x2f9094??createEmptyBffLock(),_0x183aa4[_0xe94b7b(0x1d9)],_0x357228[_0xe94b7b(0x1eb)],_0xe94b7b(0x1f6)),_0x5c90e1=await getTargetFunctions(_0x357228,_0x183aa4);if(_0x5c90e1[_0xe94b7b(0x213)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0xe94b7b(0x1ea)};const _0x482257=_0x183aa4[_0xe94b7b(0x1dd)](_0xe94b7b(0x211)),_0x540a87=JSON['parse'](JSON['stringify'](_0x326a5e)),_0x54fe06=_0x540a87[_0xe94b7b(0x1e9)][_0x183aa4[_0xe94b7b(0x1d9)]];if(!_0x54fe06)throw new Error(_0xe94b7b(0x21c)+_0x183aa4['appCode']+_0xe94b7b(0x200));const _0x4e74fe=await buildHookMaps(_0x183aa4[_0xe94b7b(0x1d9)],_0x183aa4[_0xe94b7b(0x203)],_0x5c90e1,_0x54fe06),_0x3344fc=[],_0x2437e5=[],_0x46b355=[];for(const _0x593676 of _0x5c90e1){const _0x9742e6=await computeFileHash(_0x593676['filePath']),_0x1c942c=_0x54fe06[_0xe94b7b(0x205)][_0x593676[_0xe94b7b(0x209)]];if(!_0x482257&&_0x1c942c&&_0x1c942c['hash']===_0x9742e6){_0x2437e5[_0xe94b7b(0x1f6)]({'lockKey':_0x593676[_0xe94b7b(0x209)],'reason':_0xe94b7b(0x1de)});continue;}try{await uploadSingleFunction(_0x183aa4[_0xe94b7b(0x1d9)],_0x593676,_0x54fe06,_0x4e74fe);const _0x1ad068=_0x54fe06['functions'][_0x593676[_0xe94b7b(0x209)]];_0x3344fc[_0xe94b7b(0x1f6)]({'lockKey':_0x593676[_0xe94b7b(0x209)],'remoteId':_0x1ad068?.[_0xe94b7b(0x1df)]??0x0});}catch(_0x13b0e2){_0x46b355['push']({'lockKey':_0x593676[_0xe94b7b(0x209)],'error':_0x13b0e2 instanceof Error?_0x13b0e2[_0xe94b7b(0x221)]:String(_0x13b0e2)});}}_0x54fe06[_0xe94b7b(0x1e7)]=new Date()[_0xe94b7b(0x1ef)](),await writeBffLockFile(_0x357228[_0xe94b7b(0x1f7)],_0x540a87),await waitForUploadedLockEntries(_0x357228[_0xe94b7b(0x1f7)],_0x183aa4['appCode'],_0x3344fc[_0xe94b7b(0x1e2)](_0x57053d=>_0x57053d['lockKey']));let _0x242bef={'attempted':![],'cleared':![]};if(_0x3344fc['length']>0x0)try{let _0x2a10f5='';for(let _0x51fe93=0x0;_0x51fe93<CACHE_CLEAR_ATTEMPTS;_0x51fe93+=0x1){_0x2a10f5=await clearBffScriptCache(),_0x51fe93<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x242bef={'attempted':!![],'cleared':!![],'message':_0x2a10f5||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x3eb874){_0x242bef={'attempted':!![],'cleared':![],'error':_0x3eb874 instanceof Error?_0x3eb874[_0xe94b7b(0x221)]:String(_0x3eb874)};}const _0x262506=_0x46b355[_0xe94b7b(0x213)]===0x0&&(_0x242bef[_0xe94b7b(0x208)]?_0x242bef[_0xe94b7b(0x1fd)]:!![]),_0x3a2830=_0x242bef[_0xe94b7b(0x208)]?_0x242bef[_0xe94b7b(0x1fd)]?'runtime\x20cache\x20cleared':'runtime\x20cache\x20clear\x20failed':_0xe94b7b(0x20b);return{'ok':_0x262506,'data':{'uploaded':_0x3344fc,'skipped':_0x2437e5,'failed':_0x46b355,'cacheClear':_0x242bef},'message':'Push\x20complete:\x20'+_0x3344fc[_0xe94b7b(0x213)]+_0xe94b7b(0x220)+_0x2437e5[_0xe94b7b(0x213)]+_0xe94b7b(0x20c)+_0x46b355[_0xe94b7b(0x213)]+_0xe94b7b(0x224)+_0x3a2830};}};async function getTargetFunctions(_0x53ff3b,_0x37db0c){const _0x3f7d9a=a37_0x30a808,_0x3ab795=_0x37db0c[_0x3f7d9a(0x219)](_0x3f7d9a(0x215)),_0x37953f=_0x37db0c['str']('name'),_0x3e1d69=normalizeBffType(_0x3ab795)??undefined;if(_0x37953f&&!_0x3e1d69)throw CliErrors[_0x3f7d9a(0x1dc)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x5cd795=await scanLocalBffFunctions(_0x53ff3b,_0x3e1d69);if(_0x37953f){const _0x5d6d5e=_0x5cd795['filter'](_0x512e00=>_0x512e00[_0x3f7d9a(0x222)]===_0x37953f);if(_0x5d6d5e[_0x3f7d9a(0x213)]===0x0)throw CliErrors['validation'](_0x3f7d9a(0x223)+_0x3e1d69+'/'+_0x37953f);return _0x5d6d5e;}return _0x5cd795;}async function buildHookMaps(_0x5a4773,_0x20d46b,_0x134e50,_0x32b845){const _0x4c26c7=a37_0x30a808,_0x215b81=_0x134e50[_0x4c26c7(0x217)](_0x34b20b=>_0x34b20b['type']===_0x4c26c7(0x1f2));if(!_0x215b81)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x3aaee6=loadAliasMap(_0x20d46b,undefined,resolveApiFilePath(_0x20d46b,_0x5a4773)),_0x372cc1=new Map(_0x3aaee6['map'](_0x230ff6=>[_0x230ff6['alias'],_0x230ff6['datasetCode']]));for(const _0x283f17 of Object[_0x4c26c7(0x1e5)](_0x32b845[_0x4c26c7(0x205)])){_0x283f17['alias']&&_0x283f17[_0x4c26c7(0x1f0)]&&!_0x372cc1[_0x4c26c7(0x1f5)](_0x283f17[_0x4c26c7(0x1e6)])&&_0x372cc1[_0x4c26c7(0x207)](_0x283f17['alias'],_0x283f17[_0x4c26c7(0x1f0)]);}const _0x451cc6=await listDatasets(_0x5a4773),_0x2bda12=new Map(_0x451cc6[_0x4c26c7(0x1e2)](_0x793e6=>[_0x793e6[_0x4c26c7(0x1ed)],_0x793e6]));return{'aliasToDatasetCode':_0x372cc1,'datasetCodeToDataset':_0x2bda12};}async function uploadSingleFunction(_0x38f297,_0x4dbf33,_0x54e29d,_0x2e38b9){const _0x11d9bc=a37_0x30a808,_0x47053c=await readFile(_0x4dbf33[_0x11d9bc(0x204)],'utf8'),_0xceace8=await computeFileHash(_0x4dbf33[_0x11d9bc(0x204)]),_0x3cb534=_0x54e29d[_0x11d9bc(0x205)][_0x4dbf33[_0x11d9bc(0x209)]];if(_0x3cb534?.['remoteId']&&_0x3cb534[_0x11d9bc(0x1fb)]==null)throw CliErrors['validation'](_0x4dbf33[_0x11d9bc(0x209)]+_0x11d9bc(0x20f));let _0x3130e6=extractScriptDescription(_0x47053c);if(!_0x3130e6&&_0x3cb534?.['remoteId']){const _0x498a47=await getBffScriptInfo(_0x3cb534['remoteId']);_0x3130e6=_0x498a47[_0x11d9bc(0x20a)]||undefined;}const _0x154838={'appCode':_0x38f297,'functionName':_0x4dbf33[_0x11d9bc(0x222)],'scriptType':_0x4dbf33[_0x11d9bc(0x215)],'scriptContent':_0x47053c};if(_0x3cb534?.[_0x11d9bc(0x1df)])_0x154838['id']=_0x3cb534[_0x11d9bc(0x1df)];if(_0x3cb534?.['version']!=null)_0x154838[_0x11d9bc(0x1fb)]=_0x3cb534[_0x11d9bc(0x1fb)];if(_0x3130e6)_0x154838[_0x11d9bc(0x20a)]=_0x3130e6;if(_0x4dbf33['type']===_0x11d9bc(0x1f2)){const _0x299dbd=_0x4dbf33[_0x11d9bc(0x1e6)];if(!_0x299dbd||!_0x4dbf33['operationType']||!_0x4dbf33[_0x11d9bc(0x201)])throw CliErrors[_0x11d9bc(0x1dc)](_0x11d9bc(0x1e4)+_0x4dbf33['lockKey']);const _0x514fb0=_0x2e38b9[_0x11d9bc(0x1ff)][_0x11d9bc(0x1f1)](_0x299dbd)??_0x3cb534?.[_0x11d9bc(0x1f0)]??_0x299dbd,_0x7604d4=_0x2e38b9['datasetCodeToDataset'][_0x11d9bc(0x1f1)](_0x514fb0);if(!_0x7604d4)throw CliErrors[_0x11d9bc(0x1dc)](_0x11d9bc(0x1f4)+_0x299dbd+_0x11d9bc(0x1fc)+('Run\x20`'+CLI_BIN_NAME+_0x11d9bc(0x206)));_0x154838['datasetId']=_0x7604d4['id'],_0x154838[_0x11d9bc(0x21b)]=_0x4dbf33['operationType'],_0x154838[_0x11d9bc(0x201)]=_0x4dbf33[_0x11d9bc(0x201)];}const _0x243052=await saveBffScript(_0x154838),_0x349918=_0x243052['id'],_0x381131=_0x243052[_0x11d9bc(0x1e8)]??await getBffScriptInfo(_0x349918),_0x369ba3={'hash':_0xceace8,'remoteId':_0x349918,'version':_0x381131[_0x11d9bc(0x1fb)]};if(_0x4dbf33[_0x11d9bc(0x215)]===_0x11d9bc(0x1f2)){const _0x446209=_0x4dbf33[_0x11d9bc(0x1e6)],_0x5cbd54=_0x2e38b9[_0x11d9bc(0x1ff)][_0x11d9bc(0x1f1)](_0x446209)??_0x3cb534?.[_0x11d9bc(0x1f0)]??_0x446209;_0x2e38b9['aliasToDatasetCode']['has'](_0x446209)?_0x369ba3['alias']=_0x446209:_0x369ba3[_0x11d9bc(0x1e6)]=_0x3cb534?.[_0x11d9bc(0x1e6)],_0x369ba3[_0x11d9bc(0x1f0)]=_0x5cbd54,_0x369ba3[_0x11d9bc(0x21b)]=_0x4dbf33[_0x11d9bc(0x21b)],_0x369ba3[_0x11d9bc(0x201)]=_0x4dbf33[_0x11d9bc(0x201)];}_0x54e29d[_0x11d9bc(0x205)][_0x4dbf33[_0x11d9bc(0x209)]]=_0x369ba3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x1299ed,_0x30d30b,_0xae867d){const _0x1c1038=a37_0x30a808;if(_0xae867d[_0x1c1038(0x213)]===0x0)return;for(let _0x4865d1=0x0;_0x4865d1<LOCK_SETTLE_RETRY_COUNT;_0x4865d1+=0x1){const _0x2bb155=await readBffLockFile(_0x1299ed),_0x40873c=_0x2bb155?.[_0x1c1038(0x1e9)]?.[_0x30d30b]?.[_0x1c1038(0x205)]??{},_0x14d6e0=_0xae867d['every'](_0xa59a24=>!!_0x40873c[_0xa59a24]?.[_0x1c1038(0x1df)]);if(_0x14d6e0)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1c1038(0x210)+_0xae867d['join'](',\x20')+'.');}
@@ -1 +1 @@
1
- function a38_0x50a0(_0x2ee4ed,_0x23fda9){_0x2ee4ed=_0x2ee4ed-0xc5;const _0x1989cf=a38_0x1989();let _0x50a07a=_0x1989cf[_0x2ee4ed];return _0x50a07a;}const a38_0x561814=a38_0x50a0;(function(_0x22a37b,_0x169524){const _0x56ec50=a38_0x50a0,_0x47ec4c=_0x22a37b();while(!![]){try{const _0x1dea97=-parseInt(_0x56ec50(0xc8))/0x1*(-parseInt(_0x56ec50(0xce))/0x2)+parseInt(_0x56ec50(0xd4))/0x3+-parseInt(_0x56ec50(0xdc))/0x4*(parseInt(_0x56ec50(0xcd))/0x5)+parseInt(_0x56ec50(0xd6))/0x6+-parseInt(_0x56ec50(0xe3))/0x7*(parseInt(_0x56ec50(0xd8))/0x8)+-parseInt(_0x56ec50(0xd1))/0x9+parseInt(_0x56ec50(0xd2))/0xa*(-parseInt(_0x56ec50(0xd3))/0xb);if(_0x1dea97===_0x169524)break;else _0x47ec4c['push'](_0x47ec4c['shift']());}catch(_0x436dbb){_0x47ec4c['push'](_0x47ec4c['shift']());}}}(a38_0x1989,0xd4f9a));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a38_0x1989(){const _0x6b624f=['scriptsRoot','371664qTFrnR','5267590PnKcDl','11RoYTlE','4345704AejlhG','functions','10399818pgQCIV','lockKey','272VkewYH','filePath','all','appCode','4CwdmgD','has','All\x20BFF\x20scripts\x20are\x20in\x20sync.','bff','\x20remote-only','push','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','294000SfXpgO','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','lockFilePath','length','alias','datasetCode','69tiPlXv','bool','\x20unchanged','boolean','status','6183795fJIQiH','26762iUHkrD','remote'];a38_0x1989=function(){return _0x6b624f;};return a38_0x1989();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x561814(0xdf),'command':a38_0x561814(0xcc),'description':a38_0x561814(0xe4),'risk':'read','flags':[{'name':a38_0x561814(0xcf),'type':a38_0x561814(0xcb),'description':a38_0x561814(0xe2)}],async 'execute'(_0x48b9cc){const _0x491041=a38_0x561814,_0x37abf0=loadBffProjectConfig(_0x48b9cc['appCode']),_0x5b9845=await readBffLockFile(_0x37abf0[_0x491041(0xe5)]),{appLock:_0x7bb058}=ensureLockScope(_0x5b9845??createEmptyBffLock(),_0x48b9cc[_0x491041(0xdb)],_0x37abf0[_0x491041(0xd0)],'status'),_0x3701c6=await scanLocalBffFunctions(_0x37abf0),_0x3897b9=[],_0x333207=[],_0x4ea287=[];for(const _0x4cddf6 of _0x3701c6){const _0x3ab09f=await computeFileHash(_0x4cddf6[_0x491041(0xd9)]),_0xb4faff=_0x7bb058[_0x491041(0xd5)][_0x4cddf6[_0x491041(0xd7)]];if(!_0xb4faff)_0x3897b9['push'](_0x4cddf6[_0x491041(0xd7)]);else _0xb4faff['hash']!==_0x3ab09f?_0x333207[_0x491041(0xe1)](_0x4cddf6[_0x491041(0xd7)]):_0x4ea287[_0x491041(0xe1)](_0x4cddf6[_0x491041(0xd7)]);}const _0x5b0e81=[];if(_0x48b9cc[_0x491041(0xc9)](_0x491041(0xcf))){const _0x33392e=loadAliasMap(_0x48b9cc['apiDir'],undefined,resolveApiFilePath(_0x48b9cc['apiDir'],_0x48b9cc[_0x491041(0xdb)])),_0x2a6fcd=new Map(_0x33392e['map'](_0x392991=>[_0x392991[_0x491041(0xc7)],_0x392991[_0x491041(0xc6)]])),[_0x2d85b6,_0xfba5a3]=await Promise[_0x491041(0xda)]([listBffScripts(_0x48b9cc['appCode']),getBffScriptStatistics(_0x48b9cc[_0x491041(0xdb)])]),_0xe9d7a0=createHookLocationMap(_0xfba5a3),_0x1ce190=new Set(_0x3701c6['map'](_0x35da7a=>_0x35da7a[_0x491041(0xd7)]));for(const _0x3f1072 of _0x2d85b6){const _0x15545f=resolveRemoteScriptTarget(_0x37abf0,_0x3f1072,_0xe9d7a0,_0x7bb058[_0x491041(0xd5)],_0x2a6fcd);_0x15545f&&!_0x1ce190[_0x491041(0xdd)](_0x15545f['lockKey'])&&_0x5b0e81['push'](_0x15545f['lockKey']);}}const _0x4a6cf6=_0x3897b9[_0x491041(0xc5)]===0x0&&_0x333207['length']===0x0&&_0x5b0e81[_0x491041(0xc5)]===0x0;return{'ok':!![],'data':{'added':_0x3897b9,'modified':_0x333207,'unchanged':_0x4ea287,'remoteOnly':_0x5b0e81},'message':_0x4a6cf6?_0x491041(0xde):_0x3897b9['length']+'\x20added,\x20'+_0x333207[_0x491041(0xc5)]+'\x20modified,\x20'+_0x4ea287[_0x491041(0xc5)]+_0x491041(0xca)+(_0x5b0e81[_0x491041(0xc5)]>0x0?',\x20'+_0x5b0e81[_0x491041(0xc5)]+_0x491041(0xe0):'')};}};
1
+ const a38_0x526c5b=a38_0x5e9a;function a38_0xa336(){const _0x15d8bc=['boolean','lockKey','appCode','push','\x20added,\x20','remote','apiDir','119gAgIHn','hash','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','\x20modified,\x20','All\x20BFF\x20scripts\x20are\x20in\x20sync.','map','bff','4kPTnKK','all','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','11505zuIEpe','80hulZYZ','has','lockFilePath','datasetCode','bool','\x20unchanged','764285CYFSmY','554481YhXbyb','read','1437880mDvjdm','scriptsRoot','status','length','143057ckVrqz','65944WBOomk','functions','757218VvgiBg'];a38_0xa336=function(){return _0x15d8bc;};return a38_0xa336();}(function(_0x342176,_0x1b52a4){const _0x6225f=a38_0x5e9a,_0x3fe876=_0x342176();while(!![]){try{const _0x5642b1=parseInt(_0x6225f(0x189))/0x1+-parseInt(_0x6225f(0x17c))/0x2*(-parseInt(_0x6225f(0x17b))/0x3)+-parseInt(_0x6225f(0x178))/0x4*(-parseInt(_0x6225f(0x182))/0x5)+-parseInt(_0x6225f(0x18c))/0x6+parseInt(_0x6225f(0x171))/0x7*(-parseInt(_0x6225f(0x18a))/0x8)+parseInt(_0x6225f(0x183))/0x9+-parseInt(_0x6225f(0x185))/0xa;if(_0x5642b1===_0x1b52a4)break;else _0x3fe876['push'](_0x3fe876['shift']());}catch(_0x163ef7){_0x3fe876['push'](_0x3fe876['shift']());}}}(a38_0xa336,0x189c1));function a38_0x5e9a(_0x12d3da,_0x1a451e){_0x12d3da=_0x12d3da-0x16d;const _0xa33652=a38_0xa336();let _0x5e9ab0=_0xa33652[_0x12d3da];return _0x5e9ab0;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x526c5b(0x177),'command':a38_0x526c5b(0x187),'description':a38_0x526c5b(0x173),'risk':a38_0x526c5b(0x184),'flags':[{'name':a38_0x526c5b(0x16f),'type':a38_0x526c5b(0x18d),'description':a38_0x526c5b(0x17a)}],async 'execute'(_0x166d89){const _0x42d7ff=a38_0x526c5b,_0x3337a6=loadBffProjectConfig(_0x166d89[_0x42d7ff(0x18f)]),_0x65f1e4=await readBffLockFile(_0x3337a6[_0x42d7ff(0x17e)]),{appLock:_0x14c75a}=ensureLockScope(_0x65f1e4??createEmptyBffLock(),_0x166d89[_0x42d7ff(0x18f)],_0x3337a6[_0x42d7ff(0x186)],_0x42d7ff(0x187)),_0x31e7cc=await scanLocalBffFunctions(_0x3337a6),_0x2a42df=[],_0x402ee7=[],_0x37b2e2=[];for(const _0x470269 of _0x31e7cc){const _0x17a104=await computeFileHash(_0x470269['filePath']),_0x2b56c1=_0x14c75a[_0x42d7ff(0x18b)][_0x470269['lockKey']];if(!_0x2b56c1)_0x2a42df[_0x42d7ff(0x16d)](_0x470269[_0x42d7ff(0x18e)]);else _0x2b56c1[_0x42d7ff(0x172)]!==_0x17a104?_0x402ee7[_0x42d7ff(0x16d)](_0x470269['lockKey']):_0x37b2e2[_0x42d7ff(0x16d)](_0x470269['lockKey']);}const _0x5b7c68=[];if(_0x166d89[_0x42d7ff(0x180)](_0x42d7ff(0x16f))){const _0x21e7d7=loadAliasMap(_0x166d89[_0x42d7ff(0x170)],undefined,resolveApiFilePath(_0x166d89[_0x42d7ff(0x170)],_0x166d89['appCode'])),_0x7a0e73=new Map(_0x21e7d7['map'](_0x22fedb=>[_0x22fedb[_0x42d7ff(0x17f)],_0x22fedb['alias']])),[_0x3ee9ac,_0x31099d]=await Promise[_0x42d7ff(0x179)]([listBffScripts(_0x166d89[_0x42d7ff(0x18f)]),getBffScriptStatistics(_0x166d89['appCode'])]),_0x86761=createHookLocationMap(_0x31099d),_0x224fd9=new Set(_0x31e7cc[_0x42d7ff(0x176)](_0x24ba3e=>_0x24ba3e[_0x42d7ff(0x18e)]));for(const _0x325951 of _0x3ee9ac){const _0x4ced90=resolveRemoteScriptTarget(_0x3337a6,_0x325951,_0x86761,_0x14c75a['functions'],_0x7a0e73);_0x4ced90&&!_0x224fd9[_0x42d7ff(0x17d)](_0x4ced90[_0x42d7ff(0x18e)])&&_0x5b7c68[_0x42d7ff(0x16d)](_0x4ced90['lockKey']);}}const _0x335495=_0x2a42df['length']===0x0&&_0x402ee7[_0x42d7ff(0x188)]===0x0&&_0x5b7c68[_0x42d7ff(0x188)]===0x0;return{'ok':!![],'data':{'added':_0x2a42df,'modified':_0x402ee7,'unchanged':_0x37b2e2,'remoteOnly':_0x5b7c68},'message':_0x335495?_0x42d7ff(0x175):_0x2a42df['length']+_0x42d7ff(0x16e)+_0x402ee7[_0x42d7ff(0x188)]+_0x42d7ff(0x174)+_0x37b2e2['length']+_0x42d7ff(0x181)+(_0x5b7c68['length']>0x0?',\x20'+_0x5b7c68[_0x42d7ff(0x188)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a39_0x5da00d=a39_0x5ec6;(function(_0x3e8953,_0x13411b){const _0x1e90f7=a39_0x5ec6,_0x14d949=_0x3e8953();while(!![]){try{const _0x38e3e4=-parseInt(_0x1e90f7(0x140))/0x1*(parseInt(_0x1e90f7(0x13c))/0x2)+-parseInt(_0x1e90f7(0x14e))/0x3*(parseInt(_0x1e90f7(0x148))/0x4)+parseInt(_0x1e90f7(0x131))/0x5+parseInt(_0x1e90f7(0x142))/0x6+-parseInt(_0x1e90f7(0x145))/0x7+-parseInt(_0x1e90f7(0x14a))/0x8*(parseInt(_0x1e90f7(0x13b))/0x9)+parseInt(_0x1e90f7(0x12f))/0xa*(parseInt(_0x1e90f7(0x146))/0xb);if(_0x38e3e4===_0x13411b)break;else _0x14d949['push'](_0x14d949['shift']());}catch(_0x1e4349){_0x14d949['push'](_0x14d949['shift']());}}}(a39_0x1487,0xc9f59));function a39_0x1487(){const _0x5587a2=['1zpuOgi','cli-skill-install','4020612ApnzxL','inherit','cli-skill','1553181UrSJlj','132GmBYOb','apiError','12NFKssC','skipped','3984nUPRHb','log','pipe','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','961131ilQUwL','2347790bYZHVS',')...','720255NmyHMe','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','CLI\x20Built-in\x20Skill\x20installed','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','npx\x20skills\x20add\x20failed:\x20','nonInteractive','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','info','cwd','9333cAozAR','2209672PHadrk','../../skills/npx-skills-add.js','write','unknown'];a39_0x1487=function(){return _0x5587a2;};return a39_0x1487();}function a39_0x5ec6(_0x38c268,_0x468d17){_0x38c268=_0x38c268-0x12f;const _0x148763=a39_0x1487();let _0x5ec60e=_0x148763[_0x38c268];return _0x5ec60e;}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x5da00d(0x144),'command':'install','description':a39_0x5da00d(0x133),'risk':a39_0x5da00d(0x13e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x11257d){const _0x452221=a39_0x5da00d;logger['setLogPath'](process[_0x452221(0x13a)]()),logger[_0x452221(0x139)](_0x452221(0x141),_0x452221(0x135));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0xaf0c6,RABETBASE_SKILL_SOURCE:_0x5ee77e,runNpxSkillsAddGlobal:_0x521d4d}=await import(_0x452221(0x13d)),_0x4d8bef=_0x11257d[_0x452221(0x137)]?_0x452221(0x14c):_0x452221(0x143);console['log'](_0x452221(0x138)+_0xaf0c6+_0x452221(0x130));const _0x265a53=_0x521d4d(process[_0x452221(0x13a)](),_0x5ee77e,{'stdio':_0x4d8bef});if(_0x265a53[_0x452221(0x149)])console[_0x452221(0x14b)](_0x452221(0x132));else{if(_0x265a53['ok'])console[_0x452221(0x14b)](_0x452221(0x134));else throw CliErrors[_0x452221(0x147)](_0x452221(0x136)+(_0x265a53['error']||_0x452221(0x13f)),_0x452221(0x14d)+_0xaf0c6);}return{'ok':!![]};}}];
1
+ const a39_0x2eb530=a39_0x3086;(function(_0x30640f,_0x1dfb7c){const _0x2bf7fd=a39_0x3086,_0x558750=_0x30640f();while(!![]){try{const _0x10f2d0=parseInt(_0x2bf7fd(0x137))/0x1+-parseInt(_0x2bf7fd(0x122))/0x2*(-parseInt(_0x2bf7fd(0x12d))/0x3)+-parseInt(_0x2bf7fd(0x11e))/0x4*(-parseInt(_0x2bf7fd(0x123))/0x5)+parseInt(_0x2bf7fd(0x139))/0x6+parseInt(_0x2bf7fd(0x134))/0x7*(parseInt(_0x2bf7fd(0x127))/0x8)+parseInt(_0x2bf7fd(0x129))/0x9*(parseInt(_0x2bf7fd(0x12c))/0xa)+parseInt(_0x2bf7fd(0x12e))/0xb*(-parseInt(_0x2bf7fd(0x125))/0xc);if(_0x10f2d0===_0x1dfb7c)break;else _0x558750['push'](_0x558750['shift']());}catch(_0x3aa3f2){_0x558750['push'](_0x558750['shift']());}}}(a39_0xcbfd,0x5a908));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a39_0x3086(_0x2818ec,_0x38d5c5){_0x2818ec=_0x2818ec-0x11e;const _0xcbfdc3=a39_0xcbfd();let _0x3086b0=_0xcbfdc3[_0x2818ec];return _0x3086b0;}function a39_0xcbfd(){const _0x2d08db=['Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','4141949ISskNK','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','apiError','320232MQIcJk','../../skills/npx-skills-add.js','1457502WSSTAg','cwd','CLI\x20Built-in\x20Skill\x20installed','install','info','2228XdaDHV','error','setLogPath','cli-skill-install','18dauyim','1030RHItvk','cli-skill','12DePdnq','pipe','8JLTARq','unknown','235584uTBhKz','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','inherit','80wlpmAZ','21186UsaKfS','12887732vrlEsj','log','npx\x20skills\x20add\x20failed:\x20','write','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.'];a39_0xcbfd=function(){return _0x2d08db;};return a39_0xcbfd();}export const cliSkillDefinitions=[{'service':a39_0x2eb530(0x124),'command':a39_0x2eb530(0x13c),'description':a39_0x2eb530(0x135),'risk':a39_0x2eb530(0x131),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4ac6b4){const _0x2411d5=a39_0x2eb530;logger[_0x2411d5(0x120)](process[_0x2411d5(0x13a)]()),logger[_0x2411d5(0x13d)](_0x2411d5(0x121),_0x2411d5(0x132));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x4fb620,RABETBASE_SKILL_SOURCE:_0x35f4c7,runNpxSkillsAddGlobal:_0x3ab17b}=await import(_0x2411d5(0x138)),_0x490ac3=_0x4ac6b4['nonInteractive']?_0x2411d5(0x126):_0x2411d5(0x12b);console[_0x2411d5(0x12f)](_0x2411d5(0x133)+_0x4fb620+')...');const _0x3ceba0=_0x3ab17b(process[_0x2411d5(0x13a)](),_0x35f4c7,{'stdio':_0x490ac3});if(_0x3ceba0['skipped'])console[_0x2411d5(0x12f)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x3ceba0['ok'])console[_0x2411d5(0x12f)](_0x2411d5(0x13b));else throw CliErrors[_0x2411d5(0x136)](_0x2411d5(0x130)+(_0x3ceba0[_0x2411d5(0x11f)]||_0x2411d5(0x128)),_0x2411d5(0x12a)+_0x4fb620);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x260e5c=a40_0x238e;(function(_0x46cafe,_0x4df652){const _0x488bc6=a40_0x238e,_0x2310d2=_0x46cafe();while(!![]){try{const _0x406b57=-parseInt(_0x488bc6(0x162))/0x1*(-parseInt(_0x488bc6(0x147))/0x2)+-parseInt(_0x488bc6(0x173))/0x3+parseInt(_0x488bc6(0x164))/0x4+parseInt(_0x488bc6(0x143))/0x5+parseInt(_0x488bc6(0x165))/0x6+parseInt(_0x488bc6(0x16a))/0x7*(-parseInt(_0x488bc6(0x16c))/0x8)+parseInt(_0x488bc6(0x14a))/0x9;if(_0x406b57===_0x4df652)break;else _0x2310d2['push'](_0x2310d2['shift']());}catch(_0x28bc2e){_0x2310d2['push'](_0x2310d2['shift']());}}}(a40_0x5d38,0x5a5a9));import a40_0x3bce2f from'chalk';import a40_0x549b44 from'ora';function a40_0x5d38(){const _0x155db6=['red','671785KZqLWE','start','run','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','1298CmuRRL','Checking\x20for\x20updates...','boolean','5113476izPNFw','skipped','nonInteractive','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Checking\x20CLI\x20Built-in\x20Skill...','\x20\x20Try\x20manually:\x20','pipe','map','Already\x20up\x20to\x20date\x20(v','\x20install\x20-g\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','@latest','str','skills','Beta\x20version:\x20','install','includes','gray','timeout','fail','trim','valid','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','version','166aREUnE','filter','6124XxCESM','1503690lWBgvZ','slice','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','inherit','1878989TVVhCk','beta','16MNdYea','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','latest','warn','...','/dist-tags','source','466374QMmARg','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','validation','cwd','green','yellow','Requested\x20version:\x20','bool','succeed','object','json','entries','Already\x20on\x20requested\x20version\x20(v','bun','Update\x20failed','error','https://registry.npmjs.org/-/package/','\x20\x20Run\x20manually:\x20','Updating\x20via\x20','message','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','flag','Update\x20available:\x20','Install\x20a\x20specific\x20CLI\x20version','npm','no-skills','log','fromEntries','Version\x20comparison\x20failed','Invalid\x20version:\x20','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','Current\x20version:\x20','unknown','string','\x20→\x20'];a40_0x5d38=function(){return _0x155db6;};return a40_0x5d38();}import a40_0x16ebb2 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x3c07d5=a40_0x238e;return GIT_COMMIT!==_0x3c07d5(0x13f)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3c07d5(0x166)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1ded4c=a40_0x238e,_0x242b72=process['execPath']['toLowerCase']();if(_0x242b72[_0x1ded4c(0x15a)](_0x1ded4c(0x180)))return _0x1ded4c(0x180);return _0x1ded4c(0x137);}function a40_0x238e(_0x3fcc25,_0x52c31b){_0x3fcc25=_0x3fcc25-0x133;const _0x5d387d=a40_0x5d38();let _0x238e83=_0x5d387d[_0x3fcc25];return _0x238e83;}const updateFlags=[{'name':a40_0x260e5c(0x16b),'type':a40_0x260e5c(0x149),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0x260e5c(0x161),'type':'string','description':a40_0x260e5c(0x136)},{'name':'no-skills','type':a40_0x260e5c(0x149),'description':a40_0x260e5c(0x13d),'default':![]},{'name':a40_0x260e5c(0x157),'type':a40_0x260e5c(0x149),'description':a40_0x260e5c(0x167),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x127946){const _0x231a55=a40_0x260e5c;return _0x127946[_0x231a55(0x156)](_0x231a55(0x161))[_0x231a55(0x15e)]();}function shouldSkipCliSkill(_0x3b7c22){const _0x2ad880=a40_0x260e5c;return _0x3b7c22[_0x2ad880(0x17a)](_0x2ad880(0x138))||_0x3b7c22[_0x2ad880(0x134)](_0x2ad880(0x157))===![];}async function validateUpdateFlags(_0x3f254f){const _0x1175d0=a40_0x260e5c,_0x57c94f=_0x3f254f[_0x1175d0(0x17a)]('beta'),_0x91471a=getRequestedVersion(_0x3f254f);if(_0x57c94f&&_0x91471a)throw CliErrors['validation'](_0x1175d0(0x133),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x91471a&&!a40_0x16ebb2['valid'](_0x91471a))throw CliErrors[_0x1175d0(0x175)](_0x1175d0(0x13c)+_0x91471a,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x125492=a40_0x260e5c;try{const _0x35231b=await fetch(_0x125492(0x183)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x125492(0x171),{'signal':AbortSignal[_0x125492(0x15c)](0x2710)});if(!_0x35231b['ok'])return null;const _0x5f2c55=await _0x35231b[_0x125492(0x17d)]();if(!_0x5f2c55||typeof _0x5f2c55!==_0x125492(0x17c))return null;return Object[_0x125492(0x13a)](Object[_0x125492(0x17e)](_0x5f2c55)[_0x125492(0x163)](([,_0x49498a])=>typeof _0x49498a===_0x125492(0x140)&&_0x49498a[_0x125492(0x15e)]()['length']>0x0)[_0x125492(0x151)](([_0x3b61d1,_0x4a7bac])=>[_0x3b61d1,String(_0x4a7bac)[_0x125492(0x15e)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2d3735){const _0x28a0ba=await fetchNpmDistTags();return _0x28a0ba?.[_0x2d3735]??null;}async function fetchLatestVersion(){const _0x1bcbc4=a40_0x260e5c;return fetchNpmDistTagVersion(_0x1bcbc4(0x16e));}async function resolveTargetVersion(_0xedf73f){const _0x537f13=a40_0x260e5c,_0x8f046b=getRequestedVersion(_0xedf73f);if(_0x8f046b)return{'version':_0x8f046b,'source':_0x537f13(0x161)};if(_0xedf73f['bool'](_0x537f13(0x16b))){const _0x2fc9ca=await fetchNpmDistTagVersion(_0x537f13(0x16b));if(!_0x2fc9ca)return null;return{'version':_0x2fc9ca,'source':_0x537f13(0x16b)};}const _0x22625d=await fetchLatestVersion();if(!_0x22625d)return null;return{'version':_0x22625d,'source':'latest'};}function shouldInstallTarget(_0x2bacb0,_0x1b6ab7){const _0x2d10d1=a40_0x260e5c;if(_0x1b6ab7['source']===_0x2d10d1(0x161)||_0x1b6ab7[_0x2d10d1(0x172)]===_0x2d10d1(0x16b))return!a40_0x16ebb2['eq'](_0x2bacb0,_0x1b6ab7[_0x2d10d1(0x161)]);return a40_0x16ebb2['lt'](_0x2bacb0,_0x1b6ab7['version']);}function getInstallPlanLabel(_0x75161e,_0x19fe86){const _0x58ac93=a40_0x260e5c;switch(_0x19fe86['source']){case'beta':return _0x58ac93(0x158)+a40_0x3bce2f[_0x58ac93(0x178)](_0x75161e)+_0x58ac93(0x141)+a40_0x3bce2f[_0x58ac93(0x177)](_0x19fe86[_0x58ac93(0x161)]);case _0x58ac93(0x161):return _0x58ac93(0x179)+a40_0x3bce2f['yellow'](_0x75161e)+_0x58ac93(0x141)+a40_0x3bce2f['green'](_0x19fe86[_0x58ac93(0x161)]);case'latest':default:return _0x58ac93(0x135)+a40_0x3bce2f['yellow'](_0x75161e)+_0x58ac93(0x141)+a40_0x3bce2f[_0x58ac93(0x177)](_0x19fe86[_0x58ac93(0x161)]);}}async function installCliSkill(_0xc7909a){const _0xab2dd3=a40_0x260e5c;console[_0xab2dd3(0x139)](a40_0x3bce2f[_0xab2dd3(0x15b)](_0xab2dd3(0x14e)));const _0x3537ae=runNpxSkillsAddGlobal(process[_0xab2dd3(0x176)](),RABETBASE_SKILL_SOURCE,{'stdio':_0xc7909a?_0xab2dd3(0x150):_0xab2dd3(0x169)});if(_0x3537ae[_0xab2dd3(0x14b)]){console['log'](a40_0x3bce2f[_0xab2dd3(0x15b)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x3537ae['ok']){console['log'](a40_0x3bce2f[_0xab2dd3(0x15b)](_0xab2dd3(0x146)));return;}console[_0xab2dd3(0x16f)](a40_0x3bce2f[_0xab2dd3(0x178)](_0xab2dd3(0x168)+(_0x3537ae[_0xab2dd3(0x182)]||_0xab2dd3(0x13f)))),console[_0xab2dd3(0x139)](a40_0x3bce2f[_0xab2dd3(0x15b)](_0xab2dd3(0x184)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x1a7513){const _0x533111=a40_0x260e5c;await validateUpdateFlags(_0x1a7513);const _0x52e88d=getCurrentVersion();console[_0x533111(0x139)](_0x533111(0x13e)+_0x52e88d);const _0x3da502=a40_0x549b44(_0x533111(0x148))[_0x533111(0x144)](),_0x24732f=await resolveTargetVersion(_0x1a7513);if(!_0x24732f){const _0x2ffe87=_0x1a7513[_0x533111(0x17a)](_0x533111(0x16b))?_0x533111(0x16d):_0x533111(0x174);return _0x3da502['fail'](_0x2ffe87),console['log'](a40_0x3bce2f['gray'](_0x533111(0x154)+NPM_PACKAGE_NAME+_0x533111(0x155))),{'ok':![],'message':_0x2ffe87};}const _0x3848e4=a40_0x16ebb2[_0x533111(0x15f)](VERSION),_0x49058d=a40_0x16ebb2[_0x533111(0x15f)](_0x24732f[_0x533111(0x161)]);if(!_0x3848e4||!_0x49058d)return _0x3da502['fail'](_0x533111(0x13b)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x3848e4,_0x24732f)){const _0x48fd1c=_0x24732f[_0x533111(0x172)]===_0x533111(0x161)?_0x533111(0x17f)+_0x24732f[_0x533111(0x161)]+')':_0x533111(0x152)+_0x24732f[_0x533111(0x161)]+')';return _0x3da502['succeed'](_0x48fd1c),shouldSkipCliSkill(_0x1a7513)?console['log'](a40_0x3bce2f[_0x533111(0x15b)](_0x533111(0x14d))):await installCliSkill(_0x1a7513[_0x533111(0x14c)]),{'ok':!![]};}_0x3da502['info'](getInstallPlanLabel(_0x52e88d,_0x24732f));const _0x5ea5b6=detectPackageManager(),_0x438e1d=_0x5ea5b6==='npm'?resolveNpmBin(_0x533111(0x137)):_0x5ea5b6,_0x310ffe=a40_0x549b44(_0x533111(0x185)+_0x5ea5b6+_0x533111(0x170))['start']();try{return await execa(_0x438e1d,[_0x533111(0x159),'-g',NPM_PACKAGE_NAME+'@'+_0x24732f['version']],{'stdio':'pipe'}),_0x310ffe[_0x533111(0x17b)]('Updated\x20to\x20v'+_0x24732f[_0x533111(0x161)]),console[_0x533111(0x139)](a40_0x3bce2f[_0x533111(0x15b)](_0x533111(0x160))),shouldSkipCliSkill(_0x1a7513)?console[_0x533111(0x139)](a40_0x3bce2f[_0x533111(0x15b)](_0x533111(0x14d))):await installCliSkill(_0x1a7513[_0x533111(0x14c)]),{'ok':!![]};}catch(_0x575927){return _0x310ffe[_0x533111(0x15d)](_0x533111(0x181)),console[_0x533111(0x182)](a40_0x3bce2f[_0x533111(0x142)]('\x20\x20'+_0x575927[_0x533111(0x186)])),console[_0x533111(0x139)](a40_0x3bce2f['gray'](_0x533111(0x14f)+_0x5ea5b6+_0x533111(0x153)+NPM_PACKAGE_NAME+'@'+_0x24732f['version'])),{'ok':![],'message':_0x575927['message']};}}export const updateDefinition={'service':'update','command':a40_0x260e5c(0x145),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0xa9880=a40_0x3d28;(function(_0x3a7cf5,_0x185539){const _0x2a30b7=a40_0x3d28,_0x461396=_0x3a7cf5();while(!![]){try{const _0x597bfe=parseInt(_0x2a30b7(0x150))/0x1+parseInt(_0x2a30b7(0x143))/0x2+parseInt(_0x2a30b7(0x11e))/0x3+-parseInt(_0x2a30b7(0x12c))/0x4*(-parseInt(_0x2a30b7(0x145))/0x5)+-parseInt(_0x2a30b7(0x153))/0x6*(parseInt(_0x2a30b7(0x136))/0x7)+parseInt(_0x2a30b7(0x108))/0x8+parseInt(_0x2a30b7(0x133))/0x9*(-parseInt(_0x2a30b7(0x118))/0xa);if(_0x597bfe===_0x185539)break;else _0x461396['push'](_0x461396['shift']());}catch(_0x386ac4){_0x461396['push'](_0x461396['shift']());}}}(a40_0x6f92,0xe53f7));function a40_0x6f92(){const _0x3d8706=['skipped','green','version','Invalid\x20version:\x20','fail','988704rcxANI','nonInteractive','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','update','Checking\x20for\x20updates...','write','filter','start','no-skills','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','boolean','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','info','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','/dist-tags','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','160XEqzfJ','@latest','install','source','error','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','4072059GYEXqO','validation','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','length','pipe','https://registry.npmjs.org/-/package/','Updating\x20via\x20','\x20cli-skill\x20install','unknown','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20\x20Run\x20manually:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','message','4GtIQsE','warn','gray','cwd','bool','skills','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','2165391HrrIEm','Already\x20on\x20requested\x20version\x20(v','fromEntries','259lPbxUS','red','npm','bun','succeed','Updated\x20to\x20v','yellow','run','Install\x20a\x20specific\x20CLI\x20version','Requested\x20version:\x20','\x20install\x20-g\x20','beta','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','3677098DJxYuW','trim','6595075wwXTbG','str','latest','Version\x20comparison\x20failed','\x20\x20Try\x20manually:\x20','Update\x20failed','\x20→\x20','Checking\x20CLI\x20Built-in\x20Skill...','slice','log','Current\x20version:\x20','1231884BmQMCU','string','toLowerCase','175428BJhZiU','valid'];a40_0x6f92=function(){return _0x3d8706;};return a40_0x6f92();}import a40_0x373fb8 from'chalk';import a40_0x22ca1e from'ora';import a40_0x29fa1c from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x33f374=a40_0x3d28;return GIT_COMMIT!==_0x33f374(0x127)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x33f374(0x14d)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x43625c=a40_0x3d28,_0x5de0fd=process['execPath'][_0x43625c(0x152)]();if(_0x5de0fd['includes']('bun'))return _0x43625c(0x139);return _0x43625c(0x138);}const updateFlags=[{'name':a40_0xa9880(0x141),'type':a40_0xa9880(0x112),'description':a40_0xa9880(0x142),'default':![]},{'name':a40_0xa9880(0x105),'type':'string','description':a40_0xa9880(0x13e)},{'name':a40_0xa9880(0x110),'type':a40_0xa9880(0x112),'description':a40_0xa9880(0x113),'default':![]},{'name':a40_0xa9880(0x131),'type':a40_0xa9880(0x112),'description':a40_0xa9880(0x11d),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x50ecd6){const _0x4156be=a40_0xa9880;return _0x50ecd6[_0x4156be(0x146)](_0x4156be(0x105))[_0x4156be(0x144)]();}function shouldSkipCliSkill(_0x38d22e){const _0x3cc7ef=a40_0xa9880;return _0x38d22e[_0x3cc7ef(0x130)]('no-skills')||_0x38d22e['flag']('skills')===![];}async function validateUpdateFlags(_0x462e0d){const _0x4bfebb=a40_0xa9880,_0x1b60d1=_0x462e0d[_0x4bfebb(0x130)](_0x4bfebb(0x141)),_0x4a7668=getRequestedVersion(_0x462e0d);if(_0x1b60d1&&_0x4a7668)throw CliErrors['validation'](_0x4bfebb(0x128),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x4a7668&&!a40_0x29fa1c['valid'](_0x4a7668))throw CliErrors[_0x4bfebb(0x11f)](_0x4bfebb(0x106)+_0x4a7668,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x2bb079=a40_0xa9880;try{const _0x44ca39=await fetch(_0x2bb079(0x124)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2bb079(0x116),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x44ca39['ok'])return null;const _0x32321e=await _0x44ca39['json']();if(!_0x32321e||typeof _0x32321e!=='object')return null;return Object[_0x2bb079(0x135)](Object['entries'](_0x32321e)[_0x2bb079(0x10e)](([,_0x134d1b])=>typeof _0x134d1b===_0x2bb079(0x151)&&_0x134d1b[_0x2bb079(0x144)]()[_0x2bb079(0x122)]>0x0)['map'](([_0x3c9596,_0x154ad1])=>[_0x3c9596,String(_0x154ad1)[_0x2bb079(0x144)]()]));}catch{return null;}}function a40_0x3d28(_0x383057,_0x10cd87){_0x383057=_0x383057-0x104;const _0x6f9277=a40_0x6f92();let _0x3d282b=_0x6f9277[_0x383057];return _0x3d282b;}async function fetchNpmDistTagVersion(_0x2a87c6){const _0x727136=await fetchNpmDistTags();return _0x727136?.[_0x2a87c6]??null;}async function fetchLatestVersion(){const _0x5899da=a40_0xa9880;return fetchNpmDistTagVersion(_0x5899da(0x147));}async function resolveTargetVersion(_0x57e877){const _0x39f386=a40_0xa9880,_0x3c1ca9=getRequestedVersion(_0x57e877);if(_0x3c1ca9)return{'version':_0x3c1ca9,'source':_0x39f386(0x105)};if(_0x57e877['bool']('beta')){const _0x3b2746=await fetchNpmDistTagVersion(_0x39f386(0x141));if(!_0x3b2746)return null;return{'version':_0x3b2746,'source':'beta'};}const _0x4e5b0f=await fetchLatestVersion();if(!_0x4e5b0f)return null;return{'version':_0x4e5b0f,'source':_0x39f386(0x147)};}function shouldInstallTarget(_0x38fa66,_0x4ac87e){const _0x342901=a40_0xa9880;if(_0x4ac87e[_0x342901(0x11b)]===_0x342901(0x105)||_0x4ac87e[_0x342901(0x11b)]===_0x342901(0x141))return!a40_0x29fa1c['eq'](_0x38fa66,_0x4ac87e[_0x342901(0x105)]);return a40_0x29fa1c['lt'](_0x38fa66,_0x4ac87e[_0x342901(0x105)]);}function getInstallPlanLabel(_0x140000,_0x2716e3){const _0x5f5c58=a40_0xa9880;switch(_0x2716e3['source']){case'beta':return'Beta\x20version:\x20'+a40_0x373fb8['yellow'](_0x140000)+_0x5f5c58(0x14b)+a40_0x373fb8['green'](_0x2716e3[_0x5f5c58(0x105)]);case _0x5f5c58(0x105):return _0x5f5c58(0x13f)+a40_0x373fb8[_0x5f5c58(0x13c)](_0x140000)+_0x5f5c58(0x14b)+a40_0x373fb8['green'](_0x2716e3[_0x5f5c58(0x105)]);case _0x5f5c58(0x147):default:return'Update\x20available:\x20'+a40_0x373fb8[_0x5f5c58(0x13c)](_0x140000)+_0x5f5c58(0x14b)+a40_0x373fb8[_0x5f5c58(0x104)](_0x2716e3[_0x5f5c58(0x105)]);}}async function installCliSkill(_0x3704bb){const _0x1920f4=a40_0xa9880;console[_0x1920f4(0x14e)](a40_0x373fb8[_0x1920f4(0x12e)](_0x1920f4(0x14c)));const _0x1f35b3=runNpxSkillsAddGlobal(process[_0x1920f4(0x12f)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x3704bb?_0x1920f4(0x123):'inherit'});if(_0x1f35b3[_0x1920f4(0x155)]){console[_0x1920f4(0x14e)](a40_0x373fb8[_0x1920f4(0x12e)](_0x1920f4(0x132)));return;}if(_0x1f35b3['ok']){console[_0x1920f4(0x14e)](a40_0x373fb8[_0x1920f4(0x12e)](_0x1920f4(0x111)));return;}console[_0x1920f4(0x12d)](a40_0x373fb8[_0x1920f4(0x13c)](_0x1920f4(0x12a)+(_0x1f35b3[_0x1920f4(0x11c)]||'unknown'))),console[_0x1920f4(0x14e)](a40_0x373fb8[_0x1920f4(0x12e)](_0x1920f4(0x129)+CLI_BIN_NAME+_0x1920f4(0x126)));}async function execute(_0x55ca74){const _0x2b3e44=a40_0xa9880;await validateUpdateFlags(_0x55ca74);const _0x55402b=getCurrentVersion();console[_0x2b3e44(0x14e)](_0x2b3e44(0x14f)+_0x55402b);const _0x20dc77=a40_0x22ca1e(_0x2b3e44(0x10c))[_0x2b3e44(0x10f)](),_0x257348=await resolveTargetVersion(_0x55ca74);if(!_0x257348){const _0x470f18=_0x55ca74['bool'](_0x2b3e44(0x141))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x2b3e44(0x10a);return _0x20dc77[_0x2b3e44(0x107)](_0x470f18),console[_0x2b3e44(0x14e)](a40_0x373fb8['gray'](_0x2b3e44(0x120)+NPM_PACKAGE_NAME+_0x2b3e44(0x119))),{'ok':![],'message':_0x470f18};}const _0xabc6f2=a40_0x29fa1c[_0x2b3e44(0x154)](VERSION),_0xb988d4=a40_0x29fa1c[_0x2b3e44(0x154)](_0x257348[_0x2b3e44(0x105)]);if(!_0xabc6f2||!_0xb988d4)return _0x20dc77[_0x2b3e44(0x107)](_0x2b3e44(0x148)),{'ok':![],'message':_0x2b3e44(0x148)};if(!shouldInstallTarget(_0xabc6f2,_0x257348)){const _0x2da88a=_0x257348[_0x2b3e44(0x11b)]===_0x2b3e44(0x105)?_0x2b3e44(0x134)+_0x257348['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x257348[_0x2b3e44(0x105)]+')';return _0x20dc77[_0x2b3e44(0x13a)](_0x2da88a),shouldSkipCliSkill(_0x55ca74)?console[_0x2b3e44(0x14e)](a40_0x373fb8[_0x2b3e44(0x12e)](_0x2b3e44(0x117))):await installCliSkill(_0x55ca74[_0x2b3e44(0x109)]),{'ok':!![]};}_0x20dc77[_0x2b3e44(0x114)](getInstallPlanLabel(_0x55402b,_0x257348));const _0x25ce1b=detectPackageManager(),_0x59b77b=_0x25ce1b===_0x2b3e44(0x138)?resolveNpmBin('npm'):_0x25ce1b,_0x40cfb1=a40_0x22ca1e(_0x2b3e44(0x125)+_0x25ce1b+'...')['start']();try{return await execa(_0x59b77b,[_0x2b3e44(0x11a),'-g',NPM_PACKAGE_NAME+'@'+_0x257348[_0x2b3e44(0x105)]],{'stdio':_0x2b3e44(0x123)}),_0x40cfb1['succeed'](_0x2b3e44(0x13b)+_0x257348[_0x2b3e44(0x105)]),console[_0x2b3e44(0x14e)](a40_0x373fb8[_0x2b3e44(0x12e)](_0x2b3e44(0x121))),shouldSkipCliSkill(_0x55ca74)?console[_0x2b3e44(0x14e)](a40_0x373fb8[_0x2b3e44(0x12e)](_0x2b3e44(0x117))):await installCliSkill(_0x55ca74[_0x2b3e44(0x109)]),{'ok':!![]};}catch(_0x2b2633){return _0x40cfb1[_0x2b3e44(0x107)](_0x2b3e44(0x14a)),console[_0x2b3e44(0x11c)](a40_0x373fb8[_0x2b3e44(0x137)]('\x20\x20'+_0x2b2633['message'])),console[_0x2b3e44(0x14e)](a40_0x373fb8['gray'](_0x2b3e44(0x149)+_0x25ce1b+_0x2b3e44(0x140)+NPM_PACKAGE_NAME+'@'+_0x257348[_0x2b3e44(0x105)])),{'ok':![],'message':_0x2b2633[_0x2b3e44(0x12b)]};}}export const updateDefinition={'service':a40_0xa9880(0x10b),'command':a40_0xa9880(0x13d),'description':a40_0xa9880(0x115),'risk':a40_0xa9880(0x10d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a41_0x2666(_0x16c637,_0x43fc80){_0x16c637=_0x16c637-0x156;const _0x41f834=a41_0x41f8();let _0x266657=_0x41f834[_0x16c637];return _0x266657;}(function(_0x1925db,_0x23659e){const _0x25edd6=a41_0x2666,_0x2f8aff=_0x1925db();while(!![]){try{const _0x550745=-parseInt(_0x25edd6(0x15d))/0x1+parseInt(_0x25edd6(0x15c))/0x2*(parseInt(_0x25edd6(0x157))/0x3)+-parseInt(_0x25edd6(0x15e))/0x4*(parseInt(_0x25edd6(0x159))/0x5)+parseInt(_0x25edd6(0x15a))/0x6+parseInt(_0x25edd6(0x15f))/0x7+-parseInt(_0x25edd6(0x158))/0x8+-parseInt(_0x25edd6(0x156))/0x9*(-parseInt(_0x25edd6(0x15b))/0xa);if(_0x550745===_0x23659e)break;else _0x2f8aff['push'](_0x2f8aff['shift']());}catch(_0x5bdfdb){_0x2f8aff['push'](_0x2f8aff['shift']());}}}(a41_0x41f8,0xe12ce));import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x41f8(){const _0x569575=['278397khiJSL','9KnFmQa','653960vKjveD','7265VxDOaH','4202700ItwRIM','370rtULVq','844330QsNwHq','1391141jhbAiG','2440VKTfmK','1190476LWbRgu'];a41_0x41f8=function(){return _0x569575;};return a41_0x41f8();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x2de5d3,_0x5e64f4){const _0x2a1729=a41_0x4f2f,_0x4c8dd8=_0x2de5d3();while(!![]){try{const _0x1bde04=parseInt(_0x2a1729(0xff))/0x1+parseInt(_0x2a1729(0x102))/0x2*(parseInt(_0x2a1729(0x101))/0x3)+-parseInt(_0x2a1729(0xfb))/0x4+parseInt(_0x2a1729(0xfd))/0x5+parseInt(_0x2a1729(0xfc))/0x6+-parseInt(_0x2a1729(0xfe))/0x7+parseInt(_0x2a1729(0x100))/0x8*(-parseInt(_0x2a1729(0x103))/0x9);if(_0x1bde04===_0x5e64f4)break;else _0x4c8dd8['push'](_0x4c8dd8['shift']());}catch(_0x468e2a){_0x4c8dd8['push'](_0x4c8dd8['shift']());}}}(a41_0x466d,0xe2cf7));function a41_0x4f2f(_0x5ae8d0,_0x21afd4){_0x5ae8d0=_0x5ae8d0-0xfb;const _0x466dab=a41_0x466d();let _0x4f2f94=_0x466dab[_0x5ae8d0];return _0x4f2f94;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x466d(){const _0x2c73a9=['120lhUEEu','3fiAZUf','1842424CUWlzi','30627ZCMsXM','2367996bXVHcN','403020iWHvLK','7354335enMmaB','6282689CStlmG','10337wmCNSS'];a41_0x466d=function(){return _0x2c73a9;};return a41_0x466d();}
@@ -1 +1 @@
1
- const a42_0x4b6c41=a42_0x8696;function a42_0x298a(){const _0x353f04=['7110025nrGEpJ','str','operation','1109856FkClTW','skip-imports','codegen','305240ZJEboS','appCode','1278WKCluj','1058NkOvKe','alias','string','8HXoTFd','bool','1422GfuUmD','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','name','read','sdk','1488208iCOzlf','boolean','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','11224052Ntmwfr','3745242fBXIYr'];a42_0x298a=function(){return _0x353f04;};return a42_0x298a();}function a42_0x8696(_0x2d3ef0,_0x45ca57){_0x2d3ef0=_0x2d3ef0-0x181;const _0x298a89=a42_0x298a();let _0x869684=_0x298a89[_0x2d3ef0];return _0x869684;}(function(_0x505fbf,_0x45615d){const _0x531fb1=a42_0x8696,_0x5f50ba=_0x505fbf();while(!![]){try{const _0x243dac=-parseInt(_0x531fb1(0x187))/0x1+-parseInt(_0x531fb1(0x195))/0x2*(-parseInt(_0x531fb1(0x194))/0x3)+-parseInt(_0x531fb1(0x18f))/0x4+-parseInt(_0x531fb1(0x18c))/0x5+parseInt(_0x531fb1(0x18b))/0x6+parseInt(_0x531fb1(0x18a))/0x7*(-parseInt(_0x531fb1(0x198))/0x8)+-parseInt(_0x531fb1(0x181))/0x9*(-parseInt(_0x531fb1(0x192))/0xa);if(_0x243dac===_0x45615d)break;else _0x5f50ba['push'](_0x5f50ba['shift']());}catch(_0x26ca9b){_0x5f50ba['push'](_0x5f50ba['shift']());}}}(a42_0x298a,0xd7258));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x4b6c41(0x191),'command':a42_0x4b6c41(0x186),'description':a42_0x4b6c41(0x189),'risk':a42_0x4b6c41(0x185),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x4b6c41(0x196),'type':a42_0x4b6c41(0x197),'description':a42_0x4b6c41(0x183)},{'name':a42_0x4b6c41(0x18e),'type':a42_0x4b6c41(0x197),'required':!![],'description':a42_0x4b6c41(0x182)},{'name':a42_0x4b6c41(0x190),'type':a42_0x4b6c41(0x188),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x26e957){const _0x4bd2e3=a42_0x4b6c41,{dataset:_0x885414,operation:_0x56d627}=await getOperationDetail(_0x26e957[_0x4bd2e3(0x193)],_0x26e957['str']('code'),_0x26e957[_0x4bd2e3(0x18d)](_0x4bd2e3(0x18e))),_0x3949d2=generateSdkCode(_0x885414,_0x56d627,{'includeImports':!_0x26e957[_0x4bd2e3(0x199)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x885414[_0x4bd2e3(0x184)],'code':_0x885414['code'],'tableName':_0x885414['tableName']},'operation':_0x26e957[_0x4bd2e3(0x18d)](_0x4bd2e3(0x18e)),'code':_0x3949d2}};}};
1
+ function a42_0x556c(){const _0x40658c=['3469TEzoHQ','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','alias','operation','50iUQmfI','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','read','string','4ZmzKzl','267619lrlSQk','14MvigXW','bool','725230SjNKhJ','563361hpRCEU','code','369558enQBTP','sdk','730560dOkiMV','skip-imports','120YaoNuL','71856bMWxdZ','336IPIsBW','codegen','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','str'];a42_0x556c=function(){return _0x40658c;};return a42_0x556c();}const a42_0x41917f=a42_0x3c2f;function a42_0x3c2f(_0x5e1a5c,_0xbcbcdd){_0x5e1a5c=_0x5e1a5c-0xf7;const _0x556c0b=a42_0x556c();let _0x3c2f98=_0x556c0b[_0x5e1a5c];return _0x3c2f98;}(function(_0x4335c3,_0x4ef312){const _0x72de08=a42_0x3c2f,_0x79cb95=_0x4335c3();while(!![]){try{const _0x262cd7=parseInt(_0x72de08(0x105))/0x1*(parseInt(_0x72de08(0x109))/0x2)+parseInt(_0x72de08(0xf9))/0x3*(-parseInt(_0x72de08(0x10d))/0x4)+-parseInt(_0x72de08(0xf8))/0x5+parseInt(_0x72de08(0xfb))/0x6*(-parseInt(_0x72de08(0x10f))/0x7)+-parseInt(_0x72de08(0xfd))/0x8+-parseInt(_0x72de08(0x100))/0x9*(parseInt(_0x72de08(0xff))/0xa)+parseInt(_0x72de08(0x10e))/0xb*(parseInt(_0x72de08(0x101))/0xc);if(_0x262cd7===_0x4ef312)break;else _0x79cb95['push'](_0x79cb95['shift']());}catch(_0x189e83){_0x79cb95['push'](_0x79cb95['shift']());}}}(a42_0x556c,0x1e776));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x41917f(0x102),'command':a42_0x41917f(0xfc),'description':a42_0x41917f(0x10a),'risk':a42_0x41917f(0x10b),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x41917f(0x107),'type':a42_0x41917f(0x10c),'description':a42_0x41917f(0x103)},{'name':a42_0x41917f(0x108),'type':a42_0x41917f(0x10c),'required':!![],'description':a42_0x41917f(0x106)},{'name':a42_0x41917f(0xfe),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x1f954d){const _0x130ecd=a42_0x41917f,{dataset:_0x4c0a46,operation:_0x23208b}=await getOperationDetail(_0x1f954d['appCode'],_0x1f954d[_0x130ecd(0x104)](_0x130ecd(0xfa)),_0x1f954d['str'](_0x130ecd(0x108))),_0x56b05d=generateSdkCode(_0x4c0a46,_0x23208b,{'includeImports':!_0x1f954d[_0x130ecd(0xf7)](_0x130ecd(0xfe))});return{'ok':!![],'data':{'dataset':{'name':_0x4c0a46['name'],'code':_0x4c0a46[_0x130ecd(0xfa)],'tableName':_0x4c0a46['tableName']},'operation':_0x1f954d[_0x130ecd(0x104)]('operation'),'code':_0x56b05d}};}};
@@ -1 +1 @@
1
- const a43_0x4c93ea=a43_0x5ade;(function(_0x3d4989,_0x15df73){const _0x3a3cbb=a43_0x5ade,_0x458a74=_0x3d4989();while(!![]){try{const _0x32efe3=-parseInt(_0x3a3cbb(0x1b3))/0x1+-parseInt(_0x3a3cbb(0x1a1))/0x2+-parseInt(_0x3a3cbb(0x1a5))/0x3+-parseInt(_0x3a3cbb(0x1b7))/0x4+-parseInt(_0x3a3cbb(0x1aa))/0x5+parseInt(_0x3a3cbb(0x1b5))/0x6*(-parseInt(_0x3a3cbb(0x1a7))/0x7)+-parseInt(_0x3a3cbb(0x1ae))/0x8*(-parseInt(_0x3a3cbb(0x1b6))/0x9);if(_0x32efe3===_0x15df73)break;else _0x458a74['push'](_0x458a74['shift']());}catch(_0x4bf7b7){_0x458a74['push'](_0x458a74['shift']());}}}(a43_0x2caa,0x24640));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x2caa(){const _0x25ff78=['425575DKifKt','bff','sdk','boolean','16LxjIxL','sql','no-imports','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','read','231057xyksmd','str','120036xDkUGK','5391774dRgtTZ','698180CWxLfi','string','appCode','579866oNoOXR','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','codegen','sqlcode','565326dkMaMg','sqlName','28cuYWAe','target','sqlCode'];a43_0x2caa=function(){return _0x25ff78;};return a43_0x2caa();}function a43_0x5ade(_0x2a8483,_0x39cd1b){_0x2a8483=_0x2a8483-0x1a1;const _0x2caa2a=a43_0x2caa();let _0x5ade0c=_0x2caa2a[_0x2a8483];return _0x5ade0c;}export const codegenSql={'service':a43_0x4c93ea(0x1a3),'command':a43_0x4c93ea(0x1af),'description':a43_0x4c93ea(0x1a2),'risk':a43_0x4c93ea(0x1b2),'flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x4c93ea(0x1b8),'description':a43_0x4c93ea(0x1b1),'default':a43_0x4c93ea(0x1ac),'enum':[a43_0x4c93ea(0x1ac),a43_0x4c93ea(0x1ab)]},{'name':'no-imports','type':a43_0x4c93ea(0x1ad),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x5d9b28){const _0x5801d2=a43_0x4c93ea,_0x471079=await getSqlQueryInfo(_0x5d9b28[_0x5801d2(0x1b9)],_0x5d9b28[_0x5801d2(0x1b4)](_0x5801d2(0x1a4))),_0x5efc15=_0x5d9b28['str'](_0x5801d2(0x1a8))||_0x5801d2(0x1ac),_0x1e9617=generateSqlCodeTemplate(_0x471079,{'target':_0x5efc15,'includeImports':!_0x5d9b28['bool'](_0x5801d2(0x1b0))});return{'ok':!![],'data':{'sqlCode':_0x471079[_0x5801d2(0x1a9)],'sqlName':_0x471079[_0x5801d2(0x1a6)],'target':_0x5efc15,'code':_0x1e9617}};}};
1
+ const a43_0x324e7f=a43_0x4404;(function(_0x3aaf87,_0x354f06){const _0x2e39b7=a43_0x4404,_0x39d9d4=_0x3aaf87();while(!![]){try{const _0x2b1f5a=-parseInt(_0x2e39b7(0xba))/0x1+-parseInt(_0x2e39b7(0xc7))/0x2+parseInt(_0x2e39b7(0xbd))/0x3*(parseInt(_0x2e39b7(0xb9))/0x4)+parseInt(_0x2e39b7(0xbc))/0x5*(parseInt(_0x2e39b7(0xc2))/0x6)+parseInt(_0x2e39b7(0xc0))/0x7+parseInt(_0x2e39b7(0xb3))/0x8+-parseInt(_0x2e39b7(0xbe))/0x9;if(_0x2b1f5a===_0x354f06)break;else _0x39d9d4['push'](_0x39d9d4['shift']());}catch(_0x4526a8){_0x39d9d4['push'](_0x39d9d4['shift']());}}}(a43_0x24bb,0x5bc1a));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x4404(_0x513001,_0x49d2c5){_0x513001=_0x513001-0xb2;const _0x24bbb5=a43_0x24bb();let _0x44042e=_0x24bbb5[_0x513001];return _0x44042e;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x24bb(){const _0xf968ad=['appCode','487490JROGrc','2649TVnWPY','2309715HtuWKh','sdk','2977254esLomU','str','30gJDGqu','Omit\x20import\x20statements\x20from\x20generated\x20code','read','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sqlcode','389568UnrsAa','sql','no-imports','4309432JxlkNk','target','bool','sqlCode','boolean','sqlName','556qnvDpg','746975gwtUvF'];a43_0x24bb=function(){return _0xf968ad;};return a43_0x24bb();}export const codegenSql={'service':'codegen','command':a43_0x324e7f(0xc8),'description':a43_0x324e7f(0xc5),'risk':a43_0x324e7f(0xc4),'flags':[SQLCODE_FLAG,{'name':a43_0x324e7f(0xb4),'type':'string','description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x324e7f(0xbf),'enum':['sdk','bff']},{'name':a43_0x324e7f(0xb2),'type':a43_0x324e7f(0xb7),'description':a43_0x324e7f(0xc3)}],async 'execute'(_0x645e6b){const _0x525dbe=a43_0x324e7f,_0x18e375=await getSqlQueryInfo(_0x645e6b[_0x525dbe(0xbb)],_0x645e6b[_0x525dbe(0xc1)](_0x525dbe(0xc6))),_0x1e73ea=_0x645e6b[_0x525dbe(0xc1)](_0x525dbe(0xb4))||_0x525dbe(0xbf),_0x20a9a3=generateSqlCodeTemplate(_0x18e375,{'target':_0x1e73ea,'includeImports':!_0x645e6b[_0x525dbe(0xb5)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x18e375[_0x525dbe(0xb6)],'sqlName':_0x18e375[_0x525dbe(0xb8)],'target':_0x1e73ea,'code':_0x20a9a3}};}};
@@ -1 +1 @@
1
- function a44_0x156f(){const _0x5de926=['\x20Note:\x20app\x20\x22','projectConfig','globalConfig','defaultApp','1697nKEmXY','appcode','6070NRTPKt','apps','Usage:\x20','keys','validation','flagMissing','2403417yOEOnz','3532IOSnqn','length','\x20app\x20\x22','args','App\x20\x22','1216712yhEHVI','\x22\x20not\x20found.','6264690BvbDZS','20QmNHsm','str','Missing\x20app\x20name.','project','both','Use\x20global\x20config\x20scope','object','\x20config.','trim','inherit','6885648ImWYpA','\x20<name>\x20--appcode\x20<code>','\x20<name>','global','Removed\x20app\x20\x22','16313922EoRXCz','\x20Default\x20app\x20changed\x20to\x20\x22','\x20<name>\x20[--global]','996sEiwih','\x22\x20still\x20defined\x20in\x20','string','Updated','bool'];a44_0x156f=function(){return _0x5de926;};return a44_0x156f();}(function(_0x34fb59,_0x521a35){const _0xd1d1a8=a44_0x4d3e,_0x208f57=_0x34fb59();while(!![]){try{const _0x411feb=-parseInt(_0xd1d1a8(0x19a))/0x1*(parseInt(_0xd1d1a8(0x191))/0x2)+-parseInt(_0xd1d1a8(0x176))/0x3+parseInt(_0xd1d1a8(0x177))/0x4*(parseInt(_0xd1d1a8(0x19c))/0x5)+-parseInt(_0xd1d1a8(0x17e))/0x6+-parseInt(_0xd1d1a8(0x189))/0x7+-parseInt(_0xd1d1a8(0x17c))/0x8+parseInt(_0xd1d1a8(0x18e))/0x9*(parseInt(_0xd1d1a8(0x17f))/0xa);if(_0x411feb===_0x521a35)break;else _0x208f57['push'](_0x208f57['shift']());}catch(_0x4b29dd){_0x208f57['push'](_0x208f57['shift']());}}}(a44_0x156f,0xd4afd));function a44_0x4d3e(_0x33a0a1,_0x836b7b){_0x33a0a1=_0x33a0a1-0x176;const _0x156fa0=a44_0x156f();let _0x4d3e0b=_0x156fa0[_0x33a0a1];return _0x4d3e0b;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x4123e9=a44_0x4d3e;return[{'name':_0x4123e9(0x19b),'type':_0x4123e9(0x193),'description':'App\x20code','required':!![]},{'name':_0x4123e9(0x18c),'type':'boolean','description':_0x4123e9(0x184),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x54f1cf=a44_0x4d3e;return[{'name':'global','type':'boolean','description':_0x54f1cf(0x184),'default':![]}];}export async function validateAppName(_0x2ea21e,_0x14e3eb){const _0x53280b=a44_0x4d3e,_0x505eed=_0x2ea21e[_0x53280b(0x17a)][0x0]?.[_0x53280b(0x187)]();if(!_0x505eed)throw CliErrors[_0x53280b(0x1a0)](_0x53280b(0x181),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x14e3eb+_0x53280b(0x18b));}export async function runAppAdd(_0x52ef2a,_0x51ee32){const _0x299c3b=a44_0x4d3e,_0x5bc1e6=_0x52ef2a['args'][0x0]?.[_0x299c3b(0x187)]();if(!_0x5bc1e6)throw CliErrors[_0x299c3b(0x1a0)](_0x299c3b(0x181),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x51ee32+_0x299c3b(0x18a));const _0x400e39=_0x52ef2a[_0x299c3b(0x180)]('appcode');if(!_0x400e39)throw CliErrors[_0x299c3b(0x1a1)](_0x299c3b(0x19b),_0x299c3b(0x19e)+CLI_BIN_NAME+'\x20'+_0x51ee32+'\x20<name>\x20--appcode\x20<code>');const _0x2e23b4={'global':_0x52ef2a[_0x299c3b(0x195)](_0x299c3b(0x18c))},_0x5298a2=readConfig(_0x2e23b4);if(!_0x5298a2[_0x299c3b(0x19d)])_0x5298a2[_0x299c3b(0x19d)]={};const _0x2b79b0={'appcode':_0x400e39,...collectAppProfileOverrides(_0xada00d=>_0x52ef2a[_0x299c3b(0x180)](_0xada00d))},_0x24980e=_0x5298a2[_0x299c3b(0x19d)],_0x53f81d=!!_0x24980e[_0x5bc1e6];_0x24980e[_0x5bc1e6]=_0x2b79b0;if(!_0x5298a2['defaultApp'])_0x5298a2[_0x299c3b(0x199)]=_0x5bc1e6;writeConfig(_0x5298a2,_0x2e23b4);const _0x4d8b42=!_0x53f81d&&_0x5298a2[_0x299c3b(0x199)]===_0x5bc1e6?'\x20Set\x20as\x20default\x20app.':'',_0x4cdc83=(_0x53f81d?_0x299c3b(0x194):'Added')+_0x299c3b(0x179)+_0x5bc1e6+'\x22\x20(appcode:\x20'+_0x400e39+')'+scopeLabel(_0x2e23b4)+'.'+_0x4d8b42;return{'ok':!![],'message':_0x4cdc83};}export async function runAppRemove(_0x539fe4,_0x5845c6){const _0x1d26db=a44_0x4d3e,_0x791a9f=_0x539fe4[_0x1d26db(0x17a)][0x0]?.[_0x1d26db(0x187)]();if(!_0x791a9f)throw CliErrors['validation']('Missing\x20app\x20name.',_0x1d26db(0x19e)+CLI_BIN_NAME+'\x20'+_0x5845c6+_0x1d26db(0x190));const _0x47f0cc=_0x539fe4[_0x1d26db(0x195)]('global'),{config:_0x193955,layers:_0x81b1e5}=readRawConfigWithLayers(),_0xfcc5eb=_0x193955[_0x1d26db(0x19d)]??{};if(!_0xfcc5eb[_0x791a9f])throw CliErrors[_0x1d26db(0x1a0)](_0x1d26db(0x17b)+_0x791a9f+_0x1d26db(0x17d));const _0x4c4b3e=_0x81b1e5['globalConfig'][_0x1d26db(0x19d)]&&typeof _0x81b1e5[_0x1d26db(0x198)]['apps']===_0x1d26db(0x185)?_0x81b1e5[_0x1d26db(0x198)]['apps']:{},_0x5bf4ef=_0x81b1e5[_0x1d26db(0x197)][_0x1d26db(0x19d)]&&typeof _0x81b1e5[_0x1d26db(0x197)][_0x1d26db(0x19d)]===_0x1d26db(0x185)?_0x81b1e5[_0x1d26db(0x197)]['apps']:{},_0x6f12e3=appDefinedIn(_0x791a9f,_0x4c4b3e,_0x5bf4ef,_0x81b1e5[_0x1d26db(0x197)][_0x1d26db(0x188)]===![]),_0x3048df=resolveAppScopeForWrite(_0x791a9f,_0x47f0cc,_0x81b1e5),_0x10580c={'global':_0x3048df===_0x1d26db(0x18c)},_0x431355=readConfig(_0x10580c),_0x2ae429=_0x431355[_0x1d26db(0x19d)];if(!_0x2ae429||!_0x2ae429[_0x791a9f])throw CliErrors[_0x1d26db(0x1a0)](_0x1d26db(0x17b)+_0x791a9f+_0x1d26db(0x17d));delete _0x2ae429[_0x791a9f];let _0x5f5663='';if(_0x431355['defaultApp']===_0x791a9f){const _0x18e045=Object[_0x1d26db(0x19f)](_0x2ae429);_0x431355['defaultApp']=_0x18e045[_0x1d26db(0x178)]>0x0?_0x18e045[0x0]:undefined,_0x431355[_0x1d26db(0x199)]?_0x5f5663=_0x1d26db(0x18f)+_0x431355[_0x1d26db(0x199)]+'\x22.':delete _0x431355[_0x1d26db(0x199)];}Object[_0x1d26db(0x19f)](_0x2ae429)[_0x1d26db(0x178)]===0x0&&(delete _0x431355['apps'],delete _0x431355[_0x1d26db(0x199)]);writeConfig(_0x431355,_0x10580c);const _0x5f225e=_0x6f12e3===_0x1d26db(0x183)?_0x1d26db(0x196)+_0x791a9f+_0x1d26db(0x192)+(_0x3048df===_0x1d26db(0x182)?'global':_0x1d26db(0x182))+_0x1d26db(0x186):'';return{'ok':!![],'message':_0x1d26db(0x18d)+_0x791a9f+'\x22'+scopeLabel(_0x10580c)+'.'+_0x5f5663+_0x5f225e};}
1
+ (function(_0xc4f2e0,_0x345867){const _0x28df93=a44_0x4ff0,_0x23637c=_0xc4f2e0();while(!![]){try{const _0xab8dd3=-parseInt(_0x28df93(0xb2))/0x1*(parseInt(_0x28df93(0xa9))/0x2)+-parseInt(_0x28df93(0xaa))/0x3*(parseInt(_0x28df93(0xcb))/0x4)+-parseInt(_0x28df93(0xca))/0x5+parseInt(_0x28df93(0xd3))/0x6+parseInt(_0x28df93(0xae))/0x7*(-parseInt(_0x28df93(0xd4))/0x8)+parseInt(_0x28df93(0xb0))/0x9+parseInt(_0x28df93(0xcf))/0xa;if(_0xab8dd3===_0x345867)break;else _0x23637c['push'](_0x23637c['shift']());}catch(_0x1cbdd2){_0x23637c['push'](_0x23637c['shift']());}}}(a44_0xcc8e,0xa0f54));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';function a44_0xcc8e(){const _0x44d752=['\x20<name>\x20--appcode\x20<code>','\x20config.','str','\x20Note:\x20app\x20\x22','Missing\x20app\x20name.','flagMissing','boolean','3264360FzkqxS','172oJqvqw','object','string','\x20<name>\x20[--global]','18417740CghqVW','\x22\x20(appcode:\x20','\x22\x20still\x20defined\x20in\x20','validation','1983606oFLgTn','145264ZcPAeV','project','Removed\x20app\x20\x22','global','50766bmoDCe','252ZnMsnG','trim','projectConfig','Added','385AmsVbl','\x22\x20not\x20found.','6304581rmdxTQ','Updated','22kbMwZh','apps','\x20<name>','inherit','\x20Set\x20as\x20default\x20app.','keys','args','\x20Default\x20app\x20changed\x20to\x20\x22','\x20app\x20\x22','appcode','App\x20\x22','bool','defaultApp','Use\x20global\x20config\x20scope','globalConfig','Usage:\x20','App\x20code'];a44_0xcc8e=function(){return _0x44d752;};return a44_0xcc8e();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x5e2674=a44_0x4ff0;return[{'name':_0x5e2674(0xbb),'type':_0x5e2674(0xcd),'description':_0x5e2674(0xc2),'required':!![]},{'name':_0x5e2674(0xa8),'type':_0x5e2674(0xc9),'description':_0x5e2674(0xbf),'default':![]},...getAppProfileFlagDefs()];}function a44_0x4ff0(_0x45d1cc,_0x8e973c){_0x45d1cc=_0x45d1cc-0xa8;const _0xcc8e14=a44_0xcc8e();let _0x4ff036=_0xcc8e14[_0x45d1cc];return _0x4ff036;}export function buildAppRemoveFlags(){const _0x11f44d=a44_0x4ff0;return[{'name':'global','type':_0x11f44d(0xc9),'description':_0x11f44d(0xbf),'default':![]}];}export async function validateAppName(_0x277062,_0x368b7c){const _0x6195be=a44_0x4ff0,_0x326c6b=_0x277062['args'][0x0]?.[_0x6195be(0xab)]();if(!_0x326c6b)throw CliErrors['validation'](_0x6195be(0xc7),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x368b7c+_0x6195be(0xb4));}export async function runAppAdd(_0x1ce533,_0x29c15d){const _0x213950=a44_0x4ff0,_0x4c7185=_0x1ce533[_0x213950(0xb8)][0x0]?.[_0x213950(0xab)]();if(!_0x4c7185)throw CliErrors[_0x213950(0xd2)]('Missing\x20app\x20name.',_0x213950(0xc1)+CLI_BIN_NAME+'\x20'+_0x29c15d+_0x213950(0xc3));const _0x1fd0bc=_0x1ce533[_0x213950(0xc5)](_0x213950(0xbb));if(!_0x1fd0bc)throw CliErrors[_0x213950(0xc8)](_0x213950(0xbb),_0x213950(0xc1)+CLI_BIN_NAME+'\x20'+_0x29c15d+_0x213950(0xc3));const _0x43f5f3={'global':_0x1ce533[_0x213950(0xbd)](_0x213950(0xa8))},_0x3383d8=readConfig(_0x43f5f3);if(!_0x3383d8[_0x213950(0xb3)])_0x3383d8['apps']={};const _0xcceea7={'appcode':_0x1fd0bc,...collectAppProfileOverrides(_0x3b6c04=>_0x1ce533[_0x213950(0xc5)](_0x3b6c04))},_0x5a4fd0=_0x3383d8[_0x213950(0xb3)],_0x4d2a95=!!_0x5a4fd0[_0x4c7185];_0x5a4fd0[_0x4c7185]=_0xcceea7;if(!_0x3383d8[_0x213950(0xbe)])_0x3383d8[_0x213950(0xbe)]=_0x4c7185;writeConfig(_0x3383d8,_0x43f5f3);const _0x21855d=!_0x4d2a95&&_0x3383d8[_0x213950(0xbe)]===_0x4c7185?_0x213950(0xb6):'',_0x36b3a6=(_0x4d2a95?_0x213950(0xb1):_0x213950(0xad))+_0x213950(0xba)+_0x4c7185+_0x213950(0xd0)+_0x1fd0bc+')'+scopeLabel(_0x43f5f3)+'.'+_0x21855d;return{'ok':!![],'message':_0x36b3a6};}export async function runAppRemove(_0x378810,_0x486294){const _0x348dbb=a44_0x4ff0,_0x1ca6d1=_0x378810['args'][0x0]?.[_0x348dbb(0xab)]();if(!_0x1ca6d1)throw CliErrors['validation'](_0x348dbb(0xc7),_0x348dbb(0xc1)+CLI_BIN_NAME+'\x20'+_0x486294+_0x348dbb(0xce));const _0x286e80=_0x378810[_0x348dbb(0xbd)](_0x348dbb(0xa8)),{config:_0x4381a1,layers:_0x27212b}=readRawConfigWithLayers(),_0xd4ded5=_0x4381a1[_0x348dbb(0xb3)]??{};if(!_0xd4ded5[_0x1ca6d1])throw CliErrors['validation'](_0x348dbb(0xbc)+_0x1ca6d1+_0x348dbb(0xaf));const _0x191e5f=_0x27212b[_0x348dbb(0xc0)][_0x348dbb(0xb3)]&&typeof _0x27212b['globalConfig'][_0x348dbb(0xb3)]===_0x348dbb(0xcc)?_0x27212b[_0x348dbb(0xc0)][_0x348dbb(0xb3)]:{},_0x1e2abe=_0x27212b[_0x348dbb(0xac)]['apps']&&typeof _0x27212b[_0x348dbb(0xac)][_0x348dbb(0xb3)]==='object'?_0x27212b[_0x348dbb(0xac)][_0x348dbb(0xb3)]:{},_0x1f3eae=appDefinedIn(_0x1ca6d1,_0x191e5f,_0x1e2abe,_0x27212b[_0x348dbb(0xac)][_0x348dbb(0xb5)]===![]),_0x4291c1=resolveAppScopeForWrite(_0x1ca6d1,_0x286e80,_0x27212b),_0x378d22={'global':_0x4291c1==='global'},_0x15ec0e=readConfig(_0x378d22),_0x129c00=_0x15ec0e['apps'];if(!_0x129c00||!_0x129c00[_0x1ca6d1])throw CliErrors[_0x348dbb(0xd2)](_0x348dbb(0xbc)+_0x1ca6d1+'\x22\x20not\x20found.');delete _0x129c00[_0x1ca6d1];let _0x1b76eb='';if(_0x15ec0e[_0x348dbb(0xbe)]===_0x1ca6d1){const _0x246fb1=Object[_0x348dbb(0xb7)](_0x129c00);_0x15ec0e['defaultApp']=_0x246fb1['length']>0x0?_0x246fb1[0x0]:undefined,_0x15ec0e[_0x348dbb(0xbe)]?_0x1b76eb=_0x348dbb(0xb9)+_0x15ec0e[_0x348dbb(0xbe)]+'\x22.':delete _0x15ec0e[_0x348dbb(0xbe)];}Object[_0x348dbb(0xb7)](_0x129c00)['length']===0x0&&(delete _0x15ec0e['apps'],delete _0x15ec0e['defaultApp']);writeConfig(_0x15ec0e,_0x378d22);const _0x46f1fc=_0x1f3eae==='both'?_0x348dbb(0xc6)+_0x1ca6d1+_0x348dbb(0xd1)+(_0x4291c1==='project'?'global':_0x348dbb(0xd5))+_0x348dbb(0xc4):'';return{'ok':!![],'message':_0x348dbb(0xd6)+_0x1ca6d1+'\x22'+scopeLabel(_0x378d22)+'.'+_0x1b76eb+_0x46f1fc};}
@@ -1 +1 @@
1
- function a45_0x3c03(_0x16a4e3,_0x45b7ae){_0x16a4e3=_0x16a4e3-0xeb;const _0x490020=a45_0x4900();let _0x3c0379=_0x490020[_0x16a4e3];return _0x3c0379;}(function(_0x7d0534,_0x223472){const _0x4712a9=a45_0x3c03,_0x1c5e1e=_0x7d0534();while(!![]){try{const _0x3a4029=parseInt(_0x4712a9(0x104))/0x1*(-parseInt(_0x4712a9(0x10f))/0x2)+parseInt(_0x4712a9(0x103))/0x3+-parseInt(_0x4712a9(0x10d))/0x4*(parseInt(_0x4712a9(0x105))/0x5)+-parseInt(_0x4712a9(0xfe))/0x6*(parseInt(_0x4712a9(0xfc))/0x7)+-parseInt(_0x4712a9(0x10b))/0x8*(parseInt(_0x4712a9(0xf1))/0x9)+-parseInt(_0x4712a9(0x10e))/0xa*(parseInt(_0x4712a9(0x111))/0xb)+-parseInt(_0x4712a9(0x100))/0xc*(-parseInt(_0x4712a9(0xf7))/0xd);if(_0x3a4029===_0x223472)break;else _0x1c5e1e['push'](_0x1c5e1e['shift']());}catch(_0x1a78b1){_0x1c5e1e['push'](_0x1c5e1e['shift']());}}}(a45_0x4900,0xa2cc4));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x343fc0 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x1d70eb=a45_0x3c03,_0x4b24b2=await input({'message':_0x1d70eb(0xeb),'validate':_0x30d6f3=>{const _0x5dcf0d=_0x1d70eb,_0x59839a=validateAppcode(_0x30d6f3[_0x5dcf0d(0xf3)]());return _0x59839a[_0x5dcf0d(0x107)]||_0x59839a[_0x5dcf0d(0xfb)]||_0x5dcf0d(0xfd);}});return _0x4b24b2[_0x1d70eb(0xf3)]();}function a45_0x4900(){const _0x1e96b2=['26770ekuOkk','865kINWDG','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','valid','map','gray','yellow','8MYjPCh','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','13872HLQJiF','89410fWUnzP','10JIKMcj','App\x20Code:','561uSObRd','请输入\x20App\x20Code:','manual','appName','\x0a未找到可用应用。','获取到\x20','length','390843pRaTPz','未找到可用应用。','trim','正在获取可用应用列表...','appCode','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','221LAmbEN','includes','custom','✎\x20自定义输入\x20appcode','message','1897nODyjN','Invalid\x20App\x20Code','28644lLzhQg','find','1703256oAjTPc','请选择要绑定的应用:','skip','2342580cRnuhx'];a45_0x4900=function(){return _0x1e96b2;};return a45_0x4900();}export async function promptAppSelection(_0xc9a8ae){const _0x4193f4=a45_0x3c03,_0x3d7d9c=[{'name':a45_0x343fc0[_0x4193f4(0x10a)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0xc9a8ae[_0x4193f4(0x108)]((_0x2186fe,_0x29974d)=>({'name':_0x2186fe[_0x4193f4(0xed)]+'\x20\x20'+a45_0x343fc0['gray']('('+_0x2186fe[_0x4193f4(0xf5)]+')'),'value':_0x29974d}))],_0xe99671=await checkbox({'message':_0x4193f4(0xef)+a45_0x343fc0['cyan'](_0xc9a8ae['length'])+_0x4193f4(0xf6),'choices':_0x3d7d9c,'loop':![]});if(_0xe99671[_0x4193f4(0xf8)](-0x1))return'custom';if(_0xe99671[_0x4193f4(0xf0)]===0x0)return _0x4193f4(0xf9);return _0xe99671['map'](_0x7c10a=>_0xc9a8ae[_0x7c10a]);}export async function promptSingleAppSelection(_0x29167e){const _0x4a8a5c=a45_0x3c03,_0x11c6af=[{'name':a45_0x343fc0[_0x4a8a5c(0x109)](_0x4a8a5c(0x106)),'value':'skip'},{'name':a45_0x343fc0['yellow'](_0x4a8a5c(0xfa)),'value':_0x4a8a5c(0xf9)},..._0x29167e[_0x4a8a5c(0x108)](_0x19c847=>({'name':_0x19c847[_0x4a8a5c(0xed)]+'\x20\x20'+a45_0x343fc0['gray']('('+_0x19c847[_0x4a8a5c(0xf5)]+')'),'value':_0x19c847['appCode']}))],_0x21d76c=await select({'message':_0x4a8a5c(0x101),'choices':_0x11c6af});if(_0x21d76c===_0x4a8a5c(0x102))return _0x4a8a5c(0x102);if(_0x21d76c===_0x4a8a5c(0xf9))return _0x4a8a5c(0xf9);return _0x29167e[_0x4a8a5c(0xff)](_0x3a6425=>_0x3a6425[_0x4a8a5c(0xf5)]===_0x21d76c);}export async function selectSingleAppcode(_0x2821de){const _0x1761ae=a45_0x3c03;if(!_0x2821de)return writeCliSideChannelLine(a45_0x343fc0[_0x1761ae(0x109)](_0x1761ae(0x10c))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x4de439;try{_0x4de439=await withActiveCookie(_0x2821de,()=>listRemoteApps());}catch(_0x45e5f0){writeCliSideChannelLine(a45_0x343fc0[_0x1761ae(0x10a)]('无法获取远程应用列表,请手动输入。'));if(_0x45e5f0 instanceof Error)writeCliSideChannelLine(a45_0x343fc0['gray']('\x20\x20('+_0x45e5f0[_0x1761ae(0xfb)]+')'));return _fallbackOrSkip();}if(_0x4de439[_0x1761ae(0xf0)]===0x0)return writeCliSideChannelLine(a45_0x343fc0[_0x1761ae(0x10a)](_0x1761ae(0xf2))),_fallbackOrSkip();const _0x3830a3=await promptSingleAppSelection(_0x4de439);if(_0x3830a3==='skip')return'';if(_0x3830a3===_0x1761ae(0xf9))return promptCustomAppcode();return _0x3830a3['appCode'];}export async function selectMultipleApps(_0x6fc925){const _0x114fd6=a45_0x3c03;writeCliSideChannelLine(_0x114fd6(0xf4));let _0x4c9f83;try{_0x4c9f83=await withActiveCookie(_0x6fc925,()=>listRemoteApps());}catch(_0x456e71){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x456e71 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x456e71[_0x114fd6(0xfb)]+')');return'custom';}if(_0x4c9f83[_0x114fd6(0xf0)]===0x0)return writeCliSideChannelLine(_0x114fd6(0xee)),_0x114fd6(0xf9);return promptAppSelection(_0x4c9f83);}async function _fallbackOrSkip(){const _0x193291=a45_0x3c03,_0x147dfa=await select({'message':_0x193291(0x110),'choices':[{'name':a45_0x343fc0['gray']('(跳过,稍后配置)'),'value':'skip'},{'name':a45_0x343fc0['yellow']('✎\x20手动输入'),'value':_0x193291(0xec)}]});if(_0x147dfa===_0x193291(0x102))return'';return promptCustomAppcode();}
1
+ (function(_0x4efaed,_0x55f56a){const _0x97e8a5=a45_0x2f90,_0x36fd02=_0x4efaed();while(!![]){try{const _0x410a8e=-parseInt(_0x97e8a5(0xc0))/0x1+parseInt(_0x97e8a5(0xc9))/0x2+-parseInt(_0x97e8a5(0xc5))/0x3+-parseInt(_0x97e8a5(0xcd))/0x4+-parseInt(_0x97e8a5(0xdf))/0x5+-parseInt(_0x97e8a5(0xd2))/0x6+-parseInt(_0x97e8a5(0xdb))/0x7*(-parseInt(_0x97e8a5(0xc1))/0x8);if(_0x410a8e===_0x55f56a)break;else _0x36fd02['push'](_0x36fd02['shift']());}catch(_0x58c456){_0x36fd02['push'](_0x36fd02['shift']());}}}(a45_0xfd5a,0x65bfa));import{input,checkbox,select}from'@inquirer/prompts';function a45_0xfd5a(){const _0x233120=['2585996hUTnnu','map','未找到可用应用。','✎\x20自定义输入\x20appcode','valid','1804542ekLoKa','yellow','无法获取远程应用列表,请手动输入。','trim','skip','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','✎\x20手动输入','获取到\x20','请选择要绑定的应用:','21OTLkBP','message','cyan','length','2510725OKxBMd','App\x20Code:','custom','605744GSTQJp','5785864hMjDKB','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','\x0a无法获取远程应用列表,请手动输入。','appCode','1181973psBbgm','find','Invalid\x20App\x20Code','正在获取可用应用列表...','1392398enzOrl','(跳过,稍后配置)','gray','\x0a未找到可用应用。'];a45_0xfd5a=function(){return _0x233120;};return a45_0xfd5a();}function a45_0x2f90(_0x53a32a,_0x5f447d){_0x53a32a=_0x53a32a-0xbf;const _0xfd5af9=a45_0xfd5a();let _0x2f907b=_0xfd5af9[_0x53a32a];return _0x2f907b;}import a45_0x3140a2 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x4e4bc9=a45_0x2f90,_0x33cf32=await input({'message':'请输入\x20App\x20Code:','validate':_0x39db83=>{const _0x38be7f=a45_0x2f90,_0x23c4ac=validateAppcode(_0x39db83[_0x38be7f(0xd5)]());return _0x23c4ac[_0x38be7f(0xd1)]||_0x23c4ac[_0x38be7f(0xdc)]||_0x38be7f(0xc7);}});return _0x33cf32[_0x4e4bc9(0xd5)]();}export async function promptAppSelection(_0x3ab374){const _0x6e168a=a45_0x2f90,_0x3286dd=[{'name':a45_0x3140a2['yellow']('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x3ab374[_0x6e168a(0xce)]((_0x29c095,_0x272ab1)=>({'name':_0x29c095['appName']+'\x20\x20'+a45_0x3140a2[_0x6e168a(0xcb)]('('+_0x29c095[_0x6e168a(0xc4)]+')'),'value':_0x272ab1}))],_0x406ce7=await checkbox({'message':_0x6e168a(0xd9)+a45_0x3140a2[_0x6e168a(0xdd)](_0x3ab374[_0x6e168a(0xde)])+_0x6e168a(0xd7),'choices':_0x3286dd,'loop':![]});if(_0x406ce7['includes'](-0x1))return _0x6e168a(0xbf);if(_0x406ce7[_0x6e168a(0xde)]===0x0)return _0x6e168a(0xbf);return _0x406ce7[_0x6e168a(0xce)](_0x2c80a0=>_0x3ab374[_0x2c80a0]);}export async function promptSingleAppSelection(_0x3ba293){const _0x48668f=a45_0x2f90,_0x3d48d0=[{'name':a45_0x3140a2[_0x48668f(0xcb)](_0x48668f(0xc2)),'value':_0x48668f(0xd6)},{'name':a45_0x3140a2[_0x48668f(0xd3)](_0x48668f(0xd0)),'value':_0x48668f(0xbf)},..._0x3ba293['map'](_0x316916=>({'name':_0x316916['appName']+'\x20\x20'+a45_0x3140a2[_0x48668f(0xcb)]('('+_0x316916['appCode']+')'),'value':_0x316916[_0x48668f(0xc4)]}))],_0x11ca83=await select({'message':_0x48668f(0xda),'choices':_0x3d48d0});if(_0x11ca83===_0x48668f(0xd6))return _0x48668f(0xd6);if(_0x11ca83===_0x48668f(0xbf))return _0x48668f(0xbf);return _0x3ba293[_0x48668f(0xc6)](_0x4b9bbb=>_0x4b9bbb['appCode']===_0x11ca83);}export async function selectSingleAppcode(_0xa21a49){const _0x8a459c=a45_0x2f90;if(!_0xa21a49)return writeCliSideChannelLine(a45_0x3140a2[_0x8a459c(0xcb)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x241ed8;try{_0x241ed8=await withActiveCookie(_0xa21a49,()=>listRemoteApps());}catch(_0x4e7415){writeCliSideChannelLine(a45_0x3140a2[_0x8a459c(0xd3)](_0x8a459c(0xd4)));if(_0x4e7415 instanceof Error)writeCliSideChannelLine(a45_0x3140a2[_0x8a459c(0xcb)]('\x20\x20('+_0x4e7415['message']+')'));return _fallbackOrSkip();}if(_0x241ed8['length']===0x0)return writeCliSideChannelLine(a45_0x3140a2[_0x8a459c(0xd3)](_0x8a459c(0xcf))),_fallbackOrSkip();const _0x8fb5ff=await promptSingleAppSelection(_0x241ed8);if(_0x8fb5ff==='skip')return'';if(_0x8fb5ff===_0x8a459c(0xbf))return promptCustomAppcode();return _0x8fb5ff[_0x8a459c(0xc4)];}export async function selectMultipleApps(_0x1b0d7d){const _0x2373d4=a45_0x2f90;writeCliSideChannelLine(_0x2373d4(0xc8));let _0x47632d;try{_0x47632d=await withActiveCookie(_0x1b0d7d,()=>listRemoteApps());}catch(_0x26efc0){writeCliSideChannelLine(_0x2373d4(0xc3));if(_0x26efc0 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x26efc0[_0x2373d4(0xdc)]+')');return'custom';}if(_0x47632d[_0x2373d4(0xde)]===0x0)return writeCliSideChannelLine(_0x2373d4(0xcc)),_0x2373d4(0xbf);return promptAppSelection(_0x47632d);}async function _fallbackOrSkip(){const _0x1dd469=a45_0x2f90,_0x4df6b3=await select({'message':_0x1dd469(0xe0),'choices':[{'name':a45_0x3140a2[_0x1dd469(0xcb)](_0x1dd469(0xca)),'value':_0x1dd469(0xd6)},{'name':a45_0x3140a2[_0x1dd469(0xd3)](_0x1dd469(0xd8)),'value':'manual'}]});if(_0x4df6b3==='skip')return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a46_0x593cbe=a46_0xed98;(function(_0x4f8613,_0x537fd6){const _0x36759f=a46_0xed98,_0x569dd0=_0x4f8613();while(!![]){try{const _0xbb5e9=-parseInt(_0x36759f(0x194))/0x1*(parseInt(_0x36759f(0x198))/0x2)+-parseInt(_0x36759f(0x18b))/0x3*(parseInt(_0x36759f(0x1a0))/0x4)+-parseInt(_0x36759f(0x197))/0x5+parseInt(_0x36759f(0x189))/0x6+parseInt(_0x36759f(0x185))/0x7+parseInt(_0x36759f(0x1a3))/0x8*(-parseInt(_0x36759f(0x18d))/0x9)+-parseInt(_0x36759f(0x1a1))/0xa*(-parseInt(_0x36759f(0x19a))/0xb);if(_0xbb5e9===_0x537fd6)break;else _0x569dd0['push'](_0x569dd0['shift']());}catch(_0x34cf7b){_0x569dd0['push'](_0x569dd0['shift']());}}}(a46_0x25da,0x3bb55));import{CLI_BIN_NAME}from'../../constant/cli.js';function a46_0x25da(){const _0x423446=['apiError','has','973652toIWtV','1287960fLroGt','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','3391976sVSOWK','string','2477881zjfmlY','\x20is\x20processing.','\x20failed:\x20','PENDING','1724682DTMtOY','PROCESSING','6mYseKU','Task\x20','9EFbRZv','\x20failed.','Async\x20task\x20','replace','status','trim','SUCCESS','1qZETZX','FAILED','\x20--appcode\x20','1252775ZQflDL','16526LWOdNN','errorMessage','66bqEFXH','\x20completed\x20successfully.','taskId','\x20response\x20did\x20not\x20contain\x20a\x20status.'];a46_0x25da=function(){return _0x423446;};return a46_0x25da();}function a46_0xed98(_0x4b0e00,_0x5b0fb8){_0x4b0e00=_0x4b0e00-0x185;const _0x25da4a=a46_0x25da();let _0xed98f=_0x25da4a[_0x4b0e00];return _0xed98f;}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x593cbe(0x193),a46_0x593cbe(0x195)]),NON_TERMINAL_STATUSES=new Set([a46_0x593cbe(0x188),a46_0x593cbe(0x18a)]);export function normalizeAsyncTask(_0x333469){const _0x2426e7=a46_0x593cbe,_0x4eee0f=typeof _0x333469?.[_0x2426e7(0x19c)]==='string'?_0x333469[_0x2426e7(0x19c)]['trim']():'';if(!_0x4eee0f)throw CliErrors[_0x2426e7(0x19e)](_0x2426e7(0x1a2));const _0x4ee5ba=typeof _0x333469['status']===_0x2426e7(0x1a4)?_0x333469[_0x2426e7(0x191)][_0x2426e7(0x192)]()['toUpperCase']():'';if(!_0x4ee5ba)throw CliErrors['apiError'](_0x2426e7(0x18f)+_0x4eee0f+_0x2426e7(0x19d));return{'taskId':_0x4eee0f,'status':_0x4ee5ba,'errorMessage':typeof _0x333469[_0x2426e7(0x199)]===_0x2426e7(0x1a4)&&_0x333469[_0x2426e7(0x199)][_0x2426e7(0x192)]()?_0x333469[_0x2426e7(0x199)][_0x2426e7(0x192)]():null,'isTerminal':TERMINAL_STATUSES[_0x2426e7(0x19f)](_0x4ee5ba),'knownStatus':TERMINAL_STATUSES['has'](_0x4ee5ba)||NON_TERMINAL_STATUSES[_0x2426e7(0x19f)](_0x4ee5ba)};}export function buildAsyncTaskStatusCommand(_0x472653,_0x3362ef){const _0x5027db=a46_0x593cbe;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x472653)+_0x5027db(0x196)+quoteShellArg(_0x3362ef)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x2c04ab){const _0x5b5bca=a46_0x593cbe;switch(_0x2c04ab[_0x5b5bca(0x191)]){case _0x5b5bca(0x188):return _0x5b5bca(0x18c)+_0x2c04ab['taskId']+'\x20is\x20pending.';case'PROCESSING':return _0x5b5bca(0x18c)+_0x2c04ab['taskId']+_0x5b5bca(0x186);case _0x5b5bca(0x193):return _0x5b5bca(0x18c)+_0x2c04ab['taskId']+_0x5b5bca(0x19b);case _0x5b5bca(0x195):return _0x2c04ab[_0x5b5bca(0x199)]?_0x5b5bca(0x18c)+_0x2c04ab[_0x5b5bca(0x19c)]+_0x5b5bca(0x187)+_0x2c04ab[_0x5b5bca(0x199)]:'Task\x20'+_0x2c04ab[_0x5b5bca(0x19c)]+_0x5b5bca(0x18e);default:return _0x5b5bca(0x18c)+_0x2c04ab['taskId']+'\x20returned\x20unknown\x20status\x20'+_0x2c04ab[_0x5b5bca(0x191)]+'.';}}function quoteShellArg(_0x40230a){const _0xf2da76=a46_0x593cbe;return'\x27'+_0x40230a[_0xf2da76(0x190)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
1
+ const a46_0x15a1c7=a46_0x3fb6;(function(_0x49abfd,_0x57e304){const _0x17d72d=a46_0x3fb6,_0x32d164=_0x49abfd();while(!![]){try{const _0x3387c4=-parseInt(_0x17d72d(0xbd))/0x1*(-parseInt(_0x17d72d(0xc0))/0x2)+parseInt(_0x17d72d(0xda))/0x3+parseInt(_0x17d72d(0xcf))/0x4+parseInt(_0x17d72d(0xd2))/0x5+-parseInt(_0x17d72d(0xd3))/0x6+-parseInt(_0x17d72d(0xc3))/0x7*(-parseInt(_0x17d72d(0xc1))/0x8)+-parseInt(_0x17d72d(0xbe))/0x9*(parseInt(_0x17d72d(0xd4))/0xa);if(_0x3387c4===_0x57e304)break;else _0x32d164['push'](_0x32d164['shift']());}catch(_0x32ff8d){_0x32d164['push'](_0x32d164['shift']());}}}(a46_0x1916,0x58758));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a46_0x15a1c7(0xd6)]),NON_TERMINAL_STATUSES=new Set([a46_0x15a1c7(0xd5),a46_0x15a1c7(0xd8)]);export function normalizeAsyncTask(_0x2857ad){const _0x28f5f2=a46_0x15a1c7,_0x24b835=typeof _0x2857ad?.['taskId']==='string'?_0x2857ad[_0x28f5f2(0xca)]['trim']():'';if(!_0x24b835)throw CliErrors[_0x28f5f2(0xcd)](_0x28f5f2(0xc8));const _0xe8013a=typeof _0x2857ad[_0x28f5f2(0xd0)]==='string'?_0x2857ad[_0x28f5f2(0xd0)][_0x28f5f2(0xcb)]()[_0x28f5f2(0xc2)]():'';if(!_0xe8013a)throw CliErrors[_0x28f5f2(0xcd)](_0x28f5f2(0xc9)+_0x24b835+_0x28f5f2(0xcc));return{'taskId':_0x24b835,'status':_0xe8013a,'errorMessage':typeof _0x2857ad[_0x28f5f2(0xbf)]===_0x28f5f2(0xc7)&&_0x2857ad['errorMessage'][_0x28f5f2(0xcb)]()?_0x2857ad[_0x28f5f2(0xbf)][_0x28f5f2(0xcb)]():null,'isTerminal':TERMINAL_STATUSES[_0x28f5f2(0xdb)](_0xe8013a),'knownStatus':TERMINAL_STATUSES['has'](_0xe8013a)||NON_TERMINAL_STATUSES[_0x28f5f2(0xdb)](_0xe8013a)};}export function buildAsyncTaskStatusCommand(_0xfad33b,_0x28ef6a){const _0x4730fc=a46_0x15a1c7;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0xfad33b)+'\x20--appcode\x20'+quoteShellArg(_0x28ef6a)+_0x4730fc(0xc4);}export function asyncTaskMessage(_0x5600f8){const _0x426f52=a46_0x15a1c7;switch(_0x5600f8[_0x426f52(0xd0)]){case _0x426f52(0xd5):return _0x426f52(0xd7)+_0x5600f8[_0x426f52(0xca)]+'\x20is\x20pending.';case'PROCESSING':return'Task\x20'+_0x5600f8[_0x426f52(0xca)]+_0x426f52(0xd9);case'SUCCESS':return _0x426f52(0xd7)+_0x5600f8[_0x426f52(0xca)]+'\x20completed\x20successfully.';case _0x426f52(0xd6):return _0x5600f8[_0x426f52(0xbf)]?'Task\x20'+_0x5600f8[_0x426f52(0xca)]+'\x20failed:\x20'+_0x5600f8[_0x426f52(0xbf)]:_0x426f52(0xd7)+_0x5600f8[_0x426f52(0xca)]+_0x426f52(0xc6);default:return'Task\x20'+_0x5600f8[_0x426f52(0xca)]+_0x426f52(0xd1)+_0x5600f8[_0x426f52(0xd0)]+'.';}}function quoteShellArg(_0x10ea38){const _0x589302=a46_0x15a1c7;return'\x27'+_0x10ea38[_0x589302(0xce)](/'/g,_0x589302(0xc5))+'\x27';}function a46_0x3fb6(_0x4aa1e5,_0x174589){_0x4aa1e5=_0x4aa1e5-0xbd;const _0x191654=a46_0x1916();let _0x3fb619=_0x191654[_0x4aa1e5];return _0x3fb619;}function a46_0x1916(){const _0x3696d8=['replace','2030088fFkGTJ','status','\x20returned\x20unknown\x20status\x20','3280710SLAUlT','533190ayJmnp','10KGtjWf','PENDING','FAILED','Task\x20','PROCESSING','\x20is\x20processing.','807930gEsvDT','has','1jmsomi','11370852dCoAJB','errorMessage','54886nUpqQn','32aNxdom','toUpperCase','444857VJtfUh','\x20--format\x20compress','\x27\x5c\x27\x27','\x20failed.','string','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','Async\x20task\x20','taskId','trim','\x20response\x20did\x20not\x20contain\x20a\x20status.','apiError'];a46_0x1916=function(){return _0x3696d8;};return a46_0x1916();}
@@ -1 +1 @@
1
- (function(_0x474f4d,_0x4fb344){var _0x29242a=a47_0xb97f,_0x3eb6fb=_0x474f4d();while(!![]){try{var _0x548671=parseInt(_0x29242a(0xa2))/0x1*(-parseInt(_0x29242a(0xa0))/0x2)+parseInt(_0x29242a(0x9e))/0x3+parseInt(_0x29242a(0x9d))/0x4*(parseInt(_0x29242a(0xa4))/0x5)+parseInt(_0x29242a(0xa8))/0x6+parseInt(_0x29242a(0xa1))/0x7*(parseInt(_0x29242a(0x9f))/0x8)+-parseInt(_0x29242a(0xa3))/0x9+parseInt(_0x29242a(0x9b))/0xa;if(_0x548671===_0x4fb344)break;else _0x3eb6fb['push'](_0x3eb6fb['shift']());}catch(_0x38020f){_0x3eb6fb['push'](_0x3eb6fb['shift']());}}}(a47_0x8991,0x4be3f));function a47_0xb97f(_0x4238b5,_0x5996db){_0x4238b5=_0x4238b5-0x9b;var _0x899188=a47_0x8991();var _0xb97fdb=_0x899188[_0x4238b5];return _0xb97fdb;}function a47_0x8991(){var _0x22c730=['247816nyKlcB','1234516DUIyvl','49fENwOh','1WXlzan','5391333mLjzDt','15qorNHT','method','url','description','3256164BHoNiO','3026220vuWbFP','defineProperties','96932twZLqf','1176864FpDZow'];a47_0x8991=function(){return _0x22c730;};return a47_0x8991();}export function asDryRunResult(_0x1bf003,_0x5a4e2b){var _0x3df22f=a47_0xb97f;return Object[_0x3df22f(0x9c)](_0x1bf003,{'method':{'value':_0x5a4e2b[_0x3df22f(0xa5)],'enumerable':![]},'url':{'value':_0x5a4e2b[_0x3df22f(0xa6)],'enumerable':![]},..._0x5a4e2b[_0x3df22f(0xa7)]?{'description':{'value':_0x5a4e2b[_0x3df22f(0xa7)],'enumerable':![]}}:{}});}
1
+ function a47_0x146f(_0x42ba7b,_0x32a606){_0x42ba7b=_0x42ba7b-0xb0;var _0x3ff346=a47_0x3ff3();var _0x146fd9=_0x3ff346[_0x42ba7b];return _0x146fd9;}(function(_0x3e855b,_0x1b2aea){var _0x52ffbf=a47_0x146f,_0x210dec=_0x3e855b();while(!![]){try{var _0x30319f=parseInt(_0x52ffbf(0xb4))/0x1*(-parseInt(_0x52ffbf(0xb0))/0x2)+-parseInt(_0x52ffbf(0xbb))/0x3*(parseInt(_0x52ffbf(0xb2))/0x4)+-parseInt(_0x52ffbf(0xbe))/0x5*(-parseInt(_0x52ffbf(0xb1))/0x6)+parseInt(_0x52ffbf(0xb3))/0x7+-parseInt(_0x52ffbf(0xbd))/0x8*(parseInt(_0x52ffbf(0xb5))/0x9)+-parseInt(_0x52ffbf(0xb7))/0xa*(parseInt(_0x52ffbf(0xbf))/0xb)+parseInt(_0x52ffbf(0xbc))/0xc;if(_0x30319f===_0x1b2aea)break;else _0x210dec['push'](_0x210dec['shift']());}catch(_0x5555c6){_0x210dec['push'](_0x210dec['shift']());}}}(a47_0x3ff3,0x507f6));export function asDryRunResult(_0x57b3b0,_0x45ed98){var _0x5df886=a47_0x146f;return Object[_0x5df886(0xb8)](_0x57b3b0,{'method':{'value':_0x45ed98[_0x5df886(0xba)],'enumerable':![]},'url':{'value':_0x45ed98[_0x5df886(0xb6)],'enumerable':![]},..._0x45ed98[_0x5df886(0xb9)]?{'description':{'value':_0x45ed98[_0x5df886(0xb9)],'enumerable':![]}}:{}});}function a47_0x3ff3(){var _0x38553b=['description','method','209091gOPrOS','9399804JOMHXt','40bxYlOb','676745uzehmi','143ysFlqJ','1010cwvsBS','12Eaftjy','4aJuxDM','192612ZVGclW','518NfQxqw','168507WfQvfk','url','251470nbmtun','defineProperties'];a47_0x3ff3=function(){return _0x38553b;};return a47_0x3ff3();}
@@ -1 +1 @@
1
- const a48_0x399402=a48_0x51a1;(function(_0xebe74,_0x158c13){const _0x3301f0=a48_0x51a1,_0x404655=_0xebe74();while(!![]){try{const _0x20d5fc=-parseInt(_0x3301f0(0xcd))/0x1*(-parseInt(_0x3301f0(0xe5))/0x2)+-parseInt(_0x3301f0(0xe3))/0x3+-parseInt(_0x3301f0(0xdf))/0x4+-parseInt(_0x3301f0(0xdd))/0x5*(-parseInt(_0x3301f0(0xe2))/0x6)+parseInt(_0x3301f0(0xce))/0x7*(-parseInt(_0x3301f0(0xcf))/0x8)+parseInt(_0x3301f0(0xd6))/0x9*(parseInt(_0x3301f0(0xd8))/0xa)+-parseInt(_0x3301f0(0xd9))/0xb*(-parseInt(_0x3301f0(0xde))/0xc);if(_0x20d5fc===_0x158c13)break;else _0x404655['push'](_0x404655['shift']());}catch(_0x5049c4){_0x404655['push'](_0x404655['shift']());}}}(a48_0x49fe,0x996fe));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x399402(0xe1)};export const CODE_FLAG={'name':a48_0x399402(0xd4),'type':a48_0x399402(0xd0),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x399402(0xd5),'description':a48_0x399402(0xe6)};export const SQLCODE_FLAG={'name':a48_0x399402(0xdc),'type':a48_0x399402(0xd0),'required':!![],'description':a48_0x399402(0xd3),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x399402(0xe4),'type':'string','required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x399402(0xe0)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x399402(0xdb),'required':!![],'description':a48_0x399402(0xd2)};function a48_0x51a1(_0x1a5f94,_0x555882){_0x1a5f94=_0x1a5f94-0xcd;const _0x49fe7d=a48_0x49fe();let _0x51a150=_0x49fe7d[_0x1a5f94];return _0x51a150;}export const DB_TYPE_FLAG={'name':'dbtype','type':'string','required':!![],'description':a48_0x399402(0xd1),'enum':[a48_0x399402(0xda),a48_0x399402(0xd7)]};function a48_0x49fe(){const _0x3a873f=['325680niQmDl','string','Database\x20product\x20type','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','code','datasetcode','9zXoMip','POSTGRESQL','380260ubIDkR','1576817HrNihd','MYSQL','number','sqlcode','10PVolyH','84CTSGpA','2771068zcumzM','App\x20code\x20(e.g.\x20app-xxxxx)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','3586434CAvbau','3138315OQBNdQ','appcode','1075034oikvCl','Dataset\x20code\x20(32-char\x20hex\x20UUID)','1iRwLTs','70xBiwVs'];a48_0x49fe=function(){return _0x3a873f;};return a48_0x49fe();}
1
+ const a48_0x57f27f=a48_0x3b6d;(function(_0x239070,_0x2df7df){const _0x4f4d47=a48_0x3b6d,_0x1ccdc1=_0x239070();while(!![]){try{const _0x3a234b=-parseInt(_0x4f4d47(0xd0))/0x1+parseInt(_0x4f4d47(0xd2))/0x2+parseInt(_0x4f4d47(0xcd))/0x3+parseInt(_0x4f4d47(0xd9))/0x4+parseInt(_0x4f4d47(0xd6))/0x5*(parseInt(_0x4f4d47(0xcf))/0x6)+-parseInt(_0x4f4d47(0xce))/0x7+parseInt(_0x4f4d47(0xc8))/0x8*(-parseInt(_0x4f4d47(0xca))/0x9);if(_0x3a234b===_0x2df7df)break;else _0x1ccdc1['push'](_0x1ccdc1['shift']());}catch(_0x199865){_0x1ccdc1['push'](_0x1ccdc1['shift']());}}}(a48_0x58b1,0x2c2bb));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x57f27f(0xd1)};function a48_0x3b6d(_0xab3875,_0x321001){_0xab3875=_0xab3875-0xc3;const _0x58b1aa=a48_0x58b1();let _0x3b6d9c=_0x58b1aa[_0xab3875];return _0x3b6d9c;}export const CODE_FLAG={'name':a48_0x57f27f(0xc6),'type':a48_0x57f27f(0xd8),'required':!![],'description':a48_0x57f27f(0xc4),'pattern':DATASET_CODE_PATTERN};function a48_0x58b1(){const _0x2fea28=['SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Dataset\x20code\x20(32-char\x20hex\x20UUID)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','code','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','3600136UiYLxY','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','9pUXcqK','App\x20code\x20(e.g.\x20app-xxxxx)','number','848169gusfyJ','2282714SmiVBj','1663878ejbYMr','157021cSHdbI','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','470460sWklpT','dbtype','Database\x20product\x20type','POSTGRESQL','5GgYopr','MYSQL','string','1275188NsHSPx'];a48_0x58b1=function(){return _0x2fea28;};return a48_0x58b1();}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a48_0x57f27f(0xc4)};export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0x57f27f(0xd8),'required':!![],'description':a48_0x57f27f(0xc3),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x57f27f(0xc9)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a48_0x57f27f(0xd8),'required':![],'description':a48_0x57f27f(0xc5)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x57f27f(0xcb)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x57f27f(0xcc),'required':!![],'description':a48_0x57f27f(0xc7)};export const DB_TYPE_FLAG={'name':a48_0x57f27f(0xd3),'type':a48_0x57f27f(0xd8),'required':!![],'description':a48_0x57f27f(0xd4),'enum':[a48_0x57f27f(0xd7),a48_0x57f27f(0xd5)]};
@@ -1 +1 @@
1
- function a49_0x1172(_0x5c6378,_0x5f1f23){_0x5c6378=_0x5c6378-0x7f;const _0x35af53=a49_0x35af();let _0x117251=_0x35af53[_0x5c6378];return _0x117251;}function a49_0x35af(){const _0x2b6be6=['validation','27oqVzEm','\x20MB','1644038oBWHef','File\x20not\x20found:\x20','1026GUZfmU','ceil','size','928260RCkbPF','43592OJmUlo','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','File\x20is\x20not\x20a\x20regular\x20file:\x20','4930YuHOUs','7vRkNEp','trim','1356705jTYYgw','204syWrIx','isFile','428076MoxVGQ','\x20path\x20is\x20required.','8NYLmGD','4444448jvFDGK'];a49_0x35af=function(){return _0x2b6be6;};return a49_0x35af();}(function(_0x30440d,_0x27facf){const _0x4f8411=a49_0x1172,_0x26f7c1=_0x30440d();while(!![]){try{const _0x1e662a=-parseInt(_0x4f8411(0x90))/0x1*(parseInt(_0x4f8411(0x82))/0x2)+-parseInt(_0x4f8411(0x81))/0x3+parseInt(_0x4f8411(0x8d))/0x4*(-parseInt(_0x4f8411(0x88))/0x5)+-parseInt(_0x4f8411(0x8b))/0x6*(-parseInt(_0x4f8411(0x86))/0x7)+-parseInt(_0x4f8411(0x8e))/0x8+parseInt(_0x4f8411(0x94))/0x9*(-parseInt(_0x4f8411(0x85))/0xa)+-parseInt(_0x4f8411(0x92))/0xb*(-parseInt(_0x4f8411(0x89))/0xc);if(_0x1e662a===_0x27facf)break;else _0x26f7c1['push'](_0x26f7c1['shift']());}catch(_0x5954ee){_0x26f7c1['push'](_0x26f7c1['shift']());}}}(a49_0x35af,0x88aa4));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x2df15b){const _0x3a8ad6=a49_0x1172;if(_0x2df15b>=BYTES_PER_MB){const _0x2ca4ad=Math[_0x3a8ad6(0x7f)](_0x2df15b/BYTES_PER_MB*0x64)/0x64;return _0x2ca4ad['toFixed'](0x2)+_0x3a8ad6(0x91);}return _0x2df15b+'\x20B';}export function requireDevelopmentUploadFile(_0x1c3f75,_0x3ef282){const _0x4468d1=a49_0x1172,_0x2d01b1=_0x1c3f75[_0x4468d1(0x87)]();if(!_0x2d01b1)throw CliErrors[_0x4468d1(0x8f)](_0x3ef282+_0x4468d1(0x8c));if(!existsSync(_0x2d01b1))throw CliErrors[_0x4468d1(0x8f)](_0x4468d1(0x93)+_0x2d01b1);const _0x2910f8=statSync(_0x2d01b1);if(!_0x2910f8[_0x4468d1(0x8a)]())throw CliErrors[_0x4468d1(0x8f)](_0x4468d1(0x84)+_0x2d01b1);if(_0x2910f8['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x4468d1(0x8f)](_0x4468d1(0x83)+_0x2d01b1+'\x20('+formatBytes(_0x2910f8[_0x4468d1(0x80)])+')');return{'path':_0x2d01b1,'size':_0x2910f8[_0x4468d1(0x80)]};}
1
+ function a49_0x5912(_0x1231b3,_0x1fda25){_0x1231b3=_0x1231b3-0x16f;const _0x5e2e9a=a49_0x5e2e();let _0x591203=_0x5e2e9a[_0x1231b3];return _0x591203;}function a49_0x5e2e(){const _0x443274=['validation','File\x20is\x20not\x20a\x20regular\x20file:\x20','trim','ceil','11ewTEid','54MNtFmx','isFile','1DpTrze','312910gfHEdf','200412equacr','size','File\x20not\x20found:\x20','467112QbDKNW','885386PqyvjA','\x20MB','19698eVqbeT','96xgpRhi','452820PeqKXR','667608fnUbxa'];a49_0x5e2e=function(){return _0x443274;};return a49_0x5e2e();}(function(_0x2479d0,_0x3a90ab){const _0x52c47d=a49_0x5912,_0x6419ad=_0x2479d0();while(!![]){try{const _0x48200f=parseInt(_0x52c47d(0x176))/0x1*(parseInt(_0x52c47d(0x17c))/0x2)+parseInt(_0x52c47d(0x181))/0x3+parseInt(_0x52c47d(0x178))/0x4+-parseInt(_0x52c47d(0x180))/0x5+parseInt(_0x52c47d(0x17f))/0x6*(parseInt(_0x52c47d(0x17e))/0x7)+parseInt(_0x52c47d(0x17b))/0x8*(-parseInt(_0x52c47d(0x174))/0x9)+parseInt(_0x52c47d(0x177))/0xa*(-parseInt(_0x52c47d(0x173))/0xb);if(_0x48200f===_0x3a90ab)break;else _0x6419ad['push'](_0x6419ad['shift']());}catch(_0x1b558){_0x6419ad['push'](_0x6419ad['shift']());}}}(a49_0x5e2e,0x465a7));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x1d9c75){const _0x3813a3=a49_0x5912;if(_0x1d9c75>=BYTES_PER_MB){const _0x487c65=Math[_0x3813a3(0x172)](_0x1d9c75/BYTES_PER_MB*0x64)/0x64;return _0x487c65['toFixed'](0x2)+_0x3813a3(0x17d);}return _0x1d9c75+'\x20B';}export function requireDevelopmentUploadFile(_0x44f6d4,_0x35a666){const _0x514650=a49_0x5912,_0x313629=_0x44f6d4[_0x514650(0x171)]();if(!_0x313629)throw CliErrors['validation'](_0x35a666+'\x20path\x20is\x20required.');if(!existsSync(_0x313629))throw CliErrors['validation'](_0x514650(0x17a)+_0x313629);const _0x5bd1eb=statSync(_0x313629);if(!_0x5bd1eb[_0x514650(0x175)]())throw CliErrors[_0x514650(0x16f)](_0x514650(0x170)+_0x313629);if(_0x5bd1eb[_0x514650(0x179)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation']('File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'+_0x313629+'\x20('+formatBytes(_0x5bd1eb['size'])+')');return{'path':_0x313629,'size':_0x5bd1eb[_0x514650(0x179)]};}
@@ -1 +1 @@
1
- function a50_0x3168(_0xcfcea8,_0x254b7a){_0xcfcea8=_0xcfcea8-0x65;const _0x336bbd=a50_0x336b();let _0x316838=_0x336bbd[_0xcfcea8];return _0x316838;}(function(_0x37e87d,_0x313569){const _0x2e9c97=a50_0x3168,_0x746792=_0x37e87d();while(!![]){try{const _0x52ae0d=parseInt(_0x2e9c97(0x73))/0x1+parseInt(_0x2e9c97(0x6b))/0x2*(parseInt(_0x2e9c97(0x72))/0x3)+-parseInt(_0x2e9c97(0x6f))/0x4+-parseInt(_0x2e9c97(0x6c))/0x5*(-parseInt(_0x2e9c97(0x6d))/0x6)+-parseInt(_0x2e9c97(0x68))/0x7+parseInt(_0x2e9c97(0x66))/0x8*(parseInt(_0x2e9c97(0x71))/0x9)+-parseInt(_0x2e9c97(0x6a))/0xa*(parseInt(_0x2e9c97(0x74))/0xb);if(_0x52ae0d===_0x313569)break;else _0x746792['push'](_0x746792['shift']());}catch(_0x5b0d49){_0x746792['push'](_0x746792['shift']());}}}(a50_0x336b,0x3800a));function a50_0x336b(){const _0x516e9d=['3806RtUtOt','length','test','3032PWBTLO','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','762293elmYTZ','App\x20Code\x20cannot\x20be\x20empty','19810VoYyjR','26nKckzS','2130010iIPTXT','6mlBshK','App\x20Code\x20cannot\x20exceed\x20100\x20characters','760192qIzViU','trim','9459wvbtGd','22017XRtTEw','294021cWEIPG'];a50_0x336b=function(){return _0x516e9d;};return a50_0x336b();}export function validateAppcode(_0xccabbe){const _0x5331b8=a50_0x3168,_0x220e8f=_0xccabbe[_0x5331b8(0x70)]();if(!_0x220e8f)return{'valid':![],'message':_0x5331b8(0x69)};if(_0x220e8f[_0x5331b8(0x75)]>0x64)return{'valid':![],'message':_0x5331b8(0x6e)};if(!/^[A-Za-z0-9_-]+$/[_0x5331b8(0x65)](_0x220e8f))return{'valid':![],'message':_0x5331b8(0x67)};return{'valid':!![]};}
1
+ function a50_0x5222(_0xcdb95a,_0x8197d1){_0xcdb95a=_0xcdb95a-0x1ca;const _0x2760e1=a50_0x2760();let _0x522268=_0x2760e1[_0xcdb95a];return _0x522268;}(function(_0x1fd7c2,_0x55da5){const _0x134f04=a50_0x5222,_0x2dca44=_0x1fd7c2();while(!![]){try{const _0x2563ac=-parseInt(_0x134f04(0x1d5))/0x1*(-parseInt(_0x134f04(0x1ce))/0x2)+-parseInt(_0x134f04(0x1d8))/0x3*(parseInt(_0x134f04(0x1cc))/0x4)+-parseInt(_0x134f04(0x1d6))/0x5+parseInt(_0x134f04(0x1d9))/0x6+-parseInt(_0x134f04(0x1d3))/0x7+parseInt(_0x134f04(0x1d7))/0x8+-parseInt(_0x134f04(0x1d0))/0x9*(-parseInt(_0x134f04(0x1d2))/0xa);if(_0x2563ac===_0x55da5)break;else _0x2dca44['push'](_0x2dca44['shift']());}catch(_0x4fd3b5){_0x2dca44['push'](_0x2dca44['shift']());}}}(a50_0x2760,0xa9f64));function a50_0x2760(){const _0x4bcc7d=['12ejJlVN','App\x20Code\x20cannot\x20exceed\x20100\x20characters','138076vjsBaJ','trim','1818KCPxri','App\x20Code\x20cannot\x20be\x20empty','29910gSkIKi','5217597ZYJXsD','test','1OagGhx','3436960hRMvPW','6494368IATaxh','300993ClBNkT','5669424MyCgQI','length','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'];a50_0x2760=function(){return _0x4bcc7d;};return a50_0x2760();}export function validateAppcode(_0x5d7752){const _0x447c5a=a50_0x5222,_0x1405d9=_0x5d7752[_0x447c5a(0x1cf)]();if(!_0x1405d9)return{'valid':![],'message':_0x447c5a(0x1d1)};if(_0x1405d9[_0x447c5a(0x1ca)]>0x64)return{'valid':![],'message':_0x447c5a(0x1cd)};if(!/^[A-Za-z0-9_-]+$/[_0x447c5a(0x1d4)](_0x1405d9))return{'valid':![],'message':_0x447c5a(0x1cb)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a51_0x27c498=a51_0x295f;(function(_0x5004e7,_0x19deba){const _0x1e5d10=a51_0x295f,_0x506cb7=_0x5004e7();while(!![]){try{const _0x3e413a=-parseInt(_0x1e5d10(0xcd))/0x1*(-parseInt(_0x1e5d10(0xca))/0x2)+-parseInt(_0x1e5d10(0xcc))/0x3*(parseInt(_0x1e5d10(0xc6))/0x4)+parseInt(_0x1e5d10(0xd4))/0x5*(-parseInt(_0x1e5d10(0xc4))/0x6)+parseInt(_0x1e5d10(0xc2))/0x7+-parseInt(_0x1e5d10(0xd5))/0x8+-parseInt(_0x1e5d10(0xd1))/0x9+parseInt(_0x1e5d10(0xce))/0xa;if(_0x3e413a===_0x19deba)break;else _0x506cb7['push'](_0x506cb7['shift']());}catch(_0x1431b5){_0x506cb7['push'](_0x506cb7['shift']());}}}(a51_0x57b3,0x6996b));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a51_0x295f(_0x3847a0,_0x442425){_0x3847a0=_0x3847a0-0xc1;const _0x57b317=a51_0x57b3();let _0x295ff8=_0x57b317[_0x3847a0];return _0x295ff8;}import{CLI_BIN_NAME}from'../../constant/cli.js';function a51_0x57b3(){const _0x5a42b2=['validation','6lZUjhg','appcode','3IntWwx','7591dMxVrI','10546360KmQbqu','Usage:\x20','Key\x20not\x20found:\x20','1769814vdgnxD','get','str','124435fpkNay','6033440VNyKaQ','key','4543882wYfrbU','app','66ySEKzf','\x20config\x20get\x20--key\x20<key>','277844KmfVOb','object','Get\x20a\x20config\x20value\x20by\x20key'];a51_0x57b3=function(){return _0x5a42b2;};return a51_0x57b3();}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0xc5f907){const _0x31bbcc=a51_0x295f,_0x2cb0d2=_0xc5f907[_0x31bbcc(0xd3)]('key');if(!_0x2cb0d2)throw CliErrors[_0x31bbcc(0xc9)]('Missing\x20key.',_0x31bbcc(0xcf)+CLI_BIN_NAME+_0x31bbcc(0xc5));const _0x21d708=readConfig(),_0x57c353=_0x2cb0d2===_0x31bbcc(0xc3)?_0x31bbcc(0xcb):_0x2cb0d2,_0x3f0e22=_0x21d708[_0x57c353];if(_0x3f0e22===undefined)throw CliErrors[_0x31bbcc(0xc9)](_0x31bbcc(0xd0)+_0x2cb0d2);return{'ok':!![],'data':typeof _0x3f0e22===_0x31bbcc(0xc7)?_0x3f0e22:{[_0x57c353]:_0x3f0e22},'message':typeof _0x3f0e22===_0x31bbcc(0xc7)?undefined:String(_0x3f0e22)};}export const configGetDefinition={'service':'config','command':a51_0x27c498(0xd2),'description':a51_0x27c498(0xc8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x27c498(0xc1),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a51_0x2dfc0b=a51_0x1ca5;(function(_0x57328e,_0x2dd503){const _0x43719b=a51_0x1ca5,_0x434712=_0x57328e();while(!![]){try{const _0x24f641=-parseInt(_0x43719b(0x108))/0x1+-parseInt(_0x43719b(0x117))/0x2*(parseInt(_0x43719b(0x103))/0x3)+parseInt(_0x43719b(0x10b))/0x4*(parseInt(_0x43719b(0x110))/0x5)+-parseInt(_0x43719b(0x112))/0x6*(parseInt(_0x43719b(0x10c))/0x7)+-parseInt(_0x43719b(0x10a))/0x8*(parseInt(_0x43719b(0x114))/0x9)+-parseInt(_0x43719b(0x115))/0xa+-parseInt(_0x43719b(0x10d))/0xb*(-parseInt(_0x43719b(0x111))/0xc);if(_0x24f641===_0x2dd503)break;else _0x434712['push'](_0x434712['shift']());}catch(_0x2f767d){_0x434712['push'](_0x434712['shift']());}}}(a51_0x37b4,0xf0ff7));function a51_0x1ca5(_0x5793c4,_0x53f302){_0x5793c4=_0x5793c4-0x100;const _0x37b430=a51_0x37b4();let _0x1ca54e=_0x37b430[_0x5793c4];return _0x1ca54e;}import{CliErrors}from'../../errors.js';function a51_0x37b4(){const _0x521d90=['get','Key\x20not\x20found:\x20','685wrwHUX','44929716RbWhTe','348qVBdQg','validation','81Bsthly','297790NNqJGj','string','158bIdPuh','app','read','key','30930qUjKCS','object','Get\x20a\x20config\x20value\x20by\x20key','appcode','Missing\x20key.','406891ckYAPv','str','1265848zbHrRu','36524zabdeu','160846jTHMem','11uAcjAJ'];a51_0x37b4=function(){return _0x521d90;};return a51_0x37b4();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x2da5e9){const _0x2f0972=a51_0x1ca5,_0x349610=_0x2da5e9[_0x2f0972(0x109)](_0x2f0972(0x102));if(!_0x349610)throw CliErrors['validation'](_0x2f0972(0x107),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x935a02=readConfig(),_0x329ff2=_0x349610===_0x2f0972(0x100)?_0x2f0972(0x106):_0x349610,_0x547b20=_0x935a02[_0x329ff2];if(_0x547b20===undefined)throw CliErrors[_0x2f0972(0x113)](_0x2f0972(0x10f)+_0x349610);return{'ok':!![],'data':typeof _0x547b20===_0x2f0972(0x104)?_0x547b20:{[_0x329ff2]:_0x547b20},'message':typeof _0x547b20===_0x2f0972(0x104)?undefined:String(_0x547b20)};}export const configGetDefinition={'service':'config','command':a51_0x2dfc0b(0x10e),'description':a51_0x2dfc0b(0x105),'risk':a51_0x2dfc0b(0x101),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0x2dfc0b(0x116),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};