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

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 (209) 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 -0
  60. package/lib/commands/dataset/relation-delete.js +1 -0
  61. package/lib/commands/dataset/relation-shared.js +1 -0
  62. package/lib/commands/dataset/relation-update.js +1 -0
  63. package/lib/commands/dataset/relations.js +1 -0
  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 -0
  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 -0
  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
  205. package/lib/commands/dataset/link-create.js +0 -1
  206. package/lib/commands/dataset/link-delete.js +0 -1
  207. package/lib/commands/dataset/link-shared.js +0 -1
  208. package/lib/commands/dataset/link-update.js +0 -1
  209. package/lib/commands/dataset/links.js +0 -1
@@ -1 +1 @@
1
- const a32_0x49c204=a32_0x1ec1;(function(_0x34b339,_0x1e5515){const _0x544c9f=a32_0x1ec1,_0x34006e=_0x34b339();while(!![]){try{const _0x414783=parseInt(_0x544c9f(0x147))/0x1+parseInt(_0x544c9f(0x11c))/0x2*(-parseInt(_0x544c9f(0x137))/0x3)+-parseInt(_0x544c9f(0x120))/0x4*(-parseInt(_0x544c9f(0x11d))/0x5)+parseInt(_0x544c9f(0x10d))/0x6*(-parseInt(_0x544c9f(0x135))/0x7)+parseInt(_0x544c9f(0x141))/0x8*(parseInt(_0x544c9f(0x106))/0x9)+-parseInt(_0x544c9f(0xfd))/0xa*(-parseInt(_0x544c9f(0x101))/0xb)+parseInt(_0x544c9f(0x108))/0xc*(-parseInt(_0x544c9f(0x114))/0xd);if(_0x414783===_0x1e5515)break;else _0x34006e['push'](_0x34006e['shift']());}catch(_0x15834d){_0x34006e['push'](_0x34006e['shift']());}}}(a32_0x202b,0x2721c));import{readFile}from'node:fs/promises';function a32_0x202b(){const _0x445870=['set','3964sKcWYR','string','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','unchanged','type','HOOK','Push\x20only\x20this\x20script\x20type','description','Runtime\x20script\x20cache\x20cleared.','No\x20local\x20BFF\x20functions\x20found.','scriptsRoot','Push\x20local\x20BFF\x20scripts\x20to\x20remote','Cannot\x20resolve\x20dataset\x20for\x20\x22','parse','runtime\x20cache\x20cleared','operationType','lockKey','functions','POST','lastSync','create','1355207sbqTWH','hash','24uDnKmh','apiDir','lockFilePath','Lock\x20scope\x20for\x20app\x20\x22','datasetId','/api/management/library/scripts/save','name','every','\x20uploaded,\x20','code','27944sbpnUU','alias','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','cleared','would_push','datasetCodeToDataset','295085opDzYs','str','BFF\x20HOOK\x20','push','filePath','stringify','functionNode','boolean','some','join','\x22\x20not\x20found\x20after\x20ensureLockScope.','map','version','\x20failed,\x20','toISOString','1550ZwflPF','script','get','attempted','6303sPzLlj','Push\x20complete:\x20','values','aliasToDatasetCode','COMMON','639IrAlfs','length','1296660ZgGDTY','runtime\x20cache\x20not\x20needed','status','validation','appCode','6myIcku','runtime\x20cache\x20clear\x20failed','remoteId','force','high-risk-write','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','Would\x20inspect\x20','13EtfUUQ','datasetCode','has','update','Run\x20`','apps','message','\x20skipped,\x20','57108tZqmMD','295lFKdnV','bff'];a32_0x202b=function(){return _0x445870;};return a32_0x202b();}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';import{assertDatasetSupportsLocalDevelopment}from'../../commands/dataset/capability.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':a32_0x49c204(0x11e),'command':a32_0x49c204(0x14a),'description':a32_0x49c204(0x12b),'risk':a32_0x49c204(0x111),'flags':[{'name':a32_0x49c204(0x124),'type':a32_0x49c204(0x121),'description':a32_0x49c204(0x126),'enum':[a32_0x49c204(0x105),'ENDPOINT',a32_0x49c204(0x125)]},{'name':a32_0x49c204(0x13d),'type':a32_0x49c204(0x121),'description':a32_0x49c204(0x143)},{'name':a32_0x49c204(0x110),'type':a32_0x49c204(0xf5),'description':'Force\x20push\x20ignoring\x20hash\x20protection'}],async 'dryRun'(_0x42b1f3){const _0x1f82d2=a32_0x49c204,_0x5821a0=loadBffProjectConfig(_0x42b1f3[_0x1f82d2(0x10c)]),_0x2e34e8=await readBffLockFile(_0x5821a0[_0x1f82d2(0x139)]),{appLock:_0x30145b}=ensureLockScope(_0x2e34e8??createEmptyBffLock(),_0x42b1f3[_0x1f82d2(0x10c)],_0x5821a0['scriptsRoot'],_0x1f82d2(0x14a)),_0x482e47=await getTargetFunctions(_0x5821a0,_0x42b1f3),_0x46ad6f=_0x42b1f3['bool'](_0x1f82d2(0x110)),_0x4edcdc=[];for(const _0xb3d5b7 of _0x482e47){const _0x42ac37=await computeFileHash(_0xb3d5b7['filePath']),_0x33d532=_0x30145b[_0x1f82d2(0x131)][_0xb3d5b7['lockKey']],_0x28f3d6=!!_0x33d532&&_0x33d532[_0x1f82d2(0x136)]===_0x42ac37;_0x4edcdc[_0x1f82d2(0x14a)]({'lockKey':_0xb3d5b7['lockKey'],'filePath':_0xb3d5b7[_0x1f82d2(0x14b)],'remoteId':_0x33d532?.[_0x1f82d2(0x10f)]??null,'mode':_0x33d532?.[_0x1f82d2(0x10f)]?_0x1f82d2(0x117):_0x1f82d2(0x134),'status':!_0x46ad6f&&_0x28f3d6?_0x1f82d2(0x123):'would_push'});}return{'method':_0x1f82d2(0x132),'url':_0x1f82d2(0x13c),'body':{'appCode':_0x42b1f3['appCode'],'force':_0x46ad6f,'files':_0x4edcdc,'cacheClearAtRuntime':_0x4edcdc['some'](_0x1b0705=>_0x1b0705[_0x1f82d2(0x10a)]===_0x1f82d2(0x145)),'cacheClearAtRuntimeTimes':_0x4edcdc[_0x1f82d2(0xf6)](_0x4457e1=>_0x4457e1['status']==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x1f82d2(0x113)+_0x4edcdc[_0x1f82d2(0x107)]+_0x1f82d2(0x112)};},async 'execute'(_0x4ddf9b){const _0x2ec345=a32_0x49c204,_0xadf1f9=loadBffProjectConfig(_0x4ddf9b[_0x2ec345(0x10c)]),_0x229a98=await readBffLockFile(_0xadf1f9[_0x2ec345(0x139)]),{lockData:_0x427659,appLock:_0x372ea7}=ensureLockScope(_0x229a98??createEmptyBffLock(),_0x4ddf9b['appCode'],_0xadf1f9[_0x2ec345(0x12a)],_0x2ec345(0x14a)),_0x377038=await getTargetFunctions(_0xadf1f9,_0x4ddf9b);if(_0x377038[_0x2ec345(0x107)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x2ec345(0x129)};const _0x4e6a2c=_0x4ddf9b['bool'](_0x2ec345(0x110)),_0x32fb3c=JSON[_0x2ec345(0x12d)](JSON[_0x2ec345(0x14c)](_0x427659)),_0x14d49a=_0x32fb3c[_0x2ec345(0x119)][_0x4ddf9b[_0x2ec345(0x10c)]];if(!_0x14d49a)throw new Error(_0x2ec345(0x13a)+_0x4ddf9b[_0x2ec345(0x10c)]+_0x2ec345(0xf8));const _0x34f955=await buildHookMaps(_0x4ddf9b[_0x2ec345(0x10c)],_0x4ddf9b[_0x2ec345(0x138)],_0x377038,_0x14d49a),_0x1d8409=[],_0x59506f=[],_0x50ca5e=[];for(const _0x24d1d8 of _0x377038){const _0x4c7b8a=await computeFileHash(_0x24d1d8[_0x2ec345(0x14b)]),_0x309b87=_0x14d49a[_0x2ec345(0x131)][_0x24d1d8[_0x2ec345(0x130)]];if(!_0x4e6a2c&&_0x309b87&&_0x309b87[_0x2ec345(0x136)]===_0x4c7b8a){_0x59506f['push']({'lockKey':_0x24d1d8[_0x2ec345(0x130)],'reason':_0x2ec345(0x123)});continue;}try{await uploadSingleFunction(_0x4ddf9b[_0x2ec345(0x10c)],_0x24d1d8,_0x14d49a,_0x34f955);const _0x3910c0=_0x14d49a[_0x2ec345(0x131)][_0x24d1d8[_0x2ec345(0x130)]];_0x1d8409[_0x2ec345(0x14a)]({'lockKey':_0x24d1d8[_0x2ec345(0x130)],'remoteId':_0x3910c0?.[_0x2ec345(0x10f)]??0x0});}catch(_0x18ffcc){_0x50ca5e['push']({'lockKey':_0x24d1d8[_0x2ec345(0x130)],'error':_0x18ffcc instanceof Error?_0x18ffcc['message']:String(_0x18ffcc)});}}_0x14d49a[_0x2ec345(0x133)]=new Date()[_0x2ec345(0xfc)](),await writeBffLockFile(_0xadf1f9['lockFilePath'],_0x32fb3c),await waitForUploadedLockEntries(_0xadf1f9[_0x2ec345(0x139)],_0x4ddf9b['appCode'],_0x1d8409[_0x2ec345(0xf9)](_0x1248a9=>_0x1248a9[_0x2ec345(0x130)]));let _0x55b8c9={'attempted':![],'cleared':![]};if(_0x1d8409[_0x2ec345(0x107)]>0x0)try{let _0x59cf8a='';for(let _0x4cac87=0x0;_0x4cac87<CACHE_CLEAR_ATTEMPTS;_0x4cac87+=0x1){_0x59cf8a=await clearBffScriptCache(),_0x4cac87<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x55b8c9={'attempted':!![],'cleared':!![],'message':_0x59cf8a||_0x2ec345(0x128)};}catch(_0x38c50e){_0x55b8c9={'attempted':!![],'cleared':![],'error':_0x38c50e instanceof Error?_0x38c50e[_0x2ec345(0x11a)]:String(_0x38c50e)};}const _0x329f5f=_0x50ca5e[_0x2ec345(0x107)]===0x0&&(_0x55b8c9[_0x2ec345(0x100)]?_0x55b8c9[_0x2ec345(0x144)]:!![]),_0x30b8c2=_0x55b8c9[_0x2ec345(0x100)]?_0x55b8c9[_0x2ec345(0x144)]?_0x2ec345(0x12e):_0x2ec345(0x10e):_0x2ec345(0x109);return{'ok':_0x329f5f,'data':{'uploaded':_0x1d8409,'skipped':_0x59506f,'failed':_0x50ca5e,'cacheClear':_0x55b8c9},'message':_0x2ec345(0x102)+_0x1d8409[_0x2ec345(0x107)]+_0x2ec345(0x13f)+_0x59506f[_0x2ec345(0x107)]+_0x2ec345(0x11b)+_0x50ca5e[_0x2ec345(0x107)]+_0x2ec345(0xfb)+_0x30b8c2};}};async function getTargetFunctions(_0x3c6b1a,_0x358a43){const _0x35a738=a32_0x49c204,_0x4c23fb=_0x358a43[_0x35a738(0x148)](_0x35a738(0x124)),_0x146ede=_0x358a43[_0x35a738(0x148)](_0x35a738(0x13d)),_0x3e1a93=normalizeBffType(_0x4c23fb)??undefined;if(_0x146ede&&!_0x3e1a93)throw CliErrors[_0x35a738(0x10b)]('--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.');const _0x426905=await scanLocalBffFunctions(_0x3c6b1a,_0x3e1a93);if(_0x146ede){const _0x498384=_0x426905['filter'](_0x453370=>_0x453370['name']===_0x146ede);if(_0x498384['length']===0x0)throw CliErrors[_0x35a738(0x10b)]('Local\x20function\x20not\x20found:\x20'+_0x3e1a93+'/'+_0x146ede);return _0x498384;}return _0x426905;}function a32_0x1ec1(_0x1af3ff,_0x555fa4){_0x1af3ff=_0x1af3ff-0xf5;const _0x202b15=a32_0x202b();let _0x1ec164=_0x202b15[_0x1af3ff];return _0x1ec164;}async function buildHookMaps(_0x260c52,_0x428066,_0x39d97e,_0x2ecdb6){const _0x2758d8=a32_0x49c204,_0x52bb13=_0x39d97e[_0x2758d8(0xf6)](_0x2e9a55=>_0x2e9a55['type']===_0x2758d8(0x125));if(!_0x52bb13)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x1a38f6=loadAliasMap(_0x428066,undefined,resolveApiFilePath(_0x428066,_0x260c52)),_0x2c0654=new Map(_0x1a38f6[_0x2758d8(0xf9)](_0x7891e5=>[_0x7891e5['alias'],_0x7891e5[_0x2758d8(0x115)]]));for(const _0x2b0213 of Object[_0x2758d8(0x103)](_0x2ecdb6[_0x2758d8(0x131)])){_0x2b0213[_0x2758d8(0x142)]&&_0x2b0213[_0x2758d8(0x115)]&&!_0x2c0654[_0x2758d8(0x116)](_0x2b0213[_0x2758d8(0x142)])&&_0x2c0654[_0x2758d8(0x11f)](_0x2b0213[_0x2758d8(0x142)],_0x2b0213[_0x2758d8(0x115)]);}const _0x581ec7=await listDatasets(_0x260c52),_0x24f337=new Map(_0x581ec7['map'](_0x48aa2d=>[_0x48aa2d[_0x2758d8(0x140)],_0x48aa2d]));return{'aliasToDatasetCode':_0x2c0654,'datasetCodeToDataset':_0x24f337};}async function uploadSingleFunction(_0x32c92d,_0x2350d2,_0x2a6884,_0x37288c){const _0x40b0b5=a32_0x49c204,_0xc27d3a=await readFile(_0x2350d2['filePath'],'utf8'),_0x1cc7ce=await computeFileHash(_0x2350d2['filePath']),_0x5ce191=_0x2a6884[_0x40b0b5(0x131)][_0x2350d2['lockKey']];if(_0x5ce191?.[_0x40b0b5(0x10f)]&&_0x5ce191[_0x40b0b5(0xfa)]==null)throw CliErrors['validation'](_0x2350d2[_0x40b0b5(0x130)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x4cf4da=extractScriptDescription(_0xc27d3a);if(!_0x4cf4da&&_0x5ce191?.[_0x40b0b5(0x10f)]){const _0x30f297=await getBffScriptInfo(_0x5ce191['remoteId']);_0x4cf4da=_0x30f297[_0x40b0b5(0x127)]||undefined;}const _0xc1ec8d={'appCode':_0x32c92d,'functionName':_0x2350d2[_0x40b0b5(0x13d)],'scriptType':_0x2350d2[_0x40b0b5(0x124)],'scriptContent':_0xc27d3a};if(_0x5ce191?.[_0x40b0b5(0x10f)])_0xc1ec8d['id']=_0x5ce191['remoteId'];if(_0x5ce191?.[_0x40b0b5(0xfa)]!=null)_0xc1ec8d[_0x40b0b5(0xfa)]=_0x5ce191[_0x40b0b5(0xfa)];if(_0x4cf4da)_0xc1ec8d[_0x40b0b5(0x127)]=_0x4cf4da;if(_0x2350d2[_0x40b0b5(0x124)]===_0x40b0b5(0x125)){const _0x724797=_0x2350d2[_0x40b0b5(0x142)];if(!_0x724797||!_0x2350d2[_0x40b0b5(0x12f)]||!_0x2350d2[_0x40b0b5(0x14d)])throw CliErrors[_0x40b0b5(0x10b)]('Incomplete\x20HOOK\x20path:\x20'+_0x2350d2[_0x40b0b5(0x130)]);const _0x216368=_0x37288c['aliasToDatasetCode'][_0x40b0b5(0xff)](_0x724797)??_0x5ce191?.['datasetCode']??_0x724797,_0xdf01f0=_0x37288c[_0x40b0b5(0x146)][_0x40b0b5(0xff)](_0x216368);if(!_0xdf01f0)throw CliErrors[_0x40b0b5(0x10b)](_0x40b0b5(0x12c)+_0x724797+'\x22.\x20'+(_0x40b0b5(0x118)+CLI_BIN_NAME+_0x40b0b5(0x122)));assertDatasetSupportsLocalDevelopment(_0xdf01f0,_0x40b0b5(0x149)+_0x2350d2[_0x40b0b5(0x130)]),_0xc1ec8d[_0x40b0b5(0x13b)]=_0xdf01f0['id'],_0xc1ec8d[_0x40b0b5(0x12f)]=_0x2350d2['operationType'],_0xc1ec8d[_0x40b0b5(0x14d)]=_0x2350d2[_0x40b0b5(0x14d)];}const _0x541400=await saveBffScript(_0xc1ec8d),_0x15dc3e=_0x541400['id'],_0x414847=_0x541400[_0x40b0b5(0xfe)]??await getBffScriptInfo(_0x15dc3e),_0x24218c={'hash':_0x1cc7ce,'remoteId':_0x15dc3e,'version':_0x414847['version']};if(_0x2350d2[_0x40b0b5(0x124)]===_0x40b0b5(0x125)){const _0x2d0723=_0x2350d2[_0x40b0b5(0x142)],_0x3ef605=_0x37288c[_0x40b0b5(0x104)][_0x40b0b5(0xff)](_0x2d0723)??_0x5ce191?.[_0x40b0b5(0x115)]??_0x2d0723;_0x37288c[_0x40b0b5(0x104)]['has'](_0x2d0723)?_0x24218c[_0x40b0b5(0x142)]=_0x2d0723:_0x24218c[_0x40b0b5(0x142)]=_0x5ce191?.[_0x40b0b5(0x142)],_0x24218c[_0x40b0b5(0x115)]=_0x3ef605,_0x24218c[_0x40b0b5(0x12f)]=_0x2350d2[_0x40b0b5(0x12f)],_0x24218c['functionNode']=_0x2350d2[_0x40b0b5(0x14d)];}_0x2a6884[_0x40b0b5(0x131)][_0x2350d2[_0x40b0b5(0x130)]]=_0x24218c;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;async function waitForUploadedLockEntries(_0x506a17,_0x23cb86,_0x1db4b7){const _0x21e35f=a32_0x49c204;if(_0x1db4b7[_0x21e35f(0x107)]===0x0)return;for(let _0xe81821=0x0;_0xe81821<LOCK_SETTLE_RETRY_COUNT;_0xe81821+=0x1){const _0x317d1a=await readBffLockFile(_0x506a17),_0x387784=_0x317d1a?.[_0x21e35f(0x119)]?.[_0x23cb86]?.['functions']??{},_0x5d01a8=_0x1db4b7[_0x21e35f(0x13e)](_0x56acb0=>!!_0x387784[_0x56acb0]?.['remoteId']);if(_0x5d01a8)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error('Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20'+_0x1db4b7[_0x21e35f(0xf7)](',\x20')+'.');}
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 +1 @@
1
- const a33_0x399500=a33_0x37bf;(function(_0x4251c3,_0x1ae353){const _0x21ffb7=a33_0x37bf,_0x4b1c39=_0x4251c3();while(!![]){try{const _0x9b2255=-parseInt(_0x21ffb7(0x8b))/0x1+parseInt(_0x21ffb7(0x73))/0x2*(-parseInt(_0x21ffb7(0x81))/0x3)+parseInt(_0x21ffb7(0x69))/0x4+-parseInt(_0x21ffb7(0x6e))/0x5*(parseInt(_0x21ffb7(0x75))/0x6)+parseInt(_0x21ffb7(0x79))/0x7*(parseInt(_0x21ffb7(0x71))/0x8)+-parseInt(_0x21ffb7(0x6d))/0x9+parseInt(_0x21ffb7(0x72))/0xa*(parseInt(_0x21ffb7(0x77))/0xb);if(_0x9b2255===_0x1ae353)break;else _0x4b1c39['push'](_0x4b1c39['shift']());}catch(_0x454b49){_0x4b1c39['push'](_0x4b1c39['shift']());}}}(a33_0x430e,0xabbbd));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';function a33_0x37bf(_0x5db483,_0x314201){_0x5db483=_0x5db483-0x68;const _0x430e25=a33_0x430e();let _0x37bf82=_0x430e25[_0x5db483];return _0x37bf82;}import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';function a33_0x430e(){const _0x2e75fa=['apiDir','scriptsRoot','1102552JxkrOm','functions','alias','hash','8993718RaZiXS','130LsOCTO','filePath','appCode','304IsUAVm','233130PgFoVG','1748pvUooA','boolean','303762BTydhQ','bool','1991HuVYjb','status','109445RSiFXp','lockKey','\x20unchanged','all','\x20modified,\x20','read','bff','All\x20BFF\x20scripts\x20are\x20in\x20sync.','4803hNQdfE','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','has','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','lockFilePath','map','datasetCode','length','remote','push','671122GkOubN'];a33_0x430e=function(){return _0x2e75fa;};return a33_0x430e();}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':a33_0x399500(0x7f),'command':'status','description':a33_0x399500(0x82),'risk':a33_0x399500(0x7e),'flags':[{'name':a33_0x399500(0x89),'type':a33_0x399500(0x74),'description':a33_0x399500(0x84)}],async 'execute'(_0x2b132d){const _0x2d5955=a33_0x399500,_0x1e42bf=loadBffProjectConfig(_0x2b132d[_0x2d5955(0x70)]),_0x1509c8=await readBffLockFile(_0x1e42bf[_0x2d5955(0x85)]),{appLock:_0xd472c2}=ensureLockScope(_0x1509c8??createEmptyBffLock(),_0x2b132d[_0x2d5955(0x70)],_0x1e42bf[_0x2d5955(0x68)],_0x2d5955(0x78)),_0x1952fc=await scanLocalBffFunctions(_0x1e42bf),_0x208fa4=[],_0x333057=[],_0x5dbbfb=[];for(const _0x47b23e of _0x1952fc){const _0x402afc=await computeFileHash(_0x47b23e[_0x2d5955(0x6f)]),_0x1ef96c=_0xd472c2[_0x2d5955(0x6a)][_0x47b23e[_0x2d5955(0x7a)]];if(!_0x1ef96c)_0x208fa4[_0x2d5955(0x8a)](_0x47b23e[_0x2d5955(0x7a)]);else _0x1ef96c[_0x2d5955(0x6c)]!==_0x402afc?_0x333057[_0x2d5955(0x8a)](_0x47b23e['lockKey']):_0x5dbbfb['push'](_0x47b23e['lockKey']);}const _0x50bb60=[];if(_0x2b132d[_0x2d5955(0x76)](_0x2d5955(0x89))){const _0x4ee31f=loadAliasMap(_0x2b132d[_0x2d5955(0x8c)],undefined,resolveApiFilePath(_0x2b132d[_0x2d5955(0x8c)],_0x2b132d[_0x2d5955(0x70)])),_0x20fad6=new Map(_0x4ee31f[_0x2d5955(0x86)](_0x25b002=>[_0x25b002[_0x2d5955(0x87)],_0x25b002[_0x2d5955(0x6b)]])),[_0x59128a,_0x57f0e6]=await Promise[_0x2d5955(0x7c)]([listBffScripts(_0x2b132d['appCode']),getBffScriptStatistics(_0x2b132d[_0x2d5955(0x70)])]),_0x50fa7a=createHookLocationMap(_0x57f0e6),_0x981b61=new Set(_0x1952fc[_0x2d5955(0x86)](_0x3b22f4=>_0x3b22f4[_0x2d5955(0x7a)]));for(const _0x2609b8 of _0x59128a){const _0x2d5e1a=resolveRemoteScriptTarget(_0x1e42bf,_0x2609b8,_0x50fa7a,_0xd472c2[_0x2d5955(0x6a)],_0x20fad6);_0x2d5e1a&&!_0x981b61[_0x2d5955(0x83)](_0x2d5e1a['lockKey'])&&_0x50bb60['push'](_0x2d5e1a[_0x2d5955(0x7a)]);}}const _0x54bb00=_0x208fa4[_0x2d5955(0x88)]===0x0&&_0x333057[_0x2d5955(0x88)]===0x0&&_0x50bb60[_0x2d5955(0x88)]===0x0;return{'ok':!![],'data':{'added':_0x208fa4,'modified':_0x333057,'unchanged':_0x5dbbfb,'remoteOnly':_0x50bb60},'message':_0x54bb00?_0x2d5955(0x80):_0x208fa4[_0x2d5955(0x88)]+'\x20added,\x20'+_0x333057[_0x2d5955(0x88)]+_0x2d5955(0x7d)+_0x5dbbfb[_0x2d5955(0x88)]+_0x2d5955(0x7b)+(_0x50bb60[_0x2d5955(0x88)]>0x0?',\x20'+_0x50bb60['length']+'\x20remote-only':'')};}};
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 +1 @@
1
- const a34_0x15b66c=a34_0xe198;(function(_0x190f52,_0x46501c){const _0x35e8ab=a34_0xe198,_0x40c333=_0x190f52();while(!![]){try{const _0x47ae46=-parseInt(_0x35e8ab(0xd2))/0x1*(parseInt(_0x35e8ab(0xe3))/0x2)+parseInt(_0x35e8ab(0xea))/0x3*(-parseInt(_0x35e8ab(0xb0))/0x4)+parseInt(_0x35e8ab(0xb1))/0x5*(parseInt(_0x35e8ab(0xdd))/0x6)+-parseInt(_0x35e8ab(0xb3))/0x7+parseInt(_0x35e8ab(0xb5))/0x8*(parseInt(_0x35e8ab(0xc1))/0x9)+parseInt(_0x35e8ab(0xcd))/0xa+parseInt(_0x35e8ab(0xcf))/0xb;if(_0x47ae46===_0x46501c)break;else _0x40c333['push'](_0x40c333['shift']());}catch(_0x530c3d){_0x40c333['push'](_0x40c333['shift']());}}}(a34_0xdf90,0x4f9dc));import a34_0x2d9f6c from'chalk';import a34_0x1d4325 from'ora';import a34_0x5a7f9f 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_0xdf90(){const _0x278c24=['message','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','includes','str','beta','npm','Current\x20version:\x20','\x20\x20Run\x20manually:\x20','entries','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','\x20install\x20-g\x20','27SmPOKt','log','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','slice','boolean','Install\x20a\x20specific\x20CLI\x20version','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','gray','\x20→\x20','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.','...','https://registry.npmjs.org/-/package/','5379040UniAdg','map','2761869ktNtXM','Update\x20available:\x20','trim','1gaNgVh','Update\x20failed','source','flag','info','run','latest','fromEntries','\x20\x20Official\x20skill\x20update\x20failed:\x20','json','timeout','186DqrChn','Checking\x20official\x20skill\x20package...','skills','Skipping\x20official\x20skill\x20package\x20(--no-skills).','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','inherit','86810cTgSfB','object','unknown','skipped','toLowerCase','yellow','pipe','33iIXZsb','cwd','Already\x20up\x20to\x20date\x20(v','string','validation','@latest','no-skills','start','version','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).','error','succeed','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Requested\x20version:\x20','Already\x20on\x20requested\x20version\x20(v','--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','warn','nonInteractive','Updated\x20to\x20v','length','fail','Version\x20comparison\x20failed','230948CfBxsF','57685IwqLeT','bool','1055138QrJwll','green','23264idrVrf'];a34_0xdf90=function(){return _0x278c24;};return a34_0xdf90();}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 _0x5c74a2=a34_0xe198;return GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x5c74a2(0xc4)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x51bbd2=a34_0xe198,_0x509153=process['execPath'][_0x51bbd2(0xe7)]();if(_0x509153[_0x51bbd2(0xb8)]('bun'))return'bun';return _0x51bbd2(0xbb);}const updateFlags=[{'name':a34_0x15b66c(0xba),'type':'boolean','description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':'string','description':a34_0x15b66c(0xc6)},{'name':a34_0x15b66c(0xf0),'type':a34_0x15b66c(0xc5),'description':a34_0x15b66c(0xb7),'default':![]},{'name':'skills','type':'boolean','description':'Refresh\x20official\x20skill\x20package\x20after\x20updating','default':!![],'hidden':!![]}];function getRequestedVersion(_0x844025){const _0x2a1302=a34_0x15b66c;return _0x844025[_0x2a1302(0xb9)](_0x2a1302(0xf2))['trim']();}function shouldSkipOfficialSkill(_0x5a34c5){const _0x2da5e4=a34_0x15b66c;return _0x5a34c5[_0x2da5e4(0xb2)](_0x2da5e4(0xf0))||_0x5a34c5[_0x2da5e4(0xd5)](_0x2da5e4(0xdf))===![];}async function validateUpdateFlags(_0x21500b){const _0x41265c=a34_0x15b66c,_0x3e3a22=_0x21500b['bool'](_0x41265c(0xba)),_0xcede01=getRequestedVersion(_0x21500b);if(_0x3e3a22&&_0xcede01)throw CliErrors['validation'](_0x41265c(0xa9),_0x41265c(0xca));if(_0xcede01&&!a34_0x5a7f9f['valid'](_0xcede01))throw CliErrors[_0x41265c(0xee)]('Invalid\x20version:\x20'+_0xcede01,_0x41265c(0xc7));}async function fetchNpmDistTags(){const _0x39cbd8=a34_0x15b66c;try{const _0x25c3b1=await fetch(_0x39cbd8(0xcc)+encodeURIComponent(NPM_PACKAGE_NAME)+'/dist-tags',{'signal':AbortSignal[_0x39cbd8(0xdc)](0x2710)});if(!_0x25c3b1['ok'])return null;const _0x3aad4b=await _0x25c3b1[_0x39cbd8(0xdb)]();if(!_0x3aad4b||typeof _0x3aad4b!==_0x39cbd8(0xe4))return null;return Object[_0x39cbd8(0xd9)](Object[_0x39cbd8(0xbe)](_0x3aad4b)['filter'](([,_0x414565])=>typeof _0x414565===_0x39cbd8(0xed)&&_0x414565[_0x39cbd8(0xd1)]()[_0x39cbd8(0xad)]>0x0)[_0x39cbd8(0xce)](([_0x755b79,_0xea7814])=>[_0x755b79,String(_0xea7814)[_0x39cbd8(0xd1)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x38fd5e){const _0x25277d=await fetchNpmDistTags();return _0x25277d?.[_0x38fd5e]??null;}async function fetchLatestVersion(){const _0xb31506=await fetchNpmDistTagVersion('latest');if(_0xb31506)return _0xb31506;const _0x1c28be=await getCdnConfig();return _0x1c28be?.['cli']?.['stableVersion']??null;}function a34_0xe198(_0x100b82,_0x46e361){_0x100b82=_0x100b82-0xa7;const _0xdf90b7=a34_0xdf90();let _0xe19830=_0xdf90b7[_0x100b82];return _0xe19830;}async function resolveTargetVersion(_0x34b358){const _0x457cba=a34_0x15b66c,_0x6cd0da=getRequestedVersion(_0x34b358);if(_0x6cd0da)return{'version':_0x6cd0da,'source':_0x457cba(0xf2)};if(_0x34b358[_0x457cba(0xb2)]('beta')){const _0x36c777=await fetchNpmDistTagVersion(_0x457cba(0xba));if(!_0x36c777)return null;return{'version':_0x36c777,'source':'beta'};}const _0x2b43ce=await fetchLatestVersion();if(!_0x2b43ce)return null;return{'version':_0x2b43ce,'source':_0x457cba(0xd8)};}function shouldInstallTarget(_0x2b5f25,_0x289948){const _0x3e61e8=a34_0x15b66c;if(_0x289948[_0x3e61e8(0xd4)]===_0x3e61e8(0xf2)||_0x289948[_0x3e61e8(0xd4)]===_0x3e61e8(0xba))return!a34_0x5a7f9f['eq'](_0x2b5f25,_0x289948[_0x3e61e8(0xf2)]);return a34_0x5a7f9f['lt'](_0x2b5f25,_0x289948[_0x3e61e8(0xf2)]);}function getInstallPlanLabel(_0x2bbbe5,_0x1d75ea){const _0xdae59a=a34_0x15b66c;switch(_0x1d75ea[_0xdae59a(0xd4)]){case _0xdae59a(0xba):return'Beta\x20version:\x20'+a34_0x2d9f6c['yellow'](_0x2bbbe5)+_0xdae59a(0xc9)+a34_0x2d9f6c[_0xdae59a(0xb4)](_0x1d75ea[_0xdae59a(0xf2)]);case _0xdae59a(0xf2):return _0xdae59a(0xa7)+a34_0x2d9f6c['yellow'](_0x2bbbe5)+_0xdae59a(0xc9)+a34_0x2d9f6c[_0xdae59a(0xb4)](_0x1d75ea[_0xdae59a(0xf2)]);case _0xdae59a(0xd8):default:return _0xdae59a(0xd0)+a34_0x2d9f6c[_0xdae59a(0xe8)](_0x2bbbe5)+_0xdae59a(0xc9)+a34_0x2d9f6c['green'](_0x1d75ea[_0xdae59a(0xf2)]);}}async function installOfficialSkill(_0x1f0910){const _0x31d8f9=a34_0x15b66c;console[_0x31d8f9(0xc2)](a34_0x2d9f6c[_0x31d8f9(0xc8)](_0x31d8f9(0xde)));const _0x5c6eae=runNpxSkillsAddGlobal(process[_0x31d8f9(0xeb)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x1f0910?_0x31d8f9(0xe9):_0x31d8f9(0xe2)});if(_0x5c6eae[_0x31d8f9(0xe6)]){console[_0x31d8f9(0xc2)](a34_0x2d9f6c[_0x31d8f9(0xc8)](_0x31d8f9(0xf3)));return;}if(_0x5c6eae['ok']){console[_0x31d8f9(0xc2)](a34_0x2d9f6c[_0x31d8f9(0xc8)]('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x31d8f9(0xaa)](a34_0x2d9f6c[_0x31d8f9(0xe8)](_0x31d8f9(0xda)+(_0x5c6eae['error']||_0x31d8f9(0xe5)))),console['log'](a34_0x2d9f6c[_0x31d8f9(0xc8)](_0x31d8f9(0xbd)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x292545){const _0x57ff15=a34_0x15b66c;await validateUpdateFlags(_0x292545);const _0x577300=getCurrentVersion();console[_0x57ff15(0xc2)](_0x57ff15(0xbc)+_0x577300);const _0x19f5fd=a34_0x1d4325('Checking\x20for\x20updates...')[_0x57ff15(0xf1)](),_0x45cee5=await resolveTargetVersion(_0x292545);if(!_0x45cee5){const _0x28033b=_0x292545[_0x57ff15(0xb2)](_0x57ff15(0xba))?'Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm':_0x57ff15(0xe1);return _0x19f5fd[_0x57ff15(0xae)](_0x28033b),console[_0x57ff15(0xc2)](a34_0x2d9f6c[_0x57ff15(0xc8)](_0x57ff15(0xbf)+NPM_PACKAGE_NAME+_0x57ff15(0xef))),{'ok':![],'message':_0x28033b};}const _0x10dcea=a34_0x5a7f9f['valid'](VERSION),_0x3565ed=a34_0x5a7f9f['valid'](_0x45cee5['version']);if(!_0x10dcea||!_0x3565ed)return _0x19f5fd[_0x57ff15(0xae)](_0x57ff15(0xaf)),{'ok':![],'message':_0x57ff15(0xaf)};if(!shouldInstallTarget(_0x10dcea,_0x45cee5)){const _0xed16e2=_0x45cee5['source']===_0x57ff15(0xf2)?_0x57ff15(0xa8)+_0x45cee5[_0x57ff15(0xf2)]+')':_0x57ff15(0xec)+_0x45cee5['version']+')';return _0x19f5fd[_0x57ff15(0xf5)](_0xed16e2),shouldSkipOfficialSkill(_0x292545)?console[_0x57ff15(0xc2)](a34_0x2d9f6c[_0x57ff15(0xc8)](_0x57ff15(0xe0))):await installOfficialSkill(_0x292545[_0x57ff15(0xab)]),{'ok':!![]};}_0x19f5fd[_0x57ff15(0xd6)](getInstallPlanLabel(_0x577300,_0x45cee5));const _0x1a0ac9=detectPackageManager(),_0x5c1949=_0x1a0ac9===_0x57ff15(0xbb)?resolveNpmBin('npm'):_0x1a0ac9,_0x1798cf=a34_0x1d4325('Updating\x20via\x20'+_0x1a0ac9+_0x57ff15(0xcb))[_0x57ff15(0xf1)]();try{return await execa(_0x5c1949,['install','-g',NPM_PACKAGE_NAME+'@'+_0x45cee5[_0x57ff15(0xf2)]],{'stdio':'pipe'}),_0x1798cf[_0x57ff15(0xf5)](_0x57ff15(0xac)+_0x45cee5['version']),console['log'](a34_0x2d9f6c[_0x57ff15(0xc8)](_0x57ff15(0xc3))),shouldSkipOfficialSkill(_0x292545)?console[_0x57ff15(0xc2)](a34_0x2d9f6c[_0x57ff15(0xc8)](_0x57ff15(0xe0))):await installOfficialSkill(_0x292545['nonInteractive']),{'ok':!![]};}catch(_0x20cb5f){return _0x1798cf[_0x57ff15(0xae)](_0x57ff15(0xd3)),console[_0x57ff15(0xf4)](a34_0x2d9f6c['red']('\x20\x20'+_0x20cb5f['message'])),console[_0x57ff15(0xc2)](a34_0x2d9f6c[_0x57ff15(0xc8)]('\x20\x20Try\x20manually:\x20'+_0x1a0ac9+_0x57ff15(0xc0)+NPM_PACKAGE_NAME+'@'+_0x45cee5[_0x57ff15(0xf2)])),{'ok':![],'message':_0x20cb5f[_0x57ff15(0xb6)]};}}export const updateDefinition={'service':'update','command':a34_0x15b66c(0xd7),'description':a34_0x15b66c(0xf6),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
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 +1 @@
1
- (function(_0x31196e,_0x2a07c7){const _0x349636=a35_0x144e,_0x1b1ec5=_0x31196e();while(!![]){try{const _0x2c9ac5=-parseInt(_0x349636(0xd3))/0x1*(parseInt(_0x349636(0xce))/0x2)+-parseInt(_0x349636(0xd4))/0x3+-parseInt(_0x349636(0xcb))/0x4+parseInt(_0x349636(0xcc))/0x5*(-parseInt(_0x349636(0xcf))/0x6)+-parseInt(_0x349636(0xcd))/0x7*(parseInt(_0x349636(0xd2))/0x8)+-parseInt(_0x349636(0xca))/0x9*(parseInt(_0x349636(0xd0))/0xa)+parseInt(_0x349636(0xd1))/0xb;if(_0x2c9ac5===_0x2a07c7)break;else _0x1b1ec5['push'](_0x1b1ec5['shift']());}catch(_0x4e7eaa){_0x1b1ec5['push'](_0x1b1ec5['shift']());}}}(a35_0x48c8,0x60416));function a35_0x48c8(){const _0x2d800d=['694510EafFtW','176715kQdReY','108bTwUCP','6DaZpqV','72170NbWSZi','21137490eVoXtM','104ZSHeoU','11188Exlcni','598533SgXzoM','9UXWNxG','997444lVjmSf'];a35_0x48c8=function(){return _0x2d800d;};return a35_0x48c8();}function a35_0x144e(_0x5937cc,_0x456008){_0x5937cc=_0x5937cc-0xca;const _0x48c829=a35_0x48c8();let _0x144ec0=_0x48c829[_0x5937cc];return _0x144ec0;}import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';export const codegenDefinitions=[codegenSdk,codegenSql];
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 +1 @@
1
- const a36_0x2b71a9=a36_0x1f38;(function(_0x54daff,_0x58dd1d){const _0x2a232a=a36_0x1f38,_0x1adee1=_0x54daff();while(!![]){try{const _0xe142ec=parseInt(_0x2a232a(0x154))/0x1*(parseInt(_0x2a232a(0x150))/0x2)+-parseInt(_0x2a232a(0x158))/0x3+parseInt(_0x2a232a(0x14b))/0x4*(parseInt(_0x2a232a(0x152))/0x5)+parseInt(_0x2a232a(0x151))/0x6*(parseInt(_0x2a232a(0x14a))/0x7)+parseInt(_0x2a232a(0x15b))/0x8*(parseInt(_0x2a232a(0x157))/0x9)+-parseInt(_0x2a232a(0x147))/0xa+-parseInt(_0x2a232a(0x149))/0xb;if(_0xe142ec===_0x58dd1d)break;else _0x1adee1['push'](_0x1adee1['shift']());}catch(_0x12a7f3){_0x1adee1['push'](_0x1adee1['shift']());}}}(a36_0x3266,0xaab62));import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a36_0x1f38(_0x5d2b5e,_0x5f2ebf){_0x5d2b5e=_0x5d2b5e-0x145;const _0x326659=a36_0x3266();let _0x1f3895=_0x326659[_0x5d2b5e];return _0x1f3895;}function a36_0x3266(){const _0x3c354a=['read','tableName','138360IlmRGi','code','5870722BTLrqN','14vPRjnr','255004kuXhAj','name','str','bool','skip-imports','1660684FjasXt','677748EBTapz','10nWChna','codegen','1zLTciC','operation','boolean','558IISqTU','861306oikJdp','appCode','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','45176WNprsy'];a36_0x3266=function(){return _0x3c354a;};return a36_0x3266();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x2b71a9(0x153),'command':'sdk','description':a36_0x2b71a9(0x15a),'risk':a36_0x2b71a9(0x145),'flags':[CODE_FLAG_OPTIONAL,{'name':'alias','type':'string','description':'Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)'},{'name':a36_0x2b71a9(0x155),'type':'string','required':!![],'description':'Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)'},{'name':a36_0x2b71a9(0x14f),'type':a36_0x2b71a9(0x156),'description':'Omit\x20import\x20statements\x20from\x20generated\x20code'}],async 'execute'(_0x4fbf7a){const _0x28ba59=a36_0x2b71a9,{dataset:_0x5b7ee5,operation:_0xbec413}=await getOperationDetail(_0x4fbf7a[_0x28ba59(0x159)],_0x4fbf7a['str'](_0x28ba59(0x148)),_0x4fbf7a[_0x28ba59(0x14d)]('operation')),_0x2c4079=generateSdkCode(_0x5b7ee5,_0xbec413,{'includeImports':!_0x4fbf7a[_0x28ba59(0x14e)](_0x28ba59(0x14f))});return{'ok':!![],'data':{'dataset':{'name':_0x5b7ee5[_0x28ba59(0x14c)],'code':_0x5b7ee5[_0x28ba59(0x148)],'tableName':_0x5b7ee5[_0x28ba59(0x146)]},'operation':_0x4fbf7a[_0x28ba59(0x14d)](_0x28ba59(0x155)),'code':_0x2c4079}};}};
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 +1 @@
1
- const a37_0x9a87a9=a37_0x5a89;(function(_0x269ec6,_0x207574){const _0x2e5b05=a37_0x5a89,_0x94beea=_0x269ec6();while(!![]){try{const _0x5b2db3=-parseInt(_0x2e5b05(0x1e3))/0x1+-parseInt(_0x2e5b05(0x1d4))/0x2+parseInt(_0x2e5b05(0x1e6))/0x3+-parseInt(_0x2e5b05(0x1e2))/0x4*(parseInt(_0x2e5b05(0x1de))/0x5)+-parseInt(_0x2e5b05(0x1da))/0x6+-parseInt(_0x2e5b05(0x1dc))/0x7+parseInt(_0x2e5b05(0x1d7))/0x8;if(_0x5b2db3===_0x207574)break;else _0x94beea['push'](_0x94beea['shift']());}catch(_0x200326){_0x94beea['push'](_0x94beea['shift']());}}}(a37_0x10d9,0xba12e));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a37_0x5a89(_0x2636d3,_0x11af2c){_0x2636d3=_0x2636d3-0x1d0;const _0x10d933=a37_0x10d9();let _0x5a8940=_0x10d933[_0x2636d3];return _0x5a8940;}export const codegenSql={'service':a37_0x9a87a9(0x1d0),'command':a37_0x9a87a9(0x1e7),'description':a37_0x9a87a9(0x1d6),'risk':a37_0x9a87a9(0x1e0),'flags':[SQLCODE_FLAG,{'name':'target','type':a37_0x9a87a9(0x1e4),'description':a37_0x9a87a9(0x1d8),'default':a37_0x9a87a9(0x1db),'enum':['sdk',a37_0x9a87a9(0x1d9)]},{'name':a37_0x9a87a9(0x1df),'type':'boolean','description':a37_0x9a87a9(0x1d5)}],async 'execute'(_0x191df8){const _0x182fab=a37_0x9a87a9,_0x5e484a=await getSqlQueryInfo(_0x191df8[_0x182fab(0x1dd)],_0x191df8[_0x182fab(0x1e5)](_0x182fab(0x1d1))),_0x197eb3=_0x191df8[_0x182fab(0x1e5)](_0x182fab(0x1d2))||_0x182fab(0x1db),_0x1e5daa=generateSqlCodeTemplate(_0x5e484a,{'target':_0x197eb3,'includeImports':!_0x191df8[_0x182fab(0x1e1)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x5e484a[_0x182fab(0x1d3)],'sqlName':_0x5e484a['sqlName'],'target':_0x197eb3,'code':_0x1e5daa}};}};function a37_0x10d9(){const _0x43f302=['str','2137701ZxksqY','sql','codegen','sqlcode','target','sqlCode','2246294vNyYRv','Omit\x20import\x20statements\x20from\x20generated\x20code','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','36796600ICjFwC','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','bff','8547270EXUqQm','sdk','4720884IVVTHh','appCode','1875mwIOnb','no-imports','read','bool','3100pGdEXd','1037255JuyBVa','string'];a37_0x10d9=function(){return _0x43f302;};return a37_0x10d9();}
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 +1 @@
1
- (function(_0x164b5d,_0x1c4a00){const _0x3889d8=a38_0x432e,_0x1cfcfd=_0x164b5d();while(!![]){try{const _0x3ce955=parseInt(_0x3889d8(0x17c))/0x1*(-parseInt(_0x3889d8(0x17d))/0x2)+parseInt(_0x3889d8(0x18b))/0x3+-parseInt(_0x3889d8(0x178))/0x4+-parseInt(_0x3889d8(0x189))/0x5*(parseInt(_0x3889d8(0x17a))/0x6)+-parseInt(_0x3889d8(0x18e))/0x7+-parseInt(_0x3889d8(0x185))/0x8+parseInt(_0x3889d8(0x181))/0x9;if(_0x3ce955===_0x1c4a00)break;else _0x1cfcfd['push'](_0x1cfcfd['shift']());}catch(_0x2a0401){_0x1cfcfd['push'](_0x1cfcfd['shift']());}}}(a38_0x5b80,0x700f6));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x52777e from'chalk';import{validateAppcode}from'../../commands/common/validate.js';function a38_0x432e(_0x256aac,_0xec938d){_0x256aac=_0x256aac-0x16e;const _0x5b8001=a38_0x5b80();let _0x432eb1=_0x5b8001[_0x256aac];return _0x432eb1;}import{listRemoteApps}from'../../core/api-client.js';import{withActiveCookie}from'../../utils/with-active-cookie.js';function a38_0x5b80(){const _0x2585ec=['appCode','✎\x20自定义输入\x20appcode','✎\x20手动输入','无法获取远程应用列表,请手动输入。','find','未找到可用应用。','\x0a未找到可用应用。','\x0a无法获取远程应用列表,请手动输入。','map','length','118116wetWvx','请选择要绑定的应用:','30eRUvPs','App\x20Code:','1kPsSnk','1753618cmacKp','\x20\x20(','正在获取可用应用列表...','(跳过,稍后配置)','21064383pMWnRo','trim','custom','includes','6361960GmPAvJ','manual','message','gray','227515YCetws','skip','1469490MzjgsN','yellow','valid','3095547XPxlcA'];a38_0x5b80=function(){return _0x2585ec;};return a38_0x5b80();}import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0xf57000=await input({'message':'请输入\x20App\x20Code:','validate':_0x4fe62c=>{const _0x46a13e=a38_0x432e,_0x18d021=validateAppcode(_0x4fe62c[_0x46a13e(0x182)]());return _0x18d021[_0x46a13e(0x18d)]||_0x18d021['message']||'Invalid\x20App\x20Code';}});return _0xf57000['trim']();}export async function promptAppSelection(_0x16e773){const _0x457a58=a38_0x432e,_0x32de33=[{'name':a38_0x52777e[_0x457a58(0x18c)]('✎\x20自定义输入\x20appcode'),'value':-0x1},..._0x16e773[_0x457a58(0x176)]((_0x58771b,_0xd75bcf)=>({'name':_0x58771b['appName']+'\x20\x20'+a38_0x52777e[_0x457a58(0x188)]('('+_0x58771b[_0x457a58(0x16e)]+')'),'value':_0xd75bcf}))],_0xc27334=await checkbox({'message':'获取到\x20'+a38_0x52777e['cyan'](_0x16e773['length'])+'\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','choices':_0x32de33,'loop':![]});if(_0xc27334[_0x457a58(0x184)](-0x1))return _0x457a58(0x183);if(_0xc27334[_0x457a58(0x177)]===0x0)return'custom';return _0xc27334[_0x457a58(0x176)](_0x1b0257=>_0x16e773[_0x1b0257]);}export async function promptSingleAppSelection(_0x49060c){const _0x4d3f03=a38_0x432e,_0x320e61=[{'name':a38_0x52777e[_0x4d3f03(0x188)]('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x4d3f03(0x18a)},{'name':a38_0x52777e[_0x4d3f03(0x18c)](_0x4d3f03(0x16f)),'value':'custom'},..._0x49060c[_0x4d3f03(0x176)](_0x4f5301=>({'name':_0x4f5301['appName']+'\x20\x20'+a38_0x52777e['gray']('('+_0x4f5301[_0x4d3f03(0x16e)]+')'),'value':_0x4f5301[_0x4d3f03(0x16e)]}))],_0x3cf03f=await select({'message':_0x4d3f03(0x179),'choices':_0x320e61});if(_0x3cf03f==='skip')return _0x4d3f03(0x18a);if(_0x3cf03f===_0x4d3f03(0x183))return _0x4d3f03(0x183);return _0x49060c[_0x4d3f03(0x172)](_0x1766a9=>_0x1766a9[_0x4d3f03(0x16e)]===_0x3cf03f);}export async function selectSingleAppcode(_0x3c59f9){const _0x1ead75=a38_0x432e;if(!_0x3c59f9)return writeCliSideChannelLine(a38_0x52777e[_0x1ead75(0x188)]('(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)')),_fallbackOrSkip();writeCliSideChannelLine('正在获取可用应用列表...');let _0x4ddfa6;try{_0x4ddfa6=await withActiveCookie(_0x3c59f9,()=>listRemoteApps());}catch(_0x57ff62){writeCliSideChannelLine(a38_0x52777e[_0x1ead75(0x18c)](_0x1ead75(0x171)));if(_0x57ff62 instanceof Error)writeCliSideChannelLine(a38_0x52777e[_0x1ead75(0x188)](_0x1ead75(0x17e)+_0x57ff62[_0x1ead75(0x187)]+')'));return _fallbackOrSkip();}if(_0x4ddfa6['length']===0x0)return writeCliSideChannelLine(a38_0x52777e['yellow'](_0x1ead75(0x173))),_fallbackOrSkip();const _0x24b5bd=await promptSingleAppSelection(_0x4ddfa6);if(_0x24b5bd==='skip')return'';if(_0x24b5bd==='custom')return promptCustomAppcode();return _0x24b5bd[_0x1ead75(0x16e)];}export async function selectMultipleApps(_0xe76307){const _0x21eea6=a38_0x432e;writeCliSideChannelLine(_0x21eea6(0x17f));let _0x47e86b;try{_0x47e86b=await withActiveCookie(_0xe76307,()=>listRemoteApps());}catch(_0x3e33e4){writeCliSideChannelLine(_0x21eea6(0x175));if(_0x3e33e4 instanceof Error)writeCliSideChannelLine(_0x21eea6(0x17e)+_0x3e33e4['message']+')');return _0x21eea6(0x183);}if(_0x47e86b['length']===0x0)return writeCliSideChannelLine(_0x21eea6(0x174)),'custom';return promptAppSelection(_0x47e86b);}async function _fallbackOrSkip(){const _0x1f5e88=a38_0x432e,_0x449ac4=await select({'message':_0x1f5e88(0x17b),'choices':[{'name':a38_0x52777e['gray'](_0x1f5e88(0x180)),'value':'skip'},{'name':a38_0x52777e['yellow'](_0x1f5e88(0x170)),'value':_0x1f5e88(0x186)}]});if(_0x449ac4==='skip')return'';return promptCustomAppcode();}
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 +1 @@
1
- const a39_0x1efe31=a39_0x8264;(function(_0x4aaa9f,_0xfa3f52){const _0x40cb62=a39_0x8264,_0x1e63f0=_0x4aaa9f();while(!![]){try{const _0x3ada2b=parseInt(_0x40cb62(0x1e7))/0x1+parseInt(_0x40cb62(0x1df))/0x2*(-parseInt(_0x40cb62(0x1ed))/0x3)+parseInt(_0x40cb62(0x1e3))/0x4*(parseInt(_0x40cb62(0x1eb))/0x5)+-parseInt(_0x40cb62(0x1ea))/0x6*(-parseInt(_0x40cb62(0x1f3))/0x7)+parseInt(_0x40cb62(0x1e1))/0x8+parseInt(_0x40cb62(0x1e4))/0x9+-parseInt(_0x40cb62(0x1f6))/0xa*(parseInt(_0x40cb62(0x1f2))/0xb);if(_0x3ada2b===_0xfa3f52)break;else _0x1e63f0['push'](_0x1e63f0['shift']());}catch(_0x31d97b){_0x1e63f0['push'](_0x1e63f0['shift']());}}}(a39_0x2781,0x3ab9b));function a39_0x2781(){const _0x592ea4=['2467152NTJjui','dbtype','Dataset\x20code\x20(32-char\x20hex\x20UUID)','367717FhSapI','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','number','15528iDcfIH','5fbNnli','appcode','9DrBKzS','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','MYSQL','string','11Emickt','105rPTnEO','POSTGRESQL','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','10317270ZICzdP','datasetcode','sqlcode','10466OBGtea','code','1450488ISRAhV','Database\x20product\x20type','1703956AiHaRR'];a39_0x2781=function(){return _0x592ea4;};return a39_0x2781();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x1efe31(0x1f5)};export const CODE_FLAG={'name':a39_0x1efe31(0x1e0),'type':a39_0x1efe31(0x1f1),'required':!![],'description':a39_0x1efe31(0x1e6),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x1efe31(0x1f7),'description':a39_0x1efe31(0x1e6)};export const SQLCODE_FLAG={'name':a39_0x1efe31(0x1f8),'type':a39_0x1efe31(0x1f1),'required':!![],'description':a39_0x1efe31(0x1ee),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x1efe31(0x1e8)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x1efe31(0x1ec),'type':a39_0x1efe31(0x1f1),'required':![],'description':a39_0x1efe31(0x1ef)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};function a39_0x8264(_0x52e7d5,_0x54d874){_0x52e7d5=_0x52e7d5-0x1df;const _0x278108=a39_0x2781();let _0x82642f=_0x278108[_0x52e7d5];return _0x82642f;}export const DBLINK_ID_FLAG={'name':'id','type':a39_0x1efe31(0x1e9),'required':!![],'description':'Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)'};export const DB_TYPE_FLAG={'name':a39_0x1efe31(0x1e5),'type':a39_0x1efe31(0x1f1),'required':!![],'description':a39_0x1efe31(0x1e2),'enum':[a39_0x1efe31(0x1f0),a39_0x1efe31(0x1f4)]};
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 +1 @@
1
- function a40_0x444d(_0x5c84e5,_0x3ae9d0){_0x5c84e5=_0x5c84e5-0x193;const _0x306aff=a40_0x306a();let _0x444d7b=_0x306aff[_0x5c84e5];return _0x444d7b;}(function(_0x111790,_0x56a5d2){const _0x1a1bb9=a40_0x444d,_0x3d17da=_0x111790();while(!![]){try{const _0x5a2591=-parseInt(_0x1a1bb9(0x197))/0x1+-parseInt(_0x1a1bb9(0x194))/0x2*(parseInt(_0x1a1bb9(0x19f))/0x3)+-parseInt(_0x1a1bb9(0x1a0))/0x4+-parseInt(_0x1a1bb9(0x19c))/0x5+-parseInt(_0x1a1bb9(0x193))/0x6+-parseInt(_0x1a1bb9(0x195))/0x7*(-parseInt(_0x1a1bb9(0x19d))/0x8)+parseInt(_0x1a1bb9(0x198))/0x9*(parseInt(_0x1a1bb9(0x196))/0xa);if(_0x5a2591===_0x56a5d2)break;else _0x3d17da['push'](_0x3d17da['shift']());}catch(_0x469ca8){_0x3d17da['push'](_0x3d17da['shift']());}}}(a40_0x306a,0x20b0e));function a40_0x306a(){const _0x5f57f3=['392GswGrw','199395SbGKEW','70eUbWvT','32173YDDVsl','634887VyEhUR','length','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','test','116315fCImXv','40MQcPEM','trim','1698wTcvgN','319744IvxOpL','1536096uotWlQ'];a40_0x306a=function(){return _0x5f57f3;};return a40_0x306a();}export function validateAppcode(_0x369cbd){const _0x17ce22=a40_0x444d,_0x327549=_0x369cbd[_0x17ce22(0x19e)]();if(!_0x327549)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x327549[_0x17ce22(0x199)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};if(!/^[A-Za-z0-9_-]+$/[_0x17ce22(0x19b)](_0x327549))return{'valid':![],'message':_0x17ce22(0x19a)};return{'valid':!![]};}
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 +1 @@
1
- const a41_0x454058=a41_0x2c16;(function(_0x319b04,_0x20bff1){const _0x42c870=a41_0x2c16,_0x263abd=_0x319b04();while(!![]){try{const _0xbf3217=parseInt(_0x42c870(0x1fa))/0x1+parseInt(_0x42c870(0x202))/0x2*(parseInt(_0x42c870(0x1f3))/0x3)+-parseInt(_0x42c870(0x1f9))/0x4*(parseInt(_0x42c870(0x1fe))/0x5)+-parseInt(_0x42c870(0x206))/0x6+parseInt(_0x42c870(0x1fb))/0x7*(-parseInt(_0x42c870(0x1ff))/0x8)+-parseInt(_0x42c870(0x1f0))/0x9+parseInt(_0x42c870(0x1f7))/0xa*(parseInt(_0x42c870(0x200))/0xb);if(_0xbf3217===_0x20bff1)break;else _0x263abd['push'](_0x263abd['shift']());}catch(_0x4e03d6){_0x263abd['push'](_0x263abd['shift']());}}}(a41_0x5c1d,0xc4623));import{CliErrors}from'../../errors.js';function a41_0x2c16(_0x4536b8,_0x3fe7cd){_0x4536b8=_0x4536b8-0x1f0;const _0x5c1d6b=a41_0x5c1d();let _0x2c1638=_0x5c1d6b[_0x4536b8];return _0x2c1638;}import{readConfig}from'../../utils/config.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x13c961){const _0x37543f=a41_0x2c16,_0x5c3b5f=_0x13c961[_0x37543f(0x207)](_0x37543f(0x201));if(!_0x5c3b5f)throw CliErrors[_0x37543f(0x1f2)](_0x37543f(0x1fc),_0x37543f(0x1fd)+CLI_BIN_NAME+_0x37543f(0x203));const _0x2bedc5=readConfig(),_0x88bcdc=_0x5c3b5f===_0x37543f(0x1f4)?_0x37543f(0x204):_0x5c3b5f,_0x5c743d=_0x2bedc5[_0x88bcdc];if(_0x5c743d===undefined)throw CliErrors[_0x37543f(0x1f2)](_0x37543f(0x1f1)+_0x5c3b5f);return{'ok':!![],'data':typeof _0x5c743d===_0x37543f(0x1f6)?_0x5c743d:{[_0x88bcdc]:_0x5c743d},'message':typeof _0x5c743d===_0x37543f(0x1f6)?undefined:String(_0x5c743d)};}function a41_0x5c1d(){const _0x29edb0=['object','49427890KeYHxC','config','6302008uXplfc','625276GWfhJl','7pkDTGG','Missing\x20key.','Usage:\x20','5QvdznA','4930256GKKcxr','11znqnLl','key','6bVrwst','\x20config\x20get\x20--key\x20<key>','appcode','get','7202748PPWnof','str','13618728XrlvLF','Key\x20not\x20found:\x20','validation','141756dcrpmq','app','read'];a41_0x5c1d=function(){return _0x29edb0;};return a41_0x5c1d();}export const configGetDefinition={'service':a41_0x454058(0x1f8),'command':a41_0x454058(0x205),'description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a41_0x454058(0x1f5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a41_0x454058(0x201),'type':'string','description':getConfigCommandKeyDescription(),'required':!![]}],'execute':execute};
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 +1 @@
1
- (function(_0x1c0c93,_0x16f5eb){const _0x552b21=a42_0x1915,_0x3d9506=_0x1c0c93();while(!![]){try{const _0x48000d=-parseInt(_0x552b21(0xbe))/0x1+-parseInt(_0x552b21(0xc2))/0x2+parseInt(_0x552b21(0xc7))/0x3+-parseInt(_0x552b21(0xc1))/0x4*(-parseInt(_0x552b21(0xbf))/0x5)+-parseInt(_0x552b21(0xc3))/0x6*(-parseInt(_0x552b21(0xc4))/0x7)+parseInt(_0x552b21(0xc6))/0x8*(-parseInt(_0x552b21(0xc5))/0x9)+parseInt(_0x552b21(0xc0))/0xa;if(_0x48000d===_0x16f5eb)break;else _0x3d9506['push'](_0x3d9506['shift']());}catch(_0x1ca406){_0x3d9506['push'](_0x3d9506['shift']());}}}(a42_0x442b,0xbf637));import{configListDefinition}from'../../commands/config/list.js';function a42_0x1915(_0x3ec2cd,_0x423890){_0x3ec2cd=_0x3ec2cd-0xbe;const _0x442b02=a42_0x442b();let _0x191529=_0x442b02[_0x3ec2cd];return _0x191529;}import{configGetDefinition}from'../../commands/config/get.js';function a42_0x442b(){const _0x4db56d=['9eCXsGK','2687384LmGEIr','3905832KzKilb','1467326yNVZND','7145fTxSIh','7602760HqYGqs','524HEHDuS','2251164WZgxvN','6DUMcPE','10243373QroWXl'];a42_0x442b=function(){return _0x4db56d;};return a42_0x442b();}import{configSetDefinition}from'../../commands/config/set.js';export const configDefinitions=[configListDefinition,configGetDefinition,configSetDefinition];
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 +1 @@
1
- function a43_0x2712(){const _0x469c09=['36lxBsBC','global','904888AFVLPU','bool','749483gZrwQZ','1206117hOPSZC','List\x20all\x20config\x20values','1259880jRqzTx','626193AolSVv','5lxDUlz','1530528mxWWrk','config','373562eymqDg','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','read'];a43_0x2712=function(){return _0x469c09;};return a43_0x2712();}function a43_0x460b(_0x113a77,_0xc5d3fb){_0x113a77=_0x113a77-0xee;const _0x271216=a43_0x2712();let _0x460bad=_0x271216[_0x113a77];return _0x460bad;}const a43_0x40bc91=a43_0x460b;(function(_0x2af755,_0x1fb591){const _0x2dfe64=a43_0x460b,_0x1155e9=_0x2af755();while(!![]){try{const _0x38534c=parseInt(_0x2dfe64(0xf4))/0x1+-parseInt(_0x2dfe64(0xf8))/0x2+parseInt(_0x2dfe64(0xf3))/0x3+parseInt(_0x2dfe64(0xee))/0x4*(parseInt(_0x2dfe64(0xf5))/0x5)+parseInt(_0x2dfe64(0xfb))/0x6*(-parseInt(_0x2dfe64(0xf0))/0x7)+-parseInt(_0x2dfe64(0xf6))/0x8+parseInt(_0x2dfe64(0xf1))/0x9;if(_0x38534c===_0x1fb591)break;else _0x1155e9['push'](_0x1155e9['shift']());}catch(_0x3061d0){_0x1155e9['push'](_0x1155e9['shift']());}}}(a43_0x2712,0x5e355));import{readScopedConfig}from'../../commands/config/shared.js';import{readConfig}from'../../utils/config.js';async function execute(_0x3da291){const _0x290b3a=a43_0x460b,_0x14c933=_0x3da291[_0x290b3a(0xef)]('global')?readScopedConfig(_0x290b3a(0xfc)):readConfig();return{'ok':!![],'data':_0x14c933};}export const configListDefinition={'service':a43_0x40bc91(0xf7),'command':'list','description':a43_0x40bc91(0xf2),'risk':a43_0x40bc91(0xfa),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x40bc91(0xfc),'type':'boolean','description':a43_0x40bc91(0xf9),'default':![]}],'execute':execute};
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 +1 @@
1
- const a44_0x2e19a7=a44_0x13c2;(function(_0x22849e,_0x4e6189){const _0x408211=a44_0x13c2,_0x3bdd59=_0x22849e();while(!![]){try{const _0x434569=parseInt(_0x408211(0xe2))/0x1*(-parseInt(_0x408211(0xb4))/0x2)+parseInt(_0x408211(0xbf))/0x3+-parseInt(_0x408211(0xc6))/0x4+-parseInt(_0x408211(0xb3))/0x5*(-parseInt(_0x408211(0xbc))/0x6)+-parseInt(_0x408211(0xb7))/0x7*(-parseInt(_0x408211(0xc5))/0x8)+parseInt(_0x408211(0xc8))/0x9+-parseInt(_0x408211(0xc0))/0xa;if(_0x434569===_0x4e6189)break;else _0x3bdd59['push'](_0x3bdd59['shift']());}catch(_0x2c9be9){_0x3bdd59['push'](_0x3bdd59['shift']());}}}(a44_0x5340,0xdb0af));import{CliErrors}from'../../errors.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function a44_0x13c2(_0x4cfea9,_0x596019){_0x4cfea9=_0x4cfea9-0xb3;const _0x5340ad=a44_0x5340();let _0x13c2c7=_0x5340ad[_0x4cfea9];return _0x13c2c7;}import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';function a44_0x5340(){const _0x3a3ae3=['app','5217276JMTPWx','18035290VIECXq','includes','length','str','set','7816208WdVrXZ','6485408kOUTMm','apps','6599781RfmDmo','Usage:\x20','boolean','\x22.\x20Allowed:\x20','string','validation','Global','Project','object','key','`,\x20`','Config\x20value','join','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','value','\x22\x20is\x20not\x20settable.','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','keys','Settable\x20top-level\x20keys:\x20','Invalid\x20locale\x20value.','\x20app\x20add\x20<name>\x20--appcode\x20','Set\x20a\x20config\x20value','Use\x20`','locale','39233bBzDld','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Top-level\x20key\x20\x22','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','10gJuqcu','22FpCUZF','env','global','7iXbqvn','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','appcode','Missing\x20key.','write','3912648ymnTnN','config'];a44_0x5340=function(){return _0x3a3ae3;};return a44_0x5340();}async function execute(_0x3bc87c){const _0x39de08=a44_0x13c2,_0x4a5645=_0x3bc87c[_0x39de08(0xc3)](_0x39de08(0xd1)),_0xec9ee1=_0x3bc87c[_0x39de08(0xc3)]('value');if(!_0x4a5645)throw CliErrors['validation'](_0x39de08(0xba),_0x39de08(0xc9)+CLI_BIN_NAME+_0x39de08(0xe3));if(_0xec9ee1===undefined||_0xec9ee1==='')throw CliErrors[_0x39de08(0xcd)]('Missing\x20value.',_0x39de08(0xc9)+CLI_BIN_NAME+'\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>');if(_0xec9ee1[_0x39de08(0xc2)]>0x1f4)throw CliErrors[_0x39de08(0xcd)](_0x39de08(0xd6));if(!isTopLevelConfigKey(_0x4a5645))throw CliErrors[_0x39de08(0xcd)](_0x39de08(0xe5)+_0x4a5645+_0x39de08(0xd9),_0x39de08(0xdc)+getTopLevelConfigKeySummary());if(_0x4a5645==='riskLevel')throw CliErrors['validation'](_0x39de08(0xd7));if(CONFIG_ENUM_VALUES[_0x4a5645]&&!CONFIG_ENUM_VALUES[_0x4a5645][_0x39de08(0xc1)](_0xec9ee1))throw CliErrors['validation']('Invalid\x20value\x20for\x20\x22'+_0x4a5645+_0x39de08(0xcb)+CONFIG_ENUM_VALUES[_0x4a5645][_0x39de08(0xd4)](',\x20'));if(_0x4a5645===_0x39de08(0xe1)&&!normalizeLocale(_0xec9ee1))throw CliErrors[_0x39de08(0xcd)](_0x39de08(0xdd),_0x39de08(0xda));const _0x193d56={'global':_0x3bc87c['bool'](_0x39de08(0xb6))},_0x3c5667=resolveWriteScope(_0x193d56),_0x7a0918=readScopedConfig(_0x3c5667);let _0x14cd87=_0x4a5645,_0xb891a5=_0xec9ee1;_0x4a5645===_0x39de08(0xbe)&&(_0x14cd87=_0x39de08(0xb9),delete _0x7a0918['app']);_0x4a5645===_0x39de08(0xe1)&&(_0xb891a5=normalizeLocale(_0xec9ee1));if(_0x4a5645===_0x39de08(0xb5)){_0xb891a5=normalizeEnv(_0xec9ee1);if(!isProduction(_0xb891a5)&&!isDaily(_0xb891a5))throw CliErrors['validation'](_0x39de08(0xb8),'Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.');}if(_0x4a5645===_0x39de08(0xb9)){const _0x4f7469=_0x7a0918['apps']&&typeof _0x7a0918['apps']===_0x39de08(0xd0)?Object[_0x39de08(0xdb)](_0x7a0918[_0x39de08(0xc7)]):[];if(_0x4f7469[_0x39de08(0xc2)]>0x0)throw CliErrors['validation'](_0x39de08(0xe4),_0x39de08(0xe0)+CLI_BIN_NAME+_0x39de08(0xde)+_0xb891a5+_0x39de08(0xd2)+CLI_BIN_NAME+_0x39de08(0xd5));const _0x61ba66=buildCanonicalProjectConfig({..._0x7a0918},{'appCodes':[_0xb891a5],'env':typeof _0x7a0918[_0x39de08(0xb5)]===_0x39de08(0xcc)?_0x7a0918[_0x39de08(0xb5)]:undefined});writeScopedConfig(_0x61ba66,_0x3c5667);const _0x272533=_0x3c5667===_0x39de08(0xb6)?_0x39de08(0xce):_0x39de08(0xcf);return{'ok':!![],'message':'✓\x20'+_0x272533+'\x20appcode\x20set\x20to:\x20'+_0xb891a5+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x7a0918[_0x14cd87]=_0xb891a5,writeScopedConfig(_0x7a0918,_0x3c5667);const _0x54b24e=_0x3c5667===_0x39de08(0xb6)?_0x39de08(0xce):_0x39de08(0xcf);return{'ok':!![],'message':'✓\x20'+_0x54b24e+'\x20'+_0x14cd87+'\x20set\x20to:\x20'+_0xb891a5};}export const configSetDefinition={'service':a44_0x2e19a7(0xbd),'command':a44_0x2e19a7(0xc4),'description':a44_0x2e19a7(0xdf),'risk':a44_0x2e19a7(0xbb),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0x2e19a7(0xd1),'type':a44_0x2e19a7(0xcc),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x2e19a7(0xd8),'type':a44_0x2e19a7(0xcc),'description':a44_0x2e19a7(0xd3),'required':!![]},{'name':a44_0x2e19a7(0xb6),'type':a44_0x2e19a7(0xca),'description':a44_0x2e19a7(0xe6),'default':![]}],'execute':execute};
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 +1 @@
1
- (function(_0x29cba1,_0x41fcbc){var _0x200507=a45_0x5332,_0x3e58df=_0x29cba1();while(!![]){try{var _0x39253a=-parseInt(_0x200507(0x182))/0x1+-parseInt(_0x200507(0x17b))/0x2+parseInt(_0x200507(0x17d))/0x3*(-parseInt(_0x200507(0x181))/0x4)+parseInt(_0x200507(0x186))/0x5+parseInt(_0x200507(0x17f))/0x6*(-parseInt(_0x200507(0x180))/0x7)+parseInt(_0x200507(0x188))/0x8+-parseInt(_0x200507(0x183))/0x9*(-parseInt(_0x200507(0x187))/0xa);if(_0x39253a===_0x41fcbc)break;else _0x3e58df['push'](_0x3e58df['shift']());}catch(_0x1ab2a8){_0x3e58df['push'](_0x3e58df['shift']());}}}(a45_0x245e,0x99a36));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a45_0x5332(_0x85efed,_0x39022d){_0x85efed=_0x85efed-0x17b;var _0x245e17=a45_0x245e();var _0x53324a=_0x245e17[_0x85efed];return _0x53324a;}import{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale}from'../../config/schema.js';export{CLI_BIN_NAME};export{normalizeLocale};export{CONFIG_ENUM_VALUES,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey};export function resolveWriteScope(_0x3c01f4){var _0x42ecae=a45_0x5332;if(_0x3c01f4[_0x42ecae(0x189)])return _0x42ecae(0x189);if(!isInProject())throw CliErrors[_0x42ecae(0x18a)](_0x42ecae(0x17c),_0x42ecae(0x185)+CLI_BIN_NAME+_0x42ecae(0x17e));return _0x42ecae(0x184);}export function readScopedConfig(_0x4e1f3a){return readConfigFile(resolveWriteConfigPath(_0x4e1f3a));}export function writeScopedConfig(_0x449bf1,_0x28b869){writeConfigFile(resolveWriteConfigPath(_0x28b869),_0x449bf1);}function a45_0x245e(){var _0x521268=['3722815gPJJDB','170650JxPwxW','2610344PIQHiD','global','validation','1375080wSEGxF','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','12WWjjIv','\x20init`\x20first.','2538ZzwJZj','4879fqQGGM','745152VrFKoE','335206wLnScy','855gRiIBm','project','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`'];a45_0x245e=function(){return _0x521268;};return a45_0x245e();}
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 +1 @@
1
- const a46_0x4a1222=a46_0x5d4d;function a46_0x5d4d(_0x228ac3,_0xa7bb40){_0x228ac3=_0x228ac3-0x1b8;const _0x4fd75a=a46_0x4fd7();let _0x5d4da5=_0x4fd75a[_0x228ac3];return _0x5d4da5;}(function(_0x4cb653,_0x4cadd0){const _0x25f505=a46_0x5d4d,_0x18e938=_0x4cb653();while(!![]){try{const _0x4da6f5=-parseInt(_0x25f505(0x1c1))/0x1*(-parseInt(_0x25f505(0x1bd))/0x2)+parseInt(_0x25f505(0x1be))/0x3+parseInt(_0x25f505(0x1c5))/0x4+parseInt(_0x25f505(0x1c2))/0x5*(-parseInt(_0x25f505(0x1c4))/0x6)+parseInt(_0x25f505(0x1bf))/0x7*(parseInt(_0x25f505(0x1c0))/0x8)+-parseInt(_0x25f505(0x1ca))/0x9*(parseInt(_0x25f505(0x1bc))/0xa)+parseInt(_0x25f505(0x1ba))/0xb;if(_0x4da6f5===_0x4cadd0)break;else _0x18e938['push'](_0x18e938['shift']());}catch(_0x3d3bc9){_0x18e938['push'](_0x18e938['shift']());}}}(a46_0x4fd7,0x31a20));import{buildDataCommand}from'../../commands/data/shared.js';function a46_0x4fd7(){const _0x4f34c2=['\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}]','10DOnHbD','51476zCxobW','1139625xfHoDf','167958lIKaBY','24hiGeXI','2hkysdV','1592385GpBarh','\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]','6yBbCJO','1324724HuNsKv','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','3342339wSpBwn','join','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','644930CkKTQu'];a46_0x4fd7=function(){return _0x4f34c2;};return a46_0x4fd7();}export const dataFilter=buildDataCommand({'command':'filter','operation':'filter','description':a46_0x4a1222(0x1c7),'paramsRequired':![],'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a46_0x4a1222(0x1c8),a46_0x4a1222(0x1c6),a46_0x4a1222(0x1c3),a46_0x4a1222(0x1bb),a46_0x4a1222(0x1b9),a46_0x4a1222(0x1c9)][a46_0x4a1222(0x1b8)]('\x0a')});
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 +1 @@
1
- const a47_0x10e32e=a47_0x5f52;function a47_0x5f52(_0x44e66b,_0x3ae144){_0x44e66b=_0x44e66b-0x105;const _0x479b7d=a47_0x479b();let _0x5f5294=_0x479b7d[_0x44e66b];return _0x5f5294;}(function(_0x31de4b,_0x3ff745){const _0x17c4a6=a47_0x5f52,_0x541774=_0x31de4b();while(!![]){try{const _0x3091e1=-parseInt(_0x17c4a6(0x106))/0x1+-parseInt(_0x17c4a6(0x107))/0x2+-parseInt(_0x17c4a6(0x108))/0x3*(parseInt(_0x17c4a6(0x10c))/0x4)+parseInt(_0x17c4a6(0x10d))/0x5*(-parseInt(_0x17c4a6(0x10a))/0x6)+parseInt(_0x17c4a6(0x10e))/0x7+parseInt(_0x17c4a6(0x105))/0x8+-parseInt(_0x17c4a6(0x10f))/0x9*(-parseInt(_0x17c4a6(0x10b))/0xa);if(_0x3091e1===_0x3ff745)break;else _0x541774['push'](_0x541774['shift']());}catch(_0x4917b0){_0x541774['push'](_0x541774['shift']());}}}(a47_0x479b,0xe5c0b));import{buildDataCommand}from'../../commands/data/shared.js';function a47_0x479b(){const _0x148cdb=['171sLALar','getOne','9964848Ianxio','1537458GzXMVi','693076WwTGdg','3PBbphk','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','6jWjWcc','1923270PEuOuZ','5296560XBtJPy','6835370YmnNQt','4315206CmAVao'];a47_0x479b=function(){return _0x148cdb;};return a47_0x479b();}export const dataGetOne=buildDataCommand({'command':a47_0x10e32e(0x110),'operation':a47_0x10e32e(0x110),'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsRequired':!![],'paramsHint':a47_0x10e32e(0x109)});
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 +1 @@
1
- (function(_0x5f3af8,_0x2162cb){const _0x187535=a48_0x49c1,_0x169348=_0x5f3af8();while(!![]){try{const _0x1d72b6=-parseInt(_0x187535(0x11f))/0x1*(-parseInt(_0x187535(0x11d))/0x2)+-parseInt(_0x187535(0x11e))/0x3+-parseInt(_0x187535(0x121))/0x4*(-parseInt(_0x187535(0x120))/0x5)+parseInt(_0x187535(0x11b))/0x6+-parseInt(_0x187535(0x11c))/0x7+-parseInt(_0x187535(0x11a))/0x8+-parseInt(_0x187535(0x122))/0x9;if(_0x1d72b6===_0x2162cb)break;else _0x169348['push'](_0x169348['shift']());}catch(_0xc670a3){_0x169348['push'](_0x169348['shift']());}}}(a48_0x52b7,0x465cf));import{dataFilter}from'../../commands/data/filter.js';function a48_0x49c1(_0x4fb1c7,_0x3ba7d2){_0x4fb1c7=_0x4fb1c7-0x11a;const _0x52b761=a48_0x52b7();let _0x49c1fc=_0x52b761[_0x4fb1c7];return _0x49c1fc;}function a48_0x52b7(){const _0x40ca1f=['3559192UYSBQx','18farepq','1041192fwQgFW','50472SAciPj','10PwODTh','1025624jfTcdL','394191eJgnqD','1151312TSHvxl','2186280OdjrTD'];a48_0x52b7=function(){return _0x40ca1f;};return a48_0x52b7();}import{dataGetOne}from'../../commands/data/getOne.js';export const dataDefinitions=[dataFilter,dataGetOne];
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 +1 @@
1
- (function(_0xf4d10a,_0x3b3082){const _0x2b2d55=a49_0x3cc2,_0x218b2f=_0xf4d10a();while(!![]){try{const _0xa554e=parseInt(_0x2b2d55(0x15f))/0x1*(-parseInt(_0x2b2d55(0x15e))/0x2)+parseInt(_0x2b2d55(0x16f))/0x3+-parseInt(_0x2b2d55(0x174))/0x4*(parseInt(_0x2b2d55(0x16e))/0x5)+-parseInt(_0x2b2d55(0x161))/0x6+-parseInt(_0x2b2d55(0x171))/0x7*(-parseInt(_0x2b2d55(0x158))/0x8)+-parseInt(_0x2b2d55(0x175))/0x9*(-parseInt(_0x2b2d55(0x159))/0xa)+parseInt(_0x2b2d55(0x16a))/0xb;if(_0xa554e===_0x3b3082)break;else _0x218b2f['push'](_0x218b2f['shift']());}catch(_0x51a702){_0x218b2f['push'](_0x218b2f['shift']());}}}(a49_0x41db,0x82f2b));function a49_0x41db(){const _0x5aefbd=['315064oQPocF','1109630SpWVci','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','compress','read','178htNkFS','7603IufyVx','description','951264yogqsJ','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically','validation','params','flagMissing','data\x20','paramsHint','command','operation','10169610BDBCuf','paramsRequired','appCode','code','5UkoyDG','290031HpauJM','helpExtra','49ZWMPVy','str','data','1920436VRssna','45nJAfdx','string'];a49_0x41db=function(){return _0x5aefbd;};return a49_0x41db();}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(_0x5d232a){const _0x22381c=a49_0x3cc2;if(!_0x5d232a)throw CliErrors[_0x22381c(0x165)](_0x22381c(0x164),'Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0xa4b515=_0x5d232a['id'];if(_0xa4b515===undefined||_0xa4b515===null||_0xa4b515==='')throw CliErrors[_0x22381c(0x163)](_0x22381c(0x15a),_0x22381c(0x15b));}function parseCommandParams(_0x11d055){return parseJsonParams(_0x11d055)??{};}function a49_0x3cc2(_0x1bc084,_0x5c5bf1){_0x1bc084=_0x1bc084-0x158;const _0x41db4d=a49_0x41db();let _0x3cc2df=_0x41db4d[_0x1bc084];return _0x3cc2df;}export function buildDataCommand(_0x13c6e7){const _0x204a4e=a49_0x3cc2,_0x49a0ba=_0x204a4e(0x162);return{'service':_0x204a4e(0x173),'command':_0x13c6e7['command'],'description':_0x13c6e7[_0x204a4e(0x160)],'risk':_0x204a4e(0x15d),'defaultOutputFormat':_0x204a4e(0x15c),'helpExtra':_0x13c6e7[_0x204a4e(0x170)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x204a4e(0x176),'description':_0x49a0ba},{'name':_0x204a4e(0x164),'type':_0x204a4e(0x176),'description':_0x13c6e7['paramsHint']}],async 'validate'(_0x4d44d9){const _0x404194=_0x204a4e,_0x3751c3=_0x4d44d9[_0x404194(0x172)](_0x404194(0x164));if(_0x13c6e7[_0x404194(0x16b)]&&!_0x3751c3)throw CliErrors[_0x404194(0x165)](_0x404194(0x164),_0x13c6e7[_0x404194(0x167)]);const _0x38e1eb=parseJsonParams(_0x3751c3);_0x13c6e7[_0x404194(0x169)]==='getOne'&&assertGetOneId(_0x38e1eb);},async 'execute'(_0x17cc1b){const _0x24794b=_0x204a4e,_0x4b550e=parseCommandParams(_0x17cc1b['str'](_0x24794b(0x164))),_0x449c5e=Date['now'](),_0x5aa145=await executeDatasetDataOperation(_0x17cc1b[_0x24794b(0x16c)],_0x17cc1b[_0x24794b(0x172)](_0x24794b(0x16d)),_0x13c6e7[_0x24794b(0x169)],_0x4b550e),_0x5e66d5=Date['now']()-_0x449c5e;return{'ok':!![],'data':{'result':_0x5aa145,'elapsed':_0x5e66d5},'message':_0x24794b(0x166)+_0x13c6e7[_0x24794b(0x168)]+'\x20completed\x20in\x20'+_0x5e66d5+'ms'};}};}
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 +1 @@
1
- const a50_0x4da8c1=a50_0x1b4a;(function(_0x282678,_0x37bbb){const _0x223116=a50_0x1b4a,_0x189181=_0x282678();while(!![]){try{const _0x4ac158=-parseInt(_0x223116(0x1b1))/0x1*(parseInt(_0x223116(0x19f))/0x2)+parseInt(_0x223116(0x199))/0x3+-parseInt(_0x223116(0x19e))/0x4*(parseInt(_0x223116(0x1a2))/0x5)+parseInt(_0x223116(0x19d))/0x6+parseInt(_0x223116(0x1a4))/0x7+-parseInt(_0x223116(0x1a9))/0x8+parseInt(_0x223116(0x1ac))/0x9*(parseInt(_0x223116(0x1b0))/0xa);if(_0x4ac158===_0x37bbb)break;else _0x189181['push'](_0x189181['shift']());}catch(_0x4bc0d9){_0x189181['push'](_0x189181['shift']());}}}(a50_0x4b55,0x33006));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x4da8c1(0x1a3),'filter':'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','getOne':'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress'};export const RUNTIME_DATA_ACCESS_SUMMARY='Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.';function valueToString(_0x4cdec1){const _0x2da161=a50_0x4da8c1;return _0x4cdec1==null?'':String(_0x4cdec1)[_0x2da161(0x19b)]();}function getDatasetCode(_0x2672d6){const _0x206799=a50_0x4da8c1;return valueToString(_0x2672d6[_0x206799(0x198)]??_0x2672d6[_0x206799(0x1a5)]??_0x2672d6[_0x206799(0x193)]?.[_0x206799(0x1a6)]);}function getDatasetName(_0x27e039){const _0x1f628f=a50_0x4da8c1;return valueToString(_0x27e039[_0x1f628f(0x190)]??_0x27e039[_0x1f628f(0x193)]?.[_0x1f628f(0x196)])||_0x1f628f(0x1ab);}function getDatasetSource(_0x18198e){const _0x5671c2=a50_0x4da8c1;return valueToString(_0x18198e[_0x5671c2(0x18e)]??_0x18198e['dataset']?.[_0x5671c2(0x195)])[_0x5671c2(0x1a8)]();}function a50_0x1b4a(_0x5e003c,_0x50908d){_0x5e003c=_0x5e003c-0x18d;const _0x4b558e=a50_0x4b55();let _0x1b4a4f=_0x4b558e[_0x5e003c];return _0x1b4a4f;}function getDbtableConfig(_0x35c6fd){const _0x46c119=a50_0x4da8c1,_0x41767d=_0x35c6fd[_0x46c119(0x1ae)]??_0x35c6fd[_0x46c119(0x194)];return _0x41767d&&typeof _0x41767d===_0x46c119(0x191)?_0x41767d:{};}function a50_0x4b55(){const _0x4b6c3f=['object','\x20类型,不适合作为\x20','dataset','dbtable','sourceType','datasetName','请先将该数据集升级/迁移为\x20DB\x20table\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','code','357879LMEFnt','BFF\x20/\x20SQL\x20等研发态资产','trim','UNKNOWN','2490252EZbEpT','1097228SsAnnu','28PdfOCN','getOne','filter','5GBggUX','lovrabet','1724527wZCcDA','modelCode','datasetCode','length','toUpperCase','728880XmqWYy','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:','unknown','2799wZnhID','当前数据集\x20\x22','dbtableConfig','\x20是\x20','2510qqTYqu','20317bfOjwN','dbId','source','tableName','name'];a50_0x4b55=function(){return _0x4b6c3f;};return a50_0x4b55();}export function isDbBackedDataset(_0x27beb1){const _0x2930cf=a50_0x4da8c1,_0x14d422=getDatasetSource(_0x27beb1);if(_0x14d422==='METADATA')return![];const _0x10ef28=getDbtableConfig(_0x27beb1),_0x1511b8=_0x10ef28[_0x2930cf(0x18d)]??_0x10ef28['id'],_0x2f6481=valueToString(_0x10ef28[_0x2930cf(0x18f)]??_0x27beb1[_0x2930cf(0x18f)]??_0x27beb1[_0x2930cf(0x193)]?.[_0x2930cf(0x18f)]);return _0x1511b8!==undefined&&_0x1511b8!==null&&_0x2f6481[_0x2930cf(0x1a7)]>0x0;}export function filterDbBackedDatasets(_0x33390a){const _0x3e7802=a50_0x4da8c1;return _0x33390a[_0x3e7802(0x1a1)](_0x4684de=>isDbBackedDataset(_0x4684de));}export function buildDbTableUpgradeMessage(_0x768a3d,_0x4d9b12=a50_0x4da8c1(0x19a)){const _0x2d54d7=a50_0x4da8c1,_0x1cb050=getDatasetSource(_0x768a3d)||_0x2d54d7(0x19c),_0x36674c=getDatasetName(_0x768a3d),_0x1bca46=getDatasetCode(_0x768a3d),_0x376408=_0x1bca46?'\x20('+_0x1bca46+')':'';return[_0x2d54d7(0x1ad)+_0x36674c+'\x22'+_0x376408+_0x2d54d7(0x1af)+_0x1cb050+_0x2d54d7(0x192)+_0x4d9b12+'\x20的数据源。','原因:该类研发态资产需要\x20DB\x20table、dbId、tableName\x20与数据库连接上下文,并深度依赖\x20SQL\x20执行链路。',_0x2d54d7(0x197),_0x2d54d7(0x1aa)+RUNTIME_DATA_ACCESS_COMMANDS[_0x2d54d7(0x1a1)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x2d54d7(0x1a0)]+'。']['join']('\x20');}export function assertDatasetSupportsLocalDevelopment(_0x35cf89,_0x54c891){if(!isDbBackedDataset(_0x35cf89))throw CliErrors['validation'](buildDbTableUpgradeMessage(_0x35cf89,_0x54c891));}
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));}