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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -0
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/regroup-start.js +1 -1
  109. package/lib/commands/menu/shared/compare-table.js +1 -1
  110. package/lib/commands/menu/shared/delete-plan.js +1 -1
  111. package/lib/commands/menu/shared/facts.js +1 -1
  112. package/lib/commands/menu/shared/index.js +1 -1
  113. package/lib/commands/menu/shared/inquirer.js +1 -1
  114. package/lib/commands/menu/shared/local-pages.js +1 -1
  115. package/lib/commands/menu/shared/logic.js +1 -1
  116. package/lib/commands/menu/shared/mutations.js +1 -1
  117. package/lib/commands/menu/shared/service.js +1 -1
  118. package/lib/commands/menu/shared/sync-core.js +1 -1
  119. package/lib/commands/menu/shared/update-core.js +1 -1
  120. package/lib/commands/menu/shared/valid-url.js +1 -1
  121. package/lib/commands/menu/sync.js +1 -1
  122. package/lib/commands/menu/update.js +1 -1
  123. package/lib/commands/notification/config-list.js +1 -1
  124. package/lib/commands/notification/index.js +1 -1
  125. package/lib/commands/page/generate-start.js +1 -1
  126. package/lib/commands/page/generate-status.js +1 -1
  127. package/lib/commands/page/index.js +1 -1
  128. package/lib/commands/page/pull.js +1 -1
  129. package/lib/commands/page/push.js +1 -1
  130. package/lib/commands/page/relation-audit.js +1 -1
  131. package/lib/commands/page/shared.js +1 -1
  132. package/lib/commands/page/standard-page-status.js +1 -1
  133. package/lib/commands/page/sync.js +1 -1
  134. package/lib/commands/permit/index.js +1 -1
  135. package/lib/commands/permit/page-get.js +1 -1
  136. package/lib/commands/permit/page-set.js +1 -1
  137. package/lib/commands/permit/role-apis-set.js +1 -1
  138. package/lib/commands/permit/role-menus-set.js +1 -1
  139. package/lib/commands/permit/role-menus.js +1 -1
  140. package/lib/commands/permit/shared.js +1 -1
  141. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  142. package/lib/commands/project/create/format-elapsed.js +1 -1
  143. package/lib/commands/project/create/main.js +1 -1
  144. package/lib/commands/project/create/non-interactive.js +1 -1
  145. package/lib/commands/project/create/project-template-path.js +1 -1
  146. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  147. package/lib/commands/project/create/use-format-code.js +1 -1
  148. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  149. package/lib/commands/project/index.js +1 -1
  150. package/lib/commands/project/init.js +1 -1
  151. package/lib/commands/project/upgrade.js +1 -1
  152. package/lib/commands/registry.js +1 -1
  153. package/lib/commands/role/create.js +1 -1
  154. package/lib/commands/role/delete.js +1 -1
  155. package/lib/commands/role/detail.js +1 -1
  156. package/lib/commands/role/index.js +1 -1
  157. package/lib/commands/role/list.js +1 -1
  158. package/lib/commands/role/shared.js +1 -1
  159. package/lib/commands/role/update.js +1 -1
  160. package/lib/commands/role/user-add.js +1 -1
  161. package/lib/commands/role/user-remove.js +1 -1
  162. package/lib/commands/role/user-resolve.js +1 -1
  163. package/lib/commands/run/index.js +1 -1
  164. package/lib/commands/schema.js +1 -1
  165. package/lib/commands/sql/create.js +1 -1
  166. package/lib/commands/sql/delete.js +1 -1
  167. package/lib/commands/sql/detail.js +1 -1
  168. package/lib/commands/sql/exec.js +1 -1
  169. package/lib/commands/sql/index.js +1 -1
  170. package/lib/commands/sql/list.js +1 -1
  171. package/lib/commands/sql/pull.js +1 -1
  172. package/lib/commands/sql/push.js +1 -1
  173. package/lib/commands/sql/save.js +1 -1
  174. package/lib/commands/sql/shared.js +1 -1
  175. package/lib/commands/sql/status.js +1 -1
  176. package/lib/commands/sql/validate.js +1 -1
  177. package/lib/commands/task/index.js +1 -1
  178. package/lib/commands/task/status.js +1 -1
  179. package/lib/commands/workspace/add.js +1 -1
  180. package/lib/commands/workspace/index.js +1 -1
  181. package/lib/commands/workspace/remove.js +1 -1
  182. package/lib/config/schema.js +1 -1
  183. package/lib/constant/cdn.js +1 -1
  184. package/lib/constant/cli.js +1 -1
  185. package/lib/constant/defaults.js +1 -1
  186. package/lib/constant/domain.js +1 -1
  187. package/lib/constant/env.js +1 -1
  188. package/lib/constant/output.js +1 -1
  189. package/lib/constant/paths.js +1 -1
  190. package/lib/constant/risk.js +1 -1
  191. package/lib/context/app-resolver.js +1 -1
  192. package/lib/context/auth-resolver.js +1 -1
  193. package/lib/context/config-loader.js +1 -1
  194. package/lib/context.js +1 -1
  195. package/lib/core/alias-resolver.js +1 -1
  196. package/lib/core/api-client.js +1 -1
  197. package/lib/core/bff/config.js +1 -1
  198. package/lib/core/bff/file-system.js +1 -1
  199. package/lib/core/bff/hash.js +1 -1
  200. package/lib/core/bff/lock.js +1 -1
  201. package/lib/core/bff/utils.js +1 -1
  202. package/lib/core/db-resolver.js +1 -1
  203. package/lib/core/page/file-system.js +1 -1
  204. package/lib/core/page/hash.js +1 -1
  205. package/lib/core/page/lock.js +1 -1
  206. package/lib/core/sql-index-auditor.js +1 -1
  207. package/lib/core/sql-sync/config.js +1 -1
  208. package/lib/core/sql-sync/file-system.js +1 -1
  209. package/lib/core/sql-sync/hash.js +1 -1
  210. package/lib/core/sql-sync/lock.js +1 -1
  211. package/lib/core/sql-sync/utils.js +1 -1
  212. package/lib/core/sql-validator.js +1 -1
  213. package/lib/errors.js +1 -1
  214. package/lib/framework/build-all-flags.js +1 -1
  215. package/lib/framework/error-output.js +1 -1
  216. package/lib/framework/explicit-yes.js +1 -1
  217. package/lib/framework/flags.js +1 -1
  218. package/lib/framework/help.js +1 -1
  219. package/lib/framework/index.js +1 -1
  220. package/lib/framework/output.js +1 -1
  221. package/lib/framework/response.js +1 -1
  222. package/lib/framework/runner-alias.js +1 -1
  223. package/lib/framework/runner.js +1 -1
  224. package/lib/framework/schema-export.js +1 -1
  225. package/lib/framework/types.js +1 -1
  226. package/lib/generated/build-info.js +1 -1
  227. package/lib/help.js +1 -1
  228. package/lib/skills/main.js +1 -1
  229. package/lib/skills/npx-skills-add.js +1 -1
  230. package/lib/telemetry/cli-command-trace.js +1 -1
  231. package/lib/telemetry/cli-help-trace.js +1 -1
  232. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  233. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  234. package/lib/telemetry/send-cli-trace-log.js +1 -1
  235. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  236. package/lib/utils/ai_config.js +1 -1
  237. package/lib/utils/apply-jq-filter.js +1 -1
  238. package/lib/utils/cdn-config.js +1 -1
  239. package/lib/utils/check-sdk-version.js +1 -1
  240. package/lib/utils/cli-version-check.js +1 -1
  241. package/lib/utils/cli-version-policy.js +1 -1
  242. package/lib/utils/config.js +1 -1
  243. package/lib/utils/copy-directory.js +1 -1
  244. package/lib/utils/entity-with-id.js +1 -1
  245. package/lib/utils/file-utils.js +1 -1
  246. package/lib/utils/guides-cdn.js +1 -1
  247. package/lib/utils/http-client.js +1 -1
  248. package/lib/utils/is-non-interactive.js +1 -1
  249. package/lib/utils/logger.js +1 -1
  250. package/lib/utils/params.js +1 -1
  251. package/lib/utils/platform.js +1 -1
  252. package/lib/utils/rules-cdn.js +1 -1
  253. package/lib/utils/sleep.js +1 -1
  254. package/lib/utils/template-replacer.js +1 -1
  255. package/lib/utils/update-notice.js +1 -1
  256. package/lib/utils/version.js +1 -1
  257. package/lib/utils/with-active-cookie.js +1 -1
  258. package/lib/utils/write-cli-side-channel.js +1 -1
  259. 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
+ const a36_0x5d75b1=a36_0x3409;function a36_0x6001(){const _0x318c2f=['utf8','Remote\x20script\x20missing\x20id.','HOOK','Pull\x20complete:\x20','all','close','135404nQIkJU','push','hash','cancelled','ENDPOINT','434222usTlLZ','force','type','scriptType','parse','version','functionName','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','COMMON','hookLocation','functionNode','1773853YKdQns','235OjnIuC','9394714KgZzft','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','apps','toISOString','map','Would\x20inspect\x20','\x22\x20not\x20found\x20after\x20ensureLockScope.','\x20skipped,\x20','Force\x20overwrite\x20local\x20unsynced\x20changes','apiDir','operationType','GET','stdin','stringify','length','datasetCode','169017qqtKfq','unresolvable\x20target\x20path','toLowerCase','scriptsRoot','Pull\x20only\x20this\x20script\x20type','includes','Remote\x20script\x20missing\x20content.','27cSfbgt','alias','bool','bff','message','appCode','Lock\x20scope\x20for\x20app\x20\x22','lockFilePath','pull','No\x20remote\x20BFF\x20scripts\x20found.','9329184mdXDko','yes','scriptContent','question','nonInteractive','filePath','lockKey','stderr','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','functions','/api/management/library/scripts/list?appCode=','str','10104624uCxUvb','string'];a36_0x6001=function(){return _0x318c2f;};return a36_0x6001();}(function(_0x41f064,_0x3ff4ae){const _0x436d8b=a36_0x3409,_0x4b52a1=_0x41f064();while(!![]){try{const _0x5331b2=-parseInt(_0x436d8b(0xc1))/0x1+parseInt(_0x436d8b(0xb6))/0x2+parseInt(_0x436d8b(0xd3))/0x3+parseInt(_0x436d8b(0xb1))/0x4*(-parseInt(_0x436d8b(0xc2))/0x5)+parseInt(_0x436d8b(0xe4))/0x6+-parseInt(_0x436d8b(0xc3))/0x7+parseInt(_0x436d8b(0xa9))/0x8*(parseInt(_0x436d8b(0xda))/0x9);if(_0x5331b2===_0x3ff4ae)break;else _0x4b52a1['push'](_0x4b52a1['shift']());}catch(_0x3f8837){_0x4b52a1['push'](_0x4b52a1['shift']());}}}(a36_0x6001,0xde504));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';function a36_0x3409(_0x2b2edb,_0x306ac1){_0x2b2edb=_0x2b2edb-0xa9;const _0x600180=a36_0x6001();let _0x340959=_0x600180[_0x2b2edb];return _0x340959;}import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x5d75b1(0xdd),'command':a36_0x5d75b1(0xe2),'description':a36_0x5d75b1(0xbd),'risk':'write','flags':[{'name':a36_0x5d75b1(0xb8),'type':a36_0x5d75b1(0xaa),'description':a36_0x5d75b1(0xd7),'enum':[a36_0x5d75b1(0xbe),a36_0x5d75b1(0xb5),a36_0x5d75b1(0xad)]},{'name':a36_0x5d75b1(0xb7),'type':'boolean','description':a36_0x5d75b1(0xcb)}],async 'dryRun'(_0x3890a6){const _0x275fb8=a36_0x5d75b1,_0x570409=loadBffProjectConfig(_0x3890a6[_0x275fb8(0xdf)]),_0x1676ed=await readBffLockFile(_0x570409['lockFilePath']),{appLock:_0x2cfd3b}=ensureLockScope(_0x1676ed??createEmptyBffLock(),_0x3890a6['appCode'],_0x570409[_0x275fb8(0xd6)],_0x275fb8(0xe2)),_0x4ade15=normalizeBffType(_0x3890a6['str'](_0x275fb8(0xb8)))??undefined,_0x4ceec8=buildDatasetCodeToAliasMap(_0x3890a6[_0x275fb8(0xcc)],_0x3890a6[_0x275fb8(0xdf)]),[_0x43339a,_0xbc6c93]=await Promise[_0x275fb8(0xaf)]([listBffScripts(_0x3890a6[_0x275fb8(0xdf)],_0x4ade15),getBffScriptStatistics(_0x3890a6[_0x275fb8(0xdf)])]),_0x4f42af=createHookLocationMap(_0xbc6c93),_0x5575b4=[];for(const _0x24986b of _0x43339a){const _0x18a591=resolveRemoteScriptTarget(_0x570409,_0x24986b,_0x4f42af,_0x2cfd3b[_0x275fb8(0xed)],_0x4ceec8);if(!_0x18a591){_0x5575b4['push']({'scriptType':_0x24986b[_0x275fb8(0xb9)],'functionName':_0x24986b[_0x275fb8(0xbc)]??'','status':'skipped','reason':_0x275fb8(0xd4)});continue;}const _0x56b621=_0x2cfd3b['functions'][_0x18a591[_0x275fb8(0xea)]],_0x3ff402=_0x24986b[_0x275fb8(0xe6)]!=null?computeContentHash(_0x24986b[_0x275fb8(0xe6)]):undefined,_0xb1a03f=await hasUnsyncedLocalChanges(_0x18a591['filePath'],_0x56b621,_0x3ff402);_0x5575b4['push']({'lockKey':_0x18a591[_0x275fb8(0xea)],'filePath':_0x18a591[_0x275fb8(0xe9)],'remoteId':_0x24986b['id']??null,'status':_0xb1a03f?'conflict':'would_pull'});}return{'method':_0x275fb8(0xce),'url':_0x275fb8(0xee)+_0x3890a6[_0x275fb8(0xdf)]+(_0x4ade15?'&type='+_0x4ade15:''),'body':{'appCode':_0x3890a6[_0x275fb8(0xdf)],'filterType':_0x4ade15??null,'files':_0x5575b4},'description':_0x275fb8(0xc8)+_0x5575b4[_0x275fb8(0xd1)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x5b960b){const _0x39a1e9=a36_0x5d75b1,_0x3cc16c=loadBffProjectConfig(_0x5b960b[_0x39a1e9(0xdf)]),_0x26e6b6=await readBffLockFile(_0x3cc16c[_0x39a1e9(0xe1)]),{lockData:_0x3d27bf,appLock:_0x1e6029}=ensureLockScope(_0x26e6b6??createEmptyBffLock(),_0x5b960b[_0x39a1e9(0xdf)],_0x3cc16c[_0x39a1e9(0xd6)],'pull'),_0x257d11=normalizeBffType(_0x5b960b[_0x39a1e9(0xef)](_0x39a1e9(0xb8)))??undefined;if(_0x5b960b[_0x39a1e9(0xef)]('type')&&!_0x257d11)throw CliErrors['validation'](_0x39a1e9(0xec));const [_0x14345b,_0x3eb8dc]=await Promise[_0x39a1e9(0xaf)]([listBffScripts(_0x5b960b[_0x39a1e9(0xdf)],_0x257d11),getBffScriptStatistics(_0x5b960b[_0x39a1e9(0xdf)])]);if(_0x14345b[_0x39a1e9(0xd1)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x39a1e9(0xe3)};const _0x1c5ae4=_0x5b960b[_0x39a1e9(0xdc)](_0x39a1e9(0xb7));if(_0x1c5ae4&&!_0x5b960b[_0x39a1e9(0xe8)]){const _0x258c17=await confirmForce();if(!_0x258c17)throw CliErrors[_0x39a1e9(0xb4)]('Force\x20pull\x20cancelled.');}if(_0x1c5ae4&&_0x5b960b[_0x39a1e9(0xe8)]){}const _0x130722=buildDatasetCodeToAliasMap(_0x5b960b[_0x39a1e9(0xcc)],_0x5b960b[_0x39a1e9(0xdf)]),_0x3527bd=createHookLocationMap(_0x3eb8dc),_0x90f0dc=JSON[_0x39a1e9(0xba)](JSON[_0x39a1e9(0xd0)](_0x3d27bf)),_0x3752dd=_0x5b960b['appCode'],_0x4a9a3e=_0x90f0dc[_0x39a1e9(0xc5)][_0x3752dd];if(!_0x4a9a3e)throw new Error(_0x39a1e9(0xe0)+_0x3752dd+_0x39a1e9(0xc9));const _0x30eee9=[],_0x5e3339=[],_0x210ffd=[];for(const _0x40cd35 of _0x14345b){const _0x58337c=resolveRemoteScriptTarget(_0x3cc16c,_0x40cd35,_0x3527bd,_0x1e6029[_0x39a1e9(0xed)],_0x130722);if(!_0x58337c){_0x5e3339[_0x39a1e9(0xb2)]({'lockKey':_0x40cd35[_0x39a1e9(0xb9)]+'/'+_0x40cd35[_0x39a1e9(0xbc)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x5579a7=_0x1e6029[_0x39a1e9(0xed)][_0x58337c[_0x39a1e9(0xea)]];try{if(!_0x40cd35['id'])throw new Error(_0x39a1e9(0xac));if(_0x40cd35[_0x39a1e9(0xe6)]==null)throw new Error(_0x39a1e9(0xd9));const _0x496543=_0x40cd35[_0x39a1e9(0xe6)],_0x4eed5a=computeContentHash(_0x496543);if(!_0x1c5ae4){const _0x500884=await hasUnsyncedLocalChanges(_0x58337c[_0x39a1e9(0xe9)],_0x5579a7,_0x4eed5a);if(_0x500884){_0x5e3339[_0x39a1e9(0xb2)]({'lockKey':_0x58337c['lockKey'],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x58337c[_0x39a1e9(0xe9)]),await writeFile(_0x58337c[_0x39a1e9(0xe9)],_0x496543,_0x39a1e9(0xab));const _0x527715={'hash':_0x4eed5a,'remoteId':_0x40cd35['id'],'version':_0x40cd35[_0x39a1e9(0xbb)]};_0x58337c[_0x39a1e9(0xb8)]===_0x39a1e9(0xad)&&_0x58337c[_0x39a1e9(0xbf)]&&(_0x527715[_0x39a1e9(0xdb)]=_0x58337c[_0x39a1e9(0xbf)]['alias'],_0x527715[_0x39a1e9(0xd2)]=_0x58337c[_0x39a1e9(0xbf)][_0x39a1e9(0xd2)],_0x527715[_0x39a1e9(0xcd)]=_0x58337c[_0x39a1e9(0xbf)][_0x39a1e9(0xcd)],_0x527715[_0x39a1e9(0xc0)]=_0x58337c[_0x39a1e9(0xbf)][_0x39a1e9(0xc0)]),_0x4a9a3e[_0x39a1e9(0xed)][_0x58337c[_0x39a1e9(0xea)]]=_0x527715,_0x30eee9[_0x39a1e9(0xb2)]({'lockKey':_0x58337c[_0x39a1e9(0xea)],'remoteId':_0x40cd35['id']});}catch(_0xfba158){_0x210ffd[_0x39a1e9(0xb2)]({'lockKey':_0x58337c[_0x39a1e9(0xea)],'error':_0xfba158 instanceof Error?_0xfba158[_0x39a1e9(0xde)]:String(_0xfba158)});}}return _0x4a9a3e['lastSync']=new Date()[_0x39a1e9(0xc6)](),await writeBffLockFile(_0x3cc16c[_0x39a1e9(0xe1)],_0x90f0dc),{'ok':_0x210ffd[_0x39a1e9(0xd1)]===0x0,'data':{'pulled':_0x30eee9,'skipped':_0x5e3339,'failed':_0x210ffd},'message':_0x39a1e9(0xae)+_0x30eee9['length']+'\x20pulled,\x20'+_0x5e3339[_0x39a1e9(0xd1)]+_0x39a1e9(0xca)+_0x210ffd[_0x39a1e9(0xd1)]+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x5da8c8,_0xc86242,_0x2e9de9){const _0x1815e4=a36_0x5d75b1;if(!await fileExists(_0x5da8c8))return![];const _0x223f3a=await computeFileHash(_0x5da8c8);if(!_0xc86242)return _0x2e9de9?_0x223f3a!==_0x2e9de9:!![];return _0x223f3a!==_0xc86242[_0x1815e4(0xb3)];}function buildDatasetCodeToAliasMap(_0x5e2278,_0x4cbd73){const _0x5cdb3b=a36_0x5d75b1,_0x144a9b=loadAliasMap(_0x5e2278,undefined,resolveApiFilePath(_0x5e2278,_0x4cbd73));return new Map(_0x144a9b[_0x5cdb3b(0xc7)](_0x485e38=>[_0x485e38[_0x5cdb3b(0xd2)],_0x485e38[_0x5cdb3b(0xdb)]]));}async function confirmForce(){const _0xa0e785=a36_0x5d75b1,_0x1213e2=createInterface({'input':process[_0xa0e785(0xcf)],'output':process[_0xa0e785(0xeb)]}),_0x453b4f=await new Promise(_0x3f6b69=>{const _0x420e90=_0xa0e785;_0x1213e2[_0x420e90(0xe7)](_0x420e90(0xc4),_0x3f6b69);});return _0x1213e2[_0xa0e785(0xb0)](),['y',_0xa0e785(0xe5)][_0xa0e785(0xd8)](_0x453b4f['trim']()[_0xa0e785(0xd5)]());}
@@ -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_0x534cde=a37_0xe5ab;(function(_0x2cfad3,_0x4071f0){const _0x187b0b=a37_0xe5ab,_0x2d9d3f=_0x2cfad3();while(!![]){try{const _0x31a3f7=-parseInt(_0x187b0b(0xde))/0x1*(-parseInt(_0x187b0b(0xbc))/0x2)+parseInt(_0x187b0b(0xe0))/0x3*(-parseInt(_0x187b0b(0xc9))/0x4)+-parseInt(_0x187b0b(0xe4))/0x5*(-parseInt(_0x187b0b(0xf5))/0x6)+parseInt(_0x187b0b(0xe9))/0x7*(parseInt(_0x187b0b(0xbd))/0x8)+-parseInt(_0x187b0b(0x107))/0x9+-parseInt(_0x187b0b(0xd5))/0xa*(parseInt(_0x187b0b(0xc1))/0xb)+parseInt(_0x187b0b(0xd6))/0xc*(parseInt(_0x187b0b(0xc7))/0xd);if(_0x31a3f7===_0x4071f0)break;else _0x2d9d3f['push'](_0x2d9d3f['shift']());}catch(_0x1360d4){_0x2d9d3f['push'](_0x2d9d3f['shift']());}}}(a37_0x505d,0xf3d6f));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';function a37_0x505d(){const _0x4a2c7e=['high-risk-write','Push\x20only\x20this\x20script\x20type','status','cleared','\x22\x20not\x20found\x20after\x20ensureLockScope.','684330pXZRZT','3132672FUuHjL','toISOString','remoteId',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','join','Local\x20function\x20not\x20found:\x20','string','Runtime\x20script\x20cache\x20cleared.','161bYodQa','lastSync','3XwuUCF','script','push','values','165790xAtOnt','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Would\x20inspect\x20','COMMON','apiDir','98HManCG','force','lockKey','boolean','scriptsRoot','apps','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','some','HOOK','runtime\x20cache\x20clear\x20failed','Run\x20`','\x20skipped,\x20','180UcDwSu','get','Incomplete\x20HOOK\x20path:\x20','POST','name','update','bool','Push\x20local\x20BFF\x20scripts\x20to\x20remote','Lock\x20scope\x20for\x20app\x20\x22','would_push','description','runtime\x20cache\x20cleared','lockFilePath','\x20failed,\x20','operationType','functions','utf8','attempted','13334409ZakaQy','ENDPOINT','No\x20local\x20BFF\x20functions\x20found.','functionNode','bff','map','Force\x20push\x20ignoring\x20hash\x20protection','type','validation','hash','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','aliasToDatasetCode','12266SIPwVh','721576whQfnd','length','unchanged','\x22.\x20','55nVyDzh','code','filePath','stringify','message','version','39znYImW','every','4822184ZvxXRx','has','datasetCode','alias','appCode','parse','datasetCodeToDataset'];a37_0x505d=function(){return _0x4a2c7e;};return a37_0x505d();}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_0x534cde(0x10b),'command':a37_0x534cde(0xe2),'description':a37_0x534cde(0xfc),'risk':a37_0x534cde(0xd0),'flags':[{'name':a37_0x534cde(0x10e),'type':'string','description':a37_0x534cde(0xd1),'enum':[a37_0x534cde(0xe7),a37_0x534cde(0x108),'HOOK']},{'name':a37_0x534cde(0xf9),'type':a37_0x534cde(0xdc),'description':a37_0x534cde(0x111)},{'name':a37_0x534cde(0xea),'type':a37_0x534cde(0xec),'description':a37_0x534cde(0x10d)}],async 'dryRun'(_0x48759c){const _0x399ae4=a37_0x534cde,_0x5e9dcd=loadBffProjectConfig(_0x48759c[_0x399ae4(0xcd)]),_0x11538d=await readBffLockFile(_0x5e9dcd[_0x399ae4(0x101)]),{appLock:_0x1439d6}=ensureLockScope(_0x11538d??createEmptyBffLock(),_0x48759c[_0x399ae4(0xcd)],_0x5e9dcd[_0x399ae4(0xed)],'push'),_0x14c6f6=await getTargetFunctions(_0x5e9dcd,_0x48759c),_0x5b993c=_0x48759c[_0x399ae4(0xfb)](_0x399ae4(0xea)),_0xde4353=[];for(const _0x639c25 of _0x14c6f6){const _0x2d0ed9=await computeFileHash(_0x639c25['filePath']),_0x90dee1=_0x1439d6[_0x399ae4(0x104)][_0x639c25[_0x399ae4(0xeb)]],_0x35fc39=!!_0x90dee1&&_0x90dee1[_0x399ae4(0x110)]===_0x2d0ed9;_0xde4353[_0x399ae4(0xe2)]({'lockKey':_0x639c25[_0x399ae4(0xeb)],'filePath':_0x639c25[_0x399ae4(0xc3)],'remoteId':_0x90dee1?.[_0x399ae4(0xd8)]??null,'mode':_0x90dee1?.[_0x399ae4(0xd8)]?_0x399ae4(0xfa):'create','status':!_0x5b993c&&_0x35fc39?_0x399ae4(0xbf):_0x399ae4(0xfe)});}return{'method':_0x399ae4(0xf8),'url':'/api/management/library/scripts/save','body':{'appCode':_0x48759c[_0x399ae4(0xcd)],'force':_0x5b993c,'files':_0xde4353,'cacheClearAtRuntime':_0xde4353['some'](_0x3d99e0=>_0x3d99e0[_0x399ae4(0xd2)]==='would_push'),'cacheClearAtRuntimeTimes':_0xde4353[_0x399ae4(0xf0)](_0x1f3666=>_0x1f3666[_0x399ae4(0xd2)]===_0x399ae4(0xfe))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x399ae4(0xe6)+_0xde4353['length']+_0x399ae4(0xe5)};},async 'execute'(_0x5e9d0f){const _0x3e1b41=a37_0x534cde,_0x580da6=loadBffProjectConfig(_0x5e9d0f['appCode']),_0x197375=await readBffLockFile(_0x580da6[_0x3e1b41(0x101)]),{lockData:_0x105828,appLock:_0x334353}=ensureLockScope(_0x197375??createEmptyBffLock(),_0x5e9d0f['appCode'],_0x580da6['scriptsRoot'],_0x3e1b41(0xe2)),_0x9c935d=await getTargetFunctions(_0x580da6,_0x5e9d0f);if(_0x9c935d[_0x3e1b41(0xbe)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x3e1b41(0x109)};const _0x118d1e=_0x5e9d0f['bool'](_0x3e1b41(0xea)),_0x546329=JSON[_0x3e1b41(0xce)](JSON[_0x3e1b41(0xc4)](_0x105828)),_0x505e4f=_0x546329[_0x3e1b41(0xee)][_0x5e9d0f[_0x3e1b41(0xcd)]];if(!_0x505e4f)throw new Error(_0x3e1b41(0xfd)+_0x5e9d0f['appCode']+_0x3e1b41(0xd4));const _0x55d4f4=await buildHookMaps(_0x5e9d0f[_0x3e1b41(0xcd)],_0x5e9d0f[_0x3e1b41(0xe8)],_0x9c935d,_0x505e4f),_0x2c66df=[],_0x36b177=[],_0x1bac04=[];for(const _0x3d6406 of _0x9c935d){const _0x5661ad=await computeFileHash(_0x3d6406[_0x3e1b41(0xc3)]),_0x3f2b44=_0x505e4f[_0x3e1b41(0x104)][_0x3d6406[_0x3e1b41(0xeb)]];if(!_0x118d1e&&_0x3f2b44&&_0x3f2b44[_0x3e1b41(0x110)]===_0x5661ad){_0x36b177['push']({'lockKey':_0x3d6406[_0x3e1b41(0xeb)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x5e9d0f[_0x3e1b41(0xcd)],_0x3d6406,_0x505e4f,_0x55d4f4);const _0x199ad0=_0x505e4f[_0x3e1b41(0x104)][_0x3d6406['lockKey']];_0x2c66df['push']({'lockKey':_0x3d6406[_0x3e1b41(0xeb)],'remoteId':_0x199ad0?.['remoteId']??0x0});}catch(_0x366793){_0x1bac04[_0x3e1b41(0xe2)]({'lockKey':_0x3d6406[_0x3e1b41(0xeb)],'error':_0x366793 instanceof Error?_0x366793['message']:String(_0x366793)});}}_0x505e4f[_0x3e1b41(0xdf)]=new Date()[_0x3e1b41(0xd7)](),await writeBffLockFile(_0x580da6[_0x3e1b41(0x101)],_0x546329),await waitForUploadedLockEntries(_0x580da6['lockFilePath'],_0x5e9d0f[_0x3e1b41(0xcd)],_0x2c66df[_0x3e1b41(0x10c)](_0x24662e=>_0x24662e[_0x3e1b41(0xeb)]));let _0x1bbcf4={'attempted':![],'cleared':![]};if(_0x2c66df[_0x3e1b41(0xbe)]>0x0)try{let _0x18a639='';for(let _0x4ddbca=0x0;_0x4ddbca<CACHE_CLEAR_ATTEMPTS;_0x4ddbca+=0x1){_0x18a639=await clearBffScriptCache(),_0x4ddbca<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x1bbcf4={'attempted':!![],'cleared':!![],'message':_0x18a639||_0x3e1b41(0xdd)};}catch(_0x2a40af){_0x1bbcf4={'attempted':!![],'cleared':![],'error':_0x2a40af instanceof Error?_0x2a40af[_0x3e1b41(0xc5)]:String(_0x2a40af)};}const _0x17b380=_0x1bac04[_0x3e1b41(0xbe)]===0x0&&(_0x1bbcf4[_0x3e1b41(0x106)]?_0x1bbcf4[_0x3e1b41(0xd3)]:!![]),_0x3ee8d8=_0x1bbcf4[_0x3e1b41(0x106)]?_0x1bbcf4[_0x3e1b41(0xd3)]?_0x3e1b41(0x100):_0x3e1b41(0xf2):'runtime\x20cache\x20not\x20needed';return{'ok':_0x17b380,'data':{'uploaded':_0x2c66df,'skipped':_0x36b177,'failed':_0x1bac04,'cacheClear':_0x1bbcf4},'message':'Push\x20complete:\x20'+_0x2c66df[_0x3e1b41(0xbe)]+'\x20uploaded,\x20'+_0x36b177[_0x3e1b41(0xbe)]+_0x3e1b41(0xf4)+_0x1bac04['length']+_0x3e1b41(0x102)+_0x3ee8d8};}};async function getTargetFunctions(_0x1a5618,_0x1c60ef){const _0x2be97e=a37_0x534cde,_0x5d2cb8=_0x1c60ef['str'](_0x2be97e(0x10e)),_0x230050=_0x1c60ef['str'](_0x2be97e(0xf9)),_0x3c6e3d=normalizeBffType(_0x5d2cb8)??undefined;if(_0x230050&&!_0x3c6e3d)throw CliErrors['validation'](_0x2be97e(0xef));const _0x3a448a=await scanLocalBffFunctions(_0x1a5618,_0x3c6e3d);if(_0x230050){const _0x29b7f9=_0x3a448a['filter'](_0x594713=>_0x594713[_0x2be97e(0xf9)]===_0x230050);if(_0x29b7f9[_0x2be97e(0xbe)]===0x0)throw CliErrors[_0x2be97e(0x10f)](_0x2be97e(0xdb)+_0x3c6e3d+'/'+_0x230050);return _0x29b7f9;}return _0x3a448a;}function a37_0xe5ab(_0x15676a,_0x30f218){_0x15676a=_0x15676a-0xba;const _0x505d63=a37_0x505d();let _0xe5ab23=_0x505d63[_0x15676a];return _0xe5ab23;}async function buildHookMaps(_0x5972bc,_0x136cc3,_0x2b051f,_0x5b3aa9){const _0x27b4b6=a37_0x534cde,_0x2f2285=_0x2b051f[_0x27b4b6(0xf0)](_0x567149=>_0x567149[_0x27b4b6(0x10e)]===_0x27b4b6(0xf1));if(!_0x2f2285)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x551414=loadAliasMap(_0x136cc3,undefined,resolveApiFilePath(_0x136cc3,_0x5972bc)),_0x3e4337=new Map(_0x551414[_0x27b4b6(0x10c)](_0x2f01a7=>[_0x2f01a7[_0x27b4b6(0xcc)],_0x2f01a7['datasetCode']]));for(const _0x356971 of Object[_0x27b4b6(0xe3)](_0x5b3aa9['functions'])){_0x356971[_0x27b4b6(0xcc)]&&_0x356971[_0x27b4b6(0xcb)]&&!_0x3e4337[_0x27b4b6(0xca)](_0x356971[_0x27b4b6(0xcc)])&&_0x3e4337['set'](_0x356971[_0x27b4b6(0xcc)],_0x356971['datasetCode']);}const _0x398dd0=await listDatasets(_0x5972bc),_0x1ca7f2=new Map(_0x398dd0[_0x27b4b6(0x10c)](_0x1d136a=>[_0x1d136a[_0x27b4b6(0xc2)],_0x1d136a]));return{'aliasToDatasetCode':_0x3e4337,'datasetCodeToDataset':_0x1ca7f2};}async function uploadSingleFunction(_0x54b84c,_0xb0edb,_0x258ae0,_0x255c6d){const _0x32db12=a37_0x534cde,_0x1dc5e9=await readFile(_0xb0edb[_0x32db12(0xc3)],_0x32db12(0x105)),_0x53da55=await computeFileHash(_0xb0edb[_0x32db12(0xc3)]),_0x30d8b5=_0x258ae0['functions'][_0xb0edb[_0x32db12(0xeb)]];if(_0x30d8b5?.[_0x32db12(0xd8)]&&_0x30d8b5[_0x32db12(0xc6)]==null)throw CliErrors[_0x32db12(0x10f)](_0xb0edb[_0x32db12(0xeb)]+_0x32db12(0xd9));let _0x215214=extractScriptDescription(_0x1dc5e9);if(!_0x215214&&_0x30d8b5?.['remoteId']){const _0x1d6a93=await getBffScriptInfo(_0x30d8b5[_0x32db12(0xd8)]);_0x215214=_0x1d6a93[_0x32db12(0xff)]||undefined;}const _0x5a45a4={'appCode':_0x54b84c,'functionName':_0xb0edb[_0x32db12(0xf9)],'scriptType':_0xb0edb[_0x32db12(0x10e)],'scriptContent':_0x1dc5e9};if(_0x30d8b5?.['remoteId'])_0x5a45a4['id']=_0x30d8b5[_0x32db12(0xd8)];if(_0x30d8b5?.[_0x32db12(0xc6)]!=null)_0x5a45a4['version']=_0x30d8b5[_0x32db12(0xc6)];if(_0x215214)_0x5a45a4[_0x32db12(0xff)]=_0x215214;if(_0xb0edb[_0x32db12(0x10e)]===_0x32db12(0xf1)){const _0x4be558=_0xb0edb[_0x32db12(0xcc)];if(!_0x4be558||!_0xb0edb['operationType']||!_0xb0edb[_0x32db12(0x10a)])throw CliErrors[_0x32db12(0x10f)](_0x32db12(0xf7)+_0xb0edb['lockKey']);const _0x74ccef=_0x255c6d[_0x32db12(0xbb)][_0x32db12(0xf6)](_0x4be558)??_0x30d8b5?.['datasetCode']??_0x4be558,_0x469870=_0x255c6d[_0x32db12(0xcf)][_0x32db12(0xf6)](_0x74ccef);if(!_0x469870)throw CliErrors[_0x32db12(0x10f)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x4be558+_0x32db12(0xc0)+(_0x32db12(0xf3)+CLI_BIN_NAME+_0x32db12(0xba)));_0x5a45a4['datasetId']=_0x469870['id'],_0x5a45a4[_0x32db12(0x103)]=_0xb0edb['operationType'],_0x5a45a4['functionNode']=_0xb0edb[_0x32db12(0x10a)];}const _0x15fdf9=await saveBffScript(_0x5a45a4),_0x23e22b=_0x15fdf9['id'],_0x300b6f=_0x15fdf9[_0x32db12(0xe1)]??await getBffScriptInfo(_0x23e22b),_0x69e419={'hash':_0x53da55,'remoteId':_0x23e22b,'version':_0x300b6f[_0x32db12(0xc6)]};if(_0xb0edb[_0x32db12(0x10e)]===_0x32db12(0xf1)){const _0x289175=_0xb0edb[_0x32db12(0xcc)],_0xce1e11=_0x255c6d['aliasToDatasetCode']['get'](_0x289175)??_0x30d8b5?.[_0x32db12(0xcb)]??_0x289175;_0x255c6d[_0x32db12(0xbb)]['has'](_0x289175)?_0x69e419['alias']=_0x289175:_0x69e419[_0x32db12(0xcc)]=_0x30d8b5?.[_0x32db12(0xcc)],_0x69e419[_0x32db12(0xcb)]=_0xce1e11,_0x69e419[_0x32db12(0x103)]=_0xb0edb[_0x32db12(0x103)],_0x69e419[_0x32db12(0x10a)]=_0xb0edb[_0x32db12(0x10a)];}_0x258ae0[_0x32db12(0x104)][_0xb0edb['lockKey']]=_0x69e419;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x29fa07,_0x539103,_0x45376c){const _0x25de68=a37_0x534cde;if(_0x45376c[_0x25de68(0xbe)]===0x0)return;for(let _0x5e914a=0x0;_0x5e914a<LOCK_SETTLE_RETRY_COUNT;_0x5e914a+=0x1){const _0x2a2907=await readBffLockFile(_0x29fa07),_0x553a0f=_0x2a2907?.[_0x25de68(0xee)]?.[_0x539103]?.[_0x25de68(0x104)]??{},_0x319521=_0x45376c[_0x25de68(0xc8)](_0x25ff8=>!!_0x553a0f[_0x25ff8]?.['remoteId']);if(_0x319521)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x45376c[_0x25de68(0xda)](',\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_0x2d5b0f=a38_0x17dd;(function(_0x65375b,_0x21ebb3){const _0x3f482d=a38_0x17dd,_0x10ebf5=_0x65375b();while(!![]){try{const _0x34aadf=parseInt(_0x3f482d(0xa2))/0x1+-parseInt(_0x3f482d(0x8e))/0x2*(-parseInt(_0x3f482d(0x97))/0x3)+-parseInt(_0x3f482d(0x99))/0x4*(parseInt(_0x3f482d(0x92))/0x5)+-parseInt(_0x3f482d(0xa3))/0x6+parseInt(_0x3f482d(0x98))/0x7+parseInt(_0x3f482d(0x94))/0x8*(parseInt(_0x3f482d(0xa9))/0x9)+-parseInt(_0x3f482d(0x9b))/0xa;if(_0x34aadf===_0x21ebb3)break;else _0x10ebf5['push'](_0x10ebf5['shift']());}catch(_0x420237){_0x10ebf5['push'](_0x10ebf5['shift']());}}}(a38_0x7f69,0x4c3d5));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a38_0x17dd(_0x283991,_0x163446){_0x283991=_0x283991-0x8a;const _0x7f6979=a38_0x7f69();let _0x17ddc5=_0x7f6979[_0x283991];return _0x17ddc5;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a38_0x7f69(){const _0x5ee568=['893316lvTwSL','has','length','hash','datasetCode','filePath','4665393DFFJUO','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','functions','status','apiDir','\x20modified,\x20','110438ZiLmdK','\x20unchanged','lockKey','boolean','55bEtAcs','bff','8AXoMmJ','lockFilePath','scriptsRoot','12SkDpRt','1906891eeQBRr','89332vxUoDg','All\x20BFF\x20scripts\x20are\x20in\x20sync.','3238430PxKOgM','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','push','remote','\x20added,\x20','map','appCode','19003RZMOKd'];a38_0x7f69=function(){return _0x5ee568;};return a38_0x7f69();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a38_0x2d5b0f(0x93),'command':a38_0x2d5b0f(0x8b),'description':a38_0x2d5b0f(0x9c),'risk':'read','flags':[{'name':a38_0x2d5b0f(0x9e),'type':a38_0x2d5b0f(0x91),'description':a38_0x2d5b0f(0xaa)}],async 'execute'(_0xc6e1f8){const _0x44ad98=a38_0x2d5b0f,_0x32ff0d=loadBffProjectConfig(_0xc6e1f8[_0x44ad98(0xa1)]),_0x4b528d=await readBffLockFile(_0x32ff0d[_0x44ad98(0x95)]),{appLock:_0x381a1e}=ensureLockScope(_0x4b528d??createEmptyBffLock(),_0xc6e1f8[_0x44ad98(0xa1)],_0x32ff0d[_0x44ad98(0x96)],_0x44ad98(0x8b)),_0x56325e=await scanLocalBffFunctions(_0x32ff0d),_0x9b8fcf=[],_0x425e13=[],_0x128242=[];for(const _0x50bd03 of _0x56325e){const _0x2de58f=await computeFileHash(_0x50bd03[_0x44ad98(0xa8)]),_0x40b28a=_0x381a1e['functions'][_0x50bd03[_0x44ad98(0x90)]];if(!_0x40b28a)_0x9b8fcf['push'](_0x50bd03[_0x44ad98(0x90)]);else _0x40b28a[_0x44ad98(0xa6)]!==_0x2de58f?_0x425e13['push'](_0x50bd03[_0x44ad98(0x90)]):_0x128242[_0x44ad98(0x9d)](_0x50bd03['lockKey']);}const _0x373994=[];if(_0xc6e1f8['bool'](_0x44ad98(0x9e))){const _0x2354c7=loadAliasMap(_0xc6e1f8[_0x44ad98(0x8c)],undefined,resolveApiFilePath(_0xc6e1f8[_0x44ad98(0x8c)],_0xc6e1f8['appCode'])),_0x2ba793=new Map(_0x2354c7[_0x44ad98(0xa0)](_0x1515aa=>[_0x1515aa[_0x44ad98(0xa7)],_0x1515aa['alias']])),[_0x1ad30b,_0x2432ee]=await Promise['all']([listBffScripts(_0xc6e1f8[_0x44ad98(0xa1)]),getBffScriptStatistics(_0xc6e1f8[_0x44ad98(0xa1)])]),_0x10c4a0=createHookLocationMap(_0x2432ee),_0x105996=new Set(_0x56325e['map'](_0x49883a=>_0x49883a['lockKey']));for(const _0x4202bb of _0x1ad30b){const _0x54d984=resolveRemoteScriptTarget(_0x32ff0d,_0x4202bb,_0x10c4a0,_0x381a1e[_0x44ad98(0x8a)],_0x2ba793);_0x54d984&&!_0x105996[_0x44ad98(0xa4)](_0x54d984[_0x44ad98(0x90)])&&_0x373994[_0x44ad98(0x9d)](_0x54d984[_0x44ad98(0x90)]);}}const _0x4f6787=_0x9b8fcf[_0x44ad98(0xa5)]===0x0&&_0x425e13[_0x44ad98(0xa5)]===0x0&&_0x373994[_0x44ad98(0xa5)]===0x0;return{'ok':!![],'data':{'added':_0x9b8fcf,'modified':_0x425e13,'unchanged':_0x128242,'remoteOnly':_0x373994},'message':_0x4f6787?_0x44ad98(0x9a):_0x9b8fcf[_0x44ad98(0xa5)]+_0x44ad98(0x9f)+_0x425e13[_0x44ad98(0xa5)]+_0x44ad98(0x8d)+_0x128242[_0x44ad98(0xa5)]+_0x44ad98(0x8f)+(_0x373994[_0x44ad98(0xa5)]>0x0?',\x20'+_0x373994['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
+ const a39_0x4ad1bd=a39_0x5a6c;(function(_0x529b7a,_0x40980b){const _0x42dac2=a39_0x5a6c,_0x17ad93=_0x529b7a();while(!![]){try{const _0x394f76=parseInt(_0x42dac2(0x8e))/0x1+parseInt(_0x42dac2(0xa3))/0x2+-parseInt(_0x42dac2(0x95))/0x3+parseInt(_0x42dac2(0x96))/0x4+-parseInt(_0x42dac2(0x90))/0x5+parseInt(_0x42dac2(0x8b))/0x6*(parseInt(_0x42dac2(0x8d))/0x7)+-parseInt(_0x42dac2(0xa4))/0x8;if(_0x394f76===_0x40980b)break;else _0x17ad93['push'](_0x17ad93['shift']());}catch(_0x4a25be){_0x17ad93['push'](_0x17ad93['shift']());}}}(a39_0x3213,0x3529f));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';function a39_0x5a6c(_0xb7c856,_0x424904){_0xb7c856=_0xb7c856-0x8b;const _0x3213fc=a39_0x3213();let _0x5a6cf4=_0x3213fc[_0xb7c856];return _0x5a6cf4;}export const cliSkillDefinitions=[{'service':a39_0x4ad1bd(0x93),'command':a39_0x4ad1bd(0x9d),'description':a39_0x4ad1bd(0xa7),'risk':a39_0x4ad1bd(0x94),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x16fe91){const _0x12cd2c=a39_0x4ad1bd;logger[_0x12cd2c(0xa5)](process['cwd']()),logger[_0x12cd2c(0x99)](_0x12cd2c(0x9c),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x3be10d,RABETBASE_SKILL_SOURCE:_0x1b7c68,runNpxSkillsAddGlobal:_0x382d2d}=await import(_0x12cd2c(0x9a)),_0x268f7c=_0x16fe91[_0x12cd2c(0xa6)]?_0x12cd2c(0xa1):_0x12cd2c(0x8f);console[_0x12cd2c(0x92)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('+_0x3be10d+_0x12cd2c(0xa2));const _0x4f628f=_0x382d2d(process[_0x12cd2c(0x91)](),_0x1b7c68,{'stdio':_0x268f7c});if(_0x4f628f[_0x12cd2c(0xa0)])console[_0x12cd2c(0x92)](_0x12cd2c(0x98));else{if(_0x4f628f['ok'])console['log'](_0x12cd2c(0x8c));else throw CliErrors[_0x12cd2c(0x97)](_0x12cd2c(0x9b)+(_0x4f628f[_0x12cd2c(0x9e)]||'unknown'),_0x12cd2c(0x9f)+_0x3be10d);}return{'ok':!![]};}}];function a39_0x3213(){const _0x54dab1=['setLogPath','nonInteractive','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','163458PlPTtI','CLI\x20Built-in\x20Skill\x20installed','84EYxTXs','388765SaoGrH','inherit','1707085XdiRiX','cwd','log','cli-skill','write','1011756zJgjdD','685076jnMFhD','apiError','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','info','../../skills/npx-skills-add.js','npx\x20skills\x20add\x20failed:\x20','cli-skill-install','install','error','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','skipped','pipe',')...','847418rbHcFL','3313848JKPWqd'];a39_0x3213=function(){return _0x54dab1;};return a39_0x3213();}
@@ -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_0x3a9dd7=a40_0x4519;(function(_0x1550cc,_0x5a141c){const _0x42f0ab=a40_0x4519,_0x27a1c9=_0x1550cc();while(!![]){try{const _0x23ebde=parseInt(_0x42f0ab(0xa7))/0x1*(parseInt(_0x42f0ab(0x89))/0x2)+-parseInt(_0x42f0ab(0xc8))/0x3+parseInt(_0x42f0ab(0x99))/0x4+parseInt(_0x42f0ab(0xd6))/0x5+-parseInt(_0x42f0ab(0xa8))/0x6*(parseInt(_0x42f0ab(0xb6))/0x7)+parseInt(_0x42f0ab(0xd1))/0x8*(-parseInt(_0x42f0ab(0x93))/0x9)+-parseInt(_0x42f0ab(0xcc))/0xa;if(_0x23ebde===_0x5a141c)break;else _0x27a1c9['push'](_0x27a1c9['shift']());}catch(_0x180f4d){_0x27a1c9['push'](_0x27a1c9['shift']());}}}(a40_0x5ecb,0xeb63f));import a40_0x4ef10e from'chalk';import a40_0x3ebf76 from'ora';import a40_0x1c6616 from'semver';import{execa}from'execa';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';function a40_0x5ecb(){const _0x2d7ba3=['Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','7585425ztAyjx','bun','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','entries','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','Beta\x20version:\x20','2ZIXIky','run','unknown','skipped','string','valid','Updating\x20via\x20','map','yellow','fail','4319046rThPug','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','version','write','update','npm','6597008NcBQyP','flag','nonInteractive','/dist-tags','info','latest','boolean','Already\x20up\x20to\x20date\x20(v','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','\x20cli-skill\x20install','Checking\x20for\x20updates...','source','https://registry.npmjs.org/-/package/','execPath','1643729dQTYQX','6FgQNgw','error','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Current\x20version:\x20','Version\x20comparison\x20failed','\x20install\x20-g\x20','inherit','gray','bool','Updated\x20to\x20v','json','Update\x20available:\x20','...','message','3016517gMmnTJ','Update\x20failed','Invalid\x20version:\x20','\x20\x20Run\x20manually:\x20','object','no-skills','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','beta','succeed','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','validation','log','@latest','\x20→\x20','pipe','skills','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Requested\x20version:\x20','2643219PdnQJq','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','timeout','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','20540090qgGOyq','trim','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','includes','toLowerCase','8MXAPbf','cwd','green','warn'];a40_0x5ecb=function(){return _0x2d7ba3;};return a40_0x5ecb();}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(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x58467f=a40_0x4519,_0x23413f=process[_0x58467f(0xa6)][_0x58467f(0xd0)]();if(_0x23413f[_0x58467f(0xcf)](_0x58467f(0xd7)))return _0x58467f(0xd7);return'npm';}const updateFlags=[{'name':a40_0x3a9dd7(0xbd),'type':a40_0x3a9dd7(0x9f),'description':a40_0x3a9dd7(0x94),'default':![]},{'name':a40_0x3a9dd7(0x95),'type':a40_0x3a9dd7(0x8d),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a40_0x3a9dd7(0xbb),'type':'boolean','description':a40_0x3a9dd7(0x84),'default':![]},{'name':'skills','type':a40_0x3a9dd7(0x9f),'description':a40_0x3a9dd7(0x87),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x1f7b76){const _0x588da7=a40_0x3a9dd7;return _0x1f7b76['str']('version')[_0x588da7(0xcd)]();}function shouldSkipCliSkill(_0x55dfab){const _0x96a3bb=a40_0x3a9dd7;return _0x55dfab[_0x96a3bb(0xb0)]('no-skills')||_0x55dfab[_0x96a3bb(0x9a)](_0x96a3bb(0xc5))===![];}async function validateUpdateFlags(_0xd79239){const _0x3b1f99=a40_0x3a9dd7,_0x2a11e9=_0xd79239[_0x3b1f99(0xb0)](_0x3b1f99(0xbd)),_0x2b6c30=getRequestedVersion(_0xd79239);if(_0x2a11e9&&_0x2b6c30)throw CliErrors['validation'](_0x3b1f99(0xcb),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x2b6c30&&!a40_0x1c6616['valid'](_0x2b6c30))throw CliErrors[_0x3b1f99(0xc0)](_0x3b1f99(0xb8)+_0x2b6c30,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x2bdfba=a40_0x3a9dd7;try{const _0x47d9f5=await fetch(_0x2bdfba(0xa5)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x2bdfba(0x9c),{'signal':AbortSignal[_0x2bdfba(0xca)](0x2710)});if(!_0x47d9f5['ok'])return null;const _0x5d58a6=await _0x47d9f5[_0x2bdfba(0xb2)]();if(!_0x5d58a6||typeof _0x5d58a6!==_0x2bdfba(0xba))return null;return Object['fromEntries'](Object[_0x2bdfba(0x86)](_0x5d58a6)['filter'](([,_0x16f88a])=>typeof _0x16f88a===_0x2bdfba(0x8d)&&_0x16f88a['trim']()['length']>0x0)[_0x2bdfba(0x90)](([_0x2935fd,_0x5250d6])=>[_0x2935fd,String(_0x5250d6)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x41f6a8){const _0x572eaa=await fetchNpmDistTags();return _0x572eaa?.[_0x41f6a8]??null;}async function fetchLatestVersion(){const _0x537ee3=a40_0x3a9dd7;return fetchNpmDistTagVersion(_0x537ee3(0x9e));}async function resolveTargetVersion(_0x24c830){const _0x4945e3=a40_0x3a9dd7,_0x5df522=getRequestedVersion(_0x24c830);if(_0x5df522)return{'version':_0x5df522,'source':_0x4945e3(0x95)};if(_0x24c830[_0x4945e3(0xb0)](_0x4945e3(0xbd))){const _0x22ca64=await fetchNpmDistTagVersion(_0x4945e3(0xbd));if(!_0x22ca64)return null;return{'version':_0x22ca64,'source':_0x4945e3(0xbd)};}const _0xc137f7=await fetchLatestVersion();if(!_0xc137f7)return null;return{'version':_0xc137f7,'source':_0x4945e3(0x9e)};}function shouldInstallTarget(_0x4e4f3d,_0x8c4f37){const _0x16d246=a40_0x3a9dd7;if(_0x8c4f37[_0x16d246(0xa4)]===_0x16d246(0x95)||_0x8c4f37[_0x16d246(0xa4)]===_0x16d246(0xbd))return!a40_0x1c6616['eq'](_0x4e4f3d,_0x8c4f37[_0x16d246(0x95)]);return a40_0x1c6616['lt'](_0x4e4f3d,_0x8c4f37['version']);}function a40_0x4519(_0x5a917d,_0x6fb299){_0x5a917d=_0x5a917d-0x84;const _0x5ecb03=a40_0x5ecb();let _0x451942=_0x5ecb03[_0x5a917d];return _0x451942;}function getInstallPlanLabel(_0x13d820,_0x26343e){const _0x2c4fe3=a40_0x3a9dd7;switch(_0x26343e[_0x2c4fe3(0xa4)]){case _0x2c4fe3(0xbd):return _0x2c4fe3(0x88)+a40_0x4ef10e[_0x2c4fe3(0x91)](_0x13d820)+'\x20→\x20'+a40_0x4ef10e[_0x2c4fe3(0xd3)](_0x26343e['version']);case _0x2c4fe3(0x95):return _0x2c4fe3(0xc7)+a40_0x4ef10e['yellow'](_0x13d820)+_0x2c4fe3(0xc3)+a40_0x4ef10e['green'](_0x26343e[_0x2c4fe3(0x95)]);case _0x2c4fe3(0x9e):default:return _0x2c4fe3(0xb3)+a40_0x4ef10e['yellow'](_0x13d820)+'\x20→\x20'+a40_0x4ef10e[_0x2c4fe3(0xd3)](_0x26343e[_0x2c4fe3(0x95)]);}}async function installCliSkill(_0x20b325){const _0x8549a0=a40_0x3a9dd7;console[_0x8549a0(0xc1)](a40_0x4ef10e[_0x8549a0(0xaf)]('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x2fc52d=runNpxSkillsAddGlobal(process[_0x8549a0(0xd2)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x20b325?_0x8549a0(0xc4):_0x8549a0(0xae)});if(_0x2fc52d[_0x8549a0(0x8c)]){console[_0x8549a0(0xc1)](a40_0x4ef10e[_0x8549a0(0xaf)](_0x8549a0(0xaa)));return;}if(_0x2fc52d['ok']){console['log'](a40_0x4ef10e[_0x8549a0(0xaf)](_0x8549a0(0xbc)));return;}console[_0x8549a0(0xd4)](a40_0x4ef10e[_0x8549a0(0x91)](_0x8549a0(0xbf)+(_0x2fc52d['error']||_0x8549a0(0x8b)))),console[_0x8549a0(0xc1)](a40_0x4ef10e[_0x8549a0(0xaf)](_0x8549a0(0xb9)+CLI_BIN_NAME+_0x8549a0(0xa2)));}async function execute(_0x55439a){const _0x50054e=a40_0x3a9dd7;await validateUpdateFlags(_0x55439a);const _0xbe0ff8=getCurrentVersion();console[_0x50054e(0xc1)](_0x50054e(0xab)+_0xbe0ff8);const _0x59b0a7=a40_0x3ebf76(_0x50054e(0xa3))['start'](),_0x2c6021=await resolveTargetVersion(_0x55439a);if(!_0x2c6021){const _0x22ea8e=_0x55439a['bool']('beta')?_0x50054e(0xa1):_0x50054e(0x85);return _0x59b0a7[_0x50054e(0x92)](_0x22ea8e),console[_0x50054e(0xc1)](a40_0x4ef10e['gray'](_0x50054e(0xc6)+NPM_PACKAGE_NAME+_0x50054e(0xc2))),{'ok':![],'message':_0x22ea8e};}const _0x139ac9=a40_0x1c6616[_0x50054e(0x8e)](VERSION),_0x5a91ae=a40_0x1c6616[_0x50054e(0x8e)](_0x2c6021[_0x50054e(0x95)]);if(!_0x139ac9||!_0x5a91ae)return _0x59b0a7[_0x50054e(0x92)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x50054e(0xac)};if(!shouldInstallTarget(_0x139ac9,_0x2c6021)){const _0x2ff1c5=_0x2c6021[_0x50054e(0xa4)]===_0x50054e(0x95)?'Already\x20on\x20requested\x20version\x20(v'+_0x2c6021['version']+')':_0x50054e(0xa0)+_0x2c6021['version']+')';return _0x59b0a7['succeed'](_0x2ff1c5),shouldSkipCliSkill(_0x55439a)?console[_0x50054e(0xc1)](a40_0x4ef10e[_0x50054e(0xaf)](_0x50054e(0xd5))):await installCliSkill(_0x55439a[_0x50054e(0x9b)]),{'ok':!![]};}_0x59b0a7[_0x50054e(0x9d)](getInstallPlanLabel(_0xbe0ff8,_0x2c6021));const _0x235628=detectPackageManager(),_0x248bba=_0x235628===_0x50054e(0x98)?resolveNpmBin(_0x50054e(0x98)):_0x235628,_0x3a1a69=a40_0x3ebf76(_0x50054e(0x8f)+_0x235628+_0x50054e(0xb4))['start']();try{return await execa(_0x248bba,['install','-g',NPM_PACKAGE_NAME+'@'+_0x2c6021[_0x50054e(0x95)]],{'stdio':_0x50054e(0xc4)}),_0x3a1a69[_0x50054e(0xbe)](_0x50054e(0xb1)+_0x2c6021[_0x50054e(0x95)]),console[_0x50054e(0xc1)](a40_0x4ef10e['gray'](_0x50054e(0xce))),shouldSkipCliSkill(_0x55439a)?console[_0x50054e(0xc1)](a40_0x4ef10e[_0x50054e(0xaf)](_0x50054e(0xd5))):await installCliSkill(_0x55439a[_0x50054e(0x9b)]),{'ok':!![]};}catch(_0x132bf1){return _0x3a1a69['fail'](_0x50054e(0xb7)),console[_0x50054e(0xa9)](a40_0x4ef10e['red']('\x20\x20'+_0x132bf1[_0x50054e(0xb5)])),console[_0x50054e(0xc1)](a40_0x4ef10e[_0x50054e(0xaf)]('\x20\x20Try\x20manually:\x20'+_0x235628+_0x50054e(0xad)+NPM_PACKAGE_NAME+'@'+_0x2c6021['version'])),{'ok':![],'message':_0x132bf1[_0x50054e(0xb5)]};}}export const updateDefinition={'service':a40_0x3a9dd7(0x97),'command':a40_0x3a9dd7(0x8a),'description':a40_0x3a9dd7(0xc9),'risk':a40_0x3a9dd7(0x96),'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 a41_0x27c5(){const _0x2b5ee4=['193608AgtGyG','367716YLVilw','4687452rXZnrj','888595trvzbZ','7IfGftX','13544070gkXvgp','1096110fqUVht','2rrxMtb','8MJfuFt','1916850cofvju'];a41_0x27c5=function(){return _0x2b5ee4;};return a41_0x27c5();}function a41_0x5d4c(_0x455674,_0x4e40d3){_0x455674=_0x455674-0x135;const _0x27c5cd=a41_0x27c5();let _0x5d4c08=_0x27c5cd[_0x455674];return _0x5d4c08;}(function(_0x3d01c6,_0x2cff24){const _0x3f96d2=a41_0x5d4c,_0x2d3e56=_0x3d01c6();while(!![]){try{const _0x12fc6d=-parseInt(_0x3f96d2(0x13d))/0x1*(parseInt(_0x3f96d2(0x139))/0x2)+-parseInt(_0x3f96d2(0x13b))/0x3+-parseInt(_0x3f96d2(0x13a))/0x4*(-parseInt(_0x3f96d2(0x135))/0x5)+parseInt(_0x3f96d2(0x138))/0x6+parseInt(_0x3f96d2(0x136))/0x7*(-parseInt(_0x3f96d2(0x13c))/0x8)+-parseInt(_0x3f96d2(0x13e))/0x9+parseInt(_0x3f96d2(0x137))/0xa;if(_0x12fc6d===_0x2cff24)break;else _0x2d3e56['push'](_0x2d3e56['shift']());}catch(_0x2f48d7){_0x2d3e56['push'](_0x2d3e56['shift']());}}}(a41_0x27c5,0x53363));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -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_0x47c2b1=a42_0x1d10;(function(_0x56387b,_0x156e20){const _0x575f4e=a42_0x1d10,_0x3fdae4=_0x56387b();while(!![]){try{const _0x513807=-parseInt(_0x575f4e(0x15c))/0x1+-parseInt(_0x575f4e(0x166))/0x2+-parseInt(_0x575f4e(0x163))/0x3+parseInt(_0x575f4e(0x16d))/0x4*(-parseInt(_0x575f4e(0x15d))/0x5)+parseInt(_0x575f4e(0x169))/0x6+parseInt(_0x575f4e(0x160))/0x7*(parseInt(_0x575f4e(0x165))/0x8)+-parseInt(_0x575f4e(0x16b))/0x9;if(_0x513807===_0x156e20)break;else _0x3fdae4['push'](_0x3fdae4['shift']());}catch(_0x412031){_0x3fdae4['push'](_0x3fdae4['shift']());}}}(a42_0x37d8,0xc2c7d));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x37d8(){const _0x3929c5=['230744VXqgbS','read','operation','appCode','105789gFrqOM','50xgxLaA','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','boolean','7WnGQLF','code','Omit\x20import\x20statements\x20from\x20generated\x20code','905517omCvho','skip-imports','10802992gwnyIh','415790ODYupR','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','str','6330384sMgULL','bool','3737106SasNSJ','sdk'];a42_0x37d8=function(){return _0x3929c5;};return a42_0x37d8();}function a42_0x1d10(_0x3cd623,_0x569d69){_0x3cd623=_0x3cd623-0x15b;const _0x37d81e=a42_0x37d8();let _0x1d1001=_0x37d81e[_0x3cd623];return _0x1d1001;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a42_0x47c2b1(0x16c),'description':a42_0x47c2b1(0x167),'risk':a42_0x47c2b1(0x16e),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x47c2b1(0x16f),'type':'string','required':!![],'description':a42_0x47c2b1(0x15e)},{'name':a42_0x47c2b1(0x164),'type':a42_0x47c2b1(0x15f),'description':a42_0x47c2b1(0x162)}],async 'execute'(_0x3cc6dc){const _0x577f08=a42_0x47c2b1,{dataset:_0x5612e5,operation:_0x22152a}=await getOperationDetail(_0x3cc6dc[_0x577f08(0x15b)],_0x3cc6dc[_0x577f08(0x168)](_0x577f08(0x161)),_0x3cc6dc['str'](_0x577f08(0x16f))),_0x26d3f4=generateSdkCode(_0x5612e5,_0x22152a,{'includeImports':!_0x3cc6dc[_0x577f08(0x16a)](_0x577f08(0x164))});return{'ok':!![],'data':{'dataset':{'name':_0x5612e5['name'],'code':_0x5612e5[_0x577f08(0x161)],'tableName':_0x5612e5['tableName']},'operation':_0x3cc6dc['str'](_0x577f08(0x16f)),'code':_0x26d3f4}};}};
@@ -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_0x4f4804=a43_0x300d;function a43_0x300d(_0x2283c1,_0x40a657){_0x2283c1=_0x2283c1-0x97;const _0x18933d=a43_0x1893();let _0x300d04=_0x18933d[_0x2283c1];return _0x300d04;}(function(_0x56d640,_0xd109ad){const _0x2e755e=a43_0x300d,_0x226121=_0x56d640();while(!![]){try{const _0x9406b1=-parseInt(_0x2e755e(0x9b))/0x1*(-parseInt(_0x2e755e(0xa1))/0x2)+-parseInt(_0x2e755e(0x9c))/0x3+-parseInt(_0x2e755e(0xa4))/0x4*(parseInt(_0x2e755e(0xac))/0x5)+parseInt(_0x2e755e(0xa8))/0x6*(-parseInt(_0x2e755e(0xb3))/0x7)+parseInt(_0x2e755e(0x99))/0x8*(parseInt(_0x2e755e(0x9f))/0x9)+-parseInt(_0x2e755e(0x9e))/0xa*(parseInt(_0x2e755e(0xa9))/0xb)+parseInt(_0x2e755e(0x9d))/0xc*(parseInt(_0x2e755e(0xa6))/0xd);if(_0x9406b1===_0xd109ad)break;else _0x226121['push'](_0x226121['shift']());}catch(_0x4b5761){_0x226121['push'](_0x226121['shift']());}}}(a43_0x1893,0xb4cf3));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x1893(){const _0x48a2ce=['295860LtDwnp','57610mVlgYb','9AcjiWq','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','6bvYJmQ','sqlCode','str','4NShXyR','read','988OOVMwJ','sqlName','334404pgijKX','11waVQrQ','sqlcode','bff','4399595nmpKBx','Omit\x20import\x20statements\x20from\x20generated\x20code','no-imports','appCode','sql','bool','string','56pUFZlW','target','boolean','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','8991832PlMMoJ','sdk','113813lEiTTE','3801153tTFJiP'];a43_0x1893=function(){return _0x48a2ce;};return a43_0x1893();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':a43_0x4f4804(0xb0),'description':a43_0x4f4804(0x98),'risk':a43_0x4f4804(0xa5),'flags':[SQLCODE_FLAG,{'name':a43_0x4f4804(0xb4),'type':a43_0x4f4804(0xb2),'description':a43_0x4f4804(0xa0),'default':a43_0x4f4804(0x9a),'enum':[a43_0x4f4804(0x9a),a43_0x4f4804(0xab)]},{'name':a43_0x4f4804(0xae),'type':a43_0x4f4804(0x97),'description':a43_0x4f4804(0xad)}],async 'execute'(_0x5d3a50){const _0x59860f=a43_0x4f4804,_0x4928f0=await getSqlQueryInfo(_0x5d3a50[_0x59860f(0xaf)],_0x5d3a50[_0x59860f(0xa3)](_0x59860f(0xaa))),_0x274e98=_0x5d3a50[_0x59860f(0xa3)](_0x59860f(0xb4))||_0x59860f(0x9a),_0x16851d=generateSqlCodeTemplate(_0x4928f0,{'target':_0x274e98,'includeImports':!_0x5d3a50[_0x59860f(0xb1)](_0x59860f(0xae))});return{'ok':!![],'data':{'sqlCode':_0x4928f0[_0x59860f(0xa2)],'sqlName':_0x4928f0[_0x59860f(0xa7)],'target':_0x274e98,'code':_0x16851d}};}};
@@ -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(_0x1a48fd,_0x461d04){const _0x3fb9ae=a44_0x1fd8,_0x15bd8a=_0x1a48fd();while(!![]){try{const _0x4ef95f=-parseInt(_0x3fb9ae(0x137))/0x1*(-parseInt(_0x3fb9ae(0x140))/0x2)+parseInt(_0x3fb9ae(0x138))/0x3*(parseInt(_0x3fb9ae(0x12b))/0x4)+-parseInt(_0x3fb9ae(0x13f))/0x5*(-parseInt(_0x3fb9ae(0x13d))/0x6)+parseInt(_0x3fb9ae(0x124))/0x7+parseInt(_0x3fb9ae(0x127))/0x8+-parseInt(_0x3fb9ae(0x128))/0x9*(-parseInt(_0x3fb9ae(0x136))/0xa)+parseInt(_0x3fb9ae(0x13c))/0xb*(-parseInt(_0x3fb9ae(0x133))/0xc);if(_0x4ef95f===_0x461d04)break;else _0x15bd8a['push'](_0x15bd8a['shift']());}catch(_0x41fafd){_0x15bd8a['push'](_0x15bd8a['shift']());}}}(a44_0x41e3,0x2f07e));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';function a44_0x41e3(){const _0x1fdd70=['238677DSQVnG','apps','Usage:\x20','Missing\x20app\x20name.','8163892SwPHPq','18uedInr','global','56585khvvjq','118WBFYQv','bool','\x20<name>\x20--appcode\x20<code>','\x20<name>\x20[--global]','string','object','projectConfig','\x22\x20still\x20defined\x20in\x20','Removed\x20app\x20\x22','args','project','\x22\x20not\x20found.','\x20Set\x20as\x20default\x20app.','\x20config.','\x20Default\x20app\x20changed\x20to\x20\x22','validation','flagMissing','1045051nQxhiu','defaultApp','boolean','2475656SMitWs','423OkNIpf','trim','both','8eTTZIx','Use\x20global\x20config\x20scope','Added','\x20Note:\x20app\x20\x22','inherit','globalConfig','appcode','App\x20\x22','12sbzJeR','\x22\x20(appcode:\x20','keys','57060kHAZNk','251abLKkO'];a44_0x41e3=function(){return _0x1fdd70;};return a44_0x41e3();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x5d6b4c=a44_0x1fd8;return[{'name':_0x5d6b4c(0x131),'type':_0x5d6b4c(0x144),'description':'App\x20code','required':!![]},{'name':_0x5d6b4c(0x13e),'type':_0x5d6b4c(0x126),'description':_0x5d6b4c(0x12c),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x348597=a44_0x1fd8;return[{'name':'global','type':_0x348597(0x126),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x10d10a,_0x44dc61){const _0x58e03f=a44_0x1fd8,_0x47ba14=_0x10d10a[_0x58e03f(0x149)][0x0]?.[_0x58e03f(0x129)]();if(!_0x47ba14)throw CliErrors[_0x58e03f(0x122)](_0x58e03f(0x13b),_0x58e03f(0x13a)+CLI_BIN_NAME+'\x20'+_0x44dc61+'\x20<name>');}function a44_0x1fd8(_0x1635ab,_0x13e2b7){_0x1635ab=_0x1635ab-0x120;const _0x41e3ae=a44_0x41e3();let _0x1fd83d=_0x41e3ae[_0x1635ab];return _0x1fd83d;}export async function runAppAdd(_0x29f97e,_0x3d274c){const _0x2829f9=a44_0x1fd8,_0x21df98=_0x29f97e[_0x2829f9(0x149)][0x0]?.['trim']();if(!_0x21df98)throw CliErrors['validation']('Missing\x20app\x20name.',_0x2829f9(0x13a)+CLI_BIN_NAME+'\x20'+_0x3d274c+_0x2829f9(0x142));const _0x460dab=_0x29f97e['str'](_0x2829f9(0x131));if(!_0x460dab)throw CliErrors[_0x2829f9(0x123)](_0x2829f9(0x131),_0x2829f9(0x13a)+CLI_BIN_NAME+'\x20'+_0x3d274c+_0x2829f9(0x142));const _0x307f10={'global':_0x29f97e[_0x2829f9(0x141)]('global')},_0x522b68=readConfig(_0x307f10);if(!_0x522b68[_0x2829f9(0x139)])_0x522b68['apps']={};const _0x436843={'appcode':_0x460dab,...collectAppProfileOverrides(_0x38aa9f=>_0x29f97e['str'](_0x38aa9f))},_0x1af10b=_0x522b68[_0x2829f9(0x139)],_0x27602e=!!_0x1af10b[_0x21df98];_0x1af10b[_0x21df98]=_0x436843;if(!_0x522b68[_0x2829f9(0x125)])_0x522b68['defaultApp']=_0x21df98;writeConfig(_0x522b68,_0x307f10);const _0x49dae4=!_0x27602e&&_0x522b68['defaultApp']===_0x21df98?_0x2829f9(0x14c):'',_0x11fe6d=(_0x27602e?'Updated':_0x2829f9(0x12d))+'\x20app\x20\x22'+_0x21df98+_0x2829f9(0x134)+_0x460dab+')'+scopeLabel(_0x307f10)+'.'+_0x49dae4;return{'ok':!![],'message':_0x11fe6d};}export async function runAppRemove(_0x4d53e4,_0x50b2eb){const _0x1f9288=a44_0x1fd8,_0x3f38c4=_0x4d53e4[_0x1f9288(0x149)][0x0]?.[_0x1f9288(0x129)]();if(!_0x3f38c4)throw CliErrors['validation'](_0x1f9288(0x13b),_0x1f9288(0x13a)+CLI_BIN_NAME+'\x20'+_0x50b2eb+_0x1f9288(0x143));const _0x47dc42=_0x4d53e4[_0x1f9288(0x141)]('global'),{config:_0xd9589e,layers:_0x516af0}=readRawConfigWithLayers(),_0x2e8e15=_0xd9589e[_0x1f9288(0x139)]??{};if(!_0x2e8e15[_0x3f38c4])throw CliErrors[_0x1f9288(0x122)](_0x1f9288(0x132)+_0x3f38c4+_0x1f9288(0x14b));const _0x5abe47=_0x516af0[_0x1f9288(0x130)][_0x1f9288(0x139)]&&typeof _0x516af0[_0x1f9288(0x130)][_0x1f9288(0x139)]===_0x1f9288(0x145)?_0x516af0[_0x1f9288(0x130)][_0x1f9288(0x139)]:{},_0x4bbe07=_0x516af0[_0x1f9288(0x146)][_0x1f9288(0x139)]&&typeof _0x516af0[_0x1f9288(0x146)][_0x1f9288(0x139)]===_0x1f9288(0x145)?_0x516af0['projectConfig'][_0x1f9288(0x139)]:{},_0x2370b0=appDefinedIn(_0x3f38c4,_0x5abe47,_0x4bbe07,_0x516af0[_0x1f9288(0x146)][_0x1f9288(0x12f)]===![]),_0x8d6fa4=resolveAppScopeForWrite(_0x3f38c4,_0x47dc42,_0x516af0),_0x2afbc7={'global':_0x8d6fa4==='global'},_0x11565f=readConfig(_0x2afbc7),_0x21ab6d=_0x11565f[_0x1f9288(0x139)];if(!_0x21ab6d||!_0x21ab6d[_0x3f38c4])throw CliErrors[_0x1f9288(0x122)](_0x1f9288(0x132)+_0x3f38c4+'\x22\x20not\x20found.');delete _0x21ab6d[_0x3f38c4];let _0xb0f6e='';if(_0x11565f['defaultApp']===_0x3f38c4){const _0x2e5aaf=Object['keys'](_0x21ab6d);_0x11565f['defaultApp']=_0x2e5aaf['length']>0x0?_0x2e5aaf[0x0]:undefined,_0x11565f[_0x1f9288(0x125)]?_0xb0f6e=_0x1f9288(0x121)+_0x11565f[_0x1f9288(0x125)]+'\x22.':delete _0x11565f[_0x1f9288(0x125)];}Object[_0x1f9288(0x135)](_0x21ab6d)['length']===0x0&&(delete _0x11565f['apps'],delete _0x11565f[_0x1f9288(0x125)]);writeConfig(_0x11565f,_0x2afbc7);const _0x6939c2=_0x2370b0===_0x1f9288(0x12a)?_0x1f9288(0x12e)+_0x3f38c4+_0x1f9288(0x147)+(_0x8d6fa4===_0x1f9288(0x14a)?_0x1f9288(0x13e):_0x1f9288(0x14a))+_0x1f9288(0x120):'';return{'ok':!![],'message':_0x1f9288(0x148)+_0x3f38c4+'\x22'+scopeLabel(_0x2afbc7)+'.'+_0xb0f6e+_0x6939c2};}
@@ -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(_0x53d499,_0x3f2c0b){const _0x52f15d=a45_0x2037,_0x19b80e=_0x53d499();while(!![]){try{const _0x48aed1=parseInt(_0x52f15d(0x1de))/0x1*(parseInt(_0x52f15d(0x1f7))/0x2)+parseInt(_0x52f15d(0x1e1))/0x3*(parseInt(_0x52f15d(0x1ef))/0x4)+-parseInt(_0x52f15d(0x1f9))/0x5*(parseInt(_0x52f15d(0x1e9))/0x6)+-parseInt(_0x52f15d(0x1dc))/0x7+parseInt(_0x52f15d(0x1e0))/0x8*(parseInt(_0x52f15d(0x1ea))/0x9)+parseInt(_0x52f15d(0x1eb))/0xa+-parseInt(_0x52f15d(0x1dd))/0xb;if(_0x48aed1===_0x3f2c0b)break;else _0x19b80e['push'](_0x19b80e['shift']());}catch(_0x35dbfe){_0x19b80e['push'](_0x19b80e['shift']());}}}(a45_0x4791,0x4416c));import{input,checkbox,select}from'@inquirer/prompts';function a45_0x2037(_0x2ce0a8,_0x3adad9){_0x2ce0a8=_0x2ce0a8-0x1d8;const _0x4791d6=a45_0x4791();let _0x20374c=_0x4791d6[_0x2ce0a8];return _0x20374c;}import a45_0x571fe7 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 _0x567b83=a45_0x2037,_0x15dda1=await input({'message':_0x567b83(0x1f3),'validate':_0x5886fc=>{const _0x5ce901=_0x567b83,_0x977641=validateAppcode(_0x5886fc[_0x5ce901(0x1f6)]());return _0x977641['valid']||_0x977641[_0x5ce901(0x1e7)]||_0x5ce901(0x1ed);}});return _0x15dda1[_0x567b83(0x1f6)]();}export async function promptAppSelection(_0x2b7b8b){const _0xbfd14c=a45_0x2037,_0xb2b441=[{'name':a45_0x571fe7[_0xbfd14c(0x1f2)](_0xbfd14c(0x1ee)),'value':-0x1},..._0x2b7b8b['map']((_0x5dfaad,_0x1532b2)=>({'name':_0x5dfaad[_0xbfd14c(0x1f4)]+'\x20\x20'+a45_0x571fe7[_0xbfd14c(0x1e8)]('('+_0x5dfaad[_0xbfd14c(0x1df)]+')'),'value':_0x1532b2}))],_0x5268a3=await checkbox({'message':'获取到\x20'+a45_0x571fe7['cyan'](_0x2b7b8b[_0xbfd14c(0x1db)])+_0xbfd14c(0x1e3),'choices':_0xb2b441,'loop':![]});if(_0x5268a3['includes'](-0x1))return _0xbfd14c(0x1da);if(_0x5268a3['length']===0x0)return _0xbfd14c(0x1da);return _0x5268a3[_0xbfd14c(0x1e6)](_0x289ee2=>_0x2b7b8b[_0x289ee2]);}export async function promptSingleAppSelection(_0x483d50){const _0x514951=a45_0x2037,_0x613d4d=[{'name':a45_0x571fe7[_0x514951(0x1e8)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':'skip'},{'name':a45_0x571fe7['yellow'](_0x514951(0x1ee)),'value':_0x514951(0x1da)},..._0x483d50[_0x514951(0x1e6)](_0x3e800d=>({'name':_0x3e800d[_0x514951(0x1f4)]+'\x20\x20'+a45_0x571fe7[_0x514951(0x1e8)]('('+_0x3e800d[_0x514951(0x1df)]+')'),'value':_0x3e800d[_0x514951(0x1df)]}))],_0x29787e=await select({'message':'请选择要绑定的应用:','choices':_0x613d4d});if(_0x29787e===_0x514951(0x1f5))return _0x514951(0x1f5);if(_0x29787e===_0x514951(0x1da))return'custom';return _0x483d50[_0x514951(0x1e4)](_0x4d7a0a=>_0x4d7a0a[_0x514951(0x1df)]===_0x29787e);}export async function selectSingleAppcode(_0x3ee6d7){const _0x5319dc=a45_0x2037;if(!_0x3ee6d7)return writeCliSideChannelLine(a45_0x571fe7[_0x5319dc(0x1e8)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine(_0x5319dc(0x1e2));let _0x219900;try{_0x219900=await withActiveCookie(_0x3ee6d7,()=>listRemoteApps());}catch(_0x8df267){writeCliSideChannelLine(a45_0x571fe7[_0x5319dc(0x1f2)](_0x5319dc(0x1d8)));if(_0x8df267 instanceof Error)writeCliSideChannelLine(a45_0x571fe7[_0x5319dc(0x1e8)](_0x5319dc(0x1e5)+_0x8df267[_0x5319dc(0x1e7)]+')'));return _fallbackOrSkip();}if(_0x219900[_0x5319dc(0x1db)]===0x0)return writeCliSideChannelLine(a45_0x571fe7[_0x5319dc(0x1f2)]('未找到可用应用。')),_fallbackOrSkip();const _0x22819a=await promptSingleAppSelection(_0x219900);if(_0x22819a===_0x5319dc(0x1f5))return'';if(_0x22819a===_0x5319dc(0x1da))return promptCustomAppcode();return _0x22819a['appCode'];}export async function selectMultipleApps(_0x3a2486){const _0x25a7f0=a45_0x2037;writeCliSideChannelLine(_0x25a7f0(0x1e2));let _0x1958c7;try{_0x1958c7=await withActiveCookie(_0x3a2486,()=>listRemoteApps());}catch(_0x28770c){writeCliSideChannelLine(_0x25a7f0(0x1d9));if(_0x28770c instanceof Error)writeCliSideChannelLine(_0x25a7f0(0x1e5)+_0x28770c[_0x25a7f0(0x1e7)]+')');return'custom';}if(_0x1958c7['length']===0x0)return writeCliSideChannelLine(_0x25a7f0(0x1f8)),'custom';return promptAppSelection(_0x1958c7);}function a45_0x4791(){const _0x3306fa=['\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','find','\x20\x20(','map','message','gray','1656366qaRjcG','70947zMfZWm','1634580TsynLv','App\x20Code:','Invalid\x20App\x20Code','✎\x20自定义输入\x20appcode','358736RTNQbq','manual','(跳过,稍后配置)','yellow','请输入\x20App\x20Code:','appName','skip','trim','200WGyCrn','\x0a未找到可用应用。','5GXjlXQ','无法获取远程应用列表,请手动输入。','\x0a无法获取远程应用列表,请手动输入。','custom','length','1282477BEEhlo','4995287PXoIqM','2572dtmArf','appCode','328nLnwQs','15HwBkCF','正在获取可用应用列表...'];a45_0x4791=function(){return _0x3306fa;};return a45_0x4791();}async function _fallbackOrSkip(){const _0x5b3ce5=a45_0x2037,_0x521806=await select({'message':_0x5b3ce5(0x1ec),'choices':[{'name':a45_0x571fe7[_0x5b3ce5(0x1e8)](_0x5b3ce5(0x1f1)),'value':_0x5b3ce5(0x1f5)},{'name':a45_0x571fe7['yellow']('✎\x20手动输入'),'value':_0x5b3ce5(0x1f0)}]});if(_0x521806==='skip')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_0x1c3aa8=a46_0x5d77;function a46_0x18a3(){const _0xc70d1c=['replace','\x20response\x20did\x20not\x20contain\x20a\x20status.','string','\x20failed:\x20','1979320PhSEzv','toUpperCase','errorMessage','1338696YQmMhO','PROCESSING','\x20is\x20processing.','384TqMSKi','\x27\x5c\x27\x27','20VxaOhU','117061gaDXBr','trim','4yBiOZw','SUCCESS','\x20completed\x20successfully.','status','Task\x20','4803720Kriuvo','8443094MEgyxo','has','\x20returned\x20unknown\x20status\x20','\x20task\x20status\x20--task-id\x20','PENDING','Async\x20task\x20','9251676cFOiso','\x20--format\x20compress','taskId','4TqGOYc','\x20--appcode\x20','FAILED','304130OYpnAG'];a46_0x18a3=function(){return _0xc70d1c;};return a46_0x18a3();}(function(_0x380fe9,_0x28686f){const _0x2d218d=a46_0x5d77,_0xe40fd8=_0x380fe9();while(!![]){try{const _0x3606e9=parseInt(_0x2d218d(0x73))/0x1*(-parseInt(_0x2d218d(0x83))/0x2)+parseInt(_0x2d218d(0x7b))/0x3*(parseInt(_0x2d218d(0x92))/0x4)+-parseInt(_0x2d218d(0x78))/0x5+parseInt(_0x2d218d(0x88))/0x6+-parseInt(_0x2d218d(0x81))/0x7*(-parseInt(_0x2d218d(0x7e))/0x8)+parseInt(_0x2d218d(0x8f))/0x9+parseInt(_0x2d218d(0x80))/0xa*(-parseInt(_0x2d218d(0x89))/0xb);if(_0x3606e9===_0x28686f)break;else _0xe40fd8['push'](_0xe40fd8['shift']());}catch(_0x586ecf){_0xe40fd8['push'](_0xe40fd8['shift']());}}}(a46_0x18a3,0x836b0));import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a46_0x1c3aa8(0x72)]),NON_TERMINAL_STATUSES=new Set(['PENDING','PROCESSING']);function a46_0x5d77(_0x2a2335,_0xa9c65a){_0x2a2335=_0x2a2335-0x72;const _0x18a336=a46_0x18a3();let _0x5d77f0=_0x18a336[_0x2a2335];return _0x5d77f0;}export function normalizeAsyncTask(_0x337fe8){const _0x35515c=a46_0x1c3aa8,_0x60f28b=typeof _0x337fe8?.[_0x35515c(0x91)]===_0x35515c(0x76)?_0x337fe8[_0x35515c(0x91)]['trim']():'';if(!_0x60f28b)throw CliErrors['apiError']('Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.');const _0x2beb3c=typeof _0x337fe8[_0x35515c(0x86)]==='string'?_0x337fe8['status'][_0x35515c(0x82)]()[_0x35515c(0x79)]():'';if(!_0x2beb3c)throw CliErrors['apiError'](_0x35515c(0x8e)+_0x60f28b+_0x35515c(0x75));return{'taskId':_0x60f28b,'status':_0x2beb3c,'errorMessage':typeof _0x337fe8[_0x35515c(0x7a)]===_0x35515c(0x76)&&_0x337fe8[_0x35515c(0x7a)][_0x35515c(0x82)]()?_0x337fe8[_0x35515c(0x7a)][_0x35515c(0x82)]():null,'isTerminal':TERMINAL_STATUSES[_0x35515c(0x8a)](_0x2beb3c),'knownStatus':TERMINAL_STATUSES['has'](_0x2beb3c)||NON_TERMINAL_STATUSES[_0x35515c(0x8a)](_0x2beb3c)};}export function buildAsyncTaskStatusCommand(_0x52e8f2,_0x3e3ab8){const _0x3ca5c5=a46_0x1c3aa8;return CLI_BIN_NAME+_0x3ca5c5(0x8c)+quoteShellArg(_0x52e8f2)+_0x3ca5c5(0x93)+quoteShellArg(_0x3e3ab8)+_0x3ca5c5(0x90);}export function asyncTaskMessage(_0x51c378){const _0x196c5c=a46_0x1c3aa8;switch(_0x51c378[_0x196c5c(0x86)]){case _0x196c5c(0x8d):return _0x196c5c(0x87)+_0x51c378[_0x196c5c(0x91)]+'\x20is\x20pending.';case _0x196c5c(0x7c):return _0x196c5c(0x87)+_0x51c378[_0x196c5c(0x91)]+_0x196c5c(0x7d);case _0x196c5c(0x84):return'Task\x20'+_0x51c378[_0x196c5c(0x91)]+_0x196c5c(0x85);case _0x196c5c(0x72):return _0x51c378[_0x196c5c(0x7a)]?_0x196c5c(0x87)+_0x51c378[_0x196c5c(0x91)]+_0x196c5c(0x77)+_0x51c378[_0x196c5c(0x7a)]:'Task\x20'+_0x51c378[_0x196c5c(0x91)]+'\x20failed.';default:return _0x196c5c(0x87)+_0x51c378['taskId']+_0x196c5c(0x8b)+_0x51c378[_0x196c5c(0x86)]+'.';}}function quoteShellArg(_0x524f2a){const _0x52d5a9=a46_0x1c3aa8;return'\x27'+_0x524f2a[_0x52d5a9(0x74)](/'/g,_0x52d5a9(0x7f))+'\x27';}
@@ -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_0x2e69(){var _0x58e04d=['1298563BoagLU','6BhObYR','2746881YRfEMY','1079504KEEaqE','4463208PSGurJ','14qptFcx','10hASLNs','413052PTfZct','2677970OKvkzr','method','description','8587pOpBvh'];a47_0x2e69=function(){return _0x58e04d;};return a47_0x2e69();}(function(_0x82474b,_0x41520e){var _0x407405=a47_0x47b6,_0x331ccb=_0x82474b();while(!![]){try{var _0x4acf6a=parseInt(_0x407405(0xe7))/0x1*(parseInt(_0x407405(0xe1))/0x2)+-parseInt(_0x407405(0xe3))/0x3+parseInt(_0x407405(0xdf))/0x4+parseInt(_0x407405(0xe4))/0x5+parseInt(_0x407405(0xe9))/0x6*(-parseInt(_0x407405(0xe8))/0x7)+-parseInt(_0x407405(0xe0))/0x8+parseInt(_0x407405(0xde))/0x9*(parseInt(_0x407405(0xe2))/0xa);if(_0x4acf6a===_0x41520e)break;else _0x331ccb['push'](_0x331ccb['shift']());}catch(_0x16e89b){_0x331ccb['push'](_0x331ccb['shift']());}}}(a47_0x2e69,0x46b9e));function a47_0x47b6(_0x500ca5,_0x3c4ff6){_0x500ca5=_0x500ca5-0xde;var _0x2e6916=a47_0x2e69();var _0x47b62a=_0x2e6916[_0x500ca5];return _0x47b62a;}export function asDryRunResult(_0x252be0,_0x5ccad2){var _0x4a69e7=a47_0x47b6;return Object['defineProperties'](_0x252be0,{'method':{'value':_0x5ccad2[_0x4a69e7(0xe5)],'enumerable':![]},'url':{'value':_0x5ccad2['url'],'enumerable':![]},..._0x5ccad2[_0x4a69e7(0xe6)]?{'description':{'value':_0x5ccad2[_0x4a69e7(0xe6)],'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
+ function a48_0x16f3(_0x4fdfc5,_0x121e50){_0x4fdfc5=_0x4fdfc5-0x97;const _0x430413=a48_0x4304();let _0x16f337=_0x430413[_0x4fdfc5];return _0x16f337;}function a48_0x4304(){const _0x157eda=['SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','number','appcode','1282280hVuYKx','POSTGRESQL','Database\x20product\x20type','916128uMeOIQ','Dataset\x20code\x20(32-char\x20hex\x20UUID)','45750LXMCHi','MYSQL','201znulOw','6492xqXmgu','dbtype','datasetcode','sqlcode','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','376qiDuBr','311230WwzQnX','8KlGWXK','829269Ujpxub','App\x20code\x20(e.g.\x20app-xxxxx)','string','272GsSyMG'];a48_0x4304=function(){return _0x157eda;};return a48_0x4304();}const a48_0x156402=a48_0x16f3;(function(_0x45551,_0x2005ec){const _0x348bdc=a48_0x16f3,_0x28eda5=_0x45551();while(!![]){try{const _0x3f0d0b=parseInt(_0x348bdc(0xad))/0x1*(parseInt(_0x348bdc(0xa7))/0x2)+parseInt(_0x348bdc(0xa1))/0x3*(parseInt(_0x348bdc(0xa2))/0x4)+parseInt(_0x348bdc(0xa8))/0x5+-parseInt(_0x348bdc(0x9f))/0x6+-parseInt(_0x348bdc(0xaa))/0x7+parseInt(_0x348bdc(0xa9))/0x8*(-parseInt(_0x348bdc(0x9d))/0x9)+parseInt(_0x348bdc(0x9a))/0xa;if(_0x3f0d0b===_0x2005ec)break;else _0x28eda5['push'](_0x28eda5['shift']());}catch(_0x1290c5){_0x28eda5['push'](_0x28eda5['shift']());}}}(a48_0x4304,0x1de63));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':'code','type':a48_0x156402(0xac),'required':!![],'description':a48_0x156402(0x9e),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x156402(0xa4),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a48_0x156402(0xa5),'type':a48_0x156402(0xac),'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_0x156402(0xae)}};export const APPCODE_FLAG_OPTIONAL={'name':a48_0x156402(0x99),'type':a48_0x156402(0xac),'required':![],'description':a48_0x156402(0xa6)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a48_0x156402(0xab)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x156402(0x98),'required':!![],'description':a48_0x156402(0x97)};export const DB_TYPE_FLAG={'name':a48_0x156402(0xa3),'type':a48_0x156402(0xac),'required':!![],'description':a48_0x156402(0x9c),'enum':[a48_0x156402(0xa0),a48_0x156402(0x9b)]};
@@ -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(_0x1e0fa4,_0x34f0bb){const _0x520dbf=a49_0x5ce7,_0x543d35=_0x1e0fa4();while(!![]){try{const _0x1e3f9b=parseInt(_0x520dbf(0x181))/0x1+-parseInt(_0x520dbf(0x17a))/0x2*(parseInt(_0x520dbf(0x17b))/0x3)+-parseInt(_0x520dbf(0x176))/0x4*(parseInt(_0x520dbf(0x170))/0x5)+parseInt(_0x520dbf(0x17c))/0x6+parseInt(_0x520dbf(0x178))/0x7+parseInt(_0x520dbf(0x17e))/0x8+-parseInt(_0x520dbf(0x173))/0x9*(parseInt(_0x520dbf(0x182))/0xa);if(_0x1e3f9b===_0x34f0bb)break;else _0x543d35['push'](_0x543d35['shift']());}catch(_0x2e9688){_0x543d35['push'](_0x543d35['shift']());}}}(a49_0x4307,0x210fd));function a49_0x4307(){const _0x2b4bb6=['\x20path\x20is\x20required.','1338862GxRMCN','validation','103852LNzmGt','9QrIKzb','235926FDLDEP','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','1972216twHHYC','ceil','trim','193464jWdTbu','92870ydmnVo','File\x20is\x20not\x20a\x20regular\x20file:\x20','\x20MB','20dpIFmK','File\x20not\x20found:\x20','toFixed','189afkRaS','isFile','size','184352iZelBE'];a49_0x4307=function(){return _0x2b4bb6;};return a49_0x4307();}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_0x5ce7(_0x44d29d,_0x127404){_0x44d29d=_0x44d29d-0x170;const _0x43071a=a49_0x4307();let _0x5ce727=_0x43071a[_0x44d29d];return _0x5ce727;}function formatBytes(_0x1dc621){const _0x40ddf2=a49_0x5ce7;if(_0x1dc621>=BYTES_PER_MB){const _0x27dd5e=Math[_0x40ddf2(0x17f)](_0x1dc621/BYTES_PER_MB*0x64)/0x64;return _0x27dd5e[_0x40ddf2(0x172)](0x2)+_0x40ddf2(0x184);}return _0x1dc621+'\x20B';}export function requireDevelopmentUploadFile(_0x5d8c95,_0x89204c){const _0x272bbb=a49_0x5ce7,_0x2db484=_0x5d8c95[_0x272bbb(0x180)]();if(!_0x2db484)throw CliErrors[_0x272bbb(0x179)](_0x89204c+_0x272bbb(0x177));if(!existsSync(_0x2db484))throw CliErrors[_0x272bbb(0x179)](_0x272bbb(0x171)+_0x2db484);const _0x107823=statSync(_0x2db484);if(!_0x107823[_0x272bbb(0x174)]())throw CliErrors[_0x272bbb(0x179)](_0x272bbb(0x183)+_0x2db484);if(_0x107823[_0x272bbb(0x175)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors[_0x272bbb(0x179)](_0x272bbb(0x17d)+_0x2db484+'\x20('+formatBytes(_0x107823['size'])+')');return{'path':_0x2db484,'size':_0x107823[_0x272bbb(0x175)]};}
@@ -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_0xdd73(_0x1324ed,_0x874c7a){_0x1324ed=_0x1324ed-0xe0;const _0x87cbbc=a50_0x87cb();let _0xdd731=_0x87cbbc[_0x1324ed];return _0xdd731;}(function(_0x214708,_0x4a1a3f){const _0x29d63c=a50_0xdd73,_0x43c488=_0x214708();while(!![]){try{const _0x4b491d=-parseInt(_0x29d63c(0xe2))/0x1+-parseInt(_0x29d63c(0xed))/0x2+parseInt(_0x29d63c(0xe4))/0x3*(-parseInt(_0x29d63c(0xe0))/0x4)+parseInt(_0x29d63c(0xe7))/0x5+parseInt(_0x29d63c(0xe1))/0x6+parseInt(_0x29d63c(0xe3))/0x7+-parseInt(_0x29d63c(0xe6))/0x8*(-parseInt(_0x29d63c(0xe5))/0x9);if(_0x4b491d===_0x4a1a3f)break;else _0x43c488['push'](_0x43c488['shift']());}catch(_0x40e2f4){_0x43c488['push'](_0x43c488['shift']());}}}(a50_0x87cb,0x8b5b9));function a50_0x87cb(){const _0x3abeb5=['4tMqRAC','4167426emleKy','498526mJcLTO','4320134YGwrCI','1167501HRNUhw','135BIqmbX','325136EYnRib','1183065vOUwuE','App\x20Code\x20cannot\x20exceed\x20100\x20characters','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','trim','App\x20Code\x20cannot\x20be\x20empty','1398948kPsWuh'];a50_0x87cb=function(){return _0x3abeb5;};return a50_0x87cb();}export function validateAppcode(_0x26f7a8){const _0x92f638=a50_0xdd73,_0x38a087=_0x26f7a8[_0x92f638(0xeb)]();if(!_0x38a087)return{'valid':![],'message':_0x92f638(0xec)};if(_0x38a087['length']>0x64)return{'valid':![],'message':_0x92f638(0xe8)};if(!/^[A-Za-z0-9_-]+$/[_0x92f638(0xea)](_0x38a087))return{'valid':![],'message':_0x92f638(0xe9)};return{'valid':!![]};}
@@ -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_0x49c8a8=a51_0x2978;(function(_0x534bc7,_0x5ca76a){const _0x4c9671=a51_0x2978,_0x5452ab=_0x534bc7();while(!![]){try{const _0x56ad79=parseInt(_0x4c9671(0x10c))/0x1+-parseInt(_0x4c9671(0x109))/0x2*(parseInt(_0x4c9671(0x112))/0x3)+parseInt(_0x4c9671(0x117))/0x4+parseInt(_0x4c9671(0x115))/0x5+-parseInt(_0x4c9671(0x104))/0x6*(-parseInt(_0x4c9671(0x10a))/0x7)+-parseInt(_0x4c9671(0x102))/0x8*(-parseInt(_0x4c9671(0x116))/0x9)+-parseInt(_0x4c9671(0x106))/0xa;if(_0x56ad79===_0x5ca76a)break;else _0x5452ab['push'](_0x5452ab['shift']());}catch(_0xa31904){_0x5452ab['push'](_0x5452ab['shift']());}}}(a51_0x2837,0xe752e));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a51_0x2978(_0x52eb7a,_0x45e6ef){_0x52eb7a=_0x52eb7a-0x102;const _0x2837b5=a51_0x2837();let _0x29784e=_0x2837b5[_0x52eb7a];return _0x29784e;}function a51_0x2837(){const _0x20d40b=['\x20config\x20get\x20--key\x20<key>','35516380jQisaD','appcode','config','1528694VICsXc','7rzJmWt','Missing\x20key.','121476KoYGWl','validation','object','Key\x20not\x20found:\x20','read','str','3cfVUAv','key','app','7556685Pglpie','1035WDnZbl','5524568AfZaJT','63064mpUoVA','Usage:\x20','8057922oooGlP'];a51_0x2837=function(){return _0x20d40b;};return a51_0x2837();}async function execute(_0x22b458){const _0x1f5cd4=a51_0x2978,_0x34da6f=_0x22b458[_0x1f5cd4(0x111)](_0x1f5cd4(0x113));if(!_0x34da6f)throw CliErrors[_0x1f5cd4(0x10d)](_0x1f5cd4(0x10b),_0x1f5cd4(0x103)+CLI_BIN_NAME+_0x1f5cd4(0x105));const _0xb170da=readConfig(),_0xbcf4ea=_0x34da6f===_0x1f5cd4(0x114)?_0x1f5cd4(0x107):_0x34da6f,_0xeda5ba=_0xb170da[_0xbcf4ea];if(_0xeda5ba===undefined)throw CliErrors[_0x1f5cd4(0x10d)](_0x1f5cd4(0x10f)+_0x34da6f);return{'ok':!![],'data':typeof _0xeda5ba===_0x1f5cd4(0x10e)?_0xeda5ba:{[_0xbcf4ea]:_0xeda5ba},'message':typeof _0xeda5ba===_0x1f5cd4(0x10e)?undefined:String(_0xeda5ba)};}export const configGetDefinition={'service':a51_0x49c8a8(0x108),'command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a51_0x49c8a8(0x110),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x49c8a8(0x113),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};