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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x1c591d=a36_0x291e;(function(_0x60e5c8,_0xdd6c7b){const _0x10b341=a36_0x291e,_0xdeec0a=_0x60e5c8();while(!![]){try{const _0x19f182=-parseInt(_0x10b341(0x106))/0x1*(parseInt(_0x10b341(0x113))/0x2)+parseInt(_0x10b341(0x10d))/0x3*(-parseInt(_0x10b341(0xfb))/0x4)+parseInt(_0x10b341(0x11e))/0x5*(parseInt(_0x10b341(0x140))/0x6)+-parseInt(_0x10b341(0x10f))/0x7+parseInt(_0x10b341(0xff))/0x8*(parseInt(_0x10b341(0x12f))/0x9)+-parseInt(_0x10b341(0x117))/0xa*(parseInt(_0x10b341(0xf7))/0xb)+parseInt(_0x10b341(0x111))/0xc*(parseInt(_0x10b341(0x123))/0xd);if(_0x19f182===_0xdd6c7b)break;else _0xdeec0a['push'](_0xdeec0a['shift']());}catch(_0x2d3fc0){_0xdeec0a['push'](_0xdeec0a['shift']());}}}(a36_0x3294,0xf1b44));import{createInterface}from'node:readline';function a36_0x3294(){const _0x494395=['&type=','str','would_pull','scriptContent','toISOString','skipped','scriptType','all','yes','functions','459EgwPMA','map','bool','\x20skipped,\x20','includes','apiDir','appCode','string','write','No\x20remote\x20BFF\x20scripts\x20found.','filePath','stringify','lockKey','functionNode','close','COMMON','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','631656EJUOGj','/api/management/library/scripts/list?appCode=','hookLocation','Pull\x20complete:\x20','121mDgqIZ','length','HOOK','Would\x20inspect\x20','14788slvugh','Pull\x20only\x20this\x20script\x20type','operationType','local\x20unsynced\x20changes','55864qVjpQr','stderr','alias','utf8','Remote\x20script\x20missing\x20id.','question','lockFilePath','10YsUbxu','Remote\x20script\x20missing\x20content.','datasetCode','stdin','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','push','trim','1473gVWuJa','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','7711879HStkVg','parse','1896NGOOSa','validation','258690StbgnM','unresolvable\x20target\x20path','cancelled','functionName','1544870xRHGbN','\x20pulled,\x20','pull','\x22\x20not\x20found\x20after\x20ensureLockScope.','message','force','apps','5uqrIhJ','nonInteractive','conflict','version','hash','529737DveSQT','type'];a36_0x3294=function(){return _0x494395;};return a36_0x3294();}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';function a36_0x291e(_0x5c610c,_0x5b16c7){_0x5c610c=_0x5c610c-0xf6;const _0x329434=a36_0x3294();let _0x291e68=_0x329434[_0x5c610c];return _0x291e68;}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':'bff','command':a36_0x1c591d(0x119),'description':a36_0x1c591d(0x10a),'risk':a36_0x1c591d(0x137),'flags':[{'name':a36_0x1c591d(0x124),'type':a36_0x1c591d(0x136),'description':a36_0x1c591d(0xfc),'enum':[a36_0x1c591d(0x13e),'ENDPOINT','HOOK']},{'name':a36_0x1c591d(0x11c),'type':'boolean','description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x4cdf77){const _0x2aee74=a36_0x1c591d,_0x1c9a24=loadBffProjectConfig(_0x4cdf77[_0x2aee74(0x135)]),_0x1566c2=await readBffLockFile(_0x1c9a24[_0x2aee74(0x105)]),{appLock:_0x587b12}=ensureLockScope(_0x1566c2??createEmptyBffLock(),_0x4cdf77[_0x2aee74(0x135)],_0x1c9a24['scriptsRoot'],_0x2aee74(0x119)),_0x42dc8c=normalizeBffType(_0x4cdf77[_0x2aee74(0x126)]('type'))??undefined,_0x39af67=buildDatasetCodeToAliasMap(_0x4cdf77[_0x2aee74(0x134)],_0x4cdf77[_0x2aee74(0x135)]),[_0xb9d0de,_0xf1e77c]=await Promise[_0x2aee74(0x12c)]([listBffScripts(_0x4cdf77[_0x2aee74(0x135)],_0x42dc8c),getBffScriptStatistics(_0x4cdf77[_0x2aee74(0x135)])]),_0x59d8fa=createHookLocationMap(_0xf1e77c),_0xb57062=[];for(const _0x3515c6 of _0xb9d0de){const _0x5d4f63=resolveRemoteScriptTarget(_0x1c9a24,_0x3515c6,_0x59d8fa,_0x587b12['functions'],_0x39af67);if(!_0x5d4f63){_0xb57062[_0x2aee74(0x10b)]({'scriptType':_0x3515c6[_0x2aee74(0x12b)],'functionName':_0x3515c6[_0x2aee74(0x116)]??'','status':_0x2aee74(0x12a),'reason':_0x2aee74(0x114)});continue;}const _0x4d75e3=_0x587b12[_0x2aee74(0x12e)][_0x5d4f63['lockKey']],_0x30d31a=_0x3515c6[_0x2aee74(0x128)]!=null?computeContentHash(_0x3515c6[_0x2aee74(0x128)]):undefined,_0x314259=await hasUnsyncedLocalChanges(_0x5d4f63[_0x2aee74(0x139)],_0x4d75e3,_0x30d31a);_0xb57062['push']({'lockKey':_0x5d4f63['lockKey'],'filePath':_0x5d4f63[_0x2aee74(0x139)],'remoteId':_0x3515c6['id']??null,'status':_0x314259?_0x2aee74(0x120):_0x2aee74(0x127)});}return{'method':'GET','url':_0x2aee74(0x141)+_0x4cdf77['appCode']+(_0x42dc8c?_0x2aee74(0x125)+_0x42dc8c:''),'body':{'appCode':_0x4cdf77[_0x2aee74(0x135)],'filterType':_0x42dc8c??null,'files':_0xb57062},'description':_0x2aee74(0xfa)+_0xb57062[_0x2aee74(0xf8)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x3f61aa){const _0x2b6a62=a36_0x1c591d,_0x2a4e2a=loadBffProjectConfig(_0x3f61aa[_0x2b6a62(0x135)]),_0x4f04dd=await readBffLockFile(_0x2a4e2a[_0x2b6a62(0x105)]),{lockData:_0x517a7b,appLock:_0x3696a6}=ensureLockScope(_0x4f04dd??createEmptyBffLock(),_0x3f61aa[_0x2b6a62(0x135)],_0x2a4e2a['scriptsRoot'],'pull'),_0x468132=normalizeBffType(_0x3f61aa['str'](_0x2b6a62(0x124)))??undefined;if(_0x3f61aa[_0x2b6a62(0x126)](_0x2b6a62(0x124))&&!_0x468132)throw CliErrors[_0x2b6a62(0x112)](_0x2b6a62(0x10e));const [_0x5a3ded,_0x5db5c3]=await Promise[_0x2b6a62(0x12c)]([listBffScripts(_0x3f61aa[_0x2b6a62(0x135)],_0x468132),getBffScriptStatistics(_0x3f61aa[_0x2b6a62(0x135)])]);if(_0x5a3ded['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x2b6a62(0x138)};const _0x5ef41a=_0x3f61aa[_0x2b6a62(0x131)](_0x2b6a62(0x11c));if(_0x5ef41a&&!_0x3f61aa[_0x2b6a62(0x11f)]){const _0x31a9a2=await confirmForce();if(!_0x31a9a2)throw CliErrors[_0x2b6a62(0x115)]('Force\x20pull\x20cancelled.');}if(_0x5ef41a&&_0x3f61aa[_0x2b6a62(0x11f)]){}const _0xf0caf2=buildDatasetCodeToAliasMap(_0x3f61aa['apiDir'],_0x3f61aa[_0x2b6a62(0x135)]),_0x3067ed=createHookLocationMap(_0x5db5c3),_0x40f5e8=JSON[_0x2b6a62(0x110)](JSON[_0x2b6a62(0x13a)](_0x517a7b)),_0xbf95f1=_0x3f61aa[_0x2b6a62(0x135)],_0x11e9f8=_0x40f5e8[_0x2b6a62(0x11d)][_0xbf95f1];if(!_0x11e9f8)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0xbf95f1+_0x2b6a62(0x11a));const _0x144ca9=[],_0x47572c=[],_0x35efea=[];for(const _0x37c0f1 of _0x5a3ded){const _0x29a6ad=resolveRemoteScriptTarget(_0x2a4e2a,_0x37c0f1,_0x3067ed,_0x3696a6[_0x2b6a62(0x12e)],_0xf0caf2);if(!_0x29a6ad){_0x47572c[_0x2b6a62(0x10b)]({'lockKey':_0x37c0f1['scriptType']+'/'+_0x37c0f1[_0x2b6a62(0x116)],'reason':_0x2b6a62(0x114)});continue;}const _0x3e9719=_0x3696a6[_0x2b6a62(0x12e)][_0x29a6ad[_0x2b6a62(0x13b)]];try{if(!_0x37c0f1['id'])throw new Error(_0x2b6a62(0x103));if(_0x37c0f1[_0x2b6a62(0x128)]==null)throw new Error(_0x2b6a62(0x107));const _0x16d705=_0x37c0f1[_0x2b6a62(0x128)],_0x4ac032=computeContentHash(_0x16d705);if(!_0x5ef41a){const _0x29a1d5=await hasUnsyncedLocalChanges(_0x29a6ad[_0x2b6a62(0x139)],_0x3e9719,_0x4ac032);if(_0x29a1d5){_0x47572c[_0x2b6a62(0x10b)]({'lockKey':_0x29a6ad[_0x2b6a62(0x13b)],'reason':_0x2b6a62(0xfe)});continue;}}await ensureParentDirectory(_0x29a6ad[_0x2b6a62(0x139)]),await writeFile(_0x29a6ad[_0x2b6a62(0x139)],_0x16d705,_0x2b6a62(0x102));const _0x101725={'hash':_0x4ac032,'remoteId':_0x37c0f1['id'],'version':_0x37c0f1[_0x2b6a62(0x121)]};_0x29a6ad[_0x2b6a62(0x124)]===_0x2b6a62(0xf9)&&_0x29a6ad[_0x2b6a62(0x142)]&&(_0x101725[_0x2b6a62(0x101)]=_0x29a6ad[_0x2b6a62(0x142)][_0x2b6a62(0x101)],_0x101725['datasetCode']=_0x29a6ad[_0x2b6a62(0x142)][_0x2b6a62(0x108)],_0x101725['operationType']=_0x29a6ad[_0x2b6a62(0x142)][_0x2b6a62(0xfd)],_0x101725[_0x2b6a62(0x13c)]=_0x29a6ad[_0x2b6a62(0x142)][_0x2b6a62(0x13c)]),_0x11e9f8['functions'][_0x29a6ad['lockKey']]=_0x101725,_0x144ca9[_0x2b6a62(0x10b)]({'lockKey':_0x29a6ad[_0x2b6a62(0x13b)],'remoteId':_0x37c0f1['id']});}catch(_0xd85ed4){_0x35efea[_0x2b6a62(0x10b)]({'lockKey':_0x29a6ad[_0x2b6a62(0x13b)],'error':_0xd85ed4 instanceof Error?_0xd85ed4[_0x2b6a62(0x11b)]:String(_0xd85ed4)});}}return _0x11e9f8['lastSync']=new Date()[_0x2b6a62(0x129)](),await writeBffLockFile(_0x2a4e2a[_0x2b6a62(0x105)],_0x40f5e8),{'ok':_0x35efea[_0x2b6a62(0xf8)]===0x0,'data':{'pulled':_0x144ca9,'skipped':_0x47572c,'failed':_0x35efea},'message':_0x2b6a62(0xf6)+_0x144ca9[_0x2b6a62(0xf8)]+_0x2b6a62(0x118)+_0x47572c[_0x2b6a62(0xf8)]+_0x2b6a62(0x132)+_0x35efea[_0x2b6a62(0xf8)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x1bef76,_0x5b0468,_0x23f1bf){const _0x37895d=a36_0x1c591d;if(!await fileExists(_0x1bef76))return![];const _0x2465f6=await computeFileHash(_0x1bef76);if(!_0x5b0468)return _0x23f1bf?_0x2465f6!==_0x23f1bf:!![];return _0x2465f6!==_0x5b0468[_0x37895d(0x122)];}function buildDatasetCodeToAliasMap(_0x2b5efe,_0x808d17){const _0x177227=a36_0x1c591d,_0x2f588c=loadAliasMap(_0x2b5efe,undefined,resolveApiFilePath(_0x2b5efe,_0x808d17));return new Map(_0x2f588c[_0x177227(0x130)](_0x4166b4=>[_0x4166b4['datasetCode'],_0x4166b4[_0x177227(0x101)]]));}async function confirmForce(){const _0x2b578f=a36_0x1c591d,_0x27057b=createInterface({'input':process[_0x2b578f(0x109)],'output':process[_0x2b578f(0x100)]}),_0x3d6d9a=await new Promise(_0x17845a=>{const _0x1dbb17=_0x2b578f;_0x27057b[_0x1dbb17(0x104)](_0x1dbb17(0x13f),_0x17845a);});return _0x27057b[_0x2b578f(0x13d)](),['y',_0x2b578f(0x12d)][_0x2b578f(0x133)](_0x3d6d9a[_0x2b578f(0x10c)]()['toLowerCase']());}
1
+ const a36_0x6701a0=a36_0x2f9c;(function(_0x3e9e2f,_0x568654){const _0x44707e=a36_0x2f9c,_0x53203d=_0x3e9e2f();while(!![]){try{const _0x3590cd=parseInt(_0x44707e(0x136))/0x1+parseInt(_0x44707e(0x12e))/0x2+-parseInt(_0x44707e(0x139))/0x3*(-parseInt(_0x44707e(0x11f))/0x4)+-parseInt(_0x44707e(0x114))/0x5+parseInt(_0x44707e(0x147))/0x6+parseInt(_0x44707e(0x121))/0x7*(parseInt(_0x44707e(0x13f))/0x8)+-parseInt(_0x44707e(0x142))/0x9*(parseInt(_0x44707e(0x134))/0xa);if(_0x3590cd===_0x568654)break;else _0x53203d['push'](_0x53203d['shift']());}catch(_0xbf3b0a){_0x53203d['push'](_0x53203d['shift']());}}}(a36_0x12de,0x9b94b));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a36_0x12de(){const _0xbd3b15=['3658110KNzJRz','ENDPOINT','No\x20remote\x20BFF\x20scripts\x20found.','skipped','local\x20unsynced\x20changes','question','all','COMMON','/api/management/library/scripts/list?appCode=','map','\x20skipped,\x20','111968gOnXTi','string','4375nRyUUm','&type=','\x22\x20not\x20found\x20after\x20ensureLockScope.','functions','trim','would_pull','push','Pull\x20only\x20this\x20script\x20type','message','conflict','unresolvable\x20target\x20path','scriptsRoot','yes','2046494CayQAD','Force\x20overwrite\x20local\x20unsynced\x20changes','hookLocation','bff','Lock\x20scope\x20for\x20app\x20\x22','\x20remote\x20BFF\x20script(s)\x20for\x20pull','10qQZRmc','lockKey','524624VUCxMO','force','datasetCode','39GuVfZK','operationType','Remote\x20script\x20missing\x20content.','toISOString','stdin','close','10136wXarPI','bool','Force\x20pull\x20cancelled.','14923179ruYCXp','alias','toLowerCase','HOOK','functionName','1940220DTTWuW','filePath','stringify','Would\x20inspect\x20','lastSync','stderr','apps','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','\x20pulled,\x20','scriptType','str','nonInteractive','length','boolean','appCode','functionNode','apiDir','validation','write','scriptContent','type','pull','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','Pull\x20complete:\x20','lockFilePath','cancelled'];a36_0x12de=function(){return _0xbd3b15;};return a36_0x12de();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x6701a0(0x131),'command':'pull','description':a36_0x6701a0(0x110),'risk':a36_0x6701a0(0x10c),'flags':[{'name':a36_0x6701a0(0x10e),'type':a36_0x6701a0(0x120),'description':a36_0x6701a0(0x128),'enum':[a36_0x6701a0(0x11b),a36_0x6701a0(0x115),'HOOK']},{'name':a36_0x6701a0(0x137),'type':a36_0x6701a0(0x154),'description':a36_0x6701a0(0x12f)}],async 'dryRun'(_0x51fd07){const _0x3bfae3=a36_0x6701a0,_0x18cf41=loadBffProjectConfig(_0x51fd07[_0x3bfae3(0x155)]),_0x304686=await readBffLockFile(_0x18cf41[_0x3bfae3(0x112)]),{appLock:_0x4d00d8}=ensureLockScope(_0x304686??createEmptyBffLock(),_0x51fd07[_0x3bfae3(0x155)],_0x18cf41[_0x3bfae3(0x12c)],_0x3bfae3(0x10f)),_0x34a531=normalizeBffType(_0x51fd07['str']('type'))??undefined,_0x22cc5e=buildDatasetCodeToAliasMap(_0x51fd07[_0x3bfae3(0x10a)],_0x51fd07[_0x3bfae3(0x155)]),[_0x1ea9f8,_0x2822ab]=await Promise[_0x3bfae3(0x11a)]([listBffScripts(_0x51fd07[_0x3bfae3(0x155)],_0x34a531),getBffScriptStatistics(_0x51fd07[_0x3bfae3(0x155)])]),_0x1f003f=createHookLocationMap(_0x2822ab),_0x4d9703=[];for(const _0x132532 of _0x1ea9f8){const _0x53e652=resolveRemoteScriptTarget(_0x18cf41,_0x132532,_0x1f003f,_0x4d00d8[_0x3bfae3(0x124)],_0x22cc5e);if(!_0x53e652){_0x4d9703[_0x3bfae3(0x127)]({'scriptType':_0x132532['scriptType'],'functionName':_0x132532[_0x3bfae3(0x146)]??'','status':_0x3bfae3(0x117),'reason':_0x3bfae3(0x12b)});continue;}const _0x4c6fe6=_0x4d00d8[_0x3bfae3(0x124)][_0x53e652[_0x3bfae3(0x135)]],_0x4b444c=_0x132532['scriptContent']!=null?computeContentHash(_0x132532['scriptContent']):undefined,_0x19f66e=await hasUnsyncedLocalChanges(_0x53e652[_0x3bfae3(0x148)],_0x4c6fe6,_0x4b444c);_0x4d9703['push']({'lockKey':_0x53e652['lockKey'],'filePath':_0x53e652['filePath'],'remoteId':_0x132532['id']??null,'status':_0x19f66e?_0x3bfae3(0x12a):_0x3bfae3(0x126)});}return{'method':'GET','url':_0x3bfae3(0x11c)+_0x51fd07[_0x3bfae3(0x155)]+(_0x34a531?_0x3bfae3(0x122)+_0x34a531:''),'body':{'appCode':_0x51fd07[_0x3bfae3(0x155)],'filterType':_0x34a531??null,'files':_0x4d9703},'description':_0x3bfae3(0x14a)+_0x4d9703[_0x3bfae3(0x153)]+_0x3bfae3(0x133)};},async 'execute'(_0x1dd004){const _0x38def5=a36_0x6701a0,_0x220b0d=loadBffProjectConfig(_0x1dd004[_0x38def5(0x155)]),_0x1f6a60=await readBffLockFile(_0x220b0d['lockFilePath']),{lockData:_0x272df8,appLock:_0x574b81}=ensureLockScope(_0x1f6a60??createEmptyBffLock(),_0x1dd004[_0x38def5(0x155)],_0x220b0d[_0x38def5(0x12c)],_0x38def5(0x10f)),_0x55fba6=normalizeBffType(_0x1dd004[_0x38def5(0x151)](_0x38def5(0x10e)))??undefined;if(_0x1dd004['str']('type')&&!_0x55fba6)throw CliErrors[_0x38def5(0x10b)]('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x359762,_0x180cf2]=await Promise[_0x38def5(0x11a)]([listBffScripts(_0x1dd004[_0x38def5(0x155)],_0x55fba6),getBffScriptStatistics(_0x1dd004[_0x38def5(0x155)])]);if(_0x359762[_0x38def5(0x153)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x38def5(0x116)};const _0x41b2f5=_0x1dd004[_0x38def5(0x140)](_0x38def5(0x137));if(_0x41b2f5&&!_0x1dd004[_0x38def5(0x152)]){const _0x3c558c=await confirmForce();if(!_0x3c558c)throw CliErrors[_0x38def5(0x113)](_0x38def5(0x141));}if(_0x41b2f5&&_0x1dd004[_0x38def5(0x152)]){}const _0x164482=buildDatasetCodeToAliasMap(_0x1dd004[_0x38def5(0x10a)],_0x1dd004[_0x38def5(0x155)]),_0x244f93=createHookLocationMap(_0x180cf2),_0x3aa867=JSON['parse'](JSON[_0x38def5(0x149)](_0x272df8)),_0xc54cc4=_0x1dd004[_0x38def5(0x155)],_0x5107a2=_0x3aa867[_0x38def5(0x14d)][_0xc54cc4];if(!_0x5107a2)throw new Error(_0x38def5(0x132)+_0xc54cc4+_0x38def5(0x123));const _0x3c7751=[],_0xd7cf2e=[],_0x4b10ee=[];for(const _0x51fe43 of _0x359762){const _0x5aac71=resolveRemoteScriptTarget(_0x220b0d,_0x51fe43,_0x244f93,_0x574b81[_0x38def5(0x124)],_0x164482);if(!_0x5aac71){_0xd7cf2e[_0x38def5(0x127)]({'lockKey':_0x51fe43[_0x38def5(0x150)]+'/'+_0x51fe43[_0x38def5(0x146)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x5614e0=_0x574b81[_0x38def5(0x124)][_0x5aac71[_0x38def5(0x135)]];try{if(!_0x51fe43['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x51fe43['scriptContent']==null)throw new Error(_0x38def5(0x13b));const _0x265153=_0x51fe43[_0x38def5(0x10d)],_0x23af67=computeContentHash(_0x265153);if(!_0x41b2f5){const _0x245efa=await hasUnsyncedLocalChanges(_0x5aac71[_0x38def5(0x148)],_0x5614e0,_0x23af67);if(_0x245efa){_0xd7cf2e[_0x38def5(0x127)]({'lockKey':_0x5aac71[_0x38def5(0x135)],'reason':_0x38def5(0x118)});continue;}}await ensureParentDirectory(_0x5aac71[_0x38def5(0x148)]),await writeFile(_0x5aac71['filePath'],_0x265153,'utf8');const _0x1dbe87={'hash':_0x23af67,'remoteId':_0x51fe43['id'],'version':_0x51fe43['version']};_0x5aac71[_0x38def5(0x10e)]===_0x38def5(0x145)&&_0x5aac71[_0x38def5(0x130)]&&(_0x1dbe87[_0x38def5(0x143)]=_0x5aac71['hookLocation'][_0x38def5(0x143)],_0x1dbe87['datasetCode']=_0x5aac71[_0x38def5(0x130)]['datasetCode'],_0x1dbe87[_0x38def5(0x13a)]=_0x5aac71[_0x38def5(0x130)][_0x38def5(0x13a)],_0x1dbe87[_0x38def5(0x156)]=_0x5aac71[_0x38def5(0x130)][_0x38def5(0x156)]),_0x5107a2[_0x38def5(0x124)][_0x5aac71[_0x38def5(0x135)]]=_0x1dbe87,_0x3c7751['push']({'lockKey':_0x5aac71[_0x38def5(0x135)],'remoteId':_0x51fe43['id']});}catch(_0x4e5601){_0x4b10ee[_0x38def5(0x127)]({'lockKey':_0x5aac71['lockKey'],'error':_0x4e5601 instanceof Error?_0x4e5601[_0x38def5(0x129)]:String(_0x4e5601)});}}return _0x5107a2[_0x38def5(0x14b)]=new Date()[_0x38def5(0x13c)](),await writeBffLockFile(_0x220b0d[_0x38def5(0x112)],_0x3aa867),{'ok':_0x4b10ee[_0x38def5(0x153)]===0x0,'data':{'pulled':_0x3c7751,'skipped':_0xd7cf2e,'failed':_0x4b10ee},'message':_0x38def5(0x111)+_0x3c7751[_0x38def5(0x153)]+_0x38def5(0x14f)+_0xd7cf2e['length']+_0x38def5(0x11e)+_0x4b10ee['length']+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x125e53,_0x5585cc,_0x28098b){if(!await fileExists(_0x125e53))return![];const _0x105a1c=await computeFileHash(_0x125e53);if(!_0x5585cc)return _0x28098b?_0x105a1c!==_0x28098b:!![];return _0x105a1c!==_0x5585cc['hash'];}function buildDatasetCodeToAliasMap(_0x19cbed,_0x1cf0dc){const _0x18ec17=a36_0x6701a0,_0x4c6854=loadAliasMap(_0x19cbed,undefined,resolveApiFilePath(_0x19cbed,_0x1cf0dc));return new Map(_0x4c6854[_0x18ec17(0x11d)](_0x48028e=>[_0x48028e[_0x18ec17(0x138)],_0x48028e[_0x18ec17(0x143)]]));}function a36_0x2f9c(_0xcee0bc,_0x43f4fd){_0xcee0bc=_0xcee0bc-0x10a;const _0x12de26=a36_0x12de();let _0x2f9ccc=_0x12de26[_0xcee0bc];return _0x2f9ccc;}async function confirmForce(){const _0x33c2a8=a36_0x6701a0,_0x37a3b7=createInterface({'input':process[_0x33c2a8(0x13d)],'output':process[_0x33c2a8(0x14c)]}),_0x590459=await new Promise(_0xca7a79=>{const _0x450a95=_0x33c2a8;_0x37a3b7[_0x450a95(0x119)](_0x450a95(0x14e),_0xca7a79);});return _0x37a3b7[_0x33c2a8(0x13e)](),['y',_0x33c2a8(0x12d)]['includes'](_0x590459[_0x33c2a8(0x125)]()[_0x33c2a8(0x144)]());}
@@ -1 +1 @@
1
- const a37_0x2626ad=a37_0x4345;(function(_0x15b55e,_0xa0bc7a){const _0x337b82=a37_0x4345,_0x3c39b9=_0x15b55e();while(!![]){try{const _0x1c4152=-parseInt(_0x337b82(0x1c6))/0x1+-parseInt(_0x337b82(0x1a8))/0x2*(-parseInt(_0x337b82(0x1ca))/0x3)+parseInt(_0x337b82(0x1c7))/0x4*(-parseInt(_0x337b82(0x1d3))/0x5)+-parseInt(_0x337b82(0x1d1))/0x6+-parseInt(_0x337b82(0x1a9))/0x7*(parseInt(_0x337b82(0x1db))/0x8)+-parseInt(_0x337b82(0x1ba))/0x9+parseInt(_0x337b82(0x1d6))/0xa;if(_0x1c4152===_0xa0bc7a)break;else _0x3c39b9['push'](_0x3c39b9['shift']());}catch(_0x13c072){_0x3c39b9['push'](_0x3c39b9['shift']());}}}(a37_0x4019,0x357fd));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a37_0x4345(_0x59a2ce,_0x35418b){_0x59a2ce=_0x59a2ce-0x18f;const _0x401914=a37_0x4019();let _0x434547=_0x401914[_0x59a2ce];return _0x434547;}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_0x2626ad(0x1a6),'command':'push','description':a37_0x2626ad(0x1d4),'risk':a37_0x2626ad(0x1b9),'flags':[{'name':a37_0x2626ad(0x1d7),'type':a37_0x2626ad(0x1c4),'description':a37_0x2626ad(0x195),'enum':[a37_0x2626ad(0x1dc),'ENDPOINT',a37_0x2626ad(0x1a3)]},{'name':a37_0x2626ad(0x19e),'type':a37_0x2626ad(0x1c4),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a37_0x2626ad(0x1ab),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x111f59){const _0x92d92a=a37_0x2626ad,_0x30cc64=loadBffProjectConfig(_0x111f59[_0x92d92a(0x1c0)]),_0x399de6=await readBffLockFile(_0x30cc64[_0x92d92a(0x1a4)]),{appLock:_0x40b13a}=ensureLockScope(_0x399de6??createEmptyBffLock(),_0x111f59['appCode'],_0x30cc64[_0x92d92a(0x1c2)],_0x92d92a(0x1b4)),_0x201361=await getTargetFunctions(_0x30cc64,_0x111f59),_0x50ef72=_0x111f59[_0x92d92a(0x1bf)](_0x92d92a(0x1ab)),_0x211672=[];for(const _0x16fa18 of _0x201361){const _0x5bcb59=await computeFileHash(_0x16fa18[_0x92d92a(0x19a)]),_0x26bc26=_0x40b13a[_0x92d92a(0x1c9)][_0x16fa18[_0x92d92a(0x1c1)]],_0x1c058a=!!_0x26bc26&&_0x26bc26[_0x92d92a(0x1bd)]===_0x5bcb59;_0x211672[_0x92d92a(0x1b4)]({'lockKey':_0x16fa18[_0x92d92a(0x1c1)],'filePath':_0x16fa18[_0x92d92a(0x19a)],'remoteId':_0x26bc26?.[_0x92d92a(0x198)]??null,'mode':_0x26bc26?.[_0x92d92a(0x198)]?_0x92d92a(0x1a7):_0x92d92a(0x1be),'status':!_0x50ef72&&_0x1c058a?_0x92d92a(0x1cb):'would_push'});}return{'method':_0x92d92a(0x1dd),'url':_0x92d92a(0x19d),'body':{'appCode':_0x111f59[_0x92d92a(0x1c0)],'force':_0x50ef72,'files':_0x211672,'cacheClearAtRuntime':_0x211672[_0x92d92a(0x1b8)](_0x3cf3aa=>_0x3cf3aa[_0x92d92a(0x1de)]===_0x92d92a(0x1cc)),'cacheClearAtRuntimeTimes':_0x211672[_0x92d92a(0x1b8)](_0x5e2f57=>_0x5e2f57[_0x92d92a(0x1de)]===_0x92d92a(0x1cc))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x92d92a(0x1b2)+_0x211672[_0x92d92a(0x19f)]+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x1ea9dd){const _0x4882d2=a37_0x2626ad,_0x266bea=loadBffProjectConfig(_0x1ea9dd[_0x4882d2(0x1c0)]),_0x47b172=await readBffLockFile(_0x266bea[_0x4882d2(0x1a4)]),{lockData:_0x5644b0,appLock:_0x26ba7a}=ensureLockScope(_0x47b172??createEmptyBffLock(),_0x1ea9dd[_0x4882d2(0x1c0)],_0x266bea[_0x4882d2(0x1c2)],_0x4882d2(0x1b4)),_0x2998d9=await getTargetFunctions(_0x266bea,_0x1ea9dd);if(_0x2998d9[_0x4882d2(0x19f)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4882d2(0x1bc)};const _0x2d522f=_0x1ea9dd[_0x4882d2(0x1bf)](_0x4882d2(0x1ab)),_0x182996=JSON['parse'](JSON['stringify'](_0x5644b0)),_0x1f3f77=_0x182996[_0x4882d2(0x1d2)][_0x1ea9dd[_0x4882d2(0x1c0)]];if(!_0x1f3f77)throw new Error(_0x4882d2(0x1b5)+_0x1ea9dd['appCode']+_0x4882d2(0x19b));const _0x40be41=await buildHookMaps(_0x1ea9dd['appCode'],_0x1ea9dd[_0x4882d2(0x1d5)],_0x2998d9,_0x1f3f77),_0x44d76f=[],_0x3ddce1=[],_0x222621=[];for(const _0x338bb5 of _0x2998d9){const _0x25f8c0=await computeFileHash(_0x338bb5[_0x4882d2(0x19a)]),_0x14c20a=_0x1f3f77[_0x4882d2(0x1c9)][_0x338bb5[_0x4882d2(0x1c1)]];if(!_0x2d522f&&_0x14c20a&&_0x14c20a[_0x4882d2(0x1bd)]===_0x25f8c0){_0x3ddce1[_0x4882d2(0x1b4)]({'lockKey':_0x338bb5[_0x4882d2(0x1c1)],'reason':_0x4882d2(0x1cb)});continue;}try{await uploadSingleFunction(_0x1ea9dd[_0x4882d2(0x1c0)],_0x338bb5,_0x1f3f77,_0x40be41);const _0x52002c=_0x1f3f77[_0x4882d2(0x1c9)][_0x338bb5[_0x4882d2(0x1c1)]];_0x44d76f[_0x4882d2(0x1b4)]({'lockKey':_0x338bb5[_0x4882d2(0x1c1)],'remoteId':_0x52002c?.[_0x4882d2(0x198)]??0x0});}catch(_0x25153d){_0x222621[_0x4882d2(0x1b4)]({'lockKey':_0x338bb5['lockKey'],'error':_0x25153d instanceof Error?_0x25153d['message']:String(_0x25153d)});}}_0x1f3f77[_0x4882d2(0x1a2)]=new Date()[_0x4882d2(0x197)](),await writeBffLockFile(_0x266bea[_0x4882d2(0x1a4)],_0x182996),await waitForUploadedLockEntries(_0x266bea[_0x4882d2(0x1a4)],_0x1ea9dd['appCode'],_0x44d76f[_0x4882d2(0x1b1)](_0x210f5a=>_0x210f5a['lockKey']));let _0x4b2b64={'attempted':![],'cleared':![]};if(_0x44d76f[_0x4882d2(0x19f)]>0x0)try{let _0xe75ec0='';for(let _0xb66c3d=0x0;_0xb66c3d<CACHE_CLEAR_ATTEMPTS;_0xb66c3d+=0x1){_0xe75ec0=await clearBffScriptCache(),_0xb66c3d<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4b2b64={'attempted':!![],'cleared':!![],'message':_0xe75ec0||_0x4882d2(0x1a5)};}catch(_0x222662){_0x4b2b64={'attempted':!![],'cleared':![],'error':_0x222662 instanceof Error?_0x222662[_0x4882d2(0x191)]:String(_0x222662)};}const _0x1e1627=_0x222621[_0x4882d2(0x19f)]===0x0&&(_0x4b2b64[_0x4882d2(0x1b0)]?_0x4b2b64['cleared']:!![]),_0x14c0e4=_0x4b2b64[_0x4882d2(0x1b0)]?_0x4b2b64['cleared']?'runtime\x20cache\x20cleared':'runtime\x20cache\x20clear\x20failed':_0x4882d2(0x1ad);return{'ok':_0x1e1627,'data':{'uploaded':_0x44d76f,'skipped':_0x3ddce1,'failed':_0x222621,'cacheClear':_0x4b2b64},'message':_0x4882d2(0x193)+_0x44d76f[_0x4882d2(0x19f)]+_0x4882d2(0x1b3)+_0x3ddce1[_0x4882d2(0x19f)]+_0x4882d2(0x1c3)+_0x222621[_0x4882d2(0x19f)]+_0x4882d2(0x196)+_0x14c0e4};}};async function getTargetFunctions(_0x34791e,_0x21df69){const _0x535cba=a37_0x2626ad,_0x21a8fc=_0x21df69[_0x535cba(0x1b6)](_0x535cba(0x1d7)),_0xa90acb=_0x21df69['str'](_0x535cba(0x19e)),_0x34e433=normalizeBffType(_0x21a8fc)??undefined;if(_0xa90acb&&!_0x34e433)throw CliErrors[_0x535cba(0x1da)](_0x535cba(0x1bb));const _0x32ee85=await scanLocalBffFunctions(_0x34791e,_0x34e433);if(_0xa90acb){const _0x355e9e=_0x32ee85['filter'](_0x56c544=>_0x56c544[_0x535cba(0x19e)]===_0xa90acb);if(_0x355e9e[_0x535cba(0x19f)]===0x0)throw CliErrors[_0x535cba(0x1da)](_0x535cba(0x1aa)+_0x34e433+'/'+_0xa90acb);return _0x355e9e;}return _0x32ee85;}function a37_0x4019(){const _0xd20b90=['attempted','map','Would\x20inspect\x20','\x20uploaded,\x20','push','Lock\x20scope\x20for\x20app\x20\x22','str','alias','some','high-risk-write','168660Patgsq','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','No\x20local\x20BFF\x20functions\x20found.','hash','create','bool','appCode','lockKey','scriptsRoot','\x20skipped,\x20','string','datasetCode','85755ovhhoU','219756thIulW','code','functions','102246nWueaC','unchanged','would_push','description','Cannot\x20resolve\x20dataset\x20for\x20\x22','version','functionNode','205146wbKpNS','apps','35CQLhcI','Push\x20local\x20BFF\x20scripts\x20to\x20remote','apiDir','9614530XFcXPw','type','script','aliasToDatasetCode','validation','2297800brbZgb','COMMON','POST','status','\x22.\x20','datasetCodeToDataset','message','set','Push\x20complete:\x20',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Push\x20only\x20this\x20script\x20type','\x20failed,\x20','toISOString','remoteId','has','filePath','\x22\x20not\x20found\x20after\x20ensureLockScope.','operationType','/api/management/library/scripts/save','name','length','get','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','lastSync','HOOK','lockFilePath','Runtime\x20script\x20cache\x20cleared.','bff','update','4qHBGMu','7SPXycV','Local\x20function\x20not\x20found:\x20','force','values','runtime\x20cache\x20not\x20needed','Run\x20`','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'];a37_0x4019=function(){return _0xd20b90;};return a37_0x4019();}async function buildHookMaps(_0x4c8f50,_0x7ed6a5,_0x3557f3,_0x4d34a1){const _0x1332cd=a37_0x2626ad,_0x304651=_0x3557f3[_0x1332cd(0x1b8)](_0x1c7f58=>_0x1c7f58[_0x1332cd(0x1d7)]==='HOOK');if(!_0x304651)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x441999=loadAliasMap(_0x7ed6a5,undefined,resolveApiFilePath(_0x7ed6a5,_0x4c8f50)),_0x2f4f0b=new Map(_0x441999[_0x1332cd(0x1b1)](_0xb3edbe=>[_0xb3edbe[_0x1332cd(0x1b7)],_0xb3edbe['datasetCode']]));for(const _0x58095b of Object[_0x1332cd(0x1ac)](_0x4d34a1[_0x1332cd(0x1c9)])){_0x58095b[_0x1332cd(0x1b7)]&&_0x58095b[_0x1332cd(0x1c5)]&&!_0x2f4f0b[_0x1332cd(0x199)](_0x58095b['alias'])&&_0x2f4f0b[_0x1332cd(0x192)](_0x58095b[_0x1332cd(0x1b7)],_0x58095b[_0x1332cd(0x1c5)]);}const _0x5cb37e=await listDatasets(_0x4c8f50),_0x510296=new Map(_0x5cb37e[_0x1332cd(0x1b1)](_0x4c6cd3=>[_0x4c6cd3[_0x1332cd(0x1c8)],_0x4c6cd3]));return{'aliasToDatasetCode':_0x2f4f0b,'datasetCodeToDataset':_0x510296};}async function uploadSingleFunction(_0x2a5b9f,_0x3f27f5,_0x2f6fbe,_0x5694b0){const _0x51d5c1=a37_0x2626ad,_0x2a685a=await readFile(_0x3f27f5[_0x51d5c1(0x19a)],'utf8'),_0x18c54b=await computeFileHash(_0x3f27f5[_0x51d5c1(0x19a)]),_0x481c91=_0x2f6fbe[_0x51d5c1(0x1c9)][_0x3f27f5[_0x51d5c1(0x1c1)]];if(_0x481c91?.['remoteId']&&_0x481c91['version']==null)throw CliErrors[_0x51d5c1(0x1da)](_0x3f27f5[_0x51d5c1(0x1c1)]+_0x51d5c1(0x194));let _0x25d1aa=extractScriptDescription(_0x2a685a);if(!_0x25d1aa&&_0x481c91?.[_0x51d5c1(0x198)]){const _0xd31168=await getBffScriptInfo(_0x481c91[_0x51d5c1(0x198)]);_0x25d1aa=_0xd31168[_0x51d5c1(0x1cd)]||undefined;}const _0x4f149b={'appCode':_0x2a5b9f,'functionName':_0x3f27f5['name'],'scriptType':_0x3f27f5['type'],'scriptContent':_0x2a685a};if(_0x481c91?.[_0x51d5c1(0x198)])_0x4f149b['id']=_0x481c91['remoteId'];if(_0x481c91?.[_0x51d5c1(0x1cf)]!=null)_0x4f149b[_0x51d5c1(0x1cf)]=_0x481c91[_0x51d5c1(0x1cf)];if(_0x25d1aa)_0x4f149b[_0x51d5c1(0x1cd)]=_0x25d1aa;if(_0x3f27f5[_0x51d5c1(0x1d7)]===_0x51d5c1(0x1a3)){const _0x48ea3c=_0x3f27f5[_0x51d5c1(0x1b7)];if(!_0x48ea3c||!_0x3f27f5[_0x51d5c1(0x19c)]||!_0x3f27f5['functionNode'])throw CliErrors[_0x51d5c1(0x1da)]('Incomplete\x20HOOK\x20path:\x20'+_0x3f27f5[_0x51d5c1(0x1c1)]);const _0x37428d=_0x5694b0[_0x51d5c1(0x1d9)][_0x51d5c1(0x1a0)](_0x48ea3c)??_0x481c91?.[_0x51d5c1(0x1c5)]??_0x48ea3c,_0x570d3e=_0x5694b0[_0x51d5c1(0x190)][_0x51d5c1(0x1a0)](_0x37428d);if(!_0x570d3e)throw CliErrors[_0x51d5c1(0x1da)](_0x51d5c1(0x1ce)+_0x48ea3c+_0x51d5c1(0x18f)+(_0x51d5c1(0x1ae)+CLI_BIN_NAME+_0x51d5c1(0x1af)));_0x4f149b['datasetId']=_0x570d3e['id'],_0x4f149b[_0x51d5c1(0x19c)]=_0x3f27f5[_0x51d5c1(0x19c)],_0x4f149b[_0x51d5c1(0x1d0)]=_0x3f27f5[_0x51d5c1(0x1d0)];}const _0x363209=await saveBffScript(_0x4f149b),_0x461c94=_0x363209['id'],_0x46a621=_0x363209[_0x51d5c1(0x1d8)]??await getBffScriptInfo(_0x461c94),_0x28d6b1={'hash':_0x18c54b,'remoteId':_0x461c94,'version':_0x46a621[_0x51d5c1(0x1cf)]};if(_0x3f27f5[_0x51d5c1(0x1d7)]===_0x51d5c1(0x1a3)){const _0x54bb74=_0x3f27f5[_0x51d5c1(0x1b7)],_0x3b5aeb=_0x5694b0[_0x51d5c1(0x1d9)][_0x51d5c1(0x1a0)](_0x54bb74)??_0x481c91?.['datasetCode']??_0x54bb74;_0x5694b0[_0x51d5c1(0x1d9)][_0x51d5c1(0x199)](_0x54bb74)?_0x28d6b1[_0x51d5c1(0x1b7)]=_0x54bb74:_0x28d6b1[_0x51d5c1(0x1b7)]=_0x481c91?.[_0x51d5c1(0x1b7)],_0x28d6b1[_0x51d5c1(0x1c5)]=_0x3b5aeb,_0x28d6b1[_0x51d5c1(0x19c)]=_0x3f27f5['operationType'],_0x28d6b1[_0x51d5c1(0x1d0)]=_0x3f27f5[_0x51d5c1(0x1d0)];}_0x2f6fbe[_0x51d5c1(0x1c9)][_0x3f27f5[_0x51d5c1(0x1c1)]]=_0x28d6b1;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3146b2,_0x435325,_0x2698f0){const _0x328c01=a37_0x2626ad;if(_0x2698f0[_0x328c01(0x19f)]===0x0)return;for(let _0x2cb95e=0x0;_0x2cb95e<LOCK_SETTLE_RETRY_COUNT;_0x2cb95e+=0x1){const _0x4927fe=await readBffLockFile(_0x3146b2),_0x10bda9=_0x4927fe?.[_0x328c01(0x1d2)]?.[_0x435325]?.[_0x328c01(0x1c9)]??{},_0x14ff6b=_0x2698f0['every'](_0x3e11a8=>!!_0x10bda9[_0x3e11a8]?.[_0x328c01(0x198)]);if(_0x14ff6b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x328c01(0x1a1)+_0x2698f0['join'](',\x20')+'.');}
1
+ const a37_0x4619e1=a37_0x537b;(function(_0x8ae08a,_0x4f03b1){const _0x26f7cd=a37_0x537b,_0x196e0f=_0x8ae08a();while(!![]){try{const _0x10e6fc=parseInt(_0x26f7cd(0xc5))/0x1*(-parseInt(_0x26f7cd(0x8e))/0x2)+-parseInt(_0x26f7cd(0x8c))/0x3*(parseInt(_0x26f7cd(0xb9))/0x4)+parseInt(_0x26f7cd(0xb3))/0x5*(parseInt(_0x26f7cd(0x94))/0x6)+-parseInt(_0x26f7cd(0xb6))/0x7*(parseInt(_0x26f7cd(0xb1))/0x8)+-parseInt(_0x26f7cd(0xbe))/0x9*(parseInt(_0x26f7cd(0x99))/0xa)+-parseInt(_0x26f7cd(0x6f))/0xb*(-parseInt(_0x26f7cd(0x77))/0xc)+parseInt(_0x26f7cd(0xa9))/0xd;if(_0x10e6fc===_0x4f03b1)break;else _0x196e0f['push'](_0x196e0f['shift']());}catch(_0x48c697){_0x196e0f['push'](_0x196e0f['shift']());}}}(a37_0x2dae,0xaff75));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a37_0x537b(_0x3462de,_0x344043){_0x3462de=_0x3462de-0x6e;const _0x2dae89=a37_0x2dae();let _0x537bbe=_0x2dae89[_0x3462de];return _0x537bbe;}function a37_0x2dae(){const _0x877a35=['description','values','Push\x20local\x20BFF\x20scripts\x20to\x20remote','31496049nFWqCY','get','every','push','Push\x20only\x20this\x20script\x20type','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','operationType','boolean','8hwpsHE','appCode','245PaWZTp','aliasToDatasetCode','status','808283nAWqvR','Local\x20function\x20not\x20found:\x20','\x20failed,\x20','607156qJZeel','Run\x20`','functionNode','bool','script','10795473DmAzLs','filter','code','utf8','runtime\x20cache\x20cleared','would_push','Push\x20complete:\x20','1SROGaH','alias','has','851554ZQpgNZ',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','\x22\x20not\x20found\x20after\x20ensureLockScope.','create','type','validation','runtime\x20cache\x20clear\x20failed','Lock\x20scope\x20for\x20app\x20\x22','96sQDPuj','apps','COMMON','No\x20local\x20BFF\x20functions\x20found.','high-risk-write','length','force','update','name','version','lastSync','POST','Would\x20inspect\x20','some','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','message','\x22.\x20','remoteId','HOOK','parse','Force\x20push\x20ignoring\x20hash\x20protection','21AYwXKb','str','1586900AGewAk','apiDir','map','Cannot\x20resolve\x20dataset\x20for\x20\x22','hash','attempted','104034hwRDuJ','toISOString','filePath','stringify','Incomplete\x20HOOK\x20path:\x20','10UNWEfQ','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','functions','scriptsRoot','datasetCode','unchanged','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','cleared','bff','lockFilePath','lockKey','string','datasetId'];a37_0x2dae=function(){return _0x877a35;};return a37_0x2dae();}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_0x4619e1(0xa1),'command':a37_0x4619e1(0xac),'description':a37_0x4619e1(0xa8),'risk':a37_0x4619e1(0x7b),'flags':[{'name':a37_0x4619e1(0x73),'type':a37_0x4619e1(0xa4),'description':a37_0x4619e1(0xad),'enum':[a37_0x4619e1(0x79),'ENDPOINT',a37_0x4619e1(0x89)]},{'name':'name','type':a37_0x4619e1(0xa4),'description':a37_0x4619e1(0x9f)},{'name':a37_0x4619e1(0x7d),'type':a37_0x4619e1(0xb0),'description':a37_0x4619e1(0x8b)}],async 'dryRun'(_0x27127e){const _0x5f27df=a37_0x4619e1,_0x479b33=loadBffProjectConfig(_0x27127e[_0x5f27df(0xb2)]),_0x356b32=await readBffLockFile(_0x479b33['lockFilePath']),{appLock:_0x548c81}=ensureLockScope(_0x356b32??createEmptyBffLock(),_0x27127e[_0x5f27df(0xb2)],_0x479b33[_0x5f27df(0x9c)],_0x5f27df(0xac)),_0x46fef0=await getTargetFunctions(_0x479b33,_0x27127e),_0x40a3e9=_0x27127e['bool'](_0x5f27df(0x7d)),_0x4d3dc1=[];for(const _0x297b3e of _0x46fef0){const _0x4aa770=await computeFileHash(_0x297b3e[_0x5f27df(0x96)]),_0x2efe37=_0x548c81[_0x5f27df(0x9b)][_0x297b3e[_0x5f27df(0xa3)]],_0x22ddc9=!!_0x2efe37&&_0x2efe37[_0x5f27df(0x92)]===_0x4aa770;_0x4d3dc1['push']({'lockKey':_0x297b3e[_0x5f27df(0xa3)],'filePath':_0x297b3e['filePath'],'remoteId':_0x2efe37?.[_0x5f27df(0x88)]??null,'mode':_0x2efe37?.[_0x5f27df(0x88)]?_0x5f27df(0x7e):_0x5f27df(0x72),'status':!_0x40a3e9&&_0x22ddc9?_0x5f27df(0x9e):_0x5f27df(0xc3)});}return{'method':_0x5f27df(0x82),'url':'/api/management/library/scripts/save','body':{'appCode':_0x27127e[_0x5f27df(0xb2)],'force':_0x40a3e9,'files':_0x4d3dc1,'cacheClearAtRuntime':_0x4d3dc1[_0x5f27df(0x84)](_0x1c4daa=>_0x1c4daa[_0x5f27df(0xb5)]===_0x5f27df(0xc3)),'cacheClearAtRuntimeTimes':_0x4d3dc1['some'](_0x306b0e=>_0x306b0e[_0x5f27df(0xb5)]===_0x5f27df(0xc3))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x5f27df(0x83)+_0x4d3dc1[_0x5f27df(0x7c)]+_0x5f27df(0x85)};},async 'execute'(_0x3d17e6){const _0x2f74ba=a37_0x4619e1,_0x2b7001=loadBffProjectConfig(_0x3d17e6[_0x2f74ba(0xb2)]),_0x195879=await readBffLockFile(_0x2b7001[_0x2f74ba(0xa2)]),{lockData:_0x4f6261,appLock:_0x4992fd}=ensureLockScope(_0x195879??createEmptyBffLock(),_0x3d17e6['appCode'],_0x2b7001['scriptsRoot'],_0x2f74ba(0xac)),_0x548827=await getTargetFunctions(_0x2b7001,_0x3d17e6);if(_0x548827[_0x2f74ba(0x7c)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x2f74ba(0x7a)};const _0x3b5cba=_0x3d17e6[_0x2f74ba(0xbc)](_0x2f74ba(0x7d)),_0xe802c4=JSON[_0x2f74ba(0x8a)](JSON[_0x2f74ba(0x97)](_0x4f6261)),_0xb33fca=_0xe802c4[_0x2f74ba(0x78)][_0x3d17e6['appCode']];if(!_0xb33fca)throw new Error(_0x2f74ba(0x76)+_0x3d17e6[_0x2f74ba(0xb2)]+_0x2f74ba(0x71));const _0x429c81=await buildHookMaps(_0x3d17e6[_0x2f74ba(0xb2)],_0x3d17e6[_0x2f74ba(0x8f)],_0x548827,_0xb33fca),_0x3b9d4a=[],_0x31b9fd=[],_0x267bcc=[];for(const _0x256058 of _0x548827){const _0xb8ec33=await computeFileHash(_0x256058[_0x2f74ba(0x96)]),_0x15a266=_0xb33fca[_0x2f74ba(0x9b)][_0x256058['lockKey']];if(!_0x3b5cba&&_0x15a266&&_0x15a266[_0x2f74ba(0x92)]===_0xb8ec33){_0x31b9fd['push']({'lockKey':_0x256058[_0x2f74ba(0xa3)],'reason':_0x2f74ba(0x9e)});continue;}try{await uploadSingleFunction(_0x3d17e6[_0x2f74ba(0xb2)],_0x256058,_0xb33fca,_0x429c81);const _0x562987=_0xb33fca[_0x2f74ba(0x9b)][_0x256058['lockKey']];_0x3b9d4a[_0x2f74ba(0xac)]({'lockKey':_0x256058[_0x2f74ba(0xa3)],'remoteId':_0x562987?.[_0x2f74ba(0x88)]??0x0});}catch(_0x5126a0){_0x267bcc[_0x2f74ba(0xac)]({'lockKey':_0x256058['lockKey'],'error':_0x5126a0 instanceof Error?_0x5126a0[_0x2f74ba(0x86)]:String(_0x5126a0)});}}_0xb33fca[_0x2f74ba(0x81)]=new Date()[_0x2f74ba(0x95)](),await writeBffLockFile(_0x2b7001[_0x2f74ba(0xa2)],_0xe802c4),await waitForUploadedLockEntries(_0x2b7001['lockFilePath'],_0x3d17e6['appCode'],_0x3b9d4a[_0x2f74ba(0x90)](_0x581a13=>_0x581a13[_0x2f74ba(0xa3)]));let _0x10e39f={'attempted':![],'cleared':![]};if(_0x3b9d4a[_0x2f74ba(0x7c)]>0x0)try{let _0x34e78c='';for(let _0x49ee5e=0x0;_0x49ee5e<CACHE_CLEAR_ATTEMPTS;_0x49ee5e+=0x1){_0x34e78c=await clearBffScriptCache(),_0x49ee5e<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x10e39f={'attempted':!![],'cleared':!![],'message':_0x34e78c||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x4c2e5e){_0x10e39f={'attempted':!![],'cleared':![],'error':_0x4c2e5e instanceof Error?_0x4c2e5e[_0x2f74ba(0x86)]:String(_0x4c2e5e)};}const _0x31519f=_0x267bcc[_0x2f74ba(0x7c)]===0x0&&(_0x10e39f[_0x2f74ba(0x93)]?_0x10e39f['cleared']:!![]),_0x4d2252=_0x10e39f[_0x2f74ba(0x93)]?_0x10e39f[_0x2f74ba(0xa0)]?_0x2f74ba(0xc2):_0x2f74ba(0x75):'runtime\x20cache\x20not\x20needed';return{'ok':_0x31519f,'data':{'uploaded':_0x3b9d4a,'skipped':_0x31b9fd,'failed':_0x267bcc,'cacheClear':_0x10e39f},'message':_0x2f74ba(0xc4)+_0x3b9d4a[_0x2f74ba(0x7c)]+'\x20uploaded,\x20'+_0x31b9fd[_0x2f74ba(0x7c)]+'\x20skipped,\x20'+_0x267bcc[_0x2f74ba(0x7c)]+_0x2f74ba(0xb8)+_0x4d2252};}};async function getTargetFunctions(_0x4b36dd,_0x18ca1b){const _0x252e30=a37_0x4619e1,_0x2ed26b=_0x18ca1b[_0x252e30(0x8d)]('type'),_0x435d42=_0x18ca1b[_0x252e30(0x8d)](_0x252e30(0x7f)),_0x55e881=normalizeBffType(_0x2ed26b)??undefined;if(_0x435d42&&!_0x55e881)throw CliErrors['validation'](_0x252e30(0xae));const _0x1f8340=await scanLocalBffFunctions(_0x4b36dd,_0x55e881);if(_0x435d42){const _0xb1a34f=_0x1f8340[_0x252e30(0xbf)](_0x1c9bb6=>_0x1c9bb6[_0x252e30(0x7f)]===_0x435d42);if(_0xb1a34f[_0x252e30(0x7c)]===0x0)throw CliErrors[_0x252e30(0x74)](_0x252e30(0xb7)+_0x55e881+'/'+_0x435d42);return _0xb1a34f;}return _0x1f8340;}async function buildHookMaps(_0x36f9cd,_0x382d65,_0x232cfd,_0x16a007){const _0x907684=a37_0x4619e1,_0x5c696f=_0x232cfd['some'](_0xa06ce2=>_0xa06ce2[_0x907684(0x73)]===_0x907684(0x89));if(!_0x5c696f)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x4fb64e=loadAliasMap(_0x382d65,undefined,resolveApiFilePath(_0x382d65,_0x36f9cd)),_0x3bc69d=new Map(_0x4fb64e[_0x907684(0x90)](_0x5e96de=>[_0x5e96de[_0x907684(0xc6)],_0x5e96de[_0x907684(0x9d)]]));for(const _0x101c48 of Object[_0x907684(0xa7)](_0x16a007[_0x907684(0x9b)])){_0x101c48[_0x907684(0xc6)]&&_0x101c48[_0x907684(0x9d)]&&!_0x3bc69d[_0x907684(0x6e)](_0x101c48['alias'])&&_0x3bc69d['set'](_0x101c48['alias'],_0x101c48[_0x907684(0x9d)]);}const _0x2150f1=await listDatasets(_0x36f9cd),_0x3c8eec=new Map(_0x2150f1[_0x907684(0x90)](_0x345ea1=>[_0x345ea1[_0x907684(0xc0)],_0x345ea1]));return{'aliasToDatasetCode':_0x3bc69d,'datasetCodeToDataset':_0x3c8eec};}async function uploadSingleFunction(_0x3a7337,_0xf49967,_0x511ea2,_0x56ce76){const _0x21fb35=a37_0x4619e1,_0x51e987=await readFile(_0xf49967[_0x21fb35(0x96)],_0x21fb35(0xc1)),_0x39497e=await computeFileHash(_0xf49967[_0x21fb35(0x96)]),_0x4951e8=_0x511ea2['functions'][_0xf49967[_0x21fb35(0xa3)]];if(_0x4951e8?.['remoteId']&&_0x4951e8['version']==null)throw CliErrors[_0x21fb35(0x74)](_0xf49967[_0x21fb35(0xa3)]+_0x21fb35(0x70));let _0x71aa5a=extractScriptDescription(_0x51e987);if(!_0x71aa5a&&_0x4951e8?.[_0x21fb35(0x88)]){const _0xb8b230=await getBffScriptInfo(_0x4951e8[_0x21fb35(0x88)]);_0x71aa5a=_0xb8b230['description']||undefined;}const _0x4b592e={'appCode':_0x3a7337,'functionName':_0xf49967[_0x21fb35(0x7f)],'scriptType':_0xf49967[_0x21fb35(0x73)],'scriptContent':_0x51e987};if(_0x4951e8?.[_0x21fb35(0x88)])_0x4b592e['id']=_0x4951e8[_0x21fb35(0x88)];if(_0x4951e8?.[_0x21fb35(0x80)]!=null)_0x4b592e['version']=_0x4951e8[_0x21fb35(0x80)];if(_0x71aa5a)_0x4b592e[_0x21fb35(0xa6)]=_0x71aa5a;if(_0xf49967[_0x21fb35(0x73)]===_0x21fb35(0x89)){const _0x22d96a=_0xf49967[_0x21fb35(0xc6)];if(!_0x22d96a||!_0xf49967[_0x21fb35(0xaf)]||!_0xf49967['functionNode'])throw CliErrors[_0x21fb35(0x74)](_0x21fb35(0x98)+_0xf49967['lockKey']);const _0x47c15b=_0x56ce76[_0x21fb35(0xb4)][_0x21fb35(0xaa)](_0x22d96a)??_0x4951e8?.[_0x21fb35(0x9d)]??_0x22d96a,_0x6bb381=_0x56ce76['datasetCodeToDataset'][_0x21fb35(0xaa)](_0x47c15b);if(!_0x6bb381)throw CliErrors[_0x21fb35(0x74)](_0x21fb35(0x91)+_0x22d96a+_0x21fb35(0x87)+(_0x21fb35(0xba)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x4b592e[_0x21fb35(0xa5)]=_0x6bb381['id'],_0x4b592e[_0x21fb35(0xaf)]=_0xf49967[_0x21fb35(0xaf)],_0x4b592e[_0x21fb35(0xbb)]=_0xf49967[_0x21fb35(0xbb)];}const _0x2d185d=await saveBffScript(_0x4b592e),_0x34a1ec=_0x2d185d['id'],_0x3ed4e0=_0x2d185d[_0x21fb35(0xbd)]??await getBffScriptInfo(_0x34a1ec),_0x1775f6={'hash':_0x39497e,'remoteId':_0x34a1ec,'version':_0x3ed4e0['version']};if(_0xf49967[_0x21fb35(0x73)]===_0x21fb35(0x89)){const _0x373e90=_0xf49967[_0x21fb35(0xc6)],_0x4910ce=_0x56ce76[_0x21fb35(0xb4)][_0x21fb35(0xaa)](_0x373e90)??_0x4951e8?.['datasetCode']??_0x373e90;_0x56ce76[_0x21fb35(0xb4)]['has'](_0x373e90)?_0x1775f6[_0x21fb35(0xc6)]=_0x373e90:_0x1775f6['alias']=_0x4951e8?.[_0x21fb35(0xc6)],_0x1775f6['datasetCode']=_0x4910ce,_0x1775f6[_0x21fb35(0xaf)]=_0xf49967['operationType'],_0x1775f6['functionNode']=_0xf49967['functionNode'];}_0x511ea2['functions'][_0xf49967[_0x21fb35(0xa3)]]=_0x1775f6;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x40b6dc,_0x26afb8,_0x48c756){const _0x4c152f=a37_0x4619e1;if(_0x48c756[_0x4c152f(0x7c)]===0x0)return;for(let _0x3fe7f6=0x0;_0x3fe7f6<LOCK_SETTLE_RETRY_COUNT;_0x3fe7f6+=0x1){const _0x5a6030=await readBffLockFile(_0x40b6dc),_0x27950f=_0x5a6030?.['apps']?.[_0x26afb8]?.['functions']??{},_0x42935c=_0x48c756[_0x4c152f(0xab)](_0x22290e=>!!_0x27950f[_0x22290e]?.[_0x4c152f(0x88)]);if(_0x42935c)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4c152f(0x9a)+_0x48c756['join'](',\x20')+'.');}
@@ -1 +1 @@
1
- function a38_0x4991(){const _0x193ecf=['1142592WSEgiI','alias','21yUYWTn','all','lockFilePath','bff','boolean','read','6zXIQvU','appCode','\x20added,\x20','7DYzJOV','\x20remote-only','scriptsRoot','push','apiDir','169xSFnlC','97592XtCoPD','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','70GozhEZ','\x20unchanged','hash','functions','6861906CsJkQL','2229ENnkjL','All\x20BFF\x20scripts\x20are\x20in\x20sync.','2475848HyXCtb','status','2416fIZXEv','length','remote','lockKey','has','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','1519145FEaJgN','315656nHGRPt','filePath','map'];a38_0x4991=function(){return _0x193ecf;};return a38_0x4991();}const a38_0xaf62a6=a38_0x2cca;(function(_0x19a05f,_0x5d7dbf){const _0xb9cbdb=a38_0x2cca,_0x5201e0=_0x19a05f();while(!![]){try{const _0xd13d4a=-parseInt(_0xb9cbdb(0xad))/0x1*(parseInt(_0xb9cbdb(0xb3))/0x2)+parseInt(_0xb9cbdb(0xba))/0x3*(-parseInt(_0xb9cbdb(0x98))/0x4)+-parseInt(_0xb9cbdb(0x9e))/0x5*(-parseInt(_0xb9cbdb(0xaa))/0x6)+-parseInt(_0xb9cbdb(0xa4))/0x7*(-parseInt(_0xb9cbdb(0xbc))/0x8)+-parseInt(_0xb9cbdb(0xb9))/0x9+-parseInt(_0xb9cbdb(0xb5))/0xa*(parseInt(_0xb9cbdb(0x9f))/0xb)+-parseInt(_0xb9cbdb(0xa2))/0xc*(-parseInt(_0xb9cbdb(0xb2))/0xd);if(_0xd13d4a===_0x5d7dbf)break;else _0x5201e0['push'](_0x5201e0['shift']());}catch(_0x1fbc23){_0x5201e0['push'](_0x5201e0['shift']());}}}(a38_0x4991,0xaee8e));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a38_0x2cca(_0x252c08,_0x5ec62a){_0x252c08=_0x252c08-0x98;const _0x499154=a38_0x4991();let _0x2cca6c=_0x499154[_0x252c08];return _0x2cca6c;}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_0xaf62a6(0xa7),'command':a38_0xaf62a6(0xbd),'description':a38_0xaf62a6(0x9d),'risk':a38_0xaf62a6(0xa9),'flags':[{'name':a38_0xaf62a6(0x9a),'type':a38_0xaf62a6(0xa8),'description':a38_0xaf62a6(0xb4)}],async 'execute'(_0x3d0dcc){const _0x2ccd28=a38_0xaf62a6,_0x807126=loadBffProjectConfig(_0x3d0dcc[_0x2ccd28(0xab)]),_0x27b755=await readBffLockFile(_0x807126[_0x2ccd28(0xa6)]),{appLock:_0x21b71b}=ensureLockScope(_0x27b755??createEmptyBffLock(),_0x3d0dcc[_0x2ccd28(0xab)],_0x807126[_0x2ccd28(0xaf)],'status'),_0x151afc=await scanLocalBffFunctions(_0x807126),_0x54cb6f=[],_0x24edcf=[],_0x4c0079=[];for(const _0x37e71a of _0x151afc){const _0x58c7fc=await computeFileHash(_0x37e71a[_0x2ccd28(0xa0)]),_0x2d8fcc=_0x21b71b[_0x2ccd28(0xb8)][_0x37e71a[_0x2ccd28(0x9b)]];if(!_0x2d8fcc)_0x54cb6f['push'](_0x37e71a[_0x2ccd28(0x9b)]);else _0x2d8fcc[_0x2ccd28(0xb7)]!==_0x58c7fc?_0x24edcf[_0x2ccd28(0xb0)](_0x37e71a[_0x2ccd28(0x9b)]):_0x4c0079[_0x2ccd28(0xb0)](_0x37e71a['lockKey']);}const _0x14a1b3=[];if(_0x3d0dcc['bool']('remote')){const _0x54000e=loadAliasMap(_0x3d0dcc[_0x2ccd28(0xb1)],undefined,resolveApiFilePath(_0x3d0dcc[_0x2ccd28(0xb1)],_0x3d0dcc[_0x2ccd28(0xab)])),_0x156b35=new Map(_0x54000e['map'](_0x338c33=>[_0x338c33['datasetCode'],_0x338c33[_0x2ccd28(0xa3)]])),[_0x1b01e7,_0x38198c]=await Promise[_0x2ccd28(0xa5)]([listBffScripts(_0x3d0dcc['appCode']),getBffScriptStatistics(_0x3d0dcc['appCode'])]),_0x530af5=createHookLocationMap(_0x38198c),_0x105828=new Set(_0x151afc[_0x2ccd28(0xa1)](_0x151910=>_0x151910['lockKey']));for(const _0x5c24c2 of _0x1b01e7){const _0x1da528=resolveRemoteScriptTarget(_0x807126,_0x5c24c2,_0x530af5,_0x21b71b[_0x2ccd28(0xb8)],_0x156b35);_0x1da528&&!_0x105828[_0x2ccd28(0x9c)](_0x1da528[_0x2ccd28(0x9b)])&&_0x14a1b3[_0x2ccd28(0xb0)](_0x1da528['lockKey']);}}const _0x21fcda=_0x54cb6f[_0x2ccd28(0x99)]===0x0&&_0x24edcf[_0x2ccd28(0x99)]===0x0&&_0x14a1b3[_0x2ccd28(0x99)]===0x0;return{'ok':!![],'data':{'added':_0x54cb6f,'modified':_0x24edcf,'unchanged':_0x4c0079,'remoteOnly':_0x14a1b3},'message':_0x21fcda?_0x2ccd28(0xbb):_0x54cb6f[_0x2ccd28(0x99)]+_0x2ccd28(0xac)+_0x24edcf[_0x2ccd28(0x99)]+'\x20modified,\x20'+_0x4c0079[_0x2ccd28(0x99)]+_0x2ccd28(0xb6)+(_0x14a1b3[_0x2ccd28(0x99)]>0x0?',\x20'+_0x14a1b3[_0x2ccd28(0x99)]+_0x2ccd28(0xae):'')};}};
1
+ function a38_0x55eb(){const _0x471de8=['26968BmdMNY','length','\x20modified,\x20','apiDir','hash','4700142iLeKnI','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','push','All\x20BFF\x20scripts\x20are\x20in\x20sync.','has','appCode','all','25CaabBP','222136yuvmxR','929760mwZNZA','5697cXXTtU','lockKey','remote','read','\x20remote-only','map','11874BsPuKR','alias','functions','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','status','bff','1065357bTVSFv','5669013xpcrDI','\x20unchanged'];a38_0x55eb=function(){return _0x471de8;};return a38_0x55eb();}const a38_0x1b4a70=a38_0x1f26;(function(_0x37ef31,_0x98e408){const _0x35f642=a38_0x1f26,_0x3a37af=_0x37ef31();while(!![]){try{const _0x17c6be=parseInt(_0x35f642(0x1af))/0x1+parseInt(_0x35f642(0x1b6))/0x2+parseInt(_0x35f642(0x1bc))/0x3+parseInt(_0x35f642(0x1ae))/0x4*(-parseInt(_0x35f642(0x1ad))/0x5)+parseInt(_0x35f642(0x1c4))/0x6+parseInt(_0x35f642(0x1bd))/0x7+parseInt(_0x35f642(0x1bf))/0x8*(-parseInt(_0x35f642(0x1b0))/0x9);if(_0x17c6be===_0x98e408)break;else _0x3a37af['push'](_0x3a37af['shift']());}catch(_0x3815e5){_0x3a37af['push'](_0x3a37af['shift']());}}}(a38_0x55eb,0x735c7));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';function a38_0x1f26(_0x53c5d4,_0x578d9d){_0x53c5d4=_0x53c5d4-0x1a7;const _0x55eb9f=a38_0x55eb();let _0x1f2683=_0x55eb9f[_0x53c5d4];return _0x1f2683;}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x1b4a70(0x1bb),'command':a38_0x1b4a70(0x1ba),'description':a38_0x1b4a70(0x1b9),'risk':a38_0x1b4a70(0x1b3),'flags':[{'name':a38_0x1b4a70(0x1b2),'type':'boolean','description':a38_0x1b4a70(0x1a7)}],async 'execute'(_0x22c02b){const _0x46e33d=a38_0x1b4a70,_0x4b39c7=loadBffProjectConfig(_0x22c02b[_0x46e33d(0x1ab)]),_0xe5da43=await readBffLockFile(_0x4b39c7['lockFilePath']),{appLock:_0x111ccc}=ensureLockScope(_0xe5da43??createEmptyBffLock(),_0x22c02b['appCode'],_0x4b39c7['scriptsRoot'],'status'),_0x4fc22f=await scanLocalBffFunctions(_0x4b39c7),_0x4b8b20=[],_0x5aaac0=[],_0x4009a3=[];for(const _0x549130 of _0x4fc22f){const _0x4b2aa7=await computeFileHash(_0x549130['filePath']),_0x5a31d6=_0x111ccc[_0x46e33d(0x1b8)][_0x549130[_0x46e33d(0x1b1)]];if(!_0x5a31d6)_0x4b8b20[_0x46e33d(0x1a8)](_0x549130[_0x46e33d(0x1b1)]);else _0x5a31d6[_0x46e33d(0x1c3)]!==_0x4b2aa7?_0x5aaac0[_0x46e33d(0x1a8)](_0x549130[_0x46e33d(0x1b1)]):_0x4009a3['push'](_0x549130['lockKey']);}const _0x18b2e8=[];if(_0x22c02b['bool'](_0x46e33d(0x1b2))){const _0x542cf2=loadAliasMap(_0x22c02b[_0x46e33d(0x1c2)],undefined,resolveApiFilePath(_0x22c02b[_0x46e33d(0x1c2)],_0x22c02b[_0x46e33d(0x1ab)])),_0x1689fc=new Map(_0x542cf2['map'](_0x5ea2b7=>[_0x5ea2b7['datasetCode'],_0x5ea2b7[_0x46e33d(0x1b7)]])),[_0x2b9a15,_0x291d74]=await Promise[_0x46e33d(0x1ac)]([listBffScripts(_0x22c02b[_0x46e33d(0x1ab)]),getBffScriptStatistics(_0x22c02b[_0x46e33d(0x1ab)])]),_0x26815a=createHookLocationMap(_0x291d74),_0x53ff1b=new Set(_0x4fc22f[_0x46e33d(0x1b5)](_0x5988b0=>_0x5988b0[_0x46e33d(0x1b1)]));for(const _0x3b39ee of _0x2b9a15){const _0x35dc11=resolveRemoteScriptTarget(_0x4b39c7,_0x3b39ee,_0x26815a,_0x111ccc[_0x46e33d(0x1b8)],_0x1689fc);_0x35dc11&&!_0x53ff1b[_0x46e33d(0x1aa)](_0x35dc11['lockKey'])&&_0x18b2e8[_0x46e33d(0x1a8)](_0x35dc11[_0x46e33d(0x1b1)]);}}const _0x14938c=_0x4b8b20[_0x46e33d(0x1c0)]===0x0&&_0x5aaac0[_0x46e33d(0x1c0)]===0x0&&_0x18b2e8[_0x46e33d(0x1c0)]===0x0;return{'ok':!![],'data':{'added':_0x4b8b20,'modified':_0x5aaac0,'unchanged':_0x4009a3,'remoteOnly':_0x18b2e8},'message':_0x14938c?_0x46e33d(0x1a9):_0x4b8b20[_0x46e33d(0x1c0)]+'\x20added,\x20'+_0x5aaac0[_0x46e33d(0x1c0)]+_0x46e33d(0x1c1)+_0x4009a3[_0x46e33d(0x1c0)]+_0x46e33d(0x1be)+(_0x18b2e8['length']>0x0?',\x20'+_0x18b2e8[_0x46e33d(0x1c0)]+_0x46e33d(0x1b4):'')};}};
@@ -1 +1 @@
1
- function a39_0x5d4b(_0x33195a,_0x3a5772){_0x33195a=_0x33195a-0xda;const _0x2d84b6=a39_0x2d84();let _0x5d4b7a=_0x2d84b6[_0x33195a];return _0x5d4b7a;}const a39_0x450fd2=a39_0x5d4b;(function(_0x4fe9c3,_0x5822d3){const _0x1cf069=a39_0x5d4b,_0x38c548=_0x4fe9c3();while(!![]){try{const _0x4a4685=parseInt(_0x1cf069(0xde))/0x1+parseInt(_0x1cf069(0xf4))/0x2*(-parseInt(_0x1cf069(0xdb))/0x3)+-parseInt(_0x1cf069(0xf7))/0x4*(parseInt(_0x1cf069(0xdd))/0x5)+-parseInt(_0x1cf069(0xed))/0x6*(parseInt(_0x1cf069(0xee))/0x7)+-parseInt(_0x1cf069(0xe5))/0x8+parseInt(_0x1cf069(0xf6))/0x9+parseInt(_0x1cf069(0xec))/0xa;if(_0x4a4685===_0x5822d3)break;else _0x38c548['push'](_0x38c548['shift']());}catch(_0x115170){_0x38c548['push'](_0x38c548['shift']());}}}(a39_0x2d84,0x34f48));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x450fd2(0xf3),'command':a39_0x450fd2(0xe4),'description':a39_0x450fd2(0xe6),'risk':a39_0x450fd2(0xe2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x31fc62){const _0x114cbe=a39_0x450fd2;logger[_0x114cbe(0xdf)](process['cwd']()),logger[_0x114cbe(0xf0)]('cli-skill-install',_0x114cbe(0xda));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x5e1b55,RABETBASE_SKILL_SOURCE:_0xb9d023,runNpxSkillsAddGlobal:_0x13b09f}=await import(_0x114cbe(0xe8)),_0x6a9e03=_0x31fc62['nonInteractive']?_0x114cbe(0xef):_0x114cbe(0xe1);console[_0x114cbe(0xe0)](_0x114cbe(0xe9)+_0x5e1b55+_0x114cbe(0xe7));const _0x15021d=_0x13b09f(process[_0x114cbe(0xf8)](),_0xb9d023,{'stdio':_0x6a9e03});if(_0x15021d[_0x114cbe(0xdc)])console[_0x114cbe(0xe0)](_0x114cbe(0xf2));else{if(_0x15021d['ok'])console[_0x114cbe(0xe0)](_0x114cbe(0xf1));else throw CliErrors[_0x114cbe(0xeb)]('npx\x20skills\x20add\x20failed:\x20'+(_0x15021d[_0x114cbe(0xea)]||_0x114cbe(0xf5)),_0x114cbe(0xe3)+_0x5e1b55);}return{'ok':!![]};}}];function a39_0x2d84(){const _0x5d3930=['skipped','106235udrrZy','91126dgBdzy','setLogPath','log','inherit','write','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','install','2120168PtiNES','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill',')...','../../skills/npx-skills-add.js','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','error','apiError','9309940GgvOKi','26958KHvFlo','119ygGHdr','pipe','info','CLI\x20Built-in\x20Skill\x20installed','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','cli-skill','277724sbMInW','unknown','428643FCktrL','44zgliKO','cwd','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','6Cadket'];a39_0x2d84=function(){return _0x5d3930;};return a39_0x2d84();}
1
+ function a39_0x3059(_0x201243,_0xab5175){_0x201243=_0x201243-0xf4;const _0x538e7c=a39_0x538e();let _0x305937=_0x538e7c[_0x201243];return _0x305937;}function a39_0x538e(){const _0x2e0ecd=['3584292ZjxfpQ',')...','1520484bpWlVf','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','cli-skill','setLogPath','info','error','42954370jnDTVM','6785575ZlHVes','cli-skill-install','6184UJeehp','skipped','inherit','cwd','unknown','log','nonInteractive','13599ueGLFh','1473452oHZOEY','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','apiError','665455wUboaD','CLI\x20Built-in\x20Skill\x20installed','6EFvIWh','4Qhqudw','write'];a39_0x538e=function(){return _0x2e0ecd;};return a39_0x538e();}const a39_0x45e04a=a39_0x3059;(function(_0x4204d5,_0x45b6a2){const _0x2dc0fe=a39_0x3059,_0x55a7b8=_0x4204d5();while(!![]){try{const _0x59809b=-parseInt(_0x2dc0fe(0x102))/0x1+-parseInt(_0x2dc0fe(0xf8))/0x2+parseInt(_0x2dc0fe(0x100))/0x3*(parseInt(_0x2dc0fe(0xfe))/0x4)+-parseInt(_0x2dc0fe(0x10a))/0x5+parseInt(_0x2dc0fe(0xfd))/0x6*(parseInt(_0x2dc0fe(0xfb))/0x7)+-parseInt(_0x2dc0fe(0x10c))/0x8*(parseInt(_0x2dc0fe(0xf7))/0x9)+parseInt(_0x2dc0fe(0x109))/0xa;if(_0x59809b===_0x45b6a2)break;else _0x55a7b8['push'](_0x55a7b8['shift']());}catch(_0x5c173a){_0x55a7b8['push'](_0x55a7b8['shift']());}}}(a39_0x538e,0xc407a));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x45e04a(0x105),'command':'install','description':a39_0x45e04a(0x103),'risk':a39_0x45e04a(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1c224b){const _0x4240ae=a39_0x45e04a;logger[_0x4240ae(0x106)](process[_0x4240ae(0x10f)]()),logger[_0x4240ae(0x107)](_0x4240ae(0x10b),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x1eb340,RABETBASE_SKILL_SOURCE:_0x2e73a1,runNpxSkillsAddGlobal:_0x329210}=await import('../../skills/npx-skills-add.js'),_0x544828=_0x1c224b[_0x4240ae(0xf6)]?'pipe':_0x4240ae(0x10e);console['log'](_0x4240ae(0x104)+_0x1eb340+_0x4240ae(0x101));const _0x364e0e=_0x329210(process['cwd'](),_0x2e73a1,{'stdio':_0x544828});if(_0x364e0e[_0x4240ae(0x10d)])console[_0x4240ae(0xf5)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.');else{if(_0x364e0e['ok'])console['log'](_0x4240ae(0xfc));else throw CliErrors[_0x4240ae(0xfa)]('npx\x20skills\x20add\x20failed:\x20'+(_0x364e0e[_0x4240ae(0x108)]||_0x4240ae(0xf4)),_0x4240ae(0xf9)+_0x1eb340);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x4c6095=a40_0x570c;(function(_0x230901,_0x4fb51d){const _0x5ccd0f=a40_0x570c,_0x33f89b=_0x230901();while(!![]){try{const _0x25815e=parseInt(_0x5ccd0f(0x217))/0x1+parseInt(_0x5ccd0f(0x23d))/0x2*(parseInt(_0x5ccd0f(0x218))/0x3)+parseInt(_0x5ccd0f(0x200))/0x4+parseInt(_0x5ccd0f(0x240))/0x5+parseInt(_0x5ccd0f(0x233))/0x6*(parseInt(_0x5ccd0f(0x225))/0x7)+parseInt(_0x5ccd0f(0x22c))/0x8*(-parseInt(_0x5ccd0f(0x1fa))/0x9)+-parseInt(_0x5ccd0f(0x208))/0xa*(parseInt(_0x5ccd0f(0x1f7))/0xb);if(_0x25815e===_0x4fb51d)break;else _0x33f89b['push'](_0x33f89b['shift']());}catch(_0x4c9a96){_0x33f89b['push'](_0x33f89b['shift']());}}}(a40_0x3568,0xd63bf));import a40_0x4e9564 from'chalk';import a40_0x395961 from'ora';import a40_0x15fb7d from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';function a40_0x570c(_0x442674,_0x55a300){_0x442674=_0x442674-0x1f1;const _0x3568d6=a40_0x3568();let _0x570c8a=_0x3568d6[_0x442674];return _0x570c8a;}import{RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x488bcc=a40_0x570c;return GIT_COMMIT!==_0x488bcc(0x21d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x13001d=a40_0x570c,_0x4e871a=process['execPath'][_0x13001d(0x23f)]();if(_0x4e871a['includes'](_0x13001d(0x21b)))return _0x13001d(0x21b);return'npm';}const updateFlags=[{'name':a40_0x4c6095(0x212),'type':a40_0x4c6095(0x216),'description':a40_0x4c6095(0x20f),'default':![]},{'name':'version','type':'string','description':a40_0x4c6095(0x20c)},{'name':a40_0x4c6095(0x22f),'type':a40_0x4c6095(0x216),'description':a40_0x4c6095(0x23a),'default':![]},{'name':'skills','type':a40_0x4c6095(0x216),'description':a40_0x4c6095(0x1fc),'default':!![],'hidden':!![]}];function a40_0x3568(){const _0x1afc67=['timeout','message','\x20install\x20-g\x20','write','Current\x20version:\x20','14UpOuQZ','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','npm','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','green','\x20→\x20','object','4019584faifLO','nonInteractive','trim','no-skills','succeed','...','@latest','1930002nRKfsH','source','map','flag','cwd','Version\x20comparison\x20failed','warn','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','filter','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','276BfbuRb','Checking\x20CLI\x20Built-in\x20Skill...','toLowerCase','849485uGsQum','\x20\x20Try\x20manually:\x20','bool','install','skills','\x20cli-skill\x20install','pipe','valid','fail','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','skipped','16766277xyhSBW','Beta\x20version:\x20','https://registry.npmjs.org/-/package/','9WZIPZC','yellow','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','error','Already\x20on\x20requested\x20version\x20(v','log','6149300rSaAOu','\x20\x20Run\x20manually:\x20','info','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','version','gray','start','entries','20bEoRFJ','inherit','latest','Updated\x20to\x20v','Install\x20a\x20specific\x20CLI\x20version','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Invalid\x20version:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Requested\x20version:\x20','red','beta','Update\x20failed','Already\x20up\x20to\x20date\x20(v','Updating\x20via\x20','boolean','1156935TfMTrb','20019jZjAQW','length','Checking\x20for\x20updates...','bun','validation','unknown','json','string'];a40_0x3568=function(){return _0x1afc67;};return a40_0x3568();}function getRequestedVersion(_0x52c8e3){const _0x253942=a40_0x4c6095;return _0x52c8e3['str'](_0x253942(0x204))[_0x253942(0x22e)]();}function shouldSkipCliSkill(_0xc0936f){const _0x436674=a40_0x4c6095;return _0xc0936f['bool'](_0x436674(0x22f))||_0xc0936f[_0x436674(0x236)](_0x436674(0x244))===![];}async function validateUpdateFlags(_0x56c5b8){const _0x4b15f8=a40_0x4c6095,_0x14eb36=_0x56c5b8[_0x4b15f8(0x242)](_0x4b15f8(0x212)),_0x165495=getRequestedVersion(_0x56c5b8);if(_0x14eb36&&_0x165495)throw CliErrors[_0x4b15f8(0x21c)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x165495&&!a40_0x15fb7d[_0x4b15f8(0x1f3)](_0x165495))throw CliErrors[_0x4b15f8(0x21c)](_0x4b15f8(0x20e)+_0x165495,_0x4b15f8(0x226));}async function fetchNpmDistTags(){const _0xf51725=a40_0x4c6095;try{const _0x247d80=await fetch(_0xf51725(0x1f9)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0xf51725(0x220)](0x2710)});if(!_0x247d80['ok'])return null;const _0xf89c75=await _0x247d80[_0xf51725(0x21e)]();if(!_0xf89c75||typeof _0xf89c75!==_0xf51725(0x22b))return null;return Object['fromEntries'](Object[_0xf51725(0x207)](_0xf89c75)[_0xf51725(0x23b)](([,_0x3cb80a])=>typeof _0x3cb80a===_0xf51725(0x21f)&&_0x3cb80a[_0xf51725(0x22e)]()[_0xf51725(0x219)]>0x0)[_0xf51725(0x235)](([_0x409c0d,_0x4c3c58])=>[_0x409c0d,String(_0x4c3c58)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2128b2){const _0x9c1e8e=await fetchNpmDistTags();return _0x9c1e8e?.[_0x2128b2]??null;}async function fetchLatestVersion(){const _0x33427a=a40_0x4c6095;return fetchNpmDistTagVersion(_0x33427a(0x20a));}async function resolveTargetVersion(_0x5792d4){const _0x878dc8=a40_0x4c6095,_0x53ddaa=getRequestedVersion(_0x5792d4);if(_0x53ddaa)return{'version':_0x53ddaa,'source':_0x878dc8(0x204)};if(_0x5792d4[_0x878dc8(0x242)](_0x878dc8(0x212))){const _0x5ced42=await fetchNpmDistTagVersion(_0x878dc8(0x212));if(!_0x5ced42)return null;return{'version':_0x5ced42,'source':_0x878dc8(0x212)};}const _0x5c079d=await fetchLatestVersion();if(!_0x5c079d)return null;return{'version':_0x5c079d,'source':_0x878dc8(0x20a)};}function shouldInstallTarget(_0x54004f,_0x3249f4){const _0xecab28=a40_0x4c6095;if(_0x3249f4[_0xecab28(0x234)]===_0xecab28(0x204)||_0x3249f4['source']===_0xecab28(0x212))return!a40_0x15fb7d['eq'](_0x54004f,_0x3249f4[_0xecab28(0x204)]);return a40_0x15fb7d['lt'](_0x54004f,_0x3249f4[_0xecab28(0x204)]);}function getInstallPlanLabel(_0x222e8b,_0x2003eb){const _0x2b380c=a40_0x4c6095;switch(_0x2003eb['source']){case'beta':return _0x2b380c(0x1f8)+a40_0x4e9564['yellow'](_0x222e8b)+_0x2b380c(0x22a)+a40_0x4e9564[_0x2b380c(0x229)](_0x2003eb['version']);case _0x2b380c(0x204):return _0x2b380c(0x210)+a40_0x4e9564['yellow'](_0x222e8b)+_0x2b380c(0x22a)+a40_0x4e9564['green'](_0x2003eb[_0x2b380c(0x204)]);case _0x2b380c(0x20a):default:return'Update\x20available:\x20'+a40_0x4e9564[_0x2b380c(0x1fb)](_0x222e8b)+_0x2b380c(0x22a)+a40_0x4e9564[_0x2b380c(0x229)](_0x2003eb['version']);}}async function installCliSkill(_0x1870b9){const _0x44a5da=a40_0x4c6095;console['log'](a40_0x4e9564[_0x44a5da(0x205)](_0x44a5da(0x23e)));const _0x13c564=runNpxSkillsAddGlobal(process[_0x44a5da(0x237)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x1870b9?_0x44a5da(0x1f2):_0x44a5da(0x209)});if(_0x13c564[_0x44a5da(0x1f6)]){console[_0x44a5da(0x1ff)](a40_0x4e9564[_0x44a5da(0x205)](_0x44a5da(0x20d)));return;}if(_0x13c564['ok']){console['log'](a40_0x4e9564[_0x44a5da(0x205)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console[_0x44a5da(0x239)](a40_0x4e9564[_0x44a5da(0x1fb)]('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x13c564['error']||_0x44a5da(0x21d)))),console[_0x44a5da(0x1ff)](a40_0x4e9564[_0x44a5da(0x205)](_0x44a5da(0x201)+CLI_BIN_NAME+_0x44a5da(0x1f1)));}async function execute(_0x4034b9){const _0x144c0c=a40_0x4c6095;await validateUpdateFlags(_0x4034b9);const _0x3b7b6c=getCurrentVersion();console[_0x144c0c(0x1ff)](_0x144c0c(0x224)+_0x3b7b6c);const _0x49cd13=a40_0x395961(_0x144c0c(0x21a))[_0x144c0c(0x206)](),_0x4812ec=await resolveTargetVersion(_0x4034b9);if(!_0x4812ec){const _0x56a681=_0x4034b9[_0x144c0c(0x242)](_0x144c0c(0x212))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x144c0c(0x203);return _0x49cd13['fail'](_0x56a681),console[_0x144c0c(0x1ff)](a40_0x4e9564[_0x144c0c(0x205)](_0x144c0c(0x23c)+NPM_PACKAGE_NAME+_0x144c0c(0x232))),{'ok':![],'message':_0x56a681};}const _0x5881be=a40_0x15fb7d[_0x144c0c(0x1f3)](VERSION),_0x4c4b16=a40_0x15fb7d['valid'](_0x4812ec[_0x144c0c(0x204)]);if(!_0x5881be||!_0x4c4b16)return _0x49cd13['fail'](_0x144c0c(0x238)),{'ok':![],'message':_0x144c0c(0x238)};if(!shouldInstallTarget(_0x5881be,_0x4812ec)){const _0x166df9=_0x4812ec[_0x144c0c(0x234)]===_0x144c0c(0x204)?_0x144c0c(0x1fe)+_0x4812ec[_0x144c0c(0x204)]+')':_0x144c0c(0x214)+_0x4812ec[_0x144c0c(0x204)]+')';return _0x49cd13['succeed'](_0x166df9),shouldSkipCliSkill(_0x4034b9)?console['log'](a40_0x4e9564[_0x144c0c(0x205)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x4034b9[_0x144c0c(0x22d)]),{'ok':!![]};}_0x49cd13[_0x144c0c(0x202)](getInstallPlanLabel(_0x3b7b6c,_0x4812ec));const _0x1d9463=detectPackageManager(),_0x3b4bde=_0x1d9463===_0x144c0c(0x227)?resolveNpmBin(_0x144c0c(0x227)):_0x1d9463,_0x5f590f=a40_0x395961(_0x144c0c(0x215)+_0x1d9463+_0x144c0c(0x231))[_0x144c0c(0x206)]();try{return await execa(_0x3b4bde,[_0x144c0c(0x243),'-g',NPM_PACKAGE_NAME+'@'+_0x4812ec[_0x144c0c(0x204)]],{'stdio':'pipe'}),_0x5f590f[_0x144c0c(0x230)](_0x144c0c(0x20b)+_0x4812ec['version']),console['log'](a40_0x4e9564[_0x144c0c(0x205)](_0x144c0c(0x228))),shouldSkipCliSkill(_0x4034b9)?console[_0x144c0c(0x1ff)](a40_0x4e9564[_0x144c0c(0x205)](_0x144c0c(0x1f5))):await installCliSkill(_0x4034b9[_0x144c0c(0x22d)]),{'ok':!![]};}catch(_0xa3cea9){return _0x5f590f[_0x144c0c(0x1f4)](_0x144c0c(0x213)),console[_0x144c0c(0x1fd)](a40_0x4e9564[_0x144c0c(0x211)]('\x20\x20'+_0xa3cea9[_0x144c0c(0x221)])),console[_0x144c0c(0x1ff)](a40_0x4e9564['gray'](_0x144c0c(0x241)+_0x1d9463+_0x144c0c(0x222)+NPM_PACKAGE_NAME+'@'+_0x4812ec[_0x144c0c(0x204)])),{'ok':![],'message':_0xa3cea9['message']};}}export const updateDefinition={'service':'update','command':'run','description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a40_0x4c6095(0x223),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0x276a61=a40_0x5ce8;(function(_0x1bfb23,_0x43462f){const _0x5133a4=a40_0x5ce8,_0x1e07e=_0x1bfb23();while(!![]){try{const _0x5516a9=-parseInt(_0x5133a4(0xb4))/0x1*(parseInt(_0x5133a4(0xa1))/0x2)+-parseInt(_0x5133a4(0xb0))/0x3*(parseInt(_0x5133a4(0xc9))/0x4)+-parseInt(_0x5133a4(0x9a))/0x5*(-parseInt(_0x5133a4(0x85))/0x6)+parseInt(_0x5133a4(0x93))/0x7+parseInt(_0x5133a4(0x99))/0x8+parseInt(_0x5133a4(0xad))/0x9*(-parseInt(_0x5133a4(0x94))/0xa)+-parseInt(_0x5133a4(0x87))/0xb*(parseInt(_0x5133a4(0x9c))/0xc);if(_0x5516a9===_0x43462f)break;else _0x1e07e['push'](_0x1e07e['shift']());}catch(_0x525a4f){_0x1e07e['push'](_0x1e07e['shift']());}}}(a40_0xd5f9,0x242fd));import a40_0x2b42e5 from'chalk';import a40_0x818d47 from'ora';import a40_0x4edd07 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 _0x3b887a=a40_0x5ce8;return GIT_COMMIT!==_0x3b887a(0xc7)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3b887a(0x8b)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x9d2d43=a40_0x5ce8,_0x42bd13=process[_0x9d2d43(0xd1)][_0x9d2d43(0xa6)]();if(_0x42bd13[_0x9d2d43(0xb3)]('bun'))return _0x9d2d43(0xbe);return _0x9d2d43(0xa3);}const updateFlags=[{'name':'beta','type':a40_0x276a61(0x8f),'description':a40_0x276a61(0xc2),'default':![]},{'name':a40_0x276a61(0xc0),'type':'string','description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a40_0x276a61(0xa0),'type':a40_0x276a61(0x8f),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0x276a61(0x9d),'type':'boolean','description':a40_0x276a61(0xb5),'default':!![],'hidden':!![]}];function a40_0x5ce8(_0x1137d4,_0x4a8aec){_0x1137d4=_0x1137d4-0x81;const _0xd5f9dc=a40_0xd5f9();let _0x5ce8ad=_0xd5f9dc[_0x1137d4];return _0x5ce8ad;}function getRequestedVersion(_0x5dc31c){const _0x343443=a40_0x276a61;return _0x5dc31c[_0x343443(0x81)](_0x343443(0xc0))[_0x343443(0xbb)]();}function shouldSkipCliSkill(_0x75df2b){const _0x14c1f1=a40_0x276a61;return _0x75df2b[_0x14c1f1(0xbf)]('no-skills')||_0x75df2b[_0x14c1f1(0xc5)](_0x14c1f1(0x9d))===![];}async function validateUpdateFlags(_0x44b362){const _0x118603=a40_0x276a61,_0x3744ab=_0x44b362[_0x118603(0xbf)](_0x118603(0xb2)),_0x3b6955=getRequestedVersion(_0x44b362);if(_0x3744ab&&_0x3b6955)throw CliErrors[_0x118603(0x9e)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x118603(0xba));if(_0x3b6955&&!a40_0x4edd07[_0x118603(0x9b)](_0x3b6955))throw CliErrors[_0x118603(0x9e)]('Invalid\x20version:\x20'+_0x3b6955,_0x118603(0xb9));}async function fetchNpmDistTags(){const _0x57b6b3=a40_0x276a61;try{const _0xc3204d=await fetch(_0x57b6b3(0x8a)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x57b6b3(0xaf),{'signal':AbortSignal[_0x57b6b3(0xcf)](0x2710)});if(!_0xc3204d['ok'])return null;const _0x711e2f=await _0xc3204d[_0x57b6b3(0x95)]();if(!_0x711e2f||typeof _0x711e2f!=='object')return null;return Object['fromEntries'](Object[_0x57b6b3(0x8e)](_0x711e2f)[_0x57b6b3(0x86)](([,_0x42689b])=>typeof _0x42689b==='string'&&_0x42689b['trim']()['length']>0x0)[_0x57b6b3(0x90)](([_0x16fe01,_0x4df2db])=>[_0x16fe01,String(_0x4df2db)[_0x57b6b3(0xbb)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x24c3c6){const _0xc9b482=await fetchNpmDistTags();return _0xc9b482?.[_0x24c3c6]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x53326b){const _0x3ee0cb=a40_0x276a61,_0x4b6efd=getRequestedVersion(_0x53326b);if(_0x4b6efd)return{'version':_0x4b6efd,'source':_0x3ee0cb(0xc0)};if(_0x53326b['bool'](_0x3ee0cb(0xb2))){const _0x43d758=await fetchNpmDistTagVersion(_0x3ee0cb(0xb2));if(!_0x43d758)return null;return{'version':_0x43d758,'source':_0x3ee0cb(0xb2)};}const _0x404069=await fetchLatestVersion();if(!_0x404069)return null;return{'version':_0x404069,'source':_0x3ee0cb(0xa5)};}function a40_0xd5f9(){const _0x45117f=['no-skills','10MGkxqU','install','npm','start','latest','toLowerCase','pipe','\x20\x20Try\x20manually:\x20','error','Update\x20failed','log','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','27Yatzko','nonInteractive','/dist-tags','2811biSAgJ','info','beta','includes','113qAtRvG','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','warn','fail','Requested\x20version:\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','trim','\x20install\x20-g\x20','Beta\x20version:\x20','bun','bool','version','Checking\x20CLI\x20Built-in\x20Skill...','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Updating\x20via\x20','update','flag','source','unknown','message','596xmDeUh','cwd','skipped','\x20→\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Already\x20up\x20to\x20date\x20(v','timeout','gray','execPath','str','Update\x20available:\x20','run','\x20cli-skill\x20install','4974wrImWm','filter','3515501AQPUyx','Version\x20comparison\x20failed','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','https://registry.npmjs.org/-/package/','slice','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Already\x20on\x20requested\x20version\x20(v','entries','boolean','map','yellow','green','1765736pSRxim','470310DEXSdG','json','succeed','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Checking\x20for\x20updates...','2031504wdayWG','1465ntILTn','valid','12oUfUcD','skills','validation','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'];a40_0xd5f9=function(){return _0x45117f;};return a40_0xd5f9();}function shouldInstallTarget(_0x437a44,_0x2da4b7){const _0x6fe57e=a40_0x276a61;if(_0x2da4b7[_0x6fe57e(0xc6)]===_0x6fe57e(0xc0)||_0x2da4b7[_0x6fe57e(0xc6)]===_0x6fe57e(0xb2))return!a40_0x4edd07['eq'](_0x437a44,_0x2da4b7[_0x6fe57e(0xc0)]);return a40_0x4edd07['lt'](_0x437a44,_0x2da4b7[_0x6fe57e(0xc0)]);}function getInstallPlanLabel(_0x37da43,_0x239b84){const _0x18ceb9=a40_0x276a61;switch(_0x239b84['source']){case'beta':return _0x18ceb9(0xbd)+a40_0x2b42e5[_0x18ceb9(0x91)](_0x37da43)+_0x18ceb9(0xcc)+a40_0x2b42e5[_0x18ceb9(0x92)](_0x239b84['version']);case'version':return _0x18ceb9(0xb8)+a40_0x2b42e5[_0x18ceb9(0x91)](_0x37da43)+_0x18ceb9(0xcc)+a40_0x2b42e5[_0x18ceb9(0x92)](_0x239b84['version']);case _0x18ceb9(0xa5):default:return _0x18ceb9(0x82)+a40_0x2b42e5[_0x18ceb9(0x91)](_0x37da43)+_0x18ceb9(0xcc)+a40_0x2b42e5['green'](_0x239b84[_0x18ceb9(0xc0)]);}}async function installCliSkill(_0x2ae5f3){const _0x1b9048=a40_0x276a61;console['log'](a40_0x2b42e5['gray'](_0x1b9048(0xc1)));const _0x5f221a=runNpxSkillsAddGlobal(process[_0x1b9048(0xca)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x2ae5f3?_0x1b9048(0xa7):'inherit'});if(_0x5f221a[_0x1b9048(0xcb)]){console[_0x1b9048(0xab)](a40_0x2b42e5[_0x1b9048(0xd0)](_0x1b9048(0x97)));return;}if(_0x5f221a['ok']){console['log'](a40_0x2b42e5[_0x1b9048(0xd0)](_0x1b9048(0xac)));return;}console[_0x1b9048(0xb6)](a40_0x2b42e5[_0x1b9048(0x91)](_0x1b9048(0xcd)+(_0x5f221a['error']||_0x1b9048(0xc7)))),console[_0x1b9048(0xab)](a40_0x2b42e5[_0x1b9048(0xd0)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x1b9048(0x84)));}async function execute(_0x106eef){const _0x495bb1=a40_0x276a61;await validateUpdateFlags(_0x106eef);const _0x1bf78b=getCurrentVersion();console[_0x495bb1(0xab)]('Current\x20version:\x20'+_0x1bf78b);const _0xf9cf92=a40_0x818d47(_0x495bb1(0x98))[_0x495bb1(0xa4)](),_0xa76f48=await resolveTargetVersion(_0x106eef);if(!_0xa76f48){const _0x51c81b=_0x106eef[_0x495bb1(0xbf)](_0x495bb1(0xb2))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0xf9cf92[_0x495bb1(0xb7)](_0x51c81b),console[_0x495bb1(0xab)](a40_0x2b42e5[_0x495bb1(0xd0)](_0x495bb1(0x9f)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x51c81b};}const _0xa4cb4e=a40_0x4edd07['valid'](VERSION),_0x14fe7c=a40_0x4edd07['valid'](_0xa76f48[_0x495bb1(0xc0)]);if(!_0xa4cb4e||!_0x14fe7c)return _0xf9cf92[_0x495bb1(0xb7)](_0x495bb1(0x88)),{'ok':![],'message':_0x495bb1(0x88)};if(!shouldInstallTarget(_0xa4cb4e,_0xa76f48)){const _0x2d8e70=_0xa76f48[_0x495bb1(0xc6)]===_0x495bb1(0xc0)?_0x495bb1(0x8d)+_0xa76f48['version']+')':_0x495bb1(0xce)+_0xa76f48[_0x495bb1(0xc0)]+')';return _0xf9cf92[_0x495bb1(0x96)](_0x2d8e70),shouldSkipCliSkill(_0x106eef)?console[_0x495bb1(0xab)](a40_0x2b42e5['gray']('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x106eef[_0x495bb1(0xae)]),{'ok':!![]};}_0xf9cf92[_0x495bb1(0xb1)](getInstallPlanLabel(_0x1bf78b,_0xa76f48));const _0x287259=detectPackageManager(),_0x5dd647=_0x287259===_0x495bb1(0xa3)?resolveNpmBin(_0x495bb1(0xa3)):_0x287259,_0x3d1920=a40_0x818d47(_0x495bb1(0xc3)+_0x287259+'...')[_0x495bb1(0xa4)]();try{return await execa(_0x5dd647,[_0x495bb1(0xa2),'-g',NPM_PACKAGE_NAME+'@'+_0xa76f48[_0x495bb1(0xc0)]],{'stdio':_0x495bb1(0xa7)}),_0x3d1920[_0x495bb1(0x96)]('Updated\x20to\x20v'+_0xa76f48[_0x495bb1(0xc0)]),console['log'](a40_0x2b42e5[_0x495bb1(0xd0)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x106eef)?console[_0x495bb1(0xab)](a40_0x2b42e5[_0x495bb1(0xd0)](_0x495bb1(0x8c))):await installCliSkill(_0x106eef[_0x495bb1(0xae)]),{'ok':!![]};}catch(_0x2e2e77){return _0x3d1920[_0x495bb1(0xb7)](_0x495bb1(0xaa)),console[_0x495bb1(0xa9)](a40_0x2b42e5['red']('\x20\x20'+_0x2e2e77[_0x495bb1(0xc8)])),console[_0x495bb1(0xab)](a40_0x2b42e5[_0x495bb1(0xd0)](_0x495bb1(0xa8)+_0x287259+_0x495bb1(0xbc)+NPM_PACKAGE_NAME+'@'+_0xa76f48['version'])),{'ok':![],'message':_0x2e2e77[_0x495bb1(0xc8)]};}}export const updateDefinition={'service':a40_0x276a61(0xc4),'command':a40_0x276a61(0x83),'description':a40_0x276a61(0x89),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x2d3813,_0x2a891e){const _0x5c9aeb=a41_0x54fd,_0x2a51b3=_0x2d3813();while(!![]){try{const _0x2e9b1c=-parseInt(_0x5c9aeb(0x8b))/0x1+parseInt(_0x5c9aeb(0x8e))/0x2+-parseInt(_0x5c9aeb(0x8d))/0x3*(parseInt(_0x5c9aeb(0x94))/0x4)+-parseInt(_0x5c9aeb(0x8f))/0x5*(-parseInt(_0x5c9aeb(0x95))/0x6)+-parseInt(_0x5c9aeb(0x91))/0x7+parseInt(_0x5c9aeb(0x8c))/0x8*(parseInt(_0x5c9aeb(0x93))/0x9)+parseInt(_0x5c9aeb(0x90))/0xa*(-parseInt(_0x5c9aeb(0x92))/0xb);if(_0x2e9b1c===_0x2a891e)break;else _0x2a51b3['push'](_0x2a51b3['shift']());}catch(_0x50401c){_0x2a51b3['push'](_0x2a51b3['shift']());}}}(a41_0x1013,0xe8bcb));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x1013(){const _0xbfdf18=['866838HbaEan','381928ywllWo','76878PrXttl','2369382PmDaUT','7585535vfSffG','10ATvpds','933429PffCBf','14722455csctrK','261taaipo','124uyxAer','6nqgzfR'];a41_0x1013=function(){return _0xbfdf18;};return a41_0x1013();}function a41_0x54fd(_0x48d017,_0x32dc2f){_0x48d017=_0x48d017-0x8b;const _0x1013de=a41_0x1013();let _0x54fd13=_0x1013de[_0x48d017];return _0x54fd13;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0xaba71,_0x5dc907){const _0x9f59ba=a41_0x318a,_0x50c431=_0xaba71();while(!![]){try{const _0x1308e0=parseInt(_0x9f59ba(0x131))/0x1*(parseInt(_0x9f59ba(0x135))/0x2)+parseInt(_0x9f59ba(0x132))/0x3*(parseInt(_0x9f59ba(0x12d))/0x4)+parseInt(_0x9f59ba(0x139))/0x5*(parseInt(_0x9f59ba(0x137))/0x6)+-parseInt(_0x9f59ba(0x138))/0x7*(-parseInt(_0x9f59ba(0x12e))/0x8)+parseInt(_0x9f59ba(0x130))/0x9*(-parseInt(_0x9f59ba(0x13a))/0xa)+-parseInt(_0x9f59ba(0x134))/0xb*(-parseInt(_0x9f59ba(0x133))/0xc)+parseInt(_0x9f59ba(0x136))/0xd*(-parseInt(_0x9f59ba(0x12f))/0xe);if(_0x1308e0===_0x5dc907)break;else _0x50c431['push'](_0x50c431['shift']());}catch(_0x247d06){_0x50c431['push'](_0x50c431['shift']());}}}(a41_0x503a,0xa1ea7));function a41_0x318a(_0x17e3f2,_0x5742a7){_0x17e3f2=_0x17e3f2-0x12d;const _0x503a82=a41_0x503a();let _0x318a00=_0x503a82[_0x17e3f2];return _0x318a00;}function a41_0x503a(){const _0x40bf01=['2597704NxpDyr','8uWicVB','870814hOZGfl','9ivmMTQ','166154ibNDtB','3aPyrky','183204GBwrrS','462iOPQXy','10zZgtBh','559Nippfm','16746rhZkLM','7030121VsAsYT','1180XTFLVL','4465390CNVUUF'];a41_0x503a=function(){return _0x40bf01;};return a41_0x503a();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a42_0x4fce07=a42_0x2d12;(function(_0x4c4b94,_0x20ecb0){const _0x55b693=a42_0x2d12,_0x160c2f=_0x4c4b94();while(!![]){try{const _0x4ed6b2=-parseInt(_0x55b693(0x1f5))/0x1+parseInt(_0x55b693(0x1f6))/0x2*(-parseInt(_0x55b693(0x1ec))/0x3)+parseInt(_0x55b693(0x1eb))/0x4*(parseInt(_0x55b693(0x1ee))/0x5)+-parseInt(_0x55b693(0x1ea))/0x6+parseInt(_0x55b693(0x1ef))/0x7+-parseInt(_0x55b693(0x1e5))/0x8+parseInt(_0x55b693(0x1ed))/0x9;if(_0x4ed6b2===_0x20ecb0)break;else _0x160c2f['push'](_0x160c2f['shift']());}catch(_0xe55546){_0x160c2f['push'](_0x160c2f['shift']());}}}(a42_0x3b44,0x4dd7e));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x4fce07(0x1e8),'command':'sdk','description':a42_0x4fce07(0x1e3),'risk':a42_0x4fce07(0x1f0),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x4fce07(0x1f3),'type':'string','required':!![],'description':a42_0x4fce07(0x1f4)},{'name':a42_0x4fce07(0x1e4),'type':a42_0x4fce07(0x1e7),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x969f2e){const _0x512c1e=a42_0x4fce07,{dataset:_0x2dd1cb,operation:_0x2326fe}=await getOperationDetail(_0x969f2e[_0x512c1e(0x1f2)],_0x969f2e['str'](_0x512c1e(0x1e2)),_0x969f2e[_0x512c1e(0x1e6)](_0x512c1e(0x1f3))),_0x1b1c3d=generateSdkCode(_0x2dd1cb,_0x2326fe,{'includeImports':!_0x969f2e[_0x512c1e(0x1e9)](_0x512c1e(0x1e4))});return{'ok':!![],'data':{'dataset':{'name':_0x2dd1cb[_0x512c1e(0x1f1)],'code':_0x2dd1cb[_0x512c1e(0x1e2)],'tableName':_0x2dd1cb['tableName']},'operation':_0x969f2e[_0x512c1e(0x1e6)](_0x512c1e(0x1f3)),'code':_0x1b1c3d}};}};function a42_0x2d12(_0x3f25cb,_0x45422c){_0x3f25cb=_0x3f25cb-0x1e2;const _0x3b44a7=a42_0x3b44();let _0x2d12dd=_0x3b44a7[_0x3f25cb];return _0x2d12dd;}function a42_0x3b44(){const _0x49caab=['codegen','bool','1415436FaLyOI','18288jdhKSj','2841JMXgaj','10262952JGbrKc','65XACcPl','459746YwscTY','read','name','appCode','operation','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','353403JTpOEi','582crVqDS','code','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','skip-imports','653680hgIvqP','str','boolean'];a42_0x3b44=function(){return _0x49caab;};return a42_0x3b44();}
1
+ const a42_0x3f2535=a42_0x1dbe;(function(_0x26f6c5,_0x2e425b){const _0x396f8a=a42_0x1dbe,_0x381d55=_0x26f6c5();while(!![]){try{const _0xbd08e3=-parseInt(_0x396f8a(0x187))/0x1*(-parseInt(_0x396f8a(0x196))/0x2)+-parseInt(_0x396f8a(0x186))/0x3*(parseInt(_0x396f8a(0x18e))/0x4)+parseInt(_0x396f8a(0x184))/0x5+-parseInt(_0x396f8a(0x194))/0x6+parseInt(_0x396f8a(0x18c))/0x7*(parseInt(_0x396f8a(0x19b))/0x8)+parseInt(_0x396f8a(0x188))/0x9*(parseInt(_0x396f8a(0x195))/0xa)+parseInt(_0x396f8a(0x18a))/0xb*(-parseInt(_0x396f8a(0x193))/0xc);if(_0xbd08e3===_0x2e425b)break;else _0x381d55['push'](_0x381d55['shift']());}catch(_0x1fe975){_0x381d55['push'](_0x381d55['shift']());}}}(a42_0x16f9,0x5ec69));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x16f9(){const _0x4b3047=['bool','str','144pltFYe','4068540BYFGPv','165050XWHdap','2324fIiGDT','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','boolean','appCode','code','496dBYpMI','read','1500065jjZScT','operation','1943433asiOGi','647nRyvKM','9NYSeOd','skip-imports','102036EtKxCN','alias','85477pAIAOw','string','4IqelZY','tableName','sdk'];a42_0x16f9=function(){return _0x4b3047;};return a42_0x16f9();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x1dbe(_0x2fdcb7,_0x367ea8){_0x2fdcb7=_0x2fdcb7-0x184;const _0x16f902=a42_0x16f9();let _0x1dbe50=_0x16f902[_0x2fdcb7];return _0x1dbe50;}export const codegenSdk={'service':'codegen','command':a42_0x3f2535(0x190),'description':a42_0x3f2535(0x197),'risk':a42_0x3f2535(0x19c),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x3f2535(0x18b),'type':a42_0x3f2535(0x18d),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x3f2535(0x185),'type':a42_0x3f2535(0x18d),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a42_0x3f2535(0x189),'type':a42_0x3f2535(0x198),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x4e494e){const _0x23892b=a42_0x3f2535,{dataset:_0x5a1aa4,operation:_0x368c87}=await getOperationDetail(_0x4e494e[_0x23892b(0x199)],_0x4e494e[_0x23892b(0x192)](_0x23892b(0x19a)),_0x4e494e[_0x23892b(0x192)](_0x23892b(0x185))),_0x4ba9c6=generateSdkCode(_0x5a1aa4,_0x368c87,{'includeImports':!_0x4e494e[_0x23892b(0x191)](_0x23892b(0x189))});return{'ok':!![],'data':{'dataset':{'name':_0x5a1aa4['name'],'code':_0x5a1aa4[_0x23892b(0x19a)],'tableName':_0x5a1aa4[_0x23892b(0x18f)]},'operation':_0x4e494e[_0x23892b(0x192)](_0x23892b(0x185)),'code':_0x4ba9c6}};}};
@@ -1 +1 @@
1
- const a43_0x4a2490=a43_0x1914;function a43_0x2752(){const _0x159bfb=['Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sdk','boolean','195147vDTMFN','1344536FnbJIp','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','2148748uGjQsI','appCode','1218546lKRFTp','string','6827260mDrDdr','28825Brmmgu','target','210634kagcoE','read','Omit\x20import\x20statements\x20from\x20generated\x20code','str','sql','210xDlxNt','8egDwKC','2QeySyB','no-imports','codegen'];a43_0x2752=function(){return _0x159bfb;};return a43_0x2752();}function a43_0x1914(_0x105f25,_0x2fd1fc){_0x105f25=_0x105f25-0x101;const _0x2752c9=a43_0x2752();let _0x191419=_0x2752c9[_0x105f25];return _0x191419;}(function(_0x1b2961,_0x52d9a2){const _0x1606b1=a43_0x1914,_0x37bc68=_0x1b2961();while(!![]){try{const _0x4181a0=parseInt(_0x1606b1(0x113))/0x1+parseInt(_0x1606b1(0x103))/0x2*(-parseInt(_0x1606b1(0x10e))/0x3)+-parseInt(_0x1606b1(0x10a))/0x4+-parseInt(_0x1606b1(0x111))/0x5*(parseInt(_0x1606b1(0x101))/0x6)+parseInt(_0x1606b1(0x10c))/0x7+parseInt(_0x1606b1(0x102))/0x8*(-parseInt(_0x1606b1(0x109))/0x9)+parseInt(_0x1606b1(0x110))/0xa;if(_0x4181a0===_0x52d9a2)break;else _0x37bc68['push'](_0x37bc68['shift']());}catch(_0x5d2699){_0x37bc68['push'](_0x37bc68['shift']());}}}(a43_0x2752,0x39436));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x4a2490(0x105),'command':a43_0x4a2490(0x117),'description':a43_0x4a2490(0x10b),'risk':a43_0x4a2490(0x114),'flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x4a2490(0x10f),'description':a43_0x4a2490(0x106),'default':a43_0x4a2490(0x107),'enum':[a43_0x4a2490(0x107),'bff']},{'name':'no-imports','type':a43_0x4a2490(0x108),'description':a43_0x4a2490(0x115)}],async 'execute'(_0x5affa5){const _0x50a792=a43_0x4a2490,_0x4f7278=await getSqlQueryInfo(_0x5affa5[_0x50a792(0x10d)],_0x5affa5[_0x50a792(0x116)]('sqlcode')),_0x8292f=_0x5affa5[_0x50a792(0x116)](_0x50a792(0x112))||_0x50a792(0x107),_0x2b3bc6=generateSqlCodeTemplate(_0x4f7278,{'target':_0x8292f,'includeImports':!_0x5affa5['bool'](_0x50a792(0x104))});return{'ok':!![],'data':{'sqlCode':_0x4f7278['sqlCode'],'sqlName':_0x4f7278['sqlName'],'target':_0x8292f,'code':_0x2b3bc6}};}};
1
+ const a43_0x10a0d5=a43_0x4fb0;(function(_0x332118,_0x26bf7a){const _0x5600f4=a43_0x4fb0,_0x517575=_0x332118();while(!![]){try{const _0xbe96fb=parseInt(_0x5600f4(0x1b7))/0x1*(parseInt(_0x5600f4(0x1c6))/0x2)+parseInt(_0x5600f4(0x1bc))/0x3*(-parseInt(_0x5600f4(0x1b8))/0x4)+parseInt(_0x5600f4(0x1c4))/0x5+-parseInt(_0x5600f4(0x1ba))/0x6+-parseInt(_0x5600f4(0x1b4))/0x7+parseInt(_0x5600f4(0x1c3))/0x8+parseInt(_0x5600f4(0x1b9))/0x9;if(_0xbe96fb===_0x26bf7a)break;else _0x517575['push'](_0x517575['shift']());}catch(_0x465ceb){_0x517575['push'](_0x517575['shift']());}}}(a43_0x5a64,0x36a1c));function a43_0x5a64(){const _0x15248a=['3206720mxGEBS','1053605oRsgLD','sqlCode','4KCCtYG','read','boolean','string','str','2096430VgDwMy','Omit\x20import\x20statements\x20from\x20generated\x20code','bool','155464XSnIAj','152gGDJYo','448461wYzaVX','2268888bGphTy','appCode','5598ggkFOQ','no-imports','sqlName','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','codegen','sdk','bff'];a43_0x5a64=function(){return _0x15248a;};return a43_0x5a64();}function a43_0x4fb0(_0xb32402,_0x235ffe){_0xb32402=_0xb32402-0x1b0;const _0x5a6491=a43_0x5a64();let _0x4fb095=_0x5a6491[_0xb32402];return _0x4fb095;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x10a0d5(0x1c0),'command':'sql','description':a43_0x10a0d5(0x1bf),'risk':a43_0x10a0d5(0x1b0),'flags':[SQLCODE_FLAG,{'name':'target','type':a43_0x10a0d5(0x1b2),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x10a0d5(0x1c1),'enum':['sdk',a43_0x10a0d5(0x1c2)]},{'name':'no-imports','type':a43_0x10a0d5(0x1b1),'description':a43_0x10a0d5(0x1b5)}],async 'execute'(_0x4eb735){const _0x1cb5ed=a43_0x10a0d5,_0x585252=await getSqlQueryInfo(_0x4eb735[_0x1cb5ed(0x1bb)],_0x4eb735['str']('sqlcode')),_0x2c2a8f=_0x4eb735[_0x1cb5ed(0x1b3)]('target')||_0x1cb5ed(0x1c1),_0x32bcfe=generateSqlCodeTemplate(_0x585252,{'target':_0x2c2a8f,'includeImports':!_0x4eb735[_0x1cb5ed(0x1b6)](_0x1cb5ed(0x1bd))});return{'ok':!![],'data':{'sqlCode':_0x585252[_0x1cb5ed(0x1c5)],'sqlName':_0x585252[_0x1cb5ed(0x1be)],'target':_0x2c2a8f,'code':_0x32bcfe}};}};
@@ -1 +1 @@
1
- function a44_0x8633(){const _0x1f86d3=['\x20app\x20\x22','projectConfig','global','inherit','Added','432444eThdDq','Missing\x20app\x20name.','3120jIPhCt','\x20<name>\x20--appcode\x20<code>','flagMissing','project','\x20<name>','object','270RBokBS','bool','\x22\x20still\x20defined\x20in\x20','2838012ZebCNx','validation','\x20Default\x20app\x20changed\x20to\x20\x22','apps','14VrKWtI','Use\x20global\x20config\x20scope','9444VywAQa','11XvFJGO','length','keys','Updated','336681hiZeMQ','args','string','\x20<name>\x20[--global]','\x20Note:\x20app\x20\x22','globalConfig','boolean','35252016TaJAxD','str','2tzNGWg','appcode','both','App\x20\x22','Usage:\x20','trim','5083864VKiyUq','1166497zrRWpr','defaultApp'];a44_0x8633=function(){return _0x1f86d3;};return a44_0x8633();}(function(_0x3df2cf,_0x283257){const _0x43d633=a44_0x3bce,_0x1526a5=_0x3df2cf();while(!![]){try{const _0x26e9b3=-parseInt(_0x43d633(0x1ad))/0x1*(-parseInt(_0x43d633(0x1d3))/0x2)+-parseInt(_0x43d633(0x1b4))/0x3+-parseInt(_0x43d633(0x1bf))/0x4+parseInt(_0x43d633(0x1b6))/0x5*(parseInt(_0x43d633(0x1c5))/0x6)+parseInt(_0x43d633(0x1c3))/0x7*(parseInt(_0x43d633(0x1ac))/0x8)+-parseInt(_0x43d633(0x1ca))/0x9*(-parseInt(_0x43d633(0x1bc))/0xa)+parseInt(_0x43d633(0x1c6))/0xb*(-parseInt(_0x43d633(0x1d1))/0xc);if(_0x26e9b3===_0x283257)break;else _0x1526a5['push'](_0x1526a5['shift']());}catch(_0x29d227){_0x1526a5['push'](_0x1526a5['shift']());}}}(a44_0x8633,0x9bd9b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a44_0x3bce(_0x397935,_0x480e6a){_0x397935=_0x397935-0x1ac;const _0x86334=a44_0x8633();let _0x3bce4c=_0x86334[_0x397935];return _0x3bce4c;}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x1ca332=a44_0x3bce;return[{'name':_0x1ca332(0x1d4),'type':_0x1ca332(0x1cc),'description':'App\x20code','required':!![]},{'name':_0x1ca332(0x1b1),'type':_0x1ca332(0x1d0),'description':_0x1ca332(0x1c4),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x3964b0=a44_0x3bce;return[{'name':_0x3964b0(0x1b1),'type':'boolean','description':_0x3964b0(0x1c4),'default':![]}];}export async function validateAppName(_0x2d1040,_0x334fe1){const _0x3a31fc=a44_0x3bce,_0x59e651=_0x2d1040[_0x3a31fc(0x1cb)][0x0]?.['trim']();if(!_0x59e651)throw CliErrors[_0x3a31fc(0x1c0)](_0x3a31fc(0x1b5),_0x3a31fc(0x1d7)+CLI_BIN_NAME+'\x20'+_0x334fe1+_0x3a31fc(0x1ba));}export async function runAppAdd(_0x409e18,_0x317e6a){const _0x2c3331=a44_0x3bce,_0x18cd3d=_0x409e18[_0x2c3331(0x1cb)][0x0]?.[_0x2c3331(0x1d8)]();if(!_0x18cd3d)throw CliErrors['validation'](_0x2c3331(0x1b5),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x317e6a+_0x2c3331(0x1b7));const _0x2d70c1=_0x409e18['str'](_0x2c3331(0x1d4));if(!_0x2d70c1)throw CliErrors[_0x2c3331(0x1b8)](_0x2c3331(0x1d4),_0x2c3331(0x1d7)+CLI_BIN_NAME+'\x20'+_0x317e6a+'\x20<name>\x20--appcode\x20<code>');const _0x3690bf={'global':_0x409e18['bool'](_0x2c3331(0x1b1))},_0x1da9b3=readConfig(_0x3690bf);if(!_0x1da9b3[_0x2c3331(0x1c2)])_0x1da9b3[_0x2c3331(0x1c2)]={};const _0x19f7a0={'appcode':_0x2d70c1,...collectAppProfileOverrides(_0x247c04=>_0x409e18[_0x2c3331(0x1d2)](_0x247c04))},_0x2843f0=_0x1da9b3[_0x2c3331(0x1c2)],_0x2d6a28=!!_0x2843f0[_0x18cd3d];_0x2843f0[_0x18cd3d]=_0x19f7a0;if(!_0x1da9b3[_0x2c3331(0x1ae)])_0x1da9b3[_0x2c3331(0x1ae)]=_0x18cd3d;writeConfig(_0x1da9b3,_0x3690bf);const _0x3436e0=!_0x2d6a28&&_0x1da9b3['defaultApp']===_0x18cd3d?'\x20Set\x20as\x20default\x20app.':'',_0x43ef94=(_0x2d6a28?_0x2c3331(0x1c9):_0x2c3331(0x1b3))+_0x2c3331(0x1af)+_0x18cd3d+'\x22\x20(appcode:\x20'+_0x2d70c1+')'+scopeLabel(_0x3690bf)+'.'+_0x3436e0;return{'ok':!![],'message':_0x43ef94};}export async function runAppRemove(_0x1bc6bb,_0x36ebab){const _0x303efe=a44_0x3bce,_0xedf7c0=_0x1bc6bb['args'][0x0]?.['trim']();if(!_0xedf7c0)throw CliErrors['validation'](_0x303efe(0x1b5),_0x303efe(0x1d7)+CLI_BIN_NAME+'\x20'+_0x36ebab+_0x303efe(0x1cd));const _0x4a2655=_0x1bc6bb[_0x303efe(0x1bd)](_0x303efe(0x1b1)),{config:_0x3ab2c4,layers:_0x4737bc}=readRawConfigWithLayers(),_0x1aefbf=_0x3ab2c4[_0x303efe(0x1c2)]??{};if(!_0x1aefbf[_0xedf7c0])throw CliErrors[_0x303efe(0x1c0)](_0x303efe(0x1d6)+_0xedf7c0+'\x22\x20not\x20found.');const _0x300257=_0x4737bc['globalConfig'][_0x303efe(0x1c2)]&&typeof _0x4737bc[_0x303efe(0x1cf)][_0x303efe(0x1c2)]==='object'?_0x4737bc[_0x303efe(0x1cf)][_0x303efe(0x1c2)]:{},_0x524540=_0x4737bc['projectConfig'][_0x303efe(0x1c2)]&&typeof _0x4737bc[_0x303efe(0x1b0)][_0x303efe(0x1c2)]===_0x303efe(0x1bb)?_0x4737bc[_0x303efe(0x1b0)][_0x303efe(0x1c2)]:{},_0xe5e2e1=appDefinedIn(_0xedf7c0,_0x300257,_0x524540,_0x4737bc[_0x303efe(0x1b0)][_0x303efe(0x1b2)]===![]),_0x5166b1=resolveAppScopeForWrite(_0xedf7c0,_0x4a2655,_0x4737bc),_0x23cb12={'global':_0x5166b1===_0x303efe(0x1b1)},_0x5f40a7=readConfig(_0x23cb12),_0x25ce45=_0x5f40a7['apps'];if(!_0x25ce45||!_0x25ce45[_0xedf7c0])throw CliErrors[_0x303efe(0x1c0)](_0x303efe(0x1d6)+_0xedf7c0+'\x22\x20not\x20found.');delete _0x25ce45[_0xedf7c0];let _0x361054='';if(_0x5f40a7[_0x303efe(0x1ae)]===_0xedf7c0){const _0x1fb5d3=Object[_0x303efe(0x1c8)](_0x25ce45);_0x5f40a7[_0x303efe(0x1ae)]=_0x1fb5d3['length']>0x0?_0x1fb5d3[0x0]:undefined,_0x5f40a7['defaultApp']?_0x361054=_0x303efe(0x1c1)+_0x5f40a7[_0x303efe(0x1ae)]+'\x22.':delete _0x5f40a7[_0x303efe(0x1ae)];}Object[_0x303efe(0x1c8)](_0x25ce45)[_0x303efe(0x1c7)]===0x0&&(delete _0x5f40a7[_0x303efe(0x1c2)],delete _0x5f40a7[_0x303efe(0x1ae)]);writeConfig(_0x5f40a7,_0x23cb12);const _0x5c1ea6=_0xe5e2e1===_0x303efe(0x1d5)?_0x303efe(0x1ce)+_0xedf7c0+_0x303efe(0x1be)+(_0x5166b1===_0x303efe(0x1b9)?_0x303efe(0x1b1):_0x303efe(0x1b9))+'\x20config.':'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0xedf7c0+'\x22'+scopeLabel(_0x23cb12)+'.'+_0x361054+_0x5c1ea6};}
1
+ (function(_0x4e84e3,_0x18267d){const _0x48024c=a44_0x2bc6,_0x4ef109=_0x4e84e3();while(!![]){try{const _0xc27608=parseInt(_0x48024c(0x1c5))/0x1+-parseInt(_0x48024c(0x1b5))/0x2*(-parseInt(_0x48024c(0x1ad))/0x3)+-parseInt(_0x48024c(0x1c4))/0x4+parseInt(_0x48024c(0x1b2))/0x5+-parseInt(_0x48024c(0x1a1))/0x6+parseInt(_0x48024c(0x1bc))/0x7+-parseInt(_0x48024c(0x1ba))/0x8*(parseInt(_0x48024c(0x1a3))/0x9);if(_0xc27608===_0x18267d)break;else _0x4ef109['push'](_0x4ef109['shift']());}catch(_0x367027){_0x4ef109['push'](_0x4ef109['shift']());}}}(a44_0x1201,0x2ebc7));import{CliErrors}from'../../errors.js';function a44_0x2bc6(_0x25e77a,_0x36e9e9){_0x25e77a=_0x25e77a-0x19a;const _0x120139=a44_0x1201();let _0x2bc67e=_0x120139[_0x25e77a];return _0x2bc67e;}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 _0x20f83b=a44_0x2bc6;return[{'name':_0x20f83b(0x1b1),'type':_0x20f83b(0x1a9),'description':_0x20f83b(0x19d),'required':!![]},{'name':'global','type':_0x20f83b(0x19c),'description':_0x20f83b(0x1a6),'default':![]},...getAppProfileFlagDefs()];}function a44_0x1201(){const _0xe009d=['inherit','\x20<name>\x20--appcode\x20<code>','boolean','App\x20code','Added','\x22\x20still\x20defined\x20in\x20','global','604404vJupGQ','defaultApp','2417139JzvZZE','\x22\x20not\x20found.','App\x20\x22','Use\x20global\x20config\x20scope','\x20<name>\x20[--global]','\x20app\x20\x22','string','validation','globalConfig','\x22\x20(appcode:\x20','567753EnwaIz','object','\x20Default\x20app\x20changed\x20to\x20\x22','bool','appcode','1174855rTkwUH','Missing\x20app\x20name.','project','2QYWYUg','projectConfig','\x20config.','Updated','\x20<name>','8rCHpGK','flagMissing','1539510CTjswy','args','both','apps','keys','length','str','Usage:\x20','922136FrLKZw','147118WsgeNi'];a44_0x1201=function(){return _0xe009d;};return a44_0x1201();}export function buildAppRemoveFlags(){const _0x4e5ec6=a44_0x2bc6;return[{'name':_0x4e5ec6(0x1a0),'type':_0x4e5ec6(0x19c),'description':_0x4e5ec6(0x1a6),'default':![]}];}export async function validateAppName(_0x337777,_0x5dbd82){const _0x2d1488=a44_0x2bc6,_0x6a7e38=_0x337777['args'][0x0]?.['trim']();if(!_0x6a7e38)throw CliErrors[_0x2d1488(0x1aa)]('Missing\x20app\x20name.',_0x2d1488(0x1c3)+CLI_BIN_NAME+'\x20'+_0x5dbd82+_0x2d1488(0x1b9));}export async function runAppAdd(_0x5ce488,_0x275e6f){const _0x38080c=a44_0x2bc6,_0x19b3ed=_0x5ce488[_0x38080c(0x1bd)][0x0]?.['trim']();if(!_0x19b3ed)throw CliErrors[_0x38080c(0x1aa)](_0x38080c(0x1b3),_0x38080c(0x1c3)+CLI_BIN_NAME+'\x20'+_0x275e6f+_0x38080c(0x19b));const _0x3cf614=_0x5ce488[_0x38080c(0x1c2)]('appcode');if(!_0x3cf614)throw CliErrors[_0x38080c(0x1bb)](_0x38080c(0x1b1),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x275e6f+_0x38080c(0x19b));const _0x3a395b={'global':_0x5ce488[_0x38080c(0x1b0)](_0x38080c(0x1a0))},_0x5e5eee=readConfig(_0x3a395b);if(!_0x5e5eee[_0x38080c(0x1bf)])_0x5e5eee[_0x38080c(0x1bf)]={};const _0x20d71c={'appcode':_0x3cf614,...collectAppProfileOverrides(_0x464023=>_0x5ce488[_0x38080c(0x1c2)](_0x464023))},_0x6cdf89=_0x5e5eee[_0x38080c(0x1bf)],_0xf9c3c1=!!_0x6cdf89[_0x19b3ed];_0x6cdf89[_0x19b3ed]=_0x20d71c;if(!_0x5e5eee[_0x38080c(0x1a2)])_0x5e5eee[_0x38080c(0x1a2)]=_0x19b3ed;writeConfig(_0x5e5eee,_0x3a395b);const _0x57e790=!_0xf9c3c1&&_0x5e5eee[_0x38080c(0x1a2)]===_0x19b3ed?'\x20Set\x20as\x20default\x20app.':'',_0x38b9c9=(_0xf9c3c1?_0x38080c(0x1b8):_0x38080c(0x19e))+_0x38080c(0x1a8)+_0x19b3ed+_0x38080c(0x1ac)+_0x3cf614+')'+scopeLabel(_0x3a395b)+'.'+_0x57e790;return{'ok':!![],'message':_0x38b9c9};}export async function runAppRemove(_0x972644,_0x5816e2){const _0x4595a8=a44_0x2bc6,_0x2728af=_0x972644[_0x4595a8(0x1bd)][0x0]?.['trim']();if(!_0x2728af)throw CliErrors[_0x4595a8(0x1aa)]('Missing\x20app\x20name.','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x5816e2+_0x4595a8(0x1a7));const _0x2cea94=_0x972644[_0x4595a8(0x1b0)](_0x4595a8(0x1a0)),{config:_0xad82aa,layers:_0x5696b0}=readRawConfigWithLayers(),_0x59ef76=_0xad82aa['apps']??{};if(!_0x59ef76[_0x2728af])throw CliErrors[_0x4595a8(0x1aa)]('App\x20\x22'+_0x2728af+_0x4595a8(0x1a4));const _0x2cbfb0=_0x5696b0[_0x4595a8(0x1ab)][_0x4595a8(0x1bf)]&&typeof _0x5696b0['globalConfig']['apps']==='object'?_0x5696b0['globalConfig']['apps']:{},_0x47abbc=_0x5696b0[_0x4595a8(0x1b6)][_0x4595a8(0x1bf)]&&typeof _0x5696b0['projectConfig'][_0x4595a8(0x1bf)]===_0x4595a8(0x1ae)?_0x5696b0[_0x4595a8(0x1b6)][_0x4595a8(0x1bf)]:{},_0x1063fd=appDefinedIn(_0x2728af,_0x2cbfb0,_0x47abbc,_0x5696b0[_0x4595a8(0x1b6)][_0x4595a8(0x19a)]===![]),_0xaf9f6a=resolveAppScopeForWrite(_0x2728af,_0x2cea94,_0x5696b0),_0x55f699={'global':_0xaf9f6a===_0x4595a8(0x1a0)},_0xb25b0f=readConfig(_0x55f699),_0x51729b=_0xb25b0f[_0x4595a8(0x1bf)];if(!_0x51729b||!_0x51729b[_0x2728af])throw CliErrors[_0x4595a8(0x1aa)](_0x4595a8(0x1a5)+_0x2728af+_0x4595a8(0x1a4));delete _0x51729b[_0x2728af];let _0x3ad17d='';if(_0xb25b0f['defaultApp']===_0x2728af){const _0x30d5c8=Object[_0x4595a8(0x1c0)](_0x51729b);_0xb25b0f[_0x4595a8(0x1a2)]=_0x30d5c8['length']>0x0?_0x30d5c8[0x0]:undefined,_0xb25b0f['defaultApp']?_0x3ad17d=_0x4595a8(0x1af)+_0xb25b0f[_0x4595a8(0x1a2)]+'\x22.':delete _0xb25b0f[_0x4595a8(0x1a2)];}Object[_0x4595a8(0x1c0)](_0x51729b)[_0x4595a8(0x1c1)]===0x0&&(delete _0xb25b0f['apps'],delete _0xb25b0f[_0x4595a8(0x1a2)]);writeConfig(_0xb25b0f,_0x55f699);const _0x10ef58=_0x1063fd===_0x4595a8(0x1be)?'\x20Note:\x20app\x20\x22'+_0x2728af+_0x4595a8(0x19f)+(_0xaf9f6a===_0x4595a8(0x1b4)?_0x4595a8(0x1a0):_0x4595a8(0x1b4))+_0x4595a8(0x1b7):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x2728af+'\x22'+scopeLabel(_0x55f699)+'.'+_0x3ad17d+_0x10ef58};}
@@ -1 +1 @@
1
- (function(_0x349c5d,_0x3eea97){const _0x225f42=a45_0x288e,_0x3a5bd7=_0x349c5d();while(!![]){try{const _0x4cb997=-parseInt(_0x225f42(0xf7))/0x1*(-parseInt(_0x225f42(0x105))/0x2)+parseInt(_0x225f42(0x10c))/0x3*(-parseInt(_0x225f42(0x109))/0x4)+-parseInt(_0x225f42(0xfd))/0x5+-parseInt(_0x225f42(0xf2))/0x6+-parseInt(_0x225f42(0x116))/0x7+parseInt(_0x225f42(0xfe))/0x8+parseInt(_0x225f42(0x113))/0x9;if(_0x4cb997===_0x3eea97)break;else _0x3a5bd7['push'](_0x3a5bd7['shift']());}catch(_0x400c89){_0x3a5bd7['push'](_0x3a5bd7['shift']());}}}(a45_0x27ef,0xd3d5f));function a45_0x27ef(){const _0x48da9a=['(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','获取到\x20','find','请输入\x20App\x20Code:','77054FXWSaH','includes','manual','✎\x20自定义输入\x20appcode','12664nKfVSU','请选择要绑定的应用:','正在获取可用应用列表...','42OEpBUo','appCode','Invalid\x20App\x20Code','\x0a未找到可用应用。','trim','map','未找到可用应用。','34701948ZsudYz','\x20\x20(','yellow','10259095ETqBUu','custom','8664570yZsubp','gray','message','✎\x20手动输入','App\x20Code:','4GGIQWa','valid','\x0a无法获取远程应用列表,请手动输入。','appName','无法获取远程应用列表,请手动输入。','length','997835IkdUNe','90960QivYqv','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','skip'];a45_0x27ef=function(){return _0x48da9a;};return a45_0x27ef();}import{input,checkbox,select}from'@inquirer/prompts';import a45_0x597f30 from'chalk';function a45_0x288e(_0x667788,_0x37a012){_0x667788=_0x667788-0xf2;const _0x27ef8a=a45_0x27ef();let _0x288e18=_0x27ef8a[_0x667788];return _0x288e18;}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 _0x14fa00=a45_0x288e,_0x1f5b85=await input({'message':_0x14fa00(0x104),'validate':_0x4b7e09=>{const _0x114aad=_0x14fa00,_0x288634=validateAppcode(_0x4b7e09['trim']());return _0x288634[_0x114aad(0xf8)]||_0x288634[_0x114aad(0xf4)]||_0x114aad(0x10e);}});return _0x1f5b85[_0x14fa00(0x110)]();}export async function promptAppSelection(_0x4998bd){const _0x747dbc=a45_0x288e,_0x3e9357=[{'name':a45_0x597f30[_0x747dbc(0x115)](_0x747dbc(0x108)),'value':-0x1},..._0x4998bd[_0x747dbc(0x111)]((_0x46d9fe,_0x5e5a1b)=>({'name':_0x46d9fe[_0x747dbc(0xfa)]+'\x20\x20'+a45_0x597f30[_0x747dbc(0xf3)]('('+_0x46d9fe[_0x747dbc(0x10d)]+')'),'value':_0x5e5a1b}))],_0x107cff=await checkbox({'message':_0x747dbc(0x102)+a45_0x597f30['cyan'](_0x4998bd[_0x747dbc(0xfc)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x3e9357,'loop':![]});if(_0x107cff[_0x747dbc(0x106)](-0x1))return _0x747dbc(0x117);if(_0x107cff['length']===0x0)return _0x747dbc(0x117);return _0x107cff['map'](_0x36d43e=>_0x4998bd[_0x36d43e]);}export async function promptSingleAppSelection(_0x2fddeb){const _0x33819c=a45_0x288e,_0x21ecae=[{'name':a45_0x597f30[_0x33819c(0xf3)](_0x33819c(0xff)),'value':'skip'},{'name':a45_0x597f30[_0x33819c(0x115)](_0x33819c(0x108)),'value':_0x33819c(0x117)},..._0x2fddeb['map'](_0x572f04=>({'name':_0x572f04[_0x33819c(0xfa)]+'\x20\x20'+a45_0x597f30[_0x33819c(0xf3)]('('+_0x572f04['appCode']+')'),'value':_0x572f04[_0x33819c(0x10d)]}))],_0x3f560b=await select({'message':_0x33819c(0x10a),'choices':_0x21ecae});if(_0x3f560b===_0x33819c(0x100))return _0x33819c(0x100);if(_0x3f560b===_0x33819c(0x117))return _0x33819c(0x117);return _0x2fddeb[_0x33819c(0x103)](_0x1fd870=>_0x1fd870['appCode']===_0x3f560b);}export async function selectSingleAppcode(_0x4a00b7){const _0x226da6=a45_0x288e;if(!_0x4a00b7)return writeCliSideChannelLine(a45_0x597f30['gray'](_0x226da6(0x101))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x389663;try{_0x389663=await withActiveCookie(_0x4a00b7,()=>listRemoteApps());}catch(_0x1bf5d6){writeCliSideChannelLine(a45_0x597f30[_0x226da6(0x115)](_0x226da6(0xfb)));if(_0x1bf5d6 instanceof Error)writeCliSideChannelLine(a45_0x597f30[_0x226da6(0xf3)](_0x226da6(0x114)+_0x1bf5d6['message']+')'));return _fallbackOrSkip();}if(_0x389663[_0x226da6(0xfc)]===0x0)return writeCliSideChannelLine(a45_0x597f30['yellow'](_0x226da6(0x112))),_fallbackOrSkip();const _0x17e1bc=await promptSingleAppSelection(_0x389663);if(_0x17e1bc===_0x226da6(0x100))return'';if(_0x17e1bc===_0x226da6(0x117))return promptCustomAppcode();return _0x17e1bc[_0x226da6(0x10d)];}export async function selectMultipleApps(_0x565855){const _0x25ada4=a45_0x288e;writeCliSideChannelLine(_0x25ada4(0x10b));let _0x3c1d09;try{_0x3c1d09=await withActiveCookie(_0x565855,()=>listRemoteApps());}catch(_0x46da0a){writeCliSideChannelLine(_0x25ada4(0xf9));if(_0x46da0a instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x46da0a[_0x25ada4(0xf4)]+')');return _0x25ada4(0x117);}if(_0x3c1d09[_0x25ada4(0xfc)]===0x0)return writeCliSideChannelLine(_0x25ada4(0x10f)),_0x25ada4(0x117);return promptAppSelection(_0x3c1d09);}async function _fallbackOrSkip(){const _0x300a88=a45_0x288e,_0xcbbbc3=await select({'message':_0x300a88(0xf6),'choices':[{'name':a45_0x597f30['gray']('(跳过,稍后配置)'),'value':_0x300a88(0x100)},{'name':a45_0x597f30[_0x300a88(0x115)](_0x300a88(0xf5)),'value':_0x300a88(0x107)}]});if(_0xcbbbc3===_0x300a88(0x100))return'';return promptCustomAppcode();}
1
+ (function(_0x4dba1a,_0x24fb83){const _0x50cf7d=a45_0x2449,_0x1e4593=_0x4dba1a();while(!![]){try{const _0x5b59bb=parseInt(_0x50cf7d(0x1ea))/0x1+parseInt(_0x50cf7d(0x20a))/0x2*(parseInt(_0x50cf7d(0x1f8))/0x3)+parseInt(_0x50cf7d(0x1fe))/0x4+parseInt(_0x50cf7d(0x206))/0x5*(-parseInt(_0x50cf7d(0x202))/0x6)+parseInt(_0x50cf7d(0x208))/0x7+-parseInt(_0x50cf7d(0x1f3))/0x8+parseInt(_0x50cf7d(0x1f9))/0x9;if(_0x5b59bb===_0x24fb83)break;else _0x1e4593['push'](_0x1e4593['shift']());}catch(_0xcc3ac5){_0x1e4593['push'](_0x1e4593['shift']());}}}(a45_0x51a1,0xe17e1));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x87e74a 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 _0x336b0b=a45_0x2449,_0x2de93f=await input({'message':_0x336b0b(0x205),'validate':_0x3d3ee0=>{const _0x7df40=_0x336b0b,_0x26f238=validateAppcode(_0x3d3ee0['trim']());return _0x26f238[_0x7df40(0x1ff)]||_0x26f238[_0x7df40(0x1f2)]||_0x7df40(0x1e8);}});return _0x2de93f['trim']();}function a45_0x2449(_0x3abae9,_0x158c4a){_0x3abae9=_0x3abae9-0x1e7;const _0x51a19b=a45_0x51a1();let _0x2449eb=_0x51a19b[_0x3abae9];return _0x2449eb;}function a45_0x51a1(){const _0x137fe9=['message','3371176BmTrDh','获取到\x20','(跳过,稍后配置)','skip','gray','747pfLxTH','409689GajwaM','正在获取可用应用列表...','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','✎\x20手动输入','\x0a未找到可用应用。','5579132xGOkDQ','valid','appCode','map','3301566hXRFwC','appName','custom','请输入\x20App\x20Code:','15OiTwJZ','manual','1085490xxZHCG','\x0a无法获取远程应用列表,请手动输入。','6434suPdsW','无法获取远程应用列表,请手动输入。','Invalid\x20App\x20Code','未找到可用应用。','599390LMAxuS','请选择要绑定的应用:','yellow','\x20\x20(','App\x20Code:','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','length','✎\x20自定义输入\x20appcode'];a45_0x51a1=function(){return _0x137fe9;};return a45_0x51a1();}export async function promptAppSelection(_0x80fd32){const _0x165e75=a45_0x2449,_0x24499f=[{'name':a45_0x87e74a[_0x165e75(0x1ec)](_0x165e75(0x1f1)),'value':-0x1},..._0x80fd32[_0x165e75(0x201)]((_0x4418ee,_0x3c38b7)=>({'name':_0x4418ee['appName']+'\x20\x20'+a45_0x87e74a['gray']('('+_0x4418ee[_0x165e75(0x200)]+')'),'value':_0x3c38b7}))],_0x283fab=await checkbox({'message':_0x165e75(0x1f4)+a45_0x87e74a['cyan'](_0x80fd32['length'])+_0x165e75(0x1fb),'choices':_0x24499f,'loop':![]});if(_0x283fab['includes'](-0x1))return _0x165e75(0x204);if(_0x283fab[_0x165e75(0x1f0)]===0x0)return _0x165e75(0x204);return _0x283fab[_0x165e75(0x201)](_0x241f67=>_0x80fd32[_0x241f67]);}export async function promptSingleAppSelection(_0x2ecad3){const _0x4ef21c=a45_0x2449,_0x5374f1=[{'name':a45_0x87e74a[_0x4ef21c(0x1f7)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x4ef21c(0x1f6)},{'name':a45_0x87e74a[_0x4ef21c(0x1ec)](_0x4ef21c(0x1f1)),'value':_0x4ef21c(0x204)},..._0x2ecad3[_0x4ef21c(0x201)](_0x579e60=>({'name':_0x579e60[_0x4ef21c(0x203)]+'\x20\x20'+a45_0x87e74a[_0x4ef21c(0x1f7)]('('+_0x579e60[_0x4ef21c(0x200)]+')'),'value':_0x579e60[_0x4ef21c(0x200)]}))],_0x4cfaab=await select({'message':_0x4ef21c(0x1eb),'choices':_0x5374f1});if(_0x4cfaab===_0x4ef21c(0x1f6))return _0x4ef21c(0x1f6);if(_0x4cfaab===_0x4ef21c(0x204))return _0x4ef21c(0x204);return _0x2ecad3['find'](_0x21b044=>_0x21b044[_0x4ef21c(0x200)]===_0x4cfaab);}export async function selectSingleAppcode(_0xd2fef){const _0x26c358=a45_0x2449;if(!_0xd2fef)return writeCliSideChannelLine(a45_0x87e74a['gray'](_0x26c358(0x1ef))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x7411ca;try{_0x7411ca=await withActiveCookie(_0xd2fef,()=>listRemoteApps());}catch(_0x4d94d5){writeCliSideChannelLine(a45_0x87e74a[_0x26c358(0x1ec)](_0x26c358(0x1e7)));if(_0x4d94d5 instanceof Error)writeCliSideChannelLine(a45_0x87e74a['gray']('\x20\x20('+_0x4d94d5['message']+')'));return _fallbackOrSkip();}if(_0x7411ca[_0x26c358(0x1f0)]===0x0)return writeCliSideChannelLine(a45_0x87e74a[_0x26c358(0x1ec)](_0x26c358(0x1e9))),_fallbackOrSkip();const _0x29c5e6=await promptSingleAppSelection(_0x7411ca);if(_0x29c5e6===_0x26c358(0x1f6))return'';if(_0x29c5e6===_0x26c358(0x204))return promptCustomAppcode();return _0x29c5e6['appCode'];}export async function selectMultipleApps(_0x155307){const _0x4834d3=a45_0x2449;writeCliSideChannelLine(_0x4834d3(0x1fa));let _0x171b43;try{_0x171b43=await withActiveCookie(_0x155307,()=>listRemoteApps());}catch(_0x4c49b7){writeCliSideChannelLine(_0x4834d3(0x209));if(_0x4c49b7 instanceof Error)writeCliSideChannelLine(_0x4834d3(0x1ed)+_0x4c49b7[_0x4834d3(0x1f2)]+')');return _0x4834d3(0x204);}if(_0x171b43[_0x4834d3(0x1f0)]===0x0)return writeCliSideChannelLine(_0x4834d3(0x1fd)),_0x4834d3(0x204);return promptAppSelection(_0x171b43);}async function _fallbackOrSkip(){const _0x2fa940=a45_0x2449,_0x29e0d3=await select({'message':_0x2fa940(0x1ee),'choices':[{'name':a45_0x87e74a[_0x2fa940(0x1f7)](_0x2fa940(0x1f5)),'value':_0x2fa940(0x1f6)},{'name':a45_0x87e74a['yellow'](_0x2fa940(0x1fc)),'value':_0x2fa940(0x207)}]});if(_0x29e0d3===_0x2fa940(0x1f6))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- function a46_0x3196(_0x307d43,_0x47ee2){_0x307d43=_0x307d43-0x76;const _0x1bdb53=a46_0x1bdb();let _0x3196f4=_0x1bdb53[_0x307d43];return _0x3196f4;}const a46_0x363052=a46_0x3196;(function(_0x26ee6a,_0x3b43ac){const _0x50579c=a46_0x3196,_0x204047=_0x26ee6a();while(!![]){try{const _0x5a8ad3=-parseInt(_0x50579c(0x81))/0x1*(parseInt(_0x50579c(0x88))/0x2)+parseInt(_0x50579c(0x7e))/0x3+-parseInt(_0x50579c(0x90))/0x4*(-parseInt(_0x50579c(0x84))/0x5)+-parseInt(_0x50579c(0x7c))/0x6+-parseInt(_0x50579c(0x8e))/0x7+-parseInt(_0x50579c(0x78))/0x8*(-parseInt(_0x50579c(0x80))/0x9)+parseInt(_0x50579c(0x7d))/0xa;if(_0x5a8ad3===_0x3b43ac)break;else _0x204047['push'](_0x204047['shift']());}catch(_0x47f36d){_0x204047['push'](_0x204047['shift']());}}}(a46_0x1bdb,0xde974));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x363052(0x89),a46_0x363052(0x8a)]),NON_TERMINAL_STATUSES=new Set(['PENDING',a46_0x363052(0x85)]);export function normalizeAsyncTask(_0x27e393){const _0x10cb6f=a46_0x363052,_0x14b598=typeof _0x27e393?.['taskId']===_0x10cb6f(0x79)?_0x27e393['taskId'][_0x10cb6f(0x92)]():'';if(!_0x14b598)throw CliErrors[_0x10cb6f(0x77)](_0x10cb6f(0x8d));const _0x495467=typeof _0x27e393['status']===_0x10cb6f(0x79)?_0x27e393[_0x10cb6f(0x8c)][_0x10cb6f(0x92)]()[_0x10cb6f(0x91)]():'';if(!_0x495467)throw CliErrors[_0x10cb6f(0x77)]('Async\x20task\x20'+_0x14b598+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x14b598,'status':_0x495467,'errorMessage':typeof _0x27e393[_0x10cb6f(0x82)]===_0x10cb6f(0x79)&&_0x27e393['errorMessage'][_0x10cb6f(0x92)]()?_0x27e393[_0x10cb6f(0x82)][_0x10cb6f(0x92)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x495467),'knownStatus':TERMINAL_STATUSES[_0x10cb6f(0x8f)](_0x495467)||NON_TERMINAL_STATUSES['has'](_0x495467)};}function a46_0x1bdb(){const _0x1b268a=['apiError','2114584cvJyof','string','\x20returned\x20unknown\x20status\x20','\x20failed:\x20','8173614JxyBgQ','16532050fTrzkX','2270049dKMRMe','taskId','9IRydgK','193331yPIsXE','errorMessage','\x20is\x20pending.','1460szATYf','PROCESSING','\x20completed\x20successfully.','replace','4ezJwwb','SUCCESS','FAILED','PENDING','status','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','6480292DXhPsV','has','12496AoroAQ','toUpperCase','trim','Task\x20'];a46_0x1bdb=function(){return _0x1b268a;};return a46_0x1bdb();}export function buildAsyncTaskStatusCommand(_0x5780b8,_0x321020){return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x5780b8)+'\x20--appcode\x20'+quoteShellArg(_0x321020)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x4d8258){const _0x38e1ff=a46_0x363052;switch(_0x4d8258[_0x38e1ff(0x8c)]){case _0x38e1ff(0x8b):return _0x38e1ff(0x76)+_0x4d8258[_0x38e1ff(0x7f)]+_0x38e1ff(0x83);case _0x38e1ff(0x85):return _0x38e1ff(0x76)+_0x4d8258['taskId']+'\x20is\x20processing.';case _0x38e1ff(0x89):return'Task\x20'+_0x4d8258[_0x38e1ff(0x7f)]+_0x38e1ff(0x86);case _0x38e1ff(0x8a):return _0x4d8258[_0x38e1ff(0x82)]?_0x38e1ff(0x76)+_0x4d8258['taskId']+_0x38e1ff(0x7b)+_0x4d8258[_0x38e1ff(0x82)]:_0x38e1ff(0x76)+_0x4d8258[_0x38e1ff(0x7f)]+'\x20failed.';default:return _0x38e1ff(0x76)+_0x4d8258[_0x38e1ff(0x7f)]+_0x38e1ff(0x7a)+_0x4d8258['status']+'.';}}function quoteShellArg(_0x16ea96){const _0x58b756=a46_0x363052;return'\x27'+_0x16ea96[_0x58b756(0x87)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
1
+ const a46_0x1ec3a1=a46_0x474c;(function(_0x4d4519,_0x10c599){const _0x47e4f8=a46_0x474c,_0x38100d=_0x4d4519();while(!![]){try{const _0x427dd8=parseInt(_0x47e4f8(0x12c))/0x1*(-parseInt(_0x47e4f8(0x128))/0x2)+-parseInt(_0x47e4f8(0x11f))/0x3*(-parseInt(_0x47e4f8(0x137))/0x4)+parseInt(_0x47e4f8(0x12a))/0x5*(parseInt(_0x47e4f8(0x117))/0x6)+parseInt(_0x47e4f8(0x12b))/0x7+parseInt(_0x47e4f8(0x112))/0x8*(-parseInt(_0x47e4f8(0x130))/0x9)+parseInt(_0x47e4f8(0x136))/0xa*(parseInt(_0x47e4f8(0x116))/0xb)+-parseInt(_0x47e4f8(0x12f))/0xc*(-parseInt(_0x47e4f8(0x11a))/0xd);if(_0x427dd8===_0x10c599)break;else _0x38100d['push'](_0x38100d['shift']());}catch(_0x5b314e){_0x38100d['push'](_0x38100d['shift']());}}}(a46_0x226f,0x88247));function a46_0x474c(_0x401305,_0x2c3ebb){_0x401305=_0x401305-0x112;const _0x226f6b=a46_0x226f();let _0x474c25=_0x226f6b[_0x401305];return _0x474c25;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x1ec3a1(0x135),a46_0x1ec3a1(0x133)]),NON_TERMINAL_STATUSES=new Set([a46_0x1ec3a1(0x11e),'PROCESSING']);export function normalizeAsyncTask(_0x169f91){const _0x25e9fa=a46_0x1ec3a1,_0x4fb39b=typeof _0x169f91?.[_0x25e9fa(0x129)]===_0x25e9fa(0x131)?_0x169f91[_0x25e9fa(0x129)]['trim']():'';if(!_0x4fb39b)throw CliErrors['apiError'](_0x25e9fa(0x134));const _0x318317=typeof _0x169f91[_0x25e9fa(0x113)]==='string'?_0x169f91[_0x25e9fa(0x113)][_0x25e9fa(0x132)]()[_0x25e9fa(0x12e)]():'';if(!_0x318317)throw CliErrors[_0x25e9fa(0x122)](_0x25e9fa(0x114)+_0x4fb39b+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x4fb39b,'status':_0x318317,'errorMessage':typeof _0x169f91[_0x25e9fa(0x127)]===_0x25e9fa(0x131)&&_0x169f91[_0x25e9fa(0x127)][_0x25e9fa(0x132)]()?_0x169f91[_0x25e9fa(0x127)][_0x25e9fa(0x132)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x318317),'knownStatus':TERMINAL_STATUSES['has'](_0x318317)||NON_TERMINAL_STATUSES[_0x25e9fa(0x115)](_0x318317)};}export function buildAsyncTaskStatusCommand(_0x42d485,_0x2b285b){const _0x3008be=a46_0x1ec3a1;return CLI_BIN_NAME+_0x3008be(0x120)+quoteShellArg(_0x42d485)+_0x3008be(0x12d)+quoteShellArg(_0x2b285b)+_0x3008be(0x125);}export function asyncTaskMessage(_0x588934){const _0x171383=a46_0x1ec3a1;switch(_0x588934['status']){case'PENDING':return _0x171383(0x119)+_0x588934[_0x171383(0x129)]+_0x171383(0x121);case _0x171383(0x124):return'Task\x20'+_0x588934[_0x171383(0x129)]+_0x171383(0x11b);case _0x171383(0x135):return _0x171383(0x119)+_0x588934[_0x171383(0x129)]+_0x171383(0x123);case _0x171383(0x133):return _0x588934[_0x171383(0x127)]?_0x171383(0x119)+_0x588934[_0x171383(0x129)]+'\x20failed:\x20'+_0x588934[_0x171383(0x127)]:'Task\x20'+_0x588934['taskId']+_0x171383(0x126);default:return _0x171383(0x119)+_0x588934[_0x171383(0x129)]+_0x171383(0x11c)+_0x588934[_0x171383(0x113)]+'.';}}function a46_0x226f(){const _0x1a6c39=['2976162FuIhzB','1iKBkKn','\x20--appcode\x20','toUpperCase','50892rhADoW','900sFDoua','string','trim','FAILED','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','SUCCESS','339260BVyHZt','28mJgwka','34664hKUQGk','status','Async\x20task\x20','has','319hiMGTe','6VheuKQ','\x27\x5c\x27\x27','Task\x20','195MhJSCu','\x20is\x20processing.','\x20returned\x20unknown\x20status\x20','replace','PENDING','70134OGysuD','\x20task\x20status\x20--task-id\x20','\x20is\x20pending.','apiError','\x20completed\x20successfully.','PROCESSING','\x20--format\x20compress','\x20failed.','errorMessage','2036570pJlFSr','taskId','1864715xRApMl'];a46_0x226f=function(){return _0x1a6c39;};return a46_0x226f();}function quoteShellArg(_0xa13aab){const _0x5abfb5=a46_0x1ec3a1;return'\x27'+_0xa13aab[_0x5abfb5(0x11d)](/'/g,_0x5abfb5(0x118))+'\x27';}
@@ -1 +1 @@
1
- function a47_0x1e48(){var _0x730a82=['1141647BAMXdU','5253330gItzEY','24bbtfGv','651165fABKix','defineProperties','1648456hIVznP','9HCqiEd','744840RzJDkm','15RrPoTa','441574ZaLoie','description','1078696QIgGsP','method'];a47_0x1e48=function(){return _0x730a82;};return a47_0x1e48();}(function(_0x14f225,_0x28a414){var _0x3e35e0=a47_0x7532,_0x7d716e=_0x14f225();while(!![]){try{var _0x189e80=parseInt(_0x3e35e0(0x1c0))/0x1+parseInt(_0x3e35e0(0x1c4))/0x2+-parseInt(_0x3e35e0(0x1bd))/0x3+parseInt(_0x3e35e0(0x1bb))/0x4*(parseInt(_0x3e35e0(0x1c5))/0x5)+-parseInt(_0x3e35e0(0x1bf))/0x6*(parseInt(_0x3e35e0(0x1b9))/0x7)+-parseInt(_0x3e35e0(0x1c2))/0x8+-parseInt(_0x3e35e0(0x1c3))/0x9*(parseInt(_0x3e35e0(0x1be))/0xa);if(_0x189e80===_0x28a414)break;else _0x7d716e['push'](_0x7d716e['shift']());}catch(_0x315b26){_0x7d716e['push'](_0x7d716e['shift']());}}}(a47_0x1e48,0x72574));function a47_0x7532(_0x45f63f,_0x179e07){_0x45f63f=_0x45f63f-0x1b9;var _0x1e48ff=a47_0x1e48();var _0x7532cd=_0x1e48ff[_0x45f63f];return _0x7532cd;}export function asDryRunResult(_0x56f504,_0x68f9d6){var _0xd4cac1=a47_0x7532;return Object[_0xd4cac1(0x1c1)](_0x56f504,{'method':{'value':_0x68f9d6[_0xd4cac1(0x1bc)],'enumerable':![]},'url':{'value':_0x68f9d6['url'],'enumerable':![]},..._0x68f9d6[_0xd4cac1(0x1ba)]?{'description':{'value':_0x68f9d6[_0xd4cac1(0x1ba)],'enumerable':![]}}:{}});}
1
+ (function(_0x2c1300,_0x14198b){var _0x16241e=a47_0x4eb0,_0x268b12=_0x2c1300();while(!![]){try{var _0x86e38=-parseInt(_0x16241e(0xdf))/0x1*(-parseInt(_0x16241e(0xe3))/0x2)+-parseInt(_0x16241e(0xe7))/0x3+-parseInt(_0x16241e(0xe4))/0x4+-parseInt(_0x16241e(0xde))/0x5+parseInt(_0x16241e(0xe1))/0x6*(parseInt(_0x16241e(0xe8))/0x7)+-parseInt(_0x16241e(0xe0))/0x8+parseInt(_0x16241e(0xe2))/0x9;if(_0x86e38===_0x14198b)break;else _0x268b12['push'](_0x268b12['shift']());}catch(_0x56be3d){_0x268b12['push'](_0x268b12['shift']());}}}(a47_0xfd87,0xc7f70));function a47_0xfd87(){var _0x1e9079=['3679086mGscSb','7ZaWUcx','description','597010RqqLQY','144898HqXVBv','3133616RGJteE','977892JpMlhA','17988381rrsXPH','16XweSJa','3057412xnMsta','method','defineProperties'];a47_0xfd87=function(){return _0x1e9079;};return a47_0xfd87();}function a47_0x4eb0(_0x486fa3,_0x4094fc){_0x486fa3=_0x486fa3-0xde;var _0xfd8796=a47_0xfd87();var _0x4eb09d=_0xfd8796[_0x486fa3];return _0x4eb09d;}export function asDryRunResult(_0x8eeb4f,_0x674509){var _0x52d0c9=a47_0x4eb0;return Object[_0x52d0c9(0xe6)](_0x8eeb4f,{'method':{'value':_0x674509[_0x52d0c9(0xe5)],'enumerable':![]},'url':{'value':_0x674509['url'],'enumerable':![]},..._0x674509[_0x52d0c9(0xe9)]?{'description':{'value':_0x674509[_0x52d0c9(0xe9)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a48_0x54f273=a48_0x8fa2;(function(_0x514902,_0x33fe8a){const _0x848efc=a48_0x8fa2,_0x442d43=_0x514902();while(!![]){try{const _0x20e747=parseInt(_0x848efc(0x115))/0x1*(parseInt(_0x848efc(0x10f))/0x2)+-parseInt(_0x848efc(0x109))/0x3*(parseInt(_0x848efc(0x108))/0x4)+parseInt(_0x848efc(0x10d))/0x5*(-parseInt(_0x848efc(0x10e))/0x6)+parseInt(_0x848efc(0x104))/0x7+parseInt(_0x848efc(0x112))/0x8+-parseInt(_0x848efc(0x111))/0x9+parseInt(_0x848efc(0x101))/0xa*(-parseInt(_0x848efc(0x10b))/0xb);if(_0x20e747===_0x33fe8a)break;else _0x442d43['push'](_0x442d43['shift']());}catch(_0x1714aa){_0x442d43['push'](_0x442d43['shift']());}}}(a48_0x9eff,0x5a579));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x54f273(0x119)};export const CODE_FLAG={'name':a48_0x54f273(0x114),'type':'string','required':!![],'description':a48_0x54f273(0x117),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x54f273(0x118),'description':a48_0x54f273(0x117)};function a48_0x8fa2(_0xb62351,_0x1540f9){_0xb62351=_0xb62351-0xff;const _0x9eff1b=a48_0x9eff();let _0x8fa2e=_0x9eff1b[_0xb62351];return _0x8fa2e;}function a48_0x9eff(){const _0x47f547=['1175628wKIuBH','8KquWeA','number','1599831HObGDE','5768696uVLLit','Database\x20product\x20type','code','50006ZNzkLi','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','Dataset\x20code\x20(32-char\x20hex\x20UUID)','datasetcode','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','POSTGRESQL','MYSQL','520lvZHpy','string','App\x20code\x20(e.g.\x20app-xxxxx)','2994278JpbuIj','appcode','dbtype','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','4KiQcsj','59757KhOuPe','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','123794CDskMB','sqlcode','5PbXLHi'];a48_0x9eff=function(){return _0x47f547;};return a48_0x9eff();}export const SQLCODE_FLAG={'name':a48_0x54f273(0x10c),'type':a48_0x54f273(0x102),'required':!![],'description':a48_0x54f273(0x107),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x54f273(0x105),'type':a48_0x54f273(0x102),'required':![],'description':a48_0x54f273(0x10a)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x54f273(0x103)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x54f273(0x110),'required':!![],'description':a48_0x54f273(0x116)};export const DB_TYPE_FLAG={'name':a48_0x54f273(0x106),'type':a48_0x54f273(0x102),'required':!![],'description':a48_0x54f273(0x113),'enum':[a48_0x54f273(0x100),a48_0x54f273(0xff)]};
1
+ const a48_0x45c041=a48_0x3aec;(function(_0x24cd09,_0x451ba9){const _0x1c8167=a48_0x3aec,_0x16de6c=_0x24cd09();while(!![]){try{const _0x4e2a1a=-parseInt(_0x1c8167(0x83))/0x1+parseInt(_0x1c8167(0x84))/0x2+-parseInt(_0x1c8167(0x91))/0x3*(parseInt(_0x1c8167(0x8a))/0x4)+-parseInt(_0x1c8167(0x85))/0x5+-parseInt(_0x1c8167(0x8f))/0x6+parseInt(_0x1c8167(0x90))/0x7+-parseInt(_0x1c8167(0x80))/0x8*(-parseInt(_0x1c8167(0x86))/0x9);if(_0x4e2a1a===_0x451ba9)break;else _0x16de6c['push'](_0x16de6c['shift']());}catch(_0x47b886){_0x16de6c['push'](_0x16de6c['shift']());}}}(a48_0x31e1,0x78d52));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x45c041(0x88)};export const CODE_FLAG={'name':a48_0x45c041(0x82),'type':'string','required':!![],'description':a48_0x45c041(0x8c),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a48_0x3aec(_0x1e8c9b,_0xcb5596){_0x1e8c9b=_0x1e8c9b-0x7d;const _0x31e143=a48_0x31e1();let _0x3aecd6=_0x31e143[_0x1e8c9b];return _0x3aecd6;}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x45c041(0x8e),'description':a48_0x45c041(0x8c)};function a48_0x31e1(){const _0x424b81=['660457PWvSqV','909szHSDi','number','string','dbtype','MYSQL','POSTGRESQL','267904JUumDw','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','code','405511UcvQoF','516282dRjMZN','2300355VinASc','657QakxvK','Database\x20product\x20type','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','7472PASOBO','appcode','Dataset\x20code\x20(32-char\x20hex\x20UUID)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','datasetcode','5223600hGHmJN'];a48_0x31e1=function(){return _0x424b81;};return a48_0x31e1();}export const SQLCODE_FLAG={'name':'sqlcode','type':a48_0x45c041(0x93),'required':!![],'description':a48_0x45c041(0x8d),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x45c041(0x8b),'type':a48_0x45c041(0x93),'required':![],'description':a48_0x45c041(0x89)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x45c041(0x92),'required':!![],'description':a48_0x45c041(0x81)};export const DB_TYPE_FLAG={'name':a48_0x45c041(0x7d),'type':'string','required':!![],'description':a48_0x45c041(0x87),'enum':[a48_0x45c041(0x7e),a48_0x45c041(0x7f)]};
@@ -1 +1 @@
1
- (function(_0x30d167,_0x16a99b){const _0x37200f=a49_0x4d40,_0x5d0c9f=_0x30d167();while(!![]){try{const _0x53aacd=-parseInt(_0x37200f(0x1c8))/0x1+parseInt(_0x37200f(0x1ce))/0x2+parseInt(_0x37200f(0x1cf))/0x3*(parseInt(_0x37200f(0x1cd))/0x4)+parseInt(_0x37200f(0x1c4))/0x5+-parseInt(_0x37200f(0x1c5))/0x6*(-parseInt(_0x37200f(0x1c3))/0x7)+-parseInt(_0x37200f(0x1d3))/0x8*(-parseInt(_0x37200f(0x1ca))/0x9)+-parseInt(_0x37200f(0x1d2))/0xa;if(_0x53aacd===_0x16a99b)break;else _0x5d0c9f['push'](_0x5d0c9f['shift']());}catch(_0x28b53e){_0x5d0c9f['push'](_0x5d0c9f['shift']());}}}(a49_0x1805,0x3fd25));import{existsSync,statSync}from'node:fs';function a49_0x1805(){const _0x461c5b=['\x20path\x20is\x20required.','size','468261rBfYOD','File\x20not\x20found:\x20','225gqZjah','toFixed','validation','1412948kLLrRL','586824Wpwfou','3podfWg','File\x20is\x20not\x20a\x20regular\x20file:\x20','\x20MB','6768040VLMOlW','146632qGkNvh','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','1441041yqEPSj','478705ayNLmK','6YoaWjF'];a49_0x1805=function(){return _0x461c5b;};return a49_0x1805();}import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a49_0x4d40(_0xb14756,_0x97590b){_0xb14756=_0xb14756-0x1c2;const _0x180576=a49_0x1805();let _0x4d400d=_0x180576[_0xb14756];return _0x4d400d;}function formatBytes(_0x19ba4d){const _0x32306c=a49_0x4d40;if(_0x19ba4d>=BYTES_PER_MB){const _0x479846=Math['ceil'](_0x19ba4d/BYTES_PER_MB*0x64)/0x64;return _0x479846[_0x32306c(0x1cb)](0x2)+_0x32306c(0x1d1);}return _0x19ba4d+'\x20B';}export function requireDevelopmentUploadFile(_0x1ef85d,_0x5c4694){const _0x4d4f3f=a49_0x4d40,_0x1c588f=_0x1ef85d['trim']();if(!_0x1c588f)throw CliErrors['validation'](_0x5c4694+_0x4d4f3f(0x1c6));if(!existsSync(_0x1c588f))throw CliErrors[_0x4d4f3f(0x1cc)](_0x4d4f3f(0x1c9)+_0x1c588f);const _0x1ac4fc=statSync(_0x1c588f);if(!_0x1ac4fc['isFile']())throw CliErrors[_0x4d4f3f(0x1cc)](_0x4d4f3f(0x1d0)+_0x1c588f);if(_0x1ac4fc[_0x4d4f3f(0x1c7)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x4d4f3f(0x1cc)](_0x4d4f3f(0x1c2)+_0x1c588f+'\x20('+formatBytes(_0x1ac4fc[_0x4d4f3f(0x1c7)])+')');return{'path':_0x1c588f,'size':_0x1ac4fc['size']};}
1
+ (function(_0x140eab,_0x102a94){const _0x85e416=a49_0x45f2,_0x134399=_0x140eab();while(!![]){try{const _0x3888a5=parseInt(_0x85e416(0xfc))/0x1+-parseInt(_0x85e416(0x10d))/0x2*(parseInt(_0x85e416(0x104))/0x3)+-parseInt(_0x85e416(0x106))/0x4+-parseInt(_0x85e416(0xfd))/0x5+-parseInt(_0x85e416(0x109))/0x6*(-parseInt(_0x85e416(0x108))/0x7)+parseInt(_0x85e416(0x10b))/0x8*(-parseInt(_0x85e416(0x100))/0x9)+parseInt(_0x85e416(0x103))/0xa*(parseInt(_0x85e416(0x105))/0xb);if(_0x3888a5===_0x102a94)break;else _0x134399['push'](_0x134399['shift']());}catch(_0x59e631){_0x134399['push'](_0x134399['shift']());}}}(a49_0x3d88,0xd88e1));import{existsSync,statSync}from'node:fs';function a49_0x45f2(_0x375c46,_0x3ea778){_0x375c46=_0x375c46-0xfc;const _0x3d8854=a49_0x3d88();let _0x45f2e1=_0x3d8854[_0x375c46];return _0x45f2e1;}import{CliErrors}from'../../errors.js';function a49_0x3d88(){const _0xc7d0ad=['File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','File\x20not\x20found:\x20','1196568QHYbaf','validation','size','12148230rNSzBo','1850883KXlPQA','11QDJapp','1149152EbHNGG','ceil','245lIcsIu','279462ObdcWb','\x20path\x20is\x20required.','16vQNbRT','\x20MB','4iliaVu','toFixed','isFile','1010795tyGpPD','5908450DZrYzD'];a49_0x3d88=function(){return _0xc7d0ad;};return a49_0x3d88();}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function formatBytes(_0x41aff9){const _0x510884=a49_0x45f2;if(_0x41aff9>=BYTES_PER_MB){const _0xa50595=Math[_0x510884(0x107)](_0x41aff9/BYTES_PER_MB*0x64)/0x64;return _0xa50595[_0x510884(0x10e)](0x2)+_0x510884(0x10c);}return _0x41aff9+'\x20B';}export function requireDevelopmentUploadFile(_0x569835,_0x4e0f10){const _0x19ef08=a49_0x45f2,_0x17ef7d=_0x569835['trim']();if(!_0x17ef7d)throw CliErrors[_0x19ef08(0x101)](_0x4e0f10+_0x19ef08(0x10a));if(!existsSync(_0x17ef7d))throw CliErrors[_0x19ef08(0x101)](_0x19ef08(0xff)+_0x17ef7d);const _0xaac4ef=statSync(_0x17ef7d);if(!_0xaac4ef[_0x19ef08(0x10f)]())throw CliErrors[_0x19ef08(0x101)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x17ef7d);if(_0xaac4ef['size']>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x19ef08(0x101)](_0x19ef08(0xfe)+_0x17ef7d+'\x20('+formatBytes(_0xaac4ef[_0x19ef08(0x102)])+')');return{'path':_0x17ef7d,'size':_0xaac4ef[_0x19ef08(0x102)]};}
@@ -1 +1 @@
1
- (function(_0x1fbba0,_0x2cdbb7){const _0x266c27=a50_0x2b1b,_0x34d706=_0x1fbba0();while(!![]){try{const _0x552acc=-parseInt(_0x266c27(0xe2))/0x1+parseInt(_0x266c27(0xde))/0x2+parseInt(_0x266c27(0xe6))/0x3+-parseInt(_0x266c27(0xdd))/0x4*(parseInt(_0x266c27(0xe4))/0x5)+parseInt(_0x266c27(0xdc))/0x6*(parseInt(_0x266c27(0xdb))/0x7)+parseInt(_0x266c27(0xda))/0x8+parseInt(_0x266c27(0xe5))/0x9*(-parseInt(_0x266c27(0xdf))/0xa);if(_0x552acc===_0x2cdbb7)break;else _0x34d706['push'](_0x34d706['shift']());}catch(_0x6ef69d){_0x34d706['push'](_0x34d706['shift']());}}}(a50_0x5938,0xce5ae));function a50_0x5938(){const _0x3c0117=['16UZqCUe','3257884efQmMN','40GFPTAR','App\x20Code\x20cannot\x20be\x20empty','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','976787gauolC','length','485460CicVKA','8245998YqxSAf','4358496SFtDrd','9144272xJjqoZ','7EWTnpG','9902790tNrqkC'];a50_0x5938=function(){return _0x3c0117;};return a50_0x5938();}function a50_0x2b1b(_0x2f1d85,_0x365154){_0x2f1d85=_0x2f1d85-0xda;const _0x5938bd=a50_0x5938();let _0x2b1bca=_0x5938bd[_0x2f1d85];return _0x2b1bca;}export function validateAppcode(_0x48c700){const _0x53c8f1=a50_0x2b1b,_0x283375=_0x48c700['trim']();if(!_0x283375)return{'valid':![],'message':_0x53c8f1(0xe0)};if(_0x283375[_0x53c8f1(0xe3)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x283375))return{'valid':![],'message':_0x53c8f1(0xe1)};return{'valid':!![]};}
1
+ (function(_0x1dbeab,_0x867f51){const _0x35f538=a50_0x1f3f,_0x36873b=_0x1dbeab();while(!![]){try{const _0x3ec81d=-parseInt(_0x35f538(0x17a))/0x1*(-parseInt(_0x35f538(0x174))/0x2)+parseInt(_0x35f538(0x179))/0x3+parseInt(_0x35f538(0x172))/0x4*(parseInt(_0x35f538(0x178))/0x5)+parseInt(_0x35f538(0x171))/0x6*(-parseInt(_0x35f538(0x17e))/0x7)+parseInt(_0x35f538(0x17c))/0x8+-parseInt(_0x35f538(0x17d))/0x9*(-parseInt(_0x35f538(0x17f))/0xa)+parseInt(_0x35f538(0x175))/0xb*(-parseInt(_0x35f538(0x17b))/0xc);if(_0x3ec81d===_0x867f51)break;else _0x36873b['push'](_0x36873b['shift']());}catch(_0x4bda9b){_0x36873b['push'](_0x36873b['shift']());}}}(a50_0x1264,0x1e368));function a50_0x1f3f(_0x4085c2,_0x3e5c88){_0x4085c2=_0x4085c2-0x170;const _0x126480=a50_0x1264();let _0x1f3fed=_0x126480[_0x4085c2];return _0x1f3fed;}function a50_0x1264(){const _0x48d040=['38PPMiKE','396DzbmRV','length','App\x20Code\x20cannot\x20be\x20empty','125NQtayX','504093Hrxqmb','12368kWWXkH','279204dVVBSb','1690056gDpPFh','504wOdpij','224917OUjTSr','36420fTUcAg','trim','18TjJVpb','38324tgehzR','App\x20Code\x20cannot\x20exceed\x20100\x20characters'];a50_0x1264=function(){return _0x48d040;};return a50_0x1264();}export function validateAppcode(_0x44ac20){const _0x537128=a50_0x1f3f,_0x2a69f6=_0x44ac20[_0x537128(0x170)]();if(!_0x2a69f6)return{'valid':![],'message':_0x537128(0x177)};if(_0x2a69f6[_0x537128(0x176)]>0x64)return{'valid':![],'message':_0x537128(0x173)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x2a69f6))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
@@ -1 +1 @@
1
- function a51_0x2502(_0x4cf525,_0x12af6){_0x4cf525=_0x4cf525-0xec;const _0x34881b=a51_0x3488();let _0x25029c=_0x34881b[_0x4cf525];return _0x25029c;}const a51_0x2a8b21=a51_0x2502;(function(_0x50f312,_0x1f8f39){const _0xc13c3c=a51_0x2502,_0x2330b5=_0x50f312();while(!![]){try{const _0x329a56=-parseInt(_0xc13c3c(0x101))/0x1+parseInt(_0xc13c3c(0xf3))/0x2*(-parseInt(_0xc13c3c(0x102))/0x3)+-parseInt(_0xc13c3c(0xed))/0x4*(-parseInt(_0xc13c3c(0xf9))/0x5)+-parseInt(_0xc13c3c(0xf4))/0x6+parseInt(_0xc13c3c(0xfb))/0x7*(parseInt(_0xc13c3c(0xf6))/0x8)+parseInt(_0xc13c3c(0xf5))/0x9*(-parseInt(_0xc13c3c(0xff))/0xa)+parseInt(_0xc13c3c(0xf1))/0xb*(parseInt(_0xc13c3c(0xf0))/0xc);if(_0x329a56===_0x1f8f39)break;else _0x2330b5['push'](_0x2330b5['shift']());}catch(_0x32f6e1){_0x2330b5['push'](_0x2330b5['shift']());}}}(a51_0x3488,0x655fc));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a51_0x3488(){const _0x533522=['Get\x20a\x20config\x20value\x20by\x20key','146045IoAFWn','Key\x20not\x20found:\x20','7aSpkfY','Missing\x20key.','str','appcode','10uQyUgR','Usage:\x20','76987KIkNwL','3YXSjiQ','\x20config\x20get\x20--key\x20<key>','config','4qnTYOO','string','object','996kLdxli','128931Xthqgo','validation','1252774sXUbzs','2905776ZVSNvl','88983lnXzWh','4885864vkxVqO','read'];a51_0x3488=function(){return _0x533522;};return a51_0x3488();}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3965dc){const _0x547ea6=a51_0x2502,_0x286b4b=_0x3965dc[_0x547ea6(0xfd)]('key');if(!_0x286b4b)throw CliErrors[_0x547ea6(0xf2)](_0x547ea6(0xfc),_0x547ea6(0x100)+CLI_BIN_NAME+_0x547ea6(0x103));const _0x1b1f3c=readConfig(),_0x581d51=_0x286b4b==='app'?_0x547ea6(0xfe):_0x286b4b,_0x1458f1=_0x1b1f3c[_0x581d51];if(_0x1458f1===undefined)throw CliErrors['validation'](_0x547ea6(0xfa)+_0x286b4b);return{'ok':!![],'data':typeof _0x1458f1===_0x547ea6(0xef)?_0x1458f1:{[_0x581d51]:_0x1458f1},'message':typeof _0x1458f1==='object'?undefined:String(_0x1458f1)};}export const configGetDefinition={'service':a51_0x2a8b21(0xec),'command':'get','description':a51_0x2a8b21(0xf8),'risk':a51_0x2a8b21(0xf7),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0x2a8b21(0xee),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a51_0x2c6d47=a51_0x4076;(function(_0x32ca72,_0x292ca5){const _0x533dee=a51_0x4076,_0x1e903b=_0x32ca72();while(!![]){try{const _0x32f323=-parseInt(_0x533dee(0x1b6))/0x1*(parseInt(_0x533dee(0x1b0))/0x2)+parseInt(_0x533dee(0x1af))/0x3*(-parseInt(_0x533dee(0x1ae))/0x4)+parseInt(_0x533dee(0x1ad))/0x5+-parseInt(_0x533dee(0x1aa))/0x6+-parseInt(_0x533dee(0x1b7))/0x7+parseInt(_0x533dee(0x1ac))/0x8+parseInt(_0x533dee(0x1b1))/0x9;if(_0x32f323===_0x292ca5)break;else _0x1e903b['push'](_0x1e903b['shift']());}catch(_0x1dd0b2){_0x1e903b['push'](_0x1e903b['shift']());}}}(a51_0x2270,0xc5b82));import{CliErrors}from'../../errors.js';function a51_0x2270(){const _0x5ede12=['\x20config\x20get\x20--key\x20<key>','app','appcode','validation','212HycPTd','440902lXwEea','Key\x20not\x20found:\x20','key','get','read','string','2662170BjnvKb','object','3976480ZEiFmY','6726075iglbZf','4hQTdLh','2237505vULyqk','11358UXggfO','12816423eaawOG'];a51_0x2270=function(){return _0x5ede12;};return a51_0x2270();}function a51_0x4076(_0x1f2dc1,_0x594ac3){_0x1f2dc1=_0x1f2dc1-0x1a5;const _0x2270a5=a51_0x2270();let _0x407635=_0x2270a5[_0x1f2dc1];return _0x407635;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x251efb){const _0x3df8b7=a51_0x4076,_0x212bfb=_0x251efb['str'](_0x3df8b7(0x1a6));if(!_0x212bfb)throw CliErrors['validation']('Missing\x20key.','Usage:\x20'+CLI_BIN_NAME+_0x3df8b7(0x1b2));const _0x2a9b5f=readConfig(),_0x4d1278=_0x212bfb===_0x3df8b7(0x1b3)?_0x3df8b7(0x1b4):_0x212bfb,_0x4580b5=_0x2a9b5f[_0x4d1278];if(_0x4580b5===undefined)throw CliErrors[_0x3df8b7(0x1b5)](_0x3df8b7(0x1a5)+_0x212bfb);return{'ok':!![],'data':typeof _0x4580b5===_0x3df8b7(0x1ab)?_0x4580b5:{[_0x4d1278]:_0x4580b5},'message':typeof _0x4580b5==='object'?undefined:String(_0x4580b5)};}export const configGetDefinition={'service':'config','command':a51_0x2c6d47(0x1a7),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a51_0x2c6d47(0x1a8),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a51_0x2c6d47(0x1a9),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};