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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) 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/shared/compare-table.js +1 -1
  113. package/lib/commands/menu/shared/delete-plan.js +1 -1
  114. package/lib/commands/menu/shared/facts.js +1 -1
  115. package/lib/commands/menu/shared/index.js +1 -1
  116. package/lib/commands/menu/shared/inquirer.js +1 -1
  117. package/lib/commands/menu/shared/local-pages.js +1 -1
  118. package/lib/commands/menu/shared/logic.js +1 -1
  119. package/lib/commands/menu/shared/mutations.js +1 -1
  120. package/lib/commands/menu/shared/service.js +1 -1
  121. package/lib/commands/menu/shared/sync-core.js +1 -1
  122. package/lib/commands/menu/shared/update-core.js +1 -1
  123. package/lib/commands/menu/shared/valid-url.js +1 -1
  124. package/lib/commands/menu/sync.js +1 -1
  125. package/lib/commands/notification/config-list.js +1 -1
  126. package/lib/commands/notification/index.js +1 -1
  127. package/lib/commands/ocr/index.js +1 -0
  128. package/lib/commands/page/generate-start.js +1 -1
  129. package/lib/commands/page/generate-status.js +1 -1
  130. package/lib/commands/page/index.js +1 -1
  131. package/lib/commands/page/pull.js +1 -1
  132. package/lib/commands/page/push.js +1 -1
  133. package/lib/commands/page/relation-audit.js +1 -1
  134. package/lib/commands/page/restore.js +1 -0
  135. package/lib/commands/page/shared.js +1 -1
  136. package/lib/commands/page/standard-page-status.js +1 -1
  137. package/lib/commands/page/sync.js +1 -1
  138. package/lib/commands/permit/index.js +1 -1
  139. package/lib/commands/permit/page-get.js +1 -1
  140. package/lib/commands/permit/page-set.js +1 -1
  141. package/lib/commands/permit/role-apis-set.js +1 -1
  142. package/lib/commands/permit/role-menus-set.js +1 -1
  143. package/lib/commands/permit/role-menus.js +1 -1
  144. package/lib/commands/permit/shared.js +1 -1
  145. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  146. package/lib/commands/project/create/format-elapsed.js +1 -1
  147. package/lib/commands/project/create/main.js +1 -1
  148. package/lib/commands/project/create/non-interactive.js +1 -1
  149. package/lib/commands/project/create/project-template-path.js +1 -1
  150. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  151. package/lib/commands/project/create/use-format-code.js +1 -1
  152. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  153. package/lib/commands/project/index.js +1 -1
  154. package/lib/commands/project/init.js +1 -1
  155. package/lib/commands/project/upgrade.js +1 -1
  156. package/lib/commands/registry.js +1 -1
  157. package/lib/commands/role/create.js +1 -1
  158. package/lib/commands/role/delete.js +1 -1
  159. package/lib/commands/role/detail.js +1 -1
  160. package/lib/commands/role/index.js +1 -1
  161. package/lib/commands/role/list.js +1 -1
  162. package/lib/commands/role/shared.js +1 -1
  163. package/lib/commands/role/update.js +1 -1
  164. package/lib/commands/role/user-add.js +1 -1
  165. package/lib/commands/role/user-remove.js +1 -1
  166. package/lib/commands/role/user-resolve.js +1 -1
  167. package/lib/commands/run/index.js +1 -1
  168. package/lib/commands/schema.js +1 -1
  169. package/lib/commands/sql/create.js +1 -1
  170. package/lib/commands/sql/delete.js +1 -1
  171. package/lib/commands/sql/detail.js +1 -1
  172. package/lib/commands/sql/exec.js +1 -1
  173. package/lib/commands/sql/index.js +1 -1
  174. package/lib/commands/sql/list.js +1 -1
  175. package/lib/commands/sql/pull.js +1 -1
  176. package/lib/commands/sql/push.js +1 -1
  177. package/lib/commands/sql/save.js +1 -1
  178. package/lib/commands/sql/shared.js +1 -1
  179. package/lib/commands/sql/status.js +1 -1
  180. package/lib/commands/sql/validate.js +1 -1
  181. package/lib/commands/task/index.js +1 -1
  182. package/lib/commands/task/status.js +1 -1
  183. package/lib/commands/workspace/add.js +1 -1
  184. package/lib/commands/workspace/index.js +1 -1
  185. package/lib/commands/workspace/remove.js +1 -1
  186. package/lib/config/schema.js +1 -1
  187. package/lib/constant/cdn.js +1 -1
  188. package/lib/constant/cli.js +1 -1
  189. package/lib/constant/defaults.js +1 -1
  190. package/lib/constant/domain.js +1 -1
  191. package/lib/constant/env.js +1 -1
  192. package/lib/constant/output.js +1 -1
  193. package/lib/constant/paths.js +1 -1
  194. package/lib/constant/risk.js +1 -1
  195. package/lib/context/app-resolver.js +1 -1
  196. package/lib/context/auth-resolver.js +1 -1
  197. package/lib/context/config-loader.js +1 -1
  198. package/lib/context.js +1 -1
  199. package/lib/core/alias-resolver.js +1 -1
  200. package/lib/core/api-client.js +1 -1
  201. package/lib/core/bff/config.js +1 -1
  202. package/lib/core/bff/file-system.js +1 -1
  203. package/lib/core/bff/hash.js +1 -1
  204. package/lib/core/bff/lock.js +1 -1
  205. package/lib/core/bff/utils.js +1 -1
  206. package/lib/core/db-resolver.js +1 -1
  207. package/lib/core/page/file-system.js +1 -1
  208. package/lib/core/page/hash.js +1 -1
  209. package/lib/core/page/lock.js +1 -1
  210. package/lib/core/sql-index-auditor.js +1 -1
  211. package/lib/core/sql-sync/config.js +1 -1
  212. package/lib/core/sql-sync/file-system.js +1 -1
  213. package/lib/core/sql-sync/hash.js +1 -1
  214. package/lib/core/sql-sync/lock.js +1 -1
  215. package/lib/core/sql-sync/utils.js +1 -1
  216. package/lib/core/sql-validator.js +1 -1
  217. package/lib/errors.js +1 -1
  218. package/lib/framework/build-all-flags.js +1 -1
  219. package/lib/framework/error-output.js +1 -1
  220. package/lib/framework/explicit-yes.js +1 -1
  221. package/lib/framework/flags.js +1 -1
  222. package/lib/framework/help.js +1 -1
  223. package/lib/framework/index.js +1 -1
  224. package/lib/framework/output.js +1 -1
  225. package/lib/framework/response.js +1 -1
  226. package/lib/framework/runner-alias.js +1 -1
  227. package/lib/framework/runner.js +1 -1
  228. package/lib/framework/schema-export.js +1 -1
  229. package/lib/framework/types.js +1 -1
  230. package/lib/generated/build-info.js +1 -1
  231. package/lib/help.js +1 -1
  232. package/lib/skills/main.js +1 -1
  233. package/lib/skills/npx-skills-add.js +1 -1
  234. package/lib/telemetry/cli-command-trace.js +1 -1
  235. package/lib/telemetry/cli-help-trace.js +1 -1
  236. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  237. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  238. package/lib/telemetry/send-cli-trace-log.js +1 -1
  239. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  240. package/lib/utils/ai_config.js +1 -1
  241. package/lib/utils/apply-jq-filter.js +1 -1
  242. package/lib/utils/cdn-config.js +1 -1
  243. package/lib/utils/check-sdk-version.js +1 -1
  244. package/lib/utils/cli-version-check.js +1 -1
  245. package/lib/utils/cli-version-policy.js +1 -1
  246. package/lib/utils/config.js +1 -1
  247. package/lib/utils/copy-directory.js +1 -1
  248. package/lib/utils/entity-with-id.js +1 -1
  249. package/lib/utils/file-utils.js +1 -1
  250. package/lib/utils/guides-cdn.js +1 -1
  251. package/lib/utils/http-client.js +1 -1
  252. package/lib/utils/is-non-interactive.js +1 -1
  253. package/lib/utils/logger.js +1 -1
  254. package/lib/utils/params.js +1 -1
  255. package/lib/utils/platform.js +1 -1
  256. package/lib/utils/rules-cdn.js +1 -1
  257. package/lib/utils/sleep.js +1 -1
  258. package/lib/utils/template-replacer.js +1 -1
  259. package/lib/utils/update-notice.js +1 -1
  260. package/lib/utils/version.js +1 -1
  261. package/lib/utils/with-active-cookie.js +1 -1
  262. package/lib/utils/write-cli-side-channel.js +1 -1
  263. package/package.json +1 -1
@@ -1 +1 @@
1
- function a36_0x4498(){const _0x3c2b88=['map','stringify','bool','stderr','lockKey','bff','\x22\x20not\x20found\x20after\x20ensureLockScope.','2GDvIok','Force\x20overwrite\x20local\x20unsynced\x20changes','functionNode','755120PoarEV','string','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','toLowerCase','close','389350ElGhSu','Pull\x20complete:\x20','boolean','functions','filePath','force','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','Would\x20inspect\x20','Pull\x20only\x20this\x20script\x20type','utf8','version','length','COMMON','Remote\x20script\x20missing\x20content.','93282ptgTel','push','\x20pulled,\x20','63SpAdJz','conflict','local\x20unsynced\x20changes','would_pull','hookLocation','lastSync','parse','alias','type','pull','str','lockFilePath','message','operationType','/api/management/library/scripts/list?appCode=','datasetCode','includes','HOOK','apiDir','Lock\x20scope\x20for\x20app\x20\x22','validation','\x20remote\x20BFF\x20script(s)\x20for\x20pull','Force\x20pull\x20cancelled.','\x20skipped,\x20','179916DEwNJI','51702BuQxzv','No\x20remote\x20BFF\x20scripts\x20found.','write','appCode','apps','860608iYhkCa','functionName','cancelled','nonInteractive','stdin','552544yJptcc','&type=','GET','ENDPOINT','scriptType','skipped','scriptContent','65SgeGhc','all','unresolvable\x20target\x20path'];a36_0x4498=function(){return _0x3c2b88;};return a36_0x4498();}const a36_0x131824=a36_0x20e7;(function(_0x463f57,_0x5f0a36){const _0x811e41=a36_0x20e7,_0x257547=_0x463f57();while(!![]){try{const _0xec74b9=-parseInt(_0x811e41(0x1f0))/0x1*(-parseInt(_0x811e41(0x1d5))/0x2)+parseInt(_0x811e41(0x1d4))/0x3+parseInt(_0x811e41(0x1df))/0x4+parseInt(_0x811e41(0x1e6))/0x5*(-parseInt(_0x811e41(0x206))/0x6)+-parseInt(_0x811e41(0x1da))/0x7+-parseInt(_0x811e41(0x1f3))/0x8+parseInt(_0x811e41(0x1bc))/0x9*(parseInt(_0x811e41(0x1f8))/0xa);if(_0xec74b9===_0x5f0a36)break;else _0x257547['push'](_0x257547['shift']());}catch(_0xe172d5){_0x257547['push'](_0x257547['shift']());}}}(a36_0x4498,0x191fe));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_0x131824(0x1ee),'command':a36_0x131824(0x1c5),'description':a36_0x131824(0x1fe),'risk':a36_0x131824(0x1d7),'flags':[{'name':a36_0x131824(0x1c4),'type':a36_0x131824(0x1f4),'description':a36_0x131824(0x200),'enum':[a36_0x131824(0x204),a36_0x131824(0x1e2),'HOOK']},{'name':a36_0x131824(0x1fd),'type':a36_0x131824(0x1fa),'description':a36_0x131824(0x1f1)}],async 'dryRun'(_0x5e7b4d){const _0x6f42dc=a36_0x131824,_0x5df568=loadBffProjectConfig(_0x5e7b4d[_0x6f42dc(0x1d8)]),_0x196a9f=await readBffLockFile(_0x5df568[_0x6f42dc(0x1c7)]),{appLock:_0x4bb427}=ensureLockScope(_0x196a9f??createEmptyBffLock(),_0x5e7b4d['appCode'],_0x5df568['scriptsRoot'],_0x6f42dc(0x1c5)),_0xaede2f=normalizeBffType(_0x5e7b4d[_0x6f42dc(0x1c6)]('type'))??undefined,_0x4dcaa5=buildDatasetCodeToAliasMap(_0x5e7b4d[_0x6f42dc(0x1ce)],_0x5e7b4d['appCode']),[_0x234f69,_0x39a3dc]=await Promise['all']([listBffScripts(_0x5e7b4d[_0x6f42dc(0x1d8)],_0xaede2f),getBffScriptStatistics(_0x5e7b4d[_0x6f42dc(0x1d8)])]),_0x200d24=createHookLocationMap(_0x39a3dc),_0x412e14=[];for(const _0x1b2659 of _0x234f69){const _0x76553f=resolveRemoteScriptTarget(_0x5df568,_0x1b2659,_0x200d24,_0x4bb427[_0x6f42dc(0x1fb)],_0x4dcaa5);if(!_0x76553f){_0x412e14[_0x6f42dc(0x207)]({'scriptType':_0x1b2659['scriptType'],'functionName':_0x1b2659[_0x6f42dc(0x1db)]??'','status':_0x6f42dc(0x1e4),'reason':_0x6f42dc(0x1e8)});continue;}const _0x22b905=_0x4bb427[_0x6f42dc(0x1fb)][_0x76553f['lockKey']],_0x398551=_0x1b2659[_0x6f42dc(0x1e5)]!=null?computeContentHash(_0x1b2659[_0x6f42dc(0x1e5)]):undefined,_0x12aab1=await hasUnsyncedLocalChanges(_0x76553f['filePath'],_0x22b905,_0x398551);_0x412e14['push']({'lockKey':_0x76553f[_0x6f42dc(0x1ed)],'filePath':_0x76553f['filePath'],'remoteId':_0x1b2659['id']??null,'status':_0x12aab1?_0x6f42dc(0x1bd):_0x6f42dc(0x1bf)});}return{'method':_0x6f42dc(0x1e1),'url':_0x6f42dc(0x1ca)+_0x5e7b4d[_0x6f42dc(0x1d8)]+(_0xaede2f?_0x6f42dc(0x1e0)+_0xaede2f:''),'body':{'appCode':_0x5e7b4d[_0x6f42dc(0x1d8)],'filterType':_0xaede2f??null,'files':_0x412e14},'description':_0x6f42dc(0x1ff)+_0x412e14[_0x6f42dc(0x203)]+_0x6f42dc(0x1d1)};},async 'execute'(_0x5cf5e3){const _0x3a5f96=a36_0x131824,_0x1dc2c6=loadBffProjectConfig(_0x5cf5e3[_0x3a5f96(0x1d8)]),_0x355c01=await readBffLockFile(_0x1dc2c6[_0x3a5f96(0x1c7)]),{lockData:_0x5a90ac,appLock:_0x27e998}=ensureLockScope(_0x355c01??createEmptyBffLock(),_0x5cf5e3['appCode'],_0x1dc2c6['scriptsRoot'],_0x3a5f96(0x1c5)),_0x26af76=normalizeBffType(_0x5cf5e3[_0x3a5f96(0x1c6)](_0x3a5f96(0x1c4)))??undefined;if(_0x5cf5e3[_0x3a5f96(0x1c6)](_0x3a5f96(0x1c4))&&!_0x26af76)throw CliErrors[_0x3a5f96(0x1d0)](_0x3a5f96(0x1f5));const [_0x1281c6,_0x511030]=await Promise[_0x3a5f96(0x1e7)]([listBffScripts(_0x5cf5e3[_0x3a5f96(0x1d8)],_0x26af76),getBffScriptStatistics(_0x5cf5e3['appCode'])]);if(_0x1281c6[_0x3a5f96(0x203)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x3a5f96(0x1d6)};const _0x3d43b8=_0x5cf5e3[_0x3a5f96(0x1eb)](_0x3a5f96(0x1fd));if(_0x3d43b8&&!_0x5cf5e3['nonInteractive']){const _0x43282b=await confirmForce();if(!_0x43282b)throw CliErrors[_0x3a5f96(0x1dc)](_0x3a5f96(0x1d2));}if(_0x3d43b8&&_0x5cf5e3[_0x3a5f96(0x1dd)]){}const _0x49be87=buildDatasetCodeToAliasMap(_0x5cf5e3[_0x3a5f96(0x1ce)],_0x5cf5e3[_0x3a5f96(0x1d8)]),_0x25b57d=createHookLocationMap(_0x511030),_0x279c09=JSON[_0x3a5f96(0x1c2)](JSON[_0x3a5f96(0x1ea)](_0x5a90ac)),_0x340000=_0x5cf5e3[_0x3a5f96(0x1d8)],_0x51200e=_0x279c09[_0x3a5f96(0x1d9)][_0x340000];if(!_0x51200e)throw new Error(_0x3a5f96(0x1cf)+_0x340000+_0x3a5f96(0x1ef));const _0x385c86=[],_0x218a97=[],_0x5211af=[];for(const _0x17b15 of _0x1281c6){const _0x4149df=resolveRemoteScriptTarget(_0x1dc2c6,_0x17b15,_0x25b57d,_0x27e998[_0x3a5f96(0x1fb)],_0x49be87);if(!_0x4149df){_0x218a97['push']({'lockKey':_0x17b15[_0x3a5f96(0x1e3)]+'/'+_0x17b15[_0x3a5f96(0x1db)],'reason':_0x3a5f96(0x1e8)});continue;}const _0x4c26f0=_0x27e998[_0x3a5f96(0x1fb)][_0x4149df[_0x3a5f96(0x1ed)]];try{if(!_0x17b15['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x17b15[_0x3a5f96(0x1e5)]==null)throw new Error(_0x3a5f96(0x205));const _0x492419=_0x17b15[_0x3a5f96(0x1e5)],_0x9d9111=computeContentHash(_0x492419);if(!_0x3d43b8){const _0x1732ce=await hasUnsyncedLocalChanges(_0x4149df[_0x3a5f96(0x1fc)],_0x4c26f0,_0x9d9111);if(_0x1732ce){_0x218a97[_0x3a5f96(0x207)]({'lockKey':_0x4149df[_0x3a5f96(0x1ed)],'reason':_0x3a5f96(0x1be)});continue;}}await ensureParentDirectory(_0x4149df['filePath']),await writeFile(_0x4149df[_0x3a5f96(0x1fc)],_0x492419,_0x3a5f96(0x201));const _0x1e518b={'hash':_0x9d9111,'remoteId':_0x17b15['id'],'version':_0x17b15[_0x3a5f96(0x202)]};_0x4149df[_0x3a5f96(0x1c4)]===_0x3a5f96(0x1cd)&&_0x4149df['hookLocation']&&(_0x1e518b['alias']=_0x4149df[_0x3a5f96(0x1c0)][_0x3a5f96(0x1c3)],_0x1e518b[_0x3a5f96(0x1cb)]=_0x4149df['hookLocation'][_0x3a5f96(0x1cb)],_0x1e518b['operationType']=_0x4149df['hookLocation'][_0x3a5f96(0x1c9)],_0x1e518b['functionNode']=_0x4149df[_0x3a5f96(0x1c0)][_0x3a5f96(0x1f2)]),_0x51200e[_0x3a5f96(0x1fb)][_0x4149df[_0x3a5f96(0x1ed)]]=_0x1e518b,_0x385c86[_0x3a5f96(0x207)]({'lockKey':_0x4149df[_0x3a5f96(0x1ed)],'remoteId':_0x17b15['id']});}catch(_0x984fa6){_0x5211af['push']({'lockKey':_0x4149df['lockKey'],'error':_0x984fa6 instanceof Error?_0x984fa6[_0x3a5f96(0x1c8)]:String(_0x984fa6)});}}return _0x51200e[_0x3a5f96(0x1c1)]=new Date()['toISOString'](),await writeBffLockFile(_0x1dc2c6[_0x3a5f96(0x1c7)],_0x279c09),{'ok':_0x5211af[_0x3a5f96(0x203)]===0x0,'data':{'pulled':_0x385c86,'skipped':_0x218a97,'failed':_0x5211af},'message':_0x3a5f96(0x1f9)+_0x385c86[_0x3a5f96(0x203)]+_0x3a5f96(0x1bb)+_0x218a97[_0x3a5f96(0x203)]+_0x3a5f96(0x1d3)+_0x5211af[_0x3a5f96(0x203)]+'\x20failed'};}};function a36_0x20e7(_0x2e5cab,_0x4e1dff){_0x2e5cab=_0x2e5cab-0x1bb;const _0x449816=a36_0x4498();let _0x20e76a=_0x449816[_0x2e5cab];return _0x20e76a;}async function hasUnsyncedLocalChanges(_0x567106,_0x22f308,_0x2fd582){if(!await fileExists(_0x567106))return![];const _0x3a28f3=await computeFileHash(_0x567106);if(!_0x22f308)return _0x2fd582?_0x3a28f3!==_0x2fd582:!![];return _0x3a28f3!==_0x22f308['hash'];}function buildDatasetCodeToAliasMap(_0x5cf0d7,_0x423518){const _0x3fe9fd=a36_0x131824,_0x5d0322=loadAliasMap(_0x5cf0d7,undefined,resolveApiFilePath(_0x5cf0d7,_0x423518));return new Map(_0x5d0322[_0x3fe9fd(0x1e9)](_0x10852c=>[_0x10852c['datasetCode'],_0x10852c[_0x3fe9fd(0x1c3)]]));}async function confirmForce(){const _0x438dfd=a36_0x131824,_0x5a579d=createInterface({'input':process[_0x438dfd(0x1de)],'output':process[_0x438dfd(0x1ec)]}),_0x5247fd=await new Promise(_0x2de38e=>{_0x5a579d['question']('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x2de38e);});return _0x5a579d[_0x438dfd(0x1f7)](),['y','yes'][_0x438dfd(0x1cc)](_0x5247fd['trim']()[_0x438dfd(0x1f6)]());}
1
+ const a36_0x1f7218=a36_0x4e2f;(function(_0x320b68,_0x277bec){const _0x3485da=a36_0x4e2f,_0x5b7192=_0x320b68();while(!![]){try{const _0x5c496a=parseInt(_0x3485da(0x1df))/0x1*(parseInt(_0x3485da(0x1db))/0x2)+parseInt(_0x3485da(0x1d8))/0x3*(-parseInt(_0x3485da(0x1e3))/0x4)+-parseInt(_0x3485da(0x1d9))/0x5+parseInt(_0x3485da(0x20a))/0x6+parseInt(_0x3485da(0x1e1))/0x7+-parseInt(_0x3485da(0x20d))/0x8*(parseInt(_0x3485da(0x1e7))/0x9)+-parseInt(_0x3485da(0x1e0))/0xa*(parseInt(_0x3485da(0x207))/0xb);if(_0x5c496a===_0x277bec)break;else _0x5b7192['push'](_0x5b7192['shift']());}catch(_0x2c3d3e){_0x5b7192['push'](_0x5b7192['shift']());}}}(a36_0xb4dc,0xef4c4));import{createInterface}from'node:readline';function a36_0xb4dc(){const _0x29c047=['/api/management/library/scripts/list?appCode=','functionNode','filePath','appCode','boolean','nonInteractive','skipped','ENDPOINT','stderr','toLowerCase','yes','unresolvable\x20target\x20path','str','bff','toISOString','push','apps','\x20skipped,\x20','scriptContent','hash','hookLocation','length','Pull\x20complete:\x20','write','close','scriptType','Would\x20inspect\x20','functionName','version','bool','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','6556dfDmJd','includes','Remote\x20script\x20missing\x20id.','7079748rFNFWR','\x20remote\x20BFF\x20script(s)\x20for\x20pull','lockKey','1658648pACQEO','pull','\x20failed','conflict','trim','HOOK','lastSync','map','message','stdin','GET','string','type','scriptsRoot','\x20pulled,\x20','lockFilePath','apiDir','functions','Force\x20overwrite\x20local\x20unsynced\x20changes','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','question','cancelled','force','11604IzQOEL','6111755NWGNar','utf8','33834CjExsa','all','datasetCode','validation','15xAQqUL','250fImfCJ','8372259jKbEYG','operationType','212ifaURo','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','alias','local\x20unsynced\x20changes','9YspVLA'];a36_0xb4dc=function(){return _0x29c047;};return a36_0xb4dc();}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_0x1f7218(0x1f5),'command':'pull','description':a36_0x1f7218(0x1d4),'risk':a36_0x1f7218(0x1ff),'flags':[{'name':a36_0x1f7218(0x1cd),'type':a36_0x1f7218(0x218),'description':'Pull\x20only\x20this\x20script\x20type','enum':['COMMON',a36_0x1f7218(0x1ef),a36_0x1f7218(0x212)]},{'name':'force','type':a36_0x1f7218(0x1ec),'description':a36_0x1f7218(0x1d3)}],async 'dryRun'(_0x22eb84){const _0x46659c=a36_0x1f7218,_0x40030b=loadBffProjectConfig(_0x22eb84[_0x46659c(0x1eb)]),_0x31def4=await readBffLockFile(_0x40030b[_0x46659c(0x1d0)]),{appLock:_0x9e2c86}=ensureLockScope(_0x31def4??createEmptyBffLock(),_0x22eb84[_0x46659c(0x1eb)],_0x40030b[_0x46659c(0x1ce)],_0x46659c(0x20e)),_0x19f3f0=normalizeBffType(_0x22eb84[_0x46659c(0x1f4)]('type'))??undefined,_0x410909=buildDatasetCodeToAliasMap(_0x22eb84[_0x46659c(0x1d1)],_0x22eb84[_0x46659c(0x1eb)]),[_0x592640,_0x2e50a7]=await Promise[_0x46659c(0x1dc)]([listBffScripts(_0x22eb84['appCode'],_0x19f3f0),getBffScriptStatistics(_0x22eb84[_0x46659c(0x1eb)])]),_0x2766a2=createHookLocationMap(_0x2e50a7),_0x353c52=[];for(const _0x51180d of _0x592640){const _0x199f91=resolveRemoteScriptTarget(_0x40030b,_0x51180d,_0x2766a2,_0x9e2c86[_0x46659c(0x1d2)],_0x410909);if(!_0x199f91){_0x353c52[_0x46659c(0x1f7)]({'scriptType':_0x51180d[_0x46659c(0x201)],'functionName':_0x51180d[_0x46659c(0x203)]??'','status':_0x46659c(0x1ee),'reason':_0x46659c(0x1f3)});continue;}const _0xcecc03=_0x9e2c86[_0x46659c(0x1d2)][_0x199f91[_0x46659c(0x20c)]],_0x4db54b=_0x51180d[_0x46659c(0x1fa)]!=null?computeContentHash(_0x51180d[_0x46659c(0x1fa)]):undefined,_0xcab3a3=await hasUnsyncedLocalChanges(_0x199f91[_0x46659c(0x1ea)],_0xcecc03,_0x4db54b);_0x353c52['push']({'lockKey':_0x199f91[_0x46659c(0x20c)],'filePath':_0x199f91[_0x46659c(0x1ea)],'remoteId':_0x51180d['id']??null,'status':_0xcab3a3?_0x46659c(0x210):'would_pull'});}return{'method':_0x46659c(0x217),'url':_0x46659c(0x1e8)+_0x22eb84[_0x46659c(0x1eb)]+(_0x19f3f0?'&type='+_0x19f3f0:''),'body':{'appCode':_0x22eb84[_0x46659c(0x1eb)],'filterType':_0x19f3f0??null,'files':_0x353c52},'description':_0x46659c(0x202)+_0x353c52[_0x46659c(0x1fd)]+_0x46659c(0x20b)};},async 'execute'(_0x3a954c){const _0x1d916e=a36_0x1f7218,_0x152aba=loadBffProjectConfig(_0x3a954c[_0x1d916e(0x1eb)]),_0x11cfbe=await readBffLockFile(_0x152aba[_0x1d916e(0x1d0)]),{lockData:_0x2b9dae,appLock:_0x24e93e}=ensureLockScope(_0x11cfbe??createEmptyBffLock(),_0x3a954c[_0x1d916e(0x1eb)],_0x152aba['scriptsRoot'],_0x1d916e(0x20e)),_0x3cac3d=normalizeBffType(_0x3a954c[_0x1d916e(0x1f4)](_0x1d916e(0x1cd)))??undefined;if(_0x3a954c[_0x1d916e(0x1f4)](_0x1d916e(0x1cd))&&!_0x3cac3d)throw CliErrors[_0x1d916e(0x1de)](_0x1d916e(0x1e4));const [_0x2a598e,_0x2dcb08]=await Promise[_0x1d916e(0x1dc)]([listBffScripts(_0x3a954c[_0x1d916e(0x1eb)],_0x3cac3d),getBffScriptStatistics(_0x3a954c[_0x1d916e(0x1eb)])]);if(_0x2a598e[_0x1d916e(0x1fd)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0xdb0209=_0x3a954c[_0x1d916e(0x205)](_0x1d916e(0x1d7));if(_0xdb0209&&!_0x3a954c[_0x1d916e(0x1ed)]){const _0x1b9337=await confirmForce();if(!_0x1b9337)throw CliErrors[_0x1d916e(0x1d6)]('Force\x20pull\x20cancelled.');}if(_0xdb0209&&_0x3a954c[_0x1d916e(0x1ed)]){}const _0x2f68e9=buildDatasetCodeToAliasMap(_0x3a954c['apiDir'],_0x3a954c[_0x1d916e(0x1eb)]),_0x16690d=createHookLocationMap(_0x2dcb08),_0x2ca567=JSON['parse'](JSON['stringify'](_0x2b9dae)),_0x2a8152=_0x3a954c[_0x1d916e(0x1eb)],_0x2232a3=_0x2ca567[_0x1d916e(0x1f8)][_0x2a8152];if(!_0x2232a3)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x2a8152+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x58709f=[],_0x56af5d=[],_0x45a603=[];for(const _0x457176 of _0x2a598e){const _0x5de4e0=resolveRemoteScriptTarget(_0x152aba,_0x457176,_0x16690d,_0x24e93e[_0x1d916e(0x1d2)],_0x2f68e9);if(!_0x5de4e0){_0x56af5d[_0x1d916e(0x1f7)]({'lockKey':_0x457176[_0x1d916e(0x201)]+'/'+_0x457176[_0x1d916e(0x203)],'reason':_0x1d916e(0x1f3)});continue;}const _0x17f500=_0x24e93e[_0x1d916e(0x1d2)][_0x5de4e0[_0x1d916e(0x20c)]];try{if(!_0x457176['id'])throw new Error(_0x1d916e(0x209));if(_0x457176[_0x1d916e(0x1fa)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x3bdba8=_0x457176[_0x1d916e(0x1fa)],_0x279d0d=computeContentHash(_0x3bdba8);if(!_0xdb0209){const _0x557bc4=await hasUnsyncedLocalChanges(_0x5de4e0['filePath'],_0x17f500,_0x279d0d);if(_0x557bc4){_0x56af5d[_0x1d916e(0x1f7)]({'lockKey':_0x5de4e0[_0x1d916e(0x20c)],'reason':_0x1d916e(0x1e6)});continue;}}await ensureParentDirectory(_0x5de4e0[_0x1d916e(0x1ea)]),await writeFile(_0x5de4e0[_0x1d916e(0x1ea)],_0x3bdba8,_0x1d916e(0x1da));const _0x37b201={'hash':_0x279d0d,'remoteId':_0x457176['id'],'version':_0x457176[_0x1d916e(0x204)]};_0x5de4e0[_0x1d916e(0x1cd)]==='HOOK'&&_0x5de4e0[_0x1d916e(0x1fc)]&&(_0x37b201[_0x1d916e(0x1e5)]=_0x5de4e0[_0x1d916e(0x1fc)][_0x1d916e(0x1e5)],_0x37b201[_0x1d916e(0x1dd)]=_0x5de4e0[_0x1d916e(0x1fc)]['datasetCode'],_0x37b201[_0x1d916e(0x1e2)]=_0x5de4e0['hookLocation'][_0x1d916e(0x1e2)],_0x37b201[_0x1d916e(0x1e9)]=_0x5de4e0[_0x1d916e(0x1fc)]['functionNode']),_0x2232a3[_0x1d916e(0x1d2)][_0x5de4e0['lockKey']]=_0x37b201,_0x58709f[_0x1d916e(0x1f7)]({'lockKey':_0x5de4e0[_0x1d916e(0x20c)],'remoteId':_0x457176['id']});}catch(_0x41088a){_0x45a603[_0x1d916e(0x1f7)]({'lockKey':_0x5de4e0[_0x1d916e(0x20c)],'error':_0x41088a instanceof Error?_0x41088a[_0x1d916e(0x215)]:String(_0x41088a)});}}return _0x2232a3[_0x1d916e(0x213)]=new Date()[_0x1d916e(0x1f6)](),await writeBffLockFile(_0x152aba[_0x1d916e(0x1d0)],_0x2ca567),{'ok':_0x45a603[_0x1d916e(0x1fd)]===0x0,'data':{'pulled':_0x58709f,'skipped':_0x56af5d,'failed':_0x45a603},'message':_0x1d916e(0x1fe)+_0x58709f[_0x1d916e(0x1fd)]+_0x1d916e(0x1cf)+_0x56af5d[_0x1d916e(0x1fd)]+_0x1d916e(0x1f9)+_0x45a603[_0x1d916e(0x1fd)]+_0x1d916e(0x20f)};}};async function hasUnsyncedLocalChanges(_0x565db9,_0x22d802,_0x4c598c){const _0x2540e9=a36_0x1f7218;if(!await fileExists(_0x565db9))return![];const _0x5c4cc7=await computeFileHash(_0x565db9);if(!_0x22d802)return _0x4c598c?_0x5c4cc7!==_0x4c598c:!![];return _0x5c4cc7!==_0x22d802[_0x2540e9(0x1fb)];}function buildDatasetCodeToAliasMap(_0x5086c3,_0x5a0678){const _0x37cf11=a36_0x1f7218,_0x3bfacd=loadAliasMap(_0x5086c3,undefined,resolveApiFilePath(_0x5086c3,_0x5a0678));return new Map(_0x3bfacd[_0x37cf11(0x214)](_0x41b27b=>[_0x41b27b[_0x37cf11(0x1dd)],_0x41b27b[_0x37cf11(0x1e5)]]));}function a36_0x4e2f(_0xd54cb6,_0x5e4f7b){_0xd54cb6=_0xd54cb6-0x1cd;const _0xb4dcdc=a36_0xb4dc();let _0x4e2f79=_0xb4dcdc[_0xd54cb6];return _0x4e2f79;}async function confirmForce(){const _0x32ae90=a36_0x1f7218,_0x459415=createInterface({'input':process[_0x32ae90(0x216)],'output':process[_0x32ae90(0x1f0)]}),_0x1a28a1=await new Promise(_0x3d5b3c=>{const _0x22ec92=_0x32ae90;_0x459415[_0x22ec92(0x1d5)](_0x22ec92(0x206),_0x3d5b3c);});return _0x459415[_0x32ae90(0x200)](),['y',_0x32ae90(0x1f2)][_0x32ae90(0x208)](_0x1a28a1[_0x32ae90(0x211)]()[_0x32ae90(0x1f1)]());}
@@ -1 +1 @@
1
- function a37_0x246c(_0x51fd15,_0x314fb5){_0x51fd15=_0x51fd15-0x1c5;const _0xfcf6da=a37_0xfcf6();let _0x246c8b=_0xfcf6da[_0x51fd15];return _0x246c8b;}const a37_0x42ba4f=a37_0x246c;(function(_0x190270,_0x3b26f9){const _0x5cc9c7=a37_0x246c,_0x3faf8f=_0x190270();while(!![]){try{const _0x2049ee=-parseInt(_0x5cc9c7(0x1e3))/0x1*(-parseInt(_0x5cc9c7(0x1f3))/0x2)+-parseInt(_0x5cc9c7(0x205))/0x3+parseInt(_0x5cc9c7(0x208))/0x4*(-parseInt(_0x5cc9c7(0x1e1))/0x5)+parseInt(_0x5cc9c7(0x1fa))/0x6*(parseInt(_0x5cc9c7(0x1eb))/0x7)+parseInt(_0x5cc9c7(0x1d4))/0x8+parseInt(_0x5cc9c7(0x1ea))/0x9*(-parseInt(_0x5cc9c7(0x1e7))/0xa)+parseInt(_0x5cc9c7(0x1ee))/0xb;if(_0x2049ee===_0x3b26f9)break;else _0x3faf8f['push'](_0x3faf8f['shift']());}catch(_0x4fa897){_0x3faf8f['push'](_0x3faf8f['shift']());}}}(a37_0xfcf6,0xa0686));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a37_0xfcf6(){const _0x3ce9cc=['671141bOizfY','string','functionNode','datasetCodeToDataset','4660PXMGrZ','Push\x20complete:\x20','Cannot\x20resolve\x20dataset\x20for\x20\x22','4905bkPsuU','1239ABLJba','ENDPOINT','scriptsRoot','19492572RmAevC','update','push','str','Lock\x20scope\x20for\x20app\x20\x22','2pkTGOX','hash','would_push','stringify','apps','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','force','1938gUsfUD','apiDir','HOOK','Force\x20push\x20ignoring\x20hash\x20protection','\x20failed,\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','operationType','lockKey','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','filePath','1821738ZgbhzW','name','bff','28XyEbHQ','boolean','runtime\x20cache\x20not\x20needed','code','toISOString','status','description','runtime\x20cache\x20clear\x20failed','Incomplete\x20HOOK\x20path:\x20','version','filter','remoteId','attempted','functions','appCode','create','some','set','has','map','\x22.\x20','bool','lockFilePath','message','every','\x20skipped,\x20','validation','high-risk-write','alias','get','unchanged','984448KREcbD','type','\x22\x20not\x20found\x20after\x20ensureLockScope.','cleared','parse','No\x20local\x20BFF\x20functions\x20found.','/api/management/library/scripts/save','Run\x20`',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','aliasToDatasetCode','length','COMMON','datasetCode','789410avAUpC','Push\x20local\x20BFF\x20scripts\x20to\x20remote'];a37_0xfcf6=function(){return _0x3ce9cc;};return a37_0xfcf6();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x42ba4f(0x207),'command':'push','description':a37_0x42ba4f(0x1e2),'risk':a37_0x42ba4f(0x1d0),'flags':[{'name':'type','type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0x42ba4f(0x1df),a37_0x42ba4f(0x1ec),a37_0x42ba4f(0x1fc)]},{'name':a37_0x42ba4f(0x206),'type':a37_0x42ba4f(0x1e4),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0x42ba4f(0x1f9),'type':a37_0x42ba4f(0x209),'description':a37_0x42ba4f(0x1fd)}],async 'dryRun'(_0xa5a3af){const _0x5c4af8=a37_0x42ba4f,_0x58c8b5=loadBffProjectConfig(_0xa5a3af['appCode']),_0x4e7ffa=await readBffLockFile(_0x58c8b5[_0x5c4af8(0x1cb)]),{appLock:_0x10ae6c}=ensureLockScope(_0x4e7ffa??createEmptyBffLock(),_0xa5a3af['appCode'],_0x58c8b5[_0x5c4af8(0x1ed)],_0x5c4af8(0x1f0)),_0x3aa3e8=await getTargetFunctions(_0x58c8b5,_0xa5a3af),_0x4b06a8=_0xa5a3af['bool'](_0x5c4af8(0x1f9)),_0x28d469=[];for(const _0x7839df of _0x3aa3e8){const _0x32987b=await computeFileHash(_0x7839df[_0x5c4af8(0x204)]),_0x1fe5fc=_0x10ae6c[_0x5c4af8(0x215)][_0x7839df[_0x5c4af8(0x201)]],_0x29448e=!!_0x1fe5fc&&_0x1fe5fc[_0x5c4af8(0x1f4)]===_0x32987b;_0x28d469[_0x5c4af8(0x1f0)]({'lockKey':_0x7839df[_0x5c4af8(0x201)],'filePath':_0x7839df['filePath'],'remoteId':_0x1fe5fc?.[_0x5c4af8(0x213)]??null,'mode':_0x1fe5fc?.[_0x5c4af8(0x213)]?_0x5c4af8(0x1ef):_0x5c4af8(0x217),'status':!_0x4b06a8&&_0x29448e?'unchanged':_0x5c4af8(0x1f5)});}return{'method':'POST','url':_0x5c4af8(0x1da),'body':{'appCode':_0xa5a3af[_0x5c4af8(0x216)],'force':_0x4b06a8,'files':_0x28d469,'cacheClearAtRuntime':_0x28d469[_0x5c4af8(0x1c5)](_0x1972a2=>_0x1972a2['status']===_0x5c4af8(0x1f5)),'cacheClearAtRuntimeTimes':_0x28d469[_0x5c4af8(0x1c5)](_0x4ec047=>_0x4ec047[_0x5c4af8(0x20d)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x28d469[_0x5c4af8(0x1de)]+_0x5c4af8(0x1ff)};},async 'execute'(_0x3404fd){const _0x5d91e8=a37_0x42ba4f,_0x45dbf5=loadBffProjectConfig(_0x3404fd[_0x5d91e8(0x216)]),_0x2ad99c=await readBffLockFile(_0x45dbf5[_0x5d91e8(0x1cb)]),{lockData:_0x48224b,appLock:_0x4d9c53}=ensureLockScope(_0x2ad99c??createEmptyBffLock(),_0x3404fd[_0x5d91e8(0x216)],_0x45dbf5[_0x5d91e8(0x1ed)],'push'),_0x348423=await getTargetFunctions(_0x45dbf5,_0x3404fd);if(_0x348423[_0x5d91e8(0x1de)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x5d91e8(0x1d9)};const _0x12f060=_0x3404fd[_0x5d91e8(0x1ca)](_0x5d91e8(0x1f9)),_0x503d63=JSON[_0x5d91e8(0x1d8)](JSON[_0x5d91e8(0x1f6)](_0x48224b)),_0x52a235=_0x503d63[_0x5d91e8(0x1f7)][_0x3404fd[_0x5d91e8(0x216)]];if(!_0x52a235)throw new Error(_0x5d91e8(0x1f2)+_0x3404fd[_0x5d91e8(0x216)]+_0x5d91e8(0x1d6));const _0x150e94=await buildHookMaps(_0x3404fd[_0x5d91e8(0x216)],_0x3404fd[_0x5d91e8(0x1fb)],_0x348423,_0x52a235),_0x39d5e6=[],_0x1c1e28=[],_0x3e4cf0=[];for(const _0x4ffb61 of _0x348423){const _0x2113f1=await computeFileHash(_0x4ffb61[_0x5d91e8(0x204)]),_0x36e3f6=_0x52a235[_0x5d91e8(0x215)][_0x4ffb61['lockKey']];if(!_0x12f060&&_0x36e3f6&&_0x36e3f6['hash']===_0x2113f1){_0x1c1e28[_0x5d91e8(0x1f0)]({'lockKey':_0x4ffb61['lockKey'],'reason':_0x5d91e8(0x1d3)});continue;}try{await uploadSingleFunction(_0x3404fd[_0x5d91e8(0x216)],_0x4ffb61,_0x52a235,_0x150e94);const _0x599394=_0x52a235[_0x5d91e8(0x215)][_0x4ffb61[_0x5d91e8(0x201)]];_0x39d5e6[_0x5d91e8(0x1f0)]({'lockKey':_0x4ffb61['lockKey'],'remoteId':_0x599394?.[_0x5d91e8(0x213)]??0x0});}catch(_0x295350){_0x3e4cf0[_0x5d91e8(0x1f0)]({'lockKey':_0x4ffb61[_0x5d91e8(0x201)],'error':_0x295350 instanceof Error?_0x295350[_0x5d91e8(0x1cc)]:String(_0x295350)});}}_0x52a235['lastSync']=new Date()[_0x5d91e8(0x20c)](),await writeBffLockFile(_0x45dbf5[_0x5d91e8(0x1cb)],_0x503d63),await waitForUploadedLockEntries(_0x45dbf5[_0x5d91e8(0x1cb)],_0x3404fd[_0x5d91e8(0x216)],_0x39d5e6[_0x5d91e8(0x1c8)](_0x32913b=>_0x32913b[_0x5d91e8(0x201)]));let _0x44f929={'attempted':![],'cleared':![]};if(_0x39d5e6[_0x5d91e8(0x1de)]>0x0)try{let _0x22d9e0='';for(let _0x6b6f4b=0x0;_0x6b6f4b<CACHE_CLEAR_ATTEMPTS;_0x6b6f4b+=0x1){_0x22d9e0=await clearBffScriptCache(),_0x6b6f4b<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x44f929={'attempted':!![],'cleared':!![],'message':_0x22d9e0||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x28e8da){_0x44f929={'attempted':!![],'cleared':![],'error':_0x28e8da instanceof Error?_0x28e8da[_0x5d91e8(0x1cc)]:String(_0x28e8da)};}const _0x118c30=_0x3e4cf0[_0x5d91e8(0x1de)]===0x0&&(_0x44f929['attempted']?_0x44f929['cleared']:!![]),_0x53ff59=_0x44f929[_0x5d91e8(0x214)]?_0x44f929[_0x5d91e8(0x1d7)]?'runtime\x20cache\x20cleared':_0x5d91e8(0x20f):_0x5d91e8(0x20a);return{'ok':_0x118c30,'data':{'uploaded':_0x39d5e6,'skipped':_0x1c1e28,'failed':_0x3e4cf0,'cacheClear':_0x44f929},'message':_0x5d91e8(0x1e8)+_0x39d5e6[_0x5d91e8(0x1de)]+'\x20uploaded,\x20'+_0x1c1e28[_0x5d91e8(0x1de)]+_0x5d91e8(0x1ce)+_0x3e4cf0[_0x5d91e8(0x1de)]+_0x5d91e8(0x1fe)+_0x53ff59};}};async function getTargetFunctions(_0x68fcfb,_0x3e5bd6){const _0x440073=a37_0x42ba4f,_0x1153c2=_0x3e5bd6[_0x440073(0x1f1)](_0x440073(0x1d5)),_0x426d5c=_0x3e5bd6[_0x440073(0x1f1)](_0x440073(0x206)),_0x326691=normalizeBffType(_0x1153c2)??undefined;if(_0x426d5c&&!_0x326691)throw CliErrors['validation'](_0x440073(0x202));const _0xc4176c=await scanLocalBffFunctions(_0x68fcfb,_0x326691);if(_0x426d5c){const _0x331773=_0xc4176c[_0x440073(0x212)](_0x26c89e=>_0x26c89e[_0x440073(0x206)]===_0x426d5c);if(_0x331773['length']===0x0)throw CliErrors[_0x440073(0x1cf)]('Local\x20function\x20not\x20found:\x20'+_0x326691+'/'+_0x426d5c);return _0x331773;}return _0xc4176c;}async function buildHookMaps(_0x485497,_0x17ab1f,_0x230cca,_0x20df9e){const _0xf24fe4=a37_0x42ba4f,_0x23b0af=_0x230cca[_0xf24fe4(0x1c5)](_0x136668=>_0x136668['type']==='HOOK');if(!_0x23b0af)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x158d56=loadAliasMap(_0x17ab1f,undefined,resolveApiFilePath(_0x17ab1f,_0x485497)),_0x453215=new Map(_0x158d56[_0xf24fe4(0x1c8)](_0x3a5203=>[_0x3a5203['alias'],_0x3a5203['datasetCode']]));for(const _0x669a13 of Object['values'](_0x20df9e[_0xf24fe4(0x215)])){_0x669a13[_0xf24fe4(0x1d1)]&&_0x669a13[_0xf24fe4(0x1e0)]&&!_0x453215['has'](_0x669a13[_0xf24fe4(0x1d1)])&&_0x453215[_0xf24fe4(0x1c6)](_0x669a13[_0xf24fe4(0x1d1)],_0x669a13['datasetCode']);}const _0x5f27cc=await listDatasets(_0x485497),_0x29698e=new Map(_0x5f27cc[_0xf24fe4(0x1c8)](_0x2b4209=>[_0x2b4209[_0xf24fe4(0x20b)],_0x2b4209]));return{'aliasToDatasetCode':_0x453215,'datasetCodeToDataset':_0x29698e};}async function uploadSingleFunction(_0x1c77dc,_0x347e14,_0x5f1150,_0x2cd5c1){const _0x109cb9=a37_0x42ba4f,_0xc4fbc4=await readFile(_0x347e14[_0x109cb9(0x204)],'utf8'),_0x2b277e=await computeFileHash(_0x347e14[_0x109cb9(0x204)]),_0x4c6f59=_0x5f1150[_0x109cb9(0x215)][_0x347e14[_0x109cb9(0x201)]];if(_0x4c6f59?.[_0x109cb9(0x213)]&&_0x4c6f59[_0x109cb9(0x211)]==null)throw CliErrors[_0x109cb9(0x1cf)](_0x347e14[_0x109cb9(0x201)]+_0x109cb9(0x1dc));let _0x52ae05=extractScriptDescription(_0xc4fbc4);if(!_0x52ae05&&_0x4c6f59?.[_0x109cb9(0x213)]){const _0x2556a0=await getBffScriptInfo(_0x4c6f59[_0x109cb9(0x213)]);_0x52ae05=_0x2556a0[_0x109cb9(0x20e)]||undefined;}const _0x39e313={'appCode':_0x1c77dc,'functionName':_0x347e14[_0x109cb9(0x206)],'scriptType':_0x347e14[_0x109cb9(0x1d5)],'scriptContent':_0xc4fbc4};if(_0x4c6f59?.[_0x109cb9(0x213)])_0x39e313['id']=_0x4c6f59[_0x109cb9(0x213)];if(_0x4c6f59?.[_0x109cb9(0x211)]!=null)_0x39e313[_0x109cb9(0x211)]=_0x4c6f59['version'];if(_0x52ae05)_0x39e313[_0x109cb9(0x20e)]=_0x52ae05;if(_0x347e14['type']===_0x109cb9(0x1fc)){const _0x167509=_0x347e14[_0x109cb9(0x1d1)];if(!_0x167509||!_0x347e14[_0x109cb9(0x200)]||!_0x347e14[_0x109cb9(0x1e5)])throw CliErrors[_0x109cb9(0x1cf)](_0x109cb9(0x210)+_0x347e14[_0x109cb9(0x201)]);const _0x5f6827=_0x2cd5c1[_0x109cb9(0x1dd)][_0x109cb9(0x1d2)](_0x167509)??_0x4c6f59?.[_0x109cb9(0x1e0)]??_0x167509,_0x5dab71=_0x2cd5c1[_0x109cb9(0x1e6)][_0x109cb9(0x1d2)](_0x5f6827);if(!_0x5dab71)throw CliErrors['validation'](_0x109cb9(0x1e9)+_0x167509+_0x109cb9(0x1c9)+(_0x109cb9(0x1db)+CLI_BIN_NAME+_0x109cb9(0x1f8)));_0x39e313['datasetId']=_0x5dab71['id'],_0x39e313[_0x109cb9(0x200)]=_0x347e14['operationType'],_0x39e313[_0x109cb9(0x1e5)]=_0x347e14['functionNode'];}const _0x283bb8=await saveBffScript(_0x39e313),_0x201af5=_0x283bb8['id'],_0x299ba6=_0x283bb8['script']??await getBffScriptInfo(_0x201af5),_0x155af0={'hash':_0x2b277e,'remoteId':_0x201af5,'version':_0x299ba6['version']};if(_0x347e14[_0x109cb9(0x1d5)]===_0x109cb9(0x1fc)){const _0x3dbc49=_0x347e14[_0x109cb9(0x1d1)],_0x3266b2=_0x2cd5c1['aliasToDatasetCode'][_0x109cb9(0x1d2)](_0x3dbc49)??_0x4c6f59?.[_0x109cb9(0x1e0)]??_0x3dbc49;_0x2cd5c1[_0x109cb9(0x1dd)][_0x109cb9(0x1c7)](_0x3dbc49)?_0x155af0[_0x109cb9(0x1d1)]=_0x3dbc49:_0x155af0[_0x109cb9(0x1d1)]=_0x4c6f59?.[_0x109cb9(0x1d1)],_0x155af0[_0x109cb9(0x1e0)]=_0x3266b2,_0x155af0[_0x109cb9(0x200)]=_0x347e14[_0x109cb9(0x200)],_0x155af0[_0x109cb9(0x1e5)]=_0x347e14[_0x109cb9(0x1e5)];}_0x5f1150[_0x109cb9(0x215)][_0x347e14[_0x109cb9(0x201)]]=_0x155af0;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x143afb,_0x280306,_0x52cf6a){const _0x379ea4=a37_0x42ba4f;if(_0x52cf6a['length']===0x0)return;for(let _0x265af3=0x0;_0x265af3<LOCK_SETTLE_RETRY_COUNT;_0x265af3+=0x1){const _0x5e030e=await readBffLockFile(_0x143afb),_0x339b07=_0x5e030e?.[_0x379ea4(0x1f7)]?.[_0x280306]?.[_0x379ea4(0x215)]??{},_0x54bc08=_0x52cf6a[_0x379ea4(0x1cd)](_0x4c61e2=>!!_0x339b07[_0x4c61e2]?.[_0x379ea4(0x213)]);if(_0x54bc08)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x379ea4(0x203)+_0x52cf6a['join'](',\x20')+'.');}
1
+ const a37_0x4c04d2=a37_0x2ed7;(function(_0x2017ba,_0x5aeed3){const _0x390cf3=a37_0x2ed7,_0x5c9291=_0x2017ba();while(!![]){try{const _0x161fde=-parseInt(_0x390cf3(0x1c3))/0x1+parseInt(_0x390cf3(0x1fc))/0x2+-parseInt(_0x390cf3(0x1de))/0x3*(-parseInt(_0x390cf3(0x1c6))/0x4)+-parseInt(_0x390cf3(0x1af))/0x5+-parseInt(_0x390cf3(0x1c7))/0x6+-parseInt(_0x390cf3(0x1f6))/0x7*(parseInt(_0x390cf3(0x1c0))/0x8)+parseInt(_0x390cf3(0x1df))/0x9;if(_0x161fde===_0x5aeed3)break;else _0x5c9291['push'](_0x5c9291['shift']());}catch(_0xc50ffd){_0x5c9291['push'](_0x5c9291['shift']());}}}(a37_0x595a,0xece6f));import{readFile}from'node:fs/promises';function a37_0x2ed7(_0x42ce59,_0x126128){_0x42ce59=_0x42ce59-0x1af;const _0x595a3b=a37_0x595a();let _0x2ed712=_0x595a3b[_0x42ce59];return _0x2ed712;}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';function a37_0x595a(){const _0x28a679=['remoteId','has','update','5784kCcnMr','push','datasetId','730213eIMBcQ','Local\x20function\x20not\x20found:\x20','unchanged','56fHWXox','8219172FijwUi','operationType','Push\x20only\x20this\x20script\x20type','code','apps','some','Push\x20complete:\x20','bff','length','\x20failed,\x20','filter','set','utf8','version','/api/management/library/scripts/save','\x20uploaded,\x20','status','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','aliasToDatasetCode','functions','Incomplete\x20HOOK\x20path:\x20','\x20skipped,\x20','filePath','330174RaXWXp','33167358iuPNQl','map','HOOK','lastSync','apiDir','cleared','datasetCodeToDataset','Would\x20inspect\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','force','Push\x20local\x20BFF\x20scripts\x20to\x20remote','stringify','functionNode','high-risk-write','attempted','\x22\x20not\x20found\x20after\x20ensureLockScope.','every','datasetCode','message','values','lockKey','Run\x20`','parse','14497VHwltt','Force\x20push\x20ignoring\x20hash\x20protection','Runtime\x20script\x20cache\x20cleared.','runtime\x20cache\x20not\x20needed','str','alias','2003998hWCnYy','get','COMMON','Cannot\x20resolve\x20dataset\x20for\x20\x22','ENDPOINT','runtime\x20cache\x20clear\x20failed','string','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','8301570whnACK','create','toISOString','type','bool',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','boolean','runtime\x20cache\x20cleared','validation','scriptsRoot','would_push','appCode','\x22.\x20','hash'];a37_0x595a=function(){return _0x28a679;};return a37_0x595a();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x4c04d2(0x1ce),'command':a37_0x4c04d2(0x1c1),'description':a37_0x4c04d2(0x1e9),'risk':a37_0x4c04d2(0x1ec),'flags':[{'name':a37_0x4c04d2(0x1b2),'type':a37_0x4c04d2(0x202),'description':a37_0x4c04d2(0x1c9),'enum':[a37_0x4c04d2(0x1fe),a37_0x4c04d2(0x200),'HOOK']},{'name':'name','type':a37_0x4c04d2(0x202),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0x4c04d2(0x1e8),'type':a37_0x4c04d2(0x1b5),'description':a37_0x4c04d2(0x1f7)}],async 'dryRun'(_0x5e70f1){const _0x30376c=a37_0x4c04d2,_0x1d14af=loadBffProjectConfig(_0x5e70f1[_0x30376c(0x1ba)]),_0x4db744=await readBffLockFile(_0x1d14af['lockFilePath']),{appLock:_0x2b5f23}=ensureLockScope(_0x4db744??createEmptyBffLock(),_0x5e70f1[_0x30376c(0x1ba)],_0x1d14af[_0x30376c(0x1b8)],_0x30376c(0x1c1)),_0x5b6a1f=await getTargetFunctions(_0x1d14af,_0x5e70f1),_0x38ca94=_0x5e70f1[_0x30376c(0x1b3)](_0x30376c(0x1e8)),_0x42e03b=[];for(const _0x3c3292 of _0x5b6a1f){const _0x3e9d5a=await computeFileHash(_0x3c3292[_0x30376c(0x1dd)]),_0x32ca90=_0x2b5f23[_0x30376c(0x1da)][_0x3c3292['lockKey']],_0x5a30b4=!!_0x32ca90&&_0x32ca90[_0x30376c(0x1bc)]===_0x3e9d5a;_0x42e03b[_0x30376c(0x1c1)]({'lockKey':_0x3c3292[_0x30376c(0x1f3)],'filePath':_0x3c3292[_0x30376c(0x1dd)],'remoteId':_0x32ca90?.['remoteId']??null,'mode':_0x32ca90?.[_0x30376c(0x1bd)]?_0x30376c(0x1bf):_0x30376c(0x1b0),'status':!_0x38ca94&&_0x5a30b4?_0x30376c(0x1c5):_0x30376c(0x1b9)});}return{'method':'POST','url':_0x30376c(0x1d5),'body':{'appCode':_0x5e70f1[_0x30376c(0x1ba)],'force':_0x38ca94,'files':_0x42e03b,'cacheClearAtRuntime':_0x42e03b[_0x30376c(0x1cc)](_0x51806a=>_0x51806a[_0x30376c(0x1d7)]===_0x30376c(0x1b9)),'cacheClearAtRuntimeTimes':_0x42e03b[_0x30376c(0x1cc)](_0xb1833b=>_0xb1833b[_0x30376c(0x1d7)]===_0x30376c(0x1b9))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x30376c(0x1e6)+_0x42e03b[_0x30376c(0x1cf)]+_0x30376c(0x1e7)};},async 'execute'(_0x14dc14){const _0x508038=a37_0x4c04d2,_0x2ccecc=loadBffProjectConfig(_0x14dc14[_0x508038(0x1ba)]),_0x1def0b=await readBffLockFile(_0x2ccecc['lockFilePath']),{lockData:_0x741e7,appLock:_0x46f055}=ensureLockScope(_0x1def0b??createEmptyBffLock(),_0x14dc14[_0x508038(0x1ba)],_0x2ccecc['scriptsRoot'],'push'),_0x548247=await getTargetFunctions(_0x2ccecc,_0x14dc14);if(_0x548247[_0x508038(0x1cf)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x4ed957=_0x14dc14[_0x508038(0x1b3)](_0x508038(0x1e8)),_0x5d9850=JSON[_0x508038(0x1f5)](JSON[_0x508038(0x1ea)](_0x741e7)),_0x4dd873=_0x5d9850[_0x508038(0x1cb)][_0x14dc14[_0x508038(0x1ba)]];if(!_0x4dd873)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x14dc14[_0x508038(0x1ba)]+_0x508038(0x1ee));const _0x2c7c69=await buildHookMaps(_0x14dc14['appCode'],_0x14dc14[_0x508038(0x1e3)],_0x548247,_0x4dd873),_0x426f0b=[],_0x3734a1=[],_0x4f1113=[];for(const _0x38bab7 of _0x548247){const _0x4aea25=await computeFileHash(_0x38bab7[_0x508038(0x1dd)]),_0x28854c=_0x4dd873[_0x508038(0x1da)][_0x38bab7[_0x508038(0x1f3)]];if(!_0x4ed957&&_0x28854c&&_0x28854c[_0x508038(0x1bc)]===_0x4aea25){_0x3734a1[_0x508038(0x1c1)]({'lockKey':_0x38bab7[_0x508038(0x1f3)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x14dc14[_0x508038(0x1ba)],_0x38bab7,_0x4dd873,_0x2c7c69);const _0x406162=_0x4dd873[_0x508038(0x1da)][_0x38bab7[_0x508038(0x1f3)]];_0x426f0b[_0x508038(0x1c1)]({'lockKey':_0x38bab7[_0x508038(0x1f3)],'remoteId':_0x406162?.[_0x508038(0x1bd)]??0x0});}catch(_0x3f9799){_0x4f1113[_0x508038(0x1c1)]({'lockKey':_0x38bab7[_0x508038(0x1f3)],'error':_0x3f9799 instanceof Error?_0x3f9799[_0x508038(0x1f1)]:String(_0x3f9799)});}}_0x4dd873[_0x508038(0x1e2)]=new Date()[_0x508038(0x1b1)](),await writeBffLockFile(_0x2ccecc['lockFilePath'],_0x5d9850),await waitForUploadedLockEntries(_0x2ccecc['lockFilePath'],_0x14dc14[_0x508038(0x1ba)],_0x426f0b[_0x508038(0x1e0)](_0x41375a=>_0x41375a[_0x508038(0x1f3)]));let _0xa016af={'attempted':![],'cleared':![]};if(_0x426f0b[_0x508038(0x1cf)]>0x0)try{let _0x5adbb1='';for(let _0x4d78e8=0x0;_0x4d78e8<CACHE_CLEAR_ATTEMPTS;_0x4d78e8+=0x1){_0x5adbb1=await clearBffScriptCache(),_0x4d78e8<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0xa016af={'attempted':!![],'cleared':!![],'message':_0x5adbb1||_0x508038(0x1f8)};}catch(_0x3fa715){_0xa016af={'attempted':!![],'cleared':![],'error':_0x3fa715 instanceof Error?_0x3fa715[_0x508038(0x1f1)]:String(_0x3fa715)};}const _0x2666c5=_0x4f1113[_0x508038(0x1cf)]===0x0&&(_0xa016af[_0x508038(0x1ed)]?_0xa016af[_0x508038(0x1e4)]:!![]),_0x46c6bb=_0xa016af['attempted']?_0xa016af[_0x508038(0x1e4)]?_0x508038(0x1b6):_0x508038(0x201):_0x508038(0x1f9);return{'ok':_0x2666c5,'data':{'uploaded':_0x426f0b,'skipped':_0x3734a1,'failed':_0x4f1113,'cacheClear':_0xa016af},'message':_0x508038(0x1cd)+_0x426f0b[_0x508038(0x1cf)]+_0x508038(0x1d6)+_0x3734a1[_0x508038(0x1cf)]+_0x508038(0x1dc)+_0x4f1113['length']+_0x508038(0x1d0)+_0x46c6bb};}};async function getTargetFunctions(_0x31275d,_0x259fd1){const _0x14c8df=a37_0x4c04d2,_0x25039f=_0x259fd1[_0x14c8df(0x1fa)](_0x14c8df(0x1b2)),_0x497c4e=_0x259fd1[_0x14c8df(0x1fa)]('name'),_0x1409cc=normalizeBffType(_0x25039f)??undefined;if(_0x497c4e&&!_0x1409cc)throw CliErrors[_0x14c8df(0x1b7)](_0x14c8df(0x1d8));const _0x1af804=await scanLocalBffFunctions(_0x31275d,_0x1409cc);if(_0x497c4e){const _0x1f1888=_0x1af804[_0x14c8df(0x1d1)](_0x126fdd=>_0x126fdd['name']===_0x497c4e);if(_0x1f1888[_0x14c8df(0x1cf)]===0x0)throw CliErrors[_0x14c8df(0x1b7)](_0x14c8df(0x1c4)+_0x1409cc+'/'+_0x497c4e);return _0x1f1888;}return _0x1af804;}async function buildHookMaps(_0x591ca6,_0x32dfd0,_0x1a0119,_0x5a0e9f){const _0x149c4c=a37_0x4c04d2,_0x39b7c9=_0x1a0119['some'](_0x310ce1=>_0x310ce1['type']===_0x149c4c(0x1e1));if(!_0x39b7c9)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x49e2ed=loadAliasMap(_0x32dfd0,undefined,resolveApiFilePath(_0x32dfd0,_0x591ca6)),_0x3c3206=new Map(_0x49e2ed['map'](_0x3a8cee=>[_0x3a8cee[_0x149c4c(0x1fb)],_0x3a8cee[_0x149c4c(0x1f0)]]));for(const _0x31c634 of Object[_0x149c4c(0x1f2)](_0x5a0e9f[_0x149c4c(0x1da)])){_0x31c634[_0x149c4c(0x1fb)]&&_0x31c634['datasetCode']&&!_0x3c3206[_0x149c4c(0x1be)](_0x31c634['alias'])&&_0x3c3206[_0x149c4c(0x1d2)](_0x31c634[_0x149c4c(0x1fb)],_0x31c634[_0x149c4c(0x1f0)]);}const _0x43b834=await listDatasets(_0x591ca6),_0x42fc54=new Map(_0x43b834['map'](_0x5f3ed6=>[_0x5f3ed6[_0x149c4c(0x1ca)],_0x5f3ed6]));return{'aliasToDatasetCode':_0x3c3206,'datasetCodeToDataset':_0x42fc54};}async function uploadSingleFunction(_0x29b61b,_0x2b4f18,_0x2fb07b,_0x32b8de){const _0x219e3a=a37_0x4c04d2,_0x5d4ef3=await readFile(_0x2b4f18[_0x219e3a(0x1dd)],_0x219e3a(0x1d3)),_0xe8f9b9=await computeFileHash(_0x2b4f18['filePath']),_0x4a5fc1=_0x2fb07b[_0x219e3a(0x1da)][_0x2b4f18[_0x219e3a(0x1f3)]];if(_0x4a5fc1?.[_0x219e3a(0x1bd)]&&_0x4a5fc1[_0x219e3a(0x1d4)]==null)throw CliErrors[_0x219e3a(0x1b7)](_0x2b4f18[_0x219e3a(0x1f3)]+_0x219e3a(0x1b4));let _0x4aced0=extractScriptDescription(_0x5d4ef3);if(!_0x4aced0&&_0x4a5fc1?.[_0x219e3a(0x1bd)]){const _0xd3921b=await getBffScriptInfo(_0x4a5fc1[_0x219e3a(0x1bd)]);_0x4aced0=_0xd3921b['description']||undefined;}const _0x53a05b={'appCode':_0x29b61b,'functionName':_0x2b4f18['name'],'scriptType':_0x2b4f18[_0x219e3a(0x1b2)],'scriptContent':_0x5d4ef3};if(_0x4a5fc1?.[_0x219e3a(0x1bd)])_0x53a05b['id']=_0x4a5fc1[_0x219e3a(0x1bd)];if(_0x4a5fc1?.['version']!=null)_0x53a05b[_0x219e3a(0x1d4)]=_0x4a5fc1[_0x219e3a(0x1d4)];if(_0x4aced0)_0x53a05b['description']=_0x4aced0;if(_0x2b4f18['type']===_0x219e3a(0x1e1)){const _0x563d21=_0x2b4f18['alias'];if(!_0x563d21||!_0x2b4f18[_0x219e3a(0x1c8)]||!_0x2b4f18[_0x219e3a(0x1eb)])throw CliErrors[_0x219e3a(0x1b7)](_0x219e3a(0x1db)+_0x2b4f18[_0x219e3a(0x1f3)]);const _0x2bc978=_0x32b8de[_0x219e3a(0x1d9)]['get'](_0x563d21)??_0x4a5fc1?.['datasetCode']??_0x563d21,_0x450be7=_0x32b8de[_0x219e3a(0x1e5)]['get'](_0x2bc978);if(!_0x450be7)throw CliErrors[_0x219e3a(0x1b7)](_0x219e3a(0x1ff)+_0x563d21+_0x219e3a(0x1bb)+(_0x219e3a(0x1f4)+CLI_BIN_NAME+_0x219e3a(0x203)));_0x53a05b[_0x219e3a(0x1c2)]=_0x450be7['id'],_0x53a05b[_0x219e3a(0x1c8)]=_0x2b4f18[_0x219e3a(0x1c8)],_0x53a05b[_0x219e3a(0x1eb)]=_0x2b4f18['functionNode'];}const _0x848331=await saveBffScript(_0x53a05b),_0x570d05=_0x848331['id'],_0x5615e2=_0x848331['script']??await getBffScriptInfo(_0x570d05),_0x456333={'hash':_0xe8f9b9,'remoteId':_0x570d05,'version':_0x5615e2[_0x219e3a(0x1d4)]};if(_0x2b4f18[_0x219e3a(0x1b2)]==='HOOK'){const _0x2fb95a=_0x2b4f18[_0x219e3a(0x1fb)],_0x10f4b2=_0x32b8de[_0x219e3a(0x1d9)][_0x219e3a(0x1fd)](_0x2fb95a)??_0x4a5fc1?.[_0x219e3a(0x1f0)]??_0x2fb95a;_0x32b8de[_0x219e3a(0x1d9)][_0x219e3a(0x1be)](_0x2fb95a)?_0x456333['alias']=_0x2fb95a:_0x456333[_0x219e3a(0x1fb)]=_0x4a5fc1?.[_0x219e3a(0x1fb)],_0x456333['datasetCode']=_0x10f4b2,_0x456333[_0x219e3a(0x1c8)]=_0x2b4f18['operationType'],_0x456333[_0x219e3a(0x1eb)]=_0x2b4f18[_0x219e3a(0x1eb)];}_0x2fb07b[_0x219e3a(0x1da)][_0x2b4f18[_0x219e3a(0x1f3)]]=_0x456333;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x2c41d4,_0x293d6a,_0x57421a){const _0x2ffa38=a37_0x4c04d2;if(_0x57421a[_0x2ffa38(0x1cf)]===0x0)return;for(let _0x4dd9dd=0x0;_0x4dd9dd<LOCK_SETTLE_RETRY_COUNT;_0x4dd9dd+=0x1){const _0x365dce=await readBffLockFile(_0x2c41d4),_0x19bd72=_0x365dce?.[_0x2ffa38(0x1cb)]?.[_0x293d6a]?.[_0x2ffa38(0x1da)]??{},_0x3b45f9=_0x57421a[_0x2ffa38(0x1ef)](_0x38ce57=>!!_0x19bd72[_0x38ce57]?.['remoteId']);if(_0x3b45f9)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x57421a['join'](',\x20')+'.');}
@@ -1 +1 @@
1
- const a38_0x5b5700=a38_0x3838;(function(_0x26c7f3,_0x5c65b5){const _0x32f22e=a38_0x3838,_0x500bd8=_0x26c7f3();while(!![]){try{const _0xebcc93=parseInt(_0x32f22e(0x188))/0x1*(-parseInt(_0x32f22e(0x18a))/0x2)+-parseInt(_0x32f22e(0x19f))/0x3+parseInt(_0x32f22e(0x198))/0x4+-parseInt(_0x32f22e(0x199))/0x5*(-parseInt(_0x32f22e(0x1a7))/0x6)+parseInt(_0x32f22e(0x1a6))/0x7+-parseInt(_0x32f22e(0x190))/0x8*(parseInt(_0x32f22e(0x194))/0x9)+-parseInt(_0x32f22e(0x187))/0xa;if(_0xebcc93===_0x5c65b5)break;else _0x500bd8['push'](_0x500bd8['shift']());}catch(_0x1ac3db){_0x500bd8['push'](_0x500bd8['shift']());}}}(a38_0x2278,0xe7b89));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a38_0x3838(_0x2243a6,_0x3e15d4){_0x2243a6=_0x2243a6-0x187;const _0x2278f7=a38_0x2278();let _0x383873=_0x2278f7[_0x2243a6];return _0x383873;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a38_0x2278(){const _0x7e5ab8=['all','boolean','hash','bool','has','11040155LTWsAe','102OxAaLD','8499960SeiEYc','1296015KBKaRM','status','2bBJRmY','filePath','appCode','\x20unchanged','apiDir','remote','152eAZSJr','lockKey','functions','datasetCode','160767umeNGn','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','lockFilePath','\x20remote-only','6994196aDFAOl','159765ZrUgmF','bff','push','length','map','All\x20BFF\x20scripts\x20are\x20in\x20sync.','1303134UOXiwF','\x20modified,\x20'];a38_0x2278=function(){return _0x7e5ab8;};return a38_0x2278();}export const bffStatus={'service':a38_0x5b5700(0x19a),'command':a38_0x5b5700(0x189),'description':a38_0x5b5700(0x195),'risk':'read','flags':[{'name':a38_0x5b5700(0x18f),'type':a38_0x5b5700(0x1a2),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0xd2fc68){const _0x42d795=a38_0x5b5700,_0x39f123=loadBffProjectConfig(_0xd2fc68[_0x42d795(0x18c)]),_0x39e3bf=await readBffLockFile(_0x39f123[_0x42d795(0x196)]),{appLock:_0x10ad8b}=ensureLockScope(_0x39e3bf??createEmptyBffLock(),_0xd2fc68['appCode'],_0x39f123['scriptsRoot'],'status'),_0x3e0e12=await scanLocalBffFunctions(_0x39f123),_0x4feb0a=[],_0x2db198=[],_0x6791bf=[];for(const _0x25ea51 of _0x3e0e12){const _0x26e6c7=await computeFileHash(_0x25ea51[_0x42d795(0x18b)]),_0x1b14e8=_0x10ad8b[_0x42d795(0x192)][_0x25ea51[_0x42d795(0x191)]];if(!_0x1b14e8)_0x4feb0a[_0x42d795(0x19b)](_0x25ea51['lockKey']);else _0x1b14e8[_0x42d795(0x1a3)]!==_0x26e6c7?_0x2db198[_0x42d795(0x19b)](_0x25ea51['lockKey']):_0x6791bf['push'](_0x25ea51[_0x42d795(0x191)]);}const _0x3e0b7a=[];if(_0xd2fc68[_0x42d795(0x1a4)](_0x42d795(0x18f))){const _0x595d76=loadAliasMap(_0xd2fc68[_0x42d795(0x18e)],undefined,resolveApiFilePath(_0xd2fc68['apiDir'],_0xd2fc68['appCode'])),_0x47ab85=new Map(_0x595d76[_0x42d795(0x19d)](_0x9bd886=>[_0x9bd886[_0x42d795(0x193)],_0x9bd886['alias']])),[_0x5b948c,_0x417afd]=await Promise[_0x42d795(0x1a1)]([listBffScripts(_0xd2fc68[_0x42d795(0x18c)]),getBffScriptStatistics(_0xd2fc68[_0x42d795(0x18c)])]),_0x5cdb0d=createHookLocationMap(_0x417afd),_0x5c105e=new Set(_0x3e0e12[_0x42d795(0x19d)](_0x4fbe11=>_0x4fbe11['lockKey']));for(const _0x3c79ba of _0x5b948c){const _0x4de988=resolveRemoteScriptTarget(_0x39f123,_0x3c79ba,_0x5cdb0d,_0x10ad8b[_0x42d795(0x192)],_0x47ab85);_0x4de988&&!_0x5c105e[_0x42d795(0x1a5)](_0x4de988['lockKey'])&&_0x3e0b7a[_0x42d795(0x19b)](_0x4de988[_0x42d795(0x191)]);}}const _0x2a8f0e=_0x4feb0a[_0x42d795(0x19c)]===0x0&&_0x2db198[_0x42d795(0x19c)]===0x0&&_0x3e0b7a[_0x42d795(0x19c)]===0x0;return{'ok':!![],'data':{'added':_0x4feb0a,'modified':_0x2db198,'unchanged':_0x6791bf,'remoteOnly':_0x3e0b7a},'message':_0x2a8f0e?_0x42d795(0x19e):_0x4feb0a['length']+'\x20added,\x20'+_0x2db198['length']+_0x42d795(0x1a0)+_0x6791bf[_0x42d795(0x19c)]+_0x42d795(0x18d)+(_0x3e0b7a[_0x42d795(0x19c)]>0x0?',\x20'+_0x3e0b7a[_0x42d795(0x19c)]+_0x42d795(0x197):'')};}};
1
+ const a38_0x1eacb3=a38_0x1a3b;(function(_0x2c1523,_0x2c208a){const _0x1cd0bb=a38_0x1a3b,_0x3997f8=_0x2c1523();while(!![]){try{const _0x289713=parseInt(_0x1cd0bb(0x115))/0x1+parseInt(_0x1cd0bb(0x101))/0x2*(parseInt(_0x1cd0bb(0x106))/0x3)+-parseInt(_0x1cd0bb(0x10a))/0x4+parseInt(_0x1cd0bb(0x112))/0x5+parseInt(_0x1cd0bb(0x102))/0x6+parseInt(_0x1cd0bb(0x110))/0x7*(parseInt(_0x1cd0bb(0x116))/0x8)+-parseInt(_0x1cd0bb(0xfb))/0x9;if(_0x289713===_0x2c208a)break;else _0x3997f8['push'](_0x3997f8['shift']());}catch(_0x409693){_0x3997f8['push'](_0x3997f8['shift']());}}}(a38_0x11df,0x79cb0));function a38_0x1a3b(_0x3ca385,_0x974f3){_0x3ca385=_0x3ca385-0xf8;const _0x11dfda=a38_0x11df();let _0x1a3b0a=_0x11dfda[_0x3ca385];return _0x1a3b0a;}function a38_0x11df(){const _0x33c004=['push','has','datasetCode','\x20modified,\x20','bff','9124947IfFard','filePath','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','bool','\x20unchanged','apiDir','18OTkTZY','3667710MopvFx','\x20added,\x20','read','scriptsRoot','30789BZfogn','appCode','lockKey','\x20remote-only','2510932KdYZYa','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','All\x20BFF\x20scripts\x20are\x20in\x20sync.','length','hash','functions','6956782lkbVte','map','1180510fBgqzC','status','all','206900lABzSy','8JDkNLn'];a38_0x11df=function(){return _0x33c004;};return a38_0x11df();}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_0x1eacb3(0xfa),'command':a38_0x1eacb3(0x113),'description':a38_0x1eacb3(0xfd),'risk':a38_0x1eacb3(0x104),'flags':[{'name':'remote','type':'boolean','description':a38_0x1eacb3(0x10b)}],async 'execute'(_0x1e5eab){const _0x18ab08=a38_0x1eacb3,_0x4b8abc=loadBffProjectConfig(_0x1e5eab[_0x18ab08(0x107)]),_0x4a6e80=await readBffLockFile(_0x4b8abc['lockFilePath']),{appLock:_0x1054c5}=ensureLockScope(_0x4a6e80??createEmptyBffLock(),_0x1e5eab[_0x18ab08(0x107)],_0x4b8abc[_0x18ab08(0x105)],_0x18ab08(0x113)),_0x57fc24=await scanLocalBffFunctions(_0x4b8abc),_0x36fc68=[],_0x79f7e2=[],_0x313327=[];for(const _0x2ada82 of _0x57fc24){const _0x20e084=await computeFileHash(_0x2ada82[_0x18ab08(0xfc)]),_0x3d1cb1=_0x1054c5[_0x18ab08(0x10f)][_0x2ada82[_0x18ab08(0x108)]];if(!_0x3d1cb1)_0x36fc68[_0x18ab08(0x117)](_0x2ada82[_0x18ab08(0x108)]);else _0x3d1cb1[_0x18ab08(0x10e)]!==_0x20e084?_0x79f7e2['push'](_0x2ada82[_0x18ab08(0x108)]):_0x313327[_0x18ab08(0x117)](_0x2ada82[_0x18ab08(0x108)]);}const _0x2215dc=[];if(_0x1e5eab[_0x18ab08(0xfe)]('remote')){const _0x4de83a=loadAliasMap(_0x1e5eab[_0x18ab08(0x100)],undefined,resolveApiFilePath(_0x1e5eab[_0x18ab08(0x100)],_0x1e5eab[_0x18ab08(0x107)])),_0x35b18a=new Map(_0x4de83a[_0x18ab08(0x111)](_0x3d0d8f=>[_0x3d0d8f[_0x18ab08(0xf8)],_0x3d0d8f['alias']])),[_0x202e32,_0x5e05f5]=await Promise[_0x18ab08(0x114)]([listBffScripts(_0x1e5eab[_0x18ab08(0x107)]),getBffScriptStatistics(_0x1e5eab[_0x18ab08(0x107)])]),_0x308a71=createHookLocationMap(_0x5e05f5),_0x539342=new Set(_0x57fc24[_0x18ab08(0x111)](_0xc156f6=>_0xc156f6['lockKey']));for(const _0x39b79f of _0x202e32){const _0x51a6c4=resolveRemoteScriptTarget(_0x4b8abc,_0x39b79f,_0x308a71,_0x1054c5['functions'],_0x35b18a);_0x51a6c4&&!_0x539342[_0x18ab08(0x118)](_0x51a6c4[_0x18ab08(0x108)])&&_0x2215dc['push'](_0x51a6c4[_0x18ab08(0x108)]);}}const _0x61e72c=_0x36fc68[_0x18ab08(0x10d)]===0x0&&_0x79f7e2[_0x18ab08(0x10d)]===0x0&&_0x2215dc['length']===0x0;return{'ok':!![],'data':{'added':_0x36fc68,'modified':_0x79f7e2,'unchanged':_0x313327,'remoteOnly':_0x2215dc},'message':_0x61e72c?_0x18ab08(0x10c):_0x36fc68['length']+_0x18ab08(0x103)+_0x79f7e2[_0x18ab08(0x10d)]+_0x18ab08(0xf9)+_0x313327['length']+_0x18ab08(0xff)+(_0x2215dc['length']>0x0?',\x20'+_0x2215dc['length']+_0x18ab08(0x109):'')};}};
@@ -1 +1 @@
1
- const a39_0x12f452=a39_0x5422;(function(_0x141c6e,_0x5b5e22){const _0x2fed5c=a39_0x5422,_0x34d840=_0x141c6e();while(!![]){try{const _0x264742=-parseInt(_0x2fed5c(0x1b2))/0x1*(parseInt(_0x2fed5c(0x1cb))/0x2)+-parseInt(_0x2fed5c(0x1c8))/0x3+parseInt(_0x2fed5c(0x1b7))/0x4*(-parseInt(_0x2fed5c(0x1bc))/0x5)+parseInt(_0x2fed5c(0x1c1))/0x6+parseInt(_0x2fed5c(0x1bb))/0x7+parseInt(_0x2fed5c(0x1b5))/0x8*(parseInt(_0x2fed5c(0x1c5))/0x9)+parseInt(_0x2fed5c(0x1cc))/0xa*(-parseInt(_0x2fed5c(0x1d1))/0xb);if(_0x264742===_0x5b5e22)break;else _0x34d840['push'](_0x34d840['shift']());}catch(_0x1147f2){_0x34d840['push'](_0x34d840['shift']());}}}(a39_0x4f2c,0xcd55e));import{CliErrors}from'../../errors.js';function a39_0x5422(_0x175cc1,_0xf50ec8){_0x175cc1=_0x175cc1-0x1b2;const _0x4f2c07=a39_0x4f2c();let _0x542292=_0x4f2c07[_0x175cc1];return _0x542292;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x12f452(0x1b6),'command':a39_0x12f452(0x1d0),'description':a39_0x12f452(0x1c0),'risk':a39_0x12f452(0x1bf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x144326){const _0x5f0b95=a39_0x12f452;logger[_0x5f0b95(0x1c2)](process['cwd']()),logger[_0x5f0b95(0x1ca)](_0x5f0b95(0x1c7),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x1d41ce,RABETBASE_SKILL_SOURCE:_0x47f86e,runNpxSkillsAddGlobal:_0x1accdd}=await import(_0x5f0b95(0x1b4)),_0x2bac7e=_0x144326[_0x5f0b95(0x1cd)]?_0x5f0b95(0x1c6):_0x5f0b95(0x1ce);console[_0x5f0b95(0x1c9)](_0x5f0b95(0x1c3)+_0x1d41ce+_0x5f0b95(0x1cf));const _0x537d0c=_0x1accdd(process[_0x5f0b95(0x1b8)](),_0x47f86e,{'stdio':_0x2bac7e});if(_0x537d0c[_0x5f0b95(0x1ba)])console[_0x5f0b95(0x1c9)](_0x5f0b95(0x1be));else{if(_0x537d0c['ok'])console['log'](_0x5f0b95(0x1b9));else throw CliErrors[_0x5f0b95(0x1c4)](_0x5f0b95(0x1b3)+(_0x537d0c['error']||_0x5f0b95(0x1bd)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x1d41ce);}return{'ok':!![]};}}];function a39_0x4f2c(){const _0x23a63b=['2400639pkMRQF','log','info','4hANRnX','390SFRjPj','nonInteractive','inherit',')...','install','132033tZlilO','281943PGFvZj','npx\x20skills\x20add\x20failed:\x20','../../skills/npx-skills-add.js','48FnzEEB','cli-skill','67404FflyPm','cwd','CLI\x20Built-in\x20Skill\x20installed','skipped','7311339sGNorE','80xOiKDb','unknown','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','write','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','1596546drbJIs','setLogPath','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','apiError','2448477JHQQCk','pipe','cli-skill-install'];a39_0x4f2c=function(){return _0x23a63b;};return a39_0x4f2c();}
1
+ const a39_0x162fe3=a39_0x7161;function a39_0x7161(_0x3ea7fe,_0x37b047){_0x3ea7fe=_0x3ea7fe-0x15d;const _0x77c6e3=a39_0x77c6();let _0x7161e0=_0x77c6e3[_0x3ea7fe];return _0x7161e0;}(function(_0x3a713d,_0x293f61){const _0x498ca8=a39_0x7161,_0x29dcd4=_0x3a713d();while(!![]){try{const _0x38182d=-parseInt(_0x498ca8(0x175))/0x1+parseInt(_0x498ca8(0x166))/0x2*(parseInt(_0x498ca8(0x16b))/0x3)+-parseInt(_0x498ca8(0x163))/0x4+parseInt(_0x498ca8(0x16d))/0x5*(-parseInt(_0x498ca8(0x16a))/0x6)+-parseInt(_0x498ca8(0x172))/0x7*(parseInt(_0x498ca8(0x174))/0x8)+parseInt(_0x498ca8(0x170))/0x9+parseInt(_0x498ca8(0x171))/0xa*(parseInt(_0x498ca8(0x15d))/0xb);if(_0x38182d===_0x293f61)break;else _0x29dcd4['push'](_0x29dcd4['shift']());}catch(_0x3b41e9){_0x29dcd4['push'](_0x29dcd4['shift']());}}}(a39_0x77c6,0x7db5a));import{CliErrors}from'../../errors.js';function a39_0x77c6(){const _0x5790a3=['apiError','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','install','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','CLI\x20Built-in\x20Skill\x20installed','2297608BhwQaI','cli-skill','info','2XEoGJr','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','inherit','write','2464998kdKVhY','2539506VjPzxZ','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','5cWjxat','error','log','929061jXZDbP','250FdTJrj','1333045MoPnAB','skipped','24pBUyVp','67010FYHaAG','cwd','cli-skill-install','523039CacIpU'];a39_0x77c6=function(){return _0x5790a3;};return a39_0x77c6();}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x162fe3(0x164),'command':a39_0x162fe3(0x160),'description':a39_0x162fe3(0x16c),'risk':a39_0x162fe3(0x169),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x28a61f){const _0x22b2a2=a39_0x162fe3;logger['setLogPath'](process[_0x22b2a2(0x176)]()),logger[_0x22b2a2(0x165)](_0x22b2a2(0x177),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x5aafde,RABETBASE_SKILL_SOURCE:_0x40df2f,runNpxSkillsAddGlobal:_0x11219b}=await import('../../skills/npx-skills-add.js'),_0x28d20d=_0x28a61f['nonInteractive']?'pipe':_0x22b2a2(0x168);console[_0x22b2a2(0x16f)](_0x22b2a2(0x15f)+_0x5aafde+')...');const _0x1addff=_0x11219b(process['cwd'](),_0x40df2f,{'stdio':_0x28d20d});if(_0x1addff[_0x22b2a2(0x173)])console['log'](_0x22b2a2(0x161));else{if(_0x1addff['ok'])console['log'](_0x22b2a2(0x162));else throw CliErrors[_0x22b2a2(0x15e)]('npx\x20skills\x20add\x20failed:\x20'+(_0x1addff[_0x22b2a2(0x16e)]||'unknown'),_0x22b2a2(0x167)+_0x5aafde);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- function a40_0x3763(){const _0x48db64=['Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','object','...','4770gvVhLq','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','green','5060MgwYTB','cwd','Checking\x20for\x20updates...','string','14180HmzvDs','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Requested\x20version:\x20','Update\x20available:\x20','https://registry.npmjs.org/-/package/','Updating\x20via\x20','975951kqNvBt','validation','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','skipped','valid','map','fromEntries','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','message','Already\x20up\x20to\x20date\x20(v','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','start','trim','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','56140LigoAn','Checking\x20CLI\x20Built-in\x20Skill...','4193NvTsyk','error','beta','\x20\x20Try\x20manually:\x20','update','1800jktRHD','331374sIohXj','yellow','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','/dist-tags','pipe','boolean','succeed','bool','install','version','entries','npm','latest','3256OBqYNU','filter','Install\x20a\x20specific\x20CLI\x20version','Beta\x20version:\x20','skills','Version\x20comparison\x20failed','flag','\x20cli-skill\x20install','no-skills','toLowerCase','source','\x20→\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','1104fndqJD','unknown','inherit','24IILRDj','gray','bun','\x20install\x20-g\x20','log','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','slice','json','Invalid\x20version:\x20','@latest','fail','timeout','Update\x20failed','execPath','write'];a40_0x3763=function(){return _0x48db64;};return a40_0x3763();}const a40_0x218459=a40_0x577f;(function(_0x233370,_0x106aac){const _0x24a4b3=a40_0x577f,_0x36b616=_0x233370();while(!![]){try{const _0x1b7c18=-parseInt(_0x24a4b3(0xbf))/0x1+parseInt(_0x24a4b3(0xc7))/0x2+-parseInt(_0x24a4b3(0xe4))/0x3*(parseInt(_0x24a4b3(0xa9))/0x4)+parseInt(_0x24a4b3(0xf6))/0x5*(parseInt(_0x24a4b3(0xe1))/0x6)+parseInt(_0x24a4b3(0xc1))/0x7*(-parseInt(_0x24a4b3(0xd4))/0x8)+parseInt(_0x24a4b3(0xaf))/0x9+parseInt(_0x24a4b3(0xc6))/0xa*(parseInt(_0x24a4b3(0xa5))/0xb);if(_0x1b7c18===_0x106aac)break;else _0x36b616['push'](_0x36b616['shift']());}catch(_0x4a4cc5){_0x36b616['push'](_0x36b616['shift']());}}}(a40_0x3763,0x31d89));import a40_0x5bca73 from'chalk';import a40_0x12464e from'ora';import a40_0x1da0f2 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 _0x22afd0=a40_0x577f;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x22afd0(0xea)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x2fa42f=a40_0x577f,_0x2cad0f=process[_0x2fa42f(0xf1)][_0x2fa42f(0xdd)]();if(_0x2cad0f['includes']('bun'))return _0x2fa42f(0xe6);return _0x2fa42f(0xd2);}const updateFlags=[{'name':a40_0x218459(0xc3),'type':a40_0x218459(0xcc),'description':a40_0x218459(0xb2),'default':![]},{'name':a40_0x218459(0xd0),'type':a40_0x218459(0xa8),'description':a40_0x218459(0xd6)},{'name':'no-skills','type':a40_0x218459(0xcc),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0x218459(0xd8),'type':a40_0x218459(0xcc),'description':a40_0x218459(0xb1),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x46efca){const _0x1b1e8b=a40_0x218459;return _0x46efca['str'](_0x1b1e8b(0xd0))['trim']();}function a40_0x577f(_0x4afcbd,_0x523a86){_0x4afcbd=_0x4afcbd-0xa2;const _0x376363=a40_0x3763();let _0x577f02=_0x376363[_0x4afcbd];return _0x577f02;}function shouldSkipCliSkill(_0x36b752){const _0xc70523=a40_0x218459;return _0x36b752[_0xc70523(0xce)](_0xc70523(0xdc))||_0x36b752[_0xc70523(0xda)](_0xc70523(0xd8))===![];}async function validateUpdateFlags(_0x3a90ab){const _0x2cecc7=a40_0x218459,_0x240bd3=_0x3a90ab[_0x2cecc7(0xce)]('beta'),_0x58cf68=getRequestedVersion(_0x3a90ab);if(_0x240bd3&&_0x58cf68)throw CliErrors[_0x2cecc7(0xb0)](_0x2cecc7(0xbe),_0x2cecc7(0xe0));if(_0x58cf68&&!a40_0x1da0f2[_0x2cecc7(0xb5)](_0x58cf68))throw CliErrors[_0x2cecc7(0xb0)](_0x2cecc7(0xec)+_0x58cf68,_0x2cecc7(0xaa));}async function fetchNpmDistTags(){const _0x11757e=a40_0x218459;try{const _0x1fd87b=await fetch(_0x11757e(0xad)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x11757e(0xca),{'signal':AbortSignal[_0x11757e(0xef)](0x2710)});if(!_0x1fd87b['ok'])return null;const _0x36c559=await _0x1fd87b[_0x11757e(0xeb)]();if(!_0x36c559||typeof _0x36c559!==_0x11757e(0xf4))return null;return Object[_0x11757e(0xb7)](Object[_0x11757e(0xd1)](_0x36c559)[_0x11757e(0xd5)](([,_0x4a0d43])=>typeof _0x4a0d43===_0x11757e(0xa8)&&_0x4a0d43[_0x11757e(0xbd)]()['length']>0x0)[_0x11757e(0xb6)](([_0x168ed7,_0x2baf5c])=>[_0x168ed7,String(_0x2baf5c)[_0x11757e(0xbd)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x559495){const _0x1c56a5=await fetchNpmDistTags();return _0x1c56a5?.[_0x559495]??null;}async function fetchLatestVersion(){const _0x92a31f=a40_0x218459;return fetchNpmDistTagVersion(_0x92a31f(0xd3));}async function resolveTargetVersion(_0x3fa87c){const _0x4f45ea=a40_0x218459,_0x370086=getRequestedVersion(_0x3fa87c);if(_0x370086)return{'version':_0x370086,'source':_0x4f45ea(0xd0)};if(_0x3fa87c[_0x4f45ea(0xce)](_0x4f45ea(0xc3))){const _0x3424ef=await fetchNpmDistTagVersion('beta');if(!_0x3424ef)return null;return{'version':_0x3424ef,'source':_0x4f45ea(0xc3)};}const _0x491359=await fetchLatestVersion();if(!_0x491359)return null;return{'version':_0x491359,'source':_0x4f45ea(0xd3)};}function shouldInstallTarget(_0x24d739,_0x4b27e8){const _0x2990d8=a40_0x218459;if(_0x4b27e8[_0x2990d8(0xde)]===_0x2990d8(0xd0)||_0x4b27e8[_0x2990d8(0xde)]==='beta')return!a40_0x1da0f2['eq'](_0x24d739,_0x4b27e8['version']);return a40_0x1da0f2['lt'](_0x24d739,_0x4b27e8[_0x2990d8(0xd0)]);}function getInstallPlanLabel(_0x2fa968,_0x657337){const _0x2adac6=a40_0x218459;switch(_0x657337[_0x2adac6(0xde)]){case _0x2adac6(0xc3):return _0x2adac6(0xd7)+a40_0x5bca73[_0x2adac6(0xc8)](_0x2fa968)+_0x2adac6(0xdf)+a40_0x5bca73['green'](_0x657337['version']);case'version':return _0x2adac6(0xab)+a40_0x5bca73['yellow'](_0x2fa968)+'\x20→\x20'+a40_0x5bca73[_0x2adac6(0xa4)](_0x657337[_0x2adac6(0xd0)]);case'latest':default:return _0x2adac6(0xac)+a40_0x5bca73[_0x2adac6(0xc8)](_0x2fa968)+_0x2adac6(0xdf)+a40_0x5bca73[_0x2adac6(0xa4)](_0x657337[_0x2adac6(0xd0)]);}}async function installCliSkill(_0x475bcd){const _0x465ad3=a40_0x218459;console[_0x465ad3(0xe8)](a40_0x5bca73['gray'](_0x465ad3(0xc0)));const _0x47e0f5=runNpxSkillsAddGlobal(process[_0x465ad3(0xa6)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x475bcd?_0x465ad3(0xcb):_0x465ad3(0xe3)});if(_0x47e0f5[_0x465ad3(0xb4)]){console[_0x465ad3(0xe8)](a40_0x5bca73[_0x465ad3(0xe5)](_0x465ad3(0xbb)));return;}if(_0x47e0f5['ok']){console[_0x465ad3(0xe8)](a40_0x5bca73['gray'](_0x465ad3(0xa2)));return;}console['warn'](a40_0x5bca73[_0x465ad3(0xc8)](_0x465ad3(0xb3)+(_0x47e0f5[_0x465ad3(0xc2)]||_0x465ad3(0xe2)))),console[_0x465ad3(0xe8)](a40_0x5bca73[_0x465ad3(0xe5)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x465ad3(0xdb)));}async function execute(_0x2a2b8b){const _0x719402=a40_0x218459;await validateUpdateFlags(_0x2a2b8b);const _0x1253d4=getCurrentVersion();console[_0x719402(0xe8)]('Current\x20version:\x20'+_0x1253d4);const _0x51b909=a40_0x12464e(_0x719402(0xa7))[_0x719402(0xbc)](),_0x26a38b=await resolveTargetVersion(_0x2a2b8b);if(!_0x26a38b){const _0x2ee579=_0x2a2b8b[_0x719402(0xce)](_0x719402(0xc3))?_0x719402(0xc9):_0x719402(0xb8);return _0x51b909[_0x719402(0xee)](_0x2ee579),console[_0x719402(0xe8)](a40_0x5bca73['gray']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x719402(0xed))),{'ok':![],'message':_0x2ee579};}const _0x2e963f=a40_0x1da0f2[_0x719402(0xb5)](VERSION),_0x589b81=a40_0x1da0f2[_0x719402(0xb5)](_0x26a38b[_0x719402(0xd0)]);if(!_0x2e963f||!_0x589b81)return _0x51b909[_0x719402(0xee)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x719402(0xd9)};if(!shouldInstallTarget(_0x2e963f,_0x26a38b)){const _0x2e5dd5=_0x26a38b['source']===_0x719402(0xd0)?'Already\x20on\x20requested\x20version\x20(v'+_0x26a38b[_0x719402(0xd0)]+')':_0x719402(0xba)+_0x26a38b[_0x719402(0xd0)]+')';return _0x51b909['succeed'](_0x2e5dd5),shouldSkipCliSkill(_0x2a2b8b)?console['log'](a40_0x5bca73[_0x719402(0xe5)](_0x719402(0xf3))):await installCliSkill(_0x2a2b8b['nonInteractive']),{'ok':!![]};}_0x51b909['info'](getInstallPlanLabel(_0x1253d4,_0x26a38b));const _0x157f87=detectPackageManager(),_0x2dac26=_0x157f87===_0x719402(0xd2)?resolveNpmBin(_0x719402(0xd2)):_0x157f87,_0x408fee=a40_0x12464e(_0x719402(0xae)+_0x157f87+_0x719402(0xf5))[_0x719402(0xbc)]();try{return await execa(_0x2dac26,[_0x719402(0xcf),'-g',NPM_PACKAGE_NAME+'@'+_0x26a38b[_0x719402(0xd0)]],{'stdio':_0x719402(0xcb)}),_0x408fee[_0x719402(0xcd)]('Updated\x20to\x20v'+_0x26a38b[_0x719402(0xd0)]),console['log'](a40_0x5bca73[_0x719402(0xe5)](_0x719402(0xa3))),shouldSkipCliSkill(_0x2a2b8b)?console[_0x719402(0xe8)](a40_0x5bca73[_0x719402(0xe5)](_0x719402(0xf3))):await installCliSkill(_0x2a2b8b['nonInteractive']),{'ok':!![]};}catch(_0x2edd8c){return _0x408fee[_0x719402(0xee)](_0x719402(0xf0)),console['error'](a40_0x5bca73['red']('\x20\x20'+_0x2edd8c['message'])),console[_0x719402(0xe8)](a40_0x5bca73['gray'](_0x719402(0xc4)+_0x157f87+_0x719402(0xe7)+NPM_PACKAGE_NAME+'@'+_0x26a38b[_0x719402(0xd0)])),{'ok':![],'message':_0x2edd8c[_0x719402(0xb9)]};}}export const updateDefinition={'service':a40_0x218459(0xc5),'command':'run','description':a40_0x218459(0xe9),'risk':a40_0x218459(0xf2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0xed60aa=a40_0x3e82;(function(_0x55e60a,_0x311cbc){const _0x14ad9c=a40_0x3e82,_0x178c12=_0x55e60a();while(!![]){try{const _0x137739=parseInt(_0x14ad9c(0x150))/0x1+-parseInt(_0x14ad9c(0x136))/0x2*(-parseInt(_0x14ad9c(0x163))/0x3)+-parseInt(_0x14ad9c(0x15d))/0x4*(-parseInt(_0x14ad9c(0x12a))/0x5)+parseInt(_0x14ad9c(0x168))/0x6+parseInt(_0x14ad9c(0x159))/0x7+parseInt(_0x14ad9c(0x156))/0x8*(-parseInt(_0x14ad9c(0x164))/0x9)+parseInt(_0x14ad9c(0x12c))/0xa*(-parseInt(_0x14ad9c(0x169))/0xb);if(_0x137739===_0x311cbc)break;else _0x178c12['push'](_0x178c12['shift']());}catch(_0x4ea055){_0x178c12['push'](_0x178c12['shift']());}}}(a40_0x2528,0x4e748));import a40_0x3e06ef from'chalk';import a40_0x30beb0 from'ora';import a40_0x1acd14 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 _0xf44557=a40_0x3e82;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xf44557(0x151)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x3acbe6=a40_0x3e82,_0x29f78c=process['execPath'][_0x3acbe6(0x13d)]();if(_0x29f78c[_0x3acbe6(0x138)](_0x3acbe6(0x152)))return'bun';return _0x3acbe6(0x165);}const updateFlags=[{'name':a40_0xed60aa(0x162),'type':a40_0xed60aa(0x155),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0xed60aa(0x125),'type':'string','description':a40_0xed60aa(0x16b)},{'name':a40_0xed60aa(0x137),'type':a40_0xed60aa(0x155),'description':a40_0xed60aa(0x130),'default':![]},{'name':a40_0xed60aa(0x11b),'type':a40_0xed60aa(0x155),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x58c52c){const _0x40695b=a40_0xed60aa;return _0x58c52c[_0x40695b(0x14f)]('version')[_0x40695b(0x14a)]();}function a40_0x3e82(_0x4ae242,_0x25e4fb){_0x4ae242=_0x4ae242-0x11b;const _0x252856=a40_0x2528();let _0x3e820c=_0x252856[_0x4ae242];return _0x3e820c;}function shouldSkipCliSkill(_0x51a034){const _0x3096fe=a40_0xed60aa;return _0x51a034[_0x3096fe(0x139)](_0x3096fe(0x137))||_0x51a034['flag'](_0x3096fe(0x11b))===![];}async function validateUpdateFlags(_0x2b93d9){const _0x4f4f6a=a40_0xed60aa,_0x574398=_0x2b93d9['bool'](_0x4f4f6a(0x162)),_0x6b41aa=getRequestedVersion(_0x2b93d9);if(_0x574398&&_0x6b41aa)throw CliErrors[_0x4f4f6a(0x13a)](_0x4f4f6a(0x13c),_0x4f4f6a(0x13b));if(_0x6b41aa&&!a40_0x1acd14['valid'](_0x6b41aa))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x6b41aa,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x967a5b=a40_0xed60aa;try{const _0x213dd8=await fetch(_0x967a5b(0x128)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x967a5b(0x11c),{'signal':AbortSignal[_0x967a5b(0x14e)](0x2710)});if(!_0x213dd8['ok'])return null;const _0x4e8b5a=await _0x213dd8[_0x967a5b(0x153)]();if(!_0x4e8b5a||typeof _0x4e8b5a!==_0x967a5b(0x14d))return null;return Object[_0x967a5b(0x166)](Object['entries'](_0x4e8b5a)['filter'](([,_0x25a7c3])=>typeof _0x25a7c3===_0x967a5b(0x123)&&_0x25a7c3[_0x967a5b(0x14a)]()['length']>0x0)[_0x967a5b(0x160)](([_0x15b411,_0x41ba68])=>[_0x15b411,String(_0x41ba68)[_0x967a5b(0x14a)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x573cbf){const _0x277934=await fetchNpmDistTags();return _0x277934?.[_0x573cbf]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x531db1){const _0x22915e=a40_0xed60aa,_0x1d09d6=getRequestedVersion(_0x531db1);if(_0x1d09d6)return{'version':_0x1d09d6,'source':_0x22915e(0x125)};if(_0x531db1[_0x22915e(0x139)](_0x22915e(0x162))){const _0x5d8e38=await fetchNpmDistTagVersion(_0x22915e(0x162));if(!_0x5d8e38)return null;return{'version':_0x5d8e38,'source':_0x22915e(0x162)};}const _0x52e928=await fetchLatestVersion();if(!_0x52e928)return null;return{'version':_0x52e928,'source':_0x22915e(0x158)};}function shouldInstallTarget(_0x4e79a6,_0x5cc032){const _0x3c47a3=a40_0xed60aa;if(_0x5cc032['source']==='version'||_0x5cc032['source']==='beta')return!a40_0x1acd14['eq'](_0x4e79a6,_0x5cc032['version']);return a40_0x1acd14['lt'](_0x4e79a6,_0x5cc032[_0x3c47a3(0x125)]);}function getInstallPlanLabel(_0x42c03e,_0x3727b1){const _0x4df206=a40_0xed60aa;switch(_0x3727b1['source']){case _0x4df206(0x162):return _0x4df206(0x15e)+a40_0x3e06ef['yellow'](_0x42c03e)+_0x4df206(0x143)+a40_0x3e06ef[_0x4df206(0x14b)](_0x3727b1[_0x4df206(0x125)]);case _0x4df206(0x125):return'Requested\x20version:\x20'+a40_0x3e06ef[_0x4df206(0x12f)](_0x42c03e)+_0x4df206(0x143)+a40_0x3e06ef['green'](_0x3727b1['version']);case _0x4df206(0x158):default:return'Update\x20available:\x20'+a40_0x3e06ef[_0x4df206(0x12f)](_0x42c03e)+_0x4df206(0x143)+a40_0x3e06ef['green'](_0x3727b1[_0x4df206(0x125)]);}}async function installCliSkill(_0x18519e){const _0x20f8de=a40_0xed60aa;console[_0x20f8de(0x144)](a40_0x3e06ef[_0x20f8de(0x141)](_0x20f8de(0x11d)));const _0x1948fa=runNpxSkillsAddGlobal(process[_0x20f8de(0x147)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x18519e?_0x20f8de(0x126):_0x20f8de(0x16a)});if(_0x1948fa[_0x20f8de(0x135)]){console[_0x20f8de(0x144)](a40_0x3e06ef[_0x20f8de(0x141)](_0x20f8de(0x120)));return;}if(_0x1948fa['ok']){console[_0x20f8de(0x144)](a40_0x3e06ef['gray']('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console[_0x20f8de(0x12e)](a40_0x3e06ef['yellow'](_0x20f8de(0x14c)+(_0x1948fa[_0x20f8de(0x167)]||_0x20f8de(0x15b)))),console[_0x20f8de(0x144)](a40_0x3e06ef[_0x20f8de(0x141)](_0x20f8de(0x154)+CLI_BIN_NAME+'\x20cli-skill\x20install'));}async function execute(_0x3a0064){const _0x381f53=a40_0xed60aa;await validateUpdateFlags(_0x3a0064);const _0x683a23=getCurrentVersion();console['log'](_0x381f53(0x140)+_0x683a23);const _0x2c5fcb=a40_0x30beb0(_0x381f53(0x146))[_0x381f53(0x127)](),_0xb19707=await resolveTargetVersion(_0x3a0064);if(!_0xb19707){const _0x1a55c=_0x3a0064[_0x381f53(0x139)](_0x381f53(0x162))?_0x381f53(0x129):_0x381f53(0x134);return _0x2c5fcb[_0x381f53(0x11f)](_0x1a55c),console[_0x381f53(0x144)](a40_0x3e06ef[_0x381f53(0x141)](_0x381f53(0x132)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x1a55c};}const _0x329b7a=a40_0x1acd14[_0x381f53(0x157)](VERSION),_0x58443a=a40_0x1acd14['valid'](_0xb19707['version']);if(!_0x329b7a||!_0x58443a)return _0x2c5fcb[_0x381f53(0x11f)](_0x381f53(0x15c)),{'ok':![],'message':_0x381f53(0x15c)};if(!shouldInstallTarget(_0x329b7a,_0xb19707)){const _0x2c971f=_0xb19707[_0x381f53(0x145)]===_0x381f53(0x125)?_0x381f53(0x13f)+_0xb19707[_0x381f53(0x125)]+')':_0x381f53(0x122)+_0xb19707['version']+')';return _0x2c5fcb['succeed'](_0x2c971f),shouldSkipCliSkill(_0x3a0064)?console['log'](a40_0x3e06ef[_0x381f53(0x141)](_0x381f53(0x131))):await installCliSkill(_0x3a0064['nonInteractive']),{'ok':!![]};}_0x2c5fcb[_0x381f53(0x149)](getInstallPlanLabel(_0x683a23,_0xb19707));const _0x502a9d=detectPackageManager(),_0xefeab8=_0x502a9d===_0x381f53(0x165)?resolveNpmBin(_0x381f53(0x165)):_0x502a9d,_0x1005e1=a40_0x30beb0('Updating\x20via\x20'+_0x502a9d+_0x381f53(0x121))[_0x381f53(0x127)]();try{return await execa(_0xefeab8,[_0x381f53(0x12d),'-g',NPM_PACKAGE_NAME+'@'+_0xb19707[_0x381f53(0x125)]],{'stdio':_0x381f53(0x126)}),_0x1005e1[_0x381f53(0x13e)](_0x381f53(0x15a)+_0xb19707[_0x381f53(0x125)]),console[_0x381f53(0x144)](a40_0x3e06ef[_0x381f53(0x141)](_0x381f53(0x124))),shouldSkipCliSkill(_0x3a0064)?console[_0x381f53(0x144)](a40_0x3e06ef[_0x381f53(0x141)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x3a0064[_0x381f53(0x161)]),{'ok':!![]};}catch(_0x533b3e){return _0x1005e1[_0x381f53(0x11f)](_0x381f53(0x142)),console[_0x381f53(0x167)](a40_0x3e06ef[_0x381f53(0x15f)]('\x20\x20'+_0x533b3e['message'])),console['log'](a40_0x3e06ef[_0x381f53(0x141)]('\x20\x20Try\x20manually:\x20'+_0x502a9d+_0x381f53(0x11e)+NPM_PACKAGE_NAME+'@'+_0xb19707[_0x381f53(0x125)])),{'ok':![],'message':_0x533b3e[_0x381f53(0x148)]};}}function a40_0x2528(){const _0x56c5d4=['skills','/dist-tags','Checking\x20CLI\x20Built-in\x20Skill...','\x20install\x20-g\x20','fail','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','...','Already\x20up\x20to\x20date\x20(v','string','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','version','pipe','start','https://registry.npmjs.org/-/package/','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','5rlHTlc','update','561320fsBRNl','install','warn','yellow','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','run','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','skipped','2FpKBMb','no-skills','includes','bool','validation','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','toLowerCase','succeed','Already\x20on\x20requested\x20version\x20(v','Current\x20version:\x20','gray','Update\x20failed','\x20→\x20','log','source','Checking\x20for\x20updates...','cwd','message','info','trim','green','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','object','timeout','str','62871SMErPq','slice','bun','json','\x20\x20Run\x20manually:\x20','boolean','90744JXnnax','valid','latest','117971NiqfYT','Updated\x20to\x20v','unknown','Version\x20comparison\x20failed','1422020iUQDme','Beta\x20version:\x20','red','map','nonInteractive','beta','45921yRxeEx','396TNhElr','npm','fromEntries','error','3566616ZIrqHf','44MtUmNf','inherit','Install\x20a\x20specific\x20CLI\x20version'];a40_0x2528=function(){return _0x56c5d4;};return a40_0x2528();}export const updateDefinition={'service':a40_0xed60aa(0x12b),'command':a40_0xed60aa(0x133),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x170ee1,_0x34df97){const _0x7e5089=a41_0x5d41,_0x2be559=_0x170ee1();while(!![]){try{const _0x59debd=-parseInt(_0x7e5089(0x1d8))/0x1*(parseInt(_0x7e5089(0x1d7))/0x2)+-parseInt(_0x7e5089(0x1da))/0x3+-parseInt(_0x7e5089(0x1d3))/0x4+-parseInt(_0x7e5089(0x1d4))/0x5*(-parseInt(_0x7e5089(0x1d9))/0x6)+-parseInt(_0x7e5089(0x1d6))/0x7*(-parseInt(_0x7e5089(0x1d2))/0x8)+-parseInt(_0x7e5089(0x1d5))/0x9*(-parseInt(_0x7e5089(0x1dc))/0xa)+parseInt(_0x7e5089(0x1db))/0xb;if(_0x59debd===_0x34df97)break;else _0x2be559['push'](_0x2be559['shift']());}catch(_0x4b5c01){_0x2be559['push'](_0x2be559['shift']());}}}(a41_0x5c34,0xa434f));function a41_0x5d41(_0x4a2c57,_0x40fe69){_0x4a2c57=_0x4a2c57-0x1d2;const _0x5c3489=a41_0x5c34();let _0x5d4163=_0x5c3489[_0x4a2c57];return _0x5d4163;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x5c34(){const _0x393f11=['1581258PsccCo','841260DeYiXo','2795650SdrVCT','410SfzNHJ','277904TitOvn','5177204sVHZFT','15WNftdI','59895JuBuGy','259XwldNW','1954miFlMU','364MPikne'];a41_0x5c34=function(){return _0x393f11;};return a41_0x5c34();}
1
+ (function(_0x18e65d,_0x38aaaf){const _0xfcb3e9=a41_0x1593,_0xf57c65=_0x18e65d();while(!![]){try{const _0x4de33d=-parseInt(_0xfcb3e9(0xe2))/0x1*(parseInt(_0xfcb3e9(0xe4))/0x2)+parseInt(_0xfcb3e9(0xdb))/0x3*(parseInt(_0xfcb3e9(0xde))/0x4)+-parseInt(_0xfcb3e9(0xe0))/0x5+parseInt(_0xfcb3e9(0xdc))/0x6*(parseInt(_0xfcb3e9(0xdd))/0x7)+-parseInt(_0xfcb3e9(0xda))/0x8+-parseInt(_0xfcb3e9(0xe1))/0x9*(-parseInt(_0xfcb3e9(0xe3))/0xa)+-parseInt(_0xfcb3e9(0xdf))/0xb;if(_0x4de33d===_0x38aaaf)break;else _0xf57c65['push'](_0xf57c65['shift']());}catch(_0x11cab1){_0xf57c65['push'](_0xf57c65['shift']());}}}(a41_0x55f7,0x8ecd3));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x1593(_0x2d1dba,_0x2e9769){_0x2d1dba=_0x2d1dba-0xda;const _0x55f7f0=a41_0x55f7();let _0x1593b1=_0x55f7f0[_0x2d1dba];return _0x1593b1;}function a41_0x55f7(){const _0x29cca7=['765JWKpLF','39036DHETuE','973JbLfdE','13136iUxEGx','1865655eXVohd','3130295aexmjd','9EWLAPS','61010YitIcG','3290710mkNNMv','2rNRLwv','5033888jtVPhU'];a41_0x55f7=function(){return _0x29cca7;};return a41_0x55f7();}export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- function a42_0x9f56(_0x51c611,_0x15473b){_0x51c611=_0x51c611-0x1e4;const _0x48305f=a42_0x4830();let _0x9f5619=_0x48305f[_0x51c611];return _0x9f5619;}const a42_0x40d5eb=a42_0x9f56;function a42_0x4830(){const _0xb5d695=['1044258WzJwuz','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','528858PkWcBh','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','1531556RYoHAu','str','appCode','code','2107734xXrHrW','2WAyEaW','14TRJoTO','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','alias','1476EvDZga','Omit\x20import\x20statements\x20from\x20generated\x20code','5395288OkMPfj','name','tableName','codegen','skip-imports','string','bool','sdk','read','4533655jwqxmC','101590nfGvyM','operation'];a42_0x4830=function(){return _0xb5d695;};return a42_0x4830();}(function(_0x3c06f5,_0x41f99a){const _0x34c353=a42_0x9f56,_0x326ead=_0x3c06f5();while(!![]){try{const _0x6735a9=-parseInt(_0x34c353(0x1fb))/0x1+parseInt(_0x34c353(0x1e7))/0x2*(parseInt(_0x34c353(0x1f9))/0x3)+parseInt(_0x34c353(0x1fd))/0x4+-parseInt(_0x34c353(0x1f6))/0x5+parseInt(_0x34c353(0x1e6))/0x6*(parseInt(_0x34c353(0x1e8))/0x7)+-parseInt(_0x34c353(0x1ed))/0x8+parseInt(_0x34c353(0x1eb))/0x9*(parseInt(_0x34c353(0x1f7))/0xa);if(_0x6735a9===_0x41f99a)break;else _0x326ead['push'](_0x326ead['shift']());}catch(_0x2b13fe){_0x326ead['push'](_0x326ead['shift']());}}}(a42_0x4830,0xf19bd));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x40d5eb(0x1f0),'command':a42_0x40d5eb(0x1f4),'description':a42_0x40d5eb(0x1fc),'risk':a42_0x40d5eb(0x1f5),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x40d5eb(0x1ea),'type':a42_0x40d5eb(0x1f2),'description':a42_0x40d5eb(0x1fa)},{'name':a42_0x40d5eb(0x1f8),'type':a42_0x40d5eb(0x1f2),'required':!![],'description':a42_0x40d5eb(0x1e9)},{'name':a42_0x40d5eb(0x1f1),'type':'boolean','description':a42_0x40d5eb(0x1ec)}],async 'execute'(_0x3d7bb6){const _0x16348c=a42_0x40d5eb,{dataset:_0x34b56a,operation:_0x445acf}=await getOperationDetail(_0x3d7bb6[_0x16348c(0x1e4)],_0x3d7bb6[_0x16348c(0x1fe)](_0x16348c(0x1e5)),_0x3d7bb6[_0x16348c(0x1fe)]('operation')),_0x54bffc=generateSdkCode(_0x34b56a,_0x445acf,{'includeImports':!_0x3d7bb6[_0x16348c(0x1f3)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x34b56a[_0x16348c(0x1ee)],'code':_0x34b56a[_0x16348c(0x1e5)],'tableName':_0x34b56a[_0x16348c(0x1ef)]},'operation':_0x3d7bb6[_0x16348c(0x1fe)](_0x16348c(0x1f8)),'code':_0x54bffc}};}};
1
+ const a42_0x4ead64=a42_0x18fc;(function(_0x275228,_0x543678){const _0x12fb8b=a42_0x18fc,_0x3b2388=_0x275228();while(!![]){try{const _0xcff6f8=-parseInt(_0x12fb8b(0x1f7))/0x1+-parseInt(_0x12fb8b(0x1f6))/0x2+parseInt(_0x12fb8b(0x1f0))/0x3*(-parseInt(_0x12fb8b(0x204))/0x4)+parseInt(_0x12fb8b(0x203))/0x5+-parseInt(_0x12fb8b(0x1f1))/0x6+-parseInt(_0x12fb8b(0x1ff))/0x7*(-parseInt(_0x12fb8b(0x1f8))/0x8)+parseInt(_0x12fb8b(0x1fa))/0x9;if(_0xcff6f8===_0x543678)break;else _0x3b2388['push'](_0x3b2388['shift']());}catch(_0xe10dd1){_0x3b2388['push'](_0x3b2388['shift']());}}}(a42_0x4e1d,0x7a2ad));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x18fc(_0x272057,_0x47c174){_0x272057=_0x272057-0x1f0;const _0x4e1dc8=a42_0x4e1d();let _0x18fcc3=_0x4e1dc8[_0x272057];return _0x18fcc3;}function a42_0x4e1d(){const _0x43ed01=['tableName','16531398mxCiEB','sdk','operation','skip-imports','boolean','14zzLXEp','codegen','bool','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','4539555VLUDmO','13180HmMLhQ','Omit\x20import\x20statements\x20from\x20generated\x20code','code','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','384GGKjAd','5328456fGdrEj','string','read','appCode','str','240532kBrFPt','903564OiuQzD','357320SiiOFw'];a42_0x4e1d=function(){return _0x43ed01;};return a42_0x4e1d();}export const codegenSdk={'service':a42_0x4ead64(0x200),'command':a42_0x4ead64(0x1fb),'description':a42_0x4ead64(0x207),'risk':a42_0x4ead64(0x1f3),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a42_0x4ead64(0x1f2),'description':a42_0x4ead64(0x202)},{'name':a42_0x4ead64(0x1fc),'type':'string','required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a42_0x4ead64(0x1fd),'type':a42_0x4ead64(0x1fe),'description':a42_0x4ead64(0x205)}],async 'execute'(_0x45c62d){const _0x3466a0=a42_0x4ead64,{dataset:_0x534ff6,operation:_0x444f9f}=await getOperationDetail(_0x45c62d[_0x3466a0(0x1f4)],_0x45c62d[_0x3466a0(0x1f5)](_0x3466a0(0x206)),_0x45c62d['str'](_0x3466a0(0x1fc))),_0x11fefb=generateSdkCode(_0x534ff6,_0x444f9f,{'includeImports':!_0x45c62d[_0x3466a0(0x201)](_0x3466a0(0x1fd))});return{'ok':!![],'data':{'dataset':{'name':_0x534ff6['name'],'code':_0x534ff6['code'],'tableName':_0x534ff6[_0x3466a0(0x1f9)]},'operation':_0x45c62d[_0x3466a0(0x1f5)]('operation'),'code':_0x11fefb}};}};
@@ -1 +1 @@
1
- const a43_0x35f2c3=a43_0x3ff9;function a43_0x3ff9(_0x2af34f,_0x45207a){_0x2af34f=_0x2af34f-0xab;const _0x5e9cca=a43_0x5e9c();let _0x3ff9a0=_0x5e9cca[_0x2af34f];return _0x3ff9a0;}(function(_0x2a11a7,_0x436c0f){const _0x628062=a43_0x3ff9,_0x12cb78=_0x2a11a7();while(!![]){try{const _0x1536be=parseInt(_0x628062(0xb0))/0x1+-parseInt(_0x628062(0xc0))/0x2*(parseInt(_0x628062(0xb4))/0x3)+-parseInt(_0x628062(0xc2))/0x4+-parseInt(_0x628062(0xbc))/0x5+-parseInt(_0x628062(0xb9))/0x6*(parseInt(_0x628062(0xad))/0x7)+-parseInt(_0x628062(0xb5))/0x8*(-parseInt(_0x628062(0xc4))/0x9)+parseInt(_0x628062(0xac))/0xa;if(_0x1536be===_0x436c0f)break;else _0x12cb78['push'](_0x12cb78['shift']());}catch(_0x1c3299){_0x12cb78['push'](_0x12cb78['shift']());}}}(a43_0x5e9c,0x2aee8));function a43_0x5e9c(){const _0x49a407=['target','read','1526265ukaNTz','appCode','boolean','codegen','469016rHqgzw','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','350300RYfVeS','sqlName','9XcajZf','sdk','6267510yWqCoZ','21aRVfdt','bool','string','279725ZMKXlN','sql','sqlcode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','3womxmD','333992arnovL','no-imports','str','sqlCode','290082anuQVH'];a43_0x5e9c=function(){return _0x49a407;};return a43_0x5e9c();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x35f2c3(0xbf),'command':a43_0x35f2c3(0xb1),'description':a43_0x35f2c3(0xb3),'risk':a43_0x35f2c3(0xbb),'flags':[SQLCODE_FLAG,{'name':a43_0x35f2c3(0xba),'type':a43_0x35f2c3(0xaf),'description':a43_0x35f2c3(0xc1),'default':'sdk','enum':[a43_0x35f2c3(0xab),'bff']},{'name':'no-imports','type':a43_0x35f2c3(0xbe),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x500fc9){const _0x4eb614=a43_0x35f2c3,_0x3ab9af=await getSqlQueryInfo(_0x500fc9[_0x4eb614(0xbd)],_0x500fc9[_0x4eb614(0xb7)](_0x4eb614(0xb2))),_0x2c0869=_0x500fc9[_0x4eb614(0xb7)](_0x4eb614(0xba))||_0x4eb614(0xab),_0x9ca575=generateSqlCodeTemplate(_0x3ab9af,{'target':_0x2c0869,'includeImports':!_0x500fc9[_0x4eb614(0xae)](_0x4eb614(0xb6))});return{'ok':!![],'data':{'sqlCode':_0x3ab9af[_0x4eb614(0xb8)],'sqlName':_0x3ab9af[_0x4eb614(0xc3)],'target':_0x2c0869,'code':_0x9ca575}};}};
1
+ const a43_0x1f55c2=a43_0x3ec1;function a43_0xcaa1(){const _0x29474d=['602460vUJYJe','173007gKPUBc','28904adcxWl','string','9927300PYxOLY','bool','str','172844Jhedoo','codegen','bff','1827280oXiQpB','sqlcode','read','6362991ttdxOa','sqlCode','Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','11TaxpND','8AGtpaV','appCode','sql','21gGHJQJ','114nmqyGv','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','no-imports'];a43_0xcaa1=function(){return _0x29474d;};return a43_0xcaa1();}function a43_0x3ec1(_0xcb1a29,_0x334d0e){_0xcb1a29=_0xcb1a29-0x123;const _0xcaa199=a43_0xcaa1();let _0x3ec120=_0xcaa199[_0xcb1a29];return _0x3ec120;}(function(_0x4e1eea,_0x29baf7){const _0x5e77ad=a43_0x3ec1,_0x50a24a=_0x4e1eea();while(!![]){try{const _0x2f3898=-parseInt(_0x5e77ad(0x13b))/0x1+-parseInt(_0x5e77ad(0x123))/0x2*(parseInt(_0x5e77ad(0x137))/0x3)+parseInt(_0x5e77ad(0x128))/0x4+-parseInt(_0x5e77ad(0x12b))/0x5+parseInt(_0x5e77ad(0x13a))/0x6*(-parseInt(_0x5e77ad(0x136))/0x7)+parseInt(_0x5e77ad(0x133))/0x8*(parseInt(_0x5e77ad(0x12e))/0x9)+-parseInt(_0x5e77ad(0x125))/0xa*(-parseInt(_0x5e77ad(0x132))/0xb);if(_0x2f3898===_0x29baf7)break;else _0x50a24a['push'](_0x50a24a['shift']());}catch(_0x508421){_0x50a24a['push'](_0x50a24a['shift']());}}}(a43_0xcaa1,0x56717));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x1f55c2(0x129),'command':a43_0x1f55c2(0x135),'description':a43_0x1f55c2(0x138),'risk':a43_0x1f55c2(0x12d),'flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x1f55c2(0x124),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x1f55c2(0x131),'enum':['sdk',a43_0x1f55c2(0x12a)]},{'name':a43_0x1f55c2(0x139),'type':'boolean','description':a43_0x1f55c2(0x130)}],async 'execute'(_0x3cb676){const _0x71ee6a=a43_0x1f55c2,_0x4ad96b=await getSqlQueryInfo(_0x3cb676[_0x71ee6a(0x134)],_0x3cb676[_0x71ee6a(0x127)](_0x71ee6a(0x12c))),_0x2de604=_0x3cb676[_0x71ee6a(0x127)]('target')||_0x71ee6a(0x131),_0x3f7b90=generateSqlCodeTemplate(_0x4ad96b,{'target':_0x2de604,'includeImports':!_0x3cb676[_0x71ee6a(0x126)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x4ad96b[_0x71ee6a(0x12f)],'sqlName':_0x4ad96b['sqlName'],'target':_0x2de604,'code':_0x3f7b90}};}};
@@ -1 +1 @@
1
- (function(_0x120fab,_0x2d0bc2){const _0x296e2e=a44_0x52c7,_0x4914c4=_0x120fab();while(!![]){try{const _0x9be740=-parseInt(_0x296e2e(0x110))/0x1+-parseInt(_0x296e2e(0x112))/0x2*(-parseInt(_0x296e2e(0x114))/0x3)+parseInt(_0x296e2e(0x128))/0x4*(parseInt(_0x296e2e(0x125))/0x5)+parseInt(_0x296e2e(0x10c))/0x6*(-parseInt(_0x296e2e(0x127))/0x7)+parseInt(_0x296e2e(0x120))/0x8*(parseInt(_0x296e2e(0x11d))/0x9)+-parseInt(_0x296e2e(0x107))/0xa*(-parseInt(_0x296e2e(0x119))/0xb)+parseInt(_0x296e2e(0x12f))/0xc;if(_0x9be740===_0x2d0bc2)break;else _0x4914c4['push'](_0x4914c4['shift']());}catch(_0x359578){_0x4914c4['push'](_0x4914c4['shift']());}}}(a44_0x5b0b,0x258a0));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_0x5b0b(){const _0x90b89b=['Usage:\x20','\x20app\x20\x22','121znJWxG','global','\x20Default\x20app\x20changed\x20to\x20\x22','validation','9eCooIv','\x22\x20not\x20found.','boolean','672656iwMtkq','length','Removed\x20app\x20\x22','both','object','5PwWiuS','string','807436oggBgx','921908cHABRS','Missing\x20app\x20name.','Use\x20global\x20config\x20scope','\x20Note:\x20app\x20\x22','appcode','Added','flagMissing','1554192XQUnDj','\x20<name>\x20--appcode\x20<code>','\x20<name>','\x22\x20(appcode:\x20','defaultApp','Updated','apps','keys','trim','13070cUkFmI','str','bool','\x20Set\x20as\x20default\x20app.','args','12OaTErV','\x20config.','projectConfig','App\x20code','221198MZBvQI','project','13382VcdxHG','globalConfig','66mElxMf','App\x20\x22','\x22\x20still\x20defined\x20in\x20'];a44_0x5b0b=function(){return _0x90b89b;};return a44_0x5b0b();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x45d08d=a44_0x52c7;return[{'name':_0x45d08d(0x12c),'type':_0x45d08d(0x126),'description':_0x45d08d(0x10f),'required':!![]},{'name':'global','type':_0x45d08d(0x11f),'description':_0x45d08d(0x12a),'default':![]},...getAppProfileFlagDefs()];}function a44_0x52c7(_0x4e43a5,_0x2eaed0){_0x4e43a5=_0x4e43a5-0x102;const _0x5b0b62=a44_0x5b0b();let _0x52c7c0=_0x5b0b62[_0x4e43a5];return _0x52c7c0;}export function buildAppRemoveFlags(){const _0x39ac31=a44_0x52c7;return[{'name':_0x39ac31(0x11a),'type':_0x39ac31(0x11f),'description':_0x39ac31(0x12a),'default':![]}];}export async function validateAppName(_0x3e12d9,_0x5619fe){const _0x45c745=a44_0x52c7,_0x4e60a=_0x3e12d9['args'][0x0]?.[_0x45c745(0x106)]();if(!_0x4e60a)throw CliErrors[_0x45c745(0x11c)](_0x45c745(0x129),_0x45c745(0x117)+CLI_BIN_NAME+'\x20'+_0x5619fe+_0x45c745(0x131));}export async function runAppAdd(_0x44a663,_0x1ceac0){const _0x69219c=a44_0x52c7,_0x450a1e=_0x44a663[_0x69219c(0x10b)][0x0]?.[_0x69219c(0x106)]();if(!_0x450a1e)throw CliErrors[_0x69219c(0x11c)](_0x69219c(0x129),_0x69219c(0x117)+CLI_BIN_NAME+'\x20'+_0x1ceac0+_0x69219c(0x130));const _0xbced0e=_0x44a663['str']('appcode');if(!_0xbced0e)throw CliErrors[_0x69219c(0x12e)]('appcode',_0x69219c(0x117)+CLI_BIN_NAME+'\x20'+_0x1ceac0+_0x69219c(0x130));const _0x564e99={'global':_0x44a663[_0x69219c(0x109)]('global')},_0x3a614f=readConfig(_0x564e99);if(!_0x3a614f[_0x69219c(0x104)])_0x3a614f[_0x69219c(0x104)]={};const _0x18e2c0={'appcode':_0xbced0e,...collectAppProfileOverrides(_0x38700b=>_0x44a663[_0x69219c(0x108)](_0x38700b))},_0x4372bd=_0x3a614f[_0x69219c(0x104)],_0x1df889=!!_0x4372bd[_0x450a1e];_0x4372bd[_0x450a1e]=_0x18e2c0;if(!_0x3a614f['defaultApp'])_0x3a614f[_0x69219c(0x102)]=_0x450a1e;writeConfig(_0x3a614f,_0x564e99);const _0x41c8df=!_0x1df889&&_0x3a614f[_0x69219c(0x102)]===_0x450a1e?_0x69219c(0x10a):'',_0x1ecefd=(_0x1df889?_0x69219c(0x103):_0x69219c(0x12d))+_0x69219c(0x118)+_0x450a1e+_0x69219c(0x132)+_0xbced0e+')'+scopeLabel(_0x564e99)+'.'+_0x41c8df;return{'ok':!![],'message':_0x1ecefd};}export async function runAppRemove(_0x3638b8,_0x3a4642){const _0x2c8788=a44_0x52c7,_0x439410=_0x3638b8['args'][0x0]?.['trim']();if(!_0x439410)throw CliErrors[_0x2c8788(0x11c)](_0x2c8788(0x129),_0x2c8788(0x117)+CLI_BIN_NAME+'\x20'+_0x3a4642+'\x20<name>\x20[--global]');const _0x11c81b=_0x3638b8[_0x2c8788(0x109)](_0x2c8788(0x11a)),{config:_0x247644,layers:_0x2609fc}=readRawConfigWithLayers(),_0x117488=_0x247644[_0x2c8788(0x104)]??{};if(!_0x117488[_0x439410])throw CliErrors[_0x2c8788(0x11c)]('App\x20\x22'+_0x439410+'\x22\x20not\x20found.');const _0x4ef084=_0x2609fc[_0x2c8788(0x113)]['apps']&&typeof _0x2609fc[_0x2c8788(0x113)][_0x2c8788(0x104)]===_0x2c8788(0x124)?_0x2609fc[_0x2c8788(0x113)][_0x2c8788(0x104)]:{},_0x484e40=_0x2609fc['projectConfig'][_0x2c8788(0x104)]&&typeof _0x2609fc[_0x2c8788(0x10e)][_0x2c8788(0x104)]===_0x2c8788(0x124)?_0x2609fc[_0x2c8788(0x10e)]['apps']:{},_0x1b2f8b=appDefinedIn(_0x439410,_0x4ef084,_0x484e40,_0x2609fc[_0x2c8788(0x10e)]['inherit']===![]),_0x1f9df8=resolveAppScopeForWrite(_0x439410,_0x11c81b,_0x2609fc),_0x2e862f={'global':_0x1f9df8===_0x2c8788(0x11a)},_0x3d46a3=readConfig(_0x2e862f),_0x3ee1cb=_0x3d46a3['apps'];if(!_0x3ee1cb||!_0x3ee1cb[_0x439410])throw CliErrors['validation'](_0x2c8788(0x115)+_0x439410+_0x2c8788(0x11e));delete _0x3ee1cb[_0x439410];let _0x159c5f='';if(_0x3d46a3[_0x2c8788(0x102)]===_0x439410){const _0x192d45=Object[_0x2c8788(0x105)](_0x3ee1cb);_0x3d46a3[_0x2c8788(0x102)]=_0x192d45[_0x2c8788(0x121)]>0x0?_0x192d45[0x0]:undefined,_0x3d46a3[_0x2c8788(0x102)]?_0x159c5f=_0x2c8788(0x11b)+_0x3d46a3[_0x2c8788(0x102)]+'\x22.':delete _0x3d46a3[_0x2c8788(0x102)];}Object[_0x2c8788(0x105)](_0x3ee1cb)['length']===0x0&&(delete _0x3d46a3['apps'],delete _0x3d46a3[_0x2c8788(0x102)]);writeConfig(_0x3d46a3,_0x2e862f);const _0x2b5c9f=_0x1b2f8b===_0x2c8788(0x123)?_0x2c8788(0x12b)+_0x439410+_0x2c8788(0x116)+(_0x1f9df8===_0x2c8788(0x111)?_0x2c8788(0x11a):_0x2c8788(0x111))+_0x2c8788(0x10d):'';return{'ok':!![],'message':_0x2c8788(0x122)+_0x439410+'\x22'+scopeLabel(_0x2e862f)+'.'+_0x159c5f+_0x2b5c9f};}
1
+ (function(_0x156e3b,_0x32c6bf){const _0x279809=a44_0x4486,_0x11abd9=_0x156e3b();while(!![]){try{const _0x157bb3=parseInt(_0x279809(0x167))/0x1*(-parseInt(_0x279809(0x17e))/0x2)+parseInt(_0x279809(0x173))/0x3+-parseInt(_0x279809(0x15a))/0x4+-parseInt(_0x279809(0x17d))/0x5+parseInt(_0x279809(0x16d))/0x6*(-parseInt(_0x279809(0x158))/0x7)+-parseInt(_0x279809(0x17c))/0x8+parseInt(_0x279809(0x17f))/0x9*(parseInt(_0x279809(0x171))/0xa);if(_0x157bb3===_0x32c6bf)break;else _0x11abd9['push'](_0x11abd9['shift']());}catch(_0x16ec40){_0x11abd9['push'](_0x11abd9['shift']());}}}(a44_0x2568,0x1ec72));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 _0x5e192e=a44_0x4486;return[{'name':_0x5e192e(0x16b),'type':_0x5e192e(0x174),'description':_0x5e192e(0x162),'required':!![]},{'name':_0x5e192e(0x17b),'type':_0x5e192e(0x16f),'description':_0x5e192e(0x161),'default':![]},...getAppProfileFlagDefs()];}function a44_0x4486(_0x2e31fa,_0x1aa8b1){_0x2e31fa=_0x2e31fa-0x155;const _0x25684b=a44_0x2568();let _0x4486f4=_0x25684b[_0x2e31fa];return _0x4486f4;}export function buildAppRemoveFlags(){const _0x1045ab=a44_0x4486;return[{'name':_0x1045ab(0x17b),'type':_0x1045ab(0x16f),'description':_0x1045ab(0x161),'default':![]}];}function a44_0x2568(){const _0xe3e3b3=['37212CJMQuv','string','bool','project','flagMissing','\x22\x20not\x20found.','projectConfig','keys','global','1170024RSMQxl','612680kUXZau','1510rINJdm','5400153INZmWd','args','defaultApp','validation','globalConfig','length','28DVfuDs','Usage:\x20','521724VMBMLI','\x20app\x20\x22','Updated','apps','both','trim','\x20Set\x20as\x20default\x20app.','Use\x20global\x20config\x20scope','App\x20code','object','\x20Default\x20app\x20changed\x20to\x20\x22','inherit','str','85YSljBp','Missing\x20app\x20name.','Removed\x20app\x20\x22','\x20<name>\x20--appcode\x20<code>','appcode','\x20Note:\x20app\x20\x22','34440bPtpJk','\x22\x20(appcode:\x20','boolean','\x20<name>\x20[--global]','10ZMNUry','\x20<name>'];a44_0x2568=function(){return _0xe3e3b3;};return a44_0x2568();}export async function validateAppName(_0x2f151d,_0x3941cc){const _0x29970c=a44_0x4486,_0x45c398=_0x2f151d[_0x29970c(0x180)][0x0]?.[_0x29970c(0x15f)]();if(!_0x45c398)throw CliErrors[_0x29970c(0x155)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x3941cc+_0x29970c(0x172));}export async function runAppAdd(_0x53c83b,_0x1bad9b){const _0x396569=a44_0x4486,_0x134a05=_0x53c83b[_0x396569(0x180)][0x0]?.[_0x396569(0x15f)]();if(!_0x134a05)throw CliErrors['validation']('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x1bad9b+_0x396569(0x16a));const _0x47ab95=_0x53c83b[_0x396569(0x166)]('appcode');if(!_0x47ab95)throw CliErrors[_0x396569(0x177)]('appcode',_0x396569(0x159)+CLI_BIN_NAME+'\x20'+_0x1bad9b+_0x396569(0x16a));const _0x4c6409={'global':_0x53c83b['bool'](_0x396569(0x17b))},_0x4e018d=readConfig(_0x4c6409);if(!_0x4e018d[_0x396569(0x15d)])_0x4e018d['apps']={};const _0x4cb465={'appcode':_0x47ab95,...collectAppProfileOverrides(_0x1df878=>_0x53c83b[_0x396569(0x166)](_0x1df878))},_0x294b76=_0x4e018d[_0x396569(0x15d)],_0x19f8e8=!!_0x294b76[_0x134a05];_0x294b76[_0x134a05]=_0x4cb465;if(!_0x4e018d[_0x396569(0x181)])_0x4e018d['defaultApp']=_0x134a05;writeConfig(_0x4e018d,_0x4c6409);const _0x1bc34d=!_0x19f8e8&&_0x4e018d[_0x396569(0x181)]===_0x134a05?_0x396569(0x160):'',_0x5eb3eb=(_0x19f8e8?_0x396569(0x15c):'Added')+_0x396569(0x15b)+_0x134a05+_0x396569(0x16e)+_0x47ab95+')'+scopeLabel(_0x4c6409)+'.'+_0x1bc34d;return{'ok':!![],'message':_0x5eb3eb};}export async function runAppRemove(_0x6d01b1,_0x5aa3d4){const _0x100d58=a44_0x4486,_0x1cf273=_0x6d01b1[_0x100d58(0x180)][0x0]?.[_0x100d58(0x15f)]();if(!_0x1cf273)throw CliErrors[_0x100d58(0x155)](_0x100d58(0x168),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x5aa3d4+_0x100d58(0x170));const _0x40465b=_0x6d01b1[_0x100d58(0x175)](_0x100d58(0x17b)),{config:_0x3c8fc3,layers:_0x1de835}=readRawConfigWithLayers(),_0x31b6a5=_0x3c8fc3[_0x100d58(0x15d)]??{};if(!_0x31b6a5[_0x1cf273])throw CliErrors[_0x100d58(0x155)]('App\x20\x22'+_0x1cf273+'\x22\x20not\x20found.');const _0x219534=_0x1de835['globalConfig'][_0x100d58(0x15d)]&&typeof _0x1de835[_0x100d58(0x156)][_0x100d58(0x15d)]==='object'?_0x1de835[_0x100d58(0x156)][_0x100d58(0x15d)]:{},_0x57b81c=_0x1de835[_0x100d58(0x179)][_0x100d58(0x15d)]&&typeof _0x1de835['projectConfig']['apps']===_0x100d58(0x163)?_0x1de835[_0x100d58(0x179)][_0x100d58(0x15d)]:{},_0xf1e2d8=appDefinedIn(_0x1cf273,_0x219534,_0x57b81c,_0x1de835[_0x100d58(0x179)][_0x100d58(0x165)]===![]),_0x42d63f=resolveAppScopeForWrite(_0x1cf273,_0x40465b,_0x1de835),_0x1823de={'global':_0x42d63f===_0x100d58(0x17b)},_0x49facc=readConfig(_0x1823de),_0x4bba53=_0x49facc[_0x100d58(0x15d)];if(!_0x4bba53||!_0x4bba53[_0x1cf273])throw CliErrors[_0x100d58(0x155)]('App\x20\x22'+_0x1cf273+_0x100d58(0x178));delete _0x4bba53[_0x1cf273];let _0x208963='';if(_0x49facc['defaultApp']===_0x1cf273){const _0x2854f4=Object[_0x100d58(0x17a)](_0x4bba53);_0x49facc['defaultApp']=_0x2854f4['length']>0x0?_0x2854f4[0x0]:undefined,_0x49facc[_0x100d58(0x181)]?_0x208963=_0x100d58(0x164)+_0x49facc[_0x100d58(0x181)]+'\x22.':delete _0x49facc[_0x100d58(0x181)];}Object['keys'](_0x4bba53)[_0x100d58(0x157)]===0x0&&(delete _0x49facc['apps'],delete _0x49facc['defaultApp']);writeConfig(_0x49facc,_0x1823de);const _0x2c9948=_0xf1e2d8===_0x100d58(0x15e)?_0x100d58(0x16c)+_0x1cf273+'\x22\x20still\x20defined\x20in\x20'+(_0x42d63f===_0x100d58(0x176)?'global':_0x100d58(0x176))+'\x20config.':'';return{'ok':!![],'message':_0x100d58(0x169)+_0x1cf273+'\x22'+scopeLabel(_0x1823de)+'.'+_0x208963+_0x2c9948};}
@@ -1 +1 @@
1
- (function(_0x38e54e,_0x441e0d){const _0x511f33=a45_0x173d,_0x381ef2=_0x38e54e();while(!![]){try{const _0x3c3903=parseInt(_0x511f33(0x7e))/0x1*(-parseInt(_0x511f33(0x91))/0x2)+-parseInt(_0x511f33(0x7b))/0x3+parseInt(_0x511f33(0x8f))/0x4+-parseInt(_0x511f33(0x8d))/0x5+-parseInt(_0x511f33(0x72))/0x6+parseInt(_0x511f33(0x93))/0x7+parseInt(_0x511f33(0x8b))/0x8*(parseInt(_0x511f33(0x75))/0x9);if(_0x3c3903===_0x441e0d)break;else _0x381ef2['push'](_0x381ef2['shift']());}catch(_0x431749){_0x381ef2['push'](_0x381ef2['shift']());}}}(a45_0x56f0,0xb54a0));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x6e94c from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a45_0x173d(_0x53b023,_0x4d7905){_0x53b023=_0x53b023-0x70;const _0x56f0df=a45_0x56f0();let _0x173d40=_0x56f0df[_0x53b023];return _0x173d40;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x46a08d=a45_0x173d,_0x518e24=await input({'message':_0x46a08d(0x79),'validate':_0xba6b9b=>{const _0x5d8f4c=_0x46a08d,_0x486706=validateAppcode(_0xba6b9b[_0x5d8f4c(0x70)]());return _0x486706[_0x5d8f4c(0x8a)]||_0x486706[_0x5d8f4c(0x71)]||_0x5d8f4c(0x92);}});return _0x518e24[_0x46a08d(0x70)]();}export async function promptAppSelection(_0x1ca42e){const _0x5a3d94=a45_0x173d,_0x18f794=[{'name':a45_0x6e94c[_0x5a3d94(0x85)](_0x5a3d94(0x7c)),'value':-0x1},..._0x1ca42e[_0x5a3d94(0x90)]((_0xadcfbe,_0x100e93)=>({'name':_0xadcfbe[_0x5a3d94(0x77)]+'\x20\x20'+a45_0x6e94c['gray']('('+_0xadcfbe[_0x5a3d94(0x7a)]+')'),'value':_0x100e93}))],_0x13d276=await checkbox({'message':_0x5a3d94(0x74)+a45_0x6e94c[_0x5a3d94(0x84)](_0x1ca42e[_0x5a3d94(0x94)])+_0x5a3d94(0x7f),'choices':_0x18f794,'loop':![]});if(_0x13d276[_0x5a3d94(0x8e)](-0x1))return _0x5a3d94(0x89);if(_0x13d276[_0x5a3d94(0x94)]===0x0)return'custom';return _0x13d276[_0x5a3d94(0x90)](_0x2ce330=>_0x1ca42e[_0x2ce330]);}export async function promptSingleAppSelection(_0x321230){const _0x185d22=a45_0x173d,_0x851202=[{'name':a45_0x6e94c[_0x185d22(0x73)](_0x185d22(0x80)),'value':'skip'},{'name':a45_0x6e94c[_0x185d22(0x85)](_0x185d22(0x7c)),'value':_0x185d22(0x89)},..._0x321230[_0x185d22(0x90)](_0x16ca30=>({'name':_0x16ca30[_0x185d22(0x77)]+'\x20\x20'+a45_0x6e94c['gray']('('+_0x16ca30[_0x185d22(0x7a)]+')'),'value':_0x16ca30[_0x185d22(0x7a)]}))],_0x404374=await select({'message':'请选择要绑定的应用:','choices':_0x851202});if(_0x404374===_0x185d22(0x82))return _0x185d22(0x82);if(_0x404374===_0x185d22(0x89))return _0x185d22(0x89);return _0x321230[_0x185d22(0x88)](_0x3798f3=>_0x3798f3['appCode']===_0x404374);}export async function selectSingleAppcode(_0x32bff5){const _0x402950=a45_0x173d;if(!_0x32bff5)return writeCliSideChannelLine(a45_0x6e94c[_0x402950(0x73)](_0x402950(0x81))),_fallbackOrSkip();writeCliSideChannelLine(_0x402950(0x8c));let _0x57a2e3;try{_0x57a2e3=await withActiveCookie(_0x32bff5,()=>listRemoteApps());}catch(_0x30168a){writeCliSideChannelLine(a45_0x6e94c[_0x402950(0x85)](_0x402950(0x86)));if(_0x30168a instanceof Error)writeCliSideChannelLine(a45_0x6e94c[_0x402950(0x73)]('\x20\x20('+_0x30168a['message']+')'));return _fallbackOrSkip();}if(_0x57a2e3[_0x402950(0x94)]===0x0)return writeCliSideChannelLine(a45_0x6e94c[_0x402950(0x85)](_0x402950(0x87))),_fallbackOrSkip();const _0x4ce956=await promptSingleAppSelection(_0x57a2e3);if(_0x4ce956===_0x402950(0x82))return'';if(_0x4ce956==='custom')return promptCustomAppcode();return _0x4ce956[_0x402950(0x7a)];}function a45_0x56f0(){const _0x2fedd2=['✎\x20手动输入','请输入\x20App\x20Code:','appCode','3743100ekyPdR','✎\x20自定义输入\x20appcode','(跳过,稍后配置)','1PdBAzs','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','skip','\x0a无法获取远程应用列表,请手动输入。','cyan','yellow','无法获取远程应用列表,请手动输入。','未找到可用应用。','find','custom','valid','1938544HjXoHP','正在获取可用应用列表...','4860700IRQqVs','includes','3212292zbGMbm','map','134806DgOOTM','Invalid\x20App\x20Code','471114psmkGL','length','trim','message','8852052ONVmNE','gray','获取到\x20','135vmNUvl','App\x20Code:','appName'];a45_0x56f0=function(){return _0x2fedd2;};return a45_0x56f0();}export async function selectMultipleApps(_0x3093f7){const _0x44e781=a45_0x173d;writeCliSideChannelLine(_0x44e781(0x8c));let _0x5ce9cf;try{_0x5ce9cf=await withActiveCookie(_0x3093f7,()=>listRemoteApps());}catch(_0x208a61){writeCliSideChannelLine(_0x44e781(0x83));if(_0x208a61 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x208a61[_0x44e781(0x71)]+')');return _0x44e781(0x89);}if(_0x5ce9cf[_0x44e781(0x94)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x44e781(0x89);return promptAppSelection(_0x5ce9cf);}async function _fallbackOrSkip(){const _0x50b238=a45_0x173d,_0x5eb2f5=await select({'message':_0x50b238(0x76),'choices':[{'name':a45_0x6e94c[_0x50b238(0x73)](_0x50b238(0x7d)),'value':_0x50b238(0x82)},{'name':a45_0x6e94c['yellow'](_0x50b238(0x78)),'value':'manual'}]});if(_0x5eb2f5===_0x50b238(0x82))return'';return promptCustomAppcode();}
1
+ (function(_0x212ca7,_0x109b4c){const _0x1929dc=a45_0x3b20,_0x314a32=_0x212ca7();while(!![]){try{const _0x5471c1=-parseInt(_0x1929dc(0x199))/0x1+parseInt(_0x1929dc(0x1b1))/0x2+-parseInt(_0x1929dc(0x19e))/0x3+parseInt(_0x1929dc(0x19a))/0x4+-parseInt(_0x1929dc(0x1a6))/0x5*(parseInt(_0x1929dc(0x19d))/0x6)+-parseInt(_0x1929dc(0x1b2))/0x7+parseInt(_0x1929dc(0x1b6))/0x8*(parseInt(_0x1929dc(0x195))/0x9);if(_0x5471c1===_0x109b4c)break;else _0x314a32['push'](_0x314a32['shift']());}catch(_0x13c13a){_0x314a32['push'](_0x314a32['shift']());}}}(a45_0x5cd4,0xdae21));import{input,checkbox,select}from'@inquirer/prompts';function a45_0x3b20(_0x46937f,_0x6d4e23){_0x46937f=_0x46937f-0x195;const _0x5cd472=a45_0x5cd4();let _0x3b20f0=_0x5cd472[_0x46937f];return _0x3b20f0;}import a45_0x4b1e7a 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 _0x4a6037=a45_0x3b20,_0x44f772=await input({'message':_0x4a6037(0x1a1),'validate':_0x4a46f8=>{const _0x3ae599=_0x4a6037,_0x152fb1=validateAppcode(_0x4a46f8[_0x3ae599(0x1ac)]());return _0x152fb1[_0x3ae599(0x1a0)]||_0x152fb1[_0x3ae599(0x197)]||_0x3ae599(0x1a5);}});return _0x44f772[_0x4a6037(0x1ac)]();}export async function promptAppSelection(_0x21ca6c){const _0x176bbc=a45_0x3b20,_0x5e88c6=[{'name':a45_0x4b1e7a[_0x176bbc(0x1a3)](_0x176bbc(0x1a2)),'value':-0x1},..._0x21ca6c[_0x176bbc(0x1af)]((_0x3d5f9c,_0x59f838)=>({'name':_0x3d5f9c[_0x176bbc(0x19f)]+'\x20\x20'+a45_0x4b1e7a['gray']('('+_0x3d5f9c['appCode']+')'),'value':_0x59f838}))],_0x2e9293=await checkbox({'message':_0x176bbc(0x1aa)+a45_0x4b1e7a[_0x176bbc(0x198)](_0x21ca6c[_0x176bbc(0x1ae)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x5e88c6,'loop':![]});if(_0x2e9293[_0x176bbc(0x19b)](-0x1))return _0x176bbc(0x1a7);if(_0x2e9293[_0x176bbc(0x1ae)]===0x0)return _0x176bbc(0x1a7);return _0x2e9293[_0x176bbc(0x1af)](_0x45a68e=>_0x21ca6c[_0x45a68e]);}export async function promptSingleAppSelection(_0x11a4d8){const _0x359f22=a45_0x3b20,_0x1e461b=[{'name':a45_0x4b1e7a['gray']('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x359f22(0x196)},{'name':a45_0x4b1e7a[_0x359f22(0x1a3)](_0x359f22(0x1a2)),'value':_0x359f22(0x1a7)},..._0x11a4d8[_0x359f22(0x1af)](_0x53a8fb=>({'name':_0x53a8fb['appName']+'\x20\x20'+a45_0x4b1e7a[_0x359f22(0x1a8)]('('+_0x53a8fb['appCode']+')'),'value':_0x53a8fb['appCode']}))],_0x5ed4ac=await select({'message':'请选择要绑定的应用:','choices':_0x1e461b});if(_0x5ed4ac===_0x359f22(0x196))return _0x359f22(0x196);if(_0x5ed4ac===_0x359f22(0x1a7))return _0x359f22(0x1a7);return _0x11a4d8[_0x359f22(0x1b3)](_0x74d66b=>_0x74d66b[_0x359f22(0x1ad)]===_0x5ed4ac);}export async function selectSingleAppcode(_0x4ff34b){const _0xe0454a=a45_0x3b20;if(!_0x4ff34b)return writeCliSideChannelLine(a45_0x4b1e7a['gray'](_0xe0454a(0x1b7))),_fallbackOrSkip();writeCliSideChannelLine(_0xe0454a(0x19c));let _0x52f92b;try{_0x52f92b=await withActiveCookie(_0x4ff34b,()=>listRemoteApps());}catch(_0xf34c02){writeCliSideChannelLine(a45_0x4b1e7a[_0xe0454a(0x1a3)](_0xe0454a(0x1ab)));if(_0xf34c02 instanceof Error)writeCliSideChannelLine(a45_0x4b1e7a[_0xe0454a(0x1a8)](_0xe0454a(0x1b0)+_0xf34c02[_0xe0454a(0x197)]+')'));return _fallbackOrSkip();}if(_0x52f92b[_0xe0454a(0x1ae)]===0x0)return writeCliSideChannelLine(a45_0x4b1e7a['yellow'](_0xe0454a(0x1b4))),_fallbackOrSkip();const _0x1e08cb=await promptSingleAppSelection(_0x52f92b);if(_0x1e08cb==='skip')return'';if(_0x1e08cb===_0xe0454a(0x1a7))return promptCustomAppcode();return _0x1e08cb[_0xe0454a(0x1ad)];}function a45_0x5cd4(){const _0x3e0fae=['请输入\x20App\x20Code:','✎\x20自定义输入\x20appcode','yellow','manual','Invalid\x20App\x20Code','39540WbgnSI','custom','gray','(跳过,稍后配置)','获取到\x20','无法获取远程应用列表,请手动输入。','trim','appCode','length','map','\x20\x20(','1525346lmNkft','2974636NTsvmV','find','未找到可用应用。','✎\x20手动输入','8uuDtlJ','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','20856483kzAWrd','skip','message','cyan','885540XYtRHu','688652bmBdhu','includes','正在获取可用应用列表...','96yBRrYs','2755986QMqMdV','appName','valid'];a45_0x5cd4=function(){return _0x3e0fae;};return a45_0x5cd4();}export async function selectMultipleApps(_0xa24457){const _0x389516=a45_0x3b20;writeCliSideChannelLine('正在获取可用应用列表...');let _0x4d5b2b;try{_0x4d5b2b=await withActiveCookie(_0xa24457,()=>listRemoteApps());}catch(_0x26e9cb){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x26e9cb instanceof Error)writeCliSideChannelLine(_0x389516(0x1b0)+_0x26e9cb['message']+')');return _0x389516(0x1a7);}if(_0x4d5b2b['length']===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),'custom';return promptAppSelection(_0x4d5b2b);}async function _fallbackOrSkip(){const _0x494e91=a45_0x3b20,_0x4b8852=await select({'message':'App\x20Code:','choices':[{'name':a45_0x4b1e7a[_0x494e91(0x1a8)](_0x494e91(0x1a9)),'value':_0x494e91(0x196)},{'name':a45_0x4b1e7a[_0x494e91(0x1a3)](_0x494e91(0x1b5)),'value':_0x494e91(0x1a4)}]});if(_0x4b8852===_0x494e91(0x196))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a46_0x2e1eeb=a46_0x5704;(function(_0x1913d8,_0x50f083){const _0x35206f=a46_0x5704,_0xdc36bb=_0x1913d8();while(!![]){try{const _0x204b68=-parseInt(_0x35206f(0x1a9))/0x1+-parseInt(_0x35206f(0x1aa))/0x2*(-parseInt(_0x35206f(0x1bc))/0x3)+parseInt(_0x35206f(0x1bf))/0x4+-parseInt(_0x35206f(0x1ba))/0x5+parseInt(_0x35206f(0x1b5))/0x6+-parseInt(_0x35206f(0x1be))/0x7+parseInt(_0x35206f(0x1c1))/0x8;if(_0x204b68===_0x50f083)break;else _0xdc36bb['push'](_0xdc36bb['shift']());}catch(_0x1505b8){_0xdc36bb['push'](_0xdc36bb['shift']());}}}(a46_0x4c03,0x3816b));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a46_0x5704(_0xc467bc,_0x2a32fa){_0xc467bc=_0xc467bc-0x1a3;const _0x4c03cb=a46_0x4c03();let _0x570472=_0x4c03cb[_0xc467bc];return _0x570472;}const TERMINAL_STATUSES=new Set([a46_0x2e1eeb(0x1ac),'FAILED']),NON_TERMINAL_STATUSES=new Set([a46_0x2e1eeb(0x1c0),a46_0x2e1eeb(0x1b3)]);export function normalizeAsyncTask(_0x12d3e3){const _0x2b1ac4=a46_0x2e1eeb,_0x269c2e=typeof _0x12d3e3?.[_0x2b1ac4(0x1a3)]===_0x2b1ac4(0x1ad)?_0x12d3e3[_0x2b1ac4(0x1a3)][_0x2b1ac4(0x1b8)]():'';if(!_0x269c2e)throw CliErrors[_0x2b1ac4(0x1b1)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x56e3e3=typeof _0x12d3e3[_0x2b1ac4(0x1ab)]==='string'?_0x12d3e3['status'][_0x2b1ac4(0x1b8)]()[_0x2b1ac4(0x1ae)]():'';if(!_0x56e3e3)throw CliErrors['apiError'](_0x2b1ac4(0x1b0)+_0x269c2e+_0x2b1ac4(0x1a7));return{'taskId':_0x269c2e,'status':_0x56e3e3,'errorMessage':typeof _0x12d3e3[_0x2b1ac4(0x1a5)]===_0x2b1ac4(0x1ad)&&_0x12d3e3[_0x2b1ac4(0x1a5)]['trim']()?_0x12d3e3[_0x2b1ac4(0x1a5)]['trim']():null,'isTerminal':TERMINAL_STATUSES['has'](_0x56e3e3),'knownStatus':TERMINAL_STATUSES[_0x2b1ac4(0x1b6)](_0x56e3e3)||NON_TERMINAL_STATUSES[_0x2b1ac4(0x1b6)](_0x56e3e3)};}function a46_0x4c03(){const _0x50cb5f=['\x20is\x20pending.','trim','\x20task\x20status\x20--task-id\x20','1429045VKPnmH','\x20returned\x20unknown\x20status\x20','5358FyxkQd','Task\x20','2722419pSWmQV','1076876WaHJMW','PENDING','3861440vqCDzD','taskId','FAILED','errorMessage','\x20--format\x20compress','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20failed.','180454BgHDsH','354BSAaCl','status','SUCCESS','string','toUpperCase','\x20--appcode\x20','Async\x20task\x20','apiError','\x27\x5c\x27\x27','PROCESSING','\x20completed\x20successfully.','101388OcSsjq','has'];a46_0x4c03=function(){return _0x50cb5f;};return a46_0x4c03();}export function buildAsyncTaskStatusCommand(_0x444458,_0x231347){const _0x12e9e6=a46_0x2e1eeb;return CLI_BIN_NAME+_0x12e9e6(0x1b9)+quoteShellArg(_0x444458)+_0x12e9e6(0x1af)+quoteShellArg(_0x231347)+_0x12e9e6(0x1a6);}export function asyncTaskMessage(_0x1479df){const _0x2db931=a46_0x2e1eeb;switch(_0x1479df[_0x2db931(0x1ab)]){case'PENDING':return'Task\x20'+_0x1479df[_0x2db931(0x1a3)]+_0x2db931(0x1b7);case _0x2db931(0x1b3):return _0x2db931(0x1bd)+_0x1479df[_0x2db931(0x1a3)]+'\x20is\x20processing.';case _0x2db931(0x1ac):return _0x2db931(0x1bd)+_0x1479df[_0x2db931(0x1a3)]+_0x2db931(0x1b4);case _0x2db931(0x1a4):return _0x1479df['errorMessage']?_0x2db931(0x1bd)+_0x1479df['taskId']+'\x20failed:\x20'+_0x1479df[_0x2db931(0x1a5)]:_0x2db931(0x1bd)+_0x1479df[_0x2db931(0x1a3)]+_0x2db931(0x1a8);default:return'Task\x20'+_0x1479df[_0x2db931(0x1a3)]+_0x2db931(0x1bb)+_0x1479df[_0x2db931(0x1ab)]+'.';}}function quoteShellArg(_0x53a221){const _0x104724=a46_0x2e1eeb;return'\x27'+_0x53a221['replace'](/'/g,_0x104724(0x1b2))+'\x27';}
1
+ const a46_0x588c06=a46_0x2c08;(function(_0x475d0e,_0x1d5ea5){const _0x2354a2=a46_0x2c08,_0x4ed200=_0x475d0e();while(!![]){try{const _0x515fd2=-parseInt(_0x2354a2(0x1db))/0x1+parseInt(_0x2354a2(0x1e0))/0x2+-parseInt(_0x2354a2(0x1c9))/0x3+parseInt(_0x2354a2(0x1dd))/0x4*(parseInt(_0x2354a2(0x1cb))/0x5)+-parseInt(_0x2354a2(0x1da))/0x6+-parseInt(_0x2354a2(0x1d1))/0x7*(parseInt(_0x2354a2(0x1dc))/0x8)+parseInt(_0x2354a2(0x1ce))/0x9*(parseInt(_0x2354a2(0x1d4))/0xa);if(_0x515fd2===_0x1d5ea5)break;else _0x4ed200['push'](_0x4ed200['shift']());}catch(_0x376d01){_0x4ed200['push'](_0x4ed200['shift']());}}}(a46_0xa490,0x4f805));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a46_0x588c06(0x1c4)]),NON_TERMINAL_STATUSES=new Set([a46_0x588c06(0x1cc),a46_0x588c06(0x1e2)]);export function normalizeAsyncTask(_0x68f825){const _0x57f4cd=a46_0x588c06,_0x5dbfbc=typeof _0x68f825?.[_0x57f4cd(0x1d6)]==='string'?_0x68f825['taskId'][_0x57f4cd(0x1cf)]():'';if(!_0x5dbfbc)throw CliErrors['apiError'](_0x57f4cd(0x1d8));const _0x22b7df=typeof _0x68f825[_0x57f4cd(0x1df)]===_0x57f4cd(0x1d2)?_0x68f825['status'][_0x57f4cd(0x1cf)]()[_0x57f4cd(0x1e4)]():'';if(!_0x22b7df)throw CliErrors[_0x57f4cd(0x1e1)](_0x57f4cd(0x1c8)+_0x5dbfbc+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x5dbfbc,'status':_0x22b7df,'errorMessage':typeof _0x68f825[_0x57f4cd(0x1de)]===_0x57f4cd(0x1d2)&&_0x68f825[_0x57f4cd(0x1de)][_0x57f4cd(0x1cf)]()?_0x68f825[_0x57f4cd(0x1de)][_0x57f4cd(0x1cf)]():null,'isTerminal':TERMINAL_STATUSES[_0x57f4cd(0x1d7)](_0x22b7df),'knownStatus':TERMINAL_STATUSES[_0x57f4cd(0x1d7)](_0x22b7df)||NON_TERMINAL_STATUSES[_0x57f4cd(0x1d7)](_0x22b7df)};}export function buildAsyncTaskStatusCommand(_0x59d531,_0x3f56cc){const _0x5cdd1e=a46_0x588c06;return CLI_BIN_NAME+_0x5cdd1e(0x1e3)+quoteShellArg(_0x59d531)+'\x20--appcode\x20'+quoteShellArg(_0x3f56cc)+'\x20--format\x20compress';}function a46_0x2c08(_0x35444c,_0x515598){_0x35444c=_0x35444c-0x1c4;const _0xa490bc=a46_0xa490();let _0x2c0830=_0xa490bc[_0x35444c];return _0x2c0830;}export function asyncTaskMessage(_0x4c0e94){const _0x4aba44=a46_0x588c06;switch(_0x4c0e94['status']){case _0x4aba44(0x1cc):return _0x4aba44(0x1d0)+_0x4c0e94[_0x4aba44(0x1d6)]+_0x4aba44(0x1ca);case _0x4aba44(0x1e2):return _0x4aba44(0x1d0)+_0x4c0e94[_0x4aba44(0x1d6)]+_0x4aba44(0x1d9);case _0x4aba44(0x1c6):return _0x4aba44(0x1d0)+_0x4c0e94[_0x4aba44(0x1d6)]+_0x4aba44(0x1c7);case _0x4aba44(0x1c4):return _0x4c0e94[_0x4aba44(0x1de)]?_0x4aba44(0x1d0)+_0x4c0e94[_0x4aba44(0x1d6)]+_0x4aba44(0x1cd)+_0x4c0e94[_0x4aba44(0x1de)]:_0x4aba44(0x1d0)+_0x4c0e94[_0x4aba44(0x1d6)]+_0x4aba44(0x1c5);default:return _0x4aba44(0x1d0)+_0x4c0e94[_0x4aba44(0x1d6)]+_0x4aba44(0x1d3)+_0x4c0e94[_0x4aba44(0x1df)]+'.';}}function quoteShellArg(_0x2516db){const _0x34d64a=a46_0x588c06;return'\x27'+_0x2516db[_0x34d64a(0x1d5)](/'/g,'\x27\x5c\x27\x27')+'\x27';}function a46_0xa490(){const _0x1579ce=['504CJlXZs','trim','Task\x20','9247WmvmSm','string','\x20returned\x20unknown\x20status\x20','251090yvkQMJ','replace','taskId','has','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20is\x20processing.','3642336XSzgev','350338sBQeYp','3128vtzFCY','290488WFohVt','errorMessage','status','763880Jljkun','apiError','PROCESSING','\x20task\x20status\x20--task-id\x20','toUpperCase','FAILED','\x20failed.','SUCCESS','\x20completed\x20successfully.','Async\x20task\x20','1708434wDRCdu','\x20is\x20pending.','40VkkyFY','PENDING','\x20failed:\x20'];a46_0xa490=function(){return _0x1579ce;};return a46_0xa490();}
@@ -1 +1 @@
1
- (function(_0x21bd75,_0x31e27d){var _0x16557b=a47_0x3769,_0x290668=_0x21bd75();while(!![]){try{var _0xd6e6c4=parseInt(_0x16557b(0x75))/0x1+-parseInt(_0x16557b(0x70))/0x2+parseInt(_0x16557b(0x6e))/0x3*(-parseInt(_0x16557b(0x6d))/0x4)+-parseInt(_0x16557b(0x6c))/0x5+parseInt(_0x16557b(0x6b))/0x6*(parseInt(_0x16557b(0x72))/0x7)+-parseInt(_0x16557b(0x6a))/0x8+parseInt(_0x16557b(0x73))/0x9;if(_0xd6e6c4===_0x31e27d)break;else _0x290668['push'](_0x290668['shift']());}catch(_0x4d1388){_0x290668['push'](_0x290668['shift']());}}}(a47_0x351e,0xeb3cc));export function asDryRunResult(_0x24068f,_0x28b326){var _0x33eb01=a47_0x3769;return Object[_0x33eb01(0x71)](_0x24068f,{'method':{'value':_0x28b326[_0x33eb01(0x6f)],'enumerable':![]},'url':{'value':_0x28b326['url'],'enumerable':![]},..._0x28b326[_0x33eb01(0x74)]?{'description':{'value':_0x28b326[_0x33eb01(0x74)],'enumerable':![]}}:{}});}function a47_0x3769(_0x5d2238,_0x6d36cf){_0x5d2238=_0x5d2238-0x6a;var _0x351e21=a47_0x351e();var _0x376903=_0x351e21[_0x5d2238];return _0x376903;}function a47_0x351e(){var _0x158530=['11709280yluEBQ','4686lrAmJw','737850lKobPP','8gJaWgh','419601smrmQX','method','1537882YfKqLR','defineProperties','15253fiMnTc','13720023NRfIsf','description','397191IijOeM'];a47_0x351e=function(){return _0x158530;};return a47_0x351e();}
1
+ (function(_0x40a387,_0x50aa13){var _0x23bb30=a47_0x6730,_0x92cc0a=_0x40a387();while(!![]){try{var _0x4ab211=-parseInt(_0x23bb30(0x80))/0x1*(parseInt(_0x23bb30(0x86))/0x2)+parseInt(_0x23bb30(0x83))/0x3+parseInt(_0x23bb30(0x85))/0x4+parseInt(_0x23bb30(0x84))/0x5*(-parseInt(_0x23bb30(0x82))/0x6)+-parseInt(_0x23bb30(0x79))/0x7*(-parseInt(_0x23bb30(0x7e))/0x8)+-parseInt(_0x23bb30(0x7b))/0x9+parseInt(_0x23bb30(0x81))/0xa;if(_0x4ab211===_0x50aa13)break;else _0x92cc0a['push'](_0x92cc0a['shift']());}catch(_0x3a8512){_0x92cc0a['push'](_0x92cc0a['shift']());}}}(a47_0x3b4e,0x5db82));function a47_0x3b4e(){var _0x278b36=['184lqGGgJ','method','1259BliKsn','1347250GSPjXX','37194sDOjcr','1148871Auzdzc','145iFHtIM','1521740lGsuMy','124mkPpOK','146237UoHwaX','defineProperties','6632163fuGjGd','description','url'];a47_0x3b4e=function(){return _0x278b36;};return a47_0x3b4e();}function a47_0x6730(_0x2968c3,_0x48e842){_0x2968c3=_0x2968c3-0x79;var _0x3b4eff=a47_0x3b4e();var _0x673081=_0x3b4eff[_0x2968c3];return _0x673081;}export function asDryRunResult(_0x4604f9,_0x488cbb){var _0x262429=a47_0x6730;return Object[_0x262429(0x7a)](_0x4604f9,{'method':{'value':_0x488cbb[_0x262429(0x7f)],'enumerable':![]},'url':{'value':_0x488cbb[_0x262429(0x7d)],'enumerable':![]},..._0x488cbb['description']?{'description':{'value':_0x488cbb[_0x262429(0x7c)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a48_0xeb05b=a48_0x5bec;(function(_0x28826b,_0x15dc6e){const _0x4a5c95=a48_0x5bec,_0x3ee409=_0x28826b();while(!![]){try{const _0x2eb060=-parseInt(_0x4a5c95(0x11b))/0x1*(parseInt(_0x4a5c95(0x123))/0x2)+-parseInt(_0x4a5c95(0x119))/0x3+-parseInt(_0x4a5c95(0x124))/0x4+-parseInt(_0x4a5c95(0x126))/0x5*(-parseInt(_0x4a5c95(0x116))/0x6)+-parseInt(_0x4a5c95(0x129))/0x7+parseInt(_0x4a5c95(0x12e))/0x8+-parseInt(_0x4a5c95(0x12a))/0x9*(-parseInt(_0x4a5c95(0x120))/0xa);if(_0x2eb060===_0x15dc6e)break;else _0x3ee409['push'](_0x3ee409['shift']());}catch(_0x116ac4){_0x3ee409['push'](_0x3ee409['shift']());}}}(a48_0x40eb,0x69522));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0xeb05b(0x125)};export const CODE_FLAG={'name':a48_0xeb05b(0x11e),'type':'string','required':!![],'description':a48_0xeb05b(0x11f),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0xeb05b(0x117),'description':a48_0xeb05b(0x11f)};function a48_0x40eb(){const _0x3e728f=['494142rjwKTh','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','13ameJbJ','number','appcode','code','Dataset\x20code\x20(32-char\x20hex\x20UUID)','670efSmXe','App\x20code\x20(e.g.\x20app-xxxxx)','sqlcode','114320iCZdSX','1810124vyUogJ','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','50535XazLgQ','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','string','5659297rodlLX','247617owFHyQ','MYSQL','POSTGRESQL','dbtype','1122336lLGZfk','366RHVmdY','datasetcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)'];a48_0x40eb=function(){return _0x3e728f;};return a48_0x40eb();}export const SQLCODE_FLAG={'name':a48_0xeb05b(0x122),'type':'string','required':!![],'description':a48_0xeb05b(0x118),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0xeb05b(0x127)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0xeb05b(0x11d),'type':a48_0xeb05b(0x128),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0xeb05b(0x121)};function a48_0x5bec(_0x161cde,_0x312fd4){_0x161cde=_0x161cde-0x116;const _0x40eb3b=a48_0x40eb();let _0x5bec90=_0x40eb3b[_0x161cde];return _0x5bec90;}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0xeb05b(0x11c),'required':!![],'description':a48_0xeb05b(0x11a)};export const DB_TYPE_FLAG={'name':a48_0xeb05b(0x12d),'type':a48_0xeb05b(0x128),'required':!![],'description':'Database\x20product\x20type','enum':[a48_0xeb05b(0x12b),a48_0xeb05b(0x12c)]};
1
+ const a48_0x606e01=a48_0x518d;(function(_0x1eb901,_0x1e858b){const _0x3c2e29=a48_0x518d,_0xa2a218=_0x1eb901();while(!![]){try{const _0x44bd1c=-parseInt(_0x3c2e29(0x109))/0x1+-parseInt(_0x3c2e29(0x115))/0x2+-parseInt(_0x3c2e29(0x10d))/0x3*(parseInt(_0x3c2e29(0x114))/0x4)+-parseInt(_0x3c2e29(0x10c))/0x5*(parseInt(_0x3c2e29(0x103))/0x6)+-parseInt(_0x3c2e29(0x104))/0x7+parseInt(_0x3c2e29(0x110))/0x8+-parseInt(_0x3c2e29(0x111))/0x9*(-parseInt(_0x3c2e29(0x112))/0xa);if(_0x44bd1c===_0x1e858b)break;else _0xa2a218['push'](_0xa2a218['shift']());}catch(_0x4925bd){_0xa2a218['push'](_0xa2a218['shift']());}}}(a48_0x36e3,0x6d2f8));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':a48_0x606e01(0x10f),'type':'string','required':!![],'description':a48_0x606e01(0xff),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x606e01(0x113),'description':a48_0x606e01(0xff)};export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0x606e01(0x105),'required':!![],'description':a48_0x606e01(0x108),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x606e01(0x100)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x606e01(0x102),'type':'string','required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x606e01(0x10a)};function a48_0x518d(_0x2771da,_0x1a5f06){_0x2771da=_0x2771da-0xff;const _0x36e38b=a48_0x36e3();let _0x518d01=_0x36e38b[_0x2771da];return _0x518d01;}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x606e01(0x10e),'required':!![],'description':a48_0x606e01(0x101)};export const DB_TYPE_FLAG={'name':a48_0x606e01(0x106),'type':'string','required':!![],'description':'Database\x20product\x20type','enum':[a48_0x606e01(0x107),a48_0x606e01(0x10b)]};function a48_0x36e3(){const _0x5542a3=['605372zZZTRd','1463794HVboJR','Dataset\x20code\x20(32-char\x20hex\x20UUID)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','appcode','1481334DLTPQL','791966rLsjIk','string','dbtype','MYSQL','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','714193sBCoLN','App\x20code\x20(e.g.\x20app-xxxxx)','POSTGRESQL','5JKuCrQ','3jyfRPe','number','code','5965032AYyPQs','4041ZAtSyO','36950eMMegf','datasetcode'];a48_0x36e3=function(){return _0x5542a3;};return a48_0x36e3();}
@@ -1 +1 @@
1
- (function(_0x363e30,_0x2b6253){const _0x1e260c=a49_0x30ce,_0x234a7d=_0x363e30();while(!![]){try{const _0x37b669=parseInt(_0x1e260c(0x14d))/0x1*(-parseInt(_0x1e260c(0x140))/0x2)+parseInt(_0x1e260c(0x144))/0x3*(-parseInt(_0x1e260c(0x143))/0x4)+-parseInt(_0x1e260c(0x145))/0x5+parseInt(_0x1e260c(0x14c))/0x6+-parseInt(_0x1e260c(0x149))/0x7+parseInt(_0x1e260c(0x14e))/0x8*(-parseInt(_0x1e260c(0x14b))/0x9)+parseInt(_0x1e260c(0x14a))/0xa;if(_0x37b669===_0x2b6253)break;else _0x234a7d['push'](_0x234a7d['shift']());}catch(_0x2e44a9){_0x234a7d['push'](_0x234a7d['shift']());}}}(a49_0x32aa,0x6583a));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x32aa(){const _0x432445=['\x20path\x20is\x20required.','1877820NgQalY','18888390HWVAOP','7059303bkyFVm','4794606ZixkUD','305825FSGGXd','8piSeHY','isFile','4aKPljA','size','validation','352NxjSJs','7137iosNKH','1992545KOeIlL','ceil','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20'];a49_0x32aa=function(){return _0x432445;};return a49_0x32aa();}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a49_0x30ce(_0x95b5b1,_0xd23fac){_0x95b5b1=_0x95b5b1-0x13f;const _0x32aa2b=a49_0x32aa();let _0x30ce88=_0x32aa2b[_0x95b5b1];return _0x30ce88;}function formatBytes(_0x64f006){const _0x24a482=a49_0x30ce;if(_0x64f006>=BYTES_PER_MB){const _0x2e1e7a=Math[_0x24a482(0x146)](_0x64f006/BYTES_PER_MB*0x64)/0x64;return _0x2e1e7a['toFixed'](0x2)+'\x20MB';}return _0x64f006+'\x20B';}export function requireDevelopmentUploadFile(_0x573d59,_0xfc8585){const _0x36c7e2=a49_0x30ce,_0x2e236c=_0x573d59['trim']();if(!_0x2e236c)throw CliErrors[_0x36c7e2(0x142)](_0xfc8585+_0x36c7e2(0x148));if(!existsSync(_0x2e236c))throw CliErrors[_0x36c7e2(0x142)]('File\x20not\x20found:\x20'+_0x2e236c);const _0x4cd1f9=statSync(_0x2e236c);if(!_0x4cd1f9[_0x36c7e2(0x13f)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2e236c);if(_0x4cd1f9['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x36c7e2(0x147)+_0x2e236c+'\x20('+formatBytes(_0x4cd1f9[_0x36c7e2(0x141)])+')');return{'path':_0x2e236c,'size':_0x4cd1f9[_0x36c7e2(0x141)]};}
1
+ (function(_0x2b24e9,_0x5bce79){const _0x3ddd9c=a49_0x2ecc,_0x5cb9ba=_0x2b24e9();while(!![]){try{const _0x1983b0=parseInt(_0x3ddd9c(0x12c))/0x1*(parseInt(_0x3ddd9c(0x136))/0x2)+parseInt(_0x3ddd9c(0x130))/0x3*(parseInt(_0x3ddd9c(0x12f))/0x4)+-parseInt(_0x3ddd9c(0x13d))/0x5*(parseInt(_0x3ddd9c(0x138))/0x6)+-parseInt(_0x3ddd9c(0x13a))/0x7+-parseInt(_0x3ddd9c(0x12e))/0x8+parseInt(_0x3ddd9c(0x12d))/0x9*(-parseInt(_0x3ddd9c(0x137))/0xa)+parseInt(_0x3ddd9c(0x13c))/0xb;if(_0x1983b0===_0x5bce79)break;else _0x5cb9ba['push'](_0x5cb9ba['shift']());}catch(_0x28c47b){_0x5cb9ba['push'](_0x5cb9ba['shift']());}}}(a49_0x5933,0x6d26d));import{existsSync,statSync}from'node:fs';function a49_0x5933(){const _0x491d4d=['ceil','20726321kIQQiU','5595TaIKqS','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','toFixed','1DlpKXD','2517642DITvmc','4242360WKSGkX','7068oemToN','111KpYJxk','File\x20not\x20found:\x20','validation','trim','isFile','size','133814oKfCQF','20DGavUL','96bQqSDz','\x20path\x20is\x20required.','3232159xBxUWI'];a49_0x5933=function(){return _0x491d4d;};return a49_0x5933();}function a49_0x2ecc(_0x6f291a,_0x27802e){_0x6f291a=_0x6f291a-0x12c;const _0x5933c9=a49_0x5933();let _0x2ecc38=_0x5933c9[_0x6f291a];return _0x2ecc38;}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x4a42f0){const _0x405fb9=a49_0x2ecc;if(_0x4a42f0>=BYTES_PER_MB){const _0x1e3a9c=Math[_0x405fb9(0x13b)](_0x4a42f0/BYTES_PER_MB*0x64)/0x64;return _0x1e3a9c[_0x405fb9(0x13f)](0x2)+'\x20MB';}return _0x4a42f0+'\x20B';}export function requireDevelopmentUploadFile(_0x10de01,_0x5ed911){const _0x253850=a49_0x2ecc,_0x10f5bb=_0x10de01[_0x253850(0x133)]();if(!_0x10f5bb)throw CliErrors[_0x253850(0x132)](_0x5ed911+_0x253850(0x139));if(!existsSync(_0x10f5bb))throw CliErrors[_0x253850(0x132)](_0x253850(0x131)+_0x10f5bb);const _0x4f5332=statSync(_0x10f5bb);if(!_0x4f5332[_0x253850(0x134)]())throw CliErrors[_0x253850(0x132)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x10f5bb);if(_0x4f5332[_0x253850(0x135)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x253850(0x132)](_0x253850(0x13e)+_0x10f5bb+'\x20('+formatBytes(_0x4f5332[_0x253850(0x135)])+')');return{'path':_0x10f5bb,'size':_0x4f5332[_0x253850(0x135)]};}
@@ -1 +1 @@
1
- (function(_0x418afa,_0xe57105){const _0x4249af=a50_0x119c,_0xac7790=_0x418afa();while(!![]){try{const _0x53ba0b=-parseInt(_0x4249af(0x17a))/0x1+parseInt(_0x4249af(0x17b))/0x2*(-parseInt(_0x4249af(0x176))/0x3)+parseInt(_0x4249af(0x172))/0x4+parseInt(_0x4249af(0x173))/0x5+-parseInt(_0x4249af(0x16f))/0x6+-parseInt(_0x4249af(0x17c))/0x7*(-parseInt(_0x4249af(0x175))/0x8)+-parseInt(_0x4249af(0x16d))/0x9*(-parseInt(_0x4249af(0x16e))/0xa);if(_0x53ba0b===_0xe57105)break;else _0xac7790['push'](_0xac7790['shift']());}catch(_0x1de99f){_0xac7790['push'](_0xac7790['shift']());}}}(a50_0x4931,0xb2c86));function a50_0x119c(_0x58e6a3,_0x3b49e2){_0x58e6a3=_0x58e6a3-0x16d;const _0x493174=a50_0x4931();let _0x119ce0=_0x493174[_0x58e6a3];return _0x119ce0;}function a50_0x4931(){const _0x1bfb9c=['6980142zyEoHi','trim','App\x20Code\x20cannot\x20be\x20empty','2131036DAwIso','7055580ErvwVI','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1760744GYUYLo','310533HadoMJ','test','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','length','880792NzyWqN','16CzYmhZ','35YrFjIa','5041719VGDwnL','10SIpZgj'];a50_0x4931=function(){return _0x1bfb9c;};return a50_0x4931();}export function validateAppcode(_0x4d8005){const _0x329fcc=a50_0x119c,_0x358c66=_0x4d8005[_0x329fcc(0x170)]();if(!_0x358c66)return{'valid':![],'message':_0x329fcc(0x171)};if(_0x358c66[_0x329fcc(0x179)]>0x64)return{'valid':![],'message':_0x329fcc(0x174)};if(!/^[A-Za-z0-9_-]+$/[_0x329fcc(0x177)](_0x358c66))return{'valid':![],'message':_0x329fcc(0x178)};return{'valid':!![]};}
1
+ (function(_0x3a7284,_0x3a3783){const _0x26254e=a50_0xfcaf,_0x4bc521=_0x3a7284();while(!![]){try{const _0x1edce9=-parseInt(_0x26254e(0x14b))/0x1*(-parseInt(_0x26254e(0x148))/0x2)+-parseInt(_0x26254e(0x14c))/0x3+parseInt(_0x26254e(0x145))/0x4+-parseInt(_0x26254e(0x14d))/0x5*(parseInt(_0x26254e(0x14a))/0x6)+-parseInt(_0x26254e(0x149))/0x7*(-parseInt(_0x26254e(0x147))/0x8)+-parseInt(_0x26254e(0x150))/0x9+-parseInt(_0x26254e(0x143))/0xa*(-parseInt(_0x26254e(0x14e))/0xb);if(_0x1edce9===_0x3a3783)break;else _0x4bc521['push'](_0x4bc521['shift']());}catch(_0x3a5a76){_0x4bc521['push'](_0x4bc521['shift']());}}}(a50_0x4733,0xc18a8));export function validateAppcode(_0x484716){const _0x31194c=a50_0xfcaf,_0x308855=_0x484716['trim']();if(!_0x308855)return{'valid':![],'message':_0x31194c(0x146)};if(_0x308855[_0x31194c(0x151)]>0x64)return{'valid':![],'message':_0x31194c(0x14f)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x308855))return{'valid':![],'message':_0x31194c(0x144)};return{'valid':!![]};}function a50_0xfcaf(_0xdbf2a9,_0xfefc4b){_0xdbf2a9=_0xdbf2a9-0x143;const _0x4733a5=a50_0x4733();let _0xfcaf9e=_0x4733a5[_0xdbf2a9];return _0xfcaf9e;}function a50_0x4733(){const _0x3ae810=['11452NaDruh','77MtgDwZ','6YIaPkh','235bxObZV','2317203TZcygC','7753245YNnNnX','28309226oVHLHG','App\x20Code\x20cannot\x20exceed\x20100\x20characters','13511943sHrfDR','length','10hrYzsw','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','1641664UnzWPG','App\x20Code\x20cannot\x20be\x20empty','209112pjYdLg'];a50_0x4733=function(){return _0x3ae810;};return a50_0x4733();}
@@ -1 +1 @@
1
- function a51_0x1521(_0x4a3d7a,_0x4d0b14){_0x4a3d7a=_0x4a3d7a-0x1a5;const _0x25301f=a51_0x2530();let _0x15211b=_0x25301f[_0x4a3d7a];return _0x15211b;}const a51_0x56b537=a51_0x1521;(function(_0x56d5de,_0x5eef1f){const _0x12e029=a51_0x1521,_0x30ba62=_0x56d5de();while(!![]){try{const _0x2d966a=-parseInt(_0x12e029(0x1a8))/0x1+parseInt(_0x12e029(0x1b5))/0x2*(-parseInt(_0x12e029(0x1ac))/0x3)+-parseInt(_0x12e029(0x1b7))/0x4+-parseInt(_0x12e029(0x1a6))/0x5*(-parseInt(_0x12e029(0x1b6))/0x6)+-parseInt(_0x12e029(0x1b3))/0x7*(parseInt(_0x12e029(0x1b2))/0x8)+-parseInt(_0x12e029(0x1a5))/0x9+parseInt(_0x12e029(0x1ae))/0xa;if(_0x2d966a===_0x5eef1f)break;else _0x30ba62['push'](_0x30ba62['shift']());}catch(_0x3fd375){_0x30ba62['push'](_0x30ba62['shift']());}}}(a51_0x2530,0x68c0c));function a51_0x2530(){const _0x1e61d1=['validation','Get\x20a\x20config\x20value\x20by\x20key','key','110391jramaW','Missing\x20key.','17511300IlwSPw','read','str','string','395320OzzVWI','21bOGAmK','config','46qHdrHZ','3504936nRhtzS','2107828tZNSON','Usage:\x20','app','2330802qqxKBa','5grGxkL','object','125707yjXYnq'];a51_0x2530=function(){return _0x1e61d1;};return a51_0x2530();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x475db9){const _0x1ab191=a51_0x1521,_0x40b2b8=_0x475db9[_0x1ab191(0x1b0)](_0x1ab191(0x1ab));if(!_0x40b2b8)throw CliErrors[_0x1ab191(0x1a9)](_0x1ab191(0x1ad),_0x1ab191(0x1b8)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x9a72b4=readConfig(),_0x3a2233=_0x40b2b8===_0x1ab191(0x1b9)?'appcode':_0x40b2b8,_0x1c37f8=_0x9a72b4[_0x3a2233];if(_0x1c37f8===undefined)throw CliErrors[_0x1ab191(0x1a9)]('Key\x20not\x20found:\x20'+_0x40b2b8);return{'ok':!![],'data':typeof _0x1c37f8===_0x1ab191(0x1a7)?_0x1c37f8:{[_0x3a2233]:_0x1c37f8},'message':typeof _0x1c37f8===_0x1ab191(0x1a7)?undefined:String(_0x1c37f8)};}export const configGetDefinition={'service':a51_0x56b537(0x1b4),'command':'get','description':a51_0x56b537(0x1aa),'risk':a51_0x56b537(0x1af),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0x56b537(0x1b1),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ function a51_0x32c8(_0x29ca2c,_0x1de584){_0x29ca2c=_0x29ca2c-0x132;const _0x29a79c=a51_0x29a7();let _0x32c8d8=_0x29a79c[_0x29ca2c];return _0x32c8d8;}const a51_0x51003d=a51_0x32c8;(function(_0x17413f,_0x788fca){const _0x3d57eb=a51_0x32c8,_0x58a146=_0x17413f();while(!![]){try{const _0x418262=-parseInt(_0x3d57eb(0x144))/0x1*(-parseInt(_0x3d57eb(0x138))/0x2)+-parseInt(_0x3d57eb(0x13b))/0x3+parseInt(_0x3d57eb(0x13d))/0x4+parseInt(_0x3d57eb(0x140))/0x5*(parseInt(_0x3d57eb(0x13c))/0x6)+parseInt(_0x3d57eb(0x145))/0x7+parseInt(_0x3d57eb(0x141))/0x8+-parseInt(_0x3d57eb(0x134))/0x9*(parseInt(_0x3d57eb(0x132))/0xa);if(_0x418262===_0x788fca)break;else _0x58a146['push'](_0x58a146['shift']());}catch(_0x11b605){_0x58a146['push'](_0x58a146['shift']());}}}(a51_0x29a7,0x33a1a));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a51_0x29a7(){const _0x502c89=['449113PxFVVn','str','22490aJljdM','config','3474Lovbuj','Missing\x20key.','read','string','816622hlueoO','Key\x20not\x20found:\x20','key','157017bXWUlD','97176RGtFrY','864772MNddhh','Get\x20a\x20config\x20value\x20by\x20key','Usage:\x20','10kBYRHb','3287040AhEbSm','validation','get','1rIWwpl'];a51_0x29a7=function(){return _0x502c89;};return a51_0x29a7();}async function execute(_0x2b76f2){const _0x241dd8=a51_0x32c8,_0x4d5711=_0x2b76f2[_0x241dd8(0x146)](_0x241dd8(0x13a));if(!_0x4d5711)throw CliErrors[_0x241dd8(0x142)](_0x241dd8(0x135),_0x241dd8(0x13f)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x26e3f4=readConfig(),_0x119925=_0x4d5711==='app'?'appcode':_0x4d5711,_0x1a0a19=_0x26e3f4[_0x119925];if(_0x1a0a19===undefined)throw CliErrors[_0x241dd8(0x142)](_0x241dd8(0x139)+_0x4d5711);return{'ok':!![],'data':typeof _0x1a0a19==='object'?_0x1a0a19:{[_0x119925]:_0x1a0a19},'message':typeof _0x1a0a19==='object'?undefined:String(_0x1a0a19)};}export const configGetDefinition={'service':a51_0x51003d(0x133),'command':a51_0x51003d(0x143),'description':a51_0x51003d(0x13e),'risk':a51_0x51003d(0x136),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x51003d(0x13a),'type':a51_0x51003d(0x137),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};