@lovrabet/rabetbase-cli 2.2.4-beta.1 → 2.2.4-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -1
  60. package/lib/commands/dataset/relation-delete.js +1 -1
  61. package/lib/commands/dataset/relation-shared.js +1 -1
  62. package/lib/commands/dataset/relation-update.js +1 -1
  63. package/lib/commands/dataset/relations.js +1 -1
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/list.js +1 -1
  87. package/lib/commands/menu/shared/compare-table.js +1 -1
  88. package/lib/commands/menu/shared/index.js +1 -1
  89. package/lib/commands/menu/shared/inquirer.js +1 -1
  90. package/lib/commands/menu/shared/local-pages.js +1 -1
  91. package/lib/commands/menu/shared/logic.js +1 -1
  92. package/lib/commands/menu/shared/service.js +1 -1
  93. package/lib/commands/menu/shared/sync-core.js +1 -1
  94. package/lib/commands/menu/shared/update-core.js +1 -1
  95. package/lib/commands/menu/shared/valid-url.js +1 -1
  96. package/lib/commands/menu/sync.js +1 -1
  97. package/lib/commands/menu/update.js +1 -1
  98. package/lib/commands/page/generate-start.js +1 -1
  99. package/lib/commands/page/generate-status.js +1 -1
  100. package/lib/commands/page/index.js +1 -1
  101. package/lib/commands/page/pull.js +1 -1
  102. package/lib/commands/page/push.js +1 -1
  103. package/lib/commands/page/relation-audit.js +1 -1
  104. package/lib/commands/page/shared.js +1 -1
  105. package/lib/commands/page/standard-page-status.js +1 -1
  106. package/lib/commands/page/sync.js +1 -1
  107. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  108. package/lib/commands/project/create/format-elapsed.js +1 -1
  109. package/lib/commands/project/create/main.js +1 -1
  110. package/lib/commands/project/create/non-interactive.js +1 -1
  111. package/lib/commands/project/create/project-template-path.js +1 -1
  112. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  113. package/lib/commands/project/create/use-format-code.js +1 -1
  114. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  115. package/lib/commands/project/index.js +1 -1
  116. package/lib/commands/project/init.js +1 -1
  117. package/lib/commands/project/upgrade.js +1 -1
  118. package/lib/commands/registry.js +1 -1
  119. package/lib/commands/run/index.js +1 -1
  120. package/lib/commands/schema.js +1 -1
  121. package/lib/commands/skill/index.js +1 -1
  122. package/lib/commands/sql/create.js +1 -1
  123. package/lib/commands/sql/delete.js +1 -1
  124. package/lib/commands/sql/detail.js +1 -1
  125. package/lib/commands/sql/exec.js +1 -1
  126. package/lib/commands/sql/index.js +1 -1
  127. package/lib/commands/sql/list.js +1 -1
  128. package/lib/commands/sql/pull.js +1 -1
  129. package/lib/commands/sql/push.js +1 -1
  130. package/lib/commands/sql/save.js +1 -1
  131. package/lib/commands/sql/shared.js +1 -1
  132. package/lib/commands/sql/status.js +1 -1
  133. package/lib/commands/sql/validate.js +1 -1
  134. package/lib/config/schema.js +1 -1
  135. package/lib/constant/cdn.js +1 -1
  136. package/lib/constant/cli.js +1 -1
  137. package/lib/constant/defaults.js +1 -1
  138. package/lib/constant/domain.js +1 -1
  139. package/lib/constant/env.js +1 -1
  140. package/lib/constant/output.js +1 -1
  141. package/lib/constant/paths.js +1 -1
  142. package/lib/constant/risk.js +1 -1
  143. package/lib/context.js +1 -1
  144. package/lib/core/alias-resolver.js +1 -1
  145. package/lib/core/api-client.js +1 -1
  146. package/lib/core/bff/config.js +1 -1
  147. package/lib/core/bff/file-system.js +1 -1
  148. package/lib/core/bff/hash.js +1 -1
  149. package/lib/core/bff/lock.js +1 -1
  150. package/lib/core/bff/utils.js +1 -1
  151. package/lib/core/db-resolver.js +1 -1
  152. package/lib/core/page/file-system.js +1 -1
  153. package/lib/core/page/hash.js +1 -1
  154. package/lib/core/page/lock.js +1 -1
  155. package/lib/core/sql-sync/config.js +1 -1
  156. package/lib/core/sql-sync/file-system.js +1 -1
  157. package/lib/core/sql-sync/hash.js +1 -1
  158. package/lib/core/sql-sync/lock.js +1 -1
  159. package/lib/core/sql-sync/utils.js +1 -1
  160. package/lib/core/sql-validator.js +1 -1
  161. package/lib/errors.js +1 -1
  162. package/lib/framework/build-all-flags.js +1 -1
  163. package/lib/framework/flags.js +1 -1
  164. package/lib/framework/help.js +1 -1
  165. package/lib/framework/index.js +1 -1
  166. package/lib/framework/output.js +1 -1
  167. package/lib/framework/response.js +1 -1
  168. package/lib/framework/runner-alias.js +1 -1
  169. package/lib/framework/runner.js +1 -1
  170. package/lib/framework/schema-export.js +1 -1
  171. package/lib/framework/types.js +1 -1
  172. package/lib/generated/build-info.js +1 -1
  173. package/lib/help.js +1 -1
  174. package/lib/skills/main.js +1 -1
  175. package/lib/skills/npx-skills-add.js +1 -1
  176. package/lib/telemetry/cli-command-trace.js +1 -1
  177. package/lib/telemetry/cli-help-trace.js +1 -1
  178. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  179. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  180. package/lib/telemetry/send-cli-trace-log.js +1 -1
  181. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  182. package/lib/utils/ai_config.js +1 -1
  183. package/lib/utils/apply-jq-filter.js +1 -1
  184. package/lib/utils/cdn-config.js +1 -1
  185. package/lib/utils/check-sdk-version.js +1 -1
  186. package/lib/utils/cli-version-check.js +1 -1
  187. package/lib/utils/cli-version-policy.js +1 -1
  188. package/lib/utils/config.js +1 -1
  189. package/lib/utils/copy-directory.js +1 -1
  190. package/lib/utils/entity-with-id.js +1 -1
  191. package/lib/utils/file-utils.js +1 -1
  192. package/lib/utils/guides-cdn.js +1 -1
  193. package/lib/utils/http-client.js +1 -1
  194. package/lib/utils/is-non-interactive.js +1 -1
  195. package/lib/utils/logger.js +1 -1
  196. package/lib/utils/params.js +1 -1
  197. package/lib/utils/platform.js +1 -1
  198. package/lib/utils/rules-cdn.js +1 -1
  199. package/lib/utils/sleep.js +1 -1
  200. package/lib/utils/template-replacer.js +1 -1
  201. package/lib/utils/update-notice.js +1 -1
  202. package/lib/utils/version.js +1 -1
  203. package/lib/utils/with-active-cookie.js +1 -1
  204. package/lib/utils/write-cli-side-channel.js +1 -1
  205. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x494a98=a32_0x4b0b;(function(_0x3a5db9,_0x394c14){const _0x1c249f=a32_0x4b0b,_0x2e4e7f=_0x3a5db9();while(!![]){try{const _0x4c78fc=-parseInt(_0x1c249f(0x13f))/0x1+-parseInt(_0x1c249f(0x187))/0x2*(parseInt(_0x1c249f(0x163))/0x3)+-parseInt(_0x1c249f(0x161))/0x4*(-parseInt(_0x1c249f(0x157))/0x5)+-parseInt(_0x1c249f(0x170))/0x6*(-parseInt(_0x1c249f(0x152))/0x7)+parseInt(_0x1c249f(0x151))/0x8*(-parseInt(_0x1c249f(0x171))/0x9)+parseInt(_0x1c249f(0x15c))/0xa*(parseInt(_0x1c249f(0x13e))/0xb)+-parseInt(_0x1c249f(0x15b))/0xc*(-parseInt(_0x1c249f(0x178))/0xd);if(_0x4c78fc===_0x394c14)break;else _0x2e4e7f['push'](_0x2e4e7f['shift']());}catch(_0x153e8a){_0x2e4e7f['push'](_0x2e4e7f['shift']());}}}(a32_0x22ef,0xf0178));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';function a32_0x4b0b(_0x4aad0e,_0x2659bc){_0x4aad0e=_0x4aad0e-0x139;const _0x22ef72=a32_0x22ef();let _0x4b0b8b=_0x22ef72[_0x4aad0e];return _0x4b0b8b;}import{sleep}from'../../utils/sleep.js';function a32_0x22ef(){const _0x4cb7bb=['name','179635BrjilI','stringify','datasetCodeToDataset','filePath','6974868mEiRlo','7370deGitQ','ENDPOINT','get','description','join','184NeVGCj','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','8457GVIfnj','some','\x22.\x20','bool','filter','\x20uploaded,\x20','has','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','Lock\x20scope\x20for\x20app\x20\x22','type','would_push','runtime\x20cache\x20not\x20needed','No\x20local\x20BFF\x20functions\x20found.','78KPcAyL','9VFkqRt','update','version','string','Local\x20function\x20not\x20found:\x20','runtime\x20cache\x20clear\x20failed','map','26cEuXlO','HOOK','script','push','lockKey','toISOString','attempted','validation','alias','utf8','lastSync','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','set','Push\x20only\x20this\x20script\x20type','806SRDaqx','lockFilePath','Cannot\x20resolve\x20dataset\x20for\x20\x22','bff','operationType','Would\x20inspect\x20','status','Push\x20complete:\x20','Incomplete\x20HOOK\x20path:\x20','remoteId','values','create','26785QawttS','1597778RDGaMW','code','functions','COMMON','Push\x20local\x20BFF\x20scripts\x20to\x20remote','datasetCode','\x20failed,\x20',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','scriptsRoot','hash','appCode','str','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Force\x20push\x20ignoring\x20hash\x20protection','force','aliasToDatasetCode','functionNode','cleared','14501144HGFtkA','495481MRUTGW','unchanged','length','Runtime\x20script\x20cache\x20cleared.'];a32_0x22ef=function(){return _0x4cb7bb;};return a32_0x22ef();}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_0x494a98(0x18a),'command':'push','description':a32_0x494a98(0x143),'risk':'high-risk-write','flags':[{'name':a32_0x494a98(0x16c),'type':a32_0x494a98(0x174),'description':a32_0x494a98(0x186),'enum':[a32_0x494a98(0x142),a32_0x494a98(0x15d),a32_0x494a98(0x179)]},{'name':a32_0x494a98(0x156),'type':'string','description':a32_0x494a98(0x162)},{'name':a32_0x494a98(0x14d),'type':'boolean','description':a32_0x494a98(0x14c)}],async 'dryRun'(_0x3f7e59){const _0x431a2f=a32_0x494a98,_0x28277f=loadBffProjectConfig(_0x3f7e59[_0x431a2f(0x149)]),_0x3a66b9=await readBffLockFile(_0x28277f[_0x431a2f(0x188)]),{appLock:_0x2a1d7b}=ensureLockScope(_0x3a66b9??createEmptyBffLock(),_0x3f7e59[_0x431a2f(0x149)],_0x28277f[_0x431a2f(0x147)],_0x431a2f(0x17b)),_0x35acc0=await getTargetFunctions(_0x28277f,_0x3f7e59),_0x1b9572=_0x3f7e59[_0x431a2f(0x166)](_0x431a2f(0x14d)),_0x33eed5=[];for(const _0x597d0d of _0x35acc0){const _0x1f1bb0=await computeFileHash(_0x597d0d[_0x431a2f(0x15a)]),_0x126774=_0x2a1d7b[_0x431a2f(0x141)][_0x597d0d['lockKey']],_0x20143a=!!_0x126774&&_0x126774[_0x431a2f(0x148)]===_0x1f1bb0;_0x33eed5['push']({'lockKey':_0x597d0d['lockKey'],'filePath':_0x597d0d[_0x431a2f(0x15a)],'remoteId':_0x126774?.['remoteId']??null,'mode':_0x126774?.[_0x431a2f(0x13b)]?_0x431a2f(0x172):_0x431a2f(0x13d),'status':!_0x1b9572&&_0x20143a?_0x431a2f(0x153):_0x431a2f(0x16d)});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x3f7e59[_0x431a2f(0x149)],'force':_0x1b9572,'files':_0x33eed5,'cacheClearAtRuntime':_0x33eed5[_0x431a2f(0x164)](_0x35f238=>_0x35f238[_0x431a2f(0x18d)]===_0x431a2f(0x16d)),'cacheClearAtRuntimeTimes':_0x33eed5[_0x431a2f(0x164)](_0x58562a=>_0x58562a[_0x431a2f(0x18d)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x431a2f(0x18c)+_0x33eed5[_0x431a2f(0x154)]+_0x431a2f(0x14b)};},async 'execute'(_0x21d864){const _0x264901=a32_0x494a98,_0xfe5f0f=loadBffProjectConfig(_0x21d864['appCode']),_0x44af3b=await readBffLockFile(_0xfe5f0f['lockFilePath']),{lockData:_0x36a8e7,appLock:_0x5bdc2d}=ensureLockScope(_0x44af3b??createEmptyBffLock(),_0x21d864[_0x264901(0x149)],_0xfe5f0f['scriptsRoot'],'push'),_0x2970cf=await getTargetFunctions(_0xfe5f0f,_0x21d864);if(_0x2970cf[_0x264901(0x154)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x264901(0x16f)};const _0x2a4283=_0x21d864[_0x264901(0x166)](_0x264901(0x14d)),_0x3f32e2=JSON['parse'](JSON[_0x264901(0x158)](_0x36a8e7)),_0x350c53=_0x3f32e2[_0x264901(0x184)][_0x21d864['appCode']];if(!_0x350c53)throw new Error(_0x264901(0x16b)+_0x21d864['appCode']+_0x264901(0x183));const _0x18fbf6=await buildHookMaps(_0x21d864[_0x264901(0x149)],_0x21d864['apiDir'],_0x2970cf,_0x350c53),_0x302a1e=[],_0x5e2766=[],_0xdf8d7d=[];for(const _0x43a44e of _0x2970cf){const _0x584efb=await computeFileHash(_0x43a44e[_0x264901(0x15a)]),_0x10fa91=_0x350c53['functions'][_0x43a44e[_0x264901(0x17c)]];if(!_0x2a4283&&_0x10fa91&&_0x10fa91[_0x264901(0x148)]===_0x584efb){_0x5e2766[_0x264901(0x17b)]({'lockKey':_0x43a44e['lockKey'],'reason':_0x264901(0x153)});continue;}try{await uploadSingleFunction(_0x21d864[_0x264901(0x149)],_0x43a44e,_0x350c53,_0x18fbf6);const _0x17497d=_0x350c53[_0x264901(0x141)][_0x43a44e[_0x264901(0x17c)]];_0x302a1e[_0x264901(0x17b)]({'lockKey':_0x43a44e[_0x264901(0x17c)],'remoteId':_0x17497d?.[_0x264901(0x13b)]??0x0});}catch(_0x4e4dd8){_0xdf8d7d['push']({'lockKey':_0x43a44e[_0x264901(0x17c)],'error':_0x4e4dd8 instanceof Error?_0x4e4dd8['message']:String(_0x4e4dd8)});}}_0x350c53[_0x264901(0x182)]=new Date()[_0x264901(0x17d)](),await writeBffLockFile(_0xfe5f0f[_0x264901(0x188)],_0x3f32e2),await waitForUploadedLockEntries(_0xfe5f0f[_0x264901(0x188)],_0x21d864[_0x264901(0x149)],_0x302a1e[_0x264901(0x177)](_0x40e564=>_0x40e564['lockKey']));let _0x542308={'attempted':![],'cleared':![]};if(_0x302a1e[_0x264901(0x154)]>0x0)try{let _0x2d84c='';for(let _0x1c53a2=0x0;_0x1c53a2<CACHE_CLEAR_ATTEMPTS;_0x1c53a2+=0x1){_0x2d84c=await clearBffScriptCache(),_0x1c53a2<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x542308={'attempted':!![],'cleared':!![],'message':_0x2d84c||_0x264901(0x155)};}catch(_0x2ee8de){_0x542308={'attempted':!![],'cleared':![],'error':_0x2ee8de instanceof Error?_0x2ee8de['message']:String(_0x2ee8de)};}const _0x17851e=_0xdf8d7d[_0x264901(0x154)]===0x0&&(_0x542308['attempted']?_0x542308[_0x264901(0x150)]:!![]),_0x3d1815=_0x542308[_0x264901(0x17e)]?_0x542308['cleared']?'runtime\x20cache\x20cleared':_0x264901(0x176):_0x264901(0x16e);return{'ok':_0x17851e,'data':{'uploaded':_0x302a1e,'skipped':_0x5e2766,'failed':_0xdf8d7d,'cacheClear':_0x542308},'message':_0x264901(0x139)+_0x302a1e[_0x264901(0x154)]+_0x264901(0x168)+_0x5e2766[_0x264901(0x154)]+'\x20skipped,\x20'+_0xdf8d7d[_0x264901(0x154)]+_0x264901(0x145)+_0x3d1815};}};async function getTargetFunctions(_0x42e9b3,_0x15aadf){const _0x219e67=a32_0x494a98,_0x42cbd4=_0x15aadf[_0x219e67(0x14a)](_0x219e67(0x16c)),_0x195fd2=_0x15aadf[_0x219e67(0x14a)](_0x219e67(0x156)),_0x45dd0c=normalizeBffType(_0x42cbd4)??undefined;if(_0x195fd2&&!_0x45dd0c)throw CliErrors[_0x219e67(0x17f)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x120de5=await scanLocalBffFunctions(_0x42e9b3,_0x45dd0c);if(_0x195fd2){const _0x530486=_0x120de5[_0x219e67(0x167)](_0x4050c7=>_0x4050c7[_0x219e67(0x156)]===_0x195fd2);if(_0x530486['length']===0x0)throw CliErrors['validation'](_0x219e67(0x175)+_0x45dd0c+'/'+_0x195fd2);return _0x530486;}return _0x120de5;}async function buildHookMaps(_0x2f7f41,_0x2a8020,_0x1c77af,_0x2a2918){const _0x2291c9=a32_0x494a98,_0x4d6114=_0x1c77af[_0x2291c9(0x164)](_0x1fd71c=>_0x1fd71c[_0x2291c9(0x16c)]===_0x2291c9(0x179));if(!_0x4d6114)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x3861fb=loadAliasMap(_0x2a8020,undefined,resolveApiFilePath(_0x2a8020,_0x2f7f41)),_0x191b7c=new Map(_0x3861fb[_0x2291c9(0x177)](_0x5cb7e7=>[_0x5cb7e7[_0x2291c9(0x180)],_0x5cb7e7[_0x2291c9(0x144)]]));for(const _0xd09880 of Object[_0x2291c9(0x13c)](_0x2a2918[_0x2291c9(0x141)])){_0xd09880[_0x2291c9(0x180)]&&_0xd09880[_0x2291c9(0x144)]&&!_0x191b7c[_0x2291c9(0x169)](_0xd09880[_0x2291c9(0x180)])&&_0x191b7c[_0x2291c9(0x185)](_0xd09880[_0x2291c9(0x180)],_0xd09880[_0x2291c9(0x144)]);}const _0x4e777c=await listDatasets(_0x2f7f41),_0x17552d=new Map(_0x4e777c['map'](_0x39c131=>[_0x39c131[_0x2291c9(0x140)],_0x39c131]));return{'aliasToDatasetCode':_0x191b7c,'datasetCodeToDataset':_0x17552d};}async function uploadSingleFunction(_0xce6370,_0x596db3,_0x234997,_0x2e68b2){const _0x33b15e=a32_0x494a98,_0x1a44d7=await readFile(_0x596db3['filePath'],_0x33b15e(0x181)),_0x59d973=await computeFileHash(_0x596db3['filePath']),_0x55b58=_0x234997[_0x33b15e(0x141)][_0x596db3[_0x33b15e(0x17c)]];if(_0x55b58?.[_0x33b15e(0x13b)]&&_0x55b58['version']==null)throw CliErrors[_0x33b15e(0x17f)](_0x596db3['lockKey']+_0x33b15e(0x146));let _0x20cbc9=extractScriptDescription(_0x1a44d7);if(!_0x20cbc9&&_0x55b58?.['remoteId']){const _0x394943=await getBffScriptInfo(_0x55b58['remoteId']);_0x20cbc9=_0x394943[_0x33b15e(0x15f)]||undefined;}const _0x2b5256={'appCode':_0xce6370,'functionName':_0x596db3['name'],'scriptType':_0x596db3[_0x33b15e(0x16c)],'scriptContent':_0x1a44d7};if(_0x55b58?.['remoteId'])_0x2b5256['id']=_0x55b58[_0x33b15e(0x13b)];if(_0x55b58?.[_0x33b15e(0x173)]!=null)_0x2b5256[_0x33b15e(0x173)]=_0x55b58[_0x33b15e(0x173)];if(_0x20cbc9)_0x2b5256[_0x33b15e(0x15f)]=_0x20cbc9;if(_0x596db3[_0x33b15e(0x16c)]===_0x33b15e(0x179)){const _0x239295=_0x596db3[_0x33b15e(0x180)];if(!_0x239295||!_0x596db3['operationType']||!_0x596db3['functionNode'])throw CliErrors['validation'](_0x33b15e(0x13a)+_0x596db3[_0x33b15e(0x17c)]);const _0x22db50=_0x2e68b2[_0x33b15e(0x14e)]['get'](_0x239295)??_0x55b58?.['datasetCode']??_0x239295,_0x21d712=_0x2e68b2[_0x33b15e(0x159)][_0x33b15e(0x15e)](_0x22db50);if(!_0x21d712)throw CliErrors[_0x33b15e(0x17f)](_0x33b15e(0x189)+_0x239295+_0x33b15e(0x165)+('Run\x20`'+CLI_BIN_NAME+'\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.'));_0x2b5256['datasetId']=_0x21d712['id'],_0x2b5256[_0x33b15e(0x18b)]=_0x596db3['operationType'],_0x2b5256[_0x33b15e(0x14f)]=_0x596db3[_0x33b15e(0x14f)];}const _0xee5e99=await saveBffScript(_0x2b5256),_0x1b63c8=_0xee5e99['id'],_0x2878af=_0xee5e99[_0x33b15e(0x17a)]??await getBffScriptInfo(_0x1b63c8),_0x79f92c={'hash':_0x59d973,'remoteId':_0x1b63c8,'version':_0x2878af[_0x33b15e(0x173)]};if(_0x596db3[_0x33b15e(0x16c)]===_0x33b15e(0x179)){const _0x17c449=_0x596db3[_0x33b15e(0x180)],_0x490bb2=_0x2e68b2[_0x33b15e(0x14e)][_0x33b15e(0x15e)](_0x17c449)??_0x55b58?.[_0x33b15e(0x144)]??_0x17c449;_0x2e68b2['aliasToDatasetCode'][_0x33b15e(0x169)](_0x17c449)?_0x79f92c['alias']=_0x17c449:_0x79f92c[_0x33b15e(0x180)]=_0x55b58?.[_0x33b15e(0x180)],_0x79f92c['datasetCode']=_0x490bb2,_0x79f92c[_0x33b15e(0x18b)]=_0x596db3['operationType'],_0x79f92c[_0x33b15e(0x14f)]=_0x596db3['functionNode'];}_0x234997[_0x33b15e(0x141)][_0x596db3[_0x33b15e(0x17c)]]=_0x79f92c;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5209b3,_0x57e011,_0x12245e){const _0x326e5a=a32_0x494a98;if(_0x12245e[_0x326e5a(0x154)]===0x0)return;for(let _0x23ce35=0x0;_0x23ce35<LOCK_SETTLE_RETRY_COUNT;_0x23ce35+=0x1){const _0x51dbf2=await readBffLockFile(_0x5209b3),_0x37ba98=_0x51dbf2?.['apps']?.[_0x57e011]?.[_0x326e5a(0x141)]??{},_0x4f0163=_0x12245e['every'](_0x1cfad0=>!!_0x37ba98[_0x1cfad0]?.[_0x326e5a(0x13b)]);if(_0x4f0163)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x326e5a(0x16a)+_0x12245e[_0x326e5a(0x160)](',\x20')+'.');}
1
+ const a32_0x279cf7=a32_0x2b08;(function(_0x5f1f85,_0x14ad19){const _0x3df5c8=a32_0x2b08,_0x562f18=_0x5f1f85();while(!![]){try{const _0x500122=-parseInt(_0x3df5c8(0x1d9))/0x1*(-parseInt(_0x3df5c8(0x1e2))/0x2)+-parseInt(_0x3df5c8(0x1d8))/0x3+parseInt(_0x3df5c8(0x1dd))/0x4+-parseInt(_0x3df5c8(0x1d1))/0x5+-parseInt(_0x3df5c8(0x1c7))/0x6*(parseInt(_0x3df5c8(0x1ee))/0x7)+parseInt(_0x3df5c8(0x1ce))/0x8+-parseInt(_0x3df5c8(0x1ae))/0x9*(-parseInt(_0x3df5c8(0x1af))/0xa);if(_0x500122===_0x14ad19)break;else _0x562f18['push'](_0x562f18['shift']());}catch(_0xc377c4){_0x562f18['push'](_0x562f18['shift']());}}}(a32_0x4cb3,0x67797));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;function a32_0x2b08(_0xb9c55c,_0x29bfcf){_0xb9c55c=_0xb9c55c-0x1a0;const _0x4cb3f0=a32_0x4cb3();let _0x2b082b=_0x4cb3f0[_0xb9c55c];return _0x2b082b;}export const bffPush={'service':a32_0x279cf7(0x1ac),'command':a32_0x279cf7(0x1d2),'description':a32_0x279cf7(0x1ec),'risk':'high-risk-write','flags':[{'name':'type','type':a32_0x279cf7(0x1b4),'description':a32_0x279cf7(0x1d5),'enum':[a32_0x279cf7(0x1be),a32_0x279cf7(0x1cf),a32_0x279cf7(0x1da)]},{'name':a32_0x279cf7(0x1c6),'type':a32_0x279cf7(0x1b4),'description':a32_0x279cf7(0x1e1)},{'name':a32_0x279cf7(0x1b6),'type':a32_0x279cf7(0x1e3),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x39fec5){const _0x32264e=a32_0x279cf7,_0x13ddea=loadBffProjectConfig(_0x39fec5[_0x32264e(0x1a3)]),_0x130a91=await readBffLockFile(_0x13ddea['lockFilePath']),{appLock:_0x5067ec}=ensureLockScope(_0x130a91??createEmptyBffLock(),_0x39fec5['appCode'],_0x13ddea[_0x32264e(0x1c8)],_0x32264e(0x1d2)),_0x18c06b=await getTargetFunctions(_0x13ddea,_0x39fec5),_0x2bbe7a=_0x39fec5[_0x32264e(0x1c5)](_0x32264e(0x1b6)),_0x2a80dc=[];for(const _0x182d01 of _0x18c06b){const _0x63cb56=await computeFileHash(_0x182d01[_0x32264e(0x1cd)]),_0x4342cb=_0x5067ec[_0x32264e(0x1bc)][_0x182d01[_0x32264e(0x1a1)]],_0x48315c=!!_0x4342cb&&_0x4342cb[_0x32264e(0x1d4)]===_0x63cb56;_0x2a80dc['push']({'lockKey':_0x182d01[_0x32264e(0x1a1)],'filePath':_0x182d01[_0x32264e(0x1cd)],'remoteId':_0x4342cb?.[_0x32264e(0x1df)]??null,'mode':_0x4342cb?.['remoteId']?_0x32264e(0x1a8):_0x32264e(0x1b3),'status':!_0x2bbe7a&&_0x48315c?_0x32264e(0x1c9):'would_push'});}return{'method':'POST','url':'/api/management/library/scripts/save','body':{'appCode':_0x39fec5[_0x32264e(0x1a3)],'force':_0x2bbe7a,'files':_0x2a80dc,'cacheClearAtRuntime':_0x2a80dc['some'](_0x5e0f3c=>_0x5e0f3c[_0x32264e(0x1b7)]===_0x32264e(0x1c3)),'cacheClearAtRuntimeTimes':_0x2a80dc['some'](_0x33e5f6=>_0x33e5f6[_0x32264e(0x1b7)]===_0x32264e(0x1c3))?CACHE_CLEAR_ATTEMPTS:0x0},'description':'Would\x20inspect\x20'+_0x2a80dc[_0x32264e(0x1ca)]+_0x32264e(0x1e0)};},async 'execute'(_0x5c28b1){const _0x430f4d=a32_0x279cf7,_0x13430d=loadBffProjectConfig(_0x5c28b1[_0x430f4d(0x1a3)]),_0x4ef8f4=await readBffLockFile(_0x13430d[_0x430f4d(0x1d7)]),{lockData:_0xe4ef9,appLock:_0x45ff6d}=ensureLockScope(_0x4ef8f4??createEmptyBffLock(),_0x5c28b1[_0x430f4d(0x1a3)],_0x13430d[_0x430f4d(0x1c8)],_0x430f4d(0x1d2)),_0x4607e7=await getTargetFunctions(_0x13430d,_0x5c28b1);if(_0x4607e7['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x4bb560=_0x5c28b1['bool'](_0x430f4d(0x1b6)),_0x3c1cbc=JSON[_0x430f4d(0x1d6)](JSON[_0x430f4d(0x1ab)](_0xe4ef9)),_0x41b220=_0x3c1cbc[_0x430f4d(0x1d3)][_0x5c28b1[_0x430f4d(0x1a3)]];if(!_0x41b220)throw new Error('Lock\x20scope\x20for\x20app\x20\x22'+_0x5c28b1[_0x430f4d(0x1a3)]+'\x22\x20not\x20found\x20after\x20ensureLockScope.');const _0x1e8865=await buildHookMaps(_0x5c28b1[_0x430f4d(0x1a3)],_0x5c28b1[_0x430f4d(0x1e9)],_0x4607e7,_0x41b220),_0x4a3934=[],_0x5f2017=[],_0x56ad57=[];for(const _0x2c9174 of _0x4607e7){const _0x2d6dc7=await computeFileHash(_0x2c9174[_0x430f4d(0x1cd)]),_0xf66da3=_0x41b220[_0x430f4d(0x1bc)][_0x2c9174[_0x430f4d(0x1a1)]];if(!_0x4bb560&&_0xf66da3&&_0xf66da3['hash']===_0x2d6dc7){_0x5f2017[_0x430f4d(0x1d2)]({'lockKey':_0x2c9174[_0x430f4d(0x1a1)],'reason':_0x430f4d(0x1c9)});continue;}try{await uploadSingleFunction(_0x5c28b1[_0x430f4d(0x1a3)],_0x2c9174,_0x41b220,_0x1e8865);const _0x2a255b=_0x41b220[_0x430f4d(0x1bc)][_0x2c9174[_0x430f4d(0x1a1)]];_0x4a3934[_0x430f4d(0x1d2)]({'lockKey':_0x2c9174[_0x430f4d(0x1a1)],'remoteId':_0x2a255b?.[_0x430f4d(0x1df)]??0x0});}catch(_0x4eb7a4){_0x56ad57['push']({'lockKey':_0x2c9174[_0x430f4d(0x1a1)],'error':_0x4eb7a4 instanceof Error?_0x4eb7a4[_0x430f4d(0x1a0)]:String(_0x4eb7a4)});}}_0x41b220[_0x430f4d(0x1e4)]=new Date()['toISOString'](),await writeBffLockFile(_0x13430d[_0x430f4d(0x1d7)],_0x3c1cbc),await waitForUploadedLockEntries(_0x13430d['lockFilePath'],_0x5c28b1[_0x430f4d(0x1a3)],_0x4a3934[_0x430f4d(0x1a2)](_0x4b0ae0=>_0x4b0ae0['lockKey']));let _0x42d2ec={'attempted':![],'cleared':![]};if(_0x4a3934[_0x430f4d(0x1ca)]>0x0)try{let _0x45d519='';for(let _0x106556=0x0;_0x106556<CACHE_CLEAR_ATTEMPTS;_0x106556+=0x1){_0x45d519=await clearBffScriptCache(),_0x106556<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x42d2ec={'attempted':!![],'cleared':!![],'message':_0x45d519||_0x430f4d(0x1b5)};}catch(_0x30c3d8){_0x42d2ec={'attempted':!![],'cleared':![],'error':_0x30c3d8 instanceof Error?_0x30c3d8[_0x430f4d(0x1a0)]:String(_0x30c3d8)};}const _0x17a950=_0x56ad57[_0x430f4d(0x1ca)]===0x0&&(_0x42d2ec[_0x430f4d(0x1e8)]?_0x42d2ec['cleared']:!![]),_0x1ea740=_0x42d2ec[_0x430f4d(0x1e8)]?_0x42d2ec[_0x430f4d(0x1eb)]?_0x430f4d(0x1a5):_0x430f4d(0x1ef):_0x430f4d(0x1bf);return{'ok':_0x17a950,'data':{'uploaded':_0x4a3934,'skipped':_0x5f2017,'failed':_0x56ad57,'cacheClear':_0x42d2ec},'message':_0x430f4d(0x1a7)+_0x4a3934[_0x430f4d(0x1ca)]+_0x430f4d(0x1bd)+_0x5f2017[_0x430f4d(0x1ca)]+_0x430f4d(0x1e6)+_0x56ad57[_0x430f4d(0x1ca)]+_0x430f4d(0x1cc)+_0x1ea740};}};async function getTargetFunctions(_0x3cafc7,_0x5a5b06){const _0x107cf1=a32_0x279cf7,_0xca0474=_0x5a5b06[_0x107cf1(0x1bb)](_0x107cf1(0x1c2)),_0x12e480=_0x5a5b06[_0x107cf1(0x1bb)](_0x107cf1(0x1c6)),_0x1eb3ef=normalizeBffType(_0xca0474)??undefined;if(_0x12e480&&!_0x1eb3ef)throw CliErrors[_0x107cf1(0x1ea)](_0x107cf1(0x1d0));const _0x24adb8=await scanLocalBffFunctions(_0x3cafc7,_0x1eb3ef);if(_0x12e480){const _0x3efc9b=_0x24adb8[_0x107cf1(0x1e7)](_0x171027=>_0x171027[_0x107cf1(0x1c6)]===_0x12e480);if(_0x3efc9b['length']===0x0)throw CliErrors[_0x107cf1(0x1ea)]('Local\x20function\x20not\x20found:\x20'+_0x1eb3ef+'/'+_0x12e480);return _0x3efc9b;}return _0x24adb8;}async function buildHookMaps(_0x51b02d,_0x4e20c9,_0x42c14b,_0x4f4b48){const _0x321fea=a32_0x279cf7,_0x5f0485=_0x42c14b[_0x321fea(0x1dc)](_0x27dd53=>_0x27dd53['type']===_0x321fea(0x1da));if(!_0x5f0485)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x1dbebc=loadAliasMap(_0x4e20c9,undefined,resolveApiFilePath(_0x4e20c9,_0x51b02d)),_0x42029a=new Map(_0x1dbebc[_0x321fea(0x1a2)](_0x219cad=>[_0x219cad['alias'],_0x219cad['datasetCode']]));for(const _0x4192c9 of Object[_0x321fea(0x1a9)](_0x4f4b48[_0x321fea(0x1bc)])){_0x4192c9[_0x321fea(0x1a4)]&&_0x4192c9[_0x321fea(0x1c4)]&&!_0x42029a[_0x321fea(0x1b2)](_0x4192c9['alias'])&&_0x42029a[_0x321fea(0x1ad)](_0x4192c9['alias'],_0x4192c9[_0x321fea(0x1c4)]);}const _0xd2e996=await listDatasets(_0x51b02d),_0x52d045=new Map(_0xd2e996[_0x321fea(0x1a2)](_0xe59fdc=>[_0xe59fdc['code'],_0xe59fdc]));return{'aliasToDatasetCode':_0x42029a,'datasetCodeToDataset':_0x52d045};}async function uploadSingleFunction(_0x5a4b45,_0x6227c5,_0x6a2448,_0x1d128a){const _0x7bb076=a32_0x279cf7,_0x3624c4=await readFile(_0x6227c5[_0x7bb076(0x1cd)],_0x7bb076(0x1cb)),_0x54890a=await computeFileHash(_0x6227c5[_0x7bb076(0x1cd)]),_0x17bcf9=_0x6a2448[_0x7bb076(0x1bc)][_0x6227c5[_0x7bb076(0x1a1)]];if(_0x17bcf9?.[_0x7bb076(0x1df)]&&_0x17bcf9[_0x7bb076(0x1b0)]==null)throw CliErrors[_0x7bb076(0x1ea)](_0x6227c5['lockKey']+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x4484ff=extractScriptDescription(_0x3624c4);if(!_0x4484ff&&_0x17bcf9?.['remoteId']){const _0x1a5757=await getBffScriptInfo(_0x17bcf9[_0x7bb076(0x1df)]);_0x4484ff=_0x1a5757[_0x7bb076(0x1aa)]||undefined;}const _0x4c0d6b={'appCode':_0x5a4b45,'functionName':_0x6227c5[_0x7bb076(0x1c6)],'scriptType':_0x6227c5[_0x7bb076(0x1c2)],'scriptContent':_0x3624c4};if(_0x17bcf9?.[_0x7bb076(0x1df)])_0x4c0d6b['id']=_0x17bcf9[_0x7bb076(0x1df)];if(_0x17bcf9?.['version']!=null)_0x4c0d6b[_0x7bb076(0x1b0)]=_0x17bcf9[_0x7bb076(0x1b0)];if(_0x4484ff)_0x4c0d6b[_0x7bb076(0x1aa)]=_0x4484ff;if(_0x6227c5[_0x7bb076(0x1c2)]===_0x7bb076(0x1da)){const _0x21092f=_0x6227c5['alias'];if(!_0x21092f||!_0x6227c5[_0x7bb076(0x1a6)]||!_0x6227c5[_0x7bb076(0x1b8)])throw CliErrors['validation'](_0x7bb076(0x1b9)+_0x6227c5[_0x7bb076(0x1a1)]);const _0x31b0f5=_0x1d128a[_0x7bb076(0x1b1)][_0x7bb076(0x1e5)](_0x21092f)??_0x17bcf9?.[_0x7bb076(0x1c4)]??_0x21092f,_0x488a1b=_0x1d128a[_0x7bb076(0x1ed)]['get'](_0x31b0f5);if(!_0x488a1b)throw CliErrors['validation'](_0x7bb076(0x1c0)+_0x21092f+'\x22.\x20'+('Run\x20`'+CLI_BIN_NAME+_0x7bb076(0x1c1)));_0x4c0d6b['datasetId']=_0x488a1b['id'],_0x4c0d6b[_0x7bb076(0x1a6)]=_0x6227c5[_0x7bb076(0x1a6)],_0x4c0d6b[_0x7bb076(0x1b8)]=_0x6227c5[_0x7bb076(0x1b8)];}const _0x6563d5=await saveBffScript(_0x4c0d6b),_0x5dfdc1=_0x6563d5['id'],_0x3a24b3=_0x6563d5['script']??await getBffScriptInfo(_0x5dfdc1),_0x36f4ac={'hash':_0x54890a,'remoteId':_0x5dfdc1,'version':_0x3a24b3[_0x7bb076(0x1b0)]};if(_0x6227c5[_0x7bb076(0x1c2)]===_0x7bb076(0x1da)){const _0x5a9b45=_0x6227c5[_0x7bb076(0x1a4)],_0x2e86e5=_0x1d128a[_0x7bb076(0x1b1)][_0x7bb076(0x1e5)](_0x5a9b45)??_0x17bcf9?.[_0x7bb076(0x1c4)]??_0x5a9b45;_0x1d128a[_0x7bb076(0x1b1)][_0x7bb076(0x1b2)](_0x5a9b45)?_0x36f4ac[_0x7bb076(0x1a4)]=_0x5a9b45:_0x36f4ac[_0x7bb076(0x1a4)]=_0x17bcf9?.[_0x7bb076(0x1a4)],_0x36f4ac[_0x7bb076(0x1c4)]=_0x2e86e5,_0x36f4ac[_0x7bb076(0x1a6)]=_0x6227c5['operationType'],_0x36f4ac[_0x7bb076(0x1b8)]=_0x6227c5['functionNode'];}_0x6a2448['functions'][_0x6227c5[_0x7bb076(0x1a1)]]=_0x36f4ac;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a32_0x4cb3(){const _0x2d8822=['remoteId','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','38XwVEKe','boolean','lastSync','get','\x20skipped,\x20','filter','attempted','apiDir','validation','cleared','Push\x20local\x20BFF\x20scripts\x20to\x20remote','datasetCodeToDataset','2092342tJIJFO','runtime\x20cache\x20clear\x20failed','message','lockKey','map','appCode','alias','runtime\x20cache\x20cleared','operationType','Push\x20complete:\x20','update','values','description','stringify','bff','set','54423OGeKkT','1300tQAHBU','version','aliasToDatasetCode','has','create','string','Runtime\x20script\x20cache\x20cleared.','force','status','functionNode','Incomplete\x20HOOK\x20path:\x20','join','str','functions','\x20uploaded,\x20','COMMON','runtime\x20cache\x20not\x20needed','Cannot\x20resolve\x20dataset\x20for\x20\x22','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','type','would_push','datasetCode','bool','name','12XRtuqb','scriptsRoot','unchanged','length','utf8','\x20failed,\x20','filePath','151800pZPcfD','ENDPOINT','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','2508400rGyJdG','push','apps','hash','Push\x20only\x20this\x20script\x20type','parse','lockFilePath','1661964AwPTWt','26118unyXVr','HOOK','every','some','3103936lyuuxO','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'];a32_0x4cb3=function(){return _0x2d8822;};return a32_0x4cb3();}async function waitForUploadedLockEntries(_0x2b3f02,_0x24139a,_0x2d86bd){const _0x39b6f0=a32_0x279cf7;if(_0x2d86bd[_0x39b6f0(0x1ca)]===0x0)return;for(let _0x51da8d=0x0;_0x51da8d<LOCK_SETTLE_RETRY_COUNT;_0x51da8d+=0x1){const _0x3b12d6=await readBffLockFile(_0x2b3f02),_0x15a381=_0x3b12d6?.[_0x39b6f0(0x1d3)]?.[_0x24139a]?.[_0x39b6f0(0x1bc)]??{},_0x2ba7e0=_0x2d86bd[_0x39b6f0(0x1db)](_0x109c9f=>!!_0x15a381[_0x109c9f]?.['remoteId']);if(_0x2ba7e0)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x39b6f0(0x1de)+_0x2d86bd[_0x39b6f0(0x1ba)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a33_0x20a217=a33_0x4490;(function(_0x484cbb,_0x5656aa){const _0x4a59a7=a33_0x4490,_0x5c6019=_0x484cbb();while(!![]){try{const _0x5783b5=-parseInt(_0x4a59a7(0x1d9))/0x1+parseInt(_0x4a59a7(0x1ef))/0x2+parseInt(_0x4a59a7(0x1d8))/0x3+-parseInt(_0x4a59a7(0x1eb))/0x4*(parseInt(_0x4a59a7(0x1d4))/0x5)+-parseInt(_0x4a59a7(0x1e5))/0x6+-parseInt(_0x4a59a7(0x1e8))/0x7*(-parseInt(_0x4a59a7(0x1f2))/0x8)+parseInt(_0x4a59a7(0x1e9))/0x9;if(_0x5783b5===_0x5656aa)break;else _0x5c6019['push'](_0x5c6019['shift']());}catch(_0x3ebaec){_0x5c6019['push'](_0x5c6019['shift']());}}}(a33_0x311c,0x23077));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_0x311c(){const _0x247a15=['alias','1540890aOBVkK','map','All\x20BFF\x20scripts\x20are\x20in\x20sync.','1435EAwVuA','4971618oKbcnW','bff','3804EpwhCQ','push','read','bool','13152LhYubE','status','datasetCode','2744dnwjXA','\x20modified,\x20','565cndmxW','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','hash','\x20remote-only','99174JPMRrz','154594xQyNVl','lockKey','scriptsRoot','has','all','remote','appCode','apiDir','lockFilePath','length','filePath'];a33_0x311c=function(){return _0x247a15;};return a33_0x311c();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a33_0x4490(_0x473546,_0xe8afc0){_0x473546=_0x473546-0x1d4;const _0x311cb9=a33_0x311c();let _0x4490e2=_0x311cb9[_0x473546];return _0x4490e2;}export const bffStatus={'service':a33_0x20a217(0x1ea),'command':'status','description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a33_0x20a217(0x1ed),'flags':[{'name':a33_0x20a217(0x1de),'type':'boolean','description':a33_0x20a217(0x1d5)}],async 'execute'(_0x5d4707){const _0x59e8b4=a33_0x20a217,_0x1abb6f=loadBffProjectConfig(_0x5d4707[_0x59e8b4(0x1df)]),_0x415e90=await readBffLockFile(_0x1abb6f[_0x59e8b4(0x1e1)]),{appLock:_0x4a30c4}=ensureLockScope(_0x415e90??createEmptyBffLock(),_0x5d4707[_0x59e8b4(0x1df)],_0x1abb6f[_0x59e8b4(0x1db)],_0x59e8b4(0x1f0)),_0x5d4bb6=await scanLocalBffFunctions(_0x1abb6f),_0x1b1c38=[],_0x59cbea=[],_0x2feeab=[];for(const _0x42e96a of _0x5d4bb6){const _0x5b14d8=await computeFileHash(_0x42e96a[_0x59e8b4(0x1e3)]),_0x171328=_0x4a30c4['functions'][_0x42e96a[_0x59e8b4(0x1da)]];if(!_0x171328)_0x1b1c38['push'](_0x42e96a[_0x59e8b4(0x1da)]);else _0x171328[_0x59e8b4(0x1d6)]!==_0x5b14d8?_0x59cbea[_0x59e8b4(0x1ec)](_0x42e96a[_0x59e8b4(0x1da)]):_0x2feeab[_0x59e8b4(0x1ec)](_0x42e96a[_0x59e8b4(0x1da)]);}const _0x60c606=[];if(_0x5d4707[_0x59e8b4(0x1ee)](_0x59e8b4(0x1de))){const _0x1d7181=loadAliasMap(_0x5d4707[_0x59e8b4(0x1e0)],undefined,resolveApiFilePath(_0x5d4707['apiDir'],_0x5d4707[_0x59e8b4(0x1df)])),_0x5cae44=new Map(_0x1d7181[_0x59e8b4(0x1e6)](_0x1092d4=>[_0x1092d4[_0x59e8b4(0x1f1)],_0x1092d4[_0x59e8b4(0x1e4)]])),[_0x4234b2,_0x4f189f]=await Promise[_0x59e8b4(0x1dd)]([listBffScripts(_0x5d4707[_0x59e8b4(0x1df)]),getBffScriptStatistics(_0x5d4707[_0x59e8b4(0x1df)])]),_0x52adce=createHookLocationMap(_0x4f189f),_0x5696ac=new Set(_0x5d4bb6[_0x59e8b4(0x1e6)](_0x7dae0b=>_0x7dae0b[_0x59e8b4(0x1da)]));for(const _0x316269 of _0x4234b2){const _0x3b9f03=resolveRemoteScriptTarget(_0x1abb6f,_0x316269,_0x52adce,_0x4a30c4['functions'],_0x5cae44);_0x3b9f03&&!_0x5696ac[_0x59e8b4(0x1dc)](_0x3b9f03[_0x59e8b4(0x1da)])&&_0x60c606[_0x59e8b4(0x1ec)](_0x3b9f03[_0x59e8b4(0x1da)]);}}const _0x3f10c9=_0x1b1c38[_0x59e8b4(0x1e2)]===0x0&&_0x59cbea['length']===0x0&&_0x60c606['length']===0x0;return{'ok':!![],'data':{'added':_0x1b1c38,'modified':_0x59cbea,'unchanged':_0x2feeab,'remoteOnly':_0x60c606},'message':_0x3f10c9?_0x59e8b4(0x1e7):_0x1b1c38['length']+'\x20added,\x20'+_0x59cbea['length']+_0x59e8b4(0x1f3)+_0x2feeab[_0x59e8b4(0x1e2)]+'\x20unchanged'+(_0x60c606['length']>0x0?',\x20'+_0x60c606[_0x59e8b4(0x1e2)]+_0x59e8b4(0x1d7):'')};}};
1
+ const a33_0x3e0b3b=a33_0x1006;(function(_0x10d96d,_0x5105a1){const _0x52af6c=a33_0x1006,_0x31c12a=_0x10d96d();while(!![]){try{const _0x125325=-parseInt(_0x52af6c(0x144))/0x1+parseInt(_0x52af6c(0x12f))/0x2+parseInt(_0x52af6c(0x123))/0x3+parseInt(_0x52af6c(0x13e))/0x4*(parseInt(_0x52af6c(0x121))/0x5)+parseInt(_0x52af6c(0x133))/0x6*(parseInt(_0x52af6c(0x129))/0x7)+-parseInt(_0x52af6c(0x127))/0x8*(-parseInt(_0x52af6c(0x12e))/0x9)+parseInt(_0x52af6c(0x128))/0xa*(-parseInt(_0x52af6c(0x131))/0xb);if(_0x125325===_0x5105a1)break;else _0x31c12a['push'](_0x31c12a['shift']());}catch(_0x1e8f16){_0x31c12a['push'](_0x31c12a['shift']());}}}(a33_0x4103,0xd9c99));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a33_0x4103(){const _0x396419=['\x20unchanged','815094iJwsmu','575818rYBKaA','apiDir','495xnHxnA','lockKey','12714fRhWFt','functions','length','hash','bff','read','boolean','alias','remote','\x20modified,\x20','lockFilePath','5199760LyWdxB','filePath','push','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','map','status','42061nfTmjd','5cXHWff','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','228924GKBknm','datasetCode','has','appCode','72KApkLZ','707360pJShFr','5411ySBabH','bool','all','\x20remote-only'];a33_0x4103=function(){return _0x396419;};return a33_0x4103();}import{loadBffProjectConfig}from'../../core/bff/config.js';function a33_0x1006(_0x1c32bd,_0x2f7e46){_0x1c32bd=_0x1c32bd-0x121;const _0x41038d=a33_0x4103();let _0x1006bc=_0x41038d[_0x1c32bd];return _0x1006bc;}import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':a33_0x3e0b3b(0x137),'command':a33_0x3e0b3b(0x143),'description':a33_0x3e0b3b(0x141),'risk':a33_0x3e0b3b(0x138),'flags':[{'name':a33_0x3e0b3b(0x13b),'type':a33_0x3e0b3b(0x139),'description':a33_0x3e0b3b(0x122)}],async 'execute'(_0x1dc99e){const _0x212f49=a33_0x3e0b3b,_0xda243f=loadBffProjectConfig(_0x1dc99e[_0x212f49(0x126)]),_0x114658=await readBffLockFile(_0xda243f[_0x212f49(0x13d)]),{appLock:_0x3fc065}=ensureLockScope(_0x114658??createEmptyBffLock(),_0x1dc99e['appCode'],_0xda243f['scriptsRoot'],_0x212f49(0x143)),_0x7f230d=await scanLocalBffFunctions(_0xda243f),_0x1a218b=[],_0x12948f=[],_0x1cbc41=[];for(const _0x2957c5 of _0x7f230d){const _0x494323=await computeFileHash(_0x2957c5[_0x212f49(0x13f)]),_0x5b9d01=_0x3fc065['functions'][_0x2957c5[_0x212f49(0x132)]];if(!_0x5b9d01)_0x1a218b[_0x212f49(0x140)](_0x2957c5[_0x212f49(0x132)]);else _0x5b9d01[_0x212f49(0x136)]!==_0x494323?_0x12948f[_0x212f49(0x140)](_0x2957c5[_0x212f49(0x132)]):_0x1cbc41[_0x212f49(0x140)](_0x2957c5[_0x212f49(0x132)]);}const _0xa2b4f9=[];if(_0x1dc99e[_0x212f49(0x12a)](_0x212f49(0x13b))){const _0x19e93a=loadAliasMap(_0x1dc99e['apiDir'],undefined,resolveApiFilePath(_0x1dc99e[_0x212f49(0x130)],_0x1dc99e['appCode'])),_0x144d66=new Map(_0x19e93a[_0x212f49(0x142)](_0x2529d6=>[_0x2529d6[_0x212f49(0x124)],_0x2529d6[_0x212f49(0x13a)]])),[_0x1591da,_0xa4f626]=await Promise[_0x212f49(0x12b)]([listBffScripts(_0x1dc99e[_0x212f49(0x126)]),getBffScriptStatistics(_0x1dc99e['appCode'])]),_0x17b592=createHookLocationMap(_0xa4f626),_0x1d7a6f=new Set(_0x7f230d['map'](_0x2a1c6a=>_0x2a1c6a[_0x212f49(0x132)]));for(const _0x39ffc3 of _0x1591da){const _0x5c54e7=resolveRemoteScriptTarget(_0xda243f,_0x39ffc3,_0x17b592,_0x3fc065[_0x212f49(0x134)],_0x144d66);_0x5c54e7&&!_0x1d7a6f[_0x212f49(0x125)](_0x5c54e7[_0x212f49(0x132)])&&_0xa2b4f9[_0x212f49(0x140)](_0x5c54e7[_0x212f49(0x132)]);}}const _0x120c13=_0x1a218b[_0x212f49(0x135)]===0x0&&_0x12948f[_0x212f49(0x135)]===0x0&&_0xa2b4f9[_0x212f49(0x135)]===0x0;return{'ok':!![],'data':{'added':_0x1a218b,'modified':_0x12948f,'unchanged':_0x1cbc41,'remoteOnly':_0xa2b4f9},'message':_0x120c13?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x1a218b[_0x212f49(0x135)]+'\x20added,\x20'+_0x12948f[_0x212f49(0x135)]+_0x212f49(0x13c)+_0x1cbc41[_0x212f49(0x135)]+_0x212f49(0x12d)+(_0xa2b4f9[_0x212f49(0x135)]>0x0?',\x20'+_0xa2b4f9[_0x212f49(0x135)]+_0x212f49(0x12c):'')};}};
@@ -1 +1 @@
1
- const a34_0x10f2ac=a34_0x58f8;(function(_0x11f54c,_0x5d73a9){const _0x474d40=a34_0x58f8,_0x12c988=_0x11f54c();while(!![]){try{const _0x1b1dff=parseInt(_0x474d40(0x185))/0x1*(parseInt(_0x474d40(0x184))/0x2)+parseInt(_0x474d40(0x15b))/0x3*(-parseInt(_0x474d40(0x1a5))/0x4)+parseInt(_0x474d40(0x160))/0x5+parseInt(_0x474d40(0x18f))/0x6+parseInt(_0x474d40(0x17f))/0x7*(parseInt(_0x474d40(0x18b))/0x8)+-parseInt(_0x474d40(0x181))/0x9+-parseInt(_0x474d40(0x16e))/0xa;if(_0x1b1dff===_0x5d73a9)break;else _0x12c988['push'](_0x12c988['shift']());}catch(_0x411e6f){_0x12c988['push'](_0x12c988['shift']());}}}(a34_0x1f19,0x1de3f));import a34_0x51d615 from'chalk';import a34_0x36033f from'ora';import a34_0x14db80 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';function a34_0x58f8(_0x2fa842,_0x33babf){_0x2fa842=_0x2fa842-0x158;const _0x1f19a5=a34_0x1f19();let _0x58f89e=_0x1f19a5[_0x2fa842];return _0x58f89e;}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 _0x1c3660=a34_0x58f8;return GIT_COMMIT!==_0x1c3660(0x179)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x1c3660(0x199)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x1ed335=a34_0x58f8,_0x2e9fbf=process[_0x1ed335(0x183)]['toLowerCase']();if(_0x2e9fbf[_0x1ed335(0x177)]('bun'))return _0x1ed335(0x174);return _0x1ed335(0x19c);}function a34_0x1f19(){const _0x5b4d44=['56tHQfCG','latest','entries','source','834276uZSHBd','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','json','trim','cwd','Refresh\x20official\x20skill\x20package\x20after\x20updating','error','beta','inherit','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','slice','...','log','npm','object','nonInteractive','Version\x20comparison\x20failed','Update\x20available:\x20','filter','Install\x20a\x20specific\x20CLI\x20version','\x20→\x20','flag','90776qhIocx','validation','pipe','fail','timeout','6pIOgGD','string','warn','skills','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','420265tUtlEd','Checking\x20for\x20updates...','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','map','@latest','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','length','install','message','skipped','\x20install\x20-g\x20','valid','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','gray','3455470VAkmKh','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','Already\x20on\x20requested\x20version\x20(v','no-skills','green','start','bun','\x20\x20Official\x20skill\x20update\x20failed:\x20','Already\x20up\x20to\x20date\x20(v','includes','yellow','unknown','https://registry.npmjs.org/-/package/','succeed','update','run','Skipping\x20official\x20skill\x20package\x20(--no-skills).','202139iQAkGN','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','419868wqIMvo','version','execPath','67390mlwiUh','4gMPBbz','bool','\x20\x20Run\x20manually:\x20','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','boolean','Beta\x20version:\x20'];a34_0x1f19=function(){return _0x5b4d44;};return a34_0x1f19();}const updateFlags=[{'name':a34_0x10f2ac(0x196),'type':a34_0x10f2ac(0x189),'description':a34_0x10f2ac(0x15f),'default':![]},{'name':a34_0x10f2ac(0x182),'type':'string','description':a34_0x10f2ac(0x1a2)},{'name':a34_0x10f2ac(0x171),'type':a34_0x10f2ac(0x189),'description':a34_0x10f2ac(0x180),'default':![]},{'name':'skills','type':'boolean','description':a34_0x10f2ac(0x194),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x50e2c2){const _0x16330a=a34_0x10f2ac;return _0x50e2c2['str'](_0x16330a(0x182))[_0x16330a(0x192)]();}function shouldSkipOfficialSkill(_0x2d5c23){const _0x253694=a34_0x10f2ac;return _0x2d5c23[_0x253694(0x186)](_0x253694(0x171))||_0x2d5c23[_0x253694(0x1a4)](_0x253694(0x15e))===![];}async function validateUpdateFlags(_0x302d09){const _0xd26dc7=a34_0x10f2ac,_0x3be7ec=_0x302d09['bool'](_0xd26dc7(0x196)),_0xdd9889=getRequestedVersion(_0x302d09);if(_0x3be7ec&&_0xdd9889)throw CliErrors[_0xd26dc7(0x1a6)](_0xd26dc7(0x162),_0xd26dc7(0x16c));if(_0xdd9889&&!a34_0x14db80[_0xd26dc7(0x16b)](_0xdd9889))throw CliErrors[_0xd26dc7(0x1a6)]('Invalid\x20version:\x20'+_0xdd9889,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x4be840=a34_0x10f2ac;try{const _0x4f101e=await fetch(_0x4be840(0x17a)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x4be840(0x15a)](0x2710)});if(!_0x4f101e['ok'])return null;const _0x6706ba=await _0x4f101e[_0x4be840(0x191)]();if(!_0x6706ba||typeof _0x6706ba!==_0x4be840(0x19d))return null;return Object['fromEntries'](Object[_0x4be840(0x18d)](_0x6706ba)[_0x4be840(0x1a1)](([,_0xd346ab])=>typeof _0xd346ab===_0x4be840(0x15c)&&_0xd346ab[_0x4be840(0x192)]()[_0x4be840(0x166)]>0x0)[_0x4be840(0x163)](([_0x2ef5cb,_0x1cb4ef])=>[_0x2ef5cb,String(_0x1cb4ef)[_0x4be840(0x192)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x27c656){const _0x4a652d=await fetchNpmDistTags();return _0x4a652d?.[_0x27c656]??null;}async function fetchLatestVersion(){const _0x58047c=a34_0x10f2ac;return fetchNpmDistTagVersion(_0x58047c(0x18c));}async function resolveTargetVersion(_0x5c03c5){const _0x2eb942=a34_0x10f2ac,_0x5599c9=getRequestedVersion(_0x5c03c5);if(_0x5599c9)return{'version':_0x5599c9,'source':_0x2eb942(0x182)};if(_0x5c03c5[_0x2eb942(0x186)](_0x2eb942(0x196))){const _0x51b657=await fetchNpmDistTagVersion(_0x2eb942(0x196));if(!_0x51b657)return null;return{'version':_0x51b657,'source':_0x2eb942(0x196)};}const _0x5ecb48=await fetchLatestVersion();if(!_0x5ecb48)return null;return{'version':_0x5ecb48,'source':_0x2eb942(0x18c)};}function shouldInstallTarget(_0x366c0c,_0x2a1abc){const _0x2b71f2=a34_0x10f2ac;if(_0x2a1abc[_0x2b71f2(0x18e)]===_0x2b71f2(0x182)||_0x2a1abc[_0x2b71f2(0x18e)]===_0x2b71f2(0x196))return!a34_0x14db80['eq'](_0x366c0c,_0x2a1abc[_0x2b71f2(0x182)]);return a34_0x14db80['lt'](_0x366c0c,_0x2a1abc['version']);}function getInstallPlanLabel(_0x483060,_0x15e0a6){const _0x1c1970=a34_0x10f2ac;switch(_0x15e0a6['source']){case _0x1c1970(0x196):return _0x1c1970(0x18a)+a34_0x51d615[_0x1c1970(0x178)](_0x483060)+_0x1c1970(0x1a3)+a34_0x51d615[_0x1c1970(0x172)](_0x15e0a6[_0x1c1970(0x182)]);case'version':return'Requested\x20version:\x20'+a34_0x51d615[_0x1c1970(0x178)](_0x483060)+'\x20→\x20'+a34_0x51d615['green'](_0x15e0a6[_0x1c1970(0x182)]);case'latest':default:return _0x1c1970(0x1a0)+a34_0x51d615[_0x1c1970(0x178)](_0x483060)+_0x1c1970(0x1a3)+a34_0x51d615['green'](_0x15e0a6[_0x1c1970(0x182)]);}}async function installOfficialSkill(_0x4c3248){const _0x454385=a34_0x10f2ac;console[_0x454385(0x19b)](a34_0x51d615[_0x454385(0x16d)]('Checking\x20official\x20skill\x20package...'));const _0x5102d2=runNpxSkillsAddGlobal(process[_0x454385(0x193)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x4c3248?_0x454385(0x158):_0x454385(0x197)});if(_0x5102d2[_0x454385(0x169)]){console['log'](a34_0x51d615['gray'](_0x454385(0x16f)));return;}if(_0x5102d2['ok']){console['log'](a34_0x51d615[_0x454385(0x16d)](_0x454385(0x188)));return;}console[_0x454385(0x15d)](a34_0x51d615['yellow'](_0x454385(0x175)+(_0x5102d2[_0x454385(0x195)]||'unknown'))),console['log'](a34_0x51d615[_0x454385(0x16d)](_0x454385(0x187)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x195ef4){const _0x14804f=a34_0x10f2ac;await validateUpdateFlags(_0x195ef4);const _0x75ea95=getCurrentVersion();console['log']('Current\x20version:\x20'+_0x75ea95);const _0x5488d6=a34_0x36033f(_0x14804f(0x161))[_0x14804f(0x173)](),_0x3669c1=await resolveTargetVersion(_0x195ef4);if(!_0x3669c1){const _0x104c98=_0x195ef4[_0x14804f(0x186)]('beta')?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x14804f(0x190);return _0x5488d6[_0x14804f(0x159)](_0x104c98),console[_0x14804f(0x19b)](a34_0x51d615[_0x14804f(0x16d)]('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+_0x14804f(0x164))),{'ok':![],'message':_0x104c98};}const _0x1be122=a34_0x14db80[_0x14804f(0x16b)](VERSION),_0x42140d=a34_0x14db80[_0x14804f(0x16b)](_0x3669c1[_0x14804f(0x182)]);if(!_0x1be122||!_0x42140d)return _0x5488d6[_0x14804f(0x159)]('Version\x20comparison\x20failed'),{'ok':![],'message':_0x14804f(0x19f)};if(!shouldInstallTarget(_0x1be122,_0x3669c1)){const _0x56a594=_0x3669c1['source']===_0x14804f(0x182)?_0x14804f(0x170)+_0x3669c1[_0x14804f(0x182)]+')':_0x14804f(0x176)+_0x3669c1['version']+')';return _0x5488d6['succeed'](_0x56a594),shouldSkipOfficialSkill(_0x195ef4)?console[_0x14804f(0x19b)](a34_0x51d615[_0x14804f(0x16d)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).')):await installOfficialSkill(_0x195ef4[_0x14804f(0x19e)]),{'ok':!![]};}_0x5488d6['info'](getInstallPlanLabel(_0x75ea95,_0x3669c1));const _0x7bfea3=detectPackageManager(),_0x248635=_0x7bfea3==='npm'?resolveNpmBin(_0x14804f(0x19c)):_0x7bfea3,_0xb121eb=a34_0x36033f('Updating\x20via\x20'+_0x7bfea3+_0x14804f(0x19a))[_0x14804f(0x173)]();try{return await execa(_0x248635,[_0x14804f(0x167),'-g',NPM_PACKAGE_NAME+'@'+_0x3669c1['version']],{'stdio':'pipe'}),_0xb121eb[_0x14804f(0x17b)]('Updated\x20to\x20v'+_0x3669c1[_0x14804f(0x182)]),console[_0x14804f(0x19b)](a34_0x51d615[_0x14804f(0x16d)](_0x14804f(0x165))),shouldSkipOfficialSkill(_0x195ef4)?console[_0x14804f(0x19b)](a34_0x51d615['gray'](_0x14804f(0x17e))):await installOfficialSkill(_0x195ef4[_0x14804f(0x19e)]),{'ok':!![]};}catch(_0x1dfe8d){return _0xb121eb[_0x14804f(0x159)]('Update\x20failed'),console[_0x14804f(0x195)](a34_0x51d615['red']('\x20\x20'+_0x1dfe8d[_0x14804f(0x168)])),console[_0x14804f(0x19b)](a34_0x51d615[_0x14804f(0x16d)]('\x20\x20Try\x20manually:\x20'+_0x7bfea3+_0x14804f(0x16a)+NPM_PACKAGE_NAME+'@'+_0x3669c1[_0x14804f(0x182)])),{'ok':![],'message':_0x1dfe8d[_0x14804f(0x168)]};}}export const updateDefinition={'service':a34_0x10f2ac(0x17c),'command':a34_0x10f2ac(0x17d),'description':a34_0x10f2ac(0x198),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a34_0x53fc3a=a34_0x496d;(function(_0x5c1a38,_0x2380f5){const _0x7c517a=a34_0x496d,_0x18862c=_0x5c1a38();while(!![]){try{const _0x49a95f=-parseInt(_0x7c517a(0x1d9))/0x1*(parseInt(_0x7c517a(0x198))/0x2)+-parseInt(_0x7c517a(0x1e4))/0x3+-parseInt(_0x7c517a(0x1b0))/0x4*(-parseInt(_0x7c517a(0x1d1))/0x5)+parseInt(_0x7c517a(0x1a6))/0x6+parseInt(_0x7c517a(0x1a7))/0x7+parseInt(_0x7c517a(0x1d0))/0x8*(-parseInt(_0x7c517a(0x1c6))/0x9)+parseInt(_0x7c517a(0x1a2))/0xa*(-parseInt(_0x7c517a(0x1d5))/0xb);if(_0x49a95f===_0x2380f5)break;else _0x18862c['push'](_0x18862c['shift']());}catch(_0x3e6a35){_0x18862c['push'](_0x18862c['shift']());}}}(a34_0x33ea,0x423a9));import a34_0x2027d8 from'chalk';import a34_0xf651d3 from'ora';import a34_0x4a80b0 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 _0x2f45b4=a34_0x496d;return GIT_COMMIT!==_0x2f45b4(0x1c8)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x2f45b4(0x193)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x42f17d=a34_0x496d,_0x32ed63=process[_0x42f17d(0x1d2)]['toLowerCase']();if(_0x32ed63['includes'](_0x42f17d(0x1b7)))return _0x42f17d(0x1b7);return _0x42f17d(0x1bc);}const updateFlags=[{'name':'beta','type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':a34_0x53fc3a(0x1c9),'description':a34_0x53fc3a(0x1bd)},{'name':a34_0x53fc3a(0x19f),'type':'boolean','description':a34_0x53fc3a(0x1a5),'default':![]},{'name':a34_0x53fc3a(0x1b3),'type':a34_0x53fc3a(0x1ca),'description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x55b152){const _0xde9f5=a34_0x53fc3a;return _0x55b152[_0xde9f5(0x1d8)](_0xde9f5(0x1ae))[_0xde9f5(0x1ac)]();}function shouldSkipOfficialSkill(_0x50f2c1){const _0x52c99c=a34_0x53fc3a;return _0x50f2c1['bool'](_0x52c99c(0x19f))||_0x50f2c1[_0x52c99c(0x19c)](_0x52c99c(0x1b3))===![];}async function validateUpdateFlags(_0x10bd35){const _0x47994b=a34_0x53fc3a,_0x215d55=_0x10bd35['bool'](_0x47994b(0x1b8)),_0x2fc112=getRequestedVersion(_0x10bd35);if(_0x215d55&&_0x2fc112)throw CliErrors[_0x47994b(0x1e0)](_0x47994b(0x1e1),_0x47994b(0x1a9));if(_0x2fc112&&!a34_0x4a80b0['valid'](_0x2fc112))throw CliErrors[_0x47994b(0x1e0)](_0x47994b(0x1de)+_0x2fc112,_0x47994b(0x1db));}async function fetchNpmDistTags(){const _0x524695=a34_0x53fc3a;try{const _0x4053e8=await fetch(_0x524695(0x1aa)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x524695(0x19a),{'signal':AbortSignal[_0x524695(0x196)](0x2710)});if(!_0x4053e8['ok'])return null;const _0x5a53a5=await _0x4053e8[_0x524695(0x19b)]();if(!_0x5a53a5||typeof _0x5a53a5!==_0x524695(0x1dd))return null;return Object['fromEntries'](Object[_0x524695(0x199)](_0x5a53a5)[_0x524695(0x195)](([,_0x1bc03a])=>typeof _0x1bc03a===_0x524695(0x1c9)&&_0x1bc03a[_0x524695(0x1ac)]()[_0x524695(0x1a1)]>0x0)[_0x524695(0x1b6)](([_0x40bee8,_0x2c2490])=>[_0x40bee8,String(_0x2c2490)['trim']()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x484b37){const _0x2b072c=await fetchNpmDistTags();return _0x2b072c?.[_0x484b37]??null;}async function fetchLatestVersion(){const _0x4ce9ca=a34_0x53fc3a;return fetchNpmDistTagVersion(_0x4ce9ca(0x1b2));}function a34_0x496d(_0x23d1ec,_0x2da727){_0x23d1ec=_0x23d1ec-0x193;const _0x33eac2=a34_0x33ea();let _0x496dd7=_0x33eac2[_0x23d1ec];return _0x496dd7;}function a34_0x33ea(){const _0x361799=['map','bun','beta','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','start','Beta\x20version:\x20','npm','Install\x20a\x20specific\x20CLI\x20version','write','Updated\x20to\x20v','fail','run','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','green','@latest','skipped','847521QIduRd','Requested\x20version:\x20','unknown','string','boolean','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Update\x20available:\x20','source','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','valid','16xqpjPW','35935iIWfZm','execPath','Update\x20failed','yellow','2618alKSyE','Checking\x20for\x20updates...','Already\x20on\x20requested\x20version\x20(v','str','227uSUYku','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','bool','object','Invalid\x20version:\x20','message','validation','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','red','\x20\x20Official\x20skill\x20update\x20failed:\x20','686592YbyveH','error','gray','slice','pipe','filter','timeout','Skipping\x20official\x20skill\x20package\x20(--no-skills).','4006NBwFwB','entries','/dist-tags','json','flag','Version\x20comparison\x20failed','nonInteractive','no-skills','...','length','3920uIRJBt','\x20→\x20','log','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','2665116QtFtXh','1822996aJDGpB','\x20\x20Run\x20manually:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','https://registry.npmjs.org/-/package/','inherit','trim','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','version','Current\x20version:\x20','296Wntvnd','\x20\x20Try\x20manually:\x20','latest','skills','Updating\x20via\x20','succeed'];a34_0x33ea=function(){return _0x361799;};return a34_0x33ea();}async function resolveTargetVersion(_0x560133){const _0x42d6a1=a34_0x53fc3a,_0xfb7a4e=getRequestedVersion(_0x560133);if(_0xfb7a4e)return{'version':_0xfb7a4e,'source':_0x42d6a1(0x1ae)};if(_0x560133[_0x42d6a1(0x1dc)](_0x42d6a1(0x1b8))){const _0x879505=await fetchNpmDistTagVersion('beta');if(!_0x879505)return null;return{'version':_0x879505,'source':_0x42d6a1(0x1b8)};}const _0x270e6e=await fetchLatestVersion();if(!_0x270e6e)return null;return{'version':_0x270e6e,'source':_0x42d6a1(0x1b2)};}function shouldInstallTarget(_0x3686d4,_0x5a230d){const _0x3797ef=a34_0x53fc3a;if(_0x5a230d[_0x3797ef(0x1cd)]==='version'||_0x5a230d[_0x3797ef(0x1cd)]===_0x3797ef(0x1b8))return!a34_0x4a80b0['eq'](_0x3686d4,_0x5a230d[_0x3797ef(0x1ae)]);return a34_0x4a80b0['lt'](_0x3686d4,_0x5a230d[_0x3797ef(0x1ae)]);}function getInstallPlanLabel(_0xf56976,_0x3dd586){const _0x4ac684=a34_0x53fc3a;switch(_0x3dd586[_0x4ac684(0x1cd)]){case _0x4ac684(0x1b8):return _0x4ac684(0x1bb)+a34_0x2027d8[_0x4ac684(0x1d4)](_0xf56976)+_0x4ac684(0x1a3)+a34_0x2027d8['green'](_0x3dd586[_0x4ac684(0x1ae)]);case'version':return _0x4ac684(0x1c7)+a34_0x2027d8[_0x4ac684(0x1d4)](_0xf56976)+_0x4ac684(0x1a3)+a34_0x2027d8[_0x4ac684(0x1c3)](_0x3dd586['version']);case'latest':default:return _0x4ac684(0x1cc)+a34_0x2027d8[_0x4ac684(0x1d4)](_0xf56976)+_0x4ac684(0x1a3)+a34_0x2027d8[_0x4ac684(0x1c3)](_0x3dd586[_0x4ac684(0x1ae)]);}}async function installOfficialSkill(_0xc1f0be){const _0x5c4d2d=a34_0x53fc3a;console[_0x5c4d2d(0x1a4)](a34_0x2027d8['gray']('Checking\x20official\x20skill\x20package...'));const _0x3a8944=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0xc1f0be?_0x5c4d2d(0x194):_0x5c4d2d(0x1ab)});if(_0x3a8944[_0x5c4d2d(0x1c5)]){console['log'](a34_0x2027d8[_0x5c4d2d(0x1e6)](_0x5c4d2d(0x1c2)));return;}if(_0x3a8944['ok']){console[_0x5c4d2d(0x1a4)](a34_0x2027d8[_0x5c4d2d(0x1e6)](_0x5c4d2d(0x1b9)));return;}console['warn'](a34_0x2027d8[_0x5c4d2d(0x1d4)](_0x5c4d2d(0x1e3)+(_0x3a8944[_0x5c4d2d(0x1e5)]||_0x5c4d2d(0x1c8)))),console[_0x5c4d2d(0x1a4)](a34_0x2027d8[_0x5c4d2d(0x1e6)](_0x5c4d2d(0x1a8)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x2e10dc){const _0x2c8bc0=a34_0x53fc3a;await validateUpdateFlags(_0x2e10dc);const _0x44db9e=getCurrentVersion();console[_0x2c8bc0(0x1a4)](_0x2c8bc0(0x1af)+_0x44db9e);const _0x1de1f5=a34_0xf651d3(_0x2c8bc0(0x1d6))['start'](),_0x137c48=await resolveTargetVersion(_0x2e10dc);if(!_0x137c48){const _0x2e36db=_0x2e10dc['bool'](_0x2c8bc0(0x1b8))?_0x2c8bc0(0x1ce):_0x2c8bc0(0x1cb);return _0x1de1f5[_0x2c8bc0(0x1c0)](_0x2e36db),console[_0x2c8bc0(0x1a4)](a34_0x2027d8[_0x2c8bc0(0x1e6)](_0x2c8bc0(0x1ad)+NPM_PACKAGE_NAME+_0x2c8bc0(0x1c4))),{'ok':![],'message':_0x2e36db};}const _0x39fbae=a34_0x4a80b0['valid'](VERSION),_0x16def4=a34_0x4a80b0[_0x2c8bc0(0x1cf)](_0x137c48[_0x2c8bc0(0x1ae)]);if(!_0x39fbae||!_0x16def4)return _0x1de1f5[_0x2c8bc0(0x1c0)](_0x2c8bc0(0x19d)),{'ok':![],'message':_0x2c8bc0(0x19d)};if(!shouldInstallTarget(_0x39fbae,_0x137c48)){const _0x3cdabe=_0x137c48['source']===_0x2c8bc0(0x1ae)?_0x2c8bc0(0x1d7)+_0x137c48['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x137c48[_0x2c8bc0(0x1ae)]+')';return _0x1de1f5[_0x2c8bc0(0x1b5)](_0x3cdabe),shouldSkipOfficialSkill(_0x2e10dc)?console[_0x2c8bc0(0x1a4)](a34_0x2027d8[_0x2c8bc0(0x1e6)]('Skipping\x20official\x20skill\x20package\x20(--no-skills).')):await installOfficialSkill(_0x2e10dc[_0x2c8bc0(0x19e)]),{'ok':!![]};}_0x1de1f5['info'](getInstallPlanLabel(_0x44db9e,_0x137c48));const _0x3e60db=detectPackageManager(),_0x4b250f=_0x3e60db===_0x2c8bc0(0x1bc)?resolveNpmBin(_0x2c8bc0(0x1bc)):_0x3e60db,_0x577aff=a34_0xf651d3(_0x2c8bc0(0x1b4)+_0x3e60db+_0x2c8bc0(0x1a0))[_0x2c8bc0(0x1ba)]();try{return await execa(_0x4b250f,['install','-g',NPM_PACKAGE_NAME+'@'+_0x137c48[_0x2c8bc0(0x1ae)]],{'stdio':_0x2c8bc0(0x194)}),_0x577aff[_0x2c8bc0(0x1b5)](_0x2c8bc0(0x1bf)+_0x137c48[_0x2c8bc0(0x1ae)]),console[_0x2c8bc0(0x1a4)](a34_0x2027d8[_0x2c8bc0(0x1e6)]('\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.')),shouldSkipOfficialSkill(_0x2e10dc)?console[_0x2c8bc0(0x1a4)](a34_0x2027d8['gray'](_0x2c8bc0(0x197))):await installOfficialSkill(_0x2e10dc['nonInteractive']),{'ok':!![]};}catch(_0x29aeef){return _0x577aff[_0x2c8bc0(0x1c0)](_0x2c8bc0(0x1d3)),console[_0x2c8bc0(0x1e5)](a34_0x2027d8[_0x2c8bc0(0x1e2)]('\x20\x20'+_0x29aeef[_0x2c8bc0(0x1df)])),console[_0x2c8bc0(0x1a4)](a34_0x2027d8[_0x2c8bc0(0x1e6)](_0x2c8bc0(0x1b1)+_0x3e60db+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x137c48[_0x2c8bc0(0x1ae)])),{'ok':![],'message':_0x29aeef[_0x2c8bc0(0x1df)]};}}export const updateDefinition={'service':'update','command':a34_0x53fc3a(0x1c1),'description':a34_0x53fc3a(0x1da),'risk':a34_0x53fc3a(0x1be),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- function a35_0xccf1(){const _0x17e080=['2009384JmUBRh','9GeQKfn','4937512cponPg','85155UsUUMl','24ekqPBz','24811540vGqpzz','378prSsdk','464596ZihabR','97020kaiRrQ','142826VpYwMY'];a35_0xccf1=function(){return _0x17e080;};return a35_0xccf1();}(function(_0x141eef,_0x393402){const _0x391228=a35_0x5773,_0x87a0ab=_0x141eef();while(!![]){try{const _0x49c0b1=-parseInt(_0x391228(0x1c0))/0x1+-parseInt(_0x391228(0x1c1))/0x2+-parseInt(_0x391228(0x1c5))/0x3*(parseInt(_0x391228(0x1be))/0x4)+-parseInt(_0x391228(0x1bf))/0x5+-parseInt(_0x391228(0x1bd))/0x6*(-parseInt(_0x391228(0x1c4))/0x7)+-parseInt(_0x391228(0x1c3))/0x8*(parseInt(_0x391228(0x1c2))/0x9)+parseInt(_0x391228(0x1bc))/0xa;if(_0x49c0b1===_0x393402)break;else _0x87a0ab['push'](_0x87a0ab['shift']());}catch(_0x44c6d7){_0x87a0ab['push'](_0x87a0ab['shift']());}}}(a35_0xccf1,0x826e6));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a35_0x5773(_0xe9a5e0,_0x1b96e9){_0xe9a5e0=_0xe9a5e0-0x1bc;const _0xccf1a0=a35_0xccf1();let _0x5773c1=_0xccf1a0[_0xe9a5e0];return _0x5773c1;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x6a27ef,_0xa424e3){const _0x31090d=a35_0x178d,_0x197f49=_0x6a27ef();while(!![]){try{const _0x3caf90=-parseInt(_0x31090d(0x128))/0x1+-parseInt(_0x31090d(0x122))/0x2+-parseInt(_0x31090d(0x127))/0x3+-parseInt(_0x31090d(0x126))/0x4+-parseInt(_0x31090d(0x125))/0x5*(parseInt(_0x31090d(0x129))/0x6)+parseInt(_0x31090d(0x121))/0x7+-parseInt(_0x31090d(0x124))/0x8*(-parseInt(_0x31090d(0x123))/0x9);if(_0x3caf90===_0xa424e3)break;else _0x197f49['push'](_0x197f49['shift']());}catch(_0xf3adb8){_0x197f49['push'](_0x197f49['shift']());}}}(a35_0xdf75,0xc103d));import{codegenSdk}from'../../commands/codegen/sdk.js';function a35_0x178d(_0x55933a,_0x16d0ba){_0x55933a=_0x55933a-0x121;const _0xdf7581=a35_0xdf75();let _0x178d2d=_0xdf7581[_0x55933a];return _0x178d2d;}import{codegenSql}from'../../commands/codegen/sql.js';function a35_0xdf75(){const _0x8b41d3=['18jJMxdB','3209843OQUriW','201286JxbjzR','9DvxrVA','27715120rmgvRD','52505IdfOmh','1927808SqIHMz','3290214nlKzng','1421514jcYffz'];a35_0xdf75=function(){return _0x8b41d3;};return a35_0xdf75();}export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- const a36_0x22fc9b=a36_0x437a;(function(_0x1adb69,_0x155b52){const _0x1f56cf=a36_0x437a,_0xddb126=_0x1adb69();while(!![]){try{const _0xba19e3=parseInt(_0x1f56cf(0xdf))/0x1*(-parseInt(_0x1f56cf(0xd9))/0x2)+parseInt(_0x1f56cf(0xd5))/0x3*(parseInt(_0x1f56cf(0xe3))/0x4)+parseInt(_0x1f56cf(0xe0))/0x5*(-parseInt(_0x1f56cf(0xdb))/0x6)+-parseInt(_0x1f56cf(0xdd))/0x7+-parseInt(_0x1f56cf(0xd3))/0x8+-parseInt(_0x1f56cf(0xd4))/0x9+-parseInt(_0x1f56cf(0xd0))/0xa*(-parseInt(_0x1f56cf(0xcf))/0xb);if(_0xba19e3===_0x155b52)break;else _0xddb126['push'](_0xddb126['shift']());}catch(_0x9e2e58){_0xddb126['push'](_0xddb126['shift']());}}}(a36_0x5e64,0xa6df6));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a36_0x5e64(){const _0x2f61a9=['35390TuFVdr','appCode','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','10086352docecz','281385OrnwNF','67503hMCHMj','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','read','skip-imports','1646SMXbpQ','str','6aUOjvF','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','237482ICcFEW','codegen','1224QXaZfG','6558490vUuice','bool','sdk','124FxkeQM','tableName','alias','operation','code','11286GnVplo'];a36_0x5e64=function(){return _0x2f61a9;};return a36_0x5e64();}function a36_0x437a(_0x3b8435,_0x229d1d){_0x3b8435=_0x3b8435-0xce;const _0x5e6430=a36_0x5e64();let _0x437a9f=_0x5e6430[_0x3b8435];return _0x437a9f;}export const codegenSdk={'service':a36_0x22fc9b(0xde),'command':a36_0x22fc9b(0xe2),'description':a36_0x22fc9b(0xdc),'risk':a36_0x22fc9b(0xd7),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x22fc9b(0xe5),'type':'string','description':a36_0x22fc9b(0xd6)},{'name':'operation','type':'string','required':!![],'description':a36_0x22fc9b(0xd2)},{'name':a36_0x22fc9b(0xd8),'type':'boolean','description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x336653){const _0x41c8f4=a36_0x22fc9b,{dataset:_0x19e75c,operation:_0xf25f49}=await getOperationDetail(_0x336653[_0x41c8f4(0xd1)],_0x336653[_0x41c8f4(0xda)](_0x41c8f4(0xce)),_0x336653[_0x41c8f4(0xda)](_0x41c8f4(0xe6))),_0x5a7293=generateSdkCode(_0x19e75c,_0xf25f49,{'includeImports':!_0x336653[_0x41c8f4(0xe1)](_0x41c8f4(0xd8))});return{'ok':!![],'data':{'dataset':{'name':_0x19e75c['name'],'code':_0x19e75c[_0x41c8f4(0xce)],'tableName':_0x19e75c[_0x41c8f4(0xe4)]},'operation':_0x336653[_0x41c8f4(0xda)](_0x41c8f4(0xe6)),'code':_0x5a7293}};}};
1
+ function a36_0x34ea(_0x2a0ad4,_0x5bfa61){_0x2a0ad4=_0x2a0ad4-0x195;const _0x16435a=a36_0x1643();let _0x34ea86=_0x16435a[_0x2a0ad4];return _0x34ea86;}const a36_0x203ba6=a36_0x34ea;(function(_0x2082db,_0x29f828){const _0x4f5e02=a36_0x34ea,_0x1bacfe=_0x2082db();while(!![]){try{const _0x28e52b=parseInt(_0x4f5e02(0x19f))/0x1+parseInt(_0x4f5e02(0x19d))/0x2*(-parseInt(_0x4f5e02(0x19c))/0x3)+parseInt(_0x4f5e02(0x1a2))/0x4+-parseInt(_0x4f5e02(0x1a6))/0x5*(-parseInt(_0x4f5e02(0x1a1))/0x6)+-parseInt(_0x4f5e02(0x1a7))/0x7*(parseInt(_0x4f5e02(0x1ad))/0x8)+parseInt(_0x4f5e02(0x1ab))/0x9+-parseInt(_0x4f5e02(0x195))/0xa*(parseInt(_0x4f5e02(0x1a0))/0xb);if(_0x28e52b===_0x29f828)break;else _0x1bacfe['push'](_0x1bacfe['shift']());}catch(_0x26ce64){_0x1bacfe['push'](_0x1bacfe['shift']());}}}(a36_0x1643,0x940cb));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a36_0x1643(){const _0x13b984=['Omit\x20import\x20statements\x20from\x20generated\x20code','operation','9mPDPgQ','22582QRhtlA','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','787640qzluzK','11pFOykU','6HyzRRT','4029560SErTLf','alias','appCode','codegen','1822695tXTjHp','14Zpbufu','tableName','code','bool','1409382ahzfrz','string','2548456szCQka','10387690UDVyAu','read','name','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','str'];a36_0x1643=function(){return _0x13b984;};return a36_0x1643();}export const codegenSdk={'service':a36_0x203ba6(0x1a5),'command':'sdk','description':'Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','risk':a36_0x203ba6(0x196),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x203ba6(0x1a3),'type':a36_0x203ba6(0x1ac),'description':a36_0x203ba6(0x19e)},{'name':'operation','type':a36_0x203ba6(0x1ac),'required':!![],'description':a36_0x203ba6(0x198)},{'name':'skip-imports','type':'boolean','description':a36_0x203ba6(0x19a)}],async 'execute'(_0x4c5e4b){const _0x49575b=a36_0x203ba6,{dataset:_0x5ce34a,operation:_0x350fb8}=await getOperationDetail(_0x4c5e4b[_0x49575b(0x1a4)],_0x4c5e4b[_0x49575b(0x199)]('code'),_0x4c5e4b[_0x49575b(0x199)](_0x49575b(0x19b))),_0x5bae6c=generateSdkCode(_0x5ce34a,_0x350fb8,{'includeImports':!_0x4c5e4b[_0x49575b(0x1aa)]('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x5ce34a[_0x49575b(0x197)],'code':_0x5ce34a[_0x49575b(0x1a9)],'tableName':_0x5ce34a[_0x49575b(0x1a8)]},'operation':_0x4c5e4b[_0x49575b(0x199)](_0x49575b(0x19b)),'code':_0x5bae6c}};}};
@@ -1 +1 @@
1
- const a37_0x314e8c=a37_0x26c1;(function(_0x34596d,_0xa2f0a0){const _0x1c6e70=a37_0x26c1,_0x2cb7af=_0x34596d();while(!![]){try{const _0x15c266=parseInt(_0x1c6e70(0x1a8))/0x1*(parseInt(_0x1c6e70(0x1be))/0x2)+parseInt(_0x1c6e70(0x1b1))/0x3+parseInt(_0x1c6e70(0x1b0))/0x4*(parseInt(_0x1c6e70(0x1bd))/0x5)+parseInt(_0x1c6e70(0x1b2))/0x6*(-parseInt(_0x1c6e70(0x1c1))/0x7)+parseInt(_0x1c6e70(0x1c0))/0x8*(-parseInt(_0x1c6e70(0x1b7))/0x9)+parseInt(_0x1c6e70(0x1af))/0xa*(parseInt(_0x1c6e70(0x1b4))/0xb)+-parseInt(_0x1c6e70(0x1aa))/0xc;if(_0x15c266===_0xa2f0a0)break;else _0x2cb7af['push'](_0x2cb7af['shift']());}catch(_0x2e2387){_0x2cb7af['push'](_0x2cb7af['shift']());}}}(a37_0x23ed,0xa6b0e));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x23ed(){const _0xf66c28=['1049FxxBps','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','25445448wMtTio','Omit\x20import\x20statements\x20from\x20generated\x20code','bff','no-imports','sqlcode','8890dzSkdy','49332FMzXRp','1373661scbSae','66qMHMyZ','appCode','13574SOMSNn','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','codegen','1854QCnPCa','target','str','boolean','sdk','sqlName','445NBrxOo','2082jIoeuF','sql','27624DpZDpX','146377dgxfbq','sqlCode','string'];a37_0x23ed=function(){return _0xf66c28;};return a37_0x23ed();}function a37_0x26c1(_0x354363,_0x33d990){_0x354363=_0x354363-0x1a6;const _0x23ed1d=a37_0x23ed();let _0x26c17c=_0x23ed1d[_0x354363];return _0x26c17c;}export const codegenSql={'service':a37_0x314e8c(0x1b6),'command':a37_0x314e8c(0x1bf),'description':a37_0x314e8c(0x1b5),'risk':'read','flags':[SQLCODE_FLAG,{'name':a37_0x314e8c(0x1b8),'type':a37_0x314e8c(0x1a7),'description':a37_0x314e8c(0x1a9),'default':'sdk','enum':[a37_0x314e8c(0x1bb),a37_0x314e8c(0x1ac)]},{'name':a37_0x314e8c(0x1ad),'type':a37_0x314e8c(0x1ba),'description':a37_0x314e8c(0x1ab)}],async 'execute'(_0x4deffc){const _0x378cd9=a37_0x314e8c,_0x542b61=await getSqlQueryInfo(_0x4deffc[_0x378cd9(0x1b3)],_0x4deffc[_0x378cd9(0x1b9)](_0x378cd9(0x1ae))),_0x5e2829=_0x4deffc['str'](_0x378cd9(0x1b8))||_0x378cd9(0x1bb),_0x535713=generateSqlCodeTemplate(_0x542b61,{'target':_0x5e2829,'includeImports':!_0x4deffc['bool']('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x542b61[_0x378cd9(0x1a6)],'sqlName':_0x542b61[_0x378cd9(0x1bc)],'target':_0x5e2829,'code':_0x535713}};}};
1
+ const a37_0x49db2d=a37_0x1302;(function(_0x26f643,_0x45713e){const _0x2d4b32=a37_0x1302,_0x3e42b0=_0x26f643();while(!![]){try{const _0x3894e5=-parseInt(_0x2d4b32(0x161))/0x1*(-parseInt(_0x2d4b32(0x152))/0x2)+-parseInt(_0x2d4b32(0x167))/0x3*(-parseInt(_0x2d4b32(0x155))/0x4)+parseInt(_0x2d4b32(0x162))/0x5+-parseInt(_0x2d4b32(0x15e))/0x6+-parseInt(_0x2d4b32(0x157))/0x7+parseInt(_0x2d4b32(0x166))/0x8+-parseInt(_0x2d4b32(0x15b))/0x9*(parseInt(_0x2d4b32(0x163))/0xa);if(_0x3894e5===_0x45713e)break;else _0x3e42b0['push'](_0x3e42b0['shift']());}catch(_0x544747){_0x3e42b0['push'](_0x3e42b0['shift']());}}}(a37_0x2628,0x8b07e));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x2628(){const _0x2c94c4=['bff','read','sdk','35937dNtlox','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','no-imports','568392gfQSUx','sqlName','sql','18092CxURNC','2414975GPOvQn','4310IJpdIB','target','str','4082520ojocwV','2205426gkBkPL','sqlCode','Omit\x20import\x20statements\x20from\x20generated\x20code','98UvKqlt','bool','boolean','4RCtHki','appCode','1608425tguSXL'];a37_0x2628=function(){return _0x2c94c4;};return a37_0x2628();}function a37_0x1302(_0x47dcd0,_0x1703c3){_0x47dcd0=_0x47dcd0-0x152;const _0x2628d8=a37_0x2628();let _0x130228=_0x2628d8[_0x47dcd0];return _0x130228;}export const codegenSql={'service':'codegen','command':a37_0x49db2d(0x160),'description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a37_0x49db2d(0x159),'flags':[SQLCODE_FLAG,{'name':a37_0x49db2d(0x164),'type':'string','description':a37_0x49db2d(0x15c),'default':'sdk','enum':[a37_0x49db2d(0x15a),a37_0x49db2d(0x158)]},{'name':a37_0x49db2d(0x15d),'type':a37_0x49db2d(0x154),'description':a37_0x49db2d(0x169)}],async 'execute'(_0x4c4ad3){const _0x1e6f4b=a37_0x49db2d,_0x2b6028=await getSqlQueryInfo(_0x4c4ad3[_0x1e6f4b(0x156)],_0x4c4ad3[_0x1e6f4b(0x165)]('sqlcode')),_0x171599=_0x4c4ad3[_0x1e6f4b(0x165)](_0x1e6f4b(0x164))||_0x1e6f4b(0x15a),_0x23ebad=generateSqlCodeTemplate(_0x2b6028,{'target':_0x171599,'includeImports':!_0x4c4ad3[_0x1e6f4b(0x153)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x2b6028[_0x1e6f4b(0x168)],'sqlName':_0x2b6028[_0x1e6f4b(0x15f)],'target':_0x171599,'code':_0x23ebad}};}};
@@ -1 +1 @@
1
- (function(_0x297bb7,_0x39a3cb){const _0x2d2b2f=a38_0x5513,_0xbdec67=_0x297bb7();while(!![]){try{const _0x5312a5=-parseInt(_0x2d2b2f(0x1c2))/0x1+parseInt(_0x2d2b2f(0x1b2))/0x2*(-parseInt(_0x2d2b2f(0x1c7))/0x3)+parseInt(_0x2d2b2f(0x1b4))/0x4+-parseInt(_0x2d2b2f(0x1c3))/0x5*(parseInt(_0x2d2b2f(0x1d1))/0x6)+-parseInt(_0x2d2b2f(0x1ab))/0x7*(parseInt(_0x2d2b2f(0x1b3))/0x8)+-parseInt(_0x2d2b2f(0x1c9))/0x9*(-parseInt(_0x2d2b2f(0x1ac))/0xa)+parseInt(_0x2d2b2f(0x1b6))/0xb;if(_0x5312a5===_0x39a3cb)break;else _0xbdec67['push'](_0xbdec67['shift']());}catch(_0x1429e9){_0xbdec67['push'](_0xbdec67['shift']());}}}(a38_0x557e,0x9695f));import{input,checkbox,select}from'@inquirer/prompts';function a38_0x5513(_0x1f4274,_0x298364){_0x1f4274=_0x1f4274-0x1ab;const _0x557e8a=a38_0x557e();let _0x551320=_0x557e8a[_0x1f4274];return _0x551320;}import a38_0x31e2b6 from'chalk';function a38_0x557e(){const _0xbdc417=['278676XSdGPW','skip','appCode','✎\x20自定义输入\x20appcode','获取到\x20','请输入\x20App\x20Code:','Invalid\x20App\x20Code','valid','6CVWYtj','yellow','map','283577hSwWgP','70sppOxb','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','length','appName','无法获取远程应用列表,请手动输入。','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','218FNvJOl','64MJZxXf','3012932wmMPMf','custom','26679829vEWEkr','未找到可用应用。','App\x20Code:','cyan','manual','\x20\x20(','\x0a无法获取远程应用列表,请手动输入。','trim','message','find','gray','includes','680553IrnIxY','3639535tKCEjo','请选择要绑定的应用:','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','\x0a未找到可用应用。','28791vmoNgd','✎\x20手动输入'];a38_0x557e=function(){return _0xbdc417;};return a38_0x557e();}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 _0x1d24bb=a38_0x5513,_0x380f3c=await input({'message':_0x1d24bb(0x1ce),'validate':_0x1983e1=>{const _0x1f6703=_0x1d24bb,_0x5d367b=validateAppcode(_0x1983e1[_0x1f6703(0x1bd)]());return _0x5d367b[_0x1f6703(0x1d0)]||_0x5d367b[_0x1f6703(0x1be)]||_0x1f6703(0x1cf);}});return _0x380f3c[_0x1d24bb(0x1bd)]();}export async function promptAppSelection(_0x1f0272){const _0x5ba54c=a38_0x5513,_0x3e95d3=[{'name':a38_0x31e2b6[_0x5ba54c(0x1d2)](_0x5ba54c(0x1cc)),'value':-0x1},..._0x1f0272['map']((_0x2ebb5e,_0x17f800)=>({'name':_0x2ebb5e[_0x5ba54c(0x1af)]+'\x20\x20'+a38_0x31e2b6[_0x5ba54c(0x1c0)]('('+_0x2ebb5e['appCode']+')'),'value':_0x17f800}))],_0xd5dcc6=await checkbox({'message':_0x5ba54c(0x1cd)+a38_0x31e2b6[_0x5ba54c(0x1b9)](_0x1f0272[_0x5ba54c(0x1ae)])+_0x5ba54c(0x1b1),'choices':_0x3e95d3,'loop':![]});if(_0xd5dcc6[_0x5ba54c(0x1c1)](-0x1))return'custom';if(_0xd5dcc6[_0x5ba54c(0x1ae)]===0x0)return _0x5ba54c(0x1b5);return _0xd5dcc6[_0x5ba54c(0x1d3)](_0x1ffa96=>_0x1f0272[_0x1ffa96]);}export async function promptSingleAppSelection(_0x2eb0f6){const _0x3ae0a8=a38_0x5513,_0x47c685=[{'name':a38_0x31e2b6[_0x3ae0a8(0x1c0)](_0x3ae0a8(0x1ad)),'value':_0x3ae0a8(0x1ca)},{'name':a38_0x31e2b6[_0x3ae0a8(0x1d2)](_0x3ae0a8(0x1cc)),'value':'custom'},..._0x2eb0f6[_0x3ae0a8(0x1d3)](_0x3b1ddf=>({'name':_0x3b1ddf[_0x3ae0a8(0x1af)]+'\x20\x20'+a38_0x31e2b6[_0x3ae0a8(0x1c0)]('('+_0x3b1ddf[_0x3ae0a8(0x1cb)]+')'),'value':_0x3b1ddf[_0x3ae0a8(0x1cb)]}))],_0x59b674=await select({'message':_0x3ae0a8(0x1c4),'choices':_0x47c685});if(_0x59b674===_0x3ae0a8(0x1ca))return'skip';if(_0x59b674===_0x3ae0a8(0x1b5))return'custom';return _0x2eb0f6[_0x3ae0a8(0x1bf)](_0x3e0ddd=>_0x3e0ddd['appCode']===_0x59b674);}export async function selectSingleAppcode(_0x1eba38){const _0x5a23e5=a38_0x5513;if(!_0x1eba38)return writeCliSideChannelLine(a38_0x31e2b6[_0x5a23e5(0x1c0)](_0x5a23e5(0x1c5))),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x52555d;try{_0x52555d=await withActiveCookie(_0x1eba38,()=>listRemoteApps());}catch(_0x34a11f){writeCliSideChannelLine(a38_0x31e2b6[_0x5a23e5(0x1d2)](_0x5a23e5(0x1b0)));if(_0x34a11f instanceof Error)writeCliSideChannelLine(a38_0x31e2b6[_0x5a23e5(0x1c0)](_0x5a23e5(0x1bb)+_0x34a11f[_0x5a23e5(0x1be)]+')'));return _fallbackOrSkip();}if(_0x52555d[_0x5a23e5(0x1ae)]===0x0)return writeCliSideChannelLine(a38_0x31e2b6[_0x5a23e5(0x1d2)](_0x5a23e5(0x1b7))),_fallbackOrSkip();const _0x322318=await promptSingleAppSelection(_0x52555d);if(_0x322318===_0x5a23e5(0x1ca))return'';if(_0x322318==='custom')return promptCustomAppcode();return _0x322318['appCode'];}export async function selectMultipleApps(_0x10eaad){const _0x347422=a38_0x5513;writeCliSideChannelLine('正在获取可用应用列表...');let _0x399c28;try{_0x399c28=await withActiveCookie(_0x10eaad,()=>listRemoteApps());}catch(_0x35e80d){writeCliSideChannelLine(_0x347422(0x1bc));if(_0x35e80d instanceof Error)writeCliSideChannelLine(_0x347422(0x1bb)+_0x35e80d[_0x347422(0x1be)]+')');return _0x347422(0x1b5);}if(_0x399c28[_0x347422(0x1ae)]===0x0)return writeCliSideChannelLine(_0x347422(0x1c6)),_0x347422(0x1b5);return promptAppSelection(_0x399c28);}async function _fallbackOrSkip(){const _0xdae039=a38_0x5513,_0x10cee1=await select({'message':_0xdae039(0x1b8),'choices':[{'name':a38_0x31e2b6[_0xdae039(0x1c0)]('(跳过,稍后配置)'),'value':_0xdae039(0x1ca)},{'name':a38_0x31e2b6[_0xdae039(0x1d2)](_0xdae039(0x1c8)),'value':_0xdae039(0x1ba)}]});if(_0x10cee1===_0xdae039(0x1ca))return'';return promptCustomAppcode();}
1
+ (function(_0x7b8466,_0x3bbe34){const _0x10aac1=a38_0x1c1f,_0x4e3f9c=_0x7b8466();while(!![]){try{const _0x2ee260=parseInt(_0x10aac1(0x10b))/0x1+parseInt(_0x10aac1(0x109))/0x2+parseInt(_0x10aac1(0x117))/0x3*(-parseInt(_0x10aac1(0x11f))/0x4)+parseInt(_0x10aac1(0x100))/0x5*(parseInt(_0x10aac1(0x10e))/0x6)+parseInt(_0x10aac1(0x114))/0x7+-parseInt(_0x10aac1(0x10a))/0x8*(parseInt(_0x10aac1(0x120))/0x9)+-parseInt(_0x10aac1(0x108))/0xa*(parseInt(_0x10aac1(0x106))/0xb);if(_0x2ee260===_0x3bbe34)break;else _0x4e3f9c['push'](_0x4e3f9c['shift']());}catch(_0x2d348d){_0x4e3f9c['push'](_0x4e3f9c['shift']());}}}(a38_0x5a71,0x953a8));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x2735e3 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 _0x341671=a38_0x1c1f,_0x1469e1=await input({'message':_0x341671(0x116),'validate':_0x2546f3=>{const _0x356a07=_0x341671,_0x3a9eed=validateAppcode(_0x2546f3['trim']());return _0x3a9eed[_0x356a07(0x101)]||_0x3a9eed[_0x356a07(0x11e)]||_0x356a07(0x10d);}});return _0x1469e1[_0x341671(0xfd)]();}function a38_0x5a71(){const _0x203a6b=['1791412ikInrr','无法获取远程应用列表,请手动输入。','请输入\x20App\x20Code:','6Qapuxa','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','未找到可用应用。','\x20\x20(','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','map','yellow','message','2347528dhPdRn','43911FTHbWI','正在获取可用应用列表...','\x0a无法获取远程应用列表,请手动输入。','includes','✎\x20自定义输入\x20appcode','trim','请选择要绑定的应用:','custom','303850cwHppN','valid','find','length','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','appName','2662UkIBmj','gray','31830KyeXeQ','389850RgENSE','376pSWucV','1118362FkbfKG','获取到\x20','Invalid\x20App\x20Code','120nDZnOE','appCode','(跳过,稍后配置)','\x0a未找到可用应用。','cyan','skip'];a38_0x5a71=function(){return _0x203a6b;};return a38_0x5a71();}export async function promptAppSelection(_0x9c77b1){const _0x1a8dbb=a38_0x1c1f,_0x2df4fd=[{'name':a38_0x2735e3[_0x1a8dbb(0x11d)](_0x1a8dbb(0x124)),'value':-0x1},..._0x9c77b1['map']((_0x35125c,_0x12805d)=>({'name':_0x35125c[_0x1a8dbb(0x105)]+'\x20\x20'+a38_0x2735e3[_0x1a8dbb(0x107)]('('+_0x35125c['appCode']+')'),'value':_0x12805d}))],_0x5c76f1=await checkbox({'message':_0x1a8dbb(0x10c)+a38_0x2735e3[_0x1a8dbb(0x112)](_0x9c77b1['length'])+_0x1a8dbb(0x118),'choices':_0x2df4fd,'loop':![]});if(_0x5c76f1[_0x1a8dbb(0x123)](-0x1))return _0x1a8dbb(0xff);if(_0x5c76f1['length']===0x0)return _0x1a8dbb(0xff);return _0x5c76f1[_0x1a8dbb(0x11c)](_0x27418d=>_0x9c77b1[_0x27418d]);}export async function promptSingleAppSelection(_0xf1ed0d){const _0x436ef=a38_0x1c1f,_0x2731cd=[{'name':a38_0x2735e3[_0x436ef(0x107)](_0x436ef(0x11b)),'value':_0x436ef(0x113)},{'name':a38_0x2735e3[_0x436ef(0x11d)]('✎\x20自定义输入\x20appcode'),'value':_0x436ef(0xff)},..._0xf1ed0d[_0x436ef(0x11c)](_0x37d7f0=>({'name':_0x37d7f0[_0x436ef(0x105)]+'\x20\x20'+a38_0x2735e3[_0x436ef(0x107)]('('+_0x37d7f0['appCode']+')'),'value':_0x37d7f0[_0x436ef(0x10f)]}))],_0x331c8e=await select({'message':_0x436ef(0xfe),'choices':_0x2731cd});if(_0x331c8e===_0x436ef(0x113))return _0x436ef(0x113);if(_0x331c8e==='custom')return _0x436ef(0xff);return _0xf1ed0d[_0x436ef(0x102)](_0x17b0d8=>_0x17b0d8[_0x436ef(0x10f)]===_0x331c8e);}export async function selectSingleAppcode(_0x36095d){const _0xb43652=a38_0x1c1f;if(!_0x36095d)return writeCliSideChannelLine(a38_0x2735e3[_0xb43652(0x107)](_0xb43652(0x104))),_fallbackOrSkip();writeCliSideChannelLine(_0xb43652(0x121));let _0x3e5f28;try{_0x3e5f28=await withActiveCookie(_0x36095d,()=>listRemoteApps());}catch(_0x526e5f){writeCliSideChannelLine(a38_0x2735e3[_0xb43652(0x11d)](_0xb43652(0x115)));if(_0x526e5f instanceof Error)writeCliSideChannelLine(a38_0x2735e3[_0xb43652(0x107)]('\x20\x20('+_0x526e5f['message']+')'));return _fallbackOrSkip();}if(_0x3e5f28[_0xb43652(0x103)]===0x0)return writeCliSideChannelLine(a38_0x2735e3['yellow'](_0xb43652(0x119))),_fallbackOrSkip();const _0x1090ca=await promptSingleAppSelection(_0x3e5f28);if(_0x1090ca===_0xb43652(0x113))return'';if(_0x1090ca===_0xb43652(0xff))return promptCustomAppcode();return _0x1090ca[_0xb43652(0x10f)];}export async function selectMultipleApps(_0x103e02){const _0x4e341b=a38_0x1c1f;writeCliSideChannelLine(_0x4e341b(0x121));let _0x467b31;try{_0x467b31=await withActiveCookie(_0x103e02,()=>listRemoteApps());}catch(_0xfb8c94){writeCliSideChannelLine(_0x4e341b(0x122));if(_0xfb8c94 instanceof Error)writeCliSideChannelLine(_0x4e341b(0x11a)+_0xfb8c94[_0x4e341b(0x11e)]+')');return _0x4e341b(0xff);}if(_0x467b31[_0x4e341b(0x103)]===0x0)return writeCliSideChannelLine(_0x4e341b(0x111)),_0x4e341b(0xff);return promptAppSelection(_0x467b31);}function a38_0x1c1f(_0x5afdcb,_0x3cdc22){_0x5afdcb=_0x5afdcb-0xfd;const _0x5a71fd=a38_0x5a71();let _0x1c1fab=_0x5a71fd[_0x5afdcb];return _0x1c1fab;}async function _fallbackOrSkip(){const _0x3a3432=a38_0x1c1f,_0x30acab=await select({'message':'App\x20Code:','choices':[{'name':a38_0x2735e3[_0x3a3432(0x107)](_0x3a3432(0x110)),'value':_0x3a3432(0x113)},{'name':a38_0x2735e3[_0x3a3432(0x11d)]('✎\x20手动输入'),'value':'manual'}]});if(_0x30acab==='skip')return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a39_0xd9cdf8=a39_0x153d;function a39_0x5ab3(){const _0x48e6c0=['246944vJWePE','1195896zwskVF','datasetcode','MYSQL','string','7PAiXgi','sqlcode','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','147206GbnKeL','4MZBCwT','54ScWoLY','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','8142800GugnUL','Dataset\x20code\x20(32-char\x20hex\x20UUID)','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','2260722WaEjtP','196048soLjSG','473345DKPYNk','code','appcode'];a39_0x5ab3=function(){return _0x48e6c0;};return a39_0x5ab3();}(function(_0x8f1479,_0x18277a){const _0x3c211f=a39_0x153d,_0x2e9cde=_0x8f1479();while(!![]){try{const _0x5f353f=parseInt(_0x3c211f(0xfa))/0x1+parseInt(_0x3c211f(0xee))/0x2+parseInt(_0x3c211f(0xfb))/0x3+parseInt(_0x3c211f(0xef))/0x4*(parseInt(_0x3c211f(0xf7))/0x5)+parseInt(_0x3c211f(0xf5))/0x6*(parseInt(_0x3c211f(0xff))/0x7)+parseInt(_0x3c211f(0xf6))/0x8*(-parseInt(_0x3c211f(0xf0))/0x9)+-parseInt(_0x3c211f(0xf2))/0xa;if(_0x5f353f===_0x18277a)break;else _0x2e9cde['push'](_0x2e9cde['shift']());}catch(_0x2ffddb){_0x2e9cde['push'](_0x2e9cde['shift']());}}}(a39_0x5ab3,0x37fc7));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0xd9cdf8(0xf4)};export const CODE_FLAG={'name':a39_0xd9cdf8(0xf8),'type':a39_0xd9cdf8(0xfe),'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_0xd9cdf8(0xfc),'description':a39_0xd9cdf8(0xf3)};function a39_0x153d(_0x51862b,_0x33858e){_0x51862b=_0x51862b-0xed;const _0x5ab30d=a39_0x5ab3();let _0x153d89=_0x5ab30d[_0x51862b];return _0x153d89;}export const SQLCODE_FLAG={'name':a39_0xd9cdf8(0x100),'type':a39_0xd9cdf8(0xfe),'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_0xd9cdf8(0xf9),'type':a39_0xd9cdf8(0xfe),'required':![],'description':a39_0xd9cdf8(0xed)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':'number','required':!![],'description':a39_0xd9cdf8(0xf1)};export const DB_TYPE_FLAG={'name':'dbtype','type':a39_0xd9cdf8(0xfe),'required':!![],'description':'Database\x20product\x20type','enum':[a39_0xd9cdf8(0xfd),'POSTGRESQL']};
1
+ function a39_0x38c6(){const _0x26a23d=['sqlcode','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','39126CPnsDS','POSTGRESQL','2118BmtLro','1861161EePqEG','string','Dataset\x20code\x20(32-char\x20hex\x20UUID)','number','4558250nDHHza','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','4718104HfGNJi','code','MYSQL','datasetcode','13251GyRPAQ','28tLHcwr','4302972lGZjGy','Database\x20product\x20type','322975pQHYsw','76EOsSXn'];a39_0x38c6=function(){return _0x26a23d;};return a39_0x38c6();}const a39_0x1bc487=a39_0xe6c4;(function(_0x2d8370,_0x22744e){const _0x521cea=a39_0xe6c4,_0x2c752d=_0x2d8370();while(!![]){try{const _0x55b30d=parseInt(_0x521cea(0x130))/0x1*(-parseInt(_0x521cea(0x12d))/0x2)+parseInt(_0x521cea(0x11e))/0x3+parseInt(_0x521cea(0x129))/0x4*(parseInt(_0x521cea(0x12c))/0x5)+parseInt(_0x521cea(0x11d))/0x6*(parseInt(_0x521cea(0x128))/0x7)+parseInt(_0x521cea(0x124))/0x8+-parseInt(_0x521cea(0x12a))/0x9+parseInt(_0x521cea(0x122))/0xa;if(_0x55b30d===_0x22744e)break;else _0x2c752d['push'](_0x2c752d['shift']());}catch(_0x1ff79c){_0x2c752d['push'](_0x2c752d['shift']());}}}(a39_0x38c6,0xc88e1));export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)'};export const CODE_FLAG={'name':a39_0x1bc487(0x125),'type':'string','required':!![],'description':a39_0x1bc487(0x120),'pattern':DATASET_CODE_PATTERN};function a39_0xe6c4(_0x215dbd,_0x312624){_0x215dbd=_0x215dbd-0x11c;const _0x38c6e1=a39_0x38c6();let _0xe6c40a=_0x38c6e1[_0x215dbd];return _0xe6c40a;}export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x1bc487(0x127),'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)'};export const SQLCODE_FLAG={'name':a39_0x1bc487(0x12e),'type':a39_0x1bc487(0x11f),'required':!![],'description':a39_0x1bc487(0x12f),'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':'appcode','type':a39_0x1bc487(0x11f),'required':![],'description':a39_0x1bc487(0x123)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a39_0x1bc487(0x121),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':'dbtype','type':a39_0x1bc487(0x11f),'required':!![],'description':a39_0x1bc487(0x12b),'enum':[a39_0x1bc487(0x126),a39_0x1bc487(0x11c)]};
@@ -1 +1 @@
1
- function a40_0x9589(_0x493d2d,_0x1593de){_0x493d2d=_0x493d2d-0x10a;const _0x47a6ea=a40_0x47a6();let _0x9589b9=_0x47a6ea[_0x493d2d];return _0x9589b9;}function a40_0x47a6(){const _0x38100f=['App\x20Code\x20cannot\x20exceed\x20100\x20characters','17621630KJFFTd','54gRnOwx','135465VidrtY','569204MAtYsZ','35pjPxRp','1648305cMnWvF','trim','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','336Rqditl','9qTDMbH','1581544pjAMOn','test','249168cxGHOa','App\x20Code\x20cannot\x20be\x20empty','34535853JszNXa'];a40_0x47a6=function(){return _0x38100f;};return a40_0x47a6();}(function(_0x5ad964,_0x5b600d){const _0x57f0e9=a40_0x9589,_0xa37c58=_0x5ad964();while(!![]){try{const _0x2dc29=-parseInt(_0x57f0e9(0x10f))/0x1+parseInt(_0x57f0e9(0x10d))/0x2+-parseInt(_0x57f0e9(0x10b))/0x3*(-parseInt(_0x57f0e9(0x116))/0x4)+-parseInt(_0x57f0e9(0x10c))/0x5*(-parseInt(_0x57f0e9(0x112))/0x6)+parseInt(_0x57f0e9(0x10e))/0x7*(parseInt(_0x57f0e9(0x114))/0x8)+-parseInt(_0x57f0e9(0x113))/0x9*(-parseInt(_0x57f0e9(0x10a))/0xa)+-parseInt(_0x57f0e9(0x118))/0xb;if(_0x2dc29===_0x5b600d)break;else _0xa37c58['push'](_0xa37c58['shift']());}catch(_0x225d5d){_0xa37c58['push'](_0xa37c58['shift']());}}}(a40_0x47a6,0xd8406));export function validateAppcode(_0x494a87){const _0x16f911=a40_0x9589,_0x3e1d18=_0x494a87[_0x16f911(0x110)]();if(!_0x3e1d18)return{'valid':![],'message':_0x16f911(0x117)};if(_0x3e1d18['length']>0x64)return{'valid':![],'message':_0x16f911(0x119)};if(!/^[A-Za-z0-9_-]+$/[_0x16f911(0x115)](_0x3e1d18))return{'valid':![],'message':_0x16f911(0x111)};return{'valid':!![]};}
1
+ (function(_0x16fe1e,_0x5f5d95){const _0xe711c7=a40_0x58bd,_0x543884=_0x16fe1e();while(!![]){try{const _0x31eabd=parseInt(_0xe711c7(0xad))/0x1*(parseInt(_0xe711c7(0xa3))/0x2)+-parseInt(_0xe711c7(0xa2))/0x3*(-parseInt(_0xe711c7(0xb3))/0x4)+parseInt(_0xe711c7(0xb1))/0x5+parseInt(_0xe711c7(0xb2))/0x6*(parseInt(_0xe711c7(0xab))/0x7)+parseInt(_0xe711c7(0xae))/0x8*(parseInt(_0xe711c7(0xa6))/0x9)+parseInt(_0xe711c7(0xaf))/0xa*(-parseInt(_0xe711c7(0xa8))/0xb)+-parseInt(_0xe711c7(0xaa))/0xc*(parseInt(_0xe711c7(0xa9))/0xd);if(_0x31eabd===_0x5f5d95)break;else _0x543884['push'](_0x543884['shift']());}catch(_0x42fc3c){_0x543884['push'](_0x543884['shift']());}}}(a40_0x13b4,0x7b306));function a40_0x58bd(_0x57d7b8,_0xac5fee){_0x57d7b8=_0x57d7b8-0xa2;const _0x13b4f3=a40_0x13b4();let _0x58bd73=_0x13b4f3[_0x57d7b8];return _0x58bd73;}function a40_0x13b4(){const _0x3d2e48=['Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','5984DFhjJy','3263HnLYaY','101580sXKDwg','28BAbAAa','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1060logmep','1448144oPsota','4460jAVVur','App\x20Code\x20cannot\x20be\x20empty','4540845IpexuC','940542IAbbJS','4rAChvj','832350fggpbK','974iVcoKn','length','trim','27UkymNS'];a40_0x13b4=function(){return _0x3d2e48;};return a40_0x13b4();}export function validateAppcode(_0x584cbf){const _0x2ae9f7=a40_0x58bd,_0x1f4a7d=_0x584cbf[_0x2ae9f7(0xa5)]();if(!_0x1f4a7d)return{'valid':![],'message':_0x2ae9f7(0xb0)};if(_0x1f4a7d[_0x2ae9f7(0xa4)]>0x64)return{'valid':![],'message':_0x2ae9f7(0xac)};if(!/^[A-Za-z0-9_-]+$/['test'](_0x1f4a7d))return{'valid':![],'message':_0x2ae9f7(0xa7)};return{'valid':!![]};}
@@ -1 +1 @@
1
- const a41_0x485e05=a41_0x12ab;function a41_0x1988(){const _0x9602b0=['324122kWBvyX','validation','Missing\x20key.','375170xEDYPK','key','Key\x20not\x20found:\x20','430008yeeaRe','1499868wcJsmw','object','string','597dJUSML','str','7hFtKfB','12cBqjJT','2690856QqrPWs','get','config','1854FwmEhv','823865jJfxOP'];a41_0x1988=function(){return _0x9602b0;};return a41_0x1988();}(function(_0x27230b,_0x39d621){const _0x560cf0=a41_0x12ab,_0x447362=_0x27230b();while(!![]){try{const _0x56eec7=parseInt(_0x560cf0(0x78))/0x1+-parseInt(_0x560cf0(0x76))/0x2*(parseInt(_0x560cf0(0x6f))/0x3)+parseInt(_0x560cf0(0x72))/0x4*(-parseInt(_0x560cf0(0x77))/0x5)+parseInt(_0x560cf0(0x6c))/0x6*(parseInt(_0x560cf0(0x71))/0x7)+parseInt(_0x560cf0(0x6b))/0x8+parseInt(_0x560cf0(0x73))/0x9+parseInt(_0x560cf0(0x68))/0xa;if(_0x56eec7===_0x39d621)break;else _0x447362['push'](_0x447362['shift']());}catch(_0x468a51){_0x447362['push'](_0x447362['shift']());}}}(a41_0x1988,0x45b78));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x31e01f){const _0x9d793b=a41_0x12ab,_0x1b8c74=_0x31e01f[_0x9d793b(0x70)](_0x9d793b(0x69));if(!_0x1b8c74)throw CliErrors[_0x9d793b(0x66)](_0x9d793b(0x67),'Usage:\x20'+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x4fd071=readConfig(),_0x5dfdb2=_0x1b8c74==='app'?'appcode':_0x1b8c74,_0x339030=_0x4fd071[_0x5dfdb2];if(_0x339030===undefined)throw CliErrors[_0x9d793b(0x66)](_0x9d793b(0x6a)+_0x1b8c74);return{'ok':!![],'data':typeof _0x339030===_0x9d793b(0x6d)?_0x339030:{[_0x5dfdb2]:_0x339030},'message':typeof _0x339030===_0x9d793b(0x6d)?undefined:String(_0x339030)};}function a41_0x12ab(_0x2b0cd4,_0x4b228a){_0x2b0cd4=_0x2b0cd4-0x66;const _0x1988cf=a41_0x1988();let _0x12abf7=_0x1988cf[_0x2b0cd4];return _0x12abf7;}export const configGetDefinition={'service':a41_0x485e05(0x75),'command':a41_0x485e05(0x74),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x485e05(0x69),'type':a41_0x485e05(0x6e),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a41_0x4fa39f=a41_0x558e;(function(_0x51cc30,_0x55c8e1){const _0x391753=a41_0x558e,_0x1a1ee9=_0x51cc30();while(!![]){try{const _0x39d370=parseInt(_0x391753(0xde))/0x1+parseInt(_0x391753(0xe4))/0x2+parseInt(_0x391753(0xdc))/0x3+parseInt(_0x391753(0xdb))/0x4+parseInt(_0x391753(0xe2))/0x5*(parseInt(_0x391753(0xdd))/0x6)+-parseInt(_0x391753(0xe9))/0x7+parseInt(_0x391753(0xd8))/0x8*(-parseInt(_0x391753(0xe0))/0x9);if(_0x39d370===_0x55c8e1)break;else _0x1a1ee9['push'](_0x1a1ee9['shift']());}catch(_0xa8d0de){_0x1a1ee9['push'](_0x1a1ee9['shift']());}}}(a41_0x4308,0x4990b));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a41_0x4308(){const _0x13cdf7=['key','read','object','validation','255850ygSCsM','\x20config\x20get\x20--key\x20<key>','Missing\x20key.','2680oMnJtW','str','string','743596vdyvzp','87789ZFUCKp','6cvDSCl','266625QAjleT','appcode','22077mevYiI','Usage:\x20','616705glchjX','app','1109000VUOEkK'];a41_0x4308=function(){return _0x13cdf7;};return a41_0x4308();}function a41_0x558e(_0x103124,_0x3e6985){_0x103124=_0x103124-0xd6;const _0x430888=a41_0x4308();let _0x558e16=_0x430888[_0x103124];return _0x558e16;}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x10bab3){const _0x1025e9=a41_0x558e,_0x5eb52d=_0x10bab3[_0x1025e9(0xd9)]('key');if(!_0x5eb52d)throw CliErrors[_0x1025e9(0xe8)](_0x1025e9(0xd7),_0x1025e9(0xe1)+CLI_BIN_NAME+_0x1025e9(0xd6));const _0x29a6d4=readConfig(),_0x5d9d6e=_0x5eb52d===_0x1025e9(0xe3)?_0x1025e9(0xdf):_0x5eb52d,_0x4a54a5=_0x29a6d4[_0x5d9d6e];if(_0x4a54a5===undefined)throw CliErrors[_0x1025e9(0xe8)]('Key\x20not\x20found:\x20'+_0x5eb52d);return{'ok':!![],'data':typeof _0x4a54a5===_0x1025e9(0xe7)?_0x4a54a5:{[_0x5d9d6e]:_0x4a54a5},'message':typeof _0x4a54a5==='object'?undefined:String(_0x4a54a5)};}export const configGetDefinition={'service':'config','command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a41_0x4fa39f(0xe6),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x4fa39f(0xe5),'type':a41_0x4fa39f(0xda),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x378d72,_0x3afe3b){const _0x42afdd=a42_0x5ca6,_0x179c1b=_0x378d72();while(!![]){try{const _0x4fd087=parseInt(_0x42afdd(0xae))/0x1+parseInt(_0x42afdd(0xac))/0x2+parseInt(_0x42afdd(0xaa))/0x3+-parseInt(_0x42afdd(0xab))/0x4+-parseInt(_0x42afdd(0xb0))/0x5+-parseInt(_0x42afdd(0xad))/0x6+parseInt(_0x42afdd(0xaf))/0x7;if(_0x4fd087===_0x3afe3b)break;else _0x179c1b['push'](_0x179c1b['shift']());}catch(_0x4d66b1){_0x179c1b['push'](_0x179c1b['shift']());}}}(a42_0x18ec,0x63d50));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';function a42_0x5ca6(_0x119db3,_0x30c40d){_0x119db3=_0x119db3-0xaa;const _0x18eceb=a42_0x18ec();let _0x5ca650=_0x18eceb[_0x119db3];return _0x5ca650;}import{configSetDefinition}from'../../commands/config/set.js';function a42_0x18ec(){const _0x17adda=['1933155HZpanp','1730871lEQUBR','2322008jhDHgz','105648SIwIDb','72780fVolJs','404244wYPTdh','2479050HmldCm'];a42_0x18ec=function(){return _0x17adda;};return a42_0x18ec();}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ function a42_0x3942(){const _0xaa4221=['85vhUShz','10cjeedl','409719iEhwuR','944lDdovh','14273fpZLJA','3185963mDbGfR','118446mzbEVZ','470367pkUVtu','230528DUHNTf','4uxeUUC','388076RGJrus'];a42_0x3942=function(){return _0xaa4221;};return a42_0x3942();}(function(_0x35e898,_0x248d13){const _0x717949=a42_0x339e,_0x1bf709=_0x35e898();while(!![]){try{const _0x115ff0=-parseInt(_0x717949(0xd1))/0x1+parseInt(_0x717949(0xcf))/0x2+parseInt(_0x717949(0xd4))/0x3*(parseInt(_0x717949(0xd0))/0x4)+-parseInt(_0x717949(0xd2))/0x5*(-parseInt(_0x717949(0xcd))/0x6)+-parseInt(_0x717949(0xcb))/0x7*(-parseInt(_0x717949(0xd5))/0x8)+parseInt(_0x717949(0xce))/0x9+-parseInt(_0x717949(0xd3))/0xa*(parseInt(_0x717949(0xcc))/0xb);if(_0x115ff0===_0x248d13)break;else _0x1bf709['push'](_0x1bf709['shift']());}catch(_0x56c9d3){_0x1bf709['push'](_0x1bf709['shift']());}}}(a42_0x3942,0x3175e));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a42_0x339e(_0x141396,_0x267667){_0x141396=_0x141396-0xcb;const _0x39424a=a42_0x3942();let _0x339ed2=_0x39424a[_0x141396];return _0x339ed2;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
@@ -1 +1 @@
1
- const a43_0x412eb4=a43_0x3c38;(function(_0x4a9773,_0xed1682){const _0x37c0b4=a43_0x3c38,_0x297bc5=_0x4a9773();while(!![]){try{const _0x210848=parseInt(_0x37c0b4(0x1d5))/0x1*(-parseInt(_0x37c0b4(0x1d4))/0x2)+-parseInt(_0x37c0b4(0x1ca))/0x3+-parseInt(_0x37c0b4(0x1ce))/0x4+parseInt(_0x37c0b4(0x1d0))/0x5*(parseInt(_0x37c0b4(0x1cd))/0x6)+parseInt(_0x37c0b4(0x1c7))/0x7*(-parseInt(_0x37c0b4(0x1d3))/0x8)+parseInt(_0x37c0b4(0x1cb))/0x9*(-parseInt(_0x37c0b4(0x1c9))/0xa)+parseInt(_0x37c0b4(0x1d8))/0xb*(parseInt(_0x37c0b4(0x1d1))/0xc);if(_0x210848===_0xed1682)break;else _0x297bc5['push'](_0x297bc5['shift']());}catch(_0x4d1903){_0x297bc5['push'](_0x297bc5['shift']());}}}(a43_0x2a62,0xba21d));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';function a43_0x3c38(_0x55df42,_0x675a99){_0x55df42=_0x55df42-0x1c7;const _0x2a6252=a43_0x2a62();let _0x3c385e=_0x2a6252[_0x55df42];return _0x3c385e;}async function execute(_0x5487ba){const _0x48a8f2=a43_0x3c38,_0xc86105=_0x5487ba[_0x48a8f2(0x1d6)](_0x48a8f2(0x1cc))?readScopedConfig(_0x48a8f2(0x1cc)):readConfig();return{'ok':!![],'data':_0xc86105};}export const configListDefinition={'service':a43_0x412eb4(0x1d2),'command':a43_0x412eb4(0x1d7),'description':'List\x20all\x20config\x20values','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x412eb4(0x1cc),'type':a43_0x412eb4(0x1c8),'description':a43_0x412eb4(0x1cf),'default':![]}],'execute':execute};function a43_0x2a62(){const _0x497d43=['1247732xGeWjM','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','171335mVcdrm','24ofjfoS','config','8SWJGOo','694yHqODc','347BPGKPp','bool','list','14963883bBhRqO','4626111nZLqwV','boolean','2988330jGotyQ','2829594ecICdi','9NBrabB','global','66Wlpjzr'];a43_0x2a62=function(){return _0x497d43;};return a43_0x2a62();}
1
+ function a43_0x38cb(_0x360c98,_0x36c60b){_0x360c98=_0x360c98-0x13a;const _0x289cb9=a43_0x289c();let _0x38cbcc=_0x289cb9[_0x360c98];return _0x38cbcc;}const a43_0x518a6e=a43_0x38cb;(function(_0x175112,_0x225c3b){const _0x3f6a04=a43_0x38cb,_0x30690c=_0x175112();while(!![]){try{const _0x12998f=parseInt(_0x3f6a04(0x144))/0x1+-parseInt(_0x3f6a04(0x140))/0x2+parseInt(_0x3f6a04(0x13f))/0x3*(parseInt(_0x3f6a04(0x147))/0x4)+-parseInt(_0x3f6a04(0x141))/0x5*(-parseInt(_0x3f6a04(0x149))/0x6)+parseInt(_0x3f6a04(0x13c))/0x7*(-parseInt(_0x3f6a04(0x142))/0x8)+-parseInt(_0x3f6a04(0x13e))/0x9*(parseInt(_0x3f6a04(0x146))/0xa)+parseInt(_0x3f6a04(0x143))/0xb;if(_0x12998f===_0x225c3b)break;else _0x30690c['push'](_0x30690c['shift']());}catch(_0x2c72d3){_0x30690c['push'](_0x30690c['shift']());}}}(a43_0x289c,0xb6c5d));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x31238f){const _0x487c3a=a43_0x38cb,_0x1a45ec=_0x31238f[_0x487c3a(0x148)](_0x487c3a(0x13b))?readScopedConfig(_0x487c3a(0x13b)):readConfig();return{'ok':!![],'data':_0x1a45ec};}export const configListDefinition={'service':a43_0x518a6e(0x13a),'command':a43_0x518a6e(0x13d),'description':a43_0x518a6e(0x145),'risk':a43_0x518a6e(0x14a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'global','type':'boolean','description':'Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','default':![]}],'execute':execute};function a43_0x289c(){const _0x59352e=['108669NiizPM','List\x20all\x20config\x20values','50FJOhvN','510900tMDhPO','bool','48cnSoqi','read','config','global','7sLCtmL','list','509121NAzIDF','3yDbHrq','326986uaFgZr','90635dviWcz','10587832cbTebX','23507484aEOcKm'];a43_0x289c=function(){return _0x59352e;};return a43_0x289c();}
@@ -1 +1 @@
1
- const a44_0x5ef216=a44_0x3af7;function a44_0x41de(){const _0x43cb7f=['validation','\x20set\x20to:\x20','Usage:\x20','join','\x20app\x20add\x20<name>\x20--appcode\x20','1458828SHsYAu','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','4395856lJLnqM','Settable\x20top-level\x20keys:\x20','str','Missing\x20value.','74570MjDozr','includes','Set\x20a\x20config\x20value','Missing\x20key.','Global','string','\x20appcode\x20set\x20to:\x20','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','Config\x20value','key','\x22.\x20Allowed:\x20','value','\x22\x20is\x20not\x20settable.','251868FwdJKU','apps','set','14148HGhCsR','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','2490732GQrmQu','Invalid\x20locale\x20value.','keys','locale','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Top-level\x20key\x20\x22','appcode','object','app','env','config','length','Invalid\x20value\x20for\x20\x22','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','180ihzSAX','write','`,\x20`','Project','1913720yyVnsy','global','boolean','3cLUZst','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)'];a44_0x41de=function(){return _0x43cb7f;};return a44_0x41de();}(function(_0x1e8b38,_0x44aa3e){const _0x20ba36=a44_0x3af7,_0x2a7758=_0x1e8b38();while(!![]){try{const _0x443084=-parseInt(_0x20ba36(0xc6))/0x1+-parseInt(_0x20ba36(0xb9))/0x2*(parseInt(_0x20ba36(0xe0))/0x3)+parseInt(_0x20ba36(0xb5))/0x4+parseInt(_0x20ba36(0xd9))/0x5*(parseInt(_0x20ba36(0xc9))/0x6)+parseInt(_0x20ba36(0xe7))/0x7+-parseInt(_0x20ba36(0xdd))/0x8+-parseInt(_0x20ba36(0xcb))/0x9;if(_0x443084===_0x44aa3e)break;else _0x2a7758['push'](_0x2a7758['shift']());}catch(_0x2d1ce1){_0x2a7758['push'](_0x2a7758['shift']());}}}(a44_0x41de,0x8f584));function a44_0x3af7(_0x41794b,_0x3a98a8){_0x41794b=_0x41794b-0xb4;const _0x41de83=a44_0x41de();let _0x3af79d=_0x41de83[_0x41794b];return _0x3af79d;}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(_0x49a6bc){const _0x57900a=a44_0x3af7,_0x355ea4=_0x49a6bc[_0x57900a(0xb7)](_0x57900a(0xc2)),_0x4f79b6=_0x49a6bc[_0x57900a(0xb7)](_0x57900a(0xc4));if(!_0x355ea4)throw CliErrors[_0x57900a(0xe2)](_0x57900a(0xbc),_0x57900a(0xe4)+CLI_BIN_NAME+_0x57900a(0xb4));if(_0x4f79b6===undefined||_0x4f79b6==='')throw CliErrors['validation'](_0x57900a(0xb8),'Usage:\x20'+CLI_BIN_NAME+_0x57900a(0xb4));if(_0x4f79b6[_0x57900a(0xd6)]>0x1f4)throw CliErrors[_0x57900a(0xe2)](_0x57900a(0xc0));if(!isTopLevelConfigKey(_0x355ea4))throw CliErrors[_0x57900a(0xe2)](_0x57900a(0xd0)+_0x355ea4+_0x57900a(0xc5),_0x57900a(0xb6)+getTopLevelConfigKeySummary());if(_0x355ea4==='riskLevel')throw CliErrors[_0x57900a(0xe2)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x355ea4]&&!CONFIG_ENUM_VALUES[_0x355ea4][_0x57900a(0xba)](_0x4f79b6))throw CliErrors[_0x57900a(0xe2)](_0x57900a(0xd7)+_0x355ea4+_0x57900a(0xc3)+CONFIG_ENUM_VALUES[_0x355ea4][_0x57900a(0xe5)](',\x20'));if(_0x355ea4===_0x57900a(0xce)&&!normalizeLocale(_0x4f79b6))throw CliErrors['validation'](_0x57900a(0xcc),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0x3e1e95={'global':_0x49a6bc['bool'](_0x57900a(0xde))},_0x2aaa6d=resolveWriteScope(_0x3e1e95),_0xac369c=readScopedConfig(_0x2aaa6d);let _0x471d04=_0x355ea4,_0x49835c=_0x4f79b6;_0x355ea4===_0x57900a(0xd3)&&(_0x471d04=_0x57900a(0xd1),delete _0xac369c[_0x57900a(0xd3)]);_0x355ea4===_0x57900a(0xce)&&(_0x49835c=normalizeLocale(_0x4f79b6));if(_0x355ea4===_0x57900a(0xd4)){_0x49835c=normalizeEnv(_0x4f79b6);if(!isProduction(_0x49835c)&&!isDaily(_0x49835c))throw CliErrors[_0x57900a(0xe2)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x355ea4===_0x57900a(0xd1)){const _0x32a7e5=_0xac369c['apps']&&typeof _0xac369c['apps']===_0x57900a(0xd2)?Object[_0x57900a(0xcd)](_0xac369c[_0x57900a(0xc7)]):[];if(_0x32a7e5[_0x57900a(0xd6)]>0x0)throw CliErrors[_0x57900a(0xe2)](_0x57900a(0xca),'Use\x20`'+CLI_BIN_NAME+_0x57900a(0xe6)+_0x49835c+_0x57900a(0xdb)+CLI_BIN_NAME+_0x57900a(0xcf));const _0x163ada=buildCanonicalProjectConfig({..._0xac369c},{'appCodes':[_0x49835c],'env':typeof _0xac369c[_0x57900a(0xd4)]===_0x57900a(0xbe)?_0xac369c['env']:undefined});writeScopedConfig(_0x163ada,_0x2aaa6d);const _0x458609=_0x2aaa6d===_0x57900a(0xde)?_0x57900a(0xbd):_0x57900a(0xdc);return{'ok':!![],'message':'✓\x20'+_0x458609+_0x57900a(0xbf)+_0x49835c+_0x57900a(0xd8)};}_0xac369c[_0x471d04]=_0x49835c,writeScopedConfig(_0xac369c,_0x2aaa6d);const _0x168623=_0x2aaa6d===_0x57900a(0xde)?'Global':_0x57900a(0xdc);return{'ok':!![],'message':'✓\x20'+_0x168623+'\x20'+_0x471d04+_0x57900a(0xe3)+_0x49835c};}export const configSetDefinition={'service':a44_0x5ef216(0xd5),'command':a44_0x5ef216(0xc8),'description':a44_0x5ef216(0xbb),'risk':a44_0x5ef216(0xda),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0x5ef216(0xc2),'type':a44_0x5ef216(0xbe),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x5ef216(0xc4),'type':'string','description':a44_0x5ef216(0xc1),'required':!![]},{'name':a44_0x5ef216(0xde),'type':a44_0x5ef216(0xdf),'description':a44_0x5ef216(0xe1),'default':![]}],'execute':execute};
1
+ const a44_0x49d0f4=a44_0x2173;(function(_0x323772,_0x536498){const _0x402dd3=a44_0x2173,_0x1f12b0=_0x323772();while(!![]){try{const _0x2dddf7=-parseInt(_0x402dd3(0xe2))/0x1+-parseInt(_0x402dd3(0xee))/0x2*(-parseInt(_0x402dd3(0x102))/0x3)+parseInt(_0x402dd3(0x106))/0x4*(parseInt(_0x402dd3(0x103))/0x5)+parseInt(_0x402dd3(0xec))/0x6*(-parseInt(_0x402dd3(0x107))/0x7)+-parseInt(_0x402dd3(0xe7))/0x8*(parseInt(_0x402dd3(0xe1))/0x9)+parseInt(_0x402dd3(0xe9))/0xa*(-parseInt(_0x402dd3(0xf8))/0xb)+parseInt(_0x402dd3(0xeb))/0xc*(parseInt(_0x402dd3(0x109))/0xd);if(_0x2dddf7===_0x536498)break;else _0x1f12b0['push'](_0x1f12b0['shift']());}catch(_0x3af3d0){_0x1f12b0['push'](_0x1f12b0['shift']());}}}(a44_0x46d6,0xeb7e3));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(_0x3446bf){const _0xe59e47=a44_0x2173,_0x5f09cb=_0x3446bf['str'](_0xe59e47(0xf5)),_0x4e8c9f=_0x3446bf['str']('value');if(!_0x5f09cb)throw CliErrors[_0xe59e47(0x10b)](_0xe59e47(0xfc),_0xe59e47(0xe4)+CLI_BIN_NAME+_0xe59e47(0xef));if(_0x4e8c9f===undefined||_0x4e8c9f==='')throw CliErrors[_0xe59e47(0x10b)](_0xe59e47(0x108),_0xe59e47(0xe4)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0x4e8c9f[_0xe59e47(0xff)]>0x1f4)throw CliErrors['validation']('Config\x20value\x20is\x20invalid\x20or\x20too\x20long.');if(!isTopLevelConfigKey(_0x5f09cb))throw CliErrors[_0xe59e47(0x10b)](_0xe59e47(0x111)+_0x5f09cb+_0xe59e47(0xde),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x5f09cb===_0xe59e47(0xe3))throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(CONFIG_ENUM_VALUES[_0x5f09cb]&&!CONFIG_ENUM_VALUES[_0x5f09cb]['includes'](_0x4e8c9f))throw CliErrors[_0xe59e47(0x10b)](_0xe59e47(0xe8)+_0x5f09cb+_0xe59e47(0xfa)+CONFIG_ENUM_VALUES[_0x5f09cb][_0xe59e47(0xf1)](',\x20'));if(_0x5f09cb===_0xe59e47(0xf3)&&!normalizeLocale(_0x4e8c9f))throw CliErrors['validation'](_0xe59e47(0x10f),_0xe59e47(0x105));const _0x465081={'global':_0x3446bf[_0xe59e47(0xf2)](_0xe59e47(0x10c))},_0xb200ba=resolveWriteScope(_0x465081),_0x2fafd=readScopedConfig(_0xb200ba);let _0x16dd23=_0x5f09cb,_0x53b815=_0x4e8c9f;_0x5f09cb===_0xe59e47(0xf7)&&(_0x16dd23=_0xe59e47(0xfd),delete _0x2fafd['app']);_0x5f09cb===_0xe59e47(0xf3)&&(_0x53b815=normalizeLocale(_0x4e8c9f));if(_0x5f09cb===_0xe59e47(0xf9)){_0x53b815=normalizeEnv(_0x4e8c9f);if(!isProduction(_0x53b815)&&!isDaily(_0x53b815))throw CliErrors['validation'](_0xe59e47(0x10d),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x5f09cb===_0xe59e47(0xfd)){const _0x2d6e25=_0x2fafd[_0xe59e47(0x10e)]&&typeof _0x2fafd[_0xe59e47(0x10e)]==='object'?Object[_0xe59e47(0xfb)](_0x2fafd[_0xe59e47(0x10e)]):[];if(_0x2d6e25[_0xe59e47(0xff)]>0x0)throw CliErrors['validation'](_0xe59e47(0x101),_0xe59e47(0xea)+CLI_BIN_NAME+_0xe59e47(0x100)+_0x53b815+_0xe59e47(0xe6)+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x50064a=buildCanonicalProjectConfig({..._0x2fafd},{'appCodes':[_0x53b815],'env':typeof _0x2fafd[_0xe59e47(0xf9)]===_0xe59e47(0xdf)?_0x2fafd[_0xe59e47(0xf9)]:undefined});writeScopedConfig(_0x50064a,_0xb200ba);const _0x2a640f=_0xb200ba===_0xe59e47(0x10c)?_0xe59e47(0xf0):'Project';return{'ok':!![],'message':'✓\x20'+_0x2a640f+_0xe59e47(0xed)+_0x53b815+_0xe59e47(0x104)};}_0x2fafd[_0x16dd23]=_0x53b815,writeScopedConfig(_0x2fafd,_0xb200ba);const _0x57d212=_0xb200ba===_0xe59e47(0x10c)?_0xe59e47(0xf0):_0xe59e47(0x110);return{'ok':!![],'message':'✓\x20'+_0x57d212+'\x20'+_0x16dd23+'\x20set\x20to:\x20'+_0x53b815};}function a44_0x46d6(){const _0x5dd855=['Missing\x20value.','210041hvkAPb','write','validation','global','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','apps','Invalid\x20locale\x20value.','Project','Top-level\x20key\x20\x22','\x22\x20is\x20not\x20settable.','string','config','72UScyvu','1632322gqYeFs','riskLevel','Usage:\x20','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','`,\x20`','1792256mFzJuM','Invalid\x20value\x20for\x20\x22','445960hzFLdH','Use\x20`','2652eBkXHW','18MqiGTC','\x20appcode\x20set\x20to:\x20','2836ohShLG','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Global','join','bool','locale','set','key','Set\x20a\x20config\x20value','app','110dgpOCJ','env','\x22.\x20Allowed:\x20','keys','Missing\x20key.','appcode','value','length','\x20app\x20add\x20<name>\x20--appcode\x20','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','402nbflWV','485930sOmazd','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','48PBBAZc','214256wxVGCh'];a44_0x46d6=function(){return _0x5dd855;};return a44_0x46d6();}function a44_0x2173(_0x42909,_0x355f4a){_0x42909=_0x42909-0xde;const _0x46d62d=a44_0x46d6();let _0x21730c=_0x46d62d[_0x42909];return _0x21730c;}export const configSetDefinition={'service':a44_0x49d0f4(0xe0),'command':a44_0x49d0f4(0xf4),'description':a44_0x49d0f4(0xf6),'risk':a44_0x49d0f4(0x10a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x49d0f4(0xfe),'type':'string','description':'Config\x20value','required':!![]},{'name':a44_0x49d0f4(0x10c),'type':'boolean','description':a44_0x49d0f4(0xe5),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x474e1e,_0x39c70f){var _0x57a3d1=a45_0x4903,_0x20cdc=_0x474e1e();while(!![]){try{var _0x2ade79=-parseInt(_0x57a3d1(0xa5))/0x1+parseInt(_0x57a3d1(0xaa))/0x2*(-parseInt(_0x57a3d1(0xa0))/0x3)+-parseInt(_0x57a3d1(0xa2))/0x4+-parseInt(_0x57a3d1(0xa3))/0x5+parseInt(_0x57a3d1(0xa8))/0x6+parseInt(_0x57a3d1(0xa4))/0x7*(parseInt(_0x57a3d1(0xa7))/0x8)+parseInt(_0x57a3d1(0x9e))/0x9;if(_0x2ade79===_0x39c70f)break;else _0x20cdc['push'](_0x20cdc['shift']());}catch(_0x25ac89){_0x20cdc['push'](_0x20cdc['shift']());}}}(a45_0x2b14,0xaf66d));function a45_0x4903(_0xfb1c90,_0x5f15eb){_0xfb1c90=_0xfb1c90-0x9e;var _0x2b14de=a45_0x2b14();var _0x490305=_0x2b14de[_0xfb1c90];return _0x490305;}function a45_0x2b14(){var _0x40ca67=['466558HYyCch','\x20init`\x20first.','8DUAACa','3361332bRmdOM','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','222wHyhjo','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','validation','19910547dxHuBq','global','21843AnOjQm','project','3256004GUTWvO','4051505lUglID','5914937LufhEi'];a45_0x2b14=function(){return _0x40ca67;};return a45_0x2b14();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x1f6eef){var _0x2fb9bb=a45_0x4903;if(_0x1f6eef['global'])return _0x2fb9bb(0x9f);if(!isInProject())throw CliErrors[_0x2fb9bb(0xac)](_0x2fb9bb(0xab),_0x2fb9bb(0xa9)+CLI_BIN_NAME+_0x2fb9bb(0xa6));return _0x2fb9bb(0xa1);}export function readScopedConfig(_0x4dc1a9){return readConfigFile(resolveWriteConfigPath(_0x4dc1a9));}export function writeScopedConfig(_0x25a4ee,_0xc3e10c){writeConfigFile(resolveWriteConfigPath(_0xc3e10c),_0x25a4ee);}
1
+ (function(_0x414bda,_0x140260){var _0x363583=a45_0x1fde,_0x2ba2c8=_0x414bda();while(!![]){try{var _0xd7f4d7=-parseInt(_0x363583(0xe2))/0x1+parseInt(_0x363583(0xe8))/0x2*(parseInt(_0x363583(0xeb))/0x3)+-parseInt(_0x363583(0xe6))/0x4+-parseInt(_0x363583(0xe3))/0x5+-parseInt(_0x363583(0xe1))/0x6*(-parseInt(_0x363583(0xe7))/0x7)+-parseInt(_0x363583(0xe4))/0x8+parseInt(_0x363583(0xe9))/0x9;if(_0xd7f4d7===_0x140260)break;else _0x2ba2c8['push'](_0x2ba2c8['shift']());}catch(_0x258169){_0x2ba2c8['push'](_0x2ba2c8['shift']());}}}(a45_0x5e3c,0x24fcb));function a45_0x5e3c(){var _0x29a005=['141648RfLKWM','1089020FwaxKX','1241688nMxpLg','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','291756WJjyXJ','615419JESsUI','30PBauZZ','2713383lEOgef','validation','52356IeyFQI','\x20init`\x20first.','global','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','12SJvBRh'];a45_0x5e3c=function(){return _0x29a005;};return a45_0x5e3c();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x1ed9e1){var _0x4d13b9=a45_0x1fde;if(_0x1ed9e1[_0x4d13b9(0xed)])return _0x4d13b9(0xed);if(!isInProject())throw CliErrors[_0x4d13b9(0xea)](_0x4d13b9(0xe0),_0x4d13b9(0xe5)+CLI_BIN_NAME+_0x4d13b9(0xec));return'project';}function a45_0x1fde(_0x2cd19c,_0x2fcb84){_0x2cd19c=_0x2cd19c-0xe0;var _0x5e3cf7=a45_0x5e3c();var _0x1fde81=_0x5e3cf7[_0x2cd19c];return _0x1fde81;}export function readScopedConfig(_0x32a456){return readConfigFile(resolveWriteConfigPath(_0x32a456));}export function writeScopedConfig(_0x4bc95e,_0x4990d3){writeConfigFile(resolveWriteConfigPath(_0x4990d3),_0x4bc95e);}
@@ -1 +1 @@
1
- const a46_0x4db628=a46_0x3582;function a46_0x1bf3(){const _0x41ed48=['5746404AQqpkj','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','1123633jFlGEK','filter','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','803462Nbskap','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','9241925xaFVfd','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','9eNSXNR','11077384UwcJre','29649SBCJit','3623845SSXRFB','196vWPNJy','join','Filter\x20dataset\x20records\x20with\x20query\x20conditions','260KVgFFc','4dXFbjL'];a46_0x1bf3=function(){return _0x41ed48;};return a46_0x1bf3();}function a46_0x3582(_0x3bc490,_0x15bc09){_0x3bc490=_0x3bc490-0x158;const _0x1bf3d6=a46_0x1bf3();let _0x3582cb=_0x1bf3d6[_0x3bc490];return _0x3582cb;}(function(_0x597a5f,_0x132464){const _0x6fae78=a46_0x3582,_0x2afdb3=_0x597a5f();while(!![]){try{const _0x2ce326=parseInt(_0x6fae78(0x15c))/0x1+parseInt(_0x6fae78(0x167))/0x2*(-parseInt(_0x6fae78(0x165))/0x3)+-parseInt(_0x6fae78(0x159))/0x4*(-parseInt(_0x6fae78(0x166))/0x5)+-parseInt(_0x6fae78(0x15a))/0x6+parseInt(_0x6fae78(0x161))/0x7+-parseInt(_0x6fae78(0x164))/0x8*(-parseInt(_0x6fae78(0x163))/0x9)+-parseInt(_0x6fae78(0x158))/0xa*(parseInt(_0x6fae78(0x15f))/0xb);if(_0x2ce326===_0x132464)break;else _0x2afdb3['push'](_0x2afdb3['shift']());}catch(_0x20810f){_0x2afdb3['push'](_0x2afdb3['shift']());}}}(a46_0x1bf3,0xb1bb6));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':'filter','operation':a46_0x4db628(0x15d),'description':a46_0x4db628(0x169),'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':[a46_0x4db628(0x162),a46_0x4db628(0x160),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a46_0x4db628(0x15e),a46_0x4db628(0x15b)][a46_0x4db628(0x168)]('\x0a')});
1
+ const a46_0x2eec68=a46_0x3480;(function(_0x159e32,_0x445f0a){const _0x2d98f7=a46_0x3480,_0x5530ca=_0x159e32();while(!![]){try{const _0x1aac3e=parseInt(_0x2d98f7(0x17b))/0x1*(-parseInt(_0x2d98f7(0x177))/0x2)+-parseInt(_0x2d98f7(0x17c))/0x3+parseInt(_0x2d98f7(0x185))/0x4+parseInt(_0x2d98f7(0x17e))/0x5+-parseInt(_0x2d98f7(0x186))/0x6*(-parseInt(_0x2d98f7(0x184))/0x7)+-parseInt(_0x2d98f7(0x178))/0x8+parseInt(_0x2d98f7(0x176))/0x9*(parseInt(_0x2d98f7(0x183))/0xa);if(_0x1aac3e===_0x445f0a)break;else _0x5530ca['push'](_0x5530ca['shift']());}catch(_0x31f933){_0x5530ca['push'](_0x5530ca['shift']());}}}(a46_0x5aeb,0x92492));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a46_0x2eec68(0x17f),'operation':'filter','description':a46_0x2eec68(0x17d),'paramsRequired':![],'paramsHint':a46_0x2eec68(0x181),'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',a46_0x2eec68(0x175),a46_0x2eec68(0x179),a46_0x2eec68(0x17a),a46_0x2eec68(0x180)][a46_0x2eec68(0x182)]('\x0a')});function a46_0x3480(_0x41ff6f,_0x5b0f4a){_0x41ff6f=_0x41ff6f-0x175;const _0x5aeb91=a46_0x5aeb();let _0x348093=_0x5aeb91[_0x41ff6f];return _0x348093;}function a46_0x5aeb(){const _0x5c1bde=['45148Iyhhov','114fuFhQP','\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]','549BDUutx','1178420HxGjoQ','9086584wFGfKL','\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}]','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','1lychXb','1485651ryinMm','Filter\x20dataset\x20records\x20with\x20query\x20conditions','3128335TQZqLg','filter','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','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','join','267590tuOmWE','202699zzGQpX'];a46_0x5aeb=function(){return _0x5c1bde;};return a46_0x5aeb();}
@@ -1 +1 @@
1
- const a47_0x3668a2=a47_0xf4a5;(function(_0x1968a7,_0x42abaf){const _0x1a2294=a47_0xf4a5,_0xbb830b=_0x1968a7();while(!![]){try{const _0x468bba=parseInt(_0x1a2294(0xd7))/0x1+-parseInt(_0x1a2294(0xcf))/0x2*(parseInt(_0x1a2294(0xd3))/0x3)+parseInt(_0x1a2294(0xd4))/0x4+-parseInt(_0x1a2294(0xce))/0x5*(parseInt(_0x1a2294(0xd6))/0x6)+-parseInt(_0x1a2294(0xd0))/0x7+parseInt(_0x1a2294(0xd5))/0x8+-parseInt(_0x1a2294(0xd1))/0x9;if(_0x468bba===_0x42abaf)break;else _0xbb830b['push'](_0xbb830b['shift']());}catch(_0x2b7ce6){_0xbb830b['push'](_0xbb830b['shift']());}}}(a47_0x3d26,0x5f908));function a47_0xf4a5(_0x5cdb1f,_0x3ba425){_0x5cdb1f=_0x5cdb1f-0xcd;const _0x3d2627=a47_0x3d26();let _0xf4a514=_0x3d2627[_0x5cdb1f];return _0xf4a514;}function a47_0x3d26(){const _0xa2bbf8=['38725zdkDhN','1586GkMwLG','2435923HlODlC','243324rToPSI','Get\x20a\x20single\x20record\x20by\x20ID','1050KrHpyl','1786764nBwUuz','3080224KzhzPe','438AqxkWq','777673xYuDaq','getOne'];a47_0x3d26=function(){return _0xa2bbf8;};return a47_0x3d26();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a47_0x3668a2(0xcd),'operation':a47_0x3668a2(0xcd),'description':a47_0x3668a2(0xd2),'paramsRequired':!![],'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'});
1
+ const a47_0x87698e=a47_0x2c9e;(function(_0x356c9f,_0x490251){const _0x9caf9b=a47_0x2c9e,_0x4b43c1=_0x356c9f();while(!![]){try{const _0x5bf04e=-parseInt(_0x9caf9b(0x1a7))/0x1+parseInt(_0x9caf9b(0x19f))/0x2+parseInt(_0x9caf9b(0x1a5))/0x3*(parseInt(_0x9caf9b(0x1a6))/0x4)+-parseInt(_0x9caf9b(0x1a8))/0x5*(parseInt(_0x9caf9b(0x1ab))/0x6)+parseInt(_0x9caf9b(0x1a0))/0x7+-parseInt(_0x9caf9b(0x1aa))/0x8*(parseInt(_0x9caf9b(0x1a4))/0x9)+parseInt(_0x9caf9b(0x19e))/0xa*(-parseInt(_0x9caf9b(0x1a1))/0xb);if(_0x5bf04e===_0x490251)break;else _0x4b43c1['push'](_0x4b43c1['shift']());}catch(_0xcd27e2){_0x4b43c1['push'](_0x4b43c1['shift']());}}}(a47_0x1a94,0x88558));function a47_0x2c9e(_0x4f4a08,_0x22e82b){_0x4f4a08=_0x4f4a08-0x19e;const _0x1a94b8=a47_0x1a94();let _0x2c9e7=_0x1a94b8[_0x4f4a08];return _0x2c9e7;}function a47_0x1a94(){const _0x59874f=['JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','5157vvDtol','794025KBkEGu','4vgXkgA','171703mPATTV','120605slPyJh','Get\x20a\x20single\x20record\x20by\x20ID','984hQPMtG','42QXDWBC','13290LRSmiX','1403296mdmIKO','2412781yEtzpg','2827AOyRMq','getOne'];a47_0x1a94=function(){return _0x59874f;};return a47_0x1a94();}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a47_0x87698e(0x1a2),'operation':a47_0x87698e(0x1a2),'description':a47_0x87698e(0x1a9),'paramsRequired':!![],'paramsHint':a47_0x87698e(0x1a3)});
@@ -1 +1 @@
1
- function a48_0x4e3b(){const _0x165497=['7280365nCxRuA','4131924qhITPo','2286900eaGEqo','8126816aKWnXx','195629qlgKdl','8040123wCUHbH','270FMibZQ','969944XOWobk','2WTFXMP'];a48_0x4e3b=function(){return _0x165497;};return a48_0x4e3b();}(function(_0x145c0b,_0x537492){const _0x456830=a48_0x3939,_0x3fccff=_0x145c0b();while(!![]){try{const _0x46b574=-parseInt(_0x456830(0x1ca))/0x1*(-parseInt(_0x456830(0x1c9))/0x2)+parseInt(_0x456830(0x1cd))/0x3+-parseInt(_0x456830(0x1cc))/0x4+parseInt(_0x456830(0x1cb))/0x5+-parseInt(_0x456830(0x1c8))/0x6*(parseInt(_0x456830(0x1c6))/0x7)+-parseInt(_0x456830(0x1ce))/0x8+parseInt(_0x456830(0x1c7))/0x9;if(_0x46b574===_0x537492)break;else _0x3fccff['push'](_0x3fccff['shift']());}catch(_0xe5411f){_0x3fccff['push'](_0x3fccff['shift']());}}}(a48_0x4e3b,0xbd430));function a48_0x3939(_0x4e9a90,_0x1f1d88){_0x4e9a90=_0x4e9a90-0x1c6;const _0x4e3b3c=a48_0x4e3b();let _0x3939f1=_0x4e3b3c[_0x4e9a90];return _0x3939f1;}import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
1
+ function a48_0x5641(_0x491659,_0x2ea9ea){_0x491659=_0x491659-0x10a;const _0x27b5b3=a48_0x27b5();let _0x5641e0=_0x27b5b3[_0x491659];return _0x5641e0;}(function(_0x1b6ead,_0x4ca10f){const _0xfa0011=a48_0x5641,_0x474b72=_0x1b6ead();while(!![]){try{const _0x1ad986=-parseInt(_0xfa0011(0x10b))/0x1+-parseInt(_0xfa0011(0x112))/0x2+-parseInt(_0xfa0011(0x10a))/0x3*(-parseInt(_0xfa0011(0x110))/0x4)+parseInt(_0xfa0011(0x111))/0x5*(-parseInt(_0xfa0011(0x10e))/0x6)+parseInt(_0xfa0011(0x113))/0x7+-parseInt(_0xfa0011(0x10f))/0x8*(parseInt(_0xfa0011(0x10d))/0x9)+parseInt(_0xfa0011(0x10c))/0xa;if(_0x1ad986===_0x4ca10f)break;else _0x474b72['push'](_0x474b72['shift']());}catch(_0x321459){_0x474b72['push'](_0x474b72['shift']());}}}(a48_0x27b5,0x6611b));import{dataFilter}from'../../commands/data/filter.js';function a48_0x27b5(){const _0x5c8322=['741511BZDPPt','22373610XgQvFm','567909XuqJze','2949312xzHwEC','88ODCzUT','960sqcvea','5emXfkJ','1418102pfUNES','4426653ReMTLs','2307yUfOqv'];a48_0x27b5=function(){return _0x5c8322;};return a48_0x27b5();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- function a49_0x268e(){const _0x3cd606=['127945BZYdpm','params','8fNnEMl','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','423cBjoSx','code','now','command','284370xLkwtG','str','getOne','3002354yotNHw','data','flagMissing','paramsHint','65UOcPMK','description','12830xZPxit','paramsRequired','3OgfSLm','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','10561796LAdNFx','operation','helpExtra','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','string','13046275SDKAqC','1105688dkcaZd'];a49_0x268e=function(){return _0x3cd606;};return a49_0x268e();}(function(_0x2f852b,_0x3ae065){const _0x38ab09=a49_0x1e67,_0x36f30a=_0x2f852b();while(!![]){try{const _0x5c6421=-parseInt(_0x38ab09(0x137))/0x1+parseInt(_0x38ab09(0x142))/0x2*(-parseInt(_0x38ab09(0x12e))/0x3)+parseInt(_0x38ab09(0x136))/0x4+parseInt(_0x38ab09(0x12a))/0x5*(-parseInt(_0x38ab09(0x13f))/0x6)+-parseInt(_0x38ab09(0x130))/0x7*(-parseInt(_0x38ab09(0x139))/0x8)+parseInt(_0x38ab09(0x13b))/0x9*(parseInt(_0x38ab09(0x12c))/0xa)+parseInt(_0x38ab09(0x135))/0xb;if(_0x5c6421===_0x3ae065)break;else _0x36f30a['push'](_0x36f30a['shift']());}catch(_0x15fe52){_0x36f30a['push'](_0x36f30a['shift']());}}}(a49_0x268e,0xbff8f));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function a49_0x1e67(_0x5bd5b5,_0x2ef861){_0x5bd5b5=_0x5bd5b5-0x12a;const _0x268e56=a49_0x268e();let _0x1e67c9=_0x268e56[_0x5bd5b5];return _0x1e67c9;}function assertGetOneId(_0x3a3d7f){const _0x120060=a49_0x1e67;if(!_0x3a3d7f)throw CliErrors[_0x120060(0x144)](_0x120060(0x138),_0x120060(0x133));const _0x40358d=_0x3a3d7f['id'];if(_0x40358d===undefined||_0x40358d===null||_0x40358d==='')throw CliErrors['validation'](_0x120060(0x13a),_0x120060(0x12f));}function parseCommandParams(_0x4ddc44){return parseJsonParams(_0x4ddc44)??{};}export function buildDataCommand(_0x3408f9){const _0x1b7e53=a49_0x1e67,_0x44ada3='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x1b7e53(0x143),'command':_0x3408f9[_0x1b7e53(0x13e)],'description':_0x3408f9[_0x1b7e53(0x12b)],'risk':'read','defaultOutputFormat':'compress','helpExtra':_0x3408f9[_0x1b7e53(0x132)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x1b7e53(0x134),'description':_0x44ada3},{'name':_0x1b7e53(0x138),'type':'string','description':_0x3408f9[_0x1b7e53(0x145)]}],async 'validate'(_0x2f698e){const _0x16b8cd=_0x1b7e53,_0x4f9fca=_0x2f698e['str'](_0x16b8cd(0x138));if(_0x3408f9[_0x16b8cd(0x12d)]&&!_0x4f9fca)throw CliErrors[_0x16b8cd(0x144)](_0x16b8cd(0x138),_0x3408f9[_0x16b8cd(0x145)]);const _0x49e671=parseJsonParams(_0x4f9fca);_0x3408f9[_0x16b8cd(0x131)]===_0x16b8cd(0x141)&&assertGetOneId(_0x49e671);},async 'execute'(_0x53d6d2){const _0x1d5e60=_0x1b7e53,_0x498806=parseCommandParams(_0x53d6d2[_0x1d5e60(0x140)](_0x1d5e60(0x138))),_0x4666b7=Date[_0x1d5e60(0x13d)](),_0x3f20e1=await executeDatasetDataOperation(_0x53d6d2['appCode'],_0x53d6d2[_0x1d5e60(0x140)](_0x1d5e60(0x13c)),_0x3408f9[_0x1d5e60(0x131)],_0x498806),_0x56b7aa=Date[_0x1d5e60(0x13d)]()-_0x4666b7;return{'ok':!![],'data':{'result':_0x3f20e1,'elapsed':_0x56b7aa},'message':'data\x20'+_0x3408f9['command']+'\x20completed\x20in\x20'+_0x56b7aa+'ms'};}};}
1
+ (function(_0x4ff06a,_0x44c017){const _0x3d0b14=a49_0x18ad,_0x490e6f=_0x4ff06a();while(!![]){try{const _0x23fc8e=parseInt(_0x3d0b14(0x9b))/0x1*(-parseInt(_0x3d0b14(0x94))/0x2)+parseInt(_0x3d0b14(0xa5))/0x3+-parseInt(_0x3d0b14(0x8d))/0x4*(-parseInt(_0x3d0b14(0x99))/0x5)+parseInt(_0x3d0b14(0x9a))/0x6+parseInt(_0x3d0b14(0xa0))/0x7+-parseInt(_0x3d0b14(0x97))/0x8+parseInt(_0x3d0b14(0x8e))/0x9;if(_0x23fc8e===_0x44c017)break;else _0x490e6f['push'](_0x490e6f['shift']());}catch(_0x4ca1d1){_0x490e6f['push'](_0x490e6f['shift']());}}}(a49_0x20f6,0xad0ed));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function a49_0x18ad(_0x45fad8,_0x35d594){_0x45fad8=_0x45fad8-0x8d;const _0x20f606=a49_0x20f6();let _0x18ad3d=_0x20f606[_0x45fad8];return _0x18ad3d;}function assertGetOneId(_0x357123){const _0x5e4c63=a49_0x18ad;if(!_0x357123)throw CliErrors['flagMissing'](_0x5e4c63(0xa3),_0x5e4c63(0x91));const _0x4d11a7=_0x357123['id'];if(_0x4d11a7===undefined||_0x4d11a7===null||_0x4d11a7==='')throw CliErrors[_0x5e4c63(0x90)](_0x5e4c63(0xa1),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function parseCommandParams(_0x12f2b8){return parseJsonParams(_0x12f2b8)??{};}export function buildDataCommand(_0xcb4bf8){const _0x386e48=a49_0x18ad,_0x3b7d6a=_0x386e48(0xa7);return{'service':'data','command':_0xcb4bf8['command'],'description':_0xcb4bf8[_0x386e48(0x9d)],'risk':_0x386e48(0x8f),'defaultOutputFormat':_0x386e48(0xa6),'helpExtra':_0xcb4bf8[_0x386e48(0x93)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x386e48(0x9c),'type':_0x386e48(0xa4),'description':_0x3b7d6a},{'name':_0x386e48(0xa3),'type':_0x386e48(0xa4),'description':_0xcb4bf8['paramsHint']}],async 'validate'(_0x47556e){const _0x24bed0=_0x386e48,_0x3ea6d9=_0x47556e['str'](_0x24bed0(0xa3));if(_0xcb4bf8[_0x24bed0(0xa2)]&&!_0x3ea6d9)throw CliErrors[_0x24bed0(0x95)](_0x24bed0(0xa3),_0xcb4bf8[_0x24bed0(0x98)]);const _0x274973=parseJsonParams(_0x3ea6d9);_0xcb4bf8[_0x24bed0(0x92)]==='getOne'&&assertGetOneId(_0x274973);},async 'execute'(_0x439972){const _0x256c7f=_0x386e48,_0xacf87d=parseCommandParams(_0x439972[_0x256c7f(0x96)](_0x256c7f(0xa3))),_0xae4d35=Date['now'](),_0x352d4d=await executeDatasetDataOperation(_0x439972['appCode'],_0x439972[_0x256c7f(0x96)]('code'),_0xcb4bf8[_0x256c7f(0x92)],_0xacf87d),_0x288805=Date['now']()-_0xae4d35;return{'ok':!![],'data':{'result':_0x352d4d,'elapsed':_0x288805},'message':_0x256c7f(0x9e)+_0xcb4bf8[_0x256c7f(0xa8)]+_0x256c7f(0x9f)+_0x288805+'ms'};}};}function a49_0x20f6(){const _0x59171f=['description','data\x20','\x20completed\x20in\x20','346878ogOfOL','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','paramsRequired','params','string','1116864VSYMyP','compress','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','command','28SWufSk','4049658xZtqsC','read','validation','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','operation','helpExtra','212438VuogKW','flagMissing','str','9231224yidmID','paramsHint','369485JBEIKn','3479304OENzME','1IhRyXx','alias'];a49_0x20f6=function(){return _0x59171f;};return a49_0x20f6();}
@@ -1 +1 @@
1
- const a50_0x31adcf=a50_0x123e;(function(_0x229da6,_0x226cdc){const _0x4a30a9=a50_0x123e,_0x5a675e=_0x229da6();while(!![]){try{const _0x3996ac=-parseInt(_0x4a30a9(0x152))/0x1+parseInt(_0x4a30a9(0x146))/0x2*(-parseInt(_0x4a30a9(0x13b))/0x3)+-parseInt(_0x4a30a9(0x14d))/0x4*(-parseInt(_0x4a30a9(0x12f))/0x5)+-parseInt(_0x4a30a9(0x141))/0x6+parseInt(_0x4a30a9(0x14f))/0x7*(-parseInt(_0x4a30a9(0x151))/0x8)+-parseInt(_0x4a30a9(0x139))/0x9*(parseInt(_0x4a30a9(0x12c))/0xa)+parseInt(_0x4a30a9(0x12e))/0xb;if(_0x3996ac===_0x226cdc)break;else _0x5a675e['push'](_0x5a675e['shift']());}catch(_0x402079){_0x5a675e['push'](_0x5a675e['shift']());}}}(a50_0x514a,0xd2776));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x31adcf(0x14a),'filter':a50_0x31adcf(0x13c),'getOne':a50_0x31adcf(0x13d)};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x31adcf(0x147);function valueToString(_0x52cc6e){const _0x292788=a50_0x31adcf;return _0x52cc6e==null?'':String(_0x52cc6e)[_0x292788(0x138)]();}function getDatasetCode(_0x38ed45){const _0x380404=a50_0x31adcf;return valueToString(_0x38ed45[_0x380404(0x134)]??_0x38ed45[_0x380404(0x149)]??_0x38ed45['dataset']?.[_0x380404(0x133)]);}function getDatasetName(_0xead891){const _0x37107e=a50_0x31adcf;return valueToString(_0xead891[_0x37107e(0x135)]??_0xead891[_0x37107e(0x140)]?.[_0x37107e(0x13e)])||_0x37107e(0x143);}function getDatasetSource(_0x1ac97c){const _0x2f6eae=a50_0x31adcf;return valueToString(_0x1ac97c[_0x2f6eae(0x142)]??_0x1ac97c['dataset']?.['sourceType'])[_0x2f6eae(0x153)]();}function a50_0x514a(){const _0x438e12=['903qCVRhA','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','datasetName','\x20是\x20','dataset','8751828uaMBLA','source','unknown','filter','length','8252fFAxfB','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','object','modelCode','lovrabet','validation','METADATA','754748LSueur','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','13839amcFsd','\x20类型,没有可用于\x20','128mToaXv','1425693lewJlc','toUpperCase','\x20的\x20DB_TABLE\x20数据源上下文。','490PDqMPw','当前数据集\x20\x22','71344405BKpznf','5FwztYb','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','tableName','datasetCode','code','name','UNKNOWN','SQL\x20schema\x20validation','trim','303903lMjbgA','dbtable'];a50_0x514a=function(){return _0x438e12;};return a50_0x514a();}function getDbtableConfig(_0x49b932){const _0x4cc21c=a50_0x31adcf,_0x563c52=_0x49b932['dbtableConfig']??_0x49b932[_0x4cc21c(0x13a)];return _0x563c52&&typeof _0x563c52===_0x4cc21c(0x148)?_0x563c52:{};}function a50_0x123e(_0x501b8f,_0x4901d6){_0x501b8f=_0x501b8f-0x12c;const _0x514a2b=a50_0x514a();let _0x123ec6=_0x514a2b[_0x501b8f];return _0x123ec6;}export function isDbTableBackedDataset(_0x5a0376){const _0x3c8e78=a50_0x31adcf,_0xec32f7=getDatasetSource(_0x5a0376);if(_0xec32f7===_0x3c8e78(0x14c))return![];const _0x22d2fd=getDbtableConfig(_0x5a0376),_0x1976fb=_0x22d2fd['dbId']??_0x22d2fd['id'],_0x115ac7=valueToString(_0x22d2fd[_0x3c8e78(0x132)]??_0x5a0376[_0x3c8e78(0x132)]??_0x5a0376['dataset']?.[_0x3c8e78(0x132)]);return _0x1976fb!==undefined&&_0x1976fb!==null&&_0x115ac7[_0x3c8e78(0x145)]>0x0;}export function filterDbTableBackedDatasets(_0x5dc800){const _0x18b70d=a50_0x31adcf;return _0x5dc800[_0x18b70d(0x144)](_0x42b59e=>isDbTableBackedDataset(_0x42b59e));}export function buildDbTableBackedRequirementMessage(_0x490cc9,_0x3056df=a50_0x31adcf(0x137)){const _0x2d04b2=a50_0x31adcf,_0x216ee6=getDatasetSource(_0x490cc9)||_0x2d04b2(0x136),_0x4f9980=getDatasetName(_0x490cc9),_0x43f655=getDatasetCode(_0x490cc9),_0x3ff613=_0x43f655?'\x20('+_0x43f655+')':'';return[_0x2d04b2(0x12d)+_0x4f9980+'\x22'+_0x3ff613+_0x2d04b2(0x13f)+_0x216ee6+_0x2d04b2(0x150)+_0x3056df+_0x2d04b2(0x154),_0x2d04b2(0x130),_0x2d04b2(0x131),_0x2d04b2(0x14e)+RUNTIME_DATA_ACCESS_COMMANDS[_0x2d04b2(0x144)]+';'+RUNTIME_DATA_ACCESS_COMMANDS['getOne']+'。']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x3acab4,_0x3bce50){const _0x33a48e=a50_0x31adcf;if(!isDbTableBackedDataset(_0x3acab4))throw CliErrors[_0x33a48e(0x14b)](buildDbTableBackedRequirementMessage(_0x3acab4,_0x3bce50));}
1
+ const a50_0x37731a=a50_0x3c0c;(function(_0x36ba08,_0x5a78c0){const _0x4e8727=a50_0x3c0c,_0x3cd354=_0x36ba08();while(!![]){try{const _0x5f1449=parseInt(_0x4e8727(0x1ea))/0x1+-parseInt(_0x4e8727(0x1d0))/0x2+parseInt(_0x4e8727(0x1d7))/0x3+parseInt(_0x4e8727(0x1da))/0x4+parseInt(_0x4e8727(0x1cd))/0x5+parseInt(_0x4e8727(0x1e8))/0x6*(parseInt(_0x4e8727(0x1d8))/0x7)+-parseInt(_0x4e8727(0x1cb))/0x8;if(_0x5f1449===_0x5a78c0)break;else _0x3cd354['push'](_0x3cd354['shift']());}catch(_0x3544b6){_0x3cd354['push'](_0x3cd354['shift']());}}}(a50_0x2ae0,0xcc434));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x37731a(0x1cf),'filter':a50_0x37731a(0x1d4),'getOne':a50_0x37731a(0x1dd)};function a50_0x3c0c(_0x48720e,_0x48cccd){_0x48720e=_0x48720e-0x1c8;const _0x2ae052=a50_0x2ae0();let _0x3c0c1d=_0x2ae052[_0x48720e];return _0x3c0c1d;}export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x37731a(0x1d6);function valueToString(_0x15159a){const _0x5f1824=a50_0x37731a;return _0x15159a==null?'':String(_0x15159a)[_0x5f1824(0x1ee)]();}function getDatasetCode(_0x485677){const _0x5797d3=a50_0x37731a;return valueToString(_0x485677['code']??_0x485677[_0x5797d3(0x1ca)]??_0x485677['dataset']?.[_0x5797d3(0x1d9)]);}function getDatasetName(_0x2f0eaf){const _0x19a32d=a50_0x37731a;return valueToString(_0x2f0eaf[_0x19a32d(0x1c8)]??_0x2f0eaf[_0x19a32d(0x1df)]?.[_0x19a32d(0x1cc)])||_0x19a32d(0x1e4);}function getDatasetSource(_0x340af7){const _0x4f3859=a50_0x37731a;return valueToString(_0x340af7['source']??_0x340af7['dataset']?.[_0x4f3859(0x1ed)])[_0x4f3859(0x1e9)]();}function getDbtableConfig(_0x199967){const _0x47c164=a50_0x37731a,_0x1025fd=_0x199967[_0x47c164(0x1e1)]??_0x199967[_0x47c164(0x1dc)];return _0x1025fd&&typeof _0x1025fd==='object'?_0x1025fd:{};}export function isDbTableBackedDataset(_0x111feb){const _0x7abed0=a50_0x37731a,_0x81976d=getDatasetSource(_0x111feb);if(_0x81976d===_0x7abed0(0x1e3))return![];const _0x37563a=getDbtableConfig(_0x111feb),_0x474523=_0x37563a[_0x7abed0(0x1e2)]??_0x37563a['id'],_0x460544=valueToString(_0x37563a[_0x7abed0(0x1e6)]??_0x111feb['tableName']??_0x111feb[_0x7abed0(0x1df)]?.['tableName']);return _0x474523!==undefined&&_0x474523!==null&&_0x460544[_0x7abed0(0x1d1)]>0x0;}export function filterDbTableBackedDatasets(_0x291937){const _0x271bc8=a50_0x37731a;return _0x291937[_0x271bc8(0x1e5)](_0x189e0b=>isDbTableBackedDataset(_0x189e0b));}function a50_0x2ae0(){const _0x4bacc3=['19028192ptSJlo','datasetName','6003015WwYdmS','getOne','lovrabet','1706826GbShAt','length','\x20类型,没有可用于\x20','\x20是\x20','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','join','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','4810632wmWLrX','238966DbApPl','datasetCode','4152528josoCz','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','dbtable','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','\x20的\x20DB_TABLE\x20数据源上下文。','dataset','当前数据集\x20\x22','dbtableConfig','dbId','METADATA','unknown','filter','tableName','UNKNOWN','24oEyZGz','toUpperCase','89766rYMvzI','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','SQL\x20schema\x20validation','sourceType','trim','name','请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','modelCode'];a50_0x2ae0=function(){return _0x4bacc3;};return a50_0x2ae0();}export function buildDbTableBackedRequirementMessage(_0x301e02,_0xab54bd=a50_0x37731a(0x1ec)){const _0x355eea=a50_0x37731a,_0x165114=getDatasetSource(_0x301e02)||_0x355eea(0x1e7),_0x17a6b6=getDatasetName(_0x301e02),_0x41aea4=getDatasetCode(_0x301e02),_0x51d8f7=_0x41aea4?'\x20('+_0x41aea4+')':'';return[_0x355eea(0x1e0)+_0x17a6b6+'\x22'+_0x51d8f7+_0x355eea(0x1d3)+_0x165114+_0x355eea(0x1d2)+_0xab54bd+_0x355eea(0x1de),_0x355eea(0x1db),_0x355eea(0x1c9),_0x355eea(0x1eb)+RUNTIME_DATA_ACCESS_COMMANDS[_0x355eea(0x1e5)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x355eea(0x1ce)]+'。'][_0x355eea(0x1d5)]('\x20');}export function assertDatasetIsDbTableBacked(_0x42cf9f,_0x3b5ada){if(!isDbTableBackedDataset(_0x42cf9f))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x42cf9f,_0x3b5ada));}