@lovrabet/rabetbase-cli 2.3.9-beta.3 → 2.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/group-create.js +1 -1
  104. package/lib/commands/menu/group-update.js +1 -1
  105. package/lib/commands/menu/index.js +1 -1
  106. package/lib/commands/menu/list.js +1 -1
  107. package/lib/commands/menu/regroup-start.js +1 -1
  108. package/lib/commands/menu/shared/compare-table.js +1 -1
  109. package/lib/commands/menu/shared/delete-plan.js +1 -1
  110. package/lib/commands/menu/shared/facts.js +1 -1
  111. package/lib/commands/menu/shared/index.js +1 -1
  112. package/lib/commands/menu/shared/inquirer.js +1 -1
  113. package/lib/commands/menu/shared/local-pages.js +1 -1
  114. package/lib/commands/menu/shared/logic.js +1 -1
  115. package/lib/commands/menu/shared/mutations.js +1 -1
  116. package/lib/commands/menu/shared/service.js +1 -1
  117. package/lib/commands/menu/shared/sync-core.js +1 -1
  118. package/lib/commands/menu/shared/update-core.js +1 -1
  119. package/lib/commands/menu/shared/valid-url.js +1 -1
  120. package/lib/commands/menu/sync.js +1 -1
  121. package/lib/commands/menu/update.js +1 -1
  122. package/lib/commands/notification/config-list.js +1 -1
  123. package/lib/commands/notification/index.js +1 -1
  124. package/lib/commands/page/generate-start.js +1 -1
  125. package/lib/commands/page/generate-status.js +1 -1
  126. package/lib/commands/page/index.js +1 -1
  127. package/lib/commands/page/pull.js +1 -1
  128. package/lib/commands/page/push.js +1 -1
  129. package/lib/commands/page/relation-audit.js +1 -1
  130. package/lib/commands/page/shared.js +1 -1
  131. package/lib/commands/page/standard-page-status.js +1 -1
  132. package/lib/commands/page/sync.js +1 -1
  133. package/lib/commands/permit/index.js +1 -1
  134. package/lib/commands/permit/page-get.js +1 -1
  135. package/lib/commands/permit/page-set.js +1 -1
  136. package/lib/commands/permit/role-apis-set.js +1 -1
  137. package/lib/commands/permit/role-menus-set.js +1 -1
  138. package/lib/commands/permit/role-menus.js +1 -1
  139. package/lib/commands/permit/shared.js +1 -1
  140. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  141. package/lib/commands/project/create/format-elapsed.js +1 -1
  142. package/lib/commands/project/create/main.js +1 -1
  143. package/lib/commands/project/create/non-interactive.js +1 -1
  144. package/lib/commands/project/create/project-template-path.js +1 -1
  145. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  146. package/lib/commands/project/create/use-format-code.js +1 -1
  147. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  148. package/lib/commands/project/index.js +1 -1
  149. package/lib/commands/project/init.js +1 -1
  150. package/lib/commands/project/upgrade.js +1 -1
  151. package/lib/commands/registry.js +1 -1
  152. package/lib/commands/role/create.js +1 -1
  153. package/lib/commands/role/delete.js +1 -1
  154. package/lib/commands/role/detail.js +1 -1
  155. package/lib/commands/role/index.js +1 -1
  156. package/lib/commands/role/list.js +1 -1
  157. package/lib/commands/role/shared.js +1 -1
  158. package/lib/commands/role/update.js +1 -1
  159. package/lib/commands/role/user-add.js +1 -1
  160. package/lib/commands/role/user-remove.js +1 -1
  161. package/lib/commands/role/user-resolve.js +1 -1
  162. package/lib/commands/run/index.js +1 -1
  163. package/lib/commands/schema.js +1 -1
  164. package/lib/commands/sql/create.js +1 -1
  165. package/lib/commands/sql/delete.js +1 -1
  166. package/lib/commands/sql/detail.js +1 -1
  167. package/lib/commands/sql/exec.js +1 -1
  168. package/lib/commands/sql/index.js +1 -1
  169. package/lib/commands/sql/list.js +1 -1
  170. package/lib/commands/sql/pull.js +1 -1
  171. package/lib/commands/sql/push.js +1 -1
  172. package/lib/commands/sql/save.js +1 -1
  173. package/lib/commands/sql/shared.js +1 -1
  174. package/lib/commands/sql/status.js +1 -1
  175. package/lib/commands/sql/validate.js +1 -1
  176. package/lib/commands/task/index.js +1 -1
  177. package/lib/commands/task/status.js +1 -1
  178. package/lib/commands/workspace/add.js +1 -1
  179. package/lib/commands/workspace/index.js +1 -1
  180. package/lib/commands/workspace/remove.js +1 -1
  181. package/lib/config/schema.js +1 -1
  182. package/lib/constant/cdn.js +1 -1
  183. package/lib/constant/cli.js +1 -1
  184. package/lib/constant/defaults.js +1 -1
  185. package/lib/constant/domain.js +1 -1
  186. package/lib/constant/env.js +1 -1
  187. package/lib/constant/output.js +1 -1
  188. package/lib/constant/paths.js +1 -1
  189. package/lib/constant/risk.js +1 -1
  190. package/lib/context/app-resolver.js +1 -1
  191. package/lib/context/auth-resolver.js +1 -1
  192. package/lib/context/config-loader.js +1 -1
  193. package/lib/context.js +1 -1
  194. package/lib/core/alias-resolver.js +1 -1
  195. package/lib/core/api-client.js +1 -1
  196. package/lib/core/bff/config.js +1 -1
  197. package/lib/core/bff/file-system.js +1 -1
  198. package/lib/core/bff/hash.js +1 -1
  199. package/lib/core/bff/lock.js +1 -1
  200. package/lib/core/bff/utils.js +1 -1
  201. package/lib/core/db-resolver.js +1 -1
  202. package/lib/core/page/file-system.js +1 -1
  203. package/lib/core/page/hash.js +1 -1
  204. package/lib/core/page/lock.js +1 -1
  205. package/lib/core/sql-index-auditor.js +1 -1
  206. package/lib/core/sql-sync/config.js +1 -1
  207. package/lib/core/sql-sync/file-system.js +1 -1
  208. package/lib/core/sql-sync/hash.js +1 -1
  209. package/lib/core/sql-sync/lock.js +1 -1
  210. package/lib/core/sql-sync/utils.js +1 -1
  211. package/lib/core/sql-validator.js +1 -1
  212. package/lib/errors.js +1 -1
  213. package/lib/framework/build-all-flags.js +1 -1
  214. package/lib/framework/error-output.js +1 -1
  215. package/lib/framework/explicit-yes.js +1 -1
  216. package/lib/framework/flags.js +1 -1
  217. package/lib/framework/help.js +1 -1
  218. package/lib/framework/index.js +1 -1
  219. package/lib/framework/output.js +1 -1
  220. package/lib/framework/response.js +1 -1
  221. package/lib/framework/runner-alias.js +1 -1
  222. package/lib/framework/runner.js +1 -1
  223. package/lib/framework/schema-export.js +1 -1
  224. package/lib/framework/types.js +1 -1
  225. package/lib/generated/build-info.js +1 -1
  226. package/lib/help.js +1 -1
  227. package/lib/skills/main.js +1 -1
  228. package/lib/skills/npx-skills-add.js +1 -1
  229. package/lib/telemetry/cli-command-trace.js +1 -1
  230. package/lib/telemetry/cli-help-trace.js +1 -1
  231. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  232. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  233. package/lib/telemetry/send-cli-trace-log.js +1 -1
  234. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  235. package/lib/utils/ai_config.js +1 -1
  236. package/lib/utils/apply-jq-filter.js +1 -1
  237. package/lib/utils/cdn-config.js +1 -1
  238. package/lib/utils/check-sdk-version.js +1 -1
  239. package/lib/utils/cli-version-check.js +1 -1
  240. package/lib/utils/cli-version-policy.js +1 -1
  241. package/lib/utils/config.js +1 -1
  242. package/lib/utils/copy-directory.js +1 -1
  243. package/lib/utils/entity-with-id.js +1 -1
  244. package/lib/utils/file-utils.js +1 -1
  245. package/lib/utils/guides-cdn.js +1 -1
  246. package/lib/utils/http-client.js +1 -1
  247. package/lib/utils/is-non-interactive.js +1 -1
  248. package/lib/utils/logger.js +1 -1
  249. package/lib/utils/params.js +1 -1
  250. package/lib/utils/platform.js +1 -1
  251. package/lib/utils/rules-cdn.js +1 -1
  252. package/lib/utils/sleep.js +1 -1
  253. package/lib/utils/template-replacer.js +1 -1
  254. package/lib/utils/update-notice.js +1 -1
  255. package/lib/utils/version.js +1 -1
  256. package/lib/utils/with-active-cookie.js +1 -1
  257. package/lib/utils/write-cli-side-channel.js +1 -1
  258. package/package.json +1 -1
@@ -1 +1 @@
1
- const a36_0x21ba99=a36_0x641a;(function(_0x507daa,_0x9cde25){const _0x498957=a36_0x641a,_0x6e4031=_0x507daa();while(!![]){try{const _0x422108=parseInt(_0x498957(0x19d))/0x1+-parseInt(_0x498957(0x1a9))/0x2+parseInt(_0x498957(0x19e))/0x3+parseInt(_0x498957(0x1c2))/0x4*(-parseInt(_0x498957(0x18d))/0x5)+parseInt(_0x498957(0x1a3))/0x6+parseInt(_0x498957(0x1b9))/0x7*(-parseInt(_0x498957(0x1b3))/0x8)+-parseInt(_0x498957(0x1a7))/0x9*(-parseInt(_0x498957(0x1b2))/0xa);if(_0x422108===_0x9cde25)break;else _0x6e4031['push'](_0x6e4031['shift']());}catch(_0x2ff28a){_0x6e4031['push'](_0x6e4031['shift']());}}}(a36_0xca40,0xe33e2));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a36_0x641a(_0x292196,_0x19e325){_0x292196=_0x292196-0x186;const _0xca4072=a36_0xca40();let _0x641aba=_0xca4072[_0x292196];return _0x641aba;}import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x21ba99(0x1cc),'command':'pull','description':a36_0x21ba99(0x1af),'risk':a36_0x21ba99(0x1a6),'flags':[{'name':a36_0x21ba99(0x1a8),'type':a36_0x21ba99(0x1b7),'description':a36_0x21ba99(0x1d0),'enum':[a36_0x21ba99(0x18e),a36_0x21ba99(0x1bb),'HOOK']},{'name':a36_0x21ba99(0x18a),'type':a36_0x21ba99(0x198),'description':a36_0x21ba99(0x1a4)}],async 'dryRun'(_0x3ab4e7){const _0xa7d99d=a36_0x21ba99,_0x5bdbfc=loadBffProjectConfig(_0x3ab4e7[_0xa7d99d(0x18c)]),_0xecc781=await readBffLockFile(_0x5bdbfc['lockFilePath']),{appLock:_0x1a7858}=ensureLockScope(_0xecc781??createEmptyBffLock(),_0x3ab4e7[_0xa7d99d(0x18c)],_0x5bdbfc[_0xa7d99d(0x1c9)],_0xa7d99d(0x19a)),_0x2f041c=normalizeBffType(_0x3ab4e7['str'](_0xa7d99d(0x1a8)))??undefined,_0x555a23=buildDatasetCodeToAliasMap(_0x3ab4e7[_0xa7d99d(0x1b0)],_0x3ab4e7['appCode']),[_0x541f04,_0x366330]=await Promise[_0xa7d99d(0x19b)]([listBffScripts(_0x3ab4e7['appCode'],_0x2f041c),getBffScriptStatistics(_0x3ab4e7['appCode'])]),_0x4c24ec=createHookLocationMap(_0x366330),_0x27fbb5=[];for(const _0x56c8e7 of _0x541f04){const _0x3ae34c=resolveRemoteScriptTarget(_0x5bdbfc,_0x56c8e7,_0x4c24ec,_0x1a7858[_0xa7d99d(0x1c6)],_0x555a23);if(!_0x3ae34c){_0x27fbb5[_0xa7d99d(0x1a2)]({'scriptType':_0x56c8e7[_0xa7d99d(0x188)],'functionName':_0x56c8e7[_0xa7d99d(0x1ce)]??'','status':_0xa7d99d(0x1c3),'reason':_0xa7d99d(0x1c5)});continue;}const _0x2a45d6=_0x1a7858['functions'][_0x3ae34c[_0xa7d99d(0x1cf)]],_0x435ae4=_0x56c8e7['scriptContent']!=null?computeContentHash(_0x56c8e7['scriptContent']):undefined,_0x357017=await hasUnsyncedLocalChanges(_0x3ae34c[_0xa7d99d(0x1aa)],_0x2a45d6,_0x435ae4);_0x27fbb5[_0xa7d99d(0x1a2)]({'lockKey':_0x3ae34c[_0xa7d99d(0x1cf)],'filePath':_0x3ae34c[_0xa7d99d(0x1aa)],'remoteId':_0x56c8e7['id']??null,'status':_0x357017?_0xa7d99d(0x1b1):'would_pull'});}return{'method':_0xa7d99d(0x1c4),'url':'/api/management/library/scripts/list?appCode='+_0x3ab4e7[_0xa7d99d(0x18c)]+(_0x2f041c?_0xa7d99d(0x1b8)+_0x2f041c:''),'body':{'appCode':_0x3ab4e7['appCode'],'filterType':_0x2f041c??null,'files':_0x27fbb5},'description':_0xa7d99d(0x1cb)+_0x27fbb5[_0xa7d99d(0x1ac)]+_0xa7d99d(0x190)};},async 'execute'(_0x485026){const _0x463146=a36_0x21ba99,_0x8fed94=loadBffProjectConfig(_0x485026[_0x463146(0x18c)]),_0x30e7bb=await readBffLockFile(_0x8fed94[_0x463146(0x1be)]),{lockData:_0x2c03c0,appLock:_0xd093e5}=ensureLockScope(_0x30e7bb??createEmptyBffLock(),_0x485026[_0x463146(0x18c)],_0x8fed94[_0x463146(0x1c9)],_0x463146(0x19a)),_0x43f73d=normalizeBffType(_0x485026[_0x463146(0x1bd)](_0x463146(0x1a8)))??undefined;if(_0x485026['str']('type')&&!_0x43f73d)throw CliErrors[_0x463146(0x1c8)](_0x463146(0x1a1));const [_0x53f5ca,_0x170e47]=await Promise['all']([listBffScripts(_0x485026['appCode'],_0x43f73d),getBffScriptStatistics(_0x485026[_0x463146(0x18c)])]);if(_0x53f5ca[_0x463146(0x1ac)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x463146(0x1ab)};const _0x187382=_0x485026[_0x463146(0x1b4)]('force');if(_0x187382&&!_0x485026['nonInteractive']){const _0x360d92=await confirmForce();if(!_0x360d92)throw CliErrors[_0x463146(0x1c1)](_0x463146(0x187));}if(_0x187382&&_0x485026[_0x463146(0x1ba)]){}const _0x1eb301=buildDatasetCodeToAliasMap(_0x485026[_0x463146(0x1b0)],_0x485026[_0x463146(0x18c)]),_0x33bb06=createHookLocationMap(_0x170e47),_0x24eaf6=JSON[_0x463146(0x1a0)](JSON[_0x463146(0x195)](_0x2c03c0)),_0x499bd2=_0x485026[_0x463146(0x18c)],_0x29ce6d=_0x24eaf6[_0x463146(0x1ad)][_0x499bd2];if(!_0x29ce6d)throw new Error(_0x463146(0x1c0)+_0x499bd2+_0x463146(0x19c));const _0x29aeed=[],_0x34f3de=[],_0x33b7f1=[];for(const _0xddb629 of _0x53f5ca){const _0xa5a03b=resolveRemoteScriptTarget(_0x8fed94,_0xddb629,_0x33bb06,_0xd093e5[_0x463146(0x1c6)],_0x1eb301);if(!_0xa5a03b){_0x34f3de['push']({'lockKey':_0xddb629[_0x463146(0x188)]+'/'+_0xddb629[_0x463146(0x1ce)],'reason':_0x463146(0x1c5)});continue;}const _0x54fb79=_0xd093e5['functions'][_0xa5a03b[_0x463146(0x1cf)]];try{if(!_0xddb629['id'])throw new Error(_0x463146(0x194));if(_0xddb629[_0x463146(0x1a5)]==null)throw new Error(_0x463146(0x191));const _0x5ca73b=_0xddb629[_0x463146(0x1a5)],_0xe065a5=computeContentHash(_0x5ca73b);if(!_0x187382){const _0x3bc871=await hasUnsyncedLocalChanges(_0xa5a03b['filePath'],_0x54fb79,_0xe065a5);if(_0x3bc871){_0x34f3de[_0x463146(0x1a2)]({'lockKey':_0xa5a03b[_0x463146(0x1cf)],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0xa5a03b[_0x463146(0x1aa)]),await writeFile(_0xa5a03b[_0x463146(0x1aa)],_0x5ca73b,'utf8');const _0x3c2a01={'hash':_0xe065a5,'remoteId':_0xddb629['id'],'version':_0xddb629[_0x463146(0x186)]};_0xa5a03b[_0x463146(0x1a8)]===_0x463146(0x193)&&_0xa5a03b[_0x463146(0x1bf)]&&(_0x3c2a01[_0x463146(0x1ca)]=_0xa5a03b['hookLocation']['alias'],_0x3c2a01[_0x463146(0x197)]=_0xa5a03b[_0x463146(0x1bf)][_0x463146(0x197)],_0x3c2a01['operationType']=_0xa5a03b[_0x463146(0x1bf)][_0x463146(0x199)],_0x3c2a01[_0x463146(0x1ae)]=_0xa5a03b[_0x463146(0x1bf)][_0x463146(0x1ae)]),_0x29ce6d[_0x463146(0x1c6)][_0xa5a03b['lockKey']]=_0x3c2a01,_0x29aeed['push']({'lockKey':_0xa5a03b[_0x463146(0x1cf)],'remoteId':_0xddb629['id']});}catch(_0x49b537){_0x33b7f1[_0x463146(0x1a2)]({'lockKey':_0xa5a03b[_0x463146(0x1cf)],'error':_0x49b537 instanceof Error?_0x49b537[_0x463146(0x18b)]:String(_0x49b537)});}}return _0x29ce6d[_0x463146(0x18f)]=new Date()[_0x463146(0x1b5)](),await writeBffLockFile(_0x8fed94['lockFilePath'],_0x24eaf6),{'ok':_0x33b7f1[_0x463146(0x1ac)]===0x0,'data':{'pulled':_0x29aeed,'skipped':_0x34f3de,'failed':_0x33b7f1},'message':_0x463146(0x192)+_0x29aeed['length']+_0x463146(0x1bc)+_0x34f3de['length']+_0x463146(0x1c7)+_0x33b7f1['length']+'\x20failed'};}};async function hasUnsyncedLocalChanges(_0x45ff7f,_0x1d1437,_0x3ee70f){if(!await fileExists(_0x45ff7f))return![];const _0x503c4d=await computeFileHash(_0x45ff7f);if(!_0x1d1437)return _0x3ee70f?_0x503c4d!==_0x3ee70f:!![];return _0x503c4d!==_0x1d1437['hash'];}function buildDatasetCodeToAliasMap(_0x5f13d4,_0x256aa5){const _0x2799f2=a36_0x21ba99,_0x205140=loadAliasMap(_0x5f13d4,undefined,resolveApiFilePath(_0x5f13d4,_0x256aa5));return new Map(_0x205140['map'](_0x4bc528=>[_0x4bc528[_0x2799f2(0x197)],_0x4bc528[_0x2799f2(0x1ca)]]));}function a36_0xca40(){const _0x2d463b=['string','&type=','21ZOPolm','nonInteractive','ENDPOINT','\x20pulled,\x20','str','lockFilePath','hookLocation','Lock\x20scope\x20for\x20app\x20\x22','cancelled','3584eDKUUJ','skipped','GET','unresolvable\x20target\x20path','functions','\x20skipped,\x20','validation','scriptsRoot','alias','Would\x20inspect\x20','bff','stderr','functionName','lockKey','Pull\x20only\x20this\x20script\x20type','version','Force\x20pull\x20cancelled.','scriptType','stdin','force','message','appCode','2310dOnjSN','COMMON','lastSync','\x20remote\x20BFF\x20script(s)\x20for\x20pull','Remote\x20script\x20missing\x20content.','Pull\x20complete:\x20','HOOK','Remote\x20script\x20missing\x20id.','stringify','question','datasetCode','boolean','operationType','pull','all','\x22\x20not\x20found\x20after\x20ensureLockScope.','1002605MhAVHG','534780QOnEJt','includes','parse','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','push','9676644DBjqjJ','Force\x20overwrite\x20local\x20unsynced\x20changes','scriptContent','write','4149zXRBHE','type','907970fVnECC','filePath','No\x20remote\x20BFF\x20scripts\x20found.','length','apps','functionNode','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','apiDir','conflict','9170sPDmBQ','3780408ELWAvk','bool','toISOString','close'];a36_0xca40=function(){return _0x2d463b;};return a36_0xca40();}async function confirmForce(){const _0x263cde=a36_0x21ba99,_0x15e998=createInterface({'input':process[_0x263cde(0x189)],'output':process[_0x263cde(0x1cd)]}),_0x265d2e=await new Promise(_0x196c46=>{const _0x3d4003=_0x263cde;_0x15e998[_0x3d4003(0x196)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x196c46);});return _0x15e998[_0x263cde(0x1b6)](),['y','yes'][_0x263cde(0x19f)](_0x265d2e['trim']()['toLowerCase']());}
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 +1 @@
1
- function a37_0x50ec(){const _0x48a89e=['330DLOile','str','Lock\x20scope\x20for\x20app\x20\x22','string','lockFilePath','\x22.\x20','39005KjlTKB','179753CcUJca','length','aliasToDatasetCode','bool','3867PlPYOZ','status','\x20uploaded,\x20','5135630PYnqJb','appCode','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','lockKey','alias','map','create',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','11SNXIcf','validation','code','ENDPOINT','remoteId','toISOString','scriptsRoot','message','hash','force','high-risk-write','has','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','2564pHrVAe','2177199HJWgVm','functions','Runtime\x20script\x20cache\x20cleared.','136YBlYjY','push','COMMON','functionNode','would_push','11HaKYia','script','Force\x20push\x20ignoring\x20hash\x20protection','Local\x20function\x20not\x20found:\x20','name','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','apiDir','attempted','filter','Run\x20`','runtime\x20cache\x20not\x20needed','description','values','HOOK','cleared','apps','/api/management/library/scripts/save','every','operationType','unchanged','join','Incomplete\x20HOOK\x20path:\x20','get','runtime\x20cache\x20cleared','type','filePath','195820MfOfSY','some','datasetCode','41740416wzuAtI','\x22\x20not\x20found\x20after\x20ensureLockScope.','version','lastSync','POST'];a37_0x50ec=function(){return _0x48a89e;};return a37_0x50ec();}const a37_0x2db80b=a37_0x1517;(function(_0x1ef2bf,_0x17c87e){const _0x485f0a=a37_0x1517,_0x5c3e55=_0x1ef2bf();while(!![]){try{const _0x22653f=parseInt(_0x485f0a(0xc7))/0x1*(-parseInt(_0x485f0a(0xa9))/0x2)+-parseInt(_0x485f0a(0xbc))/0x3*(parseInt(_0x485f0a(0x86))/0x4)+-parseInt(_0x485f0a(0xb7))/0x5*(parseInt(_0x485f0a(0xb1))/0x6)+-parseInt(_0x485f0a(0xb8))/0x7*(-parseInt(_0x485f0a(0x8a))/0x8)+-parseInt(_0x485f0a(0x87))/0x9+-parseInt(_0x485f0a(0xbf))/0xa*(parseInt(_0x485f0a(0x8f))/0xb)+parseInt(_0x485f0a(0xac))/0xc;if(_0x22653f===_0x17c87e)break;else _0x5c3e55['push'](_0x5c3e55['shift']());}catch(_0x30b8c1){_0x5c3e55['push'](_0x5c3e55['shift']());}}}(a37_0x50ec,0xc9ef3));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a37_0x1517(_0x186dc8,_0x28df3b){_0x186dc8=_0x186dc8-0x81;const _0x50ec2c=a37_0x50ec();let _0x1517cd=_0x50ec2c[_0x186dc8];return _0x1517cd;}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_0x2db80b(0x8b),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a37_0x2db80b(0x83),'flags':[{'name':'type','type':a37_0x2db80b(0xb4),'description':'Push\x20only\x20this\x20script\x20type','enum':[a37_0x2db80b(0x8c),a37_0x2db80b(0xca),a37_0x2db80b(0x9c)]},{'name':'name','type':a37_0x2db80b(0xb4),'description':a37_0x2db80b(0x94)},{'name':a37_0x2db80b(0x82),'type':'boolean','description':a37_0x2db80b(0x91)}],async 'dryRun'(_0x2a9f3e){const _0x5dc9a5=a37_0x2db80b,_0x48f7f2=loadBffProjectConfig(_0x2a9f3e[_0x5dc9a5(0xc0)]),_0x177ff3=await readBffLockFile(_0x48f7f2[_0x5dc9a5(0xb5)]),{appLock:_0x41c4d3}=ensureLockScope(_0x177ff3??createEmptyBffLock(),_0x2a9f3e['appCode'],_0x48f7f2[_0x5dc9a5(0xcd)],_0x5dc9a5(0x8b)),_0x3444eb=await getTargetFunctions(_0x48f7f2,_0x2a9f3e),_0x40e9d8=_0x2a9f3e['bool'](_0x5dc9a5(0x82)),_0xb6572d=[];for(const _0x44e05c of _0x3444eb){const _0x21801e=await computeFileHash(_0x44e05c[_0x5dc9a5(0xa8)]),_0x224629=_0x41c4d3['functions'][_0x44e05c[_0x5dc9a5(0xc2)]],_0x198efb=!!_0x224629&&_0x224629['hash']===_0x21801e;_0xb6572d[_0x5dc9a5(0x8b)]({'lockKey':_0x44e05c[_0x5dc9a5(0xc2)],'filePath':_0x44e05c[_0x5dc9a5(0xa8)],'remoteId':_0x224629?.['remoteId']??null,'mode':_0x224629?.[_0x5dc9a5(0xcb)]?'update':_0x5dc9a5(0xc5),'status':!_0x40e9d8&&_0x198efb?_0x5dc9a5(0xa2):_0x5dc9a5(0x8e)});}return{'method':_0x5dc9a5(0xb0),'url':_0x5dc9a5(0x9f),'body':{'appCode':_0x2a9f3e[_0x5dc9a5(0xc0)],'force':_0x40e9d8,'files':_0xb6572d,'cacheClearAtRuntime':_0xb6572d[_0x5dc9a5(0xaa)](_0x2357b5=>_0x2357b5[_0x5dc9a5(0xbd)]===_0x5dc9a5(0x8e)),'cacheClearAtRuntimeTimes':_0xb6572d['some'](_0x3f1297=>_0x3f1297['status']===_0x5dc9a5(0x8e))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0xb6572d['length']+_0x5dc9a5(0xc1)};},async 'execute'(_0x47f820){const _0x34f7af=a37_0x2db80b,_0x935a1a=loadBffProjectConfig(_0x47f820['appCode']),_0x135c13=await readBffLockFile(_0x935a1a[_0x34f7af(0xb5)]),{lockData:_0x57789b,appLock:_0x531b5b}=ensureLockScope(_0x135c13??createEmptyBffLock(),_0x47f820['appCode'],_0x935a1a[_0x34f7af(0xcd)],_0x34f7af(0x8b)),_0x29a8a9=await getTargetFunctions(_0x935a1a,_0x47f820);if(_0x29a8a9[_0x34f7af(0xb9)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x1cbc17=_0x47f820[_0x34f7af(0xbb)]('force'),_0x2a4e75=JSON['parse'](JSON['stringify'](_0x57789b)),_0x445237=_0x2a4e75[_0x34f7af(0x9e)][_0x47f820[_0x34f7af(0xc0)]];if(!_0x445237)throw new Error(_0x34f7af(0xb3)+_0x47f820[_0x34f7af(0xc0)]+_0x34f7af(0xad));const _0x1b416a=await buildHookMaps(_0x47f820[_0x34f7af(0xc0)],_0x47f820[_0x34f7af(0x95)],_0x29a8a9,_0x445237),_0x2c50fc=[],_0x2b22a7=[],_0x46d94d=[];for(const _0x46a053 of _0x29a8a9){const _0xe86d76=await computeFileHash(_0x46a053['filePath']),_0x23a65b=_0x445237[_0x34f7af(0x88)][_0x46a053[_0x34f7af(0xc2)]];if(!_0x1cbc17&&_0x23a65b&&_0x23a65b[_0x34f7af(0x81)]===_0xe86d76){_0x2b22a7['push']({'lockKey':_0x46a053[_0x34f7af(0xc2)],'reason':_0x34f7af(0xa2)});continue;}try{await uploadSingleFunction(_0x47f820[_0x34f7af(0xc0)],_0x46a053,_0x445237,_0x1b416a);const _0x4bc7de=_0x445237[_0x34f7af(0x88)][_0x46a053[_0x34f7af(0xc2)]];_0x2c50fc[_0x34f7af(0x8b)]({'lockKey':_0x46a053[_0x34f7af(0xc2)],'remoteId':_0x4bc7de?.[_0x34f7af(0xcb)]??0x0});}catch(_0x408569){_0x46d94d[_0x34f7af(0x8b)]({'lockKey':_0x46a053[_0x34f7af(0xc2)],'error':_0x408569 instanceof Error?_0x408569['message']:String(_0x408569)});}}_0x445237[_0x34f7af(0xaf)]=new Date()[_0x34f7af(0xcc)](),await writeBffLockFile(_0x935a1a[_0x34f7af(0xb5)],_0x2a4e75),await waitForUploadedLockEntries(_0x935a1a[_0x34f7af(0xb5)],_0x47f820[_0x34f7af(0xc0)],_0x2c50fc[_0x34f7af(0xc4)](_0x5db919=>_0x5db919[_0x34f7af(0xc2)]));let _0x27e442={'attempted':![],'cleared':![]};if(_0x2c50fc['length']>0x0)try{let _0x4357aa='';for(let _0x50121b=0x0;_0x50121b<CACHE_CLEAR_ATTEMPTS;_0x50121b+=0x1){_0x4357aa=await clearBffScriptCache(),_0x50121b<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x27e442={'attempted':!![],'cleared':!![],'message':_0x4357aa||_0x34f7af(0x89)};}catch(_0x282646){_0x27e442={'attempted':!![],'cleared':![],'error':_0x282646 instanceof Error?_0x282646[_0x34f7af(0xce)]:String(_0x282646)};}const _0x1dd897=_0x46d94d[_0x34f7af(0xb9)]===0x0&&(_0x27e442[_0x34f7af(0x96)]?_0x27e442[_0x34f7af(0x9d)]:!![]),_0x27f7ab=_0x27e442['attempted']?_0x27e442[_0x34f7af(0x9d)]?_0x34f7af(0xa6):'runtime\x20cache\x20clear\x20failed':_0x34f7af(0x99);return{'ok':_0x1dd897,'data':{'uploaded':_0x2c50fc,'skipped':_0x2b22a7,'failed':_0x46d94d,'cacheClear':_0x27e442},'message':'Push\x20complete:\x20'+_0x2c50fc['length']+_0x34f7af(0xbe)+_0x2b22a7['length']+'\x20skipped,\x20'+_0x46d94d[_0x34f7af(0xb9)]+'\x20failed,\x20'+_0x27f7ab};}};async function getTargetFunctions(_0x579af6,_0xff51c1){const _0x4a5b37=a37_0x2db80b,_0x1fa441=_0xff51c1[_0x4a5b37(0xb2)](_0x4a5b37(0xa7)),_0x4eeb42=_0xff51c1[_0x4a5b37(0xb2)](_0x4a5b37(0x93)),_0x45cc93=normalizeBffType(_0x1fa441)??undefined;if(_0x4eeb42&&!_0x45cc93)throw CliErrors[_0x4a5b37(0xc8)](_0x4a5b37(0x85));const _0x485c77=await scanLocalBffFunctions(_0x579af6,_0x45cc93);if(_0x4eeb42){const _0x33468e=_0x485c77[_0x4a5b37(0x97)](_0x3ae0e9=>_0x3ae0e9[_0x4a5b37(0x93)]===_0x4eeb42);if(_0x33468e[_0x4a5b37(0xb9)]===0x0)throw CliErrors[_0x4a5b37(0xc8)](_0x4a5b37(0x92)+_0x45cc93+'/'+_0x4eeb42);return _0x33468e;}return _0x485c77;}async function buildHookMaps(_0x5c0e58,_0x2887e5,_0x2360ec,_0x585d16){const _0x50741c=a37_0x2db80b,_0x22312f=_0x2360ec[_0x50741c(0xaa)](_0x54912f=>_0x54912f[_0x50741c(0xa7)]==='HOOK');if(!_0x22312f)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x39583a=loadAliasMap(_0x2887e5,undefined,resolveApiFilePath(_0x2887e5,_0x5c0e58)),_0x1906f9=new Map(_0x39583a[_0x50741c(0xc4)](_0x17b449=>[_0x17b449[_0x50741c(0xc3)],_0x17b449[_0x50741c(0xab)]]));for(const _0x772d55 of Object[_0x50741c(0x9b)](_0x585d16['functions'])){_0x772d55[_0x50741c(0xc3)]&&_0x772d55['datasetCode']&&!_0x1906f9[_0x50741c(0x84)](_0x772d55['alias'])&&_0x1906f9['set'](_0x772d55[_0x50741c(0xc3)],_0x772d55[_0x50741c(0xab)]);}const _0x15bed9=await listDatasets(_0x5c0e58),_0x5f362c=new Map(_0x15bed9[_0x50741c(0xc4)](_0x135afe=>[_0x135afe[_0x50741c(0xc9)],_0x135afe]));return{'aliasToDatasetCode':_0x1906f9,'datasetCodeToDataset':_0x5f362c};}async function uploadSingleFunction(_0x575de3,_0x41ff5b,_0x395fb6,_0x116204){const _0x18e600=a37_0x2db80b,_0x1294a2=await readFile(_0x41ff5b['filePath'],'utf8'),_0x318107=await computeFileHash(_0x41ff5b[_0x18e600(0xa8)]),_0x53fea2=_0x395fb6[_0x18e600(0x88)][_0x41ff5b[_0x18e600(0xc2)]];if(_0x53fea2?.[_0x18e600(0xcb)]&&_0x53fea2[_0x18e600(0xae)]==null)throw CliErrors[_0x18e600(0xc8)](_0x41ff5b['lockKey']+_0x18e600(0xc6));let _0x33ed75=extractScriptDescription(_0x1294a2);if(!_0x33ed75&&_0x53fea2?.[_0x18e600(0xcb)]){const _0x113aa1=await getBffScriptInfo(_0x53fea2[_0x18e600(0xcb)]);_0x33ed75=_0x113aa1[_0x18e600(0x9a)]||undefined;}const _0x58ece7={'appCode':_0x575de3,'functionName':_0x41ff5b['name'],'scriptType':_0x41ff5b[_0x18e600(0xa7)],'scriptContent':_0x1294a2};if(_0x53fea2?.[_0x18e600(0xcb)])_0x58ece7['id']=_0x53fea2[_0x18e600(0xcb)];if(_0x53fea2?.[_0x18e600(0xae)]!=null)_0x58ece7[_0x18e600(0xae)]=_0x53fea2[_0x18e600(0xae)];if(_0x33ed75)_0x58ece7['description']=_0x33ed75;if(_0x41ff5b[_0x18e600(0xa7)]==='HOOK'){const _0x1423bc=_0x41ff5b['alias'];if(!_0x1423bc||!_0x41ff5b[_0x18e600(0xa1)]||!_0x41ff5b[_0x18e600(0x8d)])throw CliErrors['validation'](_0x18e600(0xa4)+_0x41ff5b[_0x18e600(0xc2)]);const _0x4c3b48=_0x116204['aliasToDatasetCode']['get'](_0x1423bc)??_0x53fea2?.[_0x18e600(0xab)]??_0x1423bc,_0x1dd0f6=_0x116204['datasetCodeToDataset']['get'](_0x4c3b48);if(!_0x1dd0f6)throw CliErrors[_0x18e600(0xc8)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x1423bc+_0x18e600(0xb6)+(_0x18e600(0x98)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x58ece7['datasetId']=_0x1dd0f6['id'],_0x58ece7[_0x18e600(0xa1)]=_0x41ff5b['operationType'],_0x58ece7['functionNode']=_0x41ff5b[_0x18e600(0x8d)];}const _0x2c1cf1=await saveBffScript(_0x58ece7),_0x3d41a5=_0x2c1cf1['id'],_0xda253d=_0x2c1cf1[_0x18e600(0x90)]??await getBffScriptInfo(_0x3d41a5),_0x208ef1={'hash':_0x318107,'remoteId':_0x3d41a5,'version':_0xda253d[_0x18e600(0xae)]};if(_0x41ff5b['type']===_0x18e600(0x9c)){const _0x59bc1a=_0x41ff5b['alias'],_0x5558ac=_0x116204[_0x18e600(0xba)][_0x18e600(0xa5)](_0x59bc1a)??_0x53fea2?.[_0x18e600(0xab)]??_0x59bc1a;_0x116204[_0x18e600(0xba)][_0x18e600(0x84)](_0x59bc1a)?_0x208ef1[_0x18e600(0xc3)]=_0x59bc1a:_0x208ef1[_0x18e600(0xc3)]=_0x53fea2?.[_0x18e600(0xc3)],_0x208ef1[_0x18e600(0xab)]=_0x5558ac,_0x208ef1['operationType']=_0x41ff5b['operationType'],_0x208ef1[_0x18e600(0x8d)]=_0x41ff5b[_0x18e600(0x8d)];}_0x395fb6[_0x18e600(0x88)][_0x41ff5b['lockKey']]=_0x208ef1;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0xf71b39,_0x37cb17,_0x5bc3e2){const _0x3117e4=a37_0x2db80b;if(_0x5bc3e2[_0x3117e4(0xb9)]===0x0)return;for(let _0x1369cb=0x0;_0x1369cb<LOCK_SETTLE_RETRY_COUNT;_0x1369cb+=0x1){const _0x1921a0=await readBffLockFile(_0xf71b39),_0x417945=_0x1921a0?.[_0x3117e4(0x9e)]?.[_0x37cb17]?.[_0x3117e4(0x88)]??{},_0x1051b3=_0x5bc3e2[_0x3117e4(0xa0)](_0x2da66f=>!!_0x417945[_0x2da66f]?.['remoteId']);if(_0x1051b3)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x5bc3e2[_0x3117e4(0xa3)](',\x20')+'.');}
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 +1 @@
1
- const a38_0x4a3d3a=a38_0x527f;function a38_0x527f(_0x525f68,_0xe9aaa1){_0x525f68=_0x525f68-0x15c;const _0x169d7a=a38_0x169d();let _0x527f2f=_0x169d7a[_0x525f68];return _0x527f2f;}(function(_0x23b485,_0x16c126){const _0x5f51e4=a38_0x527f,_0x1f3340=_0x23b485();while(!![]){try{const _0x1ec1ef=-parseInt(_0x5f51e4(0x17b))/0x1*(parseInt(_0x5f51e4(0x176))/0x2)+-parseInt(_0x5f51e4(0x15e))/0x3+-parseInt(_0x5f51e4(0x15d))/0x4*(parseInt(_0x5f51e4(0x161))/0x5)+parseInt(_0x5f51e4(0x160))/0x6+-parseInt(_0x5f51e4(0x16c))/0x7*(-parseInt(_0x5f51e4(0x169))/0x8)+-parseInt(_0x5f51e4(0x16a))/0x9*(-parseInt(_0x5f51e4(0x165))/0xa)+parseInt(_0x5f51e4(0x173))/0xb;if(_0x1ec1ef===_0x16c126)break;else _0x1f3340['push'](_0x1f3340['shift']());}catch(_0x1fb46d){_0x1f3340['push'](_0x1f3340['shift']());}}}(a38_0x169d,0x3c66f));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';function a38_0x169d(){const _0x528e9a=['alias','106940EhBFrW','status','\x20remote-only','map','8WjuiKh','369VQktZX','lockFilePath','265489SzIWfj','push','functions','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','remote','bool','lockKey','10076858nzTyrw','\x20modified,\x20','scriptsRoot','767734vJuUag','length','read','\x20unchanged','boolean','1znQkdG','\x20added,\x20','appCode','6476CGDkZX','1269612eIOEAa','bff','633750QqZtQX','1370XrSvXT','apiDir','has'];a38_0x169d=function(){return _0x528e9a;};return a38_0x169d();}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_0x4a3d3a(0x15f),'command':'status','description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a38_0x4a3d3a(0x178),'flags':[{'name':a38_0x4a3d3a(0x170),'type':a38_0x4a3d3a(0x17a),'description':a38_0x4a3d3a(0x16f)}],async 'execute'(_0x2e64c3){const _0x42566c=a38_0x4a3d3a,_0x334c4f=loadBffProjectConfig(_0x2e64c3['appCode']),_0x138539=await readBffLockFile(_0x334c4f[_0x42566c(0x16b)]),{appLock:_0x305218}=ensureLockScope(_0x138539??createEmptyBffLock(),_0x2e64c3['appCode'],_0x334c4f[_0x42566c(0x175)],_0x42566c(0x166)),_0x6cf4f2=await scanLocalBffFunctions(_0x334c4f),_0x24a914=[],_0x428cc3=[],_0x3da6b5=[];for(const _0x2dd27f of _0x6cf4f2){const _0x330bc1=await computeFileHash(_0x2dd27f['filePath']),_0x2f8199=_0x305218['functions'][_0x2dd27f[_0x42566c(0x172)]];if(!_0x2f8199)_0x24a914['push'](_0x2dd27f[_0x42566c(0x172)]);else _0x2f8199['hash']!==_0x330bc1?_0x428cc3['push'](_0x2dd27f['lockKey']):_0x3da6b5[_0x42566c(0x16d)](_0x2dd27f['lockKey']);}const _0xd307c0=[];if(_0x2e64c3[_0x42566c(0x171)](_0x42566c(0x170))){const _0x585c67=loadAliasMap(_0x2e64c3['apiDir'],undefined,resolveApiFilePath(_0x2e64c3[_0x42566c(0x162)],_0x2e64c3[_0x42566c(0x15c)])),_0x426fb3=new Map(_0x585c67[_0x42566c(0x168)](_0x1136de=>[_0x1136de['datasetCode'],_0x1136de[_0x42566c(0x164)]])),[_0x384745,_0x1a480d]=await Promise['all']([listBffScripts(_0x2e64c3['appCode']),getBffScriptStatistics(_0x2e64c3[_0x42566c(0x15c)])]),_0x48fdb2=createHookLocationMap(_0x1a480d),_0x451411=new Set(_0x6cf4f2[_0x42566c(0x168)](_0x500e5f=>_0x500e5f['lockKey']));for(const _0x2a71ca of _0x384745){const _0xc272e3=resolveRemoteScriptTarget(_0x334c4f,_0x2a71ca,_0x48fdb2,_0x305218[_0x42566c(0x16e)],_0x426fb3);_0xc272e3&&!_0x451411[_0x42566c(0x163)](_0xc272e3[_0x42566c(0x172)])&&_0xd307c0[_0x42566c(0x16d)](_0xc272e3[_0x42566c(0x172)]);}}const _0x471f67=_0x24a914['length']===0x0&&_0x428cc3[_0x42566c(0x177)]===0x0&&_0xd307c0[_0x42566c(0x177)]===0x0;return{'ok':!![],'data':{'added':_0x24a914,'modified':_0x428cc3,'unchanged':_0x3da6b5,'remoteOnly':_0xd307c0},'message':_0x471f67?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x24a914[_0x42566c(0x177)]+_0x42566c(0x17c)+_0x428cc3[_0x42566c(0x177)]+_0x42566c(0x174)+_0x3da6b5['length']+_0x42566c(0x179)+(_0xd307c0[_0x42566c(0x177)]>0x0?',\x20'+_0xd307c0[_0x42566c(0x177)]+_0x42566c(0x167):'')};}};
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 +1 @@
1
- const a39_0x8224af=a39_0x17b7;(function(_0x39bab7,_0x189566){const _0x20a71a=a39_0x17b7,_0x8adf6d=_0x39bab7();while(!![]){try{const _0xc472b1=parseInt(_0x20a71a(0xa4))/0x1+parseInt(_0x20a71a(0xb2))/0x2+parseInt(_0x20a71a(0xa8))/0x3*(parseInt(_0x20a71a(0xb6))/0x4)+parseInt(_0x20a71a(0xba))/0x5*(-parseInt(_0x20a71a(0xb9))/0x6)+parseInt(_0x20a71a(0xad))/0x7*(parseInt(_0x20a71a(0xaa))/0x8)+-parseInt(_0x20a71a(0xa5))/0x9+parseInt(_0x20a71a(0xb4))/0xa*(-parseInt(_0x20a71a(0xae))/0xb);if(_0xc472b1===_0x189566)break;else _0x8adf6d['push'](_0x8adf6d['shift']());}catch(_0x234d79){_0x8adf6d['push'](_0x8adf6d['shift']());}}}(a39_0x17ca,0x98ed6));function a39_0x17ca(){const _0x4a4339=['77mUjsEL','979BAYwYa','setLogPath','nonInteractive','cli-skill-install','1856150UpQsYx','pipe','121630pVemDu','apiError','36wKtzMY','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','error','77178nzJWZy','245PhyBtf','../../skills/npx-skills-add.js','log','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','info','unknown','npx\x20skills\x20add\x20failed:\x20','439956JCAHCn','6033654rFCQsm','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','cli-skill','287139qjVENF','inherit','567376dCQJjC','skipped',')...'];a39_0x17ca=function(){return _0x4a4339;};return a39_0x17ca();}import{CliErrors}from'../../errors.js';function a39_0x17b7(_0x2b308c,_0x57e5bc){_0x2b308c=_0x2b308c-0xa4;const _0x17cab1=a39_0x17ca();let _0x17b7d3=_0x17cab1[_0x2b308c];return _0x17b7d3;}import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x8224af(0xa7),'command':'install','description':'Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1aea94){const _0xfe2dfc=a39_0x8224af;logger[_0xfe2dfc(0xaf)](process['cwd']()),logger[_0xfe2dfc(0xbe)](_0xfe2dfc(0xb1),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x5dc8da,RABETBASE_SKILL_SOURCE:_0x5c2cd1,runNpxSkillsAddGlobal:_0x1ecfe6}=await import(_0xfe2dfc(0xbb)),_0x256484=_0x1aea94[_0xfe2dfc(0xb0)]?_0xfe2dfc(0xb3):_0xfe2dfc(0xa9);console[_0xfe2dfc(0xbc)](_0xfe2dfc(0xa6)+_0x5dc8da+_0xfe2dfc(0xac));const _0xc4802a=_0x1ecfe6(process['cwd'](),_0x5c2cd1,{'stdio':_0x256484});if(_0xc4802a[_0xfe2dfc(0xab)])console[_0xfe2dfc(0xbc)](_0xfe2dfc(0xb7));else{if(_0xc4802a['ok'])console[_0xfe2dfc(0xbc)]('CLI\x20Built-in\x20Skill\x20installed');else throw CliErrors[_0xfe2dfc(0xb5)](_0xfe2dfc(0xc0)+(_0xc4802a[_0xfe2dfc(0xb8)]||_0xfe2dfc(0xbf)),_0xfe2dfc(0xbd)+_0x5dc8da);}return{'ok':!![]};}}];
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 +1 @@
1
- const a40_0x383236=a40_0x18ff;(function(_0x3ec8d4,_0x530d63){const _0x120070=a40_0x18ff,_0x407eb7=_0x3ec8d4();while(!![]){try{const _0x2e73ca=-parseInt(_0x120070(0x121))/0x1*(parseInt(_0x120070(0xe2))/0x2)+parseInt(_0x120070(0x123))/0x3+parseInt(_0x120070(0x11f))/0x4+parseInt(_0x120070(0xd5))/0x5*(parseInt(_0x120070(0xff))/0x6)+-parseInt(_0x120070(0x101))/0x7+parseInt(_0x120070(0x119))/0x8*(-parseInt(_0x120070(0x122))/0x9)+parseInt(_0x120070(0xd9))/0xa;if(_0x2e73ca===_0x530d63)break;else _0x407eb7['push'](_0x407eb7['shift']());}catch(_0x42bf1c){_0x407eb7['push'](_0x407eb7['shift']());}}}(a40_0x5abf,0x32f97));import a40_0x564099 from'chalk';import a40_0xd7ad90 from'ora';import a40_0x397343 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 _0x526090=a40_0x18ff;return GIT_COMMIT!==_0x526090(0xf0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x526090(0xfd)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1ab095=a40_0x18ff,_0x39ab15=process[_0x1ab095(0x120)][_0x1ab095(0x106)]();if(_0x39ab15[_0x1ab095(0xe7)](_0x1ab095(0x115)))return _0x1ab095(0x115);return _0x1ab095(0x107);}const updateFlags=[{'name':a40_0x383236(0xf1),'type':a40_0x383236(0xea),'description':a40_0x383236(0x116),'default':![]},{'name':a40_0x383236(0x10a),'type':a40_0x383236(0x128),'description':a40_0x383236(0xfa)},{'name':a40_0x383236(0xf8),'type':a40_0x383236(0xea),'description':a40_0x383236(0xdb),'default':![]},{'name':'skills','type':'boolean','description':a40_0x383236(0x118),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x10e886){const _0x15d7e7=a40_0x383236;return _0x10e886[_0x15d7e7(0x127)](_0x15d7e7(0x10a))[_0x15d7e7(0xd7)]();}function shouldSkipCliSkill(_0x493d29){const _0x331bb1=a40_0x383236;return _0x493d29[_0x331bb1(0xd8)](_0x331bb1(0xf8))||_0x493d29[_0x331bb1(0x11c)](_0x331bb1(0x126))===![];}async function validateUpdateFlags(_0x1a865a){const _0x775749=a40_0x383236,_0x45209a=_0x1a865a[_0x775749(0xd8)](_0x775749(0xf1)),_0x5c6448=getRequestedVersion(_0x1a865a);if(_0x45209a&&_0x5c6448)throw CliErrors[_0x775749(0xd4)](_0x775749(0x10f),_0x775749(0xe3));if(_0x5c6448&&!a40_0x397343['valid'](_0x5c6448))throw CliErrors[_0x775749(0xd4)]('Invalid\x20version:\x20'+_0x5c6448,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x363de4=a40_0x383236;try{const _0x3ebb1d=await fetch(_0x363de4(0x104)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal['timeout'](0x2710)});if(!_0x3ebb1d['ok'])return null;const _0x3577d7=await _0x3ebb1d['json']();if(!_0x3577d7||typeof _0x3577d7!==_0x363de4(0xf9))return null;return Object[_0x363de4(0xe1)](Object['entries'](_0x3577d7)[_0x363de4(0x114)](([,_0xd45cd5])=>typeof _0xd45cd5===_0x363de4(0x128)&&_0xd45cd5['trim']()[_0x363de4(0xf7)]>0x0)[_0x363de4(0xe5)](([_0x201884,_0x175539])=>[_0x201884,String(_0x175539)[_0x363de4(0xd7)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x2a7113){const _0x2f2262=await fetchNpmDistTags();return _0x2f2262?.[_0x2a7113]??null;}function a40_0x5abf(){const _0x5c279f=['Already\x20up\x20to\x20date\x20(v','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','filter','bun','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','log','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','384ZJOyEF','warn','\x20\x20Try\x20manually:\x20','flag','\x20install\x20-g\x20','Already\x20on\x20requested\x20version\x20(v','747212MWctZp','execPath','7ivKyqy','57411CzBSyk','131535nUlOVB','valid','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','skills','str','string','validation','15ZqfSEI','Current\x20version:\x20','trim','bool','3989060BTICvz','message','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','fail','\x20→\x20','succeed','install','run','fromEntries','14332uiHiJK','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','pipe','map','@latest','includes','yellow','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','boolean','error','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','green','Beta\x20version:\x20','source','unknown','beta','Version\x20comparison\x20failed','Updated\x20to\x20v','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','gray','latest','length','no-skills','object','Install\x20a\x20specific\x20CLI\x20version','start','update','slice','\x20\x20Run\x20manually:\x20','102906AmMKTv','red','811034HRQMmw','Update\x20available:\x20','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','https://registry.npmjs.org/-/package/','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','toLowerCase','npm','\x20cli-skill\x20install','skipped','version','Updating\x20via\x20','inherit','write','nonInteractive','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Requested\x20version:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm'];a40_0x5abf=function(){return _0x5c279f;};return a40_0x5abf();}async function fetchLatestVersion(){const _0x1c5699=a40_0x383236;return fetchNpmDistTagVersion(_0x1c5699(0xf6));}async function resolveTargetVersion(_0x202386){const _0x4955ed=a40_0x383236,_0x7f1dc1=getRequestedVersion(_0x202386);if(_0x7f1dc1)return{'version':_0x7f1dc1,'source':_0x4955ed(0x10a)};if(_0x202386[_0x4955ed(0xd8)]('beta')){const _0x359d69=await fetchNpmDistTagVersion(_0x4955ed(0xf1));if(!_0x359d69)return null;return{'version':_0x359d69,'source':'beta'};}const _0x2b704d=await fetchLatestVersion();if(!_0x2b704d)return null;return{'version':_0x2b704d,'source':_0x4955ed(0xf6)};}function shouldInstallTarget(_0x49f35b,_0x278bd9){const _0x402614=a40_0x383236;if(_0x278bd9[_0x402614(0xef)]==='version'||_0x278bd9[_0x402614(0xef)]===_0x402614(0xf1))return!a40_0x397343['eq'](_0x49f35b,_0x278bd9['version']);return a40_0x397343['lt'](_0x49f35b,_0x278bd9['version']);}function getInstallPlanLabel(_0x142ed7,_0x39fca0){const _0x33ebe4=a40_0x383236;switch(_0x39fca0[_0x33ebe4(0xef)]){case _0x33ebe4(0xf1):return _0x33ebe4(0xee)+a40_0x564099[_0x33ebe4(0xe8)](_0x142ed7)+_0x33ebe4(0xdd)+a40_0x564099['green'](_0x39fca0['version']);case _0x33ebe4(0x10a):return _0x33ebe4(0x110)+a40_0x564099[_0x33ebe4(0xe8)](_0x142ed7)+_0x33ebe4(0xdd)+a40_0x564099[_0x33ebe4(0xed)](_0x39fca0[_0x33ebe4(0x10a)]);case _0x33ebe4(0xf6):default:return _0x33ebe4(0x102)+a40_0x564099['yellow'](_0x142ed7)+'\x20→\x20'+a40_0x564099[_0x33ebe4(0xed)](_0x39fca0[_0x33ebe4(0x10a)]);}}async function installCliSkill(_0x57a194){const _0x5ef503=a40_0x383236;console[_0x5ef503(0x117)](a40_0x564099['gray']('Checking\x20CLI\x20Built-in\x20Skill...'));const _0x519f30=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x57a194?_0x5ef503(0xe4):_0x5ef503(0x10c)});if(_0x519f30[_0x5ef503(0x109)]){console[_0x5ef503(0x117)](a40_0x564099[_0x5ef503(0xf5)]('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x519f30['ok']){console['log'](a40_0x564099[_0x5ef503(0xf5)](_0x5ef503(0x125)));return;}console[_0x5ef503(0x11a)](a40_0x564099[_0x5ef503(0xe8)](_0x5ef503(0xf4)+(_0x519f30[_0x5ef503(0xeb)]||_0x5ef503(0xf0)))),console[_0x5ef503(0x117)](a40_0x564099[_0x5ef503(0xf5)](_0x5ef503(0xfe)+CLI_BIN_NAME+_0x5ef503(0x108)));}async function execute(_0x41bc1a){const _0x11bba8=a40_0x383236;await validateUpdateFlags(_0x41bc1a);const _0x28533b=getCurrentVersion();console[_0x11bba8(0x117)](_0x11bba8(0xd6)+_0x28533b);const _0x1f6609=a40_0xd7ad90('Checking\x20for\x20updates...')[_0x11bba8(0xfb)](),_0x4065e0=await resolveTargetVersion(_0x41bc1a);if(!_0x4065e0){const _0x2f75c5=_0x41bc1a[_0x11bba8(0xd8)](_0x11bba8(0xf1))?_0x11bba8(0x111):_0x11bba8(0x113);return _0x1f6609[_0x11bba8(0xdc)](_0x2f75c5),console[_0x11bba8(0x117)](a40_0x564099['gray'](_0x11bba8(0xe9)+NPM_PACKAGE_NAME+_0x11bba8(0xe6))),{'ok':![],'message':_0x2f75c5};}const _0x163803=a40_0x397343[_0x11bba8(0x124)](VERSION),_0x5708bf=a40_0x397343[_0x11bba8(0x124)](_0x4065e0['version']);if(!_0x163803||!_0x5708bf)return _0x1f6609[_0x11bba8(0xdc)](_0x11bba8(0xf2)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x163803,_0x4065e0)){const _0x509100=_0x4065e0[_0x11bba8(0xef)]===_0x11bba8(0x10a)?_0x11bba8(0x11e)+_0x4065e0[_0x11bba8(0x10a)]+')':_0x11bba8(0x112)+_0x4065e0['version']+')';return _0x1f6609['succeed'](_0x509100),shouldSkipCliSkill(_0x41bc1a)?console[_0x11bba8(0x117)](a40_0x564099['gray'](_0x11bba8(0x105))):await installCliSkill(_0x41bc1a['nonInteractive']),{'ok':!![]};}_0x1f6609['info'](getInstallPlanLabel(_0x28533b,_0x4065e0));const _0x3d8cad=detectPackageManager(),_0x59b0a8=_0x3d8cad===_0x11bba8(0x107)?resolveNpmBin(_0x11bba8(0x107)):_0x3d8cad,_0x3757ee=a40_0xd7ad90(_0x11bba8(0x10b)+_0x3d8cad+'...')[_0x11bba8(0xfb)]();try{return await execa(_0x59b0a8,[_0x11bba8(0xdf),'-g',NPM_PACKAGE_NAME+'@'+_0x4065e0[_0x11bba8(0x10a)]],{'stdio':_0x11bba8(0xe4)}),_0x3757ee[_0x11bba8(0xde)](_0x11bba8(0xf3)+_0x4065e0[_0x11bba8(0x10a)]),console['log'](a40_0x564099['gray'](_0x11bba8(0x103))),shouldSkipCliSkill(_0x41bc1a)?console[_0x11bba8(0x117)](a40_0x564099[_0x11bba8(0xf5)](_0x11bba8(0x105))):await installCliSkill(_0x41bc1a[_0x11bba8(0x10e)]),{'ok':!![]};}catch(_0x20ed39){return _0x3757ee[_0x11bba8(0xdc)]('Update\x20failed'),console[_0x11bba8(0xeb)](a40_0x564099[_0x11bba8(0x100)]('\x20\x20'+_0x20ed39['message'])),console[_0x11bba8(0x117)](a40_0x564099['gray'](_0x11bba8(0x11b)+_0x3d8cad+_0x11bba8(0x11d)+NPM_PACKAGE_NAME+'@'+_0x4065e0['version'])),{'ok':![],'message':_0x20ed39[_0x11bba8(0xda)]};}}function a40_0x18ff(_0x2452a4,_0x486f2c){_0x2452a4=_0x2452a4-0xd4;const _0x5abf1d=a40_0x5abf();let _0x18ff27=_0x5abf1d[_0x2452a4];return _0x18ff27;}export const updateDefinition={'service':a40_0x383236(0xfc),'command':a40_0x383236(0xe0),'description':a40_0x383236(0xec),'risk':a40_0x383236(0x10d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
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 +1 @@
1
- function a41_0x28f4(_0x5a4e69,_0x2ca988){_0x5a4e69=_0x5a4e69-0x9c;const _0x3e66ef=a41_0x3e66();let _0x28f4ce=_0x3e66ef[_0x5a4e69];return _0x28f4ce;}(function(_0x58d4a0,_0x4482e6){const _0x8ea659=a41_0x28f4,_0xa5f74=_0x58d4a0();while(!![]){try{const _0x50f2de=-parseInt(_0x8ea659(0x9f))/0x1+-parseInt(_0x8ea659(0x9c))/0x2+-parseInt(_0x8ea659(0x9e))/0x3+-parseInt(_0x8ea659(0xa2))/0x4+-parseInt(_0x8ea659(0xa0))/0x5*(-parseInt(_0x8ea659(0xa3))/0x6)+parseInt(_0x8ea659(0x9d))/0x7+parseInt(_0x8ea659(0xa1))/0x8;if(_0x50f2de===_0x4482e6)break;else _0xa5f74['push'](_0xa5f74['shift']());}catch(_0x5d6d45){_0xa5f74['push'](_0xa5f74['shift']());}}}(a41_0x3e66,0x9589a));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];function a41_0x3e66(){const _0x151d55=['2578100LfWjka','3234681LfonYT','79385pdPUTr','65lPLPUc','17025240gnbuLt','365332AfhrwE','66810TsGmXF','1559518JOQqnZ'];a41_0x3e66=function(){return _0x151d55;};return a41_0x3e66();}
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 +1 @@
1
- const a42_0x11dcb2=a42_0x4b85;function a42_0x4b85(_0x33017e,_0x30c2a2){_0x33017e=_0x33017e-0x1ba;const _0x40805d=a42_0x4080();let _0x4b857b=_0x40805d[_0x33017e];return _0x4b857b;}(function(_0x4f25ad,_0x54fc70){const _0x11cfa6=a42_0x4b85,_0xc7aa8f=_0x4f25ad();while(!![]){try{const _0x55dffb=-parseInt(_0x11cfa6(0x1c5))/0x1*(parseInt(_0x11cfa6(0x1bc))/0x2)+-parseInt(_0x11cfa6(0x1cb))/0x3*(parseInt(_0x11cfa6(0x1d0))/0x4)+-parseInt(_0x11cfa6(0x1c9))/0x5+parseInt(_0x11cfa6(0x1be))/0x6+parseInt(_0x11cfa6(0x1d3))/0x7*(-parseInt(_0x11cfa6(0x1c7))/0x8)+parseInt(_0x11cfa6(0x1c0))/0x9*(parseInt(_0x11cfa6(0x1c8))/0xa)+parseInt(_0x11cfa6(0x1d1))/0xb;if(_0x55dffb===_0x54fc70)break;else _0xc7aa8f['push'](_0xc7aa8f['shift']());}catch(_0x564b8e){_0xc7aa8f['push'](_0xc7aa8f['shift']());}}}(a42_0x4080,0xdbb6e));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x11dcb2(0x1bd),'command':a42_0x11dcb2(0x1ce),'description':a42_0x11dcb2(0x1bf),'risk':a42_0x11dcb2(0x1c4),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x11dcb2(0x1ca),'type':a42_0x11dcb2(0x1c1),'description':a42_0x11dcb2(0x1c6)},{'name':'operation','type':a42_0x11dcb2(0x1c1),'required':!![],'description':a42_0x11dcb2(0x1d4)},{'name':a42_0x11dcb2(0x1c2),'type':'boolean','description':a42_0x11dcb2(0x1cc)}],async 'execute'(_0x33b17e){const _0x34f301=a42_0x11dcb2,{dataset:_0x16d223,operation:_0x442642}=await getOperationDetail(_0x33b17e[_0x34f301(0x1c3)],_0x33b17e[_0x34f301(0x1cd)](_0x34f301(0x1cf)),_0x33b17e[_0x34f301(0x1cd)](_0x34f301(0x1d5))),_0x3f4a44=generateSdkCode(_0x16d223,_0x442642,{'includeImports':!_0x33b17e[_0x34f301(0x1ba)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x16d223[_0x34f301(0x1d2)],'code':_0x16d223[_0x34f301(0x1cf)],'tableName':_0x16d223[_0x34f301(0x1bb)]},'operation':_0x33b17e[_0x34f301(0x1cd)](_0x34f301(0x1d5)),'code':_0x3f4a44}};}};function a42_0x4080(){const _0x551159=['1279730lPwBFq','1682020sDbHAx','alias','64551ohEfps','Omit\x20import\x20statements\x20from\x20generated\x20code','str','sdk','code','28yjJPDP','18126438sSYDqY','name','2996602VGKpBh','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','operation','bool','tableName','6hYtjOn','codegen','3105900xiNlnj','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','9uawXHE','string','skip-imports','appCode','read','159474pQnGDl','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','8aFoJHl'];a42_0x4080=function(){return _0x551159;};return a42_0x4080();}
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 +1 @@
1
- const a43_0x329fb3=a43_0x5567;(function(_0x289703,_0x4d6cce){const _0x16d85b=a43_0x5567,_0x551382=_0x289703();while(!![]){try{const _0x323bd3=-parseInt(_0x16d85b(0x1aa))/0x1+parseInt(_0x16d85b(0x1c1))/0x2+parseInt(_0x16d85b(0x1bc))/0x3*(parseInt(_0x16d85b(0x1be))/0x4)+parseInt(_0x16d85b(0x1bf))/0x5+parseInt(_0x16d85b(0x1b7))/0x6+-parseInt(_0x16d85b(0x1b2))/0x7*(-parseInt(_0x16d85b(0x1ad))/0x8)+parseInt(_0x16d85b(0x1af))/0x9*(-parseInt(_0x16d85b(0x1ae))/0xa);if(_0x323bd3===_0x4d6cce)break;else _0x551382['push'](_0x551382['shift']());}catch(_0x408406){_0x551382['push'](_0x551382['shift']());}}}(a43_0x53f6,0x94a7e));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a43_0x5567(_0x3976a7,_0x4d0b49){_0x3976a7=_0x3976a7-0x1a8;const _0x53f6c5=a43_0x53f6();let _0x556767=_0x53f6c5[_0x3976a7];return _0x556767;}function a43_0x53f6(){const _0x83365d=['str','boolean','4189398DjAfle','bool','sdk','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sql','3NKoNwR','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','1370164vRoEkB','1157450CrwrxN','no-imports','1563402HYaqkj','string','sqlcode','321362ruwdKS','appCode','sqlName','4720SEupyQ','930JvMFgP','196047EzBTMw','target','codegen','10703kdVUDc','read','bff'];a43_0x53f6=function(){return _0x83365d;};return a43_0x53f6();}export const codegenSql={'service':a43_0x329fb3(0x1b1),'command':a43_0x329fb3(0x1bb),'description':a43_0x329fb3(0x1bd),'risk':a43_0x329fb3(0x1b3),'flags':[SQLCODE_FLAG,{'name':a43_0x329fb3(0x1b0),'type':a43_0x329fb3(0x1a8),'description':a43_0x329fb3(0x1ba),'default':a43_0x329fb3(0x1b9),'enum':[a43_0x329fb3(0x1b9),a43_0x329fb3(0x1b4)]},{'name':a43_0x329fb3(0x1c0),'type':a43_0x329fb3(0x1b6),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x2ff104){const _0x458b35=a43_0x329fb3,_0x388ed8=await getSqlQueryInfo(_0x2ff104[_0x458b35(0x1ab)],_0x2ff104['str'](_0x458b35(0x1a9))),_0x45e5e4=_0x2ff104[_0x458b35(0x1b5)](_0x458b35(0x1b0))||_0x458b35(0x1b9),_0x429520=generateSqlCodeTemplate(_0x388ed8,{'target':_0x45e5e4,'includeImports':!_0x2ff104[_0x458b35(0x1b8)](_0x458b35(0x1c0))});return{'ok':!![],'data':{'sqlCode':_0x388ed8['sqlCode'],'sqlName':_0x388ed8[_0x458b35(0x1ac)],'target':_0x45e5e4,'code':_0x429520}};}};
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 +1 @@
1
- function a44_0xb0ed(){const _0x4c1832=['App\x20code','1974304unscWx','173207LUYLYX','Removed\x20app\x20\x22','apps','trim','\x20Set\x20as\x20default\x20app.','1112BARoLi','Updated','validation','object','\x22\x20still\x20defined\x20in\x20','bool','Use\x20global\x20config\x20scope','Added','boolean','project','\x20app\x20\x22','9ZJCKNK','keys','\x20<name>','276411MZpcyq','str','\x20<name>\x20--appcode\x20<code>','14952zxpVzf','Usage:\x20','App\x20\x22','\x20Default\x20app\x20changed\x20to\x20\x22','both','181855zNlPtF','Missing\x20app\x20name.','\x22\x20(appcode:\x20','19978YyyiqP','defaultApp','appcode','globalConfig','12cuVzlz','length','\x20<name>\x20[--global]','projectConfig','1804aVJDmS','\x22\x20not\x20found.','6840250EXkvBC','18GDgROD','global','args','\x20config.','string'];a44_0xb0ed=function(){return _0x4c1832;};return a44_0xb0ed();}(function(_0x516535,_0x3faaeb){const _0x5d0668=a44_0x5f79,_0x5a12f9=_0x516535();while(!![]){try{const _0x10123d=-parseInt(_0x5d0668(0x191))/0x1+-parseInt(_0x5d0668(0x183))/0x2*(parseInt(_0x5d0668(0x1a4))/0x3)+parseInt(_0x5d0668(0x190))/0x4+-parseInt(_0x5d0668(0x1ac))/0x5*(-parseInt(_0x5d0668(0x18a))/0x6)+-parseInt(_0x5d0668(0x17f))/0x7*(parseInt(_0x5d0668(0x196))/0x8)+-parseInt(_0x5d0668(0x1a1))/0x9*(-parseInt(_0x5d0668(0x189))/0xa)+-parseInt(_0x5d0668(0x187))/0xb*(-parseInt(_0x5d0668(0x1a7))/0xc);if(_0x10123d===_0x3faaeb)break;else _0x5a12f9['push'](_0x5a12f9['shift']());}catch(_0x197f38){_0x5a12f9['push'](_0x5a12f9['shift']());}}}(a44_0xb0ed,0x59ec3));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 _0x6432d4=a44_0x5f79;return[{'name':_0x6432d4(0x181),'type':_0x6432d4(0x18e),'description':_0x6432d4(0x18f),'required':!![]},{'name':_0x6432d4(0x18b),'type':_0x6432d4(0x19e),'description':_0x6432d4(0x19c),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x560391=a44_0x5f79;return[{'name':_0x560391(0x18b),'type':_0x560391(0x19e),'description':_0x560391(0x19c),'default':![]}];}function a44_0x5f79(_0x254547,_0x53954b){_0x254547=_0x254547-0x17e;const _0xb0ed0e=a44_0xb0ed();let _0x5f797e=_0xb0ed0e[_0x254547];return _0x5f797e;}export async function validateAppName(_0x46f2c3,_0x224288){const _0x5c93a8=a44_0x5f79,_0x56277d=_0x46f2c3['args'][0x0]?.[_0x5c93a8(0x194)]();if(!_0x56277d)throw CliErrors[_0x5c93a8(0x198)](_0x5c93a8(0x1ad),_0x5c93a8(0x1a8)+CLI_BIN_NAME+'\x20'+_0x224288+_0x5c93a8(0x1a3));}export async function runAppAdd(_0x40d238,_0x1a3091){const _0xe9e227=a44_0x5f79,_0x16a5d8=_0x40d238[_0xe9e227(0x18c)][0x0]?.[_0xe9e227(0x194)]();if(!_0x16a5d8)throw CliErrors[_0xe9e227(0x198)]('Missing\x20app\x20name.',_0xe9e227(0x1a8)+CLI_BIN_NAME+'\x20'+_0x1a3091+_0xe9e227(0x1a6));const _0x394e15=_0x40d238[_0xe9e227(0x1a5)](_0xe9e227(0x181));if(!_0x394e15)throw CliErrors['flagMissing'](_0xe9e227(0x181),_0xe9e227(0x1a8)+CLI_BIN_NAME+'\x20'+_0x1a3091+_0xe9e227(0x1a6));const _0x54e409={'global':_0x40d238[_0xe9e227(0x19b)](_0xe9e227(0x18b))},_0x377c74=readConfig(_0x54e409);if(!_0x377c74[_0xe9e227(0x193)])_0x377c74[_0xe9e227(0x193)]={};const _0x2f680b={'appcode':_0x394e15,...collectAppProfileOverrides(_0x5f2553=>_0x40d238[_0xe9e227(0x1a5)](_0x5f2553))},_0x1680ce=_0x377c74[_0xe9e227(0x193)],_0x3516c8=!!_0x1680ce[_0x16a5d8];_0x1680ce[_0x16a5d8]=_0x2f680b;if(!_0x377c74[_0xe9e227(0x180)])_0x377c74['defaultApp']=_0x16a5d8;writeConfig(_0x377c74,_0x54e409);const _0x23eff7=!_0x3516c8&&_0x377c74['defaultApp']===_0x16a5d8?_0xe9e227(0x195):'',_0x458c9a=(_0x3516c8?_0xe9e227(0x197):_0xe9e227(0x19d))+_0xe9e227(0x1a0)+_0x16a5d8+_0xe9e227(0x17e)+_0x394e15+')'+scopeLabel(_0x54e409)+'.'+_0x23eff7;return{'ok':!![],'message':_0x458c9a};}export async function runAppRemove(_0x1e5ba7,_0x545678){const _0x5eecab=a44_0x5f79,_0x44b997=_0x1e5ba7[_0x5eecab(0x18c)][0x0]?.[_0x5eecab(0x194)]();if(!_0x44b997)throw CliErrors[_0x5eecab(0x198)](_0x5eecab(0x1ad),_0x5eecab(0x1a8)+CLI_BIN_NAME+'\x20'+_0x545678+_0x5eecab(0x185));const _0x289d52=_0x1e5ba7[_0x5eecab(0x19b)](_0x5eecab(0x18b)),{config:_0x5abc20,layers:_0x3d739e}=readRawConfigWithLayers(),_0x48b207=_0x5abc20[_0x5eecab(0x193)]??{};if(!_0x48b207[_0x44b997])throw CliErrors[_0x5eecab(0x198)](_0x5eecab(0x1a9)+_0x44b997+_0x5eecab(0x188));const _0x55398b=_0x3d739e['globalConfig']['apps']&&typeof _0x3d739e[_0x5eecab(0x182)][_0x5eecab(0x193)]==='object'?_0x3d739e[_0x5eecab(0x182)]['apps']:{},_0x400e42=_0x3d739e['projectConfig'][_0x5eecab(0x193)]&&typeof _0x3d739e[_0x5eecab(0x186)][_0x5eecab(0x193)]===_0x5eecab(0x199)?_0x3d739e[_0x5eecab(0x186)][_0x5eecab(0x193)]:{},_0x5a588a=appDefinedIn(_0x44b997,_0x55398b,_0x400e42,_0x3d739e[_0x5eecab(0x186)]['inherit']===![]),_0x25841e=resolveAppScopeForWrite(_0x44b997,_0x289d52,_0x3d739e),_0x409257={'global':_0x25841e===_0x5eecab(0x18b)},_0x3d3dad=readConfig(_0x409257),_0x516426=_0x3d3dad[_0x5eecab(0x193)];if(!_0x516426||!_0x516426[_0x44b997])throw CliErrors[_0x5eecab(0x198)](_0x5eecab(0x1a9)+_0x44b997+'\x22\x20not\x20found.');delete _0x516426[_0x44b997];let _0x1933e7='';if(_0x3d3dad[_0x5eecab(0x180)]===_0x44b997){const _0x15145b=Object[_0x5eecab(0x1a2)](_0x516426);_0x3d3dad[_0x5eecab(0x180)]=_0x15145b['length']>0x0?_0x15145b[0x0]:undefined,_0x3d3dad[_0x5eecab(0x180)]?_0x1933e7=_0x5eecab(0x1aa)+_0x3d3dad[_0x5eecab(0x180)]+'\x22.':delete _0x3d3dad[_0x5eecab(0x180)];}Object[_0x5eecab(0x1a2)](_0x516426)[_0x5eecab(0x184)]===0x0&&(delete _0x3d3dad['apps'],delete _0x3d3dad[_0x5eecab(0x180)]);writeConfig(_0x3d3dad,_0x409257);const _0x162a1b=_0x5a588a===_0x5eecab(0x1ab)?'\x20Note:\x20app\x20\x22'+_0x44b997+_0x5eecab(0x19a)+(_0x25841e===_0x5eecab(0x19f)?_0x5eecab(0x18b):_0x5eecab(0x19f))+_0x5eecab(0x18d):'';return{'ok':!![],'message':_0x5eecab(0x192)+_0x44b997+'\x22'+scopeLabel(_0x409257)+'.'+_0x1933e7+_0x162a1b};}
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 +1 @@
1
- (function(_0xbd4ec9,_0x27e948){const _0x17fa69=a45_0x271b,_0xc570cf=_0xbd4ec9();while(!![]){try{const _0x8282cc=-parseInt(_0x17fa69(0x1aa))/0x1*(parseInt(_0x17fa69(0x1c2))/0x2)+-parseInt(_0x17fa69(0x1bf))/0x3*(-parseInt(_0x17fa69(0x1b7))/0x4)+parseInt(_0x17fa69(0x1c3))/0x5+-parseInt(_0x17fa69(0x1a6))/0x6*(parseInt(_0x17fa69(0x1c5))/0x7)+parseInt(_0x17fa69(0x1b1))/0x8*(parseInt(_0x17fa69(0x1b2))/0x9)+-parseInt(_0x17fa69(0x1ae))/0xa+parseInt(_0x17fa69(0x1a8))/0xb;if(_0x8282cc===_0x27e948)break;else _0xc570cf['push'](_0xc570cf['shift']());}catch(_0x447b35){_0xc570cf['push'](_0xc570cf['shift']());}}}(a45_0x1f54,0x86330));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x4233d1 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 _0x56dc05=a45_0x271b,_0x8a9e64=await input({'message':_0x56dc05(0x1ab),'validate':_0x240e9f=>{const _0x446722=_0x56dc05,_0x42b305=validateAppcode(_0x240e9f[_0x446722(0x1a5)]());return _0x42b305[_0x446722(0x1ac)]||_0x42b305[_0x446722(0x1af)]||_0x446722(0x1b8);}});return _0x8a9e64[_0x56dc05(0x1a5)]();}export async function promptAppSelection(_0x3a3636){const _0x3bdc97=a45_0x271b,_0x1dc414=[{'name':a45_0x4233d1[_0x3bdc97(0x1bc)](_0x3bdc97(0x1b4)),'value':-0x1},..._0x3a3636[_0x3bdc97(0x1c8)]((_0x301d33,_0x45eb5f)=>({'name':_0x301d33['appName']+'\x20\x20'+a45_0x4233d1[_0x3bdc97(0x1b5)]('('+_0x301d33[_0x3bdc97(0x1be)]+')'),'value':_0x45eb5f}))],_0x3d6071=await checkbox({'message':'获取到\x20'+a45_0x4233d1['cyan'](_0x3a3636[_0x3bdc97(0x1c6)])+_0x3bdc97(0x1a4),'choices':_0x1dc414,'loop':![]});if(_0x3d6071['includes'](-0x1))return'custom';if(_0x3d6071[_0x3bdc97(0x1c6)]===0x0)return _0x3bdc97(0x1b0);return _0x3d6071[_0x3bdc97(0x1c8)](_0x40512f=>_0x3a3636[_0x40512f]);}function a45_0x271b(_0x351d0f,_0x556f80){_0x351d0f=_0x351d0f-0x1a4;const _0x1f5434=a45_0x1f54();let _0x271b4e=_0x1f5434[_0x351d0f];return _0x271b4e;}function a45_0x1f54(){const _0x3e029a=['848uJhgMk','84519brSZrp','find','✎\x20自定义输入\x20appcode','gray','请选择要绑定的应用:','4uRbZxe','Invalid\x20App\x20Code','\x0a无法获取远程应用列表,请手动输入。','未找到可用应用。','appName','yellow','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','appCode','2494518gRZvHy','manual','skip','210380nWAdtp','275065sMTgwv','正在获取可用应用列表...','637ydBuXb','length','✎\x20手动输入','map','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','trim','14082TNWVjc','\x0a未找到可用应用。','8975571GIWopg','无法获取远程应用列表,请手动输入。','8MtDEhm','请输入\x20App\x20Code:','valid','App\x20Code:','10931490DzfUvH','message','custom'];a45_0x1f54=function(){return _0x3e029a;};return a45_0x1f54();}export async function promptSingleAppSelection(_0x269112){const _0x5828ba=a45_0x271b,_0x4357da=[{'name':a45_0x4233d1['gray']('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x5828ba(0x1c1)},{'name':a45_0x4233d1['yellow'](_0x5828ba(0x1b4)),'value':'custom'},..._0x269112['map'](_0x5d099b=>({'name':_0x5d099b[_0x5828ba(0x1bb)]+'\x20\x20'+a45_0x4233d1['gray']('('+_0x5d099b[_0x5828ba(0x1be)]+')'),'value':_0x5d099b[_0x5828ba(0x1be)]}))],_0x1ec7a5=await select({'message':_0x5828ba(0x1b6),'choices':_0x4357da});if(_0x1ec7a5==='skip')return _0x5828ba(0x1c1);if(_0x1ec7a5==='custom')return _0x5828ba(0x1b0);return _0x269112[_0x5828ba(0x1b3)](_0x160ed3=>_0x160ed3[_0x5828ba(0x1be)]===_0x1ec7a5);}export async function selectSingleAppcode(_0x23f24e){const _0x395b40=a45_0x271b;if(!_0x23f24e)return writeCliSideChannelLine(a45_0x4233d1[_0x395b40(0x1b5)](_0x395b40(0x1bd))),_fallbackOrSkip();writeCliSideChannelLine(_0x395b40(0x1c4));let _0x3ee317;try{_0x3ee317=await withActiveCookie(_0x23f24e,()=>listRemoteApps());}catch(_0xdfbcd1){writeCliSideChannelLine(a45_0x4233d1[_0x395b40(0x1bc)](_0x395b40(0x1a9)));if(_0xdfbcd1 instanceof Error)writeCliSideChannelLine(a45_0x4233d1[_0x395b40(0x1b5)]('\x20\x20('+_0xdfbcd1[_0x395b40(0x1af)]+')'));return _fallbackOrSkip();}if(_0x3ee317[_0x395b40(0x1c6)]===0x0)return writeCliSideChannelLine(a45_0x4233d1[_0x395b40(0x1bc)](_0x395b40(0x1ba))),_fallbackOrSkip();const _0x38eb59=await promptSingleAppSelection(_0x3ee317);if(_0x38eb59==='skip')return'';if(_0x38eb59===_0x395b40(0x1b0))return promptCustomAppcode();return _0x38eb59[_0x395b40(0x1be)];}export async function selectMultipleApps(_0x48e62e){const _0x2375e1=a45_0x271b;writeCliSideChannelLine(_0x2375e1(0x1c4));let _0x2561fb;try{_0x2561fb=await withActiveCookie(_0x48e62e,()=>listRemoteApps());}catch(_0x4e375a){writeCliSideChannelLine(_0x2375e1(0x1b9));if(_0x4e375a instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x4e375a[_0x2375e1(0x1af)]+')');return _0x2375e1(0x1b0);}if(_0x2561fb[_0x2375e1(0x1c6)]===0x0)return writeCliSideChannelLine(_0x2375e1(0x1a7)),'custom';return promptAppSelection(_0x2561fb);}async function _fallbackOrSkip(){const _0x2dd9ed=a45_0x271b,_0xdd40cd=await select({'message':_0x2dd9ed(0x1ad),'choices':[{'name':a45_0x4233d1[_0x2dd9ed(0x1b5)]('(跳过,稍后配置)'),'value':'skip'},{'name':a45_0x4233d1[_0x2dd9ed(0x1bc)](_0x2dd9ed(0x1c7)),'value':_0x2dd9ed(0x1c0)}]});if(_0xdd40cd===_0x2dd9ed(0x1c1))return'';return promptCustomAppcode();}
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 +1 @@
1
- const a46_0xfc4e2f=a46_0x3cd7;function a46_0x3cd7(_0x2b2224,_0x2a60cd){_0x2b2224=_0x2b2224-0x1e1;const _0x412d4a=a46_0x412d();let _0x3cd78f=_0x412d4a[_0x2b2224];return _0x3cd78f;}(function(_0x42aa72,_0x46f370){const _0x422aad=a46_0x3cd7,_0x3601c=_0x42aa72();while(!![]){try{const _0x293278=parseInt(_0x422aad(0x1f2))/0x1+parseInt(_0x422aad(0x1fa))/0x2+parseInt(_0x422aad(0x1ed))/0x3*(parseInt(_0x422aad(0x1f0))/0x4)+-parseInt(_0x422aad(0x1fe))/0x5+-parseInt(_0x422aad(0x1eb))/0x6*(parseInt(_0x422aad(0x1f8))/0x7)+parseInt(_0x422aad(0x1f6))/0x8+-parseInt(_0x422aad(0x1e9))/0x9;if(_0x293278===_0x46f370)break;else _0x3601c['push'](_0x3601c['shift']());}catch(_0x7060e0){_0x3601c['push'](_0x3601c['shift']());}}}(a46_0x412d,0xe0903));import{CLI_BIN_NAME}from'../../constant/cli.js';function a46_0x412d(){const _0x2bea63=['1774314kvauqU','PENDING','\x20failed:\x20','\x20completed\x20successfully.','2238936EUmzmo','\x20returned\x20unknown\x20status\x20','195384xPsXoI','\x27\x5c\x27\x27','1633906woAqqa','status','\x20is\x20pending.','string','3930665DYyTOU','Async\x20task\x20','FAILED','errorMessage','\x20failed.','taskId','PROCESSING','\x20task\x20status\x20--task-id\x20','trim','12435741jCasqY','Async\x20task\x20response\x20did\x20not\x20contain\x20a\x20taskId.','174dMVOVB','\x20--format\x20compress','2139RYuOWd','has','replace','5756DZRNuy','Task\x20'];a46_0x412d=function(){return _0x2bea63;};return a46_0x412d();}import{CliErrors}from'../../errors.js';const TERMINAL_STATUSES=new Set(['SUCCESS',a46_0xfc4e2f(0x1e2)]),NON_TERMINAL_STATUSES=new Set([a46_0xfc4e2f(0x1f3),a46_0xfc4e2f(0x1e6)]);export function normalizeAsyncTask(_0x17811c){const _0x28be2e=a46_0xfc4e2f,_0x4d98ea=typeof _0x17811c?.['taskId']==='string'?_0x17811c[_0x28be2e(0x1e5)][_0x28be2e(0x1e8)]():'';if(!_0x4d98ea)throw CliErrors['apiError'](_0x28be2e(0x1ea));const _0x27e21f=typeof _0x17811c[_0x28be2e(0x1fb)]===_0x28be2e(0x1fd)?_0x17811c[_0x28be2e(0x1fb)][_0x28be2e(0x1e8)]()['toUpperCase']():'';if(!_0x27e21f)throw CliErrors['apiError'](_0x28be2e(0x1e1)+_0x4d98ea+'\x20response\x20did\x20not\x20contain\x20a\x20status.');return{'taskId':_0x4d98ea,'status':_0x27e21f,'errorMessage':typeof _0x17811c[_0x28be2e(0x1e3)]===_0x28be2e(0x1fd)&&_0x17811c[_0x28be2e(0x1e3)][_0x28be2e(0x1e8)]()?_0x17811c['errorMessage'][_0x28be2e(0x1e8)]():null,'isTerminal':TERMINAL_STATUSES['has'](_0x27e21f),'knownStatus':TERMINAL_STATUSES[_0x28be2e(0x1ee)](_0x27e21f)||NON_TERMINAL_STATUSES[_0x28be2e(0x1ee)](_0x27e21f)};}export function buildAsyncTaskStatusCommand(_0x4108fc,_0x5867db){const _0x411049=a46_0xfc4e2f;return CLI_BIN_NAME+_0x411049(0x1e7)+quoteShellArg(_0x4108fc)+'\x20--appcode\x20'+quoteShellArg(_0x5867db)+_0x411049(0x1ec);}export function asyncTaskMessage(_0x2f8276){const _0x53dbb3=a46_0xfc4e2f;switch(_0x2f8276[_0x53dbb3(0x1fb)]){case _0x53dbb3(0x1f3):return _0x53dbb3(0x1f1)+_0x2f8276[_0x53dbb3(0x1e5)]+_0x53dbb3(0x1fc);case _0x53dbb3(0x1e6):return _0x53dbb3(0x1f1)+_0x2f8276[_0x53dbb3(0x1e5)]+'\x20is\x20processing.';case'SUCCESS':return _0x53dbb3(0x1f1)+_0x2f8276['taskId']+_0x53dbb3(0x1f5);case _0x53dbb3(0x1e2):return _0x2f8276[_0x53dbb3(0x1e3)]?_0x53dbb3(0x1f1)+_0x2f8276[_0x53dbb3(0x1e5)]+_0x53dbb3(0x1f4)+_0x2f8276[_0x53dbb3(0x1e3)]:_0x53dbb3(0x1f1)+_0x2f8276[_0x53dbb3(0x1e5)]+_0x53dbb3(0x1e4);default:return _0x53dbb3(0x1f1)+_0x2f8276[_0x53dbb3(0x1e5)]+_0x53dbb3(0x1f7)+_0x2f8276[_0x53dbb3(0x1fb)]+'.';}}function quoteShellArg(_0xc4c167){const _0x10dcfd=a46_0xfc4e2f;return'\x27'+_0xc4c167[_0x10dcfd(0x1ef)](/'/g,_0x10dcfd(0x1f9))+'\x27';}
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 +1 @@
1
- (function(_0x363de6,_0xc4309e){var _0x1ec893=a47_0x5bd2,_0x19c8de=_0x363de6();while(!![]){try{var _0x1f55d8=parseInt(_0x1ec893(0xe7))/0x1+-parseInt(_0x1ec893(0xea))/0x2*(parseInt(_0x1ec893(0xe6))/0x3)+-parseInt(_0x1ec893(0xef))/0x4+-parseInt(_0x1ec893(0xec))/0x5+-parseInt(_0x1ec893(0xe8))/0x6+-parseInt(_0x1ec893(0xe4))/0x7*(-parseInt(_0x1ec893(0xe5))/0x8)+parseInt(_0x1ec893(0xf0))/0x9*(parseInt(_0x1ec893(0xe9))/0xa);if(_0x1f55d8===_0xc4309e)break;else _0x19c8de['push'](_0x19c8de['shift']());}catch(_0x26f050){_0x19c8de['push'](_0x19c8de['shift']());}}}(a47_0x37ec,0x4af98));export function asDryRunResult(_0x3254bd,_0x39c259){var _0x2abd33=a47_0x5bd2;return Object['defineProperties'](_0x3254bd,{'method':{'value':_0x39c259[_0x2abd33(0xee)],'enumerable':![]},'url':{'value':_0x39c259[_0x2abd33(0xeb)],'enumerable':![]},..._0x39c259[_0x2abd33(0xed)]?{'description':{'value':_0x39c259['description'],'enumerable':![]}}:{}});}function a47_0x5bd2(_0x489949,_0x872e08){_0x489949=_0x489949-0xe4;var _0x37ece3=a47_0x37ec();var _0x5bd21c=_0x37ece3[_0x489949];return _0x5bd21c;}function a47_0x37ec(){var _0x4ef218=['104vjnGpt','1872pYlxTs','199849xoxsAV','2691384JcfbQH','650eDwhaj','152yJDigZ','url','1789550cjBIyr','description','method','2025908zDiIyV','148905FYrTDd','211183dDoJNK'];a47_0x37ec=function(){return _0x4ef218;};return a47_0x37ec();}
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 +1 @@
1
- const a48_0x924375=a48_0x1ff3;(function(_0x43975b,_0x390999){const _0x4f4cff=a48_0x1ff3,_0x2c9129=_0x43975b();while(!![]){try{const _0x281469=parseInt(_0x4f4cff(0x17a))/0x1*(-parseInt(_0x4f4cff(0x18e))/0x2)+parseInt(_0x4f4cff(0x184))/0x3+parseInt(_0x4f4cff(0x182))/0x4+parseInt(_0x4f4cff(0x17c))/0x5+parseInt(_0x4f4cff(0x179))/0x6*(-parseInt(_0x4f4cff(0x17d))/0x7)+-parseInt(_0x4f4cff(0x188))/0x8*(parseInt(_0x4f4cff(0x183))/0x9)+parseInt(_0x4f4cff(0x18d))/0xa;if(_0x281469===_0x390999)break;else _0x2c9129['push'](_0x2c9129['shift']());}catch(_0x58f505){_0x2c9129['push'](_0x2c9129['shift']());}}}(a48_0x3040,0xc8ea7));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a48_0x924375(0x187)};export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a48_0x924375(0x17b),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a48_0x924375(0x17e),'type':a48_0x924375(0x180),'required':!![],'description':a48_0x924375(0x17f),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a48_0x924375(0x189)}};function a48_0x3040(){const _0x45d0e2=['sqlcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','string','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','5472720cxrUDz','6102657SVcVjB','3032667cAqNVx','dbtype','appcode','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','16dTsKru','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Database\x20product\x20type','number','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','754930ddJELn','982420DUwsvH','POSTGRESQL','227778oiwPmz','3miUQwg','datasetcode','7129715qtQTrQ','42gkwLUO'];a48_0x3040=function(){return _0x45d0e2;};return a48_0x3040();}export const APPCODE_FLAG_OPTIONAL={'name':a48_0x924375(0x186),'type':a48_0x924375(0x180),'required':![],'description':a48_0x924375(0x18c)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':'App\x20code\x20(e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a48_0x924375(0x18b),'required':!![],'description':a48_0x924375(0x181)};function a48_0x1ff3(_0x36d3d6,_0x5f0bd9){_0x36d3d6=_0x36d3d6-0x179;const _0x30404c=a48_0x3040();let _0x1ff3e9=_0x30404c[_0x36d3d6];return _0x1ff3e9;}export const DB_TYPE_FLAG={'name':a48_0x924375(0x185),'type':a48_0x924375(0x180),'required':!![],'description':a48_0x924375(0x18a),'enum':['MYSQL',a48_0x924375(0x18f)]};
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 +1 @@
1
- (function(_0x51295a,_0x2ab1c1){const _0x1b1abd=a49_0x1342,_0x3171b9=_0x51295a();while(!![]){try{const _0x4aaa13=-parseInt(_0x1b1abd(0xae))/0x1+-parseInt(_0x1b1abd(0xac))/0x2*(-parseInt(_0x1b1abd(0xa9))/0x3)+-parseInt(_0x1b1abd(0xaa))/0x4*(-parseInt(_0x1b1abd(0xaf))/0x5)+parseInt(_0x1b1abd(0xb4))/0x6*(parseInt(_0x1b1abd(0xa8))/0x7)+parseInt(_0x1b1abd(0xa4))/0x8*(-parseInt(_0x1b1abd(0xa5))/0x9)+-parseInt(_0x1b1abd(0xb1))/0xa*(parseInt(_0x1b1abd(0xb6))/0xb)+-parseInt(_0x1b1abd(0xb5))/0xc;if(_0x4aaa13===_0x2ab1c1)break;else _0x3171b9['push'](_0x3171b9['shift']());}catch(_0xb3e00d){_0x3171b9['push'](_0x3171b9['shift']());}}}(a49_0x2672,0x1c64b));function a49_0x1342(_0x560c55,_0x4be1c7){_0x560c55=_0x560c55-0xa4;const _0x2672f8=a49_0x2672();let _0x134209=_0x2672f8[_0x560c55];return _0x134209;}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 formatBytes(_0x12cf37){const _0x46e9bf=a49_0x1342;if(_0x12cf37>=BYTES_PER_MB){const _0x3a4ad9=Math['ceil'](_0x12cf37/BYTES_PER_MB*0x64)/0x64;return _0x3a4ad9[_0x46e9bf(0xb3)](0x2)+_0x46e9bf(0xa7);}return _0x12cf37+'\x20B';}export function requireDevelopmentUploadFile(_0x5cd833,_0x2c32ce){const _0x2582ab=a49_0x1342,_0x5b0209=_0x5cd833[_0x2582ab(0xa6)]();if(!_0x5b0209)throw CliErrors['validation'](_0x2c32ce+_0x2582ab(0xab));if(!existsSync(_0x5b0209))throw CliErrors[_0x2582ab(0xad)]('File\x20not\x20found:\x20'+_0x5b0209);const _0x5d1162=statSync(_0x5b0209);if(!_0x5d1162['isFile']())throw CliErrors[_0x2582ab(0xad)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5b0209);if(_0x5d1162[_0x2582ab(0xb2)]>DEVELOPMENT_UPLOAD_MAX_BYTES)throw CliErrors['validation'](_0x2582ab(0xb0)+_0x5b0209+'\x20('+formatBytes(_0x5d1162['size'])+')');return{'path':_0x5b0209,'size':_0x5d1162[_0x2582ab(0xb2)]};}function a49_0x2672(){const _0xe171cd=['trim','\x20MB','329KknQgR','683238nmlJHQ','100BXcqse','\x20path\x20is\x20required.','2rLTHZk','validation','56241LlfXXB','29735ImpLyT','File\x20exceeds\x20the\x20development\x20upload\x20limit\x20of\x2050\x20MB:\x20','3020JGKuoR','size','toFixed','15078fHVhhE','2479896jpdeqm','396rGcGyb','21992IXMQUi','342VeIqEk'];a49_0x2672=function(){return _0xe171cd;};return a49_0x2672();}
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 +1 @@
1
- function a50_0x5726(){const _0x1dfad7=['6060306ZsfyMy','90392ZcuRPe','729MEkhrt','trim','17290CPqZLQ','792507rRmhjL','length','1101HHFcsZ','832aZDtEr','12HdSYoQ','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','1848YjoOMS','32770nfEKBb','27166656xfJsxn','App\x20Code\x20cannot\x20be\x20empty'];a50_0x5726=function(){return _0x1dfad7;};return a50_0x5726();}(function(_0x29dafa,_0x57fc25){const _0x29e035=a50_0x217e,_0x3ae069=_0x29dafa();while(!![]){try{const _0x22b0c2=parseInt(_0x29e035(0xcb))/0x1*(-parseInt(_0x29e035(0xcc))/0x2)+-parseInt(_0x29e035(0xc9))/0x3*(-parseInt(_0x29e035(0xbe))/0x4)+parseInt(_0x29e035(0xc8))/0x5*(-parseInt(_0x29e035(0xc0))/0x6)+-parseInt(_0x29e035(0xc4))/0x7+parseInt(_0x29e035(0xc5))/0x8+parseInt(_0x29e035(0xc6))/0x9*(-parseInt(_0x29e035(0xc1))/0xa)+parseInt(_0x29e035(0xc2))/0xb;if(_0x22b0c2===_0x57fc25)break;else _0x3ae069['push'](_0x3ae069['shift']());}catch(_0xe9a0b4){_0x3ae069['push'](_0x3ae069['shift']());}}}(a50_0x5726,0x972db));function a50_0x217e(_0x1b1b9f,_0x164d90){_0x1b1b9f=_0x1b1b9f-0xbe;const _0x5726b6=a50_0x5726();let _0x217eb9=_0x5726b6[_0x1b1b9f];return _0x217eb9;}export function validateAppcode(_0x47aa23){const _0xb4f523=a50_0x217e,_0x597f6c=_0x47aa23[_0xb4f523(0xc7)]();if(!_0x597f6c)return{'valid':![],'message':_0xb4f523(0xc3)};if(_0x597f6c[_0xb4f523(0xca)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x597f6c))return{'valid':![],'message':_0xb4f523(0xbf)};return{'valid':!![]};}
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 +1 @@
1
- const a51_0x49e517=a51_0x498c;function a51_0x498c(_0x39b52b,_0x5c45a9){_0x39b52b=_0x39b52b-0x199;const _0x5289b1=a51_0x5289();let _0x498c04=_0x5289b1[_0x39b52b];return _0x498c04;}function a51_0x5289(){const _0x3bb5ca=['30mfYmTc','334556LqLYgP','object','14260509aoBrsP','get','10IiLMNJ','Missing\x20key.','3625680XYzkYo','Key\x20not\x20found:\x20','app','key','482601BewdWP','Usage:\x20','917058YZvwgq','read','\x20config\x20get\x20--key\x20<key>','validation','config','70133rtwbdo','232416BRakOt','10xJfceB'];a51_0x5289=function(){return _0x3bb5ca;};return a51_0x5289();}(function(_0x2fb949,_0x58366e){const _0x4b4dae=a51_0x498c,_0x277e01=_0x2fb949();while(!![]){try{const _0x394ebc=-parseInt(_0x4b4dae(0x19f))/0x1+-parseInt(_0x4b4dae(0x1a1))/0x2+-parseInt(_0x4b4dae(0x1a7))/0x3+-parseInt(_0x4b4dae(0x1aa))/0x4*(-parseInt(_0x4b4dae(0x1a8))/0x5)+parseInt(_0x4b4dae(0x1a9))/0x6*(parseInt(_0x4b4dae(0x1a6))/0x7)+-parseInt(_0x4b4dae(0x19b))/0x8+parseInt(_0x4b4dae(0x1ac))/0x9*(parseInt(_0x4b4dae(0x199))/0xa);if(_0x394ebc===_0x58366e)break;else _0x277e01['push'](_0x277e01['shift']());}catch(_0x3177f1){_0x277e01['push'](_0x277e01['shift']());}}}(a51_0x5289,0x5094e));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x225110){const _0x41a41d=a51_0x498c,_0x205d23=_0x225110['str'](_0x41a41d(0x19e));if(!_0x205d23)throw CliErrors['validation'](_0x41a41d(0x19a),_0x41a41d(0x1a0)+CLI_BIN_NAME+_0x41a41d(0x1a3));const _0x1ad90f=readConfig(),_0x41483f=_0x205d23===_0x41a41d(0x19d)?'appcode':_0x205d23,_0x41544a=_0x1ad90f[_0x41483f];if(_0x41544a===undefined)throw CliErrors[_0x41a41d(0x1a4)](_0x41a41d(0x19c)+_0x205d23);return{'ok':!![],'data':typeof _0x41544a===_0x41a41d(0x1ab)?_0x41544a:{[_0x41483f]:_0x41544a},'message':typeof _0x41544a===_0x41a41d(0x1ab)?undefined:String(_0x41544a)};}export const configGetDefinition={'service':a51_0x49e517(0x1a5),'command':a51_0x49e517(0x1ad),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a51_0x49e517(0x1a2),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
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};