@lovrabet/rabetbase-cli 2.3.16-beta.1 → 2.3.16-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 (277) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.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/members-list.js +1 -0
  23. package/lib/commands/app/remote-directory.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/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/relation-audit.js +1 -1
  142. package/lib/commands/page/restore.js +1 -1
  143. package/lib/commands/page/shared.js +1 -1
  144. package/lib/commands/page/standard-page-status.js +1 -1
  145. package/lib/commands/page/sync.js +1 -1
  146. package/lib/commands/permit/index.js +1 -1
  147. package/lib/commands/permit/page-get.js +1 -1
  148. package/lib/commands/permit/page-set.js +1 -1
  149. package/lib/commands/permit/role-apis-set.js +1 -1
  150. package/lib/commands/permit/role-menus-set.js +1 -1
  151. package/lib/commands/permit/role-menus.js +1 -1
  152. package/lib/commands/permit/shared.js +1 -1
  153. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  154. package/lib/commands/project/create/format-elapsed.js +1 -1
  155. package/lib/commands/project/create/main.js +1 -1
  156. package/lib/commands/project/create/non-interactive.js +1 -1
  157. package/lib/commands/project/create/project-template-path.js +1 -1
  158. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  159. package/lib/commands/project/create/use-format-code.js +1 -1
  160. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  161. package/lib/commands/project/index.js +1 -1
  162. package/lib/commands/project/init.js +1 -1
  163. package/lib/commands/project/upgrade.js +1 -1
  164. package/lib/commands/registry.js +1 -1
  165. package/lib/commands/role/create.js +1 -1
  166. package/lib/commands/role/delete.js +1 -1
  167. package/lib/commands/role/detail.js +1 -1
  168. package/lib/commands/role/index.js +1 -1
  169. package/lib/commands/role/list.js +1 -1
  170. package/lib/commands/role/shared.js +1 -1
  171. package/lib/commands/role/update.js +1 -1
  172. package/lib/commands/role/user-add.js +1 -1
  173. package/lib/commands/role/user-remove.js +1 -1
  174. package/lib/commands/role/user-resolve.js +1 -1
  175. package/lib/commands/run/index.js +1 -1
  176. package/lib/commands/schema.js +1 -1
  177. package/lib/commands/sql/create.js +1 -1
  178. package/lib/commands/sql/delete.js +1 -1
  179. package/lib/commands/sql/detail.js +1 -1
  180. package/lib/commands/sql/exec.js +1 -1
  181. package/lib/commands/sql/index.js +1 -1
  182. package/lib/commands/sql/list.js +1 -1
  183. package/lib/commands/sql/pull.js +1 -1
  184. package/lib/commands/sql/push.js +1 -1
  185. package/lib/commands/sql/save.js +1 -1
  186. package/lib/commands/sql/shared.js +1 -1
  187. package/lib/commands/sql/status.js +1 -1
  188. package/lib/commands/sql/validate.js +1 -1
  189. package/lib/commands/task/index.js +1 -1
  190. package/lib/commands/task/status.js +1 -1
  191. package/lib/commands/tenant/index.js +1 -0
  192. package/lib/commands/tenant/members-list.js +1 -0
  193. package/lib/commands/tenant/shared.js +1 -0
  194. package/lib/commands/workspace/add.js +1 -1
  195. package/lib/commands/workspace/index.js +1 -1
  196. package/lib/commands/workspace/remove.js +1 -1
  197. package/lib/config/schema.js +1 -1
  198. package/lib/constant/cdn.js +1 -1
  199. package/lib/constant/cli.js +1 -1
  200. package/lib/constant/defaults.js +1 -1
  201. package/lib/constant/domain.js +1 -1
  202. package/lib/constant/env.js +1 -1
  203. package/lib/constant/output.js +1 -1
  204. package/lib/constant/paths.js +1 -1
  205. package/lib/constant/risk.js +1 -1
  206. package/lib/context/app-resolver.js +1 -1
  207. package/lib/context/auth-resolver.js +1 -1
  208. package/lib/context/config-loader.js +1 -1
  209. package/lib/context.js +1 -1
  210. package/lib/core/alias-resolver.js +1 -1
  211. package/lib/core/api-client.js +1 -1
  212. package/lib/core/bff/config.js +1 -1
  213. package/lib/core/bff/file-system.js +1 -1
  214. package/lib/core/bff/hash.js +1 -1
  215. package/lib/core/bff/lock.js +1 -1
  216. package/lib/core/bff/utils.js +1 -1
  217. package/lib/core/db-resolver.js +1 -1
  218. package/lib/core/page/file-system.js +1 -1
  219. package/lib/core/page/hash.js +1 -1
  220. package/lib/core/page/lock.js +1 -1
  221. package/lib/core/sql-index-auditor.js +1 -1
  222. package/lib/core/sql-sync/config.js +1 -1
  223. package/lib/core/sql-sync/file-system.js +1 -1
  224. package/lib/core/sql-sync/hash.js +1 -1
  225. package/lib/core/sql-sync/lock.js +1 -1
  226. package/lib/core/sql-sync/utils.js +1 -1
  227. package/lib/core/sql-validator.js +1 -1
  228. package/lib/errors.js +1 -1
  229. package/lib/framework/build-all-flags.js +1 -1
  230. package/lib/framework/error-output.js +1 -1
  231. package/lib/framework/explicit-yes.js +1 -1
  232. package/lib/framework/flags.js +1 -1
  233. package/lib/framework/help.js +1 -1
  234. package/lib/framework/index.js +1 -1
  235. package/lib/framework/output.js +1 -1
  236. package/lib/framework/response.js +1 -1
  237. package/lib/framework/runner-alias.js +1 -1
  238. package/lib/framework/runner.js +1 -1
  239. package/lib/framework/schema-export.js +1 -1
  240. package/lib/framework/types.js +1 -1
  241. package/lib/generated/build-info.js +1 -1
  242. package/lib/help.js +1 -1
  243. package/lib/skills/main.js +1 -1
  244. package/lib/skills/npx-skills-add.js +1 -1
  245. package/lib/skills/skill-presence.js +1 -1
  246. package/lib/telemetry/cli-command-trace.js +1 -1
  247. package/lib/telemetry/cli-help-trace.js +1 -1
  248. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  249. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  250. package/lib/telemetry/send-cli-trace-log.js +1 -1
  251. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  252. package/lib/utils/ai_config.js +1 -1
  253. package/lib/utils/apply-jq-filter.js +1 -1
  254. package/lib/utils/cdn-config.js +1 -1
  255. package/lib/utils/check-sdk-version.js +1 -1
  256. package/lib/utils/cli-version-check.js +1 -1
  257. package/lib/utils/cli-version-policy.js +1 -1
  258. package/lib/utils/config.js +1 -1
  259. package/lib/utils/copy-directory.js +1 -1
  260. package/lib/utils/entity-with-id.js +1 -1
  261. package/lib/utils/file-utils.js +1 -1
  262. package/lib/utils/guides-cdn.js +1 -1
  263. package/lib/utils/http-client.js +1 -1
  264. package/lib/utils/is-non-interactive.js +1 -1
  265. package/lib/utils/logger.js +1 -1
  266. package/lib/utils/params.js +1 -1
  267. package/lib/utils/platform.js +1 -1
  268. package/lib/utils/rules-cdn.js +1 -1
  269. package/lib/utils/sleep.js +1 -1
  270. package/lib/utils/template-replacer.js +1 -1
  271. package/lib/utils/update-notice.js +1 -1
  272. package/lib/utils/version.js +1 -1
  273. package/lib/utils/with-active-cookie.js +1 -1
  274. package/lib/utils/write-cli-side-channel.js +1 -1
  275. package/package.json +2 -2
  276. package/lib/commands/app/add.js +0 -1
  277. package/lib/commands/app/remove.js +0 -1
@@ -1 +1 @@
1
- const a36_0xeeba66=a36_0x89b4;(function(_0x34abe4,_0x192b14){const _0x4b7f34=a36_0x89b4,_0x56f0d2=_0x34abe4();while(!![]){try{const _0x580c9b=-parseInt(_0x4b7f34(0x112))/0x1+-parseInt(_0x4b7f34(0x117))/0x2+parseInt(_0x4b7f34(0x11a))/0x3*(-parseInt(_0x4b7f34(0x102))/0x4)+-parseInt(_0x4b7f34(0xec))/0x5*(-parseInt(_0x4b7f34(0x10c))/0x6)+parseInt(_0x4b7f34(0x10d))/0x7*(parseInt(_0x4b7f34(0x101))/0x8)+parseInt(_0x4b7f34(0xff))/0x9+parseInt(_0x4b7f34(0xe3))/0xa;if(_0x580c9b===_0x192b14)break;else _0x56f0d2['push'](_0x56f0d2['shift']());}catch(_0x1f4c4c){_0x56f0d2['push'](_0x56f0d2['shift']());}}}(a36_0x146f,0x3fbac));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';function a36_0x146f(){const _0x43e733=['message','&type=','stdin','scriptContent','apiDir','Force\x20pull\x20cancelled.','scriptsRoot','421305zRowMF','hookLocation','alias','bool','functionName','\x20failed','local\x20unsynced\x20changes','hash','force','lockKey','push','length','filePath','lockFilePath','GET','stringify','\x20skipped,\x20','Remote\x20script\x20missing\x20content.','version','2065752aWZvTp','boolean','164720vKvkRh','1172572nXvkRQ','No\x20remote\x20BFF\x20scripts\x20found.','toLowerCase','type','conflict','scriptType','apps','cancelled','unresolvable\x20target\x20path','bff','12NxcrQA','77MTrLZd','datasetCode','str','Force\x20overwrite\x20local\x20unsynced\x20changes','string','356906FwsOGL','functionNode','appCode','includes','nonInteractive','139638fYgAux','\x20pulled,\x20','functions','3VCBVLD','Would\x20inspect\x20','pull','would_pull','Lock\x20scope\x20for\x20app\x20\x22','/api/management/library/scripts/list?appCode=','Pull\x20only\x20this\x20script\x20type','utf8','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','operationType','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','HOOK','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','3563640BLieXG','map'];a36_0x146f=function(){return _0x43e733;};return a36_0x146f();}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';function a36_0x89b4(_0x3b1f5f,_0x36cc5e){_0x3b1f5f=_0x3b1f5f-0xdc;const _0x146fe9=a36_0x146f();let _0x89b449=_0x146fe9[_0x3b1f5f];return _0x89b449;}export const bffPull={'service':a36_0xeeba66(0x10b),'command':a36_0xeeba66(0x11c),'description':a36_0xeeba66(0xde),'risk':'write','flags':[{'name':'type','type':a36_0xeeba66(0x111),'description':a36_0xeeba66(0xdc),'enum':['COMMON','ENDPOINT',a36_0xeeba66(0xe1)]},{'name':'force','type':a36_0xeeba66(0x100),'description':a36_0xeeba66(0x110)}],async 'dryRun'(_0x337206){const _0x3ca8aa=a36_0xeeba66,_0x10b204=loadBffProjectConfig(_0x337206['appCode']),_0x1f1866=await readBffLockFile(_0x10b204[_0x3ca8aa(0xf9)]),{appLock:_0xf57623}=ensureLockScope(_0x1f1866??createEmptyBffLock(),_0x337206[_0x3ca8aa(0x114)],_0x10b204[_0x3ca8aa(0xeb)],_0x3ca8aa(0x11c)),_0x487506=normalizeBffType(_0x337206[_0x3ca8aa(0x10f)](_0x3ca8aa(0x105)))??undefined,_0x30ddda=buildDatasetCodeToAliasMap(_0x337206[_0x3ca8aa(0xe9)],_0x337206['appCode']),[_0x1f33cf,_0x4ed3c6]=await Promise['all']([listBffScripts(_0x337206[_0x3ca8aa(0x114)],_0x487506),getBffScriptStatistics(_0x337206[_0x3ca8aa(0x114)])]),_0x5b19c2=createHookLocationMap(_0x4ed3c6),_0xb7104e=[];for(const _0x3cfb06 of _0x1f33cf){const _0x55adfb=resolveRemoteScriptTarget(_0x10b204,_0x3cfb06,_0x5b19c2,_0xf57623[_0x3ca8aa(0x119)],_0x30ddda);if(!_0x55adfb){_0xb7104e['push']({'scriptType':_0x3cfb06[_0x3ca8aa(0x107)],'functionName':_0x3cfb06['functionName']??'','status':'skipped','reason':_0x3ca8aa(0x10a)});continue;}const _0x5e2452=_0xf57623[_0x3ca8aa(0x119)][_0x55adfb[_0x3ca8aa(0xf5)]],_0x4623ae=_0x3cfb06[_0x3ca8aa(0xe8)]!=null?computeContentHash(_0x3cfb06[_0x3ca8aa(0xe8)]):undefined,_0x4b0bb2=await hasUnsyncedLocalChanges(_0x55adfb[_0x3ca8aa(0xf8)],_0x5e2452,_0x4623ae);_0xb7104e['push']({'lockKey':_0x55adfb['lockKey'],'filePath':_0x55adfb[_0x3ca8aa(0xf8)],'remoteId':_0x3cfb06['id']??null,'status':_0x4b0bb2?_0x3ca8aa(0x106):_0x3ca8aa(0x11d)});}return{'method':_0x3ca8aa(0xfa),'url':_0x3ca8aa(0x11f)+_0x337206[_0x3ca8aa(0x114)]+(_0x487506?_0x3ca8aa(0xe6)+_0x487506:''),'body':{'appCode':_0x337206[_0x3ca8aa(0x114)],'filterType':_0x487506??null,'files':_0xb7104e},'description':_0x3ca8aa(0x11b)+_0xb7104e[_0x3ca8aa(0xf7)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x5df8cc){const _0x386870=a36_0xeeba66,_0x59606c=loadBffProjectConfig(_0x5df8cc[_0x386870(0x114)]),_0x4ee569=await readBffLockFile(_0x59606c[_0x386870(0xf9)]),{lockData:_0x3cd4d4,appLock:_0x1c8a89}=ensureLockScope(_0x4ee569??createEmptyBffLock(),_0x5df8cc[_0x386870(0x114)],_0x59606c[_0x386870(0xeb)],'pull'),_0x2ff1c1=normalizeBffType(_0x5df8cc[_0x386870(0x10f)](_0x386870(0x105)))??undefined;if(_0x5df8cc[_0x386870(0x10f)](_0x386870(0x105))&&!_0x2ff1c1)throw CliErrors['validation'](_0x386870(0xe2));const [_0x3039ec,_0x602548]=await Promise['all']([listBffScripts(_0x5df8cc['appCode'],_0x2ff1c1),getBffScriptStatistics(_0x5df8cc['appCode'])]);if(_0x3039ec[_0x386870(0xf7)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x386870(0x103)};const _0x3db2be=_0x5df8cc[_0x386870(0xef)](_0x386870(0xf4));if(_0x3db2be&&!_0x5df8cc[_0x386870(0x116)]){const _0x5e97d3=await confirmForce();if(!_0x5e97d3)throw CliErrors[_0x386870(0x109)](_0x386870(0xea));}if(_0x3db2be&&_0x5df8cc[_0x386870(0x116)]){}const _0xd7aef9=buildDatasetCodeToAliasMap(_0x5df8cc[_0x386870(0xe9)],_0x5df8cc['appCode']),_0x264255=createHookLocationMap(_0x602548),_0x4b532a=JSON['parse'](JSON[_0x386870(0xfb)](_0x3cd4d4)),_0x16404b=_0x5df8cc['appCode'],_0x5ea189=_0x4b532a[_0x386870(0x108)][_0x16404b];if(!_0x5ea189)throw new Error(_0x386870(0x11e)+_0x16404b+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x58fa7a=[],_0x401c11=[],_0x11e78b=[];for(const _0x2dbb48 of _0x3039ec){const _0x22a6ba=resolveRemoteScriptTarget(_0x59606c,_0x2dbb48,_0x264255,_0x1c8a89[_0x386870(0x119)],_0xd7aef9);if(!_0x22a6ba){_0x401c11['push']({'lockKey':_0x2dbb48[_0x386870(0x107)]+'/'+_0x2dbb48[_0x386870(0xf0)],'reason':_0x386870(0x10a)});continue;}const _0x521391=_0x1c8a89['functions'][_0x22a6ba['lockKey']];try{if(!_0x2dbb48['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x2dbb48[_0x386870(0xe8)]==null)throw new Error(_0x386870(0xfd));const _0x1ab2a4=_0x2dbb48['scriptContent'],_0x293436=computeContentHash(_0x1ab2a4);if(!_0x3db2be){const _0x8515d1=await hasUnsyncedLocalChanges(_0x22a6ba[_0x386870(0xf8)],_0x521391,_0x293436);if(_0x8515d1){_0x401c11['push']({'lockKey':_0x22a6ba[_0x386870(0xf5)],'reason':_0x386870(0xf2)});continue;}}await ensureParentDirectory(_0x22a6ba[_0x386870(0xf8)]),await writeFile(_0x22a6ba[_0x386870(0xf8)],_0x1ab2a4,_0x386870(0xdd));const _0x3095e7={'hash':_0x293436,'remoteId':_0x2dbb48['id'],'version':_0x2dbb48[_0x386870(0xfe)]};_0x22a6ba[_0x386870(0x105)]===_0x386870(0xe1)&&_0x22a6ba[_0x386870(0xed)]&&(_0x3095e7['alias']=_0x22a6ba[_0x386870(0xed)][_0x386870(0xee)],_0x3095e7[_0x386870(0x10e)]=_0x22a6ba['hookLocation'][_0x386870(0x10e)],_0x3095e7[_0x386870(0xdf)]=_0x22a6ba['hookLocation'][_0x386870(0xdf)],_0x3095e7['functionNode']=_0x22a6ba[_0x386870(0xed)][_0x386870(0x113)]),_0x5ea189[_0x386870(0x119)][_0x22a6ba[_0x386870(0xf5)]]=_0x3095e7,_0x58fa7a[_0x386870(0xf6)]({'lockKey':_0x22a6ba[_0x386870(0xf5)],'remoteId':_0x2dbb48['id']});}catch(_0x5cac94){_0x11e78b['push']({'lockKey':_0x22a6ba[_0x386870(0xf5)],'error':_0x5cac94 instanceof Error?_0x5cac94[_0x386870(0xe5)]:String(_0x5cac94)});}}return _0x5ea189['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x59606c['lockFilePath'],_0x4b532a),{'ok':_0x11e78b[_0x386870(0xf7)]===0x0,'data':{'pulled':_0x58fa7a,'skipped':_0x401c11,'failed':_0x11e78b},'message':'Pull\x20complete:\x20'+_0x58fa7a[_0x386870(0xf7)]+_0x386870(0x118)+_0x401c11['length']+_0x386870(0xfc)+_0x11e78b[_0x386870(0xf7)]+_0x386870(0xf1)};}};async function hasUnsyncedLocalChanges(_0x79bdce,_0x5d3c3a,_0x18e65a){const _0xb95f1b=a36_0xeeba66;if(!await fileExists(_0x79bdce))return![];const _0x33df24=await computeFileHash(_0x79bdce);if(!_0x5d3c3a)return _0x18e65a?_0x33df24!==_0x18e65a:!![];return _0x33df24!==_0x5d3c3a[_0xb95f1b(0xf3)];}function buildDatasetCodeToAliasMap(_0x2c8e8e,_0x552a59){const _0x149d84=a36_0xeeba66,_0x4381e6=loadAliasMap(_0x2c8e8e,undefined,resolveApiFilePath(_0x2c8e8e,_0x552a59));return new Map(_0x4381e6[_0x149d84(0xe4)](_0x4295f6=>[_0x4295f6[_0x149d84(0x10e)],_0x4295f6[_0x149d84(0xee)]]));}async function confirmForce(){const _0x2b1e72=a36_0xeeba66,_0x5a360d=createInterface({'input':process[_0x2b1e72(0xe7)],'output':process['stderr']}),_0xd7aa24=await new Promise(_0x126c9e=>{const _0x3e55fc=_0x2b1e72;_0x5a360d['question'](_0x3e55fc(0xe0),_0x126c9e);});return _0x5a360d['close'](),['y','yes'][_0x2b1e72(0x115)](_0xd7aa24['trim']()[_0x2b1e72(0x104)]());}
1
+ const a35_0x4efe28=a35_0x63dd;(function(_0x1cfc45,_0x319035){const _0x34d174=a35_0x63dd,_0x37cade=_0x1cfc45();while(!![]){try{const _0x2b13e4=parseInt(_0x34d174(0x66))/0x1+-parseInt(_0x34d174(0x86))/0x2+parseInt(_0x34d174(0xa9))/0x3+parseInt(_0x34d174(0x92))/0x4+-parseInt(_0x34d174(0x9d))/0x5*(parseInt(_0x34d174(0x7f))/0x6)+-parseInt(_0x34d174(0xa7))/0x7*(-parseInt(_0x34d174(0x74))/0x8)+parseInt(_0x34d174(0x94))/0x9*(parseInt(_0x34d174(0x79))/0xa);if(_0x2b13e4===_0x319035)break;else _0x37cade['push'](_0x37cade['shift']());}catch(_0x418981){_0x37cade['push'](_0x37cade['shift']());}}}(a35_0xffc6,0xc6f5e));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';function a35_0xffc6(){const _0xe61cf4=['map','GET','str','\x20pulled,\x20','cancelled','stderr','would_pull','scriptType','46624mqKyAD','Force\x20overwrite\x20local\x20unsynced\x20changes','Lock\x20scope\x20for\x20app\x20\x22','write','alias','toISOString','Would\x20inspect\x20','boolean','functionNode','Remote\x20script\x20missing\x20id.','includes','nonInteractive','ENDPOINT','version','593272zsnSuf','&type=','lockFilePath','push','datasetCode','350QtvHzU','parse','length','hookLocation','scriptsRoot','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','6nBfSLh','\x20failed','COMMON','skipped','local\x20unsynced\x20changes','No\x20remote\x20BFF\x20scripts\x20found.','lastSync','2122624LJZZye','toLowerCase','Pull\x20complete:\x20','Force\x20pull\x20cancelled.','question','close','utf8','all','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','message','functionName','type','590380wFcsgX','scriptContent','291285umNtiz','bool','stdin','appCode','hash','pull','lockKey','force','filePath','2666810prRyul','bff','Pull\x20only\x20this\x20script\x20type','functions','trim','unresolvable\x20target\x20path','Remote\x20script\x20missing\x20content.','operationType','apiDir','validation','14rFEFey','\x20skipped,\x20','2802912HvJRTP','HOOK','\x20remote\x20BFF\x20script(s)\x20for\x20pull','conflict'];a35_0xffc6=function(){return _0xe61cf4;};return a35_0xffc6();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';function a35_0x63dd(_0x57d7ef,_0x26a0bb){_0x57d7ef=_0x57d7ef-0x65;const _0xffc6f9=a35_0xffc6();let _0x63dd7c=_0xffc6f9[_0x57d7ef];return _0x63dd7c;}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':a35_0x4efe28(0x9e),'command':'pull','description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':a35_0x4efe28(0x69),'flags':[{'name':a35_0x4efe28(0x91),'type':'string','description':a35_0x4efe28(0x9f),'enum':[a35_0x4efe28(0x81),a35_0x4efe28(0x72),a35_0x4efe28(0xaa)]},{'name':'force','type':a35_0x4efe28(0x6d),'description':a35_0x4efe28(0x67)}],async 'dryRun'(_0x465764){const _0x27c60f=a35_0x4efe28,_0xcd26c4=loadBffProjectConfig(_0x465764[_0x27c60f(0x97)]),_0x2c6d8b=await readBffLockFile(_0xcd26c4[_0x27c60f(0x76)]),{appLock:_0xa09452}=ensureLockScope(_0x2c6d8b??createEmptyBffLock(),_0x465764['appCode'],_0xcd26c4['scriptsRoot'],_0x27c60f(0x99)),_0x4e6424=normalizeBffType(_0x465764['str']('type'))??undefined,_0x6eb919=buildDatasetCodeToAliasMap(_0x465764[_0x27c60f(0xa5)],_0x465764[_0x27c60f(0x97)]),[_0x7b1c6c,_0x4ce35f]=await Promise[_0x27c60f(0x8d)]([listBffScripts(_0x465764[_0x27c60f(0x97)],_0x4e6424),getBffScriptStatistics(_0x465764[_0x27c60f(0x97)])]),_0x325209=createHookLocationMap(_0x4ce35f),_0x563982=[];for(const _0x163958 of _0x7b1c6c){const _0x123af8=resolveRemoteScriptTarget(_0xcd26c4,_0x163958,_0x325209,_0xa09452[_0x27c60f(0xa0)],_0x6eb919);if(!_0x123af8){_0x563982[_0x27c60f(0x77)]({'scriptType':_0x163958[_0x27c60f(0x65)],'functionName':_0x163958['functionName']??'','status':_0x27c60f(0x82),'reason':_0x27c60f(0xa2)});continue;}const _0x42a709=_0xa09452[_0x27c60f(0xa0)][_0x123af8[_0x27c60f(0x9a)]],_0x8c5ed6=_0x163958['scriptContent']!=null?computeContentHash(_0x163958[_0x27c60f(0x93)]):undefined,_0x417a0c=await hasUnsyncedLocalChanges(_0x123af8[_0x27c60f(0x9c)],_0x42a709,_0x8c5ed6);_0x563982[_0x27c60f(0x77)]({'lockKey':_0x123af8[_0x27c60f(0x9a)],'filePath':_0x123af8[_0x27c60f(0x9c)],'remoteId':_0x163958['id']??null,'status':_0x417a0c?_0x27c60f(0xac):_0x27c60f(0xb3)});}return{'method':_0x27c60f(0xae),'url':'/api/management/library/scripts/list?appCode='+_0x465764['appCode']+(_0x4e6424?_0x27c60f(0x75)+_0x4e6424:''),'body':{'appCode':_0x465764['appCode'],'filterType':_0x4e6424??null,'files':_0x563982},'description':_0x27c60f(0x6c)+_0x563982['length']+_0x27c60f(0xab)};},async 'execute'(_0x454dc4){const _0xedc8aa=a35_0x4efe28,_0x18d41d=loadBffProjectConfig(_0x454dc4['appCode']),_0x4ecbc0=await readBffLockFile(_0x18d41d[_0xedc8aa(0x76)]),{lockData:_0x537736,appLock:_0x10fdef}=ensureLockScope(_0x4ecbc0??createEmptyBffLock(),_0x454dc4['appCode'],_0x18d41d[_0xedc8aa(0x7d)],_0xedc8aa(0x99)),_0x65ec5c=normalizeBffType(_0x454dc4[_0xedc8aa(0xaf)]('type'))??undefined;if(_0x454dc4[_0xedc8aa(0xaf)](_0xedc8aa(0x91))&&!_0x65ec5c)throw CliErrors[_0xedc8aa(0xa6)](_0xedc8aa(0x7e));const [_0x30a739,_0x402ed7]=await Promise[_0xedc8aa(0x8d)]([listBffScripts(_0x454dc4[_0xedc8aa(0x97)],_0x65ec5c),getBffScriptStatistics(_0x454dc4[_0xedc8aa(0x97)])]);if(_0x30a739['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0xedc8aa(0x84)};const _0x3d2cd5=_0x454dc4[_0xedc8aa(0x95)](_0xedc8aa(0x9b));if(_0x3d2cd5&&!_0x454dc4[_0xedc8aa(0x71)]){const _0x3bee68=await confirmForce();if(!_0x3bee68)throw CliErrors[_0xedc8aa(0xb1)](_0xedc8aa(0x89));}if(_0x3d2cd5&&_0x454dc4[_0xedc8aa(0x71)]){}const _0x4d9900=buildDatasetCodeToAliasMap(_0x454dc4['apiDir'],_0x454dc4[_0xedc8aa(0x97)]),_0x2a203e=createHookLocationMap(_0x402ed7),_0xdce351=JSON[_0xedc8aa(0x7a)](JSON['stringify'](_0x537736)),_0x3b4182=_0x454dc4[_0xedc8aa(0x97)],_0x88eb5c=_0xdce351['apps'][_0x3b4182];if(!_0x88eb5c)throw new Error(_0xedc8aa(0x68)+_0x3b4182+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x404fa4=[],_0x398d60=[],_0xc80d07=[];for(const _0x5c93c7 of _0x30a739){const _0x3a1f1c=resolveRemoteScriptTarget(_0x18d41d,_0x5c93c7,_0x2a203e,_0x10fdef[_0xedc8aa(0xa0)],_0x4d9900);if(!_0x3a1f1c){_0x398d60[_0xedc8aa(0x77)]({'lockKey':_0x5c93c7[_0xedc8aa(0x65)]+'/'+_0x5c93c7[_0xedc8aa(0x90)],'reason':_0xedc8aa(0xa2)});continue;}const _0x2a61e5=_0x10fdef[_0xedc8aa(0xa0)][_0x3a1f1c[_0xedc8aa(0x9a)]];try{if(!_0x5c93c7['id'])throw new Error(_0xedc8aa(0x6f));if(_0x5c93c7[_0xedc8aa(0x93)]==null)throw new Error(_0xedc8aa(0xa3));const _0x67dc8f=_0x5c93c7[_0xedc8aa(0x93)],_0x42fe74=computeContentHash(_0x67dc8f);if(!_0x3d2cd5){const _0x356619=await hasUnsyncedLocalChanges(_0x3a1f1c[_0xedc8aa(0x9c)],_0x2a61e5,_0x42fe74);if(_0x356619){_0x398d60['push']({'lockKey':_0x3a1f1c['lockKey'],'reason':_0xedc8aa(0x83)});continue;}}await ensureParentDirectory(_0x3a1f1c[_0xedc8aa(0x9c)]),await writeFile(_0x3a1f1c[_0xedc8aa(0x9c)],_0x67dc8f,_0xedc8aa(0x8c));const _0x3fbb97={'hash':_0x42fe74,'remoteId':_0x5c93c7['id'],'version':_0x5c93c7[_0xedc8aa(0x73)]};_0x3a1f1c[_0xedc8aa(0x91)]===_0xedc8aa(0xaa)&&_0x3a1f1c[_0xedc8aa(0x7c)]&&(_0x3fbb97[_0xedc8aa(0x6a)]=_0x3a1f1c[_0xedc8aa(0x7c)][_0xedc8aa(0x6a)],_0x3fbb97[_0xedc8aa(0x78)]=_0x3a1f1c[_0xedc8aa(0x7c)][_0xedc8aa(0x78)],_0x3fbb97[_0xedc8aa(0xa4)]=_0x3a1f1c[_0xedc8aa(0x7c)]['operationType'],_0x3fbb97['functionNode']=_0x3a1f1c[_0xedc8aa(0x7c)][_0xedc8aa(0x6e)]),_0x88eb5c[_0xedc8aa(0xa0)][_0x3a1f1c['lockKey']]=_0x3fbb97,_0x404fa4[_0xedc8aa(0x77)]({'lockKey':_0x3a1f1c[_0xedc8aa(0x9a)],'remoteId':_0x5c93c7['id']});}catch(_0x37fd93){_0xc80d07[_0xedc8aa(0x77)]({'lockKey':_0x3a1f1c[_0xedc8aa(0x9a)],'error':_0x37fd93 instanceof Error?_0x37fd93[_0xedc8aa(0x8f)]:String(_0x37fd93)});}}return _0x88eb5c[_0xedc8aa(0x85)]=new Date()[_0xedc8aa(0x6b)](),await writeBffLockFile(_0x18d41d[_0xedc8aa(0x76)],_0xdce351),{'ok':_0xc80d07['length']===0x0,'data':{'pulled':_0x404fa4,'skipped':_0x398d60,'failed':_0xc80d07},'message':_0xedc8aa(0x88)+_0x404fa4[_0xedc8aa(0x7b)]+_0xedc8aa(0xb0)+_0x398d60[_0xedc8aa(0x7b)]+_0xedc8aa(0xa8)+_0xc80d07[_0xedc8aa(0x7b)]+_0xedc8aa(0x80)};}};async function hasUnsyncedLocalChanges(_0x4743f4,_0x340090,_0x5d0c36){const _0x10ce06=a35_0x4efe28;if(!await fileExists(_0x4743f4))return![];const _0x1e74c7=await computeFileHash(_0x4743f4);if(!_0x340090)return _0x5d0c36?_0x1e74c7!==_0x5d0c36:!![];return _0x1e74c7!==_0x340090[_0x10ce06(0x98)];}function buildDatasetCodeToAliasMap(_0x232be8,_0x2995a3){const _0x296d35=a35_0x4efe28,_0x1a3dd5=loadAliasMap(_0x232be8,undefined,resolveApiFilePath(_0x232be8,_0x2995a3));return new Map(_0x1a3dd5[_0x296d35(0xad)](_0x29fb08=>[_0x29fb08[_0x296d35(0x78)],_0x29fb08[_0x296d35(0x6a)]]));}async function confirmForce(){const _0x56e91d=a35_0x4efe28,_0x9c6069=createInterface({'input':process[_0x56e91d(0x96)],'output':process[_0x56e91d(0xb2)]}),_0x170364=await new Promise(_0x38507d=>{const _0x3276f1=_0x56e91d;_0x9c6069[_0x3276f1(0x8a)](_0x3276f1(0x8e),_0x38507d);});return _0x9c6069[_0x56e91d(0x8b)](),['y','yes'][_0x56e91d(0x70)](_0x170364[_0x56e91d(0xa1)]()[_0x56e91d(0x87)]());}
@@ -1 +1 @@
1
- const a37_0x9f4024=a37_0x3e26;(function(_0x53fd78,_0x2946ee){const _0x55c98b=a37_0x3e26,_0x587b10=_0x53fd78();while(!![]){try{const _0x3db054=parseInt(_0x55c98b(0xb4))/0x1*(parseInt(_0x55c98b(0x9d))/0x2)+-parseInt(_0x55c98b(0xdb))/0x3*(-parseInt(_0x55c98b(0xd5))/0x4)+parseInt(_0x55c98b(0xd9))/0x5*(-parseInt(_0x55c98b(0xeb))/0x6)+-parseInt(_0x55c98b(0xea))/0x7+parseInt(_0x55c98b(0xc0))/0x8+-parseInt(_0x55c98b(0xd7))/0x9+-parseInt(_0x55c98b(0xa1))/0xa*(parseInt(_0x55c98b(0xc9))/0xb);if(_0x3db054===_0x2946ee)break;else _0x587b10['push'](_0x587b10['shift']());}catch(_0x95ed74){_0x587b10['push'](_0x587b10['shift']());}}}(a37_0x4901,0x2e506));function a37_0x4901(){const _0x542cc2=['datasetCodeToDataset','would_push','alias','125362FkSxQw','Local\x20function\x20not\x20found:\x20','type','push','validation','functionNode','version','some','Force\x20push\x20ignoring\x20hash\x20protection','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','lastSync','bff','2209576hYVXdj','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','\x22\x20not\x20found\x20after\x20ensureLockScope.',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Push\x20complete:\x20','cleared','force','map','set','25751FUDiKP','join','hash','get','aliasToDatasetCode','filter','appCode','string','filePath','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','Runtime\x20script\x20cache\x20cleared.','update','488LCJkkP','unchanged','1585494zYHCQL','remoteId','130835JrCyHc','lockKey','2076dSDbDC','Cannot\x20resolve\x20dataset\x20for\x20\x22','scriptsRoot','datasetId','stringify','/api/management/library/scripts/save','description','values','toISOString','Would\x20inspect\x20','bool','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','attempted','functions','POST','1401449bRUOFV','30jXNVyh','ENDPOINT','\x20skipped,\x20','has','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','6ElKdjP','runtime\x20cache\x20clear\x20failed','runtime\x20cache\x20not\x20needed','parse','170YzPJAQ','length','every','create','operationType','apps','name','script','Push\x20only\x20this\x20script\x20type','message','lockFilePath','status','Push\x20local\x20BFF\x20scripts\x20to\x20remote','datasetCode','str','HOOK'];a37_0x4901=function(){return _0x542cc2;};return a37_0x4901();}import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x9f4024(0xbf),'command':'push','description':a37_0x9f4024(0xad),'risk':'high-risk-write','flags':[{'name':a37_0x9f4024(0xb6),'type':a37_0x9f4024(0xd0),'description':a37_0x9f4024(0xa9),'enum':['COMMON',a37_0x9f4024(0xec),a37_0x9f4024(0xb0)]},{'name':a37_0x9f4024(0xa7),'type':a37_0x9f4024(0xd0),'description':a37_0x9f4024(0xef)},{'name':a37_0x9f4024(0xc6),'type':'boolean','description':a37_0x9f4024(0xbc)}],async 'dryRun'(_0x39055d){const _0x4f743a=a37_0x9f4024,_0x40f68c=loadBffProjectConfig(_0x39055d[_0x4f743a(0xcf)]),_0x49ea78=await readBffLockFile(_0x40f68c[_0x4f743a(0xab)]),{appLock:_0x5df1b5}=ensureLockScope(_0x49ea78??createEmptyBffLock(),_0x39055d[_0x4f743a(0xcf)],_0x40f68c[_0x4f743a(0xdd)],'push'),_0x15927c=await getTargetFunctions(_0x40f68c,_0x39055d),_0x3481da=_0x39055d[_0x4f743a(0xe5)]('force'),_0xfecd9b=[];for(const _0x584e47 of _0x15927c){const _0x29d198=await computeFileHash(_0x584e47['filePath']),_0x528bea=_0x5df1b5['functions'][_0x584e47['lockKey']],_0x526691=!!_0x528bea&&_0x528bea['hash']===_0x29d198;_0xfecd9b[_0x4f743a(0xb7)]({'lockKey':_0x584e47[_0x4f743a(0xda)],'filePath':_0x584e47[_0x4f743a(0xd1)],'remoteId':_0x528bea?.[_0x4f743a(0xd8)]??null,'mode':_0x528bea?.[_0x4f743a(0xd8)]?_0x4f743a(0xd4):_0x4f743a(0xa4),'status':!_0x3481da&&_0x526691?'unchanged':_0x4f743a(0xb2)});}return{'method':_0x4f743a(0xe9),'url':_0x4f743a(0xe0),'body':{'appCode':_0x39055d[_0x4f743a(0xcf)],'force':_0x3481da,'files':_0xfecd9b,'cacheClearAtRuntime':_0xfecd9b[_0x4f743a(0xbb)](_0x535f8d=>_0x535f8d[_0x4f743a(0xac)]===_0x4f743a(0xb2)),'cacheClearAtRuntimeTimes':_0xfecd9b[_0x4f743a(0xbb)](_0x3ea4b8=>_0x3ea4b8['status']===_0x4f743a(0xb2))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x4f743a(0xe4)+_0xfecd9b['length']+_0x4f743a(0xe6)};},async 'execute'(_0xde2e73){const _0x5da821=a37_0x9f4024,_0x7091ec=loadBffProjectConfig(_0xde2e73[_0x5da821(0xcf)]),_0x1d04a9=await readBffLockFile(_0x7091ec[_0x5da821(0xab)]),{lockData:_0x36ac50,appLock:_0x328e33}=ensureLockScope(_0x1d04a9??createEmptyBffLock(),_0xde2e73['appCode'],_0x7091ec[_0x5da821(0xdd)],_0x5da821(0xb7)),_0x41f39a=await getTargetFunctions(_0x7091ec,_0xde2e73);if(_0x41f39a[_0x5da821(0xa2)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x412c67=_0xde2e73[_0x5da821(0xe5)](_0x5da821(0xc6)),_0x239a00=JSON[_0x5da821(0xa0)](JSON[_0x5da821(0xdf)](_0x36ac50)),_0x11f15e=_0x239a00[_0x5da821(0xa6)][_0xde2e73['appCode']];if(!_0x11f15e)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0xde2e73[_0x5da821(0xcf)]+_0x5da821(0xc2));const _0x105518=await buildHookMaps(_0xde2e73[_0x5da821(0xcf)],_0xde2e73['apiDir'],_0x41f39a,_0x11f15e),_0x346b0c=[],_0x26de8f=[],_0x4d2628=[];for(const _0x552e8a of _0x41f39a){const _0x4cd627=await computeFileHash(_0x552e8a[_0x5da821(0xd1)]),_0x1a75db=_0x11f15e[_0x5da821(0xe8)][_0x552e8a[_0x5da821(0xda)]];if(!_0x412c67&&_0x1a75db&&_0x1a75db[_0x5da821(0xcb)]===_0x4cd627){_0x26de8f['push']({'lockKey':_0x552e8a[_0x5da821(0xda)],'reason':_0x5da821(0xd6)});continue;}try{await uploadSingleFunction(_0xde2e73[_0x5da821(0xcf)],_0x552e8a,_0x11f15e,_0x105518);const _0x39608a=_0x11f15e[_0x5da821(0xe8)][_0x552e8a[_0x5da821(0xda)]];_0x346b0c[_0x5da821(0xb7)]({'lockKey':_0x552e8a['lockKey'],'remoteId':_0x39608a?.['remoteId']??0x0});}catch(_0x27d8c8){_0x4d2628[_0x5da821(0xb7)]({'lockKey':_0x552e8a[_0x5da821(0xda)],'error':_0x27d8c8 instanceof Error?_0x27d8c8[_0x5da821(0xaa)]:String(_0x27d8c8)});}}_0x11f15e[_0x5da821(0xbe)]=new Date()[_0x5da821(0xe3)](),await writeBffLockFile(_0x7091ec[_0x5da821(0xab)],_0x239a00),await waitForUploadedLockEntries(_0x7091ec[_0x5da821(0xab)],_0xde2e73['appCode'],_0x346b0c[_0x5da821(0xc7)](_0x2f6b01=>_0x2f6b01['lockKey']));let _0x445b61={'attempted':![],'cleared':![]};if(_0x346b0c[_0x5da821(0xa2)]>0x0)try{let _0x205219='';for(let _0x591fea=0x0;_0x591fea<CACHE_CLEAR_ATTEMPTS;_0x591fea+=0x1){_0x205219=await clearBffScriptCache(),_0x591fea<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x445b61={'attempted':!![],'cleared':!![],'message':_0x205219||_0x5da821(0xd3)};}catch(_0x1ad20f){_0x445b61={'attempted':!![],'cleared':![],'error':_0x1ad20f instanceof Error?_0x1ad20f[_0x5da821(0xaa)]:String(_0x1ad20f)};}const _0x235926=_0x4d2628[_0x5da821(0xa2)]===0x0&&(_0x445b61['attempted']?_0x445b61['cleared']:!![]),_0x1bb5c8=_0x445b61[_0x5da821(0xe7)]?_0x445b61[_0x5da821(0xc5)]?'runtime\x20cache\x20cleared':_0x5da821(0x9e):_0x5da821(0x9f);return{'ok':_0x235926,'data':{'uploaded':_0x346b0c,'skipped':_0x26de8f,'failed':_0x4d2628,'cacheClear':_0x445b61},'message':_0x5da821(0xc4)+_0x346b0c[_0x5da821(0xa2)]+'\x20uploaded,\x20'+_0x26de8f[_0x5da821(0xa2)]+_0x5da821(0xed)+_0x4d2628[_0x5da821(0xa2)]+'\x20failed,\x20'+_0x1bb5c8};}};async function getTargetFunctions(_0x132011,_0x183ac7){const _0x4dace1=a37_0x9f4024,_0xce966a=_0x183ac7[_0x4dace1(0xaf)]('type'),_0x245166=_0x183ac7[_0x4dace1(0xaf)]('name'),_0x5485f1=normalizeBffType(_0xce966a)??undefined;if(_0x245166&&!_0x5485f1)throw CliErrors[_0x4dace1(0xb8)](_0x4dace1(0xd2));const _0x5cb97c=await scanLocalBffFunctions(_0x132011,_0x5485f1);if(_0x245166){const _0x2c952d=_0x5cb97c[_0x4dace1(0xce)](_0x31face=>_0x31face['name']===_0x245166);if(_0x2c952d['length']===0x0)throw CliErrors['validation'](_0x4dace1(0xb5)+_0x5485f1+'/'+_0x245166);return _0x2c952d;}return _0x5cb97c;}async function buildHookMaps(_0x24c15c,_0x33cc9f,_0x54875e,_0x155b9b){const _0x19771e=a37_0x9f4024,_0x5d2e45=_0x54875e[_0x19771e(0xbb)](_0x5889e1=>_0x5889e1[_0x19771e(0xb6)]==='HOOK');if(!_0x5d2e45)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2fc672=loadAliasMap(_0x33cc9f,undefined,resolveApiFilePath(_0x33cc9f,_0x24c15c)),_0x3c6cca=new Map(_0x2fc672[_0x19771e(0xc7)](_0x292acb=>[_0x292acb[_0x19771e(0xb3)],_0x292acb[_0x19771e(0xae)]]));for(const _0x35cfcd of Object[_0x19771e(0xe2)](_0x155b9b[_0x19771e(0xe8)])){_0x35cfcd[_0x19771e(0xb3)]&&_0x35cfcd[_0x19771e(0xae)]&&!_0x3c6cca['has'](_0x35cfcd['alias'])&&_0x3c6cca[_0x19771e(0xc8)](_0x35cfcd[_0x19771e(0xb3)],_0x35cfcd[_0x19771e(0xae)]);}const _0x5a1a6f=await listDatasets(_0x24c15c),_0x436b57=new Map(_0x5a1a6f[_0x19771e(0xc7)](_0x532571=>[_0x532571['code'],_0x532571]));return{'aliasToDatasetCode':_0x3c6cca,'datasetCodeToDataset':_0x436b57};}async function uploadSingleFunction(_0x2a7331,_0x5f8db,_0x1afd62,_0x1b6809){const _0x50d448=a37_0x9f4024,_0x10a458=await readFile(_0x5f8db[_0x50d448(0xd1)],'utf8'),_0x365f92=await computeFileHash(_0x5f8db[_0x50d448(0xd1)]),_0x5bdcb4=_0x1afd62['functions'][_0x5f8db[_0x50d448(0xda)]];if(_0x5bdcb4?.[_0x50d448(0xd8)]&&_0x5bdcb4[_0x50d448(0xba)]==null)throw CliErrors[_0x50d448(0xb8)](_0x5f8db[_0x50d448(0xda)]+_0x50d448(0xc3));let _0x3297d9=extractScriptDescription(_0x10a458);if(!_0x3297d9&&_0x5bdcb4?.['remoteId']){const _0x1520de=await getBffScriptInfo(_0x5bdcb4['remoteId']);_0x3297d9=_0x1520de[_0x50d448(0xe1)]||undefined;}const _0x661955={'appCode':_0x2a7331,'functionName':_0x5f8db[_0x50d448(0xa7)],'scriptType':_0x5f8db[_0x50d448(0xb6)],'scriptContent':_0x10a458};if(_0x5bdcb4?.[_0x50d448(0xd8)])_0x661955['id']=_0x5bdcb4['remoteId'];if(_0x5bdcb4?.[_0x50d448(0xba)]!=null)_0x661955['version']=_0x5bdcb4['version'];if(_0x3297d9)_0x661955[_0x50d448(0xe1)]=_0x3297d9;if(_0x5f8db[_0x50d448(0xb6)]===_0x50d448(0xb0)){const _0x38c214=_0x5f8db[_0x50d448(0xb3)];if(!_0x38c214||!_0x5f8db[_0x50d448(0xa5)]||!_0x5f8db[_0x50d448(0xb9)])throw CliErrors[_0x50d448(0xb8)]('Incomplete\x20HOOK\x20path:\x20'+_0x5f8db[_0x50d448(0xda)]);const _0x4cdc54=_0x1b6809[_0x50d448(0xcd)][_0x50d448(0xcc)](_0x38c214)??_0x5bdcb4?.[_0x50d448(0xae)]??_0x38c214,_0x593fd8=_0x1b6809[_0x50d448(0xb1)][_0x50d448(0xcc)](_0x4cdc54);if(!_0x593fd8)throw CliErrors[_0x50d448(0xb8)](_0x50d448(0xdc)+_0x38c214+'\x22.\x20'+('Run\x20`'+CLI_BIN_NAME+_0x50d448(0xc1)));_0x661955[_0x50d448(0xde)]=_0x593fd8['id'],_0x661955[_0x50d448(0xa5)]=_0x5f8db[_0x50d448(0xa5)],_0x661955[_0x50d448(0xb9)]=_0x5f8db[_0x50d448(0xb9)];}const _0x3970ee=await saveBffScript(_0x661955),_0x58e00a=_0x3970ee['id'],_0x1a11ed=_0x3970ee[_0x50d448(0xa8)]??await getBffScriptInfo(_0x58e00a),_0x5593db={'hash':_0x365f92,'remoteId':_0x58e00a,'version':_0x1a11ed[_0x50d448(0xba)]};if(_0x5f8db['type']===_0x50d448(0xb0)){const _0x34fc53=_0x5f8db['alias'],_0x3e076a=_0x1b6809[_0x50d448(0xcd)]['get'](_0x34fc53)??_0x5bdcb4?.['datasetCode']??_0x34fc53;_0x1b6809[_0x50d448(0xcd)][_0x50d448(0xee)](_0x34fc53)?_0x5593db['alias']=_0x34fc53:_0x5593db[_0x50d448(0xb3)]=_0x5bdcb4?.[_0x50d448(0xb3)],_0x5593db[_0x50d448(0xae)]=_0x3e076a,_0x5593db[_0x50d448(0xa5)]=_0x5f8db[_0x50d448(0xa5)],_0x5593db[_0x50d448(0xb9)]=_0x5f8db[_0x50d448(0xb9)];}_0x1afd62['functions'][_0x5f8db[_0x50d448(0xda)]]=_0x5593db;}function a37_0x3e26(_0x3b9b26,_0x4f4855){_0x3b9b26=_0x3b9b26-0x9d;const _0x4901e8=a37_0x4901();let _0x3e26b3=_0x4901e8[_0x3b9b26];return _0x3e26b3;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3dcf3e,_0x7d36c3,_0x39beb6){const _0x101298=a37_0x9f4024;if(_0x39beb6[_0x101298(0xa2)]===0x0)return;for(let _0x448298=0x0;_0x448298<LOCK_SETTLE_RETRY_COUNT;_0x448298+=0x1){const _0x1f2ddf=await readBffLockFile(_0x3dcf3e),_0xce794c=_0x1f2ddf?.['apps']?.[_0x7d36c3]?.[_0x101298(0xe8)]??{},_0x6c8a6b=_0x39beb6[_0x101298(0xa3)](_0x57ca16=>!!_0xce794c[_0x57ca16]?.[_0x101298(0xd8)]);if(_0x6c8a6b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x101298(0xbd)+_0x39beb6[_0x101298(0xca)](',\x20')+'.');}
1
+ const a36_0x3779c2=a36_0x17f1;(function(_0x35eb23,_0x47f6b2){const _0x5dbc4c=a36_0x17f1,_0x3072d1=_0x35eb23();while(!![]){try{const _0x2db643=parseInt(_0x5dbc4c(0x120))/0x1+-parseInt(_0x5dbc4c(0x137))/0x2*(parseInt(_0x5dbc4c(0x155))/0x3)+-parseInt(_0x5dbc4c(0x147))/0x4*(parseInt(_0x5dbc4c(0x12e))/0x5)+parseInt(_0x5dbc4c(0x14d))/0x6+-parseInt(_0x5dbc4c(0x13e))/0x7*(-parseInt(_0x5dbc4c(0x12d))/0x8)+-parseInt(_0x5dbc4c(0x11c))/0x9*(-parseInt(_0x5dbc4c(0x15d))/0xa)+parseInt(_0x5dbc4c(0x135))/0xb*(-parseInt(_0x5dbc4c(0x15a))/0xc);if(_0x2db643===_0x47f6b2)break;else _0x3072d1['push'](_0x3072d1['shift']());}catch(_0x47f061){_0x3072d1['push'](_0x3072d1['shift']());}}}(a36_0x1a49,0x5b129));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a36_0x1a49(){const _0x103970=['type','utf8','name','hash','filePath','get','1405215tfjExt','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','description','lockFilePath','runtime\x20cache\x20cleared','apps','aliasToDatasetCode','would_push','some','44zqccHD','\x22\x20not\x20found\x20after\x20ensureLockScope.','length','functions','create','datasetId','1177752FbWeMc','set','bff','bool','message','validation','Runtime\x20script\x20cache\x20cleared.','map','7383YSoIXl','Cannot\x20resolve\x20dataset\x20for\x20\x22','remoteId','boolean','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','36ZzNYki','\x22.\x20','Would\x20inspect\x20','59120sgvXKx','runtime\x20cache\x20not\x20needed','str','scriptsRoot','string','join','filter',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','functionNode','Push\x20complete:\x20','HOOK','Lock\x20scope\x20for\x20app\x20\x22','/api/management/library/scripts/save','cleared','operationType','alias','toISOString','lastSync','36snCaco','ENDPOINT','push','appCode','560775JdMqlU','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','stringify','Push\x20only\x20this\x20script\x20type','attempted','lockKey','Push\x20local\x20BFF\x20scripts\x20to\x20remote','POST','\x20failed,\x20','code','parse','version','has','8OkmakP','84215MtPYFw','datasetCode','force','Local\x20function\x20not\x20found:\x20','\x20uploaded,\x20','status','unchanged','1136476rOZuqF','Force\x20push\x20ignoring\x20hash\x20protection','92jLMONj'];a36_0x1a49=function(){return _0x103970;};return a36_0x1a49();}const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a36_0x3779c2(0x14f),'command':a36_0x3779c2(0x11e),'description':a36_0x3779c2(0x126),'risk':'high-risk-write','flags':[{'name':a36_0x3779c2(0x138),'type':'string','description':a36_0x3779c2(0x123),'enum':['COMMON',a36_0x3779c2(0x11d),a36_0x3779c2(0x114)]},{'name':a36_0x3779c2(0x13a),'type':a36_0x3779c2(0x10e),'description':a36_0x3779c2(0x13f)},{'name':a36_0x3779c2(0x130),'type':a36_0x3779c2(0x158),'description':a36_0x3779c2(0x136)}],async 'dryRun'(_0x3f6b2b){const _0x3a608d=a36_0x3779c2,_0x137cef=loadBffProjectConfig(_0x3f6b2b[_0x3a608d(0x11f)]),_0x1e9454=await readBffLockFile(_0x137cef[_0x3a608d(0x141)]),{appLock:_0x23d34b}=ensureLockScope(_0x1e9454??createEmptyBffLock(),_0x3f6b2b[_0x3a608d(0x11f)],_0x137cef[_0x3a608d(0x160)],_0x3a608d(0x11e)),_0x505b93=await getTargetFunctions(_0x137cef,_0x3f6b2b),_0x7d38b2=_0x3f6b2b[_0x3a608d(0x150)]('force'),_0x379ac2=[];for(const _0x516c58 of _0x505b93){const _0x1c6d75=await computeFileHash(_0x516c58[_0x3a608d(0x13c)]),_0x23988e=_0x23d34b[_0x3a608d(0x14a)][_0x516c58['lockKey']],_0x5caaf9=!!_0x23988e&&_0x23988e[_0x3a608d(0x13b)]===_0x1c6d75;_0x379ac2[_0x3a608d(0x11e)]({'lockKey':_0x516c58['lockKey'],'filePath':_0x516c58[_0x3a608d(0x13c)],'remoteId':_0x23988e?.[_0x3a608d(0x157)]??null,'mode':_0x23988e?.[_0x3a608d(0x157)]?'update':_0x3a608d(0x14b),'status':!_0x7d38b2&&_0x5caaf9?_0x3a608d(0x134):_0x3a608d(0x145)});}return{'method':_0x3a608d(0x127),'url':_0x3a608d(0x116),'body':{'appCode':_0x3f6b2b[_0x3a608d(0x11f)],'force':_0x7d38b2,'files':_0x379ac2,'cacheClearAtRuntime':_0x379ac2[_0x3a608d(0x146)](_0x55114b=>_0x55114b[_0x3a608d(0x133)]===_0x3a608d(0x145)),'cacheClearAtRuntimeTimes':_0x379ac2[_0x3a608d(0x146)](_0x4b1acc=>_0x4b1acc[_0x3a608d(0x133)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3a608d(0x15c)+_0x379ac2[_0x3a608d(0x149)]+_0x3a608d(0x121)};},async 'execute'(_0x3c25da){const _0x2420b1=a36_0x3779c2,_0xa40bc5=loadBffProjectConfig(_0x3c25da[_0x2420b1(0x11f)]),_0xcc51a5=await readBffLockFile(_0xa40bc5[_0x2420b1(0x141)]),{lockData:_0x348270,appLock:_0x216ba2}=ensureLockScope(_0xcc51a5??createEmptyBffLock(),_0x3c25da[_0x2420b1(0x11f)],_0xa40bc5[_0x2420b1(0x160)],_0x2420b1(0x11e)),_0x2ba62b=await getTargetFunctions(_0xa40bc5,_0x3c25da);if(_0x2ba62b[_0x2420b1(0x149)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x5b0ed8=_0x3c25da['bool']('force'),_0x3d6cf5=JSON[_0x2420b1(0x12a)](JSON[_0x2420b1(0x122)](_0x348270)),_0x1af6fd=_0x3d6cf5[_0x2420b1(0x143)][_0x3c25da[_0x2420b1(0x11f)]];if(!_0x1af6fd)throw new Error(_0x2420b1(0x115)+_0x3c25da[_0x2420b1(0x11f)]+_0x2420b1(0x148));const _0x1798b2=await buildHookMaps(_0x3c25da[_0x2420b1(0x11f)],_0x3c25da['apiDir'],_0x2ba62b,_0x1af6fd),_0x492db1=[],_0x4a03bb=[],_0x1d1ad1=[];for(const _0x59401f of _0x2ba62b){const _0x6bf128=await computeFileHash(_0x59401f[_0x2420b1(0x13c)]),_0x17faff=_0x1af6fd[_0x2420b1(0x14a)][_0x59401f[_0x2420b1(0x125)]];if(!_0x5b0ed8&&_0x17faff&&_0x17faff[_0x2420b1(0x13b)]===_0x6bf128){_0x4a03bb[_0x2420b1(0x11e)]({'lockKey':_0x59401f[_0x2420b1(0x125)],'reason':_0x2420b1(0x134)});continue;}try{await uploadSingleFunction(_0x3c25da[_0x2420b1(0x11f)],_0x59401f,_0x1af6fd,_0x1798b2);const _0x2619e0=_0x1af6fd['functions'][_0x59401f[_0x2420b1(0x125)]];_0x492db1['push']({'lockKey':_0x59401f[_0x2420b1(0x125)],'remoteId':_0x2619e0?.['remoteId']??0x0});}catch(_0x590d71){_0x1d1ad1['push']({'lockKey':_0x59401f[_0x2420b1(0x125)],'error':_0x590d71 instanceof Error?_0x590d71['message']:String(_0x590d71)});}}_0x1af6fd[_0x2420b1(0x11b)]=new Date()[_0x2420b1(0x11a)](),await writeBffLockFile(_0xa40bc5[_0x2420b1(0x141)],_0x3d6cf5),await waitForUploadedLockEntries(_0xa40bc5[_0x2420b1(0x141)],_0x3c25da[_0x2420b1(0x11f)],_0x492db1[_0x2420b1(0x154)](_0xe28c14=>_0xe28c14[_0x2420b1(0x125)]));let _0x4f4e0d={'attempted':![],'cleared':![]};if(_0x492db1[_0x2420b1(0x149)]>0x0)try{let _0x9dae1d='';for(let _0x36aae8=0x0;_0x36aae8<CACHE_CLEAR_ATTEMPTS;_0x36aae8+=0x1){_0x9dae1d=await clearBffScriptCache(),_0x36aae8<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4f4e0d={'attempted':!![],'cleared':!![],'message':_0x9dae1d||_0x2420b1(0x153)};}catch(_0x5ead94){_0x4f4e0d={'attempted':!![],'cleared':![],'error':_0x5ead94 instanceof Error?_0x5ead94[_0x2420b1(0x151)]:String(_0x5ead94)};}const _0x40bce6=_0x1d1ad1['length']===0x0&&(_0x4f4e0d['attempted']?_0x4f4e0d['cleared']:!![]),_0x3157c7=_0x4f4e0d[_0x2420b1(0x124)]?_0x4f4e0d[_0x2420b1(0x117)]?_0x2420b1(0x142):'runtime\x20cache\x20clear\x20failed':_0x2420b1(0x15e);return{'ok':_0x40bce6,'data':{'uploaded':_0x492db1,'skipped':_0x4a03bb,'failed':_0x1d1ad1,'cacheClear':_0x4f4e0d},'message':_0x2420b1(0x113)+_0x492db1['length']+_0x2420b1(0x132)+_0x4a03bb[_0x2420b1(0x149)]+'\x20skipped,\x20'+_0x1d1ad1[_0x2420b1(0x149)]+_0x2420b1(0x128)+_0x3157c7};}};async function getTargetFunctions(_0x14e0ea,_0x135c87){const _0x47f18b=a36_0x3779c2,_0x54f358=_0x135c87[_0x47f18b(0x15f)]('type'),_0x3b19e3=_0x135c87['str'](_0x47f18b(0x13a)),_0x5ee8a2=normalizeBffType(_0x54f358)??undefined;if(_0x3b19e3&&!_0x5ee8a2)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x10b0f9=await scanLocalBffFunctions(_0x14e0ea,_0x5ee8a2);if(_0x3b19e3){const _0x269423=_0x10b0f9[_0x47f18b(0x110)](_0x3a6ae9=>_0x3a6ae9[_0x47f18b(0x13a)]===_0x3b19e3);if(_0x269423['length']===0x0)throw CliErrors[_0x47f18b(0x152)](_0x47f18b(0x131)+_0x5ee8a2+'/'+_0x3b19e3);return _0x269423;}return _0x10b0f9;}function a36_0x17f1(_0x3e8633,_0x501cbc){_0x3e8633=_0x3e8633-0x10e;const _0x1a496e=a36_0x1a49();let _0x17f100=_0x1a496e[_0x3e8633];return _0x17f100;}async function buildHookMaps(_0x890d52,_0x4a81e8,_0x1f20c4,_0x5c5ff9){const _0x4610ec=a36_0x3779c2,_0x56fa6a=_0x1f20c4[_0x4610ec(0x146)](_0x264dee=>_0x264dee[_0x4610ec(0x138)]==='HOOK');if(!_0x56fa6a)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x5a8fe6=loadAliasMap(_0x4a81e8,undefined,resolveApiFilePath(_0x4a81e8,_0x890d52)),_0xe85354=new Map(_0x5a8fe6[_0x4610ec(0x154)](_0x33c922=>[_0x33c922[_0x4610ec(0x119)],_0x33c922[_0x4610ec(0x12f)]]));for(const _0x5735c7 of Object['values'](_0x5c5ff9[_0x4610ec(0x14a)])){_0x5735c7['alias']&&_0x5735c7[_0x4610ec(0x12f)]&&!_0xe85354[_0x4610ec(0x12c)](_0x5735c7[_0x4610ec(0x119)])&&_0xe85354[_0x4610ec(0x14e)](_0x5735c7['alias'],_0x5735c7[_0x4610ec(0x12f)]);}const _0x3294ea=await listDatasets(_0x890d52),_0x5347d8=new Map(_0x3294ea[_0x4610ec(0x154)](_0x1c42d8=>[_0x1c42d8[_0x4610ec(0x129)],_0x1c42d8]));return{'aliasToDatasetCode':_0xe85354,'datasetCodeToDataset':_0x5347d8};}async function uploadSingleFunction(_0x37a34d,_0x2ac2a3,_0x30e492,_0x56f765){const _0x58d58c=a36_0x3779c2,_0x4caa01=await readFile(_0x2ac2a3[_0x58d58c(0x13c)],_0x58d58c(0x139)),_0x207d55=await computeFileHash(_0x2ac2a3[_0x58d58c(0x13c)]),_0x238046=_0x30e492['functions'][_0x2ac2a3['lockKey']];if(_0x238046?.[_0x58d58c(0x157)]&&_0x238046['version']==null)throw CliErrors[_0x58d58c(0x152)](_0x2ac2a3[_0x58d58c(0x125)]+_0x58d58c(0x111));let _0x1f8f68=extractScriptDescription(_0x4caa01);if(!_0x1f8f68&&_0x238046?.[_0x58d58c(0x157)]){const _0x1caea7=await getBffScriptInfo(_0x238046[_0x58d58c(0x157)]);_0x1f8f68=_0x1caea7[_0x58d58c(0x140)]||undefined;}const _0xc8158={'appCode':_0x37a34d,'functionName':_0x2ac2a3[_0x58d58c(0x13a)],'scriptType':_0x2ac2a3[_0x58d58c(0x138)],'scriptContent':_0x4caa01};if(_0x238046?.[_0x58d58c(0x157)])_0xc8158['id']=_0x238046[_0x58d58c(0x157)];if(_0x238046?.['version']!=null)_0xc8158['version']=_0x238046[_0x58d58c(0x12b)];if(_0x1f8f68)_0xc8158[_0x58d58c(0x140)]=_0x1f8f68;if(_0x2ac2a3[_0x58d58c(0x138)]==='HOOK'){const _0x3910d5=_0x2ac2a3[_0x58d58c(0x119)];if(!_0x3910d5||!_0x2ac2a3[_0x58d58c(0x118)]||!_0x2ac2a3[_0x58d58c(0x112)])throw CliErrors[_0x58d58c(0x152)]('Incomplete\x20HOOK\x20path:\x20'+_0x2ac2a3[_0x58d58c(0x125)]);const _0xaffe19=_0x56f765[_0x58d58c(0x144)][_0x58d58c(0x13d)](_0x3910d5)??_0x238046?.[_0x58d58c(0x12f)]??_0x3910d5,_0x22c40b=_0x56f765['datasetCodeToDataset']['get'](_0xaffe19);if(!_0x22c40b)throw CliErrors[_0x58d58c(0x152)](_0x58d58c(0x156)+_0x3910d5+_0x58d58c(0x15b)+('Run\x20`'+CLI_BIN_NAME+_0x58d58c(0x159)));_0xc8158[_0x58d58c(0x14c)]=_0x22c40b['id'],_0xc8158[_0x58d58c(0x118)]=_0x2ac2a3[_0x58d58c(0x118)],_0xc8158['functionNode']=_0x2ac2a3[_0x58d58c(0x112)];}const _0x5b23c7=await saveBffScript(_0xc8158),_0x4affa9=_0x5b23c7['id'],_0x1ce3b0=_0x5b23c7['script']??await getBffScriptInfo(_0x4affa9),_0x21fe90={'hash':_0x207d55,'remoteId':_0x4affa9,'version':_0x1ce3b0['version']};if(_0x2ac2a3[_0x58d58c(0x138)]==='HOOK'){const _0x35132b=_0x2ac2a3[_0x58d58c(0x119)],_0x5cc93f=_0x56f765[_0x58d58c(0x144)][_0x58d58c(0x13d)](_0x35132b)??_0x238046?.[_0x58d58c(0x12f)]??_0x35132b;_0x56f765[_0x58d58c(0x144)]['has'](_0x35132b)?_0x21fe90[_0x58d58c(0x119)]=_0x35132b:_0x21fe90[_0x58d58c(0x119)]=_0x238046?.[_0x58d58c(0x119)],_0x21fe90[_0x58d58c(0x12f)]=_0x5cc93f,_0x21fe90[_0x58d58c(0x118)]=_0x2ac2a3[_0x58d58c(0x118)],_0x21fe90['functionNode']=_0x2ac2a3['functionNode'];}_0x30e492['functions'][_0x2ac2a3['lockKey']]=_0x21fe90;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x48e9fc,_0x1664e7,_0x1a6a4a){const _0x2a8d27=a36_0x3779c2;if(_0x1a6a4a[_0x2a8d27(0x149)]===0x0)return;for(let _0x8f57aa=0x0;_0x8f57aa<LOCK_SETTLE_RETRY_COUNT;_0x8f57aa+=0x1){const _0x4cb0c2=await readBffLockFile(_0x48e9fc),_0x268591=_0x4cb0c2?.[_0x2a8d27(0x143)]?.[_0x1664e7]?.[_0x2a8d27(0x14a)]??{},_0x2b50f8=_0x1a6a4a['every'](_0x5b8d0d=>!!_0x268591[_0x5b8d0d]?.['remoteId']);if(_0x2b50f8)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x1a6a4a[_0x2a8d27(0x10f)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a38_0x324a33=a38_0x4303;(function(_0xabe151,_0x1a8f03){const _0x15a6fb=a38_0x4303,_0x601b66=_0xabe151();while(!![]){try{const _0x473d40=parseInt(_0x15a6fb(0xdf))/0x1+parseInt(_0x15a6fb(0xeb))/0x2+-parseInt(_0x15a6fb(0xf3))/0x3*(-parseInt(_0x15a6fb(0xee))/0x4)+parseInt(_0x15a6fb(0xe5))/0x5*(parseInt(_0x15a6fb(0xe6))/0x6)+parseInt(_0x15a6fb(0xef))/0x7*(-parseInt(_0x15a6fb(0xf1))/0x8)+-parseInt(_0x15a6fb(0xea))/0x9+-parseInt(_0x15a6fb(0xdc))/0xa*(parseInt(_0x15a6fb(0xe4))/0xb);if(_0x473d40===_0x1a8f03)break;else _0x601b66['push'](_0x601b66['shift']());}catch(_0x1473bf){_0x601b66['push'](_0x601b66['shift']());}}}(a38_0x708a,0x844bb));function a38_0x708a(){const _0x59bdd4=['bff','status','10hUxMFx','length','push','869514rrwSro','All\x20BFF\x20scripts\x20are\x20in\x20sync.','appCode','bool','lockFilePath','10734559tOHhwb','5WQZzil','6162702lkkdpC','functions','scriptsRoot','map','2818197DrlkNI','322390MWjjbo','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','\x20remote-only','4jhMctI','7147eyJssE','all','7312gHKtHg','datasetCode','2118759NlmiEu','alias','apiDir','remote','has','\x20unchanged','\x20modified,\x20','lockKey'];a38_0x708a=function(){return _0x59bdd4;};return a38_0x708a();}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_0x4303(_0x2f1961,_0x4ca731){_0x2f1961=_0x2f1961-0xdb;const _0x708a37=a38_0x708a();let _0x43036d=_0x708a37[_0x2f1961];return _0x43036d;}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x324a33(0xfb),'command':a38_0x324a33(0xdb),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':a38_0x324a33(0xf6),'type':'boolean','description':a38_0x324a33(0xec)}],async 'execute'(_0x589739){const _0x36dbc0=a38_0x324a33,_0x254eb5=loadBffProjectConfig(_0x589739[_0x36dbc0(0xe1)]),_0x21cafc=await readBffLockFile(_0x254eb5[_0x36dbc0(0xe3)]),{appLock:_0x42554e}=ensureLockScope(_0x21cafc??createEmptyBffLock(),_0x589739[_0x36dbc0(0xe1)],_0x254eb5[_0x36dbc0(0xe8)],_0x36dbc0(0xdb)),_0x26e15b=await scanLocalBffFunctions(_0x254eb5),_0x20f33b=[],_0x2339a9=[],_0x3cce30=[];for(const _0x1cb7cc of _0x26e15b){const _0x5d83e8=await computeFileHash(_0x1cb7cc['filePath']),_0x57b722=_0x42554e[_0x36dbc0(0xe7)][_0x1cb7cc[_0x36dbc0(0xfa)]];if(!_0x57b722)_0x20f33b[_0x36dbc0(0xde)](_0x1cb7cc['lockKey']);else _0x57b722['hash']!==_0x5d83e8?_0x2339a9[_0x36dbc0(0xde)](_0x1cb7cc['lockKey']):_0x3cce30[_0x36dbc0(0xde)](_0x1cb7cc[_0x36dbc0(0xfa)]);}const _0x2f9140=[];if(_0x589739[_0x36dbc0(0xe2)]('remote')){const _0x42b95e=loadAliasMap(_0x589739[_0x36dbc0(0xf5)],undefined,resolveApiFilePath(_0x589739['apiDir'],_0x589739[_0x36dbc0(0xe1)])),_0x2d323a=new Map(_0x42b95e[_0x36dbc0(0xe9)](_0x2bab38=>[_0x2bab38[_0x36dbc0(0xf2)],_0x2bab38[_0x36dbc0(0xf4)]])),[_0xf76302,_0x178599]=await Promise[_0x36dbc0(0xf0)]([listBffScripts(_0x589739[_0x36dbc0(0xe1)]),getBffScriptStatistics(_0x589739[_0x36dbc0(0xe1)])]),_0x448f8a=createHookLocationMap(_0x178599),_0x579ee3=new Set(_0x26e15b[_0x36dbc0(0xe9)](_0x106fcc=>_0x106fcc[_0x36dbc0(0xfa)]));for(const _0x25a0b9 of _0xf76302){const _0x4365ba=resolveRemoteScriptTarget(_0x254eb5,_0x25a0b9,_0x448f8a,_0x42554e[_0x36dbc0(0xe7)],_0x2d323a);_0x4365ba&&!_0x579ee3[_0x36dbc0(0xf7)](_0x4365ba[_0x36dbc0(0xfa)])&&_0x2f9140[_0x36dbc0(0xde)](_0x4365ba[_0x36dbc0(0xfa)]);}}const _0x5148c4=_0x20f33b['length']===0x0&&_0x2339a9[_0x36dbc0(0xdd)]===0x0&&_0x2f9140[_0x36dbc0(0xdd)]===0x0;return{'ok':!![],'data':{'added':_0x20f33b,'modified':_0x2339a9,'unchanged':_0x3cce30,'remoteOnly':_0x2f9140},'message':_0x5148c4?_0x36dbc0(0xe0):_0x20f33b[_0x36dbc0(0xdd)]+'\x20added,\x20'+_0x2339a9[_0x36dbc0(0xdd)]+_0x36dbc0(0xf9)+_0x3cce30[_0x36dbc0(0xdd)]+_0x36dbc0(0xf8)+(_0x2f9140[_0x36dbc0(0xdd)]>0x0?',\x20'+_0x2f9140[_0x36dbc0(0xdd)]+_0x36dbc0(0xed):'')};}};
1
+ function a37_0x4afa(_0x532dbf,_0x1a9163){_0x532dbf=_0x532dbf-0x1a6;const _0x502b0d=a37_0x502b();let _0x4afa18=_0x502b0d[_0x532dbf];return _0x4afa18;}const a37_0x1c82b5=a37_0x4afa;(function(_0x5d7b34,_0x50b673){const _0x10a23=a37_0x4afa,_0x21b1fc=_0x5d7b34();while(!![]){try{const _0x3517e7=parseInt(_0x10a23(0x1a9))/0x1*(-parseInt(_0x10a23(0x1b8))/0x2)+-parseInt(_0x10a23(0x1ba))/0x3*(parseInt(_0x10a23(0x1b0))/0x4)+parseInt(_0x10a23(0x1b2))/0x5*(parseInt(_0x10a23(0x1aa))/0x6)+-parseInt(_0x10a23(0x1ac))/0x7+parseInt(_0x10a23(0x1c4))/0x8+-parseInt(_0x10a23(0x1b9))/0x9*(-parseInt(_0x10a23(0x1be))/0xa)+parseInt(_0x10a23(0x1bb))/0xb;if(_0x3517e7===_0x50b673)break;else _0x21b1fc['push'](_0x21b1fc['shift']());}catch(_0x2ea865){_0x21b1fc['push'](_0x21b1fc['shift']());}}}(a37_0x502b,0x702df));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a37_0x502b(){const _0x4315c0=['read','2312569paVJpg','alias','\x20added,\x20','lockFilePath','661460VHMJXo','hash','68415otYHlm','appCode','scriptsRoot','\x20modified,\x20','map','all','2yobwOQ','15876kuEteF','15kyOOLM','12808224aLsWkh','filePath','\x20unchanged','510PqRSQG','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','boolean','bff','has','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','4622768CHMHKX','push','bool','length','remote','functions','lockKey','datasetCode','apiDir','735469BMRcGo','228JlVXHy'];a37_0x502b=function(){return _0x4315c0;};return a37_0x502b();}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':a37_0x1c82b5(0x1c1),'command':'status','description':a37_0x1c82b5(0x1bf),'risk':a37_0x1c82b5(0x1ab),'flags':[{'name':'remote','type':a37_0x1c82b5(0x1c0),'description':a37_0x1c82b5(0x1c3)}],async 'execute'(_0x22b6aa){const _0x2fada9=a37_0x1c82b5,_0x93380=loadBffProjectConfig(_0x22b6aa['appCode']),_0x1fd01b=await readBffLockFile(_0x93380[_0x2fada9(0x1af)]),{appLock:_0x102d76}=ensureLockScope(_0x1fd01b??createEmptyBffLock(),_0x22b6aa[_0x2fada9(0x1b3)],_0x93380[_0x2fada9(0x1b4)],'status'),_0x4c55b2=await scanLocalBffFunctions(_0x93380),_0xd7a4a=[],_0xe18672=[],_0x1ac792=[];for(const _0x1bbda1 of _0x4c55b2){const _0x323d48=await computeFileHash(_0x1bbda1[_0x2fada9(0x1bc)]),_0x2cf1d2=_0x102d76[_0x2fada9(0x1c9)][_0x1bbda1['lockKey']];if(!_0x2cf1d2)_0xd7a4a[_0x2fada9(0x1c5)](_0x1bbda1[_0x2fada9(0x1a6)]);else _0x2cf1d2[_0x2fada9(0x1b1)]!==_0x323d48?_0xe18672[_0x2fada9(0x1c5)](_0x1bbda1['lockKey']):_0x1ac792[_0x2fada9(0x1c5)](_0x1bbda1[_0x2fada9(0x1a6)]);}const _0x13caaf=[];if(_0x22b6aa[_0x2fada9(0x1c6)](_0x2fada9(0x1c8))){const _0x2da7fc=loadAliasMap(_0x22b6aa['apiDir'],undefined,resolveApiFilePath(_0x22b6aa[_0x2fada9(0x1a8)],_0x22b6aa[_0x2fada9(0x1b3)])),_0x56fad9=new Map(_0x2da7fc[_0x2fada9(0x1b6)](_0x336333=>[_0x336333[_0x2fada9(0x1a7)],_0x336333[_0x2fada9(0x1ad)]])),[_0x4124aa,_0x32ee94]=await Promise[_0x2fada9(0x1b7)]([listBffScripts(_0x22b6aa['appCode']),getBffScriptStatistics(_0x22b6aa[_0x2fada9(0x1b3)])]),_0x4625f2=createHookLocationMap(_0x32ee94),_0x473af8=new Set(_0x4c55b2[_0x2fada9(0x1b6)](_0x329650=>_0x329650[_0x2fada9(0x1a6)]));for(const _0x44288b of _0x4124aa){const _0x385390=resolveRemoteScriptTarget(_0x93380,_0x44288b,_0x4625f2,_0x102d76['functions'],_0x56fad9);_0x385390&&!_0x473af8[_0x2fada9(0x1c2)](_0x385390['lockKey'])&&_0x13caaf['push'](_0x385390[_0x2fada9(0x1a6)]);}}const _0x4f4e9d=_0xd7a4a[_0x2fada9(0x1c7)]===0x0&&_0xe18672[_0x2fada9(0x1c7)]===0x0&&_0x13caaf[_0x2fada9(0x1c7)]===0x0;return{'ok':!![],'data':{'added':_0xd7a4a,'modified':_0xe18672,'unchanged':_0x1ac792,'remoteOnly':_0x13caaf},'message':_0x4f4e9d?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0xd7a4a[_0x2fada9(0x1c7)]+_0x2fada9(0x1ae)+_0xe18672['length']+_0x2fada9(0x1b5)+_0x1ac792[_0x2fada9(0x1c7)]+_0x2fada9(0x1bd)+(_0x13caaf['length']>0x0?',\x20'+_0x13caaf[_0x2fada9(0x1c7)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a39_0x27d89a=a39_0x3bfa;function a39_0x3bfa(_0x172701,_0x22872d){_0x172701=_0x172701-0x8c;const _0x168d93=a39_0x168d();let _0x3bfa69=_0x168d93[_0x172701];return _0x3bfa69;}function a39_0x168d(){const _0x300097=['CLI\x20Built-in\x20Skill\x20installed','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','cli-skill-install','write','log','24451760Kholcf','npx\x20skills\x20add\x20failed:\x20','7027132KLEvYW','error','../../skills/npx-skills-add.js','cli-skill','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','1160295kZBFHp',')...','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','inherit','2569584DMulBP','unknown','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','279FoFqyL','579gyDvVh','9668wAMOlc','197672hFKKVm','skipped','cwd','44EYkhLM','45758nIKKLA'];a39_0x168d=function(){return _0x300097;};return a39_0x168d();}(function(_0x1f13c9,_0x28b39f){const _0x3765cf=a39_0x3bfa,_0x5b854f=_0x1f13c9();while(!![]){try{const _0x412557=-parseInt(_0x3765cf(0x96))/0x1*(parseInt(_0x3765cf(0x97))/0x2)+-parseInt(_0x3765cf(0x91))/0x3*(-parseInt(_0x3765cf(0x92))/0x4)+parseInt(_0x3765cf(0xa4))/0x5+parseInt(_0x3765cf(0x8c))/0x6+-parseInt(_0x3765cf(0x9f))/0x7+parseInt(_0x3765cf(0x93))/0x8*(-parseInt(_0x3765cf(0x90))/0x9)+parseInt(_0x3765cf(0x9d))/0xa;if(_0x412557===_0x28b39f)break;else _0x5b854f['push'](_0x5b854f['shift']());}catch(_0x387e59){_0x5b854f['push'](_0x5b854f['shift']());}}}(a39_0x168d,0xc2339));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x27d89a(0xa2),'command':'install','description':a39_0x27d89a(0x8e),'risk':a39_0x27d89a(0x9b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x16d44c){const _0xe1280b=a39_0x27d89a;logger['setLogPath'](process[_0xe1280b(0x95)]()),logger['info'](_0xe1280b(0x9a),_0xe1280b(0x99));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x571bb8,RABETBASE_SKILL_SOURCE:_0x5cbc97,runNpxSkillsAddGlobal:_0x43f2f7}=await import(_0xe1280b(0xa1)),_0x54254a=_0x16d44c['nonInteractive']?'pipe':_0xe1280b(0xa7);console[_0xe1280b(0x9c)](_0xe1280b(0x8f)+_0x571bb8+_0xe1280b(0xa5));const _0x5bedb8=_0x43f2f7(process[_0xe1280b(0x95)](),_0x5cbc97,{'stdio':_0x54254a});if(_0x5bedb8[_0xe1280b(0x94)])console[_0xe1280b(0x9c)](_0xe1280b(0xa6));else{if(_0x5bedb8['ok'])console['log'](_0xe1280b(0x98));else throw CliErrors['apiError'](_0xe1280b(0x9e)+(_0x5bedb8[_0xe1280b(0xa0)]||_0xe1280b(0x8d)),_0xe1280b(0xa3)+_0x571bb8);}return{'ok':!![]};}}];
1
+ function a38_0x19fa(_0x3bdef7,_0x192577){_0x3bdef7=_0x3bdef7-0xc8;const _0x904cbd=a38_0x904c();let _0x19fa8f=_0x904cbd[_0x3bdef7];return _0x19fa8f;}const a38_0x58f9a7=a38_0x19fa;function a38_0x904c(){const _0x3bf206=['1533dPhlLv','setLogPath','pipe','12npjpdS','npx\x20skills\x20add\x20failed:\x20','nonInteractive','429570KddUVl',')...','cli-skill','3866400VasexJ','log','apiError','2947vrPWpC','1063675caAQzQ','1474epvsgh','8776hOJRpG','5918814RrbCEY','910qlMQgE','inherit','CLI\x20Built-in\x20Skill\x20installed','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','cwd','error','6402YCbQwk','write','../../skills/npx-skills-add.js','install','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.'];a38_0x904c=function(){return _0x3bf206;};return a38_0x904c();}(function(_0x5b78f8,_0x2b627b){const _0x77b71b=a38_0x19fa,_0x2b245a=_0x5b78f8();while(!![]){try{const _0x94f35d=-parseInt(_0x77b71b(0xd9))/0x1+-parseInt(_0x77b71b(0xe1))/0x2*(parseInt(_0x77b71b(0xd3))/0x3)+-parseInt(_0x77b71b(0xd6))/0x4*(-parseInt(_0x77b71b(0xe0))/0x5)+-parseInt(_0x77b71b(0xdc))/0x6+parseInt(_0x77b71b(0xdf))/0x7*(parseInt(_0x77b71b(0xe2))/0x8)+parseInt(_0x77b71b(0xe3))/0x9+parseInt(_0x77b71b(0xc8))/0xa*(parseInt(_0x77b71b(0xce))/0xb);if(_0x94f35d===_0x2b627b)break;else _0x2b245a['push'](_0x2b245a['shift']());}catch(_0xcf18db){_0x2b245a['push'](_0x2b245a['shift']());}}}(a38_0x904c,0x57e89));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a38_0x58f9a7(0xdb),'command':a38_0x58f9a7(0xd1),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':a38_0x58f9a7(0xcf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5ac5c9){const _0x15895b=a38_0x58f9a7;logger[_0x15895b(0xd4)](process[_0x15895b(0xcc)]()),logger['info']('cli-skill-install',_0x15895b(0xd2));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x542391,RABETBASE_SKILL_SOURCE:_0x13ebb1,runNpxSkillsAddGlobal:_0x22c7ee}=await import(_0x15895b(0xd0)),_0x488a35=_0x5ac5c9[_0x15895b(0xd8)]?_0x15895b(0xd5):_0x15895b(0xc9);console[_0x15895b(0xdd)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('+_0x542391+_0x15895b(0xda));const _0x4282b3=_0x22c7ee(process[_0x15895b(0xcc)](),_0x13ebb1,{'stdio':_0x488a35});if(_0x4282b3['skipped'])console[_0x15895b(0xdd)](_0x15895b(0xcb));else{if(_0x4282b3['ok'])console[_0x15895b(0xdd)](_0x15895b(0xca));else throw CliErrors[_0x15895b(0xde)](_0x15895b(0xd7)+(_0x4282b3[_0x15895b(0xcd)]||'unknown'),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x542391);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x52cc40=a40_0x4e58;(function(_0x22b824,_0x1fa9db){const _0x3d746f=a40_0x4e58,_0x470703=_0x22b824();while(!![]){try{const _0xcf6806=parseInt(_0x3d746f(0x1b8))/0x1+-parseInt(_0x3d746f(0x1ca))/0x2+parseInt(_0x3d746f(0x1bd))/0x3*(parseInt(_0x3d746f(0x1c5))/0x4)+-parseInt(_0x3d746f(0x1e8))/0x5+-parseInt(_0x3d746f(0x1c4))/0x6*(parseInt(_0x3d746f(0x1d0))/0x7)+-parseInt(_0x3d746f(0x1dd))/0x8+parseInt(_0x3d746f(0x1bb))/0x9;if(_0xcf6806===_0x1fa9db)break;else _0x470703['push'](_0x470703['shift']());}catch(_0x4c6b38){_0x470703['push'](_0x470703['shift']());}}}(a40_0x49e0,0x3bc69));import a40_0x391a2c from'chalk';import a40_0x4f9e35 from'ora';import a40_0xfa7069 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 _0x24f7ad=a40_0x4e58;return GIT_COMMIT!==_0x24f7ad(0x1f5)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function a40_0x4e58(_0x6c96ba,_0x4665d7){_0x6c96ba=_0x6c96ba-0x1b5;const _0x49e03f=a40_0x49e0();let _0x4e5860=_0x49e03f[_0x6c96ba];return _0x4e5860;}function detectPackageManager(){const _0x1358b7=a40_0x4e58,_0x205320=process[_0x1358b7(0x1f9)][_0x1358b7(0x1f6)]();if(_0x205320[_0x1358b7(0x1cc)](_0x1358b7(0x1d5)))return'bun';return _0x1358b7(0x1ef);}const updateFlags=[{'name':a40_0x52cc40(0x1c8),'type':a40_0x52cc40(0x1b7),'description':a40_0x52cc40(0x1e4),'default':![]},{'name':'version','type':a40_0x52cc40(0x1ba),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a40_0x52cc40(0x1bf),'type':a40_0x52cc40(0x1b7),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0x52cc40(0x1d9),'type':a40_0x52cc40(0x1b7),'description':a40_0x52cc40(0x1d4),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x1d498c){const _0x3e7e5e=a40_0x52cc40;return _0x1d498c['str']('version')[_0x3e7e5e(0x1ea)]();}function shouldSkipCliSkill(_0x5da0ce){const _0x4847b1=a40_0x52cc40;return _0x5da0ce[_0x4847b1(0x1c9)](_0x4847b1(0x1bf))||_0x5da0ce['flag'](_0x4847b1(0x1d9))===![];}async function validateUpdateFlags(_0x373d31){const _0x51d334=a40_0x52cc40,_0x13b5ed=_0x373d31[_0x51d334(0x1c9)](_0x51d334(0x1c8)),_0x268e5c=getRequestedVersion(_0x373d31);if(_0x13b5ed&&_0x268e5c)throw CliErrors['validation'](_0x51d334(0x1d6),_0x51d334(0x1f1));if(_0x268e5c&&!a40_0xfa7069[_0x51d334(0x1d7)](_0x268e5c))throw CliErrors[_0x51d334(0x1e6)](_0x51d334(0x1c6)+_0x268e5c,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x21dea0=a40_0x52cc40;try{const _0x29de27=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x21dea0(0x1da),{'signal':AbortSignal[_0x21dea0(0x1f2)](0x2710)});if(!_0x29de27['ok'])return null;const _0x2496dc=await _0x29de27[_0x21dea0(0x1e9)]();if(!_0x2496dc||typeof _0x2496dc!=='object')return null;return Object[_0x21dea0(0x1cf)](Object[_0x21dea0(0x1de)](_0x2496dc)[_0x21dea0(0x1b9)](([,_0x3d61df])=>typeof _0x3d61df==='string'&&_0x3d61df[_0x21dea0(0x1ea)]()[_0x21dea0(0x1eb)]>0x0)[_0x21dea0(0x1cb)](([_0x2013c8,_0x17a49d])=>[_0x2013c8,String(_0x17a49d)[_0x21dea0(0x1ea)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x101895){const _0x3adae4=await fetchNpmDistTags();return _0x3adae4?.[_0x101895]??null;}async function fetchLatestVersion(){const _0x1879dc=a40_0x52cc40;return fetchNpmDistTagVersion(_0x1879dc(0x1c2));}async function resolveTargetVersion(_0x2c35ac){const _0x4c6465=a40_0x52cc40,_0x4c9e26=getRequestedVersion(_0x2c35ac);if(_0x4c9e26)return{'version':_0x4c9e26,'source':_0x4c6465(0x1e3)};if(_0x2c35ac['bool'](_0x4c6465(0x1c8))){const _0xda27ce=await fetchNpmDistTagVersion(_0x4c6465(0x1c8));if(!_0xda27ce)return null;return{'version':_0xda27ce,'source':_0x4c6465(0x1c8)};}const _0x4fdd37=await fetchLatestVersion();if(!_0x4fdd37)return null;return{'version':_0x4fdd37,'source':'latest'};}function shouldInstallTarget(_0x1d1fc5,_0x1c3df0){const _0x2d8ff3=a40_0x52cc40;if(_0x1c3df0[_0x2d8ff3(0x1bc)]===_0x2d8ff3(0x1e3)||_0x1c3df0[_0x2d8ff3(0x1bc)]===_0x2d8ff3(0x1c8))return!a40_0xfa7069['eq'](_0x1d1fc5,_0x1c3df0[_0x2d8ff3(0x1e3)]);return a40_0xfa7069['lt'](_0x1d1fc5,_0x1c3df0['version']);}function getInstallPlanLabel(_0x361a81,_0x22d2d9){const _0x3939a9=a40_0x52cc40;switch(_0x22d2d9[_0x3939a9(0x1bc)]){case _0x3939a9(0x1c8):return _0x3939a9(0x1ff)+a40_0x391a2c[_0x3939a9(0x1c1)](_0x361a81)+_0x3939a9(0x1dc)+a40_0x391a2c['green'](_0x22d2d9[_0x3939a9(0x1e3)]);case _0x3939a9(0x1e3):return _0x3939a9(0x1c7)+a40_0x391a2c[_0x3939a9(0x1c1)](_0x361a81)+'\x20→\x20'+a40_0x391a2c[_0x3939a9(0x1fc)](_0x22d2d9[_0x3939a9(0x1e3)]);case _0x3939a9(0x1c2):default:return _0x3939a9(0x1f0)+a40_0x391a2c[_0x3939a9(0x1c1)](_0x361a81)+'\x20→\x20'+a40_0x391a2c[_0x3939a9(0x1fc)](_0x22d2d9[_0x3939a9(0x1e3)]);}}async function installCliSkill(_0x2e7da6){const _0x3c89f6=a40_0x52cc40;console['log'](a40_0x391a2c[_0x3c89f6(0x1d3)](_0x3c89f6(0x1fd)));const _0x45d123=runNpxSkillsAddGlobal(process[_0x3c89f6(0x1d1)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x2e7da6?_0x3c89f6(0x1f4):'inherit'});if(_0x45d123['skipped']){console[_0x3c89f6(0x1e1)](a40_0x391a2c[_0x3c89f6(0x1d3)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x45d123['ok']){console[_0x3c89f6(0x1e1)](a40_0x391a2c[_0x3c89f6(0x1d3)]('\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.'));return;}console[_0x3c89f6(0x1c0)](a40_0x391a2c[_0x3c89f6(0x1c1)](_0x3c89f6(0x1f8)+(_0x45d123['error']||_0x3c89f6(0x1f5)))),console[_0x3c89f6(0x1e1)](a40_0x391a2c[_0x3c89f6(0x1d3)](_0x3c89f6(0x1f7)+CLI_BIN_NAME+_0x3c89f6(0x1f3)));}async function execute(_0x568a17){const _0x17d392=a40_0x52cc40;await validateUpdateFlags(_0x568a17);const _0x410aa9=getCurrentVersion();console[_0x17d392(0x1e1)]('Current\x20version:\x20'+_0x410aa9);const _0x2ae482=a40_0x4f9e35(_0x17d392(0x1d8))[_0x17d392(0x1cd)](),_0x1b55fc=await resolveTargetVersion(_0x568a17);if(!_0x1b55fc){const _0x3dc0ee=_0x568a17[_0x17d392(0x1c9)](_0x17d392(0x1c8))?_0x17d392(0x202):_0x17d392(0x1ec);return _0x2ae482[_0x17d392(0x1fe)](_0x3dc0ee),console[_0x17d392(0x1e1)](a40_0x391a2c[_0x17d392(0x1d3)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x17d392(0x1d2))),{'ok':![],'message':_0x3dc0ee};}const _0x5af793=a40_0xfa7069['valid'](VERSION),_0x450d01=a40_0xfa7069[_0x17d392(0x1d7)](_0x1b55fc[_0x17d392(0x1e3)]);if(!_0x5af793||!_0x450d01)return _0x2ae482['fail'](_0x17d392(0x1b5)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x5af793,_0x1b55fc)){const _0x19ae43=_0x1b55fc[_0x17d392(0x1bc)]==='version'?_0x17d392(0x1b6)+_0x1b55fc[_0x17d392(0x1e3)]+')':_0x17d392(0x1ed)+_0x1b55fc[_0x17d392(0x1e3)]+')';return _0x2ae482[_0x17d392(0x1df)](_0x19ae43),shouldSkipCliSkill(_0x568a17)?console['log'](a40_0x391a2c[_0x17d392(0x1d3)](_0x17d392(0x1e0))):await installCliSkill(_0x568a17[_0x17d392(0x1ce)]),{'ok':!![]};}_0x2ae482[_0x17d392(0x1fb)](getInstallPlanLabel(_0x410aa9,_0x1b55fc));const _0x1a4187=detectPackageManager(),_0x54437e=_0x1a4187===_0x17d392(0x1ef)?resolveNpmBin(_0x17d392(0x1ef)):_0x1a4187,_0x274a24=a40_0x4f9e35(_0x17d392(0x200)+_0x1a4187+_0x17d392(0x1be))[_0x17d392(0x1cd)]();try{return await execa(_0x54437e,['install','-g',NPM_PACKAGE_NAME+'@'+_0x1b55fc[_0x17d392(0x1e3)]],{'stdio':_0x17d392(0x1f4)}),_0x274a24[_0x17d392(0x1df)](_0x17d392(0x1db)+_0x1b55fc[_0x17d392(0x1e3)]),console[_0x17d392(0x1e1)](a40_0x391a2c['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x568a17)?console[_0x17d392(0x1e1)](a40_0x391a2c[_0x17d392(0x1d3)](_0x17d392(0x1e0))):await installCliSkill(_0x568a17[_0x17d392(0x1ce)]),{'ok':!![]};}catch(_0x488f41){return _0x274a24[_0x17d392(0x1fe)]('Update\x20failed'),console[_0x17d392(0x1c3)](a40_0x391a2c[_0x17d392(0x1ee)]('\x20\x20'+_0x488f41['message'])),console['log'](a40_0x391a2c[_0x17d392(0x1d3)]('\x20\x20Try\x20manually:\x20'+_0x1a4187+_0x17d392(0x201)+NPM_PACKAGE_NAME+'@'+_0x1b55fc[_0x17d392(0x1e3)])),{'ok':![],'message':_0x488f41[_0x17d392(0x1e7)]};}}function a40_0x49e0(){const _0x518520=['beta','bool','854324MytNqM','map','includes','start','nonInteractive','fromEntries','5782SKCZLK','cwd','@latest','gray','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','bun','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','valid','Checking\x20for\x20updates...','skills','/dist-tags','Updated\x20to\x20v','\x20→\x20','1266712ufmgbI','entries','succeed','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','log','write','version','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','run','validation','message','30250CuxaPz','json','trim','length','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Already\x20up\x20to\x20date\x20(v','red','npm','Update\x20available:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','timeout','\x20cli-skill\x20install','pipe','unknown','toLowerCase','\x20\x20Run\x20manually:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','execPath','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','info','green','Checking\x20CLI\x20Built-in\x20Skill...','fail','Beta\x20version:\x20','Updating\x20via\x20','\x20install\x20-g\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Version\x20comparison\x20failed','Already\x20on\x20requested\x20version\x20(v','boolean','379307WQaWXG','filter','string','2951451BCIqJF','source','717uBhMIq','...','no-skills','warn','yellow','latest','error','732iTdZGT','3848hKaVfo','Invalid\x20version:\x20','Requested\x20version:\x20'];a40_0x49e0=function(){return _0x518520;};return a40_0x49e0();}export const updateDefinition={'service':'update','command':a40_0x52cc40(0x1e5),'description':a40_0x52cc40(0x1fa),'risk':a40_0x52cc40(0x1e2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a39_0x96cafe=a39_0x856b;(function(_0x5b4a4f,_0x146f2d){const _0x476474=a39_0x856b,_0x240e83=_0x5b4a4f();while(!![]){try{const _0x5492ae=parseInt(_0x476474(0x186))/0x1+-parseInt(_0x476474(0x1a8))/0x2*(parseInt(_0x476474(0x1bd))/0x3)+-parseInt(_0x476474(0x18c))/0x4+-parseInt(_0x476474(0x1b1))/0x5+parseInt(_0x476474(0x1b9))/0x6+parseInt(_0x476474(0x194))/0x7*(-parseInt(_0x476474(0x1ab))/0x8)+parseInt(_0x476474(0x1aa))/0x9;if(_0x5492ae===_0x146f2d)break;else _0x240e83['push'](_0x240e83['shift']());}catch(_0x4785c3){_0x240e83['push'](_0x240e83['shift']());}}}(a39_0x299b,0xe2df1));import a39_0x527aa1 from'chalk';import a39_0x179ba9 from'ora';import a39_0x18de3b from'semver';import{execa}from'execa';function a39_0x856b(_0xac1725,_0x1aea3d){_0xac1725=_0xac1725-0x17d;const _0x299b10=a39_0x299b();let _0x856b71=_0x299b10[_0xac1725];return _0x856b71;}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 a39_0x299b(){const _0x18f3e8=['Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','123jOCiFS','Updated\x20to\x20v','write','skills','\x20cli-skill\x20install','yellow','slice','Install\x20a\x20specific\x20CLI\x20version','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','inherit','succeed','start','Already\x20on\x20requested\x20version\x20(v','map','Updating\x20via\x20','\x20→\x20','source','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','bool','timeout','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','303075vOUVGW','green','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Requested\x20version:\x20','validation','pipe','376328sPpbgw','skipped','valid','fail','fromEntries','npm','log','toLowerCase','8274294LZzPmr','latest','Current\x20version:\x20','version','update','https://registry.npmjs.org/-/package/','includes','message','bun','str','install','Checking\x20for\x20updates...','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Update\x20failed','nonInteractive','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','cwd','string','error','trim','53426muUJAz','boolean','26649306frrwOE','8boAQuG','red','Already\x20up\x20to\x20date\x20(v','object','...','no-skills','921270SRKfbj','@latest','gray','unknown','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Update\x20available:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','1324602KrfoyR','beta','Version\x20comparison\x20failed'];a39_0x299b=function(){return _0x18f3e8;};return a39_0x299b();}function getCurrentVersion(){const _0x1c25af=a39_0x856b;return GIT_COMMIT!==_0x1c25af(0x1b4)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x1c25af(0x1c3)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x34a672=a39_0x856b,_0x129994=process['execPath'][_0x34a672(0x193)]();if(_0x129994[_0x34a672(0x19a)](_0x34a672(0x19c)))return _0x34a672(0x19c);return _0x34a672(0x191);}const updateFlags=[{'name':a39_0x96cafe(0x1ba),'type':a39_0x96cafe(0x1a9),'description':a39_0x96cafe(0x1b5),'default':![]},{'name':a39_0x96cafe(0x197),'type':a39_0x96cafe(0x1a5),'description':a39_0x96cafe(0x1c4)},{'name':a39_0x96cafe(0x1b0),'type':a39_0x96cafe(0x1a9),'description':a39_0x96cafe(0x182),'default':![]},{'name':a39_0x96cafe(0x1c0),'type':'boolean','description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x281fc4){const _0x59868f=a39_0x96cafe;return _0x281fc4[_0x59868f(0x19d)](_0x59868f(0x197))[_0x59868f(0x1a7)]();}function shouldSkipCliSkill(_0x3b4b8b){const _0x1e5314=a39_0x96cafe;return _0x3b4b8b[_0x1e5314(0x183)](_0x1e5314(0x1b0))||_0x3b4b8b['flag'](_0x1e5314(0x1c0))===![];}async function validateUpdateFlags(_0x5093f0){const _0x537d4d=a39_0x96cafe,_0x1101df=_0x5093f0[_0x537d4d(0x183)](_0x537d4d(0x1ba)),_0x2cc35e=getRequestedVersion(_0x5093f0);if(_0x1101df&&_0x2cc35e)throw CliErrors[_0x537d4d(0x18a)](_0x537d4d(0x1a0),_0x537d4d(0x1bc));if(_0x2cc35e&&!a39_0x18de3b[_0x537d4d(0x18e)](_0x2cc35e))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x2cc35e,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x21f0d6=a39_0x96cafe;try{const _0xb9b3b0=await fetch(_0x21f0d6(0x199)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x21f0d6(0x184)](0x2710)});if(!_0xb9b3b0['ok'])return null;const _0x3a009a=await _0xb9b3b0['json']();if(!_0x3a009a||typeof _0x3a009a!==_0x21f0d6(0x1ae))return null;return Object[_0x21f0d6(0x190)](Object['entries'](_0x3a009a)['filter'](([,_0x10024a])=>typeof _0x10024a===_0x21f0d6(0x1a5)&&_0x10024a[_0x21f0d6(0x1a7)]()['length']>0x0)[_0x21f0d6(0x17e)](([_0xa4fbb3,_0x40c546])=>[_0xa4fbb3,String(_0x40c546)[_0x21f0d6(0x1a7)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2d9617){const _0x2a9896=await fetchNpmDistTags();return _0x2a9896?.[_0x2d9617]??null;}async function fetchLatestVersion(){const _0x5db1fd=a39_0x96cafe;return fetchNpmDistTagVersion(_0x5db1fd(0x195));}async function resolveTargetVersion(_0x349c8e){const _0x406776=a39_0x96cafe,_0xd84641=getRequestedVersion(_0x349c8e);if(_0xd84641)return{'version':_0xd84641,'source':_0x406776(0x197)};if(_0x349c8e[_0x406776(0x183)](_0x406776(0x1ba))){const _0x384efe=await fetchNpmDistTagVersion(_0x406776(0x1ba));if(!_0x384efe)return null;return{'version':_0x384efe,'source':_0x406776(0x1ba)};}const _0xa234e8=await fetchLatestVersion();if(!_0xa234e8)return null;return{'version':_0xa234e8,'source':'latest'};}function shouldInstallTarget(_0x34fa24,_0x48a903){const _0x3e0891=a39_0x96cafe;if(_0x48a903['source']===_0x3e0891(0x197)||_0x48a903[_0x3e0891(0x181)]===_0x3e0891(0x1ba))return!a39_0x18de3b['eq'](_0x34fa24,_0x48a903[_0x3e0891(0x197)]);return a39_0x18de3b['lt'](_0x34fa24,_0x48a903['version']);}function getInstallPlanLabel(_0x4c9e9b,_0x2da8d7){const _0x2bbd99=a39_0x96cafe;switch(_0x2da8d7[_0x2bbd99(0x181)]){case _0x2bbd99(0x1ba):return'Beta\x20version:\x20'+a39_0x527aa1[_0x2bbd99(0x1c2)](_0x4c9e9b)+'\x20→\x20'+a39_0x527aa1[_0x2bbd99(0x187)](_0x2da8d7['version']);case _0x2bbd99(0x197):return _0x2bbd99(0x189)+a39_0x527aa1['yellow'](_0x4c9e9b)+_0x2bbd99(0x180)+a39_0x527aa1[_0x2bbd99(0x187)](_0x2da8d7[_0x2bbd99(0x197)]);case _0x2bbd99(0x195):default:return _0x2bbd99(0x1b7)+a39_0x527aa1[_0x2bbd99(0x1c2)](_0x4c9e9b)+_0x2bbd99(0x180)+a39_0x527aa1['green'](_0x2da8d7['version']);}}async function installCliSkill(_0x5ef635){const _0x419188=a39_0x96cafe;console[_0x419188(0x192)](a39_0x527aa1[_0x419188(0x1b3)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x37fa4f=runNpxSkillsAddGlobal(process[_0x419188(0x1a4)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5ef635?_0x419188(0x18b):_0x419188(0x1c7)});if(_0x37fa4f[_0x419188(0x18d)]){console[_0x419188(0x192)](a39_0x527aa1['gray'](_0x419188(0x1b6)));return;}if(_0x37fa4f['ok']){console[_0x419188(0x192)](a39_0x527aa1[_0x419188(0x1b3)](_0x419188(0x1b8)));return;}console['warn'](a39_0x527aa1['yellow']('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x37fa4f[_0x419188(0x1a6)]||_0x419188(0x1b4)))),console[_0x419188(0x192)](a39_0x527aa1[_0x419188(0x1b3)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x419188(0x1c1)));}async function execute(_0x3d98b8){const _0x472907=a39_0x96cafe;await validateUpdateFlags(_0x3d98b8);const _0x572b47=getCurrentVersion();console[_0x472907(0x192)](_0x472907(0x196)+_0x572b47);const _0x2b0849=a39_0x179ba9(_0x472907(0x19f))[_0x472907(0x1c9)](),_0x5619c0=await resolveTargetVersion(_0x3d98b8);if(!_0x5619c0){const _0x205a93=_0x3d98b8[_0x472907(0x183)](_0x472907(0x1ba))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x472907(0x1c5);return _0x2b0849[_0x472907(0x18f)](_0x205a93),console[_0x472907(0x192)](a39_0x527aa1[_0x472907(0x1b3)](_0x472907(0x188)+NPM_PACKAGE_NAME+_0x472907(0x1b2))),{'ok':![],'message':_0x205a93};}const _0x1d4096=a39_0x18de3b['valid'](VERSION),_0x30dd9e=a39_0x18de3b['valid'](_0x5619c0['version']);if(!_0x1d4096||!_0x30dd9e)return _0x2b0849[_0x472907(0x18f)](_0x472907(0x1bb)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x1d4096,_0x5619c0)){const _0x165204=_0x5619c0[_0x472907(0x181)]===_0x472907(0x197)?_0x472907(0x17d)+_0x5619c0['version']+')':_0x472907(0x1ad)+_0x5619c0[_0x472907(0x197)]+')';return _0x2b0849[_0x472907(0x1c8)](_0x165204),shouldSkipCliSkill(_0x3d98b8)?console['log'](a39_0x527aa1[_0x472907(0x1b3)](_0x472907(0x185))):await installCliSkill(_0x3d98b8[_0x472907(0x1a2)]),{'ok':!![]};}_0x2b0849['info'](getInstallPlanLabel(_0x572b47,_0x5619c0));const _0x30ac73=detectPackageManager(),_0x390413=_0x30ac73===_0x472907(0x191)?resolveNpmBin(_0x472907(0x191)):_0x30ac73,_0x1d6c2b=a39_0x179ba9(_0x472907(0x17f)+_0x30ac73+_0x472907(0x1af))[_0x472907(0x1c9)]();try{return await execa(_0x390413,[_0x472907(0x19e),'-g',NPM_PACKAGE_NAME+'@'+_0x5619c0[_0x472907(0x197)]],{'stdio':_0x472907(0x18b)}),_0x1d6c2b['succeed'](_0x472907(0x1be)+_0x5619c0[_0x472907(0x197)]),console[_0x472907(0x192)](a39_0x527aa1[_0x472907(0x1b3)](_0x472907(0x1a3))),shouldSkipCliSkill(_0x3d98b8)?console[_0x472907(0x192)](a39_0x527aa1[_0x472907(0x1b3)](_0x472907(0x185))):await installCliSkill(_0x3d98b8[_0x472907(0x1a2)]),{'ok':!![]};}catch(_0x462815){return _0x1d6c2b[_0x472907(0x18f)](_0x472907(0x1a1)),console['error'](a39_0x527aa1[_0x472907(0x1ac)]('\x20\x20'+_0x462815['message'])),console['log'](a39_0x527aa1['gray']('\x20\x20Try\x20manually:\x20'+_0x30ac73+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x5619c0[_0x472907(0x197)])),{'ok':![],'message':_0x462815[_0x472907(0x19b)]};}}export const updateDefinition={'service':a39_0x96cafe(0x198),'command':'run','description':a39_0x96cafe(0x1c6),'risk':a39_0x96cafe(0x1bf),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a41_0x5321(){const _0x290885=['808088JtDFtj','4581600pQnNqv','24pTQczY','1AOZUpK','24YbXEQu','358535FmKHjF','1711052SavOLE','3OXiDuK','684945JYdacR','3834810qikMGO','2851740ndKMAc','66UIQWPo'];a41_0x5321=function(){return _0x290885;};return a41_0x5321();}(function(_0x3c0c75,_0x5095eb){const _0x35fea9=a41_0x5e15,_0x1c771a=_0x3c0c75();while(!![]){try{const _0x4d2c29=parseInt(_0x35fea9(0x69))/0x1*(parseInt(_0x35fea9(0x72))/0x2)+-parseInt(_0x35fea9(0x6d))/0x3*(-parseInt(_0x35fea9(0x6c))/0x4)+parseInt(_0x35fea9(0x6b))/0x5*(parseInt(_0x35fea9(0x6a))/0x6)+parseInt(_0x35fea9(0x6f))/0x7+parseInt(_0x35fea9(0x68))/0x8*(-parseInt(_0x35fea9(0x6e))/0x9)+parseInt(_0x35fea9(0x67))/0xa+-parseInt(_0x35fea9(0x71))/0xb*(parseInt(_0x35fea9(0x70))/0xc);if(_0x4d2c29===_0x5095eb)break;else _0x1c771a['push'](_0x1c771a['shift']());}catch(_0x5d8a36){_0x1c771a['push'](_0x1c771a['shift']());}}}(a41_0x5321,0x72da8));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a41_0x5e15(_0x355c48,_0x48e2bf){_0x355c48=_0x355c48-0x67;const _0x532175=a41_0x5321();let _0x5e15ef=_0x532175[_0x355c48];return _0x5e15ef;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x436c97,_0x2ac528){const _0x3896f2=a40_0x5747,_0x339925=_0x436c97();while(!![]){try{const _0x41d18a=parseInt(_0x3896f2(0x13f))/0x1*(parseInt(_0x3896f2(0x13e))/0x2)+parseInt(_0x3896f2(0x13d))/0x3*(-parseInt(_0x3896f2(0x141))/0x4)+parseInt(_0x3896f2(0x143))/0x5+-parseInt(_0x3896f2(0x140))/0x6+-parseInt(_0x3896f2(0x144))/0x7+-parseInt(_0x3896f2(0x145))/0x8+parseInt(_0x3896f2(0x142))/0x9;if(_0x41d18a===_0x2ac528)break;else _0x339925['push'](_0x339925['shift']());}catch(_0x26f2cc){_0x339925['push'](_0x339925['shift']());}}}(a40_0x4c58,0x4ddaa));function a40_0x4c58(){const _0x268d3d=['14106042ceqycn','2568320bjEtKR','4312812uvJPtO','4641800svHkmf','107199uWfOzm','2uBLCMg','459698fXoieD','2936844TQRlfe','60eMvvJg'];a40_0x4c58=function(){return _0x268d3d;};return a40_0x4c58();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a40_0x5747(_0x5e3fd8,_0x589af9){_0x5e3fd8=_0x5e3fd8-0x13d;const _0x4c5856=a40_0x4c58();let _0x5747e4=_0x4c5856[_0x5e3fd8];return _0x5747e4;}export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a42_0x5acaf4=a42_0xa9ad;(function(_0x486481,_0x454733){const _0x2fd050=a42_0xa9ad,_0x342e16=_0x486481();while(!![]){try{const _0x250ba7=parseInt(_0x2fd050(0x114))/0x1*(parseInt(_0x2fd050(0x113))/0x2)+parseInt(_0x2fd050(0x124))/0x3*(parseInt(_0x2fd050(0x126))/0x4)+parseInt(_0x2fd050(0x10f))/0x5+parseInt(_0x2fd050(0x120))/0x6*(-parseInt(_0x2fd050(0x118))/0x7)+-parseInt(_0x2fd050(0x11a))/0x8*(parseInt(_0x2fd050(0x110))/0x9)+-parseInt(_0x2fd050(0x125))/0xa*(parseInt(_0x2fd050(0x122))/0xb)+-parseInt(_0x2fd050(0x11f))/0xc*(-parseInt(_0x2fd050(0x116))/0xd);if(_0x250ba7===_0x454733)break;else _0x342e16['push'](_0x342e16['shift']());}catch(_0x5f148d){_0x342e16['push'](_0x342e16['shift']());}}}(a42_0xe10a,0xd0f2d));function a42_0xe10a(){const _0x5a5765=['codegen','4092BPYtMX','code','21wkyIle','22040RxbFOm','126868ppTamr','str','453020EXjGTX','520857llslLi','read','skip-imports','2271616odbjPP','1MulbBQ','operation','13YeyeNa','sdk','49CtTqJg','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','232IcwMgY','tableName','string','Omit\x20import\x20statements\x20from\x20generated\x20code','bool','39098172yNCRNz','1159332PRBXhn'];a42_0xe10a=function(){return _0x5a5765;};return a42_0xe10a();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0xa9ad(_0xc0f7e3,_0x2948d1){_0xc0f7e3=_0xc0f7e3-0x10f;const _0xe10af1=a42_0xe10a();let _0xa9ad17=_0xe10af1[_0xc0f7e3];return _0xa9ad17;}export const codegenSdk={'service':a42_0x5acaf4(0x121),'command':a42_0x5acaf4(0x117),'description':a42_0x5acaf4(0x119),'risk':a42_0x5acaf4(0x111),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x5acaf4(0x115),'type':a42_0x5acaf4(0x11c),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a42_0x5acaf4(0x112),'type':'boolean','description':a42_0x5acaf4(0x11d)}],async 'execute'(_0x5e993d){const _0x52bd6e=a42_0x5acaf4,{dataset:_0x292d2e,operation:_0x3370cd}=await getOperationDetail(_0x5e993d['appCode'],_0x5e993d[_0x52bd6e(0x127)](_0x52bd6e(0x123)),_0x5e993d[_0x52bd6e(0x127)](_0x52bd6e(0x115))),_0x9874cd=generateSdkCode(_0x292d2e,_0x3370cd,{'includeImports':!_0x5e993d[_0x52bd6e(0x11e)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x292d2e['name'],'code':_0x292d2e['code'],'tableName':_0x292d2e[_0x52bd6e(0x11b)]},'operation':_0x5e993d[_0x52bd6e(0x127)](_0x52bd6e(0x115)),'code':_0x9874cd}};}};
1
+ const a41_0x165833=a41_0x1f93;(function(_0x509717,_0x421dbe){const _0x4dbcb3=a41_0x1f93,_0x37940b=_0x509717();while(!![]){try{const _0x4acbac=parseInt(_0x4dbcb3(0x154))/0x1+-parseInt(_0x4dbcb3(0x156))/0x2+-parseInt(_0x4dbcb3(0x15f))/0x3+parseInt(_0x4dbcb3(0x157))/0x4*(parseInt(_0x4dbcb3(0x158))/0x5)+-parseInt(_0x4dbcb3(0x164))/0x6*(parseInt(_0x4dbcb3(0x159))/0x7)+-parseInt(_0x4dbcb3(0x15e))/0x8*(parseInt(_0x4dbcb3(0x165))/0x9)+-parseInt(_0x4dbcb3(0x15d))/0xa*(-parseInt(_0x4dbcb3(0x167))/0xb);if(_0x4acbac===_0x421dbe)break;else _0x37940b['push'](_0x37940b['shift']());}catch(_0x42d1c6){_0x37940b['push'](_0x37940b['shift']());}}}(a41_0x3d31,0x5a65d));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a41_0x1f93(_0x3c703e,_0x546c20){_0x3c703e=_0x3c703e-0x150;const _0x3d31b0=a41_0x3d31();let _0x1f9335=_0x3d31b0[_0x3c703e];return _0x1f9335;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':'sdk','description':a41_0x165833(0x150),'risk':a41_0x165833(0x15c),'flags':[CODE_FLAG_OPTIONAL,{'name':a41_0x165833(0x151),'type':a41_0x165833(0x153),'description':a41_0x165833(0x152)},{'name':a41_0x165833(0x163),'type':a41_0x165833(0x153),'required':!![],'description':a41_0x165833(0x161)},{'name':'skip-imports','type':'boolean','description':a41_0x165833(0x166)}],async 'execute'(_0x26dddc){const _0x4a2767=a41_0x165833,{dataset:_0xaed2ec,operation:_0x1be428}=await getOperationDetail(_0x26dddc['appCode'],_0x26dddc['str']('code'),_0x26dddc['str'](_0x4a2767(0x163))),_0x73c830=generateSdkCode(_0xaed2ec,_0x1be428,{'includeImports':!_0x26dddc[_0x4a2767(0x162)](_0x4a2767(0x15a))});return{'ok':!![],'data':{'dataset':{'name':_0xaed2ec['name'],'code':_0xaed2ec[_0x4a2767(0x160)],'tableName':_0xaed2ec[_0x4a2767(0x15b)]},'operation':_0x26dddc[_0x4a2767(0x155)]('operation'),'code':_0x73c830}};}};function a41_0x3d31(){const _0x1bbd05=['Omit\x20import\x20statements\x20from\x20generated\x20code','154vHGKvA','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','alias','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','string','151530fPCMJk','str','338602TXMBrK','207524FiEIBL','10RUCULT','1642655HufFEj','skip-imports','tableName','read','1281210RyWYZy','1181704LFJLKc','1608558DCRLta','code','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','bool','operation','6oGCZZy','45hNUguq'];a41_0x3d31=function(){return _0x1bbd05;};return a41_0x3d31();}
@@ -1 +1 @@
1
- const a43_0x1f094c=a43_0x5630;function a43_0x3304(){const _0x947595=['str','no-imports','116nMDAEa','1611KcYyjw','10469720MZgHKm','bool','2078982ERMCta','sqlcode','appCode','sql','20686sXjwIU','Omit\x20import\x20statements\x20from\x20generated\x20code','sqlCode','149830VTsxQs','boolean','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','680250FToJgg','134825JyZWMn','bff','codegen','string','7055699VLhQkP','sdk','85nKUtNI','target'];a43_0x3304=function(){return _0x947595;};return a43_0x3304();}(function(_0x29c8aa,_0x25144f){const _0x31cd3d=a43_0x5630,_0x592a26=_0x29c8aa();while(!![]){try{const _0xfcf04=parseInt(_0x31cd3d(0xf5))/0x1*(-parseInt(_0x31cd3d(0x101))/0x2)+-parseInt(_0x31cd3d(0xfd))/0x3+parseInt(_0x31cd3d(0xf9))/0x4*(-parseInt(_0x31cd3d(0xef))/0x5)+parseInt(_0x31cd3d(0xee))/0x6+-parseInt(_0x31cd3d(0xf3))/0x7+parseInt(_0x31cd3d(0xfb))/0x8+parseInt(_0x31cd3d(0xfa))/0x9*(parseInt(_0x31cd3d(0xeb))/0xa);if(_0xfcf04===_0x25144f)break;else _0x592a26['push'](_0x592a26['shift']());}catch(_0x577a64){_0x592a26['push'](_0x592a26['shift']());}}}(a43_0x3304,0xb5244));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x5630(_0x4ce4b0,_0x5bff4b){_0x4ce4b0=_0x4ce4b0-0xe9;const _0x330478=a43_0x3304();let _0x563093=_0x330478[_0x4ce4b0];return _0x563093;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x1f094c(0xf1),'command':a43_0x1f094c(0x100),'description':a43_0x1f094c(0xed),'risk':'read','flags':[SQLCODE_FLAG,{'name':a43_0x1f094c(0xf6),'type':a43_0x1f094c(0xf2),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x1f094c(0xf4),'enum':['sdk',a43_0x1f094c(0xf0)]},{'name':a43_0x1f094c(0xf8),'type':a43_0x1f094c(0xec),'description':a43_0x1f094c(0xe9)}],async 'execute'(_0x336f0d){const _0x4f0a14=a43_0x1f094c,_0x4e64a7=await getSqlQueryInfo(_0x336f0d[_0x4f0a14(0xff)],_0x336f0d['str'](_0x4f0a14(0xfe))),_0xa63db2=_0x336f0d[_0x4f0a14(0xf7)](_0x4f0a14(0xf6))||_0x4f0a14(0xf4),_0x5ac526=generateSqlCodeTemplate(_0x4e64a7,{'target':_0xa63db2,'includeImports':!_0x336f0d[_0x4f0a14(0xfc)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x4e64a7[_0x4f0a14(0xea)],'sqlName':_0x4e64a7['sqlName'],'target':_0xa63db2,'code':_0x5ac526}};}};
1
+ const a42_0x4ef9f7=a42_0x3f17;(function(_0x576cb5,_0x4485c0){const _0x1aed4d=a42_0x3f17,_0x24e615=_0x576cb5();while(!![]){try{const _0x533047=parseInt(_0x1aed4d(0x1e3))/0x1*(-parseInt(_0x1aed4d(0x1ed))/0x2)+-parseInt(_0x1aed4d(0x1ee))/0x3*(parseInt(_0x1aed4d(0x1f4))/0x4)+-parseInt(_0x1aed4d(0x1e8))/0x5*(-parseInt(_0x1aed4d(0x1e6))/0x6)+-parseInt(_0x1aed4d(0x1ef))/0x7+parseInt(_0x1aed4d(0x1ec))/0x8+parseInt(_0x1aed4d(0x1f7))/0x9+parseInt(_0x1aed4d(0x1f6))/0xa;if(_0x533047===_0x4485c0)break;else _0x24e615['push'](_0x24e615['shift']());}catch(_0x54d5f2){_0x24e615['push'](_0x24e615['shift']());}}}(a42_0x53cb,0xab5c3));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a42_0x3f17(_0x573c3c,_0x56812f){_0x573c3c=_0x573c3c-0x1e2;const _0x53cbd7=a42_0x53cb();let _0x3f17a9=_0x53cbd7[_0x573c3c];return _0x3f17a9;}export const codegenSql={'service':'codegen','command':a42_0x4ef9f7(0x1e4),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a42_0x4ef9f7(0x1f2),'flags':[SQLCODE_FLAG,{'name':a42_0x4ef9f7(0x1f8),'type':a42_0x4ef9f7(0x1ea),'description':a42_0x4ef9f7(0x1f1),'default':a42_0x4ef9f7(0x1f5),'enum':[a42_0x4ef9f7(0x1f5),a42_0x4ef9f7(0x1eb)]},{'name':a42_0x4ef9f7(0x1e5),'type':a42_0x4ef9f7(0x1e9),'description':a42_0x4ef9f7(0x1e2)}],async 'execute'(_0x19d64e){const _0x25a804=a42_0x4ef9f7,_0x54c482=await getSqlQueryInfo(_0x19d64e[_0x25a804(0x1fa)],_0x19d64e[_0x25a804(0x1e7)]('sqlcode')),_0x17ca28=_0x19d64e[_0x25a804(0x1e7)](_0x25a804(0x1f8))||'sdk',_0x30ea2d=generateSqlCodeTemplate(_0x54c482,{'target':_0x17ca28,'includeImports':!_0x19d64e[_0x25a804(0x1f0)](_0x25a804(0x1e5))});return{'ok':!![],'data':{'sqlCode':_0x54c482[_0x25a804(0x1f3)],'sqlName':_0x54c482[_0x25a804(0x1f9)],'target':_0x17ca28,'code':_0x30ea2d}};}};function a42_0x53cb(){const _0x25810f=['str','25Uoasxv','boolean','string','bff','6919368HfMLVW','3470nFFndg','3emRwKX','4010741ajTCYJ','bool','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','read','sqlCode','4408940TevJXO','sdk','4916340mbtLph','6471306izhlQt','target','sqlName','appCode','Omit\x20import\x20statements\x20from\x20generated\x20code','53LYggpM','sql','no-imports','472146VLdGUS'];a42_0x53cb=function(){return _0x25810f;};return a42_0x53cb();}
@@ -1 +1 @@
1
- (function(_0x1cb941,_0x435252){const _0x1f0243=a44_0x4811,_0x4b0a67=_0x1cb941();while(!![]){try{const _0x2e15ce=-parseInt(_0x1f0243(0x187))/0x1*(-parseInt(_0x1f0243(0x188))/0x2)+-parseInt(_0x1f0243(0x1a7))/0x3*(-parseInt(_0x1f0243(0x19c))/0x4)+-parseInt(_0x1f0243(0x186))/0x5*(parseInt(_0x1f0243(0x19a))/0x6)+-parseInt(_0x1f0243(0x19d))/0x7*(parseInt(_0x1f0243(0x1ab))/0x8)+-parseInt(_0x1f0243(0x1ac))/0x9+parseInt(_0x1f0243(0x1b0))/0xa*(parseInt(_0x1f0243(0x18a))/0xb)+parseInt(_0x1f0243(0x18e))/0xc;if(_0x2e15ce===_0x435252)break;else _0x4b0a67['push'](_0x4b0a67['shift']());}catch(_0x1e362e){_0x4b0a67['push'](_0x4b0a67['shift']());}}}(a44_0x3412,0x4b6dc));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';function a44_0x3412(){const _0x4cdda5=['bool','apps','keys','70zaoMhT','\x22\x20still\x20defined\x20in\x20','\x22\x20not\x20found.','\x20Set\x20as\x20default\x20app.','\x20Default\x20app\x20changed\x20to\x20\x22','\x20config.','length','\x20app\x20\x22','147635mMUfxN','1dwGyqZ','988614tPAjcc','Removed\x20app\x20\x22','74151hIkwfi','project','\x20Note:\x20app\x20\x22','appcode','709800XSxEUu','boolean','inherit','string','args','flagMissing','Updated','str','object','App\x20\x22','\x20<name>\x20[--global]','Missing\x20app\x20name.','24OxENOD','projectConfig','126044wSilOK','99106lJLajR','both','Added','globalConfig','defaultApp','global','\x20<name>\x20--appcode\x20<code>','Use\x20global\x20config\x20scope','\x20<name>','\x22\x20(appcode:\x20','57ZJRGBY','validation','trim','Usage:\x20','184EqvGnb','4019895huzFCC'];a44_0x3412=function(){return _0x4cdda5;};return a44_0x3412();}import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x18fba9=a44_0x4811;return[{'name':_0x18fba9(0x18d),'type':_0x18fba9(0x191),'description':'App\x20code','required':!![]},{'name':_0x18fba9(0x1a2),'type':_0x18fba9(0x18f),'description':_0x18fba9(0x1a4),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x50ca1b=a44_0x4811;return[{'name':_0x50ca1b(0x1a2),'type':_0x50ca1b(0x18f),'description':_0x50ca1b(0x1a4),'default':![]}];}function a44_0x4811(_0xd1aa1c,_0x15b74b){_0xd1aa1c=_0xd1aa1c-0x17f;const _0x3412e8=a44_0x3412();let _0x48115d=_0x3412e8[_0xd1aa1c];return _0x48115d;}export async function validateAppName(_0xf7ad5c,_0x4dba45){const _0x4ba7fb=a44_0x4811,_0x1660af=_0xf7ad5c[_0x4ba7fb(0x192)][0x0]?.[_0x4ba7fb(0x1a9)]();if(!_0x1660af)throw CliErrors[_0x4ba7fb(0x1a8)](_0x4ba7fb(0x199),_0x4ba7fb(0x1aa)+CLI_BIN_NAME+'\x20'+_0x4dba45+_0x4ba7fb(0x1a5));}export async function runAppAdd(_0x20eaf5,_0x258a12){const _0x5a20c5=a44_0x4811,_0x1d649e=_0x20eaf5[_0x5a20c5(0x192)][0x0]?.['trim']();if(!_0x1d649e)throw CliErrors[_0x5a20c5(0x1a8)](_0x5a20c5(0x199),_0x5a20c5(0x1aa)+CLI_BIN_NAME+'\x20'+_0x258a12+'\x20<name>\x20--appcode\x20<code>');const _0x269167=_0x20eaf5[_0x5a20c5(0x195)]('appcode');if(!_0x269167)throw CliErrors[_0x5a20c5(0x193)]('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x258a12+_0x5a20c5(0x1a3));const _0x4ff2aa={'global':_0x20eaf5['bool']('global')},_0xb16e5a=readConfig(_0x4ff2aa);if(!_0xb16e5a[_0x5a20c5(0x1ae)])_0xb16e5a[_0x5a20c5(0x1ae)]={};const _0x3ed01d={'appcode':_0x269167,...collectAppProfileOverrides(_0x589799=>_0x20eaf5[_0x5a20c5(0x195)](_0x589799))},_0x527c18=_0xb16e5a[_0x5a20c5(0x1ae)],_0x35fee1=!!_0x527c18[_0x1d649e];_0x527c18[_0x1d649e]=_0x3ed01d;if(!_0xb16e5a[_0x5a20c5(0x1a1)])_0xb16e5a[_0x5a20c5(0x1a1)]=_0x1d649e;writeConfig(_0xb16e5a,_0x4ff2aa);const _0x3d1cd1=!_0x35fee1&&_0xb16e5a['defaultApp']===_0x1d649e?_0x5a20c5(0x181):'',_0x286aca=(_0x35fee1?_0x5a20c5(0x194):_0x5a20c5(0x19f))+_0x5a20c5(0x185)+_0x1d649e+_0x5a20c5(0x1a6)+_0x269167+')'+scopeLabel(_0x4ff2aa)+'.'+_0x3d1cd1;return{'ok':!![],'message':_0x286aca};}export async function runAppRemove(_0x2c2bd5,_0x467b5c){const _0x2b5d3f=a44_0x4811,_0x4bb824=_0x2c2bd5['args'][0x0]?.[_0x2b5d3f(0x1a9)]();if(!_0x4bb824)throw CliErrors['validation'](_0x2b5d3f(0x199),_0x2b5d3f(0x1aa)+CLI_BIN_NAME+'\x20'+_0x467b5c+_0x2b5d3f(0x198));const _0x56fffa=_0x2c2bd5[_0x2b5d3f(0x1ad)]('global'),{config:_0x12be42,layers:_0x1de810}=readRawConfigWithLayers(),_0xb9bc8=_0x12be42[_0x2b5d3f(0x1ae)]??{};if(!_0xb9bc8[_0x4bb824])throw CliErrors[_0x2b5d3f(0x1a8)]('App\x20\x22'+_0x4bb824+_0x2b5d3f(0x180));const _0x461e72=_0x1de810[_0x2b5d3f(0x1a0)][_0x2b5d3f(0x1ae)]&&typeof _0x1de810[_0x2b5d3f(0x1a0)]['apps']===_0x2b5d3f(0x196)?_0x1de810['globalConfig'][_0x2b5d3f(0x1ae)]:{},_0x7f578e=_0x1de810[_0x2b5d3f(0x19b)]['apps']&&typeof _0x1de810['projectConfig'][_0x2b5d3f(0x1ae)]==='object'?_0x1de810[_0x2b5d3f(0x19b)][_0x2b5d3f(0x1ae)]:{},_0x5ab358=appDefinedIn(_0x4bb824,_0x461e72,_0x7f578e,_0x1de810[_0x2b5d3f(0x19b)][_0x2b5d3f(0x190)]===![]),_0x37ccd5=resolveAppScopeForWrite(_0x4bb824,_0x56fffa,_0x1de810),_0x466a16={'global':_0x37ccd5===_0x2b5d3f(0x1a2)},_0x44ac16=readConfig(_0x466a16),_0x39ab2a=_0x44ac16[_0x2b5d3f(0x1ae)];if(!_0x39ab2a||!_0x39ab2a[_0x4bb824])throw CliErrors[_0x2b5d3f(0x1a8)](_0x2b5d3f(0x197)+_0x4bb824+_0x2b5d3f(0x180));delete _0x39ab2a[_0x4bb824];let _0x104f63='';if(_0x44ac16[_0x2b5d3f(0x1a1)]===_0x4bb824){const _0x351cd6=Object[_0x2b5d3f(0x1af)](_0x39ab2a);_0x44ac16[_0x2b5d3f(0x1a1)]=_0x351cd6[_0x2b5d3f(0x184)]>0x0?_0x351cd6[0x0]:undefined,_0x44ac16[_0x2b5d3f(0x1a1)]?_0x104f63=_0x2b5d3f(0x182)+_0x44ac16['defaultApp']+'\x22.':delete _0x44ac16['defaultApp'];}Object[_0x2b5d3f(0x1af)](_0x39ab2a)[_0x2b5d3f(0x184)]===0x0&&(delete _0x44ac16[_0x2b5d3f(0x1ae)],delete _0x44ac16[_0x2b5d3f(0x1a1)]);writeConfig(_0x44ac16,_0x466a16);const _0x56188a=_0x5ab358===_0x2b5d3f(0x19e)?_0x2b5d3f(0x18c)+_0x4bb824+_0x2b5d3f(0x17f)+(_0x37ccd5===_0x2b5d3f(0x18b)?_0x2b5d3f(0x1a2):_0x2b5d3f(0x18b))+_0x2b5d3f(0x183):'';return{'ok':!![],'message':_0x2b5d3f(0x189)+_0x4bb824+'\x22'+scopeLabel(_0x466a16)+'.'+_0x104f63+_0x56188a};}
1
+ (function(_0x316c2b,_0x52b26a){const _0x23f252=a43_0x3b1d,_0x185c23=_0x316c2b();while(!![]){try{const _0x4d3504=parseInt(_0x23f252(0x126))/0x1+parseInt(_0x23f252(0x143))/0x2*(parseInt(_0x23f252(0x12c))/0x3)+parseInt(_0x23f252(0x13d))/0x4+parseInt(_0x23f252(0x120))/0x5*(parseInt(_0x23f252(0x123))/0x6)+-parseInt(_0x23f252(0x135))/0x7*(-parseInt(_0x23f252(0x139))/0x8)+parseInt(_0x23f252(0x13e))/0x9+-parseInt(_0x23f252(0x121))/0xa;if(_0x4d3504===_0x52b26a)break;else _0x185c23['push'](_0x185c23['shift']());}catch(_0x13ce55){_0x185c23['push'](_0x185c23['shift']());}}}(a43_0x463e,0xd98ee));function a43_0x463e(){const _0x25b799=['trim','object','defaultApp','2162140KMoNFE','4587876NYNMnW','keys','projectConfig','both','str','4076rnIjZz','appcode','App\x20\x22','\x20<name>','\x20<name>\x20[--global]','10PxNpwY','31313110GaZMMk','Use\x20global\x20config\x20scope','151566XWwKLt','Missing\x20app\x20name.','string','1253721YEGZCn','Usage:\x20','\x20<name>\x20--appcode\x20<code>','args','\x20config.','globalConfig','213KozqhS','\x22\x20not\x20found.','apps','global','App\x20code','project','\x20Note:\x20app\x20\x22','validation','boolean','7twciKw','Removed\x20app\x20\x22','\x20Default\x20app\x20changed\x20to\x20\x22','\x22\x20(appcode:\x20','12185512nNbjKp'];a43_0x463e=function(){return _0x25b799;};return a43_0x463e();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';function a43_0x3b1d(_0x27a0fb,_0x3419f8){_0x27a0fb=_0x27a0fb-0x11c;const _0x463e89=a43_0x463e();let _0x3b1d77=_0x463e89[_0x27a0fb];return _0x3b1d77;}export function buildAppAddFlags(){const _0x30905a=a43_0x3b1d;return[{'name':_0x30905a(0x11c),'type':_0x30905a(0x125),'description':_0x30905a(0x130),'required':!![]},{'name':'global','type':'boolean','description':_0x30905a(0x122),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x2fa485=a43_0x3b1d;return[{'name':_0x2fa485(0x12f),'type':_0x2fa485(0x134),'description':_0x2fa485(0x122),'default':![]}];}export async function validateAppName(_0x4868a6,_0x1649ff){const _0x3895ae=a43_0x3b1d,_0x3f98ab=_0x4868a6['args'][0x0]?.['trim']();if(!_0x3f98ab)throw CliErrors['validation']('Missing\x20app\x20name.',_0x3895ae(0x127)+CLI_BIN_NAME+'\x20'+_0x1649ff+_0x3895ae(0x11e));}export async function runAppAdd(_0x26909e,_0x5784fb){const _0x1f5c1d=a43_0x3b1d,_0x331aa7=_0x26909e[_0x1f5c1d(0x129)][0x0]?.['trim']();if(!_0x331aa7)throw CliErrors[_0x1f5c1d(0x133)]('Missing\x20app\x20name.',_0x1f5c1d(0x127)+CLI_BIN_NAME+'\x20'+_0x5784fb+'\x20<name>\x20--appcode\x20<code>');const _0x3c5fed=_0x26909e[_0x1f5c1d(0x142)](_0x1f5c1d(0x11c));if(!_0x3c5fed)throw CliErrors['flagMissing']('appcode','Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x5784fb+_0x1f5c1d(0x128));const _0x161bc5={'global':_0x26909e['bool']('global')},_0x563b26=readConfig(_0x161bc5);if(!_0x563b26[_0x1f5c1d(0x12e)])_0x563b26[_0x1f5c1d(0x12e)]={};const _0x263bda={'appcode':_0x3c5fed,...collectAppProfileOverrides(_0x236a17=>_0x26909e['str'](_0x236a17))},_0x5462f2=_0x563b26[_0x1f5c1d(0x12e)],_0x45a637=!!_0x5462f2[_0x331aa7];_0x5462f2[_0x331aa7]=_0x263bda;if(!_0x563b26[_0x1f5c1d(0x13c)])_0x563b26[_0x1f5c1d(0x13c)]=_0x331aa7;writeConfig(_0x563b26,_0x161bc5);const _0x3578f6=!_0x45a637&&_0x563b26[_0x1f5c1d(0x13c)]===_0x331aa7?'\x20Set\x20as\x20default\x20app.':'',_0x24a244=(_0x45a637?'Updated':'Added')+'\x20app\x20\x22'+_0x331aa7+_0x1f5c1d(0x138)+_0x3c5fed+')'+scopeLabel(_0x161bc5)+'.'+_0x3578f6;return{'ok':!![],'message':_0x24a244};}export async function runAppRemove(_0x2752aa,_0x106953){const _0x2db9df=a43_0x3b1d,_0x397da5=_0x2752aa[_0x2db9df(0x129)][0x0]?.[_0x2db9df(0x13a)]();if(!_0x397da5)throw CliErrors['validation'](_0x2db9df(0x124),_0x2db9df(0x127)+CLI_BIN_NAME+'\x20'+_0x106953+_0x2db9df(0x11f));const _0x238203=_0x2752aa['bool']('global'),{config:_0x5e9cd1,layers:_0x25f8d5}=readRawConfigWithLayers(),_0x186dda=_0x5e9cd1[_0x2db9df(0x12e)]??{};if(!_0x186dda[_0x397da5])throw CliErrors[_0x2db9df(0x133)](_0x2db9df(0x11d)+_0x397da5+'\x22\x20not\x20found.');const _0x8a7603=_0x25f8d5['globalConfig']['apps']&&typeof _0x25f8d5['globalConfig'][_0x2db9df(0x12e)]==='object'?_0x25f8d5[_0x2db9df(0x12b)][_0x2db9df(0x12e)]:{},_0x552fdd=_0x25f8d5[_0x2db9df(0x140)][_0x2db9df(0x12e)]&&typeof _0x25f8d5['projectConfig'][_0x2db9df(0x12e)]===_0x2db9df(0x13b)?_0x25f8d5[_0x2db9df(0x140)]['apps']:{},_0xa5088a=appDefinedIn(_0x397da5,_0x8a7603,_0x552fdd,_0x25f8d5['projectConfig']['inherit']===![]),_0x2ed4be=resolveAppScopeForWrite(_0x397da5,_0x238203,_0x25f8d5),_0x29dbf9={'global':_0x2ed4be===_0x2db9df(0x12f)},_0x4e7eae=readConfig(_0x29dbf9),_0x34783b=_0x4e7eae['apps'];if(!_0x34783b||!_0x34783b[_0x397da5])throw CliErrors['validation'](_0x2db9df(0x11d)+_0x397da5+_0x2db9df(0x12d));delete _0x34783b[_0x397da5];let _0x57f2b7='';if(_0x4e7eae[_0x2db9df(0x13c)]===_0x397da5){const _0x439baa=Object[_0x2db9df(0x13f)](_0x34783b);_0x4e7eae[_0x2db9df(0x13c)]=_0x439baa['length']>0x0?_0x439baa[0x0]:undefined,_0x4e7eae[_0x2db9df(0x13c)]?_0x57f2b7=_0x2db9df(0x137)+_0x4e7eae[_0x2db9df(0x13c)]+'\x22.':delete _0x4e7eae[_0x2db9df(0x13c)];}Object[_0x2db9df(0x13f)](_0x34783b)['length']===0x0&&(delete _0x4e7eae['apps'],delete _0x4e7eae[_0x2db9df(0x13c)]);writeConfig(_0x4e7eae,_0x29dbf9);const _0xb3861a=_0xa5088a===_0x2db9df(0x141)?_0x2db9df(0x132)+_0x397da5+'\x22\x20still\x20defined\x20in\x20'+(_0x2ed4be===_0x2db9df(0x131)?_0x2db9df(0x12f):_0x2db9df(0x131))+_0x2db9df(0x12a):'';return{'ok':!![],'message':_0x2db9df(0x136)+_0x397da5+'\x22'+scopeLabel(_0x29dbf9)+'.'+_0x57f2b7+_0xb3861a};}
@@ -1 +1 @@
1
- (function(_0xed1a0c,_0x227bb5){const _0x3bfacc=a45_0x2747,_0xe68633=_0xed1a0c();while(!![]){try{const _0x1867f0=-parseInt(_0x3bfacc(0x177))/0x1*(-parseInt(_0x3bfacc(0x190))/0x2)+parseInt(_0x3bfacc(0x17a))/0x3+-parseInt(_0x3bfacc(0x18f))/0x4+parseInt(_0x3bfacc(0x179))/0x5+parseInt(_0x3bfacc(0x18c))/0x6*(parseInt(_0x3bfacc(0x192))/0x7)+parseInt(_0x3bfacc(0x185))/0x8*(-parseInt(_0x3bfacc(0x193))/0x9)+parseInt(_0x3bfacc(0x184))/0xa*(-parseInt(_0x3bfacc(0x17e))/0xb);if(_0x1867f0===_0x227bb5)break;else _0xe68633['push'](_0xe68633['shift']());}catch(_0x3d98c8){_0xe68633['push'](_0xe68633['shift']());}}}(a45_0x1953,0x61b96));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x14d654 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a45_0x2747(_0x32e064,_0x4fcd5e){_0x32e064=_0x32e064-0x173;const _0x1953cc=a45_0x1953();let _0x27476f=_0x1953cc[_0x32e064];return _0x27476f;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x3b6e42=a45_0x2747,_0x25003c=await input({'message':_0x3b6e42(0x183),'validate':_0x1fb62e=>{const _0x423b21=_0x3b6e42,_0xad7f01=validateAppcode(_0x1fb62e[_0x423b21(0x176)]());return _0xad7f01[_0x423b21(0x178)]||_0xad7f01[_0x423b21(0x186)]||_0x423b21(0x18e);}});return _0x25003c[_0x3b6e42(0x176)]();}export async function promptAppSelection(_0x53e8dd){const _0xbc167d=a45_0x2747,_0x3f8395=[{'name':a45_0x14d654[_0xbc167d(0x198)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x53e8dd[_0xbc167d(0x17f)]((_0x95dab3,_0x191691)=>({'name':_0x95dab3[_0xbc167d(0x18a)]+'\x20\x20'+a45_0x14d654['gray']('('+_0x95dab3[_0xbc167d(0x182)]+')'),'value':_0x191691}))],_0x114acc=await checkbox({'message':_0xbc167d(0x181)+a45_0x14d654['cyan'](_0x53e8dd['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x3f8395,'loop':![]});if(_0x114acc[_0xbc167d(0x187)](-0x1))return _0xbc167d(0x180);if(_0x114acc['length']===0x0)return _0xbc167d(0x180);return _0x114acc[_0xbc167d(0x17f)](_0x50dc0c=>_0x53e8dd[_0x50dc0c]);}function a45_0x1953(){const _0x53c436=['1686835kHIEmd','1400148nKVczQ','find','正在获取可用应用列表...','无法获取远程应用列表,请手动输入。','11mUrFfR','map','custom','获取到\x20','appCode','请输入\x20App\x20Code:','2731510Mswhxr','280xqPbFd','message','includes','\x0a无法获取远程应用列表,请手动输入。','✎\x20自定义输入\x20appcode','appName','skip','6XWkPaJ','manual','Invalid\x20App\x20Code','1977072zykIUT','88vGLUAy','gray','1182839MVPPcr','129429fATTcb','\x0a未找到可用应用。','✎\x20手动输入','(跳过,稍后配置)','未找到可用应用。','yellow','\x20\x20(','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','App\x20Code:','trim','15863fVZxaZ','valid'];a45_0x1953=function(){return _0x53c436;};return a45_0x1953();}export async function promptSingleAppSelection(_0x153ddd){const _0x4d27d2=a45_0x2747,_0x5ef0d3=[{'name':a45_0x14d654[_0x4d27d2(0x191)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x4d27d2(0x18b)},{'name':a45_0x14d654[_0x4d27d2(0x198)](_0x4d27d2(0x189)),'value':_0x4d27d2(0x180)},..._0x153ddd[_0x4d27d2(0x17f)](_0x2946e5=>({'name':_0x2946e5[_0x4d27d2(0x18a)]+'\x20\x20'+a45_0x14d654['gray']('('+_0x2946e5[_0x4d27d2(0x182)]+')'),'value':_0x2946e5[_0x4d27d2(0x182)]}))],_0xf12453=await select({'message':'请选择要绑定的应用:','choices':_0x5ef0d3});if(_0xf12453==='skip')return'skip';if(_0xf12453===_0x4d27d2(0x180))return'custom';return _0x153ddd[_0x4d27d2(0x17b)](_0x3f7694=>_0x3f7694['appCode']===_0xf12453);}export async function selectSingleAppcode(_0xbbc5dd){const _0x3b84f9=a45_0x2747;if(!_0xbbc5dd)return writeCliSideChannelLine(a45_0x14d654[_0x3b84f9(0x191)](_0x3b84f9(0x174))),_fallbackOrSkip();writeCliSideChannelLine(_0x3b84f9(0x17c));let _0x452330;try{_0x452330=await withActiveCookie(_0xbbc5dd,()=>listRemoteApps());}catch(_0x36cd62){writeCliSideChannelLine(a45_0x14d654[_0x3b84f9(0x198)](_0x3b84f9(0x17d)));if(_0x36cd62 instanceof Error)writeCliSideChannelLine(a45_0x14d654['gray']('\x20\x20('+_0x36cd62[_0x3b84f9(0x186)]+')'));return _fallbackOrSkip();}if(_0x452330['length']===0x0)return writeCliSideChannelLine(a45_0x14d654[_0x3b84f9(0x198)](_0x3b84f9(0x197))),_fallbackOrSkip();const _0x20da18=await promptSingleAppSelection(_0x452330);if(_0x20da18===_0x3b84f9(0x18b))return'';if(_0x20da18===_0x3b84f9(0x180))return promptCustomAppcode();return _0x20da18['appCode'];}export async function selectMultipleApps(_0x2aca97){const _0x1e3196=a45_0x2747;writeCliSideChannelLine(_0x1e3196(0x17c));let _0x3f9efa;try{_0x3f9efa=await withActiveCookie(_0x2aca97,()=>listRemoteApps());}catch(_0x3629bd){writeCliSideChannelLine(_0x1e3196(0x188));if(_0x3629bd instanceof Error)writeCliSideChannelLine(_0x1e3196(0x173)+_0x3629bd['message']+')');return _0x1e3196(0x180);}if(_0x3f9efa['length']===0x0)return writeCliSideChannelLine(_0x1e3196(0x194)),'custom';return promptAppSelection(_0x3f9efa);}async function _fallbackOrSkip(){const _0x2da472=a45_0x2747,_0x32d08f=await select({'message':_0x2da472(0x175),'choices':[{'name':a45_0x14d654[_0x2da472(0x191)](_0x2da472(0x196)),'value':_0x2da472(0x18b)},{'name':a45_0x14d654['yellow'](_0x2da472(0x195)),'value':_0x2da472(0x18d)}]});if(_0x32d08f===_0x2da472(0x18b))return'';return promptCustomAppcode();}
1
+ function a44_0x1a0c(){const _0x4f596e=['3OOjlsP','includes','3507498OjKsWX','\x0a无法获取远程应用列表,请手动输入。','118647abCXHR','cyan','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','1315984owBpsT','请选择要绑定的应用:','skip','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','请输入\x20App\x20Code:','length','yellow','\x20\x20(','gray','9241639hLwcWe','421062rtZxTv','✎\x20自定义输入\x20appcode','valid','find','10jzDZKz','未找到可用应用。','290910LEsxfK','map','1202285JZojTO','appName','message','custom','(跳过,稍后配置)','appCode','获取到\x20','10qYjupx','App\x20Code:','manual','Invalid\x20App\x20Code','trim','8ludHpq'];a44_0x1a0c=function(){return _0x4f596e;};return a44_0x1a0c();}(function(_0x2390e7,_0x3d2ecf){const _0x1d28c0=a44_0x5666,_0x147ac7=_0x2390e7();while(!![]){try{const _0x3af686=parseInt(_0x1d28c0(0xb7))/0x1*(parseInt(_0x1d28c0(0xa8))/0x2)+-parseInt(_0x1d28c0(0x95))/0x3+parseInt(_0x1d28c0(0x98))/0x4+parseInt(_0x1d28c0(0xb1))/0x5*(parseInt(_0x1d28c0(0xa2))/0x6)+-parseInt(_0x1d28c0(0xaa))/0x7+parseInt(_0x1d28c0(0xb6))/0x8*(parseInt(_0x1d28c0(0xb9))/0x9)+parseInt(_0x1d28c0(0xa6))/0xa*(-parseInt(_0x1d28c0(0xa1))/0xb);if(_0x3af686===_0x3d2ecf)break;else _0x147ac7['push'](_0x147ac7['shift']());}catch(_0x1b1d07){_0x147ac7['push'](_0x147ac7['shift']());}}}(a44_0x1a0c,0x3b910));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x28d564 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 _0x37db96=a44_0x5666,_0x269457=await input({'message':_0x37db96(0x9c),'validate':_0x436ac7=>{const _0x225b21=_0x37db96,_0x39e09a=validateAppcode(_0x436ac7[_0x225b21(0xb5)]());return _0x39e09a[_0x225b21(0xa4)]||_0x39e09a[_0x225b21(0xac)]||_0x225b21(0xb4);}});return _0x269457[_0x37db96(0xb5)]();}function a44_0x5666(_0x436b14,_0x483131){_0x436b14=_0x436b14-0x95;const _0x1a0c33=a44_0x1a0c();let _0x566635=_0x1a0c33[_0x436b14];return _0x566635;}export async function promptAppSelection(_0x5f28de){const _0x1b7e22=a44_0x5666,_0x7bf8b6=[{'name':a44_0x28d564['yellow'](_0x1b7e22(0xa3)),'value':-0x1},..._0x5f28de['map']((_0x59f49f,_0x53df96)=>({'name':_0x59f49f[_0x1b7e22(0xab)]+'\x20\x20'+a44_0x28d564[_0x1b7e22(0xa0)]('('+_0x59f49f[_0x1b7e22(0xaf)]+')'),'value':_0x53df96}))],_0x15ba6=await checkbox({'message':_0x1b7e22(0xb0)+a44_0x28d564[_0x1b7e22(0x96)](_0x5f28de[_0x1b7e22(0x9d)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x7bf8b6,'loop':![]});if(_0x15ba6[_0x1b7e22(0xb8)](-0x1))return'custom';if(_0x15ba6[_0x1b7e22(0x9d)]===0x0)return _0x1b7e22(0xad);return _0x15ba6['map'](_0x3b4652=>_0x5f28de[_0x3b4652]);}export async function promptSingleAppSelection(_0x7705ba){const _0x37483c=a44_0x5666,_0x3e75c6=[{'name':a44_0x28d564['gray'](_0x37483c(0x9b)),'value':_0x37483c(0x9a)},{'name':a44_0x28d564[_0x37483c(0x9e)](_0x37483c(0xa3)),'value':_0x37483c(0xad)},..._0x7705ba[_0x37483c(0xa9)](_0x4de286=>({'name':_0x4de286[_0x37483c(0xab)]+'\x20\x20'+a44_0x28d564['gray']('('+_0x4de286[_0x37483c(0xaf)]+')'),'value':_0x4de286[_0x37483c(0xaf)]}))],_0x478dde=await select({'message':_0x37483c(0x99),'choices':_0x3e75c6});if(_0x478dde==='skip')return'skip';if(_0x478dde===_0x37483c(0xad))return _0x37483c(0xad);return _0x7705ba[_0x37483c(0xa5)](_0x15e24f=>_0x15e24f[_0x37483c(0xaf)]===_0x478dde);}export async function selectSingleAppcode(_0x16771c){const _0x441704=a44_0x5666;if(!_0x16771c)return writeCliSideChannelLine(a44_0x28d564[_0x441704(0xa0)](_0x441704(0x97))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x4052c5;try{_0x4052c5=await withActiveCookie(_0x16771c,()=>listRemoteApps());}catch(_0x4a804c){writeCliSideChannelLine(a44_0x28d564[_0x441704(0x9e)]('无法获取远程应用列表,请手动输入。'));if(_0x4a804c instanceof Error)writeCliSideChannelLine(a44_0x28d564[_0x441704(0xa0)](_0x441704(0x9f)+_0x4a804c[_0x441704(0xac)]+')'));return _fallbackOrSkip();}if(_0x4052c5[_0x441704(0x9d)]===0x0)return writeCliSideChannelLine(a44_0x28d564['yellow'](_0x441704(0xa7))),_fallbackOrSkip();const _0x58a3a2=await promptSingleAppSelection(_0x4052c5);if(_0x58a3a2===_0x441704(0x9a))return'';if(_0x58a3a2===_0x441704(0xad))return promptCustomAppcode();return _0x58a3a2[_0x441704(0xaf)];}export async function selectMultipleApps(_0x2e3255){const _0x37b6cd=a44_0x5666;writeCliSideChannelLine('正在获取可用应用列表...');let _0x383040;try{_0x383040=await withActiveCookie(_0x2e3255,()=>listRemoteApps());}catch(_0xad27ff){writeCliSideChannelLine(_0x37b6cd(0xba));if(_0xad27ff instanceof Error)writeCliSideChannelLine(_0x37b6cd(0x9f)+_0xad27ff[_0x37b6cd(0xac)]+')');return _0x37b6cd(0xad);}if(_0x383040['length']===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x37b6cd(0xad);return promptAppSelection(_0x383040);}async function _fallbackOrSkip(){const _0x2d5902=a44_0x5666,_0x482d7c=await select({'message':_0x2d5902(0xb2),'choices':[{'name':a44_0x28d564[_0x2d5902(0xa0)](_0x2d5902(0xae)),'value':_0x2d5902(0x9a)},{'name':a44_0x28d564['yellow']('✎\x20手动输入'),'value':_0x2d5902(0xb3)}]});if(_0x482d7c===_0x2d5902(0x9a))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a46_0x53c017=a46_0x1017;(function(_0x27cbd2,_0x23b5df){const _0x5cf21c=a46_0x1017,_0x3b56bc=_0x27cbd2();while(!![]){try{const _0x1d390c=-parseInt(_0x5cf21c(0x1af))/0x1*(-parseInt(_0x5cf21c(0x1b3))/0x2)+-parseInt(_0x5cf21c(0x1a8))/0x3*(-parseInt(_0x5cf21c(0x1ba))/0x4)+parseInt(_0x5cf21c(0x1ad))/0x5*(parseInt(_0x5cf21c(0x1a6))/0x6)+parseInt(_0x5cf21c(0x1b0))/0x7+-parseInt(_0x5cf21c(0x1b8))/0x8*(parseInt(_0x5cf21c(0x1b2))/0x9)+-parseInt(_0x5cf21c(0x19d))/0xa*(parseInt(_0x5cf21c(0x1b9))/0xb)+-parseInt(_0x5cf21c(0x1b4))/0xc;if(_0x1d390c===_0x23b5df)break;else _0x3b56bc['push'](_0x3b56bc['shift']());}catch(_0x16e8a9){_0x3b56bc['push'](_0x3b56bc['shift']());}}}(a46_0x527d,0xd733e));function a46_0x527d(){const _0x26c8d8=['apiError','16lXSckL','2353219TfRQjF','3745752QtrNWT','trim','Task\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','50ZTNEZD','\x20is\x20pending.','taskId','PROCESSING','FAILED','string','toUpperCase','\x20--format\x20compress','PENDING','6154482NkdOiG','replace','3EHGvFd','\x27\x5c\x27\x27','status','\x20--appcode\x20','errorMessage','5yAZhPU','\x20returned\x20unknown\x20status\x20','1YNumuU','11280038gVnTRW','has','5177889QoqlEL','27382lZpPzt','5826636RKfSjU','SUCCESS','\x20completed\x20successfully.'];a46_0x527d=function(){return _0x26c8d8;};return a46_0x527d();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x53c017(0x1b5),a46_0x53c017(0x1a1)]),NON_TERMINAL_STATUSES=new Set(['PENDING','PROCESSING']);export function normalizeAsyncTask(_0x153bfd){const _0x5b5087=a46_0x53c017,_0x472f20=typeof _0x153bfd?.[_0x5b5087(0x19f)]===_0x5b5087(0x1a2)?_0x153bfd[_0x5b5087(0x19f)][_0x5b5087(0x1bb)]():'';if(!_0x472f20)throw CliErrors[_0x5b5087(0x1b7)]('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x109f3f=typeof _0x153bfd[_0x5b5087(0x1aa)]==='string'?_0x153bfd['status'][_0x5b5087(0x1bb)]()[_0x5b5087(0x1a3)]():'';if(!_0x109f3f)throw CliErrors[_0x5b5087(0x1b7)]('Async\x20task\x20'+_0x472f20+_0x5b5087(0x1bd));return{'taskId':_0x472f20,'status':_0x109f3f,'errorMessage':typeof _0x153bfd['errorMessage']==='string'&&_0x153bfd['errorMessage']['trim']()?_0x153bfd['errorMessage']['trim']():null,'isTerminal':TERMINAL_STATUSES['has'](_0x109f3f),'knownStatus':TERMINAL_STATUSES[_0x5b5087(0x1b1)](_0x109f3f)||NON_TERMINAL_STATUSES['has'](_0x109f3f)};}function a46_0x1017(_0x4e5b9f,_0x5bdbb7){_0x4e5b9f=_0x4e5b9f-0x19d;const _0x527df6=a46_0x527d();let _0x101763=_0x527df6[_0x4e5b9f];return _0x101763;}export function buildAsyncTaskStatusCommand(_0x53c7fd,_0x2fd3d9){const _0x5b8a99=a46_0x53c017;return CLI_BIN_NAME+'\x20task\x20status\x20--task-id\x20'+quoteShellArg(_0x53c7fd)+_0x5b8a99(0x1ab)+quoteShellArg(_0x2fd3d9)+_0x5b8a99(0x1a4);}export function asyncTaskMessage(_0x5872be){const _0x58381d=a46_0x53c017;switch(_0x5872be['status']){case _0x58381d(0x1a5):return _0x58381d(0x1bc)+_0x5872be[_0x58381d(0x19f)]+_0x58381d(0x19e);case _0x58381d(0x1a0):return'Task\x20'+_0x5872be[_0x58381d(0x19f)]+'\x20is\x20processing.';case _0x58381d(0x1b5):return _0x58381d(0x1bc)+_0x5872be[_0x58381d(0x19f)]+_0x58381d(0x1b6);case'FAILED':return _0x5872be[_0x58381d(0x1ac)]?_0x58381d(0x1bc)+_0x5872be[_0x58381d(0x19f)]+'\x20failed:\x20'+_0x5872be[_0x58381d(0x1ac)]:'Task\x20'+_0x5872be['taskId']+'\x20failed.';default:return _0x58381d(0x1bc)+_0x5872be[_0x58381d(0x19f)]+_0x58381d(0x1ae)+_0x5872be[_0x58381d(0x1aa)]+'.';}}function quoteShellArg(_0x1c1cca){const _0x52647d=a46_0x53c017;return'\x27'+_0x1c1cca[_0x52647d(0x1a7)](/'/g,_0x52647d(0x1a9))+'\x27';}
1
+ const a45_0x3407ed=a45_0x1528;(function(_0x1e513b,_0x3c8149){const _0x413221=a45_0x1528,_0x29796e=_0x1e513b();while(!![]){try{const _0x5e310e=parseInt(_0x413221(0x15a))/0x1+parseInt(_0x413221(0x166))/0x2*(parseInt(_0x413221(0x14e))/0x3)+parseInt(_0x413221(0x153))/0x4+-parseInt(_0x413221(0x154))/0x5+-parseInt(_0x413221(0x165))/0x6*(parseInt(_0x413221(0x155))/0x7)+parseInt(_0x413221(0x14a))/0x8*(parseInt(_0x413221(0x15b))/0x9)+parseInt(_0x413221(0x157))/0xa;if(_0x5e310e===_0x3c8149)break;else _0x29796e['push'](_0x29796e['shift']());}catch(_0x312713){_0x29796e['push'](_0x29796e['shift']());}}}(a45_0x119b,0x5547d));import{CLI_BIN_NAME}from'../../constant/cli.js';function a45_0x1528(_0x2aca81,_0x3f540b){_0x2aca81=_0x2aca81-0x14a;const _0x119bde=a45_0x119b();let _0x1528af=_0x119bde[_0x2aca81];return _0x1528af;}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a45_0x3407ed(0x161),a45_0x3407ed(0x16a)]),NON_TERMINAL_STATUSES=new Set([a45_0x3407ed(0x16d),'PROCESSING']);export function normalizeAsyncTask(_0x2de942){const _0x371ea2=a45_0x3407ed,_0x46dfcd=typeof _0x2de942?.[_0x371ea2(0x158)]===_0x371ea2(0x16b)?_0x2de942[_0x371ea2(0x158)]['trim']():'';if(!_0x46dfcd)throw CliErrors[_0x371ea2(0x152)](_0x371ea2(0x14c));const _0x4967d8=typeof _0x2de942[_0x371ea2(0x159)]===_0x371ea2(0x16b)?_0x2de942[_0x371ea2(0x159)][_0x371ea2(0x168)]()[_0x371ea2(0x16c)]():'';if(!_0x4967d8)throw CliErrors[_0x371ea2(0x152)](_0x371ea2(0x15d)+_0x46dfcd+_0x371ea2(0x15e));return{'taskId':_0x46dfcd,'status':_0x4967d8,'errorMessage':typeof _0x2de942[_0x371ea2(0x14f)]===_0x371ea2(0x16b)&&_0x2de942['errorMessage']['trim']()?_0x2de942[_0x371ea2(0x14f)][_0x371ea2(0x168)]():null,'isTerminal':TERMINAL_STATUSES[_0x371ea2(0x156)](_0x4967d8),'knownStatus':TERMINAL_STATUSES['has'](_0x4967d8)||NON_TERMINAL_STATUSES[_0x371ea2(0x156)](_0x4967d8)};}export function buildAsyncTaskStatusCommand(_0x1b37b0,_0x158acb){const _0x54cced=a45_0x3407ed;return CLI_BIN_NAME+_0x54cced(0x15f)+quoteShellArg(_0x1b37b0)+_0x54cced(0x151)+quoteShellArg(_0x158acb)+'\x20--format\x20compress';}export function asyncTaskMessage(_0x4763ab){const _0x2c23ef=a45_0x3407ed;switch(_0x4763ab[_0x2c23ef(0x159)]){case _0x2c23ef(0x16d):return _0x2c23ef(0x14d)+_0x4763ab[_0x2c23ef(0x158)]+_0x2c23ef(0x163);case _0x2c23ef(0x162):return _0x2c23ef(0x14d)+_0x4763ab['taskId']+_0x2c23ef(0x14b);case _0x2c23ef(0x161):return _0x2c23ef(0x14d)+_0x4763ab[_0x2c23ef(0x158)]+_0x2c23ef(0x164);case'FAILED':return _0x4763ab[_0x2c23ef(0x14f)]?_0x2c23ef(0x14d)+_0x4763ab['taskId']+_0x2c23ef(0x167)+_0x4763ab[_0x2c23ef(0x14f)]:_0x2c23ef(0x14d)+_0x4763ab[_0x2c23ef(0x158)]+_0x2c23ef(0x15c);default:return _0x2c23ef(0x14d)+_0x4763ab[_0x2c23ef(0x158)]+_0x2c23ef(0x169)+_0x4763ab[_0x2c23ef(0x159)]+'.';}}function quoteShellArg(_0x2c9ad3){const _0x3ab672=a45_0x3407ed;return'\x27'+_0x2c9ad3[_0x3ab672(0x160)](/'/g,_0x3ab672(0x150))+'\x27';}function a45_0x119b(){const _0x28eaaa=['\x20is\x20processing.','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','Task\x20','6XmCEOH','errorMessage','\x27\x5c\x27\x27','\x20--appcode\x20','apiError','756124QjaWCz','2359950hoVJLQ','21oSvRTA','has','2536740NryCeO','taskId','status','390874GzuAMV','18TUlXQY','\x20failed.','Async\x20task\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20task\x20status\x20--task-id\x20','replace','SUCCESS','PROCESSING','\x20is\x20pending.','\x20completed\x20successfully.','183000fqwQoj','58518cfmpGF','\x20failed:\x20','trim','\x20returned\x20unknown\x20status\x20','FAILED','string','toUpperCase','PENDING','82808VGqLVQ'];a45_0x119b=function(){return _0x28eaaa;};return a45_0x119b();}
@@ -1 +1 @@
1
- (function(_0x2b247b,_0x21db22){var _0x5d37fd=a47_0x20e6,_0x2e832a=_0x2b247b();while(!![]){try{var _0x3e2470=parseInt(_0x5d37fd(0x89))/0x1+parseInt(_0x5d37fd(0x88))/0x2+parseInt(_0x5d37fd(0x90))/0x3*(parseInt(_0x5d37fd(0x87))/0x4)+-parseInt(_0x5d37fd(0x8b))/0x5+-parseInt(_0x5d37fd(0x92))/0x6*(parseInt(_0x5d37fd(0x8d))/0x7)+parseInt(_0x5d37fd(0x8e))/0x8+-parseInt(_0x5d37fd(0x86))/0x9*(-parseInt(_0x5d37fd(0x85))/0xa);if(_0x3e2470===_0x21db22)break;else _0x2e832a['push'](_0x2e832a['shift']());}catch(_0x224046){_0x2e832a['push'](_0x2e832a['shift']());}}}(a47_0x1580,0x673cb));export function asDryRunResult(_0x596656,_0x23a215){var _0x296a6a=a47_0x20e6;return Object[_0x296a6a(0x8c)](_0x596656,{'method':{'value':_0x23a215[_0x296a6a(0x8f)],'enumerable':![]},'url':{'value':_0x23a215[_0x296a6a(0x8a)],'enumerable':![]},..._0x23a215[_0x296a6a(0x91)]?{'description':{'value':_0x23a215['description'],'enumerable':![]}}:{}});}function a47_0x20e6(_0x328a4b,_0x474439){_0x328a4b=_0x328a4b-0x85;var _0x158023=a47_0x1580();var _0x20e6bf=_0x158023[_0x328a4b];return _0x20e6bf;}function a47_0x1580(){var _0x58c85f=['130kjTOCN','398961eXNdah','1156388HOwcSv','721838AruzBv','28710RTbIkS','url','3459330SIZOgP','defineProperties','4998490TcxTSY','4590336XwkExH','method','3EVdIJy','description','6gxForW'];a47_0x1580=function(){return _0x58c85f;};return a47_0x1580();}
1
+ (function(_0x21ef8d,_0x45cfed){var _0x50d17e=a46_0x2694,_0x188670=_0x21ef8d();while(!![]){try{var _0x745a27=parseInt(_0x50d17e(0x119))/0x1*(parseInt(_0x50d17e(0x121))/0x2)+parseInt(_0x50d17e(0x11f))/0x3+-parseInt(_0x50d17e(0x11b))/0x4*(-parseInt(_0x50d17e(0x11a))/0x5)+parseInt(_0x50d17e(0x115))/0x6+-parseInt(_0x50d17e(0x118))/0x7*(-parseInt(_0x50d17e(0x117))/0x8)+parseInt(_0x50d17e(0x114))/0x9+parseInt(_0x50d17e(0x11c))/0xa*(-parseInt(_0x50d17e(0x11d))/0xb);if(_0x745a27===_0x45cfed)break;else _0x188670['push'](_0x188670['shift']());}catch(_0x5cfcb6){_0x188670['push'](_0x188670['shift']());}}}(a46_0x4f5a,0xd3dd7));function a46_0x2694(_0xd43d7e,_0x1ff38e){_0xd43d7e=_0xd43d7e-0x114;var _0x4f5aec=a46_0x4f5a();var _0x2694a5=_0x4f5aec[_0xd43d7e];return _0x2694a5;}function a46_0x4f5a(){var _0x4c9341=['77rAnFKK','method','4105929TpgBep','url','52912UkuDii','11361861ceDhZn','8701038BaUYfZ','description','22496imXpXT','4011pwOARJ','38WrlDmX','25LOYwij','1073804grkSYR','10246150qhoQVT'];a46_0x4f5a=function(){return _0x4c9341;};return a46_0x4f5a();}export function asDryRunResult(_0x5a8105,_0x262964){var _0xd153c1=a46_0x2694;return Object['defineProperties'](_0x5a8105,{'method':{'value':_0x262964[_0xd153c1(0x11e)],'enumerable':![]},'url':{'value':_0x262964[_0xd153c1(0x120)],'enumerable':![]},..._0x262964[_0xd153c1(0x116)]?{'description':{'value':_0x262964[_0xd153c1(0x116)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a48_0x5987f3=a48_0x77e5;function a48_0x77e5(_0x501ffd,_0x45a881){_0x501ffd=_0x501ffd-0x96;const _0xda82ba=a48_0xda82();let _0x77e537=_0xda82ba[_0x501ffd];return _0x77e537;}(function(_0x411480,_0x342101){const _0x137337=a48_0x77e5,_0x41b28f=_0x411480();while(!![]){try{const _0x3a9300=-parseInt(_0x137337(0xa4))/0x1*(-parseInt(_0x137337(0xaa))/0x2)+-parseInt(_0x137337(0xa9))/0x3*(-parseInt(_0x137337(0x98))/0x4)+parseInt(_0x137337(0xab))/0x5*(-parseInt(_0x137337(0x9f))/0x6)+-parseInt(_0x137337(0xa7))/0x7*(parseInt(_0x137337(0xa1))/0x8)+-parseInt(_0x137337(0x9e))/0x9*(parseInt(_0x137337(0xaf))/0xa)+parseInt(_0x137337(0xa6))/0xb*(parseInt(_0x137337(0xa3))/0xc)+parseInt(_0x137337(0x96))/0xd;if(_0x3a9300===_0x342101)break;else _0x41b28f['push'](_0x41b28f['shift']());}catch(_0x2f81db){_0x41b28f['push'](_0x41b28f['shift']());}}}(a48_0xda82,0x994ab));function a48_0xda82(){const _0x5726a1=['7ThhsSL','number','2302155vqMLSV','23228VEPUMA','5JyrZIz','Dataset\x20code\x20(32-char\x20hex\x20UUID)','Database\x20product\x20type','MYSQL','1058940LcZsWv','21738587xbWfja','string','4tkHVsF','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','POSTGRESQL','App\x20code\x20(e.g.\x20app-xxxxx)','appcode','81JeWtLy','5761566ZNsoDS','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','9348824YBFexX','sqlcode','588CUjIQh','31zcoRjj','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','204325QujVOI'];a48_0xda82=function(){return _0x5726a1;};return a48_0xda82();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x5987f3(0x9a)};export const CODE_FLAG={'name':'code','type':a48_0x5987f3(0x97),'required':!![],'description':a48_0x5987f3(0xac),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a48_0x5987f3(0xac)};export const SQLCODE_FLAG={'name':a48_0x5987f3(0xa2),'type':a48_0x5987f3(0x97),'required':!![],'description':a48_0x5987f3(0xa0),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x5987f3(0x99)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x5987f3(0x9d),'type':a48_0x5987f3(0x97),'required':![],'description':a48_0x5987f3(0xa5)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x5987f3(0x9c)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x5987f3(0xa8),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':'dbtype','type':a48_0x5987f3(0x97),'required':!![],'description':a48_0x5987f3(0xad),'enum':[a48_0x5987f3(0xae),a48_0x5987f3(0x9b)]};
1
+ const a47_0x1205ba=a47_0xb97c;function a47_0x53a5(){const _0x58a08f=['40AbNSDj','700916PDSCFX','2894430xnIkrw','158164TxjSmz','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','1odViIn','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','string','App\x20code\x20(e.g.\x20app-xxxxx)','code','7142670pkNNyT','Dataset\x20code\x20(32-char\x20hex\x20UUID)','5281212HmizOh','287nemosl','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','datasetcode','236024UkGnmw','dbtype','appcode','18853320sKidIg','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','Database\x20product\x20type','number','MYSQL'];a47_0x53a5=function(){return _0x58a08f;};return a47_0x53a5();}(function(_0x5a193d,_0x517211){const _0x5eef41=a47_0xb97c,_0x12cdcf=_0x5a193d();while(!![]){try{const _0x4846f6=-parseInt(_0x5eef41(0xcd))/0x1*(-parseInt(_0x5eef41(0xc9))/0x2)+parseInt(_0x5eef41(0xca))/0x3+-parseInt(_0x5eef41(0xcb))/0x4*(-parseInt(_0x5eef41(0xc8))/0x5)+-parseInt(_0x5eef41(0xd4))/0x6+parseInt(_0x5eef41(0xd5))/0x7*(-parseInt(_0x5eef41(0xd8))/0x8)+-parseInt(_0x5eef41(0xd2))/0x9+parseInt(_0x5eef41(0xdb))/0xa;if(_0x4846f6===_0x517211)break;else _0x12cdcf['push'](_0x12cdcf['shift']());}catch(_0x1f786b){_0x12cdcf['push'](_0x12cdcf['shift']());}}}(a47_0x53a5,0x9aa81));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x1205ba(0xdc)};export const CODE_FLAG={'name':a47_0x1205ba(0xd1),'type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x1205ba(0xd7),'description':a47_0x1205ba(0xd3)};export const SQLCODE_FLAG={'name':'sqlcode','type':a47_0x1205ba(0xcf),'required':!![],'description':a47_0x1205ba(0xcc),'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':a47_0x1205ba(0xda),'type':a47_0x1205ba(0xcf),'required':![],'description':a47_0x1205ba(0xce)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x1205ba(0xd0)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a47_0xb97c(_0x268f0c,_0x174980){_0x268f0c=_0x268f0c-0xc8;const _0x53a598=a47_0x53a5();let _0xb97c2c=_0x53a598[_0x268f0c];return _0xb97c2c;}export const DBLINK_ID_FLAG={'name':'id','type':a47_0x1205ba(0xde),'required':!![],'description':a47_0x1205ba(0xd6)};export const DB_TYPE_FLAG={'name':a47_0x1205ba(0xd9),'type':a47_0x1205ba(0xcf),'required':!![],'description':a47_0x1205ba(0xdd),'enum':[a47_0x1205ba(0xdf),'POSTGRESQL']};
@@ -1 +1 @@
1
- (function(_0x60912a,_0x75a48d){const _0x59e093=a49_0x574a,_0x5b8e6d=_0x60912a();while(!![]){try{const _0x5cee30=parseInt(_0x59e093(0x177))/0x1+-parseInt(_0x59e093(0x166))/0x2*(parseInt(_0x59e093(0x173))/0x3)+-parseInt(_0x59e093(0x174))/0x4*(-parseInt(_0x59e093(0x16e))/0x5)+parseInt(_0x59e093(0x16f))/0x6+parseInt(_0x59e093(0x16a))/0x7+-parseInt(_0x59e093(0x170))/0x8*(-parseInt(_0x59e093(0x172))/0x9)+-parseInt(_0x59e093(0x171))/0xa*(parseInt(_0x59e093(0x165))/0xb);if(_0x5cee30===_0x75a48d)break;else _0x5b8e6d['push'](_0x5b8e6d['shift']());}catch(_0x32b7c1){_0x5b8e6d['push'](_0x5b8e6d['shift']());}}}(a49_0x4e31,0x894f6));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';function a49_0x574a(_0x4434e4,_0x4c25fa){_0x4434e4=_0x4434e4-0x165;const _0x4e314a=a49_0x4e31();let _0x574a7c=_0x4e314a[_0x4434e4];return _0x574a7c;}const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a49_0x4e31(){const _0xe13ad5=['58322qJVhun','559960YTBLMz','File\x20not\x20found:\x20','validation','\x20MB','1251075ANCxsp','trim','size','File\x20is\x20not\x20a\x20regular\x20file:\x20','2266095nTBJbK','2863566pMSqxU','16nGuYHf','3230FvcLRW','4505562ekhevA','6djlRDo','4YFmWbi','isFile','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','724487zetowI'];a49_0x4e31=function(){return _0xe13ad5;};return a49_0x4e31();}function formatBytes(_0x50181e){const _0x3219b0=a49_0x574a;if(_0x50181e>=BYTES_PER_MB){const _0x1c06a9=Math['ceil'](_0x50181e/BYTES_PER_MB*0x64)/0x64;return _0x1c06a9['toFixed'](0x2)+_0x3219b0(0x169);}return _0x50181e+'\x20B';}export function requireDevelopmentUploadFile(_0x2d0677,_0x2ffcdf){const _0x383ffb=a49_0x574a,_0x247cc5=_0x2d0677[_0x383ffb(0x16b)]();if(!_0x247cc5)throw CliErrors[_0x383ffb(0x168)](_0x2ffcdf+'\x20path\x20is\x20required.');if(!existsSync(_0x247cc5))throw CliErrors[_0x383ffb(0x168)](_0x383ffb(0x167)+_0x247cc5);const _0x4bd257=statSync(_0x247cc5);if(!_0x4bd257[_0x383ffb(0x175)]())throw CliErrors[_0x383ffb(0x168)](_0x383ffb(0x16d)+_0x247cc5);if(_0x4bd257[_0x383ffb(0x16c)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x383ffb(0x168)](_0x383ffb(0x176)+_0x247cc5+'\x20('+formatBytes(_0x4bd257[_0x383ffb(0x16c)])+')');return{'path':_0x247cc5,'size':_0x4bd257[_0x383ffb(0x16c)]};}
1
+ (function(_0x5090a0,_0xf213cc){const _0x5d573b=a48_0x3ca8,_0x2d8c8b=_0x5090a0();while(!![]){try{const _0x50b506=-parseInt(_0x5d573b(0x189))/0x1+parseInt(_0x5d573b(0x185))/0x2*(parseInt(_0x5d573b(0x17e))/0x3)+-parseInt(_0x5d573b(0x17f))/0x4*(parseInt(_0x5d573b(0x18f))/0x5)+-parseInt(_0x5d573b(0x187))/0x6*(parseInt(_0x5d573b(0x190))/0x7)+parseInt(_0x5d573b(0x184))/0x8+-parseInt(_0x5d573b(0x18b))/0x9+parseInt(_0x5d573b(0x183))/0xa;if(_0x50b506===_0xf213cc)break;else _0x2d8c8b['push'](_0x2d8c8b['shift']());}catch(_0x14904b){_0x2d8c8b['push'](_0x2d8c8b['shift']());}}}(a48_0x4e07,0xbfadf));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a48_0x3ca8(_0xb4dd99,_0x4c81a6){_0xb4dd99=_0xb4dd99-0x17e;const _0x4e07e7=a48_0x4e07();let _0x3ca89=_0x4e07e7[_0xb4dd99];return _0x3ca89;}function formatBytes(_0x24c14b){const _0x3f8e1c=a48_0x3ca8;if(_0x24c14b>=BYTES_PER_MB){const _0x1f9c65=Math[_0x3f8e1c(0x188)](_0x24c14b/BYTES_PER_MB*0x64)/0x64;return _0x1f9c65[_0x3f8e1c(0x181)](0x2)+_0x3f8e1c(0x182);}return _0x24c14b+'\x20B';}export function requireDevelopmentUploadFile(_0x33d53e,_0x28a854){const _0x35a17b=a48_0x3ca8,_0x514de8=_0x33d53e[_0x35a17b(0x18a)]();if(!_0x514de8)throw CliErrors[_0x35a17b(0x18c)](_0x28a854+_0x35a17b(0x18e));if(!existsSync(_0x514de8))throw CliErrors[_0x35a17b(0x18c)](_0x35a17b(0x191)+_0x514de8);const _0x13f79f=statSync(_0x514de8);if(!_0x13f79f[_0x35a17b(0x180)]())throw CliErrors[_0x35a17b(0x18c)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x514de8);if(_0x13f79f[_0x35a17b(0x186)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x35a17b(0x18c)](_0x35a17b(0x18d)+_0x514de8+'\x20('+formatBytes(_0x13f79f[_0x35a17b(0x186)])+')');return{'path':_0x514de8,'size':_0x13f79f[_0x35a17b(0x186)]};}function a48_0x4e07(){const _0x796161=['111004xVnVLm','size','3912ICjGzI','ceil','483105YpXvKc','trim','13451661APwDaL','validation','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','\x20path\x20is\x20required.','505MdyApM','16786CDHNLP','File\x20not\x20found:\x20','81jflgHV','54220eEUpQB','isFile','toFixed','\x20MB','41962270PJqkWL','4984hNMyTc'];a48_0x4e07=function(){return _0x796161;};return a48_0x4e07();}
@@ -1 +1 @@
1
- (function(_0x154bca,_0x51d894){const _0x15ef1f=a50_0xf2b5,_0x3e9a49=_0x154bca();while(!![]){try{const _0x4f8192=parseInt(_0x15ef1f(0x163))/0x1*(parseInt(_0x15ef1f(0x16a))/0x2)+parseInt(_0x15ef1f(0x15a))/0x3+parseInt(_0x15ef1f(0x166))/0x4*(parseInt(_0x15ef1f(0x15f))/0x5)+-parseInt(_0x15ef1f(0x161))/0x6+-parseInt(_0x15ef1f(0x168))/0x7*(parseInt(_0x15ef1f(0x169))/0x8)+-parseInt(_0x15ef1f(0x15b))/0x9+-parseInt(_0x15ef1f(0x15c))/0xa*(-parseInt(_0x15ef1f(0x162))/0xb);if(_0x4f8192===_0x51d894)break;else _0x3e9a49['push'](_0x3e9a49['shift']());}catch(_0x3b180a){_0x3e9a49['push'](_0x3e9a49['shift']());}}}(a50_0x5782,0xc10d2));function a50_0x5782(){const _0x5dd79b=['length','28ZWHTHj','1470176kwQezO','79914FvEdjl','2002353HxRzew','5001579ZHFEIV','999010gnDrAZ','trim','App\x20Code\x20cannot\x20exceed\x20100\x20characters','84765YuRqym','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','9388218WGzclG','110huNWyZ','19BNPalp','App\x20Code\x20cannot\x20be\x20empty','test','288LjzfOl'];a50_0x5782=function(){return _0x5dd79b;};return a50_0x5782();}function a50_0xf2b5(_0x3bb742,_0x2c380c){_0x3bb742=_0x3bb742-0x15a;const _0x57821c=a50_0x5782();let _0xf2b5b=_0x57821c[_0x3bb742];return _0xf2b5b;}export function validateAppcode(_0x521730){const _0x174b7b=a50_0xf2b5,_0x27fca3=_0x521730[_0x174b7b(0x15d)]();if(!_0x27fca3)return{'valid':![],'message':_0x174b7b(0x164)};if(_0x27fca3[_0x174b7b(0x167)]>0x64)return{'valid':![],'message':_0x174b7b(0x15e)};if(!/^[A-Za-z0-9_-]+$/[_0x174b7b(0x165)](_0x27fca3))return{'valid':![],'message':_0x174b7b(0x160)};return{'valid':!![]};}
1
+ (function(_0x304be8,_0x16fa46){const _0xfb2edd=a49_0x4793,_0x18ecba=_0x304be8();while(!![]){try{const _0x56ebbf=parseInt(_0xfb2edd(0x1c7))/0x1*(-parseInt(_0xfb2edd(0x1c2))/0x2)+-parseInt(_0xfb2edd(0x1c8))/0x3+-parseInt(_0xfb2edd(0x1bf))/0x4*(parseInt(_0xfb2edd(0x1cc))/0x5)+-parseInt(_0xfb2edd(0x1c6))/0x6*(-parseInt(_0xfb2edd(0x1c3))/0x7)+-parseInt(_0xfb2edd(0x1c9))/0x8*(-parseInt(_0xfb2edd(0x1c1))/0x9)+-parseInt(_0xfb2edd(0x1c0))/0xa*(parseInt(_0xfb2edd(0x1ca))/0xb)+-parseInt(_0xfb2edd(0x1c5))/0xc*(-parseInt(_0xfb2edd(0x1be))/0xd);if(_0x56ebbf===_0x16fa46)break;else _0x18ecba['push'](_0x18ecba['shift']());}catch(_0x4258ec){_0x18ecba['push'](_0x18ecba['shift']());}}}(a49_0x8de1,0x59f7d));function a49_0x4793(_0x1ccdaf,_0x307934){_0x1ccdaf=_0x1ccdaf-0x1be;const _0x8de1=a49_0x8de1();let _0x479326=_0x8de1[_0x1ccdaf];return _0x479326;}function a49_0x8de1(){const _0x3672f0=['7920oYNjfX','901SjIBNi','1589346WlaZUy','672264GsHmQb','1327601PnWFkU','App\x20Code\x20cannot\x20exceed\x20100\x20characters','85vTkQFX','trim','78WTxmWA','48892VnSAEJ','10owGaTF','72MJTXHw','118vVwjEm','2772fQhlbw','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','169896DgQfZj'];a49_0x8de1=function(){return _0x3672f0;};return a49_0x8de1();}export function validateAppcode(_0x847a33){const _0x471cdf=a49_0x4793,_0x7ff163=_0x847a33[_0x471cdf(0x1cd)]();if(!_0x7ff163)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x7ff163['length']>0x64)return{'valid':![],'message':_0x471cdf(0x1cb)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x7ff163))return{'valid':![],'message':_0x471cdf(0x1c4)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a51_0x369f18=a51_0x378a;function a51_0x378a(_0x50f551,_0x15d57b){_0x50f551=_0x50f551-0xa5;const _0x1c5098=a51_0x1c50();let _0x378af9=_0x1c5098[_0x50f551];return _0x378af9;}(function(_0x55960f,_0x1686d9){const _0x4b1e86=a51_0x378a,_0x33f1b2=_0x55960f();while(!![]){try{const _0x3086f4=-parseInt(_0x4b1e86(0xb3))/0x1+parseInt(_0x4b1e86(0xb5))/0x2*(parseInt(_0x4b1e86(0xb2))/0x3)+-parseInt(_0x4b1e86(0xbb))/0x4*(-parseInt(_0x4b1e86(0xb8))/0x5)+parseInt(_0x4b1e86(0xba))/0x6+-parseInt(_0x4b1e86(0xb4))/0x7*(-parseInt(_0x4b1e86(0xb9))/0x8)+-parseInt(_0x4b1e86(0xa5))/0x9*(-parseInt(_0x4b1e86(0xa7))/0xa)+-parseInt(_0x4b1e86(0xaa))/0xb*(parseInt(_0x4b1e86(0xad))/0xc);if(_0x3086f4===_0x1686d9)break;else _0x33f1b2['push'](_0x33f1b2['shift']());}catch(_0x46748c){_0x33f1b2['push'](_0x33f1b2['shift']());}}}(a51_0x1c50,0xaad58));import{CliErrors}from'../../errors.js';function a51_0x1c50(){const _0x4a1741=['string','key','6OapSRA','1227140HKMDtH','5215IamrXp','1088898dYkNBI','Missing\x20key.','Get\x20a\x20config\x20value\x20by\x20key','93230BAzRyF','11504cqXHMo','269904MQsWit','8vuFvsx','\x20config\x20get\x20--key\x20<key>','2709fbpDdG','Usage:\x20','12550qDNBuK','str','object','231121kQBWgQ','Key\x20not\x20found:\x20','app','396JsKfoY','get','appcode'];a51_0x1c50=function(){return _0x4a1741;};return a51_0x1c50();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3c9a5e){const _0x4ae367=a51_0x378a,_0x3d19b3=_0x3c9a5e[_0x4ae367(0xa8)](_0x4ae367(0xb1));if(!_0x3d19b3)throw CliErrors['validation'](_0x4ae367(0xb6),_0x4ae367(0xa6)+CLI_BIN_NAME+_0x4ae367(0xbc));const _0x5b4764=readConfig(),_0x19e98e=_0x3d19b3===_0x4ae367(0xac)?_0x4ae367(0xaf):_0x3d19b3,_0x1270c2=_0x5b4764[_0x19e98e];if(_0x1270c2===undefined)throw CliErrors['validation'](_0x4ae367(0xab)+_0x3d19b3);return{'ok':!![],'data':typeof _0x1270c2===_0x4ae367(0xa9)?_0x1270c2:{[_0x19e98e]:_0x1270c2},'message':typeof _0x1270c2===_0x4ae367(0xa9)?undefined:String(_0x1270c2)};}export const configGetDefinition={'service':'config','command':a51_0x369f18(0xae),'description':a51_0x369f18(0xb7),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x369f18(0xb1),'type':a51_0x369f18(0xb0),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a50_0xcacb52=a50_0x3d2a;(function(_0x5eda33,_0x253448){const _0x237efa=a50_0x3d2a,_0x182c05=_0x5eda33();while(!![]){try{const _0x1b7e4e=-parseInt(_0x237efa(0x184))/0x1+-parseInt(_0x237efa(0x17c))/0x2+parseInt(_0x237efa(0x17b))/0x3*(parseInt(_0x237efa(0x181))/0x4)+parseInt(_0x237efa(0x17d))/0x5+parseInt(_0x237efa(0x17e))/0x6*(-parseInt(_0x237efa(0x177))/0x7)+-parseInt(_0x237efa(0x176))/0x8+parseInt(_0x237efa(0x175))/0x9;if(_0x1b7e4e===_0x253448)break;else _0x182c05['push'](_0x182c05['shift']());}catch(_0x1aac1e){_0x182c05['push'](_0x182c05['shift']());}}}(a50_0x54bc,0x767d9));function a50_0x54bc(){const _0x592a4b=['read','967185eHIGlm','appcode','Missing\x20key.','string','Get\x20a\x20config\x20value\x20by\x20key','config','str','app','15384348tUQDgV','739224JqvixY','460453AaMPIE','key','validation','object','846GKhtrN','883724OVQqEm','2188735gSYrxv','36iIkkoj','Usage:\x20','\x20config\x20get\x20--key\x20<key>','3324DWqhry','get'];a50_0x54bc=function(){return _0x592a4b;};return a50_0x54bc();}function a50_0x3d2a(_0x425991,_0x52ddfa){_0x425991=_0x425991-0x16e;const _0x54bc55=a50_0x54bc();let _0x3d2a86=_0x54bc55[_0x425991];return _0x3d2a86;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x58caee){const _0x188688=a50_0x3d2a,_0x51c230=_0x58caee[_0x188688(0x173)](_0x188688(0x178));if(!_0x51c230)throw CliErrors[_0x188688(0x179)](_0x188688(0x16f),_0x188688(0x17f)+CLI_BIN_NAME+_0x188688(0x180));const _0x375063=readConfig(),_0x34b58c=_0x51c230===_0x188688(0x174)?_0x188688(0x16e):_0x51c230,_0x2c4f1c=_0x375063[_0x34b58c];if(_0x2c4f1c===undefined)throw CliErrors[_0x188688(0x179)]('Key\x20not\x20found:\x20'+_0x51c230);return{'ok':!![],'data':typeof _0x2c4f1c==='object'?_0x2c4f1c:{[_0x34b58c]:_0x2c4f1c},'message':typeof _0x2c4f1c===_0x188688(0x17a)?undefined:String(_0x2c4f1c)};}export const configGetDefinition={'service':a50_0xcacb52(0x172),'command':a50_0xcacb52(0x182),'description':a50_0xcacb52(0x171),'risk':a50_0xcacb52(0x183),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a50_0xcacb52(0x178),'type':a50_0xcacb52(0x170),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};