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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) 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/shared/compare-table.js +1 -1
  87. package/lib/commands/menu/shared/index.js +1 -1
  88. package/lib/commands/menu/shared/inquirer.js +1 -1
  89. package/lib/commands/menu/shared/local-pages.js +1 -1
  90. package/lib/commands/menu/shared/logic.js +1 -1
  91. package/lib/commands/menu/shared/service.js +1 -1
  92. package/lib/commands/menu/shared/sync-core.js +1 -1
  93. package/lib/commands/menu/shared/update-core.js +1 -1
  94. package/lib/commands/menu/shared/valid-url.js +1 -1
  95. package/lib/commands/menu/sync.js +1 -1
  96. package/lib/commands/menu/update.js +1 -1
  97. package/lib/commands/page/generate-start.js +1 -1
  98. package/lib/commands/page/generate-status.js +1 -1
  99. package/lib/commands/page/index.js +1 -1
  100. package/lib/commands/page/pull.js +1 -1
  101. package/lib/commands/page/push.js +1 -1
  102. package/lib/commands/page/relation-audit.js +1 -1
  103. package/lib/commands/page/shared.js +1 -1
  104. package/lib/commands/page/standard-page-status.js +1 -1
  105. package/lib/commands/page/sync.js +1 -1
  106. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  107. package/lib/commands/project/create/format-elapsed.js +1 -1
  108. package/lib/commands/project/create/main.js +1 -1
  109. package/lib/commands/project/create/non-interactive.js +1 -1
  110. package/lib/commands/project/create/project-template-path.js +1 -1
  111. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  112. package/lib/commands/project/create/use-format-code.js +1 -1
  113. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  114. package/lib/commands/project/index.js +1 -1
  115. package/lib/commands/project/init.js +1 -1
  116. package/lib/commands/project/upgrade.js +1 -1
  117. package/lib/commands/registry.js +1 -1
  118. package/lib/commands/run/index.js +1 -1
  119. package/lib/commands/schema.js +1 -1
  120. package/lib/commands/skill/index.js +1 -1
  121. package/lib/commands/sql/create.js +1 -1
  122. package/lib/commands/sql/delete.js +1 -1
  123. package/lib/commands/sql/detail.js +1 -1
  124. package/lib/commands/sql/exec.js +1 -1
  125. package/lib/commands/sql/index.js +1 -1
  126. package/lib/commands/sql/list.js +1 -1
  127. package/lib/commands/sql/pull.js +1 -1
  128. package/lib/commands/sql/push.js +1 -1
  129. package/lib/commands/sql/save.js +1 -1
  130. package/lib/commands/sql/shared.js +1 -1
  131. package/lib/commands/sql/status.js +1 -1
  132. package/lib/commands/sql/validate.js +1 -1
  133. package/lib/config/schema.js +1 -1
  134. package/lib/constant/cdn.js +1 -1
  135. package/lib/constant/cli.js +1 -1
  136. package/lib/constant/defaults.js +1 -1
  137. package/lib/constant/domain.js +1 -1
  138. package/lib/constant/env.js +1 -1
  139. package/lib/constant/output.js +1 -1
  140. package/lib/constant/paths.js +1 -1
  141. package/lib/constant/risk.js +1 -1
  142. package/lib/context.js +1 -1
  143. package/lib/core/alias-resolver.js +1 -1
  144. package/lib/core/api-client.js +1 -1
  145. package/lib/core/bff/config.js +1 -1
  146. package/lib/core/bff/file-system.js +1 -1
  147. package/lib/core/bff/hash.js +1 -1
  148. package/lib/core/bff/lock.js +1 -1
  149. package/lib/core/bff/utils.js +1 -1
  150. package/lib/core/db-resolver.js +1 -1
  151. package/lib/core/page/file-system.js +1 -1
  152. package/lib/core/page/hash.js +1 -1
  153. package/lib/core/page/lock.js +1 -1
  154. package/lib/core/sql-sync/config.js +1 -1
  155. package/lib/core/sql-sync/file-system.js +1 -1
  156. package/lib/core/sql-sync/hash.js +1 -1
  157. package/lib/core/sql-sync/lock.js +1 -1
  158. package/lib/core/sql-sync/utils.js +1 -1
  159. package/lib/core/sql-validator.js +1 -1
  160. package/lib/errors.js +1 -1
  161. package/lib/framework/build-all-flags.js +1 -1
  162. package/lib/framework/flags.js +1 -1
  163. package/lib/framework/help.js +1 -1
  164. package/lib/framework/index.js +1 -1
  165. package/lib/framework/output.js +1 -1
  166. package/lib/framework/response.js +1 -1
  167. package/lib/framework/runner-alias.js +1 -1
  168. package/lib/framework/runner.js +1 -1
  169. package/lib/framework/schema-export.js +1 -1
  170. package/lib/framework/types.js +1 -1
  171. package/lib/generated/build-info.js +1 -1
  172. package/lib/help.js +1 -1
  173. package/lib/skills/main.js +1 -1
  174. package/lib/skills/npx-skills-add.js +1 -1
  175. package/lib/telemetry/cli-command-trace.js +1 -1
  176. package/lib/telemetry/cli-help-trace.js +1 -1
  177. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  178. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  179. package/lib/telemetry/send-cli-trace-log.js +1 -1
  180. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  181. package/lib/utils/ai_config.js +1 -1
  182. package/lib/utils/apply-jq-filter.js +1 -1
  183. package/lib/utils/cdn-config.js +1 -1
  184. package/lib/utils/check-sdk-version.js +1 -1
  185. package/lib/utils/cli-version-check.js +1 -1
  186. package/lib/utils/cli-version-policy.js +1 -1
  187. package/lib/utils/config.js +1 -1
  188. package/lib/utils/copy-directory.js +1 -1
  189. package/lib/utils/entity-with-id.js +1 -1
  190. package/lib/utils/file-utils.js +1 -1
  191. package/lib/utils/guides-cdn.js +1 -1
  192. package/lib/utils/http-client.js +1 -1
  193. package/lib/utils/is-non-interactive.js +1 -1
  194. package/lib/utils/logger.js +1 -1
  195. package/lib/utils/params.js +1 -1
  196. package/lib/utils/platform.js +1 -1
  197. package/lib/utils/rules-cdn.js +1 -1
  198. package/lib/utils/sleep.js +1 -1
  199. package/lib/utils/template-replacer.js +1 -1
  200. package/lib/utils/update-notice.js +1 -1
  201. package/lib/utils/version.js +1 -1
  202. package/lib/utils/with-active-cookie.js +1 -1
  203. package/lib/utils/write-cli-side-channel.js +1 -1
  204. package/package.json +1 -1
@@ -1 +1 @@
1
- const a32_0x371642=a32_0x1199;(function(_0x99e2c8,_0x23d8ea){const _0x3655d0=a32_0x1199,_0x381e1a=_0x99e2c8();while(!![]){try{const _0xa4afd9=-parseInt(_0x3655d0(0xe1))/0x1+-parseInt(_0x3655d0(0x107))/0x2*(parseInt(_0x3655d0(0xfe))/0x3)+-parseInt(_0x3655d0(0xcf))/0x4*(parseInt(_0x3655d0(0x116))/0x5)+parseInt(_0x3655d0(0xde))/0x6+-parseInt(_0x3655d0(0xd8))/0x7*(-parseInt(_0x3655d0(0x11a))/0x8)+parseInt(_0x3655d0(0xda))/0x9*(parseInt(_0x3655d0(0x109))/0xa)+parseInt(_0x3655d0(0xf5))/0xb;if(_0xa4afd9===_0x23d8ea)break;else _0x381e1a['push'](_0x381e1a['shift']());}catch(_0x501502){_0x381e1a['push'](_0x381e1a['shift']());}}}(a32_0x1965,0xc9dd1));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';function a32_0x1199(_0x3b8faa,_0x25bc33){_0x3b8faa=_0x3b8faa-0xce;const _0x196521=a32_0x1965();let _0x1199fd=_0x196521[_0x3b8faa];return _0x1199fd;}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';import{assertDatasetSupportsLocalDevelopment}from'../../commands/dataset/capability.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a32_0x371642(0xe6),'command':a32_0x371642(0xe2),'description':a32_0x371642(0x117),'risk':a32_0x371642(0xe9),'flags':[{'name':a32_0x371642(0xeb),'type':'string','description':'Push\x20only\x20this\x20script\x20type','enum':[a32_0x371642(0x11d),'ENDPOINT','HOOK']},{'name':a32_0x371642(0xec),'type':a32_0x371642(0x114),'description':a32_0x371642(0xe4)},{'name':a32_0x371642(0x106),'type':a32_0x371642(0x115),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x2b6775){const _0x5c95be=a32_0x371642,_0x84fa1e=loadBffProjectConfig(_0x2b6775[_0x5c95be(0xe5)]),_0x1c4575=await readBffLockFile(_0x84fa1e[_0x5c95be(0xf1)]),{appLock:_0x1ffc48}=ensureLockScope(_0x1c4575??createEmptyBffLock(),_0x2b6775[_0x5c95be(0xe5)],_0x84fa1e['scriptsRoot'],_0x5c95be(0xe2)),_0x42d389=await getTargetFunctions(_0x84fa1e,_0x2b6775),_0x5133c1=_0x2b6775[_0x5c95be(0xff)](_0x5c95be(0x106)),_0x4b4809=[];for(const _0x114d55 of _0x42d389){const _0x5d7cbb=await computeFileHash(_0x114d55[_0x5c95be(0x100)]),_0x460a77=_0x1ffc48['functions'][_0x114d55['lockKey']],_0x28028a=!!_0x460a77&&_0x460a77['hash']===_0x5d7cbb;_0x4b4809[_0x5c95be(0xe2)]({'lockKey':_0x114d55[_0x5c95be(0x121)],'filePath':_0x114d55[_0x5c95be(0x100)],'remoteId':_0x460a77?.[_0x5c95be(0x118)]??null,'mode':_0x460a77?.['remoteId']?_0x5c95be(0xd7):_0x5c95be(0xf2),'status':!_0x5133c1&&_0x28028a?_0x5c95be(0xfd):'would_push'});}return{'method':_0x5c95be(0xee),'url':_0x5c95be(0xdd),'body':{'appCode':_0x2b6775['appCode'],'force':_0x5133c1,'files':_0x4b4809,'cacheClearAtRuntime':_0x4b4809['some'](_0x21d6e5=>_0x21d6e5[_0x5c95be(0xd5)]===_0x5c95be(0xfc)),'cacheClearAtRuntimeTimes':_0x4b4809['some'](_0x6d303=>_0x6d303[_0x5c95be(0xd5)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x5c95be(0x122)+_0x4b4809[_0x5c95be(0xd1)]+_0x5c95be(0x10f)};},async 'execute'(_0x26152a){const _0x30de71=a32_0x371642,_0x2c7b64=loadBffProjectConfig(_0x26152a['appCode']),_0x3c66e6=await readBffLockFile(_0x2c7b64[_0x30de71(0xf1)]),{lockData:_0x44f378,appLock:_0x1ac4fa}=ensureLockScope(_0x3c66e6??createEmptyBffLock(),_0x26152a[_0x30de71(0xe5)],_0x2c7b64[_0x30de71(0x11b)],_0x30de71(0xe2)),_0x5eccd=await getTargetFunctions(_0x2c7b64,_0x26152a);if(_0x5eccd['length']===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x30de71(0x110)};const _0x4a01c9=_0x26152a[_0x30de71(0xff)]('force'),_0x23e7be=JSON[_0x30de71(0xf6)](JSON['stringify'](_0x44f378)),_0x405669=_0x23e7be['apps'][_0x26152a[_0x30de71(0xe5)]];if(!_0x405669)throw new Error(_0x30de71(0x120)+_0x26152a['appCode']+_0x30de71(0xf9));const _0x4a7f05=await buildHookMaps(_0x26152a['appCode'],_0x26152a[_0x30de71(0xd6)],_0x5eccd,_0x405669),_0x9442ed=[],_0x501278=[],_0x2f79fa=[];for(const _0x519a70 of _0x5eccd){const _0x4fe2b4=await computeFileHash(_0x519a70[_0x30de71(0x100)]),_0x505269=_0x405669['functions'][_0x519a70['lockKey']];if(!_0x4a01c9&&_0x505269&&_0x505269[_0x30de71(0xd2)]===_0x4fe2b4){_0x501278[_0x30de71(0xe2)]({'lockKey':_0x519a70[_0x30de71(0x121)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x26152a[_0x30de71(0xe5)],_0x519a70,_0x405669,_0x4a7f05);const _0x2b58a4=_0x405669['functions'][_0x519a70[_0x30de71(0x121)]];_0x9442ed[_0x30de71(0xe2)]({'lockKey':_0x519a70[_0x30de71(0x121)],'remoteId':_0x2b58a4?.[_0x30de71(0x118)]??0x0});}catch(_0x3793b5){_0x2f79fa['push']({'lockKey':_0x519a70[_0x30de71(0x121)],'error':_0x3793b5 instanceof Error?_0x3793b5['message']:String(_0x3793b5)});}}_0x405669[_0x30de71(0xed)]=new Date()[_0x30de71(0xf3)](),await writeBffLockFile(_0x2c7b64['lockFilePath'],_0x23e7be),await waitForUploadedLockEntries(_0x2c7b64[_0x30de71(0xf1)],_0x26152a[_0x30de71(0xe5)],_0x9442ed[_0x30de71(0xfb)](_0xf2a87c=>_0xf2a87c[_0x30de71(0x121)]));let _0x2c3299={'attempted':![],'cleared':![]};if(_0x9442ed[_0x30de71(0xd1)]>0x0)try{let _0x2ada13='';for(let _0x435221=0x0;_0x435221<CACHE_CLEAR_ATTEMPTS;_0x435221+=0x1){_0x2ada13=await clearBffScriptCache(),_0x435221<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x2c3299={'attempted':!![],'cleared':!![],'message':_0x2ada13||_0x30de71(0x113)};}catch(_0x2ea9cc){_0x2c3299={'attempted':!![],'cleared':![],'error':_0x2ea9cc instanceof Error?_0x2ea9cc[_0x30de71(0xd3)]:String(_0x2ea9cc)};}const _0xdb939e=_0x2f79fa[_0x30de71(0xd1)]===0x0&&(_0x2c3299[_0x30de71(0xef)]?_0x2c3299['cleared']:!![]),_0x2b2ec4=_0x2c3299[_0x30de71(0xef)]?_0x2c3299[_0x30de71(0xdc)]?_0x30de71(0xce):_0x30de71(0xd0):_0x30de71(0xdf);return{'ok':_0xdb939e,'data':{'uploaded':_0x9442ed,'skipped':_0x501278,'failed':_0x2f79fa,'cacheClear':_0x2c3299},'message':_0x30de71(0x102)+_0x9442ed[_0x30de71(0xd1)]+_0x30de71(0x112)+_0x501278[_0x30de71(0xd1)]+_0x30de71(0xf0)+_0x2f79fa[_0x30de71(0xd1)]+'\x20failed,\x20'+_0x2b2ec4};}};function a32_0x1965(){const _0x25258a=['hash','message','alias','status','apiDir','update','14XHBqcm','get','10783926qfnQsD','str','cleared','/api/management/library/scripts/save','5210850QJXKSH','runtime\x20cache\x20not\x20needed','description','823702fSXpes','push','has','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','appCode','bff','every','functionNode','high-risk-write','script','type','name','lastSync','POST','attempted','\x20skipped,\x20','lockFilePath','create','toISOString','validation','6007155BXRVaQ','parse','HOOK','Run\x20`','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','map','would_push','unchanged','2223KTLcGI','bool','filePath','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','Push\x20complete:\x20','code','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','operationType','force','2668RLraQr','Local\x20function\x20not\x20found:\x20','10RfucmO','join','datasetCode','version','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','values','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','No\x20local\x20BFF\x20functions\x20found.','\x22.\x20','\x20uploaded,\x20','Runtime\x20script\x20cache\x20cleared.','string','boolean','1635895YctrQV','Push\x20local\x20BFF\x20scripts\x20to\x20remote','remoteId',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','1413656slzmmg','scriptsRoot','aliasToDatasetCode','COMMON','BFF\x20HOOK\x20','functions','Lock\x20scope\x20for\x20app\x20\x22','lockKey','Would\x20inspect\x20','runtime\x20cache\x20cleared','4eARPNA','runtime\x20cache\x20clear\x20failed','length'];a32_0x1965=function(){return _0x25258a;};return a32_0x1965();}async function getTargetFunctions(_0x20e3ec,_0x3177d3){const _0x33c299=a32_0x371642,_0x19b830=_0x3177d3[_0x33c299(0xdb)]('type'),_0x532e28=_0x3177d3[_0x33c299(0xdb)](_0x33c299(0xec)),_0x3acc8a=normalizeBffType(_0x19b830)??undefined;if(_0x532e28&&!_0x3acc8a)throw CliErrors[_0x33c299(0xf4)](_0x33c299(0x10d));const _0xb00551=await scanLocalBffFunctions(_0x20e3ec,_0x3acc8a);if(_0x532e28){const _0x1a85b1=_0xb00551['filter'](_0xed65d2=>_0xed65d2[_0x33c299(0xec)]===_0x532e28);if(_0x1a85b1[_0x33c299(0xd1)]===0x0)throw CliErrors[_0x33c299(0xf4)](_0x33c299(0x108)+_0x3acc8a+'/'+_0x532e28);return _0x1a85b1;}return _0xb00551;}async function buildHookMaps(_0x4fe2ce,_0x4bcd7f,_0x1a4eb7,_0x34809c){const _0x3b2941=a32_0x371642,_0x1c10b9=_0x1a4eb7['some'](_0x38fd5e=>_0x38fd5e[_0x3b2941(0xeb)]===_0x3b2941(0xf7));if(!_0x1c10b9)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x33702b=loadAliasMap(_0x4bcd7f,undefined,resolveApiFilePath(_0x4bcd7f,_0x4fe2ce)),_0x4b6452=new Map(_0x33702b[_0x3b2941(0xfb)](_0xcaf857=>[_0xcaf857[_0x3b2941(0xd4)],_0xcaf857['datasetCode']]));for(const _0x3aa95f of Object[_0x3b2941(0x10e)](_0x34809c[_0x3b2941(0x11f)])){_0x3aa95f[_0x3b2941(0xd4)]&&_0x3aa95f['datasetCode']&&!_0x4b6452[_0x3b2941(0xe3)](_0x3aa95f['alias'])&&_0x4b6452['set'](_0x3aa95f[_0x3b2941(0xd4)],_0x3aa95f[_0x3b2941(0x10b)]);}const _0x43b526=await listDatasets(_0x4fe2ce),_0x5e8ba7=new Map(_0x43b526[_0x3b2941(0xfb)](_0xec513e=>[_0xec513e[_0x3b2941(0x103)],_0xec513e]));return{'aliasToDatasetCode':_0x4b6452,'datasetCodeToDataset':_0x5e8ba7};}async function uploadSingleFunction(_0x54e20e,_0x231248,_0x48e807,_0x56e171){const _0x2a176c=a32_0x371642,_0x20c833=await readFile(_0x231248[_0x2a176c(0x100)],'utf8'),_0x31494a=await computeFileHash(_0x231248[_0x2a176c(0x100)]),_0x1a8a84=_0x48e807[_0x2a176c(0x11f)][_0x231248['lockKey']];if(_0x1a8a84?.[_0x2a176c(0x118)]&&_0x1a8a84[_0x2a176c(0x10c)]==null)throw CliErrors[_0x2a176c(0xf4)](_0x231248[_0x2a176c(0x121)]+_0x2a176c(0x119));let _0x38489f=extractScriptDescription(_0x20c833);if(!_0x38489f&&_0x1a8a84?.[_0x2a176c(0x118)]){const _0x31a404=await getBffScriptInfo(_0x1a8a84['remoteId']);_0x38489f=_0x31a404[_0x2a176c(0xe0)]||undefined;}const _0x51b09c={'appCode':_0x54e20e,'functionName':_0x231248['name'],'scriptType':_0x231248[_0x2a176c(0xeb)],'scriptContent':_0x20c833};if(_0x1a8a84?.[_0x2a176c(0x118)])_0x51b09c['id']=_0x1a8a84[_0x2a176c(0x118)];if(_0x1a8a84?.['version']!=null)_0x51b09c[_0x2a176c(0x10c)]=_0x1a8a84[_0x2a176c(0x10c)];if(_0x38489f)_0x51b09c[_0x2a176c(0xe0)]=_0x38489f;if(_0x231248['type']===_0x2a176c(0xf7)){const _0x5a3dc1=_0x231248[_0x2a176c(0xd4)];if(!_0x5a3dc1||!_0x231248[_0x2a176c(0x105)]||!_0x231248['functionNode'])throw CliErrors['validation']('Incomplete\x20HOOK\x20path:\x20'+_0x231248[_0x2a176c(0x121)]);const _0x48eb5d=_0x56e171[_0x2a176c(0x11c)]['get'](_0x5a3dc1)??_0x1a8a84?.[_0x2a176c(0x10b)]??_0x5a3dc1,_0x464348=_0x56e171['datasetCodeToDataset']['get'](_0x48eb5d);if(!_0x464348)throw CliErrors[_0x2a176c(0xf4)]('Cannot\x20resolve\x20dataset\x20for\x20\x22'+_0x5a3dc1+_0x2a176c(0x111)+(_0x2a176c(0xf8)+CLI_BIN_NAME+_0x2a176c(0x104)));assertDatasetSupportsLocalDevelopment(_0x464348,_0x2a176c(0x11e)+_0x231248['lockKey']),_0x51b09c['datasetId']=_0x464348['id'],_0x51b09c[_0x2a176c(0x105)]=_0x231248[_0x2a176c(0x105)],_0x51b09c['functionNode']=_0x231248[_0x2a176c(0xe8)];}const _0x190314=await saveBffScript(_0x51b09c),_0x4fbc3c=_0x190314['id'],_0x163e61=_0x190314[_0x2a176c(0xea)]??await getBffScriptInfo(_0x4fbc3c),_0xca468={'hash':_0x31494a,'remoteId':_0x4fbc3c,'version':_0x163e61[_0x2a176c(0x10c)]};if(_0x231248['type']==='HOOK'){const _0x3c3e60=_0x231248[_0x2a176c(0xd4)],_0x291ff3=_0x56e171[_0x2a176c(0x11c)][_0x2a176c(0xd9)](_0x3c3e60)??_0x1a8a84?.[_0x2a176c(0x10b)]??_0x3c3e60;_0x56e171[_0x2a176c(0x11c)][_0x2a176c(0xe3)](_0x3c3e60)?_0xca468[_0x2a176c(0xd4)]=_0x3c3e60:_0xca468['alias']=_0x1a8a84?.[_0x2a176c(0xd4)],_0xca468['datasetCode']=_0x291ff3,_0xca468[_0x2a176c(0x105)]=_0x231248[_0x2a176c(0x105)],_0xca468[_0x2a176c(0xe8)]=_0x231248['functionNode'];}_0x48e807['functions'][_0x231248[_0x2a176c(0x121)]]=_0xca468;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x47983b,_0x3ee396,_0x256bec){const _0x2649cc=a32_0x371642;if(_0x256bec[_0x2649cc(0xd1)]===0x0)return;for(let _0x1238c2=0x0;_0x1238c2<LOCK_SETTLE_RETRY_COUNT;_0x1238c2+=0x1){const _0x108b77=await readBffLockFile(_0x47983b),_0x1c79bc=_0x108b77?.[_0x2649cc(0xfa)]?.[_0x3ee396]?.[_0x2649cc(0x11f)]??{},_0x270d6b=_0x256bec[_0x2649cc(0xe7)](_0x158157=>!!_0x1c79bc[_0x158157]?.[_0x2649cc(0x118)]);if(_0x270d6b)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x2649cc(0x101)+_0x256bec[_0x2649cc(0x10a)](',\x20')+'.');}
1
+ function a32_0x5d5b(){const _0x367621=['filePath','7vKjqBY','Lock\x20scope\x20for\x20app\x20\x22','alias',':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.','attempted','values','2498274BrfXvW','type','has','scriptsRoot','push','1312900FKkSgj','datasetCode','Run\x20`','appCode','status','cleared','name','toISOString','datasetCodeToDataset','filter','set','\x22.\x20','lockKey','datasetId','unchanged','bool','40ScLHND','functionNode','\x22\x20not\x20found\x20after\x20ensureLockScope.','apps','runtime\x20cache\x20clear\x20failed','Would\x20inspect\x20','every','join','Push\x20local\x20BFF\x20scripts\x20to\x20remote','boolean','parse','aliasToDatasetCode','would_push','4575373XRtnGN','350oqgmgZ','bff','get','HOOK','/api/management/library/scripts/save','ENDPOINT','remoteId','validation','message','Cannot\x20resolve\x20dataset\x20for\x20\x22','version','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','1077774DmfURU','2350XvBkPn','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','POST','Push\x20only\x20this\x20script\x20type','Local\x20function\x20not\x20found:\x20','557178GbBUMD','force','update','lastSync','1226216pTcuDE','runtime\x20cache\x20not\x20needed','string','str','functions','Force\x20push\x20ignoring\x20hash\x20protection','operationType','some','description','\x20uploaded,\x20','\x20skipped,\x20','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','\x20failed,\x20','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','length','stringify','runtime\x20cache\x20cleared','lockFilePath','hash','5WHNGSC'];a32_0x5d5b=function(){return _0x367621;};return a32_0x5d5b();}const a32_0x1df605=a32_0xda43;(function(_0x18ecad,_0x23475c){const _0x5a1869=a32_0xda43,_0x43cea4=_0x18ecad();while(!![]){try{const _0x2068c9=-parseInt(_0x5a1869(0x18e))/0x1*(parseInt(_0x5a1869(0x147))/0x2)+-parseInt(_0x5a1869(0x146))/0x3+-parseInt(_0x5a1869(0x170))/0x4+-parseInt(_0x5a1869(0x163))/0x5*(-parseInt(_0x5a1869(0x14c))/0x6)+-parseInt(_0x5a1869(0x165))/0x7*(parseInt(_0x5a1869(0x150))/0x8)+-parseInt(_0x5a1869(0x16b))/0x9+-parseInt(_0x5a1869(0x180))/0xa*(-parseInt(_0x5a1869(0x18d))/0xb);if(_0x2068c9===_0x23475c)break;else _0x43cea4['push'](_0x43cea4['shift']());}catch(_0x28ad22){_0x43cea4['push'](_0x43cea4['shift']());}}}(a32_0x5d5b,0x376df));function a32_0xda43(_0x5e9413,_0x2898c2){_0x5e9413=_0x5e9413-0x13b;const _0x5d5b2e=a32_0x5d5b();let _0xda4311=_0x5d5b2e[_0x5e9413];return _0xda4311;}import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a32_0x1df605(0x13b),'command':a32_0x1df605(0x16f),'description':a32_0x1df605(0x188),'risk':'high-risk-write','flags':[{'name':a32_0x1df605(0x16c),'type':a32_0x1df605(0x152),'description':a32_0x1df605(0x14a),'enum':['COMMON',a32_0x1df605(0x13f),a32_0x1df605(0x13d)]},{'name':'name','type':a32_0x1df605(0x152),'description':a32_0x1df605(0x148)},{'name':a32_0x1df605(0x14d),'type':a32_0x1df605(0x189),'description':a32_0x1df605(0x155)}],async 'dryRun'(_0xc9ed11){const _0x1e0a34=a32_0x1df605,_0x3ea1b6=loadBffProjectConfig(_0xc9ed11[_0x1e0a34(0x173)]),_0x185609=await readBffLockFile(_0x3ea1b6[_0x1e0a34(0x161)]),{appLock:_0x2c1673}=ensureLockScope(_0x185609??createEmptyBffLock(),_0xc9ed11[_0x1e0a34(0x173)],_0x3ea1b6[_0x1e0a34(0x16e)],_0x1e0a34(0x16f)),_0x3204ab=await getTargetFunctions(_0x3ea1b6,_0xc9ed11),_0x363e9f=_0xc9ed11[_0x1e0a34(0x17f)](_0x1e0a34(0x14d)),_0x38d060=[];for(const _0x148e4d of _0x3204ab){const _0x5562b1=await computeFileHash(_0x148e4d[_0x1e0a34(0x164)]),_0x52fe32=_0x2c1673[_0x1e0a34(0x154)][_0x148e4d['lockKey']],_0x473402=!!_0x52fe32&&_0x52fe32[_0x1e0a34(0x162)]===_0x5562b1;_0x38d060[_0x1e0a34(0x16f)]({'lockKey':_0x148e4d[_0x1e0a34(0x17c)],'filePath':_0x148e4d[_0x1e0a34(0x164)],'remoteId':_0x52fe32?.[_0x1e0a34(0x140)]??null,'mode':_0x52fe32?.[_0x1e0a34(0x140)]?_0x1e0a34(0x14e):'create','status':!_0x363e9f&&_0x473402?_0x1e0a34(0x17e):_0x1e0a34(0x18c)});}return{'method':_0x1e0a34(0x149),'url':_0x1e0a34(0x13e),'body':{'appCode':_0xc9ed11['appCode'],'force':_0x363e9f,'files':_0x38d060,'cacheClearAtRuntime':_0x38d060[_0x1e0a34(0x157)](_0x4694ab=>_0x4694ab[_0x1e0a34(0x174)]===_0x1e0a34(0x18c)),'cacheClearAtRuntimeTimes':_0x38d060[_0x1e0a34(0x157)](_0x3ccd07=>_0x3ccd07['status']===_0x1e0a34(0x18c))?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x1e0a34(0x185)+_0x38d060[_0x1e0a34(0x15e)]+_0x1e0a34(0x15d)};},async 'execute'(_0x35b86e){const _0x16aeb0=a32_0x1df605,_0x50ee1b=loadBffProjectConfig(_0x35b86e[_0x16aeb0(0x173)]),_0x38a720=await readBffLockFile(_0x50ee1b[_0x16aeb0(0x161)]),{lockData:_0x2c7aab,appLock:_0x1d89b4}=ensureLockScope(_0x38a720??createEmptyBffLock(),_0x35b86e[_0x16aeb0(0x173)],_0x50ee1b[_0x16aeb0(0x16e)],_0x16aeb0(0x16f)),_0x35bc69=await getTargetFunctions(_0x50ee1b,_0x35b86e);if(_0x35bc69[_0x16aeb0(0x15e)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':'No\x20local\x20BFF\x20functions\x20found.'};const _0x734cc9=_0x35b86e[_0x16aeb0(0x17f)](_0x16aeb0(0x14d)),_0x2b28b1=JSON[_0x16aeb0(0x18a)](JSON[_0x16aeb0(0x15f)](_0x2c7aab)),_0x5da47e=_0x2b28b1['apps'][_0x35b86e[_0x16aeb0(0x173)]];if(!_0x5da47e)throw new Error(_0x16aeb0(0x166)+_0x35b86e[_0x16aeb0(0x173)]+_0x16aeb0(0x182));const _0x4746c6=await buildHookMaps(_0x35b86e[_0x16aeb0(0x173)],_0x35b86e['apiDir'],_0x35bc69,_0x5da47e),_0x26dd67=[],_0x383f8c=[],_0x4221d3=[];for(const _0x59d011 of _0x35bc69){const _0x5336f7=await computeFileHash(_0x59d011[_0x16aeb0(0x164)]),_0x19775d=_0x5da47e[_0x16aeb0(0x154)][_0x59d011[_0x16aeb0(0x17c)]];if(!_0x734cc9&&_0x19775d&&_0x19775d[_0x16aeb0(0x162)]===_0x5336f7){_0x383f8c['push']({'lockKey':_0x59d011[_0x16aeb0(0x17c)],'reason':'unchanged'});continue;}try{await uploadSingleFunction(_0x35b86e[_0x16aeb0(0x173)],_0x59d011,_0x5da47e,_0x4746c6);const _0x6a7a29=_0x5da47e[_0x16aeb0(0x154)][_0x59d011[_0x16aeb0(0x17c)]];_0x26dd67[_0x16aeb0(0x16f)]({'lockKey':_0x59d011['lockKey'],'remoteId':_0x6a7a29?.[_0x16aeb0(0x140)]??0x0});}catch(_0x480cdc){_0x4221d3[_0x16aeb0(0x16f)]({'lockKey':_0x59d011[_0x16aeb0(0x17c)],'error':_0x480cdc instanceof Error?_0x480cdc['message']:String(_0x480cdc)});}}_0x5da47e[_0x16aeb0(0x14f)]=new Date()[_0x16aeb0(0x177)](),await writeBffLockFile(_0x50ee1b['lockFilePath'],_0x2b28b1),await waitForUploadedLockEntries(_0x50ee1b[_0x16aeb0(0x161)],_0x35b86e[_0x16aeb0(0x173)],_0x26dd67['map'](_0x12037f=>_0x12037f[_0x16aeb0(0x17c)]));let _0x5e0c70={'attempted':![],'cleared':![]};if(_0x26dd67[_0x16aeb0(0x15e)]>0x0)try{let _0x3b0275='';for(let _0x17e298=0x0;_0x17e298<CACHE_CLEAR_ATTEMPTS;_0x17e298+=0x1){_0x3b0275=await clearBffScriptCache(),_0x17e298<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x5e0c70={'attempted':!![],'cleared':!![],'message':_0x3b0275||'Runtime\x20script\x20cache\x20cleared.'};}catch(_0xa3e962){_0x5e0c70={'attempted':!![],'cleared':![],'error':_0xa3e962 instanceof Error?_0xa3e962[_0x16aeb0(0x142)]:String(_0xa3e962)};}const _0x370293=_0x4221d3[_0x16aeb0(0x15e)]===0x0&&(_0x5e0c70[_0x16aeb0(0x169)]?_0x5e0c70['cleared']:!![]),_0x3f7b99=_0x5e0c70[_0x16aeb0(0x169)]?_0x5e0c70[_0x16aeb0(0x175)]?_0x16aeb0(0x160):_0x16aeb0(0x184):_0x16aeb0(0x151);return{'ok':_0x370293,'data':{'uploaded':_0x26dd67,'skipped':_0x383f8c,'failed':_0x4221d3,'cacheClear':_0x5e0c70},'message':'Push\x20complete:\x20'+_0x26dd67[_0x16aeb0(0x15e)]+_0x16aeb0(0x159)+_0x383f8c[_0x16aeb0(0x15e)]+_0x16aeb0(0x15a)+_0x4221d3['length']+_0x16aeb0(0x15c)+_0x3f7b99};}};async function getTargetFunctions(_0x169a76,_0x499587){const _0x3622a9=a32_0x1df605,_0x3c910c=_0x499587[_0x3622a9(0x153)](_0x3622a9(0x16c)),_0x451f51=_0x499587[_0x3622a9(0x153)](_0x3622a9(0x176)),_0x78ea19=normalizeBffType(_0x3c910c)??undefined;if(_0x451f51&&!_0x78ea19)throw CliErrors[_0x3622a9(0x141)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x44f57d=await scanLocalBffFunctions(_0x169a76,_0x78ea19);if(_0x451f51){const _0x3637ef=_0x44f57d[_0x3622a9(0x179)](_0x516914=>_0x516914[_0x3622a9(0x176)]===_0x451f51);if(_0x3637ef[_0x3622a9(0x15e)]===0x0)throw CliErrors['validation'](_0x3622a9(0x14b)+_0x78ea19+'/'+_0x451f51);return _0x3637ef;}return _0x44f57d;}async function buildHookMaps(_0x379f10,_0x50f2a0,_0x4f4840,_0x2e7102){const _0x191d68=a32_0x1df605,_0x4ac18e=_0x4f4840['some'](_0x2c5a7d=>_0x2c5a7d[_0x191d68(0x16c)]==='HOOK');if(!_0x4ac18e)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x59014f=loadAliasMap(_0x50f2a0,undefined,resolveApiFilePath(_0x50f2a0,_0x379f10)),_0x35dfca=new Map(_0x59014f['map'](_0x2bef4e=>[_0x2bef4e[_0x191d68(0x167)],_0x2bef4e[_0x191d68(0x171)]]));for(const _0x122161 of Object[_0x191d68(0x16a)](_0x2e7102[_0x191d68(0x154)])){_0x122161[_0x191d68(0x167)]&&_0x122161[_0x191d68(0x171)]&&!_0x35dfca[_0x191d68(0x16d)](_0x122161[_0x191d68(0x167)])&&_0x35dfca[_0x191d68(0x17a)](_0x122161['alias'],_0x122161[_0x191d68(0x171)]);}const _0x12026f=await listDatasets(_0x379f10),_0x4b39e2=new Map(_0x12026f['map'](_0x1a5233=>[_0x1a5233['code'],_0x1a5233]));return{'aliasToDatasetCode':_0x35dfca,'datasetCodeToDataset':_0x4b39e2};}async function uploadSingleFunction(_0x4a6fd3,_0x582fcf,_0xa03355,_0x241742){const _0x14a340=a32_0x1df605,_0x3214ee=await readFile(_0x582fcf[_0x14a340(0x164)],'utf8'),_0x400beb=await computeFileHash(_0x582fcf['filePath']),_0x4d74ab=_0xa03355[_0x14a340(0x154)][_0x582fcf[_0x14a340(0x17c)]];if(_0x4d74ab?.[_0x14a340(0x140)]&&_0x4d74ab[_0x14a340(0x144)]==null)throw CliErrors[_0x14a340(0x141)](_0x582fcf[_0x14a340(0x17c)]+_0x14a340(0x168));let _0x1f671e=extractScriptDescription(_0x3214ee);if(!_0x1f671e&&_0x4d74ab?.['remoteId']){const _0x20c74b=await getBffScriptInfo(_0x4d74ab['remoteId']);_0x1f671e=_0x20c74b[_0x14a340(0x158)]||undefined;}const _0x10a51a={'appCode':_0x4a6fd3,'functionName':_0x582fcf[_0x14a340(0x176)],'scriptType':_0x582fcf['type'],'scriptContent':_0x3214ee};if(_0x4d74ab?.[_0x14a340(0x140)])_0x10a51a['id']=_0x4d74ab[_0x14a340(0x140)];if(_0x4d74ab?.[_0x14a340(0x144)]!=null)_0x10a51a[_0x14a340(0x144)]=_0x4d74ab['version'];if(_0x1f671e)_0x10a51a[_0x14a340(0x158)]=_0x1f671e;if(_0x582fcf['type']==='HOOK'){const _0x4458f3=_0x582fcf[_0x14a340(0x167)];if(!_0x4458f3||!_0x582fcf[_0x14a340(0x156)]||!_0x582fcf[_0x14a340(0x181)])throw CliErrors['validation']('Incomplete\x20HOOK\x20path:\x20'+_0x582fcf[_0x14a340(0x17c)]);const _0x431e3c=_0x241742[_0x14a340(0x18b)][_0x14a340(0x13c)](_0x4458f3)??_0x4d74ab?.['datasetCode']??_0x4458f3,_0x5b3702=_0x241742[_0x14a340(0x178)]['get'](_0x431e3c);if(!_0x5b3702)throw CliErrors['validation'](_0x14a340(0x143)+_0x4458f3+_0x14a340(0x17b)+(_0x14a340(0x172)+CLI_BIN_NAME+_0x14a340(0x145)));_0x10a51a[_0x14a340(0x17d)]=_0x5b3702['id'],_0x10a51a[_0x14a340(0x156)]=_0x582fcf[_0x14a340(0x156)],_0x10a51a['functionNode']=_0x582fcf[_0x14a340(0x181)];}const _0xdb82c6=await saveBffScript(_0x10a51a),_0xbb694d=_0xdb82c6['id'],_0x3a2d16=_0xdb82c6['script']??await getBffScriptInfo(_0xbb694d),_0x54f249={'hash':_0x400beb,'remoteId':_0xbb694d,'version':_0x3a2d16[_0x14a340(0x144)]};if(_0x582fcf[_0x14a340(0x16c)]===_0x14a340(0x13d)){const _0x27ee01=_0x582fcf['alias'],_0x1732d3=_0x241742[_0x14a340(0x18b)][_0x14a340(0x13c)](_0x27ee01)??_0x4d74ab?.['datasetCode']??_0x27ee01;_0x241742[_0x14a340(0x18b)]['has'](_0x27ee01)?_0x54f249[_0x14a340(0x167)]=_0x27ee01:_0x54f249['alias']=_0x4d74ab?.[_0x14a340(0x167)],_0x54f249['datasetCode']=_0x1732d3,_0x54f249[_0x14a340(0x156)]=_0x582fcf[_0x14a340(0x156)],_0x54f249[_0x14a340(0x181)]=_0x582fcf[_0x14a340(0x181)];}_0xa03355['functions'][_0x582fcf[_0x14a340(0x17c)]]=_0x54f249;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x5ada40,_0xa1fa43,_0x51a4b4){const _0x5e4de7=a32_0x1df605;if(_0x51a4b4[_0x5e4de7(0x15e)]===0x0)return;for(let _0x46ad91=0x0;_0x46ad91<LOCK_SETTLE_RETRY_COUNT;_0x46ad91+=0x1){const _0x4fd81d=await readBffLockFile(_0x5ada40),_0x454d06=_0x4fd81d?.[_0x5e4de7(0x183)]?.[_0xa1fa43]?.[_0x5e4de7(0x154)]??{},_0x407af8=_0x51a4b4[_0x5e4de7(0x186)](_0x560562=>!!_0x454d06[_0x560562]?.[_0x5e4de7(0x140)]);if(_0x407af8)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x5e4de7(0x15b)+_0x51a4b4[_0x5e4de7(0x187)](',\x20')+'.');}
@@ -1 +1 @@
1
- const a33_0x1cb0d5=a33_0x2c01;(function(_0x51fa6f,_0x265259){const _0x43db03=a33_0x2c01,_0x6844f6=_0x51fa6f();while(!![]){try{const _0x2035fd=-parseInt(_0x43db03(0xef))/0x1+parseInt(_0x43db03(0xe8))/0x2*(-parseInt(_0x43db03(0xec))/0x3)+-parseInt(_0x43db03(0xe4))/0x4+parseInt(_0x43db03(0xe9))/0x5*(-parseInt(_0x43db03(0xeb))/0x6)+parseInt(_0x43db03(0xf1))/0x7*(parseInt(_0x43db03(0xf9))/0x8)+-parseInt(_0x43db03(0xf5))/0x9+parseInt(_0x43db03(0xfa))/0xa;if(_0x2035fd===_0x265259)break;else _0x6844f6['push'](_0x6844f6['shift']());}catch(_0xdcafa1){_0x6844f6['push'](_0x6844f6['shift']());}}}(a33_0x4333,0xa7527));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a33_0x2c01(_0x52f226,_0x43bb1f){_0x52f226=_0x52f226-0xe4;const _0x433388=a33_0x4333();let _0x2c01fc=_0x433388[_0x52f226];return _0x2c01fc;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a33_0x4333(){const _0x5be99c=['status','182097bjHWVL','bool','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','filePath','1529504ifeVOX','31830220ULiZKX','datasetCode','functions','length','4035884UACPKB','remote','push','map','1137090rEzerw','990065YYpHYJ','has','6iQyytm','6HtqUsv','lockKey','\x20unchanged','1280492yJVqlc','apiDir','42zKLzpS','hash','appCode'];a33_0x4333=function(){return _0x5be99c;};return a33_0x4333();}import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a33_0x1cb0d5(0xf4),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':'remote','type':'boolean','description':a33_0x1cb0d5(0xf7)}],async 'execute'(_0x57e28f){const _0x34764f=a33_0x1cb0d5,_0xbec48d=loadBffProjectConfig(_0x57e28f['appCode']),_0x2d8716=await readBffLockFile(_0xbec48d['lockFilePath']),{appLock:_0x4d7d01}=ensureLockScope(_0x2d8716??createEmptyBffLock(),_0x57e28f[_0x34764f(0xf3)],_0xbec48d['scriptsRoot'],_0x34764f(0xf4)),_0x111b07=await scanLocalBffFunctions(_0xbec48d),_0x11c06d=[],_0x10d9aa=[],_0x1b0de5=[];for(const _0x3580f6 of _0x111b07){const _0xcc7791=await computeFileHash(_0x3580f6[_0x34764f(0xf8)]),_0x296c49=_0x4d7d01[_0x34764f(0xfc)][_0x3580f6[_0x34764f(0xed)]];if(!_0x296c49)_0x11c06d[_0x34764f(0xe6)](_0x3580f6['lockKey']);else _0x296c49[_0x34764f(0xf2)]!==_0xcc7791?_0x10d9aa[_0x34764f(0xe6)](_0x3580f6[_0x34764f(0xed)]):_0x1b0de5[_0x34764f(0xe6)](_0x3580f6['lockKey']);}const _0x2d418c=[];if(_0x57e28f[_0x34764f(0xf6)](_0x34764f(0xe5))){const _0x402b75=loadAliasMap(_0x57e28f[_0x34764f(0xf0)],undefined,resolveApiFilePath(_0x57e28f[_0x34764f(0xf0)],_0x57e28f[_0x34764f(0xf3)])),_0x4fcbea=new Map(_0x402b75[_0x34764f(0xe7)](_0x34cef5=>[_0x34cef5[_0x34764f(0xfb)],_0x34cef5['alias']])),[_0x12e679,_0x12a467]=await Promise['all']([listBffScripts(_0x57e28f[_0x34764f(0xf3)]),getBffScriptStatistics(_0x57e28f['appCode'])]),_0x1d83fa=createHookLocationMap(_0x12a467),_0x18db93=new Set(_0x111b07[_0x34764f(0xe7)](_0x98c4cf=>_0x98c4cf[_0x34764f(0xed)]));for(const _0xa7390b of _0x12e679){const _0x1e887=resolveRemoteScriptTarget(_0xbec48d,_0xa7390b,_0x1d83fa,_0x4d7d01[_0x34764f(0xfc)],_0x4fcbea);_0x1e887&&!_0x18db93[_0x34764f(0xea)](_0x1e887[_0x34764f(0xed)])&&_0x2d418c[_0x34764f(0xe6)](_0x1e887[_0x34764f(0xed)]);}}const _0x55989c=_0x11c06d['length']===0x0&&_0x10d9aa[_0x34764f(0xfd)]===0x0&&_0x2d418c[_0x34764f(0xfd)]===0x0;return{'ok':!![],'data':{'added':_0x11c06d,'modified':_0x10d9aa,'unchanged':_0x1b0de5,'remoteOnly':_0x2d418c},'message':_0x55989c?'All\x20BFF\x20scripts\x20are\x20in\x20sync.':_0x11c06d[_0x34764f(0xfd)]+'\x20added,\x20'+_0x10d9aa['length']+'\x20modified,\x20'+_0x1b0de5[_0x34764f(0xfd)]+_0x34764f(0xee)+(_0x2d418c['length']>0x0?',\x20'+_0x2d418c['length']+'\x20remote-only':'')};}};
1
+ const a33_0xee0ac6=a33_0x5de2;(function(_0x55d251,_0x304a5b){const _0x44fadf=a33_0x5de2,_0x1bd7a=_0x55d251();while(!![]){try{const _0x2bd383=-parseInt(_0x44fadf(0x1b4))/0x1+parseInt(_0x44fadf(0x19c))/0x2*(-parseInt(_0x44fadf(0x1a0))/0x3)+parseInt(_0x44fadf(0x1ab))/0x4*(-parseInt(_0x44fadf(0x1b1))/0x5)+-parseInt(_0x44fadf(0x1b2))/0x6*(parseInt(_0x44fadf(0x1bd))/0x7)+-parseInt(_0x44fadf(0x1a6))/0x8+-parseInt(_0x44fadf(0x1a4))/0x9+-parseInt(_0x44fadf(0x1ac))/0xa*(-parseInt(_0x44fadf(0x1aa))/0xb);if(_0x2bd383===_0x304a5b)break;else _0x1bd7a['push'](_0x1bd7a['shift']());}catch(_0x38dfe5){_0x1bd7a['push'](_0x1bd7a['shift']());}}}(a33_0x58f8,0x93877));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a33_0x5de2(_0x3c65b2,_0x53c3be){_0x3c65b2=_0x3c65b2-0x19c;const _0x58f8db=a33_0x58f8();let _0x5de2dc=_0x58f8db[_0x3c65b2];return _0x5de2dc;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';function a33_0x58f8(){const _0x5e203f=['370187XRWUMv','scriptsRoot','read','\x20added,\x20','bool','push','boolean','lockKey','All\x20BFF\x20scripts\x20are\x20in\x20sync.','273DOqyOr','appCode','2PscYmR','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','has','\x20remote-only','3117909YOYNZw','functions','length','\x20modified,\x20','4981374BfLfMx','map','2915480gNkfOi','alias','hash','\x20unchanged','253uFyLug','2897996NoztvY','1845640pgSRFl','remote','status','datasetCode','apiDir','5LobVLU','90582ZWacAi','filePath'];a33_0x58f8=function(){return _0x5e203f;};return a33_0x58f8();}import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';export const bffStatus={'service':'bff','command':a33_0xee0ac6(0x1ae),'description':'Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','risk':a33_0xee0ac6(0x1b6),'flags':[{'name':a33_0xee0ac6(0x1ad),'type':a33_0xee0ac6(0x1ba),'description':a33_0xee0ac6(0x19d)}],async 'execute'(_0x5e3b95){const _0x2d19b8=a33_0xee0ac6,_0xe9491d=loadBffProjectConfig(_0x5e3b95[_0x2d19b8(0x1be)]),_0x7c9c24=await readBffLockFile(_0xe9491d['lockFilePath']),{appLock:_0x2c76eb}=ensureLockScope(_0x7c9c24??createEmptyBffLock(),_0x5e3b95[_0x2d19b8(0x1be)],_0xe9491d[_0x2d19b8(0x1b5)],_0x2d19b8(0x1ae)),_0x89bbc7=await scanLocalBffFunctions(_0xe9491d),_0x50bb5d=[],_0x6afb1e=[],_0x47b914=[];for(const _0x2be8e1 of _0x89bbc7){const _0xbacf3c=await computeFileHash(_0x2be8e1[_0x2d19b8(0x1b3)]),_0x11c421=_0x2c76eb[_0x2d19b8(0x1a1)][_0x2be8e1[_0x2d19b8(0x1bb)]];if(!_0x11c421)_0x50bb5d[_0x2d19b8(0x1b9)](_0x2be8e1['lockKey']);else _0x11c421[_0x2d19b8(0x1a8)]!==_0xbacf3c?_0x6afb1e[_0x2d19b8(0x1b9)](_0x2be8e1['lockKey']):_0x47b914[_0x2d19b8(0x1b9)](_0x2be8e1[_0x2d19b8(0x1bb)]);}const _0x88aacd=[];if(_0x5e3b95[_0x2d19b8(0x1b8)](_0x2d19b8(0x1ad))){const _0x37e15b=loadAliasMap(_0x5e3b95[_0x2d19b8(0x1b0)],undefined,resolveApiFilePath(_0x5e3b95[_0x2d19b8(0x1b0)],_0x5e3b95['appCode'])),_0x824f4b=new Map(_0x37e15b[_0x2d19b8(0x1a5)](_0x4334d4=>[_0x4334d4[_0x2d19b8(0x1af)],_0x4334d4[_0x2d19b8(0x1a7)]])),[_0x4df169,_0x4c3190]=await Promise['all']([listBffScripts(_0x5e3b95[_0x2d19b8(0x1be)]),getBffScriptStatistics(_0x5e3b95[_0x2d19b8(0x1be)])]),_0xb69f86=createHookLocationMap(_0x4c3190),_0x1da3c2=new Set(_0x89bbc7['map'](_0x297445=>_0x297445[_0x2d19b8(0x1bb)]));for(const _0x1307dd of _0x4df169){const _0x4cfef0=resolveRemoteScriptTarget(_0xe9491d,_0x1307dd,_0xb69f86,_0x2c76eb[_0x2d19b8(0x1a1)],_0x824f4b);_0x4cfef0&&!_0x1da3c2[_0x2d19b8(0x19e)](_0x4cfef0['lockKey'])&&_0x88aacd['push'](_0x4cfef0[_0x2d19b8(0x1bb)]);}}const _0x380f71=_0x50bb5d[_0x2d19b8(0x1a2)]===0x0&&_0x6afb1e['length']===0x0&&_0x88aacd[_0x2d19b8(0x1a2)]===0x0;return{'ok':!![],'data':{'added':_0x50bb5d,'modified':_0x6afb1e,'unchanged':_0x47b914,'remoteOnly':_0x88aacd},'message':_0x380f71?_0x2d19b8(0x1bc):_0x50bb5d[_0x2d19b8(0x1a2)]+_0x2d19b8(0x1b7)+_0x6afb1e[_0x2d19b8(0x1a2)]+_0x2d19b8(0x1a3)+_0x47b914['length']+_0x2d19b8(0x1a9)+(_0x88aacd['length']>0x0?',\x20'+_0x88aacd[_0x2d19b8(0x1a2)]+_0x2d19b8(0x19f):'')};}};
@@ -1 +1 @@
1
- const a34_0x19c5dd=a34_0x2f1b;(function(_0x520e64,_0x4176b6){const _0x509dbc=a34_0x2f1b,_0x5996c7=_0x520e64();while(!![]){try{const _0x3fd4ac=-parseInt(_0x509dbc(0x1a5))/0x1+-parseInt(_0x509dbc(0x161))/0x2+parseInt(_0x509dbc(0x18d))/0x3*(-parseInt(_0x509dbc(0x18e))/0x4)+-parseInt(_0x509dbc(0x15b))/0x5*(-parseInt(_0x509dbc(0x171))/0x6)+parseInt(_0x509dbc(0x19d))/0x7*(parseInt(_0x509dbc(0x174))/0x8)+parseInt(_0x509dbc(0x15e))/0x9+-parseInt(_0x509dbc(0x194))/0xa*(-parseInt(_0x509dbc(0x1a3))/0xb);if(_0x3fd4ac===_0x4176b6)break;else _0x5996c7['push'](_0x5996c7['shift']());}catch(_0xfd1877){_0x5996c7['push'](_0x5996c7['shift']());}}}(a34_0x1176,0xe82e8));import a34_0xab00b9 from'chalk';import a34_0x5979a7 from'ora';import a34_0x41cdb2 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_0x2f1b(_0x5de91a,_0x24bf97){_0x5de91a=_0x5de91a-0x15b;const _0x11768b=a34_0x1176();let _0x2f1b2b=_0x11768b[_0x5de91a];return _0x2f1b2b;}function a34_0x1176(){const _0x20dde9=['\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','beta','npm','Skipping\x20official\x20skill\x20package\x20(--no-skills).','\x20\x20Try\x20manually:\x20','entries','info','gray','pipe','boolean','Update\x20failed','Update\x20available:\x20','Already\x20up\x20to\x20date\x20(v','timeout','log','str','slice','run','6RaWqFq','2088364oumhhb','\x20\x20Official\x20skill\x20update\x20failed:\x20','version','toLowerCase','unknown','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','2950QjktbW','json','object','fail','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','red','\x20→\x20','bool','8762677rvQXhG','yellow','Version\x20comparison\x20failed','stableVersion','includes','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','21912ubThEi','no-skills','1389142EAXluv','https://registry.npmjs.org/-/package/','error','skills','bun','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','length','cli','...','green','2245pjsUzI','warn','string','10230822dkFOpO','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Updated\x20to\x20v','1813980SHPiKg','latest','start','Requested\x20version:\x20','validation','trim','\x20\x20Run\x20manually:\x20','valid','Beta\x20version:\x20','\x20install\x20-g\x20','message','Checking\x20official\x20skill\x20package...','Already\x20on\x20requested\x20version\x20(v','Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','update','install','17574vcqSDy','source','Current\x20version:\x20','8KNlISq','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','filter','nonInteractive','@latest','succeed','/dist-tags'];a34_0x1176=function(){return _0x20dde9;};return a34_0x1176();}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0xb798de=a34_0x2f1b;return GIT_COMMIT!==_0xb798de(0x192)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0xb798de(0x18b)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x5214b9=a34_0x2f1b,_0x292e7d=process['execPath'][_0x5214b9(0x191)]();if(_0x292e7d[_0x5214b9(0x1a1)]('bun'))return _0x5214b9(0x1a9);return'npm';}const updateFlags=[{'name':a34_0x19c5dd(0x17c),'type':a34_0x19c5dd(0x184),'description':a34_0x19c5dd(0x16e),'default':![]},{'name':'version','type':a34_0x19c5dd(0x15d),'description':'Install\x20a\x20specific\x20CLI\x20version'},{'name':'no-skills','type':a34_0x19c5dd(0x184),'description':a34_0x19c5dd(0x175),'default':![]},{'name':a34_0x19c5dd(0x1a8),'type':'boolean','description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x2741a8){const _0x593ae6=a34_0x19c5dd;return _0x2741a8[_0x593ae6(0x18a)](_0x593ae6(0x190))[_0x593ae6(0x166)]();}function shouldSkipOfficialSkill(_0x57ac33){const _0x291d02=a34_0x19c5dd;return _0x57ac33[_0x291d02(0x19c)](_0x291d02(0x1a4))||_0x57ac33['flag'](_0x291d02(0x1a8))===![];}async function validateUpdateFlags(_0x164657){const _0x52cf97=a34_0x19c5dd,_0x1efebf=_0x164657['bool']('beta'),_0x19d72c=getRequestedVersion(_0x164657);if(_0x1efebf&&_0x19d72c)throw CliErrors['validation']('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.',_0x52cf97(0x193));if(_0x19d72c&&!a34_0x41cdb2[_0x52cf97(0x168)](_0x19d72c))throw CliErrors[_0x52cf97(0x165)]('Invalid\x20version:\x20'+_0x19d72c,'Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.');}async function fetchNpmDistTags(){const _0x22ffec=a34_0x19c5dd;try{const _0x40d935=await fetch(_0x22ffec(0x1a6)+encodeURIComponent(NPM_PACKAGE_NAME)+_0x22ffec(0x17a),{'signal':AbortSignal[_0x22ffec(0x188)](0x2710)});if(!_0x40d935['ok'])return null;const _0x4829d4=await _0x40d935[_0x22ffec(0x195)]();if(!_0x4829d4||typeof _0x4829d4!==_0x22ffec(0x196))return null;return Object['fromEntries'](Object[_0x22ffec(0x180)](_0x4829d4)[_0x22ffec(0x176)](([,_0x23db55])=>typeof _0x23db55==='string'&&_0x23db55[_0x22ffec(0x166)]()[_0x22ffec(0x1ab)]>0x0)['map'](([_0x3d907a,_0x2880d9])=>[_0x3d907a,String(_0x2880d9)[_0x22ffec(0x166)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x425aec){const _0x1f2925=await fetchNpmDistTags();return _0x1f2925?.[_0x425aec]??null;}async function fetchLatestVersion(){const _0x3c77f6=a34_0x19c5dd,_0x1e2e0e=await fetchNpmDistTagVersion(_0x3c77f6(0x162));if(_0x1e2e0e)return _0x1e2e0e;const _0x39baba=await getCdnConfig();return _0x39baba?.[_0x3c77f6(0x1ac)]?.[_0x3c77f6(0x1a0)]??null;}async function resolveTargetVersion(_0x35d8c2){const _0x5f3bb9=a34_0x19c5dd,_0x1ee18d=getRequestedVersion(_0x35d8c2);if(_0x1ee18d)return{'version':_0x1ee18d,'source':_0x5f3bb9(0x190)};if(_0x35d8c2['bool'](_0x5f3bb9(0x17c))){const _0x1a55f1=await fetchNpmDistTagVersion(_0x5f3bb9(0x17c));if(!_0x1a55f1)return null;return{'version':_0x1a55f1,'source':_0x5f3bb9(0x17c)};}const _0x870306=await fetchLatestVersion();if(!_0x870306)return null;return{'version':_0x870306,'source':'latest'};}function shouldInstallTarget(_0x323b80,_0xf52c07){const _0x40b6fb=a34_0x19c5dd;if(_0xf52c07['source']==='version'||_0xf52c07[_0x40b6fb(0x172)]==='beta')return!a34_0x41cdb2['eq'](_0x323b80,_0xf52c07['version']);return a34_0x41cdb2['lt'](_0x323b80,_0xf52c07[_0x40b6fb(0x190)]);}function getInstallPlanLabel(_0x47483b,_0x51c06f){const _0x13417c=a34_0x19c5dd;switch(_0x51c06f[_0x13417c(0x172)]){case _0x13417c(0x17c):return _0x13417c(0x169)+a34_0xab00b9['yellow'](_0x47483b)+_0x13417c(0x19b)+a34_0xab00b9['green'](_0x51c06f[_0x13417c(0x190)]);case _0x13417c(0x190):return _0x13417c(0x164)+a34_0xab00b9['yellow'](_0x47483b)+'\x20→\x20'+a34_0xab00b9[_0x13417c(0x1ae)](_0x51c06f[_0x13417c(0x190)]);case _0x13417c(0x162):default:return _0x13417c(0x186)+a34_0xab00b9[_0x13417c(0x19e)](_0x47483b)+_0x13417c(0x19b)+a34_0xab00b9[_0x13417c(0x1ae)](_0x51c06f[_0x13417c(0x190)]);}}async function installOfficialSkill(_0x131f90){const _0x45634e=a34_0x19c5dd;console[_0x45634e(0x189)](a34_0xab00b9[_0x45634e(0x182)](_0x45634e(0x16c)));const _0x52706f=runNpxSkillsAddGlobal(process['cwd'](),RABETBASE_SKILL_SOURCE,{'stdio':_0x131f90?'pipe':'inherit'});if(_0x52706f['skipped']){console['log'](a34_0xab00b9[_0x45634e(0x182)]('\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'));return;}if(_0x52706f['ok']){console['log'](a34_0xab00b9[_0x45634e(0x182)](_0x45634e(0x17b)));return;}console[_0x45634e(0x15c)](a34_0xab00b9[_0x45634e(0x19e)](_0x45634e(0x18f)+(_0x52706f[_0x45634e(0x1a7)]||_0x45634e(0x192)))),console['log'](a34_0xab00b9['gray'](_0x45634e(0x167)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x2b5b28){const _0x5ab3bf=a34_0x19c5dd;await validateUpdateFlags(_0x2b5b28);const _0x573238=getCurrentVersion();console[_0x5ab3bf(0x189)](_0x5ab3bf(0x173)+_0x573238);const _0x2f05df=a34_0x5979a7('Checking\x20for\x20updates...')[_0x5ab3bf(0x163)](),_0xa64c8=await resolveTargetVersion(_0x2b5b28);if(!_0xa64c8){const _0x31c7b6=_0x2b5b28[_0x5ab3bf(0x19c)](_0x5ab3bf(0x17c))?_0x5ab3bf(0x1a2):_0x5ab3bf(0x198);return _0x2f05df[_0x5ab3bf(0x197)](_0x31c7b6),console['log'](a34_0xab00b9[_0x5ab3bf(0x182)](_0x5ab3bf(0x15f)+NPM_PACKAGE_NAME+_0x5ab3bf(0x178))),{'ok':![],'message':_0x31c7b6};}const _0x11e5c2=a34_0x41cdb2[_0x5ab3bf(0x168)](VERSION),_0x3088b1=a34_0x41cdb2['valid'](_0xa64c8[_0x5ab3bf(0x190)]);if(!_0x11e5c2||!_0x3088b1)return _0x2f05df[_0x5ab3bf(0x197)](_0x5ab3bf(0x19f)),{'ok':![],'message':'Version\x20comparison\x20failed'};if(!shouldInstallTarget(_0x11e5c2,_0xa64c8)){const _0x177988=_0xa64c8[_0x5ab3bf(0x172)]===_0x5ab3bf(0x190)?_0x5ab3bf(0x16d)+_0xa64c8[_0x5ab3bf(0x190)]+')':_0x5ab3bf(0x187)+_0xa64c8[_0x5ab3bf(0x190)]+')';return _0x2f05df[_0x5ab3bf(0x179)](_0x177988),shouldSkipOfficialSkill(_0x2b5b28)?console['log'](a34_0xab00b9[_0x5ab3bf(0x182)](_0x5ab3bf(0x17e))):await installOfficialSkill(_0x2b5b28[_0x5ab3bf(0x177)]),{'ok':!![]};}_0x2f05df[_0x5ab3bf(0x181)](getInstallPlanLabel(_0x573238,_0xa64c8));const _0x25b0a7=detectPackageManager(),_0x52de50=_0x25b0a7===_0x5ab3bf(0x17d)?resolveNpmBin(_0x5ab3bf(0x17d)):_0x25b0a7,_0x39bb66=a34_0x5979a7('Updating\x20via\x20'+_0x25b0a7+_0x5ab3bf(0x1ad))['start']();try{return await execa(_0x52de50,[_0x5ab3bf(0x170),'-g',NPM_PACKAGE_NAME+'@'+_0xa64c8[_0x5ab3bf(0x190)]],{'stdio':_0x5ab3bf(0x183)}),_0x39bb66[_0x5ab3bf(0x179)](_0x5ab3bf(0x160)+_0xa64c8[_0x5ab3bf(0x190)]),console[_0x5ab3bf(0x189)](a34_0xab00b9[_0x5ab3bf(0x182)](_0x5ab3bf(0x199))),shouldSkipOfficialSkill(_0x2b5b28)?console[_0x5ab3bf(0x189)](a34_0xab00b9['gray'](_0x5ab3bf(0x17e))):await installOfficialSkill(_0x2b5b28[_0x5ab3bf(0x177)]),{'ok':!![]};}catch(_0xfb9f83){return _0x39bb66[_0x5ab3bf(0x197)](_0x5ab3bf(0x185)),console[_0x5ab3bf(0x1a7)](a34_0xab00b9[_0x5ab3bf(0x19a)]('\x20\x20'+_0xfb9f83[_0x5ab3bf(0x16b)])),console[_0x5ab3bf(0x189)](a34_0xab00b9['gray'](_0x5ab3bf(0x17f)+_0x25b0a7+_0x5ab3bf(0x16a)+NPM_PACKAGE_NAME+'@'+_0xa64c8[_0x5ab3bf(0x190)])),{'ok':![],'message':_0xfb9f83[_0x5ab3bf(0x16b)]};}}export const updateDefinition={'service':a34_0x19c5dd(0x16f),'command':a34_0x19c5dd(0x18c),'description':a34_0x19c5dd(0x1aa),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a34_0x895ab=a34_0x414f;function a34_0x414f(_0x1f22e1,_0x5acac7){_0x1f22e1=_0x1f22e1-0xcf;const _0x6c9901=a34_0x6c99();let _0x414f9e=_0x6c9901[_0x1f22e1];return _0x414f9e;}(function(_0x1115bb,_0x4ca2ab){const _0x32adee=a34_0x414f,_0x3d95e8=_0x1115bb();while(!![]){try{const _0x471f97=parseInt(_0x32adee(0xd1))/0x1+parseInt(_0x32adee(0xf8))/0x2+parseInt(_0x32adee(0xff))/0x3+-parseInt(_0x32adee(0xde))/0x4*(-parseInt(_0x32adee(0x110))/0x5)+-parseInt(_0x32adee(0xee))/0x6+-parseInt(_0x32adee(0xfc))/0x7*(parseInt(_0x32adee(0xef))/0x8)+parseInt(_0x32adee(0x10b))/0x9*(-parseInt(_0x32adee(0xea))/0xa);if(_0x471f97===_0x4ca2ab)break;else _0x3d95e8['push'](_0x3d95e8['shift']());}catch(_0x59e84e){_0x3d95e8['push'](_0x3d95e8['shift']());}}}(a34_0x6c99,0xe17a5));import a34_0x471d34 from'chalk';import a34_0x790cc1 from'ora';import a34_0x3df130 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{getCdnConfig}from'../utils/cdn-config.js';import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x48f146=a34_0x414f;return GIT_COMMIT!==_0x48f146(0xe0)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x280b08=a34_0x414f,_0x242132=process[_0x280b08(0xfe)][_0x280b08(0xf5)]();if(_0x242132['includes']('bun'))return _0x280b08(0x10f);return _0x280b08(0xed);}const updateFlags=[{'name':a34_0x895ab(0x10a),'type':a34_0x895ab(0xf3),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a34_0x895ab(0xf2),'type':a34_0x895ab(0x102),'description':a34_0x895ab(0xd0)},{'name':a34_0x895ab(0x106),'type':'boolean','description':a34_0x895ab(0xf1),'default':![]},{'name':a34_0x895ab(0x10e),'type':a34_0x895ab(0xf3),'description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function a34_0x6c99(){const _0x441451=['Version\x20comparison\x20failed','nonInteractive','686406LCZTnT','\x20install\x20-g\x20','\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.','install','52451YsqfAV','entries','execPath','2311845xyxowN','validation','\x20\x20Try\x20manually:\x20','string','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','str','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','no-skills','Requested\x20version:\x20','run','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','beta','609426caDaux','error','Already\x20on\x20requested\x20version\x20(v','skills','bun','541435YRetgl','write','gray','source','green','info','object','Current\x20version:\x20','pipe','latest','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','bool','Updated\x20to\x20v','Install\x20a\x20specific\x20CLI\x20version','1468749qwsmNe','\x20→\x20','inherit','fail','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','succeed','log','Skipping\x20official\x20skill\x20package\x20(--no-skills).','Checking\x20for\x20updates...','...','Update\x20failed','skipped','https://registry.npmjs.org/-/package/','60rDJoca','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','unknown','message','trim','Checking\x20official\x20skill\x20package...','json','cwd','\x20\x20Run\x20manually:\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','Invalid\x20version:\x20','10WCKjJE','Updating\x20via\x20','length','npm','8548644EpbJCf','1912DhYYJu','yellow','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','version','boolean','valid','toLowerCase'];a34_0x6c99=function(){return _0x441451;};return a34_0x6c99();}function getRequestedVersion(_0x2210f7){const _0x4bab03=a34_0x895ab;return _0x2210f7[_0x4bab03(0x104)](_0x4bab03(0xf2))[_0x4bab03(0xe2)]();}function shouldSkipOfficialSkill(_0x146669){const _0x12babd=a34_0x895ab;return _0x146669[_0x12babd(0x11b)](_0x12babd(0x106))||_0x146669['flag'](_0x12babd(0x10e))===![];}async function validateUpdateFlags(_0x16cb77){const _0x1ff5dd=a34_0x895ab,_0x3aafe5=_0x16cb77['bool'](_0x1ff5dd(0x10a)),_0x1f85e9=getRequestedVersion(_0x16cb77);if(_0x3aafe5&&_0x1f85e9)throw CliErrors[_0x1ff5dd(0x100)](_0x1ff5dd(0x11a),_0x1ff5dd(0xe7));if(_0x1f85e9&&!a34_0x3df130[_0x1ff5dd(0xf4)](_0x1f85e9))throw CliErrors[_0x1ff5dd(0x100)](_0x1ff5dd(0xe9)+_0x1f85e9,_0x1ff5dd(0x103));}async function fetchNpmDistTags(){const _0xdc29ee=a34_0x895ab;try{const _0x1c9348=await fetch(_0xdc29ee(0xdd)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal['timeout'](0x2710)});if(!_0x1c9348['ok'])return null;const _0x215c1=await _0x1c9348[_0xdc29ee(0xe4)]();if(!_0x215c1||typeof _0x215c1!==_0xdc29ee(0x116))return null;return Object['fromEntries'](Object[_0xdc29ee(0xfd)](_0x215c1)['filter'](([,_0x53d356])=>typeof _0x53d356===_0xdc29ee(0x102)&&_0x53d356[_0xdc29ee(0xe2)]()[_0xdc29ee(0xec)]>0x0)['map'](([_0x1331be,_0x16b7d9])=>[_0x1331be,String(_0x16b7d9)[_0xdc29ee(0xe2)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x5a627f){const _0x596bf6=await fetchNpmDistTags();return _0x596bf6?.[_0x5a627f]??null;}async function fetchLatestVersion(){const _0xf90c8d=a34_0x895ab,_0x477dac=await fetchNpmDistTagVersion(_0xf90c8d(0x119));if(_0x477dac)return _0x477dac;const _0x264a6a=await getCdnConfig();return _0x264a6a?.['cli']?.['stableVersion']??null;}async function resolveTargetVersion(_0x45a7eb){const _0x366835=a34_0x895ab,_0x20989d=getRequestedVersion(_0x45a7eb);if(_0x20989d)return{'version':_0x20989d,'source':_0x366835(0xf2)};if(_0x45a7eb[_0x366835(0x11b)](_0x366835(0x10a))){const _0x2f32eb=await fetchNpmDistTagVersion(_0x366835(0x10a));if(!_0x2f32eb)return null;return{'version':_0x2f32eb,'source':_0x366835(0x10a)};}const _0x50e07d=await fetchLatestVersion();if(!_0x50e07d)return null;return{'version':_0x50e07d,'source':_0x366835(0x119)};}function shouldInstallTarget(_0x335634,_0x5c0a24){const _0x4e76ff=a34_0x895ab;if(_0x5c0a24['source']===_0x4e76ff(0xf2)||_0x5c0a24[_0x4e76ff(0x113)]===_0x4e76ff(0x10a))return!a34_0x3df130['eq'](_0x335634,_0x5c0a24[_0x4e76ff(0xf2)]);return a34_0x3df130['lt'](_0x335634,_0x5c0a24[_0x4e76ff(0xf2)]);}function getInstallPlanLabel(_0x56ee40,_0x3f9420){const _0x45b0f0=a34_0x895ab;switch(_0x3f9420[_0x45b0f0(0x113)]){case _0x45b0f0(0x10a):return'Beta\x20version:\x20'+a34_0x471d34['yellow'](_0x56ee40)+_0x45b0f0(0xd2)+a34_0x471d34[_0x45b0f0(0x114)](_0x3f9420['version']);case _0x45b0f0(0xf2):return _0x45b0f0(0x107)+a34_0x471d34['yellow'](_0x56ee40)+_0x45b0f0(0xd2)+a34_0x471d34[_0x45b0f0(0x114)](_0x3f9420[_0x45b0f0(0xf2)]);case _0x45b0f0(0x119):default:return'Update\x20available:\x20'+a34_0x471d34[_0x45b0f0(0xf0)](_0x56ee40)+_0x45b0f0(0xd2)+a34_0x471d34[_0x45b0f0(0x114)](_0x3f9420[_0x45b0f0(0xf2)]);}}async function installOfficialSkill(_0x58e4ff){const _0x4fbfdb=a34_0x895ab;console['log'](a34_0x471d34[_0x4fbfdb(0x112)](_0x4fbfdb(0xe3)));const _0x5471d9=runNpxSkillsAddGlobal(process[_0x4fbfdb(0xe5)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x58e4ff?_0x4fbfdb(0x118):_0x4fbfdb(0xd3)});if(_0x5471d9[_0x4fbfdb(0xdc)]){console[_0x4fbfdb(0xd7)](a34_0x471d34['gray'](_0x4fbfdb(0x109)));return;}if(_0x5471d9['ok']){console['log'](a34_0x471d34[_0x4fbfdb(0x112)](_0x4fbfdb(0xfa)));return;}console['warn'](a34_0x471d34[_0x4fbfdb(0xf0)]('\x20\x20Official\x20skill\x20update\x20failed:\x20'+(_0x5471d9[_0x4fbfdb(0x10c)]||_0x4fbfdb(0xe0)))),console[_0x4fbfdb(0xd7)](a34_0x471d34['gray'](_0x4fbfdb(0xe6)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x43928d){const _0x2d9753=a34_0x895ab;await validateUpdateFlags(_0x43928d);const _0x29d6d7=getCurrentVersion();console[_0x2d9753(0xd7)](_0x2d9753(0x117)+_0x29d6d7);const _0x318c7b=a34_0x790cc1(_0x2d9753(0xd9))['start'](),_0x3f4c73=await resolveTargetVersion(_0x43928d);if(!_0x3f4c73){const _0x2251db=_0x43928d[_0x2d9753(0x11b)]('beta')?_0x2d9753(0x105):_0x2d9753(0xe8);return _0x318c7b[_0x2d9753(0xd4)](_0x2251db),console[_0x2d9753(0xd7)](a34_0x471d34[_0x2d9753(0x112)](_0x2d9753(0xdf)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0x2251db};}const _0x17b813=a34_0x3df130[_0x2d9753(0xf4)](VERSION),_0x5696bc=a34_0x3df130[_0x2d9753(0xf4)](_0x3f4c73['version']);if(!_0x17b813||!_0x5696bc)return _0x318c7b[_0x2d9753(0xd4)](_0x2d9753(0xf6)),{'ok':![],'message':_0x2d9753(0xf6)};if(!shouldInstallTarget(_0x17b813,_0x3f4c73)){const _0x203eda=_0x3f4c73['source']==='version'?_0x2d9753(0x10d)+_0x3f4c73['version']+')':'Already\x20up\x20to\x20date\x20(v'+_0x3f4c73['version']+')';return _0x318c7b[_0x2d9753(0xd6)](_0x203eda),shouldSkipOfficialSkill(_0x43928d)?console['log'](a34_0x471d34['gray'](_0x2d9753(0xd8))):await installOfficialSkill(_0x43928d['nonInteractive']),{'ok':!![]};}_0x318c7b[_0x2d9753(0x115)](getInstallPlanLabel(_0x29d6d7,_0x3f4c73));const _0x54b0ed=detectPackageManager(),_0x43d408=_0x54b0ed==='npm'?resolveNpmBin('npm'):_0x54b0ed,_0x3ae172=a34_0x790cc1(_0x2d9753(0xeb)+_0x54b0ed+_0x2d9753(0xda))['start']();try{return await execa(_0x43d408,[_0x2d9753(0xfb),'-g',NPM_PACKAGE_NAME+'@'+_0x3f4c73[_0x2d9753(0xf2)]],{'stdio':_0x2d9753(0x118)}),_0x3ae172[_0x2d9753(0xd6)](_0x2d9753(0xcf)+_0x3f4c73['version']),console[_0x2d9753(0xd7)](a34_0x471d34[_0x2d9753(0x112)](_0x2d9753(0xd5))),shouldSkipOfficialSkill(_0x43928d)?console[_0x2d9753(0xd7)](a34_0x471d34[_0x2d9753(0x112)](_0x2d9753(0xd8))):await installOfficialSkill(_0x43928d[_0x2d9753(0xf7)]),{'ok':!![]};}catch(_0x35cfaf){return _0x3ae172[_0x2d9753(0xd4)](_0x2d9753(0xdb)),console[_0x2d9753(0x10c)](a34_0x471d34['red']('\x20\x20'+_0x35cfaf[_0x2d9753(0xe1)])),console['log'](a34_0x471d34[_0x2d9753(0x112)](_0x2d9753(0x101)+_0x54b0ed+_0x2d9753(0xf9)+NPM_PACKAGE_NAME+'@'+_0x3f4c73[_0x2d9753(0xf2)])),{'ok':![],'message':_0x35cfaf[_0x2d9753(0xe1)]};}}export const updateDefinition={'service':'update','command':a34_0x895ab(0x108),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','risk':a34_0x895ab(0x111),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- (function(_0x5a719a,_0x21dad1){const _0x133c87=a35_0x164e,_0x4e01da=_0x5a719a();while(!![]){try{const _0x3dc258=parseInt(_0x133c87(0xa4))/0x1+parseInt(_0x133c87(0xa9))/0x2+-parseInt(_0x133c87(0xa7))/0x3*(-parseInt(_0x133c87(0xa6))/0x4)+-parseInt(_0x133c87(0xa8))/0x5*(parseInt(_0x133c87(0xad))/0x6)+parseInt(_0x133c87(0xa5))/0x7+-parseInt(_0x133c87(0xab))/0x8*(parseInt(_0x133c87(0xac))/0x9)+-parseInt(_0x133c87(0xaa))/0xa;if(_0x3dc258===_0x21dad1)break;else _0x4e01da['push'](_0x4e01da['shift']());}catch(_0x268fad){_0x4e01da['push'](_0x4e01da['shift']());}}}(a35_0x57d0,0xb7ebf));function a35_0x57d0(){const _0x436cac=['57JKqGsd','580eoDpwv','1888698zemygN','10061120fzcIwN','72YIsRxu','261639YmJDOL','35484Kpluvj','497985rhoKOE','6705139tfnVDW','64612leWHlQ'];a35_0x57d0=function(){return _0x436cac;};return a35_0x57d0();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a35_0x164e(_0x50f7dc,_0x46d95e){_0x50f7dc=_0x50f7dc-0xa4;const _0x57d0b5=a35_0x57d0();let _0x164e3c=_0x57d0b5[_0x50f7dc];return _0x164e3c;}export const codegenDefinitions=[codegenSdk,codegenSql];
1
+ (function(_0x6e64d5,_0x8f8862){const _0x11cd59=a35_0x156a,_0x356fcd=_0x6e64d5();while(!![]){try{const _0x340595=-parseInt(_0x11cd59(0x1d8))/0x1+parseInt(_0x11cd59(0x1de))/0x2*(-parseInt(_0x11cd59(0x1e1))/0x3)+-parseInt(_0x11cd59(0x1dc))/0x4+parseInt(_0x11cd59(0x1d9))/0x5*(parseInt(_0x11cd59(0x1df))/0x6)+parseInt(_0x11cd59(0x1dd))/0x7+parseInt(_0x11cd59(0x1e0))/0x8+parseInt(_0x11cd59(0x1db))/0x9*(-parseInt(_0x11cd59(0x1da))/0xa);if(_0x340595===_0x8f8862)break;else _0x356fcd['push'](_0x356fcd['shift']());}catch(_0x362ba6){_0x356fcd['push'](_0x356fcd['shift']());}}}(a35_0x1c7c,0x9b4ae));function a35_0x156a(_0x282cfb,_0x3eb68f){_0x282cfb=_0x282cfb-0x1d8;const _0x1c7c80=a35_0x1c7c();let _0x156afb=_0x1c7c80[_0x282cfb];return _0x156afb;}function a35_0x1c7c(){const _0x5c752c=['2364eidFfp','4249880sdLgkp','1875jsEFnK','965933oAoEdG','15915OMpVcB','182740iAWPOu','81jhARMv','3053788WUBjRx','6388984nDDLWD','538MvnbwI'];a35_0x1c7c=function(){return _0x5c752c;};return a35_0x1c7c();}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
@@ -1 +1 @@
1
- function a36_0x586f(_0x348ae1,_0x5975be){_0x348ae1=_0x348ae1-0x129;const _0x4dc1ab=a36_0x4dc1();let _0x586f02=_0x4dc1ab[_0x348ae1];return _0x586f02;}function a36_0x4dc1(){const _0x37d341=['Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','43670VEfuTY','7UzSYjm','624RTcdAj','5285848qadgrL','120164TNiaAN','Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','13468410ZDnYxy','55126460DgsHUh','str','codegen','11FvIigd','2644575HtjpfT','appCode','skip-imports','alias','bool','tableName','name','22TClgcD','4069352pGxwAi','operation','code','Omit\x20import\x20statements\x20from\x20generated\x20code','string','boolean'];a36_0x4dc1=function(){return _0x37d341;};return a36_0x4dc1();}const a36_0x5e1b79=a36_0x586f;(function(_0x10236b,_0x31e61d){const _0x3eaa3d=a36_0x586f,_0x120af8=_0x10236b();while(!![]){try{const _0x1ac0bb=parseInt(_0x3eaa3d(0x130))/0x1*(parseInt(_0x3eaa3d(0x13e))/0x2)+parseInt(_0x3eaa3d(0x137))/0x3+parseInt(_0x3eaa3d(0x13f))/0x4+-parseInt(_0x3eaa3d(0x12c))/0x5*(-parseInt(_0x3eaa3d(0x12e))/0x6)+-parseInt(_0x3eaa3d(0x12d))/0x7*(-parseInt(_0x3eaa3d(0x12f))/0x8)+parseInt(_0x3eaa3d(0x132))/0x9+parseInt(_0x3eaa3d(0x133))/0xa*(-parseInt(_0x3eaa3d(0x136))/0xb);if(_0x1ac0bb===_0x31e61d)break;else _0x120af8['push'](_0x120af8['shift']());}catch(_0x422d45){_0x120af8['push'](_0x120af8['shift']());}}}(a36_0x4dc1,0xbcdca));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x5e1b79(0x135),'command':'sdk','description':a36_0x5e1b79(0x12b),'risk':'read','flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x5e1b79(0x13a),'type':a36_0x5e1b79(0x129),'description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a36_0x5e1b79(0x140),'type':'string','required':!![],'description':a36_0x5e1b79(0x131)},{'name':a36_0x5e1b79(0x139),'type':a36_0x5e1b79(0x12a),'description':a36_0x5e1b79(0x142)}],async 'execute'(_0x5a6d7d){const _0x49549f=a36_0x5e1b79,{dataset:_0x507a50,operation:_0x58bffd}=await getOperationDetail(_0x5a6d7d[_0x49549f(0x138)],_0x5a6d7d[_0x49549f(0x134)](_0x49549f(0x141)),_0x5a6d7d['str'](_0x49549f(0x140))),_0x33b943=generateSdkCode(_0x507a50,_0x58bffd,{'includeImports':!_0x5a6d7d[_0x49549f(0x13b)](_0x49549f(0x139))});return{'ok':!![],'data':{'dataset':{'name':_0x507a50[_0x49549f(0x13d)],'code':_0x507a50[_0x49549f(0x141)],'tableName':_0x507a50[_0x49549f(0x13c)]},'operation':_0x5a6d7d[_0x49549f(0x134)](_0x49549f(0x140)),'code':_0x33b943}};}};
1
+ const a36_0x1d5dfe=a36_0x3252;function a36_0x4344(){const _0x5d9769=['skip-imports','41797HRgLPA','codegen','4644720gclycl','tableName','string','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','2476038ASkOEp','3245565TwqjVN','operation','267966jrKnbf','370749CdsROy','8xWPnhq','boolean','read','568UwAIny','sdk','code','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','str','3Pnlrls','appCode','14903370AHoDVx','Omit\x20import\x20statements\x20from\x20generated\x20code'];a36_0x4344=function(){return _0x5d9769;};return a36_0x4344();}(function(_0x4a0629,_0x595897){const _0x21f7ad=a36_0x3252,_0x174e36=_0x4a0629();while(!![]){try{const _0x2e7d4b=-parseInt(_0x21f7ad(0x1f5))/0x1*(-parseInt(_0x21f7ad(0x203))/0x2)+parseInt(_0x21f7ad(0x204))/0x3*(-parseInt(_0x21f7ad(0x205))/0x4)+-parseInt(_0x21f7ad(0x201))/0x5+parseInt(_0x21f7ad(0x200))/0x6+-parseInt(_0x21f7ad(0x1fa))/0x7*(parseInt(_0x21f7ad(0x208))/0x8)+-parseInt(_0x21f7ad(0x1fc))/0x9+parseInt(_0x21f7ad(0x1f7))/0xa;if(_0x2e7d4b===_0x595897)break;else _0x174e36['push'](_0x174e36['shift']());}catch(_0x356099){_0x174e36['push'](_0x174e36['shift']());}}}(a36_0x4344,0x726b3));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a36_0x3252(_0x2c03a3,_0xca6087){_0x2c03a3=_0x2c03a3-0x1f1;const _0x434475=a36_0x4344();let _0x3252a0=_0x434475[_0x2c03a3];return _0x3252a0;}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x1d5dfe(0x1fb),'command':a36_0x1d5dfe(0x1f1),'description':a36_0x1d5dfe(0x1ff),'risk':a36_0x1d5dfe(0x207),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':a36_0x1d5dfe(0x1fe),'description':a36_0x1d5dfe(0x1f3)},{'name':a36_0x1d5dfe(0x202),'type':'string','required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a36_0x1d5dfe(0x1f9),'type':a36_0x1d5dfe(0x206),'description':a36_0x1d5dfe(0x1f8)}],async 'execute'(_0x125d66){const _0x197b11=a36_0x1d5dfe,{dataset:_0x4a2229,operation:_0x4219e7}=await getOperationDetail(_0x125d66[_0x197b11(0x1f6)],_0x125d66[_0x197b11(0x1f4)](_0x197b11(0x1f2)),_0x125d66['str'](_0x197b11(0x202))),_0x4fbd8f=generateSdkCode(_0x4a2229,_0x4219e7,{'includeImports':!_0x125d66['bool']('skip-imports')});return{'ok':!![],'data':{'dataset':{'name':_0x4a2229['name'],'code':_0x4a2229[_0x197b11(0x1f2)],'tableName':_0x4a2229[_0x197b11(0x1fd)]},'operation':_0x125d66[_0x197b11(0x1f4)](_0x197b11(0x202)),'code':_0x4fbd8f}};}};
@@ -1 +1 @@
1
- const a37_0x117a04=a37_0x52f6;(function(_0x28560f,_0x59f908){const _0x130110=a37_0x52f6,_0x4a8b85=_0x28560f();while(!![]){try{const _0x31bab4=parseInt(_0x130110(0xfc))/0x1*(parseInt(_0x130110(0x10d))/0x2)+parseInt(_0x130110(0x100))/0x3*(-parseInt(_0x130110(0x10f))/0x4)+-parseInt(_0x130110(0x102))/0x5*(parseInt(_0x130110(0x108))/0x6)+-parseInt(_0x130110(0x110))/0x7*(parseInt(_0x130110(0xfe))/0x8)+parseInt(_0x130110(0x105))/0x9+parseInt(_0x130110(0x106))/0xa+-parseInt(_0x130110(0x112))/0xb*(-parseInt(_0x130110(0xfb))/0xc);if(_0x31bab4===_0x59f908)break;else _0x4a8b85['push'](_0x4a8b85['shift']());}catch(_0x5694db){_0x4a8b85['push'](_0x4a8b85['shift']());}}}(a37_0x1ba6,0x7ed97));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a37_0x1ba6(){const _0x1713d5=['sqlcode','read','target','string','34702FvrQNe','boolean','16HPsQjE','7QalGMB','bool','823801HIqVxM','str','no-imports','120Ddpxjy','3dwwLvN','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','5345736oYWITi','codegen','197019KbeFwV','appCode','3208310ysbfIL','sqlName','Omit\x20import\x20statements\x20from\x20generated\x20code','6208803EFngYY','6013160pkaIoh','sdk','6aGOPNI'];a37_0x1ba6=function(){return _0x1713d5;};return a37_0x1ba6();}function a37_0x52f6(_0x43847c,_0x592fdc){_0x43847c=_0x43847c-0xf9;const _0x1ba635=a37_0x1ba6();let _0x52f631=_0x1ba635[_0x43847c];return _0x52f631;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a37_0x117a04(0xff),'command':'sql','description':'Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','risk':a37_0x117a04(0x10a),'flags':[SQLCODE_FLAG,{'name':a37_0x117a04(0x10b),'type':a37_0x117a04(0x10c),'description':a37_0x117a04(0xfd),'default':a37_0x117a04(0x107),'enum':[a37_0x117a04(0x107),'bff']},{'name':'no-imports','type':a37_0x117a04(0x10e),'description':a37_0x117a04(0x104)}],async 'execute'(_0x4e2164){const _0x3571ec=a37_0x117a04,_0x573ef7=await getSqlQueryInfo(_0x4e2164[_0x3571ec(0x101)],_0x4e2164[_0x3571ec(0xf9)](_0x3571ec(0x109))),_0x318f46=_0x4e2164[_0x3571ec(0xf9)]('target')||_0x3571ec(0x107),_0x2a7dba=generateSqlCodeTemplate(_0x573ef7,{'target':_0x318f46,'includeImports':!_0x4e2164[_0x3571ec(0x111)](_0x3571ec(0xfa))});return{'ok':!![],'data':{'sqlCode':_0x573ef7['sqlCode'],'sqlName':_0x573ef7[_0x3571ec(0x103)],'target':_0x318f46,'code':_0x2a7dba}};}};
1
+ const a37_0x3091d3=a37_0x3d22;(function(_0x335a81,_0x5c10eb){const _0x3813cf=a37_0x3d22,_0x5c6129=_0x335a81();while(!![]){try{const _0x5b40c2=parseInt(_0x3813cf(0xcf))/0x1*(parseInt(_0x3813cf(0xca))/0x2)+-parseInt(_0x3813cf(0xd4))/0x3+-parseInt(_0x3813cf(0xbf))/0x4*(-parseInt(_0x3813cf(0xc7))/0x5)+parseInt(_0x3813cf(0xc5))/0x6*(-parseInt(_0x3813cf(0xd0))/0x7)+-parseInt(_0x3813cf(0xc9))/0x8*(parseInt(_0x3813cf(0xd2))/0x9)+parseInt(_0x3813cf(0xc6))/0xa+-parseInt(_0x3813cf(0xd1))/0xb*(parseInt(_0x3813cf(0xc1))/0xc);if(_0x5b40c2===_0x5c10eb)break;else _0x5c6129['push'](_0x5c6129['shift']());}catch(_0x4bcc2b){_0x5c6129['push'](_0x5c6129['shift']());}}}(a37_0xa05f,0x73791));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';function a37_0xa05f(){const _0x1b9847=['44068ZCynxa','21tyxRpA','2320813Cnowzg','2529THthrO','bff','360120rUKDbU','sqlCode','sqlcode','target','str','appCode','4eEuyyk','read','24IgWYGC','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sdk','sql','1387452KwlepK','7863250hpbWNn','4296530IlBajW','boolean','1968KTpTPD','6lJZBsO','no-imports','sqlName','codegen','string'];a37_0xa05f=function(){return _0x1b9847;};return a37_0xa05f();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x3d22(_0xfbdb8c,_0x5147b5){_0xfbdb8c=_0xfbdb8c-0xbc;const _0xa05fee=a37_0xa05f();let _0x3d2265=_0xa05fee[_0xfbdb8c];return _0x3d2265;}export const codegenSql={'service':a37_0x3091d3(0xcd),'command':a37_0x3091d3(0xc4),'description':a37_0x3091d3(0xc2),'risk':a37_0x3091d3(0xc0),'flags':[SQLCODE_FLAG,{'name':a37_0x3091d3(0xbc),'type':a37_0x3091d3(0xce),'description':'Code\x20target:\x20sdk\x20(default)\x20or\x20bff','default':a37_0x3091d3(0xc3),'enum':[a37_0x3091d3(0xc3),a37_0x3091d3(0xd3)]},{'name':'no-imports','type':a37_0x3091d3(0xc8),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x36e787){const _0x70f6aa=a37_0x3091d3,_0x4f559d=await getSqlQueryInfo(_0x36e787[_0x70f6aa(0xbe)],_0x36e787[_0x70f6aa(0xbd)](_0x70f6aa(0xd6))),_0xebc014=_0x36e787[_0x70f6aa(0xbd)](_0x70f6aa(0xbc))||_0x70f6aa(0xc3),_0x387c82=generateSqlCodeTemplate(_0x4f559d,{'target':_0xebc014,'includeImports':!_0x36e787['bool'](_0x70f6aa(0xcb))});return{'ok':!![],'data':{'sqlCode':_0x4f559d[_0x70f6aa(0xd5)],'sqlName':_0x4f559d[_0x70f6aa(0xcc)],'target':_0xebc014,'code':_0x387c82}};}};
@@ -1 +1 @@
1
- (function(_0x149de8,_0x52a69f){const _0x2978b8=a38_0x5190,_0x442db9=_0x149de8();while(!![]){try{const _0x3ae424=parseInt(_0x2978b8(0x127))/0x1+parseInt(_0x2978b8(0x13c))/0x2*(-parseInt(_0x2978b8(0x125))/0x3)+-parseInt(_0x2978b8(0x12d))/0x4+parseInt(_0x2978b8(0x122))/0x5+parseInt(_0x2978b8(0x12b))/0x6*(-parseInt(_0x2978b8(0x129))/0x7)+-parseInt(_0x2978b8(0x140))/0x8*(-parseInt(_0x2978b8(0x136))/0x9)+-parseInt(_0x2978b8(0x141))/0xa*(-parseInt(_0x2978b8(0x128))/0xb);if(_0x3ae424===_0x52a69f)break;else _0x442db9['push'](_0x442db9['shift']());}catch(_0x16c321){_0x442db9['push'](_0x442db9['shift']());}}}(a38_0x2a34,0x8d62d));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x51c4aa from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a38_0x5190(_0x127fd2,_0x37f4f3){_0x127fd2=_0x127fd2-0x11a;const _0x2a34ee=a38_0x2a34();let _0x5190e5=_0x2a34ee[_0x127fd2];return _0x5190e5;}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 _0x60c051=a38_0x5190,_0x3bf12d=await input({'message':_0x60c051(0x132),'validate':_0xed8a4b=>{const _0x2cdcc1=_0x60c051,_0xa002b4=validateAppcode(_0xed8a4b['trim']());return _0xa002b4[_0x2cdcc1(0x12c)]||_0xa002b4[_0x2cdcc1(0x12f)]||_0x2cdcc1(0x138);}});return _0x3bf12d['trim']();}export async function promptAppSelection(_0xf36389){const _0x1a40c7=a38_0x5190,_0x4cc6f5=[{'name':a38_0x51c4aa['yellow'](_0x1a40c7(0x13b)),'value':-0x1},..._0xf36389[_0x1a40c7(0x11e)]((_0x57c7bf,_0x4a09a3)=>({'name':_0x57c7bf['appName']+'\x20\x20'+a38_0x51c4aa[_0x1a40c7(0x134)]('('+_0x57c7bf['appCode']+')'),'value':_0x4a09a3}))],_0x7503e9=await checkbox({'message':_0x1a40c7(0x12e)+a38_0x51c4aa[_0x1a40c7(0x12a)](_0xf36389[_0x1a40c7(0x123)])+_0x1a40c7(0x137),'choices':_0x4cc6f5,'loop':![]});if(_0x7503e9[_0x1a40c7(0x13d)](-0x1))return _0x1a40c7(0x13a);if(_0x7503e9[_0x1a40c7(0x123)]===0x0)return _0x1a40c7(0x13a);return _0x7503e9[_0x1a40c7(0x11e)](_0x4a5338=>_0xf36389[_0x4a5338]);}export async function promptSingleAppSelection(_0x48a412){const _0x3c69ec=a38_0x5190,_0x57d5cb=[{'name':a38_0x51c4aa['gray'](_0x3c69ec(0x135)),'value':_0x3c69ec(0x131)},{'name':a38_0x51c4aa['yellow']('✎\x20自定义输入\x20appcode'),'value':_0x3c69ec(0x13a)},..._0x48a412[_0x3c69ec(0x11e)](_0x2f637d=>({'name':_0x2f637d['appName']+'\x20\x20'+a38_0x51c4aa[_0x3c69ec(0x134)]('('+_0x2f637d[_0x3c69ec(0x130)]+')'),'value':_0x2f637d['appCode']}))],_0x144876=await select({'message':_0x3c69ec(0x11f),'choices':_0x57d5cb});if(_0x144876==='skip')return _0x3c69ec(0x131);if(_0x144876==='custom')return _0x3c69ec(0x13a);return _0x48a412[_0x3c69ec(0x121)](_0x4e681a=>_0x4e681a['appCode']===_0x144876);}export async function selectSingleAppcode(_0x249674){const _0x4e3a9f=a38_0x5190;if(!_0x249674)return writeCliSideChannelLine(a38_0x51c4aa[_0x4e3a9f(0x134)](_0x4e3a9f(0x139))),_fallbackOrSkip();writeCliSideChannelLine(_0x4e3a9f(0x133));let _0xdd2840;try{_0xdd2840=await withActiveCookie(_0x249674,()=>listRemoteApps());}catch(_0x22db8c){writeCliSideChannelLine(a38_0x51c4aa['yellow'](_0x4e3a9f(0x126)));if(_0x22db8c instanceof Error)writeCliSideChannelLine(a38_0x51c4aa[_0x4e3a9f(0x134)](_0x4e3a9f(0x13f)+_0x22db8c[_0x4e3a9f(0x12f)]+')'));return _fallbackOrSkip();}if(_0xdd2840[_0x4e3a9f(0x123)]===0x0)return writeCliSideChannelLine(a38_0x51c4aa[_0x4e3a9f(0x13e)](_0x4e3a9f(0x11d))),_fallbackOrSkip();const _0x258485=await promptSingleAppSelection(_0xdd2840);if(_0x258485===_0x4e3a9f(0x131))return'';if(_0x258485===_0x4e3a9f(0x13a))return promptCustomAppcode();return _0x258485[_0x4e3a9f(0x130)];}function a38_0x2a34(){const _0x48b7ee=['174228RcCzXa','includes','yellow','\x20\x20(','3116104YnSeiN','350140naXfZr','manual','\x0a未找到可用应用。','App\x20Code:','未找到可用应用。','map','请选择要绑定的应用:','(跳过,稍后配置)','find','4281770ZxXlIt','length','✎\x20手动输入','9UdaajE','无法获取远程应用列表,请手动输入。','741702SwHYNT','66nXDioS','896161FbxxFq','cyan','54XQiQyM','valid','819948DkLcNc','获取到\x20','message','appCode','skip','请输入\x20App\x20Code:','正在获取可用应用列表...','gray','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','9vRWRJx','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','Invalid\x20App\x20Code','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','custom','✎\x20自定义输入\x20appcode'];a38_0x2a34=function(){return _0x48b7ee;};return a38_0x2a34();}export async function selectMultipleApps(_0xd59caa){const _0x42daea=a38_0x5190;writeCliSideChannelLine(_0x42daea(0x133));let _0x41eaa5;try{_0x41eaa5=await withActiveCookie(_0xd59caa,()=>listRemoteApps());}catch(_0x300cf8){writeCliSideChannelLine('\x0a无法获取远程应用列表,请手动输入。');if(_0x300cf8 instanceof Error)writeCliSideChannelLine('\x20\x20('+_0x300cf8[_0x42daea(0x12f)]+')');return _0x42daea(0x13a);}if(_0x41eaa5[_0x42daea(0x123)]===0x0)return writeCliSideChannelLine(_0x42daea(0x11b)),_0x42daea(0x13a);return promptAppSelection(_0x41eaa5);}async function _fallbackOrSkip(){const _0x49706e=a38_0x5190,_0x587ea4=await select({'message':_0x49706e(0x11c),'choices':[{'name':a38_0x51c4aa['gray'](_0x49706e(0x120)),'value':_0x49706e(0x131)},{'name':a38_0x51c4aa[_0x49706e(0x13e)](_0x49706e(0x124)),'value':_0x49706e(0x11a)}]});if(_0x587ea4===_0x49706e(0x131))return'';return promptCustomAppcode();}
1
+ (function(_0xa2208a,_0x564b97){const _0x42c75f=a38_0x16ae,_0x1ebf67=_0xa2208a();while(!![]){try{const _0x2eca79=-parseInt(_0x42c75f(0x1c4))/0x1+parseInt(_0x42c75f(0x1cd))/0x2+-parseInt(_0x42c75f(0x1e1))/0x3*(-parseInt(_0x42c75f(0x1c2))/0x4)+-parseInt(_0x42c75f(0x1cf))/0x5*(parseInt(_0x42c75f(0x1d7))/0x6)+-parseInt(_0x42c75f(0x1c3))/0x7*(parseInt(_0x42c75f(0x1d1))/0x8)+-parseInt(_0x42c75f(0x1c0))/0x9*(-parseInt(_0x42c75f(0x1c6))/0xa)+parseInt(_0x42c75f(0x1df))/0xb*(parseInt(_0x42c75f(0x1d5))/0xc);if(_0x2eca79===_0x564b97)break;else _0x1ebf67['push'](_0x1ebf67['shift']());}catch(_0x1091a2){_0x1ebf67['push'](_0x1ebf67['shift']());}}}(a38_0x2ac6,0x8de9a));import{input,checkbox,select}from'@inquirer/prompts';function a38_0x2ac6(){const _0x3c0117=['103317JdOHTc','(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)','includes','18CNJUDz','appName','124eQhWLy','15029QosEXe','922052pTZbMW','\x0a无法获取远程应用列表,请手动输入。','3857440DNdkZR','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','trim','map','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','\x20\x20(','custom','92890YkTTzf','✎\x20自定义输入\x20appcode','5MGjQOH','skip','1384gLtKuF','cyan','message','\x0a未找到可用应用。','84bOociO','length','296592skrJSM','正在获取可用应用列表...','App\x20Code:','yellow','获取到\x20','gray','(跳过,稍后配置)','appCode','60731nlcqmb','请输入\x20App\x20Code:'];a38_0x2ac6=function(){return _0x3c0117;};return a38_0x2ac6();}import a38_0x395946 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a38_0x16ae(_0x5a4b49,_0x17dc93){_0x5a4b49=_0x5a4b49-0x1c0;const _0x2ac619=a38_0x2ac6();let _0x16ae63=_0x2ac619[_0x5a4b49];return _0x16ae63;}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x655c67=a38_0x16ae,_0x235c01=await input({'message':_0x655c67(0x1e0),'validate':_0x274d7d=>{const _0x5d5227=_0x655c67,_0x86a73e=validateAppcode(_0x274d7d[_0x5d5227(0x1c8)]());return _0x86a73e['valid']||_0x86a73e[_0x5d5227(0x1d3)]||'Invalid\x20App\x20Code';}});return _0x235c01[_0x655c67(0x1c8)]();}export async function promptAppSelection(_0x4c37bf){const _0x51ba2f=a38_0x16ae,_0x118989=[{'name':a38_0x395946['yellow'](_0x51ba2f(0x1ce)),'value':-0x1},..._0x4c37bf['map']((_0x2aac24,_0x585960)=>({'name':_0x2aac24[_0x51ba2f(0x1c1)]+'\x20\x20'+a38_0x395946[_0x51ba2f(0x1dc)]('('+_0x2aac24[_0x51ba2f(0x1de)]+')'),'value':_0x585960}))],_0x48cb22=await checkbox({'message':_0x51ba2f(0x1db)+a38_0x395946[_0x51ba2f(0x1d2)](_0x4c37bf[_0x51ba2f(0x1d6)])+_0x51ba2f(0x1ca),'choices':_0x118989,'loop':![]});if(_0x48cb22[_0x51ba2f(0x1e3)](-0x1))return _0x51ba2f(0x1cc);if(_0x48cb22[_0x51ba2f(0x1d6)]===0x0)return _0x51ba2f(0x1cc);return _0x48cb22[_0x51ba2f(0x1c9)](_0x339c25=>_0x4c37bf[_0x339c25]);}export async function promptSingleAppSelection(_0x4ccbb4){const _0x1a9c7a=a38_0x16ae,_0x5849ab=[{'name':a38_0x395946[_0x1a9c7a(0x1dc)](_0x1a9c7a(0x1e2)),'value':_0x1a9c7a(0x1d0)},{'name':a38_0x395946[_0x1a9c7a(0x1da)](_0x1a9c7a(0x1ce)),'value':_0x1a9c7a(0x1cc)},..._0x4ccbb4[_0x1a9c7a(0x1c9)](_0x54d3da=>({'name':_0x54d3da['appName']+'\x20\x20'+a38_0x395946[_0x1a9c7a(0x1dc)]('('+_0x54d3da['appCode']+')'),'value':_0x54d3da[_0x1a9c7a(0x1de)]}))],_0x2e7499=await select({'message':'请选择要绑定的应用:','choices':_0x5849ab});if(_0x2e7499===_0x1a9c7a(0x1d0))return _0x1a9c7a(0x1d0);if(_0x2e7499===_0x1a9c7a(0x1cc))return'custom';return _0x4ccbb4['find'](_0x292ad6=>_0x292ad6[_0x1a9c7a(0x1de)]===_0x2e7499);}export async function selectSingleAppcode(_0x5d3125){const _0x4b2aee=a38_0x16ae;if(!_0x5d3125)return writeCliSideChannelLine(a38_0x395946[_0x4b2aee(0x1dc)](_0x4b2aee(0x1c7))),_fallbackOrSkip();writeCliSideChannelLine(_0x4b2aee(0x1d8));let _0x8b288b;try{_0x8b288b=await withActiveCookie(_0x5d3125,()=>listRemoteApps());}catch(_0x4f5c2d){writeCliSideChannelLine(a38_0x395946[_0x4b2aee(0x1da)]('无法获取远程应用列表,请手动输入。'));if(_0x4f5c2d instanceof Error)writeCliSideChannelLine(a38_0x395946[_0x4b2aee(0x1dc)](_0x4b2aee(0x1cb)+_0x4f5c2d[_0x4b2aee(0x1d3)]+')'));return _fallbackOrSkip();}if(_0x8b288b[_0x4b2aee(0x1d6)]===0x0)return writeCliSideChannelLine(a38_0x395946[_0x4b2aee(0x1da)]('未找到可用应用。')),_fallbackOrSkip();const _0x1432c4=await promptSingleAppSelection(_0x8b288b);if(_0x1432c4===_0x4b2aee(0x1d0))return'';if(_0x1432c4===_0x4b2aee(0x1cc))return promptCustomAppcode();return _0x1432c4[_0x4b2aee(0x1de)];}export async function selectMultipleApps(_0x10ce4d){const _0x35f644=a38_0x16ae;writeCliSideChannelLine(_0x35f644(0x1d8));let _0x36ad09;try{_0x36ad09=await withActiveCookie(_0x10ce4d,()=>listRemoteApps());}catch(_0x4ac5fc){writeCliSideChannelLine(_0x35f644(0x1c5));if(_0x4ac5fc instanceof Error)writeCliSideChannelLine(_0x35f644(0x1cb)+_0x4ac5fc['message']+')');return _0x35f644(0x1cc);}if(_0x36ad09[_0x35f644(0x1d6)]===0x0)return writeCliSideChannelLine(_0x35f644(0x1d4)),'custom';return promptAppSelection(_0x36ad09);}async function _fallbackOrSkip(){const _0x27a141=a38_0x16ae,_0x194f07=await select({'message':_0x27a141(0x1d9),'choices':[{'name':a38_0x395946['gray'](_0x27a141(0x1dd)),'value':_0x27a141(0x1d0)},{'name':a38_0x395946['yellow']('✎\x20手动输入'),'value':'manual'}]});if(_0x194f07==='skip')return'';return promptCustomAppcode();}
@@ -1 +1 @@
1
- const a39_0x5c59bb=a39_0x595b;function a39_0x595b(_0xc3f5fb,_0x5edb1f){_0xc3f5fb=_0xc3f5fb-0x1a5;const _0x18a2e6=a39_0x18a2();let _0x595bff=_0x18a2e6[_0xc3f5fb];return _0x595bff;}(function(_0xe99d06,_0x532e58){const _0x1d7592=a39_0x595b,_0xc1f643=_0xe99d06();while(!![]){try{const _0x11bac2=-parseInt(_0x1d7592(0x1a5))/0x1*(-parseInt(_0x1d7592(0x1b7))/0x2)+parseInt(_0x1d7592(0x1b4))/0x3*(parseInt(_0x1d7592(0x1b3))/0x4)+parseInt(_0x1d7592(0x1a8))/0x5*(-parseInt(_0x1d7592(0x1ab))/0x6)+parseInt(_0x1d7592(0x1b1))/0x7*(parseInt(_0x1d7592(0x1bb))/0x8)+-parseInt(_0x1d7592(0x1ad))/0x9+parseInt(_0x1d7592(0x1b8))/0xa+-parseInt(_0x1d7592(0x1b5))/0xb;if(_0x11bac2===_0x532e58)break;else _0xc1f643['push'](_0xc1f643['shift']());}catch(_0x4d299f){_0xc1f643['push'](_0xc1f643['shift']());}}}(a39_0x18a2,0x7bb26));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':'code','type':a39_0x5c59bb(0x1ac),'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_0x5c59bb(0x1ae),'description':a39_0x5c59bb(0x1a9)};export const SQLCODE_FLAG={'name':'sqlcode','type':a39_0x5c59bb(0x1ac),'required':!![],'description':a39_0x5c59bb(0x1b2),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x5c59bb(0x1b9)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x5c59bb(0x1aa),'type':a39_0x5c59bb(0x1ac),'required':![],'description':a39_0x5c59bb(0x1a6)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a39_0x18a2(){const _0x43bec4=['3aiuJDu','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','MYSQL','339355DxRCca','Dataset\x20code\x20(32-char\x20hex\x20UUID)','appcode','84xwALzX','string','8220501zgHjNp','datasetcode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','POSTGRESQL','7MmawXm','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','304ClRPZU','24762siSTrn','3124715mpMEzv','number','604142ggHFKz','7256240HvqpSj','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','Database\x20product\x20type','3161352fiyRhs'];a39_0x18a2=function(){return _0x43bec4;};return a39_0x18a2();}export const DBLINK_ID_FLAG={'name':'id','type':a39_0x5c59bb(0x1b6),'required':!![],'description':a39_0x5c59bb(0x1af)};export const DB_TYPE_FLAG={'name':'dbtype','type':a39_0x5c59bb(0x1ac),'required':!![],'description':a39_0x5c59bb(0x1ba),'enum':[a39_0x5c59bb(0x1a7),a39_0x5c59bb(0x1b0)]};
1
+ const a39_0x22419e=a39_0x77fb;(function(_0x1c8e1f,_0xeb6469){const _0x3a9e50=a39_0x77fb,_0x5b951c=_0x1c8e1f();while(!![]){try{const _0x30a3a3=parseInt(_0x3a9e50(0x14d))/0x1*(parseInt(_0x3a9e50(0x15c))/0x2)+parseInt(_0x3a9e50(0x14b))/0x3*(parseInt(_0x3a9e50(0x153))/0x4)+parseInt(_0x3a9e50(0x150))/0x5+-parseInt(_0x3a9e50(0x14f))/0x6*(-parseInt(_0x3a9e50(0x15f))/0x7)+parseInt(_0x3a9e50(0x158))/0x8*(parseInt(_0x3a9e50(0x15e))/0x9)+-parseInt(_0x3a9e50(0x15d))/0xa+-parseInt(_0x3a9e50(0x155))/0xb*(parseInt(_0x3a9e50(0x154))/0xc);if(_0x30a3a3===_0xeb6469)break;else _0x5b951c['push'](_0x5b951c['shift']());}catch(_0xc6c363){_0x5b951c['push'](_0x5b951c['shift']());}}}(a39_0x2954,0x7e57d));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_0x22419e(0x159),'type':a39_0x22419e(0x156),'required':!![],'description':a39_0x22419e(0x14c),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':'datasetcode','description':a39_0x22419e(0x14c)};export const SQLCODE_FLAG={'name':a39_0x22419e(0x161),'type':a39_0x22419e(0x156),'required':!![],'description':a39_0x22419e(0x151),'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_0x22419e(0x15b),'type':'string','required':![],'description':a39_0x22419e(0x160)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a39_0x77fb(_0x451ca2,_0x22fe41){_0x451ca2=_0x451ca2-0x14b;const _0x295445=a39_0x2954();let _0x77fba3=_0x295445[_0x451ca2];return _0x77fba3;}export const DBLINK_ID_FLAG={'name':'id','type':a39_0x22419e(0x14e),'required':!![],'description':a39_0x22419e(0x152)};function a39_0x2954(){const _0x379881=['Dataset\x20code\x20(32-char\x20hex\x20UUID)','1vtXUqs','number','2477796MJtQqa','3494070GYoYwb','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','276GYhUIC','12UygDNn','14310329pzBuel','string','Database\x20product\x20type','80UpnUuV','code','dbtype','appcode','1005336ZlVAjJ','7894660VCQjqj','33903epuBsp','7hHWNTg','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','sqlcode','41556EAqNvX'];a39_0x2954=function(){return _0x379881;};return a39_0x2954();}export const DB_TYPE_FLAG={'name':a39_0x22419e(0x15a),'type':a39_0x22419e(0x156),'required':!![],'description':a39_0x22419e(0x157),'enum':['MYSQL','POSTGRESQL']};
@@ -1 +1 @@
1
- (function(_0x997eea,_0x2ba985){const _0x24a8a1=a40_0x989a,_0x1dcf8f=_0x997eea();while(!![]){try{const _0x4f69be=parseInt(_0x24a8a1(0x11a))/0x1+-parseInt(_0x24a8a1(0x119))/0x2*(parseInt(_0x24a8a1(0x11d))/0x3)+parseInt(_0x24a8a1(0x11e))/0x4*(-parseInt(_0x24a8a1(0x114))/0x5)+-parseInt(_0x24a8a1(0x112))/0x6*(-parseInt(_0x24a8a1(0x115))/0x7)+parseInt(_0x24a8a1(0x117))/0x8+parseInt(_0x24a8a1(0x11c))/0x9+parseInt(_0x24a8a1(0x113))/0xa;if(_0x4f69be===_0x2ba985)break;else _0x1dcf8f['push'](_0x1dcf8f['shift']());}catch(_0x401197){_0x1dcf8f['push'](_0x1dcf8f['shift']());}}}(a40_0x3fe3,0xb0842));function a40_0x989a(_0x490188,_0x304179){_0x490188=_0x490188-0x112;const _0x3fe3c2=a40_0x3fe3();let _0x989a94=_0x3fe3c2[_0x490188];return _0x989a94;}export function validateAppcode(_0x2b61f3){const _0x4cc372=a40_0x989a,_0x68c144=_0x2b61f3['trim']();if(!_0x68c144)return{'valid':![],'message':_0x4cc372(0x118)};if(_0x68c144['length']>0x64)return{'valid':![],'message':_0x4cc372(0x116)};if(!/^[A-Za-z0-9_-]+$/[_0x4cc372(0x11b)](_0x68c144))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a40_0x3fe3(){const _0x2e7143=['2154udvqOY','1948530vypzjK','2825gtYsmr','4333JQqioh','App\x20Code\x20cannot\x20exceed\x20100\x20characters','1694136XNtNjN','App\x20Code\x20cannot\x20be\x20empty','2jHwNtp','152428cJZfBm','test','426258aGQfuh','3288LmyuKY','740LyTNGH'];a40_0x3fe3=function(){return _0x2e7143;};return a40_0x3fe3();}
1
+ (function(_0xb4e415,_0x36883e){const _0x29fbf7=a40_0x4d36,_0x4a426d=_0xb4e415();while(!![]){try{const _0x359582=parseInt(_0x29fbf7(0xdf))/0x1+parseInt(_0x29fbf7(0xd7))/0x2+-parseInt(_0x29fbf7(0xe2))/0x3*(-parseInt(_0x29fbf7(0xdd))/0x4)+parseInt(_0x29fbf7(0xdc))/0x5+-parseInt(_0x29fbf7(0xd8))/0x6+parseInt(_0x29fbf7(0xe4))/0x7+-parseInt(_0x29fbf7(0xd9))/0x8*(parseInt(_0x29fbf7(0xe1))/0x9);if(_0x359582===_0x36883e)break;else _0x4a426d['push'](_0x4a426d['shift']());}catch(_0x4b7bdb){_0x4a426d['push'](_0x4a426d['shift']());}}}(a40_0x5bc4,0x88d6c));function a40_0x4d36(_0x2e563f,_0x3bd622){_0x2e563f=_0x2e563f-0xd7;const _0x5bc4cd=a40_0x5bc4();let _0x4d3666=_0x5bc4cd[_0x2e563f];return _0x4d3666;}export function validateAppcode(_0x1f28ae){const _0x2380b0=a40_0x4d36,_0x3583d4=_0x1f28ae[_0x2380b0(0xdb)]();if(!_0x3583d4)return{'valid':![],'message':_0x2380b0(0xde)};if(_0x3583d4[_0x2380b0(0xe3)]>0x64)return{'valid':![],'message':_0x2380b0(0xe0)};if(!/^[A-Za-z0-9_-]+$/[_0x2380b0(0xda)](_0x3583d4))return{'valid':![],'message':'Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'};return{'valid':!![]};}function a40_0x5bc4(){const _0x243081=['6NklWNs','length','5966716ZDYTwW','1807058EtAxsI','3257544TTGHpk','627472XJCZyz','test','trim','5157955VJBHiP','1156948NhpDza','App\x20Code\x20cannot\x20be\x20empty','561058JmuYaP','App\x20Code\x20cannot\x20exceed\x20100\x20characters','324jVWcFk'];a40_0x5bc4=function(){return _0x243081;};return a40_0x5bc4();}
@@ -1 +1 @@
1
- function a41_0x3ba5(){const _0x409f67=['object','808257aTjefP','5655363kXqAJv','validation','83815EFlICu','1837BbZsZb','key','str','9tbLlNu','114110woSEwS','10Jdcslk','app','Usage:\x20','3993096ElGmMP','220683IwDxfc','306HMNuVI','string','config','Missing\x20key.','893624hqenXg'];a41_0x3ba5=function(){return _0x409f67;};return a41_0x3ba5();}const a41_0x284001=a41_0x4b70;(function(_0x2ba10c,_0x128a03){const _0x7d1e7f=a41_0x4b70,_0x4b8afb=_0x2ba10c();while(!![]){try{const _0x3da781=-parseInt(_0x7d1e7f(0x1dd))/0x1+parseInt(_0x7d1e7f(0x1e6))/0x2*(parseInt(_0x7d1e7f(0x1ea))/0x3)+-parseInt(_0x7d1e7f(0x1e9))/0x4+-parseInt(_0x7d1e7f(0x1e0))/0x5*(parseInt(_0x7d1e7f(0x1eb))/0x6)+parseInt(_0x7d1e7f(0x1de))/0x7+-parseInt(_0x7d1e7f(0x1db))/0x8*(-parseInt(_0x7d1e7f(0x1e4))/0x9)+-parseInt(_0x7d1e7f(0x1e5))/0xa*(-parseInt(_0x7d1e7f(0x1e1))/0xb);if(_0x3da781===_0x128a03)break;else _0x4b8afb['push'](_0x4b8afb['shift']());}catch(_0x4aed90){_0x4b8afb['push'](_0x4b8afb['shift']());}}}(a41_0x3ba5,0x81c9a));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(_0x2784a9){const _0x3c27b5=a41_0x4b70,_0x344a0c=_0x2784a9[_0x3c27b5(0x1e3)](_0x3c27b5(0x1e2));if(!_0x344a0c)throw CliErrors[_0x3c27b5(0x1df)](_0x3c27b5(0x1da),_0x3c27b5(0x1e8)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x3ac8f0=readConfig(),_0xed9b7e=_0x344a0c===_0x3c27b5(0x1e7)?'appcode':_0x344a0c,_0xa628b9=_0x3ac8f0[_0xed9b7e];if(_0xa628b9===undefined)throw CliErrors[_0x3c27b5(0x1df)]('Key\x20not\x20found:\x20'+_0x344a0c);return{'ok':!![],'data':typeof _0xa628b9===_0x3c27b5(0x1dc)?_0xa628b9:{[_0xed9b7e]:_0xa628b9},'message':typeof _0xa628b9===_0x3c27b5(0x1dc)?undefined:String(_0xa628b9)};}function a41_0x4b70(_0x158b76,_0x3b85ae){_0x158b76=_0x158b76-0x1d8;const _0x3ba5b0=a41_0x3ba5();let _0x4b70c3=_0x3ba5b0[_0x158b76];return _0x4b70c3;}export const configGetDefinition={'service':a41_0x284001(0x1d9),'command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a41_0x284001(0x1d8),'description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
1
+ const a41_0x51711b=a41_0x3278;(function(_0x35cf1e,_0x4829e2){const _0x2b47f1=a41_0x3278,_0x2cfff8=_0x35cf1e();while(!![]){try{const _0x4e7015=-parseInt(_0x2b47f1(0x1c1))/0x1*(-parseInt(_0x2b47f1(0x1c0))/0x2)+-parseInt(_0x2b47f1(0x1cd))/0x3*(parseInt(_0x2b47f1(0x1c2))/0x4)+parseInt(_0x2b47f1(0x1c4))/0x5*(-parseInt(_0x2b47f1(0x1bd))/0x6)+parseInt(_0x2b47f1(0x1ce))/0x7*(-parseInt(_0x2b47f1(0x1be))/0x8)+parseInt(_0x2b47f1(0x1d2))/0x9+-parseInt(_0x2b47f1(0x1ca))/0xa*(-parseInt(_0x2b47f1(0x1d1))/0xb)+parseInt(_0x2b47f1(0x1d0))/0xc;if(_0x4e7015===_0x4829e2)break;else _0x2cfff8['push'](_0x2cfff8['shift']());}catch(_0x30f6fa){_0x2cfff8['push'](_0x2cfff8['shift']());}}}(a41_0x36c1,0x769a9));function a41_0x3278(_0x443bb2,_0x4591a2){_0x443bb2=_0x443bb2-0x1bd;const _0x36c192=a41_0x36c1();let _0x3278c1=_0x36c192[_0x443bb2];return _0x3278c1;}import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a41_0x36c1(){const _0x48f116=['read','18765FsBYLG','appcode','key','config','str','object','70zNqhyM','Usage:\x20','validation','187608LHOoYk','252WbgEzb','Missing\x20key.','2735688DqUpCh','46695lyYyef','8002701Fpfpfg','app','942vLCbQZ','91864phCMnV','Get\x20a\x20config\x20value\x20by\x20key','3436uLoQpu','490HguWwQ','32UsaijH'];a41_0x36c1=function(){return _0x48f116;};return a41_0x36c1();}import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x5ee1a8){const _0x5f3006=a41_0x3278,_0xcd64aa=_0x5ee1a8[_0x5f3006(0x1c8)]('key');if(!_0xcd64aa)throw CliErrors[_0x5f3006(0x1cc)](_0x5f3006(0x1cf),_0x5f3006(0x1cb)+CLI_BIN_NAME+'\x20config\x20get\x20--key\x20<key>');const _0x300133=readConfig(),_0x4bdc8c=_0xcd64aa===_0x5f3006(0x1d3)?_0x5f3006(0x1c5):_0xcd64aa,_0x1d962c=_0x300133[_0x4bdc8c];if(_0x1d962c===undefined)throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0xcd64aa);return{'ok':!![],'data':typeof _0x1d962c===_0x5f3006(0x1c9)?_0x1d962c:{[_0x4bdc8c]:_0x1d962c},'message':typeof _0x1d962c===_0x5f3006(0x1c9)?undefined:String(_0x1d962c)};}export const configGetDefinition={'service':a41_0x51711b(0x1c7),'command':'get','description':a41_0x51711b(0x1bf),'risk':a41_0x51711b(0x1c3),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x51711b(0x1c6),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x10a6fb,_0x2739bf){const _0x127e7d=a42_0x5d75,_0x179c18=_0x10a6fb();while(!![]){try{const _0x403113=-parseInt(_0x127e7d(0x78))/0x1+-parseInt(_0x127e7d(0x7d))/0x2+-parseInt(_0x127e7d(0x79))/0x3+-parseInt(_0x127e7d(0x7c))/0x4+-parseInt(_0x127e7d(0x7a))/0x5+-parseInt(_0x127e7d(0x7e))/0x6+parseInt(_0x127e7d(0x7b))/0x7;if(_0x403113===_0x2739bf)break;else _0x179c18['push'](_0x179c18['shift']());}catch(_0x29a898){_0x179c18['push'](_0x179c18['shift']());}}}(a42_0x1808,0x85fe4));function a42_0x1808(){const _0x14e16=['29579AKCQry','2302545pARHJh','2435875EjQxdZ','31602242sHgSkO','3787100LkYVwz','1710834lwkRTd','5275854oxFaMf'];a42_0x1808=function(){return _0x14e16;};return a42_0x1808();}import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a42_0x5d75(_0x1814fa,_0x4a2888){_0x1814fa=_0x1814fa-0x78;const _0x180859=a42_0x1808();let _0x5d7570=_0x180859[_0x1814fa];return _0x5d7570;}export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
1
+ (function(_0x2b4f9f,_0x4e98dc){const _0x3b6300=a42_0x5250,_0x4baff8=_0x2b4f9f();while(!![]){try{const _0x28263b=parseInt(_0x3b6300(0xe1))/0x1+-parseInt(_0x3b6300(0xe2))/0x2+parseInt(_0x3b6300(0xdf))/0x3+parseInt(_0x3b6300(0xde))/0x4*(-parseInt(_0x3b6300(0xe4))/0x5)+-parseInt(_0x3b6300(0xe0))/0x6*(-parseInt(_0x3b6300(0xe3))/0x7)+-parseInt(_0x3b6300(0xdd))/0x8+-parseInt(_0x3b6300(0xe5))/0x9*(-parseInt(_0x3b6300(0xdc))/0xa);if(_0x28263b===_0x4e98dc)break;else _0x4baff8['push'](_0x4baff8['shift']());}catch(_0x22c8de){_0x4baff8['push'](_0x4baff8['shift']());}}}(a42_0x394b,0xb9d66));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];function a42_0x5250(_0x1d1e9f,_0x3e795a){_0x1d1e9f=_0x1d1e9f-0xdc;const _0x394bfd=a42_0x394b();let _0x525072=_0x394bfd[_0x1d1e9f];return _0x525072;}function a42_0x394b(){const _0x577513=['10ggTvnM','6080760SToTeB','148wNNjBc','219708sKXDqH','887940dtVGqy','361164SLTZwJ','641576IgjjCh','49bOkIpM','15710ybQVRL','4391973YuoyiC'];a42_0x394b=function(){return _0x577513;};return a42_0x394b();}
@@ -1 +1 @@
1
- function a43_0x56e7(){const _0x40cdbe=['667299TTpMNI','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','global','config','2882172DZXENL','105234ZsVGZs','6785360GYPByd','1TjRVBa','67282hZuVzv','1642675yfCoyx','List\x20all\x20config\x20values','5096097ujDfqA','bool','154ZyLrYB','list'];a43_0x56e7=function(){return _0x40cdbe;};return a43_0x56e7();}function a43_0x2936(_0x1b39d5,_0x30b75a){_0x1b39d5=_0x1b39d5-0x1bd;const _0x56e721=a43_0x56e7();let _0x2936f7=_0x56e721[_0x1b39d5];return _0x2936f7;}const a43_0x30d804=a43_0x2936;(function(_0x589815,_0x491452){const _0x34d4e6=a43_0x2936,_0x30556b=_0x589815();while(!![]){try{const _0x537321=parseInt(_0x34d4e6(0x1c0))/0x1*(-parseInt(_0x34d4e6(0x1c1))/0x2)+parseInt(_0x34d4e6(0x1c8))/0x3+parseInt(_0x34d4e6(0x1bd))/0x4+parseInt(_0x34d4e6(0x1c2))/0x5+parseInt(_0x34d4e6(0x1be))/0x6*(-parseInt(_0x34d4e6(0x1c6))/0x7)+-parseInt(_0x34d4e6(0x1bf))/0x8+parseInt(_0x34d4e6(0x1c4))/0x9;if(_0x537321===_0x491452)break;else _0x30556b['push'](_0x30556b['shift']());}catch(_0x3ec59e){_0x30556b['push'](_0x30556b['shift']());}}}(a43_0x56e7,0x8b2db));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x13f923){const _0x1baae0=a43_0x2936,_0x3f99e4=_0x13f923[_0x1baae0(0x1c5)](_0x1baae0(0x1ca))?readScopedConfig(_0x1baae0(0x1ca)):readConfig();return{'ok':!![],'data':_0x3f99e4};}export const configListDefinition={'service':a43_0x30d804(0x1cb),'command':a43_0x30d804(0x1c7),'description':a43_0x30d804(0x1c3),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x30d804(0x1ca),'type':'boolean','description':a43_0x30d804(0x1c9),'default':![]}],'execute':execute};
1
+ function a43_0x2a80(){const _0x52693b=['list','1951803XMMAzt','132960aUuIfp','255650hgfSeA','3mgiWtc','52443zoIRYl','238UxCHpl','3611695uABgQv','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','global','config','boolean','2200290KEDPzT','read','4250qjxaUG','2373836ZDgwmi'];a43_0x2a80=function(){return _0x52693b;};return a43_0x2a80();}const a43_0x426f90=a43_0x21e9;(function(_0x4cc410,_0x1c9c3d){const _0x31b0d3=a43_0x21e9,_0x2aa162=_0x4cc410();while(!![]){try{const _0x550431=parseInt(_0x31b0d3(0x188))/0x1*(-parseInt(_0x31b0d3(0x187))/0x2)+-parseInt(_0x31b0d3(0x185))/0x3+parseInt(_0x31b0d3(0x183))/0x4+-parseInt(_0x31b0d3(0x18b))/0x5+-parseInt(_0x31b0d3(0x190))/0x6+parseInt(_0x31b0d3(0x18a))/0x7*(-parseInt(_0x31b0d3(0x186))/0x8)+-parseInt(_0x31b0d3(0x189))/0x9*(-parseInt(_0x31b0d3(0x182))/0xa);if(_0x550431===_0x1c9c3d)break;else _0x2aa162['push'](_0x2aa162['shift']());}catch(_0x3666eb){_0x2aa162['push'](_0x2aa162['shift']());}}}(a43_0x2a80,0x5d31c));import{readScopedConfig}from'../../commands/config/shared.js';function a43_0x21e9(_0x335bfb,_0x11af1b){_0x335bfb=_0x335bfb-0x181;const _0x2a80fd=a43_0x2a80();let _0x21e94f=_0x2a80fd[_0x335bfb];return _0x21e94f;}import{readConfig}from'../../utils/config.js';async function execute(_0x59d299){const _0x1bd197=a43_0x21e9,_0x4af3d5=_0x59d299['bool'](_0x1bd197(0x18d))?readScopedConfig(_0x1bd197(0x18d)):readConfig();return{'ok':!![],'data':_0x4af3d5};}export const configListDefinition={'service':a43_0x426f90(0x18e),'command':a43_0x426f90(0x184),'description':'List\x20all\x20config\x20values','risk':a43_0x426f90(0x181),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x426f90(0x18d),'type':a43_0x426f90(0x18f),'description':a43_0x426f90(0x18c),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- function a44_0x5c0e(){const _0x150030=['`,\x20`','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','length','Global','Invalid\x20locale\x20value.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','includes','5349624hivySr','set','\x20appcode\x20set\x20to:\x20','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','2122yUiVgT','str','Top-level\x20key\x20\x22','validation','riskLevel','21345228xHdVcM','bool','locale','config','appcode','\x22\x20is\x20not\x20settable.','\x20set\x20to:\x20','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','\x20app\x20add\x20<name>\x20--appcode\x20','value','app','Settable\x20top-level\x20keys:\x20','write','3349461OJwYra','string','Project','\x20(stored\x20as\x20apps\x20+\x20defaultApp)','Set\x20a\x20config\x20value','key','object','3542256ZYTyYo','769lsqNiE','5290182SQHxhd','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Usage:\x20','boolean','Config\x20value','keys','4JXuvxe','global','3640885urYQAZ'];a44_0x5c0e=function(){return _0x150030;};return a44_0x5c0e();}const a44_0xfcb602=a44_0x53b6;(function(_0x3f98b0,_0x253bfc){const _0x335abc=a44_0x53b6,_0x1bd8bc=_0x3f98b0();while(!![]){try{const _0x352af5=parseInt(_0x335abc(0x16f))/0x1*(-parseInt(_0x335abc(0x155))/0x2)+-parseInt(_0x335abc(0x167))/0x3*(-parseInt(_0x335abc(0x176))/0x4)+-parseInt(_0x335abc(0x148))/0x5+-parseInt(_0x335abc(0x170))/0x6+-parseInt(_0x335abc(0x151))/0x7+parseInt(_0x335abc(0x16e))/0x8+parseInt(_0x335abc(0x15a))/0x9;if(_0x352af5===_0x253bfc)break;else _0x1bd8bc['push'](_0x1bd8bc['shift']());}catch(_0x33e9ab){_0x1bd8bc['push'](_0x1bd8bc['shift']());}}}(a44_0x5c0e,0xb4e52));import{CliErrors}from'../../errors.js';function a44_0x53b6(_0x4e911d,_0x558d5c){_0x4e911d=_0x4e911d-0x148;const _0x5c0e37=a44_0x5c0e();let _0x53b69f=_0x5c0e37[_0x4e911d];return _0x53b69f;}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(_0x282287){const _0x3384a9=a44_0x53b6,_0x4067af=_0x282287[_0x3384a9(0x156)](_0x3384a9(0x16c)),_0x54c361=_0x282287[_0x3384a9(0x156)](_0x3384a9(0x163));if(!_0x4067af)throw CliErrors['validation']('Missing\x20key.',_0x3384a9(0x172)+CLI_BIN_NAME+_0x3384a9(0x161));if(_0x54c361===undefined||_0x54c361==='')throw CliErrors[_0x3384a9(0x158)]('Missing\x20value.',_0x3384a9(0x172)+CLI_BIN_NAME+_0x3384a9(0x161));if(_0x54c361[_0x3384a9(0x14c)]>0x1f4)throw CliErrors[_0x3384a9(0x158)](_0x3384a9(0x14f));if(!isTopLevelConfigKey(_0x4067af))throw CliErrors[_0x3384a9(0x158)](_0x3384a9(0x157)+_0x4067af+_0x3384a9(0x15f),_0x3384a9(0x165)+getTopLevelConfigKeySummary());if(_0x4067af===_0x3384a9(0x159))throw CliErrors[_0x3384a9(0x158)](_0x3384a9(0x171));if(CONFIG_ENUM_VALUES[_0x4067af]&&!CONFIG_ENUM_VALUES[_0x4067af][_0x3384a9(0x150)](_0x54c361))throw CliErrors[_0x3384a9(0x158)]('Invalid\x20value\x20for\x20\x22'+_0x4067af+'\x22.\x20Allowed:\x20'+CONFIG_ENUM_VALUES[_0x4067af]['join'](',\x20'));if(_0x4067af===_0x3384a9(0x15c)&&!normalizeLocale(_0x54c361))throw CliErrors[_0x3384a9(0x158)](_0x3384a9(0x14e),_0x3384a9(0x154));const _0x1519b9={'global':_0x282287[_0x3384a9(0x15b)](_0x3384a9(0x177))},_0x569836=resolveWriteScope(_0x1519b9),_0x261c4d=readScopedConfig(_0x569836);let _0x31d9bd=_0x4067af,_0x291a2e=_0x54c361;_0x4067af===_0x3384a9(0x164)&&(_0x31d9bd='appcode',delete _0x261c4d['app']);_0x4067af===_0x3384a9(0x15c)&&(_0x291a2e=normalizeLocale(_0x54c361));if(_0x4067af==='env'){_0x291a2e=normalizeEnv(_0x54c361);if(!isProduction(_0x291a2e)&&!isDaily(_0x291a2e))throw CliErrors[_0x3384a9(0x158)]('Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.',_0x3384a9(0x14b));}if(_0x4067af===_0x3384a9(0x15e)){const _0x591a84=_0x261c4d['apps']&&typeof _0x261c4d['apps']===_0x3384a9(0x16d)?Object[_0x3384a9(0x175)](_0x261c4d['apps']):[];if(_0x591a84[_0x3384a9(0x14c)]>0x0)throw CliErrors[_0x3384a9(0x158)]('Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`'+CLI_BIN_NAME+_0x3384a9(0x162)+_0x291a2e+_0x3384a9(0x149)+CLI_BIN_NAME+'\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.');const _0x512de7=buildCanonicalProjectConfig({..._0x261c4d},{'appCodes':[_0x291a2e],'env':typeof _0x261c4d['env']===_0x3384a9(0x168)?_0x261c4d['env']:undefined});writeScopedConfig(_0x512de7,_0x569836);const _0x25a556=_0x569836===_0x3384a9(0x177)?_0x3384a9(0x14d):_0x3384a9(0x169);return{'ok':!![],'message':'✓\x20'+_0x25a556+_0x3384a9(0x153)+_0x291a2e+_0x3384a9(0x16a)};}_0x261c4d[_0x31d9bd]=_0x291a2e,writeScopedConfig(_0x261c4d,_0x569836);const _0x3a9fd0=_0x569836===_0x3384a9(0x177)?_0x3384a9(0x14d):_0x3384a9(0x169);return{'ok':!![],'message':'✓\x20'+_0x3a9fd0+'\x20'+_0x31d9bd+_0x3384a9(0x160)+_0x291a2e};}export const configSetDefinition={'service':a44_0xfcb602(0x15d),'command':a44_0xfcb602(0x152),'description':a44_0xfcb602(0x16b),'risk':a44_0xfcb602(0x166),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0xfcb602(0x16c),'type':a44_0xfcb602(0x168),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0xfcb602(0x163),'type':a44_0xfcb602(0x168),'description':a44_0xfcb602(0x174),'required':!![]},{'name':a44_0xfcb602(0x177),'type':a44_0xfcb602(0x173),'description':a44_0xfcb602(0x14a),'default':![]}],'execute':execute};
1
+ const a44_0x39ab62=a44_0x5630;(function(_0x4d56e4,_0x178eb1){const _0x466c22=a44_0x5630,_0x380d07=_0x4d56e4();while(!![]){try{const _0x5dd477=parseInt(_0x466c22(0x1f2))/0x1*(-parseInt(_0x466c22(0x1f3))/0x2)+-parseInt(_0x466c22(0x1f0))/0x3*(-parseInt(_0x466c22(0x1ce))/0x4)+parseInt(_0x466c22(0x1ef))/0x5*(-parseInt(_0x466c22(0x1cb))/0x6)+parseInt(_0x466c22(0x1d6))/0x7*(parseInt(_0x466c22(0x1f5))/0x8)+parseInt(_0x466c22(0x1dd))/0x9*(parseInt(_0x466c22(0x1e5))/0xa)+parseInt(_0x466c22(0x1e7))/0xb+-parseInt(_0x466c22(0x1d7))/0xc;if(_0x5dd477===_0x178eb1)break;else _0x380d07['push'](_0x380d07['shift']());}catch(_0x12ffa8){_0x380d07['push'](_0x380d07['shift']());}}}(a44_0x21d4,0x8fbbc));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(_0x5c0d83){const _0x5ab340=a44_0x5630,_0x343c4f=_0x5c0d83[_0x5ab340(0x1fc)](_0x5ab340(0x1d8)),_0x47a91a=_0x5c0d83[_0x5ab340(0x1fc)]('value');if(!_0x343c4f)throw CliErrors[_0x5ab340(0x1f8)](_0x5ab340(0x1d2),'Usage:\x20'+CLI_BIN_NAME+_0x5ab340(0x1d5));if(_0x47a91a===undefined||_0x47a91a==='')throw CliErrors[_0x5ab340(0x1f8)](_0x5ab340(0x1d9),'Usage:\x20'+CLI_BIN_NAME+_0x5ab340(0x1d5));if(_0x47a91a['length']>0x1f4)throw CliErrors[_0x5ab340(0x1f8)](_0x5ab340(0x1e6));if(!isTopLevelConfigKey(_0x343c4f))throw CliErrors['validation']('Top-level\x20key\x20\x22'+_0x343c4f+_0x5ab340(0x1e2),'Settable\x20top-level\x20keys:\x20'+getTopLevelConfigKeySummary());if(_0x343c4f===_0x5ab340(0x1d3))throw CliErrors[_0x5ab340(0x1f8)](_0x5ab340(0x1fa));if(CONFIG_ENUM_VALUES[_0x343c4f]&&!CONFIG_ENUM_VALUES[_0x343c4f][_0x5ab340(0x1fd)](_0x47a91a))throw CliErrors[_0x5ab340(0x1f8)](_0x5ab340(0x1de)+_0x343c4f+_0x5ab340(0x1e4)+CONFIG_ENUM_VALUES[_0x343c4f][_0x5ab340(0x1d4)](',\x20'));if(_0x343c4f===_0x5ab340(0x1cc)&&!normalizeLocale(_0x47a91a))throw CliErrors[_0x5ab340(0x1f8)](_0x5ab340(0x1ea),'Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US');const _0xabc0e4={'global':_0x5c0d83[_0x5ab340(0x1c9)](_0x5ab340(0x1f9))},_0x3abefc=resolveWriteScope(_0xabc0e4),_0x1930eb=readScopedConfig(_0x3abefc);let _0x2bfd7f=_0x343c4f,_0x144034=_0x47a91a;_0x343c4f==='app'&&(_0x2bfd7f=_0x5ab340(0x1d1),delete _0x1930eb[_0x5ab340(0x1d0)]);_0x343c4f==='locale'&&(_0x144034=normalizeLocale(_0x47a91a));if(_0x343c4f===_0x5ab340(0x1e8)){_0x144034=normalizeEnv(_0x47a91a);if(!isProduction(_0x144034)&&!isDaily(_0x144034))throw CliErrors['validation'](_0x5ab340(0x1ee),_0x5ab340(0x1df));}if(_0x343c4f===_0x5ab340(0x1d1)){const _0x3bafa6=_0x1930eb['apps']&&typeof _0x1930eb['apps']===_0x5ab340(0x1cf)?Object[_0x5ab340(0x1f4)](_0x1930eb['apps']):[];if(_0x3bafa6[_0x5ab340(0x1cd)]>0x0)throw CliErrors['validation'](_0x5ab340(0x1e0),_0x5ab340(0x1e1)+CLI_BIN_NAME+_0x5ab340(0x1eb)+_0x144034+_0x5ab340(0x1db)+CLI_BIN_NAME+_0x5ab340(0x1dc));const _0xd3488d=buildCanonicalProjectConfig({..._0x1930eb},{'appCodes':[_0x144034],'env':typeof _0x1930eb[_0x5ab340(0x1e8)]===_0x5ab340(0x1e9)?_0x1930eb[_0x5ab340(0x1e8)]:undefined});writeScopedConfig(_0xd3488d,_0x3abefc);const _0x1e25ac=_0x3abefc===_0x5ab340(0x1f9)?_0x5ab340(0x1f7):'Project';return{'ok':!![],'message':'✓\x20'+_0x1e25ac+_0x5ab340(0x1ed)+_0x144034+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x1930eb[_0x2bfd7f]=_0x144034,writeScopedConfig(_0x1930eb,_0x3abefc);const _0x2da1c4=_0x3abefc==='global'?_0x5ab340(0x1f7):_0x5ab340(0x1f1);return{'ok':!![],'message':'✓\x20'+_0x2da1c4+'\x20'+_0x2bfd7f+_0x5ab340(0x1ca)+_0x144034};}function a44_0x21d4(){const _0x453fe8=['riskLevel','join','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','28MQcxbI','4406448deOrMU','key','Missing\x20value.','Set\x20a\x20config\x20value','`,\x20`','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','2374749dNSUma','Invalid\x20value\x20for\x20\x22','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Use\x20`','\x22\x20is\x20not\x20settable.','Config\x20value','\x22.\x20Allowed:\x20','40nCeldW','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','1213674NgjfDn','env','string','Invalid\x20locale\x20value.','\x20app\x20add\x20<name>\x20--appcode\x20','config','\x20appcode\x20set\x20to:\x20','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','2514465NpgFUn','3UCPPfn','Project','1ivXisg','1842772ZRbLWY','keys','268216mNKtEh','set','Global','validation','global','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','value','str','includes','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','bool','\x20set\x20to:\x20','6WzPBVX','locale','length','4321316WTTSGY','object','app','appcode','Missing\x20key.'];a44_0x21d4=function(){return _0x453fe8;};return a44_0x21d4();}function a44_0x5630(_0x4cf563,_0x36e93e){_0x4cf563=_0x4cf563-0x1c8;const _0x21d43b=a44_0x21d4();let _0x5630d0=_0x21d43b[_0x4cf563];return _0x5630d0;}export const configSetDefinition={'service':a44_0x39ab62(0x1ec),'command':a44_0x39ab62(0x1f6),'description':a44_0x39ab62(0x1da),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':a44_0x39ab62(0x1e9),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x39ab62(0x1fb),'type':a44_0x39ab62(0x1e9),'description':a44_0x39ab62(0x1e3),'required':!![]},{'name':a44_0x39ab62(0x1f9),'type':'boolean','description':a44_0x39ab62(0x1c8),'default':![]}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x3d1583,_0x491a75){var _0x154fd1=a45_0x4331,_0x2902b6=_0x3d1583();while(!![]){try{var _0x17502e=parseInt(_0x154fd1(0xae))/0x1*(parseInt(_0x154fd1(0xb9))/0x2)+parseInt(_0x154fd1(0xb5))/0x3+-parseInt(_0x154fd1(0xb3))/0x4*(parseInt(_0x154fd1(0xb4))/0x5)+-parseInt(_0x154fd1(0xac))/0x6+-parseInt(_0x154fd1(0xaf))/0x7+parseInt(_0x154fd1(0xb8))/0x8*(parseInt(_0x154fd1(0xb7))/0x9)+-parseInt(_0x154fd1(0xb1))/0xa;if(_0x17502e===_0x491a75)break;else _0x2902b6['push'](_0x2902b6['shift']());}catch(_0x137980){_0x2902b6['push'](_0x2902b6['shift']());}}}(a45_0x32a4,0x1ff02));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};function a45_0x32a4(){var _0x416af7=['9LySANT','919544StyQRr','4BMftDK','validation','1361400XDwmBw','global','85306ewRHSF','117950CJXqyp','project','578280OlFZOn','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','24lYdykM','87110QARHiI','754119ReRbzI','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'];a45_0x32a4=function(){return _0x416af7;};return a45_0x32a4();}export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x1c1460){var _0x765532=a45_0x4331;if(_0x1c1460[_0x765532(0xad)])return'global';if(!isInProject())throw CliErrors[_0x765532(0xba)](_0x765532(0xb2),_0x765532(0xb6)+CLI_BIN_NAME+'\x20init`\x20first.');return _0x765532(0xb0);}function a45_0x4331(_0x5ac560,_0x2a849b){_0x5ac560=_0x5ac560-0xac;var _0x32a422=a45_0x32a4();var _0x4331d7=_0x32a422[_0x5ac560];return _0x4331d7;}export function readScopedConfig(_0x1170e3){return readConfigFile(resolveWriteConfigPath(_0x1170e3));}export function writeScopedConfig(_0x21a5b9,_0x288c85){writeConfigFile(resolveWriteConfigPath(_0x288c85),_0x21a5b9);}
1
+ (function(_0x2296ec,_0x36c928){var _0x1d1562=a45_0x5af5,_0x44dc35=_0x2296ec();while(!![]){try{var _0x5d3256=parseInt(_0x1d1562(0x79))/0x1*(-parseInt(_0x1d1562(0x7c))/0x2)+-parseInt(_0x1d1562(0x77))/0x3+parseInt(_0x1d1562(0x7a))/0x4*(parseInt(_0x1d1562(0x76))/0x5)+parseInt(_0x1d1562(0x80))/0x6+-parseInt(_0x1d1562(0x81))/0x7+-parseInt(_0x1d1562(0x7f))/0x8+parseInt(_0x1d1562(0x7e))/0x9*(parseInt(_0x1d1562(0x75))/0xa);if(_0x5d3256===_0x36c928)break;else _0x44dc35['push'](_0x44dc35['shift']());}catch(_0x36b34e){_0x44dc35['push'](_0x44dc35['shift']());}}}(a45_0x83e6,0xbf6f3));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a45_0x83e6(){var _0x3915d2=['920tIlwJO','245LdZtny','3076893NtoCjB','global','12905Sujrpa','67004mDcxCV','\x20init`\x20first.','124paaisi','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','392958pKJbGZ','10904432bXzdUu','4052634NsSltn','10781624TKHorh','validation'];a45_0x83e6=function(){return _0x3915d2;};return a45_0x83e6();}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';function a45_0x5af5(_0x280aab,_0x320527){_0x280aab=_0x280aab-0x74;var _0x83e6e2=a45_0x83e6();var _0x5af5b2=_0x83e6e2[_0x280aab];return _0x5af5b2;}export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x5c7af1){var _0x27a4b5=a45_0x5af5;if(_0x5c7af1[_0x27a4b5(0x78)])return _0x27a4b5(0x78);if(!isInProject())throw CliErrors[_0x27a4b5(0x74)]('Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).',_0x27a4b5(0x7d)+CLI_BIN_NAME+_0x27a4b5(0x7b));return'project';}export function readScopedConfig(_0x6b13d1){return readConfigFile(resolveWriteConfigPath(_0x6b13d1));}export function writeScopedConfig(_0x1a03d4,_0x285c21){writeConfigFile(resolveWriteConfigPath(_0x285c21),_0x1a03d4);}
@@ -1 +1 @@
1
- function a46_0x1759(_0x5e3e11,_0x456788){_0x5e3e11=_0x5e3e11-0x13d;const _0x3c4959=a46_0x3c49();let _0x17599f=_0x3c4959[_0x5e3e11];return _0x17599f;}const a46_0x5a88fa=a46_0x1759;function a46_0x3c49(){const _0x459ae4=['8OxavpF','367228pKIWxa','582735AxWvLV','65919XCxXrG','filter','240659Wrtbnd','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','5010906pIwQpK','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','3247030SGKDin','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','21059334waRXsf','\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]','join','\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}]','304ikEMlL','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)'];a46_0x3c49=function(){return _0x459ae4;};return a46_0x3c49();}(function(_0x495a42,_0x3fc476){const _0x15c332=a46_0x1759,_0x3efee8=_0x495a42();while(!![]){try{const _0x4ac70a=parseInt(_0x15c332(0x14d))/0x1*(-parseInt(_0x15c332(0x148))/0x2)+parseInt(_0x15c332(0x14a))/0x3+parseInt(_0x15c332(0x149))/0x4+-parseInt(_0x15c332(0x140))/0x5+-parseInt(_0x15c332(0x13e))/0x6+parseInt(_0x15c332(0x14b))/0x7*(parseInt(_0x15c332(0x146))/0x8)+parseInt(_0x15c332(0x142))/0x9;if(_0x4ac70a===_0x3fc476)break;else _0x3efee8['push'](_0x3efee8['shift']());}catch(_0x3b1627){_0x3efee8['push'](_0x3efee8['shift']());}}}(a46_0x3c49,0x83037));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':'filter','operation':a46_0x5a88fa(0x14c),'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsRequired':![],'paramsHint':a46_0x5a88fa(0x141),'helpExtra':[a46_0x5a88fa(0x13f),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a46_0x5a88fa(0x143),a46_0x5a88fa(0x145),a46_0x5a88fa(0x147),a46_0x5a88fa(0x13d)][a46_0x5a88fa(0x144)]('\x0a')});
1
+ function a46_0x5769(){const _0x30f959=['\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','join','197QNoXOw','4411752QXqPNl','513012RQcnxY','2445595OxEuos','9541aCvLiw','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','3250SHTrQa','99ytEbbr','34227FHKFgQ','Filter\x20dataset\x20records\x20with\x20query\x20conditions','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','56452LXpXYI','798UXoZUf','\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\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','1578ctaqCA','filter','114bcejzt'];a46_0x5769=function(){return _0x30f959;};return a46_0x5769();}const a46_0x15fd3c=a46_0x3111;function a46_0x3111(_0xc2a17e,_0x5e3627){_0xc2a17e=_0xc2a17e-0x1f4;const _0x5769fa=a46_0x5769();let _0x31118a=_0x5769fa[_0xc2a17e];return _0x31118a;}(function(_0x39f570,_0x2d80ff){const _0x49a7b9=a46_0x3111,_0x762677=_0x39f570();while(!![]){try{const _0x25aa3e=parseInt(_0x49a7b9(0x1fb))/0x1*(-parseInt(_0x49a7b9(0x207))/0x2)+parseInt(_0x49a7b9(0x1f8))/0x3*(parseInt(_0x49a7b9(0x206))/0x4)+-parseInt(_0x49a7b9(0x1fe))/0x5+-parseInt(_0x49a7b9(0x1f6))/0x6*(parseInt(_0x49a7b9(0x1ff))/0x7)+-parseInt(_0x49a7b9(0x1fc))/0x8+-parseInt(_0x49a7b9(0x203))/0x9*(-parseInt(_0x49a7b9(0x201))/0xa)+-parseInt(_0x49a7b9(0x202))/0xb*(-parseInt(_0x49a7b9(0x1fd))/0xc);if(_0x25aa3e===_0x2d80ff)break;else _0x762677['push'](_0x762677['shift']());}catch(_0x5b822f){_0x762677['push'](_0x762677['shift']());}}}(a46_0x5769,0xa5dc8));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':a46_0x15fd3c(0x1f7),'operation':a46_0x15fd3c(0x1f7),'description':a46_0x15fd3c(0x204),'paramsRequired':![],'paramsHint':a46_0x15fd3c(0x205),'helpExtra':[a46_0x15fd3c(0x200),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions',a46_0x15fd3c(0x1f5),a46_0x15fd3c(0x1f4),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a46_0x15fd3c(0x1f9)][a46_0x15fd3c(0x1fa)]('\x0a')});
@@ -1 +1 @@
1
- const a47_0x518a24=a47_0x4410;(function(_0x590322,_0x11e625){const _0x38ab32=a47_0x4410,_0x295a81=_0x590322();while(!![]){try{const _0x36c4e3=-parseInt(_0x38ab32(0x193))/0x1*(-parseInt(_0x38ab32(0x192))/0x2)+parseInt(_0x38ab32(0x198))/0x3*(parseInt(_0x38ab32(0x196))/0x4)+-parseInt(_0x38ab32(0x18e))/0x5+parseInt(_0x38ab32(0x18d))/0x6+parseInt(_0x38ab32(0x195))/0x7+parseInt(_0x38ab32(0x197))/0x8*(-parseInt(_0x38ab32(0x194))/0x9)+-parseInt(_0x38ab32(0x190))/0xa*(-parseInt(_0x38ab32(0x18c))/0xb);if(_0x36c4e3===_0x11e625)break;else _0x295a81['push'](_0x295a81['shift']());}catch(_0x1b485c){_0x295a81['push'](_0x295a81['shift']());}}}(a47_0x55a4,0x9fff4));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a47_0x518a24(0x18f),'operation':a47_0x518a24(0x18f),'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a47_0x518a24(0x191)});function a47_0x4410(_0x166734,_0x4fa72b){_0x166734=_0x166734-0x18c;const _0x55a43a=a47_0x55a4();let _0x44109b=_0x55a43a[_0x166734];return _0x44109b;}function a47_0x55a4(){const _0x934d08=['1368CFuWfm','6qymUqs','11Meaqob','5606658QjjLHY','4108790dNaweu','getOne','2183390BEFwCD','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','178WMtAGt','1283nPUtHJ','17505YuviIP','3728186OPiuJz','20268tjvNaw'];a47_0x55a4=function(){return _0x934d08;};return a47_0x55a4();}
1
+ const a47_0x5e0e49=a47_0x1b33;function a47_0x5e4c(){const _0x5c5ca8=['99rrrJYj','545108vGNKea','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','240bfYAsO','getOne','6RynOik','33392qWAJGz','Get\x20a\x20single\x20record\x20by\x20ID','1454873rNNyfF','60wKIDAU','195138Pybajb','5747000qZZgOT','33626WZQllW','1104410rpcrVy'];a47_0x5e4c=function(){return _0x5c5ca8;};return a47_0x5e4c();}function a47_0x1b33(_0x4a0a9a,_0x426dbc){_0x4a0a9a=_0x4a0a9a-0x115;const _0x5e4c2b=a47_0x5e4c();let _0x1b337e=_0x5e4c2b[_0x4a0a9a];return _0x1b337e;}(function(_0x4d71fc,_0x1365f7){const _0x39f1ee=a47_0x1b33,_0x5d34df=_0x4d71fc();while(!![]){try{const _0x37203e=-parseInt(_0x39f1ee(0x11c))/0x1+parseInt(_0x39f1ee(0x11f))/0x2+-parseInt(_0x39f1ee(0x119))/0x3*(parseInt(_0x39f1ee(0x116))/0x4)+parseInt(_0x39f1ee(0x11b))/0x5+parseInt(_0x39f1ee(0x115))/0x6*(-parseInt(_0x39f1ee(0x118))/0x7)+-parseInt(_0x39f1ee(0x121))/0x8*(-parseInt(_0x39f1ee(0x11a))/0x9)+parseInt(_0x39f1ee(0x11d))/0xa*(-parseInt(_0x39f1ee(0x11e))/0xb);if(_0x37203e===_0x1365f7)break;else _0x5d34df['push'](_0x5d34df['shift']());}catch(_0x19261c){_0x5d34df['push'](_0x5d34df['shift']());}}}(a47_0x5e4c,0xa3944));import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':a47_0x5e0e49(0x122),'operation':a47_0x5e0e49(0x122),'description':a47_0x5e0e49(0x117),'paramsRequired':!![],'paramsHint':a47_0x5e0e49(0x120)});
@@ -1 +1 @@
1
- (function(_0x470ee7,_0x484019){const _0x5bb7ab=a48_0x476e,_0x3a7db8=_0x470ee7();while(!![]){try{const _0x27d0d6=parseInt(_0x5bb7ab(0xe7))/0x1+-parseInt(_0x5bb7ab(0xe8))/0x2+-parseInt(_0x5bb7ab(0xe3))/0x3+-parseInt(_0x5bb7ab(0xe9))/0x4+-parseInt(_0x5bb7ab(0xe1))/0x5*(-parseInt(_0x5bb7ab(0xe5))/0x6)+-parseInt(_0x5bb7ab(0xe2))/0x7*(parseInt(_0x5bb7ab(0xea))/0x8)+parseInt(_0x5bb7ab(0xe4))/0x9*(parseInt(_0x5bb7ab(0xe6))/0xa);if(_0x27d0d6===_0x484019)break;else _0x3a7db8['push'](_0x3a7db8['shift']());}catch(_0x2b2fda){_0x3a7db8['push'](_0x3a7db8['shift']());}}}(a48_0x2824,0x5a555));import{dataFilter}from'../../commands/data/filter.js';function a48_0x476e(_0x1eae0b,_0x550183){_0x1eae0b=_0x1eae0b-0xe1;const _0x2824a8=a48_0x2824();let _0x476e25=_0x2824a8[_0x1eae0b];return _0x476e25;}import{dataGetOne}from'../../commands/data/getOne.js';function a48_0x2824(){const _0x50c465=['14plDaTb','1855263KwZlxh','60678VIyUuE','1020414SrxhaG','3170xbKsEY','113996QBqJaE','1279354PUpRvw','2294432FQkLLA','878272DgwLne','5cmUoFg'];a48_0x2824=function(){return _0x50c465;};return a48_0x2824();}export const dataDefinitions=[dataFilter,dataGetOne];
1
+ function a48_0x4245(_0x5d942e,_0x262620){_0x5d942e=_0x5d942e-0xcf;const _0x281862=a48_0x2818();let _0x42452d=_0x281862[_0x5d942e];return _0x42452d;}(function(_0x513aac,_0x34c50e){const _0x46815f=a48_0x4245,_0x3a61f7=_0x513aac();while(!![]){try{const _0x476887=-parseInt(_0x46815f(0xd0))/0x1+-parseInt(_0x46815f(0xd3))/0x2+-parseInt(_0x46815f(0xd4))/0x3*(-parseInt(_0x46815f(0xd7))/0x4)+parseInt(_0x46815f(0xd8))/0x5*(parseInt(_0x46815f(0xd6))/0x6)+-parseInt(_0x46815f(0xd2))/0x7*(-parseInt(_0x46815f(0xd5))/0x8)+-parseInt(_0x46815f(0xd1))/0x9+parseInt(_0x46815f(0xcf))/0xa;if(_0x476887===_0x34c50e)break;else _0x3a61f7['push'](_0x3a61f7['shift']());}catch(_0x43f729){_0x3a61f7['push'](_0x3a61f7['shift']());}}}(a48_0x2818,0x1c990));import{dataFilter}from'../../commands/data/filter.js';function a48_0x2818(){const _0x43829d=['75981XOGkzJ','1926324mLCeBr','186032eoRmST','135260fbxFsQ','87lpDbtb','24qwWhwQ','316986okGiVn','26596pUDnuc','5CaPGlV','1494030XufeqV'];a48_0x2818=function(){return _0x43829d;};return a48_0x2818();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
@@ -1 +1 @@
1
- (function(_0x13eb37,_0x10670a){const _0x3b3026=a49_0x5933,_0x527a0e=_0x13eb37();while(!![]){try{const _0xaafcff=-parseInt(_0x3b3026(0x16b))/0x1+-parseInt(_0x3b3026(0x167))/0x2+-parseInt(_0x3b3026(0x161))/0x3*(parseInt(_0x3b3026(0x15b))/0x4)+-parseInt(_0x3b3026(0x173))/0x5*(-parseInt(_0x3b3026(0x162))/0x6)+parseInt(_0x3b3026(0x16e))/0x7*(parseInt(_0x3b3026(0x15d))/0x8)+-parseInt(_0x3b3026(0x158))/0x9+parseInt(_0x3b3026(0x172))/0xa;if(_0xaafcff===_0x10670a)break;else _0x527a0e['push'](_0x527a0e['shift']());}catch(_0x1244f0){_0x527a0e['push'](_0x527a0e['shift']());}}}(a49_0x5add,0xd58ae));import{executeDatasetDataOperation}from'../../core/api-client.js';function a49_0x5add(){const _0x5dd7b8=['data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','1445811myxKUz','str','paramsHint','7LXYoAk','helpExtra','string','now','28175740TBEIrA','3280qnYNxB','data','flagMissing','5088186nPSQnK','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','command','266492kMooYj','read','5753112eyOPoI','alias','\x20completed\x20in\x20','getOne','3SSIQEZ','9012LzTWUk','compress','appCode','operation','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.','3139134bAKeQl','params'];a49_0x5add=function(){return _0x5dd7b8;};return a49_0x5add();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a49_0x5933(_0x5838ae,_0x39570f){_0x5838ae=_0x5838ae-0x156;const _0x5addab=a49_0x5add();let _0x5933fc=_0x5addab[_0x5838ae];return _0x5933fc;}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x4084d1){const _0x24fbce=a49_0x5933;if(!_0x4084d1)throw CliErrors['flagMissing'](_0x24fbce(0x168),_0x24fbce(0x166));const _0x1dac19=_0x4084d1['id'];if(_0x1dac19===undefined||_0x1dac19===null||_0x1dac19==='')throw CliErrors['validation'](_0x24fbce(0x169),_0x24fbce(0x16a));}function parseCommandParams(_0x5a547d){return parseJsonParams(_0x5a547d)??{};}export function buildDataCommand(_0x3fc2c2){const _0x37cc17=a49_0x5933,_0x32afc0=_0x37cc17(0x159);return{'service':_0x37cc17(0x156),'command':_0x3fc2c2[_0x37cc17(0x15a)],'description':_0x3fc2c2['description'],'risk':_0x37cc17(0x15c),'defaultOutputFormat':_0x37cc17(0x163),'helpExtra':_0x3fc2c2[_0x37cc17(0x16f)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':_0x37cc17(0x15e),'type':_0x37cc17(0x170),'description':_0x32afc0},{'name':_0x37cc17(0x168),'type':_0x37cc17(0x170),'description':_0x3fc2c2[_0x37cc17(0x16d)]}],async 'validate'(_0x3ad5eb){const _0x24d353=_0x37cc17,_0x585ae9=_0x3ad5eb['str'](_0x24d353(0x168));if(_0x3fc2c2['paramsRequired']&&!_0x585ae9)throw CliErrors[_0x24d353(0x157)](_0x24d353(0x168),_0x3fc2c2[_0x24d353(0x16d)]);const _0x50032e=parseJsonParams(_0x585ae9);_0x3fc2c2[_0x24d353(0x165)]===_0x24d353(0x160)&&assertGetOneId(_0x50032e);},async 'execute'(_0x14501a){const _0x4071f0=_0x37cc17,_0x46e58d=parseCommandParams(_0x14501a[_0x4071f0(0x16c)](_0x4071f0(0x168))),_0x4da42f=Date[_0x4071f0(0x171)](),_0x438885=await executeDatasetDataOperation(_0x14501a[_0x4071f0(0x164)],_0x14501a[_0x4071f0(0x16c)]('code'),_0x3fc2c2[_0x4071f0(0x165)],_0x46e58d),_0x78662=Date[_0x4071f0(0x171)]()-_0x4da42f;return{'ok':!![],'data':{'result':_0x438885,'elapsed':_0x78662},'message':'data\x20'+_0x3fc2c2[_0x4071f0(0x15a)]+_0x4071f0(0x15f)+_0x78662+'ms'};}};}
1
+ (function(_0x119970,_0x3f4c6d){const _0x43fe37=a49_0xc026,_0x52cbad=_0x119970();while(!![]){try{const _0x327189=-parseInt(_0x43fe37(0x15c))/0x1+-parseInt(_0x43fe37(0x15b))/0x2+parseInt(_0x43fe37(0x169))/0x3+-parseInt(_0x43fe37(0x163))/0x4*(-parseInt(_0x43fe37(0x16c))/0x5)+parseInt(_0x43fe37(0x167))/0x6*(-parseInt(_0x43fe37(0x16f))/0x7)+-parseInt(_0x43fe37(0x16e))/0x8+parseInt(_0x43fe37(0x171))/0x9*(parseInt(_0x43fe37(0x170))/0xa);if(_0x327189===_0x3f4c6d)break;else _0x52cbad['push'](_0x52cbad['shift']());}catch(_0x2c5902){_0x52cbad['push'](_0x52cbad['shift']());}}}(a49_0x5934,0x81bac));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x5c8d45){const _0x355c21=a49_0xc026;if(!_0x5c8d45)throw CliErrors[_0x355c21(0x16b)](_0x355c21(0x15a),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x519ab9=_0x5c8d45['id'];if(_0x519ab9===undefined||_0x519ab9===null||_0x519ab9==='')throw CliErrors[_0x355c21(0x165)](_0x355c21(0x160),'Example:\x20--params\x20\x27{\x22id\x22:123}\x27');}function a49_0xc026(_0x55aa0d,_0xb4890){_0x55aa0d=_0x55aa0d-0x159;const _0x5934cb=a49_0x5934();let _0xc026bd=_0x5934cb[_0x55aa0d];return _0xc026bd;}function parseCommandParams(_0x37415e){return parseJsonParams(_0x37415e)??{};}export function buildDataCommand(_0x2e056e){const _0x392ced=a49_0xc026,_0x1debe8='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x392ced(0x162),'command':_0x2e056e['command'],'description':_0x2e056e[_0x392ced(0x166)],'risk':'read','defaultOutputFormat':_0x392ced(0x161),'helpExtra':_0x2e056e[_0x392ced(0x15e)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x392ced(0x168),'description':_0x1debe8},{'name':_0x392ced(0x15a),'type':'string','description':_0x2e056e['paramsHint']}],async 'validate'(_0x1ff089){const _0x30f39e=_0x392ced,_0x3d3d0f=_0x1ff089[_0x30f39e(0x159)](_0x30f39e(0x15a));if(_0x2e056e['paramsRequired']&&!_0x3d3d0f)throw CliErrors[_0x30f39e(0x16b)]('params',_0x2e056e[_0x30f39e(0x164)]);const _0x3cb851=parseJsonParams(_0x3d3d0f);_0x2e056e[_0x30f39e(0x15d)]==='getOne'&&assertGetOneId(_0x3cb851);},async 'execute'(_0x7a61b5){const _0x1b3ecf=_0x392ced,_0x1617ec=parseCommandParams(_0x7a61b5[_0x1b3ecf(0x159)](_0x1b3ecf(0x15a))),_0x14db7c=Date[_0x1b3ecf(0x16a)](),_0x3255fb=await executeDatasetDataOperation(_0x7a61b5[_0x1b3ecf(0x16d)],_0x7a61b5[_0x1b3ecf(0x159)](_0x1b3ecf(0x172)),_0x2e056e['operation'],_0x1617ec),_0x87531b=Date[_0x1b3ecf(0x16a)]()-_0x14db7c;return{'ok':!![],'data':{'result':_0x3255fb,'elapsed':_0x87531b},'message':_0x1b3ecf(0x15f)+_0x2e056e[_0x1b3ecf(0x173)]+'\x20completed\x20in\x20'+_0x87531b+'ms'};}};}function a49_0x5934(){const _0x4ee1bf=['data\x20','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','compress','data','8WnyOuI','paramsHint','validation','description','6zWpLdl','string','571029TpJbxP','now','flagMissing','229265mWkDaq','appCode','3661040LAwgyF','1573222FZhrCw','20csNbZx','6022818jwFeeI','code','command','str','params','393646JGgIDJ','209882crdGrJ','operation','helpExtra'];a49_0x5934=function(){return _0x4ee1bf;};return a49_0x5934();}
@@ -1 +1 @@
1
- const a50_0x154621=a50_0x2e64;function a50_0x4349(){const _0x1aa9f9=['lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','unknown','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','17687OMpmdT','2544861ZrggCe','datasetCode','\x20类型,不适合作为\x20','\x20的数据源。','join','sourceType','lovrabet','length','4gtOvTv','trim','请先将该数据集升级/迁移为\x20DB\x20table\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','4994367hggAoY','toUpperCase','dbtableConfig','当前数据集\x20\x22','BFF\x20/\x20SQL\x20等研发态资产','3601962LNcuqN','getOne','dataset','1508788nwSWSA','object','\x20是\x20','5142625rygQGw','datasetName','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','source','6183096cbWCeL','dbId','filter','UNKNOWN'];a50_0x4349=function(){return _0x1aa9f9;};return a50_0x4349();}function a50_0x2e64(_0xed548d,_0x18a4dd){_0xed548d=_0xed548d-0x83;const _0x4349a2=a50_0x4349();let _0x2e64e8=_0x4349a2[_0xed548d];return _0x2e64e8;}(function(_0x3550f5,_0x509d45){const _0xa7c893=a50_0x2e64,_0x4165b4=_0x3550f5();while(!![]){try{const _0x48a445=-parseInt(_0xa7c893(0x8b))/0x1*(parseInt(_0xa7c893(0x94))/0x2)+parseInt(_0xa7c893(0x8c))/0x3+-parseInt(_0xa7c893(0xa0))/0x4+parseInt(_0xa7c893(0xa3))/0x5+parseInt(_0xa7c893(0x9d))/0x6+-parseInt(_0xa7c893(0x98))/0x7+-parseInt(_0xa7c893(0x84))/0x8;if(_0x48a445===_0x509d45)break;else _0x4165b4['push'](_0x4165b4['shift']());}catch(_0x35a9e8){_0x4165b4['push'](_0x4165b4['shift']());}}}(a50_0x4349,0x8d298));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x154621(0x92),'filter':a50_0x154621(0x88),'getOne':a50_0x154621(0x8a)};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x154621(0x97);function valueToString(_0x3770d0){const _0x165361=a50_0x154621;return _0x3770d0==null?'':String(_0x3770d0)[_0x165361(0x95)]();}function getDatasetCode(_0x5cf3d4){const _0x39c1ff=a50_0x154621;return valueToString(_0x5cf3d4['code']??_0x5cf3d4['modelCode']??_0x5cf3d4[_0x39c1ff(0x9f)]?.[_0x39c1ff(0x8d)]);}function getDatasetName(_0xcb1e9){const _0x23b605=a50_0x154621;return valueToString(_0xcb1e9['name']??_0xcb1e9[_0x23b605(0x9f)]?.[_0x23b605(0xa4)])||_0x23b605(0x89);}function getDatasetSource(_0x1c9101){const _0x23d83e=a50_0x154621;return valueToString(_0x1c9101[_0x23d83e(0x83)]??_0x1c9101['dataset']?.[_0x23d83e(0x91)])[_0x23d83e(0x99)]();}function getDbtableConfig(_0x44df44){const _0xcc4fd6=a50_0x154621,_0x320a28=_0x44df44[_0xcc4fd6(0x9a)]??_0x44df44['dbtable'];return _0x320a28&&typeof _0x320a28===_0xcc4fd6(0xa1)?_0x320a28:{};}export function isDbBackedDataset(_0x3e2062){const _0x186056=a50_0x154621,_0x39c709=getDatasetSource(_0x3e2062);if(_0x39c709==='METADATA')return![];const _0x5aaa35=getDbtableConfig(_0x3e2062),_0x3514c5=_0x5aaa35[_0x186056(0x85)]??_0x5aaa35['id'],_0x150206=valueToString(_0x5aaa35['tableName']??_0x3e2062['tableName']??_0x3e2062[_0x186056(0x9f)]?.['tableName']);return _0x3514c5!==undefined&&_0x3514c5!==null&&_0x150206[_0x186056(0x93)]>0x0;}export function filterDbBackedDatasets(_0x14a41c){const _0x5c1fc2=a50_0x154621;return _0x14a41c[_0x5c1fc2(0x86)](_0x5999d4=>isDbBackedDataset(_0x5999d4));}export function buildDbTableUpgradeMessage(_0x46c2c5,_0x182886=a50_0x154621(0x9c)){const _0x2b9ab1=a50_0x154621,_0x28ffec=getDatasetSource(_0x46c2c5)||_0x2b9ab1(0x87),_0x3c934b=getDatasetName(_0x46c2c5),_0x126db7=getDatasetCode(_0x46c2c5),_0x5e8bfe=_0x126db7?'\x20('+_0x126db7+')':'';return[_0x2b9ab1(0x9b)+_0x3c934b+'\x22'+_0x5e8bfe+_0x2b9ab1(0xa2)+_0x28ffec+_0x2b9ab1(0x8e)+_0x182886+_0x2b9ab1(0x8f),'原因:该类研发态资产需要\x20DB\x20table、dbId、tableName\x20与数据库连接上下文,并深度依赖\x20SQL\x20执行链路。',_0x2b9ab1(0x96),_0x2b9ab1(0xa5)+RUNTIME_DATA_ACCESS_COMMANDS['filter']+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x2b9ab1(0x9e)]+'。'][_0x2b9ab1(0x90)]('\x20');}export function assertDatasetSupportsLocalDevelopment(_0x14c5b8,_0x45e815){if(!isDbBackedDataset(_0x14c5b8))throw CliErrors['validation'](buildDbTableUpgradeMessage(_0x14c5b8,_0x45e815));}
1
+ const a50_0x1c0728=a50_0x4de8;(function(_0x5a796b,_0x236b5e){const _0x896031=a50_0x4de8,_0x346560=_0x5a796b();while(!![]){try{const _0xd13280=parseInt(_0x896031(0x97))/0x1*(-parseInt(_0x896031(0x91))/0x2)+parseInt(_0x896031(0xa3))/0x3*(-parseInt(_0x896031(0x84))/0x4)+-parseInt(_0x896031(0x8a))/0x5*(parseInt(_0x896031(0x89))/0x6)+parseInt(_0x896031(0x9b))/0x7+-parseInt(_0x896031(0x8d))/0x8*(-parseInt(_0x896031(0x90))/0x9)+parseInt(_0x896031(0x9f))/0xa+-parseInt(_0x896031(0x93))/0xb*(-parseInt(_0x896031(0xa5))/0xc);if(_0xd13280===_0x236b5e)break;else _0x346560['push'](_0x346560['shift']());}catch(_0x4a3fbb){_0x346560['push'](_0x346560['shift']());}}}(a50_0x4810,0x259c5));import{CliErrors}from'../../errors.js';function a50_0x4de8(_0x6ca67c,_0x3a9df1){_0x6ca67c=_0x6ca67c-0x83;const _0x481006=a50_0x4810();let _0x4de8df=_0x481006[_0x6ca67c];return _0x4de8df;}export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x1c0728(0x85),'filter':a50_0x1c0728(0x96),'getOne':a50_0x1c0728(0x98)};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x1c0728(0x87);function valueToString(_0xf0d01b){const _0x95bc31=a50_0x1c0728;return _0xf0d01b==null?'':String(_0xf0d01b)[_0x95bc31(0xa0)]();}function getDatasetCode(_0x907aca){const _0x1c9b31=a50_0x1c0728;return valueToString(_0x907aca['code']??_0x907aca[_0x1c9b31(0x8b)]??_0x907aca['dataset']?.[_0x1c9b31(0xa4)]);}function a50_0x4810(){const _0x2f12f6=['5gJfVRc','modelCode','UNKNOWN','272eQNhAo','当前数据集\x20\x22','datasetName','8487SnDDCn','402FXpWgt','object','141988zybRiW','tableName','getOne','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','213uQMdlg','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','dataset','source','184996wAqkHp','name','unknown','dbId','1641050isJWYC','trim','length','\x20的\x20DB_TABLE\x20数据源上下文。','114vNjaxz','datasetCode','156EvhCpB','sourceType','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','filter','5396EhZINU','lovrabet','SQL\x20schema\x20validation','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','原因:schema\x20introspection\x20与\x20custom\x20SQL\x20需要\x20source=DB_TABLE、dbtableConfig.dbId、dbtableConfig.tableName\x20与数据库连接上下文。','853626IQmcZC'];a50_0x4810=function(){return _0x2f12f6;};return a50_0x4810();}function getDatasetName(_0x5e2aa8){const _0x19fe8c=a50_0x1c0728;return valueToString(_0x5e2aa8[_0x19fe8c(0x9c)]??_0x5e2aa8['dataset']?.[_0x19fe8c(0x8f)])||_0x19fe8c(0x9d);}function getDatasetSource(_0xb43e3b){const _0xd4ab24=a50_0x1c0728;return valueToString(_0xb43e3b[_0xd4ab24(0x9a)]??_0xb43e3b[_0xd4ab24(0x99)]?.[_0xd4ab24(0xa6)])['toUpperCase']();}function getDbtableConfig(_0x271ecb){const _0x14d060=a50_0x1c0728,_0x475a58=_0x271ecb['dbtableConfig']??_0x271ecb['dbtable'];return _0x475a58&&typeof _0x475a58===_0x14d060(0x92)?_0x475a58:{};}export function isDbTableBackedDataset(_0x3e8ea6){const _0x51f3bc=a50_0x1c0728,_0x380d85=getDatasetSource(_0x3e8ea6);if(_0x380d85==='METADATA')return![];const _0x543c0a=getDbtableConfig(_0x3e8ea6),_0x37807f=_0x543c0a[_0x51f3bc(0x9e)]??_0x543c0a['id'],_0x7a24a=valueToString(_0x543c0a[_0x51f3bc(0x94)]??_0x3e8ea6[_0x51f3bc(0x94)]??_0x3e8ea6['dataset']?.[_0x51f3bc(0x94)]);return _0x37807f!==undefined&&_0x37807f!==null&&_0x7a24a[_0x51f3bc(0xa1)]>0x0;}export function filterDbTableBackedDatasets(_0x232ee7){return _0x232ee7['filter'](_0x52331a=>isDbTableBackedDataset(_0x52331a));}export function buildDbTableBackedRequirementMessage(_0x8eb562,_0x4d3647=a50_0x1c0728(0x86)){const _0xb03f=a50_0x1c0728,_0x40f956=getDatasetSource(_0x8eb562)||_0xb03f(0x8c),_0x1c09c8=getDatasetName(_0x8eb562),_0x511af4=getDatasetCode(_0x8eb562),_0x4716f3=_0x511af4?'\x20('+_0x511af4+')':'';return[_0xb03f(0x8e)+_0x1c09c8+'\x22'+_0x4716f3+'\x20是\x20'+_0x40f956+'\x20类型,没有可用于\x20'+_0x4d3647+_0xb03f(0xa2),_0xb03f(0x88),'请先将该数据集升级/迁移为\x20DB_TABLE\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。',_0xb03f(0xa7)+RUNTIME_DATA_ACCESS_COMMANDS[_0xb03f(0x83)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0xb03f(0x95)]+'。']['join']('\x20');}export function assertDatasetIsDbTableBacked(_0x4900c6,_0x25272c){if(!isDbTableBackedDataset(_0x4900c6))throw CliErrors['validation'](buildDbTableBackedRequirementMessage(_0x4900c6,_0x25272c));}