@lovrabet/rabetbase-cli 2.2.4-beta.2 → 2.2.4-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) 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 +2 -2
  206. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +1 -1
  207. package/templates/rules/lovrabet_rules.mdc.tpl +3 -1
@@ -1 +1 @@
1
- const a32_0x9cbed8=a32_0x4057;(function(_0x3071c5,_0xba7440){const _0x3a96ef=a32_0x4057,_0x23b907=_0x3071c5();while(!![]){try{const _0x5138a5=-parseInt(_0x3a96ef(0x18f))/0x1*(parseInt(_0x3a96ef(0x18a))/0x2)+-parseInt(_0x3a96ef(0x153))/0x3*(-parseInt(_0x3a96ef(0x157))/0x4)+parseInt(_0x3a96ef(0x199))/0x5+parseInt(_0x3a96ef(0x185))/0x6*(-parseInt(_0x3a96ef(0x184))/0x7)+parseInt(_0x3a96ef(0x159))/0x8+parseInt(_0x3a96ef(0x191))/0x9*(parseInt(_0x3a96ef(0x15f))/0xa)+parseInt(_0x3a96ef(0x171))/0xb*(-parseInt(_0x3a96ef(0x183))/0xc);if(_0x5138a5===_0xba7440)break;else _0x23b907['push'](_0x23b907['shift']());}catch(_0x3783bb){_0x23b907['push'](_0x23b907['shift']());}}}(a32_0x1e4d,0xdccac));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';function a32_0x1e4d(){const _0x5608f3=['8862455VwmlqZ','unchanged','filter','hash','lastSync','/api/management/library/scripts/save','runtime\x20cache\x20not\x20needed','appCode','Local\x20function\x20not\x20found:\x20','push','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','code','filePath','str','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','780CxytDS','datasetCode','aliasToDatasetCode','values','2116GzekCB','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','11671024lwKYxh','script','has','boolean','Push\x20complete:\x20','Cannot\x20resolve\x20dataset\x20for\x20\x22','6158290jyFZvp','cleared','length','attempted','\x20skipped,\x20','update','apiDir','Force\x20push\x20ignoring\x20hash\x20protection','HOOK','map','some','stringify','POST','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','utf8','lockFilePath','force','operationType','1007347dHupCB','status','message','COMMON','get','lockKey','version','parse','functionNode','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','toISOString','bff','description','high-risk-write','bool','\x20uploaded,\x20','Run\x20`','name','132RuMUIi','238XCqdtQ','141774GCOqct','Push\x20local\x20BFF\x20scripts\x20to\x20remote','functions','string','No\x20local\x20BFF\x20functions\x20found.','2VgKxhi','create','would_push','alias','Push\x20only\x20this\x20script\x20type','1269641XJDLpx','datasetCodeToDataset','9FMOsax','validation','scriptsRoot','remoteId','\x20failed,\x20','type','Runtime\x20script\x20cache\x20cleared.','runtime\x20cache\x20cleared'];a32_0x1e4d=function(){return _0x5608f3;};return a32_0x1e4d();}const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a32_0x9cbed8(0x17c),'command':a32_0x9cbed8(0x1a2),'description':a32_0x9cbed8(0x186),'risk':a32_0x9cbed8(0x17e),'flags':[{'name':a32_0x9cbed8(0x196),'type':a32_0x9cbed8(0x188),'description':a32_0x9cbed8(0x18e),'enum':[a32_0x9cbed8(0x174),'ENDPOINT',a32_0x9cbed8(0x167)]},{'name':a32_0x9cbed8(0x182),'type':a32_0x9cbed8(0x188),'description':a32_0x9cbed8(0x152)},{'name':'force','type':a32_0x9cbed8(0x15c),'description':a32_0x9cbed8(0x166)}],async 'dryRun'(_0x5c4807){const _0x1b2e4d=a32_0x9cbed8,_0x281932=loadBffProjectConfig(_0x5c4807[_0x1b2e4d(0x1a0)]),_0x433d85=await readBffLockFile(_0x281932[_0x1b2e4d(0x16e)]),{appLock:_0x488512}=ensureLockScope(_0x433d85??createEmptyBffLock(),_0x5c4807[_0x1b2e4d(0x1a0)],_0x281932[_0x1b2e4d(0x193)],_0x1b2e4d(0x1a2)),_0x385e15=await getTargetFunctions(_0x281932,_0x5c4807),_0x4c311a=_0x5c4807[_0x1b2e4d(0x17f)](_0x1b2e4d(0x16f)),_0x53aebd=[];for(const _0x3b25a0 of _0x385e15){const _0x57649f=await computeFileHash(_0x3b25a0['filePath']),_0x1fc07a=_0x488512[_0x1b2e4d(0x187)][_0x3b25a0[_0x1b2e4d(0x176)]],_0x29b1c8=!!_0x1fc07a&&_0x1fc07a[_0x1b2e4d(0x19c)]===_0x57649f;_0x53aebd[_0x1b2e4d(0x1a2)]({'lockKey':_0x3b25a0[_0x1b2e4d(0x176)],'filePath':_0x3b25a0[_0x1b2e4d(0x1a5)],'remoteId':_0x1fc07a?.['remoteId']??null,'mode':_0x1fc07a?.[_0x1b2e4d(0x194)]?_0x1b2e4d(0x164):_0x1b2e4d(0x18b),'status':!_0x4c311a&&_0x29b1c8?_0x1b2e4d(0x19a):'would_push'});}return{'method':_0x1b2e4d(0x16b),'url':_0x1b2e4d(0x19e),'body':{'appCode':_0x5c4807[_0x1b2e4d(0x1a0)],'force':_0x4c311a,'files':_0x53aebd,'cacheClearAtRuntime':_0x53aebd[_0x1b2e4d(0x169)](_0x291ec4=>_0x291ec4[_0x1b2e4d(0x172)]===_0x1b2e4d(0x18c)),'cacheClearAtRuntimeTimes':_0x53aebd[_0x1b2e4d(0x169)](_0x4e94f0=>_0x4e94f0['status']==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x53aebd[_0x1b2e4d(0x161)]+_0x1b2e4d(0x17a)};},async 'execute'(_0x5112bd){const _0x3f6e58=a32_0x9cbed8,_0x56ce7d=loadBffProjectConfig(_0x5112bd[_0x3f6e58(0x1a0)]),_0x1471c4=await readBffLockFile(_0x56ce7d[_0x3f6e58(0x16e)]),{lockData:_0x4cb009,appLock:_0x3f15da}=ensureLockScope(_0x1471c4??createEmptyBffLock(),_0x5112bd['appCode'],_0x56ce7d[_0x3f6e58(0x193)],_0x3f6e58(0x1a2)),_0x2de7c6=await getTargetFunctions(_0x56ce7d,_0x5112bd);if(_0x2de7c6[_0x3f6e58(0x161)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x3f6e58(0x189)};const _0x15c1aa=_0x5112bd[_0x3f6e58(0x17f)](_0x3f6e58(0x16f)),_0x5e8c46=JSON[_0x3f6e58(0x178)](JSON[_0x3f6e58(0x16a)](_0x4cb009)),_0x54759c=_0x5e8c46['apps'][_0x5112bd[_0x3f6e58(0x1a0)]];if(!_0x54759c)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x5112bd[_0x3f6e58(0x1a0)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x4c704d=await buildHookMaps(_0x5112bd[_0x3f6e58(0x1a0)],_0x5112bd[_0x3f6e58(0x165)],_0x2de7c6,_0x54759c),_0x260378=[],_0x1c96f9=[],_0x5a9662=[];for(const _0x5d21eb of _0x2de7c6){const _0x5cad64=await computeFileHash(_0x5d21eb[_0x3f6e58(0x1a5)]),_0xb05576=_0x54759c['functions'][_0x5d21eb[_0x3f6e58(0x176)]];if(!_0x15c1aa&&_0xb05576&&_0xb05576[_0x3f6e58(0x19c)]===_0x5cad64){_0x1c96f9['push']({'lockKey':_0x5d21eb[_0x3f6e58(0x176)],'reason':_0x3f6e58(0x19a)});continue;}try{await uploadSingleFunction(_0x5112bd['appCode'],_0x5d21eb,_0x54759c,_0x4c704d);const _0x4584c2=_0x54759c[_0x3f6e58(0x187)][_0x5d21eb[_0x3f6e58(0x176)]];_0x260378[_0x3f6e58(0x1a2)]({'lockKey':_0x5d21eb['lockKey'],'remoteId':_0x4584c2?.[_0x3f6e58(0x194)]??0x0});}catch(_0x2e1470){_0x5a9662[_0x3f6e58(0x1a2)]({'lockKey':_0x5d21eb[_0x3f6e58(0x176)],'error':_0x2e1470 instanceof Error?_0x2e1470[_0x3f6e58(0x173)]:String(_0x2e1470)});}}_0x54759c[_0x3f6e58(0x19d)]=new Date()[_0x3f6e58(0x17b)](),await writeBffLockFile(_0x56ce7d[_0x3f6e58(0x16e)],_0x5e8c46),await waitForUploadedLockEntries(_0x56ce7d['lockFilePath'],_0x5112bd[_0x3f6e58(0x1a0)],_0x260378[_0x3f6e58(0x168)](_0x52fc2a=>_0x52fc2a[_0x3f6e58(0x176)]));let _0x79ff92={'attempted':![],'cleared':![]};if(_0x260378[_0x3f6e58(0x161)]>0x0)try{let _0x21e013='';for(let _0x5964ac=0x0;_0x5964ac<CACHE_CLEAR_ATTEMPTS;_0x5964ac+=0x1){_0x21e013=await clearBffScriptCache(),_0x5964ac<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x79ff92={'attempted':!![],'cleared':!![],'message':_0x21e013||_0x3f6e58(0x197)};}catch(_0x4039cd){_0x79ff92={'attempted':!![],'cleared':![],'error':_0x4039cd instanceof Error?_0x4039cd['message']:String(_0x4039cd)};}const _0x35ba98=_0x5a9662['length']===0x0&&(_0x79ff92[_0x3f6e58(0x162)]?_0x79ff92[_0x3f6e58(0x160)]:!![]),_0x35762a=_0x79ff92[_0x3f6e58(0x162)]?_0x79ff92[_0x3f6e58(0x160)]?_0x3f6e58(0x198):'runtime\x20cache\x20clear\x20failed':_0x3f6e58(0x19f);return{'ok':_0x35ba98,'data':{'uploaded':_0x260378,'skipped':_0x1c96f9,'failed':_0x5a9662,'cacheClear':_0x79ff92},'message':_0x3f6e58(0x15d)+_0x260378['length']+_0x3f6e58(0x180)+_0x1c96f9[_0x3f6e58(0x161)]+_0x3f6e58(0x163)+_0x5a9662['length']+_0x3f6e58(0x195)+_0x35762a};}};async function getTargetFunctions(_0x5d0e19,_0x8faf91){const _0x53c6d5=a32_0x9cbed8,_0x2b850c=_0x8faf91[_0x53c6d5(0x1a6)]('type'),_0x43d8e2=_0x8faf91[_0x53c6d5(0x1a6)](_0x53c6d5(0x182)),_0x52c5db=normalizeBffType(_0x2b850c)??undefined;if(_0x43d8e2&&!_0x52c5db)throw CliErrors[_0x53c6d5(0x192)](_0x53c6d5(0x158));const _0x3f783e=await scanLocalBffFunctions(_0x5d0e19,_0x52c5db);if(_0x43d8e2){const _0x8f0c14=_0x3f783e[_0x53c6d5(0x19b)](_0x1fa1e4=>_0x1fa1e4[_0x53c6d5(0x182)]===_0x43d8e2);if(_0x8f0c14['length']===0x0)throw CliErrors['validation'](_0x53c6d5(0x1a1)+_0x52c5db+'/'+_0x43d8e2);return _0x8f0c14;}return _0x3f783e;}async function buildHookMaps(_0x3e9a3d,_0x4bde39,_0x34a918,_0x2f9d62){const _0x5eecb3=a32_0x9cbed8,_0x461aa7=_0x34a918[_0x5eecb3(0x169)](_0x24a635=>_0x24a635[_0x5eecb3(0x196)]===_0x5eecb3(0x167));if(!_0x461aa7)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0xd7e0cb=loadAliasMap(_0x4bde39,undefined,resolveApiFilePath(_0x4bde39,_0x3e9a3d)),_0x3be120=new Map(_0xd7e0cb['map'](_0x572125=>[_0x572125[_0x5eecb3(0x18d)],_0x572125[_0x5eecb3(0x154)]]));for(const _0x240fa0 of Object[_0x5eecb3(0x156)](_0x2f9d62[_0x5eecb3(0x187)])){_0x240fa0[_0x5eecb3(0x18d)]&&_0x240fa0[_0x5eecb3(0x154)]&&!_0x3be120[_0x5eecb3(0x15b)](_0x240fa0['alias'])&&_0x3be120['set'](_0x240fa0['alias'],_0x240fa0['datasetCode']);}const _0x29aa04=await listDatasets(_0x3e9a3d),_0x5d14d9=new Map(_0x29aa04['map'](_0x1293cf=>[_0x1293cf[_0x5eecb3(0x1a4)],_0x1293cf]));return{'aliasToDatasetCode':_0x3be120,'datasetCodeToDataset':_0x5d14d9};}async function uploadSingleFunction(_0x3b9e3a,_0x509876,_0x4b6502,_0x549a87){const _0x5b6db5=a32_0x9cbed8,_0x4770c5=await readFile(_0x509876[_0x5b6db5(0x1a5)],_0x5b6db5(0x16d)),_0x3c4ab7=await computeFileHash(_0x509876[_0x5b6db5(0x1a5)]),_0x298cad=_0x4b6502[_0x5b6db5(0x187)][_0x509876['lockKey']];if(_0x298cad?.['remoteId']&&_0x298cad[_0x5b6db5(0x177)]==null)throw CliErrors[_0x5b6db5(0x192)](_0x509876['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x41ea29=extractScriptDescription(_0x4770c5);if(!_0x41ea29&&_0x298cad?.['remoteId']){const _0x225811=await getBffScriptInfo(_0x298cad[_0x5b6db5(0x194)]);_0x41ea29=_0x225811[_0x5b6db5(0x17d)]||undefined;}const _0x3e37ee={'appCode':_0x3b9e3a,'functionName':_0x509876[_0x5b6db5(0x182)],'scriptType':_0x509876[_0x5b6db5(0x196)],'scriptContent':_0x4770c5};if(_0x298cad?.['remoteId'])_0x3e37ee['id']=_0x298cad[_0x5b6db5(0x194)];if(_0x298cad?.[_0x5b6db5(0x177)]!=null)_0x3e37ee[_0x5b6db5(0x177)]=_0x298cad[_0x5b6db5(0x177)];if(_0x41ea29)_0x3e37ee[_0x5b6db5(0x17d)]=_0x41ea29;if(_0x509876['type']===_0x5b6db5(0x167)){const _0x9b2113=_0x509876['alias'];if(!_0x9b2113||!_0x509876[_0x5b6db5(0x170)]||!_0x509876['functionNode'])throw CliErrors[_0x5b6db5(0x192)]('Incomplete\x20HOOK\x20path:\x20'+_0x509876['lockKey']);const _0xe3e722=_0x549a87[_0x5b6db5(0x155)][_0x5b6db5(0x175)](_0x9b2113)??_0x298cad?.[_0x5b6db5(0x154)]??_0x9b2113,_0x35a6ab=_0x549a87[_0x5b6db5(0x190)][_0x5b6db5(0x175)](_0xe3e722);if(!_0x35a6ab)throw CliErrors['validation'](_0x5b6db5(0x15e)+_0x9b2113+'\x22.\x20'+(_0x5b6db5(0x181)+CLI_BIN_NAME+_0x5b6db5(0x1a3)));_0x3e37ee['datasetId']=_0x35a6ab['id'],_0x3e37ee['operationType']=_0x509876['operationType'],_0x3e37ee[_0x5b6db5(0x179)]=_0x509876[_0x5b6db5(0x179)];}const _0x3f6949=await saveBffScript(_0x3e37ee),_0x405cf5=_0x3f6949['id'],_0x4df526=_0x3f6949[_0x5b6db5(0x15a)]??await getBffScriptInfo(_0x405cf5),_0x31274b={'hash':_0x3c4ab7,'remoteId':_0x405cf5,'version':_0x4df526['version']};if(_0x509876[_0x5b6db5(0x196)]==='HOOK'){const _0x23f919=_0x509876[_0x5b6db5(0x18d)],_0x4419c2=_0x549a87['aliasToDatasetCode'][_0x5b6db5(0x175)](_0x23f919)??_0x298cad?.[_0x5b6db5(0x154)]??_0x23f919;_0x549a87[_0x5b6db5(0x155)][_0x5b6db5(0x15b)](_0x23f919)?_0x31274b['alias']=_0x23f919:_0x31274b[_0x5b6db5(0x18d)]=_0x298cad?.[_0x5b6db5(0x18d)],_0x31274b[_0x5b6db5(0x154)]=_0x4419c2,_0x31274b[_0x5b6db5(0x170)]=_0x509876[_0x5b6db5(0x170)],_0x31274b['functionNode']=_0x509876['functionNode'];}_0x4b6502['functions'][_0x509876['lockKey']]=_0x31274b;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a32_0x4057(_0x57f9c4,_0x2717f9){_0x57f9c4=_0x57f9c4-0x152;const _0x1e4dbf=a32_0x1e4d();let _0x405785=_0x1e4dbf[_0x57f9c4];return _0x405785;}async function waitForUploadedLockEntries(_0xdca758,_0x58d0ac,_0x172a05){const _0x192271=a32_0x9cbed8;if(_0x172a05[_0x192271(0x161)]===0x0)return;for(let _0x10ea6a=0x0;_0x10ea6a<LOCK_SETTLE_RETRY_COUNT;_0x10ea6a+=0x1){const _0x4668a4=await readBffLockFile(_0xdca758),_0x2b64a3=_0x4668a4?.['apps']?.[_0x58d0ac]?.[_0x192271(0x187)]??{},_0x20c2f4=_0x172a05['every'](_0x1fde4a=>!!_0x2b64a3[_0x1fde4a]?.['remoteId']);if(_0x20c2f4)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x192271(0x16c)+_0x172a05['join'](',\x20')+'.');}
1
+ const a32_0x52dcae=a32_0x1161;(function(_0x155348,_0x39a85e){const _0x2c8d84=a32_0x1161,_0x4ee706=_0x155348();while(!![]){try{const _0x882055=parseInt(_0x2c8d84(0x1ee))/0x1+-parseInt(_0x2c8d84(0x234))/0x2*(-parseInt(_0x2c8d84(0x22c))/0x3)+parseInt(_0x2c8d84(0x1f4))/0x4*(parseInt(_0x2c8d84(0x22a))/0x5)+parseInt(_0x2c8d84(0x1ff))/0x6*(-parseInt(_0x2c8d84(0x20f))/0x7)+-parseInt(_0x2c8d84(0x218))/0x8*(parseInt(_0x2c8d84(0x213))/0x9)+-parseInt(_0x2c8d84(0x1e4))/0xa*(-parseInt(_0x2c8d84(0x1f8))/0xb)+parseInt(_0x2c8d84(0x22d))/0xc;if(_0x882055===_0x39a85e)break;else _0x4ee706['push'](_0x4ee706['shift']());}catch(_0xfe3e5b){_0x4ee706['push'](_0x4ee706['shift']());}}}(a32_0x2d8b,0x77c73));function a32_0x1161(_0x1fd1f1,_0x18faba){_0x1fd1f1=_0x1fd1f1-0x1e0;const _0x2d8b7a=a32_0x2d8b();let _0x1161c3=_0x2d8b7a[_0x1fd1f1];return _0x1161c3;}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';function a32_0x2d8b(){const _0x2c77d0=['lockFilePath','5690079ngqlmh','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','toISOString','scriptsRoot','operationType','8LSjCNA','Lock\x20scope\x20for\x20app\x20\x22','create','update','lockKey','status','runtime\x20cache\x20not\x20needed','map','HOOK','validation','\x22.\x20','stringify','utf8','alias','datasetCodeToDataset','functions','parse','name','55QDGdUY','No\x20local\x20BFF\x20functions\x20found.','303cUokkj','1926276gnIRig','Push\x20local\x20BFF\x20scripts\x20to\x20remote','type','join','ENDPOINT','message','filePath','5864vOwtGA','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','remoteId','Cannot\x20resolve\x20dataset\x20for\x20\x22','Run\x20`','3370OJePKS','Incomplete\x20HOOK\x20path:\x20','str','set','COMMON','hash','script','apps','high-risk-write','\x20uploaded,\x20','89141XbthTP','appCode','would_push','version','get','attempted','315564GYnQQz','unchanged','datasetId',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','20526nXsYWw','POST','runtime\x20cache\x20cleared','force','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','\x20skipped,\x20','bff','5517582TkhxOG','/api/management/library/scripts/save','Runtime\x20script\x20cache\x20cleared.','push','functionNode','some','Force\x20push\x20ignoring\x20hash\x20protection','\x20failed,\x20','runtime\x20cache\x20clear\x20failed','code','description','aliasToDatasetCode','Would\x20inspect\x20','string','datasetCode','length','7TgOGlK','values','cleared'];a32_0x2d8b=function(){return _0x2c77d0;};return a32_0x2d8b();}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_0x52dcae(0x1fe),'command':a32_0x52dcae(0x202),'description':a32_0x52dcae(0x22e),'risk':a32_0x52dcae(0x1ec),'flags':[{'name':a32_0x52dcae(0x22f),'type':a32_0x52dcae(0x20c),'description':'Push\x20only\x20this\x20script\x20type','enum':[a32_0x52dcae(0x1e8),a32_0x52dcae(0x231),a32_0x52dcae(0x220)]},{'name':'name','type':a32_0x52dcae(0x20c),'description':a32_0x52dcae(0x214)},{'name':a32_0x52dcae(0x1fb),'type':'boolean','description':a32_0x52dcae(0x205)}],async 'dryRun'(_0x48f8e9){const _0x4d75a7=a32_0x52dcae,_0x563688=loadBffProjectConfig(_0x48f8e9['appCode']),_0x41bf2e=await readBffLockFile(_0x563688[_0x4d75a7(0x212)]),{appLock:_0x8b002b}=ensureLockScope(_0x41bf2e??createEmptyBffLock(),_0x48f8e9[_0x4d75a7(0x1ef)],_0x563688[_0x4d75a7(0x216)],_0x4d75a7(0x202)),_0xaacc7b=await getTargetFunctions(_0x563688,_0x48f8e9),_0xc46c01=_0x48f8e9['bool'](_0x4d75a7(0x1fb)),_0xe2c792=[];for(const _0x203fd9 of _0xaacc7b){const _0xa63f33=await computeFileHash(_0x203fd9[_0x4d75a7(0x233)]),_0x315ab7=_0x8b002b[_0x4d75a7(0x227)][_0x203fd9[_0x4d75a7(0x21c)]],_0xf9e4e8=!!_0x315ab7&&_0x315ab7[_0x4d75a7(0x1e9)]===_0xa63f33;_0xe2c792[_0x4d75a7(0x202)]({'lockKey':_0x203fd9[_0x4d75a7(0x21c)],'filePath':_0x203fd9[_0x4d75a7(0x233)],'remoteId':_0x315ab7?.[_0x4d75a7(0x1e1)]??null,'mode':_0x315ab7?.['remoteId']?_0x4d75a7(0x21b):_0x4d75a7(0x21a),'status':!_0xc46c01&&_0xf9e4e8?_0x4d75a7(0x1f5):_0x4d75a7(0x1f0)});}return{'method':_0x4d75a7(0x1f9),'url':_0x4d75a7(0x200),'body':{'appCode':_0x48f8e9['appCode'],'force':_0xc46c01,'files':_0xe2c792,'cacheClearAtRuntime':_0xe2c792[_0x4d75a7(0x204)](_0x3338df=>_0x3338df[_0x4d75a7(0x21d)]===_0x4d75a7(0x1f0)),'cacheClearAtRuntimeTimes':_0xe2c792[_0x4d75a7(0x204)](_0xd91ee2=>_0xd91ee2['status']===_0x4d75a7(0x1f0))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x4d75a7(0x20b)+_0xe2c792['length']+_0x4d75a7(0x1fc)};},async 'execute'(_0x4aa0c9){const _0x1d682c=a32_0x52dcae,_0x13b837=loadBffProjectConfig(_0x4aa0c9[_0x1d682c(0x1ef)]),_0xaa3615=await readBffLockFile(_0x13b837['lockFilePath']),{lockData:_0x5b8c61,appLock:_0xc1611c}=ensureLockScope(_0xaa3615??createEmptyBffLock(),_0x4aa0c9[_0x1d682c(0x1ef)],_0x13b837[_0x1d682c(0x216)],'push'),_0x8fce67=await getTargetFunctions(_0x13b837,_0x4aa0c9);if(_0x8fce67[_0x1d682c(0x20e)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x1d682c(0x22b)};const _0x4b8276=_0x4aa0c9['bool']('force'),_0x4f8fce=JSON[_0x1d682c(0x228)](JSON[_0x1d682c(0x223)](_0x5b8c61)),_0x57f38c=_0x4f8fce[_0x1d682c(0x1eb)][_0x4aa0c9[_0x1d682c(0x1ef)]];if(!_0x57f38c)throw new Error(_0x1d682c(0x219)+_0x4aa0c9['appCode']+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x3d8d6a=await buildHookMaps(_0x4aa0c9[_0x1d682c(0x1ef)],_0x4aa0c9['apiDir'],_0x8fce67,_0x57f38c),_0x30227d=[],_0x509b08=[],_0x3fa517=[];for(const _0x5f450c of _0x8fce67){const _0x48e744=await computeFileHash(_0x5f450c['filePath']),_0x35bc0f=_0x57f38c[_0x1d682c(0x227)][_0x5f450c['lockKey']];if(!_0x4b8276&&_0x35bc0f&&_0x35bc0f[_0x1d682c(0x1e9)]===_0x48e744){_0x509b08[_0x1d682c(0x202)]({'lockKey':_0x5f450c['lockKey'],'reason':_0x1d682c(0x1f5)});continue;}try{await uploadSingleFunction(_0x4aa0c9[_0x1d682c(0x1ef)],_0x5f450c,_0x57f38c,_0x3d8d6a);const _0x242838=_0x57f38c[_0x1d682c(0x227)][_0x5f450c[_0x1d682c(0x21c)]];_0x30227d[_0x1d682c(0x202)]({'lockKey':_0x5f450c['lockKey'],'remoteId':_0x242838?.[_0x1d682c(0x1e1)]??0x0});}catch(_0x55fe11){_0x3fa517[_0x1d682c(0x202)]({'lockKey':_0x5f450c[_0x1d682c(0x21c)],'error':_0x55fe11 instanceof Error?_0x55fe11[_0x1d682c(0x232)]:String(_0x55fe11)});}}_0x57f38c['lastSync']=new Date()[_0x1d682c(0x215)](),await writeBffLockFile(_0x13b837[_0x1d682c(0x212)],_0x4f8fce),await waitForUploadedLockEntries(_0x13b837['lockFilePath'],_0x4aa0c9[_0x1d682c(0x1ef)],_0x30227d[_0x1d682c(0x21f)](_0x2995f5=>_0x2995f5[_0x1d682c(0x21c)]));let _0x1ecc36={'attempted':![],'cleared':![]};if(_0x30227d[_0x1d682c(0x20e)]>0x0)try{let _0x5e1cde='';for(let _0x197764=0x0;_0x197764<CACHE_CLEAR_ATTEMPTS;_0x197764+=0x1){_0x5e1cde=await clearBffScriptCache(),_0x197764<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x1ecc36={'attempted':!![],'cleared':!![],'message':_0x5e1cde||_0x1d682c(0x201)};}catch(_0x5a0c11){_0x1ecc36={'attempted':!![],'cleared':![],'error':_0x5a0c11 instanceof Error?_0x5a0c11[_0x1d682c(0x232)]:String(_0x5a0c11)};}const _0x3421dd=_0x3fa517[_0x1d682c(0x20e)]===0x0&&(_0x1ecc36[_0x1d682c(0x1f3)]?_0x1ecc36[_0x1d682c(0x211)]:!![]),_0xca3257=_0x1ecc36[_0x1d682c(0x1f3)]?_0x1ecc36[_0x1d682c(0x211)]?_0x1d682c(0x1fa):_0x1d682c(0x207):_0x1d682c(0x21e);return{'ok':_0x3421dd,'data':{'uploaded':_0x30227d,'skipped':_0x509b08,'failed':_0x3fa517,'cacheClear':_0x1ecc36},'message':'Push\x20complete:\x20'+_0x30227d[_0x1d682c(0x20e)]+_0x1d682c(0x1ed)+_0x509b08[_0x1d682c(0x20e)]+_0x1d682c(0x1fd)+_0x3fa517['length']+_0x1d682c(0x206)+_0xca3257};}};async function getTargetFunctions(_0x292d2e,_0x22f3ec){const _0x5783e6=a32_0x52dcae,_0x21ba4d=_0x22f3ec[_0x5783e6(0x1e6)](_0x5783e6(0x22f)),_0x4f00be=_0x22f3ec[_0x5783e6(0x1e6)](_0x5783e6(0x229)),_0x4ebc48=normalizeBffType(_0x21ba4d)??undefined;if(_0x4f00be&&!_0x4ebc48)throw CliErrors[_0x5783e6(0x221)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x2e44c1=await scanLocalBffFunctions(_0x292d2e,_0x4ebc48);if(_0x4f00be){const _0x364445=_0x2e44c1['filter'](_0x1f8d08=>_0x1f8d08[_0x5783e6(0x229)]===_0x4f00be);if(_0x364445[_0x5783e6(0x20e)]===0x0)throw CliErrors[_0x5783e6(0x221)]('Local\x20function\x20not\x20found:\x20'+_0x4ebc48+'/'+_0x4f00be);return _0x364445;}return _0x2e44c1;}async function buildHookMaps(_0x1ab591,_0x26224a,_0x2b02ae,_0xdeeca){const _0x550149=a32_0x52dcae,_0xf40d17=_0x2b02ae[_0x550149(0x204)](_0x1498a2=>_0x1498a2[_0x550149(0x22f)]==='HOOK');if(!_0xf40d17)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x226d66=loadAliasMap(_0x26224a,undefined,resolveApiFilePath(_0x26224a,_0x1ab591)),_0x1b853c=new Map(_0x226d66[_0x550149(0x21f)](_0x2ec811=>[_0x2ec811[_0x550149(0x225)],_0x2ec811[_0x550149(0x20d)]]));for(const _0x5727e4 of Object[_0x550149(0x210)](_0xdeeca[_0x550149(0x227)])){_0x5727e4[_0x550149(0x225)]&&_0x5727e4['datasetCode']&&!_0x1b853c['has'](_0x5727e4['alias'])&&_0x1b853c[_0x550149(0x1e7)](_0x5727e4['alias'],_0x5727e4[_0x550149(0x20d)]);}const _0x34c16b=await listDatasets(_0x1ab591),_0x55bd5a=new Map(_0x34c16b['map'](_0x1044e6=>[_0x1044e6[_0x550149(0x208)],_0x1044e6]));return{'aliasToDatasetCode':_0x1b853c,'datasetCodeToDataset':_0x55bd5a};}async function uploadSingleFunction(_0x3b6ff4,_0x516d08,_0x5ae818,_0x1f6eb1){const _0x5dfacf=a32_0x52dcae,_0x490041=await readFile(_0x516d08[_0x5dfacf(0x233)],_0x5dfacf(0x224)),_0x514147=await computeFileHash(_0x516d08[_0x5dfacf(0x233)]),_0x3d4a20=_0x5ae818[_0x5dfacf(0x227)][_0x516d08['lockKey']];if(_0x3d4a20?.['remoteId']&&_0x3d4a20[_0x5dfacf(0x1f1)]==null)throw CliErrors['validation'](_0x516d08[_0x5dfacf(0x21c)]+_0x5dfacf(0x1f7));let _0x408e51=extractScriptDescription(_0x490041);if(!_0x408e51&&_0x3d4a20?.[_0x5dfacf(0x1e1)]){const _0x2bf6c6=await getBffScriptInfo(_0x3d4a20['remoteId']);_0x408e51=_0x2bf6c6[_0x5dfacf(0x209)]||undefined;}const _0x49f79a={'appCode':_0x3b6ff4,'functionName':_0x516d08[_0x5dfacf(0x229)],'scriptType':_0x516d08[_0x5dfacf(0x22f)],'scriptContent':_0x490041};if(_0x3d4a20?.[_0x5dfacf(0x1e1)])_0x49f79a['id']=_0x3d4a20[_0x5dfacf(0x1e1)];if(_0x3d4a20?.[_0x5dfacf(0x1f1)]!=null)_0x49f79a[_0x5dfacf(0x1f1)]=_0x3d4a20[_0x5dfacf(0x1f1)];if(_0x408e51)_0x49f79a[_0x5dfacf(0x209)]=_0x408e51;if(_0x516d08[_0x5dfacf(0x22f)]===_0x5dfacf(0x220)){const _0x514f13=_0x516d08['alias'];if(!_0x514f13||!_0x516d08[_0x5dfacf(0x217)]||!_0x516d08[_0x5dfacf(0x203)])throw CliErrors[_0x5dfacf(0x221)](_0x5dfacf(0x1e5)+_0x516d08[_0x5dfacf(0x21c)]);const _0x10af22=_0x1f6eb1[_0x5dfacf(0x20a)][_0x5dfacf(0x1f2)](_0x514f13)??_0x3d4a20?.[_0x5dfacf(0x20d)]??_0x514f13,_0x2d2fb7=_0x1f6eb1[_0x5dfacf(0x226)][_0x5dfacf(0x1f2)](_0x10af22);if(!_0x2d2fb7)throw CliErrors[_0x5dfacf(0x221)](_0x5dfacf(0x1e2)+_0x514f13+_0x5dfacf(0x222)+(_0x5dfacf(0x1e3)+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x49f79a[_0x5dfacf(0x1f6)]=_0x2d2fb7['id'],_0x49f79a[_0x5dfacf(0x217)]=_0x516d08[_0x5dfacf(0x217)],_0x49f79a[_0x5dfacf(0x203)]=_0x516d08['functionNode'];}const _0x13697a=await saveBffScript(_0x49f79a),_0x3e032f=_0x13697a['id'],_0x2dc68c=_0x13697a[_0x5dfacf(0x1ea)]??await getBffScriptInfo(_0x3e032f),_0x44d5c8={'hash':_0x514147,'remoteId':_0x3e032f,'version':_0x2dc68c[_0x5dfacf(0x1f1)]};if(_0x516d08[_0x5dfacf(0x22f)]===_0x5dfacf(0x220)){const _0x8dd9b9=_0x516d08['alias'],_0x36a772=_0x1f6eb1[_0x5dfacf(0x20a)][_0x5dfacf(0x1f2)](_0x8dd9b9)??_0x3d4a20?.[_0x5dfacf(0x20d)]??_0x8dd9b9;_0x1f6eb1[_0x5dfacf(0x20a)]['has'](_0x8dd9b9)?_0x44d5c8[_0x5dfacf(0x225)]=_0x8dd9b9:_0x44d5c8[_0x5dfacf(0x225)]=_0x3d4a20?.['alias'],_0x44d5c8[_0x5dfacf(0x20d)]=_0x36a772,_0x44d5c8[_0x5dfacf(0x217)]=_0x516d08['operationType'],_0x44d5c8['functionNode']=_0x516d08[_0x5dfacf(0x203)];}_0x5ae818[_0x5dfacf(0x227)][_0x516d08['lockKey']]=_0x44d5c8;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x3d6212,_0x186808,_0x489c91){const _0x4b343e=a32_0x52dcae;if(_0x489c91[_0x4b343e(0x20e)]===0x0)return;for(let _0x42126c=0x0;_0x42126c<LOCK_SETTLE_RETRY_COUNT;_0x42126c+=0x1){const _0x2e862d=await readBffLockFile(_0x3d6212),_0x2bb904=_0x2e862d?.['apps']?.[_0x186808]?.[_0x4b343e(0x227)]??{},_0x48fc4d=_0x489c91['every'](_0x10ed13=>!!_0x2bb904[_0x10ed13]?.['remoteId']);if(_0x48fc4d)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x4b343e(0x1e0)+_0x489c91[_0x4b343e(0x230)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a33_0x5cc84f=a33_0xcb77;(function(_0x377c34,_0x74f5a7){const _0x2f51e0=a33_0xcb77,_0x281e76=_0x377c34();while(!![]){try{const _0x9bc292=parseInt(_0x2f51e0(0x1a0))/0x1*(parseInt(_0x2f51e0(0x19a))/0x2)+-parseInt(_0x2f51e0(0x19c))/0x3*(parseInt(_0x2f51e0(0x1a3))/0x4)+parseInt(_0x2f51e0(0x1a1))/0x5*(parseInt(_0x2f51e0(0x19b))/0x6)+-parseInt(_0x2f51e0(0x1a5))/0x7+parseInt(_0x2f51e0(0x19e))/0x8*(parseInt(_0x2f51e0(0x194))/0x9)+-parseInt(_0x2f51e0(0x1ad))/0xa*(-parseInt(_0x2f51e0(0x192))/0xb)+parseInt(_0x2f51e0(0x199))/0xc*(-parseInt(_0x2f51e0(0x1ab))/0xd);if(_0x9bc292===_0x74f5a7)break;else _0x281e76['push'](_0x281e76['shift']());}catch(_0x4d1af0){_0x281e76['push'](_0x281e76['shift']());}}}(a33_0x18db,0xda838));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_0xcb77(_0x4d9d0b,_0xe09e77){_0x4d9d0b=_0x4d9d0b-0x18f;const _0x18dbe7=a33_0x18db();let _0xcb7741=_0x18dbe7[_0x4d9d0b];return _0xcb7741;}function a33_0x18db(){const _0x3126f1=['lockKey','push','apiDir','functions','4187014PKEmun','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','1064060qvJkAX','\x20added,\x20','\x20remote-only','length','scriptsRoot','lockFilePath','alias','All\x20BFF\x20scripts\x20are\x20in\x20sync.','datasetCode','all','44XveNYr','bool','13941SZaUlh','appCode','read','has','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','12PkmEcD','629726pIpdAP','2604iuQPqj','3LTNtnN','bff','3592XTXvNM','\x20unchanged','2xJBkKr','1910tEVnlA','map','1133708IvgMSl','boolean','2912714NSpbGc','status'];a33_0x18db=function(){return _0x3126f1;};return a33_0x18db();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a33_0x5cc84f(0x19d),'command':a33_0x5cc84f(0x1a6),'description':a33_0x5cc84f(0x1ac),'risk':a33_0x5cc84f(0x196),'flags':[{'name':'remote','type':a33_0x5cc84f(0x1a4),'description':a33_0x5cc84f(0x198)}],async 'execute'(_0x7c5d02){const _0x84348f=a33_0x5cc84f,_0x3a61b5=loadBffProjectConfig(_0x7c5d02[_0x84348f(0x195)]),_0x33c213=await readBffLockFile(_0x3a61b5[_0x84348f(0x1b2)]),{appLock:_0x4b0bcf}=ensureLockScope(_0x33c213??createEmptyBffLock(),_0x7c5d02[_0x84348f(0x195)],_0x3a61b5[_0x84348f(0x1b1)],_0x84348f(0x1a6)),_0x1eeb59=await scanLocalBffFunctions(_0x3a61b5),_0x3e8286=[],_0x263a91=[],_0x121806=[];for(const _0x2269b6 of _0x1eeb59){const _0x144275=await computeFileHash(_0x2269b6['filePath']),_0x4158ba=_0x4b0bcf['functions'][_0x2269b6[_0x84348f(0x1a7)]];if(!_0x4158ba)_0x3e8286[_0x84348f(0x1a8)](_0x2269b6[_0x84348f(0x1a7)]);else _0x4158ba['hash']!==_0x144275?_0x263a91[_0x84348f(0x1a8)](_0x2269b6[_0x84348f(0x1a7)]):_0x121806[_0x84348f(0x1a8)](_0x2269b6[_0x84348f(0x1a7)]);}const _0x2df759=[];if(_0x7c5d02[_0x84348f(0x193)]('remote')){const _0x336255=loadAliasMap(_0x7c5d02['apiDir'],undefined,resolveApiFilePath(_0x7c5d02[_0x84348f(0x1a9)],_0x7c5d02['appCode'])),_0xe194b=new Map(_0x336255[_0x84348f(0x1a2)](_0x117cf4=>[_0x117cf4[_0x84348f(0x190)],_0x117cf4[_0x84348f(0x1b3)]])),[_0x5e2fff,_0x1774da]=await Promise[_0x84348f(0x191)]([listBffScripts(_0x7c5d02['appCode']),getBffScriptStatistics(_0x7c5d02[_0x84348f(0x195)])]),_0xfaa2b1=createHookLocationMap(_0x1774da),_0x24b29e=new Set(_0x1eeb59[_0x84348f(0x1a2)](_0x4336f6=>_0x4336f6[_0x84348f(0x1a7)]));for(const _0x8a5548 of _0x5e2fff){const _0x2f3b25=resolveRemoteScriptTarget(_0x3a61b5,_0x8a5548,_0xfaa2b1,_0x4b0bcf[_0x84348f(0x1aa)],_0xe194b);_0x2f3b25&&!_0x24b29e[_0x84348f(0x197)](_0x2f3b25[_0x84348f(0x1a7)])&&_0x2df759[_0x84348f(0x1a8)](_0x2f3b25[_0x84348f(0x1a7)]);}}const _0x176ff3=_0x3e8286[_0x84348f(0x1b0)]===0x0&&_0x263a91[_0x84348f(0x1b0)]===0x0&&_0x2df759[_0x84348f(0x1b0)]===0x0;return{'ok':!![],'data':{'added':_0x3e8286,'modified':_0x263a91,'unchanged':_0x121806,'remoteOnly':_0x2df759},'message':_0x176ff3?_0x84348f(0x18f):_0x3e8286[_0x84348f(0x1b0)]+_0x84348f(0x1ae)+_0x263a91['length']+'\x20modified,\x20'+_0x121806[_0x84348f(0x1b0)]+_0x84348f(0x19f)+(_0x2df759[_0x84348f(0x1b0)]>0x0?',\x20'+_0x2df759[_0x84348f(0x1b0)]+_0x84348f(0x1af):'')};}};
1
+ const a33_0x235f56=a33_0x42cb;(function(_0x52d70f,_0x4bbd66){const _0x434232=a33_0x42cb,_0x2fcd1f=_0x52d70f();while(!![]){try{const _0xd457d9=parseInt(_0x434232(0x10d))/0x1*(parseInt(_0x434232(0x10b))/0x2)+parseInt(_0x434232(0x116))/0x3+-parseInt(_0x434232(0x12a))/0x4*(parseInt(_0x434232(0x113))/0x5)+-parseInt(_0x434232(0x10f))/0x6*(-parseInt(_0x434232(0x11e))/0x7)+parseInt(_0x434232(0x124))/0x8*(-parseInt(_0x434232(0x10e))/0x9)+-parseInt(_0x434232(0x111))/0xa+parseInt(_0x434232(0x115))/0xb;if(_0xd457d9===_0x4bbd66)break;else _0x2fcd1f['push'](_0x2fcd1f['shift']());}catch(_0x31bd75){_0x2fcd1f['push'](_0x2fcd1f['shift']());}}}(a33_0x21c8,0xcc41e));function a33_0x42cb(_0x2a0c61,_0x21f829){_0x2a0c61=_0x2a0c61-0x10a;const _0x21c81f=a33_0x21c8();let _0x42cbbf=_0x21c81f[_0x2a0c61];return _0x42cbbf;}import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a33_0x21c8(){const _0x5bb640=['Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','\x20unchanged','length','135506paplxd','apiDir','map','\x20added,\x20','hash','boolean','128GGorFa','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','functions','\x20modified,\x20','remote','read','264ctUqgX','has','push','status','22414Gmpxpe','appCode','80mzJolB','910647XqtgQP','114bStywX','scriptsRoot','15889860nCgJeD','filePath','44815CoFvsP','lockFilePath','31400336wrcyTq','1551516UQiYpT','lockKey','alias','bff','bool'];a33_0x21c8=function(){return _0x5bb640;};return a33_0x21c8();}export const bffStatus={'service':a33_0x235f56(0x119),'command':a33_0x235f56(0x10a),'description':a33_0x235f56(0x11b),'risk':a33_0x235f56(0x129),'flags':[{'name':'remote','type':a33_0x235f56(0x123),'description':a33_0x235f56(0x125)}],async 'execute'(_0x5bf7c0){const _0x274398=a33_0x235f56,_0x3d2836=loadBffProjectConfig(_0x5bf7c0['appCode']),_0x3f5e13=await readBffLockFile(_0x3d2836[_0x274398(0x114)]),{appLock:_0x28a25f}=ensureLockScope(_0x3f5e13??createEmptyBffLock(),_0x5bf7c0[_0x274398(0x10c)],_0x3d2836[_0x274398(0x110)],_0x274398(0x10a)),_0x30e45f=await scanLocalBffFunctions(_0x3d2836),_0x481c9a=[],_0x1c9a2d=[],_0x4433a2=[];for(const _0x3ca45a of _0x30e45f){const _0x29c5cb=await computeFileHash(_0x3ca45a[_0x274398(0x112)]),_0x105545=_0x28a25f[_0x274398(0x126)][_0x3ca45a['lockKey']];if(!_0x105545)_0x481c9a[_0x274398(0x12c)](_0x3ca45a[_0x274398(0x117)]);else _0x105545[_0x274398(0x122)]!==_0x29c5cb?_0x1c9a2d[_0x274398(0x12c)](_0x3ca45a[_0x274398(0x117)]):_0x4433a2[_0x274398(0x12c)](_0x3ca45a[_0x274398(0x117)]);}const _0x3045ce=[];if(_0x5bf7c0[_0x274398(0x11a)](_0x274398(0x128))){const _0x41824e=loadAliasMap(_0x5bf7c0[_0x274398(0x11f)],undefined,resolveApiFilePath(_0x5bf7c0[_0x274398(0x11f)],_0x5bf7c0['appCode'])),_0x14a369=new Map(_0x41824e[_0x274398(0x120)](_0x157253=>[_0x157253['datasetCode'],_0x157253[_0x274398(0x118)]])),[_0x3af8ff,_0xda376b]=await Promise['all']([listBffScripts(_0x5bf7c0[_0x274398(0x10c)]),getBffScriptStatistics(_0x5bf7c0[_0x274398(0x10c)])]),_0x122b95=createHookLocationMap(_0xda376b),_0x1b9a12=new Set(_0x30e45f[_0x274398(0x120)](_0x6fd496=>_0x6fd496[_0x274398(0x117)]));for(const _0x513c56 of _0x3af8ff){const _0x109f23=resolveRemoteScriptTarget(_0x3d2836,_0x513c56,_0x122b95,_0x28a25f[_0x274398(0x126)],_0x14a369);_0x109f23&&!_0x1b9a12[_0x274398(0x12b)](_0x109f23[_0x274398(0x117)])&&_0x3045ce[_0x274398(0x12c)](_0x109f23['lockKey']);}}const _0x533b1a=_0x481c9a[_0x274398(0x11d)]===0x0&&_0x1c9a2d[_0x274398(0x11d)]===0x0&&_0x3045ce[_0x274398(0x11d)]===0x0;return{'ok':!![],'data':{'added':_0x481c9a,'modified':_0x1c9a2d,'unchanged':_0x4433a2,'remoteOnly':_0x3045ce},'message':_0x533b1a?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x481c9a[_0x274398(0x11d)]+_0x274398(0x121)+_0x1c9a2d[_0x274398(0x11d)]+_0x274398(0x127)+_0x4433a2[_0x274398(0x11d)]+_0x274398(0x11c)+(_0x3045ce[_0x274398(0x11d)]>0x0?',\x20'+_0x3045ce['length']+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a34_0x2757d2=a34_0x28a8;(function(_0x3d382,_0x1ad3fb){const _0xb7628d=a34_0x28a8,_0x2b04da=_0x3d382();while(!![]){try{const _0x1a807a=parseInt(_0xb7628d(0x1d7))/0x1+-parseInt(_0xb7628d(0x1e5))/0x2+-parseInt(_0xb7628d(0x1ad))/0x3*(parseInt(_0xb7628d(0x1ab))/0x4)+parseInt(_0xb7628d(0x1e2))/0x5+parseInt(_0xb7628d(0x1d1))/0x6+parseInt(_0xb7628d(0x1b7))/0x7*(parseInt(_0xb7628d(0x1b6))/0x8)+-parseInt(_0xb7628d(0x1e0))/0x9;if(_0x1a807a===_0x1ad3fb)break;else _0x2b04da['push'](_0x2b04da['shift']());}catch(_0x1c9369){_0x2b04da['push'](_0x2b04da['shift']());}}}(a34_0xb923,0xe1c4e));import a34_0x1a3141 from'chalk';import a34_0x59beef from'ora';import a34_0x1e6e68 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 _0x230f06=a34_0x28a8;return GIT_COMMIT!==_0x230f06(0x1ef)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x23e28d=a34_0x28a8,_0x437282=process[_0x23e28d(0x1d9)][_0x23e28d(0x1f2)]();if(_0x437282[_0x23e28d(0x1db)](_0x23e28d(0x1d6)))return _0x23e28d(0x1d6);return'npm';}const updateFlags=[{'name':a34_0x2757d2(0x1ce),'type':a34_0x2757d2(0x1f0),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a34_0x2757d2(0x1c7),'type':a34_0x2757d2(0x1b2),'description':a34_0x2757d2(0x1b8)},{'name':'no-skills','type':a34_0x2757d2(0x1f0),'description':a34_0x2757d2(0x1a6),'default':![]},{'name':a34_0x2757d2(0x1a3),'type':a34_0x2757d2(0x1f0),'description':a34_0x2757d2(0x1e3),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x310ee7){const _0x1955ee=a34_0x2757d2;return _0x310ee7[_0x1955ee(0x1d5)](_0x1955ee(0x1c7))['trim']();}function shouldSkipOfficialSkill(_0x219236){const _0x4964a3=a34_0x2757d2;return _0x219236[_0x4964a3(0x1c6)](_0x4964a3(0x1cb))||_0x219236['flag']('skills')===![];}function a34_0x28a8(_0x398355,_0x2406c2){_0x398355=_0x398355-0x1a1;const _0xb9230e=a34_0xb923();let _0x28a87f=_0xb9230e[_0x398355];return _0x28a87f;}async function validateUpdateFlags(_0x4bc275){const _0x573cab=a34_0x2757d2,_0x29085c=_0x4bc275['bool'](_0x573cab(0x1ce)),_0x3b7be2=getRequestedVersion(_0x4bc275);if(_0x29085c&&_0x3b7be2)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x573cab(0x1c0));if(_0x3b7be2&&!a34_0x1e6e68[_0x573cab(0x1d2)](_0x3b7be2))throw CliErrors[_0x573cab(0x1ac)](_0x573cab(0x1bd)+_0x3b7be2,_0x573cab(0x1df));}async function fetchNpmDistTags(){const _0x3276a5=a34_0x2757d2;try{const _0xc51662=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3276a5(0x1be),{'signal':AbortSignal['timeout'](0x2710)});if(!_0xc51662['ok'])return null;const _0xe3ade3=await _0xc51662['json']();if(!_0xe3ade3||typeof _0xe3ade3!=='object')return null;return Object[_0x3276a5(0x1cd)](Object[_0x3276a5(0x1bf)](_0xe3ade3)[_0x3276a5(0x1cc)](([,_0x27a174])=>typeof _0x27a174===_0x3276a5(0x1b2)&&_0x27a174['trim']()[_0x3276a5(0x1b5)]>0x0)[_0x3276a5(0x1e9)](([_0x3fc8e7,_0x3dbf0c])=>[_0x3fc8e7,String(_0x3dbf0c)[_0x3276a5(0x1eb)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x165e8f){const _0x138916=await fetchNpmDistTags();return _0x138916?.[_0x165e8f]??null;}async function fetchLatestVersion(){const _0x3f2866=a34_0x2757d2;return fetchNpmDistTagVersion(_0x3f2866(0x1a7));}function a34_0xb923(){const _0x351135=['source','trim','green','red','\x20\x20Run\x20manually:\x20','unknown','boolean','\x20\x20Try\x20manually:\x20','toLowerCase','fail','Checking\x20official\x20skill\x20package...','inherit','skills','Version\x20comparison\x20failed','pipe','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','latest','Skipping\x20official\x20skill\x20package\x20(--no-skills).','log','...','4dGcFAO','validation','1184187BCpFnY','info','Already\x20on\x20requested\x20version\x20(v','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','Updated\x20to\x20v','string','start','install','length','4818696zSYWAJ','7gwxMIz','Install\x20a\x20specific\x20CLI\x20version','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','\x20→\x20','nonInteractive','\x20\x20Official\x20skill\x20update\x20failed:\x20','Invalid\x20version:\x20','/dist-tags','entries','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','skipped','Beta\x20version:\x20','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','Current\x20version:\x20','bool','version','Requested\x20version:\x20','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','write','no-skills','filter','fromEntries','beta','run','npm','1150722uJSmGo','valid','Updating\x20via\x20','Update\x20available:\x20','str','bun','1565681EbqLck','cwd','execPath','message','includes','yellow','Checking\x20for\x20updates...','succeed','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','12042918tmCbTO','error','6281975KbAQxg','Refresh\x20official\x20skill\x20package\x20after\x20updating','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','1917238AOPkNJ','warn','gray','Already\x20up\x20to\x20date\x20(v','map'];a34_0xb923=function(){return _0x351135;};return a34_0xb923();}async function resolveTargetVersion(_0x10a3b4){const _0x3b1475=a34_0x2757d2,_0x29f8a1=getRequestedVersion(_0x10a3b4);if(_0x29f8a1)return{'version':_0x29f8a1,'source':_0x3b1475(0x1c7)};if(_0x10a3b4[_0x3b1475(0x1c6)](_0x3b1475(0x1ce))){const _0x2705e5=await fetchNpmDistTagVersion(_0x3b1475(0x1ce));if(!_0x2705e5)return null;return{'version':_0x2705e5,'source':_0x3b1475(0x1ce)};}const _0x202914=await fetchLatestVersion();if(!_0x202914)return null;return{'version':_0x202914,'source':_0x3b1475(0x1a7)};}function shouldInstallTarget(_0x4daafd,_0x3b3a33){const _0x99d0f2=a34_0x2757d2;if(_0x3b3a33[_0x99d0f2(0x1ea)]==='version'||_0x3b3a33[_0x99d0f2(0x1ea)]===_0x99d0f2(0x1ce))return!a34_0x1e6e68['eq'](_0x4daafd,_0x3b3a33[_0x99d0f2(0x1c7)]);return a34_0x1e6e68['lt'](_0x4daafd,_0x3b3a33[_0x99d0f2(0x1c7)]);}function getInstallPlanLabel(_0x181d39,_0x52b87a){const _0xd17b5d=a34_0x2757d2;switch(_0x52b87a[_0xd17b5d(0x1ea)]){case _0xd17b5d(0x1ce):return _0xd17b5d(0x1c2)+a34_0x1a3141[_0xd17b5d(0x1dc)](_0x181d39)+_0xd17b5d(0x1ba)+a34_0x1a3141[_0xd17b5d(0x1ec)](_0x52b87a[_0xd17b5d(0x1c7)]);case _0xd17b5d(0x1c7):return _0xd17b5d(0x1c8)+a34_0x1a3141[_0xd17b5d(0x1dc)](_0x181d39)+_0xd17b5d(0x1ba)+a34_0x1a3141[_0xd17b5d(0x1ec)](_0x52b87a[_0xd17b5d(0x1c7)]);case _0xd17b5d(0x1a7):default:return _0xd17b5d(0x1d4)+a34_0x1a3141[_0xd17b5d(0x1dc)](_0x181d39)+_0xd17b5d(0x1ba)+a34_0x1a3141[_0xd17b5d(0x1ec)](_0x52b87a[_0xd17b5d(0x1c7)]);}}async function installOfficialSkill(_0x5d4d29){const _0xfbaa53=a34_0x2757d2;console[_0xfbaa53(0x1a9)](a34_0x1a3141[_0xfbaa53(0x1e7)](_0xfbaa53(0x1a1)));const _0x336303=runNpxSkillsAddGlobal(process[_0xfbaa53(0x1d8)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x5d4d29?_0xfbaa53(0x1a5):_0xfbaa53(0x1a2)});if(_0x336303[_0xfbaa53(0x1c1)]){console[_0xfbaa53(0x1a9)](a34_0x1a3141[_0xfbaa53(0x1e7)](_0xfbaa53(0x1e4)));return;}if(_0x336303['ok']){console[_0xfbaa53(0x1a9)](a34_0x1a3141['gray'](_0xfbaa53(0x1c4)));return;}console[_0xfbaa53(0x1e6)](a34_0x1a3141['yellow'](_0xfbaa53(0x1bc)+(_0x336303[_0xfbaa53(0x1e1)]||_0xfbaa53(0x1ef)))),console[_0xfbaa53(0x1a9)](a34_0x1a3141[_0xfbaa53(0x1e7)](_0xfbaa53(0x1ee)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x3dad97){const _0x42001f=a34_0x2757d2;await validateUpdateFlags(_0x3dad97);const _0x4294db=getCurrentVersion();console[_0x42001f(0x1a9)](_0x42001f(0x1c5)+_0x4294db);const _0x4cd9b4=a34_0x59beef(_0x42001f(0x1dd))[_0x42001f(0x1b3)](),_0x394b83=await resolveTargetVersion(_0x3dad97);if(!_0x394b83){const _0x13c97f=_0x3dad97[_0x42001f(0x1c6)](_0x42001f(0x1ce))?_0x42001f(0x1c9):'Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)';return _0x4cd9b4[_0x42001f(0x1f3)](_0x13c97f),console['log'](a34_0x1a3141['gray'](_0x42001f(0x1c3)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x13c97f};}const _0x3f1009=a34_0x1e6e68['valid'](VERSION),_0x3ddcc9=a34_0x1e6e68[_0x42001f(0x1d2)](_0x394b83[_0x42001f(0x1c7)]);if(!_0x3f1009||!_0x3ddcc9)return _0x4cd9b4['fail'](_0x42001f(0x1a4)),{'ok':![],'message':_0x42001f(0x1a4)};if(!shouldInstallTarget(_0x3f1009,_0x394b83)){const _0x26d0c6=_0x394b83[_0x42001f(0x1ea)]===_0x42001f(0x1c7)?_0x42001f(0x1af)+_0x394b83[_0x42001f(0x1c7)]+')':_0x42001f(0x1e8)+_0x394b83[_0x42001f(0x1c7)]+')';return _0x4cd9b4[_0x42001f(0x1de)](_0x26d0c6),shouldSkipOfficialSkill(_0x3dad97)?console[_0x42001f(0x1a9)](a34_0x1a3141[_0x42001f(0x1e7)](_0x42001f(0x1a8))):await installOfficialSkill(_0x3dad97[_0x42001f(0x1bb)]),{'ok':!![]};}_0x4cd9b4[_0x42001f(0x1ae)](getInstallPlanLabel(_0x4294db,_0x394b83));const _0xae758b=detectPackageManager(),_0x31a1cc=_0xae758b===_0x42001f(0x1d0)?resolveNpmBin(_0x42001f(0x1d0)):_0xae758b,_0x15ea5f=a34_0x59beef(_0x42001f(0x1d3)+_0xae758b+_0x42001f(0x1aa))[_0x42001f(0x1b3)]();try{return await execa(_0x31a1cc,[_0x42001f(0x1b4),'-g',NPM_PACKAGE_NAME+'@'+_0x394b83[_0x42001f(0x1c7)]],{'stdio':_0x42001f(0x1a5)}),_0x15ea5f[_0x42001f(0x1de)](_0x42001f(0x1b1)+_0x394b83[_0x42001f(0x1c7)]),console[_0x42001f(0x1a9)](a34_0x1a3141[_0x42001f(0x1e7)](_0x42001f(0x1b0))),shouldSkipOfficialSkill(_0x3dad97)?console[_0x42001f(0x1a9)](a34_0x1a3141[_0x42001f(0x1e7)](_0x42001f(0x1a8))):await installOfficialSkill(_0x3dad97['nonInteractive']),{'ok':!![]};}catch(_0x49a013){return _0x15ea5f[_0x42001f(0x1f3)]('Update\x20failed'),console['error'](a34_0x1a3141[_0x42001f(0x1ed)]('\x20\x20'+_0x49a013[_0x42001f(0x1da)])),console[_0x42001f(0x1a9)](a34_0x1a3141[_0x42001f(0x1e7)](_0x42001f(0x1f1)+_0xae758b+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x394b83[_0x42001f(0x1c7)])),{'ok':![],'message':_0x49a013[_0x42001f(0x1da)]};}}export const updateDefinition={'service':'update','command':a34_0x2757d2(0x1cf),'description':a34_0x2757d2(0x1b9),'risk':a34_0x2757d2(0x1ca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ function a34_0xc4e5(){const _0x48cd4c=['version','fail','gray','log','latest','13Ksypve','beta','run','unknown','green','validation','install','bool','43113bWCWDv','/dist-tags','timeout','Already\x20on\x20requested\x20version\x20(v','65034vEfdZI','Checking\x20official\x20skill\x20package...','Version\x20comparison\x20failed','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','yellow','succeed','error','nonInteractive','340iOlzXD','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','\x20install\x20-g\x20','\x20→\x20','20XLaDLv','message','warn','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','includes','https://registry.npmjs.org/-/package/','start','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','skipped','1568cGdKJm','...','Requested\x20version:\x20','npm','pipe','1488NOrkkx','Skipping\x20official\x20skill\x20package\x20(--no-skills).','3hIVMlV','81200QazqrB','red','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','trim','Update\x20failed','13995564jXbtAl','valid','filter','flag','\x20\x20Official\x20skill\x20update\x20failed:\x20','bun','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','source','865542qnMkge','Current\x20version:\x20','map','json','object','execPath','inherit','Checking\x20for\x20updates...','string','\x20\x20Run\x20manually:\x20','3659343qASPMo','@latest','no-skills','Invalid\x20version:\x20','str','Beta\x20version:\x20','\x20\x20Try\x20manually:\x20','162448pKxFsr','boolean','Already\x20up\x20to\x20date\x20(v'];a34_0xc4e5=function(){return _0x48cd4c;};return a34_0xc4e5();}const a34_0x33d245=a34_0x3aba;(function(_0x3858ee,_0xf4f77f){const _0x155451=a34_0x3aba,_0x12f30f=_0x3858ee();while(!![]){try{const _0x3e6004=parseInt(_0x155451(0x99))/0x1*(parseInt(_0x155451(0xa7))/0x2)+-parseInt(_0x155451(0xb1))/0x3+-parseInt(_0x155451(0x9a))/0x4*(parseInt(_0x155451(0x89))/0x5)+parseInt(_0x155451(0x97))/0x6*(parseInt(_0x155451(0x78))/0x7)+-parseInt(_0x155451(0x92))/0x8*(parseInt(_0x155451(0x7c))/0x9)+parseInt(_0x155451(0x85))/0xa*(-parseInt(_0x155451(0x68))/0xb)+-parseInt(_0x155451(0x9f))/0xc*(-parseInt(_0x155451(0x70))/0xd);if(_0x3e6004===_0xf4f77f)break;else _0x12f30f['push'](_0x12f30f['shift']());}catch(_0x5567a0){_0x12f30f['push'](_0x12f30f['shift']());}}}(a34_0xc4e5,0xbca2d));import a34_0x5b5eed from'chalk';import a34_0x22d099 from'ora';import a34_0x22d276 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(){return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x31668a=a34_0x3aba,_0x4c4c2c=process[_0x31668a(0xac)]['toLowerCase']();if(_0x4c4c2c[_0x31668a(0x8d)]('bun'))return _0x31668a(0xa4);return'npm';}const updateFlags=[{'name':a34_0x33d245(0x71),'type':a34_0x33d245(0x69),'description':a34_0x33d245(0x7f),'default':![]},{'name':'version','type':a34_0x33d245(0xaf),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':a34_0x33d245(0xb3),'type':a34_0x33d245(0x69),'description':'Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','default':![]},{'name':'skills','type':'boolean','description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0xcdbe45){const _0x2cd0e5=a34_0x33d245;return _0xcdbe45[_0x2cd0e5(0x65)]('version')[_0x2cd0e5(0x9d)]();}function shouldSkipOfficialSkill(_0x383503){const _0x4a26c1=a34_0x33d245;return _0x383503[_0x4a26c1(0x77)]('no-skills')||_0x383503[_0x4a26c1(0xa2)]('skills')===![];}async function validateUpdateFlags(_0x5b0f8f){const _0x209202=a34_0x33d245,_0x2a5c07=_0x5b0f8f[_0x209202(0x77)](_0x209202(0x71)),_0x3ec1a6=getRequestedVersion(_0x5b0f8f);if(_0x2a5c07&&_0x3ec1a6)throw CliErrors[_0x209202(0x75)](_0x209202(0x86),'Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x3ec1a6&&!a34_0x22d276[_0x209202(0xa0)](_0x3ec1a6))throw CliErrors[_0x209202(0x75)](_0x209202(0xb4)+_0x3ec1a6,_0x209202(0xa5));}async function fetchNpmDistTags(){const _0x3aca10=a34_0x33d245;try{const _0x773cfd=await fetch(_0x3aca10(0x8e)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x3aca10(0x79),{'signal':AbortSignal[_0x3aca10(0x7a)](0x2710)});if(!_0x773cfd['ok'])return null;const _0x1a8773=await _0x773cfd[_0x3aca10(0xaa)]();if(!_0x1a8773||typeof _0x1a8773!==_0x3aca10(0xab))return null;return Object['fromEntries'](Object['entries'](_0x1a8773)[_0x3aca10(0xa1)](([,_0x2ad956])=>typeof _0x2ad956===_0x3aca10(0xaf)&&_0x2ad956[_0x3aca10(0x9d)]()['length']>0x0)[_0x3aca10(0xa9)](([_0x2fe129,_0xeef0e6])=>[_0x2fe129,String(_0xeef0e6)[_0x3aca10(0x9d)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x50bfab){const _0x591e13=await fetchNpmDistTags();return _0x591e13?.[_0x50bfab]??null;}async function fetchLatestVersion(){const _0x32e673=a34_0x33d245;return fetchNpmDistTagVersion(_0x32e673(0x6f));}async function resolveTargetVersion(_0x4cc2ec){const _0x32145c=a34_0x33d245,_0x470634=getRequestedVersion(_0x4cc2ec);if(_0x470634)return{'version':_0x470634,'source':_0x32145c(0x6b)};if(_0x4cc2ec[_0x32145c(0x77)](_0x32145c(0x71))){const _0x1a38a8=await fetchNpmDistTagVersion('beta');if(!_0x1a38a8)return null;return{'version':_0x1a38a8,'source':_0x32145c(0x71)};}const _0x1fe232=await fetchLatestVersion();if(!_0x1fe232)return null;return{'version':_0x1fe232,'source':_0x32145c(0x6f)};}function shouldInstallTarget(_0x3b4f59,_0x7efa2a){const _0x4a5231=a34_0x33d245;if(_0x7efa2a['source']==='version'||_0x7efa2a[_0x4a5231(0xa6)]===_0x4a5231(0x71))return!a34_0x22d276['eq'](_0x3b4f59,_0x7efa2a[_0x4a5231(0x6b)]);return a34_0x22d276['lt'](_0x3b4f59,_0x7efa2a[_0x4a5231(0x6b)]);}function a34_0x3aba(_0x2f33c3,_0xe19d92){_0x2f33c3=_0x2f33c3-0x65;const _0xc4e5aa=a34_0xc4e5();let _0x3aba86=_0xc4e5aa[_0x2f33c3];return _0x3aba86;}function getInstallPlanLabel(_0x26bb76,_0x583c22){const _0x4bee91=a34_0x33d245;switch(_0x583c22[_0x4bee91(0xa6)]){case _0x4bee91(0x71):return _0x4bee91(0x66)+a34_0x5b5eed[_0x4bee91(0x81)](_0x26bb76)+_0x4bee91(0x88)+a34_0x5b5eed[_0x4bee91(0x74)](_0x583c22['version']);case _0x4bee91(0x6b):return _0x4bee91(0x94)+a34_0x5b5eed[_0x4bee91(0x81)](_0x26bb76)+_0x4bee91(0x88)+a34_0x5b5eed[_0x4bee91(0x74)](_0x583c22[_0x4bee91(0x6b)]);case'latest':default:return'Update\x20available:\x20'+a34_0x5b5eed['yellow'](_0x26bb76)+_0x4bee91(0x88)+a34_0x5b5eed[_0x4bee91(0x74)](_0x583c22[_0x4bee91(0x6b)]);}}async function installOfficialSkill(_0x710415){const _0x562c35=a34_0x33d245;console['log'](a34_0x5b5eed[_0x562c35(0x6d)](_0x562c35(0x7d)));const _0x35bd10=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x710415?_0x562c35(0x96):_0x562c35(0xad)});if(_0x35bd10[_0x562c35(0x91)]){console[_0x562c35(0x6e)](a34_0x5b5eed[_0x562c35(0x6d)](_0x562c35(0x8c)));return;}if(_0x35bd10['ok']){console[_0x562c35(0x6e)](a34_0x5b5eed[_0x562c35(0x6d)]('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x562c35(0x8b)](a34_0x5b5eed[_0x562c35(0x81)](_0x562c35(0xa3)+(_0x35bd10['error']||_0x562c35(0x73)))),console[_0x562c35(0x6e)](a34_0x5b5eed[_0x562c35(0x6d)](_0x562c35(0xb0)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x9987bb){const _0x167161=a34_0x33d245;await validateUpdateFlags(_0x9987bb);const _0x305b1b=getCurrentVersion();console['log'](_0x167161(0xa8)+_0x305b1b);const _0x65773b=a34_0x22d099(_0x167161(0xae))[_0x167161(0x8f)](),_0x4dd359=await resolveTargetVersion(_0x9987bb);if(!_0x4dd359){const _0x3cf2e6=_0x9987bb[_0x167161(0x77)](_0x167161(0x71))?_0x167161(0x80):_0x167161(0x90);return _0x65773b[_0x167161(0x6c)](_0x3cf2e6),console[_0x167161(0x6e)](a34_0x5b5eed[_0x167161(0x6d)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x167161(0xb2))),{'ok':![],'message':_0x3cf2e6};}const _0x59360a=a34_0x22d276[_0x167161(0xa0)](VERSION),_0x1effb9=a34_0x22d276['valid'](_0x4dd359[_0x167161(0x6b)]);if(!_0x59360a||!_0x1effb9)return _0x65773b[_0x167161(0x6c)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x167161(0x7e)};if(!shouldInstallTarget(_0x59360a,_0x4dd359)){const _0x56e941=_0x4dd359[_0x167161(0xa6)]==='version'?_0x167161(0x7b)+_0x4dd359[_0x167161(0x6b)]+')':_0x167161(0x6a)+_0x4dd359[_0x167161(0x6b)]+')';return _0x65773b[_0x167161(0x82)](_0x56e941),shouldSkipOfficialSkill(_0x9987bb)?console[_0x167161(0x6e)](a34_0x5b5eed[_0x167161(0x6d)](_0x167161(0x98))):await installOfficialSkill(_0x9987bb['nonInteractive']),{'ok':!![]};}_0x65773b['info'](getInstallPlanLabel(_0x305b1b,_0x4dd359));const _0x2d0e6a=detectPackageManager(),_0x5f24d1=_0x2d0e6a===_0x167161(0x95)?resolveNpmBin(_0x167161(0x95)):_0x2d0e6a,_0x40b89b=a34_0x22d099('Updating\x20via\x20'+_0x2d0e6a+_0x167161(0x93))[_0x167161(0x8f)]();try{return await execa(_0x5f24d1,[_0x167161(0x76),'-g',NPM_PACKAGE_NAME+'@'+_0x4dd359[_0x167161(0x6b)]],{'stdio':_0x167161(0x96)}),_0x40b89b['succeed']('Updated\x20to\x20v'+_0x4dd359[_0x167161(0x6b)]),console[_0x167161(0x6e)](a34_0x5b5eed[_0x167161(0x6d)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipOfficialSkill(_0x9987bb)?console[_0x167161(0x6e)](a34_0x5b5eed['gray'](_0x167161(0x98))):await installOfficialSkill(_0x9987bb[_0x167161(0x84)]),{'ok':!![]};}catch(_0x347ef1){return _0x40b89b[_0x167161(0x6c)](_0x167161(0x9e)),console[_0x167161(0x83)](a34_0x5b5eed[_0x167161(0x9b)]('\x20\x20'+_0x347ef1[_0x167161(0x8a)])),console[_0x167161(0x6e)](a34_0x5b5eed['gray'](_0x167161(0x67)+_0x2d0e6a+_0x167161(0x87)+NPM_PACKAGE_NAME+'@'+_0x4dd359[_0x167161(0x6b)])),{'ok':![],'message':_0x347ef1[_0x167161(0x8a)]};}}export const updateDefinition={'service':'update','command':a34_0x33d245(0x72),'description':a34_0x33d245(0x9c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a35_0x259c(_0x18e4e6,_0x50956f){_0x18e4e6=_0x18e4e6-0x12f;const _0x4ca539=a35_0x4ca5();let _0x259c2f=_0x4ca539[_0x18e4e6];return _0x259c2f;}function a35_0x4ca5(){const _0x30c236=['2814816MtWMpu','1626919RvMleb','18PzkXgy','516NPvaoN','14420400TdpRhA','2554880ksVTNO','32256954vFekks','1594327oVQhxN','53195xuAaiP'];a35_0x4ca5=function(){return _0x30c236;};return a35_0x4ca5();}(function(_0x16fbf8,_0x4a5d1d){const _0x22921b=a35_0x259c,_0x2ca505=_0x16fbf8();while(!![]){try{const _0x24d33d=-parseInt(_0x22921b(0x133))/0x1+-parseInt(_0x22921b(0x131))/0x2+-parseInt(_0x22921b(0x135))/0x3+parseInt(_0x22921b(0x12f))/0x4*(-parseInt(_0x22921b(0x134))/0x5)+-parseInt(_0x22921b(0x137))/0x6*(-parseInt(_0x22921b(0x136))/0x7)+parseInt(_0x22921b(0x130))/0x8+parseInt(_0x22921b(0x132))/0x9;if(_0x24d33d===_0x4a5d1d)break;else _0x2ca505['push'](_0x2ca505['shift']());}catch(_0x485c70){_0x2ca505['push'](_0x2ca505['shift']());}}}(a35_0x4ca5,0xdc13d));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ function a35_0x31ba(_0xd99361,_0x60efde){_0xd99361=_0xd99361-0x162;const _0x572c3c=a35_0x572c();let _0x31ba65=_0x572c3c[_0xd99361];return _0x31ba65;}function a35_0x572c(){const _0x2e2618=['4616832gtgATs','3449655tyOKFI','138914ntaJub','5144482dAQnMN','3DqAORK','3641114mlcbAd','9678030OHyMQg','4657528OqEfDR'];a35_0x572c=function(){return _0x2e2618;};return a35_0x572c();}(function(_0x294213,_0x53bf7d){const _0x65a3f6=a35_0x31ba,_0x30a05f=_0x294213();while(!![]){try{const _0x2a22b3=parseInt(_0x65a3f6(0x163))/0x1+parseInt(_0x65a3f6(0x166))/0x2*(parseInt(_0x65a3f6(0x165))/0x3)+parseInt(_0x65a3f6(0x169))/0x4+-parseInt(_0x65a3f6(0x162))/0x5+-parseInt(_0x65a3f6(0x167))/0x6+parseInt(_0x65a3f6(0x164))/0x7+-parseInt(_0x65a3f6(0x168))/0x8;if(_0x2a22b3===_0x53bf7d)break;else _0x30a05f['push'](_0x30a05f['shift']());}catch(_0x2c6246){_0x30a05f['push'](_0x30a05f['shift']());}}}(a35_0x572c,0xeb396));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a36_0x24f52a=a36_0x22c1;(function(_0x1e867b,_0xc0695a){const _0x595387=a36_0x22c1,_0x2127f8=_0x1e867b();while(!![]){try{const _0x59ae2a=-parseInt(_0x595387(0x179))/0x1+parseInt(_0x595387(0x178))/0x2+-parseInt(_0x595387(0x16f))/0x3+parseInt(_0x595387(0x171))/0x4*(parseInt(_0x595387(0x17d))/0x5)+parseInt(_0x595387(0x173))/0x6+-parseInt(_0x595387(0x176))/0x7*(parseInt(_0x595387(0x174))/0x8)+-parseInt(_0x595387(0x17b))/0x9*(-parseInt(_0x595387(0x16a))/0xa);if(_0x59ae2a===_0xc0695a)break;else _0x2127f8['push'](_0x2127f8['shift']());}catch(_0x171bba){_0x2127f8['push'](_0x2127f8['shift']());}}}(a36_0x4125,0xe92e0));function a36_0x4125(){const _0x3d7d7a=['7024296ljjMZT','name','7EJKtds','skip-imports','467430lSylDR','1752755wSmgxF','alias','580158CstYCQ','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','21200JDVnmn','Omit\x20import\x20statements\x20from\x20generated\x20code','sdk','260xHMjOt','boolean','string','read','str','2021985PxYJWC','appCode','1748DOIlAh','operation','2983704UQmEYz'];a36_0x4125=function(){return _0x3d7d7a;};return a36_0x4125();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a36_0x22c1(_0x11014c,_0x483901){_0x11014c=_0x11014c-0x169;const _0x4125ad=a36_0x4125();let _0x22c158=_0x4125ad[_0x11014c];return _0x22c158;}export const codegenSdk={'service':'codegen','command':a36_0x24f52a(0x169),'description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a36_0x24f52a(0x16d),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x24f52a(0x17a),'type':a36_0x24f52a(0x16c),'description':a36_0x24f52a(0x17c)},{'name':a36_0x24f52a(0x172),'type':a36_0x24f52a(0x16c),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a36_0x24f52a(0x177),'type':a36_0x24f52a(0x16b),'description':a36_0x24f52a(0x17e)}],async 'execute'(_0x4c7b2f){const _0xb084ed=a36_0x24f52a,{dataset:_0x185e0a,operation:_0x361642}=await getOperationDetail(_0x4c7b2f[_0xb084ed(0x170)],_0x4c7b2f[_0xb084ed(0x16e)]('code'),_0x4c7b2f[_0xb084ed(0x16e)](_0xb084ed(0x172))),_0x9258a1=generateSdkCode(_0x185e0a,_0x361642,{'includeImports':!_0x4c7b2f['bool'](_0xb084ed(0x177))});return{'ok':!![],'data':{'dataset':{'name':_0x185e0a[_0xb084ed(0x175)],'code':_0x185e0a['code'],'tableName':_0x185e0a['tableName']},'operation':_0x4c7b2f[_0xb084ed(0x16e)](_0xb084ed(0x172)),'code':_0x9258a1}};}};
1
+ const a36_0x57a9cb=a36_0xbb1a;(function(_0xe5907,_0x4d1e4c){const _0x1227b2=a36_0xbb1a,_0x52c5eb=_0xe5907();while(!![]){try{const _0x8bae=-parseInt(_0x1227b2(0x12e))/0x1*(parseInt(_0x1227b2(0x123))/0x2)+parseInt(_0x1227b2(0x12c))/0x3+-parseInt(_0x1227b2(0x135))/0x4*(-parseInt(_0x1227b2(0x132))/0x5)+parseInt(_0x1227b2(0x121))/0x6+-parseInt(_0x1227b2(0x128))/0x7*(-parseInt(_0x1227b2(0x131))/0x8)+-parseInt(_0x1227b2(0x12a))/0x9*(parseInt(_0x1227b2(0x129))/0xa)+parseInt(_0x1227b2(0x137))/0xb;if(_0x8bae===_0x4d1e4c)break;else _0x52c5eb['push'](_0x52c5eb['shift']());}catch(_0x460fe9){_0x52c5eb['push'](_0x52c5eb['shift']());}}}(a36_0x3ff6,0x6f30a));function a36_0x3ff6(){const _0x39fd5d=['string','str','4932210VdvlFV','name','8LrkWzu','sdk','appCode','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','codegen','7WbbIeB','965420VXxPwB','81EdPowT','bool','203127gHRwuc','alias','159634pVrsbZ','boolean','operation','477624vicPlt','93175bPIjPG','tableName','code','120eyQQir','read','4997861blwPwV'];a36_0x3ff6=function(){return _0x39fd5d;};return a36_0x3ff6();}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a36_0xbb1a(_0x55fd2e,_0x5bef0c){_0x55fd2e=_0x55fd2e-0x11f;const _0x3ff625=a36_0x3ff6();let _0xbb1a52=_0x3ff625[_0x55fd2e];return _0xbb1a52;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x57a9cb(0x127),'command':a36_0x57a9cb(0x124),'description':a36_0x57a9cb(0x126),'risk':a36_0x57a9cb(0x136),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x57a9cb(0x12d),'type':a36_0x57a9cb(0x11f),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':'operation','type':a36_0x57a9cb(0x11f),'required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':'skip-imports','type':a36_0x57a9cb(0x12f),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x44b0f7){const _0x46a774=a36_0x57a9cb,{dataset:_0x287ac1,operation:_0x23a89b}=await getOperationDetail(_0x44b0f7[_0x46a774(0x125)],_0x44b0f7['str'](_0x46a774(0x134)),_0x44b0f7['str'](_0x46a774(0x130))),_0x2bc482=generateSdkCode(_0x287ac1,_0x23a89b,{'includeImports':!_0x44b0f7[_0x46a774(0x12b)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x287ac1[_0x46a774(0x122)],'code':_0x287ac1[_0x46a774(0x134)],'tableName':_0x287ac1[_0x46a774(0x133)]},'operation':_0x44b0f7[_0x46a774(0x120)](_0x46a774(0x130)),'code':_0x2bc482}};}};
@@ -1 +1 @@
1
- function a37_0x225b(_0x319e21,_0x3db35c){_0x319e21=_0x319e21-0x11c;const _0x468e1a=a37_0x468e();let _0x225bf0=_0x468e1a[_0x319e21];return _0x225bf0;}const a37_0x12cbfd=a37_0x225b;(function(_0x2c7852,_0x56b8ca){const _0x3944b8=a37_0x225b,_0xe4d61e=_0x2c7852();while(!![]){try{const _0x3f49ec=-parseInt(_0x3944b8(0x11c))/0x1*(parseInt(_0x3944b8(0x11e))/0x2)+-parseInt(_0x3944b8(0x131))/0x3*(-parseInt(_0x3944b8(0x12e))/0x4)+parseInt(_0x3944b8(0x133))/0x5*(parseInt(_0x3944b8(0x122))/0x6)+parseInt(_0x3944b8(0x124))/0x7+parseInt(_0x3944b8(0x120))/0x8*(parseInt(_0x3944b8(0x130))/0x9)+-parseInt(_0x3944b8(0x12c))/0xa*(-parseInt(_0x3944b8(0x129))/0xb)+parseInt(_0x3944b8(0x121))/0xc*(-parseInt(_0x3944b8(0x12b))/0xd);if(_0x3f49ec===_0x56b8ca)break;else _0xe4d61e['push'](_0xe4d61e['shift']());}catch(_0x41c1ad){_0xe4d61e['push'](_0xe4d61e['shift']());}}}(a37_0x468e,0x81c6a));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a37_0x12cbfd(0x134),'command':a37_0x12cbfd(0x128),'description':a37_0x12cbfd(0x11d),'risk':'read','flags':[SQLCODE_FLAG,{'name':a37_0x12cbfd(0x123),'type':'string','description':a37_0x12cbfd(0x12f),'default':a37_0x12cbfd(0x12a),'enum':[a37_0x12cbfd(0x12a),a37_0x12cbfd(0x132)]},{'name':a37_0x12cbfd(0x126),'type':a37_0x12cbfd(0x12d),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x588d04){const _0xa5cfa7=a37_0x12cbfd,_0x148ab6=await getSqlQueryInfo(_0x588d04['appCode'],_0x588d04[_0xa5cfa7(0x127)](_0xa5cfa7(0x125))),_0x4e56fb=_0x588d04[_0xa5cfa7(0x127)](_0xa5cfa7(0x123))||_0xa5cfa7(0x12a),_0x4dba4b=generateSqlCodeTemplate(_0x148ab6,{'target':_0x4e56fb,'includeImports':!_0x588d04['bool'](_0xa5cfa7(0x126))});return{'ok':!![],'data':{'sqlCode':_0x148ab6['sqlCode'],'sqlName':_0x148ab6[_0xa5cfa7(0x11f)],'target':_0x4e56fb,'code':_0x4dba4b}};}};function a37_0x468e(){const _0x1d3bc8=['sqlName','6882664CRIxzW','84lyJHlQ','326736cxVIpD','target','1020257QKucDd','sqlcode','no-imports','str','sql','11XyzEEa','sdk','3193528mptHmk','4738570XxUjsH','boolean','12SOgMMI','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','9JthKVt','223449BNwQSm','bff','60zdGvAC','codegen','1ZfRoUq','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','211416LJjZzd'];a37_0x468e=function(){return _0x1d3bc8;};return a37_0x468e();}
1
+ const a37_0x110081=a37_0x3811;(function(_0xdb8ae6,_0x1dcb25){const _0xc1128c=a37_0x3811,_0x270afe=_0xdb8ae6();while(!![]){try{const _0x490625=-parseInt(_0xc1128c(0x1d8))/0x1*(-parseInt(_0xc1128c(0x1ca))/0x2)+-parseInt(_0xc1128c(0x1d5))/0x3*(-parseInt(_0xc1128c(0x1d6))/0x4)+-parseInt(_0xc1128c(0x1c4))/0x5*(-parseInt(_0xc1128c(0x1d7))/0x6)+-parseInt(_0xc1128c(0x1c5))/0x7+-parseInt(_0xc1128c(0x1c9))/0x8+-parseInt(_0xc1128c(0x1c3))/0x9*(parseInt(_0xc1128c(0x1cd))/0xa)+-parseInt(_0xc1128c(0x1c0))/0xb*(-parseInt(_0xc1128c(0x1d1))/0xc);if(_0x490625===_0x1dcb25)break;else _0x270afe['push'](_0x270afe['shift']());}catch(_0x3d023f){_0x270afe['push'](_0x270afe['shift']());}}}(a37_0x4ba9,0xc3568));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a37_0x3811(_0x13520c,_0x4384a1){_0x13520c=_0x13520c-0x1bf;const _0x4ba97b=a37_0x4ba9();let _0x3811a8=_0x4ba97b[_0x13520c];return _0x3811a8;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x4ba9(){const _0x336a33=['string','sdk','str','8488976dSomUm','6nGNwZk','target','sqlCode','2689630SmhBth','boolean','sqlName','no-imports','670872SNUpdn','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','sql','appCode','15mVvBay','975824cUufuC','76530dPewNa','41153ilXovE','sqlcode','363bRpKCL','codegen','bff','9nfSXBb','165BZVpCf','10352041jGmFSg'];a37_0x4ba9=function(){return _0x336a33;};return a37_0x4ba9();}export const codegenSql={'service':a37_0x110081(0x1c1),'command':a37_0x110081(0x1d3),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':'read','flags':[SQLCODE_FLAG,{'name':a37_0x110081(0x1cb),'type':a37_0x110081(0x1c6),'description':a37_0x110081(0x1d2),'default':a37_0x110081(0x1c7),'enum':[a37_0x110081(0x1c7),a37_0x110081(0x1c2)]},{'name':a37_0x110081(0x1d0),'type':a37_0x110081(0x1ce),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x3efbbf){const _0x55001b=a37_0x110081,_0x21f241=await getSqlQueryInfo(_0x3efbbf[_0x55001b(0x1d4)],_0x3efbbf[_0x55001b(0x1c8)](_0x55001b(0x1bf))),_0x251eb0=_0x3efbbf[_0x55001b(0x1c8)](_0x55001b(0x1cb))||'sdk',_0xeb6c17=generateSqlCodeTemplate(_0x21f241,{'target':_0x251eb0,'includeImports':!_0x3efbbf['bool'](_0x55001b(0x1d0))});return{'ok':!![],'data':{'sqlCode':_0x21f241[_0x55001b(0x1cc)],'sqlName':_0x21f241[_0x55001b(0x1cf)],'target':_0x251eb0,'code':_0xeb6c17}};}};
@@ -1 +1 @@
1
- (function(_0x27ff41,_0x1c97e4){const _0xa3806f=a38_0x178e,_0xa2f767=_0x27ff41();while(!![]){try{const _0x3643c9=parseInt(_0xa3806f(0x1b1))/0x1+-parseInt(_0xa3806f(0x1b9))/0x2*(parseInt(_0xa3806f(0x1bc))/0x3)+parseInt(_0xa3806f(0x1b4))/0x4+-parseInt(_0xa3806f(0x1af))/0x5+-parseInt(_0xa3806f(0x1a9))/0x6+parseInt(_0xa3806f(0x1a8))/0x7+parseInt(_0xa3806f(0x1b5))/0x8;if(_0x3643c9===_0x1c97e4)break;else _0xa2f767['push'](_0xa2f767['shift']());}catch(_0x34138e){_0xa2f767['push'](_0xa2f767['shift']());}}}(a38_0x5ed1,0x49e92));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x532834 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 _0x1b0b14=a38_0x178e,_0x2a04c1=await input({'message':'请输入\x20App\x20Code:','validate':_0x4fa87e=>{const _0x51929c=a38_0x178e,_0x4f6613=validateAppcode(_0x4fa87e[_0x51929c(0x1ac)]());return _0x4f6613[_0x51929c(0x1b0)]||_0x4f6613['message']||_0x51929c(0x1bd);}});return _0x2a04c1[_0x1b0b14(0x1ac)]();}export async function promptAppSelection(_0x417afc){const _0xb72335=a38_0x178e,_0x4d4b97=[{'name':a38_0x532834[_0xb72335(0x1c1)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x417afc[_0xb72335(0x1aa)]((_0x54c2cf,_0x29100f)=>({'name':_0x54c2cf[_0xb72335(0x1c3)]+'\x20\x20'+a38_0x532834[_0xb72335(0x1ca)]('('+_0x54c2cf['appCode']+')'),'value':_0x29100f}))],_0x1de4f6=await checkbox({'message':_0xb72335(0x1b2)+a38_0x532834[_0xb72335(0x1c8)](_0x417afc[_0xb72335(0x1b3)])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x4d4b97,'loop':![]});if(_0x1de4f6[_0xb72335(0x1ab)](-0x1))return _0xb72335(0x1be);if(_0x1de4f6[_0xb72335(0x1b3)]===0x0)return _0xb72335(0x1be);return _0x1de4f6[_0xb72335(0x1aa)](_0x1f1c8f=>_0x417afc[_0x1f1c8f]);}export async function promptSingleAppSelection(_0x31d5bf){const _0x5be3cc=a38_0x178e,_0x3df703=[{'name':a38_0x532834[_0x5be3cc(0x1ca)](_0x5be3cc(0x1b6)),'value':'skip'},{'name':a38_0x532834[_0x5be3cc(0x1c1)]('✎\x20自定义输入\x20appcode'),'value':_0x5be3cc(0x1be)},..._0x31d5bf[_0x5be3cc(0x1aa)](_0x140c09=>({'name':_0x140c09[_0x5be3cc(0x1c3)]+'\x20\x20'+a38_0x532834[_0x5be3cc(0x1ca)]('('+_0x140c09['appCode']+')'),'value':_0x140c09[_0x5be3cc(0x1c5)]}))],_0x393bee=await select({'message':_0x5be3cc(0x1ae),'choices':_0x3df703});if(_0x393bee===_0x5be3cc(0x1c0))return _0x5be3cc(0x1c0);if(_0x393bee===_0x5be3cc(0x1be))return _0x5be3cc(0x1be);return _0x31d5bf[_0x5be3cc(0x1cb)](_0x84ce49=>_0x84ce49[_0x5be3cc(0x1c5)]===_0x393bee);}export async function selectSingleAppcode(_0xe29ea){const _0x267b85=a38_0x178e;if(!_0xe29ea)return writeCliSideChannelLine(a38_0x532834['gray'](_0x267b85(0x1c7))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x464163;try{_0x464163=await withActiveCookie(_0xe29ea,()=>listRemoteApps());}catch(_0x3ebc93){writeCliSideChannelLine(a38_0x532834[_0x267b85(0x1c1)](_0x267b85(0x1ad)));if(_0x3ebc93 instanceof Error)writeCliSideChannelLine(a38_0x532834['gray'](_0x267b85(0x1c6)+_0x3ebc93[_0x267b85(0x1bb)]+')'));return _fallbackOrSkip();}if(_0x464163[_0x267b85(0x1b3)]===0x0)return writeCliSideChannelLine(a38_0x532834[_0x267b85(0x1c1)](_0x267b85(0x1c9))),_fallbackOrSkip();const _0x5ec407=await promptSingleAppSelection(_0x464163);if(_0x5ec407==='skip')return'';if(_0x5ec407===_0x267b85(0x1be))return promptCustomAppcode();return _0x5ec407[_0x267b85(0x1c5)];}export async function selectMultipleApps(_0xd851d7){const _0x5bae04=a38_0x178e;writeCliSideChannelLine('正在获取可用应用列表...');let _0x333ae7;try{_0x333ae7=await withActiveCookie(_0xd851d7,()=>listRemoteApps());}catch(_0x28c702){writeCliSideChannelLine(_0x5bae04(0x1c2));if(_0x28c702 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x28c702['message']+')');return _0x5bae04(0x1be);}if(_0x333ae7['length']===0x0)return writeCliSideChannelLine(_0x5bae04(0x1ba)),_0x5bae04(0x1be);return promptAppSelection(_0x333ae7);}function a38_0x178e(_0xbb9148,_0x384d81){_0xbb9148=_0xbb9148-0x1a8;const _0x5ed16d=a38_0x5ed1();let _0x178e3f=_0x5ed16d[_0xbb9148];return _0x178e3f;}async function _fallbackOrSkip(){const _0x1e97c2=a38_0x178e,_0xeb04b7=await select({'message':_0x1e97c2(0x1b7),'choices':[{'name':a38_0x532834[_0x1e97c2(0x1ca)](_0x1e97c2(0x1b8)),'value':'skip'},{'name':a38_0x532834['yellow'](_0x1e97c2(0x1bf)),'value':_0x1e97c2(0x1c4)}]});if(_0xeb04b7==='skip')return'';return promptCustomAppcode();}function a38_0x5ed1(){const _0x412719=['183CmlgLt','Invalid\x20App\x20Code','custom','✎\x20手动输入','skip','yellow','\x0a无法获取远程应用列表,请手动输入。','appName','manual','appCode','\x20\x20(','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','cyan','未找到可用应用。','gray','find','1553594zaxXWN','876576Hwkmku','map','includes','trim','无法获取远程应用列表,请手动输入。','请选择要绑定的应用:','1537465HktPpA','valid','192561qKYXbw','获取到\x20','length','403876mOEqbY','4997824TwxMZF','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','App\x20Code:','(跳过,稍后配置)','12586FpySqX','\x0a未找到可用应用。','message'];a38_0x5ed1=function(){return _0x412719;};return a38_0x5ed1();}
1
+ (function(_0x43069f,_0x22c356){const _0x292a04=a38_0x3870,_0x400aa9=_0x43069f();while(!![]){try{const _0x2ddb80=-parseInt(_0x292a04(0xc1))/0x1+-parseInt(_0x292a04(0xc7))/0x2*(-parseInt(_0x292a04(0xd9))/0x3)+parseInt(_0x292a04(0xcc))/0x4+-parseInt(_0x292a04(0xdb))/0x5+parseInt(_0x292a04(0xca))/0x6+parseInt(_0x292a04(0xd7))/0x7+parseInt(_0x292a04(0xc6))/0x8*(parseInt(_0x292a04(0xd8))/0x9);if(_0x2ddb80===_0x22c356)break;else _0x400aa9['push'](_0x400aa9['shift']());}catch(_0x4bf683){_0x400aa9['push'](_0x400aa9['shift']());}}}(a38_0x1dc7,0xb8f98));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x7ccbf8 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 _0x5a6a59=await input({'message':'请输入\x20App\x20Code:','validate':_0x443e50=>{const _0x1454f3=a38_0x3870,_0xf9f492=validateAppcode(_0x443e50[_0x1454f3(0xd1)]());return _0xf9f492[_0x1454f3(0xd0)]||_0xf9f492['message']||'Invalid\x20App\x20Code';}});return _0x5a6a59['trim']();}export async function promptAppSelection(_0x34fe98){const _0x1432e1=a38_0x3870,_0x36f483=[{'name':a38_0x7ccbf8[_0x1432e1(0xd5)](_0x1432e1(0xd2)),'value':-0x1},..._0x34fe98[_0x1432e1(0xda)]((_0x84da52,_0x25af9f)=>({'name':_0x84da52[_0x1432e1(0xd6)]+'\x20\x20'+a38_0x7ccbf8[_0x1432e1(0xc5)]('('+_0x84da52[_0x1432e1(0xdd)]+')'),'value':_0x25af9f}))],_0x4acb6a=await checkbox({'message':'获取到\x20'+a38_0x7ccbf8['cyan'](_0x34fe98[_0x1432e1(0xcb)])+_0x1432e1(0xe0),'choices':_0x36f483,'loop':![]});if(_0x4acb6a['includes'](-0x1))return _0x1432e1(0xce);if(_0x4acb6a[_0x1432e1(0xcb)]===0x0)return _0x1432e1(0xce);return _0x4acb6a[_0x1432e1(0xda)](_0x1b228e=>_0x34fe98[_0x1b228e]);}export async function promptSingleAppSelection(_0x58034a){const _0x57aab5=a38_0x3870,_0x29be07=[{'name':a38_0x7ccbf8[_0x57aab5(0xc5)](_0x57aab5(0xcd)),'value':_0x57aab5(0xc4)},{'name':a38_0x7ccbf8['yellow']('✎\x20自定义输入\x20appcode'),'value':_0x57aab5(0xce)},..._0x58034a[_0x57aab5(0xda)](_0x43d3af=>({'name':_0x43d3af[_0x57aab5(0xd6)]+'\x20\x20'+a38_0x7ccbf8[_0x57aab5(0xc5)]('('+_0x43d3af[_0x57aab5(0xdd)]+')'),'value':_0x43d3af[_0x57aab5(0xdd)]}))],_0x210d50=await select({'message':_0x57aab5(0xd4),'choices':_0x29be07});if(_0x210d50===_0x57aab5(0xc4))return _0x57aab5(0xc4);if(_0x210d50===_0x57aab5(0xce))return _0x57aab5(0xce);return _0x58034a[_0x57aab5(0xc8)](_0x559965=>_0x559965[_0x57aab5(0xdd)]===_0x210d50);}export async function selectSingleAppcode(_0x43941f){const _0x4e9435=a38_0x3870;if(!_0x43941f)return writeCliSideChannelLine(a38_0x7ccbf8[_0x4e9435(0xc5)](_0x4e9435(0xdc))),_fallbackOrSkip();writeCliSideChannelLine(_0x4e9435(0xc2));let _0x237ee5;try{_0x237ee5=await withActiveCookie(_0x43941f,()=>listRemoteApps());}catch(_0x5075c9){writeCliSideChannelLine(a38_0x7ccbf8[_0x4e9435(0xd5)](_0x4e9435(0xcf)));if(_0x5075c9 instanceof Error)writeCliSideChannelLine(a38_0x7ccbf8['gray'](_0x4e9435(0xde)+_0x5075c9['message']+')'));return _fallbackOrSkip();}if(_0x237ee5[_0x4e9435(0xcb)]===0x0)return writeCliSideChannelLine(a38_0x7ccbf8['yellow']('未找到可用应用。')),_fallbackOrSkip();const _0x56b016=await promptSingleAppSelection(_0x237ee5);if(_0x56b016==='skip')return'';if(_0x56b016===_0x4e9435(0xce))return promptCustomAppcode();return _0x56b016[_0x4e9435(0xdd)];}export async function selectMultipleApps(_0xd66855){const _0x370a08=a38_0x3870;writeCliSideChannelLine('正在获取可用应用列表...');let _0x168597;try{_0x168597=await withActiveCookie(_0xd66855,()=>listRemoteApps());}catch(_0xc53490){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0xc53490 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0xc53490['message']+')');return _0x370a08(0xce);}if(_0x168597[_0x370a08(0xcb)]===0x0)return writeCliSideChannelLine(_0x370a08(0xdf)),_0x370a08(0xce);return promptAppSelection(_0x168597);}function a38_0x1dc7(){const _0x57f846=['skip','gray','8GRaPVp','39726AGclvO','find','✎\x20手动输入','4850850CbCyCt','length','3387684sTDMmk','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','custom','无法获取远程应用列表,请手动输入。','valid','trim','✎\x20自定义输入\x20appcode','(跳过,稍后配置)','请选择要绑定的应用:','yellow','appName','1903580vkVSXo','8074305LLiome','45clVSCV','map','5712825TrwjSu','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','appCode','\x20\x20(','\x0a未找到可用应用。','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','1222205aVojcE','正在获取可用应用列表...','manual'];a38_0x1dc7=function(){return _0x57f846;};return a38_0x1dc7();}function a38_0x3870(_0xe2ab2e,_0x1a723b){_0xe2ab2e=_0xe2ab2e-0xc1;const _0x1dc726=a38_0x1dc7();let _0x387068=_0x1dc726[_0xe2ab2e];return _0x387068;}async function _fallbackOrSkip(){const _0x18df31=a38_0x3870,_0x1e1454=await select({'message':'App\x20Code:','choices':[{'name':a38_0x7ccbf8[_0x18df31(0xc5)](_0x18df31(0xd3)),'value':_0x18df31(0xc4)},{'name':a38_0x7ccbf8[_0x18df31(0xd5)](_0x18df31(0xc9)),'value':_0x18df31(0xc3)}]});if(_0x1e1454===_0x18df31(0xc4))return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- function a39_0x150a(_0x3fcec5,_0x380a3c){_0x3fcec5=_0x3fcec5-0x14c;const _0x3ffba5=a39_0x3ffb();let _0x150aa0=_0x3ffba5[_0x3fcec5];return _0x150aa0;}const a39_0x14ce9b=a39_0x150a;(function(_0x38757f,_0x306177){const _0x3e5e2b=a39_0x150a,_0x1100bb=_0x38757f();while(!![]){try{const _0x13ecfe=parseInt(_0x3e5e2b(0x14d))/0x1*(-parseInt(_0x3e5e2b(0x15a))/0x2)+-parseInt(_0x3e5e2b(0x158))/0x3+-parseInt(_0x3e5e2b(0x160))/0x4+parseInt(_0x3e5e2b(0x15d))/0x5*(parseInt(_0x3e5e2b(0x155))/0x6)+-parseInt(_0x3e5e2b(0x151))/0x7+parseInt(_0x3e5e2b(0x152))/0x8*(parseInt(_0x3e5e2b(0x154))/0x9)+parseInt(_0x3e5e2b(0x153))/0xa;if(_0x13ecfe===_0x306177)break;else _0x1100bb['push'](_0x1100bb['shift']());}catch(_0x144fde){_0x1100bb['push'](_0x1100bb['shift']());}}}(a39_0x3ffb,0x84446));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x14ce9b(0x15c)};export const CODE_FLAG={'name':a39_0x14ce9b(0x15f),'type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x14ce9b(0x159),'description':a39_0x14ce9b(0x14c)};export const SQLCODE_FLAG={'name':a39_0x14ce9b(0x157),'type':a39_0x14ce9b(0x15e),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x14ce9b(0x14e),'type':'string','required':![],'description':a39_0x14ce9b(0x156)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a39_0x14ce9b(0x15b)};export const DB_TYPE_FLAG={'name':a39_0x14ce9b(0x14f),'type':a39_0x14ce9b(0x15e),'required':!![],'description':'Database\x20product\x20type','enum':['MYSQL',a39_0x14ce9b(0x150)]};function a39_0x3ffb(){const _0x5673e0=['Dataset\x20code\x20(32-char\x20hex\x20UUID)','49802hRpesX','appcode','dbtype','POSTGRESQL','792204cJTVBW','8oDpxCC','13013470ChVXnI','161199EcOIen','36EPmUJo','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','sqlcode','2372880LAEVdI','datasetcode','14mtzCye','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','520445pGrVxs','string','code','597120BVbrMF'];a39_0x3ffb=function(){return _0x5673e0;};return a39_0x3ffb();}
1
+ const a39_0x577e87=a39_0x28a7;(function(_0x262503,_0x343717){const _0x502f8c=a39_0x28a7,_0x59b6f7=_0x262503();while(!![]){try{const _0x1d6020=-parseInt(_0x502f8c(0x14e))/0x1+parseInt(_0x502f8c(0x148))/0x2*(parseInt(_0x502f8c(0x142))/0x3)+parseInt(_0x502f8c(0x14f))/0x4*(-parseInt(_0x502f8c(0x144))/0x5)+parseInt(_0x502f8c(0x153))/0x6+parseInt(_0x502f8c(0x13e))/0x7*(parseInt(_0x502f8c(0x154))/0x8)+-parseInt(_0x502f8c(0x141))/0x9*(-parseInt(_0x502f8c(0x14c))/0xa)+-parseInt(_0x502f8c(0x152))/0xb;if(_0x1d6020===_0x343717)break;else _0x59b6f7['push'](_0x59b6f7['shift']());}catch(_0x5cdd4e){_0x59b6f7['push'](_0x59b6f7['shift']());}}}(a39_0x200a,0x3fc2b));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x577e87(0x146)};export const CODE_FLAG={'name':'code','type':a39_0x577e87(0x145),'required':!![],'description':a39_0x577e87(0x143),'pattern':DATASET_CODE_PATTERN};function a39_0x200a(){const _0x38d6f9=['appcode','2875576KGywUM','1569390ucfCPG','99568SBsjDt','Database\x20product\x20type','287XuOJQG','MYSQL','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','1583649blFAQI','3GtqOqm','Dataset\x20code\x20(32-char\x20hex\x20UUID)','57165MOWASR','string','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','49922mYgLqn','number','datasetcode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','10CcTAHM','POSTGRESQL','61472eRUJSA','136ZAyfXX','dbtype'];a39_0x200a=function(){return _0x38d6f9;};return a39_0x200a();}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};function a39_0x28a7(_0x4ddbfe,_0x4fce07){_0x4ddbfe=_0x4ddbfe-0x13d;const _0x200a76=a39_0x200a();let _0x28a788=_0x200a76[_0x4ddbfe];return _0x28a788;}export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x577e87(0x14a),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':'sqlcode','type':a39_0x577e87(0x145),'required':!![],'description':a39_0x577e87(0x140),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x577e87(0x151),'type':a39_0x577e87(0x145),'required':![],'description':a39_0x577e87(0x147)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a39_0x577e87(0x149),'required':!![],'description':a39_0x577e87(0x14b)};export const DB_TYPE_FLAG={'name':a39_0x577e87(0x150),'type':'string','required':!![],'description':a39_0x577e87(0x13d),'enum':[a39_0x577e87(0x13f),a39_0x577e87(0x14d)]};
@@ -1 +1 @@
1
- function a40_0x5a9a(_0x34a5ae,_0x4aacfb){_0x34a5ae=_0x34a5ae-0x1c5;const _0x5b414e=a40_0x5b41();let _0x5a9af8=_0x5b414e[_0x34a5ae];return _0x5a9af8;}function a40_0x5b41(){const _0x5f1a2e=['2127174fbSVxR','96676xCsBpQ','length','1zidLiI','2548926QVEkVS','1556845QWtIng','5339888AMWSMu','397145LSZMxr','6OSPgNt','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','trim','1045318PXGFYU'];a40_0x5b41=function(){return _0x5f1a2e;};return a40_0x5b41();}(function(_0x18e564,_0x4dc0b7){const _0x3cfd9f=a40_0x5a9a,_0x3210c8=_0x18e564();while(!![]){try{const _0x3027cd=parseInt(_0x3cfd9f(0x1cd))/0x1*(parseInt(_0x3cfd9f(0x1c9))/0x2)+parseInt(_0x3cfd9f(0x1c6))/0x3*(parseInt(_0x3cfd9f(0x1cb))/0x4)+-parseInt(_0x3cfd9f(0x1cf))/0x5+-parseInt(_0x3cfd9f(0x1ca))/0x6+parseInt(_0x3cfd9f(0x1c5))/0x7+parseInt(_0x3cfd9f(0x1d0))/0x8+-parseInt(_0x3cfd9f(0x1ce))/0x9;if(_0x3027cd===_0x4dc0b7)break;else _0x3210c8['push'](_0x3210c8['shift']());}catch(_0x1608ff){_0x3210c8['push'](_0x3210c8['shift']());}}}(a40_0x5b41,0x547fa));export function validateAppcode(_0x5dcbe9){const _0x48f357=a40_0x5a9a,_0x2835dc=_0x5dcbe9[_0x48f357(0x1c8)]();if(!_0x2835dc)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x2835dc[_0x48f357(0x1cc)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x2835dc))return{'valid':![],'message':_0x48f357(0x1c7)};return{'valid':!![]};}
1
+ function a40_0x2fe1(_0x327cfb,_0x4c992e){_0x327cfb=_0x327cfb-0x1c7;const _0x1a2d56=a40_0x1a2d();let _0x2fe1cd=_0x1a2d56[_0x327cfb];return _0x2fe1cd;}function a40_0x1a2d(){const _0x6f340e=['638192aoAPNo','112670tubXMe','trim','2IeXEDq','72mnzWei','1228695qBaXRC','4629267EbVYLX','219730wgXrSW','3963904qLXXoU','20139720XCcBma','App\x20Code\x20cannot\x20be\x20empty','12MhMXJU'];a40_0x1a2d=function(){return _0x6f340e;};return a40_0x1a2d();}(function(_0x5a44a0,_0x3debb5){const _0xe2030c=a40_0x2fe1,_0x773f0e=_0x5a44a0();while(!![]){try{const _0x2f42ed=-parseInt(_0xe2030c(0x1c9))/0x1*(parseInt(_0xe2030c(0x1cc))/0x2)+parseInt(_0xe2030c(0x1ce))/0x3+parseInt(_0xe2030c(0x1c8))/0x4*(parseInt(_0xe2030c(0x1ca))/0x5)+parseInt(_0xe2030c(0x1cd))/0x6*(-parseInt(_0xe2030c(0x1d0))/0x7)+-parseInt(_0xe2030c(0x1d1))/0x8+-parseInt(_0xe2030c(0x1cf))/0x9+parseInt(_0xe2030c(0x1d2))/0xa;if(_0x2f42ed===_0x3debb5)break;else _0x773f0e['push'](_0x773f0e['shift']());}catch(_0x502946){_0x773f0e['push'](_0x773f0e['shift']());}}}(a40_0x1a2d,0x71df0));export function validateAppcode(_0x39455f){const _0x45376b=a40_0x2fe1,_0x3d5a1e=_0x39455f[_0x45376b(0x1cb)]();if(!_0x3d5a1e)return{'valid':![],'message':_0x45376b(0x1c7)};if(_0x3d5a1e['length']>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/['test'](_0x3d5a1e))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a41_0x4457ce=a41_0x37ab;function a41_0x37ab(_0x1b9646,_0xa445b6){_0x1b9646=_0x1b9646-0xf8;const _0x39d7e9=a41_0x39d7();let _0x37ab0d=_0x39d7e9[_0x1b9646];return _0x37ab0d;}(function(_0x3e3b09,_0x147be6){const _0x44b1ed=a41_0x37ab,_0x549b61=_0x3e3b09();while(!![]){try{const _0x2ded3a=-parseInt(_0x44b1ed(0x10b))/0x1+parseInt(_0x44b1ed(0xfd))/0x2*(parseInt(_0x44b1ed(0xfc))/0x3)+parseInt(_0x44b1ed(0xff))/0x4*(parseInt(_0x44b1ed(0x10c))/0x5)+parseInt(_0x44b1ed(0x108))/0x6*(parseInt(_0x44b1ed(0x10a))/0x7)+-parseInt(_0x44b1ed(0xf8))/0x8*(parseInt(_0x44b1ed(0x109))/0x9)+parseInt(_0x44b1ed(0xfb))/0xa+-parseInt(_0x44b1ed(0x103))/0xb*(parseInt(_0x44b1ed(0xfe))/0xc);if(_0x2ded3a===_0x147be6)break;else _0x549b61['push'](_0x549b61['shift']());}catch(_0x3b5200){_0x549b61['push'](_0x549b61['shift']());}}}(a41_0x39d7,0xe0991));import{CliErrors}from'../../errors.js';function a41_0x39d7(){const _0x2bbc56=['app','1611024VLebdG','2273787brCFBi','28Hqrllh','246207ApMNAS','68735eeaaRr','8kQwtRF','object','Usage:\x20','6632630CDIHZl','3vkGVtT','3260054xyijVB','24yvmzqM','188fuMRUm','key','string','Missing\x20key.','14270366BMRwTJ','get','config','Key\x20not\x20found:\x20'];a41_0x39d7=function(){return _0x2bbc56;};return a41_0x39d7();}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x328d1a){const _0x6ac935=a41_0x37ab,_0x14e6b4=_0x328d1a['str'](_0x6ac935(0x100));if(!_0x14e6b4)throw CliErrors['validation'](_0x6ac935(0x102),_0x6ac935(0xfa)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x24fe6d=readConfig(),_0x575ec7=_0x14e6b4===_0x6ac935(0x107)?'appcode':_0x14e6b4,_0x1032e3=_0x24fe6d[_0x575ec7];if(_0x1032e3===undefined)throw CliErrors['validation'](_0x6ac935(0x106)+_0x14e6b4);return{'ok':!![],'data':typeof _0x1032e3==='object'?_0x1032e3:{[_0x575ec7]:_0x1032e3},'message':typeof _0x1032e3===_0x6ac935(0xf9)?undefined:String(_0x1032e3)};}export const configGetDefinition={'service':a41_0x4457ce(0x105),'command':a41_0x4457ce(0x104),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x4457ce(0x100),'type':a41_0x4457ce(0x101),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a41_0x28976c=a41_0x360e;(function(_0x251e34,_0x5da597){const _0x5e15c8=a41_0x360e,_0x2271d4=_0x251e34();while(!![]){try{const _0x324d3a=-parseInt(_0x5e15c8(0xd9))/0x1*(-parseInt(_0x5e15c8(0xcb))/0x2)+parseInt(_0x5e15c8(0xc8))/0x3*(-parseInt(_0x5e15c8(0xca))/0x4)+parseInt(_0x5e15c8(0xd5))/0x5*(-parseInt(_0x5e15c8(0xdc))/0x6)+-parseInt(_0x5e15c8(0xcc))/0x7*(parseInt(_0x5e15c8(0xd8))/0x8)+-parseInt(_0x5e15c8(0xc9))/0x9*(-parseInt(_0x5e15c8(0xdb))/0xa)+parseInt(_0x5e15c8(0xd4))/0xb+parseInt(_0x5e15c8(0xcd))/0xc*(parseInt(_0x5e15c8(0xd2))/0xd);if(_0x324d3a===_0x5da597)break;else _0x2271d4['push'](_0x2271d4['shift']());}catch(_0xcabe1e){_0x2271d4['push'](_0x2271d4['shift']());}}}(a41_0x1ac7,0x8b9ff));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a41_0x1ac7(){const _0x343c6b=['131271ItShZj','316572PaBrhL','key','str','appcode','Missing\x20key.','52YGYYKC','config','5059021tujfSC','15TUOaFl','Key\x20not\x20found:\x20','app','312zevQoq','988436MVQYau','string','3470oIlikm','145086xRAwkR','Usage:\x20','validation','Get\x20a\x20config\x20value\x20by\x20key','object','3sdHSaI','15480DilpBy','3099592XNeNFl','2IAGkmK'];a41_0x1ac7=function(){return _0x343c6b;};return a41_0x1ac7();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a41_0x360e(_0x313641,_0x1d1cc9){_0x313641=_0x313641-0xc5;const _0x1ac73a=a41_0x1ac7();let _0x360e0e=_0x1ac73a[_0x313641];return _0x360e0e;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x43b6c5){const _0x50bf4b=a41_0x360e,_0x15569c=_0x43b6c5[_0x50bf4b(0xcf)](_0x50bf4b(0xce));if(!_0x15569c)throw CliErrors[_0x50bf4b(0xc5)](_0x50bf4b(0xd1),_0x50bf4b(0xdd)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x15e3a3=readConfig(),_0x24ad7f=_0x15569c===_0x50bf4b(0xd7)?_0x50bf4b(0xd0):_0x15569c,_0x1b7845=_0x15e3a3[_0x24ad7f];if(_0x1b7845===undefined)throw CliErrors[_0x50bf4b(0xc5)](_0x50bf4b(0xd6)+_0x15569c);return{'ok':!![],'data':typeof _0x1b7845===_0x50bf4b(0xc7)?_0x1b7845:{[_0x24ad7f]:_0x1b7845},'message':typeof _0x1b7845===_0x50bf4b(0xc7)?undefined:String(_0x1b7845)};}export const configGetDefinition={'service':a41_0x28976c(0xd3),'command':'get','description':a41_0x28976c(0xc6),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x28976c(0xce),'type':a41_0x28976c(0xda),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- function a42_0x31fc(_0x5aa302,_0x4ecf7e){_0x5aa302=_0x5aa302-0x10d;const _0x3d0131=a42_0x3d01();let _0x31fc36=_0x3d0131[_0x5aa302];return _0x31fc36;}(function(_0x55e22a,_0xc9d089){const _0x12f5e8=a42_0x31fc,_0x39e98d=_0x55e22a();while(!![]){try{const _0x1174cb=parseInt(_0x12f5e8(0x114))/0x1+-parseInt(_0x12f5e8(0x110))/0x2+parseInt(_0x12f5e8(0x113))/0x3+-parseInt(_0x12f5e8(0x10d))/0x4*(parseInt(_0x12f5e8(0x10e))/0x5)+-parseInt(_0x12f5e8(0x112))/0x6+-parseInt(_0x12f5e8(0x111))/0x7+parseInt(_0x12f5e8(0x10f))/0x8;if(_0x1174cb===_0xc9d089)break;else _0x39e98d['push'](_0x39e98d['shift']());}catch(_0x40b800){_0x39e98d['push'](_0x39e98d['shift']());}}}(a42_0x3d01,0x24c28));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a42_0x3d01(){const _0x134660=['152996ECBVYQ','20XPyYik','1449632EFcxfW','458364LJdfqb','641697BEugCf','81942fVkXmG','820851awpnoF','183253qCtjnA'];a42_0x3d01=function(){return _0x134660;};return a42_0x3d01();}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ (function(_0x1a88c3,_0x485aba){const _0xccc57a=a42_0x124a,_0x331677=_0x1a88c3();while(!![]){try{const _0x114a80=-parseInt(_0xccc57a(0x12b))/0x1+parseInt(_0xccc57a(0x124))/0x2+-parseInt(_0xccc57a(0x128))/0x3*(parseInt(_0xccc57a(0x129))/0x4)+-parseInt(_0xccc57a(0x123))/0x5*(-parseInt(_0xccc57a(0x122))/0x6)+-parseInt(_0xccc57a(0x12a))/0x7+parseInt(_0xccc57a(0x127))/0x8+-parseInt(_0xccc57a(0x125))/0x9*(-parseInt(_0xccc57a(0x126))/0xa);if(_0x114a80===_0x485aba)break;else _0x331677['push'](_0x331677['shift']());}catch(_0x5f2739){_0x331677['push'](_0x331677['shift']());}}}(a42_0x4258,0x1b4f3));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a42_0x4258(){const _0x5b1e60=['884190nIxtNz','5DmgZoV','155196IDdeCE','792dJMviG','11350GdHyjm','913792xyPmtH','6039fvshGa','332drpNJQ','14385KipEJA','158074JyhAVO'];a42_0x4258=function(){return _0x5b1e60;};return a42_0x4258();}import{configSetDefinition}from'../../commands/config/set.js';function a42_0x124a(_0x1a42d0,_0x1cc7d7){_0x1a42d0=_0x1a42d0-0x122;const _0x425855=a42_0x4258();let _0x124a41=_0x425855[_0x1a42d0];return _0x124a41;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- const a43_0x20e453=a43_0xfaf6;function a43_0x1886(){const _0x1a7d07=['245029jlIQdL','386440JbYUin','6esRnUk','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','9KtdrZc','3040260NnSWYr','226332QpwfOJ','List\x20all\x20config\x20values','config','boolean','1074915yJMZdM','7UzLBYk','4531376ibmIJb','35778610xHgUqu','global'];a43_0x1886=function(){return _0x1a7d07;};return a43_0x1886();}(function(_0x9622ff,_0x2597cc){const _0x3dc139=a43_0xfaf6,_0xa121b1=_0x9622ff();while(!![]){try{const _0x47ebce=parseInt(_0x3dc139(0xf8))/0x1*(-parseInt(_0x3dc139(0xfa))/0x2)+-parseInt(_0x3dc139(0xfd))/0x3+-parseInt(_0x3dc139(0xf5))/0x4+-parseInt(_0x3dc139(0xf3))/0x5+parseInt(_0x3dc139(0xfe))/0x6+parseInt(_0x3dc139(0xf4))/0x7*(parseInt(_0x3dc139(0xf9))/0x8)+parseInt(_0x3dc139(0xfc))/0x9*(parseInt(_0x3dc139(0xf6))/0xa);if(_0x47ebce===_0x2597cc)break;else _0xa121b1['push'](_0xa121b1['shift']());}catch(_0x37088d){_0xa121b1['push'](_0xa121b1['shift']());}}}(a43_0x1886,0x8a902));import{readScopedConfig}from'../../commands/config/shared.js';function a43_0xfaf6(_0x48dc5f,_0x527027){_0x48dc5f=_0x48dc5f-0xf0;const _0x18867c=a43_0x1886();let _0xfaf671=_0x18867c[_0x48dc5f];return _0xfaf671;}import{readConfig}from'../../utils/config.js';async function execute(_0x1e32fe){const _0x2afd7e=a43_0xfaf6,_0x122d57=_0x1e32fe['bool'](_0x2afd7e(0xf7))?readScopedConfig(_0x2afd7e(0xf7)):readConfig();return{'ok':!![],'data':_0x122d57};}export const configListDefinition={'service':a43_0x20e453(0xf1),'command':'list','description':a43_0x20e453(0xf0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x20e453(0xf7),'type':a43_0x20e453(0xf2),'description':a43_0x20e453(0xfb),'default':![]}],'execute':execute};
1
+ const a43_0x2eb3d2=a43_0x40d4;(function(_0x4b380c,_0x33948b){const _0x3dd6c1=a43_0x40d4,_0x582cb3=_0x4b380c();while(!![]){try{const _0x11e614=-parseInt(_0x3dd6c1(0xfa))/0x1*(parseInt(_0x3dd6c1(0xf1))/0x2)+-parseInt(_0x3dd6c1(0xfe))/0x3*(parseInt(_0x3dd6c1(0xfd))/0x4)+parseInt(_0x3dd6c1(0xef))/0x5+-parseInt(_0x3dd6c1(0xfc))/0x6+parseInt(_0x3dd6c1(0xf5))/0x7*(parseInt(_0x3dd6c1(0xf3))/0x8)+-parseInt(_0x3dd6c1(0xee))/0x9+parseInt(_0x3dd6c1(0xfb))/0xa*(parseInt(_0x3dd6c1(0xf7))/0xb);if(_0x11e614===_0x33948b)break;else _0x582cb3['push'](_0x582cb3['shift']());}catch(_0x17015a){_0x582cb3['push'](_0x582cb3['shift']());}}}(a43_0x2c76,0x95286));import{readScopedConfig}from'../../commands/config/shared.js';function a43_0x40d4(_0x1c008e,_0x5a7872){_0x1c008e=_0x1c008e-0xee;const _0x2c76d6=a43_0x2c76();let _0x40d47a=_0x2c76d6[_0x1c008e];return _0x40d47a;}import{readConfig}from'../../utils/config.js';async function execute(_0x424b8d){const _0x12c3eb=a43_0x40d4,_0x283a0b=_0x424b8d[_0x12c3eb(0xf6)]('global')?readScopedConfig(_0x12c3eb(0xf2)):readConfig();return{'ok':!![],'data':_0x283a0b};}export const configListDefinition={'service':'config','command':'list','description':a43_0x2eb3d2(0xf8),'risk':a43_0x2eb3d2(0xf4),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x2eb3d2(0xf2),'type':a43_0x2eb3d2(0xf9),'description':a43_0x2eb3d2(0xf0),'default':![]}],'execute':execute};function a43_0x2c76(){const _0x5d9813=['global','24jisPXH','read','109123aTCVuU','bool','11kcmHfM','List\x20all\x20config\x20values','boolean','1093163FHPiRA','40532510sLkKuy','1387860QUJhOB','34392KrGHso','405cVYroF','9303786EcyIhr','149445zTTBYB','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','2ZXzWEL'];a43_0x2c76=function(){return _0x5d9813;};return a43_0x2c76();}
@@ -1 +1 @@
1
- const a44_0x34f8d4=a44_0x2be1;(function(_0x4a1998,_0x5c47cd){const _0x17b820=a44_0x2be1,_0x3d95ad=_0x4a1998();while(!![]){try{const _0x2ffae5=parseInt(_0x17b820(0x1a6))/0x1*(-parseInt(_0x17b820(0x1ad))/0x2)+-parseInt(_0x17b820(0x188))/0x3+-parseInt(_0x17b820(0x190))/0x4+parseInt(_0x17b820(0x17f))/0x5*(-parseInt(_0x17b820(0x1a2))/0x6)+-parseInt(_0x17b820(0x196))/0x7*(-parseInt(_0x17b820(0x187))/0x8)+parseInt(_0x17b820(0x1a1))/0x9*(parseInt(_0x17b820(0x185))/0xa)+parseInt(_0x17b820(0x17b))/0xb;if(_0x2ffae5===_0x5c47cd)break;else _0x3d95ad['push'](_0x3d95ad['shift']());}catch(_0x255178){_0x3d95ad['push'](_0x3d95ad['shift']());}}}(a44_0x33e1,0xd6e28));function a44_0x2be1(_0x1f3e99,_0x12ea8f){_0x1f3e99=_0x1f3e99-0x17b;const _0x33e12f=a44_0x33e1();let _0x2be10d=_0x33e12f[_0x1f3e99];return _0x2be10d;}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(_0xce3e3e){const _0x27e151=a44_0x2be1,_0x351b07=_0xce3e3e[_0x27e151(0x1a7)]('key'),_0x34b39d=_0xce3e3e['str'](_0x27e151(0x180));if(!_0x351b07)throw CliErrors['validation'](_0x27e151(0x1a3),_0x27e151(0x19e)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x34b39d===undefined||_0x34b39d==='')throw CliErrors[_0x27e151(0x181)](_0x27e151(0x18b),_0x27e151(0x19e)+CLI_BIN_NAME+_0x27e151(0x18c));if(_0x34b39d[_0x27e151(0x199)]>0x1f4)throw CliErrors['validation']('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0x351b07))throw CliErrors[_0x27e151(0x181)]('Top-level\x20key\x20\x22'+_0x351b07+_0x27e151(0x183),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x351b07==='riskLevel')throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x351b07]&&!CONFIG_ENUM_VALUES[_0x351b07][_0x27e151(0x192)](_0x34b39d))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x351b07+_0x27e151(0x19b)+CONFIG_ENUM_VALUES[_0x351b07][_0x27e151(0x19f)](',\x20'));if(_0x351b07===_0x27e151(0x18d)&&!normalizeLocale(_0x34b39d))throw CliErrors[_0x27e151(0x181)](_0x27e151(0x1a0),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x3cc34c={'global':_0xce3e3e['bool'](_0x27e151(0x1a9))},_0x151bf1=resolveWriteScope(_0x3cc34c),_0x39b9f6=readScopedConfig(_0x151bf1);let _0x39bcdb=_0x351b07,_0x3bb6d5=_0x34b39d;_0x351b07===_0x27e151(0x186)&&(_0x39bcdb=_0x27e151(0x19d),delete _0x39b9f6[_0x27e151(0x186)]);_0x351b07===_0x27e151(0x18d)&&(_0x3bb6d5=normalizeLocale(_0x34b39d));if(_0x351b07===_0x27e151(0x1aa)){_0x3bb6d5=normalizeEnv(_0x34b39d);if(!isProduction(_0x3bb6d5)&&!isDaily(_0x3bb6d5))throw CliErrors[_0x27e151(0x181)](_0x27e151(0x191),_0x27e151(0x19c));}if(_0x351b07===_0x27e151(0x19d)){const _0x2ef6f1=_0x39b9f6['apps']&&typeof _0x39b9f6['apps']===_0x27e151(0x194)?Object[_0x27e151(0x1ab)](_0x39b9f6[_0x27e151(0x17d)]):[];if(_0x2ef6f1['length']>0x0)throw CliErrors[_0x27e151(0x181)](_0x27e151(0x198),_0x27e151(0x19a)+CLI_BIN_NAME+_0x27e151(0x17c)+_0x3bb6d5+'`,\x20`'+CLI_BIN_NAME+_0x27e151(0x18f));const _0x46559b=buildCanonicalProjectConfig({..._0x39b9f6},{'appCodes':[_0x3bb6d5],'env':typeof _0x39b9f6[_0x27e151(0x1aa)]===_0x27e151(0x1ac)?_0x39b9f6[_0x27e151(0x1aa)]:undefined});writeScopedConfig(_0x46559b,_0x151bf1);const _0x1d4228=_0x151bf1===_0x27e151(0x1a9)?_0x27e151(0x195):_0x27e151(0x182);return{'ok':!![],'message':'✓\x20'+_0x1d4228+_0x27e151(0x18e)+_0x3bb6d5+_0x27e151(0x1a8)};}_0x39b9f6[_0x39bcdb]=_0x3bb6d5,writeScopedConfig(_0x39b9f6,_0x151bf1);const _0xb41353=_0x151bf1===_0x27e151(0x1a9)?_0x27e151(0x195):_0x27e151(0x182);return{'ok':!![],'message':'✓\x20'+_0xb41353+'\x20'+_0x39bcdb+_0x27e151(0x17e)+_0x3bb6d5};}function a44_0x33e1(){const _0x2d00c6=['Use\x20`','\x22.\x20Allowed:\x20','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','appcode','Usage:\x20','join','Invalid\x20locale\x20value.','9FOcqLj','6cFhTis','Missing\x20key.','boolean','write','599xCoNSo','str','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','global','env','keys','string','1178YSyXsa','3380872bLxoMa','\x20app\x20add\x20<name>\x20--appcode\x20','apps','\x20set\x20to:\x20','2400925DQAkXD','value','validation','Project','\x22\x20is\x20not\x20settable.','set','2621090wYvTrx','app','388544gnHxyY','363417XrIcmE','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','config','Missing\x20value.','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','locale','\x20appcode\x20set\x20to:\x20','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','1351608jrwkWr','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','includes','key','object','Global','231EnNYhb','Config\x20value','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','length'];a44_0x33e1=function(){return _0x2d00c6;};return a44_0x33e1();}export const configSetDefinition={'service':a44_0x34f8d4(0x18a),'command':a44_0x34f8d4(0x184),'description':'Set\x20a\x20config\x20value','risk':a44_0x34f8d4(0x1a5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0x34f8d4(0x193),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','type':'string','description':a44_0x34f8d4(0x197),'required':!![]},{'name':'global','type':a44_0x34f8d4(0x1a4),'description':a44_0x34f8d4(0x189),'default':![]}],'execute':execute};
1
+ const a44_0xc738a1=a44_0x2241;function a44_0x127a(){const _0x92ac8=['app','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Config\x20value','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Missing\x20key.','global','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','639YSYZFZ','riskLevel','string','key','Usage:\x20','146030LRwMoL','Use\x20`','76RirNVw','2281884vTiSbd','\x22\x20is\x20not\x20settable.','Settable\x20top-level\x20keys:\x20','length','value','814478NfBWQF','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','write','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Invalid\x20locale\x20value.','\x20appcode\x20set\x20to:\x20','Invalid\x20value\x20for\x20\x22','env','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','Top-level\x20key\x20\x22','Project','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','locale','keys','\x20set\x20to:\x20','Set\x20a\x20config\x20value','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','str','4861872bYDJFE','object','413rAlZEC','\x22.\x20Allowed:\x20','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','set','apps','145064hIJAJu','`,\x20`','\x20app\x20add\x20<name>\x20--appcode\x20','Global','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','join','1cPdWmJ','5809551MYWTjt','328550MUYPtp','appcode','config','validation'];a44_0x127a=function(){return _0x92ac8;};return a44_0x127a();}(function(_0x2489ab,_0x3343b5){const _0x19e86e=a44_0x2241,_0x179c07=_0x2489ab();while(!![]){try{const _0x3de31a=-parseInt(_0x19e86e(0x1e9))/0x1*(parseInt(_0x19e86e(0x203))/0x2)+parseInt(_0x19e86e(0x1dc))/0x3+parseInt(_0x19e86e(0x1fd))/0x4*(-parseInt(_0x19e86e(0x1eb))/0x5)+parseInt(_0x19e86e(0x1fe))/0x6+parseInt(_0x19e86e(0x1de))/0x7*(parseInt(_0x19e86e(0x1e3))/0x8)+-parseInt(_0x19e86e(0x1f6))/0x9*(parseInt(_0x19e86e(0x1fb))/0xa)+parseInt(_0x19e86e(0x1ea))/0xb;if(_0x3de31a===_0x3343b5)break;else _0x179c07['push'](_0x179c07['shift']());}catch(_0x143912){_0x179c07['push'](_0x179c07['shift']());}}}(a44_0x127a,0xdd490));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a44_0x2241(_0x1b146f,_0x566500){_0x1b146f=_0x1b146f-0x1d6;const _0x127a17=a44_0x127a();let _0x2241c7=_0x127a17[_0x1b146f];return _0x2241c7;}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x395d3b){const _0x25947b=a44_0x2241,_0x3cd503=_0x395d3b['str'](_0x25947b(0x1f9)),_0x4dd4cc=_0x395d3b[_0x25947b(0x1db)](_0x25947b(0x202));if(!_0x3cd503)throw CliErrors[_0x25947b(0x1ee)](_0x25947b(0x1f3),_0x25947b(0x1fa)+CLI_BIN_NAME+_0x25947b(0x1f0));if(_0x4dd4cc===undefined||_0x4dd4cc==='')throw CliErrors[_0x25947b(0x1ee)]('Missing\x20value.',_0x25947b(0x1fa)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x4dd4cc[_0x25947b(0x201)]>0x1f4)throw CliErrors[_0x25947b(0x1ee)](_0x25947b(0x1e7));if(!isTopLevelConfigKey(_0x3cd503))throw CliErrors[_0x25947b(0x1ee)](_0x25947b(0x20c)+_0x3cd503+_0x25947b(0x1ff),_0x25947b(0x200)+getTopLevelConfigKeySummary());if(_0x3cd503===_0x25947b(0x1f7))throw CliErrors[_0x25947b(0x1ee)](_0x25947b(0x1da));if(CONFIG_ENUM_VALUES[_0x3cd503]&&!CONFIG_ENUM_VALUES[_0x3cd503]['includes'](_0x4dd4cc))throw CliErrors[_0x25947b(0x1ee)](_0x25947b(0x209)+_0x3cd503+_0x25947b(0x1df)+CONFIG_ENUM_VALUES[_0x3cd503][_0x25947b(0x1e8)](',\x20'));if(_0x3cd503===_0x25947b(0x1d6)&&!normalizeLocale(_0x4dd4cc))throw CliErrors[_0x25947b(0x1ee)](_0x25947b(0x207),_0x25947b(0x20b));const _0x453620={'global':_0x395d3b['bool']('global')},_0x46e281=resolveWriteScope(_0x453620),_0x3ee91a=readScopedConfig(_0x46e281);let _0x3b589f=_0x3cd503,_0x40b7a6=_0x4dd4cc;_0x3cd503===_0x25947b(0x1ef)&&(_0x3b589f=_0x25947b(0x1ec),delete _0x3ee91a[_0x25947b(0x1ef)]);_0x3cd503===_0x25947b(0x1d6)&&(_0x40b7a6=normalizeLocale(_0x4dd4cc));if(_0x3cd503==='env'){_0x40b7a6=normalizeEnv(_0x4dd4cc);if(!isProduction(_0x40b7a6)&&!isDaily(_0x40b7a6))throw CliErrors[_0x25947b(0x1ee)](_0x25947b(0x1f5),_0x25947b(0x20e));}if(_0x3cd503==='appcode'){const _0x13db7b=_0x3ee91a['apps']&&typeof _0x3ee91a[_0x25947b(0x1e2)]===_0x25947b(0x1dd)?Object[_0x25947b(0x1d7)](_0x3ee91a[_0x25947b(0x1e2)]):[];if(_0x13db7b[_0x25947b(0x201)]>0x0)throw CliErrors[_0x25947b(0x1ee)](_0x25947b(0x1e0),_0x25947b(0x1fc)+CLI_BIN_NAME+_0x25947b(0x1e5)+_0x40b7a6+_0x25947b(0x1e4)+CLI_BIN_NAME+_0x25947b(0x1f2));const _0x5137dc=buildCanonicalProjectConfig({..._0x3ee91a},{'appCodes':[_0x40b7a6],'env':typeof _0x3ee91a['env']==='string'?_0x3ee91a[_0x25947b(0x20a)]:undefined});writeScopedConfig(_0x5137dc,_0x46e281);const _0x1e66b4=_0x46e281==='global'?_0x25947b(0x1e6):_0x25947b(0x20d);return{'ok':!![],'message':'✓\x20'+_0x1e66b4+_0x25947b(0x208)+_0x40b7a6+_0x25947b(0x206)};}_0x3ee91a[_0x3b589f]=_0x40b7a6,writeScopedConfig(_0x3ee91a,_0x46e281);const _0x186618=_0x46e281===_0x25947b(0x1f4)?_0x25947b(0x1e6):'Project';return{'ok':!![],'message':'✓\x20'+_0x186618+'\x20'+_0x3b589f+_0x25947b(0x1d8)+_0x40b7a6};}export const configSetDefinition={'service':a44_0xc738a1(0x1ed),'command':a44_0xc738a1(0x1e1),'description':a44_0xc738a1(0x1d9),'risk':a44_0xc738a1(0x205),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0xc738a1(0x1f9),'type':a44_0xc738a1(0x1f8),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0xc738a1(0x202),'type':a44_0xc738a1(0x1f8),'description':a44_0xc738a1(0x1f1),'required':!![]},{'name':'global','type':'boolean','description':a44_0xc738a1(0x204),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x3a66de,_0x373229){var _0x36f7d3=a45_0x506c,_0x3b54ea=_0x3a66de();while(!![]){try{var _0x40b668=parseInt(_0x36f7d3(0x113))/0x1*(parseInt(_0x36f7d3(0x11d))/0x2)+-parseInt(_0x36f7d3(0x11f))/0x3*(parseInt(_0x36f7d3(0x116))/0x4)+parseInt(_0x36f7d3(0x114))/0x5+parseInt(_0x36f7d3(0x110))/0x6+parseInt(_0x36f7d3(0x112))/0x7*(parseInt(_0x36f7d3(0x11b))/0x8)+parseInt(_0x36f7d3(0x111))/0x9*(parseInt(_0x36f7d3(0x11a))/0xa)+-parseInt(_0x36f7d3(0x10f))/0xb;if(_0x40b668===_0x373229)break;else _0x3b54ea['push'](_0x3b54ea['shift']());}catch(_0x5812c6){_0x3b54ea['push'](_0x3b54ea['shift']());}}}(a45_0x5b57,0x7af74));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';function a45_0x5b57(){var _0x3bade7=['169897edwvMH','2OXGbmD','2285265RNDEzA','validation','3174052tHwWAO','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','project','\x20init`\x20first.','570LLMpux','72bCPPhn','global','314714VLFMdW','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','3xjcXxD','7261738pAWqGK','2995320HtUoer','73881aYTAgW'];a45_0x5b57=function(){return _0x3bade7;};return a45_0x5b57();}import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};function a45_0x506c(_0x516215,_0x1fafe1){_0x516215=_0x516215-0x10f;var _0x5b5797=a45_0x5b57();var _0x506c0e=_0x5b5797[_0x516215];return _0x506c0e;}export function resolveWriteScope(_0x119eb9){var _0x1c4a32=a45_0x506c;if(_0x119eb9[_0x1c4a32(0x11c)])return _0x1c4a32(0x11c);if(!isInProject())throw CliErrors[_0x1c4a32(0x115)](_0x1c4a32(0x117),_0x1c4a32(0x11e)+CLI_BIN_NAME+_0x1c4a32(0x119));return _0x1c4a32(0x118);}export function readScopedConfig(_0x5b8e6b){return readConfigFile(resolveWriteConfigPath(_0x5b8e6b));}export function writeScopedConfig(_0x4da1b0,_0x468f5a){writeConfigFile(resolveWriteConfigPath(_0x468f5a),_0x4da1b0);}
1
+ (function(_0x4accfd,_0x792e5d){var _0x4f39a4=a45_0x10f8,_0x45b66a=_0x4accfd();while(!![]){try{var _0x5411b0=-parseInt(_0x4f39a4(0x183))/0x1+parseInt(_0x4f39a4(0x17e))/0x2+-parseInt(_0x4f39a4(0x180))/0x3+-parseInt(_0x4f39a4(0x17c))/0x4*(-parseInt(_0x4f39a4(0x17b))/0x5)+-parseInt(_0x4f39a4(0x179))/0x6*(parseInt(_0x4f39a4(0x186))/0x7)+parseInt(_0x4f39a4(0x181))/0x8*(parseInt(_0x4f39a4(0x17f))/0x9)+parseInt(_0x4f39a4(0x178))/0xa;if(_0x5411b0===_0x792e5d)break;else _0x45b66a['push'](_0x45b66a['shift']());}catch(_0x3b5376){_0x45b66a['push'](_0x45b66a['shift']());}}}(a45_0x215d,0xd5d20));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a45_0x215d(){var _0x70119f=['78216lJmZis','global','655oiujpf','316OeJniz','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','2846600HIoIeq','108NZxNdn','3871512RjzEcj','735352JKEXhq','validation','107242aCMSkk','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','project','609HMbqJt','8710090TcYeAT'];a45_0x215d=function(){return _0x70119f;};return a45_0x215d();}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(_0x47a675){var _0x3d0df4=a45_0x10f8;if(_0x47a675[_0x3d0df4(0x17a)])return _0x3d0df4(0x17a);if(!isInProject())throw CliErrors[_0x3d0df4(0x182)](_0x3d0df4(0x17d),_0x3d0df4(0x184)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x3d0df4(0x185);}function a45_0x10f8(_0x3202e7,_0x3fce0d){_0x3202e7=_0x3202e7-0x178;var _0x215df7=a45_0x215d();var _0x10f843=_0x215df7[_0x3202e7];return _0x10f843;}export function readScopedConfig(_0x58ab4a){return readConfigFile(resolveWriteConfigPath(_0x58ab4a));}export function writeScopedConfig(_0x168708,_0x38f60c){writeConfigFile(resolveWriteConfigPath(_0x38f60c),_0x168708);}
@@ -1 +1 @@
1
- const a46_0x5e24b5=a46_0x1b5f;(function(_0x177550,_0x1ec991){const _0x16b7a1=a46_0x1b5f,_0x719a15=_0x177550();while(!![]){try{const _0x1ed7bf=parseInt(_0x16b7a1(0xd4))/0x1+parseInt(_0x16b7a1(0xd7))/0x2+-parseInt(_0x16b7a1(0xce))/0x3*(parseInt(_0x16b7a1(0xcd))/0x4)+parseInt(_0x16b7a1(0xd0))/0x5*(-parseInt(_0x16b7a1(0xc7))/0x6)+-parseInt(_0x16b7a1(0xd5))/0x7+parseInt(_0x16b7a1(0xd8))/0x8*(parseInt(_0x16b7a1(0xcc))/0x9)+parseInt(_0x16b7a1(0xd9))/0xa;if(_0x1ed7bf===_0x1ec991)break;else _0x719a15['push'](_0x719a15['shift']());}catch(_0x51f826){_0x719a15['push'](_0x719a15['shift']());}}}(a46_0x5550,0xbcd14));function a46_0x1b5f(_0x5008a2,_0x535775){_0x5008a2=_0x5008a2-0xc7;const _0x555020=a46_0x5550();let _0x1b5fd5=_0x555020[_0x5008a2];return _0x1b5fd5;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a46_0x5e24b5(0xd2),'operation':a46_0x5e24b5(0xd2),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a46_0x5e24b5(0xd1),'helpExtra':[a46_0x5e24b5(0xca),a46_0x5e24b5(0xd6),a46_0x5e24b5(0xc8),a46_0x5e24b5(0xd3),a46_0x5e24b5(0xc9),a46_0x5e24b5(0xcb)][a46_0x5e24b5(0xcf)]('\x0a')});function a46_0x5550(){const _0x46b0a0=['\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}]','653545RTWRaw','1090719IwKtGS','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','2616060hWNAqi','29600lrALBm','11927110VhgBAL','66cVoXUa','\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\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','504zmdocQ','344SLGdZH','38730eEGdPm','join','600915byxWiY','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','filter'];a46_0x5550=function(){return _0x46b0a0;};return a46_0x5550();}
1
+ const a46_0x1ac5e8=a46_0x2d0f;function a46_0x2d0f(_0x2bc0e7,_0x5d7c9d){_0x2bc0e7=_0x2bc0e7-0x93;const _0x41a15c=a46_0x41a1();let _0x2d0fb0=_0x41a15c[_0x2bc0e7];return _0x2d0fb0;}(function(_0x492e8b,_0x25abad){const _0x371167=a46_0x2d0f,_0x24699b=_0x492e8b();while(!![]){try{const _0x17298e=parseInt(_0x371167(0x9d))/0x1+parseInt(_0x371167(0xa0))/0x2+-parseInt(_0x371167(0x9e))/0x3*(-parseInt(_0x371167(0x96))/0x4)+-parseInt(_0x371167(0xa2))/0x5*(-parseInt(_0x371167(0x98))/0x6)+parseInt(_0x371167(0xa1))/0x7*(-parseInt(_0x371167(0x97))/0x8)+-parseInt(_0x371167(0x95))/0x9*(parseInt(_0x371167(0x9f))/0xa)+-parseInt(_0x371167(0x9c))/0xb;if(_0x17298e===_0x25abad)break;else _0x24699b['push'](_0x24699b['shift']());}catch(_0x1fd85f){_0x24699b['push'](_0x24699b['shift']());}}}(a46_0x41a1,0x3b052));import{buildDataCommand}from'../../commands/data/shared.js';function a46_0x41a1(){const _0x22fbe8=['865tIzUkx','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','filter','81vzzjdG','48dfbbGo','701496aHeRcd','4998PhHNpQ','join','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','\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}]','4711575xqQIEM','431509krawqk','53607WYWYIH','310520FExvxh','669734deHqen','14Sqjwio'];a46_0x41a1=function(){return _0x22fbe8;};return a46_0x41a1();}export const dataFilter=buildDataCommand({'command':a46_0x1ac5e8(0x94),'operation':'filter','description':a46_0x1ac5e8(0xa3),'paramsRequired':![],'paramsHint':'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','helpExtra':['\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','\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]',a46_0x1ac5e8(0x9b),a46_0x1ac5e8(0x93),a46_0x1ac5e8(0x9a)][a46_0x1ac5e8(0x99)]('\x0a')});
@@ -1 +1 @@
1
- function a47_0x437c(){const _0x1ac03b=['1434808ZrXoKO','22vHzUnd','96806LeVgnM','140020fZSJCN','9vjJFje','1064315IQiGVy','2447440jwmHGb','1wgjABM','Get\x20a\x20single\x20record\x20by\x20ID','57spkBNX','3313910mWsjHg','5696412NEHtid','getOne','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','6DgsuLH'];a47_0x437c=function(){return _0x1ac03b;};return a47_0x437c();}const a47_0x55a770=a47_0x2b91;function a47_0x2b91(_0x47a7ad,_0x12fbb0){_0x47a7ad=_0x47a7ad-0x186;const _0x437c4d=a47_0x437c();let _0x2b918b=_0x437c4d[_0x47a7ad];return _0x2b918b;}(function(_0x3d8f27,_0x4b41f7){const _0x185448=a47_0x2b91,_0x287051=_0x3d8f27();while(!![]){try{const _0x5ccc1c=parseInt(_0x185448(0x190))/0x1*(parseInt(_0x185448(0x18b))/0x2)+parseInt(_0x185448(0x192))/0x3*(-parseInt(_0x185448(0x18c))/0x4)+parseInt(_0x185448(0x193))/0x5+-parseInt(_0x185448(0x188))/0x6*(-parseInt(_0x185448(0x18e))/0x7)+parseInt(_0x185448(0x189))/0x8*(parseInt(_0x185448(0x18d))/0x9)+-parseInt(_0x185448(0x18f))/0xa*(parseInt(_0x185448(0x18a))/0xb)+parseInt(_0x185448(0x194))/0xc;if(_0x5ccc1c===_0x4b41f7)break;else _0x287051['push'](_0x287051['shift']());}catch(_0x231a07){_0x287051['push'](_0x287051['shift']());}}}(a47_0x437c,0x588cb));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a47_0x55a770(0x186),'operation':a47_0x55a770(0x186),'description':a47_0x55a770(0x191),'paramsRequired':!![],'paramsHint':a47_0x55a770(0x187)});
1
+ const a47_0x187ac5=a47_0x10be;(function(_0x25f20c,_0x5b6c1b){const _0x3f9fb3=a47_0x10be,_0x1e4410=_0x25f20c();while(!![]){try{const _0x565ede=parseInt(_0x3f9fb3(0xbf))/0x1*(parseInt(_0x3f9fb3(0xc3))/0x2)+parseInt(_0x3f9fb3(0xbe))/0x3+parseInt(_0x3f9fb3(0xc6))/0x4+parseInt(_0x3f9fb3(0xc5))/0x5+parseInt(_0x3f9fb3(0xbc))/0x6+-parseInt(_0x3f9fb3(0xba))/0x7*(parseInt(_0x3f9fb3(0xbd))/0x8)+-parseInt(_0x3f9fb3(0xc2))/0x9*(parseInt(_0x3f9fb3(0xc4))/0xa);if(_0x565ede===_0x5b6c1b)break;else _0x1e4410['push'](_0x1e4410['shift']());}catch(_0x20fe1f){_0x1e4410['push'](_0x1e4410['shift']());}}}(a47_0x4af1,0xcb701));import{buildDataCommand}from'../../commands/data/shared.js';function a47_0x10be(_0xffd86e,_0x4ae1e6){_0xffd86e=_0xffd86e-0xba;const _0x4af177=a47_0x4af1();let _0x10be1c=_0x4af177[_0xffd86e];return _0x10be1c;}export const dataGetOne=buildDataCommand({'command':a47_0x187ac5(0xc1),'operation':'getOne','description':a47_0x187ac5(0xbb),'paramsRequired':!![],'paramsHint':a47_0x187ac5(0xc0)});function a47_0x4af1(){const _0x34eeb9=['11382NKTsSb','Get\x20a\x20single\x20record\x20by\x20ID','6243156HIEFok','6576edXztJ','3981612Qzoxtl','10874fsJQSI','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','getOne','21685374hKbaJx','154wuolgv','10JgWynl','525005ICUOdp','5077240MeziWN'];a47_0x4af1=function(){return _0x34eeb9;};return a47_0x4af1();}
@@ -1 +1 @@
1
- (function(_0x41524b,_0x265528){const _0x2eb109=a48_0x2247,_0x16d1fe=_0x41524b();while(!![]){try{const _0x8604f2=parseInt(_0x2eb109(0xbd))/0x1*(-parseInt(_0x2eb109(0xc5))/0x2)+-parseInt(_0x2eb109(0xc1))/0x3*(parseInt(_0x2eb109(0xc2))/0x4)+parseInt(_0x2eb109(0xc6))/0x5*(parseInt(_0x2eb109(0xc0))/0x6)+parseInt(_0x2eb109(0xc3))/0x7+-parseInt(_0x2eb109(0xc4))/0x8*(-parseInt(_0x2eb109(0xbe))/0x9)+-parseInt(_0x2eb109(0xbf))/0xa+parseInt(_0x2eb109(0xbc))/0xb;if(_0x8604f2===_0x265528)break;else _0x16d1fe['push'](_0x16d1fe['shift']());}catch(_0x342e1d){_0x16d1fe['push'](_0x16d1fe['shift']());}}}(a48_0x43b3,0x719f6));import{dataFilter}from'../../commands/data/filter.js';function a48_0x2247(_0x2829bd,_0x592a3e){_0x2829bd=_0x2829bd-0xbc;const _0x43b3a0=a48_0x43b3();let _0x2247f1=_0x43b3a0[_0x2829bd];return _0x2247f1;}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];function a48_0x43b3(){const _0x39b642=['3512sdWeQW','406413ThMoAu','64eUnmPr','208118zpJAeX','757830kQusZS','9052120zBKRxs','1WlDtYm','260784zyHqaP','8066240kjkjFJ','18AhyGzG','654jvVsIz'];a48_0x43b3=function(){return _0x39b642;};return a48_0x43b3();}
1
+ (function(_0x52ff0e,_0x2cff00){const _0x5f35d4=a48_0x572a,_0x4a1d58=_0x52ff0e();while(!![]){try{const _0x575886=parseInt(_0x5f35d4(0x143))/0x1+parseInt(_0x5f35d4(0x148))/0x2+-parseInt(_0x5f35d4(0x147))/0x3+parseInt(_0x5f35d4(0x149))/0x4*(parseInt(_0x5f35d4(0x14c))/0x5)+-parseInt(_0x5f35d4(0x14a))/0x6+parseInt(_0x5f35d4(0x144))/0x7*(parseInt(_0x5f35d4(0x145))/0x8)+-parseInt(_0x5f35d4(0x14b))/0x9*(parseInt(_0x5f35d4(0x146))/0xa);if(_0x575886===_0x2cff00)break;else _0x4a1d58['push'](_0x4a1d58['shift']());}catch(_0x42d9a3){_0x4a1d58['push'](_0x4a1d58['shift']());}}}(a48_0x3aee,0x9faf0));function a48_0x572a(_0x45007a,_0x53f190){_0x45007a=_0x45007a-0x143;const _0x3aee4e=a48_0x3aee();let _0x572abe=_0x3aee4e[_0x45007a];return _0x572abe;}import{dataFilter}from'../../commands/data/filter.js';function a48_0x3aee(){const _0x4c8c1c=['20290923JxuwSW','5enTNao','1133634XfmEIf','6073473CRLQFo','8bCfGbL','10AxrLcq','273390nplmgt','1877920lByegf','4500308LWgIYq','6393414kdEWRV'];a48_0x3aee=function(){return _0x4c8c1c;};return a48_0x3aee();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0xe01db,_0x45ce3c){const _0x4b9110=a49_0x4833,_0x4050f7=_0xe01db();while(!![]){try{const _0x391a1d=parseInt(_0x4b9110(0xfd))/0x1+-parseInt(_0x4b9110(0xe7))/0x2+parseInt(_0x4b9110(0xf1))/0x3+-parseInt(_0x4b9110(0xf3))/0x4*(-parseInt(_0x4b9110(0xe6))/0x5)+-parseInt(_0x4b9110(0xe8))/0x6*(parseInt(_0x4b9110(0xfa))/0x7)+parseInt(_0x4b9110(0xef))/0x8+parseInt(_0x4b9110(0xff))/0x9*(-parseInt(_0x4b9110(0xfb))/0xa);if(_0x391a1d===_0x45ce3c)break;else _0x4050f7['push'](_0x4050f7['shift']());}catch(_0x52ddbb){_0x4050f7['push'](_0x4050f7['shift']());}}}(a49_0x33c9,0xc5f38));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 assertGetOneId(_0x10a8b4){const _0xdd32b6=a49_0x4833;if(!_0x10a8b4)throw CliErrors[_0xdd32b6(0xfe)](_0xdd32b6(0xe4),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0xfd4794=_0x10a8b4['id'];if(_0xfd4794===undefined||_0xfd4794===null||_0xfd4794==='')throw CliErrors[_0xdd32b6(0x100)](_0xdd32b6(0xf0),_0xdd32b6(0xeb));}function parseCommandParams(_0x404432){return parseJsonParams(_0x404432)??{};}function a49_0x4833(_0x1b6ba5,_0x5961b4){_0x1b6ba5=_0x1b6ba5-0xe3;const _0x33c9ba=a49_0x33c9();let _0x483368=_0x33c9ba[_0x1b6ba5];return _0x483368;}export function buildDataCommand(_0x16ce10){const _0x3656d4=a49_0x4833,_0x415361=_0x3656d4(0xea);return{'service':_0x3656d4(0xf9),'command':_0x16ce10[_0x3656d4(0xe5)],'description':_0x16ce10[_0x3656d4(0xf8)],'risk':'read','defaultOutputFormat':_0x3656d4(0xe3),'helpExtra':_0x16ce10['helpExtra'],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x3656d4(0xe9),'type':_0x3656d4(0xed),'description':_0x415361},{'name':'params','type':'string','description':_0x16ce10[_0x3656d4(0xf5)]}],async 'validate'(_0xfa9fd7){const _0x4db5cf=_0x3656d4,_0x2fdbf4=_0xfa9fd7['str'](_0x4db5cf(0xe4));if(_0x16ce10[_0x4db5cf(0xf2)]&&!_0x2fdbf4)throw CliErrors[_0x4db5cf(0xfe)]('params',_0x16ce10[_0x4db5cf(0xf5)]);const _0x133d7d=parseJsonParams(_0x2fdbf4);_0x16ce10[_0x4db5cf(0xf7)]===_0x4db5cf(0xee)&&assertGetOneId(_0x133d7d);},async 'execute'(_0x339776){const _0x246239=_0x3656d4,_0x41f834=parseCommandParams(_0x339776[_0x246239(0xec)](_0x246239(0xe4))),_0xad8203=Date[_0x246239(0xfc)](),_0x3b1e8d=await executeDatasetDataOperation(_0x339776['appCode'],_0x339776['str'](_0x246239(0xf4)),_0x16ce10['operation'],_0x41f834),_0x1778d7=Date['now']()-_0xad8203;return{'ok':!![],'data':{'result':_0x3b1e8d,'elapsed':_0x1778d7},'message':_0x246239(0xf6)+_0x16ce10[_0x246239(0xe5)]+_0x246239(0x101)+_0x1778d7+'ms'};}};}function a49_0x33c9(){const _0x29498e=['operation','description','data','2611reiIyB','10yloFTe','now','1235772EpXLDR','flagMissing','27081198nXdHne','validation','\x20completed\x20in\x20','compress','params','command','5ZnHGLp','630878jSozzn','20418wExlzl','alias','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','str','string','getOne','10587728lzIABL','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','4527231jLhNGw','paramsRequired','5345092qXVYcu','code','paramsHint','data\x20'];a49_0x33c9=function(){return _0x29498e;};return a49_0x33c9();}
1
+ (function(_0x259514,_0x4827f3){const _0xc04050=a49_0x3c88,_0x46207=_0x259514();while(!![]){try{const _0x2d3904=parseInt(_0xc04050(0x123))/0x1*(parseInt(_0xc04050(0x125))/0x2)+parseInt(_0xc04050(0x132))/0x3+-parseInt(_0xc04050(0x128))/0x4*(-parseInt(_0xc04050(0x120))/0x5)+parseInt(_0xc04050(0x129))/0x6+-parseInt(_0xc04050(0x137))/0x7*(-parseInt(_0xc04050(0x136))/0x8)+-parseInt(_0xc04050(0x126))/0x9*(parseInt(_0xc04050(0x139))/0xa)+-parseInt(_0xc04050(0x12f))/0xb;if(_0x2d3904===_0x4827f3)break;else _0x46207['push'](_0x46207['shift']());}catch(_0x201417){_0x46207['push'](_0x46207['shift']());}}}(a49_0x36bd,0xa1f8b));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 assertGetOneId(_0x21c5fc){const _0x5461fa=a49_0x3c88;if(!_0x21c5fc)throw CliErrors[_0x5461fa(0x12c)](_0x5461fa(0x11f),_0x5461fa(0x122));const _0x1f8a44=_0x21c5fc['id'];if(_0x1f8a44===undefined||_0x1f8a44===null||_0x1f8a44==='')throw CliErrors[_0x5461fa(0x12d)](_0x5461fa(0x121),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function parseCommandParams(_0x29e7db){return parseJsonParams(_0x29e7db)??{};}export function buildDataCommand(_0x2f4347){const _0x54b57c=a49_0x3c88,_0x52e4e9='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x54b57c(0x12a),'command':_0x2f4347[_0x54b57c(0x130)],'description':_0x2f4347[_0x54b57c(0x124)],'risk':'read','defaultOutputFormat':_0x54b57c(0x133),'helpExtra':_0x2f4347[_0x54b57c(0x135)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x54b57c(0x11c),'type':_0x54b57c(0x12b),'description':_0x52e4e9},{'name':_0x54b57c(0x11f),'type':_0x54b57c(0x12b),'description':_0x2f4347[_0x54b57c(0x13b)]}],async 'validate'(_0xc9e53b){const _0x3b917c=_0x54b57c,_0x132f50=_0xc9e53b[_0x3b917c(0x127)](_0x3b917c(0x11f));if(_0x2f4347[_0x3b917c(0x12e)]&&!_0x132f50)throw CliErrors[_0x3b917c(0x12c)](_0x3b917c(0x11f),_0x2f4347[_0x3b917c(0x13b)]);const _0x3e7950=parseJsonParams(_0x132f50);_0x2f4347['operation']===_0x3b917c(0x11d)&&assertGetOneId(_0x3e7950);},async 'execute'(_0x4fc77d){const _0x3897e6=_0x54b57c,_0x28c61c=parseCommandParams(_0x4fc77d[_0x3897e6(0x127)]('params')),_0x10eaac=Date[_0x3897e6(0x134)](),_0x494798=await executeDatasetDataOperation(_0x4fc77d['appCode'],_0x4fc77d[_0x3897e6(0x127)](_0x3897e6(0x11e)),_0x2f4347[_0x3897e6(0x131)],_0x28c61c),_0x4acd13=Date[_0x3897e6(0x134)]()-_0x10eaac;return{'ok':!![],'data':{'result':_0x494798,'elapsed':_0x4acd13},'message':_0x3897e6(0x138)+_0x2f4347[_0x3897e6(0x130)]+_0x3897e6(0x13a)+_0x4acd13+'ms'};}};}function a49_0x3c88(_0x1e7c68,_0x10ba75){_0x1e7c68=_0x1e7c68-0x11c;const _0x36bd60=a49_0x36bd();let _0x3c88de=_0x36bd60[_0x1e7c68];return _0x3c88de;}function a49_0x36bd(){const _0x4f2798=['operation','1615737pRnhAs','compress','now','helpExtra','40dQwdgJ','954961VmvAhq','data\x20','30aelRXy','\x20completed\x20in\x20','paramsHint','alias','getOne','code','params','17055WJurmU','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','127MYArQq','description','6038HSPpdN','2770479nmgDyX','str','1528VZAtrj','743994BhbSOQ','data','string','flagMissing','validation','paramsRequired','15885980mvrWLb','command'];a49_0x36bd=function(){return _0x4f2798;};return a49_0x36bd();}
@@ -1 +1 @@
1
- const a50_0x261055=a50_0x42aa;(function(_0x21a3ea,_0x2a93d1){const _0x1ee519=a50_0x42aa,_0x1528a5=_0x21a3ea();while(!![]){try{const _0x107e3d=parseInt(_0x1ee519(0x114))/0x1+parseInt(_0x1ee519(0x128))/0x2*(parseInt(_0x1ee519(0x11f))/0x3)+-parseInt(_0x1ee519(0x12a))/0x4+parseInt(_0x1ee519(0x11d))/0x5+-parseInt(_0x1ee519(0x110))/0x6*(-parseInt(_0x1ee519(0x11a))/0x7)+parseInt(_0x1ee519(0x10c))/0x8*(-parseInt(_0x1ee519(0x116))/0x9)+parseInt(_0x1ee519(0x122))/0xa*(-parseInt(_0x1ee519(0x127))/0xb);if(_0x107e3d===_0x2a93d1)break;else _0x1528a5['push'](_0x1528a5['shift']());}catch(_0x57cfd3){_0x1528a5['push'](_0x1528a5['shift']());}}}(a50_0x48ba,0xbd92b));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x261055(0x118),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':a50_0x261055(0x113)};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x30c844){const _0x490294=a50_0x261055;return _0x30c844==null?'':String(_0x30c844)[_0x490294(0x10e)]();}function getDatasetCode(_0x22236a){const _0x49af1c=a50_0x261055;return valueToString(_0x22236a[_0x49af1c(0x10f)]??_0x22236a['modelCode']??_0x22236a[_0x49af1c(0x11e)]?.['datasetCode']);}function getDatasetName(_0x337ae7){const _0x21a296=a50_0x261055;return valueToString(_0x337ae7[_0x21a296(0x10b)]??_0x337ae7['dataset']?.[_0x21a296(0x12d)])||'unknown';}function getDatasetSource(_0x296e5b){const _0x3aa62a=a50_0x261055;return valueToString(_0x296e5b[_0x3aa62a(0x10a)]??_0x296e5b['dataset']?.[_0x3aa62a(0x115)])[_0x3aa62a(0x121)]();}function a50_0x42aa(_0x31c327,_0xae9ed6){_0x31c327=_0x31c327-0x10a;const _0x48bae3=a50_0x48ba();let _0x42aaf6=_0x48bae3[_0x31c327];return _0x42aaf6;}function getDbtableConfig(_0x51b9a7){const _0x576fbd=a50_0x261055,_0x3ae0cf=_0x51b9a7[_0x576fbd(0x119)]??_0x51b9a7[_0x576fbd(0x12e)];return _0x3ae0cf&&typeof _0x3ae0cf===_0x576fbd(0x117)?_0x3ae0cf:{};}export function isDbTableBackedDataset(_0x1a9450){const _0x580d68=a50_0x261055,_0x9745e8=getDatasetSource(_0x1a9450);if(_0x9745e8==='METADATA')return![];const _0x10a65=getDbtableConfig(_0x1a9450),_0x186023=_0x10a65[_0x580d68(0x12c)]??_0x10a65['id'],_0x450960=valueToString(_0x10a65['tableName']??_0x1a9450['tableName']??_0x1a9450[_0x580d68(0x11e)]?.[_0x580d68(0x129)]);return _0x186023!==undefined&&_0x186023!==null&&_0x450960[_0x580d68(0x10d)]>0x0;}export function filterDbTableBackedDatasets(_0x4acc47){return _0x4acc47['filter'](_0x3c901c=>isDbTableBackedDataset(_0x3c901c));}export function buildDbTableBackedRequirementMessage(_0x2614b1,_0x4db2ec='SQL\x20schema\x20validation'){const _0x25ba49=a50_0x261055,_0x27e98a=getDatasetSource(_0x2614b1)||_0x25ba49(0x11c),_0x2934c6=getDatasetName(_0x2614b1),_0x3d38bb=getDatasetCode(_0x2614b1),_0x40de1f=_0x3d38bb?'\x20('+_0x3d38bb+')':'';return[_0x25ba49(0x112)+_0x2934c6+'\x22'+_0x40de1f+_0x25ba49(0x125)+_0x27e98a+_0x25ba49(0x123)+_0x4db2ec+_0x25ba49(0x12b),_0x25ba49(0x124),_0x25ba49(0x126),_0x25ba49(0x11b)+RUNTIME_DATA_ACCESS_COMMANDS[_0x25ba49(0x120)]+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。'][_0x25ba49(0x111)]('\x20');}export function assertDatasetIsDbTableBacked(_0x2d2276,_0xf77479){if(!isDbTableBackedDataset(_0x2d2276))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x2d2276,_0xf77479));}function a50_0x48ba(){const _0x58580f=['2860izkXgc','\x20类型,没有可用于\x20','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','\x20是\x20','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','47102JvTRkM','1948ZpgViv','tableName','3411784hXVqbY','\x20的\x20DB_TABLE\x20数据源上下文。','dbId','datasetName','dbtable','source','name','16euAjIS','length','trim','code','348TlszGa','join','当前数据集\x20\x22','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','993657FAJXHY','sourceType','1295469nnDRhl','object','lovrabet','dbtableConfig','117397gHGfTX','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','UNKNOWN','3067990ktHFjf','dataset','1731DRgjgT','filter','toUpperCase'];a50_0x48ba=function(){return _0x58580f;};return a50_0x48ba();}
1
+ const a50_0x184195=a50_0x13b5;function a50_0x513c(){const _0x57fb02=['unknown','\x20是\x20','filter','object','source','295345oWClaL','3vGpxYi','23024mUtLYX','join','SQL\x20schema\x20validation','165yGYCBY','length','sourceType','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','346302LRBncL','557468ojFBht','4881492DwFIsa','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','dbtable','datasetName','750174eIwnlP','UNKNOWN','tableName','name','modelCode','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','datasetCode','\x20类型,没有可用于\x20','METADATA','code','910GUeZdz','dataset','659290TqMktC','trim','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','1VHdOiG','getOne'];a50_0x513c=function(){return _0x57fb02;};return a50_0x513c();}(function(_0x3362f1,_0x261008){const _0x2343e2=a50_0x13b5,_0x3bea34=_0x3362f1();while(!![]){try{const _0x3cfbe4=-parseInt(_0x2343e2(0x8d))/0x1*(-parseInt(_0x2343e2(0xa3))/0x2)+-parseInt(_0x2343e2(0x95))/0x3*(parseInt(_0x2343e2(0x9e))/0x4)+-parseInt(_0x2343e2(0x94))/0x5+parseInt(_0x2343e2(0x9d))/0x6+-parseInt(_0x2343e2(0x87))/0x7*(parseInt(_0x2343e2(0x96))/0x8)+-parseInt(_0x2343e2(0x9f))/0x9+parseInt(_0x2343e2(0x89))/0xa*(parseInt(_0x2343e2(0x99))/0xb);if(_0x3cfbe4===_0x261008)break;else _0x3bea34['push'](_0x3bea34['shift']());}catch(_0x31fb36){_0x3bea34['push'](_0x3bea34['shift']());}}}(a50_0x513c,0x4ae57));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':'lovrabet','filter':a50_0x184195(0x82),'getOne':a50_0x184195(0x8b)};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x184195(0x9c);function valueToString(_0x2ba7f8){const _0x548ff8=a50_0x184195;return _0x2ba7f8==null?'':String(_0x2ba7f8)[_0x548ff8(0x8a)]();}function a50_0x13b5(_0x2a353e,_0x400afe){_0x2a353e=_0x2a353e-0x7e;const _0x513c38=a50_0x513c();let _0x13b5b4=_0x513c38[_0x2a353e];return _0x13b5b4;}function getDatasetCode(_0x1cd4fe){const _0x5915b7=a50_0x184195;return valueToString(_0x1cd4fe[_0x5915b7(0x86)]??_0x1cd4fe[_0x5915b7(0x81)]??_0x1cd4fe['dataset']?.[_0x5915b7(0x83)]);}function getDatasetName(_0xf15f92){const _0x45deb3=a50_0x184195;return valueToString(_0xf15f92[_0x45deb3(0x80)]??_0xf15f92[_0x45deb3(0x88)]?.[_0x45deb3(0xa2)])||_0x45deb3(0x8f);}function getDatasetSource(_0x18b507){const _0x56031c=a50_0x184195;return valueToString(_0x18b507[_0x56031c(0x93)]??_0x18b507[_0x56031c(0x88)]?.[_0x56031c(0x9b)])['toUpperCase']();}function getDbtableConfig(_0x8b6c77){const _0x1e6cdc=a50_0x184195,_0x3be408=_0x8b6c77['dbtableConfig']??_0x8b6c77[_0x1e6cdc(0xa1)];return _0x3be408&&typeof _0x3be408===_0x1e6cdc(0x92)?_0x3be408:{};}export function isDbTableBackedDataset(_0x3fba4c){const _0x4f99d5=a50_0x184195,_0x5501ef=getDatasetSource(_0x3fba4c);if(_0x5501ef===_0x4f99d5(0x85))return![];const _0x47f507=getDbtableConfig(_0x3fba4c),_0x58ee7e=_0x47f507['dbId']??_0x47f507['id'],_0x5d8b73=valueToString(_0x47f507[_0x4f99d5(0x7f)]??_0x3fba4c['tableName']??_0x3fba4c[_0x4f99d5(0x88)]?.[_0x4f99d5(0x7f)]);return _0x58ee7e!==undefined&&_0x58ee7e!==null&&_0x5d8b73[_0x4f99d5(0x9a)]>0x0;}export function filterDbTableBackedDatasets(_0x377f5c){const _0x1dafe7=a50_0x184195;return _0x377f5c[_0x1dafe7(0x91)](_0x32dc02=>isDbTableBackedDataset(_0x32dc02));}export function buildDbTableBackedRequirementMessage(_0x1ca835,_0x29ba91=a50_0x184195(0x98)){const _0x2a2885=a50_0x184195,_0x32a305=getDatasetSource(_0x1ca835)||_0x2a2885(0x7e),_0x24f514=getDatasetName(_0x1ca835),_0x5793e2=getDatasetCode(_0x1ca835),_0xe1e94e=_0x5793e2?'\x20('+_0x5793e2+')':'';return['当前数据集\x20\x22'+_0x24f514+'\x22'+_0xe1e94e+_0x2a2885(0x90)+_0x32a305+_0x2a2885(0x84)+_0x29ba91+'\x20的\x20DB_TABLE\x20数据源上下文。',_0x2a2885(0x8c),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0x2a2885(0xa0)+RUNTIME_DATA_ACCESS_COMMANDS[_0x2a2885(0x91)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x2a2885(0x8e)]+'。'][_0x2a2885(0x97)]('\x20');}export function assertDatasetIsDbTableBacked(_0x114c78,_0x473750){if(!isDbTableBackedDataset(_0x114c78))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x114c78,_0x473750));}