@lovrabet/rabetbase-cli 2.3.6-beta.1 → 2.3.6

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 (239) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  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 -1
  120. package/lib/commands/permit/page-get.js +1 -1
  121. package/lib/commands/permit/page-set.js +1 -1
  122. package/lib/commands/permit/role-apis-set.js +1 -1
  123. package/lib/commands/permit/role-menus-set.js +1 -1
  124. package/lib/commands/permit/role-menus.js +1 -1
  125. package/lib/commands/permit/shared.js +1 -1
  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 -1
  139. package/lib/commands/role/delete.js +1 -1
  140. package/lib/commands/role/detail.js +1 -1
  141. package/lib/commands/role/index.js +1 -1
  142. package/lib/commands/role/list.js +1 -1
  143. package/lib/commands/role/shared.js +1 -1
  144. package/lib/commands/role/update.js +1 -1
  145. package/lib/commands/role/user-add.js +1 -1
  146. package/lib/commands/role/user-remove.js +1 -1
  147. package/lib/commands/role/user-resolve.js +1 -1
  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 -1
  163. package/lib/commands/workspace/index.js +1 -1
  164. package/lib/commands/workspace/remove.js +1 -1
  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 +1 -1
@@ -1 +1 @@
1
- const a36_0x485f5f=a36_0x314f;(function(_0x14563d,_0x293db8){const _0x3f6765=a36_0x314f,_0x23afbb=_0x14563d();while(!![]){try{const _0x504e18=-parseInt(_0x3f6765(0x16c))/0x1+-parseInt(_0x3f6765(0x18a))/0x2+-parseInt(_0x3f6765(0x17a))/0x3+parseInt(_0x3f6765(0x169))/0x4+-parseInt(_0x3f6765(0x17f))/0x5*(parseInt(_0x3f6765(0x180))/0x6)+parseInt(_0x3f6765(0x19e))/0x7+parseInt(_0x3f6765(0x1a3))/0x8;if(_0x504e18===_0x293db8)break;else _0x23afbb['push'](_0x23afbb['shift']());}catch(_0x2d3d5e){_0x23afbb['push'](_0x23afbb['shift']());}}}(a36_0x318a,0x4a787));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_0x314f(_0x2b487a,_0x211312){_0x2b487a=_0x2b487a-0x164;const _0x318af2=a36_0x318a();let _0x314f18=_0x318af2[_0x2b487a];return _0x314f18;}import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x485f5f(0x174),'command':a36_0x485f5f(0x188),'description':a36_0x485f5f(0x193),'risk':a36_0x485f5f(0x1a7),'flags':[{'name':'type','type':a36_0x485f5f(0x195),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a36_0x485f5f(0x186),a36_0x485f5f(0x178),'HOOK']},{'name':a36_0x485f5f(0x16a),'type':a36_0x485f5f(0x199),'description':a36_0x485f5f(0x18e)}],async 'dryRun'(_0x3709df){const _0x3330bc=a36_0x485f5f,_0x39885d=loadBffProjectConfig(_0x3709df['appCode']),_0x34717c=await readBffLockFile(_0x39885d[_0x3330bc(0x165)]),{appLock:_0x4c35f8}=ensureLockScope(_0x34717c??createEmptyBffLock(),_0x3709df[_0x3330bc(0x190)],_0x39885d[_0x3330bc(0x166)],_0x3330bc(0x188)),_0x497b7e=normalizeBffType(_0x3709df['str'](_0x3330bc(0x19b)))??undefined,_0x187a96=buildDatasetCodeToAliasMap(_0x3709df[_0x3330bc(0x1a8)],_0x3709df['appCode']),[_0x282410,_0x1415c4]=await Promise[_0x3330bc(0x175)]([listBffScripts(_0x3709df[_0x3330bc(0x190)],_0x497b7e),getBffScriptStatistics(_0x3709df[_0x3330bc(0x190)])]),_0xd9871a=createHookLocationMap(_0x1415c4),_0x56fe1b=[];for(const _0x2d9f30 of _0x282410){const _0x100aff=resolveRemoteScriptTarget(_0x39885d,_0x2d9f30,_0xd9871a,_0x4c35f8[_0x3330bc(0x170)],_0x187a96);if(!_0x100aff){_0x56fe1b[_0x3330bc(0x1a5)]({'scriptType':_0x2d9f30[_0x3330bc(0x197)],'functionName':_0x2d9f30['functionName']??'','status':_0x3330bc(0x182),'reason':_0x3330bc(0x19a)});continue;}const _0x2abba8=_0x4c35f8[_0x3330bc(0x170)][_0x100aff[_0x3330bc(0x1a6)]],_0x37ff4d=_0x2d9f30['scriptContent']!=null?computeContentHash(_0x2d9f30[_0x3330bc(0x168)]):undefined,_0x3b678b=await hasUnsyncedLocalChanges(_0x100aff[_0x3330bc(0x1a0)],_0x2abba8,_0x37ff4d);_0x56fe1b['push']({'lockKey':_0x100aff[_0x3330bc(0x1a6)],'filePath':_0x100aff['filePath'],'remoteId':_0x2d9f30['id']??null,'status':_0x3b678b?_0x3330bc(0x18c):_0x3330bc(0x181)});}return{'method':_0x3330bc(0x194),'url':_0x3330bc(0x17e)+_0x3709df[_0x3330bc(0x190)]+(_0x497b7e?_0x3330bc(0x1aa)+_0x497b7e:''),'body':{'appCode':_0x3709df[_0x3330bc(0x190)],'filterType':_0x497b7e??null,'files':_0x56fe1b},'description':'Would\x20inspect\x20'+_0x56fe1b[_0x3330bc(0x1ad)]+_0x3330bc(0x177)};},async 'execute'(_0x4f9d87){const _0x4884c5=a36_0x485f5f,_0x194987=loadBffProjectConfig(_0x4f9d87[_0x4884c5(0x190)]),_0x22f9ba=await readBffLockFile(_0x194987['lockFilePath']),{lockData:_0x3b3033,appLock:_0x3551e0}=ensureLockScope(_0x22f9ba??createEmptyBffLock(),_0x4f9d87[_0x4884c5(0x190)],_0x194987[_0x4884c5(0x166)],_0x4884c5(0x188)),_0x3e6ad1=normalizeBffType(_0x4f9d87[_0x4884c5(0x167)](_0x4884c5(0x19b)))??undefined;if(_0x4f9d87['str'](_0x4884c5(0x19b))&&!_0x3e6ad1)throw CliErrors[_0x4884c5(0x1a2)](_0x4884c5(0x1ac));const [_0x39ae3c,_0x5891b3]=await Promise[_0x4884c5(0x175)]([listBffScripts(_0x4f9d87[_0x4884c5(0x190)],_0x3e6ad1),getBffScriptStatistics(_0x4f9d87[_0x4884c5(0x190)])]);if(_0x39ae3c[_0x4884c5(0x1ad)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20BFF\x20scripts\x20found.'};const _0x45f15c=_0x4f9d87[_0x4884c5(0x1a9)]('force');if(_0x45f15c&&!_0x4f9d87['nonInteractive']){const _0x4aa82f=await confirmForce();if(!_0x4aa82f)throw CliErrors[_0x4884c5(0x1a4)](_0x4884c5(0x184));}if(_0x45f15c&&_0x4f9d87[_0x4884c5(0x171)]){}const _0x375d8f=buildDatasetCodeToAliasMap(_0x4f9d87[_0x4884c5(0x1a8)],_0x4f9d87[_0x4884c5(0x190)]),_0x56976d=createHookLocationMap(_0x5891b3),_0x504868=JSON[_0x4884c5(0x19f)](JSON[_0x4884c5(0x1ab)](_0x3b3033)),_0x1f49f6=_0x4f9d87[_0x4884c5(0x190)],_0x4f8cde=_0x504868[_0x4884c5(0x19c)][_0x1f49f6];if(!_0x4f8cde)throw new Error(_0x4884c5(0x191)+_0x1f49f6+_0x4884c5(0x173));const _0x4c01a6=[],_0x1e3f86=[],_0x5b5607=[];for(const _0x3eef8a of _0x39ae3c){const _0x513567=resolveRemoteScriptTarget(_0x194987,_0x3eef8a,_0x56976d,_0x3551e0['functions'],_0x375d8f);if(!_0x513567){_0x1e3f86[_0x4884c5(0x1a5)]({'lockKey':_0x3eef8a[_0x4884c5(0x197)]+'/'+_0x3eef8a[_0x4884c5(0x183)],'reason':'unresolvable\x20target\x20path'});continue;}const _0x2b4b8a=_0x3551e0[_0x4884c5(0x170)][_0x513567[_0x4884c5(0x1a6)]];try{if(!_0x3eef8a['id'])throw new Error('Remote\x20script\x20missing\x20id.');if(_0x3eef8a[_0x4884c5(0x168)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x1e3944=_0x3eef8a[_0x4884c5(0x168)],_0x469bf9=computeContentHash(_0x1e3944);if(!_0x45f15c){const _0x5beecc=await hasUnsyncedLocalChanges(_0x513567[_0x4884c5(0x1a0)],_0x2b4b8a,_0x469bf9);if(_0x5beecc){_0x1e3f86[_0x4884c5(0x1a5)]({'lockKey':_0x513567[_0x4884c5(0x1a6)],'reason':'local\x20unsynced\x20changes'});continue;}}await ensureParentDirectory(_0x513567['filePath']),await writeFile(_0x513567[_0x4884c5(0x1a0)],_0x1e3944,_0x4884c5(0x187));const _0x3eda23={'hash':_0x469bf9,'remoteId':_0x3eef8a['id'],'version':_0x3eef8a[_0x4884c5(0x1a1)]};_0x513567[_0x4884c5(0x19b)]==='HOOK'&&_0x513567[_0x4884c5(0x16e)]&&(_0x3eda23[_0x4884c5(0x18f)]=_0x513567[_0x4884c5(0x16e)][_0x4884c5(0x18f)],_0x3eda23[_0x4884c5(0x196)]=_0x513567['hookLocation']['datasetCode'],_0x3eda23[_0x4884c5(0x17c)]=_0x513567[_0x4884c5(0x16e)][_0x4884c5(0x17c)],_0x3eda23[_0x4884c5(0x198)]=_0x513567[_0x4884c5(0x16e)]['functionNode']),_0x4f8cde[_0x4884c5(0x170)][_0x513567[_0x4884c5(0x1a6)]]=_0x3eda23,_0x4c01a6[_0x4884c5(0x1a5)]({'lockKey':_0x513567[_0x4884c5(0x1a6)],'remoteId':_0x3eef8a['id']});}catch(_0x334c77){_0x5b5607[_0x4884c5(0x1a5)]({'lockKey':_0x513567[_0x4884c5(0x1a6)],'error':_0x334c77 instanceof Error?_0x334c77[_0x4884c5(0x185)]:String(_0x334c77)});}}return _0x4f8cde[_0x4884c5(0x18b)]=new Date()[_0x4884c5(0x17b)](),await writeBffLockFile(_0x194987[_0x4884c5(0x165)],_0x504868),{'ok':_0x5b5607[_0x4884c5(0x1ad)]===0x0,'data':{'pulled':_0x4c01a6,'skipped':_0x1e3f86,'failed':_0x5b5607},'message':_0x4884c5(0x18d)+_0x4c01a6[_0x4884c5(0x1ad)]+_0x4884c5(0x16b)+_0x1e3f86[_0x4884c5(0x1ad)]+_0x4884c5(0x17d)+_0x5b5607[_0x4884c5(0x1ad)]+_0x4884c5(0x189)};}};async function hasUnsyncedLocalChanges(_0x1d7929,_0x22be74,_0xd33111){const _0x2eb70d=a36_0x485f5f;if(!await fileExists(_0x1d7929))return![];const _0xe9bf6c=await computeFileHash(_0x1d7929);if(!_0x22be74)return _0xd33111?_0xe9bf6c!==_0xd33111:!![];return _0xe9bf6c!==_0x22be74[_0x2eb70d(0x176)];}function buildDatasetCodeToAliasMap(_0x5a8088,_0x13e5e1){const _0x3d2bed=a36_0x485f5f,_0x264c81=loadAliasMap(_0x5a8088,undefined,resolveApiFilePath(_0x5a8088,_0x13e5e1));return new Map(_0x264c81[_0x3d2bed(0x19d)](_0x5a8cbc=>[_0x5a8cbc[_0x3d2bed(0x196)],_0x5a8cbc[_0x3d2bed(0x18f)]]));}async function confirmForce(){const _0x3c94fc=a36_0x485f5f,_0x320723=createInterface({'input':process['stdin'],'output':process[_0x3c94fc(0x164)]}),_0x4e75ce=await new Promise(_0x463fd7=>{const _0x408ccc=_0x3c94fc;_0x320723[_0x408ccc(0x179)]('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x463fd7);});return _0x320723[_0x3c94fc(0x16f)](),['y',_0x3c94fc(0x192)][_0x3c94fc(0x16d)](_0x4e75ce[_0x3c94fc(0x172)]()['toLowerCase']());}function a36_0x318a(){const _0x2e487d=['toISOString','operationType','\x20skipped,\x20','/api/management/library/scripts/list?appCode=','175325FJGnxW','30dFdTzU','would_pull','skipped','functionName','Force\x20pull\x20cancelled.','message','COMMON','utf8','pull','\x20failed','222230FRcrqs','lastSync','conflict','Pull\x20complete:\x20','Force\x20overwrite\x20local\x20unsynced\x20changes','alias','appCode','Lock\x20scope\x20for\x20app\x20\x22','yes','Pull\x20remote\x20BFF\x20scripts\x20to\x20local','GET','string','datasetCode','scriptType','functionNode','boolean','unresolvable\x20target\x20path','type','apps','map','3897859qzQlTe','parse','filePath','version','validation','4000544JycudR','cancelled','push','lockKey','write','apiDir','bool','&type=','stringify','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','length','stderr','lockFilePath','scriptsRoot','str','scriptContent','1244292zCUCcJ','force','\x20pulled,\x20','303080cSdSyN','includes','hookLocation','close','functions','nonInteractive','trim','\x22\x20not\x20found\x20after\x20ensureLockScope.','bff','all','hash','\x20remote\x20BFF\x20script(s)\x20for\x20pull','ENDPOINT','question','1420281KEuAxm'];a36_0x318a=function(){return _0x2e487d;};return a36_0x318a();}
1
+ const a36_0x3d64b3=a36_0x6e4c;(function(_0xe3f36e,_0x574a1b){const _0x3e5ef3=a36_0x6e4c,_0x4aa738=_0xe3f36e();while(!![]){try{const _0x4c69f1=-parseInt(_0x3e5ef3(0x14f))/0x1+-parseInt(_0x3e5ef3(0x163))/0x2*(-parseInt(_0x3e5ef3(0x16b))/0x3)+-parseInt(_0x3e5ef3(0x17a))/0x4+-parseInt(_0x3e5ef3(0x147))/0x5*(parseInt(_0x3e5ef3(0x17c))/0x6)+parseInt(_0x3e5ef3(0x166))/0x7*(-parseInt(_0x3e5ef3(0x17e))/0x8)+parseInt(_0x3e5ef3(0x154))/0x9+parseInt(_0x3e5ef3(0x15a))/0xa;if(_0x4c69f1===_0x574a1b)break;else _0x4aa738['push'](_0x4aa738['shift']());}catch(_0x489bc8){_0x4aa738['push'](_0x4aa738['shift']());}}}(a36_0x4944,0x3be41));import{createInterface}from'node:readline';function a36_0x6e4c(_0xe54c98,_0xd92220){_0xe54c98=_0xe54c98-0x13d;const _0x49446b=a36_0x4944();let _0x6e4c8b=_0x49446b[_0xe54c98];return _0x6e4c8b;}import{writeFile}from'node:fs/promises';import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a36_0x4944(){const _0x168576=['toLowerCase','force','apiDir','hookLocation','384026lyaMYF','write','push','35LVGZcU','str','functionName','hash','stdin','3NxdWmT','Force\x20pull\x20cancelled.','No\x20remote\x20BFF\x20scripts\x20found.','&type=','alias','operationType','lockKey','filePath','scriptContent','map','yes','unresolvable\x20target\x20path','functionNode','Would\x20inspect\x20','datasetCode','218440JpMRvn','cancelled','1238406BUGRjR','lockFilePath','164712fvWIZg','includes','Lock\x20scope\x20for\x20app\x20\x22','parse','HOOK','stderr','apps','Pull\x20complete:\x20','Remote\x20script\x20missing\x20id.','COMMON','lastSync','\x20pulled,\x20','functions','\x22\x20not\x20found\x20after\x20ensureLockScope.','bff','5kseYJj','local\x20unsynced\x20changes','string','version','GET','all','skipped','\x20failed','297643AHBdLI','--type\x20must\x20be\x20COMMON,\x20ENDPOINT,\x20or\x20HOOK.','toISOString','ENDPOINT','would_pull','1142739RsSdtq','scriptType','pull','nonInteractive','length','\x20skipped,\x20','5879280MXPKaC','scriptsRoot','boolean','appCode','type'];a36_0x4944=function(){return _0x168576;};return a36_0x4944();}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,ensureParentDirectory,fileExists,normalizeBffType,resolveRemoteScriptTarget}from'../../core/bff/file-system.js';import{computeContentHash,computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{CliErrors}from'../../errors.js';export const bffPull={'service':a36_0x3d64b3(0x146),'command':'pull','description':'Pull\x20remote\x20BFF\x20scripts\x20to\x20local','risk':a36_0x3d64b3(0x164),'flags':[{'name':'type','type':a36_0x3d64b3(0x149),'description':'Pull\x20only\x20this\x20script\x20type','enum':[a36_0x3d64b3(0x141),a36_0x3d64b3(0x152),a36_0x3d64b3(0x182)]},{'name':a36_0x3d64b3(0x160),'type':a36_0x3d64b3(0x15c),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x1a437b){const _0x19c8f7=a36_0x3d64b3,_0x26a39d=loadBffProjectConfig(_0x1a437b[_0x19c8f7(0x15d)]),_0x1f1513=await readBffLockFile(_0x26a39d[_0x19c8f7(0x17d)]),{appLock:_0x5d6f8b}=ensureLockScope(_0x1f1513??createEmptyBffLock(),_0x1a437b['appCode'],_0x26a39d[_0x19c8f7(0x15b)],_0x19c8f7(0x156)),_0x3f2640=normalizeBffType(_0x1a437b['str'](_0x19c8f7(0x15e)))??undefined,_0x2de9d6=buildDatasetCodeToAliasMap(_0x1a437b[_0x19c8f7(0x161)],_0x1a437b[_0x19c8f7(0x15d)]),[_0x486ee9,_0x27f4b0]=await Promise[_0x19c8f7(0x14c)]([listBffScripts(_0x1a437b[_0x19c8f7(0x15d)],_0x3f2640),getBffScriptStatistics(_0x1a437b[_0x19c8f7(0x15d)])]),_0x15890c=createHookLocationMap(_0x27f4b0),_0x54239e=[];for(const _0x5a7afe of _0x486ee9){const _0x584fa2=resolveRemoteScriptTarget(_0x26a39d,_0x5a7afe,_0x15890c,_0x5d6f8b[_0x19c8f7(0x144)],_0x2de9d6);if(!_0x584fa2){_0x54239e[_0x19c8f7(0x165)]({'scriptType':_0x5a7afe[_0x19c8f7(0x155)],'functionName':_0x5a7afe[_0x19c8f7(0x168)]??'','status':_0x19c8f7(0x14d),'reason':_0x19c8f7(0x176)});continue;}const _0x3f8c5f=_0x5d6f8b[_0x19c8f7(0x144)][_0x584fa2['lockKey']],_0x2b6f58=_0x5a7afe[_0x19c8f7(0x173)]!=null?computeContentHash(_0x5a7afe[_0x19c8f7(0x173)]):undefined,_0x304632=await hasUnsyncedLocalChanges(_0x584fa2[_0x19c8f7(0x172)],_0x3f8c5f,_0x2b6f58);_0x54239e[_0x19c8f7(0x165)]({'lockKey':_0x584fa2['lockKey'],'filePath':_0x584fa2[_0x19c8f7(0x172)],'remoteId':_0x5a7afe['id']??null,'status':_0x304632?'conflict':_0x19c8f7(0x153)});}return{'method':_0x19c8f7(0x14b),'url':'/api/management/library/scripts/list?appCode='+_0x1a437b['appCode']+(_0x3f2640?_0x19c8f7(0x16e)+_0x3f2640:''),'body':{'appCode':_0x1a437b[_0x19c8f7(0x15d)],'filterType':_0x3f2640??null,'files':_0x54239e},'description':_0x19c8f7(0x178)+_0x54239e[_0x19c8f7(0x158)]+'\x20remote\x20BFF\x20script(s)\x20for\x20pull'};},async 'execute'(_0x1651f8){const _0x1ceb8a=a36_0x3d64b3,_0x43afec=loadBffProjectConfig(_0x1651f8['appCode']),_0x5aa469=await readBffLockFile(_0x43afec[_0x1ceb8a(0x17d)]),{lockData:_0x51c471,appLock:_0x304ad5}=ensureLockScope(_0x5aa469??createEmptyBffLock(),_0x1651f8['appCode'],_0x43afec[_0x1ceb8a(0x15b)],_0x1ceb8a(0x156)),_0x24177c=normalizeBffType(_0x1651f8[_0x1ceb8a(0x167)](_0x1ceb8a(0x15e)))??undefined;if(_0x1651f8['str'](_0x1ceb8a(0x15e))&&!_0x24177c)throw CliErrors['validation'](_0x1ceb8a(0x150));const [_0x1e8487,_0x4a6bd7]=await Promise['all']([listBffScripts(_0x1651f8[_0x1ceb8a(0x15d)],_0x24177c),getBffScriptStatistics(_0x1651f8[_0x1ceb8a(0x15d)])]);if(_0x1e8487[_0x1ceb8a(0x158)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x1ceb8a(0x16d)};const _0x4b2586=_0x1651f8['bool'](_0x1ceb8a(0x160));if(_0x4b2586&&!_0x1651f8['nonInteractive']){const _0x404207=await confirmForce();if(!_0x404207)throw CliErrors[_0x1ceb8a(0x17b)](_0x1ceb8a(0x16c));}if(_0x4b2586&&_0x1651f8[_0x1ceb8a(0x157)]){}const _0x14a37d=buildDatasetCodeToAliasMap(_0x1651f8[_0x1ceb8a(0x161)],_0x1651f8[_0x1ceb8a(0x15d)]),_0x315f96=createHookLocationMap(_0x4a6bd7),_0x24a995=JSON[_0x1ceb8a(0x181)](JSON['stringify'](_0x51c471)),_0x21f4cf=_0x1651f8['appCode'],_0x32e4fb=_0x24a995[_0x1ceb8a(0x13e)][_0x21f4cf];if(!_0x32e4fb)throw new Error(_0x1ceb8a(0x180)+_0x21f4cf+_0x1ceb8a(0x145));const _0x279164=[],_0x32d19d=[],_0x3e8233=[];for(const _0x220e53 of _0x1e8487){const _0x294e44=resolveRemoteScriptTarget(_0x43afec,_0x220e53,_0x315f96,_0x304ad5[_0x1ceb8a(0x144)],_0x14a37d);if(!_0x294e44){_0x32d19d['push']({'lockKey':_0x220e53[_0x1ceb8a(0x155)]+'/'+_0x220e53['functionName'],'reason':_0x1ceb8a(0x176)});continue;}const _0x3a1150=_0x304ad5[_0x1ceb8a(0x144)][_0x294e44[_0x1ceb8a(0x171)]];try{if(!_0x220e53['id'])throw new Error(_0x1ceb8a(0x140));if(_0x220e53[_0x1ceb8a(0x173)]==null)throw new Error('Remote\x20script\x20missing\x20content.');const _0x905ffb=_0x220e53[_0x1ceb8a(0x173)],_0xe0c3ba=computeContentHash(_0x905ffb);if(!_0x4b2586){const _0x29feaa=await hasUnsyncedLocalChanges(_0x294e44[_0x1ceb8a(0x172)],_0x3a1150,_0xe0c3ba);if(_0x29feaa){_0x32d19d[_0x1ceb8a(0x165)]({'lockKey':_0x294e44[_0x1ceb8a(0x171)],'reason':_0x1ceb8a(0x148)});continue;}}await ensureParentDirectory(_0x294e44['filePath']),await writeFile(_0x294e44['filePath'],_0x905ffb,'utf8');const _0x4bc45d={'hash':_0xe0c3ba,'remoteId':_0x220e53['id'],'version':_0x220e53[_0x1ceb8a(0x14a)]};_0x294e44[_0x1ceb8a(0x15e)]===_0x1ceb8a(0x182)&&_0x294e44['hookLocation']&&(_0x4bc45d[_0x1ceb8a(0x16f)]=_0x294e44[_0x1ceb8a(0x162)][_0x1ceb8a(0x16f)],_0x4bc45d[_0x1ceb8a(0x179)]=_0x294e44['hookLocation'][_0x1ceb8a(0x179)],_0x4bc45d[_0x1ceb8a(0x170)]=_0x294e44[_0x1ceb8a(0x162)][_0x1ceb8a(0x170)],_0x4bc45d[_0x1ceb8a(0x177)]=_0x294e44[_0x1ceb8a(0x162)][_0x1ceb8a(0x177)]),_0x32e4fb['functions'][_0x294e44[_0x1ceb8a(0x171)]]=_0x4bc45d,_0x279164[_0x1ceb8a(0x165)]({'lockKey':_0x294e44['lockKey'],'remoteId':_0x220e53['id']});}catch(_0x496c42){_0x3e8233[_0x1ceb8a(0x165)]({'lockKey':_0x294e44['lockKey'],'error':_0x496c42 instanceof Error?_0x496c42['message']:String(_0x496c42)});}}return _0x32e4fb[_0x1ceb8a(0x142)]=new Date()[_0x1ceb8a(0x151)](),await writeBffLockFile(_0x43afec[_0x1ceb8a(0x17d)],_0x24a995),{'ok':_0x3e8233[_0x1ceb8a(0x158)]===0x0,'data':{'pulled':_0x279164,'skipped':_0x32d19d,'failed':_0x3e8233},'message':_0x1ceb8a(0x13f)+_0x279164['length']+_0x1ceb8a(0x143)+_0x32d19d[_0x1ceb8a(0x158)]+_0x1ceb8a(0x159)+_0x3e8233[_0x1ceb8a(0x158)]+_0x1ceb8a(0x14e)};}};async function hasUnsyncedLocalChanges(_0x24ee14,_0x527df6,_0x419326){const _0x2a832c=a36_0x3d64b3;if(!await fileExists(_0x24ee14))return![];const _0x3c53ec=await computeFileHash(_0x24ee14);if(!_0x527df6)return _0x419326?_0x3c53ec!==_0x419326:!![];return _0x3c53ec!==_0x527df6[_0x2a832c(0x169)];}function buildDatasetCodeToAliasMap(_0x589ad5,_0x1978c9){const _0x21734e=a36_0x3d64b3,_0x2f352f=loadAliasMap(_0x589ad5,undefined,resolveApiFilePath(_0x589ad5,_0x1978c9));return new Map(_0x2f352f[_0x21734e(0x174)](_0x5d1548=>[_0x5d1548[_0x21734e(0x179)],_0x5d1548[_0x21734e(0x16f)]]));}async function confirmForce(){const _0x2c7c34=a36_0x3d64b3,_0x4bb3a6=createInterface({'input':process[_0x2c7c34(0x16a)],'output':process[_0x2c7c34(0x13d)]}),_0x51d301=await new Promise(_0x4e0877=>{_0x4bb3a6['question']('Force\x20pull\x20will\x20overwrite\x20local\x20unsynced\x20changes.\x20Continue?\x20[y/N]\x20',_0x4e0877);});return _0x4bb3a6['close'](),['y',_0x2c7c34(0x175)][_0x2c7c34(0x17f)](_0x51d301['trim']()[_0x2c7c34(0x15f)]());}
@@ -1 +1 @@
1
- const a37_0x263ff2=a37_0x4d3d;(function(_0x3071e5,_0x3c36c3){const _0xcdde29=a37_0x4d3d,_0x1ea30e=_0x3071e5();while(!![]){try{const _0x2682aa=-parseInt(_0xcdde29(0x11f))/0x1+parseInt(_0xcdde29(0x160))/0x2+-parseInt(_0xcdde29(0x145))/0x3+parseInt(_0xcdde29(0x14d))/0x4*(parseInt(_0xcdde29(0x142))/0x5)+parseInt(_0xcdde29(0x14b))/0x6+parseInt(_0xcdde29(0x12f))/0x7*(parseInt(_0xcdde29(0x146))/0x8)+-parseInt(_0xcdde29(0x15d))/0x9;if(_0x2682aa===_0x3c36c3)break;else _0x1ea30e['push'](_0x1ea30e['shift']());}catch(_0x5966b1){_0x1ea30e['push'](_0x1ea30e['shift']());}}}(a37_0x33f4,0x4c341));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';function a37_0x33f4(){const _0x44e8e0=['1736fdSOLy','unchanged','alias','Run\x20`','message','3042732DmvegS','push','487012OlaPYx','datasetCode','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','HOOK','filter','hash','length','has','Local\x20function\x20not\x20found:\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','some','lockKey','create','toISOString','description','scriptsRoot','4719618cQVTmO','script','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','584630FPyQbW','\x22.\x20','get','update','cleared','Force\x20push\x20ignoring\x20hash\x20protection','every','datasetCodeToDataset','Incomplete\x20HOOK\x20path:\x20','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','/api/management/library/scripts/save','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','boolean','join','runtime\x20cache\x20clear\x20failed','\x20skipped,\x20','version','parse','validation','status','328575AIyKpm','string','high-risk-write','operationType','utf8','Push\x20only\x20this\x20script\x20type','Would\x20inspect\x20','datasetId','lockFilePath','COMMON','str','filePath','No\x20local\x20BFF\x20functions\x20found.','appCode','lastSync','\x20uploaded,\x20','4732ZBjZra','runtime\x20cache\x20not\x20needed','\x22\x20not\x20found\x20after\x20ensureLockScope.','would_push','values',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','map','functionNode','name','Lock\x20scope\x20for\x20app\x20\x22','remoteId','aliasToDatasetCode','apps','ENDPOINT','force','attempted','type','Push\x20complete:\x20','Cannot\x20resolve\x20dataset\x20for\x20\x22','15fwTtJX','stringify','functions','438846RHzIjv'];a37_0x33f4=function(){return _0x44e8e0;};return a37_0x33f4();}import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':a37_0x263ff2(0x14c),'description':'Push\x20local\x20BFF\x20scripts\x20to\x20remote','risk':a37_0x263ff2(0x121),'flags':[{'name':a37_0x263ff2(0x13f),'type':a37_0x263ff2(0x120),'description':a37_0x263ff2(0x124),'enum':[a37_0x263ff2(0x128),a37_0x263ff2(0x13c),a37_0x263ff2(0x150)]},{'name':'name','type':a37_0x263ff2(0x120),'description':a37_0x263ff2(0x114)},{'name':a37_0x263ff2(0x13d),'type':a37_0x263ff2(0x117),'description':a37_0x263ff2(0x110)}],async 'dryRun'(_0x412fad){const _0x334947=a37_0x263ff2,_0x17e00b=loadBffProjectConfig(_0x412fad[_0x334947(0x12c)]),_0x3eac18=await readBffLockFile(_0x17e00b[_0x334947(0x127)]),{appLock:_0x58bd7f}=ensureLockScope(_0x3eac18??createEmptyBffLock(),_0x412fad[_0x334947(0x12c)],_0x17e00b['scriptsRoot'],'push'),_0x2ff8f1=await getTargetFunctions(_0x17e00b,_0x412fad),_0x1e44dc=_0x412fad['bool'](_0x334947(0x13d)),_0x2bf97c=[];for(const _0x4ab753 of _0x2ff8f1){const _0x13e0b9=await computeFileHash(_0x4ab753[_0x334947(0x12a)]),_0x42e219=_0x58bd7f[_0x334947(0x144)][_0x4ab753[_0x334947(0x158)]],_0x389b07=!!_0x42e219&&_0x42e219[_0x334947(0x152)]===_0x13e0b9;_0x2bf97c[_0x334947(0x14c)]({'lockKey':_0x4ab753[_0x334947(0x158)],'filePath':_0x4ab753[_0x334947(0x12a)],'remoteId':_0x42e219?.['remoteId']??null,'mode':_0x42e219?.[_0x334947(0x139)]?_0x334947(0x10e):_0x334947(0x159),'status':!_0x1e44dc&&_0x389b07?_0x334947(0x147):_0x334947(0x132)});}return{'method':'POST','url':_0x334947(0x115),'body':{'appCode':_0x412fad[_0x334947(0x12c)],'force':_0x1e44dc,'files':_0x2bf97c,'cacheClearAtRuntime':_0x2bf97c[_0x334947(0x157)](_0x2a20ea=>_0x2a20ea[_0x334947(0x11e)]===_0x334947(0x132)),'cacheClearAtRuntimeTimes':_0x2bf97c[_0x334947(0x157)](_0x455337=>_0x455337[_0x334947(0x11e)]===_0x334947(0x132))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x334947(0x125)+_0x2bf97c['length']+_0x334947(0x156)};},async 'execute'(_0x4cbb53){const _0x4021b6=a37_0x263ff2,_0x1060e8=loadBffProjectConfig(_0x4cbb53[_0x4021b6(0x12c)]),_0x16b244=await readBffLockFile(_0x1060e8[_0x4021b6(0x127)]),{lockData:_0xa20550,appLock:_0x17bffe}=ensureLockScope(_0x16b244??createEmptyBffLock(),_0x4cbb53[_0x4021b6(0x12c)],_0x1060e8[_0x4021b6(0x15c)],'push'),_0x42d55b=await getTargetFunctions(_0x1060e8,_0x4cbb53);if(_0x42d55b['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x4021b6(0x12b)};const _0x4a5072=_0x4cbb53['bool'](_0x4021b6(0x13d)),_0x5e7dec=JSON[_0x4021b6(0x11c)](JSON[_0x4021b6(0x143)](_0xa20550)),_0x5e41f2=_0x5e7dec[_0x4021b6(0x13b)][_0x4cbb53[_0x4021b6(0x12c)]];if(!_0x5e41f2)throw new Error(_0x4021b6(0x138)+_0x4cbb53['appCode']+_0x4021b6(0x131));const _0x1b2e82=await buildHookMaps(_0x4cbb53[_0x4021b6(0x12c)],_0x4cbb53['apiDir'],_0x42d55b,_0x5e41f2),_0x47620d=[],_0x4c2beb=[],_0x8a06e=[];for(const _0x4cdfeb of _0x42d55b){const _0x12accd=await computeFileHash(_0x4cdfeb[_0x4021b6(0x12a)]),_0x3977ca=_0x5e41f2['functions'][_0x4cdfeb[_0x4021b6(0x158)]];if(!_0x4a5072&&_0x3977ca&&_0x3977ca['hash']===_0x12accd){_0x4c2beb[_0x4021b6(0x14c)]({'lockKey':_0x4cdfeb[_0x4021b6(0x158)],'reason':_0x4021b6(0x147)});continue;}try{await uploadSingleFunction(_0x4cbb53[_0x4021b6(0x12c)],_0x4cdfeb,_0x5e41f2,_0x1b2e82);const _0x438e48=_0x5e41f2[_0x4021b6(0x144)][_0x4cdfeb[_0x4021b6(0x158)]];_0x47620d['push']({'lockKey':_0x4cdfeb[_0x4021b6(0x158)],'remoteId':_0x438e48?.[_0x4021b6(0x139)]??0x0});}catch(_0x59f5c5){_0x8a06e[_0x4021b6(0x14c)]({'lockKey':_0x4cdfeb['lockKey'],'error':_0x59f5c5 instanceof Error?_0x59f5c5[_0x4021b6(0x14a)]:String(_0x59f5c5)});}}_0x5e41f2[_0x4021b6(0x12d)]=new Date()[_0x4021b6(0x15a)](),await writeBffLockFile(_0x1060e8[_0x4021b6(0x127)],_0x5e7dec),await waitForUploadedLockEntries(_0x1060e8['lockFilePath'],_0x4cbb53[_0x4021b6(0x12c)],_0x47620d[_0x4021b6(0x135)](_0x3cad7e=>_0x3cad7e['lockKey']));let _0x413b7a={'attempted':![],'cleared':![]};if(_0x47620d['length']>0x0)try{let _0xc612b5='';for(let _0x386fc5=0x0;_0x386fc5<CACHE_CLEAR_ATTEMPTS;_0x386fc5+=0x1){_0xc612b5=await clearBffScriptCache(),_0x386fc5<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x413b7a={'attempted':!![],'cleared':!![],'message':_0xc612b5||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x3e1570){_0x413b7a={'attempted':!![],'cleared':![],'error':_0x3e1570 instanceof Error?_0x3e1570[_0x4021b6(0x14a)]:String(_0x3e1570)};}const _0x74a311=_0x8a06e[_0x4021b6(0x153)]===0x0&&(_0x413b7a[_0x4021b6(0x13e)]?_0x413b7a[_0x4021b6(0x10f)]:!![]),_0x3ab6c2=_0x413b7a['attempted']?_0x413b7a['cleared']?'runtime\x20cache\x20cleared':_0x4021b6(0x119):_0x4021b6(0x130);return{'ok':_0x74a311,'data':{'uploaded':_0x47620d,'skipped':_0x4c2beb,'failed':_0x8a06e,'cacheClear':_0x413b7a},'message':_0x4021b6(0x140)+_0x47620d[_0x4021b6(0x153)]+_0x4021b6(0x12e)+_0x4c2beb['length']+_0x4021b6(0x11a)+_0x8a06e[_0x4021b6(0x153)]+'\x20failed,\x20'+_0x3ab6c2};}};async function getTargetFunctions(_0x3ce83a,_0x2ce0a6){const _0x1d7589=a37_0x263ff2,_0x4f81af=_0x2ce0a6[_0x1d7589(0x129)]('type'),_0x1a9872=_0x2ce0a6[_0x1d7589(0x129)](_0x1d7589(0x137)),_0x181ebb=normalizeBffType(_0x4f81af)??undefined;if(_0x1a9872&&!_0x181ebb)throw CliErrors[_0x1d7589(0x11d)](_0x1d7589(0x116));const _0x1f453d=await scanLocalBffFunctions(_0x3ce83a,_0x181ebb);if(_0x1a9872){const _0x28b3e4=_0x1f453d[_0x1d7589(0x151)](_0x39f3d9=>_0x39f3d9[_0x1d7589(0x137)]===_0x1a9872);if(_0x28b3e4[_0x1d7589(0x153)]===0x0)throw CliErrors[_0x1d7589(0x11d)](_0x1d7589(0x155)+_0x181ebb+'/'+_0x1a9872);return _0x28b3e4;}return _0x1f453d;}async function buildHookMaps(_0x52679a,_0x4c803c,_0x216b90,_0x5b14b0){const _0x206fc8=a37_0x263ff2,_0x25cd96=_0x216b90[_0x206fc8(0x157)](_0xc7f4c7=>_0xc7f4c7['type']===_0x206fc8(0x150));if(!_0x25cd96)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0xdc48f9=loadAliasMap(_0x4c803c,undefined,resolveApiFilePath(_0x4c803c,_0x52679a)),_0x3b0aaf=new Map(_0xdc48f9[_0x206fc8(0x135)](_0x493131=>[_0x493131[_0x206fc8(0x148)],_0x493131[_0x206fc8(0x14e)]]));for(const _0x585aa0 of Object[_0x206fc8(0x133)](_0x5b14b0[_0x206fc8(0x144)])){_0x585aa0['alias']&&_0x585aa0[_0x206fc8(0x14e)]&&!_0x3b0aaf[_0x206fc8(0x154)](_0x585aa0['alias'])&&_0x3b0aaf['set'](_0x585aa0['alias'],_0x585aa0['datasetCode']);}const _0x1a6c2d=await listDatasets(_0x52679a),_0x78a145=new Map(_0x1a6c2d[_0x206fc8(0x135)](_0x58630d=>[_0x58630d['code'],_0x58630d]));return{'aliasToDatasetCode':_0x3b0aaf,'datasetCodeToDataset':_0x78a145};}async function uploadSingleFunction(_0x2f7a83,_0x3daabb,_0x3a3332,_0x4843b2){const _0x36d9bb=a37_0x263ff2,_0x43ea11=await readFile(_0x3daabb[_0x36d9bb(0x12a)],_0x36d9bb(0x123)),_0x1516f5=await computeFileHash(_0x3daabb[_0x36d9bb(0x12a)]),_0x438b29=_0x3a3332[_0x36d9bb(0x144)][_0x3daabb['lockKey']];if(_0x438b29?.['remoteId']&&_0x438b29[_0x36d9bb(0x11b)]==null)throw CliErrors['validation'](_0x3daabb['lockKey']+_0x36d9bb(0x134));let _0x9fa0e8=extractScriptDescription(_0x43ea11);if(!_0x9fa0e8&&_0x438b29?.['remoteId']){const _0x2220f9=await getBffScriptInfo(_0x438b29['remoteId']);_0x9fa0e8=_0x2220f9[_0x36d9bb(0x15b)]||undefined;}const _0x35938e={'appCode':_0x2f7a83,'functionName':_0x3daabb['name'],'scriptType':_0x3daabb[_0x36d9bb(0x13f)],'scriptContent':_0x43ea11};if(_0x438b29?.['remoteId'])_0x35938e['id']=_0x438b29[_0x36d9bb(0x139)];if(_0x438b29?.[_0x36d9bb(0x11b)]!=null)_0x35938e['version']=_0x438b29[_0x36d9bb(0x11b)];if(_0x9fa0e8)_0x35938e[_0x36d9bb(0x15b)]=_0x9fa0e8;if(_0x3daabb['type']==='HOOK'){const _0x2c46e2=_0x3daabb[_0x36d9bb(0x148)];if(!_0x2c46e2||!_0x3daabb[_0x36d9bb(0x122)]||!_0x3daabb['functionNode'])throw CliErrors[_0x36d9bb(0x11d)](_0x36d9bb(0x113)+_0x3daabb[_0x36d9bb(0x158)]);const _0x51c0ce=_0x4843b2[_0x36d9bb(0x13a)][_0x36d9bb(0x10d)](_0x2c46e2)??_0x438b29?.['datasetCode']??_0x2c46e2,_0x380ef0=_0x4843b2[_0x36d9bb(0x112)]['get'](_0x51c0ce);if(!_0x380ef0)throw CliErrors[_0x36d9bb(0x11d)](_0x36d9bb(0x141)+_0x2c46e2+_0x36d9bb(0x10c)+(_0x36d9bb(0x149)+CLI_BIN_NAME+_0x36d9bb(0x15f)));_0x35938e[_0x36d9bb(0x126)]=_0x380ef0['id'],_0x35938e[_0x36d9bb(0x122)]=_0x3daabb['operationType'],_0x35938e[_0x36d9bb(0x136)]=_0x3daabb[_0x36d9bb(0x136)];}const _0x2f9375=await saveBffScript(_0x35938e),_0x45bc9e=_0x2f9375['id'],_0x5edf45=_0x2f9375[_0x36d9bb(0x15e)]??await getBffScriptInfo(_0x45bc9e),_0x29e285={'hash':_0x1516f5,'remoteId':_0x45bc9e,'version':_0x5edf45[_0x36d9bb(0x11b)]};if(_0x3daabb[_0x36d9bb(0x13f)]===_0x36d9bb(0x150)){const _0x22a8ba=_0x3daabb[_0x36d9bb(0x148)],_0x49458f=_0x4843b2[_0x36d9bb(0x13a)][_0x36d9bb(0x10d)](_0x22a8ba)??_0x438b29?.['datasetCode']??_0x22a8ba;_0x4843b2[_0x36d9bb(0x13a)][_0x36d9bb(0x154)](_0x22a8ba)?_0x29e285['alias']=_0x22a8ba:_0x29e285[_0x36d9bb(0x148)]=_0x438b29?.[_0x36d9bb(0x148)],_0x29e285[_0x36d9bb(0x14e)]=_0x49458f,_0x29e285['operationType']=_0x3daabb[_0x36d9bb(0x122)],_0x29e285[_0x36d9bb(0x136)]=_0x3daabb[_0x36d9bb(0x136)];}_0x3a3332[_0x36d9bb(0x144)][_0x3daabb['lockKey']]=_0x29e285;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a37_0x4d3d(_0x5081d2,_0x18d152){_0x5081d2=_0x5081d2-0x10c;const _0x33f43e=a37_0x33f4();let _0x4d3d46=_0x33f43e[_0x5081d2];return _0x4d3d46;}async function waitForUploadedLockEntries(_0x3f1373,_0x4c1a7b,_0x1b6557){const _0x4c2f19=a37_0x263ff2;if(_0x1b6557[_0x4c2f19(0x153)]===0x0)return;for(let _0x3024a2=0x0;_0x3024a2<LOCK_SETTLE_RETRY_COUNT;_0x3024a2+=0x1){const _0x421612=await readBffLockFile(_0x3f1373),_0x47d56e=_0x421612?.['apps']?.[_0x4c1a7b]?.[_0x4c2f19(0x144)]??{},_0x497138=_0x1b6557[_0x4c2f19(0x111)](_0x46e86b=>!!_0x47d56e[_0x46e86b]?.['remoteId']);if(_0x497138)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4c2f19(0x14f)+_0x1b6557[_0x4c2f19(0x118)](',\x20')+'.');}
1
+ function a37_0x341a(){const _0x134b07=['length','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','remoteId','map','aliasToDatasetCode','92113iQwxtT','functions','message','get','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','Local\x20function\x20not\x20found:\x20','Incomplete\x20HOOK\x20path:\x20','/api/management/library/scripts/save','datasetCode','runtime\x20cache\x20cleared','every','HOOK','apps','\x20failed,\x20','ENDPOINT','POST','string','821224ndPGfr','operationType','runtime\x20cache\x20clear\x20failed','description','No\x20local\x20BFF\x20functions\x20found.','runtime\x20cache\x20not\x20needed','join','would_push','425223mCEUJU','Would\x20inspect\x20','\x22.\x20','Push\x20complete:\x20','alias','cleared','36864IcZWhi','functionNode','name','Push\x20only\x20this\x20script\x20type','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','utf8','boolean','force','values','\x22\x20not\x20found\x20after\x20ensureLockScope.','12WShZQO','stringify','toISOString','Lock\x20scope\x20for\x20app\x20\x22','status','filter','set','lastSync','filePath','bool','hash','lockFilePath','Push\x20local\x20BFF\x20scripts\x20to\x20remote','attempted','lockKey','parse','unchanged','586085TRHMHb','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','850856xqLQOh','\x20skipped,\x20','script','bff','scriptsRoot','some','Run\x20`','appCode','Force\x20push\x20ignoring\x20hash\x20protection','Cannot\x20resolve\x20dataset\x20for\x20\x22','has','str','type','216740uNFeWm','version','push','validation'];a37_0x341a=function(){return _0x134b07;};return a37_0x341a();}const a37_0xf661af=a37_0x4da2;(function(_0x5d9996,_0xe80dbb){const _0x129618=a37_0x4da2,_0x320943=_0x5d9996();while(!![]){try{const _0x1b3ae1=-parseInt(_0x129618(0x163))/0x1+-parseInt(_0x129618(0x18b))/0x2+parseInt(_0x129618(0x185))/0x3+parseInt(_0x129618(0x17d))/0x4+-parseInt(_0x129618(0x1a6))/0x5+-parseInt(_0x129618(0x195))/0x6*(-parseInt(_0x129618(0x16c))/0x7)+parseInt(_0x129618(0x1a8))/0x8;if(_0x1b3ae1===_0xe80dbb)break;else _0x320943['push'](_0x320943['shift']());}catch(_0x56ad04){_0x320943['push'](_0x320943['shift']());}}}(a37_0x341a,0x1f165));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a37_0x4da2(_0x1b4ffa,_0x5b8d3a){_0x1b4ffa=_0x1b4ffa-0x15e;const _0x341a30=a37_0x341a();let _0x4da2db=_0x341a30[_0x1b4ffa];return _0x4da2db;}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_0xf661af(0x1ab),'command':'push','description':a37_0xf661af(0x1a1),'risk':'high-risk-write','flags':[{'name':a37_0xf661af(0x162),'type':a37_0xf661af(0x17c),'description':a37_0xf661af(0x18e),'enum':['COMMON',a37_0xf661af(0x17a),a37_0xf661af(0x177)]},{'name':a37_0xf661af(0x18d),'type':'string','description':a37_0xf661af(0x168)},{'name':a37_0xf661af(0x192),'type':a37_0xf661af(0x191),'description':a37_0xf661af(0x15e)}],async 'dryRun'(_0x442db3){const _0x7a262e=a37_0xf661af,_0x74a2ed=loadBffProjectConfig(_0x442db3[_0x7a262e(0x1af)]),_0x54628c=await readBffLockFile(_0x74a2ed['lockFilePath']),{appLock:_0x2b532a}=ensureLockScope(_0x54628c??createEmptyBffLock(),_0x442db3['appCode'],_0x74a2ed[_0x7a262e(0x1ac)],'push'),_0x39e586=await getTargetFunctions(_0x74a2ed,_0x442db3),_0x59fe6e=_0x442db3[_0x7a262e(0x19e)]('force'),_0x4d3bbf=[];for(const _0x19b55a of _0x39e586){const _0x2c0157=await computeFileHash(_0x19b55a[_0x7a262e(0x19d)]),_0x4ff4a9=_0x2b532a[_0x7a262e(0x16d)][_0x19b55a[_0x7a262e(0x1a3)]],_0x1658ba=!!_0x4ff4a9&&_0x4ff4a9[_0x7a262e(0x19f)]===_0x2c0157;_0x4d3bbf['push']({'lockKey':_0x19b55a[_0x7a262e(0x1a3)],'filePath':_0x19b55a[_0x7a262e(0x19d)],'remoteId':_0x4ff4a9?.['remoteId']??null,'mode':_0x4ff4a9?.[_0x7a262e(0x169)]?'update':'create','status':!_0x59fe6e&&_0x1658ba?_0x7a262e(0x1a5):_0x7a262e(0x184)});}return{'method':_0x7a262e(0x17b),'url':_0x7a262e(0x173),'body':{'appCode':_0x442db3[_0x7a262e(0x1af)],'force':_0x59fe6e,'files':_0x4d3bbf,'cacheClearAtRuntime':_0x4d3bbf[_0x7a262e(0x1ad)](_0x1513fa=>_0x1513fa[_0x7a262e(0x199)]==='would_push'),'cacheClearAtRuntimeTimes':_0x4d3bbf[_0x7a262e(0x1ad)](_0x118ab6=>_0x118ab6[_0x7a262e(0x199)]===_0x7a262e(0x184))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x7a262e(0x186)+_0x4d3bbf[_0x7a262e(0x167)]+_0x7a262e(0x18f)};},async 'execute'(_0x5eeaea){const _0x35f30e=a37_0xf661af,_0xdaf967=loadBffProjectConfig(_0x5eeaea[_0x35f30e(0x1af)]),_0x409774=await readBffLockFile(_0xdaf967[_0x35f30e(0x1a0)]),{lockData:_0x51669f,appLock:_0x59fa1d}=ensureLockScope(_0x409774??createEmptyBffLock(),_0x5eeaea['appCode'],_0xdaf967['scriptsRoot'],'push'),_0x190a5c=await getTargetFunctions(_0xdaf967,_0x5eeaea);if(_0x190a5c[_0x35f30e(0x167)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x35f30e(0x181)};const _0x3c8b54=_0x5eeaea[_0x35f30e(0x19e)]('force'),_0x17ff9a=JSON[_0x35f30e(0x1a4)](JSON[_0x35f30e(0x196)](_0x51669f)),_0x5222b1=_0x17ff9a[_0x35f30e(0x178)][_0x5eeaea['appCode']];if(!_0x5222b1)throw new Error(_0x35f30e(0x198)+_0x5eeaea[_0x35f30e(0x1af)]+_0x35f30e(0x194));const _0x659bc8=await buildHookMaps(_0x5eeaea['appCode'],_0x5eeaea['apiDir'],_0x190a5c,_0x5222b1),_0x3c2017=[],_0x340b2d=[],_0x27d5a9=[];for(const _0xa371fa of _0x190a5c){const _0x4cd012=await computeFileHash(_0xa371fa[_0x35f30e(0x19d)]),_0xcc2406=_0x5222b1[_0x35f30e(0x16d)][_0xa371fa[_0x35f30e(0x1a3)]];if(!_0x3c8b54&&_0xcc2406&&_0xcc2406[_0x35f30e(0x19f)]===_0x4cd012){_0x340b2d[_0x35f30e(0x165)]({'lockKey':_0xa371fa[_0x35f30e(0x1a3)],'reason':_0x35f30e(0x1a5)});continue;}try{await uploadSingleFunction(_0x5eeaea[_0x35f30e(0x1af)],_0xa371fa,_0x5222b1,_0x659bc8);const _0x5c70a9=_0x5222b1[_0x35f30e(0x16d)][_0xa371fa[_0x35f30e(0x1a3)]];_0x3c2017[_0x35f30e(0x165)]({'lockKey':_0xa371fa[_0x35f30e(0x1a3)],'remoteId':_0x5c70a9?.[_0x35f30e(0x169)]??0x0});}catch(_0x17f37a){_0x27d5a9[_0x35f30e(0x165)]({'lockKey':_0xa371fa[_0x35f30e(0x1a3)],'error':_0x17f37a instanceof Error?_0x17f37a[_0x35f30e(0x16e)]:String(_0x17f37a)});}}_0x5222b1[_0x35f30e(0x19c)]=new Date()[_0x35f30e(0x197)](),await writeBffLockFile(_0xdaf967[_0x35f30e(0x1a0)],_0x17ff9a),await waitForUploadedLockEntries(_0xdaf967[_0x35f30e(0x1a0)],_0x5eeaea['appCode'],_0x3c2017[_0x35f30e(0x16a)](_0x3d73db=>_0x3d73db[_0x35f30e(0x1a3)]));let _0x5c58cd={'attempted':![],'cleared':![]};if(_0x3c2017['length']>0x0)try{let _0x2c7a3e='';for(let _0x127d27=0x0;_0x127d27<CACHE_CLEAR_ATTEMPTS;_0x127d27+=0x1){_0x2c7a3e=await clearBffScriptCache(),_0x127d27<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5c58cd={'attempted':!![],'cleared':!![],'message':_0x2c7a3e||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0x4da888){_0x5c58cd={'attempted':!![],'cleared':![],'error':_0x4da888 instanceof Error?_0x4da888[_0x35f30e(0x16e)]:String(_0x4da888)};}const _0x18bda5=_0x27d5a9[_0x35f30e(0x167)]===0x0&&(_0x5c58cd['attempted']?_0x5c58cd[_0x35f30e(0x18a)]:!![]),_0x3def3e=_0x5c58cd[_0x35f30e(0x1a2)]?_0x5c58cd[_0x35f30e(0x18a)]?_0x35f30e(0x175):_0x35f30e(0x17f):_0x35f30e(0x182);return{'ok':_0x18bda5,'data':{'uploaded':_0x3c2017,'skipped':_0x340b2d,'failed':_0x27d5a9,'cacheClear':_0x5c58cd},'message':_0x35f30e(0x188)+_0x3c2017[_0x35f30e(0x167)]+'\x20uploaded,\x20'+_0x340b2d[_0x35f30e(0x167)]+_0x35f30e(0x1a9)+_0x27d5a9[_0x35f30e(0x167)]+_0x35f30e(0x179)+_0x3def3e};}};async function getTargetFunctions(_0x4707f2,_0x44ba84){const _0x27a5eb=a37_0xf661af,_0x2d7391=_0x44ba84['str'](_0x27a5eb(0x162)),_0x168aa1=_0x44ba84[_0x27a5eb(0x161)](_0x27a5eb(0x18d)),_0x3b0656=normalizeBffType(_0x2d7391)??undefined;if(_0x168aa1&&!_0x3b0656)throw CliErrors[_0x27a5eb(0x166)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x321f6a=await scanLocalBffFunctions(_0x4707f2,_0x3b0656);if(_0x168aa1){const _0x2e1abf=_0x321f6a[_0x27a5eb(0x19a)](_0x2f0f40=>_0x2f0f40[_0x27a5eb(0x18d)]===_0x168aa1);if(_0x2e1abf[_0x27a5eb(0x167)]===0x0)throw CliErrors[_0x27a5eb(0x166)](_0x27a5eb(0x171)+_0x3b0656+'/'+_0x168aa1);return _0x2e1abf;}return _0x321f6a;}async function buildHookMaps(_0x5f5434,_0x3369ff,_0xbc04c4,_0x4d6182){const _0x4009b0=a37_0xf661af,_0x2e35da=_0xbc04c4['some'](_0x1c78b1=>_0x1c78b1[_0x4009b0(0x162)]===_0x4009b0(0x177));if(!_0x2e35da)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x2e800b=loadAliasMap(_0x3369ff,undefined,resolveApiFilePath(_0x3369ff,_0x5f5434)),_0x33ba7c=new Map(_0x2e800b[_0x4009b0(0x16a)](_0x76eeab=>[_0x76eeab['alias'],_0x76eeab[_0x4009b0(0x174)]]));for(const _0x5ad8c1 of Object[_0x4009b0(0x193)](_0x4d6182[_0x4009b0(0x16d)])){_0x5ad8c1[_0x4009b0(0x189)]&&_0x5ad8c1[_0x4009b0(0x174)]&&!_0x33ba7c[_0x4009b0(0x160)](_0x5ad8c1[_0x4009b0(0x189)])&&_0x33ba7c[_0x4009b0(0x19b)](_0x5ad8c1[_0x4009b0(0x189)],_0x5ad8c1[_0x4009b0(0x174)]);}const _0x4d047c=await listDatasets(_0x5f5434),_0x37e97b=new Map(_0x4d047c[_0x4009b0(0x16a)](_0x473edc=>[_0x473edc['code'],_0x473edc]));return{'aliasToDatasetCode':_0x33ba7c,'datasetCodeToDataset':_0x37e97b};}async function uploadSingleFunction(_0x383cf2,_0x191ea4,_0x46ede6,_0x381055){const _0x5e0a81=a37_0xf661af,_0x362efd=await readFile(_0x191ea4['filePath'],_0x5e0a81(0x190)),_0x43de2d=await computeFileHash(_0x191ea4[_0x5e0a81(0x19d)]),_0x528944=_0x46ede6['functions'][_0x191ea4[_0x5e0a81(0x1a3)]];if(_0x528944?.[_0x5e0a81(0x169)]&&_0x528944[_0x5e0a81(0x164)]==null)throw CliErrors['validation'](_0x191ea4['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x293cc0=extractScriptDescription(_0x362efd);if(!_0x293cc0&&_0x528944?.['remoteId']){const _0x1280d8=await getBffScriptInfo(_0x528944[_0x5e0a81(0x169)]);_0x293cc0=_0x1280d8[_0x5e0a81(0x180)]||undefined;}const _0x47fa60={'appCode':_0x383cf2,'functionName':_0x191ea4[_0x5e0a81(0x18d)],'scriptType':_0x191ea4[_0x5e0a81(0x162)],'scriptContent':_0x362efd};if(_0x528944?.[_0x5e0a81(0x169)])_0x47fa60['id']=_0x528944[_0x5e0a81(0x169)];if(_0x528944?.[_0x5e0a81(0x164)]!=null)_0x47fa60[_0x5e0a81(0x164)]=_0x528944[_0x5e0a81(0x164)];if(_0x293cc0)_0x47fa60['description']=_0x293cc0;if(_0x191ea4[_0x5e0a81(0x162)]==='HOOK'){const _0xafbfb0=_0x191ea4[_0x5e0a81(0x189)];if(!_0xafbfb0||!_0x191ea4[_0x5e0a81(0x17e)]||!_0x191ea4[_0x5e0a81(0x18c)])throw CliErrors[_0x5e0a81(0x166)](_0x5e0a81(0x172)+_0x191ea4[_0x5e0a81(0x1a3)]);const _0x307dce=_0x381055[_0x5e0a81(0x16b)]['get'](_0xafbfb0)??_0x528944?.[_0x5e0a81(0x174)]??_0xafbfb0,_0xf6902d=_0x381055['datasetCodeToDataset'][_0x5e0a81(0x16f)](_0x307dce);if(!_0xf6902d)throw CliErrors[_0x5e0a81(0x166)](_0x5e0a81(0x15f)+_0xafbfb0+_0x5e0a81(0x187)+(_0x5e0a81(0x1ae)+CLI_BIN_NAME+_0x5e0a81(0x170)));_0x47fa60['datasetId']=_0xf6902d['id'],_0x47fa60[_0x5e0a81(0x17e)]=_0x191ea4['operationType'],_0x47fa60[_0x5e0a81(0x18c)]=_0x191ea4['functionNode'];}const _0xa4bdf1=await saveBffScript(_0x47fa60),_0x2fb176=_0xa4bdf1['id'],_0x1e0ae4=_0xa4bdf1[_0x5e0a81(0x1aa)]??await getBffScriptInfo(_0x2fb176),_0x545b5b={'hash':_0x43de2d,'remoteId':_0x2fb176,'version':_0x1e0ae4[_0x5e0a81(0x164)]};if(_0x191ea4[_0x5e0a81(0x162)]===_0x5e0a81(0x177)){const _0x4c8f1a=_0x191ea4[_0x5e0a81(0x189)],_0x5212a8=_0x381055[_0x5e0a81(0x16b)][_0x5e0a81(0x16f)](_0x4c8f1a)??_0x528944?.[_0x5e0a81(0x174)]??_0x4c8f1a;_0x381055[_0x5e0a81(0x16b)]['has'](_0x4c8f1a)?_0x545b5b[_0x5e0a81(0x189)]=_0x4c8f1a:_0x545b5b[_0x5e0a81(0x189)]=_0x528944?.[_0x5e0a81(0x189)],_0x545b5b[_0x5e0a81(0x174)]=_0x5212a8,_0x545b5b[_0x5e0a81(0x17e)]=_0x191ea4[_0x5e0a81(0x17e)],_0x545b5b[_0x5e0a81(0x18c)]=_0x191ea4['functionNode'];}_0x46ede6[_0x5e0a81(0x16d)][_0x191ea4[_0x5e0a81(0x1a3)]]=_0x545b5b;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3b5287,_0x4282a9,_0x418ab2){const _0x51306a=a37_0xf661af;if(_0x418ab2[_0x51306a(0x167)]===0x0)return;for(let _0x6d410a=0x0;_0x6d410a<LOCK_SETTLE_RETRY_COUNT;_0x6d410a+=0x1){const _0x3f60ce=await readBffLockFile(_0x3b5287),_0x5b5edc=_0x3f60ce?.[_0x51306a(0x178)]?.[_0x4282a9]?.[_0x51306a(0x16d)]??{},_0x73daf5=_0x418ab2[_0x51306a(0x176)](_0x2ecac3=>!!_0x5b5edc[_0x2ecac3]?.[_0x51306a(0x169)]);if(_0x73daf5)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x51306a(0x1a7)+_0x418ab2[_0x51306a(0x183)](',\x20')+'.');}
@@ -1 +1 @@
1
- function a38_0x5284(){const _0x1d7cf4=['lockKey','boolean','152885WXnClY','All\x20BFF\x20scripts\x20are\x20in\x20sync.','927444cqNfuK','\x20added,\x20','1626636RfLTDy','datasetCode','hash','all','length','705483fBYcbK','bool','2226550BFTjzU','appCode','\x20unchanged','push','remote','14VhsXns','map','read','bff','functions','3452292FJtoxX','2mktIAy','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','52LlLInT','\x20modified,\x20','filePath','\x20remote-only','75640FXyYdJ','apiDir','has'];a38_0x5284=function(){return _0x1d7cf4;};return a38_0x5284();}const a38_0x307831=a38_0x1303;function a38_0x1303(_0x50a0fb,_0x53ed93){_0x50a0fb=_0x50a0fb-0x9b;const _0x5284e7=a38_0x5284();let _0x1303e0=_0x5284e7[_0x50a0fb];return _0x1303e0;}(function(_0x32edf4,_0x30f838){const _0x1c5ced=a38_0x1303,_0x3a7b62=_0x32edf4();while(!![]){try{const _0x13c550=parseInt(_0x1c5ced(0xae))/0x1+parseInt(_0x1c5ced(0xbb))/0x2*(parseInt(_0x1c5ced(0xa9))/0x3)+parseInt(_0x1c5ced(0x9c))/0x4*(-parseInt(_0x1c5ced(0xa5))/0x5)+parseInt(_0x1c5ced(0xa7))/0x6+parseInt(_0x1c5ced(0xb5))/0x7*(parseInt(_0x1c5ced(0xa0))/0x8)+-parseInt(_0x1c5ced(0xba))/0x9+-parseInt(_0x1c5ced(0xb0))/0xa;if(_0x13c550===_0x30f838)break;else _0x3a7b62['push'](_0x3a7b62['shift']());}catch(_0x85ab05){_0x3a7b62['push'](_0x3a7b62['shift']());}}}(a38_0x5284,0x65e9b));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';export const bffStatus={'service':a38_0x307831(0xb8),'command':'status','description':a38_0x307831(0x9b),'risk':a38_0x307831(0xb7),'flags':[{'name':'remote','type':a38_0x307831(0xa4),'description':'Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally'}],async 'execute'(_0x265f87){const _0xabb1aa=a38_0x307831,_0x4c9827=loadBffProjectConfig(_0x265f87[_0xabb1aa(0xb1)]),_0x3acd8f=await readBffLockFile(_0x4c9827['lockFilePath']),{appLock:_0x7b7511}=ensureLockScope(_0x3acd8f??createEmptyBffLock(),_0x265f87[_0xabb1aa(0xb1)],_0x4c9827['scriptsRoot'],'status'),_0x2c6d23=await scanLocalBffFunctions(_0x4c9827),_0x18b745=[],_0x5fcd2=[],_0x15065b=[];for(const _0x1db886 of _0x2c6d23){const _0x2e3f6b=await computeFileHash(_0x1db886[_0xabb1aa(0x9e)]),_0x59cf8d=_0x7b7511[_0xabb1aa(0xb9)][_0x1db886[_0xabb1aa(0xa3)]];if(!_0x59cf8d)_0x18b745['push'](_0x1db886[_0xabb1aa(0xa3)]);else _0x59cf8d[_0xabb1aa(0xab)]!==_0x2e3f6b?_0x5fcd2[_0xabb1aa(0xb3)](_0x1db886[_0xabb1aa(0xa3)]):_0x15065b[_0xabb1aa(0xb3)](_0x1db886[_0xabb1aa(0xa3)]);}const _0x4e31d=[];if(_0x265f87[_0xabb1aa(0xaf)](_0xabb1aa(0xb4))){const _0x274a83=loadAliasMap(_0x265f87[_0xabb1aa(0xa1)],undefined,resolveApiFilePath(_0x265f87[_0xabb1aa(0xa1)],_0x265f87[_0xabb1aa(0xb1)])),_0x1b3313=new Map(_0x274a83[_0xabb1aa(0xb6)](_0x3290c9=>[_0x3290c9[_0xabb1aa(0xaa)],_0x3290c9['alias']])),[_0x2f0ef5,_0x496f34]=await Promise[_0xabb1aa(0xac)]([listBffScripts(_0x265f87[_0xabb1aa(0xb1)]),getBffScriptStatistics(_0x265f87['appCode'])]),_0x334a16=createHookLocationMap(_0x496f34),_0xa7de64=new Set(_0x2c6d23['map'](_0x3ec688=>_0x3ec688['lockKey']));for(const _0x1706d1 of _0x2f0ef5){const _0x601019=resolveRemoteScriptTarget(_0x4c9827,_0x1706d1,_0x334a16,_0x7b7511['functions'],_0x1b3313);_0x601019&&!_0xa7de64[_0xabb1aa(0xa2)](_0x601019[_0xabb1aa(0xa3)])&&_0x4e31d[_0xabb1aa(0xb3)](_0x601019[_0xabb1aa(0xa3)]);}}const _0x3f14d6=_0x18b745[_0xabb1aa(0xad)]===0x0&&_0x5fcd2[_0xabb1aa(0xad)]===0x0&&_0x4e31d[_0xabb1aa(0xad)]===0x0;return{'ok':!![],'data':{'added':_0x18b745,'modified':_0x5fcd2,'unchanged':_0x15065b,'remoteOnly':_0x4e31d},'message':_0x3f14d6?_0xabb1aa(0xa6):_0x18b745[_0xabb1aa(0xad)]+_0xabb1aa(0xa8)+_0x5fcd2[_0xabb1aa(0xad)]+_0xabb1aa(0x9d)+_0x15065b[_0xabb1aa(0xad)]+_0xabb1aa(0xb2)+(_0x4e31d[_0xabb1aa(0xad)]>0x0?',\x20'+_0x4e31d['length']+_0xabb1aa(0x9f):'')};}};
1
+ const a38_0x6e7e4c=a38_0x409d;(function(_0x3dac3b,_0x496eb1){const _0x34ce75=a38_0x409d,_0x1b126c=_0x3dac3b();while(!![]){try{const _0x1b62d1=parseInt(_0x34ce75(0x146))/0x1+-parseInt(_0x34ce75(0x160))/0x2+-parseInt(_0x34ce75(0x14f))/0x3+-parseInt(_0x34ce75(0x15d))/0x4+-parseInt(_0x34ce75(0x161))/0x5*(parseInt(_0x34ce75(0x151))/0x6)+-parseInt(_0x34ce75(0x158))/0x7+parseInt(_0x34ce75(0x15c))/0x8;if(_0x1b62d1===_0x496eb1)break;else _0x1b126c['push'](_0x1b126c['shift']());}catch(_0x356fef){_0x1b126c['push'](_0x1b126c['shift']());}}}(a38_0x4e3e,0x4a439));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_0x4e3e(){const _0x4efd5b=['Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','1012610FUElKx','26030ZIxgrl','hash','push','348792qeikkS','apiDir','All\x20BFF\x20scripts\x20are\x20in\x20sync.','appCode','\x20remote-only','alias','\x20unchanged','scriptsRoot','bool','321837ZsDCIi','functions','48SJytwC','length','filePath','\x20modified,\x20','lockKey','remote','status','3508022CKVqjT','\x20added,\x20','map','all','13389400lDsiNZ','2247616ZEoZLF'];a38_0x4e3e=function(){return _0x4efd5b;};return a38_0x4e3e();}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_0x409d(_0x341809,_0x4eb9ab){_0x341809=_0x341809-0x144;const _0x4e3e07=a38_0x4e3e();let _0x409d4f=_0x4e3e07[_0x341809];return _0x409d4f;}export const bffStatus={'service':'bff','command':'status','description':a38_0x6e7e4c(0x15f),'risk':'read','flags':[{'name':'remote','type':'boolean','description':a38_0x6e7e4c(0x15e)}],async 'execute'(_0x2753e2){const _0x4b5773=a38_0x6e7e4c,_0x50b46c=loadBffProjectConfig(_0x2753e2['appCode']),_0x15aa8b=await readBffLockFile(_0x50b46c['lockFilePath']),{appLock:_0x2be365}=ensureLockScope(_0x15aa8b??createEmptyBffLock(),_0x2753e2['appCode'],_0x50b46c[_0x4b5773(0x14d)],_0x4b5773(0x157)),_0x2c9532=await scanLocalBffFunctions(_0x50b46c),_0x40fe88=[],_0x566f25=[],_0x1459f2=[];for(const _0x1e2e62 of _0x2c9532){const _0x55c07b=await computeFileHash(_0x1e2e62[_0x4b5773(0x153)]),_0x1215fc=_0x2be365['functions'][_0x1e2e62[_0x4b5773(0x155)]];if(!_0x1215fc)_0x40fe88[_0x4b5773(0x145)](_0x1e2e62[_0x4b5773(0x155)]);else _0x1215fc[_0x4b5773(0x144)]!==_0x55c07b?_0x566f25[_0x4b5773(0x145)](_0x1e2e62[_0x4b5773(0x155)]):_0x1459f2['push'](_0x1e2e62['lockKey']);}const _0x441ba1=[];if(_0x2753e2[_0x4b5773(0x14e)](_0x4b5773(0x156))){const _0x149684=loadAliasMap(_0x2753e2[_0x4b5773(0x147)],undefined,resolveApiFilePath(_0x2753e2[_0x4b5773(0x147)],_0x2753e2[_0x4b5773(0x149)])),_0x4fbaaf=new Map(_0x149684['map'](_0x568140=>[_0x568140['datasetCode'],_0x568140[_0x4b5773(0x14b)]])),[_0x293052,_0x78933]=await Promise[_0x4b5773(0x15b)]([listBffScripts(_0x2753e2[_0x4b5773(0x149)]),getBffScriptStatistics(_0x2753e2[_0x4b5773(0x149)])]),_0x1d10d4=createHookLocationMap(_0x78933),_0x1f14b8=new Set(_0x2c9532[_0x4b5773(0x15a)](_0x5a4f5d=>_0x5a4f5d[_0x4b5773(0x155)]));for(const _0x3ebc2b of _0x293052){const _0x3129b4=resolveRemoteScriptTarget(_0x50b46c,_0x3ebc2b,_0x1d10d4,_0x2be365[_0x4b5773(0x150)],_0x4fbaaf);_0x3129b4&&!_0x1f14b8['has'](_0x3129b4['lockKey'])&&_0x441ba1['push'](_0x3129b4[_0x4b5773(0x155)]);}}const _0x317112=_0x40fe88['length']===0x0&&_0x566f25[_0x4b5773(0x152)]===0x0&&_0x441ba1[_0x4b5773(0x152)]===0x0;return{'ok':!![],'data':{'added':_0x40fe88,'modified':_0x566f25,'unchanged':_0x1459f2,'remoteOnly':_0x441ba1},'message':_0x317112?_0x4b5773(0x148):_0x40fe88[_0x4b5773(0x152)]+_0x4b5773(0x159)+_0x566f25['length']+_0x4b5773(0x154)+_0x1459f2[_0x4b5773(0x152)]+_0x4b5773(0x14c)+(_0x441ba1['length']>0x0?',\x20'+_0x441ba1['length']+_0x4b5773(0x14a):'')};}};
@@ -1 +1 @@
1
- const a39_0x59cc88=a39_0x3e88;(function(_0x51e629,_0x7cd4c0){const _0x1d44d3=a39_0x3e88,_0x3265e9=_0x51e629();while(!![]){try{const _0x1bdc2e=parseInt(_0x1d44d3(0x15a))/0x1+parseInt(_0x1d44d3(0x159))/0x2+parseInt(_0x1d44d3(0x161))/0x3*(-parseInt(_0x1d44d3(0x152))/0x4)+-parseInt(_0x1d44d3(0x160))/0x5+-parseInt(_0x1d44d3(0x154))/0x6*(parseInt(_0x1d44d3(0x148))/0x7)+-parseInt(_0x1d44d3(0x15f))/0x8*(parseInt(_0x1d44d3(0x158))/0x9)+-parseInt(_0x1d44d3(0x14f))/0xa*(-parseInt(_0x1d44d3(0x14d))/0xb);if(_0x1bdc2e===_0x7cd4c0)break;else _0x3265e9['push'](_0x3265e9['shift']());}catch(_0x69b3a8){_0x3265e9['push'](_0x3265e9['shift']());}}}(a39_0x3fb3,0xe7b4c));import{CliErrors}from'../../errors.js';function a39_0x3e88(_0x4d7033,_0x571a53){_0x4d7033=_0x4d7033-0x145;const _0x3fb38a=a39_0x3fb3();let _0x3e88d2=_0x3fb38a[_0x4d7033];return _0x3e88d2;}import{logger}from'../../utils/logger.js';function a39_0x3fb3(){const _0x198252=['9186291RHzFns','1908186GWjlLH','1393361fnYNwO','unknown','cli-skill-install','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20(','skipped','8ozXhEh','4133435hOHIxc','2853159Dbbkex','npx\x20skills\x20add\x20failed:\x20','pipe','apiError','setLogPath','cwd','7sONzNB','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','write','CLI\x20Built-in\x20Skill\x20installed','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','539bSChIG',')...','479690YYDaDz','nonInteractive','info','4CoxSAg','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','5702568VPDypd','log','install','cli-skill'];a39_0x3fb3=function(){return _0x198252;};return a39_0x3fb3();}export const cliSkillDefinitions=[{'service':a39_0x59cc88(0x157),'command':a39_0x59cc88(0x156),'description':a39_0x59cc88(0x149),'risk':a39_0x59cc88(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x161e34){const _0x73ba20=a39_0x59cc88;logger[_0x73ba20(0x146)](process[_0x73ba20(0x147)]()),logger[_0x73ba20(0x151)](_0x73ba20(0x15c),_0x73ba20(0x153));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x57d48d,RABETBASE_SKILL_SOURCE:_0x3a177e,runNpxSkillsAddGlobal:_0x3b9d28}=await import('../../skills/npx-skills-add.js'),_0x371c7a=_0x161e34[_0x73ba20(0x150)]?_0x73ba20(0x163):'inherit';console[_0x73ba20(0x155)](_0x73ba20(0x15d)+_0x57d48d+_0x73ba20(0x14e));const _0xba110d=_0x3b9d28(process[_0x73ba20(0x147)](),_0x3a177e,{'stdio':_0x371c7a});if(_0xba110d[_0x73ba20(0x15e)])console[_0x73ba20(0x155)](_0x73ba20(0x14c));else{if(_0xba110d['ok'])console[_0x73ba20(0x155)](_0x73ba20(0x14b));else throw CliErrors[_0x73ba20(0x145)](_0x73ba20(0x162)+(_0xba110d['error']||_0x73ba20(0x15b)),'Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20'+_0x57d48d);}return{'ok':!![]};}}];
1
+ const a39_0x694f84=a39_0x138d;function a39_0x138d(_0x26d155,_0x20afb6){_0x26d155=_0x26d155-0x167;const _0x13ca45=a39_0x13ca();let _0x138d85=_0x13ca45[_0x26d155];return _0x138d85;}(function(_0x3e3d3b,_0x2e2b94){const _0x3a7262=a39_0x138d,_0x11fe8d=_0x3e3d3b();while(!![]){try{const _0x33419f=parseInt(_0x3a7262(0x181))/0x1+-parseInt(_0x3a7262(0x17e))/0x2*(-parseInt(_0x3a7262(0x183))/0x3)+parseInt(_0x3a7262(0x167))/0x4+parseInt(_0x3a7262(0x179))/0x5*(-parseInt(_0x3a7262(0x182))/0x6)+parseInt(_0x3a7262(0x16e))/0x7+-parseInt(_0x3a7262(0x17a))/0x8+parseInt(_0x3a7262(0x176))/0x9*(-parseInt(_0x3a7262(0x174))/0xa);if(_0x33419f===_0x2e2b94)break;else _0x11fe8d['push'](_0x11fe8d['shift']());}catch(_0x41fdd6){_0x11fe8d['push'](_0x11fe8d['shift']());}}}(a39_0x13ca,0xf1263));import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';export const cliSkillDefinitions=[{'service':a39_0x694f84(0x17b),'command':a39_0x694f84(0x17d),'description':a39_0x694f84(0x17c),'risk':a39_0x694f84(0x17f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2f6c2f){const _0x3da604=a39_0x694f84;logger[_0x3da604(0x16f)](process['cwd']()),logger['info'](_0x3da604(0x169),_0x3da604(0x170));const {NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE:_0x479a21,RABETBASE_SKILL_SOURCE:_0x3a7f88,runNpxSkillsAddGlobal:_0x336277}=await import(_0x3da604(0x16c)),_0x53dfb5=_0x2f6c2f[_0x3da604(0x177)]?'pipe':_0x3da604(0x180);console[_0x3da604(0x178)]('Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx\x20('+_0x479a21+')...');const _0x11498e=_0x336277(process[_0x3da604(0x175)](),_0x3a7f88,{'stdio':_0x53dfb5});if(_0x11498e[_0x3da604(0x16b)])console[_0x3da604(0x178)](_0x3da604(0x168));else{if(_0x11498e['ok'])console['log'](_0x3da604(0x172));else throw CliErrors[_0x3da604(0x171)](_0x3da604(0x16a)+(_0x11498e['error']||_0x3da604(0x16d)),_0x3da604(0x173)+_0x479a21);}return{'ok':!![]};}}];function a39_0x13ca(){const _0x52a74c=['107182euvqxD','write','inherit','401589pkuRai','6NXlMFx','45pYqccc','5012852OvTpEh','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20CLI\x20Built-in\x20Skill\x20is\x20already\x20present.','cli-skill-install','npx\x20skills\x20add\x20failed:\x20','skipped','../../skills/npx-skills-add.js','unknown','11786985OCfNJx','setLogPath','Installing\x20CLI\x20Built-in\x20Skill\x20via\x20npx.','apiError','CLI\x20Built-in\x20Skill\x20installed','Check\x20network\x20connectivity\x20and\x20try\x20again,\x20or\x20run:\x20','9496070cjYPoo','cwd','9cTfblz','nonInteractive','log','6434215yHsFlC','7346600boJdVo','cli-skill','Install\x20or\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill','install'];a39_0x13ca=function(){return _0x52a74c;};return a39_0x13ca();}
@@ -1 +1 @@
1
- const a40_0x221cc5=a40_0x6ad7;(function(_0x5dc54d,_0x40db80){const _0x55e112=a40_0x6ad7,_0x9390bb=_0x5dc54d();while(!![]){try{const _0x4bdfd8=parseInt(_0x55e112(0x192))/0x1*(parseInt(_0x55e112(0x1c5))/0x2)+parseInt(_0x55e112(0x1c0))/0x3*(parseInt(_0x55e112(0x184))/0x4)+-parseInt(_0x55e112(0x1a8))/0x5+-parseInt(_0x55e112(0x186))/0x6*(-parseInt(_0x55e112(0x1cc))/0x7)+parseInt(_0x55e112(0x1d3))/0x8*(-parseInt(_0x55e112(0x198))/0x9)+-parseInt(_0x55e112(0x1a0))/0xa*(parseInt(_0x55e112(0x1bb))/0xb)+-parseInt(_0x55e112(0x187))/0xc*(-parseInt(_0x55e112(0x188))/0xd);if(_0x4bdfd8===_0x40db80)break;else _0x9390bb['push'](_0x9390bb['shift']());}catch(_0x17f105){_0x9390bb['push'](_0x9390bb['shift']());}}}(a40_0xf4b4,0x34f7d));import a40_0x496d91 from'chalk';import a40_0x1fa0d6 from'ora';import a40_0x4d4d95 from'semver';import{execa}from'execa';function a40_0x6ad7(_0xd5d0db,_0x558c16){_0xd5d0db=_0xd5d0db-0x182;const _0xf4b488=a40_0xf4b4();let _0x6ad7a4=_0xf4b488[_0xd5d0db];return _0x6ad7a4;}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 _0x47c663=a40_0x6ad7;return GIT_COMMIT!==_0x47c663(0x19d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x4d500e=a40_0x6ad7,_0x1dcdf0=process[_0x4d500e(0x1a4)][_0x4d500e(0x1bf)]();if(_0x1dcdf0[_0x4d500e(0x1b0)](_0x4d500e(0x1a5)))return _0x4d500e(0x1a5);return _0x4d500e(0x1b7);}const updateFlags=[{'name':a40_0x221cc5(0x196),'type':a40_0x221cc5(0x1ba),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a40_0x221cc5(0x1aa),'type':a40_0x221cc5(0x1bd),'description':a40_0x221cc5(0x1ad)},{'name':a40_0x221cc5(0x194),'type':a40_0x221cc5(0x1ba),'description':a40_0x221cc5(0x1c6),'default':![]},{'name':'skills','type':a40_0x221cc5(0x1ba),'description':a40_0x221cc5(0x190),'default':!![],'hidden':!![]}];function a40_0xf4b4(){const _0xb99ebb=['validation','9189qPoUuL','Requested\x20version:\x20','fromEntries','https://registry.npmjs.org/-/package/','/dist-tags','unknown','yellow','gray','80tLGeim','Beta\x20version:\x20','Invalid\x20version:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','execPath','bun','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','Already\x20up\x20to\x20date\x20(v','2116550OvojXU','Version\x20comparison\x20failed','version','\x20\x20Run\x20manually:\x20','start','Install\x20a\x20specific\x20CLI\x20version','succeed','warn','includes','timeout','pipe','trim','Updating\x20via\x20','map','Current\x20version:\x20','npm','nonInteractive','Update\x20available:\x20','boolean','469348DIfkoH','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','string','valid','toLowerCase','6FPjkvi','\x20cli-skill\x20install','latest','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','skills','2hLpNIF','Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','green','skipped','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','flag','filter','42bCAnQQ','log','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','install','bool','\x20→\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','2032luIhMr','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','message','red','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','source','fail','655888olLSHK','Already\x20on\x20requested\x20version\x20(v','104070HVljtb','3816drKpKQ','24817XZJvng','cwd','Checking\x20for\x20updates...','error','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','json','Checking\x20CLI\x20Built-in\x20Skill...','run','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','201869ngHGWy','Updated\x20to\x20v','no-skills','update','beta'];a40_0xf4b4=function(){return _0xb99ebb;};return a40_0xf4b4();}function getRequestedVersion(_0x3c90ce){const _0x52e944=a40_0x221cc5;return _0x3c90ce['str'](_0x52e944(0x1aa))['trim']();}function shouldSkipCliSkill(_0x1861a0){const _0x4147fd=a40_0x221cc5;return _0x1861a0[_0x4147fd(0x1d0)]('no-skills')||_0x1861a0[_0x4147fd(0x1ca)](_0x4147fd(0x1c4))===![];}async function validateUpdateFlags(_0x196fe6){const _0x207cad=a40_0x221cc5,_0x5cf5d5=_0x196fe6[_0x207cad(0x1d0)]('beta'),_0x40f778=getRequestedVersion(_0x196fe6);if(_0x5cf5d5&&_0x40f778)throw CliErrors[_0x207cad(0x197)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x207cad(0x1bc));if(_0x40f778&&!a40_0x4d4d95['valid'](_0x40f778))throw CliErrors[_0x207cad(0x197)](_0x207cad(0x1a2)+_0x40f778,_0x207cad(0x18c));}async function fetchNpmDistTags(){const _0x4ae0cd=a40_0x221cc5;try{const _0x3741d4=await fetch(_0x4ae0cd(0x19b)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x4ae0cd(0x19c),{'signal':AbortSignal[_0x4ae0cd(0x1b1)](0x2710)});if(!_0x3741d4['ok'])return null;const _0x3d2cc0=await _0x3741d4[_0x4ae0cd(0x18d)]();if(!_0x3d2cc0||typeof _0x3d2cc0!=='object')return null;return Object[_0x4ae0cd(0x19a)](Object['entries'](_0x3d2cc0)[_0x4ae0cd(0x1cb)](([,_0x7c313f])=>typeof _0x7c313f===_0x4ae0cd(0x1bd)&&_0x7c313f[_0x4ae0cd(0x1b3)]()['length']>0x0)[_0x4ae0cd(0x1b5)](([_0x3c978c,_0x2176b9])=>[_0x3c978c,String(_0x2176b9)[_0x4ae0cd(0x1b3)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x52cb14){const _0xccf315=await fetchNpmDistTags();return _0xccf315?.[_0x52cb14]??null;}async function fetchLatestVersion(){const _0x483dbb=a40_0x221cc5;return fetchNpmDistTagVersion(_0x483dbb(0x1c2));}async function resolveTargetVersion(_0x523db6){const _0x43ea26=a40_0x221cc5,_0x5ec78e=getRequestedVersion(_0x523db6);if(_0x5ec78e)return{'version':_0x5ec78e,'source':_0x43ea26(0x1aa)};if(_0x523db6[_0x43ea26(0x1d0)]('beta')){const _0x3858f9=await fetchNpmDistTagVersion(_0x43ea26(0x196));if(!_0x3858f9)return null;return{'version':_0x3858f9,'source':'beta'};}const _0x31217c=await fetchLatestVersion();if(!_0x31217c)return null;return{'version':_0x31217c,'source':_0x43ea26(0x1c2)};}function shouldInstallTarget(_0xe5baa9,_0x4cc11b){const _0x32cf24=a40_0x221cc5;if(_0x4cc11b['source']===_0x32cf24(0x1aa)||_0x4cc11b[_0x32cf24(0x182)]===_0x32cf24(0x196))return!a40_0x4d4d95['eq'](_0xe5baa9,_0x4cc11b[_0x32cf24(0x1aa)]);return a40_0x4d4d95['lt'](_0xe5baa9,_0x4cc11b[_0x32cf24(0x1aa)]);}function getInstallPlanLabel(_0x481505,_0x4fcaf2){const _0x85e33e=a40_0x221cc5;switch(_0x4fcaf2['source']){case _0x85e33e(0x196):return _0x85e33e(0x1a1)+a40_0x496d91['yellow'](_0x481505)+_0x85e33e(0x1d1)+a40_0x496d91[_0x85e33e(0x1c7)](_0x4fcaf2[_0x85e33e(0x1aa)]);case _0x85e33e(0x1aa):return _0x85e33e(0x199)+a40_0x496d91[_0x85e33e(0x19e)](_0x481505)+_0x85e33e(0x1d1)+a40_0x496d91[_0x85e33e(0x1c7)](_0x4fcaf2['version']);case _0x85e33e(0x1c2):default:return _0x85e33e(0x1b9)+a40_0x496d91[_0x85e33e(0x19e)](_0x481505)+'\x20→\x20'+a40_0x496d91[_0x85e33e(0x1c7)](_0x4fcaf2[_0x85e33e(0x1aa)]);}}async function installCliSkill(_0x5e5cc5){const _0x5d89ec=a40_0x221cc5;console[_0x5d89ec(0x1cd)](a40_0x496d91['gray'](_0x5d89ec(0x18e)));const _0xb0cf61=runNpxSkillsAddGlobal(process[_0x5d89ec(0x189)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5e5cc5?_0x5d89ec(0x1b2):'inherit'});if(_0xb0cf61[_0x5d89ec(0x1c8)]){console[_0x5d89ec(0x1cd)](a40_0x496d91[_0x5d89ec(0x19f)](_0x5d89ec(0x1ce)));return;}if(_0xb0cf61['ok']){console[_0x5d89ec(0x1cd)](a40_0x496d91[_0x5d89ec(0x19f)](_0x5d89ec(0x1c9)));return;}console[_0x5d89ec(0x1af)](a40_0x496d91['yellow'](_0x5d89ec(0x1d4)+(_0xb0cf61['error']||'unknown'))),console[_0x5d89ec(0x1cd)](a40_0x496d91[_0x5d89ec(0x19f)](_0x5d89ec(0x1ab)+CLI_BIN_NAME+_0x5d89ec(0x1c1)));}async function execute(_0x7d1591){const _0x89810=a40_0x221cc5;await validateUpdateFlags(_0x7d1591);const _0x20e91d=getCurrentVersion();console[_0x89810(0x1cd)](_0x89810(0x1b6)+_0x20e91d);const _0x362482=a40_0x1fa0d6(_0x89810(0x18a))[_0x89810(0x1ac)](),_0x4daead=await resolveTargetVersion(_0x7d1591);if(!_0x4daead){const _0x1bf8df=_0x7d1591['bool']('beta')?_0x89810(0x1a3):_0x89810(0x1d2);return _0x362482[_0x89810(0x183)](_0x1bf8df),console[_0x89810(0x1cd)](a40_0x496d91[_0x89810(0x19f)](_0x89810(0x191)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x1bf8df};}const _0x199f43=a40_0x4d4d95[_0x89810(0x1be)](VERSION),_0x439d60=a40_0x4d4d95['valid'](_0x4daead[_0x89810(0x1aa)]);if(!_0x199f43||!_0x439d60)return _0x362482['fail'](_0x89810(0x1a9)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x199f43,_0x4daead)){const _0x48535d=_0x4daead[_0x89810(0x182)]==='version'?_0x89810(0x185)+_0x4daead[_0x89810(0x1aa)]+')':_0x89810(0x1a7)+_0x4daead[_0x89810(0x1aa)]+')';return _0x362482[_0x89810(0x1ae)](_0x48535d),shouldSkipCliSkill(_0x7d1591)?console[_0x89810(0x1cd)](a40_0x496d91[_0x89810(0x19f)](_0x89810(0x1a6))):await installCliSkill(_0x7d1591[_0x89810(0x1b8)]),{'ok':!![]};}_0x362482['info'](getInstallPlanLabel(_0x20e91d,_0x4daead));const _0x4031fb=detectPackageManager(),_0x239fbd=_0x4031fb===_0x89810(0x1b7)?resolveNpmBin('npm'):_0x4031fb,_0x1b5e0b=a40_0x1fa0d6(_0x89810(0x1b4)+_0x4031fb+'...')['start']();try{return await execa(_0x239fbd,[_0x89810(0x1cf),'-g',NPM_PACKAGE_NAME+'@'+_0x4daead[_0x89810(0x1aa)]],{'stdio':_0x89810(0x1b2)}),_0x1b5e0b[_0x89810(0x1ae)](_0x89810(0x193)+_0x4daead['version']),console[_0x89810(0x1cd)](a40_0x496d91[_0x89810(0x19f)](_0x89810(0x1d7))),shouldSkipCliSkill(_0x7d1591)?console['log'](a40_0x496d91[_0x89810(0x19f)](_0x89810(0x1a6))):await installCliSkill(_0x7d1591[_0x89810(0x1b8)]),{'ok':!![]};}catch(_0x5e9cdf){return _0x1b5e0b[_0x89810(0x183)]('Update\x20failed'),console[_0x89810(0x18b)](a40_0x496d91[_0x89810(0x1d6)]('\x20\x20'+_0x5e9cdf[_0x89810(0x1d5)])),console[_0x89810(0x1cd)](a40_0x496d91['gray']('\x20\x20Try\x20manually:\x20'+_0x4031fb+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x4daead[_0x89810(0x1aa)])),{'ok':![],'message':_0x5e9cdf[_0x89810(0x1d5)]};}}export const updateDefinition={'service':a40_0x221cc5(0x195),'command':a40_0x221cc5(0x18f),'description':a40_0x221cc5(0x1c3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a40_0xb44963=a40_0x3666;(function(_0x4a1850,_0x2cfaef){const _0x57c250=a40_0x3666,_0x143ba6=_0x4a1850();while(!![]){try{const _0x23d7ae=-parseInt(_0x57c250(0x1ea))/0x1+-parseInt(_0x57c250(0x1cc))/0x2*(parseInt(_0x57c250(0x1e6))/0x3)+parseInt(_0x57c250(0x206))/0x4*(-parseInt(_0x57c250(0x204))/0x5)+-parseInt(_0x57c250(0x1e9))/0x6*(parseInt(_0x57c250(0x1bd))/0x7)+parseInt(_0x57c250(0x1c1))/0x8*(-parseInt(_0x57c250(0x1c8))/0x9)+-parseInt(_0x57c250(0x200))/0xa+parseInt(_0x57c250(0x1bb))/0xb*(parseInt(_0x57c250(0x1d4))/0xc);if(_0x23d7ae===_0x2cfaef)break;else _0x143ba6['push'](_0x143ba6['shift']());}catch(_0x215ed2){_0x143ba6['push'](_0x143ba6['shift']());}}}(a40_0x587e,0xb8490));import a40_0xf85d64 from'chalk';import a40_0x330d2c from'ora';import a40_0x5b5e9e 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';function a40_0x3666(_0x4a492b,_0x1cf623){_0x4a492b=_0x4a492b-0x1b9;const _0x587edb=a40_0x587e();let _0x3666c6=_0x587edb[_0x4a492b];return _0x3666c6;}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 _0x306b32=a40_0x3666;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x306b32(0x1ce)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5d79d2=a40_0x3666,_0x4beae8=process[_0x5d79d2(0x209)][_0x5d79d2(0x1e8)]();if(_0x4beae8[_0x5d79d2(0x1d0)]('bun'))return _0x5d79d2(0x1d5);return _0x5d79d2(0x1bc);}const updateFlags=[{'name':'beta','type':a40_0xb44963(0x1e5),'description':a40_0xb44963(0x1f3),'default':![]},{'name':a40_0xb44963(0x1fa),'type':a40_0xb44963(0x1dd),'description':a40_0xb44963(0x1c7)},{'name':'no-skills','type':a40_0xb44963(0x1e5),'description':'Skip\x20CLI\x20Built-in\x20Skill\x20refresh\x20after\x20updating','default':![]},{'name':a40_0xb44963(0x1fe),'type':a40_0xb44963(0x1e5),'description':a40_0xb44963(0x1bf),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x263206){const _0x5d6593=a40_0xb44963;return _0x263206['str'](_0x5d6593(0x1fa))[_0x5d6593(0x1f4)]();}function shouldSkipCliSkill(_0x31f469){const _0x32ebb2=a40_0xb44963;return _0x31f469[_0x32ebb2(0x1c3)](_0x32ebb2(0x205))||_0x31f469['flag'](_0x32ebb2(0x1fe))===![];}function a40_0x587e(){const _0x5489bf=['includes','validation','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20cli-skill\x20install','1193064PmAWjh','bun','\x20\x20CLI\x20Built-in\x20Skill\x20update\x20failed:\x20','\x20\x20Try\x20manually:\x20','\x20\x20CLI\x20Built-in\x20Skill\x20is\x20up\x20to\x20date.','gray','fail','skipped','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','string','json','Update\x20failed','\x20→\x20','update','\x20install\x20-g\x20','Updated\x20to\x20v','green','boolean','1001307rXkPEq','fromEntries','toLowerCase','1067532hULyEg','1357310bYcMGe','log','error','message','yellow','source','Update\x20available:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','\x20\x20Run\x20manually:\x20','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','trim','pipe','beta','start','Version\x20comparison\x20failed','valid','version','entries','info','...','skills','unknown','1812390JEIciu','Updating\x20via\x20','filter','Skipping\x20CLI\x20Built-in\x20Skill\x20refresh\x20(--no-skills).','10ZvmMAm','no-skills','2012820xZbNOF','run','cwd','execPath','Already\x20up\x20to\x20date\x20(v','Current\x20version:\x20','/dist-tags','682huYUtP','npm','35WrKmbQ','Beta\x20version:\x20','Refresh\x20CLI\x20Built-in\x20Skill\x20after\x20updating','\x20\x20Skipped\x20CLI\x20Built-in\x20Skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','3893824HEUjrE','https://registry.npmjs.org/-/package/','bool','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Checking\x20CLI\x20Built-in\x20Skill...','Already\x20on\x20requested\x20version\x20(v','Install\x20a\x20specific\x20CLI\x20version','18AMZmNK','latest','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','nonInteractive','6GIXXcr','succeed','slice','Requested\x20version:\x20'];a40_0x587e=function(){return _0x5489bf;};return a40_0x587e();}async function validateUpdateFlags(_0x5add0a){const _0x30bf97=a40_0xb44963,_0x5434f7=_0x5add0a['bool'](_0x30bf97(0x1f6)),_0x4a1fb5=getRequestedVersion(_0x5add0a);if(_0x5434f7&&_0x4a1fb5)throw CliErrors[_0x30bf97(0x1d1)](_0x30bf97(0x1d2),_0x30bf97(0x1f1));if(_0x4a1fb5&&!a40_0x5b5e9e['valid'](_0x4a1fb5))throw CliErrors['validation']('Invalid\x20version:\x20'+_0x4a1fb5,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x273dad=a40_0xb44963;try{const _0x5520a1=await fetch(_0x273dad(0x1c2)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x273dad(0x1ba),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x5520a1['ok'])return null;const _0x191f4d=await _0x5520a1[_0x273dad(0x1de)]();if(!_0x191f4d||typeof _0x191f4d!=='object')return null;return Object[_0x273dad(0x1e7)](Object[_0x273dad(0x1fb)](_0x191f4d)[_0x273dad(0x202)](([,_0x1989d3])=>typeof _0x1989d3===_0x273dad(0x1dd)&&_0x1989d3[_0x273dad(0x1f4)]()['length']>0x0)['map'](([_0x520c99,_0x2661fc])=>[_0x520c99,String(_0x2661fc)[_0x273dad(0x1f4)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x450672){const _0x28eae6=await fetchNpmDistTags();return _0x28eae6?.[_0x450672]??null;}async function fetchLatestVersion(){const _0x3c6c3e=a40_0xb44963;return fetchNpmDistTagVersion(_0x3c6c3e(0x1c9));}async function resolveTargetVersion(_0x33205c){const _0x148bed=a40_0xb44963,_0x2fed6f=getRequestedVersion(_0x33205c);if(_0x2fed6f)return{'version':_0x2fed6f,'source':'version'};if(_0x33205c[_0x148bed(0x1c3)]('beta')){const _0x4844bb=await fetchNpmDistTagVersion(_0x148bed(0x1f6));if(!_0x4844bb)return null;return{'version':_0x4844bb,'source':_0x148bed(0x1f6)};}const _0x1a723c=await fetchLatestVersion();if(!_0x1a723c)return null;return{'version':_0x1a723c,'source':_0x148bed(0x1c9)};}function shouldInstallTarget(_0x2325d8,_0x108c81){const _0xd26cd6=a40_0xb44963;if(_0x108c81[_0xd26cd6(0x1ef)]===_0xd26cd6(0x1fa)||_0x108c81['source']===_0xd26cd6(0x1f6))return!a40_0x5b5e9e['eq'](_0x2325d8,_0x108c81[_0xd26cd6(0x1fa)]);return a40_0x5b5e9e['lt'](_0x2325d8,_0x108c81['version']);}function getInstallPlanLabel(_0x58ceca,_0x282e52){const _0x33a540=a40_0xb44963;switch(_0x282e52['source']){case _0x33a540(0x1f6):return _0x33a540(0x1be)+a40_0xf85d64['yellow'](_0x58ceca)+_0x33a540(0x1e0)+a40_0xf85d64[_0x33a540(0x1e4)](_0x282e52[_0x33a540(0x1fa)]);case'version':return _0x33a540(0x1cf)+a40_0xf85d64[_0x33a540(0x1ee)](_0x58ceca)+_0x33a540(0x1e0)+a40_0xf85d64['green'](_0x282e52['version']);case'latest':default:return _0x33a540(0x1f0)+a40_0xf85d64['yellow'](_0x58ceca)+_0x33a540(0x1e0)+a40_0xf85d64['green'](_0x282e52[_0x33a540(0x1fa)]);}}async function installCliSkill(_0x5764d3){const _0x1cb4a2=a40_0xb44963;console[_0x1cb4a2(0x1eb)](a40_0xf85d64[_0x1cb4a2(0x1d9)](_0x1cb4a2(0x1c5)));const _0x5c588b=runNpxSkillsAddGlobal(process[_0x1cb4a2(0x208)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5764d3?_0x1cb4a2(0x1f5):'inherit'});if(_0x5c588b[_0x1cb4a2(0x1db)]){console[_0x1cb4a2(0x1eb)](a40_0xf85d64[_0x1cb4a2(0x1d9)](_0x1cb4a2(0x1c0)));return;}if(_0x5c588b['ok']){console['log'](a40_0xf85d64[_0x1cb4a2(0x1d9)](_0x1cb4a2(0x1d8)));return;}console['warn'](a40_0xf85d64[_0x1cb4a2(0x1ee)](_0x1cb4a2(0x1d6)+(_0x5c588b[_0x1cb4a2(0x1ec)]||_0x1cb4a2(0x1ff)))),console[_0x1cb4a2(0x1eb)](a40_0xf85d64[_0x1cb4a2(0x1d9)](_0x1cb4a2(0x1f2)+CLI_BIN_NAME+_0x1cb4a2(0x1d3)));}async function execute(_0x745630){const _0x5b920e=a40_0xb44963;await validateUpdateFlags(_0x745630);const _0x13bf8a=getCurrentVersion();console[_0x5b920e(0x1eb)](_0x5b920e(0x1b9)+_0x13bf8a);const _0x1aab5c=a40_0x330d2c('Checking\x20for\x20updates...')[_0x5b920e(0x1f7)](),_0x1fa93d=await resolveTargetVersion(_0x745630);if(!_0x1fa93d){const _0x4f20b5=_0x745630[_0x5b920e(0x1c3)](_0x5b920e(0x1f6))?_0x5b920e(0x1dc):_0x5b920e(0x1ca);return _0x1aab5c[_0x5b920e(0x1da)](_0x4f20b5),console['log'](a40_0xf85d64[_0x5b920e(0x1d9)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x4f20b5};}const _0x487257=a40_0x5b5e9e[_0x5b920e(0x1f9)](VERSION),_0x43d533=a40_0x5b5e9e[_0x5b920e(0x1f9)](_0x1fa93d[_0x5b920e(0x1fa)]);if(!_0x487257||!_0x43d533)return _0x1aab5c[_0x5b920e(0x1da)](_0x5b920e(0x1f8)),{'ok':![],'message':_0x5b920e(0x1f8)};if(!shouldInstallTarget(_0x487257,_0x1fa93d)){const _0x20848f=_0x1fa93d[_0x5b920e(0x1ef)]===_0x5b920e(0x1fa)?_0x5b920e(0x1c6)+_0x1fa93d[_0x5b920e(0x1fa)]+')':_0x5b920e(0x20a)+_0x1fa93d[_0x5b920e(0x1fa)]+')';return _0x1aab5c[_0x5b920e(0x1cd)](_0x20848f),shouldSkipCliSkill(_0x745630)?console['log'](a40_0xf85d64[_0x5b920e(0x1d9)](_0x5b920e(0x203))):await installCliSkill(_0x745630[_0x5b920e(0x1cb)]),{'ok':!![]};}_0x1aab5c[_0x5b920e(0x1fc)](getInstallPlanLabel(_0x13bf8a,_0x1fa93d));const _0x4a6e22=detectPackageManager(),_0x35bd8d=_0x4a6e22===_0x5b920e(0x1bc)?resolveNpmBin('npm'):_0x4a6e22,_0x3d12cb=a40_0x330d2c(_0x5b920e(0x201)+_0x4a6e22+_0x5b920e(0x1fd))[_0x5b920e(0x1f7)]();try{return await execa(_0x35bd8d,['install','-g',NPM_PACKAGE_NAME+'@'+_0x1fa93d['version']],{'stdio':_0x5b920e(0x1f5)}),_0x3d12cb['succeed'](_0x5b920e(0x1e3)+_0x1fa93d[_0x5b920e(0x1fa)]),console[_0x5b920e(0x1eb)](a40_0xf85d64['gray']('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipCliSkill(_0x745630)?console[_0x5b920e(0x1eb)](a40_0xf85d64['gray'](_0x5b920e(0x203))):await installCliSkill(_0x745630[_0x5b920e(0x1cb)]),{'ok':!![]};}catch(_0x292f11){return _0x3d12cb[_0x5b920e(0x1da)](_0x5b920e(0x1df)),console[_0x5b920e(0x1ec)](a40_0xf85d64['red']('\x20\x20'+_0x292f11[_0x5b920e(0x1ed)])),console['log'](a40_0xf85d64[_0x5b920e(0x1d9)](_0x5b920e(0x1d7)+_0x4a6e22+_0x5b920e(0x1e2)+NPM_PACKAGE_NAME+'@'+_0x1fa93d[_0x5b920e(0x1fa)])),{'ok':![],'message':_0x292f11[_0x5b920e(0x1ed)]};}}export const updateDefinition={'service':a40_0xb44963(0x1e1),'command':a40_0xb44963(0x207),'description':a40_0xb44963(0x1c4),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x4e4bdc,_0x4a1778){const _0x113e36=a41_0x2ec9,_0x27b262=_0x4e4bdc();while(!![]){try{const _0x368e39=parseInt(_0x113e36(0xef))/0x1*(parseInt(_0x113e36(0xf3))/0x2)+-parseInt(_0x113e36(0xf2))/0x3+-parseInt(_0x113e36(0xf4))/0x4*(parseInt(_0x113e36(0xed))/0x5)+parseInt(_0x113e36(0xf5))/0x6+-parseInt(_0x113e36(0xf1))/0x7*(-parseInt(_0x113e36(0xf0))/0x8)+-parseInt(_0x113e36(0xeb))/0x9*(parseInt(_0x113e36(0xec))/0xa)+-parseInt(_0x113e36(0xee))/0xb;if(_0x368e39===_0x4a1778)break;else _0x27b262['push'](_0x27b262['shift']());}catch(_0x4a8082){_0x27b262['push'](_0x27b262['shift']());}}}(a41_0x5be8,0xa5918));import{codegenSdk}from'../../commands/codegen/sdk.js';function a41_0x5be8(){const _0x2a1c68=['314365efJFEv','40rhWCPS','1545257IuPvNv','2431161TeIYIQ','6IMqNMj','117084BmugNj','7557366jLODXh','388143obsQiv','20EWTgwS','55VOCyFh','15505831tIVOdq'];a41_0x5be8=function(){return _0x2a1c68;};return a41_0x5be8();}function a41_0x2ec9(_0x57b70c,_0x57275a){_0x57b70c=_0x57b70c-0xeb;const _0x5be8fe=a41_0x5be8();let _0x2ec943=_0x5be8fe[_0x57b70c];return _0x2ec943;}import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x4dfa94,_0x47fe22){const _0xc15d44=a41_0x45c8,_0x3c4985=_0x4dfa94();while(!![]){try{const _0x24d176=-parseInt(_0xc15d44(0x6e))/0x1+parseInt(_0xc15d44(0x74))/0x2+parseInt(_0xc15d44(0x6d))/0x3+parseInt(_0xc15d44(0x72))/0x4*(-parseInt(_0xc15d44(0x6f))/0x5)+parseInt(_0xc15d44(0x73))/0x6+parseInt(_0xc15d44(0x70))/0x7*(-parseInt(_0xc15d44(0x6b))/0x8)+-parseInt(_0xc15d44(0x6c))/0x9*(-parseInt(_0xc15d44(0x71))/0xa);if(_0x24d176===_0x47fe22)break;else _0x3c4985['push'](_0x3c4985['shift']());}catch(_0x17c443){_0x3c4985['push'](_0x3c4985['shift']());}}}(a41_0x4930,0x3ef7d));function a41_0x4930(){const _0x5db6ec=['17105vgWRjD','91iAyaXk','10nxgCfJ','316jgwyoV','588744FPrAAz','655762GesuAW','22584DUtpVf','432315cgBusR','452157fGiOiB','59884hdxlUV'];a41_0x4930=function(){return _0x5db6ec;};return a41_0x4930();}function a41_0x45c8(_0x206de4,_0x44cbcd){_0x206de4=_0x206de4-0x6b;const _0x493044=a41_0x4930();let _0x45c82c=_0x493044[_0x206de4];return _0x45c82c;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a42_0x5ccbf0=a42_0x2a7d;(function(_0x368706,_0x460413){const _0x15c8d3=a42_0x2a7d,_0x1c1a65=_0x368706();while(!![]){try{const _0x4ae845=-parseInt(_0x15c8d3(0xa7))/0x1*(parseInt(_0x15c8d3(0x90))/0x2)+-parseInt(_0x15c8d3(0x98))/0x3*(parseInt(_0x15c8d3(0x8f))/0x4)+-parseInt(_0x15c8d3(0x96))/0x5+parseInt(_0x15c8d3(0x99))/0x6*(parseInt(_0x15c8d3(0xa5))/0x7)+-parseInt(_0x15c8d3(0xa2))/0x8*(parseInt(_0x15c8d3(0x9a))/0x9)+-parseInt(_0x15c8d3(0x9e))/0xa*(parseInt(_0x15c8d3(0xa6))/0xb)+parseInt(_0x15c8d3(0xa3))/0xc;if(_0x4ae845===_0x460413)break;else _0x1c1a65['push'](_0x1c1a65['shift']());}catch(_0x41ae76){_0x1c1a65['push'](_0x1c1a65['shift']());}}}(a42_0x3208,0x8450c));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a42_0x2a7d(_0x3a35d9,_0x48a9fe){_0x3a35d9=_0x3a35d9-0x8c;const _0x32086d=a42_0x3208();let _0x2a7dec=_0x32086d[_0x3a35d9];return _0x2a7dec;}export const codegenSdk={'service':a42_0x5ccbf0(0x94),'command':'sdk','description':a42_0x5ccbf0(0x8d),'risk':a42_0x5ccbf0(0x9d),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a42_0x5ccbf0(0x9c),'description':a42_0x5ccbf0(0xa0)},{'name':'operation','type':a42_0x5ccbf0(0x9c),'required':!![],'description':a42_0x5ccbf0(0xa1)},{'name':a42_0x5ccbf0(0x9f),'type':a42_0x5ccbf0(0x8c),'description':a42_0x5ccbf0(0xa4)}],async 'execute'(_0x4cdf6d){const _0x2ba0ab=a42_0x5ccbf0,{dataset:_0x20f0d3,operation:_0x12bdf6}=await getOperationDetail(_0x4cdf6d[_0x2ba0ab(0x92)],_0x4cdf6d['str'](_0x2ba0ab(0x97)),_0x4cdf6d[_0x2ba0ab(0x91)](_0x2ba0ab(0x93))),_0x4c1a54=generateSdkCode(_0x20f0d3,_0x12bdf6,{'includeImports':!_0x4cdf6d[_0x2ba0ab(0x8e)](_0x2ba0ab(0x9f))});return{'ok':!![],'data':{'dataset':{'name':_0x20f0d3[_0x2ba0ab(0x95)],'code':_0x20f0d3[_0x2ba0ab(0x97)],'tableName':_0x20f0d3[_0x2ba0ab(0x9b)]},'operation':_0x4cdf6d[_0x2ba0ab(0x91)]('operation'),'code':_0x4c1a54}};}};function a42_0x3208(){const _0xef0fa1=['6770ZKYULm','skip-imports','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','759464fGQNON','35176704omGNEn','Omit\x20import\x20statements\x20from\x20generated\x20code','1442lGzeho','8525BjeRHi','502701xgwJcq','boolean','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','bool','196dObLBc','4XxFIml','str','appCode','operation','codegen','name','3228870SkPwGj','code','44634GsZrct','17778dkNutD','9ygBcTl','tableName','string','read'];a42_0x3208=function(){return _0xef0fa1;};return a42_0x3208();}
1
+ const a42_0x24ca12=a42_0xe450;function a42_0xe450(_0x4540ad,_0xa37419){_0x4540ad=_0x4540ad-0xfd;const _0x1727d6=a42_0x1727();let _0xe45057=_0x1727d6[_0x4540ad];return _0xe45057;}function a42_0x1727(){const _0x8ad3d8=['str','sdk','2536236NvgwSa','7371273AJPufA','read','Omit\x20import\x20statements\x20from\x20generated\x20code','operation','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','boolean','23876010rGbEaQ','appCode','386SPZwPn','string','58116ouTfzo','6056960FZbqWx','15lPHFfZ','5700WwGOoh','codegen','name','8013534voxPGX','skip-imports','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','tableName','alias','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','bool'];a42_0x1727=function(){return _0x8ad3d8;};return a42_0x1727();}(function(_0xeab890,_0x4d29f4){const _0x3c57ab=a42_0xe450,_0x1e718e=_0xeab890();while(!![]){try{const _0x13e849=parseInt(_0x3c57ab(0x105))/0x1*(parseInt(_0x3c57ab(0x100))/0x2)+-parseInt(_0x3c57ab(0x111))/0x3+-parseInt(_0x3c57ab(0x102))/0x4*(parseInt(_0x3c57ab(0x104))/0x5)+parseInt(_0x3c57ab(0x108))/0x6+parseInt(_0x3c57ab(0x112))/0x7+parseInt(_0x3c57ab(0x103))/0x8+-parseInt(_0x3c57ab(0xfe))/0x9;if(_0x13e849===_0x4d29f4)break;else _0x1e718e['push'](_0x1e718e['shift']());}catch(_0xd0554c){_0x1e718e['push'](_0x1e718e['shift']());}}}(a42_0x1727,0xabdd7));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a42_0x24ca12(0x106),'command':a42_0x24ca12(0x110),'description':a42_0x24ca12(0x10d),'risk':a42_0x24ca12(0x113),'flags':[CODE_FLAG_OPTIONAL,{'name':a42_0x24ca12(0x10c),'type':a42_0x24ca12(0x101),'description':a42_0x24ca12(0x10a)},{'name':a42_0x24ca12(0x115),'type':a42_0x24ca12(0x101),'required':!![],'description':a42_0x24ca12(0x116)},{'name':'skip-imports','type':a42_0x24ca12(0xfd),'description':a42_0x24ca12(0x114)}],async 'execute'(_0x58a7a9){const _0x1625f4=a42_0x24ca12,{dataset:_0x53e3a7,operation:_0x147996}=await getOperationDetail(_0x58a7a9[_0x1625f4(0xff)],_0x58a7a9[_0x1625f4(0x10f)]('code'),_0x58a7a9['str']('operation')),_0x42dd39=generateSdkCode(_0x53e3a7,_0x147996,{'includeImports':!_0x58a7a9[_0x1625f4(0x10e)](_0x1625f4(0x109))});return{'ok':!![],'data':{'dataset':{'name':_0x53e3a7[_0x1625f4(0x107)],'code':_0x53e3a7['code'],'tableName':_0x53e3a7[_0x1625f4(0x10b)]},'operation':_0x58a7a9[_0x1625f4(0x10f)](_0x1625f4(0x115)),'code':_0x42dd39}};}};
@@ -1 +1 @@
1
- const a43_0xbd323f=a43_0x4e27;function a43_0x2044(){const _0x4b78f0=['Code\x20target:\x20sdk\x20(default)\x20or\x20bff','target','322254wPTFlD','read','sdk','2053176ugVbUT','5wWJxkS','2529736mReYZQ','sqlName','5209435VDLeqh','appCode','3454194JmgexF','bool','boolean','str','sqlcode','no-imports','555002BePyUd','string','sqlCode','codegen','298896gLNRja','sql'];a43_0x2044=function(){return _0x4b78f0;};return a43_0x2044();}function a43_0x4e27(_0x184cd0,_0x2ff556){_0x184cd0=_0x184cd0-0xb4;const _0x2044cd=a43_0x2044();let _0x4e27e7=_0x2044cd[_0x184cd0];return _0x4e27e7;}(function(_0x1f7b27,_0x335fab){const _0x16744e=a43_0x4e27,_0x4d3f3a=_0x1f7b27();while(!![]){try{const _0x4185e8=-parseInt(_0x16744e(0xc6))/0x1+-parseInt(_0x16744e(0xb7))/0x2+parseInt(_0x16744e(0xca))/0x3+-parseInt(_0x16744e(0xba))/0x4*(-parseInt(_0x16744e(0xbb))/0x5)+-parseInt(_0x16744e(0xc0))/0x6+parseInt(_0x16744e(0xbe))/0x7+parseInt(_0x16744e(0xbc))/0x8;if(_0x4185e8===_0x335fab)break;else _0x4d3f3a['push'](_0x4d3f3a['shift']());}catch(_0x478e8c){_0x4d3f3a['push'](_0x4d3f3a['shift']());}}}(a43_0x2044,0x5d250));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0xbd323f(0xc9),'command':a43_0xbd323f(0xb4),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a43_0xbd323f(0xb8),'flags':[SQLCODE_FLAG,{'name':a43_0xbd323f(0xb6),'type':a43_0xbd323f(0xc7),'description':a43_0xbd323f(0xb5),'default':a43_0xbd323f(0xb9),'enum':[a43_0xbd323f(0xb9),'bff']},{'name':a43_0xbd323f(0xc5),'type':a43_0xbd323f(0xc2),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x1dc3fd){const _0x198347=a43_0xbd323f,_0x3cf958=await getSqlQueryInfo(_0x1dc3fd[_0x198347(0xbf)],_0x1dc3fd[_0x198347(0xc3)](_0x198347(0xc4))),_0x33b239=_0x1dc3fd[_0x198347(0xc3)](_0x198347(0xb6))||_0x198347(0xb9),_0x543ede=generateSqlCodeTemplate(_0x3cf958,{'target':_0x33b239,'includeImports':!_0x1dc3fd[_0x198347(0xc1)](_0x198347(0xc5))});return{'ok':!![],'data':{'sqlCode':_0x3cf958[_0x198347(0xc8)],'sqlName':_0x3cf958[_0x198347(0xbd)],'target':_0x33b239,'code':_0x543ede}};}};
1
+ function a43_0x3394(_0x163690,_0x2998c9){_0x163690=_0x163690-0x7a;const _0x304629=a43_0x3046();let _0x3394d3=_0x304629[_0x163690];return _0x3394d3;}const a43_0x56357d=a43_0x3394;function a43_0x3046(){const _0x424beb=['target','7217FakInS','sql','4102720iKxnwa','1788740CYCGns','16362ixGChv','sdk','sqlCode','Omit\x20import\x20statements\x20from\x20generated\x20code','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','str','boolean','894iDExGi','codegen','appCode','7110XtpHhI','1940865KlOnfC','sqlName','12211UsQDHf','no-imports','1299381QAokXN','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','10sTQTQi','string','bool'];a43_0x3046=function(){return _0x424beb;};return a43_0x3046();}(function(_0x228d83,_0x36d089){const _0x29022d=a43_0x3394,_0x9d7367=_0x228d83();while(!![]){try{const _0x796149=parseInt(_0x29022d(0x87))/0x1*(parseInt(_0x29022d(0x8b))/0x2)+-parseInt(_0x29022d(0x89))/0x3+parseInt(_0x29022d(0x92))/0x4+-parseInt(_0x29022d(0x85))/0x5+-parseInt(_0x29022d(0x81))/0x6*(parseInt(_0x29022d(0x8f))/0x7)+-parseInt(_0x29022d(0x91))/0x8+parseInt(_0x29022d(0x7a))/0x9*(parseInt(_0x29022d(0x84))/0xa);if(_0x796149===_0x36d089)break;else _0x9d7367['push'](_0x9d7367['shift']());}catch(_0x1e9691){_0x9d7367['push'](_0x9d7367['shift']());}}}(a43_0x3046,0x4c6f7));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a43_0x56357d(0x82),'command':a43_0x56357d(0x90),'description':a43_0x56357d(0x7e),'risk':'read','flags':[SQLCODE_FLAG,{'name':a43_0x56357d(0x8e),'type':a43_0x56357d(0x8c),'description':a43_0x56357d(0x8a),'default':a43_0x56357d(0x7b),'enum':[a43_0x56357d(0x7b),'bff']},{'name':a43_0x56357d(0x88),'type':a43_0x56357d(0x80),'description':a43_0x56357d(0x7d)}],async 'execute'(_0x757ff7){const _0x16b65d=a43_0x56357d,_0x2e09db=await getSqlQueryInfo(_0x757ff7[_0x16b65d(0x83)],_0x757ff7[_0x16b65d(0x7f)]('sqlcode')),_0x22c24b=_0x757ff7['str'](_0x16b65d(0x8e))||_0x16b65d(0x7b),_0x225d3a=generateSqlCodeTemplate(_0x2e09db,{'target':_0x22c24b,'includeImports':!_0x757ff7[_0x16b65d(0x8d)](_0x16b65d(0x88))});return{'ok':!![],'data':{'sqlCode':_0x2e09db[_0x16b65d(0x7c)],'sqlName':_0x2e09db[_0x16b65d(0x86)],'target':_0x22c24b,'code':_0x225d3a}};}};
@@ -1 +1 @@
1
- (function(_0x3bbc2f,_0x37fce3){const _0x1d1efc=a44_0x34e7,_0x2ba567=_0x3bbc2f();while(!![]){try{const _0x37742d=-parseInt(_0x1d1efc(0xae))/0x1+parseInt(_0x1d1efc(0xa5))/0x2+parseInt(_0x1d1efc(0xaf))/0x3+-parseInt(_0x1d1efc(0xc2))/0x4*(-parseInt(_0x1d1efc(0xb6))/0x5)+parseInt(_0x1d1efc(0xba))/0x6*(-parseInt(_0x1d1efc(0xc3))/0x7)+-parseInt(_0x1d1efc(0xa9))/0x8+-parseInt(_0x1d1efc(0xb8))/0x9*(-parseInt(_0x1d1efc(0x9e))/0xa);if(_0x37742d===_0x37fce3)break;else _0x2ba567['push'](_0x2ba567['shift']());}catch(_0x3d3319){_0x2ba567['push'](_0x2ba567['shift']());}}}(a44_0x2800,0x190f7));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';function a44_0x2800(){const _0x3f1fd2=['\x20app\x20\x22','defaultApp','length','1636944gdkDyP','args','App\x20\x22','str','global','109179kiHBHf','109110yIuHDC','appcode','Use\x20global\x20config\x20scope','validation','Removed\x20app\x20\x22','Updated','flagMissing','185vPlSqw','object','32616pLUCWh','Usage:\x20','6iMpIpK','string','\x20config.','boolean','\x20Set\x20as\x20default\x20app.','bool','globalConfig','\x20<name>\x20--appcode\x20<code>','17032BjFatO','578109qPhWZj','projectConfig','trim','Missing\x20app\x20name.','\x20Default\x20app\x20changed\x20to\x20\x22','apps','\x22\x20still\x20defined\x20in\x20','480VFwLPz','\x22\x20not\x20found.','App\x20code','\x20Note:\x20app\x20\x22','keys','project','Added','262326kfuBEQ'];a44_0x2800=function(){return _0x3f1fd2;};return a44_0x2800();}import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x3d68cd=a44_0x34e7;return[{'name':_0x3d68cd(0xb0),'type':_0x3d68cd(0xbb),'description':_0x3d68cd(0xa0),'required':!![]},{'name':_0x3d68cd(0xad),'type':_0x3d68cd(0xbd),'description':_0x3d68cd(0xb1),'default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0xd397a=a44_0x34e7;return[{'name':_0xd397a(0xad),'type':_0xd397a(0xbd),'description':_0xd397a(0xb1),'default':![]}];}export async function validateAppName(_0x33f546,_0x10d8aa){const _0x508739=a44_0x34e7,_0x5afa00=_0x33f546[_0x508739(0xaa)][0x0]?.[_0x508739(0xc5)]();if(!_0x5afa00)throw CliErrors['validation'](_0x508739(0xc6),_0x508739(0xb9)+CLI_BIN_NAME+'\x20'+_0x10d8aa+'\x20<name>');}function a44_0x34e7(_0x66f88f,_0x3df013){_0x66f88f=_0x66f88f-0x9c;const _0x28009c=a44_0x2800();let _0x34e7d4=_0x28009c[_0x66f88f];return _0x34e7d4;}export async function runAppAdd(_0xa91816,_0x2d7938){const _0x42935f=a44_0x34e7,_0x575247=_0xa91816[_0x42935f(0xaa)][0x0]?.[_0x42935f(0xc5)]();if(!_0x575247)throw CliErrors['validation'](_0x42935f(0xc6),_0x42935f(0xb9)+CLI_BIN_NAME+'\x20'+_0x2d7938+_0x42935f(0xc1));const _0xbb9116=_0xa91816[_0x42935f(0xac)](_0x42935f(0xb0));if(!_0xbb9116)throw CliErrors[_0x42935f(0xb5)](_0x42935f(0xb0),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0x2d7938+'\x20<name>\x20--appcode\x20<code>');const _0x5a13fc={'global':_0xa91816[_0x42935f(0xbf)](_0x42935f(0xad))},_0xc437c6=readConfig(_0x5a13fc);if(!_0xc437c6['apps'])_0xc437c6['apps']={};const _0x5364cf={'appcode':_0xbb9116,...collectAppProfileOverrides(_0x27613c=>_0xa91816['str'](_0x27613c))},_0x1c1698=_0xc437c6[_0x42935f(0x9c)],_0x506e2f=!!_0x1c1698[_0x575247];_0x1c1698[_0x575247]=_0x5364cf;if(!_0xc437c6['defaultApp'])_0xc437c6['defaultApp']=_0x575247;writeConfig(_0xc437c6,_0x5a13fc);const _0x460482=!_0x506e2f&&_0xc437c6[_0x42935f(0xa7)]===_0x575247?_0x42935f(0xbe):'',_0x3319f5=(_0x506e2f?_0x42935f(0xb4):_0x42935f(0xa4))+_0x42935f(0xa6)+_0x575247+'\x22\x20(appcode:\x20'+_0xbb9116+')'+scopeLabel(_0x5a13fc)+'.'+_0x460482;return{'ok':!![],'message':_0x3319f5};}export async function runAppRemove(_0x54e595,_0xae8a71){const _0x1bfd80=a44_0x34e7,_0x1c5eab=_0x54e595[_0x1bfd80(0xaa)][0x0]?.[_0x1bfd80(0xc5)]();if(!_0x1c5eab)throw CliErrors['validation'](_0x1bfd80(0xc6),'Usage:\x20'+CLI_BIN_NAME+'\x20'+_0xae8a71+'\x20<name>\x20[--global]');const _0x2f8991=_0x54e595['bool'](_0x1bfd80(0xad)),{config:_0x42d183,layers:_0xfb7a79}=readRawConfigWithLayers(),_0x5f22fb=_0x42d183[_0x1bfd80(0x9c)]??{};if(!_0x5f22fb[_0x1c5eab])throw CliErrors[_0x1bfd80(0xb2)]('App\x20\x22'+_0x1c5eab+_0x1bfd80(0x9f));const _0x1c7d2f=_0xfb7a79[_0x1bfd80(0xc0)][_0x1bfd80(0x9c)]&&typeof _0xfb7a79[_0x1bfd80(0xc0)][_0x1bfd80(0x9c)]===_0x1bfd80(0xb7)?_0xfb7a79[_0x1bfd80(0xc0)][_0x1bfd80(0x9c)]:{},_0x27e4a4=_0xfb7a79[_0x1bfd80(0xc4)][_0x1bfd80(0x9c)]&&typeof _0xfb7a79[_0x1bfd80(0xc4)][_0x1bfd80(0x9c)]===_0x1bfd80(0xb7)?_0xfb7a79[_0x1bfd80(0xc4)]['apps']:{},_0x56d8e9=appDefinedIn(_0x1c5eab,_0x1c7d2f,_0x27e4a4,_0xfb7a79[_0x1bfd80(0xc4)]['inherit']===![]),_0x360dca=resolveAppScopeForWrite(_0x1c5eab,_0x2f8991,_0xfb7a79),_0x316686={'global':_0x360dca==='global'},_0x27c040=readConfig(_0x316686),_0x4ff7bb=_0x27c040[_0x1bfd80(0x9c)];if(!_0x4ff7bb||!_0x4ff7bb[_0x1c5eab])throw CliErrors[_0x1bfd80(0xb2)](_0x1bfd80(0xab)+_0x1c5eab+_0x1bfd80(0x9f));delete _0x4ff7bb[_0x1c5eab];let _0x266a90='';if(_0x27c040[_0x1bfd80(0xa7)]===_0x1c5eab){const _0x466f01=Object[_0x1bfd80(0xa2)](_0x4ff7bb);_0x27c040[_0x1bfd80(0xa7)]=_0x466f01[_0x1bfd80(0xa8)]>0x0?_0x466f01[0x0]:undefined,_0x27c040[_0x1bfd80(0xa7)]?_0x266a90=_0x1bfd80(0xc7)+_0x27c040[_0x1bfd80(0xa7)]+'\x22.':delete _0x27c040[_0x1bfd80(0xa7)];}Object[_0x1bfd80(0xa2)](_0x4ff7bb)[_0x1bfd80(0xa8)]===0x0&&(delete _0x27c040[_0x1bfd80(0x9c)],delete _0x27c040['defaultApp']);writeConfig(_0x27c040,_0x316686);const _0x2be80a=_0x56d8e9==='both'?_0x1bfd80(0xa1)+_0x1c5eab+_0x1bfd80(0x9d)+(_0x360dca===_0x1bfd80(0xa3)?_0x1bfd80(0xad):_0x1bfd80(0xa3))+_0x1bfd80(0xbc):'';return{'ok':!![],'message':_0x1bfd80(0xb3)+_0x1c5eab+'\x22'+scopeLabel(_0x316686)+'.'+_0x266a90+_0x2be80a};}
1
+ (function(_0x498530,_0x44c4fb){const _0x32464b=a44_0x4d7d,_0x1d973b=_0x498530();while(!![]){try{const _0x18fc32=-parseInt(_0x32464b(0x13b))/0x1+-parseInt(_0x32464b(0x13d))/0x2+-parseInt(_0x32464b(0x14a))/0x3*(parseInt(_0x32464b(0x126))/0x4)+-parseInt(_0x32464b(0x141))/0x5*(parseInt(_0x32464b(0x131))/0x6)+parseInt(_0x32464b(0x137))/0x7+parseInt(_0x32464b(0x12b))/0x8*(-parseInt(_0x32464b(0x138))/0x9)+parseInt(_0x32464b(0x142))/0xa;if(_0x18fc32===_0x44c4fb)break;else _0x1d973b['push'](_0x1d973b['shift']());}catch(_0x3399b4){_0x1d973b['push'](_0x1d973b['shift']());}}}(a44_0x91b7,0xb3a1c));function a44_0x4d7d(_0x3d3b42,_0x77777e){_0x3d3b42=_0x3d3b42-0x121;const _0x91b7ea=a44_0x91b7();let _0x4d7d4a=_0x91b7ea[_0x3d3b42];return _0x4d7d4a;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a44_0x91b7(){const _0x167eb1=['inherit','App\x20\x22','\x20<name>\x20--appcode\x20<code>','1297014frQuiI','projectConfig','flagMissing','boolean','project','bool','8534610bXLKND','2027745jEJsOD','\x20app\x20\x22','Usage:\x20','863652xDdbvc','\x22\x20still\x20defined\x20in\x20','2447902hVWDhE','global','\x22\x20not\x20found.','object','15alXKsT','43701510mZFHsT','defaultApp','validation','keys','args','\x20<name>','Missing\x20app\x20name.','apps','471MZYOYP','trim','appcode','string','Use\x20global\x20config\x20scope','\x20Set\x20as\x20default\x20app.','length','30988UFCHzn','both','\x22\x20(appcode:\x20','\x20Note:\x20app\x20\x22','str','32KVKGBh','\x20config.','globalConfig'];a44_0x91b7=function(){return _0x167eb1;};return a44_0x91b7();}import{collectAppProfileOverrides,getAppProfileFlagDefs}from'../../config/schema.js';import{readRawConfigWithLayers}from'../../context.js';import{readConfig,writeConfig,scopeLabel,resolveAppScopeForWrite,appDefinedIn}from'../../commands/app/shared.js';export function buildAppAddFlags(){const _0x3e276d=a44_0x4d7d;return[{'name':_0x3e276d(0x121),'type':_0x3e276d(0x122),'description':'App\x20code','required':!![]},{'name':_0x3e276d(0x13e),'type':_0x3e276d(0x134),'description':'Use\x20global\x20config\x20scope','default':![]},...getAppProfileFlagDefs()];}export function buildAppRemoveFlags(){const _0x262f8c=a44_0x4d7d;return[{'name':'global','type':'boolean','description':_0x262f8c(0x123),'default':![]}];}export async function validateAppName(_0x51ae0d,_0x370b07){const _0x55c475=a44_0x4d7d,_0x5efa08=_0x51ae0d['args'][0x0]?.[_0x55c475(0x14b)]();if(!_0x5efa08)throw CliErrors[_0x55c475(0x144)](_0x55c475(0x148),_0x55c475(0x13a)+CLI_BIN_NAME+'\x20'+_0x370b07+_0x55c475(0x147));}export async function runAppAdd(_0x1a0d18,_0x16acf9){const _0x23e58f=a44_0x4d7d,_0x43f429=_0x1a0d18[_0x23e58f(0x146)][0x0]?.['trim']();if(!_0x43f429)throw CliErrors[_0x23e58f(0x144)](_0x23e58f(0x148),_0x23e58f(0x13a)+CLI_BIN_NAME+'\x20'+_0x16acf9+_0x23e58f(0x130));const _0x2b47e0=_0x1a0d18[_0x23e58f(0x12a)](_0x23e58f(0x121));if(!_0x2b47e0)throw CliErrors[_0x23e58f(0x133)](_0x23e58f(0x121),_0x23e58f(0x13a)+CLI_BIN_NAME+'\x20'+_0x16acf9+'\x20<name>\x20--appcode\x20<code>');const _0x1aa589={'global':_0x1a0d18[_0x23e58f(0x136)]('global')},_0x57da6e=readConfig(_0x1aa589);if(!_0x57da6e[_0x23e58f(0x149)])_0x57da6e[_0x23e58f(0x149)]={};const _0x6a9616={'appcode':_0x2b47e0,...collectAppProfileOverrides(_0x473aee=>_0x1a0d18['str'](_0x473aee))},_0x36cbfe=_0x57da6e[_0x23e58f(0x149)],_0x52fc9e=!!_0x36cbfe[_0x43f429];_0x36cbfe[_0x43f429]=_0x6a9616;if(!_0x57da6e[_0x23e58f(0x143)])_0x57da6e[_0x23e58f(0x143)]=_0x43f429;writeConfig(_0x57da6e,_0x1aa589);const _0x1a8245=!_0x52fc9e&&_0x57da6e['defaultApp']===_0x43f429?_0x23e58f(0x124):'',_0x3cc4a3=(_0x52fc9e?'Updated':'Added')+_0x23e58f(0x139)+_0x43f429+_0x23e58f(0x128)+_0x2b47e0+')'+scopeLabel(_0x1aa589)+'.'+_0x1a8245;return{'ok':!![],'message':_0x3cc4a3};}export async function runAppRemove(_0x5c580e,_0x542b80){const _0x7f4553=a44_0x4d7d,_0x357b4a=_0x5c580e['args'][0x0]?.[_0x7f4553(0x14b)]();if(!_0x357b4a)throw CliErrors[_0x7f4553(0x144)](_0x7f4553(0x148),_0x7f4553(0x13a)+CLI_BIN_NAME+'\x20'+_0x542b80+'\x20<name>\x20[--global]');const _0x183edc=_0x5c580e[_0x7f4553(0x136)]('global'),{config:_0x44ae01,layers:_0x574ade}=readRawConfigWithLayers(),_0x1e5203=_0x44ae01[_0x7f4553(0x149)]??{};if(!_0x1e5203[_0x357b4a])throw CliErrors[_0x7f4553(0x144)](_0x7f4553(0x12f)+_0x357b4a+_0x7f4553(0x13f));const _0x22133e=_0x574ade[_0x7f4553(0x12d)][_0x7f4553(0x149)]&&typeof _0x574ade[_0x7f4553(0x12d)][_0x7f4553(0x149)]===_0x7f4553(0x140)?_0x574ade[_0x7f4553(0x12d)][_0x7f4553(0x149)]:{},_0x5a182e=_0x574ade[_0x7f4553(0x132)][_0x7f4553(0x149)]&&typeof _0x574ade[_0x7f4553(0x132)][_0x7f4553(0x149)]==='object'?_0x574ade['projectConfig'][_0x7f4553(0x149)]:{},_0x25fe16=appDefinedIn(_0x357b4a,_0x22133e,_0x5a182e,_0x574ade[_0x7f4553(0x132)][_0x7f4553(0x12e)]===![]),_0x2f35de=resolveAppScopeForWrite(_0x357b4a,_0x183edc,_0x574ade),_0x477f2a={'global':_0x2f35de==='global'},_0x1648eb=readConfig(_0x477f2a),_0x26a46c=_0x1648eb[_0x7f4553(0x149)];if(!_0x26a46c||!_0x26a46c[_0x357b4a])throw CliErrors[_0x7f4553(0x144)](_0x7f4553(0x12f)+_0x357b4a+_0x7f4553(0x13f));delete _0x26a46c[_0x357b4a];let _0x1d62f9='';if(_0x1648eb[_0x7f4553(0x143)]===_0x357b4a){const _0x11bfd7=Object[_0x7f4553(0x145)](_0x26a46c);_0x1648eb['defaultApp']=_0x11bfd7[_0x7f4553(0x125)]>0x0?_0x11bfd7[0x0]:undefined,_0x1648eb[_0x7f4553(0x143)]?_0x1d62f9='\x20Default\x20app\x20changed\x20to\x20\x22'+_0x1648eb[_0x7f4553(0x143)]+'\x22.':delete _0x1648eb[_0x7f4553(0x143)];}Object[_0x7f4553(0x145)](_0x26a46c)['length']===0x0&&(delete _0x1648eb[_0x7f4553(0x149)],delete _0x1648eb[_0x7f4553(0x143)]);writeConfig(_0x1648eb,_0x477f2a);const _0x1b3b43=_0x25fe16===_0x7f4553(0x127)?_0x7f4553(0x129)+_0x357b4a+_0x7f4553(0x13c)+(_0x2f35de===_0x7f4553(0x135)?_0x7f4553(0x13e):_0x7f4553(0x135))+_0x7f4553(0x12c):'';return{'ok':!![],'message':'Removed\x20app\x20\x22'+_0x357b4a+'\x22'+scopeLabel(_0x477f2a)+'.'+_0x1d62f9+_0x1b3b43};}
@@ -1 +1 @@
1
- (function(_0x2c16de,_0x2e8290){const _0x36e7e5=a45_0x3a78,_0x3affbb=_0x2c16de();while(!![]){try{const _0x5191e5=parseInt(_0x36e7e5(0x1b3))/0x1+-parseInt(_0x36e7e5(0x1a6))/0x2*(-parseInt(_0x36e7e5(0x1a2))/0x3)+parseInt(_0x36e7e5(0x1a9))/0x4+parseInt(_0x36e7e5(0x1ac))/0x5*(parseInt(_0x36e7e5(0x1ab))/0x6)+-parseInt(_0x36e7e5(0x199))/0x7+-parseInt(_0x36e7e5(0x1b6))/0x8*(parseInt(_0x36e7e5(0x19a))/0x9)+parseInt(_0x36e7e5(0x19d))/0xa;if(_0x5191e5===_0x2e8290)break;else _0x3affbb['push'](_0x3affbb['shift']());}catch(_0x335dbf){_0x3affbb['push'](_0x3affbb['shift']());}}}(a45_0xcaca,0xb8f2a));import{input,checkbox,select}from'@inquirer/prompts';import a45_0x336b28 from'chalk';function a45_0x3a78(_0x4aa6ec,_0x4f225a){_0x4aa6ec=_0x4aa6ec-0x193;const _0xcaca91=a45_0xcaca();let _0x3a7812=_0xcaca91[_0x4aa6ec];return _0x3a7812;}import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x33e4bb=a45_0x3a78,_0x5a07c3=await input({'message':_0x33e4bb(0x197),'validate':_0x37841c=>{const _0x47f976=_0x33e4bb,_0x21572c=validateAppcode(_0x37841c['trim']());return _0x21572c[_0x47f976(0x1b5)]||_0x21572c[_0x47f976(0x1af)]||_0x47f976(0x195);}});return _0x5a07c3['trim']();}export async function promptAppSelection(_0x32b244){const _0x4fa5a5=a45_0x3a78,_0x3be61b=[{'name':a45_0x336b28[_0x4fa5a5(0x1ae)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x32b244[_0x4fa5a5(0x1aa)]((_0x4363b5,_0x287381)=>({'name':_0x4363b5[_0x4fa5a5(0x194)]+'\x20\x20'+a45_0x336b28['gray']('('+_0x4363b5[_0x4fa5a5(0x19f)]+')'),'value':_0x287381}))],_0x112263=await checkbox({'message':_0x4fa5a5(0x1a1)+a45_0x336b28[_0x4fa5a5(0x19c)](_0x32b244[_0x4fa5a5(0x1a0)])+_0x4fa5a5(0x1a7),'choices':_0x3be61b,'loop':![]});if(_0x112263[_0x4fa5a5(0x19e)](-0x1))return _0x4fa5a5(0x1b0);if(_0x112263[_0x4fa5a5(0x1a0)]===0x0)return _0x4fa5a5(0x1b0);return _0x112263[_0x4fa5a5(0x1aa)](_0x25b837=>_0x32b244[_0x25b837]);}export async function promptSingleAppSelection(_0x4dbc6f){const _0x1b3928=a45_0x3a78,_0x62d38=[{'name':a45_0x336b28[_0x1b3928(0x1a3)](_0x1b3928(0x1a4)),'value':'skip'},{'name':a45_0x336b28[_0x1b3928(0x1ae)]('✎\x20自定义输入\x20appcode'),'value':_0x1b3928(0x1b0)},..._0x4dbc6f['map'](_0x48a7e4=>({'name':_0x48a7e4[_0x1b3928(0x194)]+'\x20\x20'+a45_0x336b28[_0x1b3928(0x1a3)]('('+_0x48a7e4['appCode']+')'),'value':_0x48a7e4[_0x1b3928(0x19f)]}))],_0x2f050e=await select({'message':_0x1b3928(0x1a8),'choices':_0x62d38});if(_0x2f050e===_0x1b3928(0x1a5))return _0x1b3928(0x1a5);if(_0x2f050e==='custom')return _0x1b3928(0x1b0);return _0x4dbc6f[_0x1b3928(0x198)](_0x22c239=>_0x22c239[_0x1b3928(0x19f)]===_0x2f050e);}export async function selectSingleAppcode(_0x406f56){const _0x277ded=a45_0x3a78;if(!_0x406f56)return writeCliSideChannelLine(a45_0x336b28[_0x277ded(0x1a3)](_0x277ded(0x1b2))),_fallbackOrSkip();writeCliSideChannelLine(_0x277ded(0x1b4));let _0x32b7c3;try{_0x32b7c3=await withActiveCookie(_0x406f56,()=>listRemoteApps());}catch(_0x37d208){writeCliSideChannelLine(a45_0x336b28[_0x277ded(0x1ae)](_0x277ded(0x1ad)));if(_0x37d208 instanceof Error)writeCliSideChannelLine(a45_0x336b28['gray'](_0x277ded(0x196)+_0x37d208[_0x277ded(0x1af)]+')'));return _fallbackOrSkip();}if(_0x32b7c3[_0x277ded(0x1a0)]===0x0)return writeCliSideChannelLine(a45_0x336b28[_0x277ded(0x1ae)](_0x277ded(0x19b))),_fallbackOrSkip();const _0x309031=await promptSingleAppSelection(_0x32b7c3);if(_0x309031===_0x277ded(0x1a5))return'';if(_0x309031===_0x277ded(0x1b0))return promptCustomAppcode();return _0x309031['appCode'];}function a45_0xcaca(){const _0x505a46=['请输入\x20App\x20Code:','find','7517083LJkbQC','53127hABUpS','未找到可用应用。','cyan','6146730NQNium','includes','appCode','length','获取到\x20','9dPowfe','gray','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','skip','524242VISWsA','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','请选择要绑定的应用:','128840AsdPnm','map','12ydWinM','1468365PrErLe','无法获取远程应用列表,请手动输入。','yellow','message','custom','App\x20Code:','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','1233446bqPtKF','正在获取可用应用列表...','valid','1928EQEnaB','\x0a未找到可用应用。','✎\x20手动输入','appName','Invalid\x20App\x20Code','\x20\x20('];a45_0xcaca=function(){return _0x505a46;};return a45_0xcaca();}export async function selectMultipleApps(_0x1480d2){const _0x31e619=a45_0x3a78;writeCliSideChannelLine('正在获取可用应用列表...');let _0x495f99;try{_0x495f99=await withActiveCookie(_0x1480d2,()=>listRemoteApps());}catch(_0x202998){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x202998 instanceof Error)writeCliSideChannelLine(_0x31e619(0x196)+_0x202998[_0x31e619(0x1af)]+')');return _0x31e619(0x1b0);}if(_0x495f99[_0x31e619(0x1a0)]===0x0)return writeCliSideChannelLine(_0x31e619(0x1b7)),_0x31e619(0x1b0);return promptAppSelection(_0x495f99);}async function _fallbackOrSkip(){const _0x4904ab=a45_0x3a78,_0x42979a=await select({'message':_0x4904ab(0x1b1),'choices':[{'name':a45_0x336b28['gray']('(跳过,稍后配置)'),'value':_0x4904ab(0x1a5)},{'name':a45_0x336b28['yellow'](_0x4904ab(0x193)),'value':'manual'}]});if(_0x42979a===_0x4904ab(0x1a5))return'';return promptCustomAppcode();}
1
+ function a45_0x3596(_0xff89e5,_0x1d3181){_0xff89e5=_0xff89e5-0x10f;const _0x10223e=a45_0x1022();let _0x359605=_0x10223e[_0xff89e5];return _0x359605;}(function(_0x362142,_0x589546){const _0x324f52=a45_0x3596,_0x10f64f=_0x362142();while(!![]){try{const _0x165727=parseInt(_0x324f52(0x12c))/0x1+-parseInt(_0x324f52(0x128))/0x2+-parseInt(_0x324f52(0x12e))/0x3+parseInt(_0x324f52(0x12f))/0x4+-parseInt(_0x324f52(0x117))/0x5*(parseInt(_0x324f52(0x11f))/0x6)+-parseInt(_0x324f52(0x120))/0x7+parseInt(_0x324f52(0x124))/0x8;if(_0x165727===_0x589546)break;else _0x10f64f['push'](_0x10f64f['shift']());}catch(_0x14f0ef){_0x10f64f['push'](_0x10f64f['shift']());}}}(a45_0x1022,0x18c4d));function a45_0x1022(){const _0xdde23=['valid','\x20\x20(','\x0a无法获取远程应用列表,请手动输入。','appCode','trim','403705rMEKjD','map','请选择要绑定的应用:','cyan','message','custom','skip','获取到\x20','6aBIWdO','1175398KAUbTm','正在获取可用应用列表...','manual','未找到可用应用。','3660104fwtqXJ','gray','includes','find','384056Tpuplb','请输入\x20App\x20Code:','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','(跳过,稍后配置)','157152lXUoPy','Invalid\x20App\x20Code','281340RimlNU','85004kOjEfk','yellow','✎\x20自定义输入\x20appcode','length','appName'];a45_0x1022=function(){return _0xdde23;};return a45_0x1022();}import{input,checkbox,select}from'@inquirer/prompts';import a45_0x409c07 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x114861=a45_0x3596,_0x4e3641=await input({'message':_0x114861(0x129),'validate':_0xd4a18a=>{const _0x178920=_0x114861,_0xb2d7e9=validateAppcode(_0xd4a18a['trim']());return _0xb2d7e9[_0x178920(0x112)]||_0xb2d7e9[_0x178920(0x11b)]||_0x178920(0x12d);}});return _0x4e3641[_0x114861(0x116)]();}export async function promptAppSelection(_0x121f24){const _0x4ccfdd=a45_0x3596,_0x39cade=[{'name':a45_0x409c07['yellow'](_0x4ccfdd(0x10f)),'value':-0x1},..._0x121f24['map']((_0x248453,_0x46a3aa)=>({'name':_0x248453[_0x4ccfdd(0x111)]+'\x20\x20'+a45_0x409c07[_0x4ccfdd(0x125)]('('+_0x248453['appCode']+')'),'value':_0x46a3aa}))],_0x4f730c=await checkbox({'message':_0x4ccfdd(0x11e)+a45_0x409c07[_0x4ccfdd(0x11a)](_0x121f24['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x39cade,'loop':![]});if(_0x4f730c[_0x4ccfdd(0x126)](-0x1))return _0x4ccfdd(0x11c);if(_0x4f730c[_0x4ccfdd(0x110)]===0x0)return _0x4ccfdd(0x11c);return _0x4f730c[_0x4ccfdd(0x118)](_0x2befd7=>_0x121f24[_0x2befd7]);}export async function promptSingleAppSelection(_0x3c4e5b){const _0xf0b45b=a45_0x3596,_0x32bb1d=[{'name':a45_0x409c07[_0xf0b45b(0x125)](_0xf0b45b(0x12a)),'value':_0xf0b45b(0x11d)},{'name':a45_0x409c07[_0xf0b45b(0x130)]('✎\x20自定义输入\x20appcode'),'value':_0xf0b45b(0x11c)},..._0x3c4e5b['map'](_0x262b52=>({'name':_0x262b52[_0xf0b45b(0x111)]+'\x20\x20'+a45_0x409c07['gray']('('+_0x262b52['appCode']+')'),'value':_0x262b52['appCode']}))],_0x5f52e2=await select({'message':_0xf0b45b(0x119),'choices':_0x32bb1d});if(_0x5f52e2===_0xf0b45b(0x11d))return _0xf0b45b(0x11d);if(_0x5f52e2===_0xf0b45b(0x11c))return _0xf0b45b(0x11c);return _0x3c4e5b[_0xf0b45b(0x127)](_0x1ea705=>_0x1ea705['appCode']===_0x5f52e2);}export async function selectSingleAppcode(_0x4f5355){const _0x1cfcc7=a45_0x3596;if(!_0x4f5355)return writeCliSideChannelLine(a45_0x409c07[_0x1cfcc7(0x125)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine(_0x1cfcc7(0x121));let _0x1cc0cb;try{_0x1cc0cb=await withActiveCookie(_0x4f5355,()=>listRemoteApps());}catch(_0x5a6edc){writeCliSideChannelLine(a45_0x409c07['yellow']('无法获取远程应用列表,请手动输入。'));if(_0x5a6edc instanceof Error)writeCliSideChannelLine(a45_0x409c07['gray'](_0x1cfcc7(0x113)+_0x5a6edc[_0x1cfcc7(0x11b)]+')'));return _fallbackOrSkip();}if(_0x1cc0cb['length']===0x0)return writeCliSideChannelLine(a45_0x409c07['yellow'](_0x1cfcc7(0x123))),_fallbackOrSkip();const _0x27650d=await promptSingleAppSelection(_0x1cc0cb);if(_0x27650d===_0x1cfcc7(0x11d))return'';if(_0x27650d==='custom')return promptCustomAppcode();return _0x27650d[_0x1cfcc7(0x115)];}export async function selectMultipleApps(_0x2c465a){const _0x4ffe6c=a45_0x3596;writeCliSideChannelLine(_0x4ffe6c(0x121));let _0x535a93;try{_0x535a93=await withActiveCookie(_0x2c465a,()=>listRemoteApps());}catch(_0x44f373){writeCliSideChannelLine(_0x4ffe6c(0x114));if(_0x44f373 instanceof Error)writeCliSideChannelLine(_0x4ffe6c(0x113)+_0x44f373['message']+')');return'custom';}if(_0x535a93[_0x4ffe6c(0x110)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x4ffe6c(0x11c);return promptAppSelection(_0x535a93);}async function _fallbackOrSkip(){const _0x47443f=a45_0x3596,_0x3058a9=await select({'message':'App\x20Code:','choices':[{'name':a45_0x409c07[_0x47443f(0x125)](_0x47443f(0x12b)),'value':_0x47443f(0x11d)},{'name':a45_0x409c07[_0x47443f(0x130)]('✎\x20手动输入'),'value':_0x47443f(0x122)}]});if(_0x3058a9===_0x47443f(0x11d))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- function a46_0x4e01(_0x5a852f,_0x3b3f34){_0x5a852f=_0x5a852f-0x1b1;var _0x14b55f=a46_0x14b5();var _0x4e0119=_0x14b55f[_0x5a852f];return _0x4e0119;}(function(_0x5d27c2,_0x4664fc){var _0x41cfc0=a46_0x4e01,_0x801ab8=_0x5d27c2();while(!![]){try{var _0x26db9f=-parseInt(_0x41cfc0(0x1b7))/0x1*(parseInt(_0x41cfc0(0x1b6))/0x2)+parseInt(_0x41cfc0(0x1b9))/0x3+-parseInt(_0x41cfc0(0x1b5))/0x4*(-parseInt(_0x41cfc0(0x1b2))/0x5)+-parseInt(_0x41cfc0(0x1bc))/0x6*(-parseInt(_0x41cfc0(0x1b3))/0x7)+parseInt(_0x41cfc0(0x1b1))/0x8+-parseInt(_0x41cfc0(0x1bd))/0x9+-parseInt(_0x41cfc0(0x1b8))/0xa;if(_0x26db9f===_0x4664fc)break;else _0x801ab8['push'](_0x801ab8['shift']());}catch(_0x41094a){_0x801ab8['push'](_0x801ab8['shift']());}}}(a46_0x14b5,0x7bb6c));function a46_0x14b5(){var _0x26397e=['4641265NPzGvE','35EMKPhl','url','4QajzDc','2KiXFdT','628379oUHNqZ','13113190VKiYAI','2229408dsnWQV','description','defineProperties','683454nxnLxM','517239fDZPkl','2103736fmIhlB'];a46_0x14b5=function(){return _0x26397e;};return a46_0x14b5();}export function asDryRunResult(_0x44574c,_0x519c5b){var _0x227502=a46_0x4e01;return Object[_0x227502(0x1bb)](_0x44574c,{'method':{'value':_0x519c5b['method'],'enumerable':![]},'url':{'value':_0x519c5b[_0x227502(0x1b4)],'enumerable':![]},..._0x519c5b['description']?{'description':{'value':_0x519c5b[_0x227502(0x1ba)],'enumerable':![]}}:{}});}
1
+ function a46_0xfe9a(_0x455d8a,_0x3742b2){_0x455d8a=_0x455d8a-0x102;var _0x4f9ca0=a46_0x4f9c();var _0xfe9ac5=_0x4f9ca0[_0x455d8a];return _0xfe9ac5;}function a46_0x4f9c(){var _0x380d9c=['60232wDCPZq','110JyqhVk','1730mlHesJ','443334BULhZC','13618qkutEo','261hhnqtU','1670508pmlsjZ','126Oewtjo','defineProperties','77068HIKUpg','147382FkFTfr','url','1vegEGN','42392lTHWWO','description'];a46_0x4f9c=function(){return _0x380d9c;};return a46_0x4f9c();}(function(_0x9799ee,_0x799aa6){var _0x10b61a=a46_0xfe9a,_0x3bad51=_0x9799ee();while(!![]){try{var _0x49fc61=-parseInt(_0x10b61a(0x10c))/0x1*(-parseInt(_0x10b61a(0x10a))/0x2)+parseInt(_0x10b61a(0x103))/0x3+parseInt(_0x10b61a(0x109))/0x4*(parseInt(_0x10b61a(0x110))/0x5)+parseInt(_0x10b61a(0x107))/0x6*(-parseInt(_0x10b61a(0x10d))/0x7)+-parseInt(_0x10b61a(0x10f))/0x8*(parseInt(_0x10b61a(0x105))/0x9)+-parseInt(_0x10b61a(0x102))/0xa*(parseInt(_0x10b61a(0x104))/0xb)+parseInt(_0x10b61a(0x106))/0xc;if(_0x49fc61===_0x799aa6)break;else _0x3bad51['push'](_0x3bad51['shift']());}catch(_0x5441fe){_0x3bad51['push'](_0x3bad51['shift']());}}}(a46_0x4f9c,0x36e5d));export function asDryRunResult(_0x11b52f,_0x200306){var _0x26efb0=a46_0xfe9a;return Object[_0x26efb0(0x108)](_0x11b52f,{'method':{'value':_0x200306['method'],'enumerable':![]},'url':{'value':_0x200306[_0x26efb0(0x10b)],'enumerable':![]},..._0x200306[_0x26efb0(0x10e)]?{'description':{'value':_0x200306['description'],'enumerable':![]}}:{}});}
@@ -1 +1 @@
1
- const a47_0x446362=a47_0x33f1;(function(_0x512107,_0x2975cd){const _0x5649ea=a47_0x33f1,_0x14ed88=_0x512107();while(!![]){try{const _0xe5fffd=-parseInt(_0x5649ea(0x91))/0x1+parseInt(_0x5649ea(0x86))/0x2+parseInt(_0x5649ea(0x95))/0x3+-parseInt(_0x5649ea(0x8f))/0x4+-parseInt(_0x5649ea(0x8a))/0x5+-parseInt(_0x5649ea(0x87))/0x6*(parseInt(_0x5649ea(0x98))/0x7)+parseInt(_0x5649ea(0x8d))/0x8;if(_0xe5fffd===_0x2975cd)break;else _0x14ed88['push'](_0x14ed88['shift']());}catch(_0x4ef2e4){_0x14ed88['push'](_0x14ed88['shift']());}}}(a47_0x29ca,0x6b7a6));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a47_0x446362(0x8e)};function a47_0x33f1(_0x30e6d6,_0x10af88){_0x30e6d6=_0x30e6d6-0x86;const _0x29ca89=a47_0x29ca();let _0x33f187=_0x29ca89[_0x30e6d6];return _0x33f187;}export const CODE_FLAG={'name':a47_0x446362(0x88),'type':a47_0x446362(0x96),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};function a47_0x29ca(){const _0x5e2637=['appcode','1056207RNVolr','string','App\x20code\x20(e.g.\x20app-xxxxx)','2674OxcbtS','Dataset\x20code\x20(32-char\x20hex\x20UUID)','datasetcode','MYSQL','number','406732gJzhts','9522Cjarrv','code','POSTGRESQL','3734600LQZjYI','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','sqlcode','16268960HRfkFr','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','2556228qDFVaq','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','156614jkRHCF','dbtype','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'];a47_0x29ca=function(){return _0x5e2637;};return a47_0x29ca();}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a47_0x446362(0x9a),'description':a47_0x446362(0x99)};export const SQLCODE_FLAG={'name':a47_0x446362(0x8c),'type':a47_0x446362(0x96),'required':!![],'description':a47_0x446362(0x8b),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x446362(0x94),'type':'string','required':![],'description':a47_0x446362(0x90)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x446362(0x97)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x446362(0x9c),'required':!![],'description':a47_0x446362(0x93)};export const DB_TYPE_FLAG={'name':a47_0x446362(0x92),'type':a47_0x446362(0x96),'required':!![],'description':'Database\x20product\x20type','enum':[a47_0x446362(0x9b),a47_0x446362(0x89)]};
1
+ const a47_0x56170d=a47_0x4131;(function(_0x2eb56a,_0x193423){const _0x334f51=a47_0x4131,_0xb5d379=_0x2eb56a();while(!![]){try{const _0x5ab9fe=-parseInt(_0x334f51(0x130))/0x1+-parseInt(_0x334f51(0x125))/0x2*(-parseInt(_0x334f51(0x12f))/0x3)+parseInt(_0x334f51(0x11f))/0x4+parseInt(_0x334f51(0x123))/0x5*(-parseInt(_0x334f51(0x12a))/0x6)+-parseInt(_0x334f51(0x11b))/0x7+parseInt(_0x334f51(0x127))/0x8*(parseInt(_0x334f51(0x11e))/0x9)+parseInt(_0x334f51(0x11c))/0xa;if(_0x5ab9fe===_0x193423)break;else _0xb5d379['push'](_0xb5d379['shift']());}catch(_0x4cf9b1){_0xb5d379['push'](_0xb5d379['shift']());}}}(a47_0x4f56,0xecae9));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};function a47_0x4f56(){const _0x12c736=['dbtype','35CnPVOf','Dataset\x20code\x20(32-char\x20hex\x20UUID)','2510188vZYyyy','Database\x20product\x20type','24BRvWqN','number','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','734286BvtgXB','code','appcode','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','string','3yhuCIL','343565VSqAgS','App\x20code\x20(e.g.\x20app-xxxxx)','9147271XAgtwq','6254470pDqQXn','POSTGRESQL','4677246JIMfgR','147244koVteY','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','MYSQL'];a47_0x4f56=function(){return _0x12c736;};return a47_0x4f56();}function a47_0x4131(_0x12fb63,_0xc2b2ee){_0x12fb63=_0x12fb63-0x11b;const _0x4f5680=a47_0x4f56();let _0x413159=_0x4f5680[_0x12fb63];return _0x413159;}export const CODE_FLAG={'name':a47_0x56170d(0x12b),'type':a47_0x56170d(0x12e),'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':'datasetcode','description':a47_0x56170d(0x124)};export const SQLCODE_FLAG={'name':'sqlcode','type':a47_0x56170d(0x12e),'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_0x56170d(0x120)}};export const APPCODE_FLAG_OPTIONAL={'name':a47_0x56170d(0x12c),'type':a47_0x56170d(0x12e),'required':![],'description':a47_0x56170d(0x12d)};export const APPCODE_FLAG={...APPCODE_FLAG_OPTIONAL,'required':!![],'description':a47_0x56170d(0x131)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a47_0x56170d(0x128),'required':!![],'description':a47_0x56170d(0x129)};export const DB_TYPE_FLAG={'name':a47_0x56170d(0x122),'type':a47_0x56170d(0x12e),'required':!![],'description':a47_0x56170d(0x126),'enum':[a47_0x56170d(0x121),a47_0x56170d(0x11d)]};
@@ -1 +1 @@
1
- (function(_0x9b3591,_0x3eaec0){const _0x47f0b3=a48_0x1ad0,_0x1a6117=_0x9b3591();while(!![]){try{const _0x5c8cee=parseInt(_0x47f0b3(0x91))/0x1+-parseInt(_0x47f0b3(0x8d))/0x2*(-parseInt(_0x47f0b3(0x88))/0x3)+-parseInt(_0x47f0b3(0x92))/0x4*(-parseInt(_0x47f0b3(0x90))/0x5)+-parseInt(_0x47f0b3(0x89))/0x6+parseInt(_0x47f0b3(0x95))/0x7*(-parseInt(_0x47f0b3(0x94))/0x8)+parseInt(_0x47f0b3(0x8e))/0x9+-parseInt(_0x47f0b3(0x8a))/0xa*(parseInt(_0x47f0b3(0x8b))/0xb);if(_0x5c8cee===_0x3eaec0)break;else _0x1a6117['push'](_0x1a6117['shift']());}catch(_0x2a4441){_0x1a6117['push'](_0x1a6117['shift']());}}}(a48_0x1ee6,0xace0d));export function validateAppcode(_0x114d27){const _0x1bc562=a48_0x1ad0,_0x4f69a5=_0x114d27[_0x1bc562(0x93)]();if(!_0x4f69a5)return{'valid':![],'message':_0x1bc562(0x8f)};if(_0x4f69a5['length']>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x4f69a5))return{'valid':![],'message':_0x1bc562(0x8c)};return{'valid':!![]};}function a48_0x1ad0(_0x463d6c,_0x16b127){_0x463d6c=_0x463d6c-0x88;const _0x1ee68=a48_0x1ee6();let _0x1ad058=_0x1ee68[_0x463d6c];return _0x1ad058;}function a48_0x1ee6(){const _0x26c4d4=['101540PiGxBq','8054199oNpxne','App\x20Code\x20cannot\x20be\x20empty','2710FPhfUo','519840yckQtX','3924AneBAy','trim','224qaeWQU','154819uKwrNl','42zDeJZq','4353054KggmJE','10EwwreN','6647729CXMoht','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'];a48_0x1ee6=function(){return _0x26c4d4;};return a48_0x1ee6();}
1
+ function a48_0x1800(_0x46253f,_0xafe956){_0x46253f=_0x46253f-0x1c4;const _0x2402aa=a48_0x2402();let _0x180003=_0x2402aa[_0x46253f];return _0x180003;}(function(_0x552831,_0x2ecf87){const _0x34f4c5=a48_0x1800,_0x1c400f=_0x552831();while(!![]){try{const _0x5ed820=-parseInt(_0x34f4c5(0x1ce))/0x1+parseInt(_0x34f4c5(0x1cb))/0x2+parseInt(_0x34f4c5(0x1cc))/0x3+parseInt(_0x34f4c5(0x1c8))/0x4*(-parseInt(_0x34f4c5(0x1c6))/0x5)+-parseInt(_0x34f4c5(0x1c7))/0x6*(-parseInt(_0x34f4c5(0x1c4))/0x7)+-parseInt(_0x34f4c5(0x1cf))/0x8*(-parseInt(_0x34f4c5(0x1c9))/0x9)+parseInt(_0x34f4c5(0x1d0))/0xa;if(_0x5ed820===_0x2ecf87)break;else _0x1c400f['push'](_0x1c400f['shift']());}catch(_0x419ade){_0x1c400f['push'](_0x1c400f['shift']());}}}(a48_0x2402,0xc9d00));export function validateAppcode(_0x4d1885){const _0x1714de=a48_0x1800,_0x54e17e=_0x4d1885['trim']();if(!_0x54e17e)return{'valid':![],'message':_0x1714de(0x1ca)};if(_0x54e17e[_0x1714de(0x1cd)]>0x64)return{'valid':![],'message':_0x1714de(0x1c5)};if(!/^[A-Za-z0-9_-]+$/[_0x1714de(0x1d1)](_0x54e17e))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a48_0x2402(){const _0x36a8a8=['length','576979etlUlU','1685008epxnnb','11416630CzMnAB','test','241178zWKiBr','App\x20Code\x20cannot\x20exceed\x20100\x20characters','185305MXDqqa','204qOxonT','172zOnRNa','9trOYAQ','App\x20Code\x20cannot\x20be\x20empty','893150OOLEqU','80778lPXaGa'];a48_0x2402=function(){return _0x36a8a8;};return a48_0x2402();}
@@ -1 +1 @@
1
- const a49_0x58f36d=a49_0x3e71;(function(_0x44eb0b,_0x369ab5){const _0x59c20d=a49_0x3e71,_0x80722c=_0x44eb0b();while(!![]){try{const _0x3b0079=-parseInt(_0x59c20d(0xc9))/0x1+parseInt(_0x59c20d(0xca))/0x2+-parseInt(_0x59c20d(0xc2))/0x3*(parseInt(_0x59c20d(0xd0))/0x4)+-parseInt(_0x59c20d(0xc7))/0x5*(-parseInt(_0x59c20d(0xd4))/0x6)+-parseInt(_0x59c20d(0xc1))/0x7+-parseInt(_0x59c20d(0xd2))/0x8+parseInt(_0x59c20d(0xc8))/0x9;if(_0x3b0079===_0x369ab5)break;else _0x80722c['push'](_0x80722c['shift']());}catch(_0x1f9e63){_0x80722c['push'](_0x80722c['shift']());}}}(a49_0x5d5b,0xb2a51));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a49_0x3e71(_0x30399e,_0x48c943){_0x30399e=_0x30399e-0xbf;const _0x5d5b31=a49_0x5d5b();let _0x3e7194=_0x5d5b31[_0x30399e];return _0x3e7194;}function a49_0x5d5b(){const _0x29bb85=['12273336syHpKv','127953ppKRFv','2884376rvavCl','Get\x20a\x20config\x20value\x20by\x20key','validation','app','Usage:\x20','get','2022916vCGSTv','appcode','5462144SslfKo','read','246YhuvzB','Missing\x20key.','string','5524694HUkgsV','3AeOOyo','\x20config\x20get\x20--key\x20<key>','key','config','str','3845uEYnOS'];a49_0x5d5b=function(){return _0x29bb85;};return a49_0x5d5b();}async function execute(_0x471d61){const _0x3edb5e=a49_0x3e71,_0x55f462=_0x471d61[_0x3edb5e(0xc6)](_0x3edb5e(0xc4));if(!_0x55f462)throw CliErrors[_0x3edb5e(0xcc)](_0x3edb5e(0xbf),_0x3edb5e(0xce)+CLI_BIN_NAME+_0x3edb5e(0xc3));const _0x18da1f=readConfig(),_0x398e14=_0x55f462===_0x3edb5e(0xcd)?_0x3edb5e(0xd1):_0x55f462,_0x15b379=_0x18da1f[_0x398e14];if(_0x15b379===undefined)throw CliErrors[_0x3edb5e(0xcc)]('Key\x20not\x20found:\x20'+_0x55f462);return{'ok':!![],'data':typeof _0x15b379==='object'?_0x15b379:{[_0x398e14]:_0x15b379},'message':typeof _0x15b379==='object'?undefined:String(_0x15b379)};}export const configGetDefinition={'service':a49_0x58f36d(0xc5),'command':a49_0x58f36d(0xcf),'description':a49_0x58f36d(0xcb),'risk':a49_0x58f36d(0xd3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a49_0x58f36d(0xc4),'type':a49_0x58f36d(0xc0),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a49_0xd79a09=a49_0x488e;(function(_0x170851,_0x46a51f){const _0x3cd3c1=a49_0x488e,_0x54e5b4=_0x170851();while(!![]){try{const _0x43473e=parseInt(_0x3cd3c1(0x155))/0x1+-parseInt(_0x3cd3c1(0x15c))/0x2*(parseInt(_0x3cd3c1(0x15e))/0x3)+-parseInt(_0x3cd3c1(0x157))/0x4+parseInt(_0x3cd3c1(0x156))/0x5*(parseInt(_0x3cd3c1(0x159))/0x6)+parseInt(_0x3cd3c1(0x158))/0x7+parseInt(_0x3cd3c1(0x15f))/0x8*(parseInt(_0x3cd3c1(0x161))/0x9)+-parseInt(_0x3cd3c1(0x163))/0xa;if(_0x43473e===_0x46a51f)break;else _0x54e5b4['push'](_0x54e5b4['shift']());}catch(_0x4196f5){_0x54e5b4['push'](_0x54e5b4['shift']());}}}(a49_0x5d0f,0x27eac));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';function a49_0x488e(_0x45826c,_0x88e106){_0x45826c=_0x45826c-0x153;const _0x5d0ffc=a49_0x5d0f();let _0x488ea3=_0x5d0ffc[_0x45826c];return _0x488ea3;}async function execute(_0x3d48cf){const _0xb2d35a=a49_0x488e,_0x151bb9=_0x3d48cf[_0xb2d35a(0x164)](_0xb2d35a(0x15b));if(!_0x151bb9)throw CliErrors['validation']('Missing\x20key.',_0xb2d35a(0x154)+CLI_BIN_NAME+_0xb2d35a(0x166));const _0x56d74f=readConfig(),_0x46884f=_0x151bb9===_0xb2d35a(0x167)?_0xb2d35a(0x162):_0x151bb9,_0x12b174=_0x56d74f[_0x46884f];if(_0x12b174===undefined)throw CliErrors[_0xb2d35a(0x153)](_0xb2d35a(0x165)+_0x151bb9);return{'ok':!![],'data':typeof _0x12b174===_0xb2d35a(0x160)?_0x12b174:{[_0x46884f]:_0x12b174},'message':typeof _0x12b174===_0xb2d35a(0x160)?undefined:String(_0x12b174)};}export const configGetDefinition={'service':a49_0xd79a09(0x15a),'command':a49_0xd79a09(0x15d),'description':a49_0xd79a09(0x168),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a49_0xd79a09(0x15b),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};function a49_0x5d0f(){const _0x5d14e4=['3018sXZIZu','get','567GBCLTi','34064YOgfDA','object','207aIGOpP','appcode','540950fMmEoU','str','Key\x20not\x20found:\x20','\x20config\x20get\x20--key\x20<key>','app','Get\x20a\x20config\x20value\x20by\x20key','validation','Usage:\x20','319993zqGePW','13215HqMeAY','1044920HOVwEA','332080MVYVRn','678QbiBTk','config','key'];a49_0x5d0f=function(){return _0x5d14e4;};return a49_0x5d0f();}
@@ -1 +1 @@
1
- (function(_0x30446b,_0x31237b){const _0x2ca4b0=a50_0x4e54,_0x562020=_0x30446b();while(!![]){try{const _0x4cadc2=-parseInt(_0x2ca4b0(0x9a))/0x1*(parseInt(_0x2ca4b0(0xa3))/0x2)+parseInt(_0x2ca4b0(0x9f))/0x3*(-parseInt(_0x2ca4b0(0xa2))/0x4)+parseInt(_0x2ca4b0(0x9d))/0x5*(-parseInt(_0x2ca4b0(0xa5))/0x6)+parseInt(_0x2ca4b0(0x9c))/0x7+-parseInt(_0x2ca4b0(0xa1))/0x8+parseInt(_0x2ca4b0(0x9b))/0x9*(-parseInt(_0x2ca4b0(0x9e))/0xa)+parseInt(_0x2ca4b0(0xa0))/0xb*(parseInt(_0x2ca4b0(0xa4))/0xc);if(_0x4cadc2===_0x31237b)break;else _0x562020['push'](_0x562020['shift']());}catch(_0x38a9e2){_0x562020['push'](_0x562020['shift']());}}}(a50_0x2c5a,0x7a02a));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a50_0x2c5a(){const _0x53939d=['2NWBLtb','48MvhQOg','102rTLoan','204731xFjHNm','9jsHEXs','566832vzJBgn','127235IloIOQ','6244870vPwewx','1578trouFv','6397666NKbkOy','373720NMkLkr','4556fTHBxF'];a50_0x2c5a=function(){return _0x53939d;};return a50_0x2c5a();}function a50_0x4e54(_0x450c76,_0x49b95e){_0x450c76=_0x450c76-0x9a;const _0x2c5acb=a50_0x2c5a();let _0x4e5472=_0x2c5acb[_0x450c76];return _0x4e5472;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ function a50_0x1795(_0x3af59e,_0x5c9ad7){_0x3af59e=_0x3af59e-0xfb;const _0x2992be=a50_0x2992();let _0x17954c=_0x2992be[_0x3af59e];return _0x17954c;}(function(_0x3e9dac,_0x4cca7e){const _0x337439=a50_0x1795,_0x287a7b=_0x3e9dac();while(!![]){try{const _0x1f86e0=parseInt(_0x337439(0x103))/0x1+parseInt(_0x337439(0x105))/0x2*(-parseInt(_0x337439(0x101))/0x3)+-parseInt(_0x337439(0xfe))/0x4*(-parseInt(_0x337439(0xfd))/0x5)+parseInt(_0x337439(0xff))/0x6+parseInt(_0x337439(0x102))/0x7*(parseInt(_0x337439(0x104))/0x8)+parseInt(_0x337439(0x100))/0x9*(-parseInt(_0x337439(0xfb))/0xa)+-parseInt(_0x337439(0xfc))/0xb;if(_0x1f86e0===_0x4cca7e)break;else _0x287a7b['push'](_0x287a7b['shift']());}catch(_0x18b069){_0x287a7b['push'](_0x287a7b['shift']());}}}(a50_0x2992,0x839d6));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a50_0x2992(){const _0x4db8f4=['12419407MXDJqK','5RDwNpA','1971404YRukpu','5799240wLiyWo','697446xgqZiv','198nfsCPw','14OBjwYN','490086yOpIDD','3411472YJRAEM','17932WWPzfn','70COhsXs'];a50_0x2992=function(){return _0x4db8f4;};return a50_0x2992();}
@@ -1 +1 @@
1
- const a51_0x49ce4e=a51_0x4cb0;(function(_0x22b344,_0x574c72){const _0x2dda8a=a51_0x4cb0,_0x361ecb=_0x22b344();while(!![]){try{const _0x20ba62=parseInt(_0x2dda8a(0x15a))/0x1*(-parseInt(_0x2dda8a(0x14f))/0x2)+-parseInt(_0x2dda8a(0x155))/0x3+-parseInt(_0x2dda8a(0x151))/0x4+-parseInt(_0x2dda8a(0x157))/0x5*(parseInt(_0x2dda8a(0x15b))/0x6)+parseInt(_0x2dda8a(0x159))/0x7*(-parseInt(_0x2dda8a(0x153))/0x8)+-parseInt(_0x2dda8a(0x150))/0x9+parseInt(_0x2dda8a(0x152))/0xa;if(_0x20ba62===_0x574c72)break;else _0x361ecb['push'](_0x361ecb['shift']());}catch(_0x40c3a5){_0x361ecb['push'](_0x361ecb['shift']());}}}(a51_0x30f8,0xdc1a2));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x17a215){const _0x33de56=a51_0x4cb0,_0xb6c18e=_0x17a215['bool'](_0x33de56(0x154))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0xb6c18e};}function a51_0x4cb0(_0x5edcfa,_0x51722f){_0x5edcfa=_0x5edcfa-0x14f;const _0x30f8b7=a51_0x30f8();let _0x4cb0a9=_0x30f8b7[_0x5edcfa];return _0x4cb0a9;}function a51_0x30f8(){const _0x2d1160=['1580482OZJesB','16161597euHQPE','6590308ZozTex','84374550UtNeWE','8YQWrFb','global','3435021pKlvVT','config','480545uQjRYK','read','7028357MJCGKq','1hqtxpb','72NWOOiq'];a51_0x30f8=function(){return _0x2d1160;};return a51_0x30f8();}export const configListDefinition={'service':a51_0x49ce4e(0x156),'command':'list','description':'List\x20all\x20config\x20values','risk':a51_0x49ce4e(0x158),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x49ce4e(0x154),'type':'boolean','description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
1
+ const a51_0x145215=a51_0x5c8c;function a51_0x5c8c(_0xaaeafc,_0x1f0800){_0xaaeafc=_0xaaeafc-0x127;const _0x4f218a=a51_0x4f21();let _0x5c8c23=_0x4f218a[_0xaaeafc];return _0x5c8c23;}(function(_0x477482,_0x380930){const _0x258dd9=a51_0x5c8c,_0x595c1f=_0x477482();while(!![]){try{const _0x2c5641=parseInt(_0x258dd9(0x127))/0x1*(-parseInt(_0x258dd9(0x128))/0x2)+parseInt(_0x258dd9(0x133))/0x3+parseInt(_0x258dd9(0x12a))/0x4+-parseInt(_0x258dd9(0x129))/0x5+-parseInt(_0x258dd9(0x12e))/0x6+-parseInt(_0x258dd9(0x135))/0x7+parseInt(_0x258dd9(0x134))/0x8*(parseInt(_0x258dd9(0x130))/0x9);if(_0x2c5641===_0x380930)break;else _0x595c1f['push'](_0x595c1f['shift']());}catch(_0x56a36e){_0x595c1f['push'](_0x595c1f['shift']());}}}(a51_0x4f21,0xce960));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x4317fb){const _0x276b4e=a51_0x5c8c,_0x5c73b8=_0x4317fb[_0x276b4e(0x12d)](_0x276b4e(0x132))?readScopedConfig(_0x276b4e(0x132)):readConfig();return{'ok':!![],'data':_0x5c73b8};}function a51_0x4f21(){const _0x300902=['2474967hDAMeC','1639240vkvfdI','8918175GlprdF','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','1098224WMBNWu','2DgzJos','3546855ZvoKEA','1690056GMOSNB','read','List\x20all\x20config\x20values','bool','4818552yhnjNj','config','153DbKrSg','boolean','global'];a51_0x4f21=function(){return _0x300902;};return a51_0x4f21();}export const configListDefinition={'service':a51_0x145215(0x12f),'command':'list','description':a51_0x145215(0x12c),'risk':a51_0x145215(0x12b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a51_0x145215(0x132),'type':a51_0x145215(0x131),'description':a51_0x145215(0x136),'default':![]}],'execute':execute};