@lovrabet/rabetbase-cli 2.3.9 → 2.3.10-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/group-create.js +1 -1
  104. package/lib/commands/menu/group-update.js +1 -1
  105. package/lib/commands/menu/index.js +1 -1
  106. package/lib/commands/menu/list.js +1 -1
  107. package/lib/commands/menu/regroup-start.js +1 -1
  108. package/lib/commands/menu/shared/compare-table.js +1 -1
  109. package/lib/commands/menu/shared/delete-plan.js +1 -1
  110. package/lib/commands/menu/shared/facts.js +1 -1
  111. package/lib/commands/menu/shared/index.js +1 -1
  112. package/lib/commands/menu/shared/inquirer.js +1 -1
  113. package/lib/commands/menu/shared/local-pages.js +1 -1
  114. package/lib/commands/menu/shared/logic.js +1 -1
  115. package/lib/commands/menu/shared/mutations.js +1 -1
  116. package/lib/commands/menu/shared/service.js +1 -1
  117. package/lib/commands/menu/shared/sync-core.js +1 -1
  118. package/lib/commands/menu/shared/update-core.js +1 -1
  119. package/lib/commands/menu/shared/valid-url.js +1 -1
  120. package/lib/commands/menu/sync.js +1 -1
  121. package/lib/commands/menu/update.js +1 -1
  122. package/lib/commands/notification/config-list.js +1 -1
  123. package/lib/commands/notification/index.js +1 -1
  124. package/lib/commands/page/generate-start.js +1 -1
  125. package/lib/commands/page/generate-status.js +1 -1
  126. package/lib/commands/page/index.js +1 -1
  127. package/lib/commands/page/pull.js +1 -1
  128. package/lib/commands/page/push.js +1 -1
  129. package/lib/commands/page/relation-audit.js +1 -1
  130. package/lib/commands/page/shared.js +1 -1
  131. package/lib/commands/page/standard-page-status.js +1 -1
  132. package/lib/commands/page/sync.js +1 -1
  133. package/lib/commands/permit/index.js +1 -1
  134. package/lib/commands/permit/page-get.js +1 -1
  135. package/lib/commands/permit/page-set.js +1 -1
  136. package/lib/commands/permit/role-apis-set.js +1 -1
  137. package/lib/commands/permit/role-menus-set.js +1 -1
  138. package/lib/commands/permit/role-menus.js +1 -1
  139. package/lib/commands/permit/shared.js +1 -1
  140. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  141. package/lib/commands/project/create/format-elapsed.js +1 -1
  142. package/lib/commands/project/create/main.js +1 -1
  143. package/lib/commands/project/create/non-interactive.js +1 -1
  144. package/lib/commands/project/create/project-template-path.js +1 -1
  145. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  146. package/lib/commands/project/create/use-format-code.js +1 -1
  147. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  148. package/lib/commands/project/index.js +1 -1
  149. package/lib/commands/project/init.js +1 -1
  150. package/lib/commands/project/upgrade.js +1 -1
  151. package/lib/commands/registry.js +1 -1
  152. package/lib/commands/role/create.js +1 -1
  153. package/lib/commands/role/delete.js +1 -1
  154. package/lib/commands/role/detail.js +1 -1
  155. package/lib/commands/role/index.js +1 -1
  156. package/lib/commands/role/list.js +1 -1
  157. package/lib/commands/role/shared.js +1 -1
  158. package/lib/commands/role/update.js +1 -1
  159. package/lib/commands/role/user-add.js +1 -1
  160. package/lib/commands/role/user-remove.js +1 -1
  161. package/lib/commands/role/user-resolve.js +1 -1
  162. package/lib/commands/run/index.js +1 -1
  163. package/lib/commands/schema.js +1 -1
  164. package/lib/commands/sql/create.js +1 -1
  165. package/lib/commands/sql/delete.js +1 -1
  166. package/lib/commands/sql/detail.js +1 -1
  167. package/lib/commands/sql/exec.js +1 -1
  168. package/lib/commands/sql/index.js +1 -1
  169. package/lib/commands/sql/list.js +1 -1
  170. package/lib/commands/sql/pull.js +1 -1
  171. package/lib/commands/sql/push.js +1 -1
  172. package/lib/commands/sql/save.js +1 -1
  173. package/lib/commands/sql/shared.js +1 -1
  174. package/lib/commands/sql/status.js +1 -1
  175. package/lib/commands/sql/validate.js +1 -1
  176. package/lib/commands/task/index.js +1 -1
  177. package/lib/commands/task/status.js +1 -1
  178. package/lib/commands/workspace/add.js +1 -1
  179. package/lib/commands/workspace/index.js +1 -1
  180. package/lib/commands/workspace/remove.js +1 -1
  181. package/lib/config/schema.js +1 -1
  182. package/lib/constant/cdn.js +1 -1
  183. package/lib/constant/cli.js +1 -1
  184. package/lib/constant/defaults.js +1 -1
  185. package/lib/constant/domain.js +1 -1
  186. package/lib/constant/env.js +1 -1
  187. package/lib/constant/output.js +1 -1
  188. package/lib/constant/paths.js +1 -1
  189. package/lib/constant/risk.js +1 -1
  190. package/lib/context/app-resolver.js +1 -1
  191. package/lib/context/auth-resolver.js +1 -1
  192. package/lib/context/config-loader.js +1 -1
  193. package/lib/context.js +1 -1
  194. package/lib/core/alias-resolver.js +1 -1
  195. package/lib/core/api-client.js +1 -1
  196. package/lib/core/bff/config.js +1 -1
  197. package/lib/core/bff/file-system.js +1 -1
  198. package/lib/core/bff/hash.js +1 -1
  199. package/lib/core/bff/lock.js +1 -1
  200. package/lib/core/bff/utils.js +1 -1
  201. package/lib/core/db-resolver.js +1 -1
  202. package/lib/core/page/file-system.js +1 -1
  203. package/lib/core/page/hash.js +1 -1
  204. package/lib/core/page/lock.js +1 -1
  205. package/lib/core/sql-index-auditor.js +1 -1
  206. package/lib/core/sql-sync/config.js +1 -1
  207. package/lib/core/sql-sync/file-system.js +1 -1
  208. package/lib/core/sql-sync/hash.js +1 -1
  209. package/lib/core/sql-sync/lock.js +1 -1
  210. package/lib/core/sql-sync/utils.js +1 -1
  211. package/lib/core/sql-validator.js +1 -1
  212. package/lib/errors.js +1 -1
  213. package/lib/framework/build-all-flags.js +1 -1
  214. package/lib/framework/error-output.js +1 -1
  215. package/lib/framework/explicit-yes.js +1 -1
  216. package/lib/framework/flags.js +1 -1
  217. package/lib/framework/help.js +1 -1
  218. package/lib/framework/index.js +1 -1
  219. package/lib/framework/output.js +1 -1
  220. package/lib/framework/response.js +1 -1
  221. package/lib/framework/runner-alias.js +1 -1
  222. package/lib/framework/runner.js +1 -1
  223. package/lib/framework/schema-export.js +1 -1
  224. package/lib/framework/types.js +1 -1
  225. package/lib/generated/build-info.js +1 -1
  226. package/lib/help.js +1 -1
  227. package/lib/skills/main.js +1 -1
  228. package/lib/skills/npx-skills-add.js +1 -1
  229. package/lib/telemetry/cli-command-trace.js +1 -1
  230. package/lib/telemetry/cli-help-trace.js +1 -1
  231. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  232. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  233. package/lib/telemetry/send-cli-trace-log.js +1 -1
  234. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  235. package/lib/utils/ai_config.js +1 -1
  236. package/lib/utils/apply-jq-filter.js +1 -1
  237. package/lib/utils/cdn-config.js +1 -1
  238. package/lib/utils/check-sdk-version.js +1 -1
  239. package/lib/utils/cli-version-check.js +1 -1
  240. package/lib/utils/cli-version-policy.js +1 -1
  241. package/lib/utils/config.js +1 -1
  242. package/lib/utils/copy-directory.js +1 -1
  243. package/lib/utils/entity-with-id.js +1 -1
  244. package/lib/utils/file-utils.js +1 -1
  245. package/lib/utils/guides-cdn.js +1 -1
  246. package/lib/utils/http-client.js +1 -1
  247. package/lib/utils/is-non-interactive.js +1 -1
  248. package/lib/utils/logger.js +1 -1
  249. package/lib/utils/params.js +1 -1
  250. package/lib/utils/platform.js +1 -1
  251. package/lib/utils/rules-cdn.js +1 -1
  252. package/lib/utils/sleep.js +1 -1
  253. package/lib/utils/template-replacer.js +1 -1
  254. package/lib/utils/update-notice.js +1 -1
  255. package/lib/utils/version.js +1 -1
  256. package/lib/utils/with-active-cookie.js +1 -1
  257. package/lib/utils/write-cli-side-channel.js +1 -1
  258. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x2f8a22=a36_0x2c9d;(function(_0x3be23e,_0x36418d){const _0x2d6adf=a36_0x2c9d,_0x5a2ace=_0x3be23e();while(!![]){try{const _0x5e8674=-parseInt(_0x2d6adf(0x18f))/0x1*(-parseInt(_0x2d6adf(0x1b4))/0x2)+parseInt(_0x2d6adf(0x1c9))/0x3+parseInt(_0x2d6adf(0x1cf))/0x4+parseInt(_0x2d6adf(0x1ac))/0x5*(-parseInt(_0x2d6adf(0x195))/0x6)+parseInt(_0x2d6adf(0x1b1))/0x7+parseInt(_0x2d6adf(0x1a9))/0x8*(-parseInt(_0x2d6adf(0x1d1))/0x9)+parseInt(_0x2d6adf(0x1d2))/0xa*(-parseInt(_0x2d6adf(0x19b))/0xb);if(_0x5e8674===_0x36418d)break;else _0x5a2ace['push'](_0x5a2ace['shift']());}catch(_0x3f1941){_0x5a2ace['push'](_0x5a2ace['shift']());}}}(a36_0x58e5,0xa5883));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';function a36_0x58e5(){const _0x4d5d48=['\x20failed','operationType','validation','cancelled','6454126iXxNhX','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','scriptsRoot','627282HYIoID','unresolvable\x20target\x20path','version','COMMON','stringify','stderr','Pull\x20only\x20this\x20script\x20type','Lock\x20scope\x20for\x20app\x20\x22','datasetCode','ENDPOINT','parse','apiDir','push','utf8','functionName','toISOString','functionNode','hookLocation','length','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','appCode','1948050NDfAAF','\x20remote\x20BFF\x20script(s)\x20for\x20pull','\x20skipped,\x20','HOOK','&type=','map','4247972vARlpV','conflict','1242333TYGQYW','2280vesxLX','lockKey','would_pull','bff','alias','write','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','filePath','lastSync','1CgqdCf','str','Pull\x20complete:\x20','type','force','boolean','12ZHmhgW','\x22\x20not\x20found\x20after\x20ensureLockScope.','lockFilePath','scriptContent','pull','scriptType','40381MmfYzc','message','hash','toLowerCase','Force\x20overwrite\x20local\x20unsynced\x20changes','No\x20remote\x20BFF\x20scripts\x20found.','GET','string','stdin','all','functions','yes','apps','trim','8vdTwKj','close','nonInteractive','3234895Etuxnq'];a36_0x58e5=function(){return _0x4d5d48;};return a36_0x58e5();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x2f8a22(0x189),'command':a36_0x2f8a22(0x199),'description':a36_0x2f8a22(0x1b2),'risk':a36_0x2f8a22(0x18b),'flags':[{'name':a36_0x2f8a22(0x192),'type':a36_0x2f8a22(0x1a2),'description':a36_0x2f8a22(0x1ba),'enum':[a36_0x2f8a22(0x1b7),a36_0x2f8a22(0x1bd),a36_0x2f8a22(0x1cc)]},{'name':a36_0x2f8a22(0x193),'type':a36_0x2f8a22(0x194),'description':a36_0x2f8a22(0x19f)}],async 'dryRun'(_0x15f23e){const _0x3a704a=a36_0x2f8a22,_0x2502a7=loadBffProjectConfig(_0x15f23e['appCode']),_0x2df5d7=await readBffLockFile(_0x2502a7['lockFilePath']),{appLock:_0x382203}=ensureLockScope(_0x2df5d7??createEmptyBffLock(),_0x15f23e['appCode'],_0x2502a7[_0x3a704a(0x1b3)],_0x3a704a(0x199)),_0x2fe7c2=normalizeBffType(_0x15f23e[_0x3a704a(0x190)](_0x3a704a(0x192)))??undefined,_0x357814=buildDatasetCodeToAliasMap(_0x15f23e['apiDir'],_0x15f23e[_0x3a704a(0x1c8)]),[_0xa1b24b,_0x148745]=await Promise[_0x3a704a(0x1a4)]([listBffScripts(_0x15f23e['appCode'],_0x2fe7c2),getBffScriptStatistics(_0x15f23e[_0x3a704a(0x1c8)])]),_0x462ca9=createHookLocationMap(_0x148745),_0x136edd=[];for(const _0x1e0460 of _0xa1b24b){const _0x349f67=resolveRemoteScriptTarget(_0x2502a7,_0x1e0460,_0x462ca9,_0x382203['functions'],_0x357814);if(!_0x349f67){_0x136edd[_0x3a704a(0x1c0)]({'scriptType':_0x1e0460['scriptType'],'functionName':_0x1e0460[_0x3a704a(0x1c2)]??'','status':'skipped','reason':_0x3a704a(0x1b5)});continue;}const _0x73fac=_0x382203[_0x3a704a(0x1a5)][_0x349f67['lockKey']],_0xb646bd=_0x1e0460['scriptContent']!=null?computeContentHash(_0x1e0460[_0x3a704a(0x198)]):undefined,_0x21f014=await hasUnsyncedLocalChanges(_0x349f67[_0x3a704a(0x18d)],_0x73fac,_0xb646bd);_0x136edd['push']({'lockKey':_0x349f67[_0x3a704a(0x1d3)],'filePath':_0x349f67[_0x3a704a(0x18d)],'remoteId':_0x1e0460['id']??null,'status':_0x21f014?_0x3a704a(0x1d0):_0x3a704a(0x188)});}return{'method':_0x3a704a(0x1a1),'url':'/api/management/library/scripts/list?appCode='+_0x15f23e['appCode']+(_0x2fe7c2?_0x3a704a(0x1cd)+_0x2fe7c2:''),'body':{'appCode':_0x15f23e[_0x3a704a(0x1c8)],'filterType':_0x2fe7c2??null,'files':_0x136edd},'description':'Would\x20inspect\x20'+_0x136edd[_0x3a704a(0x1c6)]+_0x3a704a(0x1ca)};},async 'execute'(_0xf383aa){const _0x565cd5=a36_0x2f8a22,_0x30a170=loadBffProjectConfig(_0xf383aa['appCode']),_0x31235b=await readBffLockFile(_0x30a170[_0x565cd5(0x197)]),{lockData:_0x320c54,appLock:_0x96c292}=ensureLockScope(_0x31235b??createEmptyBffLock(),_0xf383aa[_0x565cd5(0x1c8)],_0x30a170[_0x565cd5(0x1b3)],_0x565cd5(0x199)),_0x589d7e=normalizeBffType(_0xf383aa['str'](_0x565cd5(0x192)))??undefined;if(_0xf383aa[_0x565cd5(0x190)](_0x565cd5(0x192))&&!_0x589d7e)throw CliErrors[_0x565cd5(0x1af)](_0x565cd5(0x18c));const [_0x588d1e,_0x50d7d6]=await Promise[_0x565cd5(0x1a4)]([listBffScripts(_0xf383aa['appCode'],_0x589d7e),getBffScriptStatistics(_0xf383aa['appCode'])]);if(_0x588d1e[_0x565cd5(0x1c6)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x565cd5(0x1a0)};const _0x470ffd=_0xf383aa['bool']('force');if(_0x470ffd&&!_0xf383aa[_0x565cd5(0x1ab)]){const _0xdf4f5b=await confirmForce();if(!_0xdf4f5b)throw CliErrors[_0x565cd5(0x1b0)]('Force\x20pull\x20cancelled.');}if(_0x470ffd&&_0xf383aa[_0x565cd5(0x1ab)]){}const _0x4d04a5=buildDatasetCodeToAliasMap(_0xf383aa[_0x565cd5(0x1bf)],_0xf383aa['appCode']),_0x5ec932=createHookLocationMap(_0x50d7d6),_0x567306=JSON[_0x565cd5(0x1be)](JSON[_0x565cd5(0x1b8)](_0x320c54)),_0x3724b0=_0xf383aa[_0x565cd5(0x1c8)],_0x23d3d3=_0x567306[_0x565cd5(0x1a7)][_0x3724b0];if(!_0x23d3d3)throw new Error(_0x565cd5(0x1bb)+_0x3724b0+_0x565cd5(0x196));const _0x30b619=[],_0x31b943=[],_0x2bd26f=[];for(const _0x5d0411 of _0x588d1e){const _0x103a90=resolveRemoteScriptTarget(_0x30a170,_0x5d0411,_0x5ec932,_0x96c292['functions'],_0x4d04a5);if(!_0x103a90){_0x31b943[_0x565cd5(0x1c0)]({'lockKey':_0x5d0411[_0x565cd5(0x19a)]+'/'+_0x5d0411[_0x565cd5(0x1c2)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x594523=_0x96c292[_0x565cd5(0x1a5)][_0x103a90[_0x565cd5(0x1d3)]];try{if(!_0x5d0411['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x5d0411[_0x565cd5(0x198)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x2a8881=_0x5d0411[_0x565cd5(0x198)],_0x122e2e=computeContentHash(_0x2a8881);if(!_0x470ffd){const _0x584e95=await hasUnsyncedLocalChanges(_0x103a90[_0x565cd5(0x18d)],_0x594523,_0x122e2e);if(_0x584e95){_0x31b943['push']({'lockKey':_0x103a90['lockKey'],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x103a90[_0x565cd5(0x18d)]),await writeFile(_0x103a90[_0x565cd5(0x18d)],_0x2a8881,_0x565cd5(0x1c1));const _0x524b5e={'hash':_0x122e2e,'remoteId':_0x5d0411['id'],'version':_0x5d0411[_0x565cd5(0x1b6)]};_0x103a90[_0x565cd5(0x192)]==='HOOK'&&_0x103a90[_0x565cd5(0x1c5)]&&(_0x524b5e['alias']=_0x103a90[_0x565cd5(0x1c5)][_0x565cd5(0x18a)],_0x524b5e['datasetCode']=_0x103a90[_0x565cd5(0x1c5)][_0x565cd5(0x1bc)],_0x524b5e[_0x565cd5(0x1ae)]=_0x103a90[_0x565cd5(0x1c5)]['operationType'],_0x524b5e[_0x565cd5(0x1c4)]=_0x103a90[_0x565cd5(0x1c5)][_0x565cd5(0x1c4)]),_0x23d3d3[_0x565cd5(0x1a5)][_0x103a90['lockKey']]=_0x524b5e,_0x30b619['push']({'lockKey':_0x103a90[_0x565cd5(0x1d3)],'remoteId':_0x5d0411['id']});}catch(_0x40ac5d){_0x2bd26f[_0x565cd5(0x1c0)]({'lockKey':_0x103a90[_0x565cd5(0x1d3)],'error':_0x40ac5d instanceof Error?_0x40ac5d[_0x565cd5(0x19c)]:String(_0x40ac5d)});}}return _0x23d3d3[_0x565cd5(0x18e)]=new Date()[_0x565cd5(0x1c3)](),await writeBffLockFile(_0x30a170[_0x565cd5(0x197)],_0x567306),{'ok':_0x2bd26f[_0x565cd5(0x1c6)]===0x0,'data':{'pulled':_0x30b619,'skipped':_0x31b943,'failed':_0x2bd26f},'message':_0x565cd5(0x191)+_0x30b619['length']+'\x20pulled,\x20'+_0x31b943[_0x565cd5(0x1c6)]+_0x565cd5(0x1cb)+_0x2bd26f[_0x565cd5(0x1c6)]+_0x565cd5(0x1ad)};}};async function hasUnsyncedLocalChanges(_0x424b26,_0x41cded,_0x4474ef){const _0x16ca38=a36_0x2f8a22;if(!await fileExists(_0x424b26))return![];const _0x3114b1=await computeFileHash(_0x424b26);if(!_0x41cded)return _0x4474ef?_0x3114b1!==_0x4474ef:!![];return _0x3114b1!==_0x41cded[_0x16ca38(0x19d)];}function a36_0x2c9d(_0x287cda,_0x52b439){_0x287cda=_0x287cda-0x188;const _0x58e5a6=a36_0x58e5();let _0x2c9d5a=_0x58e5a6[_0x287cda];return _0x2c9d5a;}function buildDatasetCodeToAliasMap(_0x2958f3,_0x5b3dd4){const _0x4973f2=a36_0x2f8a22,_0x270ddd=loadAliasMap(_0x2958f3,undefined,resolveApiFilePath(_0x2958f3,_0x5b3dd4));return new Map(_0x270ddd[_0x4973f2(0x1ce)](_0x118297=>[_0x118297[_0x4973f2(0x1bc)],_0x118297[_0x4973f2(0x18a)]]));}async function confirmForce(){const _0x5c8f6d=a36_0x2f8a22,_0x5c062d=createInterface({'input':process[_0x5c8f6d(0x1a3)],'output':process[_0x5c8f6d(0x1b9)]}),_0x1dfe46=await new Promise(_0x143569=>{const _0xb1daa8=_0x5c8f6d;_0x5c062d['question'](_0xb1daa8(0x1c7),_0x143569);});return _0x5c062d[_0x5c8f6d(0x1aa)](),['y',_0x5c8f6d(0x1a6)]['includes'](_0x1dfe46[_0x5c8f6d(0x1a8)]()[_0x5c8f6d(0x19e)]());}
1
+ function a36_0x29d7(_0x3df891,_0x4e3e12){_0x3df891=_0x3df891-0x18a;const _0x57190f=a36_0x5719();let _0x29d761=_0x57190f[_0x3df891];return _0x29d761;}const a36_0x39fde2=a36_0x29d7;(function(_0x4e8bd8,_0xf5ca66){const _0x12188f=a36_0x29d7,_0x375890=_0x4e8bd8();while(!![]){try{const _0x237e1f=-parseInt(_0x12188f(0x18e))/0x1*(-parseInt(_0x12188f(0x1be))/0x2)+-parseInt(_0x12188f(0x1b3))/0x3*(parseInt(_0x12188f(0x194))/0x4)+parseInt(_0x12188f(0x1b4))/0x5*(-parseInt(_0x12188f(0x1c2))/0x6)+parseInt(_0x12188f(0x18c))/0x7+parseInt(_0x12188f(0x1c7))/0x8*(parseInt(_0x12188f(0x1aa))/0x9)+parseInt(_0x12188f(0x1a8))/0xa*(parseInt(_0x12188f(0x19a))/0xb)+-parseInt(_0x12188f(0x1ab))/0xc*(-parseInt(_0x12188f(0x191))/0xd);if(_0x237e1f===_0xf5ca66)break;else _0x375890['push'](_0x375890['shift']());}catch(_0x3793b8){_0x375890['push'](_0x375890['shift']());}}}(a36_0x5719,0x7fb71));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':'pull','description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':a36_0x39fde2(0x18b),'flags':[{'name':a36_0x39fde2(0x19e),'type':'string','description':a36_0x39fde2(0x1ca),'enum':[a36_0x39fde2(0x1c9),'ENDPOINT','HOOK']},{'name':'force','type':a36_0x39fde2(0x199),'description':a36_0x39fde2(0x1bc)}],async 'dryRun'(_0xf6ec96){const _0x5c348a=a36_0x39fde2,_0x3c5ebe=loadBffProjectConfig(_0xf6ec96[_0x5c348a(0x1ac)]),_0x46da83=await readBffLockFile(_0x3c5ebe[_0x5c348a(0x1cd)]),{appLock:_0x544399}=ensureLockScope(_0x46da83??createEmptyBffLock(),_0xf6ec96[_0x5c348a(0x1ac)],_0x3c5ebe[_0x5c348a(0x1c1)],_0x5c348a(0x192)),_0x147edf=normalizeBffType(_0xf6ec96[_0x5c348a(0x1a1)](_0x5c348a(0x19e)))??undefined,_0xbe9ab4=buildDatasetCodeToAliasMap(_0xf6ec96[_0x5c348a(0x1b2)],_0xf6ec96['appCode']),[_0x1b93a2,_0x58c922]=await Promise[_0x5c348a(0x197)]([listBffScripts(_0xf6ec96['appCode'],_0x147edf),getBffScriptStatistics(_0xf6ec96[_0x5c348a(0x1ac)])]),_0xae0963=createHookLocationMap(_0x58c922),_0x1c19ee=[];for(const _0x40d786 of _0x1b93a2){const _0x1b2cc8=resolveRemoteScriptTarget(_0x3c5ebe,_0x40d786,_0xae0963,_0x544399[_0x5c348a(0x196)],_0xbe9ab4);if(!_0x1b2cc8){_0x1c19ee[_0x5c348a(0x1ce)]({'scriptType':_0x40d786['scriptType'],'functionName':_0x40d786['functionName']??'','status':_0x5c348a(0x1b6),'reason':'unresolvable\x20target\x20path'});continue;}const _0x368b8e=_0x544399[_0x5c348a(0x196)][_0x1b2cc8[_0x5c348a(0x1b0)]],_0x5366af=_0x40d786[_0x5c348a(0x1a6)]!=null?computeContentHash(_0x40d786[_0x5c348a(0x1a6)]):undefined,_0xc36009=await hasUnsyncedLocalChanges(_0x1b2cc8[_0x5c348a(0x1b8)],_0x368b8e,_0x5366af);_0x1c19ee[_0x5c348a(0x1ce)]({'lockKey':_0x1b2cc8['lockKey'],'filePath':_0x1b2cc8[_0x5c348a(0x1b8)],'remoteId':_0x40d786['id']??null,'status':_0xc36009?_0x5c348a(0x19f):_0x5c348a(0x1ba)});}return{'method':'GET','url':_0x5c348a(0x1a7)+_0xf6ec96['appCode']+(_0x147edf?'&type='+_0x147edf:''),'body':{'appCode':_0xf6ec96[_0x5c348a(0x1ac)],'filterType':_0x147edf??null,'files':_0x1c19ee},'description':_0x5c348a(0x190)+_0x1c19ee[_0x5c348a(0x1a9)]+_0x5c348a(0x195)};},async 'execute'(_0xf3b15d){const _0x35e2e0=a36_0x39fde2,_0x71cb6f=loadBffProjectConfig(_0xf3b15d[_0x35e2e0(0x1ac)]),_0x1a2836=await readBffLockFile(_0x71cb6f['lockFilePath']),{lockData:_0x5e7e1d,appLock:_0x47d33f}=ensureLockScope(_0x1a2836??createEmptyBffLock(),_0xf3b15d[_0x35e2e0(0x1ac)],_0x71cb6f['scriptsRoot'],_0x35e2e0(0x192)),_0x54b8f8=normalizeBffType(_0xf3b15d[_0x35e2e0(0x1a1)](_0x35e2e0(0x19e)))??undefined;if(_0xf3b15d[_0x35e2e0(0x1a1)]('type')&&!_0x54b8f8)throw CliErrors[_0x35e2e0(0x1b1)](_0x35e2e0(0x1a2));const [_0x46e598,_0x983a2]=await Promise[_0x35e2e0(0x197)]([listBffScripts(_0xf3b15d[_0x35e2e0(0x1ac)],_0x54b8f8),getBffScriptStatistics(_0xf3b15d['appCode'])]);if(_0x46e598[_0x35e2e0(0x1a9)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0xc3550c=_0xf3b15d['bool']('force');if(_0xc3550c&&!_0xf3b15d[_0x35e2e0(0x1bf)]){const _0x26a157=await confirmForce();if(!_0x26a157)throw CliErrors[_0x35e2e0(0x1c0)](_0x35e2e0(0x1cc));}if(_0xc3550c&&_0xf3b15d['nonInteractive']){}const _0x4f95fe=buildDatasetCodeToAliasMap(_0xf3b15d[_0x35e2e0(0x1b2)],_0xf3b15d['appCode']),_0x59cc92=createHookLocationMap(_0x983a2),_0xdf2ba7=JSON[_0x35e2e0(0x1a3)](JSON['stringify'](_0x5e7e1d)),_0x12b75a=_0xf3b15d[_0x35e2e0(0x1ac)],_0x41f0fe=_0xdf2ba7[_0x35e2e0(0x1a4)][_0x12b75a];if(!_0x41f0fe)throw new Error(_0x35e2e0(0x1b5)+_0x12b75a+_0x35e2e0(0x1af));const _0x8f7d27=[],_0x5b93ad=[],_0xc08fb=[];for(const _0x468c71 of _0x46e598){const _0x4c9210=resolveRemoteScriptTarget(_0x71cb6f,_0x468c71,_0x59cc92,_0x47d33f[_0x35e2e0(0x196)],_0x4f95fe);if(!_0x4c9210){_0x5b93ad[_0x35e2e0(0x1ce)]({'lockKey':_0x468c71[_0x35e2e0(0x1bd)]+'/'+_0x468c71[_0x35e2e0(0x198)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x2f4f08=_0x47d33f[_0x35e2e0(0x196)][_0x4c9210[_0x35e2e0(0x1b0)]];try{if(!_0x468c71['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x468c71[_0x35e2e0(0x1a6)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x1d8496=_0x468c71[_0x35e2e0(0x1a6)],_0x3f3132=computeContentHash(_0x1d8496);if(!_0xc3550c){const _0x5544d0=await hasUnsyncedLocalChanges(_0x4c9210[_0x35e2e0(0x1b8)],_0x2f4f08,_0x3f3132);if(_0x5544d0){_0x5b93ad[_0x35e2e0(0x1ce)]({'lockKey':_0x4c9210[_0x35e2e0(0x1b0)],'reason':_0x35e2e0(0x1cf)});continue;}}await ensureParentDirectory(_0x4c9210['filePath']),await writeFile(_0x4c9210[_0x35e2e0(0x1b8)],_0x1d8496,_0x35e2e0(0x1cb));const _0x40c7d1={'hash':_0x3f3132,'remoteId':_0x468c71['id'],'version':_0x468c71[_0x35e2e0(0x1c3)]};_0x4c9210['type']===_0x35e2e0(0x18d)&&_0x4c9210[_0x35e2e0(0x19b)]&&(_0x40c7d1[_0x35e2e0(0x1c4)]=_0x4c9210['hookLocation'][_0x35e2e0(0x1c4)],_0x40c7d1[_0x35e2e0(0x193)]=_0x4c9210[_0x35e2e0(0x19b)][_0x35e2e0(0x193)],_0x40c7d1[_0x35e2e0(0x1ae)]=_0x4c9210['hookLocation'][_0x35e2e0(0x1ae)],_0x40c7d1['functionNode']=_0x4c9210[_0x35e2e0(0x19b)]['functionNode']),_0x41f0fe[_0x35e2e0(0x196)][_0x4c9210[_0x35e2e0(0x1b0)]]=_0x40c7d1,_0x8f7d27[_0x35e2e0(0x1ce)]({'lockKey':_0x4c9210[_0x35e2e0(0x1b0)],'remoteId':_0x468c71['id']});}catch(_0x3f6710){_0xc08fb[_0x35e2e0(0x1ce)]({'lockKey':_0x4c9210['lockKey'],'error':_0x3f6710 instanceof Error?_0x3f6710[_0x35e2e0(0x1ad)]:String(_0x3f6710)});}}return _0x41f0fe[_0x35e2e0(0x1c5)]=new Date()[_0x35e2e0(0x18f)](),await writeBffLockFile(_0x71cb6f[_0x35e2e0(0x1cd)],_0xdf2ba7),{'ok':_0xc08fb['length']===0x0,'data':{'pulled':_0x8f7d27,'skipped':_0x5b93ad,'failed':_0xc08fb},'message':_0x35e2e0(0x1a5)+_0x8f7d27['length']+'\x20pulled,\x20'+_0x5b93ad[_0x35e2e0(0x1a9)]+_0x35e2e0(0x1c6)+_0xc08fb[_0x35e2e0(0x1a9)]+_0x35e2e0(0x1c8)};}};async function hasUnsyncedLocalChanges(_0x4b2c6d,_0x4914e1,_0x2dc270){if(!await fileExists(_0x4b2c6d))return![];const _0x492c82=await computeFileHash(_0x4b2c6d);if(!_0x4914e1)return _0x2dc270?_0x492c82!==_0x2dc270:!![];return _0x492c82!==_0x4914e1['hash'];}function buildDatasetCodeToAliasMap(_0x188d76,_0x374459){const _0x34cd20=a36_0x39fde2,_0x18dec6=loadAliasMap(_0x188d76,undefined,resolveApiFilePath(_0x188d76,_0x374459));return new Map(_0x18dec6[_0x34cd20(0x1b7)](_0x48644b=>[_0x48644b[_0x34cd20(0x193)],_0x48644b[_0x34cd20(0x1c4)]]));}async function confirmForce(){const _0x252e8f=a36_0x39fde2,_0x591795=createInterface({'input':process['stdin'],'output':process['stderr']}),_0x31b430=await new Promise(_0x4a9166=>{const _0x1b73af=a36_0x29d7;_0x591795['question'](_0x1b73af(0x1b9),_0x4a9166);});return _0x591795[_0x252e8f(0x1bb)](),['y',_0x252e8f(0x1a0)][_0x252e8f(0x18a)](_0x31b430[_0x252e8f(0x19d)]()[_0x252e8f(0x19c)]());}function a36_0x5719(){const _0x5a72a0=['\x20skipped,\x20','16veJWXh','\x20failed','COMMON','Pull\x20only\x20this\x20script\x20type','utf8','Force\x20pull\x20cancelled.','lockFilePath','push','local\x20unsynced\x20changes','includes','write','2354590NXjQYg','HOOK','4037KsgZIv','toISOString','Would\x20inspect\x20','26HcblqT','pull','datasetCode','8048SRuOzS','\x20remote\x20BFF\x20script(s)\x20for\x20pull','functions','all','functionName','boolean','66phmqfU','hookLocation','toLowerCase','trim','type','conflict','yes','str','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','parse','apps','Pull\x20complete:\x20','scriptContent','/api/management/library/scripts/list?appCode=','1593370msxAVa','length','692532xzypAx','638160ZrZHdr','appCode','message','operationType','\x22\x20not\x20found\x20after\x20ensureLockScope.','lockKey','validation','apiDir','1503AsVHOx','3035tTwYAa','Lock\x20scope\x20for\x20app\x20\x22','skipped','map','filePath','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','would_pull','close','Force\x20overwrite\x20local\x20unsynced\x20changes','scriptType','14AeLRcV','nonInteractive','cancelled','scriptsRoot','492ETmQZg','version','alias','lastSync'];a36_0x5719=function(){return _0x5a72a0;};return a36_0x5719();}
@@ -1 +1 @@
1
- const a37_0x45ec40=a37_0x550a;(function(_0x2d668e,_0x1e9709){const _0xebb168=a37_0x550a,_0x8e87c1=_0x2d668e();while(!![]){try{const _0x54c75a=parseInt(_0xebb168(0x190))/0x1*(parseInt(_0xebb168(0x1a4))/0x2)+parseInt(_0xebb168(0x184))/0x3*(parseInt(_0xebb168(0x1aa))/0x4)+-parseInt(_0xebb168(0x1cc))/0x5*(parseInt(_0xebb168(0x1ce))/0x6)+parseInt(_0xebb168(0x1b1))/0x7*(parseInt(_0xebb168(0x1bf))/0x8)+parseInt(_0xebb168(0x186))/0x9*(-parseInt(_0xebb168(0x187))/0xa)+-parseInt(_0xebb168(0x1ca))/0xb+-parseInt(_0xebb168(0x1be))/0xc*(parseInt(_0xebb168(0x192))/0xd);if(_0x54c75a===_0x1e9709)break;else _0x8e87c1['push'](_0x8e87c1['shift']());}catch(_0x5202d9){_0x8e87c1['push'](_0x8e87c1['shift']());}}}(a37_0x59f3,0x831c2));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';function a37_0x59f3(){const _0x24c23c=['create','bool','high-risk-write','3275908xVsjAh','Push\x20local\x20BFF\x20scripts\x20to\x20remote','Local\x20function\x20not\x20found:\x20','runtime\x20cache\x20cleared','alias','\x20skipped,\x20','Runtime\x20script\x20cache\x20cleared.','301rVAzbW','datasetId','\x22.\x20','str','functionNode','lastSync','name','scriptsRoot','lockKey','lockFilePath','values','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','status','1607196TwzuJr','165712cVokoR','version','Push\x20complete:\x20','set','Would\x20inspect\x20','length','ENDPOINT','force','HOOK','datasetCode','aliasToDatasetCode','3676970omZfmd','join','2509690bPymRR','hash','12PhVWMS','cleared','apiDir','map','update','would_push','stringify','description','apps','code','some','functions','3ulFDQh','push','10917oRdvkU','1040zyGfMc','unchanged','remoteId','POST','has','get','script','/api/management/library/scripts/save','\x20uploaded,\x20','425578yFfdPx','datasetCodeToDataset','13vTVsio','filePath','operationType','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','Run\x20`','utf8','\x20failed,\x20','validation','runtime\x20cache\x20not\x20needed','\x22\x20not\x20found\x20after\x20ensureLockScope.','attempted','toISOString','every','type','appCode','message','parse','filter','2NffxZl','COMMON','string'];a37_0x59f3=function(){return _0x24c23c;};return a37_0x59f3();}import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a37_0x45ec40(0x185),'description':a37_0x45ec40(0x1ab),'risk':a37_0x45ec40(0x1a9),'flags':[{'name':'type','type':a37_0x45ec40(0x1a6),'description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0x45ec40(0x1a5),a37_0x45ec40(0x1c5),a37_0x45ec40(0x1c7)]},{'name':a37_0x45ec40(0x1b7),'type':a37_0x45ec40(0x1a6),'description':a37_0x45ec40(0x195)},{'name':a37_0x45ec40(0x1c6),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x1f64a6){const _0xd9ab90=a37_0x45ec40,_0x3ccb8c=loadBffProjectConfig(_0x1f64a6[_0xd9ab90(0x1a0)]),_0x29c5bc=await readBffLockFile(_0x3ccb8c[_0xd9ab90(0x1ba)]),{appLock:_0x954a42}=ensureLockScope(_0x29c5bc??createEmptyBffLock(),_0x1f64a6[_0xd9ab90(0x1a0)],_0x3ccb8c['scriptsRoot'],_0xd9ab90(0x185)),_0x53a47=await getTargetFunctions(_0x3ccb8c,_0x1f64a6),_0x41f694=_0x1f64a6['bool'](_0xd9ab90(0x1c6)),_0x57030f=[];for(const _0x439824 of _0x53a47){const _0x18007e=await computeFileHash(_0x439824[_0xd9ab90(0x193)]),_0x2f97d2=_0x954a42[_0xd9ab90(0x183)][_0x439824['lockKey']],_0x2db0ee=!!_0x2f97d2&&_0x2f97d2[_0xd9ab90(0x1cd)]===_0x18007e;_0x57030f[_0xd9ab90(0x185)]({'lockKey':_0x439824[_0xd9ab90(0x1b9)],'filePath':_0x439824[_0xd9ab90(0x193)],'remoteId':_0x2f97d2?.[_0xd9ab90(0x189)]??null,'mode':_0x2f97d2?.[_0xd9ab90(0x189)]?_0xd9ab90(0x17c):_0xd9ab90(0x1a7),'status':!_0x41f694&&_0x2db0ee?_0xd9ab90(0x188):'would_push'});}return{'method':_0xd9ab90(0x18a),'url':_0xd9ab90(0x18e),'body':{'appCode':_0x1f64a6['appCode'],'force':_0x41f694,'files':_0x57030f,'cacheClearAtRuntime':_0x57030f[_0xd9ab90(0x182)](_0x1b7cc4=>_0x1b7cc4['status']===_0xd9ab90(0x17d)),'cacheClearAtRuntimeTimes':_0x57030f[_0xd9ab90(0x182)](_0x43a751=>_0x43a751[_0xd9ab90(0x1bd)]===_0xd9ab90(0x17d))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0xd9ab90(0x1c3)+_0x57030f['length']+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x28e655){const _0x11f991=a37_0x45ec40,_0x3d1352=loadBffProjectConfig(_0x28e655[_0x11f991(0x1a0)]),_0x54275b=await readBffLockFile(_0x3d1352['lockFilePath']),{lockData:_0x49cd8c,appLock:_0x96b2d3}=ensureLockScope(_0x54275b??createEmptyBffLock(),_0x28e655[_0x11f991(0x1a0)],_0x3d1352[_0x11f991(0x1b8)],_0x11f991(0x185)),_0x3623b3=await getTargetFunctions(_0x3d1352,_0x28e655);if(_0x3623b3['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x3cc7c1=_0x28e655[_0x11f991(0x1a8)](_0x11f991(0x1c6)),_0x53095c=JSON[_0x11f991(0x1a2)](JSON[_0x11f991(0x17e)](_0x49cd8c)),_0x48247c=_0x53095c[_0x11f991(0x180)][_0x28e655[_0x11f991(0x1a0)]];if(!_0x48247c)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x28e655[_0x11f991(0x1a0)]+_0x11f991(0x19b));const _0xc1e9c=await buildHookMaps(_0x28e655[_0x11f991(0x1a0)],_0x28e655[_0x11f991(0x17a)],_0x3623b3,_0x48247c),_0x545870=[],_0x3f50c1=[],_0x5247aa=[];for(const _0x72271 of _0x3623b3){const _0x2827a4=await computeFileHash(_0x72271['filePath']),_0x1987d6=_0x48247c[_0x11f991(0x183)][_0x72271['lockKey']];if(!_0x3cc7c1&&_0x1987d6&&_0x1987d6[_0x11f991(0x1cd)]===_0x2827a4){_0x3f50c1['push']({'lockKey':_0x72271['lockKey'],'reason':_0x11f991(0x188)});continue;}try{await uploadSingleFunction(_0x28e655[_0x11f991(0x1a0)],_0x72271,_0x48247c,_0xc1e9c);const _0x15cbc0=_0x48247c[_0x11f991(0x183)][_0x72271[_0x11f991(0x1b9)]];_0x545870[_0x11f991(0x185)]({'lockKey':_0x72271[_0x11f991(0x1b9)],'remoteId':_0x15cbc0?.[_0x11f991(0x189)]??0x0});}catch(_0x124a60){_0x5247aa[_0x11f991(0x185)]({'lockKey':_0x72271[_0x11f991(0x1b9)],'error':_0x124a60 instanceof Error?_0x124a60['message']:String(_0x124a60)});}}_0x48247c[_0x11f991(0x1b6)]=new Date()[_0x11f991(0x19d)](),await writeBffLockFile(_0x3d1352[_0x11f991(0x1ba)],_0x53095c),await waitForUploadedLockEntries(_0x3d1352['lockFilePath'],_0x28e655['appCode'],_0x545870[_0x11f991(0x17b)](_0x5b2fb0=>_0x5b2fb0['lockKey']));let _0x301b7e={'attempted':![],'cleared':![]};if(_0x545870[_0x11f991(0x1c4)]>0x0)try{let _0x18605e='';for(let _0x591afe=0x0;_0x591afe<CACHE_CLEAR_ATTEMPTS;_0x591afe+=0x1){_0x18605e=await clearBffScriptCache(),_0x591afe<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x301b7e={'attempted':!![],'cleared':!![],'message':_0x18605e||_0x11f991(0x1b0)};}catch(_0x21169a){_0x301b7e={'attempted':!![],'cleared':![],'error':_0x21169a instanceof Error?_0x21169a[_0x11f991(0x1a1)]:String(_0x21169a)};}const _0x46e59e=_0x5247aa[_0x11f991(0x1c4)]===0x0&&(_0x301b7e[_0x11f991(0x19c)]?_0x301b7e[_0x11f991(0x179)]:!![]),_0x404548=_0x301b7e[_0x11f991(0x19c)]?_0x301b7e[_0x11f991(0x179)]?_0x11f991(0x1ad):'runtime\x20cache\x20clear\x20failed':_0x11f991(0x19a);return{'ok':_0x46e59e,'data':{'uploaded':_0x545870,'skipped':_0x3f50c1,'failed':_0x5247aa,'cacheClear':_0x301b7e},'message':_0x11f991(0x1c1)+_0x545870[_0x11f991(0x1c4)]+_0x11f991(0x18f)+_0x3f50c1[_0x11f991(0x1c4)]+_0x11f991(0x1af)+_0x5247aa['length']+_0x11f991(0x198)+_0x404548};}};async function getTargetFunctions(_0x7ffd12,_0x40d09b){const _0x102654=a37_0x45ec40,_0x242e79=_0x40d09b[_0x102654(0x1b4)](_0x102654(0x19f)),_0x57365f=_0x40d09b[_0x102654(0x1b4)](_0x102654(0x1b7)),_0x409c04=normalizeBffType(_0x242e79)??undefined;if(_0x57365f&&!_0x409c04)throw CliErrors['validation']('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x59033d=await scanLocalBffFunctions(_0x7ffd12,_0x409c04);if(_0x57365f){const _0x12a48e=_0x59033d[_0x102654(0x1a3)](_0x400579=>_0x400579[_0x102654(0x1b7)]===_0x57365f);if(_0x12a48e['length']===0x0)throw CliErrors[_0x102654(0x199)](_0x102654(0x1ac)+_0x409c04+'/'+_0x57365f);return _0x12a48e;}return _0x59033d;}async function buildHookMaps(_0x4823e1,_0x15bdcb,_0x1e04bc,_0x138961){const _0x314f6c=a37_0x45ec40,_0x5c990d=_0x1e04bc[_0x314f6c(0x182)](_0x284e3a=>_0x284e3a[_0x314f6c(0x19f)]==='HOOK');if(!_0x5c990d)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x241e8d=loadAliasMap(_0x15bdcb,undefined,resolveApiFilePath(_0x15bdcb,_0x4823e1)),_0x2d2211=new Map(_0x241e8d[_0x314f6c(0x17b)](_0x4ca857=>[_0x4ca857[_0x314f6c(0x1ae)],_0x4ca857[_0x314f6c(0x1c8)]]));for(const _0x1f92da of Object[_0x314f6c(0x1bb)](_0x138961[_0x314f6c(0x183)])){_0x1f92da[_0x314f6c(0x1ae)]&&_0x1f92da['datasetCode']&&!_0x2d2211[_0x314f6c(0x18b)](_0x1f92da[_0x314f6c(0x1ae)])&&_0x2d2211[_0x314f6c(0x1c2)](_0x1f92da[_0x314f6c(0x1ae)],_0x1f92da['datasetCode']);}const _0x39316b=await listDatasets(_0x4823e1),_0x37c652=new Map(_0x39316b['map'](_0x408f71=>[_0x408f71[_0x314f6c(0x181)],_0x408f71]));return{'aliasToDatasetCode':_0x2d2211,'datasetCodeToDataset':_0x37c652};}async function uploadSingleFunction(_0x35d825,_0x40aaed,_0x588598,_0x12aaab){const _0x42795c=a37_0x45ec40,_0x1d6c67=await readFile(_0x40aaed[_0x42795c(0x193)],_0x42795c(0x197)),_0x3ed659=await computeFileHash(_0x40aaed[_0x42795c(0x193)]),_0x1e8322=_0x588598[_0x42795c(0x183)][_0x40aaed[_0x42795c(0x1b9)]];if(_0x1e8322?.[_0x42795c(0x189)]&&_0x1e8322[_0x42795c(0x1c0)]==null)throw CliErrors[_0x42795c(0x199)](_0x40aaed[_0x42795c(0x1b9)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x157b4b=extractScriptDescription(_0x1d6c67);if(!_0x157b4b&&_0x1e8322?.[_0x42795c(0x189)]){const _0x41ffd8=await getBffScriptInfo(_0x1e8322['remoteId']);_0x157b4b=_0x41ffd8[_0x42795c(0x17f)]||undefined;}const _0x2c0a21={'appCode':_0x35d825,'functionName':_0x40aaed['name'],'scriptType':_0x40aaed['type'],'scriptContent':_0x1d6c67};if(_0x1e8322?.[_0x42795c(0x189)])_0x2c0a21['id']=_0x1e8322[_0x42795c(0x189)];if(_0x1e8322?.[_0x42795c(0x1c0)]!=null)_0x2c0a21[_0x42795c(0x1c0)]=_0x1e8322[_0x42795c(0x1c0)];if(_0x157b4b)_0x2c0a21[_0x42795c(0x17f)]=_0x157b4b;if(_0x40aaed[_0x42795c(0x19f)]===_0x42795c(0x1c7)){const _0x279725=_0x40aaed[_0x42795c(0x1ae)];if(!_0x279725||!_0x40aaed[_0x42795c(0x194)]||!_0x40aaed[_0x42795c(0x1b5)])throw CliErrors[_0x42795c(0x199)]('Incomplete\x20HOOK\x20path:\x20'+_0x40aaed[_0x42795c(0x1b9)]);const _0x5d3f8e=_0x12aaab[_0x42795c(0x1c9)][_0x42795c(0x18c)](_0x279725)??_0x1e8322?.['datasetCode']??_0x279725,_0x45caa4=_0x12aaab[_0x42795c(0x191)]['get'](_0x5d3f8e);if(!_0x45caa4)throw CliErrors[_0x42795c(0x199)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x279725+_0x42795c(0x1b3)+(_0x42795c(0x196)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x2c0a21[_0x42795c(0x1b2)]=_0x45caa4['id'],_0x2c0a21['operationType']=_0x40aaed[_0x42795c(0x194)],_0x2c0a21['functionNode']=_0x40aaed['functionNode'];}const _0x4f9766=await saveBffScript(_0x2c0a21),_0x2a11e8=_0x4f9766['id'],_0x2eee1b=_0x4f9766[_0x42795c(0x18d)]??await getBffScriptInfo(_0x2a11e8),_0x305612={'hash':_0x3ed659,'remoteId':_0x2a11e8,'version':_0x2eee1b['version']};if(_0x40aaed[_0x42795c(0x19f)]===_0x42795c(0x1c7)){const _0x6328d7=_0x40aaed['alias'],_0x133fca=_0x12aaab['aliasToDatasetCode'][_0x42795c(0x18c)](_0x6328d7)??_0x1e8322?.[_0x42795c(0x1c8)]??_0x6328d7;_0x12aaab[_0x42795c(0x1c9)]['has'](_0x6328d7)?_0x305612[_0x42795c(0x1ae)]=_0x6328d7:_0x305612[_0x42795c(0x1ae)]=_0x1e8322?.[_0x42795c(0x1ae)],_0x305612[_0x42795c(0x1c8)]=_0x133fca,_0x305612[_0x42795c(0x194)]=_0x40aaed['operationType'],_0x305612[_0x42795c(0x1b5)]=_0x40aaed['functionNode'];}_0x588598[_0x42795c(0x183)][_0x40aaed[_0x42795c(0x1b9)]]=_0x305612;}function a37_0x550a(_0xb5bb4e,_0x1046cb){_0xb5bb4e=_0xb5bb4e-0x179;const _0x59f309=a37_0x59f3();let _0x550a40=_0x59f309[_0xb5bb4e];return _0x550a40;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x2e9b03,_0x1f65a0,_0x52486a){const _0x2f3458=a37_0x45ec40;if(_0x52486a[_0x2f3458(0x1c4)]===0x0)return;for(let _0x1a8055=0x0;_0x1a8055<LOCK_SETTLE_RETRY_COUNT;_0x1a8055+=0x1){const _0x4941df=await readBffLockFile(_0x2e9b03),_0x4eec22=_0x4941df?.[_0x2f3458(0x180)]?.[_0x1f65a0]?.['functions']??{},_0x367c1e=_0x52486a[_0x2f3458(0x19e)](_0x25c730=>!!_0x4eec22[_0x25c730]?.[_0x2f3458(0x189)]);if(_0x367c1e)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2f3458(0x1bc)+_0x52486a[_0x2f3458(0x1cb)](',\x20')+'.');}
1
+ const a37_0x5a71af=a37_0x1584;(function(_0x4b8eef,_0x46e949){const _0x54e554=a37_0x1584,_0x1bfd56=_0x4b8eef();while(!![]){try{const _0xad450c=parseInt(_0x54e554(0x1b8))/0x1+-parseInt(_0x54e554(0x1f2))/0x2*(parseInt(_0x54e554(0x1cd))/0x3)+parseInt(_0x54e554(0x1db))/0x4*(parseInt(_0x54e554(0x1b5))/0x5)+-parseInt(_0x54e554(0x1b1))/0x6+-parseInt(_0x54e554(0x1be))/0x7+parseInt(_0x54e554(0x19d))/0x8+-parseInt(_0x54e554(0x1de))/0x9;if(_0xad450c===_0x46e949)break;else _0x1bfd56['push'](_0x1bfd56['shift']());}catch(_0x282a4c){_0x1bfd56['push'](_0x1bfd56['shift']());}}}(a37_0x2172,0x60303));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';function a37_0x2172(){const _0x361630=['582102XHhNXp','apiDir','runtime\x20cache\x20clear\x20failed','create','POST','Push\x20complete:\x20','1638336PvJjCm','filter','validation','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','status','aliasToDatasetCode','lockKey','map','HOOK','Force\x20push\x20ignoring\x20hash\x20protection','set','lockFilePath','bff','/api/management/library/scripts/save','get','147lVlCTi','Runtime\x20script\x20cache\x20cleared.','string','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','runtime\x20cache\x20not\x20needed','code','high-risk-write','has','length','COMMON','\x22\x20not\x20found\x20after\x20ensureLockScope.','boolean','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','hash','16KcrwJC','attempted','push','288999JAhLwg','str','operationType','Would\x20inspect\x20','join','\x20skipped,\x20','cleared','unchanged','remoteId','stringify','update','some','Incomplete\x20HOOK\x20path:\x20','type','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','every','apps','message','Local\x20function\x20not\x20found:\x20','utf8','27986ZFLDXl','name','1989128OufLGT','functionNode','datasetCode','force','ENDPOINT','filePath','datasetCodeToDataset','Run\x20`','scriptsRoot','version','alias','\x20uploaded,\x20','description',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','bool','functions','values','would_push','No\x20local\x20BFF\x20functions\x20found.','Push\x20local\x20BFF\x20scripts\x20to\x20remote','1157088idIfLj','\x20failed,\x20','datasetId','\x22.\x20','884885LzzjIO','runtime\x20cache\x20cleared','appCode'];a37_0x2172=function(){return _0x361630;};return a37_0x2172();}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x1584(_0x259b21,_0x109b6c){_0x259b21=_0x259b21-0x19c;const _0x217292=a37_0x2172();let _0x15842f=_0x217292[_0x259b21];return _0x15842f;}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_0x5a71af(0x1ca),'command':a37_0x5a71af(0x1dd),'description':a37_0x5a71af(0x1b0),'risk':a37_0x5a71af(0x1d3),'flags':[{'name':'type','type':a37_0x5a71af(0x1cf),'description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0x5a71af(0x1d6),a37_0x5a71af(0x1a1),a37_0x5a71af(0x1c6)]},{'name':'name','type':a37_0x5a71af(0x1cf),'description':a37_0x5a71af(0x1c1)},{'name':'force','type':a37_0x5a71af(0x1d8),'description':a37_0x5a71af(0x1c7)}],async 'dryRun'(_0x5aef65){const _0x3eb5ce=a37_0x5a71af,_0x2c7a73=loadBffProjectConfig(_0x5aef65[_0x3eb5ce(0x1b7)]),_0x2d0ed9=await readBffLockFile(_0x2c7a73[_0x3eb5ce(0x1c9)]),{appLock:_0x2090e2}=ensureLockScope(_0x2d0ed9??createEmptyBffLock(),_0x5aef65[_0x3eb5ce(0x1b7)],_0x2c7a73[_0x3eb5ce(0x1a5)],_0x3eb5ce(0x1dd)),_0x2cab87=await getTargetFunctions(_0x2c7a73,_0x5aef65),_0x1eca2e=_0x5aef65[_0x3eb5ce(0x1ab)]('force'),_0x24482e=[];for(const _0x59a340 of _0x2cab87){const _0x3a7a95=await computeFileHash(_0x59a340[_0x3eb5ce(0x1a2)]),_0x33cb66=_0x2090e2[_0x3eb5ce(0x1ac)][_0x59a340['lockKey']],_0x76b636=!!_0x33cb66&&_0x33cb66[_0x3eb5ce(0x1da)]===_0x3a7a95;_0x24482e['push']({'lockKey':_0x59a340[_0x3eb5ce(0x1c4)],'filePath':_0x59a340[_0x3eb5ce(0x1a2)],'remoteId':_0x33cb66?.[_0x3eb5ce(0x1e6)]??null,'mode':_0x33cb66?.[_0x3eb5ce(0x1e6)]?_0x3eb5ce(0x1e8):_0x3eb5ce(0x1bb),'status':!_0x1eca2e&&_0x76b636?_0x3eb5ce(0x1e5):_0x3eb5ce(0x1ae)});}return{'method':_0x3eb5ce(0x1bc),'url':_0x3eb5ce(0x1cb),'body':{'appCode':_0x5aef65[_0x3eb5ce(0x1b7)],'force':_0x1eca2e,'files':_0x24482e,'cacheClearAtRuntime':_0x24482e[_0x3eb5ce(0x1e9)](_0x1b4418=>_0x1b4418[_0x3eb5ce(0x1c2)]==='would_push'),'cacheClearAtRuntimeTimes':_0x24482e[_0x3eb5ce(0x1e9)](_0x1d3a54=>_0x1d3a54['status']===_0x3eb5ce(0x1ae))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x3eb5ce(0x1e1)+_0x24482e[_0x3eb5ce(0x1d5)]+_0x3eb5ce(0x1d0)};},async 'execute'(_0x2ac521){const _0x4b0149=a37_0x5a71af,_0x3edb02=loadBffProjectConfig(_0x2ac521[_0x4b0149(0x1b7)]),_0x102bbe=await readBffLockFile(_0x3edb02[_0x4b0149(0x1c9)]),{lockData:_0x590d89,appLock:_0x40a949}=ensureLockScope(_0x102bbe??createEmptyBffLock(),_0x2ac521['appCode'],_0x3edb02[_0x4b0149(0x1a5)],_0x4b0149(0x1dd)),_0x26234d=await getTargetFunctions(_0x3edb02,_0x2ac521);if(_0x26234d['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4b0149(0x1af)};const _0xfadad2=_0x2ac521[_0x4b0149(0x1ab)](_0x4b0149(0x1a0)),_0x501b36=JSON['parse'](JSON[_0x4b0149(0x1e7)](_0x590d89)),_0x4443d7=_0x501b36[_0x4b0149(0x1ee)][_0x2ac521[_0x4b0149(0x1b7)]];if(!_0x4443d7)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x2ac521[_0x4b0149(0x1b7)]+_0x4b0149(0x1d7));const _0x4b65fe=await buildHookMaps(_0x2ac521[_0x4b0149(0x1b7)],_0x2ac521[_0x4b0149(0x1b9)],_0x26234d,_0x4443d7),_0x3e00db=[],_0x8533ec=[],_0x49bc89=[];for(const _0x12a9ce of _0x26234d){const _0x5ea8ea=await computeFileHash(_0x12a9ce['filePath']),_0x523df=_0x4443d7[_0x4b0149(0x1ac)][_0x12a9ce[_0x4b0149(0x1c4)]];if(!_0xfadad2&&_0x523df&&_0x523df[_0x4b0149(0x1da)]===_0x5ea8ea){_0x8533ec[_0x4b0149(0x1dd)]({'lockKey':_0x12a9ce[_0x4b0149(0x1c4)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x2ac521[_0x4b0149(0x1b7)],_0x12a9ce,_0x4443d7,_0x4b65fe);const _0x30561a=_0x4443d7[_0x4b0149(0x1ac)][_0x12a9ce[_0x4b0149(0x1c4)]];_0x3e00db[_0x4b0149(0x1dd)]({'lockKey':_0x12a9ce[_0x4b0149(0x1c4)],'remoteId':_0x30561a?.[_0x4b0149(0x1e6)]??0x0});}catch(_0xea13fa){_0x49bc89['push']({'lockKey':_0x12a9ce['lockKey'],'error':_0xea13fa instanceof Error?_0xea13fa[_0x4b0149(0x1ef)]:String(_0xea13fa)});}}_0x4443d7['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x3edb02['lockFilePath'],_0x501b36),await waitForUploadedLockEntries(_0x3edb02[_0x4b0149(0x1c9)],_0x2ac521[_0x4b0149(0x1b7)],_0x3e00db[_0x4b0149(0x1c5)](_0x380a1c=>_0x380a1c[_0x4b0149(0x1c4)]));let _0x4310a3={'attempted':![],'cleared':![]};if(_0x3e00db['length']>0x0)try{let _0x588490='';for(let _0x2189e7=0x0;_0x2189e7<CACHE_CLEAR_ATTEMPTS;_0x2189e7+=0x1){_0x588490=await clearBffScriptCache(),_0x2189e7<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x4310a3={'attempted':!![],'cleared':!![],'message':_0x588490||_0x4b0149(0x1ce)};}catch(_0x189124){_0x4310a3={'attempted':!![],'cleared':![],'error':_0x189124 instanceof Error?_0x189124[_0x4b0149(0x1ef)]:String(_0x189124)};}const _0x3f28c1=_0x49bc89[_0x4b0149(0x1d5)]===0x0&&(_0x4310a3[_0x4b0149(0x1dc)]?_0x4310a3[_0x4b0149(0x1e4)]:!![]),_0xf36a9d=_0x4310a3[_0x4b0149(0x1dc)]?_0x4310a3[_0x4b0149(0x1e4)]?_0x4b0149(0x1b6):_0x4b0149(0x1ba):_0x4b0149(0x1d1);return{'ok':_0x3f28c1,'data':{'uploaded':_0x3e00db,'skipped':_0x8533ec,'failed':_0x49bc89,'cacheClear':_0x4310a3},'message':_0x4b0149(0x1bd)+_0x3e00db[_0x4b0149(0x1d5)]+_0x4b0149(0x1a8)+_0x8533ec[_0x4b0149(0x1d5)]+_0x4b0149(0x1e3)+_0x49bc89['length']+_0x4b0149(0x1b2)+_0xf36a9d};}};async function getTargetFunctions(_0x59ecad,_0x489b31){const _0x1fbb02=a37_0x5a71af,_0x344b1f=_0x489b31[_0x1fbb02(0x1df)](_0x1fbb02(0x1eb)),_0x353ab3=_0x489b31[_0x1fbb02(0x1df)](_0x1fbb02(0x19c)),_0x33d769=normalizeBffType(_0x344b1f)??undefined;if(_0x353ab3&&!_0x33d769)throw CliErrors[_0x1fbb02(0x1c0)](_0x1fbb02(0x1ec));const _0x1fffbe=await scanLocalBffFunctions(_0x59ecad,_0x33d769);if(_0x353ab3){const _0x40b36b=_0x1fffbe[_0x1fbb02(0x1bf)](_0x28ce1b=>_0x28ce1b['name']===_0x353ab3);if(_0x40b36b[_0x1fbb02(0x1d5)]===0x0)throw CliErrors[_0x1fbb02(0x1c0)](_0x1fbb02(0x1f0)+_0x33d769+'/'+_0x353ab3);return _0x40b36b;}return _0x1fffbe;}async function buildHookMaps(_0x58d552,_0x4c6f0e,_0x18ef72,_0x4401ae){const _0x10b753=a37_0x5a71af,_0x2d914a=_0x18ef72['some'](_0x5a1e6b=>_0x5a1e6b['type']===_0x10b753(0x1c6));if(!_0x2d914a)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x3392e0=loadAliasMap(_0x4c6f0e,undefined,resolveApiFilePath(_0x4c6f0e,_0x58d552)),_0x349dbc=new Map(_0x3392e0[_0x10b753(0x1c5)](_0x1751f9=>[_0x1751f9['alias'],_0x1751f9[_0x10b753(0x19f)]]));for(const _0x9f59a3 of Object[_0x10b753(0x1ad)](_0x4401ae[_0x10b753(0x1ac)])){_0x9f59a3[_0x10b753(0x1a7)]&&_0x9f59a3['datasetCode']&&!_0x349dbc[_0x10b753(0x1d4)](_0x9f59a3[_0x10b753(0x1a7)])&&_0x349dbc[_0x10b753(0x1c8)](_0x9f59a3[_0x10b753(0x1a7)],_0x9f59a3[_0x10b753(0x19f)]);}const _0x2c3d54=await listDatasets(_0x58d552),_0x2a4f5f=new Map(_0x2c3d54[_0x10b753(0x1c5)](_0x41da8e=>[_0x41da8e[_0x10b753(0x1d2)],_0x41da8e]));return{'aliasToDatasetCode':_0x349dbc,'datasetCodeToDataset':_0x2a4f5f};}async function uploadSingleFunction(_0x2e9edc,_0x164c2c,_0x4d46cb,_0x333d34){const _0x4dcd82=a37_0x5a71af,_0xa4533c=await readFile(_0x164c2c[_0x4dcd82(0x1a2)],_0x4dcd82(0x1f1)),_0x4e2926=await computeFileHash(_0x164c2c['filePath']),_0x50c7eb=_0x4d46cb[_0x4dcd82(0x1ac)][_0x164c2c[_0x4dcd82(0x1c4)]];if(_0x50c7eb?.[_0x4dcd82(0x1e6)]&&_0x50c7eb[_0x4dcd82(0x1a6)]==null)throw CliErrors[_0x4dcd82(0x1c0)](_0x164c2c[_0x4dcd82(0x1c4)]+_0x4dcd82(0x1aa));let _0x38bec0=extractScriptDescription(_0xa4533c);if(!_0x38bec0&&_0x50c7eb?.[_0x4dcd82(0x1e6)]){const _0x505aa5=await getBffScriptInfo(_0x50c7eb[_0x4dcd82(0x1e6)]);_0x38bec0=_0x505aa5['description']||undefined;}const _0x5378ee={'appCode':_0x2e9edc,'functionName':_0x164c2c['name'],'scriptType':_0x164c2c['type'],'scriptContent':_0xa4533c};if(_0x50c7eb?.[_0x4dcd82(0x1e6)])_0x5378ee['id']=_0x50c7eb[_0x4dcd82(0x1e6)];if(_0x50c7eb?.[_0x4dcd82(0x1a6)]!=null)_0x5378ee[_0x4dcd82(0x1a6)]=_0x50c7eb[_0x4dcd82(0x1a6)];if(_0x38bec0)_0x5378ee[_0x4dcd82(0x1a9)]=_0x38bec0;if(_0x164c2c['type']===_0x4dcd82(0x1c6)){const _0x53dcd7=_0x164c2c['alias'];if(!_0x53dcd7||!_0x164c2c['operationType']||!_0x164c2c['functionNode'])throw CliErrors[_0x4dcd82(0x1c0)](_0x4dcd82(0x1ea)+_0x164c2c[_0x4dcd82(0x1c4)]);const _0x37b004=_0x333d34[_0x4dcd82(0x1c3)][_0x4dcd82(0x1cc)](_0x53dcd7)??_0x50c7eb?.[_0x4dcd82(0x19f)]??_0x53dcd7,_0x2b8ac7=_0x333d34[_0x4dcd82(0x1a3)]['get'](_0x37b004);if(!_0x2b8ac7)throw CliErrors['validation']('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x53dcd7+_0x4dcd82(0x1b4)+(_0x4dcd82(0x1a4)+CLI_BIN_NAME+_0x4dcd82(0x1d9)));_0x5378ee[_0x4dcd82(0x1b3)]=_0x2b8ac7['id'],_0x5378ee[_0x4dcd82(0x1e0)]=_0x164c2c[_0x4dcd82(0x1e0)],_0x5378ee['functionNode']=_0x164c2c[_0x4dcd82(0x19e)];}const _0x125bce=await saveBffScript(_0x5378ee),_0x5b0040=_0x125bce['id'],_0x2472ee=_0x125bce['script']??await getBffScriptInfo(_0x5b0040),_0x246656={'hash':_0x4e2926,'remoteId':_0x5b0040,'version':_0x2472ee[_0x4dcd82(0x1a6)]};if(_0x164c2c[_0x4dcd82(0x1eb)]==='HOOK'){const _0x1de761=_0x164c2c['alias'],_0x5c14fa=_0x333d34[_0x4dcd82(0x1c3)]['get'](_0x1de761)??_0x50c7eb?.[_0x4dcd82(0x19f)]??_0x1de761;_0x333d34[_0x4dcd82(0x1c3)][_0x4dcd82(0x1d4)](_0x1de761)?_0x246656['alias']=_0x1de761:_0x246656[_0x4dcd82(0x1a7)]=_0x50c7eb?.[_0x4dcd82(0x1a7)],_0x246656[_0x4dcd82(0x19f)]=_0x5c14fa,_0x246656[_0x4dcd82(0x1e0)]=_0x164c2c[_0x4dcd82(0x1e0)],_0x246656['functionNode']=_0x164c2c[_0x4dcd82(0x19e)];}_0x4d46cb['functions'][_0x164c2c[_0x4dcd82(0x1c4)]]=_0x246656;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x4701a4,_0x4e3d39,_0xcf6733){const _0x19e920=a37_0x5a71af;if(_0xcf6733[_0x19e920(0x1d5)]===0x0)return;for(let _0x405e1d=0x0;_0x405e1d<LOCK_SETTLE_RETRY_COUNT;_0x405e1d+=0x1){const _0xe7b276=await readBffLockFile(_0x4701a4),_0x101036=_0xe7b276?.['apps']?.[_0x4e3d39]?.[_0x19e920(0x1ac)]??{},_0x53ecbc=_0xcf6733[_0x19e920(0x1ed)](_0x2a59f2=>!!_0x101036[_0x2a59f2]?.['remoteId']);if(_0x53ecbc)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0xcf6733[_0x19e920(0x1e2)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a38_0x43b661=a38_0x5aeb;(function(_0x3c4941,_0x2ab983){const _0x326188=a38_0x5aeb,_0x4cd6e0=_0x3c4941();while(!![]){try{const _0x53332d=parseInt(_0x326188(0x1a0))/0x1+parseInt(_0x326188(0x1b3))/0x2+-parseInt(_0x326188(0x1a4))/0x3+parseInt(_0x326188(0x194))/0x4+-parseInt(_0x326188(0x196))/0x5+-parseInt(_0x326188(0x1a5))/0x6*(parseInt(_0x326188(0x1ac))/0x7)+parseInt(_0x326188(0x19c))/0x8;if(_0x53332d===_0x2ab983)break;else _0x4cd6e0['push'](_0x4cd6e0['shift']());}catch(_0xbcaffe){_0x4cd6e0['push'](_0x4cd6e0['shift']());}}}(a38_0x4ef0,0xc1681));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a38_0x5aeb(_0x6b1eaf,_0x3ffad7){_0x6b1eaf=_0x6b1eaf-0x193;const _0x4ef0c3=a38_0x4ef0();let _0x5aeba6=_0x4ef0c3[_0x6b1eaf];return _0x5aeba6;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a38_0x4ef0(){const _0x1de50f=['1146380gLJuyk','appCode','918936kEbfgC','bff','4073950gpLsNN','\x20modified,\x20','apiDir','hash','\x20added,\x20','all','12424592cKhylf','functions','push','lockKey','256513gypuvg','length','bool','boolean','1347936hIyKWW','24UaaStF','has','remote','alias','scriptsRoot','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','map','973378GUwKMi','status','datasetCode','read','filePath','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','lockFilePath'];a38_0x4ef0=function(){return _0x1de50f;};return a38_0x4ef0();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x43b661(0x195),'command':a38_0x43b661(0x1ad),'description':a38_0x43b661(0x1b1),'risk':a38_0x43b661(0x1af),'flags':[{'name':a38_0x43b661(0x1a7),'type':a38_0x43b661(0x1a3),'description':a38_0x43b661(0x1aa)}],async 'execute'(_0x55e879){const _0x2727b4=a38_0x43b661,_0x1ab22e=loadBffProjectConfig(_0x55e879[_0x2727b4(0x193)]),_0x1b18b7=await readBffLockFile(_0x1ab22e[_0x2727b4(0x1b2)]),{appLock:_0xb80390}=ensureLockScope(_0x1b18b7??createEmptyBffLock(),_0x55e879[_0x2727b4(0x193)],_0x1ab22e[_0x2727b4(0x1a9)],_0x2727b4(0x1ad)),_0x28fd6a=await scanLocalBffFunctions(_0x1ab22e),_0x2a73b8=[],_0x36bb8b=[],_0x476aae=[];for(const _0x3758d2 of _0x28fd6a){const _0x8d1e9e=await computeFileHash(_0x3758d2[_0x2727b4(0x1b0)]),_0x1552b9=_0xb80390[_0x2727b4(0x19d)][_0x3758d2[_0x2727b4(0x19f)]];if(!_0x1552b9)_0x2a73b8[_0x2727b4(0x19e)](_0x3758d2[_0x2727b4(0x19f)]);else _0x1552b9[_0x2727b4(0x199)]!==_0x8d1e9e?_0x36bb8b[_0x2727b4(0x19e)](_0x3758d2['lockKey']):_0x476aae[_0x2727b4(0x19e)](_0x3758d2[_0x2727b4(0x19f)]);}const _0x2c8d4f=[];if(_0x55e879[_0x2727b4(0x1a2)]('remote')){const _0x3376b3=loadAliasMap(_0x55e879['apiDir'],undefined,resolveApiFilePath(_0x55e879[_0x2727b4(0x198)],_0x55e879[_0x2727b4(0x193)])),_0x40f643=new Map(_0x3376b3[_0x2727b4(0x1ab)](_0x40b3d1=>[_0x40b3d1[_0x2727b4(0x1ae)],_0x40b3d1[_0x2727b4(0x1a8)]])),[_0x33094b,_0x2ddc98]=await Promise[_0x2727b4(0x19b)]([listBffScripts(_0x55e879['appCode']),getBffScriptStatistics(_0x55e879['appCode'])]),_0x2bb7c4=createHookLocationMap(_0x2ddc98),_0x1266a3=new Set(_0x28fd6a[_0x2727b4(0x1ab)](_0x230c6b=>_0x230c6b['lockKey']));for(const _0x18d181 of _0x33094b){const _0x2bc35c=resolveRemoteScriptTarget(_0x1ab22e,_0x18d181,_0x2bb7c4,_0xb80390[_0x2727b4(0x19d)],_0x40f643);_0x2bc35c&&!_0x1266a3[_0x2727b4(0x1a6)](_0x2bc35c[_0x2727b4(0x19f)])&&_0x2c8d4f[_0x2727b4(0x19e)](_0x2bc35c[_0x2727b4(0x19f)]);}}const _0x2d2e84=_0x2a73b8['length']===0x0&&_0x36bb8b[_0x2727b4(0x1a1)]===0x0&&_0x2c8d4f[_0x2727b4(0x1a1)]===0x0;return{'ok':!![],'data':{'added':_0x2a73b8,'modified':_0x36bb8b,'unchanged':_0x476aae,'remoteOnly':_0x2c8d4f},'message':_0x2d2e84?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x2a73b8['length']+_0x2727b4(0x19a)+_0x36bb8b[_0x2727b4(0x1a1)]+_0x2727b4(0x197)+_0x476aae[_0x2727b4(0x1a1)]+'\x20unchanged'+(_0x2c8d4f[_0x2727b4(0x1a1)]>0x0?',\x20'+_0x2c8d4f['length']+'\x20remote-only':'')};}};
1
+ const a38_0x31ae76=a38_0x3604;(function(_0x8e03a3,_0x23efb1){const _0x5be3dd=a38_0x3604,_0x47af5c=_0x8e03a3();while(!![]){try{const _0x348468=parseInt(_0x5be3dd(0x1b5))/0x1+parseInt(_0x5be3dd(0x1ab))/0x2+parseInt(_0x5be3dd(0x1ad))/0x3+-parseInt(_0x5be3dd(0x1b4))/0x4+parseInt(_0x5be3dd(0x1af))/0x5*(-parseInt(_0x5be3dd(0x1b0))/0x6)+-parseInt(_0x5be3dd(0x1a5))/0x7+-parseInt(_0x5be3dd(0x1a8))/0x8*(parseInt(_0x5be3dd(0x1a1))/0x9);if(_0x348468===_0x23efb1)break;else _0x47af5c['push'](_0x47af5c['shift']());}catch(_0x40d80f){_0x47af5c['push'](_0x47af5c['shift']());}}}(a38_0x3f1e,0x80b7c));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 a38_0x3604(_0x4b7059,_0x5e9ce9){_0x4b7059=_0x4b7059-0x1a0;const _0x3f1e8a=a38_0x3f1e();let _0x36041a=_0x3f1e8a[_0x4b7059];return _0x36041a;}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a38_0x3f1e(){const _0x17971d=['1585QLjwNL','8754qXiUtw','functions','apiDir','status','349632tcFImB','915502AWwujN','map','boolean','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','all','datasetCode','bff','push','alias','27BIAJPq','read','appCode','lockKey','950817IBxXrq','scriptsRoot','remote','3246736BcUhJF','bool','hash','1729356HoKhVd','\x20added,\x20','1950948Kxmzzz','length'];a38_0x3f1e=function(){return _0x17971d;};return a38_0x3f1e();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x31ae76(0x1bb),'command':a38_0x31ae76(0x1b3),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a38_0x31ae76(0x1a2),'flags':[{'name':a38_0x31ae76(0x1a7),'type':a38_0x31ae76(0x1b7),'description':a38_0x31ae76(0x1b8)}],async 'execute'(_0x19d88a){const _0x24e62e=a38_0x31ae76,_0x147d73=loadBffProjectConfig(_0x19d88a['appCode']),_0x479041=await readBffLockFile(_0x147d73['lockFilePath']),{appLock:_0x41bf90}=ensureLockScope(_0x479041??createEmptyBffLock(),_0x19d88a['appCode'],_0x147d73[_0x24e62e(0x1a6)],'status'),_0x239f05=await scanLocalBffFunctions(_0x147d73),_0x50bf2b=[],_0x1c1c29=[],_0x4ef047=[];for(const _0x486fb3 of _0x239f05){const _0x67a155=await computeFileHash(_0x486fb3['filePath']),_0x5a1ab4=_0x41bf90[_0x24e62e(0x1b1)][_0x486fb3[_0x24e62e(0x1a4)]];if(!_0x5a1ab4)_0x50bf2b[_0x24e62e(0x1bc)](_0x486fb3[_0x24e62e(0x1a4)]);else _0x5a1ab4[_0x24e62e(0x1aa)]!==_0x67a155?_0x1c1c29[_0x24e62e(0x1bc)](_0x486fb3[_0x24e62e(0x1a4)]):_0x4ef047[_0x24e62e(0x1bc)](_0x486fb3[_0x24e62e(0x1a4)]);}const _0x436c48=[];if(_0x19d88a[_0x24e62e(0x1a9)](_0x24e62e(0x1a7))){const _0x9151de=loadAliasMap(_0x19d88a[_0x24e62e(0x1b2)],undefined,resolveApiFilePath(_0x19d88a[_0x24e62e(0x1b2)],_0x19d88a[_0x24e62e(0x1a3)])),_0x2897d7=new Map(_0x9151de[_0x24e62e(0x1b6)](_0x19a68e=>[_0x19a68e[_0x24e62e(0x1ba)],_0x19a68e[_0x24e62e(0x1a0)]])),[_0x4ded84,_0x1f89e8]=await Promise[_0x24e62e(0x1b9)]([listBffScripts(_0x19d88a[_0x24e62e(0x1a3)]),getBffScriptStatistics(_0x19d88a[_0x24e62e(0x1a3)])]),_0x58faef=createHookLocationMap(_0x1f89e8),_0x15064d=new Set(_0x239f05[_0x24e62e(0x1b6)](_0x3b7894=>_0x3b7894['lockKey']));for(const _0x266120 of _0x4ded84){const _0x167e8f=resolveRemoteScriptTarget(_0x147d73,_0x266120,_0x58faef,_0x41bf90[_0x24e62e(0x1b1)],_0x2897d7);_0x167e8f&&!_0x15064d['has'](_0x167e8f[_0x24e62e(0x1a4)])&&_0x436c48[_0x24e62e(0x1bc)](_0x167e8f[_0x24e62e(0x1a4)]);}}const _0x3b7c7a=_0x50bf2b[_0x24e62e(0x1ae)]===0x0&&_0x1c1c29[_0x24e62e(0x1ae)]===0x0&&_0x436c48[_0x24e62e(0x1ae)]===0x0;return{'ok':!![],'data':{'added':_0x50bf2b,'modified':_0x1c1c29,'unchanged':_0x4ef047,'remoteOnly':_0x436c48},'message':_0x3b7c7a?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x50bf2b[_0x24e62e(0x1ae)]+_0x24e62e(0x1ac)+_0x1c1c29[_0x24e62e(0x1ae)]+'\x20modified,\x20'+_0x4ef047[_0x24e62e(0x1ae)]+'\x20unchanged'+(_0x436c48['length']>0x0?',\x20'+_0x436c48['length']+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a39_0x1e7473=a39_0x2e9f;function a39_0x3118(){const _0x19c3d4=['error','2SKCNcx','8ROnwWr','7937136Czsvuj','pipe','../../skills/npx-skills-add.js','189qnrBEJ','inherit','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','11eCuryB','log','cwd','setLogPath','735071xGJNks',')...','skipped','67696kdupLi','nonInteractive','3740340LzCPrP','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','798723NiybgB','info','7830930yBiaNU','608385xMVSrR','install','CLI\x20Built-in\x20Skill\x20installed','cli-skill-install'];a39_0x3118=function(){return _0x19c3d4;};return a39_0x3118();}(function(_0x16f11b,_0x4be2ce){const _0x2d5e54=a39_0x2e9f,_0x38f486=_0x16f11b();while(!![]){try{const _0x3554f0=-parseInt(_0x2d5e54(0x1d5))/0x1*(-parseInt(_0x2d5e54(0x1c9))/0x2)+parseInt(_0x2d5e54(0x1dd))/0x3+-parseInt(_0x2d5e54(0x1ca))/0x4*(parseInt(_0x2d5e54(0x1e0))/0x5)+-parseInt(_0x2d5e54(0x1da))/0x6+parseInt(_0x2d5e54(0x1ce))/0x7*(parseInt(_0x2d5e54(0x1d8))/0x8)+parseInt(_0x2d5e54(0x1cb))/0x9+parseInt(_0x2d5e54(0x1df))/0xa*(-parseInt(_0x2d5e54(0x1d1))/0xb);if(_0x3554f0===_0x4be2ce)break;else _0x38f486['push'](_0x38f486['shift']());}catch(_0x5c0ed1){_0x38f486['push'](_0x38f486['shift']());}}}(a39_0x3118,0x70c1d));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a39_0x2e9f(_0x22b63e,_0xe7ca60){_0x22b63e=_0x22b63e-0x1c9;const _0x311879=a39_0x3118();let _0x2e9fce=_0x311879[_0x22b63e];return _0x2e9fce;}export const cliSkillDefinitions=[{'service':'cli-skill','command':a39_0x1e7473(0x1e1),'description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2a7f94){const _0x3c6e9c=a39_0x1e7473;logger[_0x3c6e9c(0x1d4)](process[_0x3c6e9c(0x1d3)]()),logger[_0x3c6e9c(0x1de)](_0x3c6e9c(0x1e3),_0x3c6e9c(0x1db));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x1f1c47,RABETBASE_SKILL_SOURCE:_0x4e15fe,runNpxSkillsAddGlobal:_0x30dbce}=await import(_0x3c6e9c(0x1cd)),_0x444347=_0x2a7f94[_0x3c6e9c(0x1d9)]?_0x3c6e9c(0x1cc):_0x3c6e9c(0x1cf);console[_0x3c6e9c(0x1d2)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('+_0x1f1c47+_0x3c6e9c(0x1d6));const _0x2aa015=_0x30dbce(process['cwd'](),_0x4e15fe,{'stdio':_0x444347});if(_0x2aa015[_0x3c6e9c(0x1d7)])console[_0x3c6e9c(0x1d2)](_0x3c6e9c(0x1dc));else{if(_0x2aa015['ok'])console[_0x3c6e9c(0x1d2)](_0x3c6e9c(0x1e2));else throw CliErrors['apiError']('npx\x20skills\x20add\x20failed:\x20'+(_0x2aa015[_0x3c6e9c(0x1e4)]||'unknown'),_0x3c6e9c(0x1d0)+_0x1f1c47);}return{'ok':!![]};}}];
1
+ function a39_0x2348(_0x4249b2,_0x2d8868){_0x4249b2=_0x4249b2-0x88;const _0x46e704=a39_0x46e7();let _0x234870=_0x46e704[_0x4249b2];return _0x234870;}const a39_0x38c2c3=a39_0x2348;function a39_0x46e7(){const _0x5c9f73=['inherit','CLI\x20Built-in\x20Skill\x20installed','skipped','4991335EHpEdX','4JTocse','info','apiError','10455584VbovyD','npx\x20skills\x20add\x20failed:\x20','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','write','7311003zISSBL','pipe','log','2VWnQnt','unknown','1468426fAAKzU','cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','cli-skill','error','cwd','nonInteractive','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','829557rjxczW','19235556nLgJiX','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','install','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','5865270ROGCWq'];a39_0x46e7=function(){return _0x5c9f73;};return a39_0x46e7();}(function(_0x27b50a,_0x5245e0){const _0x253387=a39_0x2348,_0x4e6e73=_0x27b50a();while(!![]){try{const _0x1429aa=parseInt(_0x253387(0xa2))/0x1+-parseInt(_0x253387(0xa0))/0x2*(parseInt(_0x253387(0x8c))/0x3)+parseInt(_0x253387(0x96))/0x4*(parseInt(_0x253387(0x95))/0x5)+-parseInt(_0x253387(0x91))/0x6+-parseInt(_0x253387(0x9d))/0x7+-parseInt(_0x253387(0x99))/0x8+parseInt(_0x253387(0x8d))/0x9;if(_0x1429aa===_0x5245e0)break;else _0x4e6e73['push'](_0x4e6e73['shift']());}catch(_0x82350b){_0x4e6e73['push'](_0x4e6e73['shift']());}}}(a39_0x46e7,0xf3c88));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x38c2c3(0xa5),'command':a39_0x38c2c3(0x8f),'description':a39_0x38c2c3(0x90),'risk':a39_0x38c2c3(0x9c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x552ed0){const _0x2ccad0=a39_0x38c2c3;logger['setLogPath'](process[_0x2ccad0(0x89)]()),logger[_0x2ccad0(0x97)](_0x2ccad0(0xa3),_0x2ccad0(0xa4));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x8ab364,RABETBASE_SKILL_SOURCE:_0x227698,runNpxSkillsAddGlobal:_0x2adc25}=await import('../../skills/npx-skills-add.js'),_0x33fd25=_0x552ed0[_0x2ccad0(0x8a)]?_0x2ccad0(0x9e):_0x2ccad0(0x92);console['log'](_0x2ccad0(0x9b)+_0x8ab364+')...');const _0x3403f8=_0x2adc25(process[_0x2ccad0(0x89)](),_0x227698,{'stdio':_0x33fd25});if(_0x3403f8[_0x2ccad0(0x94)])console[_0x2ccad0(0x9f)](_0x2ccad0(0x8e));else{if(_0x3403f8['ok'])console[_0x2ccad0(0x9f)](_0x2ccad0(0x93));else throw CliErrors[_0x2ccad0(0x98)](_0x2ccad0(0x9a)+(_0x3403f8[_0x2ccad0(0x88)]||_0x2ccad0(0xa1)),_0x2ccad0(0x8b)+_0x8ab364);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x30d99c=a40_0x2ee8;(function(_0x406af2,_0x2fa3fa){const _0x580371=a40_0x2ee8,_0x5dcd86=_0x406af2();while(!![]){try{const _0x177b55=-parseInt(_0x580371(0x1fa))/0x1*(parseInt(_0x580371(0x1c2))/0x2)+-parseInt(_0x580371(0x201))/0x3+-parseInt(_0x580371(0x20c))/0x4+-parseInt(_0x580371(0x1ca))/0x5*(-parseInt(_0x580371(0x1fe))/0x6)+-parseInt(_0x580371(0x1d0))/0x7*(-parseInt(_0x580371(0x207))/0x8)+-parseInt(_0x580371(0x1f8))/0x9*(-parseInt(_0x580371(0x1d2))/0xa)+-parseInt(_0x580371(0x20d))/0xb*(parseInt(_0x580371(0x1f0))/0xc);if(_0x177b55===_0x2fa3fa)break;else _0x5dcd86['push'](_0x5dcd86['shift']());}catch(_0x222d70){_0x5dcd86['push'](_0x5dcd86['shift']());}}}(a40_0x1245,0xebf68));import a40_0x10064d from'chalk';import a40_0x2907a3 from'ora';function a40_0x2ee8(_0x1c5868,_0x5b2718){_0x1c5868=_0x1c5868-0x1bb;const _0x124571=a40_0x1245();let _0x2ee825=_0x124571[_0x1c5868];return _0x2ee825;}import a40_0x481b7a 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 _0xf42d07=a40_0x2ee8;return GIT_COMMIT!==_0xf42d07(0x1c6)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xf42d07(0x1f2)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xd0f495=a40_0x2ee8,_0x285aa7=process[_0xd0f495(0x20b)][_0xd0f495(0x1e8)]();if(_0x285aa7[_0xd0f495(0x1d5)](_0xd0f495(0x1e6)))return'bun';return _0xd0f495(0x1c4);}const updateFlags=[{'name':a40_0x30d99c(0x1ff),'type':'boolean','description':a40_0x30d99c(0x1e1),'default':![]},{'name':a40_0x30d99c(0x1ef),'type':'string','description':a40_0x30d99c(0x1ce)},{'name':a40_0x30d99c(0x1cf),'type':a40_0x30d99c(0x1bc),'description':a40_0x30d99c(0x1bf),'default':![]},{'name':a40_0x30d99c(0x1c3),'type':a40_0x30d99c(0x1bc),'description':a40_0x30d99c(0x1e5),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x5178d8){const _0x5a1663=a40_0x30d99c;return _0x5178d8[_0x5a1663(0x1c5)](_0x5a1663(0x1ef))['trim']();}function shouldSkipCliSkill(_0x3ef52b){const _0x44bba9=a40_0x30d99c;return _0x3ef52b[_0x44bba9(0x1ea)](_0x44bba9(0x1cf))||_0x3ef52b[_0x44bba9(0x209)]('skills')===![];}async function validateUpdateFlags(_0x238592){const _0x2a44bd=a40_0x30d99c,_0x28a497=_0x238592[_0x2a44bd(0x1ea)](_0x2a44bd(0x1ff)),_0x2006c1=getRequestedVersion(_0x238592);if(_0x28a497&&_0x2006c1)throw CliErrors[_0x2a44bd(0x1d6)](_0x2a44bd(0x1ec),_0x2a44bd(0x1e4));if(_0x2006c1&&!a40_0x481b7a[_0x2a44bd(0x1f5)](_0x2006c1))throw CliErrors[_0x2a44bd(0x1d6)]('Invalid\x20version:\x20'+_0x2006c1,_0x2a44bd(0x206));}async function fetchNpmDistTags(){const _0x6da127=a40_0x30d99c;try{const _0x5e701e=await fetch(_0x6da127(0x212)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x6da127(0x1c7)](0x2710)});if(!_0x5e701e['ok'])return null;const _0x44761d=await _0x5e701e['json']();if(!_0x44761d||typeof _0x44761d!==_0x6da127(0x208))return null;return Object[_0x6da127(0x1e3)](Object[_0x6da127(0x1e7)](_0x44761d)[_0x6da127(0x205)](([,_0x94923f])=>typeof _0x94923f==='string'&&_0x94923f[_0x6da127(0x1f7)]()[_0x6da127(0x1f6)]>0x0)[_0x6da127(0x1be)](([_0x38162b,_0x7ce231])=>[_0x38162b,String(_0x7ce231)[_0x6da127(0x1f7)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x3ab3f1){const _0x48da58=await fetchNpmDistTags();return _0x48da58?.[_0x3ab3f1]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x264521){const _0x4d2dab=a40_0x30d99c,_0x419378=getRequestedVersion(_0x264521);if(_0x419378)return{'version':_0x419378,'source':_0x4d2dab(0x1ef)};if(_0x264521[_0x4d2dab(0x1ea)]('beta')){const _0x4bcda8=await fetchNpmDistTagVersion(_0x4d2dab(0x1ff));if(!_0x4bcda8)return null;return{'version':_0x4bcda8,'source':_0x4d2dab(0x1ff)};}const _0x16927d=await fetchLatestVersion();if(!_0x16927d)return null;return{'version':_0x16927d,'source':_0x4d2dab(0x1e9)};}function shouldInstallTarget(_0x49e043,_0x2ec4f3){const _0x7cd348=a40_0x30d99c;if(_0x2ec4f3[_0x7cd348(0x1e0)]===_0x7cd348(0x1ef)||_0x2ec4f3[_0x7cd348(0x1e0)]===_0x7cd348(0x1ff))return!a40_0x481b7a['eq'](_0x49e043,_0x2ec4f3[_0x7cd348(0x1ef)]);return a40_0x481b7a['lt'](_0x49e043,_0x2ec4f3['version']);}function getInstallPlanLabel(_0x3b7edd,_0x3544e9){const _0x5196c2=a40_0x30d99c;switch(_0x3544e9[_0x5196c2(0x1e0)]){case'beta':return _0x5196c2(0x1c8)+a40_0x10064d[_0x5196c2(0x1f9)](_0x3b7edd)+_0x5196c2(0x1d8)+a40_0x10064d[_0x5196c2(0x1f1)](_0x3544e9['version']);case _0x5196c2(0x1ef):return'Requested\x20version:\x20'+a40_0x10064d[_0x5196c2(0x1f9)](_0x3b7edd)+'\x20→\x20'+a40_0x10064d[_0x5196c2(0x1f1)](_0x3544e9['version']);case _0x5196c2(0x1e9):default:return'Update\x20available:\x20'+a40_0x10064d[_0x5196c2(0x1f9)](_0x3b7edd)+_0x5196c2(0x1d8)+a40_0x10064d['green'](_0x3544e9['version']);}}async function installCliSkill(_0x3c6433){const _0x5e0483=a40_0x30d99c;console[_0x5e0483(0x1fb)](a40_0x10064d['gray'](_0x5e0483(0x1dc)));const _0x199ffe=runNpxSkillsAddGlobal(process[_0x5e0483(0x1bd)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x3c6433?'pipe':'inherit'});if(_0x199ffe['skipped']){console[_0x5e0483(0x1fb)](a40_0x10064d[_0x5e0483(0x1d1)](_0x5e0483(0x1db)));return;}if(_0x199ffe['ok']){console[_0x5e0483(0x1fb)](a40_0x10064d[_0x5e0483(0x1d1)](_0x5e0483(0x20a)));return;}console[_0x5e0483(0x1ed)](a40_0x10064d['yellow'](_0x5e0483(0x1f3)+(_0x199ffe['error']||'unknown'))),console[_0x5e0483(0x1fb)](a40_0x10064d['gray'](_0x5e0483(0x1d9)+CLI_BIN_NAME+_0x5e0483(0x213)));}async function execute(_0x2fb2fd){const _0x296d44=a40_0x30d99c;await validateUpdateFlags(_0x2fb2fd);const _0x3bcaf6=getCurrentVersion();console[_0x296d44(0x1fb)](_0x296d44(0x20e)+_0x3bcaf6);const _0x22cba2=a40_0x2907a3(_0x296d44(0x1cc))[_0x296d44(0x1c0)](),_0x33f936=await resolveTargetVersion(_0x2fb2fd);if(!_0x33f936){const _0x4073fc=_0x2fb2fd[_0x296d44(0x1ea)](_0x296d44(0x1ff))?_0x296d44(0x202):_0x296d44(0x1f4);return _0x22cba2[_0x296d44(0x1eb)](_0x4073fc),console[_0x296d44(0x1fb)](a40_0x10064d['gray'](_0x296d44(0x1c1)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x4073fc};}const _0x60d85a=a40_0x481b7a[_0x296d44(0x1f5)](VERSION),_0x38c275=a40_0x481b7a[_0x296d44(0x1f5)](_0x33f936[_0x296d44(0x1ef)]);if(!_0x60d85a||!_0x38c275)return _0x22cba2[_0x296d44(0x1eb)](_0x296d44(0x20f)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x60d85a,_0x33f936)){const _0x2f73aa=_0x33f936[_0x296d44(0x1e0)]===_0x296d44(0x1ef)?_0x296d44(0x1ee)+_0x33f936[_0x296d44(0x1ef)]+')':_0x296d44(0x1fc)+_0x33f936['version']+')';return _0x22cba2[_0x296d44(0x1e2)](_0x2f73aa),shouldSkipCliSkill(_0x2fb2fd)?console[_0x296d44(0x1fb)](a40_0x10064d['gray'](_0x296d44(0x200))):await installCliSkill(_0x2fb2fd['nonInteractive']),{'ok':!![]};}_0x22cba2[_0x296d44(0x204)](getInstallPlanLabel(_0x3bcaf6,_0x33f936));const _0x38b522=detectPackageManager(),_0x5cc4ef=_0x38b522===_0x296d44(0x1c4)?resolveNpmBin(_0x296d44(0x1c4)):_0x38b522,_0x565b43=a40_0x2907a3(_0x296d44(0x1d3)+_0x38b522+_0x296d44(0x1da))[_0x296d44(0x1c0)]();try{return await execa(_0x5cc4ef,[_0x296d44(0x203),'-g',NPM_PACKAGE_NAME+'@'+_0x33f936[_0x296d44(0x1ef)]],{'stdio':_0x296d44(0x1c9)}),_0x565b43[_0x296d44(0x1e2)](_0x296d44(0x1dd)+_0x33f936[_0x296d44(0x1ef)]),console[_0x296d44(0x1fb)](a40_0x10064d[_0x296d44(0x1d1)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x2fb2fd)?console['log'](a40_0x10064d[_0x296d44(0x1d1)]('Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).')):await installCliSkill(_0x2fb2fd[_0x296d44(0x1cd)]),{'ok':!![]};}catch(_0x333dc4){return _0x565b43[_0x296d44(0x1eb)](_0x296d44(0x1d7)),console[_0x296d44(0x1df)](a40_0x10064d[_0x296d44(0x1fd)]('\x20\x20'+_0x333dc4[_0x296d44(0x1cb)])),console[_0x296d44(0x1fb)](a40_0x10064d[_0x296d44(0x1d1)](_0x296d44(0x210)+_0x38b522+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x33f936['version'])),{'ok':![],'message':_0x333dc4[_0x296d44(0x1cb)]};}}function a40_0x1245(){const _0x46c040=['10tZQQCE','Updating\x20via\x20','run','includes','validation','Update\x20failed','\x20→\x20','\x20\x20Run\x20manually:\x20','...','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Checking\x20CLI\x20Built-in\x20Skill...','Updated\x20to\x20v','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','error','source','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','succeed','fromEntries','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','bun','entries','toLowerCase','latest','bool','fail','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','warn','Already\x20on\x20requested\x20version\x20(v','version','12aQtJkL','green','slice','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','valid','length','trim','1849491tUjsCh','yellow','7uplTTl','log','Already\x20up\x20to\x20date\x20(v','red','36zWIbRv','beta','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','479070YlSyPq','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','install','info','filter','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','456qDwSDn','object','flag','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','execPath','1126948pTpvWf','2239501yeeMDx','Current\x20version:\x20','Version\x20comparison\x20failed','\x20\x20Try\x20manually:\x20','update','https://registry.npmjs.org/-/package/','\x20cli-skill\x20install','write','boolean','cwd','map','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','start','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','171694IOBKCQ','skills','npm','str','unknown','timeout','Beta\x20version:\x20','pipe','136405KewWPw','message','Checking\x20for\x20updates...','nonInteractive','Install\x20a\x20specific\x20CLI\x20version','no-skills','226366DDqzyW','gray'];a40_0x1245=function(){return _0x46c040;};return a40_0x1245();}export const updateDefinition={'service':a40_0x30d99c(0x211),'command':a40_0x30d99c(0x1d4),'description':a40_0x30d99c(0x1de),'risk':a40_0x30d99c(0x1bb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0xae5f75=a40_0xf5cd;(function(_0x4b1eeb,_0x45fe63){const _0x7591a4=a40_0xf5cd,_0x392dec=_0x4b1eeb();while(!![]){try{const _0xbab34=parseInt(_0x7591a4(0xa3))/0x1+-parseInt(_0x7591a4(0xb6))/0x2+parseInt(_0x7591a4(0x90))/0x3*(parseInt(_0x7591a4(0xa5))/0x4)+parseInt(_0x7591a4(0xaa))/0x5*(parseInt(_0x7591a4(0xdd))/0x6)+-parseInt(_0x7591a4(0x99))/0x7+parseInt(_0x7591a4(0xa9))/0x8+-parseInt(_0x7591a4(0xd4))/0x9*(parseInt(_0x7591a4(0xb7))/0xa);if(_0xbab34===_0x45fe63)break;else _0x392dec['push'](_0x392dec['shift']());}catch(_0x3a07a9){_0x392dec['push'](_0x392dec['shift']());}}}(a40_0x2896,0x6b193));import a40_0x47d7c6 from'chalk';import a40_0x3ef4b3 from'ora';import a40_0x439034 from'semver';import{execa}from'execa';function a40_0xf5cd(_0x1b6338,_0xbc9e54){_0x1b6338=_0x1b6338-0x8d;const _0x28960c=a40_0x2896();let _0xf5cd57=_0x28960c[_0x1b6338];return _0xf5cd57;}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 _0x45a878=a40_0xf5cd;return GIT_COMMIT!==_0x45a878(0xb0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x45a878(0xd5)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4abca0=a40_0xf5cd,_0x7e9ba1=process[_0x4abca0(0xa7)][_0x4abca0(0xb8)]();if(_0x7e9ba1[_0x4abca0(0xc6)](_0x4abca0(0xcf)))return'bun';return'npm';}const updateFlags=[{'name':a40_0xae5f75(0xac),'type':a40_0xae5f75(0xa0),'description':a40_0xae5f75(0x94),'default':![]},{'name':a40_0xae5f75(0x97),'type':'string','description':a40_0xae5f75(0xb1)},{'name':a40_0xae5f75(0xcb),'type':'boolean','description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0xae5f75(0x98),'type':a40_0xae5f75(0xa0),'description':a40_0xae5f75(0x8f),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x5ef7e9){const _0x363908=a40_0xae5f75;return _0x5ef7e9[_0x363908(0x8d)](_0x363908(0x97))[_0x363908(0xb3)]();}function shouldSkipCliSkill(_0x45d333){const _0x3aea77=a40_0xae5f75;return _0x45d333[_0x3aea77(0xcc)](_0x3aea77(0xcb))||_0x45d333[_0x3aea77(0xd0)](_0x3aea77(0x98))===![];}async function validateUpdateFlags(_0x7660a0){const _0x10a384=a40_0xae5f75,_0x4799fe=_0x7660a0[_0x10a384(0xcc)]('beta'),_0x3429a0=getRequestedVersion(_0x7660a0);if(_0x4799fe&&_0x3429a0)throw CliErrors[_0x10a384(0xbc)](_0x10a384(0xd1),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x3429a0&&!a40_0x439034[_0x10a384(0xb2)](_0x3429a0))throw CliErrors[_0x10a384(0xbc)](_0x10a384(0x9d)+_0x3429a0,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x5712a9=a40_0xae5f75;try{const _0x3fbf40=await fetch(_0x5712a9(0xd7)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x5712a9(0x9e),{'signal':AbortSignal[_0x5712a9(0xd8)](0x2710)});if(!_0x3fbf40['ok'])return null;const _0x4b4e95=await _0x3fbf40[_0x5712a9(0x96)]();if(!_0x4b4e95||typeof _0x4b4e95!==_0x5712a9(0xa6))return null;return Object[_0x5712a9(0xd2)](Object[_0x5712a9(0xa2)](_0x4b4e95)[_0x5712a9(0xda)](([,_0x3cb246])=>typeof _0x3cb246==='string'&&_0x3cb246[_0x5712a9(0xb3)]()['length']>0x0)[_0x5712a9(0xc1)](([_0x5cc26b,_0x361709])=>[_0x5cc26b,String(_0x361709)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x34b10f){const _0x847f25=await fetchNpmDistTags();return _0x847f25?.[_0x34b10f]??null;}async function fetchLatestVersion(){const _0x43585d=a40_0xae5f75;return fetchNpmDistTagVersion(_0x43585d(0xce));}async function resolveTargetVersion(_0x1aad7e){const _0x27a9fb=a40_0xae5f75,_0x43ee70=getRequestedVersion(_0x1aad7e);if(_0x43ee70)return{'version':_0x43ee70,'source':_0x27a9fb(0x97)};if(_0x1aad7e[_0x27a9fb(0xcc)](_0x27a9fb(0xac))){const _0x257ee3=await fetchNpmDistTagVersion(_0x27a9fb(0xac));if(!_0x257ee3)return null;return{'version':_0x257ee3,'source':_0x27a9fb(0xac)};}const _0x5e21cb=await fetchLatestVersion();if(!_0x5e21cb)return null;return{'version':_0x5e21cb,'source':_0x27a9fb(0xce)};}function shouldInstallTarget(_0x9d0b11,_0xfedf3d){const _0x22d531=a40_0xae5f75;if(_0xfedf3d[_0x22d531(0xb9)]==='version'||_0xfedf3d[_0x22d531(0xb9)]===_0x22d531(0xac))return!a40_0x439034['eq'](_0x9d0b11,_0xfedf3d[_0x22d531(0x97)]);return a40_0x439034['lt'](_0x9d0b11,_0xfedf3d[_0x22d531(0x97)]);}function getInstallPlanLabel(_0x5f1b9d,_0x4f0392){const _0x373f78=a40_0xae5f75;switch(_0x4f0392['source']){case'beta':return _0x373f78(0xd9)+a40_0x47d7c6[_0x373f78(0xa1)](_0x5f1b9d)+'\x20→\x20'+a40_0x47d7c6[_0x373f78(0x92)](_0x4f0392['version']);case _0x373f78(0x97):return _0x373f78(0xdc)+a40_0x47d7c6['yellow'](_0x5f1b9d)+_0x373f78(0x8e)+a40_0x47d7c6[_0x373f78(0x92)](_0x4f0392[_0x373f78(0x97)]);case'latest':default:return _0x373f78(0x9f)+a40_0x47d7c6[_0x373f78(0xa1)](_0x5f1b9d)+_0x373f78(0x8e)+a40_0x47d7c6['green'](_0x4f0392[_0x373f78(0x97)]);}}async function installCliSkill(_0xbd1005){const _0x1193ac=a40_0xae5f75;console['log'](a40_0x47d7c6['gray'](_0x1193ac(0x9b)));const _0x1fd2ae=runNpxSkillsAddGlobal(process[_0x1193ac(0xdb)](),RABETBASE_SKILL_SOURCE,{'stdio':_0xbd1005?_0x1193ac(0xb4):_0x1193ac(0xcd)});if(_0x1fd2ae['skipped']){console[_0x1193ac(0xc7)](a40_0x47d7c6[_0x1193ac(0xb5)](_0x1193ac(0xd3)));return;}if(_0x1fd2ae['ok']){console[_0x1193ac(0xc7)](a40_0x47d7c6[_0x1193ac(0xb5)](_0x1193ac(0xaf)));return;}console[_0x1193ac(0xa8)](a40_0x47d7c6[_0x1193ac(0xa1)](_0x1193ac(0xad)+(_0x1fd2ae[_0x1193ac(0xdf)]||_0x1193ac(0xb0)))),console[_0x1193ac(0xc7)](a40_0x47d7c6[_0x1193ac(0xb5)](_0x1193ac(0xa4)+CLI_BIN_NAME+_0x1193ac(0xba)));}async function execute(_0x3d3a79){const _0x353e2c=a40_0xae5f75;await validateUpdateFlags(_0x3d3a79);const _0xe642ab=getCurrentVersion();console[_0x353e2c(0xc7)](_0x353e2c(0x9a)+_0xe642ab);const _0xc6bfd6=a40_0x3ef4b3(_0x353e2c(0x9c))['start'](),_0x18dfe8=await resolveTargetVersion(_0x3d3a79);if(!_0x18dfe8){const _0x3df1a5=_0x3d3a79['bool'](_0x353e2c(0xac))?_0x353e2c(0xbb):_0x353e2c(0xc3);return _0xc6bfd6[_0x353e2c(0xbd)](_0x3df1a5),console[_0x353e2c(0xc7)](a40_0x47d7c6[_0x353e2c(0xb5)](_0x353e2c(0xc5)+NPM_PACKAGE_NAME+_0x353e2c(0x91))),{'ok':![],'message':_0x3df1a5};}const _0x3d0518=a40_0x439034['valid'](VERSION),_0x48ba99=a40_0x439034[_0x353e2c(0xb2)](_0x18dfe8['version']);if(!_0x3d0518||!_0x48ba99)return _0xc6bfd6[_0x353e2c(0xbd)](_0x353e2c(0xae)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x3d0518,_0x18dfe8)){const _0x5732f3=_0x18dfe8[_0x353e2c(0xb9)]==='version'?_0x353e2c(0xc9)+_0x18dfe8[_0x353e2c(0x97)]+')':_0x353e2c(0x95)+_0x18dfe8[_0x353e2c(0x97)]+')';return _0xc6bfd6['succeed'](_0x5732f3),shouldSkipCliSkill(_0x3d3a79)?console['log'](a40_0x47d7c6[_0x353e2c(0xb5)](_0x353e2c(0xe0))):await installCliSkill(_0x3d3a79['nonInteractive']),{'ok':!![]};}_0xc6bfd6[_0x353e2c(0xab)](getInstallPlanLabel(_0xe642ab,_0x18dfe8));const _0x2c2fd5=detectPackageManager(),_0x183346=_0x2c2fd5===_0x353e2c(0x93)?resolveNpmBin(_0x353e2c(0x93)):_0x2c2fd5,_0x3cb696=a40_0x3ef4b3(_0x353e2c(0xbf)+_0x2c2fd5+'...')['start']();try{return await execa(_0x183346,[_0x353e2c(0xca),'-g',NPM_PACKAGE_NAME+'@'+_0x18dfe8[_0x353e2c(0x97)]],{'stdio':_0x353e2c(0xb4)}),_0x3cb696[_0x353e2c(0xc4)]('Updated\x20to\x20v'+_0x18dfe8[_0x353e2c(0x97)]),console[_0x353e2c(0xc7)](a40_0x47d7c6['gray'](_0x353e2c(0xd6))),shouldSkipCliSkill(_0x3d3a79)?console[_0x353e2c(0xc7)](a40_0x47d7c6[_0x353e2c(0xb5)](_0x353e2c(0xe0))):await installCliSkill(_0x3d3a79['nonInteractive']),{'ok':!![]};}catch(_0x2e084b){return _0x3cb696[_0x353e2c(0xbd)](_0x353e2c(0xbe)),console[_0x353e2c(0xdf)](a40_0x47d7c6['red']('\x20\x20'+_0x2e084b[_0x353e2c(0xc8)])),console[_0x353e2c(0xc7)](a40_0x47d7c6[_0x353e2c(0xb5)](_0x353e2c(0xc2)+_0x2c2fd5+_0x353e2c(0xc0)+NPM_PACKAGE_NAME+'@'+_0x18dfe8[_0x353e2c(0x97)])),{'ok':![],'message':_0x2e084b[_0x353e2c(0xc8)]};}}function a40_0x2896(){const _0x336da1=['Requested\x20version:\x20','732bDsjMf','run','error','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','str','\x20→\x20','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','302502IdWCau','@latest','green','npm','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Already\x20up\x20to\x20date\x20(v','json','version','skills','3506776PHkHaR','Current\x20version:\x20','Checking\x20CLI\x20Built-in\x20Skill...','Checking\x20for\x20updates...','Invalid\x20version:\x20','/dist-tags','Update\x20available:\x20','boolean','yellow','entries','361899gukvQK','\x20\x20Run\x20manually:\x20','8gMczsg','object','execPath','warn','4143880CNvsHl','19310PbGCEl','info','beta','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','Version\x20comparison\x20failed','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','unknown','Install\x20a\x20specific\x20CLI\x20version','valid','trim','pipe','gray','438288obyweZ','10smjNHB','toLowerCase','source','\x20cli-skill\x20install','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','validation','fail','Update\x20failed','Updating\x20via\x20','\x20install\x20-g\x20','map','\x20\x20Try\x20manually:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','succeed','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','includes','log','message','Already\x20on\x20requested\x20version\x20(v','install','no-skills','bool','inherit','latest','bun','flag','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','fromEntries','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','3545361FpDVfP','slice','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','https://registry.npmjs.org/-/package/','timeout','Beta\x20version:\x20','filter','cwd'];a40_0x2896=function(){return _0x336da1;};return a40_0x2896();}export const updateDefinition={'service':'update','command':a40_0xae5f75(0xde),'description':a40_0xae5f75(0xe1),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a41_0x4d3e(_0x3f77e0,_0x457172){_0x3f77e0=_0x3f77e0-0x75;const _0x213fee=a41_0x213f();let _0x4d3ed2=_0x213fee[_0x3f77e0];return _0x4d3ed2;}(function(_0x9cc5ff,_0x1850b5){const _0x244bf7=a41_0x4d3e,_0x356068=_0x9cc5ff();while(!![]){try{const _0x131996=-parseInt(_0x244bf7(0x77))/0x1*(-parseInt(_0x244bf7(0x75))/0x2)+-parseInt(_0x244bf7(0x79))/0x3+-parseInt(_0x244bf7(0x7b))/0x4+-parseInt(_0x244bf7(0x7c))/0x5+parseInt(_0x244bf7(0x76))/0x6+parseInt(_0x244bf7(0x7a))/0x7+parseInt(_0x244bf7(0x78))/0x8;if(_0x131996===_0x1850b5)break;else _0x356068['push'](_0x356068['shift']());}catch(_0x856ee0){_0x356068['push'](_0x356068['shift']());}}}(a41_0x213f,0xc78e8));import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x213f(){const _0xd8f6b5=['8067768xVbIcw','4hCHpsI','24363368LfzWDz','4769490OHKDOL','3857287FDTrnr','6488784LtKeNQ','7861260Lchdwm','330286PmAutN'];a41_0x213f=function(){return _0xd8f6b5;};return a41_0x213f();}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x2877e5,_0x5d3323){const _0x16d548=a41_0x49cd,_0x228362=_0x2877e5();while(!![]){try{const _0xe5692b=parseInt(_0x16d548(0x1ef))/0x1+-parseInt(_0x16d548(0x1f5))/0x2+-parseInt(_0x16d548(0x1f4))/0x3+-parseInt(_0x16d548(0x1f6))/0x4+parseInt(_0x16d548(0x1f2))/0x5*(parseInt(_0x16d548(0x1f1))/0x6)+parseInt(_0x16d548(0x1f0))/0x7*(parseInt(_0x16d548(0x1f3))/0x8)+parseInt(_0x16d548(0x1ee))/0x9;if(_0xe5692b===_0x5d3323)break;else _0x228362['push'](_0x228362['shift']());}catch(_0x10ee74){_0x228362['push'](_0x228362['shift']());}}}(a41_0xcaf4,0x4a14c));function a41_0x49cd(_0x586602,_0x2ba941){_0x586602=_0x586602-0x1ee;const _0xcaf424=a41_0xcaf4();let _0x49cda8=_0xcaf424[_0x586602];return _0x49cda8;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0xcaf4(){const _0x38b0ab=['80969KrwvdC','12RsRISo','1026005JuzWXr','152ALlqUP','1509192oaQeHH','1146360uJUxta','531948pHDQdp','4057659RfVMtC','431641gtSsTO'];a41_0xcaf4=function(){return _0x38b0ab;};return a41_0xcaf4();}
@@ -1 +1 @@
1
- const a42_0x59b8a3=a42_0x3483;function a42_0x3483(_0x728c60,_0x427019){_0x728c60=_0x728c60-0x10d;const _0x3832f3=a42_0x3832();let _0x3483d4=_0x3832f3[_0x728c60];return _0x3483d4;}(function(_0x7a3f02,_0x5b1976){const _0xdc4389=a42_0x3483,_0x293aed=_0x7a3f02();while(!![]){try{const _0xb83ee3=parseInt(_0xdc4389(0x11c))/0x1*(parseInt(_0xdc4389(0x11e))/0x2)+parseInt(_0xdc4389(0x110))/0x3*(parseInt(_0xdc4389(0x11b))/0x4)+-parseInt(_0xdc4389(0x111))/0x5*(-parseInt(_0xdc4389(0x11d))/0x6)+parseInt(_0xdc4389(0x10d))/0x7*(-parseInt(_0xdc4389(0x121))/0x8)+parseInt(_0xdc4389(0x123))/0x9*(-parseInt(_0xdc4389(0x117))/0xa)+parseInt(_0xdc4389(0x10f))/0xb+parseInt(_0xdc4389(0x122))/0xc*(-parseInt(_0xdc4389(0x113))/0xd);if(_0xb83ee3===_0x5b1976)break;else _0x293aed['push'](_0x293aed['shift']());}catch(_0x597847){_0x293aed['push'](_0x293aed['shift']());}}}(a42_0x3832,0x67135));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x3832(){const _0x53cb07=['2281215UpaDdy','5zTRihU','str','164398NxOknD','name','skip-imports','Omit\x20import\x20statements\x20from\x20generated\x20code','62680PqsDmr','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','operation','code','4KwSBkY','240107pDFTIz','277044krzjqU','2dthBHv','alias','sdk','152024cJTzTQ','288xGEHQv','144kNLZHn','string','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','bool','119SaIfAi','appCode','1125894PVOBbB'];a42_0x3832=function(){return _0x53cb07;};return a42_0x3832();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a42_0x59b8a3(0x120),'description':a42_0x59b8a3(0x118),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x59b8a3(0x11f),'type':a42_0x59b8a3(0x124),'description':a42_0x59b8a3(0x125)},{'name':a42_0x59b8a3(0x119),'type':a42_0x59b8a3(0x124),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':'skip-imports','type':'boolean','description':a42_0x59b8a3(0x116)}],async 'execute'(_0x1bc239){const _0x3f1bd7=a42_0x59b8a3,{dataset:_0x115bd5,operation:_0x1c6585}=await getOperationDetail(_0x1bc239[_0x3f1bd7(0x10e)],_0x1bc239[_0x3f1bd7(0x112)](_0x3f1bd7(0x11a)),_0x1bc239[_0x3f1bd7(0x112)](_0x3f1bd7(0x119))),_0x5809d4=generateSdkCode(_0x115bd5,_0x1c6585,{'includeImports':!_0x1bc239[_0x3f1bd7(0x126)](_0x3f1bd7(0x115))});return{'ok':!![],'data':{'dataset':{'name':_0x115bd5[_0x3f1bd7(0x114)],'code':_0x115bd5['code'],'tableName':_0x115bd5['tableName']},'operation':_0x1bc239[_0x3f1bd7(0x112)](_0x3f1bd7(0x119)),'code':_0x5809d4}};}};
1
+ const a42_0x45c7a6=a42_0x5949;(function(_0x478d31,_0x17fd8e){const _0x4b7ebf=a42_0x5949,_0x315626=_0x478d31();while(!![]){try{const _0x3ebfd2=parseInt(_0x4b7ebf(0xa5))/0x1+parseInt(_0x4b7ebf(0xa9))/0x2*(-parseInt(_0x4b7ebf(0xb1))/0x3)+-parseInt(_0x4b7ebf(0xae))/0x4+-parseInt(_0x4b7ebf(0xa2))/0x5*(-parseInt(_0x4b7ebf(0xab))/0x6)+-parseInt(_0x4b7ebf(0xa7))/0x7+-parseInt(_0x4b7ebf(0xb3))/0x8*(parseInt(_0x4b7ebf(0xb4))/0x9)+parseInt(_0x4b7ebf(0xb2))/0xa*(parseInt(_0x4b7ebf(0xb0))/0xb);if(_0x3ebfd2===_0x17fd8e)break;else _0x315626['push'](_0x315626['shift']());}catch(_0x49b357){_0x315626['push'](_0x315626['shift']());}}}(a42_0x2610,0xb703d));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a42_0x45c7a6(0xaf),'description':a42_0x45c7a6(0xa6),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x45c7a6(0xa8),'type':'string','description':a42_0x45c7a6(0xb7)},{'name':a42_0x45c7a6(0xba),'type':a42_0x45c7a6(0xb6),'required':!![],'description':a42_0x45c7a6(0xac)},{'name':a42_0x45c7a6(0xa1),'type':a42_0x45c7a6(0xa4),'description':a42_0x45c7a6(0xb8)}],async 'execute'(_0xaa0d0c){const _0x5f27e1=a42_0x45c7a6,{dataset:_0x34bdce,operation:_0x4b006f}=await getOperationDetail(_0xaa0d0c['appCode'],_0xaa0d0c[_0x5f27e1(0xb9)](_0x5f27e1(0xb5)),_0xaa0d0c['str'](_0x5f27e1(0xba))),_0x2cb4a6=generateSdkCode(_0x34bdce,_0x4b006f,{'includeImports':!_0xaa0d0c[_0x5f27e1(0xa3)](_0x5f27e1(0xa1))});return{'ok':!![],'data':{'dataset':{'name':_0x34bdce[_0x5f27e1(0xad)],'code':_0x34bdce['code'],'tableName':_0x34bdce[_0x5f27e1(0xaa)]},'operation':_0xaa0d0c[_0x5f27e1(0xb9)](_0x5f27e1(0xba)),'code':_0x2cb4a6}};}};function a42_0x5949(_0x4af6af,_0x76b59d){_0x4af6af=_0x4af6af-0xa1;const _0x26108a=a42_0x2610();let _0x5949c9=_0x26108a[_0x4af6af];return _0x5949c9;}function a42_0x2610(){const _0x278fc0=['181310XZdbiK','2056oIhPHA','11943QKXGZP','code','string','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Omit\x20import\x20statements\x20from\x20generated\x20code','str','operation','skip-imports','2801870DUFyhC','bool','boolean','596173uZCTEZ','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','8606080YxAaDp','alias','6YVHpcY','tableName','6dwUvAd','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','name','5691708gguUHr','sdk','1727vQUZIv','260079LSJOJs'];a42_0x2610=function(){return _0x278fc0;};return a42_0x2610();}
@@ -1 +1 @@
1
- const a43_0x509f53=a43_0x2b76;(function(_0x5931e8,_0x32e6ba){const _0x11575e=a43_0x2b76,_0xfcda67=_0x5931e8();while(!![]){try{const _0x5edc35=parseInt(_0x11575e(0x8f))/0x1*(-parseInt(_0x11575e(0x93))/0x2)+-parseInt(_0x11575e(0x7b))/0x3*(parseInt(_0x11575e(0x82))/0x4)+-parseInt(_0x11575e(0x94))/0x5*(parseInt(_0x11575e(0x8b))/0x6)+-parseInt(_0x11575e(0x79))/0x7*(-parseInt(_0x11575e(0x84))/0x8)+-parseInt(_0x11575e(0x8d))/0x9*(-parseInt(_0x11575e(0x7f))/0xa)+parseInt(_0x11575e(0x81))/0xb+-parseInt(_0x11575e(0x8a))/0xc*(-parseInt(_0x11575e(0x88))/0xd);if(_0x5edc35===_0x32e6ba)break;else _0xfcda67['push'](_0xfcda67['shift']());}catch(_0x1e80a3){_0xfcda67['push'](_0xfcda67['shift']());}}}(a43_0x197e,0x4425b));function a43_0x197e(){const _0x13d5b5=['boolean','368811exVRpQ','string','173wVvmUI','str','appCode','target','5926uLdwPu','355XcqeEF','codegen','3485251mfqGWZ','bool','3nbSDXs','read','sqlCode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','110Ktozyx','sqlName','3325454HPeoMR','898436rOcLyh','no-imports','8iOgiPB','sql','bff','sdk','1027xJOSRE','sqlcode','22392uXvzPM','32286JRIoxZ'];a43_0x197e=function(){return _0x13d5b5;};return a43_0x197e();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x2b76(_0x2c4f0f,_0x1e3aa0){_0x2c4f0f=_0x2c4f0f-0x79;const _0x197e54=a43_0x197e();let _0x2b7603=_0x197e54[_0x2c4f0f];return _0x2b7603;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x509f53(0x95),'command':a43_0x509f53(0x85),'description':a43_0x509f53(0x7e),'risk':a43_0x509f53(0x7c),'flags':[SQLCODE_FLAG,{'name':a43_0x509f53(0x92),'type':a43_0x509f53(0x8e),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a43_0x509f53(0x87),'enum':[a43_0x509f53(0x87),a43_0x509f53(0x86)]},{'name':'no-imports','type':a43_0x509f53(0x8c),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x2cb08d){const _0x20f9f1=a43_0x509f53,_0x460700=await getSqlQueryInfo(_0x2cb08d[_0x20f9f1(0x91)],_0x2cb08d[_0x20f9f1(0x90)](_0x20f9f1(0x89))),_0x2b49bc=_0x2cb08d[_0x20f9f1(0x90)](_0x20f9f1(0x92))||_0x20f9f1(0x87),_0x54094b=generateSqlCodeTemplate(_0x460700,{'target':_0x2b49bc,'includeImports':!_0x2cb08d[_0x20f9f1(0x7a)](_0x20f9f1(0x83))});return{'ok':!![],'data':{'sqlCode':_0x460700[_0x20f9f1(0x7d)],'sqlName':_0x460700[_0x20f9f1(0x80)],'target':_0x2b49bc,'code':_0x54094b}};}};
1
+ const a43_0xa697a0=a43_0x3fbe;(function(_0x4e3e1e,_0xeec18){const _0x2c7baa=a43_0x3fbe,_0x4bd013=_0x4e3e1e();while(!![]){try{const _0x35d10a=-parseInt(_0x2c7baa(0x19c))/0x1*(-parseInt(_0x2c7baa(0x1ac))/0x2)+-parseInt(_0x2c7baa(0x1a1))/0x3+-parseInt(_0x2c7baa(0x1aa))/0x4+-parseInt(_0x2c7baa(0x1ab))/0x5*(-parseInt(_0x2c7baa(0x1a2))/0x6)+parseInt(_0x2c7baa(0x1a9))/0x7+-parseInt(_0x2c7baa(0x1a8))/0x8+parseInt(_0x2c7baa(0x19b))/0x9;if(_0x35d10a===_0xeec18)break;else _0x4bd013['push'](_0x4bd013['shift']());}catch(_0x1b15e1){_0x4bd013['push'](_0x4bd013['shift']());}}}(a43_0x12c8,0xe91c4));function a43_0x12c8(){const _0x276452=['Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','appCode','no-imports','sqlcode','8860592GPWugE','8894347xkHdED','3722488zmHbMF','5zFtozb','3168178pmBRac','bff','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','read','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','171171VhEsHI','1jmMNDs','str','boolean','target','codegen','2555448ewwXVJ','5826618ynCLoY'];a43_0x12c8=function(){return _0x276452;};return a43_0x12c8();}function a43_0x3fbe(_0x2158e0,_0x52398d){_0x2158e0=_0x2158e0-0x19b;const _0x12c83=a43_0x12c8();let _0x3fbe46=_0x12c83[_0x2158e0];return _0x3fbe46;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0xa697a0(0x1a0),'command':'sql','description':a43_0xa697a0(0x1b0),'risk':a43_0xa697a0(0x1af),'flags':[SQLCODE_FLAG,{'name':a43_0xa697a0(0x19f),'type':'string','description':a43_0xa697a0(0x1ae),'default':'sdk','enum':[a43_0xa697a0(0x1a4),a43_0xa697a0(0x1ad)]},{'name':a43_0xa697a0(0x1a6),'type':a43_0xa697a0(0x19e),'description':a43_0xa697a0(0x1a3)}],async 'execute'(_0x370d58){const _0x3bff70=a43_0xa697a0,_0x542dcf=await getSqlQueryInfo(_0x370d58[_0x3bff70(0x1a5)],_0x370d58[_0x3bff70(0x19d)](_0x3bff70(0x1a7))),_0x4232aa=_0x370d58[_0x3bff70(0x19d)](_0x3bff70(0x19f))||'sdk',_0xe71238=generateSqlCodeTemplate(_0x542dcf,{'target':_0x4232aa,'includeImports':!_0x370d58['bool'](_0x3bff70(0x1a6))});return{'ok':!![],'data':{'sqlCode':_0x542dcf['sqlCode'],'sqlName':_0x542dcf['sqlName'],'target':_0x4232aa,'code':_0xe71238}};}};
@@ -1 +1 @@
1
- (function(_0x2ff49f,_0x43bb45){const _0x3d8cf9=a44_0x40cc,_0x937165=_0x2ff49f();while(!![]){try{const _0x309d03=-parseInt(_0x3d8cf9(0x17c))/0x1+-parseInt(_0x3d8cf9(0x156))/0x2+-parseInt(_0x3d8cf9(0x17a))/0x3*(parseInt(_0x3d8cf9(0x177))/0x4)+parseInt(_0x3d8cf9(0x16c))/0x5+-parseInt(_0x3d8cf9(0x16d))/0x6*(parseInt(_0x3d8cf9(0x16a))/0x7)+-parseInt(_0x3d8cf9(0x160))/0x8*(parseInt(_0x3d8cf9(0x151))/0x9)+-parseInt(_0x3d8cf9(0x161))/0xa*(-parseInt(_0x3d8cf9(0x150))/0xb);if(_0x309d03===_0x43bb45)break;else _0x937165['push'](_0x937165['shift']());}catch(_0xa42b4f){_0x937165['push'](_0x937165['shift']());}}}(a44_0x57ae,0xdad39));function a44_0x57ae(){const _0x5c74aa=['appcode','\x22\x20not\x20found.','3257670DEljpC','\x20Note:\x20app\x20\x22','str','flagMissing','Usage:\x20','boolean','keys','global','App\x20\x22','\x20config.','16DhgRyQ','50KJXUFu','trim','inherit','bool','defaultApp','project','Updated','Removed\x20app\x20\x22','\x20<name>\x20--appcode\x20<code>','119suLvDs','\x20<name>','6618050BnQnOx','18276HYjfeG','Missing\x20app\x20name.','length','Use\x20global\x20config\x20scope','string','\x20<name>\x20[--global]','apps','\x20Default\x20app\x20changed\x20to\x20\x22','projectConfig','globalConfig','11156lUSnIE','object','Added','1008eQPrza','both','1579539IcmUFK','\x22\x20still\x20defined\x20in\x20','11659879veuTbs','6884919gRXFGD','App\x20code','validation'];a44_0x57ae=function(){return _0x5c74aa;};return a44_0x57ae();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0xaedf08=a44_0x40cc;return[{'name':'appcode','type':_0xaedf08(0x171),'description':_0xaedf08(0x152),'required':!![]},{'name':_0xaedf08(0x15d),'type':_0xaedf08(0x15b),'description':_0xaedf08(0x170),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x406cbd=a44_0x40cc;return[{'name':_0x406cbd(0x15d),'type':'boolean','description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x4a31a5,_0x531727){const _0x4789c1=a44_0x40cc,_0xa448a3=_0x4a31a5['args'][0x0]?.[_0x4789c1(0x162)]();if(!_0xa448a3)throw CliErrors[_0x4789c1(0x153)](_0x4789c1(0x16e),_0x4789c1(0x15a)+CLI_BIN_NAME+'\x20'+_0x531727+_0x4789c1(0x16b));}export async function runAppAdd(_0x60cdf,_0x108fa3){const _0x47ef22=a44_0x40cc,_0x35833b=_0x60cdf['args'][0x0]?.[_0x47ef22(0x162)]();if(!_0x35833b)throw CliErrors['validation'](_0x47ef22(0x16e),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x108fa3+_0x47ef22(0x169));const _0x197a01=_0x60cdf[_0x47ef22(0x158)]('appcode');if(!_0x197a01)throw CliErrors[_0x47ef22(0x159)](_0x47ef22(0x154),_0x47ef22(0x15a)+CLI_BIN_NAME+'\x20'+_0x108fa3+_0x47ef22(0x169));const _0x55811c={'global':_0x60cdf[_0x47ef22(0x164)](_0x47ef22(0x15d))},_0xa080a2=readConfig(_0x55811c);if(!_0xa080a2['apps'])_0xa080a2[_0x47ef22(0x173)]={};const _0x43dc0b={'appcode':_0x197a01,...collectAppProfileOverrides(_0x4662cd=>_0x60cdf[_0x47ef22(0x158)](_0x4662cd))},_0x44e21a=_0xa080a2[_0x47ef22(0x173)],_0x27a747=!!_0x44e21a[_0x35833b];_0x44e21a[_0x35833b]=_0x43dc0b;if(!_0xa080a2['defaultApp'])_0xa080a2[_0x47ef22(0x165)]=_0x35833b;writeConfig(_0xa080a2,_0x55811c);const _0x37cd31=!_0x27a747&&_0xa080a2[_0x47ef22(0x165)]===_0x35833b?'\x20Set\x20as\x20default\x20app.':'',_0x375f37=(_0x27a747?_0x47ef22(0x167):_0x47ef22(0x179))+'\x20app\x20\x22'+_0x35833b+'\x22\x20(appcode:\x20'+_0x197a01+')'+scopeLabel(_0x55811c)+'.'+_0x37cd31;return{'ok':!![],'message':_0x375f37};}function a44_0x40cc(_0x45ba0c,_0xfbb24e){_0x45ba0c=_0x45ba0c-0x14f;const _0x57aeb7=a44_0x57ae();let _0x40cc65=_0x57aeb7[_0x45ba0c];return _0x40cc65;}export async function runAppRemove(_0x46d8f2,_0x15dd28){const _0x59c9f9=a44_0x40cc,_0x2485aa=_0x46d8f2['args'][0x0]?.[_0x59c9f9(0x162)]();if(!_0x2485aa)throw CliErrors[_0x59c9f9(0x153)](_0x59c9f9(0x16e),_0x59c9f9(0x15a)+CLI_BIN_NAME+'\x20'+_0x15dd28+_0x59c9f9(0x172));const _0x2e8aa4=_0x46d8f2[_0x59c9f9(0x164)](_0x59c9f9(0x15d)),{config:_0x9bb737,layers:_0x474a1f}=readRawConfigWithLayers(),_0xf73778=_0x9bb737['apps']??{};if(!_0xf73778[_0x2485aa])throw CliErrors['validation']('App\x20\x22'+_0x2485aa+_0x59c9f9(0x155));const _0x2daac7=_0x474a1f[_0x59c9f9(0x176)][_0x59c9f9(0x173)]&&typeof _0x474a1f[_0x59c9f9(0x176)]['apps']===_0x59c9f9(0x178)?_0x474a1f['globalConfig'][_0x59c9f9(0x173)]:{},_0x1e8350=_0x474a1f['projectConfig'][_0x59c9f9(0x173)]&&typeof _0x474a1f['projectConfig'][_0x59c9f9(0x173)]==='object'?_0x474a1f[_0x59c9f9(0x175)]['apps']:{},_0x3346f6=appDefinedIn(_0x2485aa,_0x2daac7,_0x1e8350,_0x474a1f[_0x59c9f9(0x175)][_0x59c9f9(0x163)]===![]),_0x21ba8c=resolveAppScopeForWrite(_0x2485aa,_0x2e8aa4,_0x474a1f),_0x176795={'global':_0x21ba8c===_0x59c9f9(0x15d)},_0x17a6c2=readConfig(_0x176795),_0x57a576=_0x17a6c2[_0x59c9f9(0x173)];if(!_0x57a576||!_0x57a576[_0x2485aa])throw CliErrors['validation'](_0x59c9f9(0x15e)+_0x2485aa+_0x59c9f9(0x155));delete _0x57a576[_0x2485aa];let _0x21c562='';if(_0x17a6c2[_0x59c9f9(0x165)]===_0x2485aa){const _0x323ea3=Object[_0x59c9f9(0x15c)](_0x57a576);_0x17a6c2[_0x59c9f9(0x165)]=_0x323ea3[_0x59c9f9(0x16f)]>0x0?_0x323ea3[0x0]:undefined,_0x17a6c2[_0x59c9f9(0x165)]?_0x21c562=_0x59c9f9(0x174)+_0x17a6c2[_0x59c9f9(0x165)]+'\x22.':delete _0x17a6c2[_0x59c9f9(0x165)];}Object[_0x59c9f9(0x15c)](_0x57a576)[_0x59c9f9(0x16f)]===0x0&&(delete _0x17a6c2[_0x59c9f9(0x173)],delete _0x17a6c2[_0x59c9f9(0x165)]);writeConfig(_0x17a6c2,_0x176795);const _0x1a6b18=_0x3346f6===_0x59c9f9(0x17b)?_0x59c9f9(0x157)+_0x2485aa+_0x59c9f9(0x14f)+(_0x21ba8c===_0x59c9f9(0x166)?'global':'project')+_0x59c9f9(0x15f):'';return{'ok':!![],'message':_0x59c9f9(0x168)+_0x2485aa+'\x22'+scopeLabel(_0x176795)+'.'+_0x21c562+_0x1a6b18};}
1
+ (function(_0x4aba39,_0xb2661e){const _0x14ebba=a44_0x158a,_0x1adfbd=_0x4aba39();while(!![]){try{const _0x1abeb0=parseInt(_0x14ebba(0x1c4))/0x1*(parseInt(_0x14ebba(0x1ea))/0x2)+-parseInt(_0x14ebba(0x1d3))/0x3*(parseInt(_0x14ebba(0x1bb))/0x4)+-parseInt(_0x14ebba(0x1de))/0x5*(parseInt(_0x14ebba(0x1cb))/0x6)+-parseInt(_0x14ebba(0x1e7))/0x7+parseInt(_0x14ebba(0x1e1))/0x8+parseInt(_0x14ebba(0x1d8))/0x9*(-parseInt(_0x14ebba(0x1c8))/0xa)+-parseInt(_0x14ebba(0x1c9))/0xb*(-parseInt(_0x14ebba(0x1c0))/0xc);if(_0x1abeb0===_0xb2661e)break;else _0x1adfbd['push'](_0x1adfbd['shift']());}catch(_0x1201d2){_0x1adfbd['push'](_0x1adfbd['shift']());}}}(a44_0x4a7c,0x9e189));function a44_0x4a7c(){const _0x47e5b4=['1250990zqcwzJ','both','\x20Set\x20as\x20default\x20app.','7138584CUnClm','object','length','globalConfig','appcode','Use\x20global\x20config\x20scope','139216GzQOrM','\x20Note:\x20app\x20\x22','keys','6728wFgcde','4wJHoyM','\x22\x20not\x20found.','Missing\x20app\x20name.','App\x20\x22','Usage:\x20','56976jeOPoh','boolean','App\x20code','project','193JrkLnN','validation','\x20Default\x20app\x20changed\x20to\x20\x22','\x20app\x20\x22','2208410gfUEeB','3784WAwZCU','args','24Yknxtk','\x20<name>\x20--appcode\x20<code>','string','global','\x20<name>\x20[--global]','projectConfig','\x22\x20(appcode:\x20','str','3194892DhjKLN','Added','trim','bool','\x20config.','18hBROPa','flagMissing','inherit','\x20<name>','apps','defaultApp'];a44_0x4a7c=function(){return _0x47e5b4;};return a44_0x4a7c();}function a44_0x158a(_0xd6a173,_0x3a6991){_0xd6a173=_0xd6a173-0x1bb;const _0x4a7c93=a44_0x4a7c();let _0x158ac3=_0x4a7c93[_0xd6a173];return _0x158ac3;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x4cde48=a44_0x158a;return[{'name':_0x4cde48(0x1e5),'type':_0x4cde48(0x1cd),'description':_0x4cde48(0x1c2),'required':!![]},{'name':_0x4cde48(0x1ce),'type':'boolean','description':_0x4cde48(0x1e6),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x1197b7=a44_0x158a;return[{'name':'global','type':_0x1197b7(0x1c1),'description':_0x1197b7(0x1e6),'default':![]}];}export async function validateAppName(_0x281329,_0x2dd934){const _0x50d0b4=a44_0x158a,_0x665d91=_0x281329[_0x50d0b4(0x1ca)][0x0]?.[_0x50d0b4(0x1d5)]();if(!_0x665d91)throw CliErrors['validation'](_0x50d0b4(0x1bd),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2dd934+_0x50d0b4(0x1db));}export async function runAppAdd(_0x196d0a,_0x42d77d){const _0x2f6d5b=a44_0x158a,_0xb56eba=_0x196d0a[_0x2f6d5b(0x1ca)][0x0]?.[_0x2f6d5b(0x1d5)]();if(!_0xb56eba)throw CliErrors[_0x2f6d5b(0x1c5)](_0x2f6d5b(0x1bd),_0x2f6d5b(0x1bf)+CLI_BIN_NAME+'\x20'+_0x42d77d+_0x2f6d5b(0x1cc));const _0x4dc683=_0x196d0a[_0x2f6d5b(0x1d2)](_0x2f6d5b(0x1e5));if(!_0x4dc683)throw CliErrors[_0x2f6d5b(0x1d9)](_0x2f6d5b(0x1e5),_0x2f6d5b(0x1bf)+CLI_BIN_NAME+'\x20'+_0x42d77d+_0x2f6d5b(0x1cc));const _0x18515c={'global':_0x196d0a[_0x2f6d5b(0x1d6)]('global')},_0x24d9fa=readConfig(_0x18515c);if(!_0x24d9fa[_0x2f6d5b(0x1dc)])_0x24d9fa[_0x2f6d5b(0x1dc)]={};const _0x1e681e={'appcode':_0x4dc683,...collectAppProfileOverrides(_0x57b97f=>_0x196d0a[_0x2f6d5b(0x1d2)](_0x57b97f))},_0x477ad9=_0x24d9fa[_0x2f6d5b(0x1dc)],_0x12be03=!!_0x477ad9[_0xb56eba];_0x477ad9[_0xb56eba]=_0x1e681e;if(!_0x24d9fa[_0x2f6d5b(0x1dd)])_0x24d9fa['defaultApp']=_0xb56eba;writeConfig(_0x24d9fa,_0x18515c);const _0x1b21c3=!_0x12be03&&_0x24d9fa['defaultApp']===_0xb56eba?_0x2f6d5b(0x1e0):'',_0x2a1ce4=(_0x12be03?'Updated':_0x2f6d5b(0x1d4))+_0x2f6d5b(0x1c7)+_0xb56eba+_0x2f6d5b(0x1d1)+_0x4dc683+')'+scopeLabel(_0x18515c)+'.'+_0x1b21c3;return{'ok':!![],'message':_0x2a1ce4};}export async function runAppRemove(_0x2cce12,_0x3a2853){const _0x3fd715=a44_0x158a,_0x44b75b=_0x2cce12[_0x3fd715(0x1ca)][0x0]?.[_0x3fd715(0x1d5)]();if(!_0x44b75b)throw CliErrors[_0x3fd715(0x1c5)](_0x3fd715(0x1bd),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x3a2853+_0x3fd715(0x1cf));const _0x1efc0f=_0x2cce12['bool']('global'),{config:_0x25986d,layers:_0x23ca88}=readRawConfigWithLayers(),_0x585081=_0x25986d[_0x3fd715(0x1dc)]??{};if(!_0x585081[_0x44b75b])throw CliErrors['validation']('App\x20\x22'+_0x44b75b+_0x3fd715(0x1bc));const _0x2fb1ee=_0x23ca88[_0x3fd715(0x1e4)][_0x3fd715(0x1dc)]&&typeof _0x23ca88[_0x3fd715(0x1e4)][_0x3fd715(0x1dc)]==='object'?_0x23ca88[_0x3fd715(0x1e4)]['apps']:{},_0x2022b0=_0x23ca88[_0x3fd715(0x1d0)][_0x3fd715(0x1dc)]&&typeof _0x23ca88[_0x3fd715(0x1d0)][_0x3fd715(0x1dc)]===_0x3fd715(0x1e2)?_0x23ca88[_0x3fd715(0x1d0)]['apps']:{},_0x57a48a=appDefinedIn(_0x44b75b,_0x2fb1ee,_0x2022b0,_0x23ca88[_0x3fd715(0x1d0)][_0x3fd715(0x1da)]===![]),_0x1232d0=resolveAppScopeForWrite(_0x44b75b,_0x1efc0f,_0x23ca88),_0x33c421={'global':_0x1232d0===_0x3fd715(0x1ce)},_0x993a4a=readConfig(_0x33c421),_0x1f8881=_0x993a4a['apps'];if(!_0x1f8881||!_0x1f8881[_0x44b75b])throw CliErrors['validation'](_0x3fd715(0x1be)+_0x44b75b+_0x3fd715(0x1bc));delete _0x1f8881[_0x44b75b];let _0xbd3e4f='';if(_0x993a4a[_0x3fd715(0x1dd)]===_0x44b75b){const _0x19e507=Object[_0x3fd715(0x1e9)](_0x1f8881);_0x993a4a['defaultApp']=_0x19e507[_0x3fd715(0x1e3)]>0x0?_0x19e507[0x0]:undefined,_0x993a4a[_0x3fd715(0x1dd)]?_0xbd3e4f=_0x3fd715(0x1c6)+_0x993a4a[_0x3fd715(0x1dd)]+'\x22.':delete _0x993a4a[_0x3fd715(0x1dd)];}Object[_0x3fd715(0x1e9)](_0x1f8881)[_0x3fd715(0x1e3)]===0x0&&(delete _0x993a4a[_0x3fd715(0x1dc)],delete _0x993a4a[_0x3fd715(0x1dd)]);writeConfig(_0x993a4a,_0x33c421);const _0x39a64f=_0x57a48a===_0x3fd715(0x1df)?_0x3fd715(0x1e8)+_0x44b75b+'\x22\x20still\x20defined\x20in\x20'+(_0x1232d0==='project'?_0x3fd715(0x1ce):_0x3fd715(0x1c3))+_0x3fd715(0x1d7):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x44b75b+'\x22'+scopeLabel(_0x33c421)+'.'+_0xbd3e4f+_0x39a64f};}
@@ -1 +1 @@
1
- (function(_0x15afab,_0x9662ed){const _0xa40f70=a45_0x4973,_0x2f0b0a=_0x15afab();while(!![]){try{const _0x51d392=-parseInt(_0xa40f70(0x132))/0x1+-parseInt(_0xa40f70(0x13d))/0x2*(-parseInt(_0xa40f70(0x129))/0x3)+-parseInt(_0xa40f70(0x12f))/0x4+parseInt(_0xa40f70(0x136))/0x5+-parseInt(_0xa40f70(0x143))/0x6*(-parseInt(_0xa40f70(0x14a))/0x7)+parseInt(_0xa40f70(0x133))/0x8*(parseInt(_0xa40f70(0x14c))/0x9)+-parseInt(_0xa40f70(0x13f))/0xa;if(_0x51d392===_0x9662ed)break;else _0x2f0b0a['push'](_0x2f0b0a['shift']());}catch(_0xb9950a){_0x2f0b0a['push'](_0x2f0b0a['shift']());}}}(a45_0x574c,0x6e9c1));import{input,checkbox,select}from'@inquirer/prompts';import a45_0xbe803e from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a45_0x4973(_0x2d152c,_0x5ebc58){_0x2d152c=_0x2d152c-0x129;const _0x574c9b=a45_0x574c();let _0x497320=_0x574c9b[_0x2d152c];return _0x497320;}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x43461f=a45_0x4973,_0x67e0f0=await input({'message':_0x43461f(0x12d),'validate':_0x32dfe4=>{const _0x58f4ee=_0x43461f,_0x1042d9=validateAppcode(_0x32dfe4[_0x58f4ee(0x147)]());return _0x1042d9['valid']||_0x1042d9[_0x58f4ee(0x130)]||_0x58f4ee(0x13a);}});return _0x67e0f0[_0x43461f(0x147)]();}export async function promptAppSelection(_0x542547){const _0x22400f=a45_0x4973,_0x219238=[{'name':a45_0xbe803e[_0x22400f(0x140)](_0x22400f(0x139)),'value':-0x1},..._0x542547[_0x22400f(0x12e)]((_0x4e501c,_0x47635a)=>({'name':_0x4e501c['appName']+'\x20\x20'+a45_0xbe803e[_0x22400f(0x14b)]('('+_0x4e501c[_0x22400f(0x145)]+')'),'value':_0x47635a}))],_0x348bd4=await checkbox({'message':'获取到\x20'+a45_0xbe803e[_0x22400f(0x137)](_0x542547[_0x22400f(0x13e)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x219238,'loop':![]});if(_0x348bd4[_0x22400f(0x149)](-0x1))return'custom';if(_0x348bd4[_0x22400f(0x13e)]===0x0)return _0x22400f(0x148);return _0x348bd4[_0x22400f(0x12e)](_0x3ebfcb=>_0x542547[_0x3ebfcb]);}export async function promptSingleAppSelection(_0x5a205b){const _0x595747=a45_0x4973,_0x3eac37=[{'name':a45_0xbe803e[_0x595747(0x14b)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x595747(0x135)},{'name':a45_0xbe803e['yellow'](_0x595747(0x139)),'value':_0x595747(0x148)},..._0x5a205b[_0x595747(0x12e)](_0xa14280=>({'name':_0xa14280['appName']+'\x20\x20'+a45_0xbe803e[_0x595747(0x14b)]('('+_0xa14280[_0x595747(0x145)]+')'),'value':_0xa14280[_0x595747(0x145)]}))],_0x4d1bc6=await select({'message':_0x595747(0x13c),'choices':_0x3eac37});if(_0x4d1bc6===_0x595747(0x135))return _0x595747(0x135);if(_0x4d1bc6===_0x595747(0x148))return'custom';return _0x5a205b['find'](_0x454fe6=>_0x454fe6[_0x595747(0x145)]===_0x4d1bc6);}export async function selectSingleAppcode(_0x68d746){const _0x349dcf=a45_0x4973;if(!_0x68d746)return writeCliSideChannelLine(a45_0xbe803e['gray'](_0x349dcf(0x134))),_fallbackOrSkip();writeCliSideChannelLine(_0x349dcf(0x13b));let _0x4bb907;try{_0x4bb907=await withActiveCookie(_0x68d746,()=>listRemoteApps());}catch(_0x20ca21){writeCliSideChannelLine(a45_0xbe803e[_0x349dcf(0x140)](_0x349dcf(0x138)));if(_0x20ca21 instanceof Error)writeCliSideChannelLine(a45_0xbe803e['gray']('\x20\x20('+_0x20ca21[_0x349dcf(0x130)]+')'));return _fallbackOrSkip();}if(_0x4bb907[_0x349dcf(0x13e)]===0x0)return writeCliSideChannelLine(a45_0xbe803e['yellow'](_0x349dcf(0x144))),_fallbackOrSkip();const _0xabc50c=await promptSingleAppSelection(_0x4bb907);if(_0xabc50c===_0x349dcf(0x135))return'';if(_0xabc50c===_0x349dcf(0x148))return promptCustomAppcode();return _0xabc50c[_0x349dcf(0x145)];}export async function selectMultipleApps(_0x410c2b){const _0x108bcf=a45_0x4973;writeCliSideChannelLine(_0x108bcf(0x13b));let _0x3bc176;try{_0x3bc176=await withActiveCookie(_0x410c2b,()=>listRemoteApps());}catch(_0x491feb){writeCliSideChannelLine(_0x108bcf(0x12c));if(_0x491feb instanceof Error)writeCliSideChannelLine(_0x108bcf(0x146)+_0x491feb[_0x108bcf(0x130)]+')');return _0x108bcf(0x148);}if(_0x3bc176[_0x108bcf(0x13e)]===0x0)return writeCliSideChannelLine(_0x108bcf(0x141)),'custom';return promptAppSelection(_0x3bc176);}async function _fallbackOrSkip(){const _0x4377fc=a45_0x4973,_0x41d785=await select({'message':_0x4377fc(0x142),'choices':[{'name':a45_0xbe803e['gray'](_0x4377fc(0x12a)),'value':_0x4377fc(0x135)},{'name':a45_0xbe803e[_0x4377fc(0x140)](_0x4377fc(0x12b)),'value':_0x4377fc(0x131)}]});if(_0x41d785==='skip')return'';return promptCustomAppcode();}function a45_0x574c(){const _0x43fbcd=['gray','63kVDyCu','1241826dZyXHL','(跳过,稍后配置)','✎\x20手动输入','\x0a无法获取远程应用列表,请手动输入。','请输入\x20App\x20Code:','map','1377108NzMvng','message','manual','35941zeQckw','903088mAaCJy','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','skip','804875zlnHiZ','cyan','无法获取远程应用列表,请手动输入。','✎\x20自定义输入\x20appcode','Invalid\x20App\x20Code','正在获取可用应用列表...','请选择要绑定的应用:','4OinBcf','length','15195030oNFCmX','yellow','\x0a未找到可用应用。','App\x20Code:','37014YlqhyR','未找到可用应用。','appCode','\x20\x20(','trim','custom','includes','651UWQKeQ'];a45_0x574c=function(){return _0x43fbcd;};return a45_0x574c();}
1
+ function a45_0x2d06(){const _0xb87a6a=['2157288PMeeOV','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','includes','Invalid\x20App\x20Code','157494EEfvgq','✎\x20自定义输入\x20appcode','gray','skip','337340kFkicx','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','正在获取可用应用列表...','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','6rGSjIz','map','请选择要绑定的应用:','cyan','trim','appCode','appName','yellow','\x0a未找到可用应用。','10wOJHFR','167169yqZCIQ','length','2250693yIaBXv','valid','1048565UbTdAR','(跳过,稍后配置)','find','message','319402zLixmc','App\x20Code:','\x20\x20(','custom'];a45_0x2d06=function(){return _0xb87a6a;};return a45_0x2d06();}function a45_0x47cb(_0x321624,_0x2dcb66){_0x321624=_0x321624-0x1ed;const _0x2d06e9=a45_0x2d06();let _0x47cbdb=_0x2d06e9[_0x321624];return _0x47cbdb;}(function(_0x1c9fc8,_0x4ccded){const _0x22822e=a45_0x47cb,_0x25d6e1=_0x1c9fc8();while(!![]){try{const _0x1bf3bc=parseInt(_0x22822e(0x209))/0x1+-parseInt(_0x22822e(0x201))/0x2+-parseInt(_0x22822e(0x1f9))/0x3+parseInt(_0x22822e(0x20d))/0x4*(-parseInt(_0x22822e(0x1f8))/0x5)+-parseInt(_0x22822e(0x1ef))/0x6*(parseInt(_0x22822e(0x1fd))/0x7)+parseInt(_0x22822e(0x205))/0x8+parseInt(_0x22822e(0x1fb))/0x9;if(_0x1bf3bc===_0x4ccded)break;else _0x25d6e1['push'](_0x25d6e1['shift']());}catch(_0xbb476){_0x25d6e1['push'](_0x25d6e1['shift']());}}}(a45_0x2d06,0x22fef));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x4067af 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 _0x3a4d33=a45_0x47cb,_0x5c8a60=await input({'message':'请输入\x20App\x20Code:','validate':_0x262b2d=>{const _0x20ce33=a45_0x47cb,_0x161bac=validateAppcode(_0x262b2d[_0x20ce33(0x1f3)]());return _0x161bac[_0x20ce33(0x1fc)]||_0x161bac['message']||_0x20ce33(0x208);}});return _0x5c8a60[_0x3a4d33(0x1f3)]();}export async function promptAppSelection(_0x5aaf5a){const _0xd12b11=a45_0x47cb,_0x1a7910=[{'name':a45_0x4067af[_0xd12b11(0x1f6)](_0xd12b11(0x20a)),'value':-0x1},..._0x5aaf5a['map']((_0x45a776,_0x2fa56e)=>({'name':_0x45a776[_0xd12b11(0x1f5)]+'\x20\x20'+a45_0x4067af[_0xd12b11(0x20b)]('('+_0x45a776[_0xd12b11(0x1f4)]+')'),'value':_0x2fa56e}))],_0x3a0a01=await checkbox({'message':'获取到\x20'+a45_0x4067af[_0xd12b11(0x1f2)](_0x5aaf5a['length'])+_0xd12b11(0x206),'choices':_0x1a7910,'loop':![]});if(_0x3a0a01[_0xd12b11(0x207)](-0x1))return'custom';if(_0x3a0a01[_0xd12b11(0x1fa)]===0x0)return _0xd12b11(0x204);return _0x3a0a01[_0xd12b11(0x1f0)](_0x52fcce=>_0x5aaf5a[_0x52fcce]);}export async function promptSingleAppSelection(_0x1f7202){const _0x50e236=a45_0x47cb,_0x5d22e4=[{'name':a45_0x4067af['gray'](_0x50e236(0x20e)),'value':_0x50e236(0x20c)},{'name':a45_0x4067af[_0x50e236(0x1f6)]('✎\x20自定义输入\x20appcode'),'value':_0x50e236(0x204)},..._0x1f7202[_0x50e236(0x1f0)](_0x1e507e=>({'name':_0x1e507e[_0x50e236(0x1f5)]+'\x20\x20'+a45_0x4067af['gray']('('+_0x1e507e[_0x50e236(0x1f4)]+')'),'value':_0x1e507e[_0x50e236(0x1f4)]}))],_0x52664a=await select({'message':_0x50e236(0x1f1),'choices':_0x5d22e4});if(_0x52664a===_0x50e236(0x20c))return _0x50e236(0x20c);if(_0x52664a===_0x50e236(0x204))return _0x50e236(0x204);return _0x1f7202[_0x50e236(0x1ff)](_0x4c68b4=>_0x4c68b4[_0x50e236(0x1f4)]===_0x52664a);}export async function selectSingleAppcode(_0x2e3f55){const _0xc19c49=a45_0x47cb;if(!_0x2e3f55)return writeCliSideChannelLine(a45_0x4067af[_0xc19c49(0x20b)](_0xc19c49(0x1ee))),_fallbackOrSkip();writeCliSideChannelLine(_0xc19c49(0x1ed));let _0x4133fc;try{_0x4133fc=await withActiveCookie(_0x2e3f55,()=>listRemoteApps());}catch(_0x35a696){writeCliSideChannelLine(a45_0x4067af['yellow']('无法获取远程应用列表,请手动输入。'));if(_0x35a696 instanceof Error)writeCliSideChannelLine(a45_0x4067af[_0xc19c49(0x20b)](_0xc19c49(0x203)+_0x35a696[_0xc19c49(0x200)]+')'));return _fallbackOrSkip();}if(_0x4133fc['length']===0x0)return writeCliSideChannelLine(a45_0x4067af['yellow']('未找到可用应用。')),_fallbackOrSkip();const _0xc255ac=await promptSingleAppSelection(_0x4133fc);if(_0xc255ac===_0xc19c49(0x20c))return'';if(_0xc255ac==='custom')return promptCustomAppcode();return _0xc255ac['appCode'];}export async function selectMultipleApps(_0x42ce42){const _0x28df3a=a45_0x47cb;writeCliSideChannelLine('正在获取可用应用列表...');let _0x5095b3;try{_0x5095b3=await withActiveCookie(_0x42ce42,()=>listRemoteApps());}catch(_0x291182){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x291182 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x291182['message']+')');return _0x28df3a(0x204);}if(_0x5095b3[_0x28df3a(0x1fa)]===0x0)return writeCliSideChannelLine(_0x28df3a(0x1f7)),'custom';return promptAppSelection(_0x5095b3);}async function _fallbackOrSkip(){const _0x2c127d=a45_0x47cb,_0x27ac81=await select({'message':_0x2c127d(0x202),'choices':[{'name':a45_0x4067af[_0x2c127d(0x20b)](_0x2c127d(0x1fe)),'value':'skip'},{'name':a45_0x4067af[_0x2c127d(0x1f6)]('✎\x20手动输入'),'value':'manual'}]});if(_0x27ac81===_0x2c127d(0x20c))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a46_0x5c5efe=a46_0x42f7;(function(_0x3bef10,_0xf6279){const _0x31e17f=a46_0x42f7,_0x26432b=_0x3bef10();while(!![]){try{const _0x5067d7=-parseInt(_0x31e17f(0xae))/0x1*(-parseInt(_0x31e17f(0xa8))/0x2)+-parseInt(_0x31e17f(0xb4))/0x3*(parseInt(_0x31e17f(0xca))/0x4)+parseInt(_0x31e17f(0xb8))/0x5+parseInt(_0x31e17f(0xaf))/0x6*(parseInt(_0x31e17f(0xc5))/0x7)+parseInt(_0x31e17f(0xbf))/0x8*(parseInt(_0x31e17f(0xbb))/0x9)+parseInt(_0x31e17f(0xac))/0xa+-parseInt(_0x31e17f(0xa9))/0xb;if(_0x5067d7===_0xf6279)break;else _0x26432b['push'](_0x26432b['shift']());}catch(_0x30705d){_0x26432b['push'](_0x26432b['shift']());}}}(a46_0x252a,0x64a71));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';function a46_0x252a(){const _0xe94a=['taskId','4bzVOTb','apiError','84SXatNT','19040406xNrpmc','string','status','7837210JpamEQ','\x20returned\x20unknown\x20status\x20','16109iLLmzQ','70614RPNcDw','trim','SUCCESS','PROCESSING','\x20completed\x20successfully.','1270677eoDJhz','has','errorMessage','\x20--appcode\x20','2280660XVuTaV','Task\x20','\x20is\x20pending.','768915WGoolv','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x27\x5c\x27\x27','\x20failed.','8YHvgNt','PENDING','toUpperCase','Async\x20task\x20','\x20response\x20did\x20not\x20contain\x20a\x20status.','\x20task\x20status\x20--task-id\x20','336Cnrfit','replace','\x20--format\x20compress','FAILED'];a46_0x252a=function(){return _0xe94a;};return a46_0x252a();}const TERMINAL_STATUSES=new Set(['SUCCESS',a46_0x5c5efe(0xc8)]),NON_TERMINAL_STATUSES=new Set([a46_0x5c5efe(0xc0),a46_0x5c5efe(0xb2)]);function a46_0x42f7(_0xe18873,_0x12b9e8){_0xe18873=_0xe18873-0xa8;const _0x252ad8=a46_0x252a();let _0x42f75c=_0x252ad8[_0xe18873];return _0x42f75c;}export function normalizeAsyncTask(_0x5b8acf){const _0x5a5d91=a46_0x5c5efe,_0x3bed0e=typeof _0x5b8acf?.[_0x5a5d91(0xc9)]===_0x5a5d91(0xaa)?_0x5b8acf[_0x5a5d91(0xc9)][_0x5a5d91(0xb0)]():'';if(!_0x3bed0e)throw CliErrors[_0x5a5d91(0xcb)](_0x5a5d91(0xbc));const _0xae122b=typeof _0x5b8acf[_0x5a5d91(0xab)]===_0x5a5d91(0xaa)?_0x5b8acf[_0x5a5d91(0xab)][_0x5a5d91(0xb0)]()[_0x5a5d91(0xc1)]():'';if(!_0xae122b)throw CliErrors['apiError'](_0x5a5d91(0xc2)+_0x3bed0e+_0x5a5d91(0xc3));return{'taskId':_0x3bed0e,'status':_0xae122b,'errorMessage':typeof _0x5b8acf[_0x5a5d91(0xb6)]===_0x5a5d91(0xaa)&&_0x5b8acf['errorMessage'][_0x5a5d91(0xb0)]()?_0x5b8acf[_0x5a5d91(0xb6)][_0x5a5d91(0xb0)]():null,'isTerminal':TERMINAL_STATUSES[_0x5a5d91(0xb5)](_0xae122b),'knownStatus':TERMINAL_STATUSES['has'](_0xae122b)||NON_TERMINAL_STATUSES[_0x5a5d91(0xb5)](_0xae122b)};}export function buildAsyncTaskStatusCommand(_0x242821,_0x423f38){const _0x3411fe=a46_0x5c5efe;return CLI_BIN_NAME+_0x3411fe(0xc4)+quoteShellArg(_0x242821)+_0x3411fe(0xb7)+quoteShellArg(_0x423f38)+_0x3411fe(0xc7);}export function asyncTaskMessage(_0x5511dd){const _0x29cfef=a46_0x5c5efe;switch(_0x5511dd[_0x29cfef(0xab)]){case'PENDING':return _0x29cfef(0xb9)+_0x5511dd[_0x29cfef(0xc9)]+_0x29cfef(0xba);case'PROCESSING':return'Task\x20'+_0x5511dd['taskId']+'\x20is\x20processing.';case _0x29cfef(0xb1):return _0x29cfef(0xb9)+_0x5511dd[_0x29cfef(0xc9)]+_0x29cfef(0xb3);case _0x29cfef(0xc8):return _0x5511dd[_0x29cfef(0xb6)]?_0x29cfef(0xb9)+_0x5511dd[_0x29cfef(0xc9)]+'\x20failed:\x20'+_0x5511dd[_0x29cfef(0xb6)]:'Task\x20'+_0x5511dd['taskId']+_0x29cfef(0xbe);default:return _0x29cfef(0xb9)+_0x5511dd[_0x29cfef(0xc9)]+_0x29cfef(0xad)+_0x5511dd[_0x29cfef(0xab)]+'.';}}function quoteShellArg(_0x303645){const _0x3a06c8=a46_0x5c5efe;return'\x27'+_0x303645[_0x3a06c8(0xc6)](/'/g,_0x3a06c8(0xbd))+'\x27';}
1
+ const a46_0x3769d9=a46_0x5ba7;(function(_0x354920,_0xceec4){const _0x23135f=a46_0x5ba7,_0x23357a=_0x354920();while(!![]){try{const _0x1b8f93=-parseInt(_0x23135f(0x97))/0x1+-parseInt(_0x23135f(0x9f))/0x2*(parseInt(_0x23135f(0xa3))/0x3)+-parseInt(_0x23135f(0xa4))/0x4*(-parseInt(_0x23135f(0x93))/0x5)+-parseInt(_0x23135f(0xa1))/0x6*(-parseInt(_0x23135f(0xac))/0x7)+parseInt(_0x23135f(0x9a))/0x8+-parseInt(_0x23135f(0xb4))/0x9+parseInt(_0x23135f(0xab))/0xa*(-parseInt(_0x23135f(0xb3))/0xb);if(_0x1b8f93===_0xceec4)break;else _0x23357a['push'](_0x23357a['shift']());}catch(_0x397ed8){_0x23357a['push'](_0x23357a['shift']());}}}(a46_0x5b88,0xcb044));function a46_0x5ba7(_0x2433de,_0x30363c){_0x2433de=_0x2433de-0x92;const _0x5b88ba=a46_0x5b88();let _0x5ba7aa=_0x5b88ba[_0x2433de];return _0x5ba7aa;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set([a46_0x3769d9(0xaa),a46_0x3769d9(0x9e)]),NON_TERMINAL_STATUSES=new Set([a46_0x3769d9(0x9d),'PROCESSING']);export function normalizeAsyncTask(_0x2ca6fe){const _0x7db644=a46_0x3769d9,_0x1109e4=typeof _0x2ca6fe?.[_0x7db644(0xb1)]===_0x7db644(0x95)?_0x2ca6fe['taskId'][_0x7db644(0xa0)]():'';if(!_0x1109e4)throw CliErrors[_0x7db644(0x99)](_0x7db644(0xae));const _0x31cffa=typeof _0x2ca6fe['status']===_0x7db644(0x95)?_0x2ca6fe[_0x7db644(0x92)][_0x7db644(0xa0)]()[_0x7db644(0x9c)]():'';if(!_0x31cffa)throw CliErrors[_0x7db644(0x99)](_0x7db644(0xb2)+_0x1109e4+_0x7db644(0xa9));return{'taskId':_0x1109e4,'status':_0x31cffa,'errorMessage':typeof _0x2ca6fe['errorMessage']===_0x7db644(0x95)&&_0x2ca6fe['errorMessage']['trim']()?_0x2ca6fe['errorMessage'][_0x7db644(0xa0)]():null,'isTerminal':TERMINAL_STATUSES[_0x7db644(0x94)](_0x31cffa),'knownStatus':TERMINAL_STATUSES[_0x7db644(0x94)](_0x31cffa)||NON_TERMINAL_STATUSES[_0x7db644(0x94)](_0x31cffa)};}export function buildAsyncTaskStatusCommand(_0x3e412b,_0x316b0e){const _0x2bdb04=a46_0x3769d9;return CLI_BIN_NAME+_0x2bdb04(0xaf)+quoteShellArg(_0x3e412b)+_0x2bdb04(0xa5)+quoteShellArg(_0x316b0e)+_0x2bdb04(0x96);}export function asyncTaskMessage(_0x2bf610){const _0x317474=a46_0x3769d9;switch(_0x2bf610[_0x317474(0x92)]){case _0x317474(0x9d):return _0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+_0x317474(0xa2);case _0x317474(0xb0):return _0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+_0x317474(0xad);case'SUCCESS':return _0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+_0x317474(0xa8);case'FAILED':return _0x2bf610[_0x317474(0x9b)]?_0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+'\x20failed:\x20'+_0x2bf610['errorMessage']:_0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+'\x20failed.';default:return _0x317474(0xa6)+_0x2bf610[_0x317474(0xb1)]+'\x20returned\x20unknown\x20status\x20'+_0x2bf610['status']+'.';}}function quoteShellArg(_0x576a50){const _0x2a5a76=a46_0x3769d9;return'\x27'+_0x576a50[_0x2a5a76(0x98)](/'/g,_0x2a5a76(0xa7))+'\x27';}function a46_0x5b88(){const _0x52e469=['has','string','\x20--format\x20compress','664946PKaaaM','replace','apiError','9996560GxLaIq','errorMessage','toUpperCase','PENDING','FAILED','2869110OQpotp','trim','24IDaQIm','\x20is\x20pending.','3frdetb','452PeQiRu','\x20--appcode\x20','Task\x20','\x27\x5c\x27\x27','\x20completed\x20successfully.','\x20response\x20did\x20not\x20contain\x20a\x20status.','SUCCESS','310DoRwZi','1551025mcfbrb','\x20is\x20processing.','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','\x20task\x20status\x20--task-id\x20','PROCESSING','taskId','Async\x20task\x20','45001jMWmOI','4257810bUhKIx','status','61730kvjsEa'];a46_0x5b88=function(){return _0x52e469;};return a46_0x5b88();}
@@ -1 +1 @@
1
- (function(_0x2b2d11,_0xe6fd9f){var _0xa2cd7d=a47_0x3b51,_0x4c022a=_0x2b2d11();while(!![]){try{var _0x411e0b=-parseInt(_0xa2cd7d(0x79))/0x1+-parseInt(_0xa2cd7d(0x74))/0x2+parseInt(_0xa2cd7d(0x7a))/0x3+parseInt(_0xa2cd7d(0x73))/0x4*(parseInt(_0xa2cd7d(0x75))/0x5)+-parseInt(_0xa2cd7d(0x6e))/0x6*(-parseInt(_0xa2cd7d(0x70))/0x7)+-parseInt(_0xa2cd7d(0x77))/0x8+parseInt(_0xa2cd7d(0x6f))/0x9*(-parseInt(_0xa2cd7d(0x72))/0xa);if(_0x411e0b===_0xe6fd9f)break;else _0x4c022a['push'](_0x4c022a['shift']());}catch(_0x6c760c){_0x4c022a['push'](_0x4c022a['shift']());}}}(a47_0xb4c5,0xd8943));export function asDryRunResult(_0x110831,_0x1861c4){var _0x4f034d=a47_0x3b51;return Object[_0x4f034d(0x6d)](_0x110831,{'method':{'value':_0x1861c4[_0x4f034d(0x76)],'enumerable':![]},'url':{'value':_0x1861c4[_0x4f034d(0x71)],'enumerable':![]},..._0x1861c4['description']?{'description':{'value':_0x1861c4[_0x4f034d(0x78)],'enumerable':![]}}:{}});}function a47_0x3b51(_0x21e901,_0x3c28ae){_0x21e901=_0x21e901-0x6d;var _0xb4c51f=a47_0xb4c5();var _0x3b5191=_0xb4c51f[_0x21e901];return _0x3b5191;}function a47_0xb4c5(){var _0x48df5f=['3939579GHzRlK','defineProperties','6PRNInS','5111298wQsSyQ','11679857mWETtr','url','40aniHgr','28mOxDwV','496286yKimHF','757470JvaZJp','method','1740432vKBOCX','description','417710XDzMgS'];a47_0xb4c5=function(){return _0x48df5f;};return a47_0xb4c5();}
1
+ function a47_0x4c14(_0x362e7e,_0x1f35a5){_0x362e7e=_0x362e7e-0x1a8;var _0x12836f=a47_0x1283();var _0x4c14ad=_0x12836f[_0x362e7e];return _0x4c14ad;}function a47_0x1283(){var _0x15f590=['45GMJEkW','505752yaKyrd','defineProperties','1824180gQkSDQ','19732HWMfxl','3948736MPHraT','2149760QkPNNy','4ozoazs','description','102hwPLlt','440778NmfQvR','method','3723642WzAbZT','28MGUTWn'];a47_0x1283=function(){return _0x15f590;};return a47_0x1283();}(function(_0x4cbf2f,_0xc75917){var _0x2c44fd=a47_0x4c14,_0x24ceae=_0x4cbf2f();while(!![]){try{var _0x2c87b8=-parseInt(_0x2c44fd(0x1ad))/0x1*(-parseInt(_0x2c44fd(0x1a8))/0x2)+-parseInt(_0x2c44fd(0x1ae))/0x3*(-parseInt(_0x2c44fd(0x1ab))/0x4)+-parseInt(_0x2c44fd(0x1aa))/0x5+parseInt(_0x2c44fd(0x1b0))/0x6+parseInt(_0x2c44fd(0x1b1))/0x7*(-parseInt(_0x2c44fd(0x1b3))/0x8)+parseInt(_0x2c44fd(0x1b2))/0x9*(-parseInt(_0x2c44fd(0x1b5))/0xa)+parseInt(_0x2c44fd(0x1a9))/0xb;if(_0x2c87b8===_0xc75917)break;else _0x24ceae['push'](_0x24ceae['shift']());}catch(_0x55cfc5){_0x24ceae['push'](_0x24ceae['shift']());}}}(a47_0x1283,0x83543));export function asDryRunResult(_0x29d787,_0x5305ff){var _0x482198=a47_0x4c14;return Object[_0x482198(0x1b4)](_0x29d787,{'method':{'value':_0x5305ff[_0x482198(0x1af)],'enumerable':![]},'url':{'value':_0x5305ff['url'],'enumerable':![]},..._0x5305ff['description']?{'description':{'value':_0x5305ff[_0x482198(0x1ac)],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a48_0x467f8c=a48_0x3ce7;(function(_0x5316b8,_0x388b05){const _0x511fdb=a48_0x3ce7,_0x4cbd57=_0x5316b8();while(!![]){try{const _0x24c9b1=parseInt(_0x511fdb(0x136))/0x1+parseInt(_0x511fdb(0x12e))/0x2*(-parseInt(_0x511fdb(0x139))/0x3)+parseInt(_0x511fdb(0x12f))/0x4*(-parseInt(_0x511fdb(0x132))/0x5)+-parseInt(_0x511fdb(0x135))/0x6*(parseInt(_0x511fdb(0x13a))/0x7)+-parseInt(_0x511fdb(0x130))/0x8+-parseInt(_0x511fdb(0x13e))/0x9+parseInt(_0x511fdb(0x134))/0xa;if(_0x24c9b1===_0x388b05)break;else _0x4cbd57['push'](_0x4cbd57['shift']());}catch(_0x27a189){_0x4cbd57['push'](_0x4cbd57['shift']());}}}(a48_0x683a,0xa904b));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':a48_0x467f8c(0x137),'type':a48_0x467f8c(0x138),'required':!![],'description':a48_0x467f8c(0x12d),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x467f8c(0x131),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};function a48_0x683a(){const _0x4fa476=['730194MLtcho','code','string','6381OJJcOV','6741553krCYsV','POSTGRESQL','number','sqlcode','8265960APwTCd','MYSQL','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','dbtype','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Dataset\x20code\x20(32-char\x20hex\x20UUID)','250FPzPOg','1237292XUsCHL','988056rAhGbQ','datasetcode','15gtBhoW','App\x20code\x20(e.g.\x20app-xxxxx)','31609750XYrCyg','6HddtuO'];a48_0x683a=function(){return _0x4fa476;};return a48_0x683a();}function a48_0x3ce7(_0x22e2ff,_0x5ed70a){_0x22e2ff=_0x22e2ff-0x12b;const _0x683a64=a48_0x683a();let _0x3ce741=_0x683a64[_0x22e2ff];return _0x3ce741;}export const SQLCODE_FLAG={'name':a48_0x467f8c(0x13d),'type':'string','required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x467f8c(0x12c)}};export const APPCODE_FLAG_OPTIONAL={'name':'appcode','type':a48_0x467f8c(0x138),'required':![],'description':a48_0x467f8c(0x12b)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x467f8c(0x133)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x467f8c(0x13c),'required':!![],'description':a48_0x467f8c(0x140)};export const DB_TYPE_FLAG={'name':a48_0x467f8c(0x141),'type':a48_0x467f8c(0x138),'required':!![],'description':'Database\x20product\x20type','enum':[a48_0x467f8c(0x13f),a48_0x467f8c(0x13b)]};
1
+ const a48_0x21f6fc=a48_0x5168;function a48_0x5168(_0x3dccaf,_0x479553){_0x3dccaf=_0x3dccaf-0x76;const _0x24a94b=a48_0x24a9();let _0x516878=_0x24a94b[_0x3dccaf];return _0x516878;}(function(_0x5cee45,_0x54ce79){const _0x464622=a48_0x5168,_0x4eba1c=_0x5cee45();while(!![]){try{const _0x2b4f29=-parseInt(_0x464622(0x7b))/0x1*(parseInt(_0x464622(0x8a))/0x2)+parseInt(_0x464622(0x82))/0x3*(parseInt(_0x464622(0x84))/0x4)+parseInt(_0x464622(0x81))/0x5*(parseInt(_0x464622(0x8f))/0x6)+-parseInt(_0x464622(0x8d))/0x7+-parseInt(_0x464622(0x7a))/0x8*(parseInt(_0x464622(0x79))/0x9)+-parseInt(_0x464622(0x89))/0xa*(-parseInt(_0x464622(0x7f))/0xb)+-parseInt(_0x464622(0x7c))/0xc;if(_0x2b4f29===_0x54ce79)break;else _0x4eba1c['push'](_0x4eba1c['shift']());}catch(_0x3541ab){_0x4eba1c['push'](_0x4eba1c['shift']());}}}(a48_0x24a9,0x3a48e));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x21f6fc(0x7e)};export const CODE_FLAG={'name':a48_0x21f6fc(0x86),'type':'string','required':!![],'description':a48_0x21f6fc(0x78),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a48_0x21f6fc(0x78)};export const SQLCODE_FLAG={'name':a48_0x21f6fc(0x8c),'type':a48_0x21f6fc(0x77),'required':!![],'description':a48_0x21f6fc(0x88),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x21f6fc(0x87)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x21f6fc(0x83),'type':'string','required':![],'description':a48_0x21f6fc(0x85)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x21f6fc(0x8e)};function a48_0x24a9(){const _0x497557=['200511JUaFJs','56elCwCz','79102miWuhO','2358648lCBhZD','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','2483679EnkeuC','dbtype','211865XOMbAX','15eeqYml','appcode','347264qPPBbX','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','code','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','20ISGcUE','8AJxyna','POSTGRESQL','sqlcode','1329118iQchTc','App\x20code\x20(e.g.\x20app-xxxxx)','30BqxzKZ','number','string','Dataset\x20code\x20(32-char\x20hex\x20UUID)'];a48_0x24a9=function(){return _0x497557;};return a48_0x24a9();}export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x21f6fc(0x76),'required':!![],'description':a48_0x21f6fc(0x7d)};export const DB_TYPE_FLAG={'name':a48_0x21f6fc(0x80),'type':a48_0x21f6fc(0x77),'required':!![],'description':'Database\x20product\x20type','enum':['MYSQL',a48_0x21f6fc(0x8b)]};
@@ -1 +1 @@
1
- (function(_0x4d33c8,_0x41fb3a){const _0xd0f40c=a49_0x49d6,_0x3de6dc=_0x4d33c8();while(!![]){try{const _0x5bd61d=parseInt(_0xd0f40c(0x19c))/0x1*(parseInt(_0xd0f40c(0x19f))/0x2)+-parseInt(_0xd0f40c(0x199))/0x3+-parseInt(_0xd0f40c(0x197))/0x4*(parseInt(_0xd0f40c(0x18e))/0x5)+parseInt(_0xd0f40c(0x193))/0x6*(-parseInt(_0xd0f40c(0x19d))/0x7)+-parseInt(_0xd0f40c(0x18d))/0x8*(-parseInt(_0xd0f40c(0x19a))/0x9)+-parseInt(_0xd0f40c(0x18a))/0xa+parseInt(_0xd0f40c(0x18b))/0xb*(parseInt(_0xd0f40c(0x195))/0xc);if(_0x5bd61d===_0x41fb3a)break;else _0x3de6dc['push'](_0x3de6dc['shift']());}catch(_0x415a22){_0x3de6dc['push'](_0x3de6dc['shift']());}}}(a49_0x5b61,0xbbd51));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 a49_0x49d6(_0x1611e1,_0x470e65){_0x1611e1=_0x1611e1-0x18a;const _0x5b61e0=a49_0x5b61();let _0x49d6ad=_0x5b61e0[_0x1611e1];return _0x49d6ad;}function formatBytes(_0x2ecb62){const _0x5f3ebb=a49_0x49d6;if(_0x2ecb62>=BYTES_PER_MB){const _0x24fac6=Math[_0x5f3ebb(0x19e)](_0x2ecb62/BYTES_PER_MB*0x64)/0x64;return _0x24fac6[_0x5f3ebb(0x18c)](0x2)+_0x5f3ebb(0x190);}return _0x2ecb62+'\x20B';}export function requireDevelopmentUploadFile(_0x1752aa,_0x3dd1bc){const _0x3544aa=a49_0x49d6,_0x567ab7=_0x1752aa[_0x3544aa(0x1a0)]();if(!_0x567ab7)throw CliErrors[_0x3544aa(0x191)](_0x3dd1bc+_0x3544aa(0x19b));if(!existsSync(_0x567ab7))throw CliErrors[_0x3544aa(0x191)](_0x3544aa(0x198)+_0x567ab7);const _0x481112=statSync(_0x567ab7);if(!_0x481112[_0x3544aa(0x194)]())throw CliErrors[_0x3544aa(0x191)](_0x3544aa(0x196)+_0x567ab7);if(_0x481112[_0x3544aa(0x192)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x3544aa(0x191)](_0x3544aa(0x18f)+_0x567ab7+'\x20('+formatBytes(_0x481112[_0x3544aa(0x192)])+')');return{'path':_0x567ab7,'size':_0x481112[_0x3544aa(0x192)]};}function a49_0x5b61(){const _0x4f9a85=['244284ADnsRq','File\x20is\x20not\x20a\x20regular\x20file:\x20','8ropUZf','File\x20not\x20found:\x20','4438560crvxZy','45SwPJgO','\x20path\x20is\x20required.','4Wyzoyt','280oJBYZQ','ceil','130866zGRnIC','trim','6665350gmtksw','1298UvAvRg','toFixed','1160176dekBkA','46780XbJRQZ','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','\x20MB','validation','size','68226oOXtGR','isFile'];a49_0x5b61=function(){return _0x4f9a85;};return a49_0x5b61();}
1
+ (function(_0x5cb0be,_0x10444e){const _0x942bb4=a49_0xab9b,_0x1cb694=_0x5cb0be();while(!![]){try{const _0x2f44a5=-parseInt(_0x942bb4(0x1e7))/0x1*(parseInt(_0x942bb4(0x1d9))/0x2)+-parseInt(_0x942bb4(0x1e1))/0x3+-parseInt(_0x942bb4(0x1e3))/0x4*(-parseInt(_0x942bb4(0x1dc))/0x5)+parseInt(_0x942bb4(0x1e8))/0x6+parseInt(_0x942bb4(0x1db))/0x7*(-parseInt(_0x942bb4(0x1da))/0x8)+parseInt(_0x942bb4(0x1d8))/0x9*(-parseInt(_0x942bb4(0x1e2))/0xa)+parseInt(_0x942bb4(0x1df))/0xb*(parseInt(_0x942bb4(0x1e6))/0xc);if(_0x2f44a5===_0x10444e)break;else _0x1cb694['push'](_0x1cb694['shift']());}catch(_0x486c15){_0x1cb694['push'](_0x1cb694['shift']());}}}(a49_0x5edd,0xd66fd));import{existsSync,statSync}from'node:fs';import{CliErrors}from'../../errors.js';const BYTES_PER_MB=0x400*0x400;function a49_0xab9b(_0x1ecc89,_0x3c4451){_0x1ecc89=_0x1ecc89-0x1d6;const _0x5eddf6=a49_0x5edd();let _0xab9b62=_0x5eddf6[_0x1ecc89];return _0xab9b62;}export const DEVELOPMENT_UPLOAD_MAX_BYTES=0x32*BYTES_PER_MB;function a49_0x5edd(){const _0x2b00f2=['58XgwYhF','8MZKKjA','573251dZLnRL','5045eruqMu','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','16788695cMemDJ','isFile','4039776hHalHG','45010mIzZXz','6884BAffMo','File\x20not\x20found:\x20','toFixed','12IiCrXo','17083PXfrzP','2773176VyBHnQ','validation','trim','size','1845SxxWsk'];a49_0x5edd=function(){return _0x2b00f2;};return a49_0x5edd();}function formatBytes(_0x402d34){const _0x52201f=a49_0xab9b;if(_0x402d34>=BYTES_PER_MB){const _0x5d207a=Math['ceil'](_0x402d34/BYTES_PER_MB*0x64)/0x64;return _0x5d207a[_0x52201f(0x1e5)](0x2)+'\x20MB';}return _0x402d34+'\x20B';}export function requireDevelopmentUploadFile(_0x440c8b,_0x45762d){const _0x56e3cc=a49_0xab9b,_0x139b6f=_0x440c8b[_0x56e3cc(0x1d6)]();if(!_0x139b6f)throw CliErrors[_0x56e3cc(0x1e9)](_0x45762d+'\x20path\x20is\x20required.');if(!existsSync(_0x139b6f))throw CliErrors[_0x56e3cc(0x1e9)](_0x56e3cc(0x1e4)+_0x139b6f);const _0x1dcb8c=statSync(_0x139b6f);if(!_0x1dcb8c[_0x56e3cc(0x1e0)]())throw CliErrors[_0x56e3cc(0x1e9)](_0x56e3cc(0x1dd)+_0x139b6f);if(_0x1dcb8c[_0x56e3cc(0x1d7)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x56e3cc(0x1e9)](_0x56e3cc(0x1de)+_0x139b6f+'\x20('+formatBytes(_0x1dcb8c[_0x56e3cc(0x1d7)])+')');return{'path':_0x139b6f,'size':_0x1dcb8c[_0x56e3cc(0x1d7)]};}
@@ -1 +1 @@
1
- (function(_0x491e18,_0x3793e7){const _0x58c4ae=a50_0x5d92,_0x123694=_0x491e18();while(!![]){try{const _0x831cdb=parseInt(_0x58c4ae(0x1c9))/0x1+-parseInt(_0x58c4ae(0x1c4))/0x2+parseInt(_0x58c4ae(0x1c7))/0x3+-parseInt(_0x58c4ae(0x1c5))/0x4*(parseInt(_0x58c4ae(0x1ce))/0x5)+-parseInt(_0x58c4ae(0x1cb))/0x6+-parseInt(_0x58c4ae(0x1cf))/0x7*(parseInt(_0x58c4ae(0x1c6))/0x8)+parseInt(_0x58c4ae(0x1ca))/0x9;if(_0x831cdb===_0x3793e7)break;else _0x123694['push'](_0x123694['shift']());}catch(_0x517780){_0x123694['push'](_0x123694['shift']());}}}(a50_0x1240,0x919b8));function a50_0x5d92(_0x4a976,_0x479333){_0x4a976=_0x4a976-0x1c4;const _0x1240b0=a50_0x1240();let _0x5d9241=_0x1240b0[_0x4a976];return _0x5d9241;}export function validateAppcode(_0x2e5989){const _0x211266=a50_0x5d92,_0x1066ce=_0x2e5989[_0x211266(0x1c8)]();if(!_0x1066ce)return{'valid':![],'message':_0x211266(0x1cc)};if(_0x1066ce['length']>0x64)return{'valid':![],'message':_0x211266(0x1cd)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x1066ce))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a50_0x1240(){const _0x54d26b=['323862POjMHC','trim','88838DEANTa','23799177BnhYqa','7102284HyUhZo','App\x20Code\x20cannot\x20be\x20empty','App\x20Code\x20cannot\x20exceed\x20100\x20characters','167645AgOxgD','35nReQOU','537490QmoylJ','48cUbmEu','623888LsCHIm'];a50_0x1240=function(){return _0x54d26b;};return a50_0x1240();}
1
+ function a50_0x2575(_0x2c7e49,_0x34fbdf){_0x2c7e49=_0x2c7e49-0x1b5;const _0x192695=a50_0x1926();let _0x2575df=_0x192695[_0x2c7e49];return _0x2575df;}(function(_0x16d444,_0x41e184){const _0x374e09=a50_0x2575,_0x37a7ce=_0x16d444();while(!![]){try{const _0x2163fc=-parseInt(_0x374e09(0x1b6))/0x1+-parseInt(_0x374e09(0x1be))/0x2*(-parseInt(_0x374e09(0x1c1))/0x3)+parseInt(_0x374e09(0x1b5))/0x4*(parseInt(_0x374e09(0x1ba))/0x5)+-parseInt(_0x374e09(0x1c2))/0x6*(parseInt(_0x374e09(0x1bd))/0x7)+-parseInt(_0x374e09(0x1bc))/0x8+-parseInt(_0x374e09(0x1bf))/0x9*(-parseInt(_0x374e09(0x1bb))/0xa)+-parseInt(_0x374e09(0x1b8))/0xb*(-parseInt(_0x374e09(0x1c3))/0xc);if(_0x2163fc===_0x41e184)break;else _0x37a7ce['push'](_0x37a7ce['shift']());}catch(_0x239db0){_0x37a7ce['push'](_0x37a7ce['shift']());}}}(a50_0x1926,0xee2a2));export function validateAppcode(_0x2b0341){const _0x3a5c4f=a50_0x2575,_0x239487=_0x2b0341['trim']();if(!_0x239487)return{'valid':![],'message':_0x3a5c4f(0x1b7)};if(_0x239487['length']>0x64)return{'valid':![],'message':_0x3a5c4f(0x1c0)};if(!/^[A-Za-z0-9_-]+$/[_0x3a5c4f(0x1b9)](_0x239487))return{'valid':![],'message':_0x3a5c4f(0x1c4)};return{'valid':!![]};}function a50_0x1926(){const _0x98f95f=['Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','188VtZdES','106157mOCBRQ','App\x20Code\x20cannot\x20be\x20empty','11KVGSuB','test','28540AlsUkt','90wkcROm','13110024PoCZAg','518gEkRSY','1254sJzIjX','1070469qfcxhL','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1014VnkwQg','57144nTkyYA','22494444XEkDQr'];a50_0x1926=function(){return _0x98f95f;};return a50_0x1926();}
@@ -1 +1 @@
1
- const a51_0x82bcc8=a51_0x4b17;(function(_0x1e0898,_0x4adf8b){const _0x2d6f31=a51_0x4b17,_0x1a67f0=_0x1e0898();while(!![]){try{const _0x3d0ea1=-parseInt(_0x2d6f31(0x1aa))/0x1*(-parseInt(_0x2d6f31(0x1b1))/0x2)+-parseInt(_0x2d6f31(0x1a6))/0x3+parseInt(_0x2d6f31(0x1b3))/0x4+-parseInt(_0x2d6f31(0x1ab))/0x5+parseInt(_0x2d6f31(0x1a5))/0x6*(parseInt(_0x2d6f31(0x1b8))/0x7)+parseInt(_0x2d6f31(0x1af))/0x8*(-parseInt(_0x2d6f31(0x1b6))/0x9)+parseInt(_0x2d6f31(0x1a8))/0xa;if(_0x3d0ea1===_0x4adf8b)break;else _0x1a67f0['push'](_0x1a67f0['shift']());}catch(_0x485b53){_0x1a67f0['push'](_0x1a67f0['shift']());}}}(a51_0x5336,0xa0e9d));import{CliErrors}from'../../errors.js';function a51_0x4b17(_0x43855d,_0x27f620){_0x43855d=_0x43855d-0x1a5;const _0x5336d6=a51_0x5336();let _0x4b176e=_0x5336d6[_0x43855d];return _0x4b176e;}function a51_0x5336(){const _0x3625c2=['validation','517094Qacukn','object','1068772kASdKD','get','Usage:\x20','495QykcYN','read','35ycCgtf','1007406oBRXzX','1522488ZAmBBF','config','3423460ugdwCc','Get\x20a\x20config\x20value\x20by\x20key','3MXLDRf','3020040efWioO','key','Missing\x20key.','\x20config\x20get\x20--key\x20<key>','66048wYUwBc'];a51_0x5336=function(){return _0x3625c2;};return a51_0x5336();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x5b2fc6){const _0x204426=a51_0x4b17,_0x251c18=_0x5b2fc6['str'](_0x204426(0x1ac));if(!_0x251c18)throw CliErrors[_0x204426(0x1b0)](_0x204426(0x1ad),_0x204426(0x1b5)+CLI_BIN_NAME+_0x204426(0x1ae));const _0x3e5f4a=readConfig(),_0x101f43=_0x251c18==='app'?'appcode':_0x251c18,_0x5eb06d=_0x3e5f4a[_0x101f43];if(_0x5eb06d===undefined)throw CliErrors[_0x204426(0x1b0)]('Key\x20not\x20found:\x20'+_0x251c18);return{'ok':!![],'data':typeof _0x5eb06d===_0x204426(0x1b2)?_0x5eb06d:{[_0x101f43]:_0x5eb06d},'message':typeof _0x5eb06d===_0x204426(0x1b2)?undefined:String(_0x5eb06d)};}export const configGetDefinition={'service':a51_0x82bcc8(0x1a7),'command':a51_0x82bcc8(0x1b4),'description':a51_0x82bcc8(0x1a9),'risk':a51_0x82bcc8(0x1b7),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x82bcc8(0x1ac),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a51_0x594c75=a51_0x126c;(function(_0x1dfd24,_0x4a83ca){const _0x52ebb9=a51_0x126c,_0x5df66b=_0x1dfd24();while(!![]){try{const _0x1595e9=-parseInt(_0x52ebb9(0xe8))/0x1*(parseInt(_0x52ebb9(0xf0))/0x2)+parseInt(_0x52ebb9(0xf3))/0x3*(parseInt(_0x52ebb9(0xf1))/0x4)+parseInt(_0x52ebb9(0xe3))/0x5+parseInt(_0x52ebb9(0xec))/0x6+parseInt(_0x52ebb9(0xe7))/0x7*(parseInt(_0x52ebb9(0xeb))/0x8)+-parseInt(_0x52ebb9(0xea))/0x9*(parseInt(_0x52ebb9(0xe2))/0xa)+parseInt(_0x52ebb9(0xef))/0xb;if(_0x1595e9===_0x4a83ca)break;else _0x5df66b['push'](_0x5df66b['shift']());}catch(_0x7cd3cc){_0x5df66b['push'](_0x5df66b['shift']());}}}(a51_0x368f,0xaeb95));import{CliErrors}from'../../errors.js';function a51_0x126c(_0x37cc7e,_0x82cae6){_0x37cc7e=_0x37cc7e-0xe1;const _0x368f28=a51_0x368f();let _0x126ce3=_0x368f28[_0x37cc7e];return _0x126ce3;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3dc606){const _0x9d48f2=a51_0x126c,_0x3ed210=_0x3dc606[_0x9d48f2(0xf2)](_0x9d48f2(0xf5));if(!_0x3ed210)throw CliErrors[_0x9d48f2(0xe4)](_0x9d48f2(0xf4),_0x9d48f2(0xe5)+CLI_BIN_NAME+_0x9d48f2(0xed));const _0x1cc0db=readConfig(),_0x5ce932=_0x3ed210==='app'?_0x9d48f2(0xe9):_0x3ed210,_0x52fc22=_0x1cc0db[_0x5ce932];if(_0x52fc22===undefined)throw CliErrors[_0x9d48f2(0xe4)](_0x9d48f2(0xe1)+_0x3ed210);return{'ok':!![],'data':typeof _0x52fc22===_0x9d48f2(0xee)?_0x52fc22:{[_0x5ce932]:_0x52fc22},'message':typeof _0x52fc22===_0x9d48f2(0xee)?undefined:String(_0x52fc22)};}function a51_0x368f(){const _0x43b9f5=['1400916MwzVKu','14ybeBMy','1208420blwfFX','str','3HwgxIk','Missing\x20key.','key','read','Key\x20not\x20found:\x20','780790dIYroB','6684715CbDqiu','validation','Usage:\x20','config','2163553icAIrE','167942KvJpGe','appcode','99fXFAhF','8ibpPkI','4047894WNfwId','\x20config\x20get\x20--key\x20<key>','object'];a51_0x368f=function(){return _0x43b9f5;};return a51_0x368f();}export const configGetDefinition={'service':a51_0x594c75(0xe6),'command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a51_0x594c75(0xf6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x594c75(0xf5),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};