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

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 (240) 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 -0
  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 -0
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -0
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/validate.js +1 -1
  50. package/lib/commands/config/get.js +1 -1
  51. package/lib/commands/config/index.js +1 -1
  52. package/lib/commands/config/list.js +1 -1
  53. package/lib/commands/config/set.js +1 -1
  54. package/lib/commands/config/shared.js +1 -1
  55. package/lib/commands/data/filter.js +1 -1
  56. package/lib/commands/data/getOne.js +1 -1
  57. package/lib/commands/data/index.js +1 -1
  58. package/lib/commands/data/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/capability.js +1 -1
  61. package/lib/commands/dataset/delete.js +1 -1
  62. package/lib/commands/dataset/detail.js +1 -1
  63. package/lib/commands/dataset/extend-update.js +1 -1
  64. package/lib/commands/dataset/field-update.js +1 -1
  65. package/lib/commands/dataset/generate.js +1 -1
  66. package/lib/commands/dataset/index.js +1 -1
  67. package/lib/commands/dataset/list.js +1 -1
  68. package/lib/commands/dataset/operations.js +1 -1
  69. package/lib/commands/dataset/relation-audit.js +1 -1
  70. package/lib/commands/dataset/relation-create.js +1 -1
  71. package/lib/commands/dataset/relation-delete.js +1 -1
  72. package/lib/commands/dataset/relation-shared.js +1 -1
  73. package/lib/commands/dataset/relation-update.js +1 -1
  74. package/lib/commands/dataset/relations.js +1 -1
  75. package/lib/commands/dataset/rename.js +1 -1
  76. package/lib/commands/dataset/restore.js +1 -1
  77. package/lib/commands/db/analyze-cancel.js +1 -1
  78. package/lib/commands/db/analyze-start.js +1 -1
  79. package/lib/commands/db/analyze-status.js +1 -1
  80. package/lib/commands/db/create.js +1 -1
  81. package/lib/commands/db/delete.js +1 -1
  82. package/lib/commands/db/detail.js +1 -1
  83. package/lib/commands/db/diff.js +1 -1
  84. package/lib/commands/db/index.js +1 -1
  85. package/lib/commands/db/list.js +1 -1
  86. package/lib/commands/db/shared.js +1 -1
  87. package/lib/commands/db/tables.js +1 -1
  88. package/lib/commands/db/test.js +1 -1
  89. package/lib/commands/db/update.js +1 -1
  90. package/lib/commands/doctor.js +1 -1
  91. package/lib/commands/init/index.js +1 -1
  92. package/lib/commands/issue/index.js +1 -1
  93. package/lib/commands/issue/nudge.js +1 -1
  94. package/lib/commands/issue/report.js +1 -1
  95. package/lib/commands/issue/shared.js +1 -1
  96. package/lib/commands/logs/index.js +1 -1
  97. package/lib/commands/menu/index.js +1 -1
  98. package/lib/commands/menu/list.js +1 -1
  99. package/lib/commands/menu/shared/compare-table.js +1 -1
  100. package/lib/commands/menu/shared/index.js +1 -1
  101. package/lib/commands/menu/shared/inquirer.js +1 -1
  102. package/lib/commands/menu/shared/local-pages.js +1 -1
  103. package/lib/commands/menu/shared/logic.js +1 -1
  104. package/lib/commands/menu/shared/service.js +1 -1
  105. package/lib/commands/menu/shared/sync-core.js +1 -1
  106. package/lib/commands/menu/shared/update-core.js +1 -1
  107. package/lib/commands/menu/shared/valid-url.js +1 -1
  108. package/lib/commands/menu/sync.js +1 -1
  109. package/lib/commands/menu/update.js +1 -1
  110. package/lib/commands/page/generate-start.js +1 -1
  111. package/lib/commands/page/generate-status.js +1 -1
  112. package/lib/commands/page/index.js +1 -1
  113. package/lib/commands/page/pull.js +1 -1
  114. package/lib/commands/page/push.js +1 -1
  115. package/lib/commands/page/relation-audit.js +1 -1
  116. package/lib/commands/page/shared.js +1 -1
  117. package/lib/commands/page/standard-page-status.js +1 -1
  118. package/lib/commands/page/sync.js +1 -1
  119. package/lib/commands/permit/index.js +1 -0
  120. package/lib/commands/permit/page-get.js +1 -0
  121. package/lib/commands/permit/page-set.js +1 -0
  122. package/lib/commands/permit/role-apis-set.js +1 -0
  123. package/lib/commands/permit/role-menus-set.js +1 -0
  124. package/lib/commands/permit/role-menus.js +1 -0
  125. package/lib/commands/permit/shared.js +1 -0
  126. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  127. package/lib/commands/project/create/format-elapsed.js +1 -1
  128. package/lib/commands/project/create/main.js +1 -1
  129. package/lib/commands/project/create/non-interactive.js +1 -1
  130. package/lib/commands/project/create/project-template-path.js +1 -1
  131. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  132. package/lib/commands/project/create/use-format-code.js +1 -1
  133. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  134. package/lib/commands/project/index.js +1 -1
  135. package/lib/commands/project/init.js +1 -1
  136. package/lib/commands/project/upgrade.js +1 -1
  137. package/lib/commands/registry.js +1 -1
  138. package/lib/commands/role/create.js +1 -0
  139. package/lib/commands/role/delete.js +1 -0
  140. package/lib/commands/role/detail.js +1 -0
  141. package/lib/commands/role/index.js +1 -0
  142. package/lib/commands/role/list.js +1 -0
  143. package/lib/commands/role/shared.js +1 -0
  144. package/lib/commands/role/update.js +1 -0
  145. package/lib/commands/role/user-add.js +1 -0
  146. package/lib/commands/role/user-remove.js +1 -0
  147. package/lib/commands/role/user-resolve.js +1 -0
  148. package/lib/commands/run/index.js +1 -1
  149. package/lib/commands/schema.js +1 -1
  150. package/lib/commands/sql/create.js +1 -1
  151. package/lib/commands/sql/delete.js +1 -1
  152. package/lib/commands/sql/detail.js +1 -1
  153. package/lib/commands/sql/exec.js +1 -1
  154. package/lib/commands/sql/index.js +1 -1
  155. package/lib/commands/sql/list.js +1 -1
  156. package/lib/commands/sql/pull.js +1 -1
  157. package/lib/commands/sql/push.js +1 -1
  158. package/lib/commands/sql/save.js +1 -1
  159. package/lib/commands/sql/shared.js +1 -1
  160. package/lib/commands/sql/status.js +1 -1
  161. package/lib/commands/sql/validate.js +1 -1
  162. package/lib/commands/workspace/add.js +1 -0
  163. package/lib/commands/workspace/index.js +1 -1
  164. package/lib/commands/workspace/remove.js +1 -0
  165. package/lib/config/schema.js +1 -1
  166. package/lib/constant/cdn.js +1 -1
  167. package/lib/constant/cli.js +1 -1
  168. package/lib/constant/defaults.js +1 -1
  169. package/lib/constant/domain.js +1 -1
  170. package/lib/constant/env.js +1 -1
  171. package/lib/constant/output.js +1 -1
  172. package/lib/constant/paths.js +1 -1
  173. package/lib/constant/risk.js +1 -1
  174. package/lib/context/app-resolver.js +1 -1
  175. package/lib/context/auth-resolver.js +1 -1
  176. package/lib/context/config-loader.js +1 -1
  177. package/lib/context.js +1 -1
  178. package/lib/core/alias-resolver.js +1 -1
  179. package/lib/core/api-client.js +1 -1
  180. package/lib/core/bff/config.js +1 -1
  181. package/lib/core/bff/file-system.js +1 -1
  182. package/lib/core/bff/hash.js +1 -1
  183. package/lib/core/bff/lock.js +1 -1
  184. package/lib/core/bff/utils.js +1 -1
  185. package/lib/core/db-resolver.js +1 -1
  186. package/lib/core/page/file-system.js +1 -1
  187. package/lib/core/page/hash.js +1 -1
  188. package/lib/core/page/lock.js +1 -1
  189. package/lib/core/sql-sync/config.js +1 -1
  190. package/lib/core/sql-sync/file-system.js +1 -1
  191. package/lib/core/sql-sync/hash.js +1 -1
  192. package/lib/core/sql-sync/lock.js +1 -1
  193. package/lib/core/sql-sync/utils.js +1 -1
  194. package/lib/core/sql-validator.js +1 -1
  195. package/lib/errors.js +1 -1
  196. package/lib/framework/build-all-flags.js +1 -1
  197. package/lib/framework/flags.js +1 -1
  198. package/lib/framework/help.js +1 -1
  199. package/lib/framework/index.js +1 -1
  200. package/lib/framework/output.js +1 -1
  201. package/lib/framework/response.js +1 -1
  202. package/lib/framework/runner-alias.js +1 -1
  203. package/lib/framework/runner.js +1 -1
  204. package/lib/framework/schema-export.js +1 -1
  205. package/lib/framework/types.js +1 -1
  206. package/lib/generated/build-info.js +1 -1
  207. package/lib/help.js +1 -1
  208. package/lib/skills/main.js +1 -1
  209. package/lib/skills/npx-skills-add.js +1 -1
  210. package/lib/telemetry/cli-command-trace.js +1 -1
  211. package/lib/telemetry/cli-help-trace.js +1 -1
  212. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  213. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  214. package/lib/telemetry/send-cli-trace-log.js +1 -1
  215. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  216. package/lib/utils/ai_config.js +1 -1
  217. package/lib/utils/apply-jq-filter.js +1 -1
  218. package/lib/utils/cdn-config.js +1 -1
  219. package/lib/utils/check-sdk-version.js +1 -1
  220. package/lib/utils/cli-version-check.js +1 -1
  221. package/lib/utils/cli-version-policy.js +1 -1
  222. package/lib/utils/config.js +1 -1
  223. package/lib/utils/copy-directory.js +1 -1
  224. package/lib/utils/entity-with-id.js +1 -1
  225. package/lib/utils/file-utils.js +1 -1
  226. package/lib/utils/guides-cdn.js +1 -1
  227. package/lib/utils/http-client.js +1 -1
  228. package/lib/utils/is-non-interactive.js +1 -1
  229. package/lib/utils/logger.js +1 -1
  230. package/lib/utils/params.js +1 -1
  231. package/lib/utils/platform.js +1 -1
  232. package/lib/utils/rules-cdn.js +1 -1
  233. package/lib/utils/sleep.js +1 -1
  234. package/lib/utils/template-replacer.js +1 -1
  235. package/lib/utils/update-notice.js +1 -1
  236. package/lib/utils/version.js +1 -1
  237. package/lib/utils/with-active-cookie.js +1 -1
  238. package/lib/utils/write-cli-side-channel.js +1 -1
  239. package/package.json +2 -2
  240. package/lib/commands/app/discover.js +0 -1
@@ -1 +1 @@
1
- const a36_0x457918=a36_0x136d;(function(_0x1ea94d,_0x5f5d2a){const _0x53f7d4=a36_0x136d,_0x2f7396=_0x1ea94d();while(!![]){try{const _0x298eec=-parseInt(_0x53f7d4(0x15a))/0x1*(parseInt(_0x53f7d4(0x159))/0x2)+-parseInt(_0x53f7d4(0x160))/0x3*(parseInt(_0x53f7d4(0x18d))/0x4)+parseInt(_0x53f7d4(0x161))/0x5+parseInt(_0x53f7d4(0x149))/0x6*(-parseInt(_0x53f7d4(0x15f))/0x7)+-parseInt(_0x53f7d4(0x176))/0x8*(parseInt(_0x53f7d4(0x158))/0x9)+parseInt(_0x53f7d4(0x172))/0xa*(parseInt(_0x53f7d4(0x145))/0xb)+parseInt(_0x53f7d4(0x166))/0xc;if(_0x298eec===_0x5f5d2a)break;else _0x2f7396['push'](_0x2f7396['shift']());}catch(_0x11f7af){_0x2f7396['push'](_0x2f7396['shift']());}}}(a36_0x5953,0x7fe75));import{createInterface}from'node:readline';import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';function a36_0x136d(_0x311b01,_0x11f67e){_0x311b01=_0x311b01-0x145;const _0x5953b5=a36_0x5953();let _0x136d4d=_0x5953b5[_0x311b01];return _0x136d4d;}import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a36_0x457918(0x14d),'description':a36_0x457918(0x16c),'risk':a36_0x457918(0x14b),'flags':[{'name':'type','type':'string','description':a36_0x457918(0x155),'enum':['COMMON',a36_0x457918(0x153),a36_0x457918(0x189)]},{'name':a36_0x457918(0x14c),'type':a36_0x457918(0x18f),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x1ee6de){const _0x490cc2=a36_0x457918,_0x203785=loadBffProjectConfig(_0x1ee6de[_0x490cc2(0x14a)]),_0x422d2e=await readBffLockFile(_0x203785[_0x490cc2(0x150)]),{appLock:_0xb67351}=ensureLockScope(_0x422d2e??createEmptyBffLock(),_0x1ee6de[_0x490cc2(0x14a)],_0x203785['scriptsRoot'],_0x490cc2(0x14d)),_0x546698=normalizeBffType(_0x1ee6de[_0x490cc2(0x17c)](_0x490cc2(0x15c)))??undefined,_0x2a688d=buildDatasetCodeToAliasMap(_0x1ee6de[_0x490cc2(0x183)],_0x1ee6de['appCode']),[_0x52534c,_0x52e6c8]=await Promise[_0x490cc2(0x185)]([listBffScripts(_0x1ee6de[_0x490cc2(0x14a)],_0x546698),getBffScriptStatistics(_0x1ee6de[_0x490cc2(0x14a)])]),_0x5c0a8e=createHookLocationMap(_0x52e6c8),_0x2ec3ff=[];for(const _0x1456e9 of _0x52534c){const _0x3184d1=resolveRemoteScriptTarget(_0x203785,_0x1456e9,_0x5c0a8e,_0xb67351[_0x490cc2(0x148)],_0x2a688d);if(!_0x3184d1){_0x2ec3ff['push']({'scriptType':_0x1456e9[_0x490cc2(0x17d)],'functionName':_0x1456e9['functionName']??'','status':_0x490cc2(0x14f),'reason':_0x490cc2(0x180)});continue;}const _0x2307b9=_0xb67351[_0x490cc2(0x148)][_0x3184d1[_0x490cc2(0x15d)]],_0x5f414b=_0x1456e9[_0x490cc2(0x169)]!=null?computeContentHash(_0x1456e9['scriptContent']):undefined,_0x4d366e=await hasUnsyncedLocalChanges(_0x3184d1['filePath'],_0x2307b9,_0x5f414b);_0x2ec3ff['push']({'lockKey':_0x3184d1[_0x490cc2(0x15d)],'filePath':_0x3184d1[_0x490cc2(0x16a)],'remoteId':_0x1456e9['id']??null,'status':_0x4d366e?'conflict':'would_pull'});}return{'method':_0x490cc2(0x16b),'url':_0x490cc2(0x178)+_0x1ee6de[_0x490cc2(0x14a)]+(_0x546698?_0x490cc2(0x15e)+_0x546698:''),'body':{'appCode':_0x1ee6de['appCode'],'filterType':_0x546698??null,'files':_0x2ec3ff},'description':_0x490cc2(0x18c)+_0x2ec3ff[_0x490cc2(0x16d)]+_0x490cc2(0x17f)};},async 'execute'(_0x3d6d52){const _0x5e7e60=a36_0x457918,_0x347b95=loadBffProjectConfig(_0x3d6d52['appCode']),_0x118c30=await readBffLockFile(_0x347b95[_0x5e7e60(0x150)]),{lockData:_0x47406c,appLock:_0x52ec2a}=ensureLockScope(_0x118c30??createEmptyBffLock(),_0x3d6d52[_0x5e7e60(0x14a)],_0x347b95[_0x5e7e60(0x179)],'pull'),_0x4c54df=normalizeBffType(_0x3d6d52[_0x5e7e60(0x17c)](_0x5e7e60(0x15c)))??undefined;if(_0x3d6d52[_0x5e7e60(0x17c)](_0x5e7e60(0x15c))&&!_0x4c54df)throw CliErrors[_0x5e7e60(0x174)](_0x5e7e60(0x156));const [_0x456c63,_0x4c9f48]=await Promise[_0x5e7e60(0x185)]([listBffScripts(_0x3d6d52[_0x5e7e60(0x14a)],_0x4c54df),getBffScriptStatistics(_0x3d6d52['appCode'])]);if(_0x456c63[_0x5e7e60(0x16d)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x2b46ca=_0x3d6d52['bool'](_0x5e7e60(0x14c));if(_0x2b46ca&&!_0x3d6d52[_0x5e7e60(0x17a)]){const _0x10805f=await confirmForce();if(!_0x10805f)throw CliErrors[_0x5e7e60(0x18b)](_0x5e7e60(0x168));}if(_0x2b46ca&&_0x3d6d52[_0x5e7e60(0x17a)]){}const _0x3476c0=buildDatasetCodeToAliasMap(_0x3d6d52['apiDir'],_0x3d6d52[_0x5e7e60(0x14a)]),_0x2c8744=createHookLocationMap(_0x4c9f48),_0x5e8fba=JSON[_0x5e7e60(0x154)](JSON['stringify'](_0x47406c)),_0x536be0=_0x3d6d52[_0x5e7e60(0x14a)],_0x1ea545=_0x5e8fba[_0x5e7e60(0x188)][_0x536be0];if(!_0x1ea545)throw new Error(_0x5e7e60(0x167)+_0x536be0+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x2083d4=[],_0x20c6a8=[],_0x597f62=[];for(const _0x1fa4aa of _0x456c63){const _0x46945a=resolveRemoteScriptTarget(_0x347b95,_0x1fa4aa,_0x2c8744,_0x52ec2a['functions'],_0x3476c0);if(!_0x46945a){_0x20c6a8['push']({'lockKey':_0x1fa4aa[_0x5e7e60(0x17d)]+'/'+_0x1fa4aa[_0x5e7e60(0x182)],'reason':'unresolvable\x20target\x20path'});continue;}const _0xeb2995=_0x52ec2a['functions'][_0x46945a[_0x5e7e60(0x15d)]];try{if(!_0x1fa4aa['id'])throw new Error(_0x5e7e60(0x184));if(_0x1fa4aa[_0x5e7e60(0x169)]==null)throw new Error(_0x5e7e60(0x16e));const _0xcedf8b=_0x1fa4aa[_0x5e7e60(0x169)],_0x37b96a=computeContentHash(_0xcedf8b);if(!_0x2b46ca){const _0x297ffc=await hasUnsyncedLocalChanges(_0x46945a[_0x5e7e60(0x16a)],_0xeb2995,_0x37b96a);if(_0x297ffc){_0x20c6a8[_0x5e7e60(0x181)]({'lockKey':_0x46945a[_0x5e7e60(0x15d)],'reason':_0x5e7e60(0x17e)});continue;}}await ensureParentDirectory(_0x46945a[_0x5e7e60(0x16a)]),await writeFile(_0x46945a[_0x5e7e60(0x16a)],_0xcedf8b,'utf8');const _0x4f6b41={'hash':_0x37b96a,'remoteId':_0x1fa4aa['id'],'version':_0x1fa4aa[_0x5e7e60(0x18e)]};_0x46945a['type']===_0x5e7e60(0x189)&&_0x46945a[_0x5e7e60(0x16f)]&&(_0x4f6b41[_0x5e7e60(0x165)]=_0x46945a['hookLocation'][_0x5e7e60(0x165)],_0x4f6b41[_0x5e7e60(0x146)]=_0x46945a[_0x5e7e60(0x16f)]['datasetCode'],_0x4f6b41[_0x5e7e60(0x171)]=_0x46945a['hookLocation'][_0x5e7e60(0x171)],_0x4f6b41[_0x5e7e60(0x17b)]=_0x46945a[_0x5e7e60(0x16f)][_0x5e7e60(0x17b)]),_0x1ea545[_0x5e7e60(0x148)][_0x46945a[_0x5e7e60(0x15d)]]=_0x4f6b41,_0x2083d4[_0x5e7e60(0x181)]({'lockKey':_0x46945a[_0x5e7e60(0x15d)],'remoteId':_0x1fa4aa['id']});}catch(_0x2cc85f){_0x597f62[_0x5e7e60(0x181)]({'lockKey':_0x46945a[_0x5e7e60(0x15d)],'error':_0x2cc85f instanceof Error?_0x2cc85f['message']:String(_0x2cc85f)});}}return _0x1ea545[_0x5e7e60(0x162)]=new Date()[_0x5e7e60(0x151)](),await writeBffLockFile(_0x347b95[_0x5e7e60(0x150)],_0x5e8fba),{'ok':_0x597f62['length']===0x0,'data':{'pulled':_0x2083d4,'skipped':_0x20c6a8,'failed':_0x597f62},'message':_0x5e7e60(0x163)+_0x2083d4[_0x5e7e60(0x16d)]+_0x5e7e60(0x170)+_0x20c6a8[_0x5e7e60(0x16d)]+_0x5e7e60(0x147)+_0x597f62[_0x5e7e60(0x16d)]+_0x5e7e60(0x175)};}};function a36_0x5953(){const _0x47ab49=['40rpZdAa','includes','/api/management/library/scripts/list?appCode=','scriptsRoot','nonInteractive','functionNode','str','scriptType','local\x20unsynced\x20changes','\x20remote\x20BFF\x20script(s)\x20for\x20pull','unresolvable\x20target\x20path','push','functionName','apiDir','Remote\x20script\x20missing\x20id.','all','stderr','trim','apps','HOOK','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','cancelled','Would\x20inspect\x20','24BtXUhx','version','boolean','1094159uScNsG','datasetCode','\x20skipped,\x20','functions','543372DZQKMu','appCode','write','force','pull','toLowerCase','skipped','lockFilePath','toISOString','hash','ENDPOINT','parse','Pull\x20only\x20this\x20script\x20type','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','close','133506XIgckM','28166nBAbUR','1NwAlMx','question','type','lockKey','&type=','14OxYoiN','415920fWPQuK','809510LDzgMy','lastSync','Pull\x20complete:\x20','yes','alias','16364868ZixaQP','Lock\x20scope\x20for\x20app\x20\x22','Force\x20pull\x20cancelled.','scriptContent','filePath','GET','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','length','Remote\x20script\x20missing\x20content.','hookLocation','\x20pulled,\x20','operationType','10iUwQif','stdin','validation','\x20failed'];a36_0x5953=function(){return _0x47ab49;};return a36_0x5953();}async function hasUnsyncedLocalChanges(_0x247979,_0x4b1044,_0x290d95){const _0x381ff3=a36_0x457918;if(!await fileExists(_0x247979))return![];const _0x1b80a1=await computeFileHash(_0x247979);if(!_0x4b1044)return _0x290d95?_0x1b80a1!==_0x290d95:!![];return _0x1b80a1!==_0x4b1044[_0x381ff3(0x152)];}function buildDatasetCodeToAliasMap(_0x1a2ac3,_0x4919cf){const _0x479c8b=a36_0x457918,_0xc49563=loadAliasMap(_0x1a2ac3,undefined,resolveApiFilePath(_0x1a2ac3,_0x4919cf));return new Map(_0xc49563['map'](_0x4634e1=>[_0x4634e1[_0x479c8b(0x146)],_0x4634e1[_0x479c8b(0x165)]]));}async function confirmForce(){const _0x3cb884=a36_0x457918,_0x21cbe1=createInterface({'input':process[_0x3cb884(0x173)],'output':process[_0x3cb884(0x186)]}),_0x3ba6c1=await new Promise(_0x121feb=>{const _0x178a1c=_0x3cb884;_0x21cbe1[_0x178a1c(0x15b)](_0x178a1c(0x18a),_0x121feb);});return _0x21cbe1[_0x3cb884(0x157)](),['y',_0x3cb884(0x164)][_0x3cb884(0x177)](_0x3ba6c1[_0x3cb884(0x187)]()[_0x3cb884(0x14e)]());}
1
+ const a36_0x29c45c=a36_0x198a;(function(_0x5660d8,_0x115607){const _0x9a1e74=a36_0x198a,_0xe0aca6=_0x5660d8();while(!![]){try{const _0x7f6097=parseInt(_0x9a1e74(0x1af))/0x1+-parseInt(_0x9a1e74(0x195))/0x2+-parseInt(_0x9a1e74(0x192))/0x3+-parseInt(_0x9a1e74(0x1b5))/0x4*(parseInt(_0x9a1e74(0x19c))/0x5)+parseInt(_0x9a1e74(0x199))/0x6*(-parseInt(_0x9a1e74(0x17c))/0x7)+parseInt(_0x9a1e74(0x18f))/0x8+parseInt(_0x9a1e74(0x1a8))/0x9;if(_0x7f6097===_0x115607)break;else _0xe0aca6['push'](_0xe0aca6['shift']());}catch(_0x4895b9){_0xe0aca6['push'](_0xe0aca6['shift']());}}}(a36_0x481c,0x24ac7));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';function a36_0x481c(){const _0x441354=['close','&type=','yes','operationType','nonInteractive','125657KurHkF','\x20skipped,\x20','pull','scriptContent','Lock\x20scope\x20for\x20app\x20\x22','/api/management/library/scripts/list?appCode=','Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20','lockKey','parse','scriptType','\x20pulled,\x20','force','functions','push','alias','str','utf8','\x20remote\x20BFF\x20script(s)\x20for\x20pull','Force\x20overwrite\x20local\x20unsynced\x20changes','1840448ZDesMQ','type','Remote\x20script\x20missing\x20id.','397815THGLve','No\x20remote\x20BFF\x20scripts\x20found.','datasetCode','178282yfcCJN','hash','all','functionNode','30ResmWp','stdin','version','198035waZTEU','boolean','HOOK','toLowerCase','lockFilePath','map','appCode','apps','scriptsRoot','hookLocation','unresolvable\x20target\x20path','Pull\x20only\x20this\x20script\x20type','2214900dNOpfq','filePath','functionName','toISOString','\x20failed','length','write','183595yZtYnR','string','stderr','apiDir','stringify','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','20eFDxdl','lastSync','Remote\x20script\x20missing\x20content.','trim','conflict','bool','message'];a36_0x481c=function(){return _0x441354;};return a36_0x481c();}import{resolveApiFilePath}from'../../context.js';function a36_0x198a(_0x52fba0,_0x29d609){_0x52fba0=_0x52fba0-0x173;const _0x481c03=a36_0x481c();let _0x198a2b=_0x481c03[_0x52fba0];return _0x198a2b;}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':'bff','command':a36_0x29c45c(0x17e),'description':a36_0x29c45c(0x1b4),'risk':a36_0x29c45c(0x1ae),'flags':[{'name':a36_0x29c45c(0x190),'type':a36_0x29c45c(0x1b0),'description':a36_0x29c45c(0x1a7),'enum':['COMMON','ENDPOINT',a36_0x29c45c(0x19e)]},{'name':'force','type':a36_0x29c45c(0x19d),'description':a36_0x29c45c(0x18e)}],async 'dryRun'(_0x15a254){const _0x4a8230=a36_0x29c45c,_0x2427a6=loadBffProjectConfig(_0x15a254[_0x4a8230(0x1a2)]),_0x5eb88d=await readBffLockFile(_0x2427a6[_0x4a8230(0x1a0)]),{appLock:_0xb4a584}=ensureLockScope(_0x5eb88d??createEmptyBffLock(),_0x15a254[_0x4a8230(0x1a2)],_0x2427a6[_0x4a8230(0x1a4)],_0x4a8230(0x17e)),_0x1f8ed9=normalizeBffType(_0x15a254[_0x4a8230(0x18b)](_0x4a8230(0x190)))??undefined,_0x1431ee=buildDatasetCodeToAliasMap(_0x15a254[_0x4a8230(0x1b2)],_0x15a254[_0x4a8230(0x1a2)]),[_0x263a41,_0x114277]=await Promise[_0x4a8230(0x197)]([listBffScripts(_0x15a254['appCode'],_0x1f8ed9),getBffScriptStatistics(_0x15a254[_0x4a8230(0x1a2)])]),_0xdd7ba2=createHookLocationMap(_0x114277),_0x65bfcd=[];for(const _0x2dc6d2 of _0x263a41){const _0x1dee1b=resolveRemoteScriptTarget(_0x2427a6,_0x2dc6d2,_0xdd7ba2,_0xb4a584[_0x4a8230(0x188)],_0x1431ee);if(!_0x1dee1b){_0x65bfcd[_0x4a8230(0x189)]({'scriptType':_0x2dc6d2['scriptType'],'functionName':_0x2dc6d2[_0x4a8230(0x1aa)]??'','status':'skipped','reason':_0x4a8230(0x1a6)});continue;}const _0x39f7fd=_0xb4a584[_0x4a8230(0x188)][_0x1dee1b[_0x4a8230(0x183)]],_0x4b545b=_0x2dc6d2['scriptContent']!=null?computeContentHash(_0x2dc6d2[_0x4a8230(0x17f)]):undefined,_0x5b21f1=await hasUnsyncedLocalChanges(_0x1dee1b[_0x4a8230(0x1a9)],_0x39f7fd,_0x4b545b);_0x65bfcd[_0x4a8230(0x189)]({'lockKey':_0x1dee1b[_0x4a8230(0x183)],'filePath':_0x1dee1b[_0x4a8230(0x1a9)],'remoteId':_0x2dc6d2['id']??null,'status':_0x5b21f1?_0x4a8230(0x174):'would_pull'});}return{'method':'GET','url':_0x4a8230(0x181)+_0x15a254[_0x4a8230(0x1a2)]+(_0x1f8ed9?_0x4a8230(0x178)+_0x1f8ed9:''),'body':{'appCode':_0x15a254['appCode'],'filterType':_0x1f8ed9??null,'files':_0x65bfcd},'description':'Would\x20inspect\x20'+_0x65bfcd[_0x4a8230(0x1ad)]+_0x4a8230(0x18d)};},async 'execute'(_0x4ede83){const _0x379fd2=a36_0x29c45c,_0x3156ff=loadBffProjectConfig(_0x4ede83['appCode']),_0x5bfa63=await readBffLockFile(_0x3156ff[_0x379fd2(0x1a0)]),{lockData:_0x2e5f53,appLock:_0x2a7618}=ensureLockScope(_0x5bfa63??createEmptyBffLock(),_0x4ede83['appCode'],_0x3156ff[_0x379fd2(0x1a4)],_0x379fd2(0x17e)),_0x1dca0b=normalizeBffType(_0x4ede83[_0x379fd2(0x18b)](_0x379fd2(0x190)))??undefined;if(_0x4ede83[_0x379fd2(0x18b)](_0x379fd2(0x190))&&!_0x1dca0b)throw CliErrors['validation']('--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.');const [_0x4f7226,_0xa0cb45]=await Promise[_0x379fd2(0x197)]([listBffScripts(_0x4ede83[_0x379fd2(0x1a2)],_0x1dca0b),getBffScriptStatistics(_0x4ede83[_0x379fd2(0x1a2)])]);if(_0x4f7226['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x379fd2(0x193)};const _0x54ccc5=_0x4ede83[_0x379fd2(0x175)](_0x379fd2(0x187));if(_0x54ccc5&&!_0x4ede83[_0x379fd2(0x17b)]){const _0x3ca877=await confirmForce();if(!_0x3ca877)throw CliErrors['cancelled']('Force\x20pull\x20cancelled.');}if(_0x54ccc5&&_0x4ede83[_0x379fd2(0x17b)]){}const _0x549706=buildDatasetCodeToAliasMap(_0x4ede83[_0x379fd2(0x1b2)],_0x4ede83[_0x379fd2(0x1a2)]),_0xae53fe=createHookLocationMap(_0xa0cb45),_0x2133e3=JSON[_0x379fd2(0x184)](JSON[_0x379fd2(0x1b3)](_0x2e5f53)),_0x17586e=_0x4ede83[_0x379fd2(0x1a2)],_0x19b894=_0x2133e3[_0x379fd2(0x1a3)][_0x17586e];if(!_0x19b894)throw new Error(_0x379fd2(0x180)+_0x17586e+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x2003d4=[],_0x3691a2=[],_0x40b624=[];for(const _0x588f9a of _0x4f7226){const _0x45382d=resolveRemoteScriptTarget(_0x3156ff,_0x588f9a,_0xae53fe,_0x2a7618[_0x379fd2(0x188)],_0x549706);if(!_0x45382d){_0x3691a2['push']({'lockKey':_0x588f9a[_0x379fd2(0x185)]+'/'+_0x588f9a[_0x379fd2(0x1aa)],'reason':_0x379fd2(0x1a6)});continue;}const _0x1dd617=_0x2a7618['functions'][_0x45382d[_0x379fd2(0x183)]];try{if(!_0x588f9a['id'])throw new Error(_0x379fd2(0x191));if(_0x588f9a[_0x379fd2(0x17f)]==null)throw new Error(_0x379fd2(0x1b7));const _0x1e3911=_0x588f9a[_0x379fd2(0x17f)],_0x249a74=computeContentHash(_0x1e3911);if(!_0x54ccc5){const _0x3043a2=await hasUnsyncedLocalChanges(_0x45382d[_0x379fd2(0x1a9)],_0x1dd617,_0x249a74);if(_0x3043a2){_0x3691a2[_0x379fd2(0x189)]({'lockKey':_0x45382d[_0x379fd2(0x183)],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x45382d[_0x379fd2(0x1a9)]),await writeFile(_0x45382d['filePath'],_0x1e3911,_0x379fd2(0x18c));const _0x13e50b={'hash':_0x249a74,'remoteId':_0x588f9a['id'],'version':_0x588f9a[_0x379fd2(0x19b)]};_0x45382d[_0x379fd2(0x190)]===_0x379fd2(0x19e)&&_0x45382d[_0x379fd2(0x1a5)]&&(_0x13e50b[_0x379fd2(0x18a)]=_0x45382d[_0x379fd2(0x1a5)][_0x379fd2(0x18a)],_0x13e50b[_0x379fd2(0x194)]=_0x45382d['hookLocation'][_0x379fd2(0x194)],_0x13e50b['operationType']=_0x45382d['hookLocation'][_0x379fd2(0x17a)],_0x13e50b[_0x379fd2(0x198)]=_0x45382d[_0x379fd2(0x1a5)]['functionNode']),_0x19b894[_0x379fd2(0x188)][_0x45382d['lockKey']]=_0x13e50b,_0x2003d4[_0x379fd2(0x189)]({'lockKey':_0x45382d[_0x379fd2(0x183)],'remoteId':_0x588f9a['id']});}catch(_0x3d2aa9){_0x40b624[_0x379fd2(0x189)]({'lockKey':_0x45382d[_0x379fd2(0x183)],'error':_0x3d2aa9 instanceof Error?_0x3d2aa9[_0x379fd2(0x176)]:String(_0x3d2aa9)});}}return _0x19b894[_0x379fd2(0x1b6)]=new Date()[_0x379fd2(0x1ab)](),await writeBffLockFile(_0x3156ff[_0x379fd2(0x1a0)],_0x2133e3),{'ok':_0x40b624['length']===0x0,'data':{'pulled':_0x2003d4,'skipped':_0x3691a2,'failed':_0x40b624},'message':'Pull\x20complete:\x20'+_0x2003d4['length']+_0x379fd2(0x186)+_0x3691a2[_0x379fd2(0x1ad)]+_0x379fd2(0x17d)+_0x40b624[_0x379fd2(0x1ad)]+_0x379fd2(0x1ac)};}};async function hasUnsyncedLocalChanges(_0x219727,_0x36fca9,_0x5b8f04){const _0x3c0aaa=a36_0x29c45c;if(!await fileExists(_0x219727))return![];const _0x4d7e08=await computeFileHash(_0x219727);if(!_0x36fca9)return _0x5b8f04?_0x4d7e08!==_0x5b8f04:!![];return _0x4d7e08!==_0x36fca9[_0x3c0aaa(0x196)];}function buildDatasetCodeToAliasMap(_0x46a077,_0x418186){const _0x1c5518=a36_0x29c45c,_0x373ee5=loadAliasMap(_0x46a077,undefined,resolveApiFilePath(_0x46a077,_0x418186));return new Map(_0x373ee5[_0x1c5518(0x1a1)](_0x23b60f=>[_0x23b60f['datasetCode'],_0x23b60f[_0x1c5518(0x18a)]]));}async function confirmForce(){const _0x4d85a0=a36_0x29c45c,_0x5f14e1=createInterface({'input':process[_0x4d85a0(0x19a)],'output':process[_0x4d85a0(0x1b1)]}),_0x442011=await new Promise(_0x1e4001=>{const _0x431602=_0x4d85a0;_0x5f14e1['question'](_0x431602(0x182),_0x1e4001);});return _0x5f14e1[_0x4d85a0(0x177)](),['y',_0x4d85a0(0x179)]['includes'](_0x442011[_0x4d85a0(0x173)]()[_0x4d85a0(0x19f)]());}
@@ -1 +1 @@
1
- const a37_0x50d48d=a37_0x3e57;(function(_0x285337,_0x26f0d0){const _0x5bbad5=a37_0x3e57,_0x5f0edf=_0x285337();while(!![]){try{const _0x4c438e=-parseInt(_0x5bbad5(0x210))/0x1*(parseInt(_0x5bbad5(0x21f))/0x2)+-parseInt(_0x5bbad5(0x1d8))/0x3+parseInt(_0x5bbad5(0x216))/0x4*(parseInt(_0x5bbad5(0x1e6))/0x5)+parseInt(_0x5bbad5(0x1d9))/0x6+parseInt(_0x5bbad5(0x1eb))/0x7*(-parseInt(_0x5bbad5(0x1e7))/0x8)+parseInt(_0x5bbad5(0x1e9))/0x9+parseInt(_0x5bbad5(0x1e4))/0xa*(parseInt(_0x5bbad5(0x1ef))/0xb);if(_0x4c438e===_0x26f0d0)break;else _0x5f0edf['push'](_0x5f0edf['shift']());}catch(_0x47faf1){_0x5f0edf['push'](_0x5f0edf['shift']());}}}(a37_0x4256,0xbd8b8));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';function a37_0x3e57(_0x2b9f85,_0x257a6c){_0x2b9f85=_0x2b9f85-0x1d8;const _0x425623=a37_0x4256();let _0x3e57b6=_0x425623[_0x2b9f85];return _0x3e57b6;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a37_0x4256(){const _0x2d0d90=['message','type','utf8','name','toISOString','lockFilePath','has','cleared','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','Incomplete\x20HOOK\x20path:\x20','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','bool','lastSync','785404sOcROX','\x22\x20not\x20found\x20after\x20ensureLockScope.','runtime\x20cache\x20not\x20needed','Local\x20function\x20not\x20found:\x20','str','every','156JuPeQV','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','filePath','functions','Lock\x20scope\x20for\x20app\x20\x22','\x20failed,\x20','scriptsRoot','push','Force\x20push\x20ignoring\x20hash\x20protection','2RyLDLR','operationType','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','functionNode','apiDir','HOOK','code','1391142bkJhcB','6584514QuFkfJ',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','Runtime\x20script\x20cache\x20cleared.','values','boolean','script','Cannot\x20resolve\x20dataset\x20for\x20\x22','get','appCode','bff','apps','10vQIkVk','parse','102445TrfaQz','28776RkmInw','hash','1008072LzIEQw','status','2709ZPnxPX','version','map','length','15499385zoSAsx','unchanged','Would\x20inspect\x20','would_push','lockKey','remoteId','datasetCode','\x20skipped,\x20','ENDPOINT','Push\x20local\x20BFF\x20scripts\x20to\x20remote','aliasToDatasetCode','force','validation','Push\x20only\x20this\x20script\x20type','some','description','runtime\x20cache\x20clear\x20failed','alias','string','datasetId'];a37_0x4256=function(){return _0x2d0d90;};return a37_0x4256();}export const bffPush={'service':a37_0x50d48d(0x1e2),'command':a37_0x50d48d(0x21d),'description':a37_0x50d48d(0x1f8),'risk':'high-risk-write','flags':[{'name':a37_0x50d48d(0x204),'type':'string','description':a37_0x50d48d(0x1fc),'enum':['COMMON',a37_0x50d48d(0x1f7),a37_0x50d48d(0x224)]},{'name':a37_0x50d48d(0x206),'type':a37_0x50d48d(0x201),'description':a37_0x50d48d(0x221)},{'name':a37_0x50d48d(0x1fa),'type':a37_0x50d48d(0x1dd),'description':a37_0x50d48d(0x21e)}],async 'dryRun'(_0x403950){const _0x1c19a8=a37_0x50d48d,_0x1a24ad=loadBffProjectConfig(_0x403950['appCode']),_0xbd554a=await readBffLockFile(_0x1a24ad[_0x1c19a8(0x208)]),{appLock:_0xd3fed0}=ensureLockScope(_0xbd554a??createEmptyBffLock(),_0x403950[_0x1c19a8(0x1e1)],_0x1a24ad[_0x1c19a8(0x21c)],_0x1c19a8(0x21d)),_0x1a3ce5=await getTargetFunctions(_0x1a24ad,_0x403950),_0x4337a6=_0x403950[_0x1c19a8(0x20e)]('force'),_0xc089a7=[];for(const _0x35f4d1 of _0x1a3ce5){const _0x4b3d8d=await computeFileHash(_0x35f4d1[_0x1c19a8(0x218)]),_0x4360bd=_0xd3fed0[_0x1c19a8(0x219)][_0x35f4d1[_0x1c19a8(0x1f3)]],_0x50e089=!!_0x4360bd&&_0x4360bd[_0x1c19a8(0x1e8)]===_0x4b3d8d;_0xc089a7[_0x1c19a8(0x21d)]({'lockKey':_0x35f4d1[_0x1c19a8(0x1f3)],'filePath':_0x35f4d1[_0x1c19a8(0x218)],'remoteId':_0x4360bd?.['remoteId']??null,'mode':_0x4360bd?.[_0x1c19a8(0x1f4)]?'update':'create','status':!_0x4337a6&&_0x50e089?'unchanged':_0x1c19a8(0x1f2)});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x403950[_0x1c19a8(0x1e1)],'force':_0x4337a6,'files':_0xc089a7,'cacheClearAtRuntime':_0xc089a7[_0x1c19a8(0x1fd)](_0x3969b8=>_0x3969b8['status']===_0x1c19a8(0x1f2)),'cacheClearAtRuntimeTimes':_0xc089a7[_0x1c19a8(0x1fd)](_0x1bced0=>_0x1bced0[_0x1c19a8(0x1ea)]===_0x1c19a8(0x1f2))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x1c19a8(0x1f1)+_0xc089a7[_0x1c19a8(0x1ee)]+_0x1c19a8(0x217)};},async 'execute'(_0x26237){const _0x21525d=a37_0x50d48d,_0x497327=loadBffProjectConfig(_0x26237[_0x21525d(0x1e1)]),_0x5d8815=await readBffLockFile(_0x497327['lockFilePath']),{lockData:_0x2b742d,appLock:_0x184854}=ensureLockScope(_0x5d8815??createEmptyBffLock(),_0x26237[_0x21525d(0x1e1)],_0x497327[_0x21525d(0x21c)],'push'),_0x341c4f=await getTargetFunctions(_0x497327,_0x26237);if(_0x341c4f[_0x21525d(0x1ee)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x106c43=_0x26237[_0x21525d(0x20e)]('force'),_0x1ff6c8=JSON[_0x21525d(0x1e5)](JSON['stringify'](_0x2b742d)),_0x6b4084=_0x1ff6c8[_0x21525d(0x1e3)][_0x26237[_0x21525d(0x1e1)]];if(!_0x6b4084)throw new Error(_0x21525d(0x21a)+_0x26237[_0x21525d(0x1e1)]+_0x21525d(0x211));const _0x29ab83=await buildHookMaps(_0x26237[_0x21525d(0x1e1)],_0x26237[_0x21525d(0x223)],_0x341c4f,_0x6b4084),_0x2fcade=[],_0x2f3ec9=[],_0x2ff446=[];for(const _0x3e433d of _0x341c4f){const _0x489207=await computeFileHash(_0x3e433d['filePath']),_0x180a56=_0x6b4084[_0x21525d(0x219)][_0x3e433d[_0x21525d(0x1f3)]];if(!_0x106c43&&_0x180a56&&_0x180a56[_0x21525d(0x1e8)]===_0x489207){_0x2f3ec9[_0x21525d(0x21d)]({'lockKey':_0x3e433d[_0x21525d(0x1f3)],'reason':_0x21525d(0x1f0)});continue;}try{await uploadSingleFunction(_0x26237[_0x21525d(0x1e1)],_0x3e433d,_0x6b4084,_0x29ab83);const _0x156c05=_0x6b4084[_0x21525d(0x219)][_0x3e433d[_0x21525d(0x1f3)]];_0x2fcade[_0x21525d(0x21d)]({'lockKey':_0x3e433d[_0x21525d(0x1f3)],'remoteId':_0x156c05?.['remoteId']??0x0});}catch(_0x297e9e){_0x2ff446[_0x21525d(0x21d)]({'lockKey':_0x3e433d[_0x21525d(0x1f3)],'error':_0x297e9e instanceof Error?_0x297e9e['message']:String(_0x297e9e)});}}_0x6b4084[_0x21525d(0x20f)]=new Date()[_0x21525d(0x207)](),await writeBffLockFile(_0x497327[_0x21525d(0x208)],_0x1ff6c8),await waitForUploadedLockEntries(_0x497327[_0x21525d(0x208)],_0x26237[_0x21525d(0x1e1)],_0x2fcade[_0x21525d(0x1ed)](_0x4de412=>_0x4de412[_0x21525d(0x1f3)]));let _0x544fea={'attempted':![],'cleared':![]};if(_0x2fcade[_0x21525d(0x1ee)]>0x0)try{let _0xf9109c='';for(let _0x16704f=0x0;_0x16704f<CACHE_CLEAR_ATTEMPTS;_0x16704f+=0x1){_0xf9109c=await clearBffScriptCache(),_0x16704f<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x544fea={'attempted':!![],'cleared':!![],'message':_0xf9109c||_0x21525d(0x1db)};}catch(_0x5a732d){_0x544fea={'attempted':!![],'cleared':![],'error':_0x5a732d instanceof Error?_0x5a732d[_0x21525d(0x203)]:String(_0x5a732d)};}const _0x195c81=_0x2ff446[_0x21525d(0x1ee)]===0x0&&(_0x544fea['attempted']?_0x544fea['cleared']:!![]),_0x274ac0=_0x544fea['attempted']?_0x544fea[_0x21525d(0x20a)]?'runtime\x20cache\x20cleared':_0x21525d(0x1ff):_0x21525d(0x212);return{'ok':_0x195c81,'data':{'uploaded':_0x2fcade,'skipped':_0x2f3ec9,'failed':_0x2ff446,'cacheClear':_0x544fea},'message':'Push\x20complete:\x20'+_0x2fcade[_0x21525d(0x1ee)]+'\x20uploaded,\x20'+_0x2f3ec9[_0x21525d(0x1ee)]+_0x21525d(0x1f6)+_0x2ff446[_0x21525d(0x1ee)]+_0x21525d(0x21b)+_0x274ac0};}};async function getTargetFunctions(_0x2f2cf9,_0x585938){const _0x487235=a37_0x50d48d,_0x5be066=_0x585938[_0x487235(0x214)](_0x487235(0x204)),_0x6c5a16=_0x585938[_0x487235(0x214)](_0x487235(0x206)),_0x5beccc=normalizeBffType(_0x5be066)??undefined;if(_0x6c5a16&&!_0x5beccc)throw CliErrors[_0x487235(0x1fb)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x2fad9b=await scanLocalBffFunctions(_0x2f2cf9,_0x5beccc);if(_0x6c5a16){const _0xa71e7e=_0x2fad9b['filter'](_0xf88853=>_0xf88853[_0x487235(0x206)]===_0x6c5a16);if(_0xa71e7e[_0x487235(0x1ee)]===0x0)throw CliErrors[_0x487235(0x1fb)](_0x487235(0x213)+_0x5beccc+'/'+_0x6c5a16);return _0xa71e7e;}return _0x2fad9b;}async function buildHookMaps(_0x503031,_0x5635e0,_0x17e88a,_0x578d93){const _0x46d05=a37_0x50d48d,_0x5a343c=_0x17e88a[_0x46d05(0x1fd)](_0x439782=>_0x439782[_0x46d05(0x204)]==='HOOK');if(!_0x5a343c)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x337672=loadAliasMap(_0x5635e0,undefined,resolveApiFilePath(_0x5635e0,_0x503031)),_0x3320c6=new Map(_0x337672[_0x46d05(0x1ed)](_0x132eef=>[_0x132eef[_0x46d05(0x200)],_0x132eef[_0x46d05(0x1f5)]]));for(const _0x5083eb of Object[_0x46d05(0x1dc)](_0x578d93[_0x46d05(0x219)])){_0x5083eb[_0x46d05(0x200)]&&_0x5083eb[_0x46d05(0x1f5)]&&!_0x3320c6[_0x46d05(0x209)](_0x5083eb['alias'])&&_0x3320c6['set'](_0x5083eb[_0x46d05(0x200)],_0x5083eb[_0x46d05(0x1f5)]);}const _0x1f1501=await listDatasets(_0x503031),_0xe257b9=new Map(_0x1f1501[_0x46d05(0x1ed)](_0x330157=>[_0x330157[_0x46d05(0x225)],_0x330157]));return{'aliasToDatasetCode':_0x3320c6,'datasetCodeToDataset':_0xe257b9};}async function uploadSingleFunction(_0x5f1e9f,_0xfc6ec1,_0xda71c0,_0x5d51ed){const _0x6496c1=a37_0x50d48d,_0x18c661=await readFile(_0xfc6ec1[_0x6496c1(0x218)],_0x6496c1(0x205)),_0x219121=await computeFileHash(_0xfc6ec1['filePath']),_0x3d5274=_0xda71c0[_0x6496c1(0x219)][_0xfc6ec1[_0x6496c1(0x1f3)]];if(_0x3d5274?.[_0x6496c1(0x1f4)]&&_0x3d5274[_0x6496c1(0x1ec)]==null)throw CliErrors[_0x6496c1(0x1fb)](_0xfc6ec1[_0x6496c1(0x1f3)]+_0x6496c1(0x1da));let _0x20285d=extractScriptDescription(_0x18c661);if(!_0x20285d&&_0x3d5274?.[_0x6496c1(0x1f4)]){const _0x86399c=await getBffScriptInfo(_0x3d5274[_0x6496c1(0x1f4)]);_0x20285d=_0x86399c[_0x6496c1(0x1fe)]||undefined;}const _0x4eba27={'appCode':_0x5f1e9f,'functionName':_0xfc6ec1[_0x6496c1(0x206)],'scriptType':_0xfc6ec1['type'],'scriptContent':_0x18c661};if(_0x3d5274?.[_0x6496c1(0x1f4)])_0x4eba27['id']=_0x3d5274[_0x6496c1(0x1f4)];if(_0x3d5274?.[_0x6496c1(0x1ec)]!=null)_0x4eba27['version']=_0x3d5274['version'];if(_0x20285d)_0x4eba27[_0x6496c1(0x1fe)]=_0x20285d;if(_0xfc6ec1['type']===_0x6496c1(0x224)){const _0x2110ae=_0xfc6ec1[_0x6496c1(0x200)];if(!_0x2110ae||!_0xfc6ec1[_0x6496c1(0x220)]||!_0xfc6ec1['functionNode'])throw CliErrors[_0x6496c1(0x1fb)](_0x6496c1(0x20c)+_0xfc6ec1[_0x6496c1(0x1f3)]);const _0x2e7e76=_0x5d51ed['aliasToDatasetCode'][_0x6496c1(0x1e0)](_0x2110ae)??_0x3d5274?.[_0x6496c1(0x1f5)]??_0x2110ae,_0x187b13=_0x5d51ed['datasetCodeToDataset']['get'](_0x2e7e76);if(!_0x187b13)throw CliErrors[_0x6496c1(0x1fb)](_0x6496c1(0x1df)+_0x2110ae+'\x22.\x20'+('Run\x20`'+CLI_BIN_NAME+_0x6496c1(0x20b)));_0x4eba27[_0x6496c1(0x202)]=_0x187b13['id'],_0x4eba27[_0x6496c1(0x220)]=_0xfc6ec1['operationType'],_0x4eba27[_0x6496c1(0x222)]=_0xfc6ec1['functionNode'];}const _0x5432f9=await saveBffScript(_0x4eba27),_0x14c137=_0x5432f9['id'],_0x33087a=_0x5432f9[_0x6496c1(0x1de)]??await getBffScriptInfo(_0x14c137),_0xf073aa={'hash':_0x219121,'remoteId':_0x14c137,'version':_0x33087a['version']};if(_0xfc6ec1[_0x6496c1(0x204)]===_0x6496c1(0x224)){const _0x3bbde0=_0xfc6ec1['alias'],_0x381d0b=_0x5d51ed[_0x6496c1(0x1f9)][_0x6496c1(0x1e0)](_0x3bbde0)??_0x3d5274?.[_0x6496c1(0x1f5)]??_0x3bbde0;_0x5d51ed[_0x6496c1(0x1f9)]['has'](_0x3bbde0)?_0xf073aa[_0x6496c1(0x200)]=_0x3bbde0:_0xf073aa[_0x6496c1(0x200)]=_0x3d5274?.[_0x6496c1(0x200)],_0xf073aa['datasetCode']=_0x381d0b,_0xf073aa[_0x6496c1(0x220)]=_0xfc6ec1['operationType'],_0xf073aa[_0x6496c1(0x222)]=_0xfc6ec1[_0x6496c1(0x222)];}_0xda71c0['functions'][_0xfc6ec1[_0x6496c1(0x1f3)]]=_0xf073aa;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x405d27,_0x981c2a,_0x3f525){const _0x1fedc9=a37_0x50d48d;if(_0x3f525['length']===0x0)return;for(let _0x3f1588=0x0;_0x3f1588<LOCK_SETTLE_RETRY_COUNT;_0x3f1588+=0x1){const _0x4e8a3a=await readBffLockFile(_0x405d27),_0x5dc5d5=_0x4e8a3a?.[_0x1fedc9(0x1e3)]?.[_0x981c2a]?.[_0x1fedc9(0x219)]??{},_0x3d0678=_0x3f525[_0x1fedc9(0x215)](_0x29d96e=>!!_0x5dc5d5[_0x29d96e]?.[_0x1fedc9(0x1f4)]);if(_0x3d0678)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x1fedc9(0x20d)+_0x3f525['join'](',\x20')+'.');}
1
+ const a37_0x4bcecc=a37_0x3b90;(function(_0x3a91a2,_0x39f473){const _0xa03b31=a37_0x3b90,_0x31d6f7=_0x3a91a2();while(!![]){try{const _0xd65852=parseInt(_0xa03b31(0x21c))/0x1+-parseInt(_0xa03b31(0x218))/0x2*(parseInt(_0xa03b31(0x1e2))/0x3)+parseInt(_0xa03b31(0x22d))/0x4*(-parseInt(_0xa03b31(0x1f1))/0x5)+-parseInt(_0xa03b31(0x215))/0x6+parseInt(_0xa03b31(0x21d))/0x7+-parseInt(_0xa03b31(0x21e))/0x8+parseInt(_0xa03b31(0x1fe))/0x9*(parseInt(_0xa03b31(0x1e4))/0xa);if(_0xd65852===_0x39f473)break;else _0x31d6f7['push'](_0x31d6f7['shift']());}catch(_0x1717fd){_0x31d6f7['push'](_0x31d6f7['shift']());}}}(a37_0x1f8f,0x27db8));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a37_0x4bcecc(0x20c),'command':a37_0x4bcecc(0x1fa),'description':a37_0x4bcecc(0x1f2),'risk':a37_0x4bcecc(0x20a),'flags':[{'name':a37_0x4bcecc(0x1ef),'type':a37_0x4bcecc(0x20e),'description':a37_0x4bcecc(0x1f8),'enum':[a37_0x4bcecc(0x1fb),a37_0x4bcecc(0x1f5),a37_0x4bcecc(0x22c)]},{'name':a37_0x4bcecc(0x219),'type':a37_0x4bcecc(0x20e),'description':a37_0x4bcecc(0x1ed)},{'name':'force','type':a37_0x4bcecc(0x1f4),'description':a37_0x4bcecc(0x1f6)}],async 'dryRun'(_0x5a8cb){const _0x550953=a37_0x4bcecc,_0xcfa967=loadBffProjectConfig(_0x5a8cb['appCode']),_0x520479=await readBffLockFile(_0xcfa967[_0x550953(0x227)]),{appLock:_0x43ddb2}=ensureLockScope(_0x520479??createEmptyBffLock(),_0x5a8cb[_0x550953(0x208)],_0xcfa967['scriptsRoot'],_0x550953(0x1fa)),_0x3c9834=await getTargetFunctions(_0xcfa967,_0x5a8cb),_0x507eef=_0x5a8cb[_0x550953(0x1fd)](_0x550953(0x21f)),_0x2f2935=[];for(const _0x57931e of _0x3c9834){const _0x29733a=await computeFileHash(_0x57931e[_0x550953(0x1f0)]),_0x1fc136=_0x43ddb2[_0x550953(0x1e3)][_0x57931e[_0x550953(0x220)]],_0x42f49c=!!_0x1fc136&&_0x1fc136[_0x550953(0x216)]===_0x29733a;_0x2f2935[_0x550953(0x1fa)]({'lockKey':_0x57931e['lockKey'],'filePath':_0x57931e[_0x550953(0x1f0)],'remoteId':_0x1fc136?.[_0x550953(0x1f3)]??null,'mode':_0x1fc136?.[_0x550953(0x1f3)]?'update':_0x550953(0x1de),'status':!_0x507eef&&_0x42f49c?_0x550953(0x202):_0x550953(0x22b)});}return{'method':_0x550953(0x226),'url':_0x550953(0x1fc),'body':{'appCode':_0x5a8cb[_0x550953(0x208)],'force':_0x507eef,'files':_0x2f2935,'cacheClearAtRuntime':_0x2f2935[_0x550953(0x211)](_0x1ecf31=>_0x1ecf31[_0x550953(0x1e9)]===_0x550953(0x22b)),'cacheClearAtRuntimeTimes':_0x2f2935[_0x550953(0x211)](_0x103c5c=>_0x103c5c[_0x550953(0x1e9)]===_0x550953(0x22b))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x550953(0x1eb)+_0x2f2935[_0x550953(0x1ff)]+_0x550953(0x1f9)};},async 'execute'(_0x1a89c2){const _0x5d9e45=a37_0x4bcecc,_0x5d899c=loadBffProjectConfig(_0x1a89c2['appCode']),_0x2898b9=await readBffLockFile(_0x5d899c[_0x5d9e45(0x227)]),{lockData:_0x70fa98,appLock:_0x1a6360}=ensureLockScope(_0x2898b9??createEmptyBffLock(),_0x1a89c2[_0x5d9e45(0x208)],_0x5d899c[_0x5d9e45(0x21a)],'push'),_0x3a09f8=await getTargetFunctions(_0x5d899c,_0x1a89c2);if(_0x3a09f8['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x41b7ce=_0x1a89c2['bool'](_0x5d9e45(0x21f)),_0x374869=JSON[_0x5d9e45(0x201)](JSON['stringify'](_0x70fa98)),_0x786580=_0x374869[_0x5d9e45(0x1dc)][_0x1a89c2[_0x5d9e45(0x208)]];if(!_0x786580)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x1a89c2['appCode']+_0x5d9e45(0x1e1));const _0x3c7e2b=await buildHookMaps(_0x1a89c2[_0x5d9e45(0x208)],_0x1a89c2['apiDir'],_0x3a09f8,_0x786580),_0x426e53=[],_0x3fb7ad=[],_0x581e75=[];for(const _0xdf3f71 of _0x3a09f8){const _0xc984ad=await computeFileHash(_0xdf3f71[_0x5d9e45(0x1f0)]),_0x22e1ad=_0x786580[_0x5d9e45(0x1e3)][_0xdf3f71[_0x5d9e45(0x220)]];if(!_0x41b7ce&&_0x22e1ad&&_0x22e1ad[_0x5d9e45(0x216)]===_0xc984ad){_0x3fb7ad[_0x5d9e45(0x1fa)]({'lockKey':_0xdf3f71[_0x5d9e45(0x220)],'reason':_0x5d9e45(0x202)});continue;}try{await uploadSingleFunction(_0x1a89c2[_0x5d9e45(0x208)],_0xdf3f71,_0x786580,_0x3c7e2b);const _0x129ba9=_0x786580[_0x5d9e45(0x1e3)][_0xdf3f71[_0x5d9e45(0x220)]];_0x426e53[_0x5d9e45(0x1fa)]({'lockKey':_0xdf3f71[_0x5d9e45(0x220)],'remoteId':_0x129ba9?.[_0x5d9e45(0x1f3)]??0x0});}catch(_0x116f88){_0x581e75[_0x5d9e45(0x1fa)]({'lockKey':_0xdf3f71[_0x5d9e45(0x220)],'error':_0x116f88 instanceof Error?_0x116f88[_0x5d9e45(0x1f7)]:String(_0x116f88)});}}_0x786580[_0x5d9e45(0x1e5)]=new Date()[_0x5d9e45(0x213)](),await writeBffLockFile(_0x5d899c[_0x5d9e45(0x227)],_0x374869),await waitForUploadedLockEntries(_0x5d899c[_0x5d9e45(0x227)],_0x1a89c2[_0x5d9e45(0x208)],_0x426e53[_0x5d9e45(0x206)](_0x29c6f0=>_0x29c6f0[_0x5d9e45(0x220)]));let _0x33ea49={'attempted':![],'cleared':![]};if(_0x426e53[_0x5d9e45(0x1ff)]>0x0)try{let _0x4b9be2='';for(let _0x1c2db7=0x0;_0x1c2db7<CACHE_CLEAR_ATTEMPTS;_0x1c2db7+=0x1){_0x4b9be2=await clearBffScriptCache(),_0x1c2db7<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x33ea49={'attempted':!![],'cleared':!![],'message':_0x4b9be2||_0x5d9e45(0x224)};}catch(_0x3b31e6){_0x33ea49={'attempted':!![],'cleared':![],'error':_0x3b31e6 instanceof Error?_0x3b31e6[_0x5d9e45(0x1f7)]:String(_0x3b31e6)};}const _0x5473d7=_0x581e75[_0x5d9e45(0x1ff)]===0x0&&(_0x33ea49[_0x5d9e45(0x20d)]?_0x33ea49[_0x5d9e45(0x222)]:!![]),_0x430854=_0x33ea49['attempted']?_0x33ea49[_0x5d9e45(0x222)]?_0x5d9e45(0x1e6):_0x5d9e45(0x1e0):'runtime\x20cache\x20not\x20needed';return{'ok':_0x5473d7,'data':{'uploaded':_0x426e53,'skipped':_0x3fb7ad,'failed':_0x581e75,'cacheClear':_0x33ea49},'message':_0x5d9e45(0x221)+_0x426e53[_0x5d9e45(0x1ff)]+_0x5d9e45(0x1dd)+_0x3fb7ad[_0x5d9e45(0x1ff)]+_0x5d9e45(0x20f)+_0x581e75[_0x5d9e45(0x1ff)]+_0x5d9e45(0x210)+_0x430854};}};async function getTargetFunctions(_0x49ab87,_0x3febe3){const _0x484f1c=a37_0x4bcecc,_0x1edb81=_0x3febe3[_0x484f1c(0x204)]('type'),_0x1a9e71=_0x3febe3['str'](_0x484f1c(0x219)),_0x5f1121=normalizeBffType(_0x1edb81)??undefined;if(_0x1a9e71&&!_0x5f1121)throw CliErrors[_0x484f1c(0x205)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x32221b=await scanLocalBffFunctions(_0x49ab87,_0x5f1121);if(_0x1a9e71){const _0x489b96=_0x32221b[_0x484f1c(0x212)](_0x23ee3a=>_0x23ee3a[_0x484f1c(0x219)]===_0x1a9e71);if(_0x489b96['length']===0x0)throw CliErrors[_0x484f1c(0x205)](_0x484f1c(0x20b)+_0x5f1121+'/'+_0x1a9e71);return _0x489b96;}return _0x32221b;}function a37_0x3b90(_0x79f4a4,_0x9c4c00){_0x79f4a4=_0x79f4a4-0x1dc;const _0x1f8f2d=a37_0x1f8f();let _0x3b90ac=_0x1f8f2d[_0x79f4a4];return _0x3b90ac;}async function buildHookMaps(_0x4ce63c,_0x1f8c92,_0xbc53fc,_0x5032cb){const _0xee476d=a37_0x4bcecc,_0x4f88e8=_0xbc53fc[_0xee476d(0x211)](_0x525dfd=>_0x525dfd['type']===_0xee476d(0x22c));if(!_0x4f88e8)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0xc7871d=loadAliasMap(_0x1f8c92,undefined,resolveApiFilePath(_0x1f8c92,_0x4ce63c)),_0x35b6ae=new Map(_0xc7871d[_0xee476d(0x206)](_0x21fd8d=>[_0x21fd8d['alias'],_0x21fd8d[_0xee476d(0x21b)]]));for(const _0x358b3f of Object[_0xee476d(0x22e)](_0x5032cb[_0xee476d(0x1e3)])){_0x358b3f['alias']&&_0x358b3f[_0xee476d(0x21b)]&&!_0x35b6ae['has'](_0x358b3f['alias'])&&_0x35b6ae[_0xee476d(0x1ec)](_0x358b3f[_0xee476d(0x209)],_0x358b3f[_0xee476d(0x21b)]);}const _0x5d1f19=await listDatasets(_0x4ce63c),_0x592c3a=new Map(_0x5d1f19[_0xee476d(0x206)](_0x5cb400=>[_0x5cb400[_0xee476d(0x200)],_0x5cb400]));return{'aliasToDatasetCode':_0x35b6ae,'datasetCodeToDataset':_0x592c3a};}async function uploadSingleFunction(_0x5c1925,_0x543a0b,_0x48c60d,_0x5a9210){const _0x337611=a37_0x4bcecc,_0x4426f0=await readFile(_0x543a0b[_0x337611(0x1f0)],_0x337611(0x228)),_0x47d952=await computeFileHash(_0x543a0b[_0x337611(0x1f0)]),_0x36ae76=_0x48c60d[_0x337611(0x1e3)][_0x543a0b[_0x337611(0x220)]];if(_0x36ae76?.[_0x337611(0x1f3)]&&_0x36ae76[_0x337611(0x229)]==null)throw CliErrors[_0x337611(0x205)](_0x543a0b[_0x337611(0x220)]+_0x337611(0x225));let _0x48eb79=extractScriptDescription(_0x4426f0);if(!_0x48eb79&&_0x36ae76?.[_0x337611(0x1f3)]){const _0x131e77=await getBffScriptInfo(_0x36ae76[_0x337611(0x1f3)]);_0x48eb79=_0x131e77['description']||undefined;}const _0x3c54ee={'appCode':_0x5c1925,'functionName':_0x543a0b['name'],'scriptType':_0x543a0b['type'],'scriptContent':_0x4426f0};if(_0x36ae76?.[_0x337611(0x1f3)])_0x3c54ee['id']=_0x36ae76[_0x337611(0x1f3)];if(_0x36ae76?.[_0x337611(0x229)]!=null)_0x3c54ee[_0x337611(0x229)]=_0x36ae76[_0x337611(0x229)];if(_0x48eb79)_0x3c54ee['description']=_0x48eb79;if(_0x543a0b[_0x337611(0x1ef)]===_0x337611(0x22c)){const _0x546b65=_0x543a0b[_0x337611(0x209)];if(!_0x546b65||!_0x543a0b[_0x337611(0x22a)]||!_0x543a0b[_0x337611(0x1df)])throw CliErrors[_0x337611(0x205)]('Incomplete\x20HOOK\x20path:\x20'+_0x543a0b['lockKey']);const _0x5de9f3=_0x5a9210['aliasToDatasetCode'][_0x337611(0x1e7)](_0x546b65)??_0x36ae76?.[_0x337611(0x21b)]??_0x546b65,_0x1d5e72=_0x5a9210[_0x337611(0x1ee)][_0x337611(0x1e7)](_0x5de9f3);if(!_0x1d5e72)throw CliErrors['validation'](_0x337611(0x223)+_0x546b65+_0x337611(0x217)+('Run\x20`'+CLI_BIN_NAME+_0x337611(0x207)));_0x3c54ee['datasetId']=_0x1d5e72['id'],_0x3c54ee[_0x337611(0x22a)]=_0x543a0b['operationType'],_0x3c54ee[_0x337611(0x1df)]=_0x543a0b['functionNode'];}const _0x40ae11=await saveBffScript(_0x3c54ee),_0xc6cba3=_0x40ae11['id'],_0x1d09e4=_0x40ae11[_0x337611(0x1e8)]??await getBffScriptInfo(_0xc6cba3),_0x356935={'hash':_0x47d952,'remoteId':_0xc6cba3,'version':_0x1d09e4['version']};if(_0x543a0b[_0x337611(0x1ef)]==='HOOK'){const _0x94d983=_0x543a0b['alias'],_0x13eb52=_0x5a9210[_0x337611(0x214)][_0x337611(0x1e7)](_0x94d983)??_0x36ae76?.[_0x337611(0x21b)]??_0x94d983;_0x5a9210[_0x337611(0x214)][_0x337611(0x1ea)](_0x94d983)?_0x356935[_0x337611(0x209)]=_0x94d983:_0x356935[_0x337611(0x209)]=_0x36ae76?.[_0x337611(0x209)],_0x356935['datasetCode']=_0x13eb52,_0x356935['operationType']=_0x543a0b['operationType'],_0x356935[_0x337611(0x1df)]=_0x543a0b[_0x337611(0x1df)];}_0x48c60d['functions'][_0x543a0b['lockKey']]=_0x356935;}function a37_0x1f8f(){const _0x3708b7=['lockFilePath','utf8','version','operationType','would_push','HOOK','8ntETdY','values','apps','\x20uploaded,\x20','create','functionNode','runtime\x20cache\x20clear\x20failed','\x22\x20not\x20found\x20after\x20ensureLockScope.','30TExFUE','functions','7277820nztGuB','lastSync','runtime\x20cache\x20cleared','get','script','status','has','Would\x20inspect\x20','set','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','datasetCodeToDataset','type','filePath','602940QkzOTi','Push\x20local\x20BFF\x20scripts\x20to\x20remote','remoteId','boolean','ENDPOINT','Force\x20push\x20ignoring\x20hash\x20protection','message','Push\x20only\x20this\x20script\x20type','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','push','COMMON','/api/management/library/scripts/save','bool','9OrqroV','length','code','parse','unchanged','every','str','validation','map','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','appCode','alias','high-risk-write','Local\x20function\x20not\x20found:\x20','bff','attempted','string','\x20skipped,\x20','\x20failed,\x20','some','filter','toISOString','aliasToDatasetCode','1921416KbMXoJ','hash','\x22.\x20','2684LtPhGo','name','scriptsRoot','datasetCode','119714QZEaru','133077fXGwIJ','1027352xePuhw','force','lockKey','Push\x20complete:\x20','cleared','Cannot\x20resolve\x20dataset\x20for\x20\x22','Runtime\x20script\x20cache\x20cleared.',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','POST'];a37_0x1f8f=function(){return _0x3708b7;};return a37_0x1f8f();}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x2f1827,_0x2339a0,_0x54157c){const _0x303d80=a37_0x4bcecc;if(_0x54157c[_0x303d80(0x1ff)]===0x0)return;for(let _0x4b4d94=0x0;_0x4b4d94<LOCK_SETTLE_RETRY_COUNT;_0x4b4d94+=0x1){const _0x4e8fef=await readBffLockFile(_0x2f1827),_0x496ca0=_0x4e8fef?.[_0x303d80(0x1dc)]?.[_0x2339a0]?.['functions']??{},_0x1a530b=_0x54157c[_0x303d80(0x203)](_0x50f57e=>!!_0x496ca0[_0x50f57e]?.[_0x303d80(0x1f3)]);if(_0x1a530b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x54157c['join'](',\x20')+'.');}
@@ -1 +1 @@
1
- const a38_0x2fc8ae=a38_0x2d0e;function a38_0x1bc7(){const _0x1af2ca=['lockFilePath','\x20added,\x20','1866710KsNeYE','\x20modified,\x20','map','has','4554588cKzfMo','7YqRRAp','length','347892EVEPjE','remote','all','bff','hash','filePath','appCode','1068XMSgPy','3bWFmUf','push','read','913tplxJf','scriptsRoot','11TSkAsK','functions','9REjbWC','alias','3841996kLDOju','7700848yaJoCY','All\x20BFF\x20scripts\x20are\x20in\x20sync.','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','apiDir','boolean','1365625bmYhUp','lockKey'];a38_0x1bc7=function(){return _0x1af2ca;};return a38_0x1bc7();}(function(_0xa456b0,_0x26394a){const _0x746c03=a38_0x2d0e,_0x4cbc9a=_0xa456b0();while(!![]){try{const _0x5902cf=-parseInt(_0x746c03(0x81))/0x1*(parseInt(_0x746c03(0x7d))/0x2)+parseInt(_0x746c03(0x7e))/0x3*(parseInt(_0x746c03(0x87))/0x4)+-parseInt(_0x746c03(0x8d))/0x5+-parseInt(_0x746c03(0x73))/0x6*(parseInt(_0x746c03(0x74))/0x7)+parseInt(_0x746c03(0x88))/0x8*(parseInt(_0x746c03(0x85))/0x9)+parseInt(_0x746c03(0x6f))/0xa+parseInt(_0x746c03(0x83))/0xb*(-parseInt(_0x746c03(0x76))/0xc);if(_0x5902cf===_0x26394a)break;else _0x4cbc9a['push'](_0x4cbc9a['shift']());}catch(_0x42b0cc){_0x4cbc9a['push'](_0x4cbc9a['shift']());}}}(a38_0x1bc7,0x88f7c));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a38_0x2d0e(_0x40e559,_0x3fa726){_0x40e559=_0x40e559-0x6f;const _0x1bc71c=a38_0x1bc7();let _0x2d0ed3=_0x1bc71c[_0x40e559];return _0x2d0ed3;}export const bffStatus={'service':a38_0x2fc8ae(0x79),'command':'status','description':a38_0x2fc8ae(0x8a),'risk':a38_0x2fc8ae(0x80),'flags':[{'name':a38_0x2fc8ae(0x77),'type':a38_0x2fc8ae(0x8c),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x40c730){const _0x4bb0ea=a38_0x2fc8ae,_0x44c690=loadBffProjectConfig(_0x40c730[_0x4bb0ea(0x7c)]),_0x10af02=await readBffLockFile(_0x44c690[_0x4bb0ea(0x8f)]),{appLock:_0x1f674d}=ensureLockScope(_0x10af02??createEmptyBffLock(),_0x40c730[_0x4bb0ea(0x7c)],_0x44c690[_0x4bb0ea(0x82)],'status'),_0x36c9f5=await scanLocalBffFunctions(_0x44c690),_0x2c2d0f=[],_0x3e75fc=[],_0x3c21fd=[];for(const _0x146e62 of _0x36c9f5){const _0xc10ab=await computeFileHash(_0x146e62[_0x4bb0ea(0x7b)]),_0x54dd46=_0x1f674d[_0x4bb0ea(0x84)][_0x146e62['lockKey']];if(!_0x54dd46)_0x2c2d0f[_0x4bb0ea(0x7f)](_0x146e62[_0x4bb0ea(0x8e)]);else _0x54dd46[_0x4bb0ea(0x7a)]!==_0xc10ab?_0x3e75fc['push'](_0x146e62[_0x4bb0ea(0x8e)]):_0x3c21fd[_0x4bb0ea(0x7f)](_0x146e62[_0x4bb0ea(0x8e)]);}const _0x21fc39=[];if(_0x40c730['bool'](_0x4bb0ea(0x77))){const _0x34282a=loadAliasMap(_0x40c730[_0x4bb0ea(0x8b)],undefined,resolveApiFilePath(_0x40c730[_0x4bb0ea(0x8b)],_0x40c730['appCode'])),_0x44dbdd=new Map(_0x34282a[_0x4bb0ea(0x71)](_0x3378a7=>[_0x3378a7['datasetCode'],_0x3378a7[_0x4bb0ea(0x86)]])),[_0x27b9fe,_0x56e07a]=await Promise[_0x4bb0ea(0x78)]([listBffScripts(_0x40c730[_0x4bb0ea(0x7c)]),getBffScriptStatistics(_0x40c730['appCode'])]),_0x7b859a=createHookLocationMap(_0x56e07a),_0x243dbb=new Set(_0x36c9f5['map'](_0x3c2462=>_0x3c2462[_0x4bb0ea(0x8e)]));for(const _0x218fff of _0x27b9fe){const _0x1106d2=resolveRemoteScriptTarget(_0x44c690,_0x218fff,_0x7b859a,_0x1f674d[_0x4bb0ea(0x84)],_0x44dbdd);_0x1106d2&&!_0x243dbb[_0x4bb0ea(0x72)](_0x1106d2[_0x4bb0ea(0x8e)])&&_0x21fc39[_0x4bb0ea(0x7f)](_0x1106d2['lockKey']);}}const _0x3f3877=_0x2c2d0f['length']===0x0&&_0x3e75fc[_0x4bb0ea(0x75)]===0x0&&_0x21fc39['length']===0x0;return{'ok':!![],'data':{'added':_0x2c2d0f,'modified':_0x3e75fc,'unchanged':_0x3c21fd,'remoteOnly':_0x21fc39},'message':_0x3f3877?_0x4bb0ea(0x89):_0x2c2d0f[_0x4bb0ea(0x75)]+_0x4bb0ea(0x90)+_0x3e75fc[_0x4bb0ea(0x75)]+_0x4bb0ea(0x70)+_0x3c21fd[_0x4bb0ea(0x75)]+'\x20unchanged'+(_0x21fc39[_0x4bb0ea(0x75)]>0x0?',\x20'+_0x21fc39['length']+'\x20remote-only':'')};}};
1
+ function a38_0x1c18(_0x459460,_0x21f0d6){_0x459460=_0x459460-0x99;const _0x97b4e2=a38_0x97b4();let _0x1c18f2=_0x97b4e2[_0x459460];return _0x1c18f2;}const a38_0x541096=a38_0x1c18;(function(_0xa10baf,_0x371538){const _0x2fe3ad=a38_0x1c18,_0x5dfd73=_0xa10baf();while(!![]){try{const _0x3aa09e=parseInt(_0x2fe3ad(0xb4))/0x1*(parseInt(_0x2fe3ad(0x99))/0x2)+-parseInt(_0x2fe3ad(0xa2))/0x3*(parseInt(_0x2fe3ad(0xa7))/0x4)+-parseInt(_0x2fe3ad(0xbf))/0x5+parseInt(_0x2fe3ad(0xb0))/0x6*(parseInt(_0x2fe3ad(0xa1))/0x7)+-parseInt(_0x2fe3ad(0xba))/0x8*(-parseInt(_0x2fe3ad(0xab))/0x9)+parseInt(_0x2fe3ad(0xa3))/0xa*(-parseInt(_0x2fe3ad(0xa9))/0xb)+-parseInt(_0x2fe3ad(0xb2))/0xc*(-parseInt(_0x2fe3ad(0x9f))/0xd);if(_0x3aa09e===_0x371538)break;else _0x5dfd73['push'](_0x5dfd73['shift']());}catch(_0x30a636){_0x5dfd73['push'](_0x5dfd73['shift']());}}}(a38_0x97b4,0x37259));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_0x97b4(){const _0x55f334=['scriptsRoot','appCode','lockKey','\x20unchanged','1991670vpRDYo','12GwLqyU','hash','apiDir','datasetCode','remote','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','65yIQrYB','functions','5397LhZDQB','64326IuSMcc','2816730NjfZIT','push','has','boolean','8eaCVfQ','\x20added,\x20','11RxHdGf','lockFilePath','1359xGHUUX','length','read','bff','all','138ghbtSe','map','1542588QnOLQG','alias','7732MZhlLi','\x20modified,\x20','\x20remote-only','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','status','filePath','12816aBuals'];a38_0x97b4=function(){return _0x55f334;};return a38_0x97b4();}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_0x541096(0xae),'command':a38_0x541096(0xb8),'description':a38_0x541096(0xb7),'risk':a38_0x541096(0xad),'flags':[{'name':'remote','type':a38_0x541096(0xa6),'description':a38_0x541096(0x9e)}],async 'execute'(_0x26a140){const _0x1f14cf=a38_0x541096,_0x572bb9=loadBffProjectConfig(_0x26a140[_0x1f14cf(0xbc)]),_0x5aa608=await readBffLockFile(_0x572bb9[_0x1f14cf(0xaa)]),{appLock:_0x222d45}=ensureLockScope(_0x5aa608??createEmptyBffLock(),_0x26a140[_0x1f14cf(0xbc)],_0x572bb9[_0x1f14cf(0xbb)],_0x1f14cf(0xb8)),_0x1c74d9=await scanLocalBffFunctions(_0x572bb9),_0x52d0a5=[],_0x8ee945=[],_0x4dca95=[];for(const _0x149d0b of _0x1c74d9){const _0x3b5e63=await computeFileHash(_0x149d0b[_0x1f14cf(0xb9)]),_0x44b0b0=_0x222d45[_0x1f14cf(0xa0)][_0x149d0b['lockKey']];if(!_0x44b0b0)_0x52d0a5[_0x1f14cf(0xa4)](_0x149d0b[_0x1f14cf(0xbd)]);else _0x44b0b0[_0x1f14cf(0x9a)]!==_0x3b5e63?_0x8ee945[_0x1f14cf(0xa4)](_0x149d0b[_0x1f14cf(0xbd)]):_0x4dca95['push'](_0x149d0b[_0x1f14cf(0xbd)]);}const _0x29020f=[];if(_0x26a140['bool'](_0x1f14cf(0x9d))){const _0x1f0123=loadAliasMap(_0x26a140[_0x1f14cf(0x9b)],undefined,resolveApiFilePath(_0x26a140[_0x1f14cf(0x9b)],_0x26a140['appCode'])),_0x25c286=new Map(_0x1f0123[_0x1f14cf(0xb1)](_0x24e5c6=>[_0x24e5c6[_0x1f14cf(0x9c)],_0x24e5c6[_0x1f14cf(0xb3)]])),[_0x28ccbf,_0x457a09]=await Promise[_0x1f14cf(0xaf)]([listBffScripts(_0x26a140[_0x1f14cf(0xbc)]),getBffScriptStatistics(_0x26a140[_0x1f14cf(0xbc)])]),_0x12c3d5=createHookLocationMap(_0x457a09),_0x4ef881=new Set(_0x1c74d9['map'](_0x1366ec=>_0x1366ec[_0x1f14cf(0xbd)]));for(const _0x319ada of _0x28ccbf){const _0x595647=resolveRemoteScriptTarget(_0x572bb9,_0x319ada,_0x12c3d5,_0x222d45[_0x1f14cf(0xa0)],_0x25c286);_0x595647&&!_0x4ef881[_0x1f14cf(0xa5)](_0x595647[_0x1f14cf(0xbd)])&&_0x29020f[_0x1f14cf(0xa4)](_0x595647[_0x1f14cf(0xbd)]);}}const _0x28aa24=_0x52d0a5['length']===0x0&&_0x8ee945[_0x1f14cf(0xac)]===0x0&&_0x29020f['length']===0x0;return{'ok':!![],'data':{'added':_0x52d0a5,'modified':_0x8ee945,'unchanged':_0x4dca95,'remoteOnly':_0x29020f},'message':_0x28aa24?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x52d0a5['length']+_0x1f14cf(0xa8)+_0x8ee945['length']+_0x1f14cf(0xb5)+_0x4dca95[_0x1f14cf(0xac)]+_0x1f14cf(0xbe)+(_0x29020f[_0x1f14cf(0xac)]>0x0?',\x20'+_0x29020f[_0x1f14cf(0xac)]+_0x1f14cf(0xb6):'')};}};
@@ -1 +1 @@
1
- function a39_0x4aab(){const _0x3507e5=['skipped','cli-skill','25008DxwdmS','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','11576SJvpqv','cli-skill-install','1414Efkkoe','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','write','apiError','../../skills/npx-skills-add.js','cwd','pipe','unknown','18uvRmwW','log','inherit','nonInteractive','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','install','2854610KEZoQV','1619802riCDMe','CLI\x20Built-in\x20Skill\x20installed','18jzyRvT','info','913OrfsSM','249156XfqYPg','856lUNCEc','7550alWNwf',')...','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','38091VKuYgb'];a39_0x4aab=function(){return _0x3507e5;};return a39_0x4aab();}const a39_0x424ad7=a39_0x47e7;(function(_0x4e61a4,_0x4775ae){const _0x14041a=a39_0x47e7,_0x604c93=_0x4e61a4();while(!![]){try{const _0x3a1d94=-parseInt(_0x14041a(0x127))/0x1+-parseInt(_0x14041a(0x124))/0x2*(-parseInt(_0x14041a(0x12c))/0x3)+-parseInt(_0x14041a(0x128))/0x4*(parseInt(_0x14041a(0x129))/0x5)+-parseInt(_0x14041a(0x122))/0x6+parseInt(_0x14041a(0x133))/0x7*(parseInt(_0x14041a(0x131))/0x8)+-parseInt(_0x14041a(0x13b))/0x9*(-parseInt(_0x14041a(0x121))/0xa)+-parseInt(_0x14041a(0x126))/0xb*(-parseInt(_0x14041a(0x12f))/0xc);if(_0x3a1d94===_0x4775ae)break;else _0x604c93['push'](_0x604c93['shift']());}catch(_0x270271){_0x604c93['push'](_0x604c93['shift']());}}}(a39_0x4aab,0x4b3e6));function a39_0x47e7(_0x361938,_0x3678a1){_0x361938=_0x361938-0x120;const _0x4aab79=a39_0x4aab();let _0x47e7aa=_0x4aab79[_0x361938];return _0x47e7aa;}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x424ad7(0x12e),'command':a39_0x424ad7(0x120),'description':a39_0x424ad7(0x12b),'risk':a39_0x424ad7(0x135),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x57a44e){const _0x562611=a39_0x424ad7;logger['setLogPath'](process[_0x562611(0x138)]()),logger[_0x562611(0x125)](_0x562611(0x132),'Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.');const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x2bbf7c,RABETBASE_SKILL_SOURCE:_0x2d8776,runNpxSkillsAddGlobal:_0x1ac3c2}=await import(_0x562611(0x137)),_0x449172=_0x57a44e[_0x562611(0x13e)]?_0x562611(0x139):_0x562611(0x13d);console[_0x562611(0x13c)](_0x562611(0x134)+_0x2bbf7c+_0x562611(0x12a));const _0x434467=_0x1ac3c2(process[_0x562611(0x138)](),_0x2d8776,{'stdio':_0x449172});if(_0x434467[_0x562611(0x12d)])console[_0x562611(0x13c)](_0x562611(0x13f));else{if(_0x434467['ok'])console[_0x562611(0x13c)](_0x562611(0x123));else throw CliErrors[_0x562611(0x136)]('npx\x20skills\x20add\x20failed:\x20'+(_0x434467['error']||_0x562611(0x13a)),_0x562611(0x130)+_0x2bbf7c);}return{'ok':!![]};}}];
1
+ function a39_0x42ed(){const _0x323c64=['781277atRbst','../../skills/npx-skills-add.js','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','680355cfcqFE','cli-skill','log','pipe','inherit','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','cli-skill-install','npx\x20skills\x20add\x20failed:\x20','477699LYIAMw','error','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','cwd','4894312yrQPOL','632824tpjqTW','write','1967296rKIevg',')...','apiError','install','CLI\x20Built-in\x20Skill\x20installed','nonInteractive','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','18WQOQGB','672186PBrheo','setLogPath','skipped','unknown','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.'];a39_0x42ed=function(){return _0x323c64;};return a39_0x42ed();}function a39_0x3ad2(_0x4c6ba,_0x5cb543){_0x4c6ba=_0x4c6ba-0x196;const _0x42ed03=a39_0x42ed();let _0x3ad255=_0x42ed03[_0x4c6ba];return _0x3ad255;}const a39_0x4d35df=a39_0x3ad2;(function(_0x581827,_0x47e6ed){const _0x4b783d=a39_0x3ad2,_0x2a9d97=_0x581827();while(!![]){try{const _0x39084f=-parseInt(_0x4b783d(0x1a5))/0x1+parseInt(_0x4b783d(0x1aa))/0x2+-parseInt(_0x4b783d(0x1b4))/0x3+parseInt(_0x4b783d(0x1ac))/0x4+-parseInt(_0x4b783d(0x19d))/0x5+-parseInt(_0x4b783d(0x1b3))/0x6*(parseInt(_0x4b783d(0x19a))/0x7)+parseInt(_0x4b783d(0x1a9))/0x8;if(_0x39084f===_0x47e6ed)break;else _0x2a9d97['push'](_0x2a9d97['shift']());}catch(_0x299106){_0x2a9d97['push'](_0x2a9d97['shift']());}}}(a39_0x42ed,0x3c640));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x4d35df(0x19e),'command':a39_0x4d35df(0x1af),'description':a39_0x4d35df(0x1b2),'risk':a39_0x4d35df(0x1ab),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4b807e){const _0x26516c=a39_0x4d35df;logger[_0x26516c(0x196)](process['cwd']()),logger['info'](_0x26516c(0x1a3),_0x26516c(0x199));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x579ed4,RABETBASE_SKILL_SOURCE:_0x2bfca4,runNpxSkillsAddGlobal:_0xcdf8cc}=await import(_0x26516c(0x19b)),_0x202db=_0x4b807e[_0x26516c(0x1b1)]?_0x26516c(0x1a0):_0x26516c(0x1a1);console[_0x26516c(0x19f)](_0x26516c(0x19c)+_0x579ed4+_0x26516c(0x1ad));const _0x3ae82c=_0xcdf8cc(process[_0x26516c(0x1a8)](),_0x2bfca4,{'stdio':_0x202db});if(_0x3ae82c[_0x26516c(0x197)])console[_0x26516c(0x19f)](_0x26516c(0x1a2));else{if(_0x3ae82c['ok'])console['log'](_0x26516c(0x1b0));else throw CliErrors[_0x26516c(0x1ae)](_0x26516c(0x1a4)+(_0x3ae82c[_0x26516c(0x1a6)]||_0x26516c(0x198)),_0x26516c(0x1a7)+_0x579ed4);}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a40_0x952e27=a40_0x4753;(function(_0x2edf08,_0x14e180){const _0x230093=a40_0x4753,_0x4b0b56=_0x2edf08();while(!![]){try{const _0xc502cd=-parseInt(_0x230093(0x19c))/0x1*(-parseInt(_0x230093(0x198))/0x2)+-parseInt(_0x230093(0x186))/0x3*(-parseInt(_0x230093(0x1a6))/0x4)+parseInt(_0x230093(0x1c7))/0x5*(-parseInt(_0x230093(0x189))/0x6)+-parseInt(_0x230093(0x19f))/0x7*(parseInt(_0x230093(0x1bc))/0x8)+-parseInt(_0x230093(0x1d1))/0x9+parseInt(_0x230093(0x187))/0xa+parseInt(_0x230093(0x19b))/0xb;if(_0xc502cd===_0x14e180)break;else _0x4b0b56['push'](_0x4b0b56['shift']());}catch(_0x28d72a){_0x4b0b56['push'](_0x4b0b56['shift']());}}}(a40_0x2277,0xc38a0));import a40_0x5a6121 from'chalk';import a40_0x452e9b from'ora';import a40_0x524678 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 _0x12c969=a40_0x4753;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x12c969(0x1c9)](0x0,0xa)+')':VERSION;}function a40_0x4753(_0x243385,_0x3e4a56){_0x243385=_0x243385-0x186;const _0x2277f4=a40_0x2277();let _0x475390=_0x2277f4[_0x243385];return _0x475390;}function detectPackageManager(){const _0x8a2297=a40_0x4753,_0x43173f=process[_0x8a2297(0x1ac)][_0x8a2297(0x195)]();if(_0x43173f[_0x8a2297(0x1b9)](_0x8a2297(0x1ae)))return'bun';return _0x8a2297(0x1b5);}const updateFlags=[{'name':a40_0x952e27(0x1c1),'type':a40_0x952e27(0x18c),'description':a40_0x952e27(0x1a7),'default':![]},{'name':'version','type':'string','description':a40_0x952e27(0x19a)},{'name':a40_0x952e27(0x1d6),'type':a40_0x952e27(0x18c),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0x952e27(0x1a3),'type':a40_0x952e27(0x18c),'description':'Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x49d1d1){const _0x35580c=a40_0x952e27;return _0x49d1d1[_0x35580c(0x1c2)](_0x35580c(0x1a5))[_0x35580c(0x191)]();}function shouldSkipCliSkill(_0x3ebf62){const _0x41f6e9=a40_0x952e27;return _0x3ebf62[_0x41f6e9(0x19d)]('no-skills')||_0x3ebf62[_0x41f6e9(0x1b0)](_0x41f6e9(0x1a3))===![];}async function validateUpdateFlags(_0x509baa){const _0xfcc34=a40_0x952e27,_0x1dbfa6=_0x509baa[_0xfcc34(0x19d)](_0xfcc34(0x1c1)),_0x31718b=getRequestedVersion(_0x509baa);if(_0x1dbfa6&&_0x31718b)throw CliErrors[_0xfcc34(0x194)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x31718b&&!a40_0x524678['valid'](_0x31718b))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x31718b,_0xfcc34(0x1d5));}async function fetchNpmDistTags(){const _0x10160a=a40_0x952e27;try{const _0x53f552=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x10160a(0x1ba)](0x2710)});if(!_0x53f552['ok'])return null;const _0xf620b4=await _0x53f552[_0x10160a(0x1c8)]();if(!_0xf620b4||typeof _0xf620b4!=='object')return null;return Object[_0x10160a(0x1d7)](Object[_0x10160a(0x196)](_0xf620b4)[_0x10160a(0x1b3)](([,_0xf587b4])=>typeof _0xf587b4===_0x10160a(0x18a)&&_0xf587b4['trim']()[_0x10160a(0x1cd)]>0x0)[_0x10160a(0x197)](([_0x3f25af,_0x249660])=>[_0x3f25af,String(_0x249660)[_0x10160a(0x191)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x29b97e){const _0x3bb253=await fetchNpmDistTags();return _0x3bb253?.[_0x29b97e]??null;}async function fetchLatestVersion(){const _0x51447b=a40_0x952e27;return fetchNpmDistTagVersion(_0x51447b(0x1bb));}async function resolveTargetVersion(_0x57a64a){const _0xb594a8=a40_0x952e27,_0x156aaa=getRequestedVersion(_0x57a64a);if(_0x156aaa)return{'version':_0x156aaa,'source':_0xb594a8(0x1a5)};if(_0x57a64a[_0xb594a8(0x19d)](_0xb594a8(0x1c1))){const _0x1d917f=await fetchNpmDistTagVersion(_0xb594a8(0x1c1));if(!_0x1d917f)return null;return{'version':_0x1d917f,'source':_0xb594a8(0x1c1)};}const _0x5668d7=await fetchLatestVersion();if(!_0x5668d7)return null;return{'version':_0x5668d7,'source':_0xb594a8(0x1bb)};}function shouldInstallTarget(_0x26ca58,_0x580d26){const _0xac731e=a40_0x952e27;if(_0x580d26[_0xac731e(0x1b7)]===_0xac731e(0x1a5)||_0x580d26[_0xac731e(0x1b7)]===_0xac731e(0x1c1))return!a40_0x524678['eq'](_0x26ca58,_0x580d26[_0xac731e(0x1a5)]);return a40_0x524678['lt'](_0x26ca58,_0x580d26[_0xac731e(0x1a5)]);}function getInstallPlanLabel(_0x4dd74d,_0x129090){const _0x3674bf=a40_0x952e27;switch(_0x129090['source']){case _0x3674bf(0x1c1):return'Beta\x20version:\x20'+a40_0x5a6121[_0x3674bf(0x1a4)](_0x4dd74d)+_0x3674bf(0x188)+a40_0x5a6121[_0x3674bf(0x1aa)](_0x129090['version']);case _0x3674bf(0x1a5):return _0x3674bf(0x1bd)+a40_0x5a6121[_0x3674bf(0x1a4)](_0x4dd74d)+'\x20→\x20'+a40_0x5a6121[_0x3674bf(0x1aa)](_0x129090[_0x3674bf(0x1a5)]);case _0x3674bf(0x1bb):default:return _0x3674bf(0x1c0)+a40_0x5a6121[_0x3674bf(0x1a4)](_0x4dd74d)+_0x3674bf(0x188)+a40_0x5a6121[_0x3674bf(0x1aa)](_0x129090[_0x3674bf(0x1a5)]);}}function a40_0x2277(){const _0x3ef3d4=['Checking\x20CLI\x20Built-in\x20Skill...','\x20\x20Try\x20manually:\x20','trim','gray','start','validation','toLowerCase','entries','map','430Ajdfvt','message','Install\x20a\x20specific\x20CLI\x20version','316811RSyWEl','3895lHsnXC','bool','log','14dsidkq','install','Version\x20comparison\x20failed','...','skills','yellow','version','108QohTqS','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Already\x20on\x20requested\x20version\x20(v','green','nonInteractive','execPath','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','bun','Checking\x20for\x20updates...','flag','inherit','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','filter','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','npm','red','source','error','includes','timeout','latest','3023376CRaObl','Requested\x20version:\x20','\x20\x20Run\x20manually:\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Update\x20available:\x20','beta','str','\x20install\x20-g\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','cwd','4045xCAFoR','json','slice','\x20cli-skill\x20install','fail','valid','length','unknown','Updated\x20to\x20v','run','6727608bUsQcr','Update\x20failed','@latest','write','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','no-skills','fromEntries','Updating\x20via\x20','141855sIYPkc','2495440UIQEMX','\x20→\x20','654cagaIh','string','info','boolean','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','update'];a40_0x2277=function(){return _0x3ef3d4;};return a40_0x2277();}async function installCliSkill(_0x4fac63){const _0x25e52b=a40_0x952e27;console[_0x25e52b(0x19e)](a40_0x5a6121[_0x25e52b(0x192)](_0x25e52b(0x18f)));const _0x46f1e3=runNpxSkillsAddGlobal(process[_0x25e52b(0x1c6)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x4fac63?'pipe':_0x25e52b(0x1b1)});if(_0x46f1e3['skipped']){console['log'](a40_0x5a6121[_0x25e52b(0x192)](_0x25e52b(0x1b4)));return;}if(_0x46f1e3['ok']){console[_0x25e52b(0x19e)](a40_0x5a6121[_0x25e52b(0x192)](_0x25e52b(0x1a8)));return;}console['warn'](a40_0x5a6121[_0x25e52b(0x1a4)](_0x25e52b(0x1c5)+(_0x46f1e3[_0x25e52b(0x1b8)]||_0x25e52b(0x1ce)))),console[_0x25e52b(0x19e)](a40_0x5a6121[_0x25e52b(0x192)](_0x25e52b(0x1be)+CLI_BIN_NAME+_0x25e52b(0x1ca)));}async function execute(_0x13771e){const _0xde54c4=a40_0x952e27;await validateUpdateFlags(_0x13771e);const _0x3de316=getCurrentVersion();console[_0xde54c4(0x19e)]('Current\x20version:\x20'+_0x3de316);const _0x255e7d=a40_0x452e9b(_0xde54c4(0x1af))[_0xde54c4(0x193)](),_0x20c16a=await resolveTargetVersion(_0x13771e);if(!_0x20c16a){const _0x32c2dd=_0x13771e['bool'](_0xde54c4(0x1c1))?_0xde54c4(0x1ad):_0xde54c4(0x1bf);return _0x255e7d['fail'](_0x32c2dd),console['log'](a40_0x5a6121[_0xde54c4(0x192)](_0xde54c4(0x1c4)+NPM_PACKAGE_NAME+_0xde54c4(0x1d3))),{'ok':![],'message':_0x32c2dd};}const _0x4324c6=a40_0x524678[_0xde54c4(0x1cc)](VERSION),_0x354a8a=a40_0x524678['valid'](_0x20c16a[_0xde54c4(0x1a5)]);if(!_0x4324c6||!_0x354a8a)return _0x255e7d[_0xde54c4(0x1cb)](_0xde54c4(0x1a1)),{'ok':![],'message':_0xde54c4(0x1a1)};if(!shouldInstallTarget(_0x4324c6,_0x20c16a)){const _0x318449=_0x20c16a[_0xde54c4(0x1b7)]==='version'?_0xde54c4(0x1a9)+_0x20c16a[_0xde54c4(0x1a5)]+')':'Already\x20up\x20to\x20date\x20(v'+_0x20c16a[_0xde54c4(0x1a5)]+')';return _0x255e7d['succeed'](_0x318449),shouldSkipCliSkill(_0x13771e)?console[_0xde54c4(0x19e)](a40_0x5a6121[_0xde54c4(0x192)](_0xde54c4(0x1b2))):await installCliSkill(_0x13771e[_0xde54c4(0x1ab)]),{'ok':!![]};}_0x255e7d[_0xde54c4(0x18b)](getInstallPlanLabel(_0x3de316,_0x20c16a));const _0x2cbe6e=detectPackageManager(),_0x6ff9f7=_0x2cbe6e===_0xde54c4(0x1b5)?resolveNpmBin(_0xde54c4(0x1b5)):_0x2cbe6e,_0x540dc0=a40_0x452e9b(_0xde54c4(0x1d8)+_0x2cbe6e+_0xde54c4(0x1a2))[_0xde54c4(0x193)]();try{return await execa(_0x6ff9f7,[_0xde54c4(0x1a0),'-g',NPM_PACKAGE_NAME+'@'+_0x20c16a['version']],{'stdio':'pipe'}),_0x540dc0['succeed'](_0xde54c4(0x1cf)+_0x20c16a[_0xde54c4(0x1a5)]),console['log'](a40_0x5a6121[_0xde54c4(0x192)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x13771e)?console[_0xde54c4(0x19e)](a40_0x5a6121['gray'](_0xde54c4(0x1b2))):await installCliSkill(_0x13771e['nonInteractive']),{'ok':!![]};}catch(_0x5b42fd){return _0x540dc0['fail'](_0xde54c4(0x1d2)),console[_0xde54c4(0x1b8)](a40_0x5a6121[_0xde54c4(0x1b6)]('\x20\x20'+_0x5b42fd[_0xde54c4(0x199)])),console[_0xde54c4(0x19e)](a40_0x5a6121[_0xde54c4(0x192)](_0xde54c4(0x190)+_0x2cbe6e+_0xde54c4(0x1c3)+NPM_PACKAGE_NAME+'@'+_0x20c16a[_0xde54c4(0x1a5)])),{'ok':![],'message':_0x5b42fd[_0xde54c4(0x199)]};}}export const updateDefinition={'service':a40_0x952e27(0x18e),'command':a40_0x952e27(0x1d0),'description':a40_0x952e27(0x18d),'risk':a40_0x952e27(0x1d4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0x28810d=a40_0x3d4c;function a40_0x3d4c(_0x918709,_0x33eced){_0x918709=_0x918709-0x6b;const _0x54f44e=a40_0x54f4();let _0x3d4c8d=_0x54f44e[_0x918709];return _0x3d4c8d;}(function(_0xa116ef,_0xa5a59){const _0x178884=a40_0x3d4c,_0x348583=_0xa116ef();while(!![]){try{const _0x1bca2a=parseInt(_0x178884(0xaf))/0x1*(parseInt(_0x178884(0xac))/0x2)+-parseInt(_0x178884(0xb7))/0x3+-parseInt(_0x178884(0x79))/0x4+-parseInt(_0x178884(0x85))/0x5*(parseInt(_0x178884(0x81))/0x6)+-parseInt(_0x178884(0xa8))/0x7*(parseInt(_0x178884(0x6e))/0x8)+parseInt(_0x178884(0x95))/0x9+parseInt(_0x178884(0x8a))/0xa*(parseInt(_0x178884(0x8e))/0xb);if(_0x1bca2a===_0xa5a59)break;else _0x348583['push'](_0x348583['shift']());}catch(_0x39974b){_0x348583['push'](_0x348583['shift']());}}}(a40_0x54f4,0x3e935));import a40_0x3e5fd4 from'chalk';import a40_0x541663 from'ora';import a40_0x3fcf5c 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 _0x1b03e2=a40_0x3d4c;return GIT_COMMIT!==_0x1b03e2(0x82)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0xe3be0f=a40_0x3d4c,_0x4c2c35=process[_0xe3be0f(0x84)][_0xe3be0f(0x94)]();if(_0x4c2c35[_0xe3be0f(0x73)](_0xe3be0f(0x8b)))return _0xe3be0f(0x8b);return'npm';}function a40_0x54f4(){const _0x5dbf23=['66SaAPKO','flag','@latest','7667JUVBEG','pipe','nonInteractive','str','beta','latest','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','run','1290324OypZhT','Checking\x20CLI\x20Built-in\x20Skill...','Current\x20version:\x20','fail','\x20→\x20','json','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','\x20install\x20-g\x20','red','green','57704SgvLJA','Updating\x20via\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','source','fromEntries','includes','Invalid\x20version:\x20','boolean','succeed','bool','skills','1550088jJmHxJ','entries','\x20\x20Try\x20manually:\x20','error','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Update\x20failed','Update\x20available:\x20','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','636oafoYL','unknown','no-skills','execPath','11415sAWPEv','gray','filter','version','https://registry.npmjs.org/-/package/','9496360YOpfkx','bun','inherit','length','11TPydBR','yellow','install','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','start','\x20cli-skill\x20install','toLowerCase','3681207UvuTzy','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','map','Install\x20a\x20specific\x20CLI\x20version','log','message','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','warn','timeout','Checking\x20for\x20updates...','validation','Already\x20on\x20requested\x20version\x20(v','valid','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','object','skipped','Updated\x20to\x20v','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','npm','287tkxcfX','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','Already\x20up\x20to\x20date\x20(v','cwd'];a40_0x54f4=function(){return _0x5dbf23;};return a40_0x54f4();}const updateFlags=[{'name':a40_0x28810d(0xb3),'type':a40_0x28810d(0x75),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0x28810d(0x88),'type':'string','description':a40_0x28810d(0x98)},{'name':a40_0x28810d(0x83),'type':'boolean','description':a40_0x28810d(0x80),'default':![]},{'name':a40_0x28810d(0x78),'type':'boolean','description':a40_0x28810d(0x91),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x4d5031){const _0x5457f7=a40_0x28810d;return _0x4d5031[_0x5457f7(0xb2)]('version')['trim']();}function shouldSkipCliSkill(_0x5994b5){const _0x3a63e3=a40_0x28810d;return _0x5994b5[_0x3a63e3(0x77)]('no-skills')||_0x5994b5[_0x3a63e3(0xad)](_0x3a63e3(0x78))===![];}async function validateUpdateFlags(_0xf4ac70){const _0x1f8f80=a40_0x28810d,_0x1e038a=_0xf4ac70[_0x1f8f80(0x77)]('beta'),_0x3bf17c=getRequestedVersion(_0xf4ac70);if(_0x1e038a&&_0x3bf17c)throw CliErrors[_0x1f8f80(0x9f)](_0x1f8f80(0x7d),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x3bf17c&&!a40_0x3fcf5c[_0x1f8f80(0xa1)](_0x3bf17c))throw CliErrors[_0x1f8f80(0x9f)](_0x1f8f80(0x74)+_0x3bf17c,_0x1f8f80(0xbd));}async function fetchNpmDistTags(){const _0x91a157=a40_0x28810d;try{const _0x9772af=await fetch(_0x91a157(0x89)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x91a157(0x9d)](0x2710)});if(!_0x9772af['ok'])return null;const _0x4983ef=await _0x9772af[_0x91a157(0xbc)]();if(!_0x4983ef||typeof _0x4983ef!==_0x91a157(0xa3))return null;return Object[_0x91a157(0x72)](Object[_0x91a157(0x7a)](_0x4983ef)[_0x91a157(0x87)](([,_0x27281d])=>typeof _0x27281d==='string'&&_0x27281d['trim']()[_0x91a157(0x8d)]>0x0)[_0x91a157(0x97)](([_0x83bd6a,_0x2a86c4])=>[_0x83bd6a,String(_0x2a86c4)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x4df1b9){const _0x440ee4=await fetchNpmDistTags();return _0x440ee4?.[_0x4df1b9]??null;}async function fetchLatestVersion(){const _0x499232=a40_0x28810d;return fetchNpmDistTagVersion(_0x499232(0xb4));}async function resolveTargetVersion(_0x4caf87){const _0x5441e4=a40_0x28810d,_0x5559be=getRequestedVersion(_0x4caf87);if(_0x5559be)return{'version':_0x5559be,'source':'version'};if(_0x4caf87[_0x5441e4(0x77)](_0x5441e4(0xb3))){const _0x117e50=await fetchNpmDistTagVersion(_0x5441e4(0xb3));if(!_0x117e50)return null;return{'version':_0x117e50,'source':'beta'};}const _0x3876c1=await fetchLatestVersion();if(!_0x3876c1)return null;return{'version':_0x3876c1,'source':_0x5441e4(0xb4)};}function shouldInstallTarget(_0x342168,_0x5928f3){const _0x32463e=a40_0x28810d;if(_0x5928f3[_0x32463e(0x71)]===_0x32463e(0x88)||_0x5928f3[_0x32463e(0x71)]===_0x32463e(0xb3))return!a40_0x3fcf5c['eq'](_0x342168,_0x5928f3[_0x32463e(0x88)]);return a40_0x3fcf5c['lt'](_0x342168,_0x5928f3[_0x32463e(0x88)]);}function getInstallPlanLabel(_0x1ac66a,_0x4017ff){const _0x37e2d4=a40_0x28810d;switch(_0x4017ff[_0x37e2d4(0x71)]){case'beta':return'Beta\x20version:\x20'+a40_0x3e5fd4[_0x37e2d4(0x8f)](_0x1ac66a)+_0x37e2d4(0xbb)+a40_0x3e5fd4[_0x37e2d4(0x6d)](_0x4017ff[_0x37e2d4(0x88)]);case _0x37e2d4(0x88):return'Requested\x20version:\x20'+a40_0x3e5fd4['yellow'](_0x1ac66a)+_0x37e2d4(0xbb)+a40_0x3e5fd4[_0x37e2d4(0x6d)](_0x4017ff['version']);case'latest':default:return _0x37e2d4(0x7f)+a40_0x3e5fd4[_0x37e2d4(0x8f)](_0x1ac66a)+_0x37e2d4(0xbb)+a40_0x3e5fd4['green'](_0x4017ff[_0x37e2d4(0x88)]);}}async function installCliSkill(_0x51ad44){const _0x2c01e5=a40_0x28810d;console[_0x2c01e5(0x99)](a40_0x3e5fd4[_0x2c01e5(0x86)](_0x2c01e5(0xb8)));const _0x31f086=runNpxSkillsAddGlobal(process[_0x2c01e5(0xab)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x51ad44?_0x2c01e5(0xb0):_0x2c01e5(0x8c)});if(_0x31f086[_0x2c01e5(0xa4)]){console[_0x2c01e5(0x99)](a40_0x3e5fd4['gray']('\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x31f086['ok']){console['log'](a40_0x3e5fd4[_0x2c01e5(0x86)](_0x2c01e5(0xa9)));return;}console[_0x2c01e5(0x9c)](a40_0x3e5fd4['yellow']('\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20'+(_0x31f086['error']||'unknown'))),console['log'](a40_0x3e5fd4[_0x2c01e5(0x86)]('\x20\x20Run\x20manually:\x20'+CLI_BIN_NAME+_0x2c01e5(0x93)));}async function execute(_0xfd51ce){const _0x3deb4b=a40_0x28810d;await validateUpdateFlags(_0xfd51ce);const _0x3c5b7d=getCurrentVersion();console['log'](_0x3deb4b(0xb9)+_0x3c5b7d);const _0x7fca33=a40_0x541663(_0x3deb4b(0x9e))[_0x3deb4b(0x92)](),_0x4950b2=await resolveTargetVersion(_0xfd51ce);if(!_0x4950b2){const _0x13e799=_0xfd51ce['bool'](_0x3deb4b(0xb3))?_0x3deb4b(0xa6):_0x3deb4b(0x9b);return _0x7fca33[_0x3deb4b(0xba)](_0x13e799),console[_0x3deb4b(0x99)](a40_0x3e5fd4[_0x3deb4b(0x86)](_0x3deb4b(0x70)+NPM_PACKAGE_NAME+_0x3deb4b(0xae))),{'ok':![],'message':_0x13e799};}const _0x2f3e37=a40_0x3fcf5c[_0x3deb4b(0xa1)](VERSION),_0x5068cf=a40_0x3fcf5c[_0x3deb4b(0xa1)](_0x4950b2[_0x3deb4b(0x88)]);if(!_0x2f3e37||!_0x5068cf)return _0x7fca33[_0x3deb4b(0xba)]('Version\x20comparison\x20failed'),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x2f3e37,_0x4950b2)){const _0x4bc601=_0x4950b2[_0x3deb4b(0x71)]===_0x3deb4b(0x88)?_0x3deb4b(0xa0)+_0x4950b2['version']+')':_0x3deb4b(0xaa)+_0x4950b2['version']+')';return _0x7fca33[_0x3deb4b(0x76)](_0x4bc601),shouldSkipCliSkill(_0xfd51ce)?console[_0x3deb4b(0x99)](a40_0x3e5fd4['gray'](_0x3deb4b(0x96))):await installCliSkill(_0xfd51ce[_0x3deb4b(0xb1)]),{'ok':!![]};}_0x7fca33['info'](getInstallPlanLabel(_0x3c5b7d,_0x4950b2));const _0x3d2afe=detectPackageManager(),_0x92a7ca=_0x3d2afe===_0x3deb4b(0xa7)?resolveNpmBin(_0x3deb4b(0xa7)):_0x3d2afe,_0x1293fc=a40_0x541663(_0x3deb4b(0x6f)+_0x3d2afe+'...')[_0x3deb4b(0x92)]();try{return await execa(_0x92a7ca,[_0x3deb4b(0x90),'-g',NPM_PACKAGE_NAME+'@'+_0x4950b2[_0x3deb4b(0x88)]],{'stdio':_0x3deb4b(0xb0)}),_0x1293fc[_0x3deb4b(0x76)](_0x3deb4b(0xa5)+_0x4950b2[_0x3deb4b(0x88)]),console[_0x3deb4b(0x99)](a40_0x3e5fd4[_0x3deb4b(0x86)](_0x3deb4b(0xb5))),shouldSkipCliSkill(_0xfd51ce)?console['log'](a40_0x3e5fd4[_0x3deb4b(0x86)](_0x3deb4b(0x96))):await installCliSkill(_0xfd51ce[_0x3deb4b(0xb1)]),{'ok':!![]};}catch(_0x524149){return _0x1293fc[_0x3deb4b(0xba)](_0x3deb4b(0x7e)),console[_0x3deb4b(0x7c)](a40_0x3e5fd4[_0x3deb4b(0x6c)]('\x20\x20'+_0x524149[_0x3deb4b(0x9a)])),console['log'](a40_0x3e5fd4[_0x3deb4b(0x86)](_0x3deb4b(0x7b)+_0x3d2afe+_0x3deb4b(0x6b)+NPM_PACKAGE_NAME+'@'+_0x4950b2[_0x3deb4b(0x88)])),{'ok':![],'message':_0x524149[_0x3deb4b(0x9a)]};}}export const updateDefinition={'service':'update','command':a40_0x28810d(0xb6),'description':a40_0x28810d(0xa2),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x6028e0,_0x1b60ab){const _0x541185=a41_0x5630,_0x1d859f=_0x6028e0();while(!![]){try{const _0x3d723e=parseInt(_0x541185(0x1ec))/0x1+-parseInt(_0x541185(0x1f0))/0x2*(-parseInt(_0x541185(0x1ef))/0x3)+-parseInt(_0x541185(0x1ee))/0x4+parseInt(_0x541185(0x1ea))/0x5+-parseInt(_0x541185(0x1f1))/0x6+parseInt(_0x541185(0x1eb))/0x7+-parseInt(_0x541185(0x1ed))/0x8;if(_0x3d723e===_0x1b60ab)break;else _0x1d859f['push'](_0x1d859f['shift']());}catch(_0x33d671){_0x1d859f['push'](_0x1d859f['shift']());}}}(a41_0x8df1,0xa34fb));function a41_0x8df1(){const _0x18220a=['6831546ZCelqe','6565730TvhqnR','7783405Kcczsc','834266vnGyvd','10054344Ucvsye','5174152eHeBah','6vZPNns','1098518UvlTVE'];a41_0x8df1=function(){return _0x18220a;};return a41_0x8df1();}import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x5630(_0x2934c0,_0x15efe5){_0x2934c0=_0x2934c0-0x1ea;const _0x8df145=a41_0x8df1();let _0x5630a0=_0x8df145[_0x2934c0];return _0x5630a0;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a41_0x181b(_0x1c0963,_0x1344b6){_0x1c0963=_0x1c0963-0x19d;const _0x11c2be=a41_0x11c2();let _0x181b86=_0x11c2be[_0x1c0963];return _0x181b86;}(function(_0x1c064a,_0x37f89a){const _0x579774=a41_0x181b,_0x5d8184=_0x1c064a();while(!![]){try{const _0x27fc1f=-parseInt(_0x579774(0x1a4))/0x1+-parseInt(_0x579774(0x1a1))/0x2+parseInt(_0x579774(0x1a0))/0x3*(-parseInt(_0x579774(0x1a3))/0x4)+-parseInt(_0x579774(0x1a5))/0x5+-parseInt(_0x579774(0x19f))/0x6*(parseInt(_0x579774(0x1a2))/0x7)+parseInt(_0x579774(0x1a6))/0x8+parseInt(_0x579774(0x19e))/0x9*(parseInt(_0x579774(0x19d))/0xa);if(_0x27fc1f===_0x37f89a)break;else _0x5d8184['push'](_0x5d8184['shift']());}catch(_0x408d65){_0x5d8184['push'](_0x5d8184['shift']());}}}(a41_0x11c2,0xa3e29));function a41_0x11c2(){const _0x4041dc=['531622VDYXop','839237TuDdrw','12764stUQcm','638115wylGrv','5943155SQiBXk','5513576eoOLHZ','290JztmNJ','1029366vMtram','24iGTaCU','717UTvOse'];a41_0x11c2=function(){return _0x4041dc;};return a41_0x11c2();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a42_0x17d57a=a42_0x245b;(function(_0x2a3376,_0x41c99f){const _0x5daea4=a42_0x245b,_0x3de5b4=_0x2a3376();while(!![]){try{const _0x4a69f5=-parseInt(_0x5daea4(0x157))/0x1+parseInt(_0x5daea4(0x14d))/0x2+parseInt(_0x5daea4(0x153))/0x3*(parseInt(_0x5daea4(0x152))/0x4)+-parseInt(_0x5daea4(0x15f))/0x5*(-parseInt(_0x5daea4(0x14e))/0x6)+parseInt(_0x5daea4(0x15b))/0x7*(parseInt(_0x5daea4(0x154))/0x8)+parseInt(_0x5daea4(0x15d))/0x9*(-parseInt(_0x5daea4(0x15a))/0xa)+parseInt(_0x5daea4(0x156))/0xb;if(_0x4a69f5===_0x41c99f)break;else _0x3de5b4['push'](_0x3de5b4['shift']());}catch(_0x429234){_0x3de5b4['push'](_0x3de5b4['shift']());}}}(a42_0x2750,0x88370));function a42_0x245b(_0x3784c6,_0x2b8d51){_0x3784c6=_0x3784c6-0x14c;const _0x275078=a42_0x2750();let _0x245ba5=_0x275078[_0x3784c6];return _0x245ba5;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a42_0x2750(){const _0x318480=['alias','1481953ACknmu','742110xWfkbK','Omit\x20import\x20statements\x20from\x20generated\x20code','bool','706770eDoQYt','25557JujUWH','string','27ffrUQO','str','15XngIsu','boolean','read','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','code','skip-imports','codegen','769294nSblNF','1503384UeJkyb','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','operation','name','460124yYlcCw','6losBhW','24HbarYX'];a42_0x2750=function(){return _0x318480;};return a42_0x2750();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x17d57a(0x14c),'command':'sdk','description':a42_0x17d57a(0x162),'risk':a42_0x17d57a(0x161),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x17d57a(0x155),'type':a42_0x17d57a(0x15c),'description':a42_0x17d57a(0x14f)},{'name':a42_0x17d57a(0x150),'type':a42_0x17d57a(0x15c),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a42_0x17d57a(0x164),'type':a42_0x17d57a(0x160),'description':a42_0x17d57a(0x158)}],async 'execute'(_0x157e08){const _0x1c7a88=a42_0x17d57a,{dataset:_0x3db6ab,operation:_0x226b61}=await getOperationDetail(_0x157e08['appCode'],_0x157e08[_0x1c7a88(0x15e)](_0x1c7a88(0x163)),_0x157e08[_0x1c7a88(0x15e)](_0x1c7a88(0x150))),_0x5760ad=generateSdkCode(_0x3db6ab,_0x226b61,{'includeImports':!_0x157e08[_0x1c7a88(0x159)](_0x1c7a88(0x164))});return{'ok':!![],'data':{'dataset':{'name':_0x3db6ab[_0x1c7a88(0x151)],'code':_0x3db6ab[_0x1c7a88(0x163)],'tableName':_0x3db6ab['tableName']},'operation':_0x157e08[_0x1c7a88(0x15e)]('operation'),'code':_0x5760ad}};}};
1
+ function a42_0x5603(_0x4f80b1,_0x82ca5b){_0x4f80b1=_0x4f80b1-0x15e;const _0x4293f5=a42_0x4293();let _0x56035e=_0x4293f5[_0x4f80b1];return _0x56035e;}function a42_0x4293(){const _0x4c414f=['5625695VYCNPe','string','2403308LrLXtM','bool','36AUvrKV','143LzHXXb','3554559hFThxk','read','name','code','24YFEXDC','17851540EOPBtp','1384558eEGtVL','tableName','1sdebZv','operation','440124xRBwjC','sdk','Omit\x20import\x20statements\x20from\x20generated\x20code','475059heNGQz','appCode','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','20JsuRct','boolean'];a42_0x4293=function(){return _0x4c414f;};return a42_0x4293();}const a42_0x21bb17=a42_0x5603;(function(_0x1e7067,_0x51e0f3){const _0x170117=a42_0x5603,_0x4cafd3=_0x1e7067();while(!![]){try{const _0x4ee7f4=-parseInt(_0x170117(0x173))/0x1*(-parseInt(_0x170117(0x167))/0x2)+parseInt(_0x170117(0x15f))/0x3*(parseInt(_0x170117(0x163))/0x4)+-parseInt(_0x170117(0x165))/0x5+-parseInt(_0x170117(0x169))/0x6*(-parseInt(_0x170117(0x171))/0x7)+-parseInt(_0x170117(0x16f))/0x8*(-parseInt(_0x170117(0x16b))/0x9)+-parseInt(_0x170117(0x170))/0xa+parseInt(_0x170117(0x16a))/0xb*(-parseInt(_0x170117(0x175))/0xc);if(_0x4ee7f4===_0x51e0f3)break;else _0x4cafd3['push'](_0x4cafd3['shift']());}catch(_0xbe41dc){_0x4cafd3['push'](_0x4cafd3['shift']());}}}(a42_0x4293,0xeec16));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':'codegen','command':a42_0x21bb17(0x176),'description':a42_0x21bb17(0x161),'risk':a42_0x21bb17(0x16c),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a42_0x21bb17(0x166),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a42_0x21bb17(0x174),'type':a42_0x21bb17(0x166),'required':!![],'description':a42_0x21bb17(0x162)},{'name':'skip-imports','type':a42_0x21bb17(0x164),'description':a42_0x21bb17(0x15e)}],async 'execute'(_0x89172f){const _0x3f3ec7=a42_0x21bb17,{dataset:_0x1795c9,operation:_0x5f1861}=await getOperationDetail(_0x89172f[_0x3f3ec7(0x160)],_0x89172f['str'](_0x3f3ec7(0x16e)),_0x89172f['str'](_0x3f3ec7(0x174))),_0x51c15d=generateSdkCode(_0x1795c9,_0x5f1861,{'includeImports':!_0x89172f[_0x3f3ec7(0x168)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x1795c9[_0x3f3ec7(0x16d)],'code':_0x1795c9[_0x3f3ec7(0x16e)],'tableName':_0x1795c9[_0x3f3ec7(0x172)]},'operation':_0x89172f['str']('operation'),'code':_0x51c15d}};}};
@@ -1 +1 @@
1
- function a43_0x23d8(_0x8cacc2,_0x85ebbc){_0x8cacc2=_0x8cacc2-0x1ac;const _0x1dfe2e=a43_0x1dfe();let _0x23d826=_0x1dfe2e[_0x8cacc2];return _0x23d826;}const a43_0x17f71a=a43_0x23d8;(function(_0x5c9a14,_0x56a2cf){const _0x4b96be=a43_0x23d8,_0x3510df=_0x5c9a14();while(!![]){try{const _0x335052=-parseInt(_0x4b96be(0x1b6))/0x1*(parseInt(_0x4b96be(0x1b9))/0x2)+parseInt(_0x4b96be(0x1b7))/0x3*(-parseInt(_0x4b96be(0x1c4))/0x4)+parseInt(_0x4b96be(0x1b0))/0x5+-parseInt(_0x4b96be(0x1b4))/0x6+parseInt(_0x4b96be(0x1c1))/0x7+-parseInt(_0x4b96be(0x1bb))/0x8+parseInt(_0x4b96be(0x1ae))/0x9;if(_0x335052===_0x56a2cf)break;else _0x3510df['push'](_0x3510df['shift']());}catch(_0x7493aa){_0x3510df['push'](_0x3510df['shift']());}}}(a43_0x1dfe,0x62e12));function a43_0x1dfe(){const _0x527e89=['2450270PpVYbZ','no-imports','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','appCode','3797634RvqbbL','bool','1IQwrUs','9FsoszH','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','916526LWClQa','target','6203456vrgIAZ','boolean','sqlcode','sql','Omit\x20import\x20statements\x20from\x20generated\x20code','bff','1879738zcuekS','sdk','codegen','342340nIAnRZ','str','read','15928299EEnPoc','sqlCode'];a43_0x1dfe=function(){return _0x527e89;};return a43_0x1dfe();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x17f71a(0x1c3),'command':a43_0x17f71a(0x1be),'description':a43_0x17f71a(0x1b2),'risk':a43_0x17f71a(0x1ad),'flags':[SQLCODE_FLAG,{'name':a43_0x17f71a(0x1ba),'type':'string','description':a43_0x17f71a(0x1b8),'default':a43_0x17f71a(0x1c2),'enum':['sdk',a43_0x17f71a(0x1c0)]},{'name':'no-imports','type':a43_0x17f71a(0x1bc),'description':a43_0x17f71a(0x1bf)}],async 'execute'(_0x48f6d9){const _0x673391=a43_0x17f71a,_0x54d4a2=await getSqlQueryInfo(_0x48f6d9[_0x673391(0x1b3)],_0x48f6d9['str'](_0x673391(0x1bd))),_0x1fa2f4=_0x48f6d9[_0x673391(0x1ac)](_0x673391(0x1ba))||'sdk',_0x46bf2e=generateSqlCodeTemplate(_0x54d4a2,{'target':_0x1fa2f4,'includeImports':!_0x48f6d9[_0x673391(0x1b5)](_0x673391(0x1b1))});return{'ok':!![],'data':{'sqlCode':_0x54d4a2[_0x673391(0x1af)],'sqlName':_0x54d4a2['sqlName'],'target':_0x1fa2f4,'code':_0x46bf2e}};}};
1
+ const a43_0x35df6e=a43_0x19e0;(function(_0x2361f2,_0x5d156c){const _0x87bc22=a43_0x19e0,_0x144f3e=_0x2361f2();while(!![]){try{const _0x3c73da=parseInt(_0x87bc22(0x14f))/0x1+parseInt(_0x87bc22(0x154))/0x2*(-parseInt(_0x87bc22(0x155))/0x3)+parseInt(_0x87bc22(0x156))/0x4*(parseInt(_0x87bc22(0x14c))/0x5)+-parseInt(_0x87bc22(0x14e))/0x6*(parseInt(_0x87bc22(0x148))/0x7)+-parseInt(_0x87bc22(0x14a))/0x8+parseInt(_0x87bc22(0x15c))/0x9*(parseInt(_0x87bc22(0x158))/0xa)+-parseInt(_0x87bc22(0x14d))/0xb*(-parseInt(_0x87bc22(0x157))/0xc);if(_0x3c73da===_0x5d156c)break;else _0x144f3e['push'](_0x144f3e['shift']());}catch(_0x569da3){_0x144f3e['push'](_0x144f3e['shift']());}}}(a43_0x40ca,0xbfce2));function a43_0x19e0(_0xf89377,_0x4c8800){_0xf89377=_0xf89377-0x147;const _0x40caa5=a43_0x40ca();let _0x19e0f4=_0x40caa5[_0xf89377];return _0x19e0f4;}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a43_0x40ca(){const _0x9e4451=['18mjtlDE','935480cQNaOk','no-imports','Omit\x20import\x20statements\x20from\x20generated\x20code','boolean','target','123414VFfGIE','69xlgAsY','20THvopu','12ksSaCR','2950420UBwFbg','sqlCode','string','read','9XqEAQf','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','3411751AfxHXm','str','9465568bHQVKO','sqlcode','600805KeZSCf','33208373owhwPm'];a43_0x40ca=function(){return _0x9e4451;};return a43_0x40ca();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':'codegen','command':'sql','description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a43_0x35df6e(0x15b),'flags':[SQLCODE_FLAG,{'name':a43_0x35df6e(0x153),'type':a43_0x35df6e(0x15a),'description':a43_0x35df6e(0x147),'default':'sdk','enum':['sdk','bff']},{'name':a43_0x35df6e(0x150),'type':a43_0x35df6e(0x152),'description':a43_0x35df6e(0x151)}],async 'execute'(_0x21e1ad){const _0xb30135=a43_0x35df6e,_0x24a1af=await getSqlQueryInfo(_0x21e1ad['appCode'],_0x21e1ad[_0xb30135(0x149)](_0xb30135(0x14b))),_0x328e0e=_0x21e1ad[_0xb30135(0x149)](_0xb30135(0x153))||'sdk',_0x53baae=generateSqlCodeTemplate(_0x24a1af,{'target':_0x328e0e,'includeImports':!_0x21e1ad['bool'](_0xb30135(0x150))});return{'ok':!![],'data':{'sqlCode':_0x24a1af[_0xb30135(0x159)],'sqlName':_0x24a1af['sqlName'],'target':_0x328e0e,'code':_0x53baae}};}};
@@ -0,0 +1 @@
1
+ (function(_0x534bff,_0xcef969){const _0x5e29ca=a44_0x3ac9,_0x222dbc=_0x534bff();while(!![]){try{const _0x46c1d2=parseInt(_0x5e29ca(0x1df))/0x1+parseInt(_0x5e29ca(0x1cb))/0x2+-parseInt(_0x5e29ca(0x1e6))/0x3*(-parseInt(_0x5e29ca(0x1d7))/0x4)+parseInt(_0x5e29ca(0x1d6))/0x5*(parseInt(_0x5e29ca(0x1e3))/0x6)+parseInt(_0x5e29ca(0x1dc))/0x7+-parseInt(_0x5e29ca(0x1c8))/0x8*(-parseInt(_0x5e29ca(0x1d3))/0x9)+parseInt(_0x5e29ca(0x1d2))/0xa*(-parseInt(_0x5e29ca(0x1da))/0xb);if(_0x46c1d2===_0xcef969)break;else _0x222dbc['push'](_0x222dbc['shift']());}catch(_0x1f34be){_0x222dbc['push'](_0x222dbc['shift']());}}}(a44_0x3585,0x46d43));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a44_0x3ac9(_0x4a88b5,_0x21445d){_0x4a88b5=_0x4a88b5-0x1bf;const _0x3585f3=a44_0x3585();let _0x3ac9a6=_0x3585f3[_0x4a88b5];return _0x3ac9a6;}import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';function a44_0x3585(){const _0x33efd2=['defaultApp','546353yRtziw','\x20app\x20\x22','str','project','30dgRJHj','object','\x20Note:\x20app\x20\x22','134523CWjRhq','globalConfig','string','validation','\x20Default\x20app\x20changed\x20to\x20\x22','\x20Set\x20as\x20default\x20app.','Missing\x20app\x20name.','length','Use\x20global\x20config\x20scope','\x20<name>','\x20<name>\x20[--global]','projectConfig','App\x20\x22','global','8ILoMsz','Added','\x20<name>\x20--appcode\x20<code>','181710GCBLiV','trim','App\x20code','appcode','bool','apps','keys','2077150IEdkkk','491067aOlGbK','boolean','args','108520CyyXnR','36vAFTQs','\x20config.','Usage:\x20','66Knibzq','Removed\x20app\x20\x22','2327815FGCgai','inherit'];a44_0x3585=function(){return _0x33efd2;};return a44_0x3585();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x1a6413=a44_0x3ac9;return[{'name':_0x1a6413(0x1ce),'type':_0x1a6413(0x1e8),'description':_0x1a6413(0x1cd),'required':!![]},{'name':_0x1a6413(0x1c7),'type':_0x1a6413(0x1d4),'description':_0x1a6413(0x1c2),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x5a29d2=a44_0x3ac9;return[{'name':_0x5a29d2(0x1c7),'type':_0x5a29d2(0x1d4),'description':'Use\x20global\x20config\x20scope','default':![]}];}export async function validateAppName(_0x448f90,_0x117aa3){const _0x3a5ad3=a44_0x3ac9,_0x403b35=_0x448f90['args'][0x0]?.[_0x3a5ad3(0x1cc)]();if(!_0x403b35)throw CliErrors[_0x3a5ad3(0x1e9)](_0x3a5ad3(0x1c0),_0x3a5ad3(0x1d9)+CLI_BIN_NAME+'\x20'+_0x117aa3+_0x3a5ad3(0x1c3));}export async function runAppAdd(_0x17383e,_0x238b31){const _0x4291e0=a44_0x3ac9,_0x2dfdbb=_0x17383e[_0x4291e0(0x1d5)][0x0]?.[_0x4291e0(0x1cc)]();if(!_0x2dfdbb)throw CliErrors[_0x4291e0(0x1e9)]('Missing\x20app\x20name.',_0x4291e0(0x1d9)+CLI_BIN_NAME+'\x20'+_0x238b31+_0x4291e0(0x1ca));const _0x3f98b6=_0x17383e[_0x4291e0(0x1e1)](_0x4291e0(0x1ce));if(!_0x3f98b6)throw CliErrors['flagMissing'](_0x4291e0(0x1ce),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x238b31+_0x4291e0(0x1ca));const _0x493f40={'global':_0x17383e[_0x4291e0(0x1cf)](_0x4291e0(0x1c7))},_0x535531=readConfig(_0x493f40);if(!_0x535531['apps'])_0x535531['apps']={};const _0x5b2b7d={'appcode':_0x3f98b6,...collectAppProfileOverrides(_0xa2ef25=>_0x17383e[_0x4291e0(0x1e1)](_0xa2ef25))},_0x26af09=_0x535531[_0x4291e0(0x1d0)],_0x5c41ea=!!_0x26af09[_0x2dfdbb];_0x26af09[_0x2dfdbb]=_0x5b2b7d;if(!_0x535531[_0x4291e0(0x1de)])_0x535531[_0x4291e0(0x1de)]=_0x2dfdbb;writeConfig(_0x535531,_0x493f40);const _0x2da2d3=!_0x5c41ea&&_0x535531[_0x4291e0(0x1de)]===_0x2dfdbb?_0x4291e0(0x1bf):'',_0x44e9c1=(_0x5c41ea?'Updated':_0x4291e0(0x1c9))+_0x4291e0(0x1e0)+_0x2dfdbb+'\x22\x20(appcode:\x20'+_0x3f98b6+')'+scopeLabel(_0x493f40)+'.'+_0x2da2d3;return{'ok':!![],'message':_0x44e9c1};}export async function runAppRemove(_0x561f78,_0x14f382){const _0x1a74b2=a44_0x3ac9,_0xef1461=_0x561f78['args'][0x0]?.[_0x1a74b2(0x1cc)]();if(!_0xef1461)throw CliErrors[_0x1a74b2(0x1e9)](_0x1a74b2(0x1c0),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x14f382+_0x1a74b2(0x1c4));const _0x4a99f5=_0x561f78[_0x1a74b2(0x1cf)](_0x1a74b2(0x1c7)),{config:_0x2fc067,layers:_0x22c153}=readRawConfigWithLayers(),_0x2af68b=_0x2fc067[_0x1a74b2(0x1d0)]??{};if(!_0x2af68b[_0xef1461])throw CliErrors[_0x1a74b2(0x1e9)](_0x1a74b2(0x1c6)+_0xef1461+'\x22\x20not\x20found.');const _0x17445c=_0x22c153[_0x1a74b2(0x1e7)][_0x1a74b2(0x1d0)]&&typeof _0x22c153['globalConfig']['apps']===_0x1a74b2(0x1e4)?_0x22c153[_0x1a74b2(0x1e7)][_0x1a74b2(0x1d0)]:{},_0x6408f5=_0x22c153[_0x1a74b2(0x1c5)][_0x1a74b2(0x1d0)]&&typeof _0x22c153['projectConfig'][_0x1a74b2(0x1d0)]===_0x1a74b2(0x1e4)?_0x22c153[_0x1a74b2(0x1c5)][_0x1a74b2(0x1d0)]:{},_0x136310=appDefinedIn(_0xef1461,_0x17445c,_0x6408f5,_0x22c153[_0x1a74b2(0x1c5)][_0x1a74b2(0x1dd)]===![]),_0x1862af=resolveAppScopeForWrite(_0xef1461,_0x4a99f5,_0x22c153),_0x58a651={'global':_0x1862af===_0x1a74b2(0x1c7)},_0x2cef0b=readConfig(_0x58a651),_0x558b2f=_0x2cef0b[_0x1a74b2(0x1d0)];if(!_0x558b2f||!_0x558b2f[_0xef1461])throw CliErrors['validation']('App\x20\x22'+_0xef1461+'\x22\x20not\x20found.');delete _0x558b2f[_0xef1461];let _0xbfefee='';if(_0x2cef0b[_0x1a74b2(0x1de)]===_0xef1461){const _0x184474=Object[_0x1a74b2(0x1d1)](_0x558b2f);_0x2cef0b['defaultApp']=_0x184474['length']>0x0?_0x184474[0x0]:undefined,_0x2cef0b[_0x1a74b2(0x1de)]?_0xbfefee=_0x1a74b2(0x1ea)+_0x2cef0b['defaultApp']+'\x22.':delete _0x2cef0b[_0x1a74b2(0x1de)];}Object['keys'](_0x558b2f)[_0x1a74b2(0x1c1)]===0x0&&(delete _0x2cef0b[_0x1a74b2(0x1d0)],delete _0x2cef0b['defaultApp']);writeConfig(_0x2cef0b,_0x58a651);const _0x27ada4=_0x136310==='both'?_0x1a74b2(0x1e5)+_0xef1461+'\x22\x20still\x20defined\x20in\x20'+(_0x1862af===_0x1a74b2(0x1e2)?'global':_0x1a74b2(0x1e2))+_0x1a74b2(0x1d8):'';return{'ok':!![],'message':_0x1a74b2(0x1db)+_0xef1461+'\x22'+scopeLabel(_0x58a651)+'.'+_0xbfefee+_0x27ada4};}
@@ -1 +1 @@
1
- (function(_0x1d0c96,_0xd1b4c){const _0x341ee4=a44_0x562a,_0x128086=_0x1d0c96();while(!![]){try{const _0x34bc5e=parseInt(_0x341ee4(0x84))/0x1+parseInt(_0x341ee4(0x8f))/0x2*(-parseInt(_0x341ee4(0xa1))/0x3)+parseInt(_0x341ee4(0x92))/0x4+parseInt(_0x341ee4(0xa2))/0x5*(-parseInt(_0x341ee4(0xa0))/0x6)+parseInt(_0x341ee4(0x82))/0x7+-parseInt(_0x341ee4(0x7f))/0x8*(-parseInt(_0x341ee4(0x7e))/0x9)+-parseInt(_0x341ee4(0x89))/0xa;if(_0x34bc5e===_0xd1b4c)break;else _0x128086['push'](_0x128086['shift']());}catch(_0x1ad84b){_0x128086['push'](_0x128086['shift']());}}}(a44_0xf3a5,0xdff98));import{input,checkbox,select}from'@inquirer/prompts';import a44_0x3f93f4 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a44_0x562a(_0x145a94,_0x49fcc8){_0x145a94=_0x145a94-0x7e;const _0xf3a504=a44_0xf3a5();let _0x562ab0=_0xf3a504[_0x145a94];return _0x562ab0;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';function a44_0xf3a5(){const _0x3eb3d6=['appCode','✎\x20自定义输入\x20appcode','112338XOnvSl','3vtvylO','30jnHiQn','\x0a无法获取远程应用列表,请手动输入。','156015mKdZKM','424jRqUzI','find','appName','3593436nXCJCB','custom','378891hdzNdm','App\x20Code:','(跳过,稍后配置)','length','map','5698700ajQSez','请输入\x20App\x20Code:','trim','\x20\x20(','message','includes','798398DhHcwl','cyan','未找到可用应用。','751252VAAWJW','请选择要绑定的应用:','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','Invalid\x20App\x20Code','yellow','manual','正在获取可用应用列表...','获取到\x20','✎\x20手动输入','gray','skip','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'];a44_0xf3a5=function(){return _0x3eb3d6;};return a44_0xf3a5();}export async function promptCustomAppcode(){const _0x12b2cd=a44_0x562a,_0x54f670=await input({'message':_0x12b2cd(0x8a),'validate':_0x1b02b6=>{const _0x5a07ba=_0x12b2cd,_0x3b79ad=validateAppcode(_0x1b02b6['trim']());return _0x3b79ad['valid']||_0x3b79ad[_0x5a07ba(0x8d)]||_0x5a07ba(0x95);}});return _0x54f670[_0x12b2cd(0x8b)]();}export async function promptAppSelection(_0x490b5d){const _0x54fec9=a44_0x562a,_0x16cd73=[{'name':a44_0x3f93f4[_0x54fec9(0x96)](_0x54fec9(0x9f)),'value':-0x1},..._0x490b5d['map']((_0x2b45a8,_0x21bba6)=>({'name':_0x2b45a8[_0x54fec9(0x81)]+'\x20\x20'+a44_0x3f93f4[_0x54fec9(0x9b)]('('+_0x2b45a8[_0x54fec9(0x9e)]+')'),'value':_0x21bba6}))],_0x182aea=await checkbox({'message':_0x54fec9(0x99)+a44_0x3f93f4[_0x54fec9(0x90)](_0x490b5d[_0x54fec9(0x87)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x16cd73,'loop':![]});if(_0x182aea[_0x54fec9(0x8e)](-0x1))return _0x54fec9(0x83);if(_0x182aea[_0x54fec9(0x87)]===0x0)return _0x54fec9(0x83);return _0x182aea[_0x54fec9(0x88)](_0x109607=>_0x490b5d[_0x109607]);}export async function promptSingleAppSelection(_0x2e8f04){const _0x3c018e=a44_0x562a,_0x4c87c4=[{'name':a44_0x3f93f4[_0x3c018e(0x9b)](_0x3c018e(0x9d)),'value':'skip'},{'name':a44_0x3f93f4[_0x3c018e(0x96)](_0x3c018e(0x9f)),'value':_0x3c018e(0x83)},..._0x2e8f04['map'](_0x41d3a5=>({'name':_0x41d3a5['appName']+'\x20\x20'+a44_0x3f93f4['gray']('('+_0x41d3a5[_0x3c018e(0x9e)]+')'),'value':_0x41d3a5['appCode']}))],_0x35f3ab=await select({'message':_0x3c018e(0x93),'choices':_0x4c87c4});if(_0x35f3ab==='skip')return _0x3c018e(0x9c);if(_0x35f3ab===_0x3c018e(0x83))return'custom';return _0x2e8f04[_0x3c018e(0x80)](_0x3a42fa=>_0x3a42fa[_0x3c018e(0x9e)]===_0x35f3ab);}export async function selectSingleAppcode(_0x33b24a){const _0x539d42=a44_0x562a;if(!_0x33b24a)return writeCliSideChannelLine(a44_0x3f93f4[_0x539d42(0x9b)](_0x539d42(0x94))),_fallbackOrSkip();writeCliSideChannelLine(_0x539d42(0x98));let _0x310916;try{_0x310916=await withActiveCookie(_0x33b24a,()=>listRemoteApps());}catch(_0x30f35a){writeCliSideChannelLine(a44_0x3f93f4['yellow']('无法获取远程应用列表,请手动输入。'));if(_0x30f35a instanceof Error)writeCliSideChannelLine(a44_0x3f93f4[_0x539d42(0x9b)](_0x539d42(0x8c)+_0x30f35a[_0x539d42(0x8d)]+')'));return _fallbackOrSkip();}if(_0x310916[_0x539d42(0x87)]===0x0)return writeCliSideChannelLine(a44_0x3f93f4[_0x539d42(0x96)](_0x539d42(0x91))),_fallbackOrSkip();const _0x42db49=await promptSingleAppSelection(_0x310916);if(_0x42db49===_0x539d42(0x9c))return'';if(_0x42db49===_0x539d42(0x83))return promptCustomAppcode();return _0x42db49[_0x539d42(0x9e)];}export async function selectMultipleApps(_0x344e8d){const _0x3fbbe3=a44_0x562a;writeCliSideChannelLine('正在获取可用应用列表...');let _0x1abb54;try{_0x1abb54=await withActiveCookie(_0x344e8d,()=>listRemoteApps());}catch(_0x463b4d){writeCliSideChannelLine(_0x3fbbe3(0xa3));if(_0x463b4d instanceof Error)writeCliSideChannelLine(_0x3fbbe3(0x8c)+_0x463b4d['message']+')');return _0x3fbbe3(0x83);}if(_0x1abb54[_0x3fbbe3(0x87)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x3fbbe3(0x83);return promptAppSelection(_0x1abb54);}async function _fallbackOrSkip(){const _0x170de6=a44_0x562a,_0x352576=await select({'message':_0x170de6(0x85),'choices':[{'name':a44_0x3f93f4['gray'](_0x170de6(0x86)),'value':_0x170de6(0x9c)},{'name':a44_0x3f93f4[_0x170de6(0x96)](_0x170de6(0x9a)),'value':_0x170de6(0x97)}]});if(_0x352576===_0x170de6(0x9c))return'';return promptCustomAppcode();}
1
+ (function(_0x3fde80,_0x5a9f47){const _0xf35e26=a45_0x1d89,_0x4dd716=_0x3fde80();while(!![]){try{const _0x16826c=parseInt(_0xf35e26(0xc8))/0x1+parseInt(_0xf35e26(0xcf))/0x2+-parseInt(_0xf35e26(0xbe))/0x3+-parseInt(_0xf35e26(0xd9))/0x4*(parseInt(_0xf35e26(0xc6))/0x5)+-parseInt(_0xf35e26(0xbc))/0x6+parseInt(_0xf35e26(0xd5))/0x7*(parseInt(_0xf35e26(0xbf))/0x8)+parseInt(_0xf35e26(0xc4))/0x9*(-parseInt(_0xf35e26(0xba))/0xa);if(_0x16826c===_0x5a9f47)break;else _0x4dd716['push'](_0x4dd716['shift']());}catch(_0x2efdeb){_0x4dd716['push'](_0x4dd716['shift']());}}}(a45_0x5593,0x2d09b));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x452da4 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a45_0x5593(){const _0x5baf86=['\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','316549UhLPUk','App\x20Code:','✎\x20自定义输入\x20appcode','skip','message','custom','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','541132PKGMXX','map','appName','\x20\x20(','gray','请选择要绑定的应用:','56BidYTX','trim','正在获取可用应用列表...','Invalid\x20App\x20Code','1444DfTSdA','length','未找到可用应用。','328770JGCExt','includes','615420GDQFNM','find','397974ZNsrDj','55816DKVxNY','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','appCode','✎\x20手动输入','valid','45wTARJt','yellow','815SgISXQ'];a45_0x5593=function(){return _0x5baf86;};return a45_0x5593();}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x4e9a60=await input({'message':'请输入\x20App\x20Code:','validate':_0x415c91=>{const _0x576699=a45_0x1d89,_0x131177=validateAppcode(_0x415c91[_0x576699(0xd6)]());return _0x131177[_0x576699(0xc3)]||_0x131177[_0x576699(0xcc)]||_0x576699(0xd8);}});return _0x4e9a60['trim']();}export async function promptAppSelection(_0x1b430e){const _0x49395c=a45_0x1d89,_0x673e77=[{'name':a45_0x452da4[_0x49395c(0xc5)](_0x49395c(0xca)),'value':-0x1},..._0x1b430e[_0x49395c(0xd0)]((_0x1289da,_0x307697)=>({'name':_0x1289da[_0x49395c(0xd1)]+'\x20\x20'+a45_0x452da4[_0x49395c(0xd3)]('('+_0x1289da[_0x49395c(0xc1)]+')'),'value':_0x307697}))],_0x2742ac=await checkbox({'message':'获取到\x20'+a45_0x452da4['cyan'](_0x1b430e['length'])+_0x49395c(0xc7),'choices':_0x673e77,'loop':![]});if(_0x2742ac[_0x49395c(0xbb)](-0x1))return _0x49395c(0xcd);if(_0x2742ac[_0x49395c(0xda)]===0x0)return _0x49395c(0xcd);return _0x2742ac['map'](_0x306ae1=>_0x1b430e[_0x306ae1]);}export async function promptSingleAppSelection(_0x5e0cce){const _0x645894=a45_0x1d89,_0x483c81=[{'name':a45_0x452da4[_0x645894(0xd3)](_0x645894(0xc0)),'value':_0x645894(0xcb)},{'name':a45_0x452da4[_0x645894(0xc5)](_0x645894(0xca)),'value':_0x645894(0xcd)},..._0x5e0cce[_0x645894(0xd0)](_0x539ff7=>({'name':_0x539ff7['appName']+'\x20\x20'+a45_0x452da4['gray']('('+_0x539ff7['appCode']+')'),'value':_0x539ff7[_0x645894(0xc1)]}))],_0x41a67b=await select({'message':_0x645894(0xd4),'choices':_0x483c81});if(_0x41a67b==='skip')return _0x645894(0xcb);if(_0x41a67b===_0x645894(0xcd))return _0x645894(0xcd);return _0x5e0cce[_0x645894(0xbd)](_0x43bec3=>_0x43bec3[_0x645894(0xc1)]===_0x41a67b);}function a45_0x1d89(_0x111d52,_0x149fc7){_0x111d52=_0x111d52-0xb9;const _0x55932e=a45_0x5593();let _0x1d8945=_0x55932e[_0x111d52];return _0x1d8945;}export async function selectSingleAppcode(_0x204b6c){const _0x328b60=a45_0x1d89;if(!_0x204b6c)return writeCliSideChannelLine(a45_0x452da4[_0x328b60(0xd3)](_0x328b60(0xce))),_fallbackOrSkip();writeCliSideChannelLine(_0x328b60(0xd7));let _0x4ff11d;try{_0x4ff11d=await withActiveCookie(_0x204b6c,()=>listRemoteApps());}catch(_0x12427c){writeCliSideChannelLine(a45_0x452da4[_0x328b60(0xc5)]('无法获取远程应用列表,请手动输入。'));if(_0x12427c instanceof Error)writeCliSideChannelLine(a45_0x452da4[_0x328b60(0xd3)](_0x328b60(0xd2)+_0x12427c[_0x328b60(0xcc)]+')'));return _fallbackOrSkip();}if(_0x4ff11d[_0x328b60(0xda)]===0x0)return writeCliSideChannelLine(a45_0x452da4[_0x328b60(0xc5)](_0x328b60(0xb9))),_fallbackOrSkip();const _0x242fc1=await promptSingleAppSelection(_0x4ff11d);if(_0x242fc1===_0x328b60(0xcb))return'';if(_0x242fc1===_0x328b60(0xcd))return promptCustomAppcode();return _0x242fc1[_0x328b60(0xc1)];}export async function selectMultipleApps(_0x223ca4){const _0xc52aa8=a45_0x1d89;writeCliSideChannelLine(_0xc52aa8(0xd7));let _0xf8ac60;try{_0xf8ac60=await withActiveCookie(_0x223ca4,()=>listRemoteApps());}catch(_0x538075){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x538075 instanceof Error)writeCliSideChannelLine(_0xc52aa8(0xd2)+_0x538075['message']+')');return _0xc52aa8(0xcd);}if(_0xf8ac60['length']===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0xc52aa8(0xcd);return promptAppSelection(_0xf8ac60);}async function _fallbackOrSkip(){const _0x3e14bd=a45_0x1d89,_0x3114fe=await select({'message':_0x3e14bd(0xc9),'choices':[{'name':a45_0x452da4[_0x3e14bd(0xd3)]('(跳过,稍后配置)'),'value':_0x3e14bd(0xcb)},{'name':a45_0x452da4[_0x3e14bd(0xc5)](_0x3e14bd(0xc2)),'value':'manual'}]});if(_0x3114fe==='skip')return'';return promptCustomAppcode();}
@@ -0,0 +1 @@
1
+ function a46_0x5689(_0x96ea26,_0x571e5e){_0x96ea26=_0x96ea26-0x81;var _0x41a754=a46_0x41a7();var _0x56891e=_0x41a754[_0x96ea26];return _0x56891e;}(function(_0x36d11d,_0x3321a2){var _0x2a9cd4=a46_0x5689,_0xb0d1e4=_0x36d11d();while(!![]){try{var _0x5eef51=-parseInt(_0x2a9cd4(0x88))/0x1*(parseInt(_0x2a9cd4(0x8a))/0x2)+-parseInt(_0x2a9cd4(0x8c))/0x3+parseInt(_0x2a9cd4(0x86))/0x4+-parseInt(_0x2a9cd4(0x83))/0x5*(parseInt(_0x2a9cd4(0x84))/0x6)+parseInt(_0x2a9cd4(0x8e))/0x7*(-parseInt(_0x2a9cd4(0x89))/0x8)+-parseInt(_0x2a9cd4(0x81))/0x9*(-parseInt(_0x2a9cd4(0x82))/0xa)+-parseInt(_0x2a9cd4(0x85))/0xb*(-parseInt(_0x2a9cd4(0x87))/0xc);if(_0x5eef51===_0x3321a2)break;else _0xb0d1e4['push'](_0xb0d1e4['shift']());}catch(_0x1a52ad){_0xb0d1e4['push'](_0xb0d1e4['shift']());}}}(a46_0x41a7,0xd1338));export function asDryRunResult(_0x55f71f,_0x52c145){var _0x504407=a46_0x5689;return Object[_0x504407(0x8b)](_0x55f71f,{'method':{'value':_0x52c145['method'],'enumerable':![]},'url':{'value':_0x52c145[_0x504407(0x8d)],'enumerable':![]},..._0x52c145[_0x504407(0x8f)]?{'description':{'value':_0x52c145[_0x504407(0x8f)],'enumerable':![]}}:{}});}function a46_0x41a7(){var _0x2558d7=['1408977PMQsRg','20fJlxdI','8390NIbpmP','1032idXCUL','338393dbDciA','6809576kqMxqg','1188HTfDBG','1Gokjbr','763736QFGlHq','3233062eicAes','defineProperties','4319397xXhUDR','url','63fyIahL','description'];a46_0x41a7=function(){return _0x2558d7;};return a46_0x41a7();}
@@ -1 +1 @@
1
- const a45_0xc8e576=a45_0x8984;(function(_0xa18455,_0x21ce52){const _0x51ea9e=a45_0x8984,_0x399db5=_0xa18455();while(!![]){try{const _0x486567=-parseInt(_0x51ea9e(0x1a9))/0x1+-parseInt(_0x51ea9e(0x19b))/0x2*(-parseInt(_0x51ea9e(0x1a3))/0x3)+parseInt(_0x51ea9e(0x19a))/0x4+parseInt(_0x51ea9e(0x1a6))/0x5*(-parseInt(_0x51ea9e(0x199))/0x6)+-parseInt(_0x51ea9e(0x1a4))/0x7+-parseInt(_0x51ea9e(0x1aa))/0x8*(-parseInt(_0x51ea9e(0x195))/0x9)+parseInt(_0x51ea9e(0x19e))/0xa;if(_0x486567===_0x21ce52)break;else _0x399db5['push'](_0x399db5['shift']());}catch(_0x3e4880){_0x399db5['push'](_0x399db5['shift']());}}}(a45_0xc323,0x1d537));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':a45_0xc8e576(0x193),'type':a45_0xc8e576(0x198),'required':!![],'description':a45_0xc8e576(0x1a7),'pattern':DATASET_CODE_PATTERN};function a45_0x8984(_0x242277,_0x30c7cd){_0x242277=_0x242277-0x193;const _0xc323c2=a45_0xc323();let _0x89845a=_0xc323c2[_0x242277];return _0x89845a;}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a45_0xc8e576(0x19d),'description':a45_0xc8e576(0x1a7)};export const SQLCODE_FLAG={'name':a45_0xc8e576(0x1a1),'type':a45_0xc8e576(0x198),'required':!![],'description':a45_0xc8e576(0x194),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a45_0xc8e576(0x19c)}};export const APPCODE_FLAG_OPTIONAL={'name':a45_0xc8e576(0x1a8),'type':a45_0xc8e576(0x198),'required':![],'description':a45_0xc8e576(0x1a5)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a45_0xc8e576(0x1a0)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a45_0xc8e576(0x1a2),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};function a45_0xc323(){const _0x3ea7ce=['1673744eGmrbo','MYSQL','code','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','9UkAnDM','dbtype','Database\x20product\x20type','string','24gcspZs','264632GqVCZn','2rsssXC','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','datasetcode','59500uFDEvm','POSTGRESQL','App\x20code\x20(e.g.\x20app-xxxxx)','sqlcode','number','459426iIDzVi','12747xymADu','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','205175tIOTPf','Dataset\x20code\x20(32-char\x20hex\x20UUID)','appcode','148388sqotjU'];a45_0xc323=function(){return _0x3ea7ce;};return a45_0xc323();}export const DB_TYPE_FLAG={'name':a45_0xc8e576(0x196),'type':'string','required':!![],'description':a45_0xc8e576(0x197),'enum':[a45_0xc8e576(0x1ab),a45_0xc8e576(0x19f)]};
1
+ const a47_0x5b91bd=a47_0x1843;(function(_0x5d8a63,_0x543c89){const _0x20c74d=a47_0x1843,_0x461091=_0x5d8a63();while(!![]){try{const _0x4d0e56=-parseInt(_0x20c74d(0x78))/0x1+-parseInt(_0x20c74d(0x79))/0x2+parseInt(_0x20c74d(0x73))/0x3+-parseInt(_0x20c74d(0x6f))/0x4*(parseInt(_0x20c74d(0x6d))/0x5)+parseInt(_0x20c74d(0x74))/0x6*(-parseInt(_0x20c74d(0x6c))/0x7)+parseInt(_0x20c74d(0x6a))/0x8+-parseInt(_0x20c74d(0x75))/0x9*(-parseInt(_0x20c74d(0x68))/0xa);if(_0x4d0e56===_0x543c89)break;else _0x461091['push'](_0x461091['shift']());}catch(_0x4294ee){_0x461091['push'](_0x461091['shift']());}}}(a47_0x29a4,0x7c998));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x5b91bd(0x71)};function a47_0x1843(_0x1b49c3,_0x3df317){_0x1b49c3=_0x1b49c3-0x65;const _0x29a4cd=a47_0x29a4();let _0x184380=_0x29a4cd[_0x1b49c3];return _0x184380;}export const CODE_FLAG={'name':a47_0x5b91bd(0x72),'type':a47_0x5b91bd(0x76),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x5b91bd(0x77),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};function a47_0x29a4(){const _0x18455c=['code','1842255LTCwoM','3567804wWXERl','243KWidJH','string','datasetcode','681305bxaDhB','1227922WYMDEW','number','appcode','MYSQL','473730FbxSIX','sqlcode','7392496upeVMf','Database\x20product\x20type','7xfpbrk','2084790GDTzXL','POSTGRESQL','4MVxSmn','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'];a47_0x29a4=function(){return _0x18455c;};return a47_0x29a4();}export const SQLCODE_FLAG={'name':a47_0x5b91bd(0x69),'type':a47_0x5b91bd(0x76),'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':a47_0x5b91bd(0x70)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x5b91bd(0x66),'type':a47_0x5b91bd(0x76),'required':![],'description':'App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)'};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x5b91bd(0x65),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':'dbtype','type':a47_0x5b91bd(0x76),'required':!![],'description':a47_0x5b91bd(0x6b),'enum':[a47_0x5b91bd(0x67),a47_0x5b91bd(0x6e)]};
@@ -1 +1 @@
1
- function a46_0x2fe8(){const _0x240d95=['25401156aWGJZL','App\x20Code\x20cannot\x20be\x20empty','602267fSjnGS','6AsfrSh','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1469796cauCVc','15956VkaueI','180iDbduo','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','7FAxWSB','93dQfOLZ','905000CRvbfT','trim','56385zjJlxN','9574768eilAyL'];a46_0x2fe8=function(){return _0x240d95;};return a46_0x2fe8();}function a46_0x431e(_0x3ff324,_0xd66bef){_0x3ff324=_0x3ff324-0xee;const _0x2fe80d=a46_0x2fe8();let _0x431e66=_0x2fe80d[_0x3ff324];return _0x431e66;}(function(_0x256083,_0x34c315){const _0x3cf951=a46_0x431e,_0x243bf1=_0x256083();while(!![]){try{const _0x44c3e1=parseInt(_0x3cf951(0xf1))/0x1*(parseInt(_0x3cf951(0xf2))/0x2)+-parseInt(_0x3cf951(0xfa))/0x3*(-parseInt(_0x3cf951(0xf5))/0x4)+-parseInt(_0x3cf951(0xfd))/0x5+parseInt(_0x3cf951(0xf4))/0x6*(-parseInt(_0x3cf951(0xf9))/0x7)+-parseInt(_0x3cf951(0xee))/0x8+-parseInt(_0x3cf951(0xf6))/0x9*(parseInt(_0x3cf951(0xfb))/0xa)+parseInt(_0x3cf951(0xef))/0xb;if(_0x44c3e1===_0x34c315)break;else _0x243bf1['push'](_0x243bf1['shift']());}catch(_0x475471){_0x243bf1['push'](_0x243bf1['shift']());}}}(a46_0x2fe8,0xee6b7));export function validateAppcode(_0x2b7a3c){const _0x18b682=a46_0x431e,_0x51bcc9=_0x2b7a3c[_0x18b682(0xfc)]();if(!_0x51bcc9)return{'valid':![],'message':_0x18b682(0xf0)};if(_0x51bcc9['length']>0x64)return{'valid':![],'message':_0x18b682(0xf3)};if(!/^[A-Za-z0-9_-]+$/[_0x18b682(0xf8)](_0x51bcc9))return{'valid':![],'message':_0x18b682(0xf7)};return{'valid':!![]};}
1
+ function a48_0xf0cd(_0x5f9a0d,_0x66729a){_0x5f9a0d=_0x5f9a0d-0x1ca;const _0x40c5ab=a48_0x40c5();let _0xf0cd5=_0x40c5ab[_0x5f9a0d];return _0xf0cd5;}function a48_0x40c5(){const _0x545fde=['2357676uxDgDy','1439799JBDtbh','test','App\x20Code\x20cannot\x20exceed\x20100\x20characters','App\x20Code\x20cannot\x20be\x20empty','1591408HALZwK','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','8PMYHFu','length','148308kSwgDY','1724418jteMju','354612NIuswr','trim','788nYevfy','785BBIpzV'];a48_0x40c5=function(){return _0x545fde;};return a48_0x40c5();}(function(_0x30bdd7,_0xb6e2f6){const _0xf059fd=a48_0xf0cd,_0x55127a=_0x30bdd7();while(!![]){try{const _0x220179=parseInt(_0xf059fd(0x1d6))/0x1+parseInt(_0xf059fd(0x1d8))/0x2+parseInt(_0xf059fd(0x1ce))/0x3+-parseInt(_0xf059fd(0x1cb))/0x4*(-parseInt(_0xf059fd(0x1cc))/0x5)+-parseInt(_0xf059fd(0x1cd))/0x6+parseInt(_0xf059fd(0x1d2))/0x7+-parseInt(_0xf059fd(0x1d4))/0x8*(parseInt(_0xf059fd(0x1d7))/0x9);if(_0x220179===_0xb6e2f6)break;else _0x55127a['push'](_0x55127a['shift']());}catch(_0x1efcc6){_0x55127a['push'](_0x55127a['shift']());}}}(a48_0x40c5,0x75028));export function validateAppcode(_0x4f4cdc){const _0x2dba59=a48_0xf0cd,_0x143c12=_0x4f4cdc[_0x2dba59(0x1ca)]();if(!_0x143c12)return{'valid':![],'message':_0x2dba59(0x1d1)};if(_0x143c12[_0x2dba59(0x1d5)]>0x64)return{'valid':![],'message':_0x2dba59(0x1d0)};if(!/^[A-Za-z0-9_-]+$/[_0x2dba59(0x1cf)](_0x143c12))return{'valid':![],'message':_0x2dba59(0x1d3)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a47_0x4d6b5f=a47_0x163a;function a47_0x2ecb(){const _0x3bab79=['4944RzXVqU','\x20config\x20get\x20--key\x20<key>','6CgnIAY','key','2410324JQAgEz','Key\x20not\x20found:\x20','9GDNNFt','7BgQgWP','Missing\x20key.','765552FwJDap','1349854tiEGHN','5rzyHzJ','67483NbPoVT','validation','2894784uadzMh','Usage:\x20','app','40zRsRrs','134006fBrbiA','1838404VeryzE','object'];a47_0x2ecb=function(){return _0x3bab79;};return a47_0x2ecb();}(function(_0x4e1fa1,_0x234ef3){const _0x565240=a47_0x163a,_0x4f0b33=_0x4e1fa1();while(!![]){try{const _0x105085=-parseInt(_0x565240(0x201))/0x1*(parseInt(_0x565240(0x1f7))/0x2)+parseInt(_0x565240(0x203))/0x3+-parseInt(_0x565240(0x1f8))/0x4*(parseInt(_0x565240(0x1f0))/0x5)+-parseInt(_0x565240(0x1fc))/0x6*(parseInt(_0x565240(0x1fe))/0x7)+-parseInt(_0x565240(0x1f3))/0x8*(parseInt(_0x565240(0x200))/0x9)+-parseInt(_0x565240(0x1f6))/0xa*(parseInt(_0x565240(0x204))/0xb)+-parseInt(_0x565240(0x1fa))/0xc*(-parseInt(_0x565240(0x1f1))/0xd);if(_0x105085===_0x234ef3)break;else _0x4f0b33['push'](_0x4f0b33['shift']());}catch(_0x484133){_0x4f0b33['push'](_0x4f0b33['shift']());}}}(a47_0x2ecb,0x417ba));function a47_0x163a(_0x5ae375,_0x7b5697){_0x5ae375=_0x5ae375-0x1f0;const _0x2ecb59=a47_0x2ecb();let _0x163a50=_0x2ecb59[_0x5ae375];return _0x163a50;}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(_0x52ab0c){const _0x4c4c13=a47_0x163a,_0x2abb91=_0x52ab0c['str'](_0x4c4c13(0x1fd));if(!_0x2abb91)throw CliErrors[_0x4c4c13(0x1f2)](_0x4c4c13(0x202),_0x4c4c13(0x1f4)+CLI_BIN_NAME+_0x4c4c13(0x1fb));const _0x13120e=readConfig(),_0x21b56c=_0x2abb91===_0x4c4c13(0x1f5)?'appcode':_0x2abb91,_0x43729=_0x13120e[_0x21b56c];if(_0x43729===undefined)throw CliErrors[_0x4c4c13(0x1f2)](_0x4c4c13(0x1ff)+_0x2abb91);return{'ok':!![],'data':typeof _0x43729===_0x4c4c13(0x1f9)?_0x43729:{[_0x21b56c]:_0x43729},'message':typeof _0x43729===_0x4c4c13(0x1f9)?undefined:String(_0x43729)};}export const configGetDefinition={'service':'config','command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a47_0x4d6b5f(0x1fd),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a49_0xa56422=a49_0x36f2;function a49_0x3cb3(){const _0x56fa6b=['4272215QgQhfh','key','app','177OFadIU','object','get','3858yVoVWw','378PQWmnM','appcode','25251xypKaC','read','str','7qiNEap','string','Get\x20a\x20config\x20value\x20by\x20key','8927424UOZQqQ','validation','20TdiOKL','16290yiFclX','Usage:\x20','1885140iXRdaH','14486696CeQEZl','12AVAjUG'];a49_0x3cb3=function(){return _0x56fa6b;};return a49_0x3cb3();}(function(_0x3c4821,_0x53cb18){const _0xb01d42=a49_0x36f2,_0x583357=_0x3c4821();while(!![]){try{const _0x32d40d=-parseInt(_0xb01d42(0x1a3))/0x1*(-parseInt(_0xb01d42(0x1a6))/0x2)+parseInt(_0xb01d42(0x1a9))/0x3*(-parseInt(_0xb01d42(0x1b1))/0x4)+-parseInt(_0xb01d42(0x1a0))/0x5*(-parseInt(_0xb01d42(0x19f))/0x6)+parseInt(_0xb01d42(0x1ac))/0x7*(-parseInt(_0xb01d42(0x19e))/0x8)+parseInt(_0xb01d42(0x1a7))/0x9*(parseInt(_0xb01d42(0x1b2))/0xa)+parseInt(_0xb01d42(0x1af))/0xb+-parseInt(_0xb01d42(0x1b4))/0xc;if(_0x32d40d===_0x53cb18)break;else _0x583357['push'](_0x583357['shift']());}catch(_0x48a86a){_0x583357['push'](_0x583357['shift']());}}}(a49_0x3cb3,0xe0af0));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a49_0x36f2(_0x6296b1,_0x419db0){_0x6296b1=_0x6296b1-0x19e;const _0x3cb3bd=a49_0x3cb3();let _0x36f293=_0x3cb3bd[_0x6296b1];return _0x36f293;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x27f94e){const _0x333cb6=a49_0x36f2,_0x4f99b3=_0x27f94e[_0x333cb6(0x1ab)](_0x333cb6(0x1a1));if(!_0x4f99b3)throw CliErrors['validation']('Missing\x20key.',_0x333cb6(0x1b3)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x481fe4=readConfig(),_0x75259f=_0x4f99b3===_0x333cb6(0x1a2)?_0x333cb6(0x1a8):_0x4f99b3,_0x4e67f8=_0x481fe4[_0x75259f];if(_0x4e67f8===undefined)throw CliErrors[_0x333cb6(0x1b0)]('Key\x20not\x20found:\x20'+_0x4f99b3);return{'ok':!![],'data':typeof _0x4e67f8===_0x333cb6(0x1a4)?_0x4e67f8:{[_0x75259f]:_0x4e67f8},'message':typeof _0x4e67f8===_0x333cb6(0x1a4)?undefined:String(_0x4e67f8)};}export const configGetDefinition={'service':'config','command':a49_0xa56422(0x1a5),'description':a49_0xa56422(0x1ae),'risk':a49_0xa56422(0x1aa),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a49_0xa56422(0x1a1),'type':a49_0xa56422(0x1ad),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x2aac98,_0x2f425a){const _0x165ea2=a48_0x1c2d,_0x94aff7=_0x2aac98();while(!![]){try{const _0xed4f5a=parseInt(_0x165ea2(0x75))/0x1+-parseInt(_0x165ea2(0x7c))/0x2+parseInt(_0x165ea2(0x78))/0x3*(-parseInt(_0x165ea2(0x79))/0x4)+parseInt(_0x165ea2(0x76))/0x5+-parseInt(_0x165ea2(0x77))/0x6+-parseInt(_0x165ea2(0x7b))/0x7+parseInt(_0x165ea2(0x7a))/0x8;if(_0xed4f5a===_0x2f425a)break;else _0x94aff7['push'](_0x94aff7['shift']());}catch(_0x50dda4){_0x94aff7['push'](_0x94aff7['shift']());}}}(a48_0x334f,0x809b1));function a48_0x1c2d(_0xcf75e5,_0x1269bd){_0xcf75e5=_0xcf75e5-0x75;const _0x334f6c=a48_0x334f();let _0x1c2d39=_0x334f6c[_0xcf75e5];return _0x1c2d39;}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a48_0x334f(){const _0x5d80ca=['16901192GXYfCa','2528302AgfVRn','1164256ZdImDE','42419QQkueS','1260975mbVpfG','1272774wDcXYX','177AerHFu','49156dPKxEn'];a48_0x334f=function(){return _0x5d80ca;};return a48_0x334f();}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ (function(_0xfe7a91,_0x3801a7){const _0x362f58=a50_0x50ad,_0xf8ad1f=_0xfe7a91();while(!![]){try{const _0x3ee483=parseInt(_0x362f58(0xfe))/0x1+parseInt(_0x362f58(0xfa))/0x2*(parseInt(_0x362f58(0xf6))/0x3)+-parseInt(_0x362f58(0xff))/0x4*(-parseInt(_0x362f58(0xf7))/0x5)+parseInt(_0x362f58(0xf5))/0x6+parseInt(_0x362f58(0xfc))/0x7*(-parseInt(_0x362f58(0xf8))/0x8)+parseInt(_0x362f58(0xfb))/0x9*(-parseInt(_0x362f58(0xfd))/0xa)+-parseInt(_0x362f58(0xf9))/0xb;if(_0x3ee483===_0x3801a7)break;else _0xf8ad1f['push'](_0xf8ad1f['shift']());}catch(_0x4d8bdd){_0xf8ad1f['push'](_0xf8ad1f['shift']());}}}(a50_0x34d1,0x5da75));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a50_0x50ad(_0x3e3efd,_0x2d79b0){_0x3e3efd=_0x3e3efd-0xf5;const _0x34d140=a50_0x34d1();let _0x50ad0b=_0x34d140[_0x3e3efd];return _0x50ad0b;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a50_0x34d1(){const _0x3f332e=['4089672ALQRts','6bkkDDP','181690XVsKJz','8iQcGmX','2612962EPzoEx','167344bZROvZ','981TSVfer','1609615nhPeIn','53190AIbBvC','363879pezADE','24mYWtQI'];a50_0x34d1=function(){return _0x3f332e;};return a50_0x34d1();}
@@ -1 +1 @@
1
- const a49_0xd8e279=a49_0xc416;(function(_0x377cce,_0x2b6f1e){const _0x2a934c=a49_0xc416,_0x12eab5=_0x377cce();while(!![]){try{const _0x546d5e=-parseInt(_0x2a934c(0x1f1))/0x1+-parseInt(_0x2a934c(0x1f8))/0x2+parseInt(_0x2a934c(0x1f3))/0x3+parseInt(_0x2a934c(0x1ee))/0x4+parseInt(_0x2a934c(0x1ed))/0x5+-parseInt(_0x2a934c(0x1f5))/0x6+parseInt(_0x2a934c(0x1ef))/0x7*(-parseInt(_0x2a934c(0x1f9))/0x8);if(_0x546d5e===_0x2b6f1e)break;else _0x12eab5['push'](_0x12eab5['shift']());}catch(_0x4c67aa){_0x12eab5['push'](_0x12eab5['shift']());}}}(a49_0x121e,0xe46a8));function a49_0x121e(){const _0x3c9d4d=['global','9102205JjKWrX','4361960WfRWLM','555289pLdwIw','List\x20all\x20config\x20values','328454naDCWN','bool','2144478pTNaiv','list','8896428sBGUdf','read','config','171406CDLiHv','80txcjTf','boolean'];a49_0x121e=function(){return _0x3c9d4d;};return a49_0x121e();}function a49_0xc416(_0x49266a,_0x9f1566){_0x49266a=_0x49266a-0x1ec;const _0x121e1a=a49_0x121e();let _0xc41656=_0x121e1a[_0x49266a];return _0xc41656;}import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x99e8b0){const _0x82d147=a49_0xc416,_0x41773e=_0x99e8b0[_0x82d147(0x1f2)](_0x82d147(0x1ec))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x41773e};}export const configListDefinition={'service':a49_0xd8e279(0x1f7),'command':a49_0xd8e279(0x1f4),'description':a49_0xd8e279(0x1f0),'risk':a49_0xd8e279(0x1f6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a49_0xd8e279(0x1ec),'type':a49_0xd8e279(0x1fa),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a51_0x2f88bb=a51_0x1222;function a51_0x1222(_0x50dded,_0x157e5e){_0x50dded=_0x50dded-0xb3;const _0x350862=a51_0x3508();let _0x122202=_0x350862[_0x50dded];return _0x122202;}(function(_0x2e5ef7,_0x3ae054){const _0x19028a=a51_0x1222,_0x29d9e9=_0x2e5ef7();while(!![]){try{const _0xcdc40c=-parseInt(_0x19028a(0xb6))/0x1+-parseInt(_0x19028a(0xba))/0x2*(-parseInt(_0x19028a(0xb9))/0x3)+-parseInt(_0x19028a(0xb5))/0x4*(parseInt(_0x19028a(0xbb))/0x5)+-parseInt(_0x19028a(0xc2))/0x6+-parseInt(_0x19028a(0xbc))/0x7*(-parseInt(_0x19028a(0xb3))/0x8)+parseInt(_0x19028a(0xbe))/0x9+-parseInt(_0x19028a(0xb8))/0xa*(-parseInt(_0x19028a(0xbf))/0xb);if(_0xcdc40c===_0x3ae054)break;else _0x29d9e9['push'](_0x29d9e9['shift']());}catch(_0x459a3d){_0x29d9e9['push'](_0x29d9e9['shift']());}}}(a51_0x3508,0x627b9));import{readScopedConfig}from'../../commands/config/shared.js';function a51_0x3508(){const _0x2846b1=['boolean','3179070TueWFE','4474283DJoFkU','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','global','4094034EJWGtU','16ZjBeEi','list','2644364sAmVzz','114031PXnijw','bool','10KeGPmv','890871kvPPUj','2EZCjse','5lgOLzf','2813671JtGrWL'];a51_0x3508=function(){return _0x2846b1;};return a51_0x3508();}import{readConfig}from'../../utils/config.js';async function execute(_0x5d8a1e){const _0x5bb450=a51_0x1222,_0x490f73=_0x5d8a1e[_0x5bb450(0xb7)](_0x5bb450(0xc1))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x490f73};}export const configListDefinition={'service':'config','command':a51_0x2f88bb(0xb4),'description':'List\x20all\x20config\x20values','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x2f88bb(0xc1),'type':a51_0x2f88bb(0xbd),'description':a51_0x2f88bb(0xc0),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a50_0x77db68=a50_0x39f9;(function(_0x280de5,_0x3529ce){const _0x4f24da=a50_0x39f9,_0x323cb4=_0x280de5();while(!![]){try{const _0x3bf848=-parseInt(_0x4f24da(0x15c))/0x1*(-parseInt(_0x4f24da(0x17f))/0x2)+-parseInt(_0x4f24da(0x178))/0x3+parseInt(_0x4f24da(0x152))/0x4*(parseInt(_0x4f24da(0x163))/0x5)+-parseInt(_0x4f24da(0x177))/0x6*(-parseInt(_0x4f24da(0x153))/0x7)+-parseInt(_0x4f24da(0x15b))/0x8*(parseInt(_0x4f24da(0x156))/0x9)+-parseInt(_0x4f24da(0x159))/0xa+-parseInt(_0x4f24da(0x158))/0xb;if(_0x3bf848===_0x3529ce)break;else _0x323cb4['push'](_0x323cb4['shift']());}catch(_0x524bf3){_0x323cb4['push'](_0x323cb4['shift']());}}}(a50_0x5a09,0xc02b5));function a50_0x5a09(){const _0x497b54=['\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','353025JfxNHt','locale','Top-level\x20key\x20\x22','\x22.\x20Allowed:\x20','apps','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','\x20app\x20add\x20<name>\x20--appcode\x20','Invalid\x20value\x20for\x20\x22','value','app','config','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Invalid\x20locale\x20value.','keys','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Usage:\x20','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Project','set','appcode','6xjjSbR','346239ETuHpL','\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','riskLevel','\x20appcode\x20set\x20to:\x20','global','Global','validation','291706fGGhOZ','length','Settable\x20top-level\x20keys:\x20','36YOpITd','5000051YMudBP','env','join','747LitTaz','str','3499441EoEvBR','2584540Bgurgc','Config\x20value','85936ARardK','7SCIigH','Missing\x20key.','string','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','\x22\x20is\x20not\x20settable.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.'];a50_0x5a09=function(){return _0x497b54;};return a50_0x5a09();}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a50_0x39f9(_0x52153e,_0x2846e6){_0x52153e=_0x52153e-0x152;const _0x5a098a=a50_0x5a09();let _0x39f926=_0x5a098a[_0x52153e];return _0x39f926;}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x102056){const _0x28e50c=a50_0x39f9,_0x2b4a25=_0x102056[_0x28e50c(0x157)]('key'),_0xd18c8e=_0x102056[_0x28e50c(0x157)](_0x28e50c(0x16b));if(!_0x2b4a25)throw CliErrors[_0x28e50c(0x17e)](_0x28e50c(0x15d),_0x28e50c(0x172)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0xd18c8e===undefined||_0xd18c8e==='')throw CliErrors[_0x28e50c(0x17e)]('Missing\x20value.',_0x28e50c(0x172)+CLI_BIN_NAME+_0x28e50c(0x162));if(_0xd18c8e[_0x28e50c(0x180)]>0x1f4)throw CliErrors[_0x28e50c(0x17e)](_0x28e50c(0x173));if(!isTopLevelConfigKey(_0x2b4a25))throw CliErrors[_0x28e50c(0x17e)](_0x28e50c(0x165)+_0x2b4a25+_0x28e50c(0x160),_0x28e50c(0x181)+getTopLevelConfigKeySummary());if(_0x2b4a25===_0x28e50c(0x17a))throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x2b4a25]&&!CONFIG_ENUM_VALUES[_0x2b4a25]['includes'](_0xd18c8e))throw CliErrors[_0x28e50c(0x17e)](_0x28e50c(0x16a)+_0x2b4a25+_0x28e50c(0x166)+CONFIG_ENUM_VALUES[_0x2b4a25][_0x28e50c(0x155)](',\x20'));if(_0x2b4a25===_0x28e50c(0x164)&&!normalizeLocale(_0xd18c8e))throw CliErrors[_0x28e50c(0x17e)](_0x28e50c(0x16f),_0x28e50c(0x171));const _0x5742b6={'global':_0x102056['bool'](_0x28e50c(0x17c))},_0x30f984=resolveWriteScope(_0x5742b6),_0x55a2bb=readScopedConfig(_0x30f984);let _0x5c8e3a=_0x2b4a25,_0x3254ed=_0xd18c8e;_0x2b4a25==='app'&&(_0x5c8e3a='appcode',delete _0x55a2bb[_0x28e50c(0x16c)]);_0x2b4a25===_0x28e50c(0x164)&&(_0x3254ed=normalizeLocale(_0xd18c8e));if(_0x2b4a25==='env'){_0x3254ed=normalizeEnv(_0xd18c8e);if(!isProduction(_0x3254ed)&&!isDaily(_0x3254ed))throw CliErrors[_0x28e50c(0x17e)](_0x28e50c(0x15f),_0x28e50c(0x161));}if(_0x2b4a25===_0x28e50c(0x176)){const _0x34cd13=_0x55a2bb[_0x28e50c(0x167)]&&typeof _0x55a2bb[_0x28e50c(0x167)]==='object'?Object[_0x28e50c(0x170)](_0x55a2bb[_0x28e50c(0x167)]):[];if(_0x34cd13[_0x28e50c(0x180)]>0x0)throw CliErrors[_0x28e50c(0x17e)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+_0x28e50c(0x169)+_0x3254ed+'`,\x20`'+CLI_BIN_NAME+_0x28e50c(0x179));const _0x3607b1=buildCanonicalProjectConfig({..._0x55a2bb},{'appCodes':[_0x3254ed],'env':typeof _0x55a2bb[_0x28e50c(0x154)]===_0x28e50c(0x15e)?_0x55a2bb['env']:undefined});writeScopedConfig(_0x3607b1,_0x30f984);const _0x234d83=_0x30f984===_0x28e50c(0x17c)?_0x28e50c(0x17d):'Project';return{'ok':!![],'message':'✓\x20'+_0x234d83+_0x28e50c(0x17b)+_0x3254ed+_0x28e50c(0x16e)};}_0x55a2bb[_0x5c8e3a]=_0x3254ed,writeScopedConfig(_0x55a2bb,_0x30f984);const _0x25d740=_0x30f984==='global'?_0x28e50c(0x17d):_0x28e50c(0x174);return{'ok':!![],'message':'✓\x20'+_0x25d740+'\x20'+_0x5c8e3a+'\x20set\x20to:\x20'+_0x3254ed};}export const configSetDefinition={'service':a50_0x77db68(0x16d),'command':a50_0x77db68(0x175),'description':'Set\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a50_0x77db68(0x15e),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a50_0x77db68(0x16b),'type':a50_0x77db68(0x15e),'description':a50_0x77db68(0x15a),'required':!![]},{'name':a50_0x77db68(0x17c),'type':'boolean','description':a50_0x77db68(0x168),'default':![]}],'execute':execute};
1
+ function a52_0x3612(_0x1f418a,_0x266a84){_0x1f418a=_0x1f418a-0x15f;const _0x4d6888=a52_0x4d68();let _0x361283=_0x4d6888[_0x1f418a];return _0x361283;}const a52_0x4b4ddb=a52_0x3612;(function(_0x508f1d,_0x521834){const _0x492531=a52_0x3612,_0x345023=_0x508f1d();while(!![]){try{const _0x511ea4=parseInt(_0x492531(0x165))/0x1+parseInt(_0x492531(0x163))/0x2*(parseInt(_0x492531(0x17e))/0x3)+-parseInt(_0x492531(0x15f))/0x4+-parseInt(_0x492531(0x179))/0x5*(-parseInt(_0x492531(0x177))/0x6)+-parseInt(_0x492531(0x16f))/0x7+parseInt(_0x492531(0x16c))/0x8+-parseInt(_0x492531(0x166))/0x9;if(_0x511ea4===_0x521834)break;else _0x345023['push'](_0x345023['shift']());}catch(_0x452c0b){_0x345023['push'](_0x345023['shift']());}}}(a52_0x4d68,0xc5d9b));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a52_0x4d68(){const _0x454c1a=['locale','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x22.\x20Allowed:\x20','6110568SAWGCW','\x20app\x20add\x20<name>\x20--appcode\x20','boolean','2958795DAVSyE','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','validation','global','str','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Global','6YuyHoB','join','6736880uZqgba','set','\x20set\x20to:\x20','object','config','16977rWJtUS','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','riskLevel','bool','Missing\x20key.','Invalid\x20value\x20for\x20\x22','Missing\x20value.','apps','string','appcode','includes','app','length','\x20appcode\x20set\x20to:\x20','env','`,\x20`','6141576NhvkuS','Project','Usage:\x20','key','14HAqckj','Top-level\x20key\x20\x22','1062040LWsYur','3999384zQhZBO','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','value'];a52_0x4d68=function(){return _0x454c1a;};return a52_0x4d68();}import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x5975d7){const _0x3dea1f=a52_0x3612,_0xce45f1=_0x5975d7[_0x3dea1f(0x174)](_0x3dea1f(0x162)),_0x1ecc82=_0x5975d7[_0x3dea1f(0x174)]('value');if(!_0xce45f1)throw CliErrors[_0x3dea1f(0x172)](_0x3dea1f(0x182),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x1ecc82===undefined||_0x1ecc82==='')throw CliErrors[_0x3dea1f(0x172)](_0x3dea1f(0x184),_0x3dea1f(0x161)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x1ecc82[_0x3dea1f(0x18a)]>0x1f4)throw CliErrors[_0x3dea1f(0x172)](_0x3dea1f(0x17f));if(!isTopLevelConfigKey(_0xce45f1))throw CliErrors['validation'](_0x3dea1f(0x164)+_0xce45f1+'\x22\x20is\x20not\x20settable.','Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0xce45f1===_0x3dea1f(0x180))throw CliErrors[_0x3dea1f(0x172)](_0x3dea1f(0x16a));if(CONFIG_ENUM_VALUES[_0xce45f1]&&!CONFIG_ENUM_VALUES[_0xce45f1][_0x3dea1f(0x188)](_0x1ecc82))throw CliErrors[_0x3dea1f(0x172)](_0x3dea1f(0x183)+_0xce45f1+_0x3dea1f(0x16b)+CONFIG_ENUM_VALUES[_0xce45f1][_0x3dea1f(0x178)](',\x20'));if(_0xce45f1==='locale'&&!normalizeLocale(_0x1ecc82))throw CliErrors[_0x3dea1f(0x172)]('Invalid\x20locale\x20value.',_0x3dea1f(0x171));const _0x5a07c9={'global':_0x5975d7[_0x3dea1f(0x181)]('global')},_0x2046c4=resolveWriteScope(_0x5a07c9),_0x1c807c=readScopedConfig(_0x2046c4);let _0x478a09=_0xce45f1,_0x5620db=_0x1ecc82;_0xce45f1===_0x3dea1f(0x189)&&(_0x478a09=_0x3dea1f(0x187),delete _0x1c807c['app']);_0xce45f1===_0x3dea1f(0x169)&&(_0x5620db=normalizeLocale(_0x1ecc82));if(_0xce45f1===_0x3dea1f(0x18c)){_0x5620db=normalizeEnv(_0x1ecc82);if(!isProduction(_0x5620db)&&!isDaily(_0x5620db))throw CliErrors[_0x3dea1f(0x172)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x3dea1f(0x170));}if(_0xce45f1===_0x3dea1f(0x187)){const _0x4d41ae=_0x1c807c[_0x3dea1f(0x185)]&&typeof _0x1c807c['apps']===_0x3dea1f(0x17c)?Object['keys'](_0x1c807c[_0x3dea1f(0x185)]):[];if(_0x4d41ae[_0x3dea1f(0x18a)]>0x0)throw CliErrors[_0x3dea1f(0x172)](_0x3dea1f(0x175),'Use\x20`'+CLI_BIN_NAME+_0x3dea1f(0x16d)+_0x5620db+_0x3dea1f(0x18d)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x24d986=buildCanonicalProjectConfig({..._0x1c807c},{'appCodes':[_0x5620db],'env':typeof _0x1c807c[_0x3dea1f(0x18c)]===_0x3dea1f(0x186)?_0x1c807c['env']:undefined});writeScopedConfig(_0x24d986,_0x2046c4);const _0x46ec70=_0x2046c4==='global'?'Global':_0x3dea1f(0x160);return{'ok':!![],'message':'✓\x20'+_0x46ec70+_0x3dea1f(0x18b)+_0x5620db+_0x3dea1f(0x167)};}_0x1c807c[_0x478a09]=_0x5620db,writeScopedConfig(_0x1c807c,_0x2046c4);const _0x17604f=_0x2046c4===_0x3dea1f(0x173)?_0x3dea1f(0x176):'Project';return{'ok':!![],'message':'✓\x20'+_0x17604f+'\x20'+_0x478a09+_0x3dea1f(0x17b)+_0x5620db};}export const configSetDefinition={'service':a52_0x4b4ddb(0x17d),'command':a52_0x4b4ddb(0x17a),'description':'Set\x20a\x20config\x20value','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a52_0x4b4ddb(0x162),'type':a52_0x4b4ddb(0x186),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a52_0x4b4ddb(0x168),'type':'string','description':'Config\x20value','required':!![]},{'name':a52_0x4b4ddb(0x173),'type':a52_0x4b4ddb(0x16e),'description':'Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x4da189,_0x1e598c){var _0x2655a3=a51_0xd6d0,_0x3e444a=_0x4da189();while(!![]){try{var _0xdbda8f=-parseInt(_0x2655a3(0x95))/0x1+-parseInt(_0x2655a3(0x8f))/0x2+parseInt(_0x2655a3(0x98))/0x3*(-parseInt(_0x2655a3(0x8d))/0x4)+parseInt(_0x2655a3(0x91))/0x5+parseInt(_0x2655a3(0x94))/0x6+parseInt(_0x2655a3(0x8e))/0x7*(parseInt(_0x2655a3(0x93))/0x8)+parseInt(_0x2655a3(0x8a))/0x9;if(_0xdbda8f===_0x1e598c)break;else _0x3e444a['push'](_0x3e444a['shift']());}catch(_0x1dbdec){_0x3e444a['push'](_0x3e444a['shift']());}}}(a51_0x57fd,0x2d7a5));function a51_0xd6d0(_0x5bf8f8,_0x340164){_0x5bf8f8=_0x5bf8f8-0x8a;var _0x57fd7f=a51_0x57fd();var _0xd6d067=_0x57fd7f[_0x5bf8f8];return _0xd6d067;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};function a51_0x57fd(){var _0x19db4b=['714610DxIgnu','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','1589860tkxmrD','validation','1960sAJXrt','1716630vPvQpg','30382ZvWVii','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','global','7563auYOgH','2683314oNqskK','project','\x20init`\x20first.','536eDNasE','273coTsJE'];a51_0x57fd=function(){return _0x19db4b;};return a51_0x57fd();}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x66f532){var _0x4fd5a2=a51_0xd6d0;if(_0x66f532[_0x4fd5a2(0x97)])return _0x4fd5a2(0x97);if(!isInProject())throw CliErrors[_0x4fd5a2(0x92)](_0x4fd5a2(0x96),_0x4fd5a2(0x90)+CLI_BIN_NAME+_0x4fd5a2(0x8c));return _0x4fd5a2(0x8b);}export function readScopedConfig(_0x4a0f54){return readConfigFile(resolveWriteConfigPath(_0x4a0f54));}export function writeScopedConfig(_0x365593,_0xc0e106){writeConfigFile(resolveWriteConfigPath(_0xc0e106),_0x365593);}
1
+ (function(_0x1bda9c,_0x253386){var _0x1b8196=a53_0x2e91,_0x5cef32=_0x1bda9c();while(!![]){try{var _0x3d8550=-parseInt(_0x1b8196(0xbc))/0x1+parseInt(_0x1b8196(0xb2))/0x2+-parseInt(_0x1b8196(0xb1))/0x3+-parseInt(_0x1b8196(0xbd))/0x4*(parseInt(_0x1b8196(0xbb))/0x5)+parseInt(_0x1b8196(0xb5))/0x6*(parseInt(_0x1b8196(0xb8))/0x7)+-parseInt(_0x1b8196(0xbf))/0x8*(-parseInt(_0x1b8196(0xb3))/0x9)+parseInt(_0x1b8196(0xb6))/0xa*(-parseInt(_0x1b8196(0xb9))/0xb);if(_0x3d8550===_0x253386)break;else _0x5cef32['push'](_0x5cef32['shift']());}catch(_0xeb3218){_0x5cef32['push'](_0x5cef32['shift']());}}}(a53_0x3693,0x40001));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x1813f8){var _0x2c71dd=a53_0x2e91;if(_0x1813f8['global'])return _0x2c71dd(0xba);if(!isInProject())throw CliErrors[_0x2c71dd(0xb4)](_0x2c71dd(0xc0),'Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'+CLI_BIN_NAME+_0x2c71dd(0xb7));return _0x2c71dd(0xbe);}function a53_0x2e91(_0x28d40f,_0x42a117){_0x28d40f=_0x28d40f-0xb1;var _0x369313=a53_0x3693();var _0x2e9103=_0x369313[_0x28d40f];return _0x2e9103;}export function readScopedConfig(_0x3eaca2){return readConfigFile(resolveWriteConfigPath(_0x3eaca2));}export function writeScopedConfig(_0x2e53fd,_0x48c39e){writeConfigFile(resolveWriteConfigPath(_0x48c39e),_0x2e53fd);}function a53_0x3693(){var _0x2a1a7e=['55QKtddI','62161pdNkXl','51328PPGBDw','project','2104LeSyIC','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','699555kSqsmR','862418BDUHBv','17838PeIJIo','validation','47274MrKQXJ','10GEwpeg','\x20init`\x20first.','119krUNQe','4265525nGUEYQ','global'];a53_0x3693=function(){return _0x2a1a7e;};return a53_0x3693();}