@lovrabet/rabetbase-cli 2.2.3-beta.1 → 2.2.3-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) 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/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.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/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -1
  60. package/lib/commands/dataset/relation-delete.js +1 -1
  61. package/lib/commands/dataset/relation-shared.js +1 -1
  62. package/lib/commands/dataset/relation-update.js +1 -1
  63. package/lib/commands/dataset/relations.js +1 -1
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/list.js +1 -1
  87. package/lib/commands/menu/shared/compare-table.js +1 -1
  88. package/lib/commands/menu/shared/index.js +1 -1
  89. package/lib/commands/menu/shared/inquirer.js +1 -1
  90. package/lib/commands/menu/shared/local-pages.js +1 -1
  91. package/lib/commands/menu/shared/logic.js +1 -1
  92. package/lib/commands/menu/shared/service.js +1 -1
  93. package/lib/commands/menu/shared/sync-core.js +1 -1
  94. package/lib/commands/menu/shared/update-core.js +1 -1
  95. package/lib/commands/menu/shared/valid-url.js +1 -1
  96. package/lib/commands/menu/sync.js +1 -1
  97. package/lib/commands/menu/update.js +1 -1
  98. package/lib/commands/page/generate-start.js +1 -1
  99. package/lib/commands/page/generate-status.js +1 -1
  100. package/lib/commands/page/index.js +1 -1
  101. package/lib/commands/page/pull.js +1 -1
  102. package/lib/commands/page/push.js +1 -1
  103. package/lib/commands/page/relation-audit.js +1 -1
  104. package/lib/commands/page/shared.js +1 -1
  105. package/lib/commands/page/standard-page-status.js +1 -1
  106. package/lib/commands/page/sync.js +1 -1
  107. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  108. package/lib/commands/project/create/format-elapsed.js +1 -1
  109. package/lib/commands/project/create/main.js +1 -1
  110. package/lib/commands/project/create/non-interactive.js +1 -1
  111. package/lib/commands/project/create/project-template-path.js +1 -1
  112. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  113. package/lib/commands/project/create/use-format-code.js +1 -1
  114. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  115. package/lib/commands/project/index.js +1 -1
  116. package/lib/commands/project/init.js +1 -1
  117. package/lib/commands/project/upgrade.js +1 -1
  118. package/lib/commands/registry.js +1 -1
  119. package/lib/commands/run/index.js +1 -1
  120. package/lib/commands/schema.js +1 -1
  121. package/lib/commands/skill/index.js +1 -1
  122. package/lib/commands/sql/create.js +1 -1
  123. package/lib/commands/sql/delete.js +1 -1
  124. package/lib/commands/sql/detail.js +1 -1
  125. package/lib/commands/sql/exec.js +1 -1
  126. package/lib/commands/sql/index.js +1 -1
  127. package/lib/commands/sql/list.js +1 -1
  128. package/lib/commands/sql/pull.js +1 -1
  129. package/lib/commands/sql/push.js +1 -1
  130. package/lib/commands/sql/save.js +1 -1
  131. package/lib/commands/sql/shared.js +1 -1
  132. package/lib/commands/sql/status.js +1 -1
  133. package/lib/commands/sql/validate.js +1 -1
  134. package/lib/config/schema.js +1 -1
  135. package/lib/constant/cdn.js +1 -1
  136. package/lib/constant/cli.js +1 -1
  137. package/lib/constant/defaults.js +1 -1
  138. package/lib/constant/domain.js +1 -1
  139. package/lib/constant/env.js +1 -1
  140. package/lib/constant/output.js +1 -1
  141. package/lib/constant/paths.js +1 -1
  142. package/lib/constant/risk.js +1 -1
  143. package/lib/context.js +1 -1
  144. package/lib/core/alias-resolver.js +1 -1
  145. package/lib/core/api-client.js +1 -1
  146. package/lib/core/bff/config.js +1 -1
  147. package/lib/core/bff/file-system.js +1 -1
  148. package/lib/core/bff/hash.js +1 -1
  149. package/lib/core/bff/lock.js +1 -1
  150. package/lib/core/bff/utils.js +1 -1
  151. package/lib/core/db-resolver.js +1 -1
  152. package/lib/core/page/file-system.js +1 -1
  153. package/lib/core/page/hash.js +1 -1
  154. package/lib/core/page/lock.js +1 -1
  155. package/lib/core/sql-sync/config.js +1 -1
  156. package/lib/core/sql-sync/file-system.js +1 -1
  157. package/lib/core/sql-sync/hash.js +1 -1
  158. package/lib/core/sql-sync/lock.js +1 -1
  159. package/lib/core/sql-sync/utils.js +1 -1
  160. package/lib/core/sql-validator.js +1 -1
  161. package/lib/errors.js +1 -1
  162. package/lib/framework/build-all-flags.js +1 -1
  163. package/lib/framework/flags.js +1 -1
  164. package/lib/framework/help.js +1 -1
  165. package/lib/framework/index.js +1 -1
  166. package/lib/framework/output.js +1 -1
  167. package/lib/framework/response.js +1 -1
  168. package/lib/framework/runner-alias.js +1 -1
  169. package/lib/framework/runner.js +1 -1
  170. package/lib/framework/schema-export.js +1 -1
  171. package/lib/framework/types.js +1 -1
  172. package/lib/generated/build-info.js +1 -1
  173. package/lib/help.js +1 -1
  174. package/lib/skills/main.js +1 -1
  175. package/lib/skills/npx-skills-add.js +1 -1
  176. package/lib/telemetry/cli-command-trace.js +1 -1
  177. package/lib/telemetry/cli-help-trace.js +1 -1
  178. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  179. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  180. package/lib/telemetry/send-cli-trace-log.js +1 -1
  181. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  182. package/lib/utils/ai_config.js +1 -1
  183. package/lib/utils/apply-jq-filter.js +1 -1
  184. package/lib/utils/cdn-config.js +1 -1
  185. package/lib/utils/check-sdk-version.js +1 -1
  186. package/lib/utils/cli-version-check.js +1 -1
  187. package/lib/utils/cli-version-policy.js +1 -1
  188. package/lib/utils/config.js +1 -1
  189. package/lib/utils/copy-directory.js +1 -1
  190. package/lib/utils/entity-with-id.js +1 -1
  191. package/lib/utils/file-utils.js +1 -1
  192. package/lib/utils/guides-cdn.js +1 -1
  193. package/lib/utils/http-client.js +1 -1
  194. package/lib/utils/is-non-interactive.js +1 -1
  195. package/lib/utils/logger.js +1 -1
  196. package/lib/utils/params.js +1 -1
  197. package/lib/utils/platform.js +1 -1
  198. package/lib/utils/rules-cdn.js +1 -1
  199. package/lib/utils/sleep.js +1 -1
  200. package/lib/utils/template-replacer.js +1 -1
  201. package/lib/utils/update-notice.js +1 -1
  202. package/lib/utils/version.js +1 -1
  203. package/lib/utils/with-active-cookie.js +1 -1
  204. package/lib/utils/write-cli-side-channel.js +1 -1
  205. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x2f85bb=a32_0xef14;(function(_0x596d3c,_0x3ff3e7){const _0x1802cb=a32_0xef14,_0x3b6db3=_0x596d3c();while(!![]){try{const _0x3eb2dd=-parseInt(_0x1802cb(0x13e))/0x1+-parseInt(_0x1802cb(0x181))/0x2+parseInt(_0x1802cb(0x16a))/0x3*(parseInt(_0x1802cb(0x162))/0x4)+-parseInt(_0x1802cb(0x170))/0x5*(parseInt(_0x1802cb(0x13c))/0x6)+-parseInt(_0x1802cb(0x153))/0x7*(parseInt(_0x1802cb(0x16e))/0x8)+parseInt(_0x1802cb(0x189))/0x9+parseInt(_0x1802cb(0x149))/0xa*(parseInt(_0x1802cb(0x178))/0xb);if(_0x3eb2dd===_0x3ff3e7)break;else _0x3b6db3['push'](_0x3b6db3['shift']());}catch(_0x1c39cf){_0x3b6db3['push'](_0x3b6db3['shift']());}}}(a32_0x1ef7,0x8f085));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a32_0x2f85bb(0x14e),'command':a32_0x2f85bb(0x144),'description':a32_0x2f85bb(0x17a),'risk':a32_0x2f85bb(0x14d),'flags':[{'name':a32_0x2f85bb(0x186),'type':a32_0x2f85bb(0x16d),'description':a32_0x2f85bb(0x145),'enum':['COMMON',a32_0x2f85bb(0x141),'HOOK']},{'name':a32_0x2f85bb(0x17e),'type':a32_0x2f85bb(0x16d),'description':a32_0x2f85bb(0x15b)},{'name':a32_0x2f85bb(0x177),'type':a32_0x2f85bb(0x14b),'description':a32_0x2f85bb(0x13d)}],async 'dryRun'(_0x53b612){const _0x494e2e=a32_0x2f85bb,_0x42ecaa=loadBffProjectConfig(_0x53b612['appCode']),_0x46ded7=await readBffLockFile(_0x42ecaa[_0x494e2e(0x140)]),{appLock:_0x194d58}=ensureLockScope(_0x46ded7??createEmptyBffLock(),_0x53b612['appCode'],_0x42ecaa['scriptsRoot'],_0x494e2e(0x144)),_0x3b8e45=await getTargetFunctions(_0x42ecaa,_0x53b612),_0x23f561=_0x53b612[_0x494e2e(0x147)](_0x494e2e(0x177)),_0x155cbf=[];for(const _0xf112e0 of _0x3b8e45){const _0x1f6350=await computeFileHash(_0xf112e0[_0x494e2e(0x152)]),_0x880d8b=_0x194d58[_0x494e2e(0x157)][_0xf112e0['lockKey']],_0x1d7b45=!!_0x880d8b&&_0x880d8b[_0x494e2e(0x17c)]===_0x1f6350;_0x155cbf[_0x494e2e(0x144)]({'lockKey':_0xf112e0[_0x494e2e(0x185)],'filePath':_0xf112e0[_0x494e2e(0x152)],'remoteId':_0x880d8b?.[_0x494e2e(0x151)]??null,'mode':_0x880d8b?.[_0x494e2e(0x151)]?_0x494e2e(0x165):_0x494e2e(0x172),'status':!_0x23f561&&_0x1d7b45?_0x494e2e(0x180):_0x494e2e(0x171)});}return{'method':_0x494e2e(0x161),'url':_0x494e2e(0x167),'body':{'appCode':_0x53b612[_0x494e2e(0x17d)],'force':_0x23f561,'files':_0x155cbf,'cacheClearAtRuntime':_0x155cbf['some'](_0x16ef6d=>_0x16ef6d[_0x494e2e(0x148)]==='would_push'),'cacheClearAtRuntimeTimes':_0x155cbf['some'](_0x16cebc=>_0x16cebc['status']==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x494e2e(0x18b)+_0x155cbf['length']+'\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded'};},async 'execute'(_0x314374){const _0x247da8=a32_0x2f85bb,_0x57d40f=loadBffProjectConfig(_0x314374[_0x247da8(0x17d)]),_0x53f5ef=await readBffLockFile(_0x57d40f[_0x247da8(0x140)]),{lockData:_0x4f048c,appLock:_0x1bb112}=ensureLockScope(_0x53f5ef??createEmptyBffLock(),_0x314374[_0x247da8(0x17d)],_0x57d40f[_0x247da8(0x16c)],_0x247da8(0x144)),_0xe197cf=await getTargetFunctions(_0x57d40f,_0x314374);if(_0xe197cf[_0x247da8(0x142)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0xb5cda=_0x314374[_0x247da8(0x147)](_0x247da8(0x177)),_0x2a4760=JSON[_0x247da8(0x174)](JSON[_0x247da8(0x18d)](_0x4f048c)),_0x54adcd=_0x2a4760['apps'][_0x314374[_0x247da8(0x17d)]];if(!_0x54adcd)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x314374[_0x247da8(0x17d)]+_0x247da8(0x187));const _0x3014f9=await buildHookMaps(_0x314374[_0x247da8(0x17d)],_0x314374[_0x247da8(0x18a)],_0xe197cf,_0x54adcd),_0x4a0d7f=[],_0x196afb=[],_0x54f82d=[];for(const _0x501860 of _0xe197cf){const _0x4d053e=await computeFileHash(_0x501860[_0x247da8(0x152)]),_0x2ee6ca=_0x54adcd[_0x247da8(0x157)][_0x501860[_0x247da8(0x185)]];if(!_0xb5cda&&_0x2ee6ca&&_0x2ee6ca['hash']===_0x4d053e){_0x196afb[_0x247da8(0x144)]({'lockKey':_0x501860['lockKey'],'reason':_0x247da8(0x180)});continue;}try{await uploadSingleFunction(_0x314374[_0x247da8(0x17d)],_0x501860,_0x54adcd,_0x3014f9);const _0x228d01=_0x54adcd[_0x247da8(0x157)][_0x501860['lockKey']];_0x4a0d7f[_0x247da8(0x144)]({'lockKey':_0x501860[_0x247da8(0x185)],'remoteId':_0x228d01?.['remoteId']??0x0});}catch(_0x3fb800){_0x54f82d[_0x247da8(0x144)]({'lockKey':_0x501860[_0x247da8(0x185)],'error':_0x3fb800 instanceof Error?_0x3fb800[_0x247da8(0x143)]:String(_0x3fb800)});}}_0x54adcd['lastSync']=new Date()['toISOString'](),await writeBffLockFile(_0x57d40f[_0x247da8(0x140)],_0x2a4760),await waitForUploadedLockEntries(_0x57d40f[_0x247da8(0x140)],_0x314374[_0x247da8(0x17d)],_0x4a0d7f['map'](_0x55d018=>_0x55d018[_0x247da8(0x185)]));let _0x3a8480={'attempted':![],'cleared':![]};if(_0x4a0d7f['length']>0x0)try{let _0x396c98='';for(let _0x14ddfe=0x0;_0x14ddfe<CACHE_CLEAR_ATTEMPTS;_0x14ddfe+=0x1){_0x396c98=await clearBffScriptCache(),_0x14ddfe<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x3a8480={'attempted':!![],'cleared':!![],'message':_0x396c98||_0x247da8(0x15e)};}catch(_0x3276ee){_0x3a8480={'attempted':!![],'cleared':![],'error':_0x3276ee instanceof Error?_0x3276ee[_0x247da8(0x143)]:String(_0x3276ee)};}const _0x115426=_0x54f82d[_0x247da8(0x142)]===0x0&&(_0x3a8480[_0x247da8(0x15f)]?_0x3a8480[_0x247da8(0x163)]:!![]),_0x215b07=_0x3a8480['attempted']?_0x3a8480['cleared']?_0x247da8(0x155):_0x247da8(0x15d):_0x247da8(0x146);return{'ok':_0x115426,'data':{'uploaded':_0x4a0d7f,'skipped':_0x196afb,'failed':_0x54f82d,'cacheClear':_0x3a8480},'message':_0x247da8(0x14f)+_0x4a0d7f[_0x247da8(0x142)]+'\x20uploaded,\x20'+_0x196afb[_0x247da8(0x142)]+'\x20skipped,\x20'+_0x54f82d[_0x247da8(0x142)]+'\x20failed,\x20'+_0x215b07};}};function a32_0x1ef7(){const _0x59f99a=['map','Local\x20function\x20not\x20found:\x20','force','2247179NAScrp','HOOK','Push\x20local\x20BFF\x20scripts\x20to\x20remote','\x22.\x20','hash','appCode','name','aliasToDatasetCode','unchanged','552102IkYyfo','description','filter','apps','lockKey','type','\x22\x20not\x20found\x20after\x20ensureLockScope.','has','6987087ylNwTO','apiDir','Would\x20inspect\x20','version','stringify','alias','16686kEoMpG','Force\x20push\x20ignoring\x20hash\x20protection','848103FSBFQz','validation','lockFilePath','ENDPOINT','length','message','push','Push\x20only\x20this\x20script\x20type','runtime\x20cache\x20not\x20needed','bool','status','50farldK','values','boolean','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','high-risk-write','bff','Push\x20complete:\x20','code','remoteId','filePath','21yToqKT','operationType','runtime\x20cache\x20cleared','Run\x20`','functions','Incomplete\x20HOOK\x20path:\x20','Cannot\x20resolve\x20dataset\x20for\x20\x22','datasetCodeToDataset','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','str','runtime\x20cache\x20clear\x20failed','Runtime\x20script\x20cache\x20cleared.','attempted','functionNode','POST','16804gdzZdx','cleared','set','update','get','/api/management/library/scripts/save','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','165nTRLxr','datasetCode','scriptsRoot','string','249512rxHxJp','every','405hTdOWT','would_push','create','utf8','parse'];a32_0x1ef7=function(){return _0x59f99a;};return a32_0x1ef7();}function a32_0xef14(_0x27ae33,_0x2f2658){_0x27ae33=_0x27ae33-0x13c;const _0x1ef7da=a32_0x1ef7();let _0xef14bc=_0x1ef7da[_0x27ae33];return _0xef14bc;}async function getTargetFunctions(_0x3d6c48,_0xf3f3a1){const _0x522ee6=a32_0x2f85bb,_0x186271=_0xf3f3a1[_0x522ee6(0x15c)](_0x522ee6(0x186)),_0xcd4151=_0xf3f3a1[_0x522ee6(0x15c)](_0x522ee6(0x17e)),_0x1cc233=normalizeBffType(_0x186271)??undefined;if(_0xcd4151&&!_0x1cc233)throw CliErrors[_0x522ee6(0x13f)](_0x522ee6(0x169));const _0x3bb4b2=await scanLocalBffFunctions(_0x3d6c48,_0x1cc233);if(_0xcd4151){const _0x23d76d=_0x3bb4b2[_0x522ee6(0x183)](_0x34f0b1=>_0x34f0b1[_0x522ee6(0x17e)]===_0xcd4151);if(_0x23d76d[_0x522ee6(0x142)]===0x0)throw CliErrors[_0x522ee6(0x13f)](_0x522ee6(0x176)+_0x1cc233+'/'+_0xcd4151);return _0x23d76d;}return _0x3bb4b2;}async function buildHookMaps(_0x38e038,_0x124b30,_0x1ad431,_0x8f6e1){const _0x1b41e1=a32_0x2f85bb,_0x161776=_0x1ad431['some'](_0x3250c7=>_0x3250c7['type']===_0x1b41e1(0x179));if(!_0x161776)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x527cd8=loadAliasMap(_0x124b30,undefined,resolveApiFilePath(_0x124b30,_0x38e038)),_0x9ef988=new Map(_0x527cd8['map'](_0x24b568=>[_0x24b568[_0x1b41e1(0x18e)],_0x24b568[_0x1b41e1(0x16b)]]));for(const _0xd87918 of Object[_0x1b41e1(0x14a)](_0x8f6e1[_0x1b41e1(0x157)])){_0xd87918[_0x1b41e1(0x18e)]&&_0xd87918[_0x1b41e1(0x16b)]&&!_0x9ef988[_0x1b41e1(0x188)](_0xd87918[_0x1b41e1(0x18e)])&&_0x9ef988[_0x1b41e1(0x164)](_0xd87918[_0x1b41e1(0x18e)],_0xd87918[_0x1b41e1(0x16b)]);}const _0xe35f8b=await listDatasets(_0x38e038),_0x2a0c88=new Map(_0xe35f8b[_0x1b41e1(0x175)](_0x52e365=>[_0x52e365[_0x1b41e1(0x150)],_0x52e365]));return{'aliasToDatasetCode':_0x9ef988,'datasetCodeToDataset':_0x2a0c88};}async function uploadSingleFunction(_0x167bc8,_0x1d4924,_0x522e4a,_0x2887f4){const _0x1a01d0=a32_0x2f85bb,_0x399edc=await readFile(_0x1d4924[_0x1a01d0(0x152)],_0x1a01d0(0x173)),_0x8674ec=await computeFileHash(_0x1d4924[_0x1a01d0(0x152)]),_0x275172=_0x522e4a['functions'][_0x1d4924['lockKey']];if(_0x275172?.['remoteId']&&_0x275172['version']==null)throw CliErrors[_0x1a01d0(0x13f)](_0x1d4924['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x32ab95=extractScriptDescription(_0x399edc);if(!_0x32ab95&&_0x275172?.['remoteId']){const _0x3f4855=await getBffScriptInfo(_0x275172['remoteId']);_0x32ab95=_0x3f4855['description']||undefined;}const _0xe28127={'appCode':_0x167bc8,'functionName':_0x1d4924['name'],'scriptType':_0x1d4924[_0x1a01d0(0x186)],'scriptContent':_0x399edc};if(_0x275172?.[_0x1a01d0(0x151)])_0xe28127['id']=_0x275172[_0x1a01d0(0x151)];if(_0x275172?.[_0x1a01d0(0x18c)]!=null)_0xe28127[_0x1a01d0(0x18c)]=_0x275172[_0x1a01d0(0x18c)];if(_0x32ab95)_0xe28127[_0x1a01d0(0x182)]=_0x32ab95;if(_0x1d4924[_0x1a01d0(0x186)]===_0x1a01d0(0x179)){const _0x2d8a37=_0x1d4924[_0x1a01d0(0x18e)];if(!_0x2d8a37||!_0x1d4924[_0x1a01d0(0x154)]||!_0x1d4924[_0x1a01d0(0x160)])throw CliErrors['validation'](_0x1a01d0(0x158)+_0x1d4924[_0x1a01d0(0x185)]);const _0x3ed6be=_0x2887f4[_0x1a01d0(0x17f)][_0x1a01d0(0x166)](_0x2d8a37)??_0x275172?.[_0x1a01d0(0x16b)]??_0x2d8a37,_0x35f664=_0x2887f4[_0x1a01d0(0x15a)]['get'](_0x3ed6be);if(!_0x35f664)throw CliErrors[_0x1a01d0(0x13f)](_0x1a01d0(0x159)+_0x2d8a37+_0x1a01d0(0x17b)+(_0x1a01d0(0x156)+CLI_BIN_NAME+_0x1a01d0(0x168)));_0xe28127['datasetId']=_0x35f664['id'],_0xe28127['operationType']=_0x1d4924[_0x1a01d0(0x154)],_0xe28127[_0x1a01d0(0x160)]=_0x1d4924[_0x1a01d0(0x160)];}const _0x2ddec4=await saveBffScript(_0xe28127),_0x56ba26=_0x2ddec4['id'],_0x2a3d46=_0x2ddec4['script']??await getBffScriptInfo(_0x56ba26),_0x4a6f26={'hash':_0x8674ec,'remoteId':_0x56ba26,'version':_0x2a3d46[_0x1a01d0(0x18c)]};if(_0x1d4924[_0x1a01d0(0x186)]==='HOOK'){const _0x2eae1a=_0x1d4924[_0x1a01d0(0x18e)],_0x119799=_0x2887f4[_0x1a01d0(0x17f)][_0x1a01d0(0x166)](_0x2eae1a)??_0x275172?.[_0x1a01d0(0x16b)]??_0x2eae1a;_0x2887f4[_0x1a01d0(0x17f)][_0x1a01d0(0x188)](_0x2eae1a)?_0x4a6f26[_0x1a01d0(0x18e)]=_0x2eae1a:_0x4a6f26[_0x1a01d0(0x18e)]=_0x275172?.['alias'],_0x4a6f26[_0x1a01d0(0x16b)]=_0x119799,_0x4a6f26[_0x1a01d0(0x154)]=_0x1d4924['operationType'],_0x4a6f26[_0x1a01d0(0x160)]=_0x1d4924[_0x1a01d0(0x160)];}_0x522e4a['functions'][_0x1d4924[_0x1a01d0(0x185)]]=_0x4a6f26;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x49efc4,_0x1e7dc9,_0x25f2f6){const _0x8b95cf=a32_0x2f85bb;if(_0x25f2f6['length']===0x0)return;for(let _0x33e31f=0x0;_0x33e31f<LOCK_SETTLE_RETRY_COUNT;_0x33e31f+=0x1){const _0x1bd03f=await readBffLockFile(_0x49efc4),_0x5cad4f=_0x1bd03f?.[_0x8b95cf(0x184)]?.[_0x1e7dc9]?.[_0x8b95cf(0x157)]??{},_0xe6f944=_0x25f2f6[_0x8b95cf(0x16f)](_0x4e86c9=>!!_0x5cad4f[_0x4e86c9]?.[_0x8b95cf(0x151)]);if(_0xe6f944)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x8b95cf(0x14c)+_0x25f2f6['join'](',\x20')+'.');}
1
+ const a32_0x4506e3=a32_0x21d4;(function(_0x1f3015,_0x114c9a){const _0x303513=a32_0x21d4,_0x417827=_0x1f3015();while(!![]){try{const _0xf586b3=-parseInt(_0x303513(0x1b6))/0x1+-parseInt(_0x303513(0x1de))/0x2+parseInt(_0x303513(0x1df))/0x3*(-parseInt(_0x303513(0x1a9))/0x4)+parseInt(_0x303513(0x1da))/0x5*(-parseInt(_0x303513(0x1f7))/0x6)+parseInt(_0x303513(0x1f3))/0x7*(-parseInt(_0x303513(0x1cb))/0x8)+parseInt(_0x303513(0x1dc))/0x9+-parseInt(_0x303513(0x1b5))/0xa*(-parseInt(_0x303513(0x1c9))/0xb);if(_0xf586b3===_0x114c9a)break;else _0x417827['push'](_0x417827['shift']());}catch(_0x26c2c9){_0x417827['push'](_0x417827['shift']());}}}(a32_0x2d2d,0x32726));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':'push','description':a32_0x4506e3(0x1b1),'risk':a32_0x4506e3(0x1ae),'flags':[{'name':a32_0x4506e3(0x1bb),'type':a32_0x4506e3(0x1d8),'description':a32_0x4506e3(0x1f2),'enum':[a32_0x4506e3(0x1d9),a32_0x4506e3(0x1ea),a32_0x4506e3(0x1ac)]},{'name':'name','type':a32_0x4506e3(0x1d8),'description':'Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)'},{'name':a32_0x4506e3(0x1c6),'type':'boolean','description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x456eb6){const _0x38fef5=a32_0x4506e3,_0x203288=loadBffProjectConfig(_0x456eb6[_0x38fef5(0x1b7)]),_0x544d14=await readBffLockFile(_0x203288[_0x38fef5(0x1b3)]),{appLock:_0x280679}=ensureLockScope(_0x544d14??createEmptyBffLock(),_0x456eb6[_0x38fef5(0x1b7)],_0x203288[_0x38fef5(0x1be)],_0x38fef5(0x1ba)),_0x92602b=await getTargetFunctions(_0x203288,_0x456eb6),_0x41db0f=_0x456eb6[_0x38fef5(0x1e7)](_0x38fef5(0x1c6)),_0x5c1f0f=[];for(const _0x28afd0 of _0x92602b){const _0x35df37=await computeFileHash(_0x28afd0['filePath']),_0x51e467=_0x280679[_0x38fef5(0x1ad)][_0x28afd0['lockKey']],_0x1cdcdf=!!_0x51e467&&_0x51e467['hash']===_0x35df37;_0x5c1f0f[_0x38fef5(0x1ba)]({'lockKey':_0x28afd0[_0x38fef5(0x1e1)],'filePath':_0x28afd0[_0x38fef5(0x1a8)],'remoteId':_0x51e467?.[_0x38fef5(0x1c0)]??null,'mode':_0x51e467?.[_0x38fef5(0x1c0)]?_0x38fef5(0x1c1):_0x38fef5(0x1e5),'status':!_0x41db0f&&_0x1cdcdf?_0x38fef5(0x1bf):_0x38fef5(0x1b8)});}return{'method':_0x38fef5(0x1fc),'url':_0x38fef5(0x1d3),'body':{'appCode':_0x456eb6[_0x38fef5(0x1b7)],'force':_0x41db0f,'files':_0x5c1f0f,'cacheClearAtRuntime':_0x5c1f0f['some'](_0x4ed3ef=>_0x4ed3ef[_0x38fef5(0x1b0)]===_0x38fef5(0x1b8)),'cacheClearAtRuntimeTimes':_0x5c1f0f[_0x38fef5(0x1af)](_0x3bdfb4=>_0x3bdfb4[_0x38fef5(0x1b0)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x38fef5(0x1c8)+_0x5c1f0f[_0x38fef5(0x1ec)]+_0x38fef5(0x1e8)};},async 'execute'(_0x427f75){const _0x161330=a32_0x4506e3,_0x1ced5a=loadBffProjectConfig(_0x427f75[_0x161330(0x1b7)]),_0x14c0ca=await readBffLockFile(_0x1ced5a[_0x161330(0x1b3)]),{lockData:_0x232e7c,appLock:_0x114ec5}=ensureLockScope(_0x14c0ca??createEmptyBffLock(),_0x427f75[_0x161330(0x1b7)],_0x1ced5a[_0x161330(0x1be)],_0x161330(0x1ba)),_0x4fae09=await getTargetFunctions(_0x1ced5a,_0x427f75);if(_0x4fae09[_0x161330(0x1ec)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x161330(0x1ca)};const _0x98daf4=_0x427f75[_0x161330(0x1e7)](_0x161330(0x1c6)),_0x224ef9=JSON[_0x161330(0x1f1)](JSON['stringify'](_0x232e7c)),_0x540ce2=_0x224ef9[_0x161330(0x1cd)][_0x427f75[_0x161330(0x1b7)]];if(!_0x540ce2)throw new Error(_0x161330(0x1e0)+_0x427f75[_0x161330(0x1b7)]+_0x161330(0x1f4));const _0x5a80e8=await buildHookMaps(_0x427f75['appCode'],_0x427f75[_0x161330(0x1fa)],_0x4fae09,_0x540ce2),_0xbaee47=[],_0x50d1d0=[],_0x4f5bc1=[];for(const _0x31614a of _0x4fae09){const _0x3334df=await computeFileHash(_0x31614a[_0x161330(0x1a8)]),_0x352c2e=_0x540ce2['functions'][_0x31614a[_0x161330(0x1e1)]];if(!_0x98daf4&&_0x352c2e&&_0x352c2e['hash']===_0x3334df){_0x50d1d0['push']({'lockKey':_0x31614a['lockKey'],'reason':_0x161330(0x1bf)});continue;}try{await uploadSingleFunction(_0x427f75[_0x161330(0x1b7)],_0x31614a,_0x540ce2,_0x5a80e8);const _0x260dc2=_0x540ce2[_0x161330(0x1ad)][_0x31614a[_0x161330(0x1e1)]];_0xbaee47[_0x161330(0x1ba)]({'lockKey':_0x31614a[_0x161330(0x1e1)],'remoteId':_0x260dc2?.[_0x161330(0x1c0)]??0x0});}catch(_0x4cac1b){_0x4f5bc1[_0x161330(0x1ba)]({'lockKey':_0x31614a[_0x161330(0x1e1)],'error':_0x4cac1b instanceof Error?_0x4cac1b[_0x161330(0x1b9)]:String(_0x4cac1b)});}}_0x540ce2[_0x161330(0x1d5)]=new Date()[_0x161330(0x1f8)](),await writeBffLockFile(_0x1ced5a[_0x161330(0x1b3)],_0x224ef9),await waitForUploadedLockEntries(_0x1ced5a[_0x161330(0x1b3)],_0x427f75[_0x161330(0x1b7)],_0xbaee47['map'](_0x1b98d8=>_0x1b98d8[_0x161330(0x1e1)]));let _0x57a6ef={'attempted':![],'cleared':![]};if(_0xbaee47[_0x161330(0x1ec)]>0x0)try{let _0x1ccb20='';for(let _0x184b30=0x0;_0x184b30<CACHE_CLEAR_ATTEMPTS;_0x184b30+=0x1){_0x1ccb20=await clearBffScriptCache(),_0x184b30<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x57a6ef={'attempted':!![],'cleared':!![],'message':_0x1ccb20||_0x161330(0x1d6)};}catch(_0x4972d6){_0x57a6ef={'attempted':!![],'cleared':![],'error':_0x4972d6 instanceof Error?_0x4972d6[_0x161330(0x1b9)]:String(_0x4972d6)};}const _0x40bd7d=_0x4f5bc1[_0x161330(0x1ec)]===0x0&&(_0x57a6ef[_0x161330(0x1d0)]?_0x57a6ef[_0x161330(0x1e2)]:!![]),_0x13bb1a=_0x57a6ef[_0x161330(0x1d0)]?_0x57a6ef['cleared']?_0x161330(0x1cc):_0x161330(0x1d4):_0x161330(0x1e4);return{'ok':_0x40bd7d,'data':{'uploaded':_0xbaee47,'skipped':_0x50d1d0,'failed':_0x4f5bc1,'cacheClear':_0x57a6ef},'message':'Push\x20complete:\x20'+_0xbaee47[_0x161330(0x1ec)]+_0x161330(0x1f6)+_0x50d1d0[_0x161330(0x1ec)]+_0x161330(0x1fe)+_0x4f5bc1[_0x161330(0x1ec)]+'\x20failed,\x20'+_0x13bb1a};}};function a32_0x2d2d(){const _0x55f29=['950424DFCRtv','runtime\x20cache\x20cleared','apps','Incomplete\x20HOOK\x20path:\x20','utf8','attempted','code','values','/api/management/library/scripts/save','runtime\x20cache\x20clear\x20failed','lastSync','Runtime\x20script\x20cache\x20cleared.','datasetCode','string','COMMON','239645gaHjwQ','aliasToDatasetCode','3101085gAEbZR','datasetCodeToDataset','178790sWqCbD','7149RFGmqm','Lock\x20scope\x20for\x20app\x20\x22','lockKey','cleared','every','runtime\x20cache\x20not\x20needed','create','Run\x20`','bool','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','ENDPOINT','functionNode','length','filter','join','datasetId','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','parse','Push\x20only\x20this\x20script\x20type','21fuyOfQ','\x22\x20not\x20found\x20after\x20ensureLockScope.','Local\x20function\x20not\x20found:\x20','\x20uploaded,\x20','18SnPqLH','toISOString','str','apiDir','\x22.\x20','POST','set','\x20skipped,\x20','filePath','356cNuWIE','name','get','HOOK','functions','high-risk-write','some','status','Push\x20local\x20BFF\x20scripts\x20to\x20remote','has','lockFilePath','version','8521390vDUldY','188396rOPXFP','appCode','would_push','message','push','type','map','Cannot\x20resolve\x20dataset\x20for\x20\x22','scriptsRoot','unchanged','remoteId','update','operationType','description','alias','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','force','validation','Would\x20inspect\x20','11DDecqc','No\x20local\x20BFF\x20functions\x20found.'];a32_0x2d2d=function(){return _0x55f29;};return a32_0x2d2d();}async function getTargetFunctions(_0x2a0a62,_0x4ab3b7){const _0x36d37e=a32_0x4506e3,_0xb1e1a1=_0x4ab3b7[_0x36d37e(0x1f9)](_0x36d37e(0x1bb)),_0x50e638=_0x4ab3b7[_0x36d37e(0x1f9)](_0x36d37e(0x1aa)),_0x49db59=normalizeBffType(_0xb1e1a1)??undefined;if(_0x50e638&&!_0x49db59)throw CliErrors[_0x36d37e(0x1c7)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x4507fb=await scanLocalBffFunctions(_0x2a0a62,_0x49db59);if(_0x50e638){const _0x1c424d=_0x4507fb[_0x36d37e(0x1ed)](_0x116190=>_0x116190[_0x36d37e(0x1aa)]===_0x50e638);if(_0x1c424d[_0x36d37e(0x1ec)]===0x0)throw CliErrors['validation'](_0x36d37e(0x1f5)+_0x49db59+'/'+_0x50e638);return _0x1c424d;}return _0x4507fb;}async function buildHookMaps(_0x2dc8a5,_0x4ea1bc,_0x455bbd,_0xd04200){const _0x3f4326=a32_0x4506e3,_0x145989=_0x455bbd[_0x3f4326(0x1af)](_0x18aba7=>_0x18aba7[_0x3f4326(0x1bb)]===_0x3f4326(0x1ac));if(!_0x145989)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x236d05=loadAliasMap(_0x4ea1bc,undefined,resolveApiFilePath(_0x4ea1bc,_0x2dc8a5)),_0x34836a=new Map(_0x236d05[_0x3f4326(0x1bc)](_0x10dd28=>[_0x10dd28[_0x3f4326(0x1c4)],_0x10dd28[_0x3f4326(0x1d7)]]));for(const _0x5c5f53 of Object[_0x3f4326(0x1d2)](_0xd04200[_0x3f4326(0x1ad)])){_0x5c5f53[_0x3f4326(0x1c4)]&&_0x5c5f53['datasetCode']&&!_0x34836a[_0x3f4326(0x1b2)](_0x5c5f53[_0x3f4326(0x1c4)])&&_0x34836a[_0x3f4326(0x1fd)](_0x5c5f53[_0x3f4326(0x1c4)],_0x5c5f53[_0x3f4326(0x1d7)]);}const _0x160551=await listDatasets(_0x2dc8a5),_0x3b3c25=new Map(_0x160551['map'](_0x2be0de=>[_0x2be0de[_0x3f4326(0x1d1)],_0x2be0de]));return{'aliasToDatasetCode':_0x34836a,'datasetCodeToDataset':_0x3b3c25};}async function uploadSingleFunction(_0xbfe1b3,_0xd88710,_0x2b06d7,_0x11d7e5){const _0x5e9edf=a32_0x4506e3,_0x30514a=await readFile(_0xd88710[_0x5e9edf(0x1a8)],_0x5e9edf(0x1cf)),_0x196007=await computeFileHash(_0xd88710['filePath']),_0x26eb8d=_0x2b06d7[_0x5e9edf(0x1ad)][_0xd88710[_0x5e9edf(0x1e1)]];if(_0x26eb8d?.[_0x5e9edf(0x1c0)]&&_0x26eb8d[_0x5e9edf(0x1b4)]==null)throw CliErrors['validation'](_0xd88710['lockKey']+_0x5e9edf(0x1e9));let _0x19f01d=extractScriptDescription(_0x30514a);if(!_0x19f01d&&_0x26eb8d?.[_0x5e9edf(0x1c0)]){const _0x14abd2=await getBffScriptInfo(_0x26eb8d['remoteId']);_0x19f01d=_0x14abd2[_0x5e9edf(0x1c3)]||undefined;}const _0x56b935={'appCode':_0xbfe1b3,'functionName':_0xd88710[_0x5e9edf(0x1aa)],'scriptType':_0xd88710[_0x5e9edf(0x1bb)],'scriptContent':_0x30514a};if(_0x26eb8d?.['remoteId'])_0x56b935['id']=_0x26eb8d[_0x5e9edf(0x1c0)];if(_0x26eb8d?.[_0x5e9edf(0x1b4)]!=null)_0x56b935['version']=_0x26eb8d[_0x5e9edf(0x1b4)];if(_0x19f01d)_0x56b935[_0x5e9edf(0x1c3)]=_0x19f01d;if(_0xd88710[_0x5e9edf(0x1bb)]==='HOOK'){const _0x477004=_0xd88710[_0x5e9edf(0x1c4)];if(!_0x477004||!_0xd88710[_0x5e9edf(0x1c2)]||!_0xd88710[_0x5e9edf(0x1eb)])throw CliErrors[_0x5e9edf(0x1c7)](_0x5e9edf(0x1ce)+_0xd88710[_0x5e9edf(0x1e1)]);const _0xa4ef21=_0x11d7e5['aliasToDatasetCode']['get'](_0x477004)??_0x26eb8d?.['datasetCode']??_0x477004,_0x2f636d=_0x11d7e5[_0x5e9edf(0x1dd)][_0x5e9edf(0x1ab)](_0xa4ef21);if(!_0x2f636d)throw CliErrors['validation'](_0x5e9edf(0x1bd)+_0x477004+_0x5e9edf(0x1fb)+(_0x5e9edf(0x1e6)+CLI_BIN_NAME+_0x5e9edf(0x1f0)));_0x56b935[_0x5e9edf(0x1ef)]=_0x2f636d['id'],_0x56b935[_0x5e9edf(0x1c2)]=_0xd88710[_0x5e9edf(0x1c2)],_0x56b935[_0x5e9edf(0x1eb)]=_0xd88710['functionNode'];}const _0x3bb04a=await saveBffScript(_0x56b935),_0x36ae34=_0x3bb04a['id'],_0x3935d8=_0x3bb04a['script']??await getBffScriptInfo(_0x36ae34),_0x298ad2={'hash':_0x196007,'remoteId':_0x36ae34,'version':_0x3935d8[_0x5e9edf(0x1b4)]};if(_0xd88710[_0x5e9edf(0x1bb)]==='HOOK'){const _0x354570=_0xd88710['alias'],_0x2bd041=_0x11d7e5[_0x5e9edf(0x1db)][_0x5e9edf(0x1ab)](_0x354570)??_0x26eb8d?.['datasetCode']??_0x354570;_0x11d7e5[_0x5e9edf(0x1db)]['has'](_0x354570)?_0x298ad2[_0x5e9edf(0x1c4)]=_0x354570:_0x298ad2[_0x5e9edf(0x1c4)]=_0x26eb8d?.['alias'],_0x298ad2[_0x5e9edf(0x1d7)]=_0x2bd041,_0x298ad2['operationType']=_0xd88710[_0x5e9edf(0x1c2)],_0x298ad2[_0x5e9edf(0x1eb)]=_0xd88710[_0x5e9edf(0x1eb)];}_0x2b06d7['functions'][_0xd88710[_0x5e9edf(0x1e1)]]=_0x298ad2;}function a32_0x21d4(_0x450796,_0x336db3){_0x450796=_0x450796-0x1a8;const _0x2d2d83=a32_0x2d2d();let _0x21d423=_0x2d2d83[_0x450796];return _0x21d423;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x769cdb,_0x4d40de,_0x2351eb){const _0x518e2f=a32_0x4506e3;if(_0x2351eb[_0x518e2f(0x1ec)]===0x0)return;for(let _0x299960=0x0;_0x299960<LOCK_SETTLE_RETRY_COUNT;_0x299960+=0x1){const _0xb4faa9=await readBffLockFile(_0x769cdb),_0x71cf47=_0xb4faa9?.[_0x518e2f(0x1cd)]?.[_0x4d40de]?.[_0x518e2f(0x1ad)]??{},_0x2f5146=_0x2351eb[_0x518e2f(0x1e3)](_0x1d0dda=>!!_0x71cf47[_0x1d0dda]?.['remoteId']);if(_0x2f5146)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x518e2f(0x1c5)+_0x2351eb[_0x518e2f(0x1ee)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a33_0x32b13e=a33_0x22ef;(function(_0x51addb,_0x5e28d3){const _0x1073f1=a33_0x22ef,_0x14dfb7=_0x51addb();while(!![]){try{const _0xfcb96f=parseInt(_0x1073f1(0x188))/0x1*(-parseInt(_0x1073f1(0x194))/0x2)+parseInt(_0x1073f1(0x17e))/0x3+-parseInt(_0x1073f1(0x19b))/0x4*(-parseInt(_0x1073f1(0x17d))/0x5)+-parseInt(_0x1073f1(0x18a))/0x6+parseInt(_0x1073f1(0x195))/0x7+parseInt(_0x1073f1(0x183))/0x8*(parseInt(_0x1073f1(0x179))/0x9)+parseInt(_0x1073f1(0x18e))/0xa*(parseInt(_0x1073f1(0x185))/0xb);if(_0xfcb96f===_0x5e28d3)break;else _0x14dfb7['push'](_0x14dfb7['shift']());}catch(_0x1c3b50){_0x14dfb7['push'](_0x14dfb7['shift']());}}}(a33_0x3e7a,0x608d0));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 a33_0x3e7a(){const _0x4a0e32=['boolean','26QHypeA','3674251BkikQA','alias','remote','read','datasetCode','filePath','238148qmQQoM','functions','13977AhIRjG','lockFilePath','push','status','10riHurQ','1363389xYsjoW','\x20modified,\x20','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','bff','1576fHGzPc','\x20unchanged','11iETQuU','\x20remote-only','all','53899sYAoJB','All\x20BFF\x20scripts\x20are\x20in\x20sync.','1972686TFHzcX','lockKey','has','length','205690nJswWy','map','appCode','bool','\x20added,\x20'];a33_0x3e7a=function(){return _0x4a0e32;};return a33_0x3e7a();}function a33_0x22ef(_0x51956b,_0x593338){_0x51956b=_0x51956b-0x179;const _0x3e7ac9=a33_0x3e7a();let _0x22efae=_0x3e7ac9[_0x51956b];return _0x22efae;}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':a33_0x32b13e(0x182),'command':a33_0x32b13e(0x17c),'description':a33_0x32b13e(0x180),'risk':a33_0x32b13e(0x198),'flags':[{'name':a33_0x32b13e(0x197),'type':a33_0x32b13e(0x193),'description':a33_0x32b13e(0x181)}],async 'execute'(_0xf3817){const _0x38d95e=a33_0x32b13e,_0x3e41f0=loadBffProjectConfig(_0xf3817['appCode']),_0x4bb38f=await readBffLockFile(_0x3e41f0[_0x38d95e(0x17a)]),{appLock:_0x317c64}=ensureLockScope(_0x4bb38f??createEmptyBffLock(),_0xf3817['appCode'],_0x3e41f0['scriptsRoot'],_0x38d95e(0x17c)),_0x33c6d4=await scanLocalBffFunctions(_0x3e41f0),_0x3d3e29=[],_0xe42ee7=[],_0x52b2d6=[];for(const _0x394387 of _0x33c6d4){const _0x3196ed=await computeFileHash(_0x394387[_0x38d95e(0x19a)]),_0x4073b6=_0x317c64[_0x38d95e(0x19c)][_0x394387[_0x38d95e(0x18b)]];if(!_0x4073b6)_0x3d3e29[_0x38d95e(0x17b)](_0x394387[_0x38d95e(0x18b)]);else _0x4073b6['hash']!==_0x3196ed?_0xe42ee7[_0x38d95e(0x17b)](_0x394387[_0x38d95e(0x18b)]):_0x52b2d6['push'](_0x394387[_0x38d95e(0x18b)]);}const _0x3b0031=[];if(_0xf3817[_0x38d95e(0x191)]('remote')){const _0x465ed7=loadAliasMap(_0xf3817['apiDir'],undefined,resolveApiFilePath(_0xf3817['apiDir'],_0xf3817[_0x38d95e(0x190)])),_0x2f87b6=new Map(_0x465ed7['map'](_0x374dd6=>[_0x374dd6[_0x38d95e(0x199)],_0x374dd6[_0x38d95e(0x196)]])),[_0x3e59ba,_0x2c08d7]=await Promise[_0x38d95e(0x187)]([listBffScripts(_0xf3817[_0x38d95e(0x190)]),getBffScriptStatistics(_0xf3817[_0x38d95e(0x190)])]),_0x33ed78=createHookLocationMap(_0x2c08d7),_0x5ce837=new Set(_0x33c6d4[_0x38d95e(0x18f)](_0x11c5fa=>_0x11c5fa[_0x38d95e(0x18b)]));for(const _0xb73340 of _0x3e59ba){const _0x4553a0=resolveRemoteScriptTarget(_0x3e41f0,_0xb73340,_0x33ed78,_0x317c64[_0x38d95e(0x19c)],_0x2f87b6);_0x4553a0&&!_0x5ce837[_0x38d95e(0x18c)](_0x4553a0[_0x38d95e(0x18b)])&&_0x3b0031[_0x38d95e(0x17b)](_0x4553a0[_0x38d95e(0x18b)]);}}const _0x46f341=_0x3d3e29[_0x38d95e(0x18d)]===0x0&&_0xe42ee7[_0x38d95e(0x18d)]===0x0&&_0x3b0031[_0x38d95e(0x18d)]===0x0;return{'ok':!![],'data':{'added':_0x3d3e29,'modified':_0xe42ee7,'unchanged':_0x52b2d6,'remoteOnly':_0x3b0031},'message':_0x46f341?_0x38d95e(0x189):_0x3d3e29[_0x38d95e(0x18d)]+_0x38d95e(0x192)+_0xe42ee7[_0x38d95e(0x18d)]+_0x38d95e(0x17f)+_0x52b2d6[_0x38d95e(0x18d)]+_0x38d95e(0x184)+(_0x3b0031['length']>0x0?',\x20'+_0x3b0031[_0x38d95e(0x18d)]+_0x38d95e(0x186):'')};}};
1
+ const a33_0x28c012=a33_0x3523;(function(_0x4b66ab,_0xb37e40){const _0x2be8a2=a33_0x3523,_0x25a6dd=_0x4b66ab();while(!![]){try{const _0x4b0abe=-parseInt(_0x2be8a2(0x1d2))/0x1+parseInt(_0x2be8a2(0x1db))/0x2*(-parseInt(_0x2be8a2(0x1d0))/0x3)+parseInt(_0x2be8a2(0x1d1))/0x4*(-parseInt(_0x2be8a2(0x1c1))/0x5)+-parseInt(_0x2be8a2(0x1d4))/0x6*(parseInt(_0x2be8a2(0x1c7))/0x7)+-parseInt(_0x2be8a2(0x1d3))/0x8+-parseInt(_0x2be8a2(0x1bf))/0x9+parseInt(_0x2be8a2(0x1c6))/0xa;if(_0x4b0abe===_0xb37e40)break;else _0x25a6dd['push'](_0x25a6dd['shift']());}catch(_0x457537){_0x25a6dd['push'](_0x25a6dd['shift']());}}}(a33_0x3db1,0xb2ca2));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';function a33_0x3523(_0x1c2efe,_0x1708cd){_0x1c2efe=_0x1c2efe-0x1be;const _0x3db1ca=a33_0x3db1();let _0x352316=_0x3db1ca[_0x1c2efe];return _0x352316;}function a33_0x3db1(){const _0x11af88=['5SiaPPS','lockKey','length','datasetCode','\x20remote-only','31781520EmHzMF','5089zHXsDt','all','alias','has','\x20added,\x20','appCode','bool','functions','bff','9jIjiwb','1539548qrWLnP','110681MsRPvl','7398864Gmepxi','3516rOpuEq','map','boolean','remote','read','status','\x20unchanged','28082MPsjbR','\x20modified,\x20','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','All\x20BFF\x20scripts\x20are\x20in\x20sync.','push','5015331gCaPJz','filePath'];a33_0x3db1=function(){return _0x11af88;};return a33_0x3db1();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a33_0x28c012(0x1cf),'command':a33_0x28c012(0x1d9),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a33_0x28c012(0x1d8),'flags':[{'name':a33_0x28c012(0x1d7),'type':a33_0x28c012(0x1d6),'description':a33_0x28c012(0x1dd)}],async 'execute'(_0x245b08){const _0x44494f=a33_0x28c012,_0x128c29=loadBffProjectConfig(_0x245b08['appCode']),_0x45dcda=await readBffLockFile(_0x128c29['lockFilePath']),{appLock:_0x373b89}=ensureLockScope(_0x45dcda??createEmptyBffLock(),_0x245b08[_0x44494f(0x1cc)],_0x128c29['scriptsRoot'],_0x44494f(0x1d9)),_0x404c06=await scanLocalBffFunctions(_0x128c29),_0x3c65f0=[],_0xc39162=[],_0x1937a4=[];for(const _0x3723fa of _0x404c06){const _0x46faea=await computeFileHash(_0x3723fa[_0x44494f(0x1c0)]),_0x379760=_0x373b89[_0x44494f(0x1ce)][_0x3723fa[_0x44494f(0x1c2)]];if(!_0x379760)_0x3c65f0[_0x44494f(0x1be)](_0x3723fa[_0x44494f(0x1c2)]);else _0x379760['hash']!==_0x46faea?_0xc39162[_0x44494f(0x1be)](_0x3723fa[_0x44494f(0x1c2)]):_0x1937a4[_0x44494f(0x1be)](_0x3723fa['lockKey']);}const _0x19550d=[];if(_0x245b08[_0x44494f(0x1cd)]('remote')){const _0x3717c5=loadAliasMap(_0x245b08['apiDir'],undefined,resolveApiFilePath(_0x245b08['apiDir'],_0x245b08[_0x44494f(0x1cc)])),_0x1b225e=new Map(_0x3717c5[_0x44494f(0x1d5)](_0x59a23d=>[_0x59a23d[_0x44494f(0x1c4)],_0x59a23d[_0x44494f(0x1c9)]])),[_0x2718bf,_0x50fdce]=await Promise[_0x44494f(0x1c8)]([listBffScripts(_0x245b08[_0x44494f(0x1cc)]),getBffScriptStatistics(_0x245b08[_0x44494f(0x1cc)])]),_0x2a110b=createHookLocationMap(_0x50fdce),_0x555255=new Set(_0x404c06[_0x44494f(0x1d5)](_0x73939=>_0x73939[_0x44494f(0x1c2)]));for(const _0x3b8ee1 of _0x2718bf){const _0x551087=resolveRemoteScriptTarget(_0x128c29,_0x3b8ee1,_0x2a110b,_0x373b89['functions'],_0x1b225e);_0x551087&&!_0x555255[_0x44494f(0x1ca)](_0x551087[_0x44494f(0x1c2)])&&_0x19550d[_0x44494f(0x1be)](_0x551087[_0x44494f(0x1c2)]);}}const _0x4383df=_0x3c65f0[_0x44494f(0x1c3)]===0x0&&_0xc39162[_0x44494f(0x1c3)]===0x0&&_0x19550d[_0x44494f(0x1c3)]===0x0;return{'ok':!![],'data':{'added':_0x3c65f0,'modified':_0xc39162,'unchanged':_0x1937a4,'remoteOnly':_0x19550d},'message':_0x4383df?_0x44494f(0x1de):_0x3c65f0['length']+_0x44494f(0x1cb)+_0xc39162[_0x44494f(0x1c3)]+_0x44494f(0x1dc)+_0x1937a4[_0x44494f(0x1c3)]+_0x44494f(0x1da)+(_0x19550d[_0x44494f(0x1c3)]>0x0?',\x20'+_0x19550d[_0x44494f(0x1c3)]+_0x44494f(0x1c5):'')};}};
@@ -1 +1 @@
1
- const a34_0x49c08b=a34_0x39a2;(function(_0x115c14,_0x43742e){const _0x10ed1b=a34_0x39a2,_0x30d210=_0x115c14();while(!![]){try{const _0x11156e=parseInt(_0x10ed1b(0x1b7))/0x1+parseInt(_0x10ed1b(0x1b0))/0x2*(parseInt(_0x10ed1b(0x1bf))/0x3)+-parseInt(_0x10ed1b(0x1bd))/0x4*(parseInt(_0x10ed1b(0x1c2))/0x5)+parseInt(_0x10ed1b(0x1c9))/0x6+parseInt(_0x10ed1b(0x1af))/0x7+parseInt(_0x10ed1b(0x1b1))/0x8+-parseInt(_0x10ed1b(0x1ac))/0x9;if(_0x11156e===_0x43742e)break;else _0x30d210['push'](_0x30d210['shift']());}catch(_0x33b84f){_0x30d210['push'](_0x30d210['shift']());}}}(a34_0xa139,0xe6ae2));import a34_0x55be0d from'chalk';import a34_0x233a58 from'ora';import a34_0x4d3190 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x18050d=a34_0x39a2;return GIT_COMMIT!==_0x18050d(0x1a9)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x55b5df=a34_0x39a2,_0xd6e670=process[_0x55b5df(0x1ca)][_0x55b5df(0x1b4)]();if(_0xd6e670[_0x55b5df(0x1c1)](_0x55b5df(0x1d6)))return _0x55b5df(0x1d6);return _0x55b5df(0x1ec);}const updateFlags=[{'name':a34_0x49c08b(0x1c5),'type':a34_0x49c08b(0x1f0),'description':a34_0x49c08b(0x1c4),'default':![]},{'name':a34_0x49c08b(0x1d0),'type':'string','description':a34_0x49c08b(0x1cd)},{'name':a34_0x49c08b(0x1ce),'type':a34_0x49c08b(0x1f0),'description':a34_0x49c08b(0x1bc),'default':![]},{'name':a34_0x49c08b(0x1cf),'type':a34_0x49c08b(0x1f0),'description':a34_0x49c08b(0x1e7),'default':!![],'hidden':!![]}];function getRequestedVersion(_0xd54f8b){const _0x46e7b0=a34_0x49c08b;return _0xd54f8b[_0x46e7b0(0x1be)](_0x46e7b0(0x1d0))[_0x46e7b0(0x1c0)]();}function shouldSkipOfficialSkill(_0x2c73e3){const _0x44a93f=a34_0x49c08b;return _0x2c73e3[_0x44a93f(0x1f1)]('no-skills')||_0x2c73e3['flag']('skills')===![];}async function validateUpdateFlags(_0x4326a9){const _0x3d26fa=a34_0x49c08b,_0x1ed274=_0x4326a9[_0x3d26fa(0x1f1)]('beta'),_0x2b67e0=getRequestedVersion(_0x4326a9);if(_0x1ed274&&_0x2b67e0)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x3d26fa(0x1c6));if(_0x2b67e0&&!a34_0x4d3190[_0x3d26fa(0x1df)](_0x2b67e0))throw CliErrors[_0x3d26fa(0x1d5)](_0x3d26fa(0x1db)+_0x2b67e0,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x420a43=a34_0x49c08b;try{const _0x27819d=await fetch(_0x420a43(0x1ad)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x420a43(0x1d4),{'signal':AbortSignal['timeout'](0x2710)});if(!_0x27819d['ok'])return null;const _0x3edc1=await _0x27819d[_0x420a43(0x1f3)]();if(!_0x3edc1||typeof _0x3edc1!=='object')return null;return Object[_0x420a43(0x1d8)](Object['entries'](_0x3edc1)[_0x420a43(0x1d9)](([,_0x3992d2])=>typeof _0x3992d2==='string'&&_0x3992d2[_0x420a43(0x1c0)]()[_0x420a43(0x1b3)]>0x0)[_0x420a43(0x1dc)](([_0x307967,_0x4a8441])=>[_0x307967,String(_0x4a8441)[_0x420a43(0x1c0)]()]));}catch{return null;}}function a34_0x39a2(_0x4a4c31,_0x44e96d){_0x4a4c31=_0x4a4c31-0x1a9;const _0xa1395b=a34_0xa139();let _0x39a273=_0xa1395b[_0x4a4c31];return _0x39a273;}async function fetchNpmDistTagVersion(_0x4469ce){const _0x2dd7c9=await fetchNpmDistTags();return _0x2dd7c9?.[_0x4469ce]??null;}function a34_0xa139(){const _0x8c4ca=['Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','nonInteractive','error','5265600EYHaXj','execPath','Beta\x20version:\x20','Version\x20comparison\x20failed','Install\x20a\x20specific\x20CLI\x20version','no-skills','skills','version','Skipping\x20official\x20skill\x20package\x20(--no-skills).','Checking\x20official\x20skill\x20package...','Checking\x20for\x20updates...','/dist-tags','validation','bun','skipped','fromEntries','filter','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Invalid\x20version:\x20','map','\x20install\x20-g\x20','Update\x20failed','valid','latest','\x20\x20Official\x20skill\x20update\x20failed:\x20','yellow','gray','\x20\x20Try\x20manually:\x20','run','Current\x20version:\x20','Refresh\x20official\x20skill\x20package\x20after\x20updating','green','update','Already\x20on\x20requested\x20version\x20(v','cwd','npm','message','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Updated\x20to\x20v','boolean','bool','Requested\x20version:\x20','json','unknown','red','Update\x20available:\x20','23451876Jueepy','https://registry.npmjs.org/-/package/','succeed','4426303uSFsMe','14AAbZWu','10065120yaIYju','source','length','toLowerCase','\x20→\x20','Already\x20up\x20to\x20date\x20(v','261443LMeoPE','inherit','start','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','...','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','4uCcMIy','str','626061ixeLwr','trim','includes','4698455cbLOIY','log','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','beta'];a34_0xa139=function(){return _0x8c4ca;};return a34_0xa139();}async function fetchLatestVersion(){const _0x1dc754=a34_0x49c08b;return fetchNpmDistTagVersion(_0x1dc754(0x1e0));}async function resolveTargetVersion(_0x3b88ac){const _0x4302a0=a34_0x49c08b,_0x51fa7a=getRequestedVersion(_0x3b88ac);if(_0x51fa7a)return{'version':_0x51fa7a,'source':_0x4302a0(0x1d0)};if(_0x3b88ac[_0x4302a0(0x1f1)]('beta')){const _0x49f7bf=await fetchNpmDistTagVersion(_0x4302a0(0x1c5));if(!_0x49f7bf)return null;return{'version':_0x49f7bf,'source':_0x4302a0(0x1c5)};}const _0x1cd408=await fetchLatestVersion();if(!_0x1cd408)return null;return{'version':_0x1cd408,'source':_0x4302a0(0x1e0)};}function shouldInstallTarget(_0x1d86c2,_0x54a4b8){const _0x3fecdd=a34_0x49c08b;if(_0x54a4b8['source']===_0x3fecdd(0x1d0)||_0x54a4b8['source']===_0x3fecdd(0x1c5))return!a34_0x4d3190['eq'](_0x1d86c2,_0x54a4b8[_0x3fecdd(0x1d0)]);return a34_0x4d3190['lt'](_0x1d86c2,_0x54a4b8[_0x3fecdd(0x1d0)]);}function getInstallPlanLabel(_0x330b03,_0x5516e4){const _0xb16194=a34_0x49c08b;switch(_0x5516e4[_0xb16194(0x1b2)]){case _0xb16194(0x1c5):return _0xb16194(0x1cb)+a34_0x55be0d[_0xb16194(0x1e2)](_0x330b03)+'\x20→\x20'+a34_0x55be0d['green'](_0x5516e4[_0xb16194(0x1d0)]);case'version':return _0xb16194(0x1f2)+a34_0x55be0d['yellow'](_0x330b03)+'\x20→\x20'+a34_0x55be0d[_0xb16194(0x1e8)](_0x5516e4[_0xb16194(0x1d0)]);case'latest':default:return _0xb16194(0x1ab)+a34_0x55be0d[_0xb16194(0x1e2)](_0x330b03)+_0xb16194(0x1b5)+a34_0x55be0d[_0xb16194(0x1e8)](_0x5516e4[_0xb16194(0x1d0)]);}}async function installOfficialSkill(_0x2da702){const _0x44eb84=a34_0x49c08b;console[_0x44eb84(0x1c3)](a34_0x55be0d[_0x44eb84(0x1e3)](_0x44eb84(0x1d2)));const _0x1db8f3=runNpxSkillsAddGlobal(process[_0x44eb84(0x1eb)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x2da702?'pipe':_0x44eb84(0x1b8)});if(_0x1db8f3[_0x44eb84(0x1d7)]){console[_0x44eb84(0x1c3)](a34_0x55be0d[_0x44eb84(0x1e3)]('\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x1db8f3['ok']){console['log'](a34_0x55be0d['gray']('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console['warn'](a34_0x55be0d[_0x44eb84(0x1e2)](_0x44eb84(0x1e1)+(_0x1db8f3[_0x44eb84(0x1c8)]||_0x44eb84(0x1a9)))),console[_0x44eb84(0x1c3)](a34_0x55be0d[_0x44eb84(0x1e3)]('\x20\x20Run\x20manually:\x20'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x266652){const _0x1c9666=a34_0x49c08b;await validateUpdateFlags(_0x266652);const _0x1fca37=getCurrentVersion();console[_0x1c9666(0x1c3)](_0x1c9666(0x1e6)+_0x1fca37);const _0x332650=a34_0x233a58(_0x1c9666(0x1d3))[_0x1c9666(0x1b9)](),_0x1fe9df=await resolveTargetVersion(_0x266652);if(!_0x1fe9df){const _0x50266c=_0x266652['bool']('beta')?_0x1c9666(0x1ee):_0x1c9666(0x1ba);return _0x332650['fail'](_0x50266c),console['log'](a34_0x55be0d['gray']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x50266c};}const _0x2bd3e7=a34_0x4d3190[_0x1c9666(0x1df)](VERSION),_0x316252=a34_0x4d3190[_0x1c9666(0x1df)](_0x1fe9df[_0x1c9666(0x1d0)]);if(!_0x2bd3e7||!_0x316252)return _0x332650['fail'](_0x1c9666(0x1cc)),{'ok':![],'message':_0x1c9666(0x1cc)};if(!shouldInstallTarget(_0x2bd3e7,_0x1fe9df)){const _0x297806=_0x1fe9df[_0x1c9666(0x1b2)]===_0x1c9666(0x1d0)?_0x1c9666(0x1ea)+_0x1fe9df[_0x1c9666(0x1d0)]+')':_0x1c9666(0x1b6)+_0x1fe9df[_0x1c9666(0x1d0)]+')';return _0x332650[_0x1c9666(0x1ae)](_0x297806),shouldSkipOfficialSkill(_0x266652)?console[_0x1c9666(0x1c3)](a34_0x55be0d[_0x1c9666(0x1e3)](_0x1c9666(0x1d1))):await installOfficialSkill(_0x266652[_0x1c9666(0x1c7)]),{'ok':!![]};}_0x332650['info'](getInstallPlanLabel(_0x1fca37,_0x1fe9df));const _0x5e8c74=detectPackageManager(),_0x338563=_0x5e8c74===_0x1c9666(0x1ec)?resolveNpmBin(_0x1c9666(0x1ec)):_0x5e8c74,_0x192c78=a34_0x233a58('Updating\x20via\x20'+_0x5e8c74+_0x1c9666(0x1bb))[_0x1c9666(0x1b9)]();try{return await execa(_0x338563,['install','-g',NPM_PACKAGE_NAME+'@'+_0x1fe9df[_0x1c9666(0x1d0)]],{'stdio':'pipe'}),_0x192c78['succeed'](_0x1c9666(0x1ef)+_0x1fe9df[_0x1c9666(0x1d0)]),console[_0x1c9666(0x1c3)](a34_0x55be0d[_0x1c9666(0x1e3)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipOfficialSkill(_0x266652)?console[_0x1c9666(0x1c3)](a34_0x55be0d[_0x1c9666(0x1e3)](_0x1c9666(0x1d1))):await installOfficialSkill(_0x266652['nonInteractive']),{'ok':!![]};}catch(_0x3f3ae6){return _0x192c78['fail'](_0x1c9666(0x1de)),console[_0x1c9666(0x1c8)](a34_0x55be0d[_0x1c9666(0x1aa)]('\x20\x20'+_0x3f3ae6[_0x1c9666(0x1ed)])),console[_0x1c9666(0x1c3)](a34_0x55be0d['gray'](_0x1c9666(0x1e4)+_0x5e8c74+_0x1c9666(0x1dd)+NPM_PACKAGE_NAME+'@'+_0x1fe9df[_0x1c9666(0x1d0)])),{'ok':![],'message':_0x3f3ae6['message']};}}export const updateDefinition={'service':a34_0x49c08b(0x1e9),'command':a34_0x49c08b(0x1e5),'description':a34_0x49c08b(0x1da),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a34_0x20a5f5=a34_0x34f2;(function(_0x6ab0d4,_0x67b6a8){const _0x45d337=a34_0x34f2,_0x386d43=_0x6ab0d4();while(!![]){try{const _0x3a82e4=-parseInt(_0x45d337(0xd7))/0x1+-parseInt(_0x45d337(0xfe))/0x2*(-parseInt(_0x45d337(0x124))/0x3)+-parseInt(_0x45d337(0xd6))/0x4+parseInt(_0x45d337(0xfd))/0x5*(parseInt(_0x45d337(0xee))/0x6)+-parseInt(_0x45d337(0x108))/0x7*(parseInt(_0x45d337(0x118))/0x8)+-parseInt(_0x45d337(0x11f))/0x9*(parseInt(_0x45d337(0xdd))/0xa)+parseInt(_0x45d337(0x104))/0xb;if(_0x3a82e4===_0x67b6a8)break;else _0x386d43['push'](_0x386d43['shift']());}catch(_0x149def){_0x386d43['push'](_0x386d43['shift']());}}}(a34_0x4fe9,0xf3086));import a34_0x413f70 from'chalk';import a34_0x23baae from'ora';import a34_0x23caa8 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x2da9c4=a34_0x34f2;return GIT_COMMIT!==_0x2da9c4(0x11a)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2da9c4(0x11b)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x487f=a34_0x34f2,_0x36d99d=process[_0x487f(0xec)][_0x487f(0xde)]();if(_0x36d99d[_0x487f(0x125)]('bun'))return'bun';return _0x487f(0xe8);}const updateFlags=[{'name':a34_0x20a5f5(0x128),'type':a34_0x20a5f5(0xe3),'description':a34_0x20a5f5(0xeb),'default':![]},{'name':a34_0x20a5f5(0x11e),'type':a34_0x20a5f5(0x101),'description':a34_0x20a5f5(0x10e)},{'name':a34_0x20a5f5(0xfc),'type':a34_0x20a5f5(0xe3),'description':a34_0x20a5f5(0xe6),'default':![]},{'name':a34_0x20a5f5(0x103),'type':a34_0x20a5f5(0xe3),'description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x50a333){const _0x1f6b61=a34_0x20a5f5;return _0x50a333['str'](_0x1f6b61(0x11e))[_0x1f6b61(0xf9)]();}function shouldSkipOfficialSkill(_0x34c7a6){const _0x596424=a34_0x20a5f5;return _0x34c7a6[_0x596424(0x121)](_0x596424(0xfc))||_0x34c7a6['flag'](_0x596424(0x103))===![];}async function validateUpdateFlags(_0x213696){const _0x5026d9=a34_0x20a5f5,_0x2f1562=_0x213696[_0x5026d9(0x121)](_0x5026d9(0x128)),_0x5ed95b=getRequestedVersion(_0x213696);if(_0x2f1562&&_0x5ed95b)throw CliErrors[_0x5026d9(0x106)](_0x5026d9(0x113),_0x5026d9(0xfa));if(_0x5ed95b&&!a34_0x23caa8[_0x5026d9(0xf2)](_0x5ed95b))throw CliErrors['validation'](_0x5026d9(0x126)+_0x5ed95b,_0x5026d9(0x116));}async function fetchNpmDistTags(){const _0x55560d=a34_0x20a5f5;try{const _0x5b5966=await fetch(_0x55560d(0xe7)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x55560d(0x110)](0x2710)});if(!_0x5b5966['ok'])return null;const _0x4d2575=await _0x5b5966['json']();if(!_0x4d2575||typeof _0x4d2575!==_0x55560d(0xf8))return null;return Object[_0x55560d(0x10d)](Object['entries'](_0x4d2575)[_0x55560d(0xf1)](([,_0x5063c0])=>typeof _0x5063c0===_0x55560d(0x101)&&_0x5063c0[_0x55560d(0xf9)]()[_0x55560d(0xdc)]>0x0)['map'](([_0x12c17f,_0x1d5bb1])=>[_0x12c17f,String(_0x1d5bb1)[_0x55560d(0xf9)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5371e5){const _0x234c9b=await fetchNpmDistTags();return _0x234c9b?.[_0x5371e5]??null;}async function fetchLatestVersion(){return fetchNpmDistTagVersion('latest');}async function resolveTargetVersion(_0x5b818f){const _0x3edf9d=a34_0x20a5f5,_0x4f955b=getRequestedVersion(_0x5b818f);if(_0x4f955b)return{'version':_0x4f955b,'source':_0x3edf9d(0x11e)};if(_0x5b818f['bool']('beta')){const _0x393d9f=await fetchNpmDistTagVersion('beta');if(!_0x393d9f)return null;return{'version':_0x393d9f,'source':_0x3edf9d(0x128)};}const _0x3d71eb=await fetchLatestVersion();if(!_0x3d71eb)return null;return{'version':_0x3d71eb,'source':'latest'};}function shouldInstallTarget(_0x3ce626,_0x5208df){const _0x18116b=a34_0x20a5f5;if(_0x5208df[_0x18116b(0xf3)]==='version'||_0x5208df['source']==='beta')return!a34_0x23caa8['eq'](_0x3ce626,_0x5208df[_0x18116b(0x11e)]);return a34_0x23caa8['lt'](_0x3ce626,_0x5208df['version']);}function a34_0x4fe9(){const _0x46e307=['npm','Update\x20available:\x20','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','execPath','succeed','42ZZoMYH','yellow','Updating\x20via\x20','filter','valid','source','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','Already\x20up\x20to\x20date\x20(v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','\x20install\x20-g\x20','object','trim','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','no-skills','184645IHmOWM','4286biUvRz','latest','inherit','string','Checking\x20for\x20updates...','skills','34946208yBnafT','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','validation','...','231fyxbeA','gray','skipped','Checking\x20official\x20skill\x20package...','start','fromEntries','Install\x20a\x20specific\x20CLI\x20version','message','timeout','fail','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','run','\x20\x20Official\x20skill\x20update\x20failed:\x20','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','green','318424dolYFl','warn','unknown','slice','nonInteractive','Beta\x20version:\x20','version','81WjwNmx','info','bool','\x20→\x20','error','2670FGBKMk','includes','Invalid\x20version:\x20','red','beta','Update\x20failed','5583668FCZnCi','1430310FYMxtk','update','\x20\x20Run\x20manually:\x20','install','Updated\x20to\x20v','length','230570cwSTwK','toLowerCase','log','pipe','Skipping\x20official\x20skill\x20package\x20(--no-skills).','\x20\x20Try\x20manually:\x20','boolean','Already\x20on\x20requested\x20version\x20(v','write','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','https://registry.npmjs.org/-/package/'];a34_0x4fe9=function(){return _0x46e307;};return a34_0x4fe9();}function a34_0x34f2(_0x5cf732,_0x7c84d4){_0x5cf732=_0x5cf732-0xd5;const _0x4fe9d3=a34_0x4fe9();let _0x34f2d8=_0x4fe9d3[_0x5cf732];return _0x34f2d8;}function getInstallPlanLabel(_0x1bc66e,_0x253fc2){const _0x424d7c=a34_0x20a5f5;switch(_0x253fc2[_0x424d7c(0xf3)]){case _0x424d7c(0x128):return _0x424d7c(0x11d)+a34_0x413f70[_0x424d7c(0xef)](_0x1bc66e)+_0x424d7c(0x122)+a34_0x413f70['green'](_0x253fc2[_0x424d7c(0x11e)]);case'version':return'Requested\x20version:\x20'+a34_0x413f70[_0x424d7c(0xef)](_0x1bc66e)+'\x20→\x20'+a34_0x413f70[_0x424d7c(0x117)](_0x253fc2[_0x424d7c(0x11e)]);case _0x424d7c(0xff):default:return _0x424d7c(0xe9)+a34_0x413f70['yellow'](_0x1bc66e)+_0x424d7c(0x122)+a34_0x413f70[_0x424d7c(0x117)](_0x253fc2[_0x424d7c(0x11e)]);}}async function installOfficialSkill(_0x166187){const _0xbd2e2f=a34_0x20a5f5;console[_0xbd2e2f(0xdf)](a34_0x413f70['gray'](_0xbd2e2f(0x10b)));const _0x693000=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x166187?_0xbd2e2f(0xe0):_0xbd2e2f(0x100)});if(_0x693000[_0xbd2e2f(0x10a)]){console['log'](a34_0x413f70[_0xbd2e2f(0x109)](_0xbd2e2f(0xea)));return;}if(_0x693000['ok']){console[_0xbd2e2f(0xdf)](a34_0x413f70[_0xbd2e2f(0x109)](_0xbd2e2f(0xf4)));return;}console[_0xbd2e2f(0x119)](a34_0x413f70[_0xbd2e2f(0xef)](_0xbd2e2f(0x115)+(_0x693000[_0xbd2e2f(0x123)]||_0xbd2e2f(0x11a)))),console[_0xbd2e2f(0xdf)](a34_0x413f70[_0xbd2e2f(0x109)](_0xbd2e2f(0xd9)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x1ad02c){const _0x5d0e98=a34_0x20a5f5;await validateUpdateFlags(_0x1ad02c);const _0x387d5d=getCurrentVersion();console[_0x5d0e98(0xdf)]('Current\x20version:\x20'+_0x387d5d);const _0x2f3708=a34_0x23baae(_0x5d0e98(0x102))['start'](),_0x128597=await resolveTargetVersion(_0x1ad02c);if(!_0x128597){const _0x2bbce7=_0x1ad02c[_0x5d0e98(0x121)](_0x5d0e98(0x128))?_0x5d0e98(0xfb):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x2f3708[_0x5d0e98(0x111)](_0x2bbce7),console['log'](a34_0x413f70[_0x5d0e98(0x109)](_0x5d0e98(0x105)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x2bbce7};}const _0x1e1619=a34_0x23caa8['valid'](VERSION),_0x3d1e29=a34_0x23caa8['valid'](_0x128597[_0x5d0e98(0x11e)]);if(!_0x1e1619||!_0x3d1e29)return _0x2f3708[_0x5d0e98(0x111)]('Version\x20comparison\x20failed'),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x1e1619,_0x128597)){const _0xdeab80=_0x128597[_0x5d0e98(0xf3)]===_0x5d0e98(0x11e)?_0x5d0e98(0xe4)+_0x128597['version']+')':_0x5d0e98(0xf5)+_0x128597['version']+')';return _0x2f3708[_0x5d0e98(0xed)](_0xdeab80),shouldSkipOfficialSkill(_0x1ad02c)?console[_0x5d0e98(0xdf)](a34_0x413f70[_0x5d0e98(0x109)](_0x5d0e98(0xe1))):await installOfficialSkill(_0x1ad02c[_0x5d0e98(0x11c)]),{'ok':!![]};}_0x2f3708[_0x5d0e98(0x120)](getInstallPlanLabel(_0x387d5d,_0x128597));const _0x36f063=detectPackageManager(),_0x58df7a=_0x36f063===_0x5d0e98(0xe8)?resolveNpmBin(_0x5d0e98(0xe8)):_0x36f063,_0x2ecc66=a34_0x23baae(_0x5d0e98(0xf0)+_0x36f063+_0x5d0e98(0x107))[_0x5d0e98(0x10c)]();try{return await execa(_0x58df7a,[_0x5d0e98(0xda),'-g',NPM_PACKAGE_NAME+'@'+_0x128597[_0x5d0e98(0x11e)]],{'stdio':_0x5d0e98(0xe0)}),_0x2ecc66[_0x5d0e98(0xed)](_0x5d0e98(0xdb)+_0x128597[_0x5d0e98(0x11e)]),console['log'](a34_0x413f70[_0x5d0e98(0x109)](_0x5d0e98(0xf6))),shouldSkipOfficialSkill(_0x1ad02c)?console[_0x5d0e98(0xdf)](a34_0x413f70['gray'](_0x5d0e98(0xe1))):await installOfficialSkill(_0x1ad02c[_0x5d0e98(0x11c)]),{'ok':!![]};}catch(_0x5603b0){return _0x2ecc66[_0x5d0e98(0x111)](_0x5d0e98(0xd5)),console[_0x5d0e98(0x123)](a34_0x413f70[_0x5d0e98(0x127)]('\x20\x20'+_0x5603b0[_0x5d0e98(0x10f)])),console[_0x5d0e98(0xdf)](a34_0x413f70[_0x5d0e98(0x109)](_0x5d0e98(0xe2)+_0x36f063+_0x5d0e98(0xf7)+NPM_PACKAGE_NAME+'@'+_0x128597[_0x5d0e98(0x11e)])),{'ok':![],'message':_0x5603b0[_0x5d0e98(0x10f)]};}}export const updateDefinition={'service':a34_0x20a5f5(0xd8),'command':a34_0x20a5f5(0x114),'description':a34_0x20a5f5(0x112),'risk':a34_0x20a5f5(0xe5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a35_0x18fb(){const _0x35663a=['5105LNpjwb','22taQiyh','10bmGUgN','2CAAlrE','82560RIuItE','1869696NmUVyR','1110166yJqKwv','8202267UsJRCA','1618524PUqsUm','212401JgkuAU','5682fvpHnJ','136KpfOBc'];a35_0x18fb=function(){return _0x35663a;};return a35_0x18fb();}(function(_0x1e8756,_0x46eaff){const _0x1125cb=a35_0x5b8b,_0xe8d986=_0x1e8756();while(!![]){try{const _0xfec2ed=-parseInt(_0x1125cb(0x97))/0x1*(parseInt(_0x1125cb(0x94))/0x2)+parseInt(_0x1125cb(0x96))/0x3+-parseInt(_0x1125cb(0x95))/0x4+-parseInt(_0x1125cb(0x91))/0x5*(-parseInt(_0x1125cb(0x9b))/0x6)+-parseInt(_0x1125cb(0x9a))/0x7*(parseInt(_0x1125cb(0x9c))/0x8)+parseInt(_0x1125cb(0x98))/0x9*(parseInt(_0x1125cb(0x93))/0xa)+-parseInt(_0x1125cb(0x92))/0xb*(parseInt(_0x1125cb(0x99))/0xc);if(_0xfec2ed===_0x46eaff)break;else _0xe8d986['push'](_0xe8d986['shift']());}catch(_0x4cc9e6){_0xe8d986['push'](_0xe8d986['shift']());}}}(a35_0x18fb,0x8ed83));function a35_0x5b8b(_0x2567da,_0x172107){_0x2567da=_0x2567da-0x91;const _0x18fb9f=a35_0x18fb();let _0x5b8b9a=_0x18fb9f[_0x2567da];return _0x5b8b9a;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x5f057d,_0x213574){const _0x1a0d95=a35_0x4065,_0xad4b77=_0x5f057d();while(!![]){try{const _0x2b3678=-parseInt(_0x1a0d95(0x8e))/0x1*(parseInt(_0x1a0d95(0x88))/0x2)+-parseInt(_0x1a0d95(0x90))/0x3*(parseInt(_0x1a0d95(0x89))/0x4)+parseInt(_0x1a0d95(0x8a))/0x5+parseInt(_0x1a0d95(0x8d))/0x6+-parseInt(_0x1a0d95(0x8b))/0x7+-parseInt(_0x1a0d95(0x8c))/0x8+parseInt(_0x1a0d95(0x8f))/0x9;if(_0x2b3678===_0x213574)break;else _0xad4b77['push'](_0xad4b77['shift']());}catch(_0x40d700){_0xad4b77['push'](_0xad4b77['shift']());}}}(a35_0x24a2,0x586da));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a35_0x24a2(){const _0x184ad1=['3174297COwxwo','1627488lUbXxm','2119368dWpkFP','1lVjcOf','8489250nkILIk','27258fXEcRK','1308022fmkPJf','40vvbtYK','2337510sTxoME'];a35_0x24a2=function(){return _0x184ad1;};return a35_0x24a2();}function a35_0x4065(_0x10bd51,_0xc19455){_0x10bd51=_0x10bd51-0x88;const _0x24a2f9=a35_0x24a2();let _0x4065ab=_0x24a2f9[_0x10bd51];return _0x4065ab;}export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- function a36_0xf3b7(){const _0xd0220=['341052LdstGd','5pGwPpu','read','1601005NtBaqI','code','operation','name','appCode','54728lPtjFL','27752WfnhQS','233132NyUcZa','str','string','Omit\x20import\x20statements\x20from\x20generated\x20code','skip-imports','tableName','alias','sdk','codegen','boolean','908216gniThh','39477xUxTDk','bool','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'];a36_0xf3b7=function(){return _0xd0220;};return a36_0xf3b7();}function a36_0x3bc2(_0x27872b,_0x24cbea){_0x27872b=_0x27872b-0xa4;const _0xf3b778=a36_0xf3b7();let _0x3bc24e=_0xf3b778[_0x27872b];return _0x3bc24e;}const a36_0xbe8400=a36_0x3bc2;(function(_0x37a758,_0x2fb089){const _0x1dc795=a36_0x3bc2,_0x4d77fc=_0x37a758();while(!![]){try{const _0xcb0692=parseInt(_0x1dc795(0xae))/0x1+-parseInt(_0x1dc795(0xb0))/0x2+parseInt(_0x1dc795(0xbb))/0x3+-parseInt(_0x1dc795(0xaf))/0x4*(-parseInt(_0x1dc795(0xa7))/0x5)+parseInt(_0x1dc795(0xa6))/0x6+parseInt(_0x1dc795(0xa9))/0x7+-parseInt(_0x1dc795(0xba))/0x8;if(_0xcb0692===_0x2fb089)break;else _0x4d77fc['push'](_0x4d77fc['shift']());}catch(_0x5b68b3){_0x4d77fc['push'](_0x4d77fc['shift']());}}}(a36_0xf3b7,0x1fcf1));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0xbe8400(0xb8),'command':a36_0xbe8400(0xb7),'description':a36_0xbe8400(0xa4),'risk':a36_0xbe8400(0xa8),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0xbe8400(0xb6),'type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a36_0xbe8400(0xab),'type':a36_0xbe8400(0xb2),'required':!![],'description':a36_0xbe8400(0xa5)},{'name':a36_0xbe8400(0xb4),'type':a36_0xbe8400(0xb9),'description':a36_0xbe8400(0xb3)}],async 'execute'(_0x5b1c04){const _0x4ad1ac=a36_0xbe8400,{dataset:_0x4b46e5,operation:_0x2a797f}=await getOperationDetail(_0x5b1c04[_0x4ad1ac(0xad)],_0x5b1c04[_0x4ad1ac(0xb1)](_0x4ad1ac(0xaa)),_0x5b1c04[_0x4ad1ac(0xb1)](_0x4ad1ac(0xab))),_0x2996d4=generateSdkCode(_0x4b46e5,_0x2a797f,{'includeImports':!_0x5b1c04[_0x4ad1ac(0xbc)](_0x4ad1ac(0xb4))});return{'ok':!![],'data':{'dataset':{'name':_0x4b46e5[_0x4ad1ac(0xac)],'code':_0x4b46e5[_0x4ad1ac(0xaa)],'tableName':_0x4b46e5[_0x4ad1ac(0xb5)]},'operation':_0x5b1c04['str'](_0x4ad1ac(0xab)),'code':_0x2996d4}};}};
1
+ const a36_0xbbc35d=a36_0x3b98;(function(_0x3ef9ff,_0xc38ea7){const _0x287549=a36_0x3b98,_0x3befe4=_0x3ef9ff();while(!![]){try{const _0x3c1d03=parseInt(_0x287549(0x83))/0x1*(parseInt(_0x287549(0x89))/0x2)+-parseInt(_0x287549(0x81))/0x3*(parseInt(_0x287549(0x78))/0x4)+-parseInt(_0x287549(0x86))/0x5*(parseInt(_0x287549(0x7d))/0x6)+-parseInt(_0x287549(0x8b))/0x7*(-parseInt(_0x287549(0x92))/0x8)+parseInt(_0x287549(0x7f))/0x9*(-parseInt(_0x287549(0x91))/0xa)+parseInt(_0x287549(0x93))/0xb+-parseInt(_0x287549(0x88))/0xc*(-parseInt(_0x287549(0x80))/0xd);if(_0x3c1d03===_0xc38ea7)break;else _0x3befe4['push'](_0x3befe4['shift']());}catch(_0x24475d){_0x3befe4['push'](_0x3befe4['shift']());}}}(a36_0x4cab,0x80848));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a36_0x3b98(_0x1645ad,_0x428aa4){_0x1645ad=_0x1645ad-0x78;const _0x4cab1e=a36_0x4cab();let _0x3b989b=_0x4cab1e[_0x1645ad];return _0x3b989b;}export const codegenSdk={'service':a36_0xbbc35d(0x8f),'command':a36_0xbbc35d(0x84),'description':a36_0xbbc35d(0x7e),'risk':a36_0xbbc35d(0x8c),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0xbbc35d(0x90),'type':a36_0xbbc35d(0x7a),'description':a36_0xbbc35d(0x8e)},{'name':a36_0xbbc35d(0x87),'type':'string','required':!![],'description':a36_0xbbc35d(0x7b)},{'name':a36_0xbbc35d(0x85),'type':a36_0xbbc35d(0x79),'description':a36_0xbbc35d(0x82)}],async 'execute'(_0x36672f){const _0x354a57=a36_0xbbc35d,{dataset:_0x3dfa2d,operation:_0x30cc0e}=await getOperationDetail(_0x36672f['appCode'],_0x36672f[_0x354a57(0x7c)](_0x354a57(0x8a)),_0x36672f[_0x354a57(0x7c)]('operation')),_0xfb7e90=generateSdkCode(_0x3dfa2d,_0x30cc0e,{'includeImports':!_0x36672f[_0x354a57(0x8d)](_0x354a57(0x85))});return{'ok':!![],'data':{'dataset':{'name':_0x3dfa2d[_0x354a57(0x94)],'code':_0x3dfa2d[_0x354a57(0x8a)],'tableName':_0x3dfa2d['tableName']},'operation':_0x36672f['str'](_0x354a57(0x87)),'code':_0xfb7e90}};}};function a36_0x4cab(){const _0x2e5074=['Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','str','5270844tDjKlI','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','360BPJYlA','936tVopwp','16635tdLvwk','Omit\x20import\x20statements\x20from\x20generated\x20code','79979NWSNCX','sdk','skip-imports','5jjRSMX','operation','168252YgNPWg','18omTGhu','code','880439wgJPlx','read','bool','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','codegen','alias','131050ITFYDF','24hjzhZq','8476853oizjNG','name','684rxbzlt','boolean','string'];a36_0x4cab=function(){return _0x2e5074;};return a36_0x4cab();}
@@ -1 +1 @@
1
- const a37_0x27c4a8=a37_0x4427;(function(_0x19dbda,_0x3e5d42){const _0x3ff808=a37_0x4427,_0x16b11e=_0x19dbda();while(!![]){try{const _0x1d52a3=-parseInt(_0x3ff808(0x8d))/0x1*(parseInt(_0x3ff808(0x96))/0x2)+parseInt(_0x3ff808(0x8c))/0x3+-parseInt(_0x3ff808(0x93))/0x4+parseInt(_0x3ff808(0x99))/0x5+-parseInt(_0x3ff808(0x94))/0x6*(parseInt(_0x3ff808(0x98))/0x7)+parseInt(_0x3ff808(0x91))/0x8+parseInt(_0x3ff808(0x9c))/0x9;if(_0x1d52a3===_0x3e5d42)break;else _0x16b11e['push'](_0x16b11e['shift']());}catch(_0x3297be){_0x16b11e['push'](_0x16b11e['shift']());}}}(a37_0x231c,0x76122));function a37_0x231c(){const _0xb97509=['boolean','3160072sfcBPl','target','1294736vaQetr','114mIngTf','string','2DUmRJw','read','327152yzeAhG','441685TxBvJL','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sql','8546058HOudmg','no-imports','bff','Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','1167480YttaDI','126782MFEupF','sqlcode','sqlName'];a37_0x231c=function(){return _0xb97509;};return a37_0x231c();}import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x4427(_0x5a54b5,_0x59f3cf){_0x5a54b5=_0x5a54b5-0x8b;const _0x231cf7=a37_0x231c();let _0x4427f5=_0x231cf7[_0x5a54b5];return _0x4427f5;}export const codegenSql={'service':'codegen','command':a37_0x27c4a8(0x9b),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a37_0x27c4a8(0x97),'flags':[SQLCODE_FLAG,{'name':'target','type':a37_0x27c4a8(0x95),'description':a37_0x27c4a8(0x9a),'default':a37_0x27c4a8(0x8b),'enum':[a37_0x27c4a8(0x8b),a37_0x27c4a8(0x9e)]},{'name':a37_0x27c4a8(0x9d),'type':a37_0x27c4a8(0x90),'description':a37_0x27c4a8(0x9f)}],async 'execute'(_0x5dc0c9){const _0x1ff065=a37_0x27c4a8,_0x2a2b88=await getSqlQueryInfo(_0x5dc0c9['appCode'],_0x5dc0c9['str'](_0x1ff065(0x8e))),_0x7e9257=_0x5dc0c9['str'](_0x1ff065(0x92))||_0x1ff065(0x8b),_0x5cd151=generateSqlCodeTemplate(_0x2a2b88,{'target':_0x7e9257,'includeImports':!_0x5dc0c9['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x2a2b88['sqlCode'],'sqlName':_0x2a2b88[_0x1ff065(0x8f)],'target':_0x7e9257,'code':_0x5cd151}};}};
1
+ const a37_0x12f06c=a37_0x2964;(function(_0x4db155,_0x5094e9){const _0x9dc49a=a37_0x2964,_0x438ca1=_0x4db155();while(!![]){try{const _0x4ba833=parseInt(_0x9dc49a(0xdd))/0x1+parseInt(_0x9dc49a(0xda))/0x2*(-parseInt(_0x9dc49a(0xe2))/0x3)+parseInt(_0x9dc49a(0xd8))/0x4+-parseInt(_0x9dc49a(0xd3))/0x5*(-parseInt(_0x9dc49a(0xe5))/0x6)+-parseInt(_0x9dc49a(0xd6))/0x7+parseInt(_0x9dc49a(0xe1))/0x8+-parseInt(_0x9dc49a(0xd7))/0x9;if(_0x4ba833===_0x5094e9)break;else _0x438ca1['push'](_0x438ca1['shift']());}catch(_0x1b448f){_0x438ca1['push'](_0x438ca1['shift']());}}}(a37_0x2a8c,0xb7ae4));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x2964(_0x2805a7,_0x40fbd1){_0x2805a7=_0x2805a7-0xd3;const _0x2a8cc2=a37_0x2a8c();let _0x29649f=_0x2a8cc2[_0x2805a7];return _0x29649f;}export const codegenSql={'service':'codegen','command':'sql','description':a37_0x12f06c(0xe0),'risk':a37_0x12f06c(0xe4),'flags':[SQLCODE_FLAG,{'name':'target','type':a37_0x12f06c(0xdb),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a37_0x12f06c(0xd5),'enum':[a37_0x12f06c(0xd5),a37_0x12f06c(0xdf)]},{'name':a37_0x12f06c(0xd4),'type':a37_0x12f06c(0xe7),'description':a37_0x12f06c(0xde)}],async 'execute'(_0x2e309b){const _0x4d6e63=a37_0x12f06c,_0x3c8641=await getSqlQueryInfo(_0x2e309b['appCode'],_0x2e309b['str']('sqlcode')),_0x4005ef=_0x2e309b[_0x4d6e63(0xe6)]('target')||'sdk',_0xb9b1b6=generateSqlCodeTemplate(_0x3c8641,{'target':_0x4005ef,'includeImports':!_0x2e309b[_0x4d6e63(0xdc)](_0x4d6e63(0xd4))});return{'ok':!![],'data':{'sqlCode':_0x3c8641[_0x4d6e63(0xe3)],'sqlName':_0x3c8641[_0x4d6e63(0xd9)],'target':_0x4005ef,'code':_0xb9b1b6}};}};function a37_0x2a8c(){const _0x422b49=['string','bool','850375ypuwAL','Omit\x20import\x20statements\x20from\x20generated\x20code','bff','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','7435904EcTGxd','667947upTgMD','sqlCode','read','6qskiBm','str','boolean','3643825VHlTXD','no-imports','sdk','8636208TUMIwq','5743971vIAJtu','3134552VmgEIU','sqlName','6qUJRtX'];a37_0x2a8c=function(){return _0x422b49;};return a37_0x2a8c();}
@@ -1 +1 @@
1
- (function(_0x5e235c,_0x5d9ae3){const _0x22a6ef=a38_0x160f,_0x59b818=_0x5e235c();while(!![]){try{const _0x2aa0c6=-parseInt(_0x22a6ef(0x1a2))/0x1*(parseInt(_0x22a6ef(0x1aa))/0x2)+-parseInt(_0x22a6ef(0x197))/0x3+-parseInt(_0x22a6ef(0x18a))/0x4*(-parseInt(_0x22a6ef(0x1a0))/0x5)+parseInt(_0x22a6ef(0x18d))/0x6*(parseInt(_0x22a6ef(0x1a5))/0x7)+parseInt(_0x22a6ef(0x199))/0x8*(parseInt(_0x22a6ef(0x191))/0x9)+parseInt(_0x22a6ef(0x1ab))/0xa*(-parseInt(_0x22a6ef(0x19b))/0xb)+-parseInt(_0x22a6ef(0x1a1))/0xc*(-parseInt(_0x22a6ef(0x195))/0xd);if(_0x2aa0c6===_0x5d9ae3)break;else _0x59b818['push'](_0x59b818['shift']());}catch(_0x3c2fa3){_0x59b818['push'](_0x59b818['shift']());}}}(a38_0x2321,0x6dfc0));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x1699d6 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a38_0x2321(){const _0x4dc61d=['1041615mrBoiY','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','24lhRgIA','\x0a无法获取远程应用列表,请手动输入。','1177zLLNEP','length','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','custom','includes','10IoevtK','1124268JFJEdl','1xCwCsu','appName','(跳过,稍后配置)','469lCBEaM','message','未找到可用应用。','map','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','928652NOtMOQ','28750LANEzv','trim','请选择要绑定的应用:','appCode','skip','manual','App\x20Code:','Invalid\x20App\x20Code','cyan','406668kETWCh','yellow','无法获取远程应用列表,请手动输入。','5502wngLWU','\x20\x20(','\x0a未找到可用应用。','请输入\x20App\x20Code:','1103967FUvKXI','gray','valid','find','130rkejEt','✎\x20自定义输入\x20appcode'];a38_0x2321=function(){return _0x4dc61d;};return a38_0x2321();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x2d5d44=a38_0x160f,_0x22ef40=await input({'message':_0x2d5d44(0x190),'validate':_0x4f60d8=>{const _0x315e4d=_0x2d5d44,_0x4afe84=validateAppcode(_0x4f60d8[_0x315e4d(0x1ac)]());return _0x4afe84[_0x315e4d(0x193)]||_0x4afe84[_0x315e4d(0x1a6)]||_0x315e4d(0x188);}});return _0x22ef40[_0x2d5d44(0x1ac)]();}export async function promptAppSelection(_0xc3b0a2){const _0x1b2073=a38_0x160f,_0x448b4c=[{'name':a38_0x1699d6[_0x1b2073(0x18b)](_0x1b2073(0x196)),'value':-0x1},..._0xc3b0a2['map']((_0x182112,_0x212c25)=>({'name':_0x182112[_0x1b2073(0x1a3)]+'\x20\x20'+a38_0x1699d6['gray']('('+_0x182112[_0x1b2073(0x184)]+')'),'value':_0x212c25}))],_0x222877=await checkbox({'message':'获取到\x20'+a38_0x1699d6[_0x1b2073(0x189)](_0xc3b0a2[_0x1b2073(0x19c)])+_0x1b2073(0x1a9),'choices':_0x448b4c,'loop':![]});if(_0x222877[_0x1b2073(0x19f)](-0x1))return _0x1b2073(0x19e);if(_0x222877['length']===0x0)return'custom';return _0x222877[_0x1b2073(0x1a8)](_0x340fa8=>_0xc3b0a2[_0x340fa8]);}export async function promptSingleAppSelection(_0x332fd0){const _0x4a7684=a38_0x160f,_0x42b176=[{'name':a38_0x1699d6['gray'](_0x4a7684(0x198)),'value':_0x4a7684(0x185)},{'name':a38_0x1699d6[_0x4a7684(0x18b)](_0x4a7684(0x196)),'value':_0x4a7684(0x19e)},..._0x332fd0[_0x4a7684(0x1a8)](_0x4a4173=>({'name':_0x4a4173[_0x4a7684(0x1a3)]+'\x20\x20'+a38_0x1699d6['gray']('('+_0x4a4173[_0x4a7684(0x184)]+')'),'value':_0x4a4173[_0x4a7684(0x184)]}))],_0x45de62=await select({'message':_0x4a7684(0x1ad),'choices':_0x42b176});if(_0x45de62===_0x4a7684(0x185))return'skip';if(_0x45de62===_0x4a7684(0x19e))return'custom';return _0x332fd0[_0x4a7684(0x194)](_0x395255=>_0x395255[_0x4a7684(0x184)]===_0x45de62);}export async function selectSingleAppcode(_0x16a7eb){const _0x2a472c=a38_0x160f;if(!_0x16a7eb)return writeCliSideChannelLine(a38_0x1699d6['gray'](_0x2a472c(0x19d))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x387a4f;try{_0x387a4f=await withActiveCookie(_0x16a7eb,()=>listRemoteApps());}catch(_0x49164c){writeCliSideChannelLine(a38_0x1699d6['yellow'](_0x2a472c(0x18c)));if(_0x49164c instanceof Error)writeCliSideChannelLine(a38_0x1699d6[_0x2a472c(0x192)](_0x2a472c(0x18e)+_0x49164c[_0x2a472c(0x1a6)]+')'));return _fallbackOrSkip();}if(_0x387a4f[_0x2a472c(0x19c)]===0x0)return writeCliSideChannelLine(a38_0x1699d6[_0x2a472c(0x18b)](_0x2a472c(0x1a7))),_fallbackOrSkip();const _0x4ad61b=await promptSingleAppSelection(_0x387a4f);if(_0x4ad61b===_0x2a472c(0x185))return'';if(_0x4ad61b===_0x2a472c(0x19e))return promptCustomAppcode();return _0x4ad61b[_0x2a472c(0x184)];}export async function selectMultipleApps(_0x5e6e72){const _0x460ad9=a38_0x160f;writeCliSideChannelLine('正在获取可用应用列表...');let _0x40f109;try{_0x40f109=await withActiveCookie(_0x5e6e72,()=>listRemoteApps());}catch(_0x6fb1bb){writeCliSideChannelLine(_0x460ad9(0x19a));if(_0x6fb1bb instanceof Error)writeCliSideChannelLine(_0x460ad9(0x18e)+_0x6fb1bb[_0x460ad9(0x1a6)]+')');return'custom';}if(_0x40f109['length']===0x0)return writeCliSideChannelLine(_0x460ad9(0x18f)),_0x460ad9(0x19e);return promptAppSelection(_0x40f109);}function a38_0x160f(_0x281b1d,_0x3837ef){_0x281b1d=_0x281b1d-0x184;const _0x232164=a38_0x2321();let _0x160fd2=_0x232164[_0x281b1d];return _0x160fd2;}async function _fallbackOrSkip(){const _0x3abc2b=a38_0x160f,_0x16eaed=await select({'message':_0x3abc2b(0x187),'choices':[{'name':a38_0x1699d6[_0x3abc2b(0x192)](_0x3abc2b(0x1a4)),'value':_0x3abc2b(0x185)},{'name':a38_0x1699d6[_0x3abc2b(0x18b)]('✎\x20手动输入'),'value':_0x3abc2b(0x186)}]});if(_0x16eaed===_0x3abc2b(0x185))return'';return promptCustomAppcode();}
1
+ (function(_0x4a6917,_0x11dcf9){const _0x194e84=a38_0x3c1d,_0x12bddb=_0x4a6917();while(!![]){try{const _0x2940e7=-parseInt(_0x194e84(0x146))/0x1+-parseInt(_0x194e84(0x147))/0x2*(parseInt(_0x194e84(0x13f))/0x3)+parseInt(_0x194e84(0x14d))/0x4*(-parseInt(_0x194e84(0x136))/0x5)+parseInt(_0x194e84(0x139))/0x6*(-parseInt(_0x194e84(0x14e))/0x7)+parseInt(_0x194e84(0x131))/0x8+parseInt(_0x194e84(0x14a))/0x9*(-parseInt(_0x194e84(0x140))/0xa)+parseInt(_0x194e84(0x133))/0xb*(parseInt(_0x194e84(0x153))/0xc);if(_0x2940e7===_0x11dcf9)break;else _0x12bddb['push'](_0x12bddb['shift']());}catch(_0x33b3b7){_0x12bddb['push'](_0x12bddb['shift']());}}}(a38_0x2dea,0x4a3c3));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x31fb4f 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 _0x342ebf=a38_0x3c1d,_0x2c36ac=await input({'message':'请输入\x20App\x20Code:','validate':_0x490e46=>{const _0x261ab5=a38_0x3c1d,_0x120d8b=validateAppcode(_0x490e46[_0x261ab5(0x142)]());return _0x120d8b[_0x261ab5(0x14b)]||_0x120d8b[_0x261ab5(0x132)]||_0x261ab5(0x137);}});return _0x2c36ac[_0x342ebf(0x142)]();}export async function promptAppSelection(_0x24e00c){const _0xb1f949=a38_0x3c1d,_0x30e49d=[{'name':a38_0x31fb4f[_0xb1f949(0x141)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x24e00c[_0xb1f949(0x12f)]((_0x1f13bd,_0x59dc1b)=>({'name':_0x1f13bd[_0xb1f949(0x150)]+'\x20\x20'+a38_0x31fb4f[_0xb1f949(0x14c)]('('+_0x1f13bd['appCode']+')'),'value':_0x59dc1b}))],_0xe37c0a=await checkbox({'message':_0xb1f949(0x143)+a38_0x31fb4f['cyan'](_0x24e00c[_0xb1f949(0x14f)])+_0xb1f949(0x138),'choices':_0x30e49d,'loop':![]});if(_0xe37c0a[_0xb1f949(0x152)](-0x1))return'custom';if(_0xe37c0a[_0xb1f949(0x14f)]===0x0)return _0xb1f949(0x155);return _0xe37c0a['map'](_0xa31287=>_0x24e00c[_0xa31287]);}export async function promptSingleAppSelection(_0x26e787){const _0x16cbc6=a38_0x3c1d,_0x1b0746=[{'name':a38_0x31fb4f[_0x16cbc6(0x14c)](_0x16cbc6(0x145)),'value':_0x16cbc6(0x149)},{'name':a38_0x31fb4f['yellow'](_0x16cbc6(0x13c)),'value':'custom'},..._0x26e787['map'](_0x57a846=>({'name':_0x57a846[_0x16cbc6(0x150)]+'\x20\x20'+a38_0x31fb4f['gray']('('+_0x57a846['appCode']+')'),'value':_0x57a846[_0x16cbc6(0x148)]}))],_0x575f2f=await select({'message':_0x16cbc6(0x13e),'choices':_0x1b0746});if(_0x575f2f==='skip')return'skip';if(_0x575f2f==='custom')return'custom';return _0x26e787[_0x16cbc6(0x135)](_0x274358=>_0x274358[_0x16cbc6(0x148)]===_0x575f2f);}export async function selectSingleAppcode(_0x281051){const _0x20bfab=a38_0x3c1d;if(!_0x281051)return writeCliSideChannelLine(a38_0x31fb4f[_0x20bfab(0x14c)](_0x20bfab(0x13b))),_fallbackOrSkip();writeCliSideChannelLine(_0x20bfab(0x151));let _0x806e93;try{_0x806e93=await withActiveCookie(_0x281051,()=>listRemoteApps());}catch(_0x33bf6a){writeCliSideChannelLine(a38_0x31fb4f[_0x20bfab(0x141)](_0x20bfab(0x13a)));if(_0x33bf6a instanceof Error)writeCliSideChannelLine(a38_0x31fb4f[_0x20bfab(0x14c)](_0x20bfab(0x144)+_0x33bf6a[_0x20bfab(0x132)]+')'));return _fallbackOrSkip();}if(_0x806e93[_0x20bfab(0x14f)]===0x0)return writeCliSideChannelLine(a38_0x31fb4f[_0x20bfab(0x141)]('未找到可用应用。')),_fallbackOrSkip();const _0x387fd0=await promptSingleAppSelection(_0x806e93);if(_0x387fd0===_0x20bfab(0x149))return'';if(_0x387fd0==='custom')return promptCustomAppcode();return _0x387fd0[_0x20bfab(0x148)];}export async function selectMultipleApps(_0x28058b){const _0x536a93=a38_0x3c1d;writeCliSideChannelLine(_0x536a93(0x151));let _0x42217b;try{_0x42217b=await withActiveCookie(_0x28058b,()=>listRemoteApps());}catch(_0x31d67d){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x31d67d instanceof Error)writeCliSideChannelLine(_0x536a93(0x144)+_0x31d67d[_0x536a93(0x132)]+')');return _0x536a93(0x155);}if(_0x42217b[_0x536a93(0x14f)]===0x0)return writeCliSideChannelLine('\x0a未找到可用应用。'),_0x536a93(0x155);return promptAppSelection(_0x42217b);}async function _fallbackOrSkip(){const _0x38667c=a38_0x3c1d,_0x455fb1=await select({'message':_0x38667c(0x130),'choices':[{'name':a38_0x31fb4f[_0x38667c(0x14c)](_0x38667c(0x154)),'value':_0x38667c(0x149)},{'name':a38_0x31fb4f[_0x38667c(0x141)](_0x38667c(0x134)),'value':_0x38667c(0x13d)}]});if(_0x455fb1===_0x38667c(0x149))return'';return promptCustomAppcode();}function a38_0x3c1d(_0x278f37,_0xb7acc8){_0x278f37=_0x278f37-0x12f;const _0x2dea5f=a38_0x2dea();let _0x3c1df9=_0x2dea5f[_0x278f37];return _0x3c1df9;}function a38_0x2dea(){const _0x2a59f1=['gray','1452HsILlJ','1253naFJHO','length','appName','正在获取可用应用列表...','includes','41892ZLCOGm','(跳过,稍后配置)','custom','map','App\x20Code:','1896240HkgEkD','message','7414cvypMi','✎\x20手动输入','find','4945LWzkrh','Invalid\x20App\x20Code','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','14394ANIzgV','无法获取远程应用列表,请手动输入。','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','✎\x20自定义输入\x20appcode','manual','请选择要绑定的应用:','9ACTXpy','10mtujZG','yellow','trim','获取到\x20','\x20\x20(','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','567135biPpfk','332366EFKLjM','appCode','skip','3886065LbixCy','valid'];a38_0x2dea=function(){return _0x2a59f1;};return a38_0x2dea();}
@@ -1 +1 @@
1
- function a39_0x3c01(){const _0x50cc0c=['40sEWkCj','datasetcode','2027peWlAR','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','MYSQL','1823335wwCZos','20972qUzfhq','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','9865323ZwzPQw','Dataset\x20code\x20(32-char\x20hex\x20UUID)','appcode','518VTdJXj','4896iwZMFW','5312538DsiYNF','411GCHuEB','number','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Database\x20product\x20type','10612TttvlT','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','3348276pAqXFS','string','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','dbtype'];a39_0x3c01=function(){return _0x50cc0c;};return a39_0x3c01();}const a39_0x56306=a39_0x1936;(function(_0x22aeb9,_0x39118e){const _0xaaf5a7=a39_0x1936,_0x3eac57=_0x22aeb9();while(!![]){try{const _0x5a4665=-parseInt(_0xaaf5a7(0x14c))/0x1*(parseInt(_0xaaf5a7(0x155))/0x2)+-parseInt(_0xaaf5a7(0x158))/0x3*(parseInt(_0xaaf5a7(0x150))/0x4)+parseInt(_0xaaf5a7(0x14f))/0x5+-parseInt(_0xaaf5a7(0x146))/0x6+parseInt(_0xaaf5a7(0x15c))/0x7*(-parseInt(_0xaaf5a7(0x156))/0x8)+parseInt(_0xaaf5a7(0x152))/0x9+parseInt(_0xaaf5a7(0x14a))/0xa*(parseInt(_0xaaf5a7(0x157))/0xb);if(_0x5a4665===_0x39118e)break;else _0x3eac57['push'](_0x3eac57['shift']());}catch(_0x22bba0){_0x3eac57['push'](_0x3eac57['shift']());}}}(a39_0x3c01,0xa1fe4));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x56306(0x148)};export const CODE_FLAG={'name':'code','type':a39_0x56306(0x147),'required':!![],'description':a39_0x56306(0x153),'pattern':DATASET_CODE_PATTERN};function a39_0x1936(_0x328cb1,_0x3fdb91){_0x328cb1=_0x328cb1-0x145;const _0x3c01bb=a39_0x3c01();let _0x1936ad=_0x3c01bb[_0x328cb1];return _0x1936ad;}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x56306(0x14b),'description':a39_0x56306(0x153)};export const SQLCODE_FLAG={'name':'sqlcode','type':a39_0x56306(0x147),'required':!![],'description':a39_0x56306(0x15a),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x56306(0x151)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x56306(0x154),'type':a39_0x56306(0x147),'required':![],'description':a39_0x56306(0x145)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a39_0x56306(0x159),'required':!![],'description':a39_0x56306(0x14d)};export const DB_TYPE_FLAG={'name':a39_0x56306(0x149),'type':a39_0x56306(0x147),'required':!![],'description':a39_0x56306(0x15b),'enum':[a39_0x56306(0x14e),'POSTGRESQL']};
1
+ const a39_0x681bf=a39_0x2197;(function(_0x262b87,_0xc15b30){const _0x29a57c=a39_0x2197,_0x430e5f=_0x262b87();while(!![]){try{const _0x462057=-parseInt(_0x29a57c(0xeb))/0x1+-parseInt(_0x29a57c(0xec))/0x2+-parseInt(_0x29a57c(0xea))/0x3+-parseInt(_0x29a57c(0xe8))/0x4+-parseInt(_0x29a57c(0xe6))/0x5*(-parseInt(_0x29a57c(0xe3))/0x6)+parseInt(_0x29a57c(0xe0))/0x7*(-parseInt(_0x29a57c(0xdd))/0x8)+parseInt(_0x29a57c(0xe9))/0x9;if(_0x462057===_0xc15b30)break;else _0x430e5f['push'](_0x430e5f['shift']());}catch(_0x5a8373){_0x430e5f['push'](_0x430e5f['shift']());}}}(a39_0x477f,0x2f449));function a39_0x2197(_0x17e4bd,_0x49b23e){_0x17e4bd=_0x17e4bd-0xdb;const _0x477ffd=a39_0x477f();let _0x219746=_0x477ffd[_0x17e4bd];return _0x219746;}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':a39_0x681bf(0xe7),'type':'string','required':!![],'description':a39_0x681bf(0xef),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a39_0x681bf(0xef)};export const SQLCODE_FLAG={'name':a39_0x681bf(0xdb),'type':'string','required':!![],'description':a39_0x681bf(0xe5),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x681bf(0xdf)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x681bf(0xe1),'type':a39_0x681bf(0xe4),'required':![],'description':a39_0x681bf(0xe2)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a39_0x477f(){const _0xa882ac=['SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','15491ijSYWf','appcode','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','161604DOXmGu','string','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','25iGagxv','code','598104WVWRsl','11762469FwNrlp','780564gREewc','258439lAaOMo','571040gsSQjN','number','dbtype','Dataset\x20code\x20(32-char\x20hex\x20UUID)','sqlcode','POSTGRESQL','1064abfeuW','MYSQL'];a39_0x477f=function(){return _0xa882ac;};return a39_0x477f();}export const DBLINK_ID_FLAG={'name':'id','type':a39_0x681bf(0xed),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a39_0x681bf(0xee),'type':a39_0x681bf(0xe4),'required':!![],'description':'Database\x20product\x20type','enum':[a39_0x681bf(0xde),a39_0x681bf(0xdc)]};
@@ -1 +1 @@
1
- (function(_0x2302c1,_0x243b6f){const _0x4e0f6a=a40_0x3e88,_0x2328a0=_0x2302c1();while(!![]){try{const _0x1d3e5d=parseInt(_0x4e0f6a(0x107))/0x1*(parseInt(_0x4e0f6a(0x102))/0x2)+parseInt(_0x4e0f6a(0x10d))/0x3+parseInt(_0x4e0f6a(0x10b))/0x4*(parseInt(_0x4e0f6a(0x108))/0x5)+-parseInt(_0x4e0f6a(0x10e))/0x6*(parseInt(_0x4e0f6a(0x10f))/0x7)+parseInt(_0x4e0f6a(0x10c))/0x8*(-parseInt(_0x4e0f6a(0x10a))/0x9)+-parseInt(_0x4e0f6a(0x101))/0xa*(-parseInt(_0x4e0f6a(0x100))/0xb)+-parseInt(_0x4e0f6a(0x109))/0xc*(parseInt(_0x4e0f6a(0x106))/0xd);if(_0x1d3e5d===_0x243b6f)break;else _0x2328a0['push'](_0x2328a0['shift']());}catch(_0x324424){_0x2328a0['push'](_0x2328a0['shift']());}}}(a40_0x4c31,0x938f3));export function validateAppcode(_0x5d0638){const _0x57d8e1=a40_0x3e88,_0x10a036=_0x5d0638[_0x57d8e1(0x104)]();if(!_0x10a036)return{'valid':![],'message':_0x57d8e1(0x110)};if(_0x10a036['length']>0x64)return{'valid':![],'message':_0x57d8e1(0x105)};if(!/^[A-Za-z0-9_-]+$/[_0x57d8e1(0x103)](_0x10a036))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a40_0x3e88(_0x52983a,_0x5126a8){_0x52983a=_0x52983a-0x100;const _0x4c31b8=a40_0x4c31();let _0x3e88ff=_0x4c31b8[_0x52983a];return _0x3e88ff;}function a40_0x4c31(){const _0x521e93=['3535iZkNSd','26617812LczFBI','28629JqywQd','3224sTrioM','80jhslFs','2935215pYMLEG','2946AEmDrZ','13573puHQRl','App\x20Code\x20cannot\x20be\x20empty','353133urEKrS','360WftZdP','157494uDzqQF','test','trim','App\x20Code\x20cannot\x20exceed\x20100\x20characters','13cXmtBe','14upZnNH'];a40_0x4c31=function(){return _0x521e93;};return a40_0x4c31();}
1
+ function a40_0x4951(_0x2358fe,_0x1ea926){_0x2358fe=_0x2358fe-0x196;const _0x325a28=a40_0x325a();let _0x495178=_0x325a28[_0x2358fe];return _0x495178;}function a40_0x325a(){const _0x1edf71=['test','98tnocnj','60468nSXRnK','4866327LnTido','1100722uUrrih','65pNAatZ','App\x20Code\x20cannot\x20be\x20empty','95600UwZKsO','4896460BChFQx','trim','317346ecOBgn','10EqUtJn','1003774RvhIow'];a40_0x325a=function(){return _0x1edf71;};return a40_0x325a();}(function(_0x3e7411,_0x55d5dd){const _0x2bd5e4=a40_0x4951,_0x502f83=_0x3e7411();while(!![]){try{const _0x3f50db=parseInt(_0x2bd5e4(0x199))/0x1+-parseInt(_0x2bd5e4(0x19e))/0x2+-parseInt(_0x2bd5e4(0x197))/0x3+parseInt(_0x2bd5e4(0x1a2))/0x4+-parseInt(_0x2bd5e4(0x19f))/0x5*(parseInt(_0x2bd5e4(0x19c))/0x6)+-parseInt(_0x2bd5e4(0x19b))/0x7*(parseInt(_0x2bd5e4(0x1a1))/0x8)+-parseInt(_0x2bd5e4(0x19d))/0x9*(parseInt(_0x2bd5e4(0x198))/0xa);if(_0x3f50db===_0x55d5dd)break;else _0x502f83['push'](_0x502f83['shift']());}catch(_0x1fde23){_0x502f83['push'](_0x502f83['shift']());}}}(a40_0x325a,0xb2e39));export function validateAppcode(_0x344353){const _0xfdf663=a40_0x4951,_0x383955=_0x344353[_0xfdf663(0x196)]();if(!_0x383955)return{'valid':![],'message':_0xfdf663(0x1a0)};if(_0x383955['length']>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0xfdf663(0x19a)](_0x383955))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a41_0x54ff46=a41_0x2d5d;(function(_0x20a47b,_0x2052d3){const _0x4178c9=a41_0x2d5d,_0x257a5b=_0x20a47b();while(!![]){try{const _0x5c2abf=parseInt(_0x4178c9(0x83))/0x1*(-parseInt(_0x4178c9(0x85))/0x2)+parseInt(_0x4178c9(0x79))/0x3+-parseInt(_0x4178c9(0x89))/0x4*(parseInt(_0x4178c9(0x7b))/0x5)+parseInt(_0x4178c9(0x7d))/0x6+-parseInt(_0x4178c9(0x7f))/0x7+-parseInt(_0x4178c9(0x7e))/0x8*(parseInt(_0x4178c9(0x81))/0x9)+parseInt(_0x4178c9(0x78))/0xa;if(_0x5c2abf===_0x2052d3)break;else _0x257a5b['push'](_0x257a5b['shift']());}catch(_0x557a70){_0x257a5b['push'](_0x257a5b['shift']());}}}(a41_0x1c64,0x439d3));function a41_0x1c64(){const _0x1b0ed9=['3455BtiLPB','\x20config\x20get\x20--key\x20<key>','1352484UynXze','279880KuygdL','3673054tURHoz','app','63PktNjq','validation','170231GzmeDq','Missing\x20key.','2kdFfka','Usage:\x20','object','read','1852DZdaFn','str','11075290PQmdMr','611355deoYIN','key'];a41_0x1c64=function(){return _0x1b0ed9;};return a41_0x1c64();}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a41_0x2d5d(_0x155633,_0x1eea5e){_0x155633=_0x155633-0x78;const _0x1c6471=a41_0x1c64();let _0x2d5d22=_0x1c6471[_0x155633];return _0x2d5d22;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x3fd185){const _0x300d5f=a41_0x2d5d,_0x2b3ce2=_0x3fd185[_0x300d5f(0x8a)]('key');if(!_0x2b3ce2)throw CliErrors[_0x300d5f(0x82)](_0x300d5f(0x84),_0x300d5f(0x86)+CLI_BIN_NAME+_0x300d5f(0x7c));const _0x56c2de=readConfig(),_0x446ef5=_0x2b3ce2===_0x300d5f(0x80)?'appcode':_0x2b3ce2,_0xee0a5a=_0x56c2de[_0x446ef5];if(_0xee0a5a===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x2b3ce2);return{'ok':!![],'data':typeof _0xee0a5a===_0x300d5f(0x87)?_0xee0a5a:{[_0x446ef5]:_0xee0a5a},'message':typeof _0xee0a5a===_0x300d5f(0x87)?undefined:String(_0xee0a5a)};}export const configGetDefinition={'service':'config','command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a41_0x54ff46(0x88),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x54ff46(0x7a),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a41_0x3bf009=a41_0x7d06;(function(_0xf1b7cb,_0x5be14a){const _0x1c3262=a41_0x7d06,_0xac68aa=_0xf1b7cb();while(!![]){try{const _0x1c91b5=parseInt(_0x1c3262(0x117))/0x1+-parseInt(_0x1c3262(0x120))/0x2+-parseInt(_0x1c3262(0x11c))/0x3+-parseInt(_0x1c3262(0x10e))/0x4+-parseInt(_0x1c3262(0x118))/0x5+-parseInt(_0x1c3262(0x114))/0x6+-parseInt(_0x1c3262(0x10f))/0x7*(-parseInt(_0x1c3262(0x113))/0x8);if(_0x1c91b5===_0x5be14a)break;else _0xac68aa['push'](_0xac68aa['shift']());}catch(_0x3e8934){_0xac68aa['push'](_0xac68aa['shift']());}}}(a41_0xcbf6,0xa16e5));import{CliErrors}from'../../errors.js';function a41_0xcbf6(){const _0xbe12dc=['config','key','24FGcJiQ','3047826OlTudy','Key\x20not\x20found:\x20','get','756952naMqjN','6036775PitfIl','app','Get\x20a\x20config\x20value\x20by\x20key','object','3921825fObpXV','validation','Missing\x20key.','\x20config\x20get\x20--key\x20<key>','1546342OGvVfV','appcode','string','2698572QwQErk','10207596qfDJyK','read'];a41_0xcbf6=function(){return _0xbe12dc;};return a41_0xcbf6();}import{readConfig}from'../../utils/config.js';function a41_0x7d06(_0x1307b5,_0x296281){_0x1307b5=_0x1307b5-0x10d;const _0xcbf635=a41_0xcbf6();let _0x7d06a0=_0xcbf635[_0x1307b5];return _0x7d06a0;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x57de17){const _0x4db856=a41_0x7d06,_0x4563b3=_0x57de17['str'](_0x4db856(0x112));if(!_0x4563b3)throw CliErrors['validation'](_0x4db856(0x11e),'Usage:\x20'+CLI_BIN_NAME+_0x4db856(0x11f));const _0x3a52f3=readConfig(),_0x30ccb6=_0x4563b3===_0x4db856(0x119)?_0x4db856(0x121):_0x4563b3,_0x8c47bf=_0x3a52f3[_0x30ccb6];if(_0x8c47bf===undefined)throw CliErrors[_0x4db856(0x11d)](_0x4db856(0x115)+_0x4563b3);return{'ok':!![],'data':typeof _0x8c47bf===_0x4db856(0x11b)?_0x8c47bf:{[_0x30ccb6]:_0x8c47bf},'message':typeof _0x8c47bf==='object'?undefined:String(_0x8c47bf)};}export const configGetDefinition={'service':a41_0x3bf009(0x111),'command':a41_0x3bf009(0x116),'description':a41_0x3bf009(0x11a),'risk':a41_0x3bf009(0x110),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x3bf009(0x112),'type':a41_0x3bf009(0x10d),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- function a42_0x1e02(_0x8c833,_0x3b8ae0){_0x8c833=_0x8c833-0xe5;const _0x4f5d8=a42_0x4f5d();let _0x1e020f=_0x4f5d8[_0x8c833];return _0x1e020f;}(function(_0x361824,_0xb82571){const _0x3d6813=a42_0x1e02,_0x3ac203=_0x361824();while(!![]){try{const _0x1759df=-parseInt(_0x3d6813(0xe6))/0x1*(-parseInt(_0x3d6813(0xe8))/0x2)+-parseInt(_0x3d6813(0xe5))/0x3+parseInt(_0x3d6813(0xe7))/0x4+parseInt(_0x3d6813(0xea))/0x5*(parseInt(_0x3d6813(0xed))/0x6)+-parseInt(_0x3d6813(0xeb))/0x7+parseInt(_0x3d6813(0xec))/0x8+-parseInt(_0x3d6813(0xee))/0x9*(-parseInt(_0x3d6813(0xe9))/0xa);if(_0x1759df===_0xb82571)break;else _0x3ac203['push'](_0x3ac203['shift']());}catch(_0x382d2d){_0x3ac203['push'](_0x3ac203['shift']());}}}(a42_0x4f5d,0x88608));import{configListDefinition}from'../../commands/config/list.js';function a42_0x4f5d(){const _0x5cced6=['11597CotpRT','914116zOARso','74SnbhUT','20pUNMrP','110FGkHqL','4197067JZqNnO','7147160RljGlH','2214DFdpcw','1298853yvwjQY','2068752HZABKV'];a42_0x4f5d=function(){return _0x5cced6;};return a42_0x4f5d();}import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ (function(_0x14217d,_0x4568be){const _0x58381d=a42_0x24f2,_0x310874=_0x14217d();while(!![]){try{const _0x321ca8=-parseInt(_0x58381d(0x1e0))/0x1*(parseInt(_0x58381d(0x1db))/0x2)+-parseInt(_0x58381d(0x1e1))/0x3*(-parseInt(_0x58381d(0x1d7))/0x4)+-parseInt(_0x58381d(0x1dc))/0x5+parseInt(_0x58381d(0x1d8))/0x6*(-parseInt(_0x58381d(0x1d9))/0x7)+-parseInt(_0x58381d(0x1e2))/0x8*(-parseInt(_0x58381d(0x1de))/0x9)+-parseInt(_0x58381d(0x1da))/0xa*(-parseInt(_0x58381d(0x1df))/0xb)+parseInt(_0x58381d(0x1d6))/0xc*(parseInt(_0x58381d(0x1dd))/0xd);if(_0x321ca8===_0x4568be)break;else _0x310874['push'](_0x310874['shift']());}catch(_0x1e3724){_0x310874['push'](_0x310874['shift']());}}}(a42_0x54ff,0xa5267));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a42_0x24f2(_0x48bc60,_0x392e1f){_0x48bc60=_0x48bc60-0x1d6;const _0x54ff3d=a42_0x54ff();let _0x24f277=_0x54ff3d[_0x48bc60];return _0x24f277;}function a42_0x54ff(){const _0x4bf393=['31269Bfdhqi','7395230tmfXar','22JYobwR','6166775VjOunO','689Qqmuut','251946WHiDVh','11TeONkE','95047pDvRra','268419sWMQcO','40WWOBtZ','748104jxnZsB','4oGGYgN','1770QzYVsI'];a42_0x54ff=function(){return _0x4bf393;};return a42_0x54ff();}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- function a43_0x3c15(){const _0x353937=['36140YUmmNZ','8726JrdVef','bool','4626770yerLWO','6OniANB','1647168omxcUK','6620DQHihf','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','1115639gexLoc','854469MOBMxX','287QLbxSK','global','24629gzJoiN','config','102BreGYb'];a43_0x3c15=function(){return _0x353937;};return a43_0x3c15();}const a43_0x21d92b=a43_0x5ec9;function a43_0x5ec9(_0x5876b5,_0xf245eb){_0x5876b5=_0x5876b5-0x17f;const _0x3c1556=a43_0x3c15();let _0x5ec90f=_0x3c1556[_0x5876b5];return _0x5ec90f;}(function(_0x2bd08a,_0xa3ab6a){const _0x495fb5=a43_0x5ec9,_0x143c43=_0x2bd08a();while(!![]){try{const _0x52ccdc=parseInt(_0x495fb5(0x184))/0x1*(-parseInt(_0x495fb5(0x18a))/0x2)+parseInt(_0x495fb5(0x188))/0x3*(-parseInt(_0x495fb5(0x189))/0x4)+parseInt(_0x495fb5(0x18c))/0x5+-parseInt(_0x495fb5(0x18d))/0x6*(parseInt(_0x495fb5(0x182))/0x7)+parseInt(_0x495fb5(0x17f))/0x8+-parseInt(_0x495fb5(0x183))/0x9+parseInt(_0x495fb5(0x180))/0xa*(parseInt(_0x495fb5(0x186))/0xb);if(_0x52ccdc===_0xa3ab6a)break;else _0x143c43['push'](_0x143c43['shift']());}catch(_0x24c386){_0x143c43['push'](_0x143c43['shift']());}}}(a43_0x3c15,0xc3423));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x305519){const _0x4d4e41=a43_0x5ec9,_0x5327a6=_0x305519[_0x4d4e41(0x18b)](_0x4d4e41(0x185))?readScopedConfig(_0x4d4e41(0x185)):readConfig();return{'ok':!![],'data':_0x5327a6};}export const configListDefinition={'service':a43_0x21d92b(0x187),'command':'list','description':'List\x20all\x20config\x20values','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':'boolean','description':a43_0x21d92b(0x181),'default':![]}],'execute':execute};
1
+ const a43_0x373081=a43_0x53b7;(function(_0x4fdcfc,_0x203b70){const _0x25606b=a43_0x53b7,_0x461860=_0x4fdcfc();while(!![]){try{const _0x63ed64=-parseInt(_0x25606b(0x129))/0x1+parseInt(_0x25606b(0x128))/0x2*(-parseInt(_0x25606b(0x124))/0x3)+parseInt(_0x25606b(0x12d))/0x4*(-parseInt(_0x25606b(0x126))/0x5)+-parseInt(_0x25606b(0x125))/0x6*(parseInt(_0x25606b(0x122))/0x7)+-parseInt(_0x25606b(0x12b))/0x8+-parseInt(_0x25606b(0x123))/0x9+parseInt(_0x25606b(0x131))/0xa*(parseInt(_0x25606b(0x12e))/0xb);if(_0x63ed64===_0x203b70)break;else _0x461860['push'](_0x461860['shift']());}catch(_0x4b2abb){_0x461860['push'](_0x461860['shift']());}}}(a43_0x1139,0xed4df));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a43_0x1139(){const _0x1a33a7=['1572946Orpfkp','587846OmYADi','global','6940240GUapAH','read','4ttpkFm','33EnsrLb','list','config','18371330vfhMGZ','List\x20all\x20config\x20values','70cEcpGY','11328318wclnXx','3qyUoNr','317466lTmGin','2548695CvMTuf','boolean'];a43_0x1139=function(){return _0x1a33a7;};return a43_0x1139();}function a43_0x53b7(_0x19bab1,_0x5828eb){_0x19bab1=_0x19bab1-0x122;const _0x1139b8=a43_0x1139();let _0x53b7a4=_0x1139b8[_0x19bab1];return _0x53b7a4;}async function execute(_0x13ce7f){const _0x36ed05=a43_0x53b7,_0x6111da=_0x13ce7f['bool'](_0x36ed05(0x12a))?readScopedConfig('global'):readConfig();return{'ok':!![],'data':_0x6111da};}export const configListDefinition={'service':a43_0x373081(0x130),'command':a43_0x373081(0x12f),'description':a43_0x373081(0x132),'risk':a43_0x373081(0x12c),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x373081(0x12a),'type':a43_0x373081(0x127),'description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};
@@ -1 +1 @@
1
- const a44_0x5106a9=a44_0x5330;function a44_0x3b94(){const _0x1d82ab=['keys','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','value','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Config\x20value','14658rsEHGp','str','174684CbFeML','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Use\x20`','Settable\x20top-level\x20keys:\x20','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','global','Set\x20a\x20config\x20value','riskLevel','800548eWuFqm','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x20appcode\x20set\x20to:\x20','includes','app','locale','apps','925SrXUEB','config','64diRQsR','326557IjMiIl','\x20app\x20add\x20<name>\x20--appcode\x20','write','join','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Invalid\x20value\x20for\x20\x22','\x22.\x20Allowed:\x20','1691001OQqlRD','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','env','string','27fdMcxc','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','`,\x20`','boolean','object','validation','Project','Usage:\x20','Global','522785Plmzbm','22661650JAoEoz','\x20set\x20to:\x20','\x22\x20is\x20not\x20settable.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Missing\x20key.','Missing\x20value.'];a44_0x3b94=function(){return _0x1d82ab;};return a44_0x3b94();}(function(_0x30204c,_0xe88e9f){const _0x150dbf=a44_0x5330,_0x2d3246=_0x30204c();while(!![]){try{const _0x4aa141=-parseInt(_0x150dbf(0x176))/0x1+-parseInt(_0x150dbf(0x18c))/0x2+parseInt(_0x150dbf(0x1a1))/0x3*(-parseInt(_0x150dbf(0x184))/0x4)+-parseInt(_0x150dbf(0x193))/0x5*(parseInt(_0x150dbf(0x182))/0x6)+parseInt(_0x150dbf(0x196))/0x7*(-parseInt(_0x150dbf(0x195))/0x8)+parseInt(_0x150dbf(0x19d))/0x9+parseInt(_0x150dbf(0x177))/0xa;if(_0x4aa141===_0xe88e9f)break;else _0x2d3246['push'](_0x2d3246['shift']());}catch(_0x19a4c1){_0x2d3246['push'](_0x2d3246['shift']());}}}(a44_0x3b94,0x4c5d9));function a44_0x5330(_0x20eb01,_0x3dd0e0){_0x20eb01=_0x20eb01-0x176;const _0x3b947e=a44_0x3b94();let _0x533080=_0x3b947e[_0x20eb01];return _0x533080;}import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x545612){const _0x2e1673=a44_0x5330,_0x334362=_0x545612[_0x2e1673(0x183)]('key'),_0x4f7760=_0x545612[_0x2e1673(0x183)](_0x2e1673(0x17f));if(!_0x334362)throw CliErrors[_0x2e1673(0x1a6)](_0x2e1673(0x17b),_0x2e1673(0x1a8)+CLI_BIN_NAME+_0x2e1673(0x18d));if(_0x4f7760===undefined||_0x4f7760==='')throw CliErrors[_0x2e1673(0x1a6)](_0x2e1673(0x17c),_0x2e1673(0x1a8)+CLI_BIN_NAME+_0x2e1673(0x18d));if(_0x4f7760['length']>0x1f4)throw CliErrors[_0x2e1673(0x1a6)](_0x2e1673(0x17a));if(!isTopLevelConfigKey(_0x334362))throw CliErrors[_0x2e1673(0x1a6)]('Top-level\x20key\x20\x22'+_0x334362+_0x2e1673(0x179),_0x2e1673(0x187)+getTopLevelConfigKeySummary());if(_0x334362===_0x2e1673(0x18b))throw CliErrors['validation'](_0x2e1673(0x180));if(CONFIG_ENUM_VALUES[_0x334362]&&!CONFIG_ENUM_VALUES[_0x334362][_0x2e1673(0x18f)](_0x4f7760))throw CliErrors['validation'](_0x2e1673(0x19b)+_0x334362+_0x2e1673(0x19c)+CONFIG_ENUM_VALUES[_0x334362][_0x2e1673(0x199)](',\x20'));if(_0x334362===_0x2e1673(0x191)&&!normalizeLocale(_0x4f7760))throw CliErrors[_0x2e1673(0x1a6)]('Invalid\x20locale\x20value.',_0x2e1673(0x188));const _0x3d8826={'global':_0x545612['bool'](_0x2e1673(0x189))},_0x1bfe3b=resolveWriteScope(_0x3d8826),_0xdb2f21=readScopedConfig(_0x1bfe3b);let _0x5d7614=_0x334362,_0x4f6ad0=_0x4f7760;_0x334362===_0x2e1673(0x190)&&(_0x5d7614='appcode',delete _0xdb2f21[_0x2e1673(0x190)]);_0x334362===_0x2e1673(0x191)&&(_0x4f6ad0=normalizeLocale(_0x4f7760));if(_0x334362===_0x2e1673(0x19f)){_0x4f6ad0=normalizeEnv(_0x4f7760);if(!isProduction(_0x4f6ad0)&&!isDaily(_0x4f6ad0))throw CliErrors[_0x2e1673(0x1a6)](_0x2e1673(0x19a),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x334362==='appcode'){const _0x56404b=_0xdb2f21['apps']&&typeof _0xdb2f21[_0x2e1673(0x192)]===_0x2e1673(0x1a5)?Object[_0x2e1673(0x17d)](_0xdb2f21['apps']):[];if(_0x56404b['length']>0x0)throw CliErrors[_0x2e1673(0x1a6)](_0x2e1673(0x17e),_0x2e1673(0x186)+CLI_BIN_NAME+_0x2e1673(0x197)+_0x4f6ad0+_0x2e1673(0x1a3)+CLI_BIN_NAME+_0x2e1673(0x19e));const _0x47df8b=buildCanonicalProjectConfig({..._0xdb2f21},{'appCodes':[_0x4f6ad0],'env':typeof _0xdb2f21[_0x2e1673(0x19f)]===_0x2e1673(0x1a0)?_0xdb2f21[_0x2e1673(0x19f)]:undefined});writeScopedConfig(_0x47df8b,_0x1bfe3b);const _0x25691e=_0x1bfe3b===_0x2e1673(0x189)?_0x2e1673(0x1a9):_0x2e1673(0x1a7);return{'ok':!![],'message':'✓\x20'+_0x25691e+_0x2e1673(0x18e)+_0x4f6ad0+_0x2e1673(0x1a2)};}_0xdb2f21[_0x5d7614]=_0x4f6ad0,writeScopedConfig(_0xdb2f21,_0x1bfe3b);const _0x195506=_0x1bfe3b===_0x2e1673(0x189)?'Global':_0x2e1673(0x1a7);return{'ok':!![],'message':'✓\x20'+_0x195506+'\x20'+_0x5d7614+_0x2e1673(0x178)+_0x4f6ad0};}export const configSetDefinition={'service':a44_0x5106a9(0x194),'command':'set','description':a44_0x5106a9(0x18a),'risk':a44_0x5106a9(0x198),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x5106a9(0x17f),'type':a44_0x5106a9(0x1a0),'description':a44_0x5106a9(0x181),'required':!![]},{'name':a44_0x5106a9(0x189),'type':a44_0x5106a9(0x1a4),'description':a44_0x5106a9(0x185),'default':![]}],'execute':execute};
1
+ const a44_0x2c1f91=a44_0xab6e;(function(_0x26e5e9,_0x42fec5){const _0x3a5daa=a44_0xab6e,_0x3b9fcb=_0x26e5e9();while(!![]){try{const _0x2f1b04=-parseInt(_0x3a5daa(0x1af))/0x1+parseInt(_0x3a5daa(0x1ba))/0x2+-parseInt(_0x3a5daa(0x1b2))/0x3*(parseInt(_0x3a5daa(0x193))/0x4)+-parseInt(_0x3a5daa(0x1a8))/0x5*(parseInt(_0x3a5daa(0x1a3))/0x6)+-parseInt(_0x3a5daa(0x1a2))/0x7*(parseInt(_0x3a5daa(0x1a7))/0x8)+parseInt(_0x3a5daa(0x1b3))/0x9*(parseInt(_0x3a5daa(0x1a5))/0xa)+parseInt(_0x3a5daa(0x1a1))/0xb*(parseInt(_0x3a5daa(0x1a6))/0xc);if(_0x2f1b04===_0x42fec5)break;else _0x3b9fcb['push'](_0x3b9fcb['shift']());}catch(_0x474ad7){_0x3b9fcb['push'](_0x3b9fcb['shift']());}}}(a44_0x5bab,0x6017a));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a44_0xab6e(_0x136faf,_0x2c4ae9){_0x136faf=_0x136faf-0x18c;const _0x5bab42=a44_0x5bab();let _0xab6eb8=_0x5bab42[_0x136faf];return _0xab6eb8;}async function execute(_0x21182e){const _0x1b294f=a44_0xab6e,_0x200e9c=_0x21182e[_0x1b294f(0x197)](_0x1b294f(0x1a9)),_0x26bd43=_0x21182e['str']('value');if(!_0x200e9c)throw CliErrors[_0x1b294f(0x1be)](_0x1b294f(0x1b8),_0x1b294f(0x1b7)+CLI_BIN_NAME+_0x1b294f(0x18f));if(_0x26bd43===undefined||_0x26bd43==='')throw CliErrors[_0x1b294f(0x1be)]('Missing\x20value.','Usage:\x20'+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x26bd43[_0x1b294f(0x192)]>0x1f4)throw CliErrors['validation'](_0x1b294f(0x191));if(!isTopLevelConfigKey(_0x200e9c))throw CliErrors[_0x1b294f(0x1be)]('Top-level\x20key\x20\x22'+_0x200e9c+_0x1b294f(0x19f),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x200e9c===_0x1b294f(0x1a4))throw CliErrors['validation'](_0x1b294f(0x1b5));if(CONFIG_ENUM_VALUES[_0x200e9c]&&!CONFIG_ENUM_VALUES[_0x200e9c][_0x1b294f(0x1ad)](_0x26bd43))throw CliErrors[_0x1b294f(0x1be)](_0x1b294f(0x1b6)+_0x200e9c+_0x1b294f(0x199)+CONFIG_ENUM_VALUES[_0x200e9c][_0x1b294f(0x18e)](',\x20'));if(_0x200e9c==='locale'&&!normalizeLocale(_0x26bd43))throw CliErrors[_0x1b294f(0x1be)](_0x1b294f(0x1b4),_0x1b294f(0x19d));const _0x1dcae5={'global':_0x21182e[_0x1b294f(0x1bc)](_0x1b294f(0x198))},_0x4740e4=resolveWriteScope(_0x1dcae5),_0x5f35e0=readScopedConfig(_0x4740e4);let _0x32d64e=_0x200e9c,_0x43cbde=_0x26bd43;_0x200e9c===_0x1b294f(0x1b1)&&(_0x32d64e='appcode',delete _0x5f35e0['app']);_0x200e9c===_0x1b294f(0x1ac)&&(_0x43cbde=normalizeLocale(_0x26bd43));if(_0x200e9c==='env'){_0x43cbde=normalizeEnv(_0x26bd43);if(!isProduction(_0x43cbde)&&!isDaily(_0x43cbde))throw CliErrors['validation'](_0x1b294f(0x190),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x200e9c===_0x1b294f(0x19b)){const _0x6738a7=_0x5f35e0[_0x1b294f(0x19e)]&&typeof _0x5f35e0[_0x1b294f(0x19e)]===_0x1b294f(0x1bd)?Object[_0x1b294f(0x1aa)](_0x5f35e0[_0x1b294f(0x19e)]):[];if(_0x6738a7[_0x1b294f(0x192)]>0x0)throw CliErrors['validation'](_0x1b294f(0x19c),'Use\x20`'+CLI_BIN_NAME+_0x1b294f(0x1bb)+_0x43cbde+'`,\x20`'+CLI_BIN_NAME+_0x1b294f(0x1a0));const _0x52bb1b=buildCanonicalProjectConfig({..._0x5f35e0},{'appCodes':[_0x43cbde],'env':typeof _0x5f35e0[_0x1b294f(0x1b0)]===_0x1b294f(0x18d)?_0x5f35e0[_0x1b294f(0x1b0)]:undefined});writeScopedConfig(_0x52bb1b,_0x4740e4);const _0x2cbaf4=_0x4740e4===_0x1b294f(0x198)?_0x1b294f(0x1c0):_0x1b294f(0x196);return{'ok':!![],'message':'✓\x20'+_0x2cbaf4+_0x1b294f(0x18c)+_0x43cbde+_0x1b294f(0x1ab)};}_0x5f35e0[_0x32d64e]=_0x43cbde,writeScopedConfig(_0x5f35e0,_0x4740e4);const _0xab91c4=_0x4740e4===_0x1b294f(0x198)?_0x1b294f(0x1c0):_0x1b294f(0x196);return{'ok':!![],'message':'✓\x20'+_0xab91c4+'\x20'+_0x32d64e+'\x20set\x20to:\x20'+_0x43cbde};}export const configSetDefinition={'service':a44_0x2c1f91(0x1ae),'command':a44_0x2c1f91(0x1bf),'description':a44_0x2c1f91(0x194),'risk':a44_0x2c1f91(0x1b9),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a44_0x2c1f91(0x18d),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':a44_0x2c1f91(0x18d),'description':a44_0x2c1f91(0x19a),'required':!![]},{'name':'global','type':'boolean','description':a44_0x2c1f91(0x195),'default':![]}],'execute':execute};function a44_0x5bab(){const _0x32a1ff=['4aPWtUj','Set\x20a\x20config\x20value','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Project','str','global','\x22.\x20Allowed:\x20','Config\x20value','appcode','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','apps','\x22\x20is\x20not\x20settable.','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','16357627srVLtG','35tUPYds','138zIXnAc','riskLevel','370SsBQjR','12QUqiVH','1180792yPdtfT','136855DmrGep','key','keys','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','locale','includes','config','238842lwADWV','env','app','796413tLPFXC','148401GmQCTl','Invalid\x20locale\x20value.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Invalid\x20value\x20for\x20\x22','Usage:\x20','Missing\x20key.','write','336570SlfFyy','\x20app\x20add\x20<name>\x20--appcode\x20','bool','object','validation','set','Global','\x20appcode\x20set\x20to:\x20','string','join','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','length'];a44_0x5bab=function(){return _0x32a1ff;};return a44_0x5bab();}
@@ -1 +1 @@
1
- (function(_0x9b91f,_0x22335e){var _0x4ef571=a45_0x4818,_0x25a7db=_0x9b91f();while(!![]){try{var _0x213d36=-parseInt(_0x4ef571(0x1a3))/0x1*(-parseInt(_0x4ef571(0x1a9))/0x2)+parseInt(_0x4ef571(0x1a5))/0x3+parseInt(_0x4ef571(0x1aa))/0x4*(-parseInt(_0x4ef571(0x1a0))/0x5)+parseInt(_0x4ef571(0x1a1))/0x6+-parseInt(_0x4ef571(0x1a4))/0x7+-parseInt(_0x4ef571(0x19e))/0x8*(-parseInt(_0x4ef571(0x1a6))/0x9)+parseInt(_0x4ef571(0x1a8))/0xa*(-parseInt(_0x4ef571(0x19f))/0xb);if(_0x213d36===_0x22335e)break;else _0x25a7db['push'](_0x25a7db['shift']());}catch(_0x544361){_0x25a7db['push'](_0x25a7db['shift']());}}}(a45_0x58fb,0xa26ca));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a45_0x4818(_0x1e136b,_0x1f189b){_0x1e136b=_0x1e136b-0x19c;var _0x58fb8e=a45_0x58fb();var _0x481842=_0x58fb8e[_0x1e136b];return _0x481842;}import{CliErrors}from'../../errors.js';function a45_0x58fb(){var _0x3fea14=['898902wBrRZU','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','30IFGsCj','194dvdfex','12072JrPLgt','global','\x20init`\x20first.','40TCoBDQ','1034275WWFVoD','1165xMKCHX','7278618gSLEwC','project','4733IRfwwL','9270310qEkrVu','2409885fBzbhj'];a45_0x58fb=function(){return _0x3fea14;};return a45_0x58fb();}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x14b9e6){var _0x20315f=a45_0x4818;if(_0x14b9e6[_0x20315f(0x19c)])return'global';if(!isInProject())throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x20315f(0x1a7)+CLI_BIN_NAME+_0x20315f(0x19d));return _0x20315f(0x1a2);}export function readScopedConfig(_0x5ac2fa){return readConfigFile(resolveWriteConfigPath(_0x5ac2fa));}export function writeScopedConfig(_0x4f4add,_0x38828f){writeConfigFile(resolveWriteConfigPath(_0x38828f),_0x4f4add);}
1
+ (function(_0x3bc3ee,_0x3e8371){var _0x3222ab=a45_0x122d,_0x38d719=_0x3bc3ee();while(!![]){try{var _0x2c9312=parseInt(_0x3222ab(0x142))/0x1*(-parseInt(_0x3222ab(0x138))/0x2)+-parseInt(_0x3222ab(0x13d))/0x3*(-parseInt(_0x3222ab(0x13b))/0x4)+parseInt(_0x3222ab(0x137))/0x5+-parseInt(_0x3222ab(0x136))/0x6+-parseInt(_0x3222ab(0x13f))/0x7*(parseInt(_0x3222ab(0x13e))/0x8)+parseInt(_0x3222ab(0x13a))/0x9*(parseInt(_0x3222ab(0x135))/0xa)+parseInt(_0x3222ab(0x139))/0xb;if(_0x2c9312===_0x3e8371)break;else _0x38d719['push'](_0x38d719['shift']());}catch(_0x359e3a){_0x38d719['push'](_0x38d719['shift']());}}}(a45_0x5f49,0x1aef4));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};function a45_0x5f49(){var _0x1244b9=['29990djaEhW','1127796eVXETY','788690oCGKrY','676tFqFbc','1537756Viqulk','495AQXvvG','4408nimULI','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','60KWAHtH','784088YFvFfL','7ytFojn','project','global','261XxCKLz'];a45_0x5f49=function(){return _0x1244b9;};return a45_0x5f49();}export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a45_0x122d(_0x38a2b5,_0x4c565f){_0x38a2b5=_0x38a2b5-0x135;var _0x5f4945=a45_0x5f49();var _0x122dda=_0x5f4945[_0x38a2b5];return _0x122dda;}export function resolveWriteScope(_0x5aa580){var _0x3cbb25=a45_0x122d;if(_0x5aa580[_0x3cbb25(0x141)])return _0x3cbb25(0x141);if(!isInProject())throw CliErrors['validation']('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x3cbb25(0x13c)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x3cbb25(0x140);}export function readScopedConfig(_0x2a9124){return readConfigFile(resolveWriteConfigPath(_0x2a9124));}export function writeScopedConfig(_0x24a4e2,_0x111a07){writeConfigFile(resolveWriteConfigPath(_0x111a07),_0x24a4e2);}
@@ -1 +1 @@
1
- const a46_0x4401a3=a46_0x3ba0;(function(_0x3dd55b,_0x3a158c){const _0x3afd51=a46_0x3ba0,_0x312e36=_0x3dd55b();while(!![]){try{const _0x117aed=-parseInt(_0x3afd51(0x10e))/0x1+parseInt(_0x3afd51(0x104))/0x2+-parseInt(_0x3afd51(0x110))/0x3+-parseInt(_0x3afd51(0x10b))/0x4*(parseInt(_0x3afd51(0x107))/0x5)+-parseInt(_0x3afd51(0x10a))/0x6*(parseInt(_0x3afd51(0x102))/0x7)+-parseInt(_0x3afd51(0x101))/0x8*(-parseInt(_0x3afd51(0x10f))/0x9)+parseInt(_0x3afd51(0x105))/0xa;if(_0x117aed===_0x3a158c)break;else _0x312e36['push'](_0x312e36['shift']());}catch(_0x451214){_0x312e36['push'](_0x312e36['shift']());}}}(a46_0x255f,0x6147f));function a46_0x3ba0(_0x124a85,_0x1948a1){_0x124a85=_0x124a85-0x100;const _0x255f8b=a46_0x255f();let _0x3ba08d=_0x255f8b[_0x124a85];return _0x3ba08d;}function a46_0x255f(){const _0x493ad8=['\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','131683iCgAlS','5319603NUgyiE','966444vIKxsh','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','8FXRdot','5554969AShIUO','join','1020942iGzIjG','6895500btEXGw','filter','5PZpLRq','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','6KUJYIM','580908yTQAvy'];a46_0x255f=function(){return _0x493ad8;};return a46_0x255f();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a46_0x4401a3(0x106),'operation':'filter','description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a46_0x4401a3(0x10d),'helpExtra':[a46_0x4401a3(0x100),a46_0x4401a3(0x109),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a46_0x4401a3(0x10c),a46_0x4401a3(0x108)][a46_0x4401a3(0x103)]('\x0a')});
1
+ const a46_0x54be48=a46_0x41a9;(function(_0x104029,_0x5dda9b){const _0x44d4f0=a46_0x41a9,_0x36805c=_0x104029();while(!![]){try{const _0x3a5a48=parseInt(_0x44d4f0(0x141))/0x1+parseInt(_0x44d4f0(0x14a))/0x2*(-parseInt(_0x44d4f0(0x14c))/0x3)+-parseInt(_0x44d4f0(0x145))/0x4*(parseInt(_0x44d4f0(0x14b))/0x5)+-parseInt(_0x44d4f0(0x13e))/0x6*(parseInt(_0x44d4f0(0x13c))/0x7)+parseInt(_0x44d4f0(0x146))/0x8*(-parseInt(_0x44d4f0(0x150))/0x9)+-parseInt(_0x44d4f0(0x143))/0xa+parseInt(_0x44d4f0(0x142))/0xb*(parseInt(_0x44d4f0(0x14d))/0xc);if(_0x3a5a48===_0x5dda9b)break;else _0x36805c['push'](_0x36805c['shift']());}catch(_0x27fb8b){_0x36805c['push'](_0x36805c['shift']());}}}(a46_0x22a8,0xe538f));function a46_0x22a8(){const _0x4d7def=['join','5006979cvEcxF','4027905ezsfNF','Filter\x20dataset\x20records\x20with\x20query\x20conditions','6jdriek','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','1343646GRUAgS','121cOxADb','18645120zaFVND','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','44OtGusy','8BfXKzI','filter','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','2218crNHZa','717245MIwUeD','1461QZwxMx','5137668qkDVaS','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page'];a46_0x22a8=function(){return _0x4d7def;};return a46_0x22a8();}function a46_0x41a9(_0x5d81e8,_0x27c2c7){_0x5d81e8=_0x5d81e8-0x13c;const _0x22a875=a46_0x22a8();let _0x41a96e=_0x22a875[_0x5d81e8];return _0x41a96e;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a46_0x54be48(0x147),'operation':'filter','description':a46_0x54be48(0x13d),'paramsRequired':![],'paramsHint':a46_0x54be48(0x148),'helpExtra':['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a46_0x54be48(0x149),a46_0x54be48(0x13f),a46_0x54be48(0x140),a46_0x54be48(0x144),a46_0x54be48(0x14e)][a46_0x54be48(0x14f)]('\x0a')});
@@ -1 +1 @@
1
- function a47_0x2911(){const _0x37cf25=['JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','580hNiBQJ','5803329eCsiJk','6ReDqUT','7887616AQuLWa','815756XJyjyp','35289qAmBcf','22676027XGzJGB','12uJuRdE','12BffniQ','Get\x20a\x20single\x20record\x20by\x20ID','4105940tswmKD','1GYSsSu','1822724duxbUI'];a47_0x2911=function(){return _0x37cf25;};return a47_0x2911();}function a47_0x24af(_0x18a207,_0x48072b){_0x18a207=_0x18a207-0x196;const _0x29116f=a47_0x2911();let _0x24af75=_0x29116f[_0x18a207];return _0x24af75;}const a47_0x191213=a47_0x24af;(function(_0x74115a,_0x271706){const _0x3bdb91=a47_0x24af,_0x319101=_0x74115a();while(!![]){try{const _0x2de832=-parseInt(_0x3bdb91(0x199))/0x1*(parseInt(_0x3bdb91(0x19a))/0x2)+parseInt(_0x3bdb91(0x196))/0x3*(-parseInt(_0x3bdb91(0x1a0))/0x4)+parseInt(_0x3bdb91(0x198))/0x5*(parseInt(_0x3bdb91(0x19e))/0x6)+parseInt(_0x3bdb91(0x19d))/0x7+-parseInt(_0x3bdb91(0x19f))/0x8+-parseInt(_0x3bdb91(0x1a1))/0x9*(parseInt(_0x3bdb91(0x19c))/0xa)+parseInt(_0x3bdb91(0x1a2))/0xb*(parseInt(_0x3bdb91(0x1a3))/0xc);if(_0x2de832===_0x271706)break;else _0x319101['push'](_0x319101['shift']());}catch(_0x1b3292){_0x319101['push'](_0x319101['shift']());}}}(a47_0x2911,0xbc484));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':'getOne','operation':'getOne','description':a47_0x191213(0x197),'paramsRequired':!![],'paramsHint':a47_0x191213(0x19b)});
1
+ function a47_0x13d4(_0x49ecad,_0x155ce9){_0x49ecad=_0x49ecad-0x196;const _0x13a37f=a47_0x13a3();let _0x13d438=_0x13a37f[_0x49ecad];return _0x13d438;}const a47_0x22e671=a47_0x13d4;(function(_0x89f671,_0x457bf4){const _0x32b3a4=a47_0x13d4,_0x4ef68b=_0x89f671();while(!![]){try{const _0x2d27ff=-parseInt(_0x32b3a4(0x19e))/0x1*(parseInt(_0x32b3a4(0x1a3))/0x2)+-parseInt(_0x32b3a4(0x198))/0x3*(parseInt(_0x32b3a4(0x1a1))/0x4)+parseInt(_0x32b3a4(0x19b))/0x5*(-parseInt(_0x32b3a4(0x1a0))/0x6)+-parseInt(_0x32b3a4(0x19d))/0x7+-parseInt(_0x32b3a4(0x19f))/0x8+-parseInt(_0x32b3a4(0x197))/0x9*(-parseInt(_0x32b3a4(0x1a4))/0xa)+parseInt(_0x32b3a4(0x19c))/0xb*(parseInt(_0x32b3a4(0x19a))/0xc);if(_0x2d27ff===_0x457bf4)break;else _0x4ef68b['push'](_0x4ef68b['shift']());}catch(_0x2c33a9){_0x4ef68b['push'](_0x4ef68b['shift']());}}}(a47_0x13a3,0x8756b));function a47_0x13a3(){const _0x3baaf0=['860609PRDWSL','6050752JRqwHI','66XNtlVR','472880iCqRUx','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','2klbnSB','10aOywpS','Get\x20a\x20single\x20record\x20by\x20ID','5411259jPGjKo','27NaFUcR','getOne','296892wuGmNv','237715WdpheO','1782zexrOt','5957280Sawlcw'];a47_0x13a3=function(){return _0x3baaf0;};return a47_0x13a3();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a47_0x22e671(0x199),'operation':a47_0x22e671(0x199),'description':a47_0x22e671(0x196),'paramsRequired':!![],'paramsHint':a47_0x22e671(0x1a2)});
@@ -1 +1 @@
1
- (function(_0x5218c4,_0x3b13b3){const _0x5b5d14=a48_0x39f2,_0x19c4ec=_0x5218c4();while(!![]){try{const _0x1e9b88=parseInt(_0x5b5d14(0x14c))/0x1+-parseInt(_0x5b5d14(0x152))/0x2*(parseInt(_0x5b5d14(0x150))/0x3)+parseInt(_0x5b5d14(0x154))/0x4+-parseInt(_0x5b5d14(0x151))/0x5*(-parseInt(_0x5b5d14(0x14b))/0x6)+parseInt(_0x5b5d14(0x14e))/0x7*(-parseInt(_0x5b5d14(0x153))/0x8)+-parseInt(_0x5b5d14(0x14d))/0x9*(parseInt(_0x5b5d14(0x155))/0xa)+-parseInt(_0x5b5d14(0x14f))/0xb*(-parseInt(_0x5b5d14(0x156))/0xc);if(_0x1e9b88===_0x3b13b3)break;else _0x19c4ec['push'](_0x19c4ec['shift']());}catch(_0x5963b4){_0x19c4ec['push'](_0x19c4ec['shift']());}}}(a48_0x30b2,0xf00e8));import{dataFilter}from'../../commands/data/filter.js';function a48_0x39f2(_0x19748c,_0x2a4a6e){_0x19748c=_0x19748c-0x14b;const _0x30b2aa=a48_0x30b2();let _0x39f271=_0x30b2aa[_0x19748c];return _0x39f271;}import{dataGetOne}from'../../commands/data/getOne.js';function a48_0x30b2(){const _0x8d6387=['2895684FLcMgf','12oMkMNt','451568AWuKDd','798543skKZnE','7jkCzUi','33jqYHQz','1941582PdzGVT','1871935mutraa','2BwAsQs','10680760loYckK','4875008MeaqDD','20ZlWFCC'];a48_0x30b2=function(){return _0x8d6387;};return a48_0x30b2();}export const dataDefinitions=[dataFilter,dataGetOne];
1
+ function a48_0x52cf(){const _0x5a34ba=['2101834jAReiU','5tXQxMR','2919172icWgiF','13312EcVCQr','39358TbjhTo','63651Chatdu','2556672IoIguf','12640690ZuAJMB','5346wLIOOZ','49lgBclN'];a48_0x52cf=function(){return _0x5a34ba;};return a48_0x52cf();}(function(_0xd795c7,_0x415744){const _0x5c9f4b=a48_0x10af,_0x185695=_0xd795c7();while(!![]){try{const _0x14a21c=parseInt(_0x5c9f4b(0x7c))/0x1*(-parseInt(_0x5c9f4b(0x77))/0x2)+parseInt(_0x5c9f4b(0x78))/0x3+parseInt(_0x5c9f4b(0x7f))/0x4+-parseInt(_0x5c9f4b(0x7e))/0x5*(-parseInt(_0x5c9f4b(0x79))/0x6)+parseInt(_0x5c9f4b(0x7d))/0x7+parseInt(_0x5c9f4b(0x76))/0x8*(-parseInt(_0x5c9f4b(0x7b))/0x9)+parseInt(_0x5c9f4b(0x7a))/0xa;if(_0x14a21c===_0x415744)break;else _0x185695['push'](_0x185695['shift']());}catch(_0x23a2d8){_0x185695['push'](_0x185695['shift']());}}}(a48_0x52cf,0xc091e));import{dataFilter}from'../../commands/data/filter.js';function a48_0x10af(_0x3a2d07,_0x3209ef){_0x3a2d07=_0x3a2d07-0x76;const _0x52cfc5=a48_0x52cf();let _0x10afd6=_0x52cfc5[_0x3a2d07];return _0x10afd6;}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x315ad7,_0x16564c){const _0x138a08=a49_0x3227,_0x8ef8cb=_0x315ad7();while(!![]){try{const _0x2ba25b=-parseInt(_0x138a08(0x100))/0x1*(-parseInt(_0x138a08(0x113))/0x2)+-parseInt(_0x138a08(0x10a))/0x3+parseInt(_0x138a08(0xff))/0x4+-parseInt(_0x138a08(0x10d))/0x5*(parseInt(_0x138a08(0x109))/0x6)+-parseInt(_0x138a08(0x117))/0x7*(parseInt(_0x138a08(0x11b))/0x8)+-parseInt(_0x138a08(0x116))/0x9*(parseInt(_0x138a08(0x115))/0xa)+parseInt(_0x138a08(0x11a))/0xb*(parseInt(_0x138a08(0x112))/0xc);if(_0x2ba25b===_0x16564c)break;else _0x8ef8cb['push'](_0x8ef8cb['shift']());}catch(_0x12d8c0){_0x8ef8cb['push'](_0x8ef8cb['shift']());}}}(a49_0x450f,0xb6b70));function a49_0x450f(){const _0x119fb1=['data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','str','params','command','19326CAYOWR','2621400bOHVuI','paramsRequired','helpExtra','1310tVmcAh','string','validation','now','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','108348zrpWBH','97990MuWQtf','operation','30QeuhSx','2425887spQUcG','13489wthslQ','description','read','3014pJFqCa','744IxgvYB','paramsHint','appCode','784304qjWLhp','16hYmCvw','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','\x20completed\x20in\x20','getOne','flagMissing'];a49_0x450f=function(){return _0x119fb1;};return a49_0x450f();}import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a49_0x3227(_0x408c1e,_0x334dee){_0x408c1e=_0x408c1e-0xfd;const _0x450fc1=a49_0x450f();let _0x322710=_0x450fc1[_0x408c1e];return _0x322710;}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x4d3254){const _0x686900=a49_0x3227;if(!_0x4d3254)throw CliErrors[_0x686900(0x104)](_0x686900(0x107),_0x686900(0x111));const _0x182b62=_0x4d3254['id'];if(_0x182b62===undefined||_0x182b62===null||_0x182b62==='')throw CliErrors[_0x686900(0x10f)](_0x686900(0x105),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function parseCommandParams(_0x17de9f){return parseJsonParams(_0x17de9f)??{};}export function buildDataCommand(_0x5b4850){const _0x58500d=a49_0x3227,_0x59801d=_0x58500d(0x101);return{'service':'data','command':_0x5b4850[_0x58500d(0x108)],'description':_0x5b4850[_0x58500d(0x118)],'risk':_0x58500d(0x119),'defaultOutputFormat':'compress','helpExtra':_0x5b4850[_0x58500d(0x10c)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x58500d(0x10e),'description':_0x59801d},{'name':_0x58500d(0x107),'type':'string','description':_0x5b4850[_0x58500d(0xfd)]}],async 'validate'(_0x15f813){const _0x630818=_0x58500d,_0x580d44=_0x15f813['str'](_0x630818(0x107));if(_0x5b4850[_0x630818(0x10b)]&&!_0x580d44)throw CliErrors[_0x630818(0x104)](_0x630818(0x107),_0x5b4850['paramsHint']);const _0x4fbc96=parseJsonParams(_0x580d44);_0x5b4850[_0x630818(0x114)]===_0x630818(0x103)&&assertGetOneId(_0x4fbc96);},async 'execute'(_0x283df0){const _0x155f94=_0x58500d,_0x48c2ba=parseCommandParams(_0x283df0[_0x155f94(0x106)]('params')),_0x1de7b3=Date['now'](),_0x30d0d7=await executeDatasetDataOperation(_0x283df0[_0x155f94(0xfe)],_0x283df0['str']('code'),_0x5b4850[_0x155f94(0x114)],_0x48c2ba),_0x1d6258=Date[_0x155f94(0x110)]()-_0x1de7b3;return{'ok':!![],'data':{'result':_0x30d0d7,'elapsed':_0x1d6258},'message':'data\x20'+_0x5b4850[_0x155f94(0x108)]+_0x155f94(0x102)+_0x1d6258+'ms'};}};}
1
+ (function(_0xfb8b02,_0x3e44f7){const _0x182988=a49_0x3651,_0x35f369=_0xfb8b02();while(!![]){try{const _0x269923=parseInt(_0x182988(0xf9))/0x1+parseInt(_0x182988(0xfb))/0x2+parseInt(_0x182988(0xec))/0x3+parseInt(_0x182988(0x101))/0x4+-parseInt(_0x182988(0xf8))/0x5+parseInt(_0x182988(0xfd))/0x6+-parseInt(_0x182988(0xee))/0x7;if(_0x269923===_0x3e44f7)break;else _0x35f369['push'](_0x35f369['shift']());}catch(_0x3fa0d8){_0x35f369['push'](_0x35f369['shift']());}}}(a49_0x949a,0xa06a9));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function a49_0x949a(){const _0x197098=['1385528bDzepj','params','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','1741962wAmIey','validation','14727503xcxpCy','flagMissing','now','str','\x20completed\x20in\x20','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','getOne','paramsHint','data','data\x20','1585105QmOhBO','320819mdmDOo','code','1794272kOQOPB','string','5598144lfjajQ','command','operation','read'];a49_0x949a=function(){return _0x197098;};return a49_0x949a();}function a49_0x3651(_0x35c4e1,_0x32d0c5){_0x35c4e1=_0x35c4e1-0xea;const _0x949ac8=a49_0x949a();let _0x365197=_0x949ac8[_0x35c4e1];return _0x365197;}function assertGetOneId(_0xb6cd09){const _0x1c2109=a49_0x3651;if(!_0xb6cd09)throw CliErrors[_0x1c2109(0xef)](_0x1c2109(0xea),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x571ade=_0xb6cd09['id'];if(_0x571ade===undefined||_0x571ade===null||_0x571ade==='')throw CliErrors[_0x1c2109(0xed)](_0x1c2109(0xf3),_0x1c2109(0xeb));}function parseCommandParams(_0x28df8f){return parseJsonParams(_0x28df8f)??{};}export function buildDataCommand(_0x26b23d){const _0x3b2bc5=a49_0x3651,_0x3dbca4='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x3b2bc5(0xf6),'command':_0x26b23d[_0x3b2bc5(0xfe)],'description':_0x26b23d['description'],'risk':_0x3b2bc5(0x100),'defaultOutputFormat':'compress','helpExtra':_0x26b23d['helpExtra'],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x3b2bc5(0xfc),'description':_0x3dbca4},{'name':_0x3b2bc5(0xea),'type':'string','description':_0x26b23d[_0x3b2bc5(0xf5)]}],async 'validate'(_0x1fbbc8){const _0x141978=_0x3b2bc5,_0x5192da=_0x1fbbc8[_0x141978(0xf1)](_0x141978(0xea));if(_0x26b23d['paramsRequired']&&!_0x5192da)throw CliErrors['flagMissing']('params',_0x26b23d['paramsHint']);const _0x2346f3=parseJsonParams(_0x5192da);_0x26b23d[_0x141978(0xff)]===_0x141978(0xf4)&&assertGetOneId(_0x2346f3);},async 'execute'(_0x81d327){const _0x32cc3d=_0x3b2bc5,_0x33b4af=parseCommandParams(_0x81d327[_0x32cc3d(0xf1)](_0x32cc3d(0xea))),_0x21a316=Date[_0x32cc3d(0xf0)](),_0xba6c72=await executeDatasetDataOperation(_0x81d327['appCode'],_0x81d327['str'](_0x32cc3d(0xfa)),_0x26b23d['operation'],_0x33b4af),_0x4f2f72=Date[_0x32cc3d(0xf0)]()-_0x21a316;return{'ok':!![],'data':{'result':_0xba6c72,'elapsed':_0x4f2f72},'message':_0x32cc3d(0xf7)+_0x26b23d[_0x32cc3d(0xfe)]+_0x32cc3d(0xf2)+_0x4f2f72+'ms'};}};}
@@ -1 +1 @@
1
- const a50_0x577009=a50_0x24d0;(function(_0x29152e,_0x14b55a){const _0x28ed66=a50_0x24d0,_0x4c5ac3=_0x29152e();while(!![]){try{const _0x32757a=parseInt(_0x28ed66(0x1ed))/0x1*(parseInt(_0x28ed66(0x1ec))/0x2)+parseInt(_0x28ed66(0x1de))/0x3*(-parseInt(_0x28ed66(0x1d5))/0x4)+parseInt(_0x28ed66(0x1d0))/0x5*(-parseInt(_0x28ed66(0x1f0))/0x6)+-parseInt(_0x28ed66(0x1d8))/0x7*(parseInt(_0x28ed66(0x1df))/0x8)+-parseInt(_0x28ed66(0x1d9))/0x9+parseInt(_0x28ed66(0x1e5))/0xa*(-parseInt(_0x28ed66(0x1e3))/0xb)+parseInt(_0x28ed66(0x1eb))/0xc;if(_0x32757a===_0x14b55a)break;else _0x4c5ac3['push'](_0x4c5ac3['shift']());}catch(_0xcc9be9){_0x4c5ac3['push'](_0x4c5ac3['shift']());}}}(a50_0x3a18,0x858e3));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x577009(0x1e6),'filter':a50_0x577009(0x1f3),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x577009(0x1da);function valueToString(_0x3ea7a5){const _0x3a96fa=a50_0x577009;return _0x3ea7a5==null?'':String(_0x3ea7a5)[_0x3a96fa(0x1d4)]();}function getDatasetCode(_0x2d4d9a){const _0xf8ed66=a50_0x577009;return valueToString(_0x2d4d9a[_0xf8ed66(0x1d7)]??_0x2d4d9a[_0xf8ed66(0x1f5)]??_0x2d4d9a[_0xf8ed66(0x1e9)]?.[_0xf8ed66(0x1e0)]);}function a50_0x3a18(){const _0x1bc8b7=['sourceType','modelCode','785LggHUu','\x20类型,没有可用于\x20','当前数据集\x20\x22','UNKNOWN','trim','56KpwdDf','tableName','code','7PVLAKM','7318728tfqyak','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','dbtableConfig','validation','object','232341QREyfT','2144776QwdUuJ','datasetCode','name','\x20是\x20','33XlIonq','length','303170OhQqft','lovrabet','unknown','toUpperCase','dataset','\x20的\x20DB_TABLE\x20数据源上下文。','38542164jBllBG','5954EdAOhm','227mKnxPv','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','METADATA','41430WNYxDP','getOne','SQL\x20schema\x20validation','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress'];a50_0x3a18=function(){return _0x1bc8b7;};return a50_0x3a18();}function getDatasetName(_0x5d537a){const _0x914387=a50_0x577009;return valueToString(_0x5d537a[_0x914387(0x1e1)]??_0x5d537a[_0x914387(0x1e9)]?.['datasetName'])||_0x914387(0x1e7);}function a50_0x24d0(_0x282d21,_0x2afde0){_0x282d21=_0x282d21-0x1d0;const _0x3a18ce=a50_0x3a18();let _0x24d0a5=_0x3a18ce[_0x282d21];return _0x24d0a5;}function getDatasetSource(_0x432825){const _0x8f1465=a50_0x577009;return valueToString(_0x432825['source']??_0x432825[_0x8f1465(0x1e9)]?.[_0x8f1465(0x1f4)])[_0x8f1465(0x1e8)]();}function getDbtableConfig(_0x55fc08){const _0x876c31=a50_0x577009,_0x922bd3=_0x55fc08[_0x876c31(0x1db)]??_0x55fc08['dbtable'];return _0x922bd3&&typeof _0x922bd3===_0x876c31(0x1dd)?_0x922bd3:{};}export function isDbTableBackedDataset(_0x3ad716){const _0x22f72d=a50_0x577009,_0x523524=getDatasetSource(_0x3ad716);if(_0x523524===_0x22f72d(0x1ef))return![];const _0x5c7c83=getDbtableConfig(_0x3ad716),_0x36b012=_0x5c7c83['dbId']??_0x5c7c83['id'],_0x454871=valueToString(_0x5c7c83[_0x22f72d(0x1d6)]??_0x3ad716['tableName']??_0x3ad716[_0x22f72d(0x1e9)]?.[_0x22f72d(0x1d6)]);return _0x36b012!==undefined&&_0x36b012!==null&&_0x454871[_0x22f72d(0x1e4)]>0x0;}export function filterDbTableBackedDatasets(_0x508fed){return _0x508fed['filter'](_0x462e26=>isDbTableBackedDataset(_0x462e26));}export function buildDbTableBackedRequirementMessage(_0x3a2a9b,_0x329883=a50_0x577009(0x1f2)){const _0x367164=a50_0x577009,_0x19a8c9=getDatasetSource(_0x3a2a9b)||_0x367164(0x1d3),_0x49bce6=getDatasetName(_0x3a2a9b),_0x7be732=getDatasetCode(_0x3a2a9b),_0xfa2452=_0x7be732?'\x20('+_0x7be732+')':'';return[_0x367164(0x1d2)+_0x49bce6+'\x22'+_0xfa2452+_0x367164(0x1e2)+_0x19a8c9+_0x367164(0x1d1)+_0x329883+_0x367164(0x1ea),'原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x367164(0x1ee)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x367164(0x1f1)]+'。']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x28083a,_0xca94c){const _0x189c5c=a50_0x577009;if(!isDbTableBackedDataset(_0x28083a))throw CliErrors[_0x189c5c(0x1dc)](buildDbTableBackedRequirementMessage(_0x28083a,_0xca94c));}
1
+ function a50_0xe1b5(){const _0x434d89=['请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','3164098FphBKs','dataset','join','length','63202trBYkW','source','validation','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','modelCode','SQL\x20schema\x20validation','unknown','\x20的\x20DB_TABLE\x20数据源上下文。','4293gQxfTa','\x20是\x20','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','7024gYYbDr','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','getOne','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','object','6194970EbDKFC','datasetName','lovrabet','10nvmXNC','6GtgiMs','datasetCode','trim','1922455WlQTqS','dbtable','toUpperCase','12VLyEMc','dbId','\x20类型,没有可用于\x20','99253GFzXLb','40bdJGlB','16680TuKgXI','tableName'];a50_0xe1b5=function(){return _0x434d89;};return a50_0xe1b5();}const a50_0x140133=a50_0x3f48;(function(_0x534a11,_0x311983){const _0x1d9be0=a50_0x3f48,_0x1c56be=_0x534a11();while(!![]){try{const _0x4a9728=-parseInt(_0x1d9be0(0x162))/0x1*(parseInt(_0x1d9be0(0x14f))/0x2)+parseInt(_0x1d9be0(0x148))/0x3*(parseInt(_0x1d9be0(0x147))/0x4)+parseInt(_0x1d9be0(0x166))/0x5+-parseInt(_0x1d9be0(0x163))/0x6*(-parseInt(_0x1d9be0(0x14b))/0x7)+parseInt(_0x1d9be0(0x15a))/0x8*(parseInt(_0x1d9be0(0x157))/0x9)+-parseInt(_0x1d9be0(0x15f))/0xa+-parseInt(_0x1d9be0(0x146))/0xb*(parseInt(_0x1d9be0(0x169))/0xc);if(_0x4a9728===_0x311983)break;else _0x1c56be['push'](_0x1c56be['shift']());}catch(_0x4a0008){_0x1c56be['push'](_0x1c56be['shift']());}}}(a50_0xe1b5,0x5972d));function a50_0x3f48(_0x3ee084,_0x259472){_0x3ee084=_0x3ee084-0x144;const _0xe1b55b=a50_0xe1b5();let _0x3f48fb=_0xe1b55b[_0x3ee084];return _0x3f48fb;}import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x140133(0x161),'filter':a50_0x140133(0x15d),'getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x140133(0x159);function valueToString(_0x3c31e1){const _0x703b9b=a50_0x140133;return _0x3c31e1==null?'':String(_0x3c31e1)[_0x703b9b(0x165)]();}function getDatasetCode(_0x47b24c){const _0x4cd70c=a50_0x140133;return valueToString(_0x47b24c['code']??_0x47b24c[_0x4cd70c(0x153)]??_0x47b24c[_0x4cd70c(0x14c)]?.[_0x4cd70c(0x164)]);}function getDatasetName(_0x12ff90){const _0x303804=a50_0x140133;return valueToString(_0x12ff90['name']??_0x12ff90[_0x303804(0x14c)]?.[_0x303804(0x160)])||_0x303804(0x155);}function getDatasetSource(_0x556a71){const _0x1dcd60=a50_0x140133;return valueToString(_0x556a71[_0x1dcd60(0x150)]??_0x556a71[_0x1dcd60(0x14c)]?.['sourceType'])[_0x1dcd60(0x168)]();}function getDbtableConfig(_0x57a6d8){const _0x342446=a50_0x140133,_0x31e418=_0x57a6d8['dbtableConfig']??_0x57a6d8[_0x342446(0x167)];return _0x31e418&&typeof _0x31e418===_0x342446(0x15e)?_0x31e418:{};}export function isDbTableBackedDataset(_0x173161){const _0x3d90ad=a50_0x140133,_0x1a5282=getDatasetSource(_0x173161);if(_0x1a5282==='METADATA')return![];const _0x122f04=getDbtableConfig(_0x173161),_0x1879f3=_0x122f04[_0x3d90ad(0x144)]??_0x122f04['id'],_0x519548=valueToString(_0x122f04[_0x3d90ad(0x149)]??_0x173161['tableName']??_0x173161[_0x3d90ad(0x14c)]?.['tableName']);return _0x1879f3!==undefined&&_0x1879f3!==null&&_0x519548[_0x3d90ad(0x14e)]>0x0;}export function filterDbTableBackedDatasets(_0x5d9466){return _0x5d9466['filter'](_0x10f6c0=>isDbTableBackedDataset(_0x10f6c0));}export function buildDbTableBackedRequirementMessage(_0x3267e3,_0x275c5e=a50_0x140133(0x154)){const _0x3d53e5=a50_0x140133,_0x28e2c1=getDatasetSource(_0x3267e3)||'UNKNOWN',_0x7e0d93=getDatasetName(_0x3267e3),_0x113e59=getDatasetCode(_0x3267e3),_0x415435=_0x113e59?'\x20('+_0x113e59+')':'';return['当前数据集\x20\x22'+_0x7e0d93+'\x22'+_0x415435+_0x3d53e5(0x158)+_0x28e2c1+_0x3d53e5(0x145)+_0x275c5e+_0x3d53e5(0x156),_0x3d53e5(0x15b),_0x3d53e5(0x14a),_0x3d53e5(0x152)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x3d53e5(0x15c)]+'。'][_0x3d53e5(0x14d)]('\x20');}export function assertDatasetIsDbTableBacked(_0x6094a2,_0x33ec38){const _0x46200f=a50_0x140133;if(!isDbTableBackedDataset(_0x6094a2))throw CliErrors[_0x46200f(0x151)](buildDbTableBackedRequirementMessage(_0x6094a2,_0x33ec38));}