@lovrabet/rabetbase-cli 2.1.14-beta.2 → 2.1.14-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) 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/link-create.js +1 -1
  58. package/lib/commands/dataset/link-delete.js +1 -1
  59. package/lib/commands/dataset/link-shared.js +1 -1
  60. package/lib/commands/dataset/link-update.js +1 -1
  61. package/lib/commands/dataset/links.js +1 -1
  62. package/lib/commands/dataset/list.js +1 -1
  63. package/lib/commands/dataset/operations.js +1 -1
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/shared/compare-table.js +1 -1
  87. package/lib/commands/menu/shared/index.js +1 -1
  88. package/lib/commands/menu/shared/inquirer.js +1 -1
  89. package/lib/commands/menu/shared/local-pages.js +1 -1
  90. package/lib/commands/menu/shared/logic.js +1 -1
  91. package/lib/commands/menu/shared/service.js +1 -1
  92. package/lib/commands/menu/shared/sync-core.js +1 -1
  93. package/lib/commands/menu/shared/update-core.js +1 -1
  94. package/lib/commands/menu/shared/valid-url.js +1 -1
  95. package/lib/commands/menu/sync.js +1 -1
  96. package/lib/commands/menu/update.js +1 -1
  97. package/lib/commands/page/generate-start.js +1 -1
  98. package/lib/commands/page/generate-status.js +1 -1
  99. package/lib/commands/page/index.js +1 -1
  100. package/lib/commands/page/pull.js +1 -1
  101. package/lib/commands/page/push.js +1 -1
  102. package/lib/commands/page/shared.js +1 -1
  103. package/lib/commands/page/standard-page-status.js +1 -1
  104. package/lib/commands/page/sync.js +1 -1
  105. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  106. package/lib/commands/project/create/format-elapsed.js +1 -1
  107. package/lib/commands/project/create/main.js +1 -1
  108. package/lib/commands/project/create/non-interactive.js +1 -1
  109. package/lib/commands/project/create/project-template-path.js +1 -1
  110. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  111. package/lib/commands/project/create/use-format-code.js +1 -1
  112. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  113. package/lib/commands/project/index.js +1 -1
  114. package/lib/commands/project/init.js +1 -1
  115. package/lib/commands/project/upgrade.js +1 -1
  116. package/lib/commands/registry.js +1 -1
  117. package/lib/commands/run/index.js +1 -1
  118. package/lib/commands/schema.js +1 -1
  119. package/lib/commands/skill/index.js +1 -1
  120. package/lib/commands/sql/create.js +1 -1
  121. package/lib/commands/sql/delete.js +1 -1
  122. package/lib/commands/sql/detail.js +1 -1
  123. package/lib/commands/sql/exec.js +1 -1
  124. package/lib/commands/sql/index.js +1 -1
  125. package/lib/commands/sql/list.js +1 -1
  126. package/lib/commands/sql/pull.js +1 -1
  127. package/lib/commands/sql/push.js +1 -1
  128. package/lib/commands/sql/save.js +1 -1
  129. package/lib/commands/sql/shared.js +1 -1
  130. package/lib/commands/sql/status.js +1 -1
  131. package/lib/commands/sql/validate.js +1 -1
  132. package/lib/config/schema.js +1 -1
  133. package/lib/constant/cdn.js +1 -1
  134. package/lib/constant/cli.js +1 -1
  135. package/lib/constant/defaults.js +1 -1
  136. package/lib/constant/domain.js +1 -1
  137. package/lib/constant/env.js +1 -1
  138. package/lib/constant/output.js +1 -1
  139. package/lib/constant/paths.js +1 -1
  140. package/lib/constant/risk.js +1 -1
  141. package/lib/context.js +1 -1
  142. package/lib/core/alias-resolver.js +1 -1
  143. package/lib/core/api-client.js +1 -1
  144. package/lib/core/bff/config.js +1 -1
  145. package/lib/core/bff/file-system.js +1 -1
  146. package/lib/core/bff/hash.js +1 -1
  147. package/lib/core/bff/lock.js +1 -1
  148. package/lib/core/bff/utils.js +1 -1
  149. package/lib/core/db-resolver.js +1 -1
  150. package/lib/core/page/file-system.js +1 -1
  151. package/lib/core/page/hash.js +1 -1
  152. package/lib/core/page/lock.js +1 -1
  153. package/lib/core/sql-sync/config.js +1 -1
  154. package/lib/core/sql-sync/file-system.js +1 -1
  155. package/lib/core/sql-sync/hash.js +1 -1
  156. package/lib/core/sql-sync/lock.js +1 -1
  157. package/lib/core/sql-sync/utils.js +1 -1
  158. package/lib/core/sql-validator.js +1 -1
  159. package/lib/errors.js +1 -1
  160. package/lib/framework/build-all-flags.js +1 -1
  161. package/lib/framework/flags.js +1 -1
  162. package/lib/framework/help.js +1 -1
  163. package/lib/framework/index.js +1 -1
  164. package/lib/framework/output.js +1 -1
  165. package/lib/framework/response.js +1 -1
  166. package/lib/framework/runner-alias.js +1 -1
  167. package/lib/framework/runner.js +1 -1
  168. package/lib/framework/schema-export.js +1 -1
  169. package/lib/framework/types.js +1 -1
  170. package/lib/generated/build-info.js +1 -1
  171. package/lib/help.js +1 -1
  172. package/lib/skills/main.js +1 -1
  173. package/lib/skills/npx-skills-add.js +1 -1
  174. package/lib/telemetry/cli-command-trace.js +1 -1
  175. package/lib/telemetry/cli-help-trace.js +1 -1
  176. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  177. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  178. package/lib/telemetry/send-cli-trace-log.js +1 -1
  179. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  180. package/lib/utils/ai_config.js +1 -1
  181. package/lib/utils/apply-jq-filter.js +1 -1
  182. package/lib/utils/cdn-config.js +1 -1
  183. package/lib/utils/check-sdk-version.js +1 -1
  184. package/lib/utils/cli-version-check.js +1 -1
  185. package/lib/utils/cli-version-policy.js +1 -1
  186. package/lib/utils/config.js +1 -1
  187. package/lib/utils/copy-directory.js +1 -1
  188. package/lib/utils/entity-with-id.js +1 -1
  189. package/lib/utils/file-utils.js +1 -1
  190. package/lib/utils/guides-cdn.js +1 -1
  191. package/lib/utils/http-client.js +1 -1
  192. package/lib/utils/is-non-interactive.js +1 -1
  193. package/lib/utils/logger.js +1 -1
  194. package/lib/utils/params.js +1 -1
  195. package/lib/utils/platform.js +1 -1
  196. package/lib/utils/rules-cdn.js +1 -1
  197. package/lib/utils/sleep.js +1 -1
  198. package/lib/utils/template-replacer.js +1 -1
  199. package/lib/utils/version.js +1 -1
  200. package/lib/utils/with-active-cookie.js +1 -1
  201. package/lib/utils/write-cli-side-channel.js +1 -1
  202. package/package.json +1 -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_0x4d84a8=a32_0x291e;(function(_0x28ee63,_0x44ee2a){const _0x396064=a32_0x291e,_0x2a6ef9=_0x28ee63();while(!![]){try{const _0x4d2497=parseInt(_0x396064(0x236))/0x1+parseInt(_0x396064(0x220))/0x2*(parseInt(_0x396064(0x1f5))/0x3)+-parseInt(_0x396064(0x22f))/0x4*(parseInt(_0x396064(0x22c))/0x5)+parseInt(_0x396064(0x1e9))/0x6*(-parseInt(_0x396064(0x1ff))/0x7)+-parseInt(_0x396064(0x227))/0x8+parseInt(_0x396064(0x21d))/0x9*(-parseInt(_0x396064(0x1f4))/0xa)+parseInt(_0x396064(0x1ed))/0xb;if(_0x4d2497===_0x44ee2a)break;else _0x2a6ef9['push'](_0x2a6ef9['shift']());}catch(_0x49cfce){_0x2a6ef9['push'](_0x2a6ef9['shift']());}}}(a32_0x1a1d,0xc1ec1));import{readFile}from'node:fs/promises';import{saveBffScript,getBffScriptInfo,listDatasets,clearBffScriptCache}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{normalizeBffType,scanLocalBffFunctions}from'../../core/bff/file-system.js';import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile,writeBffLockFile}from'../../core/bff/lock.js';import{extractScriptDescription}from'../../core/bff/utils.js';import{sleep}from'../../utils/sleep.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{assertDatasetSupportsLocalDevelopment}from'../../commands/dataset/capability.js';const CACHE_CLEAR_ATTEMPTS=0x2,CACHE_CLEAR_INTERVAL_MS=0x12c;export const bffPush={'service':'bff','command':'push','description':a32_0x4d84a8(0x204),'risk':'high-risk-write','flags':[{'name':a32_0x4d84a8(0x210),'type':'string','description':a32_0x4d84a8(0x20d),'enum':[a32_0x4d84a8(0x1f7),a32_0x4d84a8(0x201),a32_0x4d84a8(0x23a)]},{'name':a32_0x4d84a8(0x226),'type':a32_0x4d84a8(0x232),'description':a32_0x4d84a8(0x21a)},{'name':a32_0x4d84a8(0x225),'type':a32_0x4d84a8(0x238),'description':a32_0x4d84a8(0x21e)}],async 'dryRun'(_0x52fe0d){const _0x58a651=a32_0x4d84a8,_0x183c5e=loadBffProjectConfig(_0x52fe0d[_0x58a651(0x1f0)]),_0x1e708d=await readBffLockFile(_0x183c5e['lockFilePath']),{appLock:_0x184104}=ensureLockScope(_0x1e708d??createEmptyBffLock(),_0x52fe0d[_0x58a651(0x1f0)],_0x183c5e[_0x58a651(0x221)],'push'),_0xf4f81c=await getTargetFunctions(_0x183c5e,_0x52fe0d),_0x15cde5=_0x52fe0d[_0x58a651(0x209)]('force'),_0x24dbf5=[];for(const _0x21301e of _0xf4f81c){const _0x599306=await computeFileHash(_0x21301e[_0x58a651(0x235)]),_0x3ca119=_0x184104[_0x58a651(0x233)][_0x21301e[_0x58a651(0x208)]],_0x5c63a5=!!_0x3ca119&&_0x3ca119['hash']===_0x599306;_0x24dbf5[_0x58a651(0x222)]({'lockKey':_0x21301e[_0x58a651(0x208)],'filePath':_0x21301e['filePath'],'remoteId':_0x3ca119?.['remoteId']??null,'mode':_0x3ca119?.[_0x58a651(0x239)]?_0x58a651(0x218):_0x58a651(0x1e8),'status':!_0x15cde5&&_0x5c63a5?_0x58a651(0x1f1):'would_push'});}return{'method':_0x58a651(0x215),'url':_0x58a651(0x207),'body':{'appCode':_0x52fe0d['appCode'],'force':_0x15cde5,'files':_0x24dbf5,'cacheClearAtRuntime':_0x24dbf5[_0x58a651(0x20f)](_0x3d6ec0=>_0x3d6ec0[_0x58a651(0x1ec)]===_0x58a651(0x22e)),'cacheClearAtRuntimeTimes':_0x24dbf5['some'](_0x434955=>_0x434955[_0x58a651(0x1ec)]==='would_push')?CACHE_CLEAR_ATTEMPTS:0x0},'description':_0x58a651(0x22d)+_0x24dbf5[_0x58a651(0x21f)]+_0x58a651(0x202)};},async 'execute'(_0x58275a){const _0x2cf02f=a32_0x4d84a8,_0x3aa8e1=loadBffProjectConfig(_0x58275a[_0x2cf02f(0x1f0)]),_0xa9a987=await readBffLockFile(_0x3aa8e1[_0x2cf02f(0x203)]),{lockData:_0x44d9f4,appLock:_0x11455c}=ensureLockScope(_0xa9a987??createEmptyBffLock(),_0x58275a['appCode'],_0x3aa8e1[_0x2cf02f(0x221)],_0x2cf02f(0x222)),_0x4f08b7=await getTargetFunctions(_0x3aa8e1,_0x58275a);if(_0x4f08b7[_0x2cf02f(0x21f)]===0x0)return{'ok':!![],'data':{'uploaded':[],'skipped':[],'failed':[]},'message':_0x2cf02f(0x234)};const _0x35a20d=_0x58275a['bool'](_0x2cf02f(0x225)),_0x4ebbf0=JSON['parse'](JSON['stringify'](_0x44d9f4)),_0x207610=_0x4ebbf0[_0x2cf02f(0x1fe)][_0x58275a[_0x2cf02f(0x1f0)]];if(!_0x207610)throw new Error(_0x2cf02f(0x1ee)+_0x58275a['appCode']+_0x2cf02f(0x23b));const _0x5b42b1=await buildHookMaps(_0x58275a[_0x2cf02f(0x1f0)],_0x58275a[_0x2cf02f(0x205)],_0x4f08b7,_0x207610),_0x251714=[],_0x22c3e9=[],_0xacb03=[];for(const _0x5052f3 of _0x4f08b7){const _0x23a5a2=await computeFileHash(_0x5052f3[_0x2cf02f(0x235)]),_0x432e40=_0x207610['functions'][_0x5052f3[_0x2cf02f(0x208)]];if(!_0x35a20d&&_0x432e40&&_0x432e40[_0x2cf02f(0x20b)]===_0x23a5a2){_0x22c3e9[_0x2cf02f(0x222)]({'lockKey':_0x5052f3['lockKey'],'reason':_0x2cf02f(0x1f1)});continue;}try{await uploadSingleFunction(_0x58275a[_0x2cf02f(0x1f0)],_0x5052f3,_0x207610,_0x5b42b1);const _0x1f4d3b=_0x207610[_0x2cf02f(0x233)][_0x5052f3[_0x2cf02f(0x208)]];_0x251714[_0x2cf02f(0x222)]({'lockKey':_0x5052f3[_0x2cf02f(0x208)],'remoteId':_0x1f4d3b?.[_0x2cf02f(0x239)]??0x0});}catch(_0x39d7d6){_0xacb03[_0x2cf02f(0x222)]({'lockKey':_0x5052f3[_0x2cf02f(0x208)],'error':_0x39d7d6 instanceof Error?_0x39d7d6['message']:String(_0x39d7d6)});}}_0x207610[_0x2cf02f(0x22a)]=new Date()[_0x2cf02f(0x1fb)](),await writeBffLockFile(_0x3aa8e1['lockFilePath'],_0x4ebbf0),await waitForUploadedLockEntries(_0x3aa8e1[_0x2cf02f(0x203)],_0x58275a[_0x2cf02f(0x1f0)],_0x251714['map'](_0x45f57c=>_0x45f57c[_0x2cf02f(0x208)]));let _0x488eea={'attempted':![],'cleared':![]};if(_0x251714[_0x2cf02f(0x21f)]>0x0)try{let _0x1d604b='';for(let _0x52aa12=0x0;_0x52aa12<CACHE_CLEAR_ATTEMPTS;_0x52aa12+=0x1){_0x1d604b=await clearBffScriptCache(),_0x52aa12<CACHE_CLEAR_ATTEMPTS-0x1&&await sleep(CACHE_CLEAR_INTERVAL_MS);}_0x488eea={'attempted':!![],'cleared':!![],'message':_0x1d604b||_0x2cf02f(0x228)};}catch(_0x1a9fd2){_0x488eea={'attempted':!![],'cleared':![],'error':_0x1a9fd2 instanceof Error?_0x1a9fd2[_0x2cf02f(0x22b)]:String(_0x1a9fd2)};}const _0x543f69=_0xacb03['length']===0x0&&(_0x488eea['attempted']?_0x488eea[_0x2cf02f(0x1f8)]:!![]),_0x5b7fa0=_0x488eea[_0x2cf02f(0x23c)]?_0x488eea[_0x2cf02f(0x1f8)]?'runtime\x20cache\x20cleared':_0x2cf02f(0x1ea):_0x2cf02f(0x23d);return{'ok':_0x543f69,'data':{'uploaded':_0x251714,'skipped':_0x22c3e9,'failed':_0xacb03,'cacheClear':_0x488eea},'message':_0x2cf02f(0x20c)+_0x251714['length']+_0x2cf02f(0x1f9)+_0x22c3e9[_0x2cf02f(0x21f)]+_0x2cf02f(0x230)+_0xacb03[_0x2cf02f(0x21f)]+'\x20failed,\x20'+_0x5b7fa0};}};async function getTargetFunctions(_0x4d6b61,_0xec0051){const _0xcddacd=a32_0x4d84a8,_0xb4db22=_0xec0051[_0xcddacd(0x214)](_0xcddacd(0x210)),_0x1d329b=_0xec0051[_0xcddacd(0x214)](_0xcddacd(0x226)),_0x1e9604=normalizeBffType(_0xb4db22)??undefined;if(_0x1d329b&&!_0x1e9604)throw CliErrors[_0xcddacd(0x231)](_0xcddacd(0x21c));const _0x536739=await scanLocalBffFunctions(_0x4d6b61,_0x1e9604);if(_0x1d329b){const _0xe6e96a=_0x536739[_0xcddacd(0x1f2)](_0x11f638=>_0x11f638[_0xcddacd(0x226)]===_0x1d329b);if(_0xe6e96a[_0xcddacd(0x21f)]===0x0)throw CliErrors[_0xcddacd(0x231)](_0xcddacd(0x229)+_0x1e9604+'/'+_0x1d329b);return _0xe6e96a;}return _0x536739;}function a32_0x291e(_0x3645a0,_0xbc9687){_0x3645a0=_0x3645a0-0x1e6;const _0x1a1d42=a32_0x1a1d();let _0x291ee8=_0x1a1d42[_0x3645a0];return _0x291ee8;}async function buildHookMaps(_0x154bec,_0x162cf8,_0x5876ee,_0x38f726){const _0x4f4bc8=a32_0x4d84a8,_0x4a1fec=_0x5876ee[_0x4f4bc8(0x20f)](_0x1a0f25=>_0x1a0f25[_0x4f4bc8(0x210)]==='HOOK');if(!_0x4a1fec)return{'aliasToDatasetCode':new Map(),'datasetCodeToDataset':new Map()};const _0x39b595=loadAliasMap(_0x162cf8,undefined,resolveApiFilePath(_0x162cf8,_0x154bec)),_0x2a2b3b=new Map(_0x39b595['map'](_0x4d8e99=>[_0x4d8e99['alias'],_0x4d8e99[_0x4f4bc8(0x216)]]));for(const _0x1d9415 of Object[_0x4f4bc8(0x20a)](_0x38f726[_0x4f4bc8(0x233)])){_0x1d9415[_0x4f4bc8(0x1fc)]&&_0x1d9415[_0x4f4bc8(0x216)]&&!_0x2a2b3b[_0x4f4bc8(0x212)](_0x1d9415[_0x4f4bc8(0x1fc)])&&_0x2a2b3b[_0x4f4bc8(0x1f6)](_0x1d9415[_0x4f4bc8(0x1fc)],_0x1d9415[_0x4f4bc8(0x216)]);}const _0x29dc48=await listDatasets(_0x154bec),_0x227652=new Map(_0x29dc48[_0x4f4bc8(0x21b)](_0x1c09c4=>[_0x1c09c4[_0x4f4bc8(0x1fd)],_0x1c09c4]));return{'aliasToDatasetCode':_0x2a2b3b,'datasetCodeToDataset':_0x227652};}async function uploadSingleFunction(_0x57121a,_0x4fcc7f,_0x39b240,_0x44eaa8){const _0x313c1c=a32_0x4d84a8,_0x4553d9=await readFile(_0x4fcc7f[_0x313c1c(0x235)],_0x313c1c(0x1fa)),_0x1af722=await computeFileHash(_0x4fcc7f[_0x313c1c(0x235)]),_0x4969ff=_0x39b240[_0x313c1c(0x233)][_0x4fcc7f['lockKey']];if(_0x4969ff?.[_0x313c1c(0x239)]&&_0x4969ff[_0x313c1c(0x20e)]==null)throw CliErrors[_0x313c1c(0x231)](_0x4fcc7f[_0x313c1c(0x208)]+':\x20missing\x20remote\x20version.\x20Run\x20`push`\x20after\x20`pull`\x20to\x20sync\x20version\x20info.');let _0x1ae1f8=extractScriptDescription(_0x4553d9);if(!_0x1ae1f8&&_0x4969ff?.[_0x313c1c(0x239)]){const _0x8bbbf=await getBffScriptInfo(_0x4969ff[_0x313c1c(0x239)]);_0x1ae1f8=_0x8bbbf[_0x313c1c(0x213)]||undefined;}const _0x4cf9ae={'appCode':_0x57121a,'functionName':_0x4fcc7f[_0x313c1c(0x226)],'scriptType':_0x4fcc7f[_0x313c1c(0x210)],'scriptContent':_0x4553d9};if(_0x4969ff?.[_0x313c1c(0x239)])_0x4cf9ae['id']=_0x4969ff[_0x313c1c(0x239)];if(_0x4969ff?.[_0x313c1c(0x20e)]!=null)_0x4cf9ae[_0x313c1c(0x20e)]=_0x4969ff[_0x313c1c(0x20e)];if(_0x1ae1f8)_0x4cf9ae['description']=_0x1ae1f8;if(_0x4fcc7f[_0x313c1c(0x210)]==='HOOK'){const _0x39f806=_0x4fcc7f['alias'];if(!_0x39f806||!_0x4fcc7f[_0x313c1c(0x217)]||!_0x4fcc7f['functionNode'])throw CliErrors[_0x313c1c(0x231)](_0x313c1c(0x237)+_0x4fcc7f[_0x313c1c(0x208)]);const _0x21631e=_0x44eaa8['aliasToDatasetCode'][_0x313c1c(0x1e7)](_0x39f806)??_0x4969ff?.['datasetCode']??_0x39f806,_0x46c875=_0x44eaa8['datasetCodeToDataset'][_0x313c1c(0x1e7)](_0x21631e);if(!_0x46c875)throw CliErrors[_0x313c1c(0x231)](_0x313c1c(0x1ef)+_0x39f806+_0x313c1c(0x219)+(_0x313c1c(0x200)+CLI_BIN_NAME+_0x313c1c(0x1eb)));assertDatasetSupportsLocalDevelopment(_0x46c875,'BFF\x20HOOK\x20'+_0x4fcc7f[_0x313c1c(0x208)]),_0x4cf9ae['datasetId']=_0x46c875['id'],_0x4cf9ae[_0x313c1c(0x217)]=_0x4fcc7f[_0x313c1c(0x217)],_0x4cf9ae['functionNode']=_0x4fcc7f[_0x313c1c(0x206)];}const _0x1f66d5=await saveBffScript(_0x4cf9ae),_0x2ff31f=_0x1f66d5['id'],_0x33eeeb=_0x1f66d5[_0x313c1c(0x223)]??await getBffScriptInfo(_0x2ff31f),_0x4d5c9f={'hash':_0x1af722,'remoteId':_0x2ff31f,'version':_0x33eeeb[_0x313c1c(0x20e)]};if(_0x4fcc7f['type']===_0x313c1c(0x23a)){const _0xfbf79=_0x4fcc7f[_0x313c1c(0x1fc)],_0x2545c7=_0x44eaa8['aliasToDatasetCode']['get'](_0xfbf79)??_0x4969ff?.[_0x313c1c(0x216)]??_0xfbf79;_0x44eaa8[_0x313c1c(0x211)][_0x313c1c(0x212)](_0xfbf79)?_0x4d5c9f[_0x313c1c(0x1fc)]=_0xfbf79:_0x4d5c9f[_0x313c1c(0x1fc)]=_0x4969ff?.[_0x313c1c(0x1fc)],_0x4d5c9f[_0x313c1c(0x216)]=_0x2545c7,_0x4d5c9f[_0x313c1c(0x217)]=_0x4fcc7f[_0x313c1c(0x217)],_0x4d5c9f['functionNode']=_0x4fcc7f[_0x313c1c(0x206)];}_0x39b240[_0x313c1c(0x233)][_0x4fcc7f[_0x313c1c(0x208)]]=_0x4d5c9f;}const LOCK_SETTLE_RETRY_COUNT=0x14,LOCK_SETTLE_DELAY_MS=0x64;function a32_0x1a1d(){const _0x49db5e=['\x22\x20not\x20found\x20after\x20ensureLockScope.','attempted','runtime\x20cache\x20not\x20needed','every','get','create','6FOytna','runtime\x20cache\x20clear\x20failed','\x20api\x20pull`\x20to\x20refresh\x20api.ts,\x20or\x20verify\x20the\x20dataset\x20exists.','status','2125871wuiUAl','Lock\x20scope\x20for\x20app\x20\x22','Cannot\x20resolve\x20dataset\x20for\x20\x22','appCode','unchanged','filter','Lock\x20file\x20not\x20settled\x20after\x20push\x20for\x20','30hBApEh','2307543sBWzVE','set','COMMON','cleared','\x20uploaded,\x20','utf8','toISOString','alias','code','apps','1385363nDqQer','Run\x20`','ENDPOINT','\x20local\x20BFF\x20script(s)\x20for\x20push\x20and\x20clear\x20runtime\x20cache\x20if\x20files\x20are\x20uploaded','lockFilePath','Push\x20local\x20BFF\x20scripts\x20to\x20remote','apiDir','functionNode','/api/management/library/scripts/save','lockKey','bool','values','hash','Push\x20complete:\x20','Push\x20only\x20this\x20script\x20type','version','some','type','aliasToDatasetCode','has','description','str','POST','datasetCode','operationType','update','\x22.\x20','Push\x20only\x20the\x20named\x20function\x20(requires\x20--type)','map','--name\x20requires\x20--type\x20to\x20identify\x20the\x20function.','370134tfyxTL','Force\x20push\x20ignoring\x20hash\x20protection','length','2Wtqwsv','scriptsRoot','push','script','join','force','name','589656AdnifP','Runtime\x20script\x20cache\x20cleared.','Local\x20function\x20not\x20found:\x20','lastSync','message','10585mCObXe','Would\x20inspect\x20','would_push','636ClBfrC','\x20skipped,\x20','validation','string','functions','No\x20local\x20BFF\x20functions\x20found.','filePath','563460hwNVRk','Incomplete\x20HOOK\x20path:\x20','boolean','remoteId','HOOK'];a32_0x1a1d=function(){return _0x49db5e;};return a32_0x1a1d();}async function waitForUploadedLockEntries(_0x1ee791,_0x1a9d1d,_0x2035ca){const _0x120daf=a32_0x4d84a8;if(_0x2035ca[_0x120daf(0x21f)]===0x0)return;for(let _0x23b092=0x0;_0x23b092<LOCK_SETTLE_RETRY_COUNT;_0x23b092+=0x1){const _0x101a59=await readBffLockFile(_0x1ee791),_0x2b309a=_0x101a59?.[_0x120daf(0x1fe)]?.[_0x1a9d1d]?.[_0x120daf(0x233)]??{},_0x4320c5=_0x2035ca[_0x120daf(0x1e6)](_0x507c06=>!!_0x2b309a[_0x507c06]?.[_0x120daf(0x239)]);if(_0x4320c5)return;await sleep(LOCK_SETTLE_DELAY_MS);}throw new Error(_0x120daf(0x1f3)+_0x2035ca[_0x120daf(0x224)](',\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_0x3f51c5=a33_0x1afe;(function(_0x37cb9d,_0x4cae10){const _0x16e1f9=a33_0x1afe,_0x2768d8=_0x37cb9d();while(!![]){try{const _0x18c92f=parseInt(_0x16e1f9(0x12a))/0x1+-parseInt(_0x16e1f9(0x11d))/0x2+-parseInt(_0x16e1f9(0x11e))/0x3*(-parseInt(_0x16e1f9(0x136))/0x4)+parseInt(_0x16e1f9(0x123))/0x5+-parseInt(_0x16e1f9(0x13c))/0x6*(parseInt(_0x16e1f9(0x139))/0x7)+-parseInt(_0x16e1f9(0x12e))/0x8+-parseInt(_0x16e1f9(0x135))/0x9*(-parseInt(_0x16e1f9(0x12c))/0xa);if(_0x18c92f===_0x4cae10)break;else _0x2768d8['push'](_0x2768d8['shift']());}catch(_0x5c701e){_0x2768d8['push'](_0x2768d8['shift']());}}}(a33_0x4c36,0xe7bf1));import{listBffScripts,getBffScriptStatistics}from'../../core/api-client.js';import{loadAliasMap}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{loadBffProjectConfig}from'../../core/bff/config.js';import{createHookLocationMap,resolveRemoteScriptTarget,scanLocalBffFunctions}from'../../core/bff/file-system.js';function a33_0x4c36(){const _0x3aea9b=['All\x20BFF\x20scripts\x20are\x20in\x20sync.','468064KhDqlx','boolean','35757190xcqFYd','lockKey','12817056Ubusvr','push','bff','map','datasetCode','bool','\x20unchanged','9ILPvFn','528ZhgJad','length','Check\x20local\x20BFF\x20sync\x20status\x20against\x20lock\x20file','654913VHNRUL','alias','\x20remote-only','36bHrybs','status','functions','\x20modified,\x20','3546502WKklcZ','16791JJxxbO','remote','filePath','appCode','all','516915kXQreX','Also\x20check\x20for\x20remote-only\x20scripts\x20not\x20present\x20locally','apiDir','has','hash','read'];a33_0x4c36=function(){return _0x3aea9b;};return a33_0x4c36();}import{computeFileHash}from'../../core/bff/hash.js';import{createEmptyBffLock,ensureLockScope,readBffLockFile}from'../../core/bff/lock.js';function a33_0x1afe(_0x5ef3d8,_0x45b4b3){_0x5ef3d8=_0x5ef3d8-0x11a;const _0x4c363f=a33_0x4c36();let _0x1afefd=_0x4c363f[_0x5ef3d8];return _0x1afefd;}export const bffStatus={'service':a33_0x3f51c5(0x130),'command':a33_0x3f51c5(0x11a),'description':a33_0x3f51c5(0x138),'risk':a33_0x3f51c5(0x128),'flags':[{'name':a33_0x3f51c5(0x11f),'type':a33_0x3f51c5(0x12b),'description':a33_0x3f51c5(0x124)}],async 'execute'(_0x20830a){const _0x1534c0=a33_0x3f51c5,_0x442b7d=loadBffProjectConfig(_0x20830a[_0x1534c0(0x121)]),_0x3d7d05=await readBffLockFile(_0x442b7d['lockFilePath']),{appLock:_0x27041a}=ensureLockScope(_0x3d7d05??createEmptyBffLock(),_0x20830a[_0x1534c0(0x121)],_0x442b7d['scriptsRoot'],_0x1534c0(0x11a)),_0x137e9a=await scanLocalBffFunctions(_0x442b7d),_0x27536f=[],_0x158082=[],_0x5b3563=[];for(const _0x4ca167 of _0x137e9a){const _0x5c1120=await computeFileHash(_0x4ca167[_0x1534c0(0x120)]),_0x1829c9=_0x27041a['functions'][_0x4ca167['lockKey']];if(!_0x1829c9)_0x27536f['push'](_0x4ca167[_0x1534c0(0x12d)]);else _0x1829c9[_0x1534c0(0x127)]!==_0x5c1120?_0x158082[_0x1534c0(0x12f)](_0x4ca167[_0x1534c0(0x12d)]):_0x5b3563[_0x1534c0(0x12f)](_0x4ca167[_0x1534c0(0x12d)]);}const _0x3685a3=[];if(_0x20830a[_0x1534c0(0x133)](_0x1534c0(0x11f))){const _0x456bf3=loadAliasMap(_0x20830a[_0x1534c0(0x125)],undefined,resolveApiFilePath(_0x20830a['apiDir'],_0x20830a[_0x1534c0(0x121)])),_0x489cc8=new Map(_0x456bf3[_0x1534c0(0x131)](_0x410a38=>[_0x410a38[_0x1534c0(0x132)],_0x410a38[_0x1534c0(0x13a)]])),[_0x46478e,_0x20d9a0]=await Promise[_0x1534c0(0x122)]([listBffScripts(_0x20830a[_0x1534c0(0x121)]),getBffScriptStatistics(_0x20830a[_0x1534c0(0x121)])]),_0x416833=createHookLocationMap(_0x20d9a0),_0x53686e=new Set(_0x137e9a['map'](_0x5eb0ed=>_0x5eb0ed[_0x1534c0(0x12d)]));for(const _0x2dd18b of _0x46478e){const _0x3d68cb=resolveRemoteScriptTarget(_0x442b7d,_0x2dd18b,_0x416833,_0x27041a[_0x1534c0(0x11b)],_0x489cc8);_0x3d68cb&&!_0x53686e[_0x1534c0(0x126)](_0x3d68cb[_0x1534c0(0x12d)])&&_0x3685a3[_0x1534c0(0x12f)](_0x3d68cb[_0x1534c0(0x12d)]);}}const _0x50de9a=_0x27536f[_0x1534c0(0x137)]===0x0&&_0x158082[_0x1534c0(0x137)]===0x0&&_0x3685a3[_0x1534c0(0x137)]===0x0;return{'ok':!![],'data':{'added':_0x27536f,'modified':_0x158082,'unchanged':_0x5b3563,'remoteOnly':_0x3685a3},'message':_0x50de9a?_0x1534c0(0x129):_0x27536f[_0x1534c0(0x137)]+'\x20added,\x20'+_0x158082[_0x1534c0(0x137)]+_0x1534c0(0x11c)+_0x5b3563['length']+_0x1534c0(0x134)+(_0x3685a3['length']>0x0?',\x20'+_0x3685a3['length']+_0x1534c0(0x13b):'')};}};
@@ -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_0x23e48d=a34_0x11b2;(function(_0x40b645,_0x49ca55){const _0x26a812=a34_0x11b2,_0x5a57a3=_0x40b645();while(!![]){try{const _0x415432=parseInt(_0x26a812(0xb1))/0x1*(-parseInt(_0x26a812(0x89))/0x2)+-parseInt(_0x26a812(0xc6))/0x3*(parseInt(_0x26a812(0xaf))/0x4)+-parseInt(_0x26a812(0x90))/0x5+-parseInt(_0x26a812(0x84))/0x6+parseInt(_0x26a812(0xa1))/0x7*(parseInt(_0x26a812(0xca))/0x8)+-parseInt(_0x26a812(0xbd))/0x9+parseInt(_0x26a812(0xb8))/0xa*(parseInt(_0x26a812(0x9c))/0xb);if(_0x415432===_0x49ca55)break;else _0x5a57a3['push'](_0x5a57a3['shift']());}catch(_0x424b27){_0x5a57a3['push'](_0x5a57a3['shift']());}}}(a34_0x5153,0xefa5c));import a34_0x154dcc from'chalk';import a34_0x5a8f21 from'ora';import a34_0x2abcd8 from'semver';import{execa}from'execa';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{CliErrors}from'../errors.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,RABETBASE_SKILL_SOURCE,runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{getCdnConfig}from'../utils/cdn-config.js';function a34_0x5153(){const _0x2c7ad2=['230383uxGLxp','entries','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','beta','fromEntries','Unable\x20to\x20resolve\x20beta\x20version\x20from\x20npm','Already\x20up\x20to\x20date\x20(v','80sZgJYX','unknown','skills','gray','pipe','17132688QMyIdz','inherit','no-skills','object','execPath','\x20→\x20','Unable\x20to\x20check\x20for\x20updates\x20(network\x20error)','run','cwd','2178yeYVLM','Skipping\x20official\x20skill\x20package\x20(--no-skills).','version','Beta\x20version:\x20','5812600lxmsYp','Invalid\x20version:\x20','toLowerCase','write','source','Use\x20a\x20full\x20semver\x20such\x20as\x202.1.6\x20or\x202.1.6-beta.1.','nonInteractive','trim','message','/dist-tags','Update\x20available:\x20','3175194tQfCTF','stableVersion','slice','boolean','install','4FMhTqf','flag','Update\x20failed','filter','validation','Install\x20a\x20specific\x20CLI\x20version','Current\x20version:\x20','6789495aoJyXj','green','Refresh\x20official\x20skill\x20package\x20after\x20updating','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','start','timeout','latest','log','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','Checking\x20for\x20updates...','valid','\x20\x20Run\x20manually:\x20','7528334vvbBpf','bool','bun','fail','error','14SprHmt','warn','Updating\x20via\x20','info','Checking\x20official\x20skill\x20package...','yellow','\x20\x20Official\x20skill\x20update\x20failed:\x20','Already\x20on\x20requested\x20version\x20(v','npm','Skip\x20official\x20skill\x20package\x20refresh\x20after\x20updating','Updated\x20to\x20v','Version\x20comparison\x20failed','string','str','9340BzvFgb','\x20\x20Skipped\x20skill\x20install\x20(RABETBASE_SKIP_NPX_SKILLS=1).'];a34_0x5153=function(){return _0x2c7ad2;};return a34_0x5153();}import{resolveNpmBin}from'../utils/platform.js';function getCurrentVersion(){const _0x51573a=a34_0x11b2;return GIT_COMMIT!==_0x51573a(0xb9)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x51573a(0x86)](0x0,0xa)+')':VERSION;}function detectPackageManager(){const _0x10f4ff=a34_0x11b2,_0x3958ff=process[_0x10f4ff(0xc1)][_0x10f4ff(0xcc)]();if(_0x3958ff['includes'](_0x10f4ff(0x9e)))return _0x10f4ff(0x9e);return'npm';}const updateFlags=[{'name':'beta','type':a34_0x23e48d(0x87),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a34_0x23e48d(0xc8),'type':a34_0x23e48d(0xad),'description':a34_0x23e48d(0x8e)},{'name':a34_0x23e48d(0xbf),'type':a34_0x23e48d(0x87),'description':a34_0x23e48d(0xaa),'default':![]},{'name':a34_0x23e48d(0xba),'type':'boolean','description':a34_0x23e48d(0x92),'default':!![],'hidden':!![]}];function getRequestedVersion(_0x554268){const _0x380ff7=a34_0x23e48d;return _0x554268[_0x380ff7(0xae)]('version')[_0x380ff7(0xd1)]();}function shouldSkipOfficialSkill(_0x439ae7){const _0x414929=a34_0x23e48d;return _0x439ae7['bool'](_0x414929(0xbf))||_0x439ae7[_0x414929(0x8a)](_0x414929(0xba))===![];}async function validateUpdateFlags(_0x2fea43){const _0x59b161=a34_0x23e48d,_0x433345=_0x2fea43['bool'](_0x59b161(0xb4)),_0x4a9b6e=getRequestedVersion(_0x2fea43);if(_0x433345&&_0x4a9b6e)throw CliErrors[_0x59b161(0x8d)]('--beta\x20and\x20--version\x20cannot\x20be\x20used\x20together.','Choose\x20either\x20npm\x20beta\x20dist-tag\x20or\x20an\x20exact\x20version.');if(_0x4a9b6e&&!a34_0x2abcd8[_0x59b161(0x9a)](_0x4a9b6e))throw CliErrors[_0x59b161(0x8d)](_0x59b161(0xcb)+_0x4a9b6e,_0x59b161(0xcf));}async function fetchNpmDistTags(){const _0x4795ff=a34_0x23e48d;try{const _0x1c7fb9=await fetch('https://registry.npmjs.org/-/package/'+encodeURIComponent(NPM_PACKAGE_NAME)+_0x4795ff(0xd3),{'signal':AbortSignal[_0x4795ff(0x95)](0x2710)});if(!_0x1c7fb9['ok'])return null;const _0x4f1f94=await _0x1c7fb9['json']();if(!_0x4f1f94||typeof _0x4f1f94!==_0x4795ff(0xc0))return null;return Object[_0x4795ff(0xb5)](Object[_0x4795ff(0xb2)](_0x4f1f94)[_0x4795ff(0x8c)](([,_0x2ea940])=>typeof _0x2ea940==='string'&&_0x2ea940[_0x4795ff(0xd1)]()['length']>0x0)['map'](([_0x4bc233,_0x4d7e0e])=>[_0x4bc233,String(_0x4d7e0e)[_0x4795ff(0xd1)]()]));}catch{return null;}}async function fetchNpmDistTagVersion(_0x57a55e){const _0x110088=await fetchNpmDistTags();return _0x110088?.[_0x57a55e]??null;}async function fetchLatestVersion(){const _0x3f189c=a34_0x23e48d,_0x1d5ca4=await fetchNpmDistTagVersion(_0x3f189c(0x96));if(_0x1d5ca4)return _0x1d5ca4;const _0x42489d=await getCdnConfig();return _0x42489d?.['cli']?.[_0x3f189c(0x85)]??null;}async function resolveTargetVersion(_0xb8ea95){const _0x74103c=a34_0x23e48d,_0x2d3a90=getRequestedVersion(_0xb8ea95);if(_0x2d3a90)return{'version':_0x2d3a90,'source':_0x74103c(0xc8)};if(_0xb8ea95['bool']('beta')){const _0x2ee189=await fetchNpmDistTagVersion(_0x74103c(0xb4));if(!_0x2ee189)return null;return{'version':_0x2ee189,'source':_0x74103c(0xb4)};}const _0x21eafa=await fetchLatestVersion();if(!_0x21eafa)return null;return{'version':_0x21eafa,'source':'latest'};}function shouldInstallTarget(_0x469e03,_0xd1ea81){const _0x1c4d5e=a34_0x23e48d;if(_0xd1ea81[_0x1c4d5e(0xce)]==='version'||_0xd1ea81['source']==='beta')return!a34_0x2abcd8['eq'](_0x469e03,_0xd1ea81[_0x1c4d5e(0xc8)]);return a34_0x2abcd8['lt'](_0x469e03,_0xd1ea81[_0x1c4d5e(0xc8)]);}function a34_0x11b2(_0x39eaa0,_0x1adfcb){_0x39eaa0=_0x39eaa0-0x84;const _0x515393=a34_0x5153();let _0x11b26b=_0x515393[_0x39eaa0];return _0x11b26b;}function getInstallPlanLabel(_0x199a59,_0x195609){const _0x3da09f=a34_0x23e48d;switch(_0x195609[_0x3da09f(0xce)]){case _0x3da09f(0xb4):return _0x3da09f(0xc9)+a34_0x154dcc[_0x3da09f(0xa6)](_0x199a59)+'\x20→\x20'+a34_0x154dcc[_0x3da09f(0x91)](_0x195609[_0x3da09f(0xc8)]);case _0x3da09f(0xc8):return'Requested\x20version:\x20'+a34_0x154dcc[_0x3da09f(0xa6)](_0x199a59)+_0x3da09f(0xc2)+a34_0x154dcc[_0x3da09f(0x91)](_0x195609[_0x3da09f(0xc8)]);case _0x3da09f(0x96):default:return _0x3da09f(0xd4)+a34_0x154dcc['yellow'](_0x199a59)+_0x3da09f(0xc2)+a34_0x154dcc[_0x3da09f(0x91)](_0x195609[_0x3da09f(0xc8)]);}}async function installOfficialSkill(_0x589d4c){const _0x1f0d1d=a34_0x23e48d;console['log'](a34_0x154dcc[_0x1f0d1d(0xbb)](_0x1f0d1d(0xa5)));const _0x14a8e2=runNpxSkillsAddGlobal(process[_0x1f0d1d(0xc5)](),RABETBASE_SKILL_SOURCE,{'stdio':_0x589d4c?_0x1f0d1d(0xbc):_0x1f0d1d(0xbe)});if(_0x14a8e2['skipped']){console[_0x1f0d1d(0x97)](a34_0x154dcc[_0x1f0d1d(0xbb)](_0x1f0d1d(0xb0)));return;}if(_0x14a8e2['ok']){console['log'](a34_0x154dcc[_0x1f0d1d(0xbb)]('\x20\x20Official\x20skill\x20package\x20is\x20up\x20to\x20date.'));return;}console[_0x1f0d1d(0xa2)](a34_0x154dcc[_0x1f0d1d(0xa6)](_0x1f0d1d(0xa7)+(_0x14a8e2[_0x1f0d1d(0xa0)]||_0x1f0d1d(0xb9)))),console[_0x1f0d1d(0x97)](a34_0x154dcc[_0x1f0d1d(0xbb)](_0x1f0d1d(0x9b)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE));}async function execute(_0x3505e9){const _0x38c5bf=a34_0x23e48d;await validateUpdateFlags(_0x3505e9);const _0x392729=getCurrentVersion();console['log'](_0x38c5bf(0x8f)+_0x392729);const _0x373210=a34_0x5a8f21(_0x38c5bf(0x99))[_0x38c5bf(0x94)](),_0x14d377=await resolveTargetVersion(_0x3505e9);if(!_0x14d377){const _0xdfd60c=_0x3505e9[_0x38c5bf(0x9d)]('beta')?_0x38c5bf(0xb6):_0x38c5bf(0xc3);return _0x373210[_0x38c5bf(0x9f)](_0xdfd60c),console[_0x38c5bf(0x97)](a34_0x154dcc[_0x38c5bf(0xbb)](_0x38c5bf(0x98)+NPM_PACKAGE_NAME+'@latest')),{'ok':![],'message':_0xdfd60c};}const _0x3a29c2=a34_0x2abcd8[_0x38c5bf(0x9a)](VERSION),_0x365610=a34_0x2abcd8[_0x38c5bf(0x9a)](_0x14d377[_0x38c5bf(0xc8)]);if(!_0x3a29c2||!_0x365610)return _0x373210[_0x38c5bf(0x9f)](_0x38c5bf(0xac)),{'ok':![],'message':_0x38c5bf(0xac)};if(!shouldInstallTarget(_0x3a29c2,_0x14d377)){const _0x3b4cae=_0x14d377['source']===_0x38c5bf(0xc8)?_0x38c5bf(0xa8)+_0x14d377[_0x38c5bf(0xc8)]+')':_0x38c5bf(0xb7)+_0x14d377['version']+')';return _0x373210['succeed'](_0x3b4cae),shouldSkipOfficialSkill(_0x3505e9)?console[_0x38c5bf(0x97)](a34_0x154dcc[_0x38c5bf(0xbb)](_0x38c5bf(0xc7))):await installOfficialSkill(_0x3505e9['nonInteractive']),{'ok':!![]};}_0x373210[_0x38c5bf(0xa4)](getInstallPlanLabel(_0x392729,_0x14d377));const _0x597ea5=detectPackageManager(),_0x3e7032=_0x597ea5===_0x38c5bf(0xa9)?resolveNpmBin(_0x38c5bf(0xa9)):_0x597ea5,_0x5d9087=a34_0x5a8f21(_0x38c5bf(0xa3)+_0x597ea5+'...')[_0x38c5bf(0x94)]();try{return await execa(_0x3e7032,[_0x38c5bf(0x88),'-g',NPM_PACKAGE_NAME+'@'+_0x14d377[_0x38c5bf(0xc8)]],{'stdio':'pipe'}),_0x5d9087['succeed'](_0x38c5bf(0xab)+_0x14d377[_0x38c5bf(0xc8)]),console[_0x38c5bf(0x97)](a34_0x154dcc['gray'](_0x38c5bf(0xb3))),shouldSkipOfficialSkill(_0x3505e9)?console[_0x38c5bf(0x97)](a34_0x154dcc[_0x38c5bf(0xbb)](_0x38c5bf(0xc7))):await installOfficialSkill(_0x3505e9[_0x38c5bf(0xd0)]),{'ok':!![]};}catch(_0x413887){return _0x5d9087[_0x38c5bf(0x9f)](_0x38c5bf(0x8b)),console[_0x38c5bf(0xa0)](a34_0x154dcc['red']('\x20\x20'+_0x413887['message'])),console[_0x38c5bf(0x97)](a34_0x154dcc['gray']('\x20\x20Try\x20manually:\x20'+_0x597ea5+'\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x14d377[_0x38c5bf(0xc8)])),{'ok':![],'message':_0x413887[_0x38c5bf(0xd2)]};}}export const updateDefinition={'service':'update','command':a34_0x23e48d(0xc4),'description':a34_0x23e48d(0x93),'risk':a34_0x23e48d(0xcd),'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(_0x3ddb00,_0x158b2f){const _0xb7e4cb=a35_0x5edb,_0x3f9f0b=_0x3ddb00();while(!![]){try{const _0x3cfe51=-parseInt(_0xb7e4cb(0xb8))/0x1*(-parseInt(_0xb7e4cb(0xbc))/0x2)+parseInt(_0xb7e4cb(0xbd))/0x3*(-parseInt(_0xb7e4cb(0xbf))/0x4)+-parseInt(_0xb7e4cb(0xc0))/0x5+parseInt(_0xb7e4cb(0xb7))/0x6+parseInt(_0xb7e4cb(0xc1))/0x7*(-parseInt(_0xb7e4cb(0xba))/0x8)+parseInt(_0xb7e4cb(0xbb))/0x9*(-parseInt(_0xb7e4cb(0xb9))/0xa)+-parseInt(_0xb7e4cb(0xb6))/0xb*(-parseInt(_0xb7e4cb(0xbe))/0xc);if(_0x3cfe51===_0x158b2f)break;else _0x3f9f0b['push'](_0x3f9f0b['shift']());}catch(_0x51fd26){_0x3f9f0b['push'](_0x3f9f0b['shift']());}}}(a35_0x5500,0x38537));import{codegenSdk}from'../../commands/codegen/sdk.js';import{codegenSql}from'../../commands/codegen/sql.js';function a35_0x5500(){const _0x4fcc1b=['9DWYpoJ','6MoFoRs','6lrqEKw','9558732lQrzdf','397912XPCzeN','2008265dHyoWs','7baPcIK','11trxsbo','1351620LgKgcq','9061LzqCja','720710lKLRGC','1164984OSBkxH'];a35_0x5500=function(){return _0x4fcc1b;};return a35_0x5500();}function a35_0x5edb(_0x534eb7,_0x4ef658){_0x534eb7=_0x534eb7-0xb6;const _0x5500c1=a35_0x5500();let _0x5edb8d=_0x5500c1[_0x534eb7];return _0x5edb8d;}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
+ const a36_0x3fec10=a36_0x242b;(function(_0xda0f90,_0x3c5d1b){const _0x27e5f8=a36_0x242b,_0x54eb53=_0xda0f90();while(!![]){try{const _0xc09e98=-parseInt(_0x27e5f8(0x1bb))/0x1*(parseInt(_0x27e5f8(0x1c0))/0x2)+-parseInt(_0x27e5f8(0x1bd))/0x3+-parseInt(_0x27e5f8(0x1c2))/0x4+parseInt(_0x27e5f8(0x1b0))/0x5*(parseInt(_0x27e5f8(0x1b3))/0x6)+-parseInt(_0x27e5f8(0x1c3))/0x7*(-parseInt(_0x27e5f8(0x1be))/0x8)+-parseInt(_0x27e5f8(0x1b5))/0x9*(-parseInt(_0x27e5f8(0x1c9))/0xa)+parseInt(_0x27e5f8(0x1c1))/0xb;if(_0xc09e98===_0x3c5d1b)break;else _0x54eb53['push'](_0x54eb53['shift']());}catch(_0x223044){_0x54eb53['push'](_0x54eb53['shift']());}}}(a36_0x5cf2,0x8985b));function a36_0x242b(_0xb533dd,_0x195320){_0xb533dd=_0xb533dd-0x1b0;const _0x5cf26a=a36_0x5cf2();let _0x242be7=_0x5cf26a[_0xb533dd];return _0x242be7;}import{getOperationDetail,generateSdkCode}from'../../core/api-client.js';function a36_0x5cf2(){const _0x23dd13=['Operation\x20name\x20(e.g.\x20filter,\x20getOne,\x20create,\x20update)','tableName','read','alias','2jEjLZL','bool','299328LjRpwZ','381224hUyoGF','Generate\x20TypeScript\x20SDK\x20code\x20for\x20a\x20dataset\x20operation','830728INETdi','19244599Xqrqjw','2520100xLGyLZ','14spiewG','Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon)','operation','codegen','str','skip-imports','1852930hedkCk','appCode','string','58570jwNgzJ','Omit\x20import\x20statements\x20from\x20generated\x20code','name','48oYSpYg','sdk','9DdMtpL','code'];a36_0x5cf2=function(){return _0x23dd13;};return a36_0x5cf2();}import{CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const codegenSdk={'service':a36_0x3fec10(0x1c6),'command':a36_0x3fec10(0x1b4),'description':a36_0x3fec10(0x1bf),'risk':a36_0x3fec10(0x1b9),'flags':[CODE_FLAG_OPTIONAL,{'name':a36_0x3fec10(0x1ba),'type':a36_0x3fec10(0x1cb),'description':a36_0x3fec10(0x1c4)},{'name':a36_0x3fec10(0x1c5),'type':a36_0x3fec10(0x1cb),'required':!![],'description':a36_0x3fec10(0x1b7)},{'name':a36_0x3fec10(0x1c8),'type':'boolean','description':a36_0x3fec10(0x1b1)}],async 'execute'(_0x3aa49b){const _0x53784c=a36_0x3fec10,{dataset:_0x2a06d5,operation:_0x4169a9}=await getOperationDetail(_0x3aa49b[_0x53784c(0x1ca)],_0x3aa49b[_0x53784c(0x1c7)](_0x53784c(0x1b6)),_0x3aa49b['str']('operation')),_0x10e3c2=generateSdkCode(_0x2a06d5,_0x4169a9,{'includeImports':!_0x3aa49b[_0x53784c(0x1bc)](_0x53784c(0x1c8))});return{'ok':!![],'data':{'dataset':{'name':_0x2a06d5[_0x53784c(0x1b2)],'code':_0x2a06d5['code'],'tableName':_0x2a06d5[_0x53784c(0x1b8)]},'operation':_0x3aa49b['str']('operation'),'code':_0x10e3c2}};}};
@@ -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
+ function a37_0x1d9d(_0x28eb0a,_0xc08198){_0x28eb0a=_0x28eb0a-0x1a9;const _0x46296e=a37_0x4629();let _0x1d9da2=_0x46296e[_0x28eb0a];return _0x1d9da2;}function a37_0x4629(){const _0x139b5d=['Omit\x20import\x20statements\x20from\x20generated\x20code','225CBwSVc','2046VDvwnQ','Code\x20target:\x20sdk\x20(default)\x20or\x20bff','31474xOzddS','read','5943072GcwJiT','28aznppT','target','sdk','10904148pTfYTO','9850CVIEkv','codegen','8568917oLVsqD','74aWLjUN','86652XvkupG','sqlCode','sqlName','string','16654fLBUIe','bool','sql','appCode','Generate\x20TypeScript\x20code\x20for\x20a\x20custom\x20SQL\x20query','sqlcode'];a37_0x4629=function(){return _0x139b5d;};return a37_0x4629();}const a37_0xa9cb58=a37_0x1d9d;(function(_0x1bf2b8,_0x18f1e6){const _0x66dc0f=a37_0x1d9d,_0x4fe6d1=_0x1bf2b8();while(!![]){try{const _0x4c5866=-parseInt(_0x66dc0f(0x1ab))/0x1*(-parseInt(_0x66dc0f(0x1ba))/0x2)+parseInt(_0x66dc0f(0x1b8))/0x3*(-parseInt(_0x66dc0f(0x1bd))/0x4)+-parseInt(_0x66dc0f(0x1b7))/0x5*(parseInt(_0x66dc0f(0x1ac))/0x6)+parseInt(_0x66dc0f(0x1aa))/0x7+-parseInt(_0x66dc0f(0x1bc))/0x8+parseInt(_0x66dc0f(0x1c0))/0x9+parseInt(_0x66dc0f(0x1c1))/0xa*(-parseInt(_0x66dc0f(0x1b0))/0xb);if(_0x4c5866===_0x18f1e6)break;else _0x4fe6d1['push'](_0x4fe6d1['shift']());}catch(_0x3074ac){_0x4fe6d1['push'](_0x4fe6d1['shift']());}}}(a37_0x4629,0xadaeb));import{getSqlQueryInfo,generateSqlCodeTemplate}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const codegenSql={'service':a37_0xa9cb58(0x1a9),'command':a37_0xa9cb58(0x1b2),'description':a37_0xa9cb58(0x1b4),'risk':a37_0xa9cb58(0x1bb),'flags':[SQLCODE_FLAG,{'name':a37_0xa9cb58(0x1be),'type':a37_0xa9cb58(0x1af),'description':a37_0xa9cb58(0x1b9),'default':a37_0xa9cb58(0x1bf),'enum':[a37_0xa9cb58(0x1bf),'bff']},{'name':'no-imports','type':'boolean','description':a37_0xa9cb58(0x1b6)}],async 'execute'(_0x4f5e0c){const _0x79cb57=a37_0xa9cb58,_0x3a6503=await getSqlQueryInfo(_0x4f5e0c[_0x79cb57(0x1b3)],_0x4f5e0c['str'](_0x79cb57(0x1b5))),_0x1905b1=_0x4f5e0c['str']('target')||'sdk',_0x133869=generateSqlCodeTemplate(_0x3a6503,{'target':_0x1905b1,'includeImports':!_0x4f5e0c[_0x79cb57(0x1b1)]('no-imports')});return{'ok':!![],'data':{'sqlCode':_0x3a6503[_0x79cb57(0x1ad)],'sqlName':_0x3a6503[_0x79cb57(0x1ae)],'target':_0x1905b1,'code':_0x133869}};}};
@@ -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(_0x4907ac,_0x2828c5){const _0x1a8433=a38_0xa62e,_0x8c5bef=_0x4907ac();while(!![]){try{const _0x1372eb=-parseInt(_0x1a8433(0xb3))/0x1+-parseInt(_0x1a8433(0xbc))/0x2+parseInt(_0x1a8433(0xbd))/0x3+parseInt(_0x1a8433(0xb1))/0x4*(parseInt(_0x1a8433(0xa5))/0x5)+-parseInt(_0x1a8433(0xc5))/0x6*(-parseInt(_0x1a8433(0xaf))/0x7)+parseInt(_0x1a8433(0xb5))/0x8*(-parseInt(_0x1a8433(0xb7))/0x9)+-parseInt(_0x1a8433(0xc3))/0xa*(parseInt(_0x1a8433(0xa7))/0xb);if(_0x1372eb===_0x2828c5)break;else _0x8c5bef['push'](_0x8c5bef['shift']());}catch(_0x42a6d9){_0x8c5bef['push'](_0x8c5bef['shift']());}}}(a38_0x5c94,0xd7e7c));import{input,checkbox,select}from'@inquirer/prompts';import a38_0x381508 from'chalk';import{validateAppcode}from'../../commands/common/validate.js';import{listRemoteApps}from'../../core/api-client.js';function a38_0x5c94(){const _0x3e2e63=['请选择要绑定的应用:','4RDJfYn','App\x20Code:','742054KTxbMO','valid','708184kdBBsg','正在获取可用应用列表...','9rjtvyX','appName','请输入\x20App\x20Code:','(跳过,稍后配置)','✎\x20自定义输入\x20appcode','222606YxNebv','3225153LdztvD','\x0a无法获取远程应用列表,请手动输入。','message','yellow','manual','\x20\x20(','26622710dZazoS','custom','3355734wGDLPG','未找到可用应用。','map','gray','Invalid\x20App\x20Code','\x20个应用,请选择\x20(空格勾选,\x20a=全选,\x20i=反选):','8677905WIGGsM','length','11KePEPg','✎\x20手动输入','skip','(未检测到登录态,请手动输入\x20App\x20Code\x20或直接跳过)','trim','cyan','appCode','\x0a未找到可用应用。','21AkosBf'];a38_0x5c94=function(){return _0x3e2e63;};return a38_0x5c94();}import{withActiveCookie}from'../../utils/with-active-cookie.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';export async function promptCustomAppcode(){const _0x277a04=a38_0xa62e,_0x31d882=await input({'message':_0x277a04(0xb9),'validate':_0x574e9a=>{const _0x2f2f15=_0x277a04,_0x435f60=validateAppcode(_0x574e9a['trim']());return _0x435f60[_0x2f2f15(0xb4)]||_0x435f60['message']||_0x2f2f15(0xa3);}});return _0x31d882[_0x277a04(0xab)]();}export async function promptAppSelection(_0x10a012){const _0xd5a611=a38_0xa62e,_0x46778c=[{'name':a38_0x381508['yellow'](_0xd5a611(0xbb)),'value':-0x1},..._0x10a012[_0xd5a611(0xa1)]((_0x429a74,_0x3a895e)=>({'name':_0x429a74[_0xd5a611(0xb8)]+'\x20\x20'+a38_0x381508['gray']('('+_0x429a74[_0xd5a611(0xad)]+')'),'value':_0x3a895e}))],_0x4f284d=await checkbox({'message':'获取到\x20'+a38_0x381508[_0xd5a611(0xac)](_0x10a012['length'])+_0xd5a611(0xa4),'choices':_0x46778c,'loop':![]});if(_0x4f284d['includes'](-0x1))return _0xd5a611(0xc4);if(_0x4f284d['length']===0x0)return _0xd5a611(0xc4);return _0x4f284d[_0xd5a611(0xa1)](_0x167b4=>_0x10a012[_0x167b4]);}export async function promptSingleAppSelection(_0x5f2b22){const _0x1901fe=a38_0xa62e,_0x315314=[{'name':a38_0x381508['gray']('(跳过,稍后通过\x20config\x20set\x20appcode\x20配置)'),'value':_0x1901fe(0xa9)},{'name':a38_0x381508['yellow']('✎\x20自定义输入\x20appcode'),'value':_0x1901fe(0xc4)},..._0x5f2b22[_0x1901fe(0xa1)](_0x346f5c=>({'name':_0x346f5c[_0x1901fe(0xb8)]+'\x20\x20'+a38_0x381508[_0x1901fe(0xa2)]('('+_0x346f5c['appCode']+')'),'value':_0x346f5c[_0x1901fe(0xad)]}))],_0x33340d=await select({'message':_0x1901fe(0xb0),'choices':_0x315314});if(_0x33340d===_0x1901fe(0xa9))return _0x1901fe(0xa9);if(_0x33340d===_0x1901fe(0xc4))return _0x1901fe(0xc4);return _0x5f2b22['find'](_0x3e4e08=>_0x3e4e08['appCode']===_0x33340d);}export async function selectSingleAppcode(_0x4709ef){const _0x53a98a=a38_0xa62e;if(!_0x4709ef)return writeCliSideChannelLine(a38_0x381508['gray'](_0x53a98a(0xaa))),_fallbackOrSkip();writeCliSideChannelLine(_0x53a98a(0xb6));let _0x844824;try{_0x844824=await withActiveCookie(_0x4709ef,()=>listRemoteApps());}catch(_0x19155c){writeCliSideChannelLine(a38_0x381508[_0x53a98a(0xc0)]('无法获取远程应用列表,请手动输入。'));if(_0x19155c instanceof Error)writeCliSideChannelLine(a38_0x381508['gray']('\x20\x20('+_0x19155c[_0x53a98a(0xbf)]+')'));return _fallbackOrSkip();}if(_0x844824[_0x53a98a(0xa6)]===0x0)return writeCliSideChannelLine(a38_0x381508[_0x53a98a(0xc0)](_0x53a98a(0xc6))),_fallbackOrSkip();const _0x47e9ce=await promptSingleAppSelection(_0x844824);if(_0x47e9ce===_0x53a98a(0xa9))return'';if(_0x47e9ce===_0x53a98a(0xc4))return promptCustomAppcode();return _0x47e9ce[_0x53a98a(0xad)];}export async function selectMultipleApps(_0x33b9d4){const _0x2fae03=a38_0xa62e;writeCliSideChannelLine(_0x2fae03(0xb6));let _0x41a5ca;try{_0x41a5ca=await withActiveCookie(_0x33b9d4,()=>listRemoteApps());}catch(_0x192cca){writeCliSideChannelLine(_0x2fae03(0xbe));if(_0x192cca instanceof Error)writeCliSideChannelLine(_0x2fae03(0xc2)+_0x192cca['message']+')');return'custom';}if(_0x41a5ca[_0x2fae03(0xa6)]===0x0)return writeCliSideChannelLine(_0x2fae03(0xae)),_0x2fae03(0xc4);return promptAppSelection(_0x41a5ca);}function a38_0xa62e(_0x5d7ee7,_0x1fd88a){_0x5d7ee7=_0x5d7ee7-0xa1;const _0x5c94b4=a38_0x5c94();let _0xa62edb=_0x5c94b4[_0x5d7ee7];return _0xa62edb;}async function _fallbackOrSkip(){const _0x595a61=a38_0xa62e,_0x4928e2=await select({'message':_0x595a61(0xb2),'choices':[{'name':a38_0x381508[_0x595a61(0xa2)](_0x595a61(0xba)),'value':'skip'},{'name':a38_0x381508[_0x595a61(0xc0)](_0x595a61(0xa8)),'value':_0x595a61(0xc1)}]});if(_0x4928e2===_0x595a61(0xa9))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_0x4dbc01=a39_0xd64c;(function(_0x42f509,_0x572011){const _0x1cb403=a39_0xd64c,_0x40b5c6=_0x42f509();while(!![]){try{const _0x48352d=parseInt(_0x1cb403(0x178))/0x1*(parseInt(_0x1cb403(0x179))/0x2)+-parseInt(_0x1cb403(0x17b))/0x3*(parseInt(_0x1cb403(0x177))/0x4)+-parseInt(_0x1cb403(0x16a))/0x5*(-parseInt(_0x1cb403(0x16b))/0x6)+-parseInt(_0x1cb403(0x16c))/0x7*(-parseInt(_0x1cb403(0x169))/0x8)+parseInt(_0x1cb403(0x180))/0x9+parseInt(_0x1cb403(0x166))/0xa+-parseInt(_0x1cb403(0x17d))/0xb*(parseInt(_0x1cb403(0x173))/0xc);if(_0x48352d===_0x572011)break;else _0x40b5c6['push'](_0x40b5c6['shift']());}catch(_0x4b8920){_0x40b5c6['push'](_0x40b5c6['shift']());}}}(a39_0x49df,0xbc2db));function a39_0xd64c(_0x319d55,_0x53562b){_0x319d55=_0x319d55-0x166;const _0x49df38=a39_0x49df();let _0xd64ca8=_0x49df38[_0x319d55];return _0xd64ca8;}function a39_0x49df(){const _0xf788ab=['725888yfrnlh','4ALVdJr','569518QFNeEE','MYSQL','21HOApRC','a\x2032-character\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588)','11KouCSH','Database\x20product\x20type','POSTGRESQL','1468305eWnAoM','10657570EdtAXP','dbtype','Dataset\x20code\x20(32-char\x20hex\x20UUID)','8696gujmGK','5eBBmze','6210114jEZiKg','8155vCtKbZ','App\x20code\x20(overrides\x20config\x20file,\x20e.g.\x20app-xxxxx)','number','appcode','Database\x20connection\x20ID\x20(dblink\x20id\x20from\x20db\x20list)','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','string','31538748XoMjAA','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','datasetcode','code'];a39_0x49df=function(){return _0xf788ab;};return a39_0x49df();}export const DATASET_CODE_PATTERN={'regex':/^[a-f0-9]{32}$/i,'description':a39_0x4dbc01(0x17c)};export const CODE_FLAG={'name':a39_0x4dbc01(0x176),'type':a39_0x4dbc01(0x172),'required':!![],'description':a39_0x4dbc01(0x168),'pattern':DATASET_CODE_PATTERN};export const CODE_FLAG_OPTIONAL={...CODE_FLAG,'required':![]};export const DATASETCODE_FLAG_OPTIONAL={...CODE_FLAG_OPTIONAL,'name':a39_0x4dbc01(0x175),'description':a39_0x4dbc01(0x168)};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':a39_0x4dbc01(0x171),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a39_0x4dbc01(0x174)}};export const APPCODE_FLAG_OPTIONAL={'name':a39_0x4dbc01(0x16f),'type':a39_0x4dbc01(0x172),'required':![],'description':a39_0x4dbc01(0x16d)};export const SQLCODE_FLAG_OPTIONAL={...SQLCODE_FLAG,'required':![]};export const DBLINK_ID_FLAG={'name':'id','type':a39_0x4dbc01(0x16e),'required':!![],'description':a39_0x4dbc01(0x170)};export const DB_TYPE_FLAG={'name':a39_0x4dbc01(0x167),'type':a39_0x4dbc01(0x172),'required':!![],'description':a39_0x4dbc01(0x17e),'enum':[a39_0x4dbc01(0x17a),a39_0x4dbc01(0x17f)]};
@@ -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(_0xca52bd,_0x20fec9){const _0x597aa7=a40_0x263c,_0x27f18e=_0xca52bd();while(!![]){try{const _0x592185=parseInt(_0x597aa7(0x89))/0x1+parseInt(_0x597aa7(0x84))/0x2*(-parseInt(_0x597aa7(0x8a))/0x3)+-parseInt(_0x597aa7(0x88))/0x4*(-parseInt(_0x597aa7(0x81))/0x5)+parseInt(_0x597aa7(0x8b))/0x6*(-parseInt(_0x597aa7(0x7f))/0x7)+parseInt(_0x597aa7(0x8c))/0x8+parseInt(_0x597aa7(0x86))/0x9*(parseInt(_0x597aa7(0x87))/0xa)+parseInt(_0x597aa7(0x80))/0xb;if(_0x592185===_0x20fec9)break;else _0x27f18e['push'](_0x27f18e['shift']());}catch(_0x44f7aa){_0x27f18e['push'](_0x27f18e['shift']());}}}(a40_0x2bff,0xbc4f9));function a40_0x2bff(){const _0x3066fb=['1055620PdeAxF','813ogSuFs','18uaLpbs','679664fMruHC','App\x20Code\x20cannot\x20exceed\x20100\x20characters','trim','3319288QpMUNR','4993131WjFIgp','25isEEom','length','test','3754vrYpBg','Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','36306bAPhIV','40XYxXxb','873524vJodqQ'];a40_0x2bff=function(){return _0x3066fb;};return a40_0x2bff();}function a40_0x263c(_0x3757d1,_0x12247a){_0x3757d1=_0x3757d1-0x7e;const _0x2bffcf=a40_0x2bff();let _0x263c55=_0x2bffcf[_0x3757d1];return _0x263c55;}export function validateAppcode(_0x477185){const _0x3b2461=a40_0x263c,_0x378a82=_0x477185[_0x3b2461(0x7e)]();if(!_0x378a82)return{'valid':![],'message':'App\x20Code\x20cannot\x20be\x20empty'};if(_0x378a82[_0x3b2461(0x82)]>0x64)return{'valid':![],'message':_0x3b2461(0x8d)};if(!/^[A-Za-z0-9_-]+$/[_0x3b2461(0x83)](_0x378a82))return{'valid':![],'message':_0x3b2461(0x85)};return{'valid':!![]};}
@@ -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
+ const a41_0x29820c=a41_0x1650;(function(_0xe1418b,_0x55077f){const _0x27845c=a41_0x1650,_0xd9c4a6=_0xe1418b();while(!![]){try{const _0x20d058=parseInt(_0x27845c(0x138))/0x1*(-parseInt(_0x27845c(0x141))/0x2)+-parseInt(_0x27845c(0x137))/0x3+parseInt(_0x27845c(0x145))/0x4+-parseInt(_0x27845c(0x143))/0x5*(-parseInt(_0x27845c(0x142))/0x6)+-parseInt(_0x27845c(0x149))/0x7*(parseInt(_0x27845c(0x134))/0x8)+parseInt(_0x27845c(0x146))/0x9*(-parseInt(_0x27845c(0x135))/0xa)+parseInt(_0x27845c(0x147))/0xb*(parseInt(_0x27845c(0x13c))/0xc);if(_0x20d058===_0x55077f)break;else _0xd9c4a6['push'](_0xd9c4a6['shift']());}catch(_0x1d7e7c){_0xd9c4a6['push'](_0xd9c4a6['shift']());}}}(a41_0x431c,0x22805));import{CliErrors}from'../../errors.js';import{readConfig}from'../../utils/config.js';function a41_0x431c(){const _0x367fc8=['258826ioAhpd','132QaHviv','3025bHQBfN','config','399988kaNiSQ','18eClQgi','11dJUyPe','Missing\x20key.','7EscXtZ','1127896sKMrBs','283190glIoTg','validation','179757miCxWj','1IVUGtz','app','read','Key\x20not\x20found:\x20','4979604xjBCVG','\x20config\x20get\x20--key\x20<key>','object','Usage:\x20','str'];a41_0x431c=function(){return _0x367fc8;};return a41_0x431c();}function a41_0x1650(_0x2d2601,_0x115603){_0x2d2601=_0x2d2601-0x134;const _0x431c24=a41_0x431c();let _0x1650be=_0x431c24[_0x2d2601];return _0x1650be;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{getConfigCommandKeyDescription}from'../../commands/config/shared.js';async function execute(_0x46f226){const _0x43a1a0=a41_0x1650,_0x422d96=_0x46f226[_0x43a1a0(0x140)]('key');if(!_0x422d96)throw CliErrors[_0x43a1a0(0x136)](_0x43a1a0(0x148),_0x43a1a0(0x13f)+CLI_BIN_NAME+_0x43a1a0(0x13d));const _0x555785=readConfig(),_0x122fac=_0x422d96===_0x43a1a0(0x139)?'appcode':_0x422d96,_0x159477=_0x555785[_0x122fac];if(_0x159477===undefined)throw CliErrors[_0x43a1a0(0x136)](_0x43a1a0(0x13b)+_0x422d96);return{'ok':!![],'data':typeof _0x159477===_0x43a1a0(0x13e)?_0x159477:{[_0x122fac]:_0x159477},'message':typeof _0x159477===_0x43a1a0(0x13e)?undefined:String(_0x159477)};}export const configGetDefinition={'service':a41_0x29820c(0x144),'command':'get','description':'Get\x20a\x20config\x20value\x20by\x20key','risk':a41_0x29820c(0x13a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'key','type':'string','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(_0x1b70a4,_0x5dada0){const _0x54cccf=a42_0x5146,_0x4a97bd=_0x1b70a4();while(!![]){try{const _0x339c64=-parseInt(_0x54cccf(0x196))/0x1*(parseInt(_0x54cccf(0x194))/0x2)+parseInt(_0x54cccf(0x19d))/0x3+-parseInt(_0x54cccf(0x19f))/0x4*(parseInt(_0x54cccf(0x195))/0x5)+-parseInt(_0x54cccf(0x19a))/0x6+-parseInt(_0x54cccf(0x199))/0x7*(-parseInt(_0x54cccf(0x19b))/0x8)+parseInt(_0x54cccf(0x19c))/0x9*(parseInt(_0x54cccf(0x197))/0xa)+parseInt(_0x54cccf(0x198))/0xb*(parseInt(_0x54cccf(0x19e))/0xc);if(_0x339c64===_0x5dada0)break;else _0x4a97bd['push'](_0x4a97bd['shift']());}catch(_0x9b6057){_0x4a97bd['push'](_0x4a97bd['shift']());}}}(a42_0x2c65,0xf31a1));import{configListDefinition}from'../../commands/config/list.js';import{configGetDefinition}from'../../commands/config/get.js';import{configSetDefinition}from'../../commands/config/set.js';function a42_0x5146(_0x49b25a,_0x24b423){_0x49b25a=_0x49b25a-0x194;const _0x2c65a4=a42_0x2c65();let _0x51464d=_0x2c65a4[_0x49b25a];return _0x51464d;}function a42_0x2c65(){const _0x16eda7=['10SVsxHy','38177BZnshW','584620NvkJjL','11GAFZYi','42vnTsFn','4067124dtxtjr','2353240sqZKRB','180KzAjHZ','439503ZUSCiV','12336732LYiEUA','3724956MFDtGn','30kLiweD'];a42_0x2c65=function(){return _0x16eda7;};return a42_0x2c65();}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
+ const a43_0x421f6b=a43_0x50ef;(function(_0x24dc97,_0x45371f){const _0x581754=a43_0x50ef,_0x2f8390=_0x24dc97();while(!![]){try{const _0x1b7b74=parseInt(_0x581754(0x145))/0x1+-parseInt(_0x581754(0x14e))/0x2+parseInt(_0x581754(0x153))/0x3*(parseInt(_0x581754(0x150))/0x4)+parseInt(_0x581754(0x149))/0x5*(-parseInt(_0x581754(0x14a))/0x6)+-parseInt(_0x581754(0x148))/0x7*(-parseInt(_0x581754(0x14d))/0x8)+parseInt(_0x581754(0x143))/0x9+-parseInt(_0x581754(0x152))/0xa;if(_0x1b7b74===_0x45371f)break;else _0x2f8390['push'](_0x2f8390['shift']());}catch(_0x2cef16){_0x2f8390['push'](_0x2f8390['shift']());}}}(a43_0x5a58,0x6201d));import{readScopedConfig}from'../../commands/config/shared.js';function a43_0x50ef(_0x26445c,_0x12dcf1){_0x26445c=_0x26445c-0x143;const _0x5a5859=a43_0x5a58();let _0x50ef13=_0x5a5859[_0x26445c];return _0x50ef13;}function a43_0x5a58(){const _0x139357=['global','7114290ZELSxq','1325631eWlalI','4282452ASVlYS','list','41905CqoXwf','boolean','read','7mSWsnm','5IxMpsg','487644OPOivf','bool','Show\x20global\x20config\x20only\x20(~/.rabetbase.json)','5460096TODhpw','895964aBgVpx','config','4ZOxwcB'];a43_0x5a58=function(){return _0x139357;};return a43_0x5a58();}import{readConfig}from'../../utils/config.js';async function execute(_0x43d411){const _0x212886=a43_0x50ef,_0x2a6da2=_0x43d411[_0x212886(0x14b)](_0x212886(0x151))?readScopedConfig(_0x212886(0x151)):readConfig();return{'ok':!![],'data':_0x2a6da2};}export const configListDefinition={'service':a43_0x421f6b(0x14f),'command':a43_0x421f6b(0x144),'description':'List\x20all\x20config\x20values','risk':a43_0x421f6b(0x147),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a43_0x421f6b(0x151),'type':a43_0x421f6b(0x146),'description':a43_0x421f6b(0x14c),'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
+ const a44_0x257f67=a44_0xe806;(function(_0x187e3b,_0x58e649){const _0x10eb64=a44_0xe806,_0x4a9592=_0x187e3b();while(!![]){try{const _0x4ee429=-parseInt(_0x10eb64(0x1ba))/0x1*(-parseInt(_0x10eb64(0x1c0))/0x2)+-parseInt(_0x10eb64(0x1e3))/0x3+parseInt(_0x10eb64(0x1c8))/0x4+parseInt(_0x10eb64(0x1c9))/0x5*(parseInt(_0x10eb64(0x1c5))/0x6)+parseInt(_0x10eb64(0x1dc))/0x7+parseInt(_0x10eb64(0x1c2))/0x8*(-parseInt(_0x10eb64(0x1d4))/0x9)+parseInt(_0x10eb64(0x1ec))/0xa*(-parseInt(_0x10eb64(0x1c6))/0xb);if(_0x4ee429===_0x58e649)break;else _0x4a9592['push'](_0x4a9592['shift']());}catch(_0x3f9092){_0x4a9592['push'](_0x4a9592['shift']());}}}(a44_0x1f48,0xab73b));import{CliErrors}from'../../errors.js';function a44_0xe806(_0x32fc24,_0x11f614){_0x32fc24=_0x32fc24-0x1ba;const _0x1f48fa=a44_0x1f48();let _0xe80623=_0x1f48fa[_0x32fc24];return _0xe80623;}import{buildCanonicalProjectConfig}from'../../config/schema.js';import{CLI_BIN_NAME,CONFIG_ENUM_VALUES,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,normalizeLocale,resolveWriteScope,readScopedConfig,writeScopedConfig}from'../../commands/config/shared.js';function a44_0x1f48(){const _0x5b70cd=['Top-level\x20key\x20\x22','apps','40KXSKVB','Write\x20to\x20global\x20config\x20(~/.rabetbase.json)','Supported:\x20zh,\x20en,\x20zh-CN,\x20en-US','20030dNsCsF','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','\x20app\x20add\x20<name>\x20--appcode\x20','key','Settable\x20top-level\x20keys:\x20','str','8pgOkIS','Set\x20a\x20config\x20value','247592UxXwIt','appcode','bool','180yQuuck','4340127XdreVO','includes','5508668lfMzbZ','144805IkafNS','env','\x22.\x20Allowed:\x20','Invalid\x20value\x20for\x20env.\x20Allowed:\x20production,\x20daily.','boolean','validation','\x20config\x20set\x20--key\x20<key>\x20--value\x20<value>','keys','Global','config','\x20set\x20to:\x20','90AJiedy','string','length','value','Missing\x20key.','Config\x20value','Use\x20`','locale','8671096hbmgsQ','\x22\x20is\x20not\x20settable.','Legacy\x20alias\x20\x22online\x22\x20is\x20accepted\x20and\x20stored\x20as\x20production.','Cannot\x20set\x20top-level\x20\x22appcode\x22\x20when\x20multi-app\x20config\x20already\x20exists.','Project','Config\x20value\x20is\x20invalid\x20or\x20too\x20long.','app','2924580Wnjnpr','Invalid\x20value\x20for\x20\x22','global','Usage:\x20','write','set','\x20app\x20use\x20<name>`,\x20or\x20pass\x20`--appcode`\x20on\x20the\x20command.'];a44_0x1f48=function(){return _0x5b70cd;};return a44_0x1f48();}import{normalizeEnv,isProduction,isDaily}from'../../constant/env.js';async function execute(_0x21c0cc){const _0x5c6dc3=a44_0xe806,_0xb78348=_0x21c0cc['str'](_0x5c6dc3(0x1bd)),_0x3021b7=_0x21c0cc[_0x5c6dc3(0x1bf)](_0x5c6dc3(0x1d7));if(!_0xb78348)throw CliErrors[_0x5c6dc3(0x1ce)](_0x5c6dc3(0x1d8),_0x5c6dc3(0x1e6)+CLI_BIN_NAME+_0x5c6dc3(0x1cf));if(_0x3021b7===undefined||_0x3021b7==='')throw CliErrors[_0x5c6dc3(0x1ce)]('Missing\x20value.',_0x5c6dc3(0x1e6)+CLI_BIN_NAME+_0x5c6dc3(0x1cf));if(_0x3021b7[_0x5c6dc3(0x1d6)]>0x1f4)throw CliErrors['validation'](_0x5c6dc3(0x1e1));if(!isTopLevelConfigKey(_0xb78348))throw CliErrors[_0x5c6dc3(0x1ce)](_0x5c6dc3(0x1ea)+_0xb78348+_0x5c6dc3(0x1dd),_0x5c6dc3(0x1be)+getTopLevelConfigKeySummary());if(_0xb78348==='riskLevel')throw CliErrors[_0x5c6dc3(0x1ce)](_0x5c6dc3(0x1bb));if(CONFIG_ENUM_VALUES[_0xb78348]&&!CONFIG_ENUM_VALUES[_0xb78348][_0x5c6dc3(0x1c7)](_0x3021b7))throw CliErrors[_0x5c6dc3(0x1ce)](_0x5c6dc3(0x1e4)+_0xb78348+_0x5c6dc3(0x1cb)+CONFIG_ENUM_VALUES[_0xb78348]['join'](',\x20'));if(_0xb78348===_0x5c6dc3(0x1db)&&!normalizeLocale(_0x3021b7))throw CliErrors[_0x5c6dc3(0x1ce)]('Invalid\x20locale\x20value.',_0x5c6dc3(0x1ee));const _0x5279c1={'global':_0x21c0cc[_0x5c6dc3(0x1c4)](_0x5c6dc3(0x1e5))},_0x407824=resolveWriteScope(_0x5279c1),_0x4a9b4a=readScopedConfig(_0x407824);let _0x1202c4=_0xb78348,_0x1c88c5=_0x3021b7;_0xb78348===_0x5c6dc3(0x1e2)&&(_0x1202c4=_0x5c6dc3(0x1c3),delete _0x4a9b4a[_0x5c6dc3(0x1e2)]);_0xb78348==='locale'&&(_0x1c88c5=normalizeLocale(_0x3021b7));if(_0xb78348===_0x5c6dc3(0x1ca)){_0x1c88c5=normalizeEnv(_0x3021b7);if(!isProduction(_0x1c88c5)&&!isDaily(_0x1c88c5))throw CliErrors[_0x5c6dc3(0x1ce)](_0x5c6dc3(0x1cc),_0x5c6dc3(0x1de));}if(_0xb78348===_0x5c6dc3(0x1c3)){const _0x108308=_0x4a9b4a[_0x5c6dc3(0x1eb)]&&typeof _0x4a9b4a[_0x5c6dc3(0x1eb)]==='object'?Object[_0x5c6dc3(0x1d0)](_0x4a9b4a[_0x5c6dc3(0x1eb)]):[];if(_0x108308[_0x5c6dc3(0x1d6)]>0x0)throw CliErrors['validation'](_0x5c6dc3(0x1df),_0x5c6dc3(0x1da)+CLI_BIN_NAME+_0x5c6dc3(0x1bc)+_0x1c88c5+'`,\x20`'+CLI_BIN_NAME+_0x5c6dc3(0x1e9));const _0x1bfe63=buildCanonicalProjectConfig({..._0x4a9b4a},{'appCodes':[_0x1c88c5],'env':typeof _0x4a9b4a[_0x5c6dc3(0x1ca)]==='string'?_0x4a9b4a[_0x5c6dc3(0x1ca)]:undefined});writeScopedConfig(_0x1bfe63,_0x407824);const _0x387f45=_0x407824==='global'?_0x5c6dc3(0x1d1):_0x5c6dc3(0x1e0);return{'ok':!![],'message':'✓\x20'+_0x387f45+'\x20appcode\x20set\x20to:\x20'+_0x1c88c5+'\x20(stored\x20as\x20apps\x20+\x20defaultApp)'};}_0x4a9b4a[_0x1202c4]=_0x1c88c5,writeScopedConfig(_0x4a9b4a,_0x407824);const _0x5b8d84=_0x407824===_0x5c6dc3(0x1e5)?'Global':'Project';return{'ok':!![],'message':'✓\x20'+_0x5b8d84+'\x20'+_0x1202c4+_0x5c6dc3(0x1d3)+_0x1c88c5};}export const configSetDefinition={'service':a44_0x257f67(0x1d2),'command':a44_0x257f67(0x1e8),'description':a44_0x257f67(0x1c1),'risk':a44_0x257f67(0x1e7),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a44_0x257f67(0x1bd),'type':a44_0x257f67(0x1d5),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a44_0x257f67(0x1d7),'type':a44_0x257f67(0x1d5),'description':a44_0x257f67(0x1d9),'required':!![]},{'name':a44_0x257f67(0x1e5),'type':a44_0x257f67(0x1cd),'description':a44_0x257f67(0x1ed),'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 a45_0xa9b8(){var _0x15c5f5=['507820zLYZKO','validation','4126PjJCnf','373260RuSjeK','8470YwZGQv','\x20init`\x20first.','global','Add\x20--global\x20to\x20write\x20to\x20~/.rabetbase.json,\x20or\x20run\x20`','855biKeJb','49RWiRzw','476qRJCqJ','345816RWcJDN','project','Not\x20inside\x20a\x20project\x20(no\x20.rabetbase.json\x20found).','534KumkSx','309472GxlWOc'];a45_0xa9b8=function(){return _0x15c5f5;};return a45_0xa9b8();}(function(_0xa2a791,_0x3f5e78){var _0x5be35e=a45_0x3622,_0x23d165=_0xa2a791();while(!![]){try{var _0x3d26ec=parseInt(_0x5be35e(0x122))/0x1*(-parseInt(_0x5be35e(0x11b))/0x2)+parseInt(_0x5be35e(0x11c))/0x3+parseInt(_0x5be35e(0x123))/0x4*(parseInt(_0x5be35e(0x121))/0x5)+parseInt(_0x5be35e(0x117))/0x6*(parseInt(_0x5be35e(0x11d))/0x7)+parseInt(_0x5be35e(0x118))/0x8+-parseInt(_0x5be35e(0x124))/0x9+-parseInt(_0x5be35e(0x119))/0xa;if(_0x3d26ec===_0x3f5e78)break;else _0x23d165['push'](_0x23d165['shift']());}catch(_0x344f3f){_0x23d165['push'](_0x23d165['shift']());}}}(a45_0xa9b8,0x189f2));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isInProject,resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../../context.js';import{CliErrors}from'../../errors.js';function a45_0x3622(_0xf77ec2,_0x51dee7){_0xf77ec2=_0xf77ec2-0x117;var _0xa9b8f=a45_0xa9b8();var _0x362215=_0xa9b8f[_0xf77ec2];return _0x362215;}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(_0x2753e1){var _0x341da4=a45_0x3622;if(_0x2753e1['global'])return _0x341da4(0x11f);if(!isInProject())throw CliErrors[_0x341da4(0x11a)](_0x341da4(0x126),_0x341da4(0x120)+CLI_BIN_NAME+_0x341da4(0x11e));return _0x341da4(0x125);}export function readScopedConfig(_0x338868){return readConfigFile(resolveWriteConfigPath(_0x338868));}export function writeScopedConfig(_0x489433,_0x2b4142){writeConfigFile(resolveWriteConfigPath(_0x2b4142),_0x489433);}
@@ -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
+ const a46_0x55bb91=a46_0x4897;function a46_0x4897(_0xadcaf3,_0x58bda8){_0xadcaf3=_0xadcaf3-0x19a;const _0x179b8a=a46_0x179b();let _0x489744=_0x179b8a[_0xadcaf3];return _0x489744;}function a46_0x179b(){const _0x2d4e2e=['join','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','16YLLtVa','3vHIKcF','11806rhMoGD','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page','170vmPxjX','2009416yzoUOo','1370901yfESYy','131MHayTm','2505990UcgEYv','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions','22WCqxdV','165330RciBrG','5868564SecbYu','\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]','700875KyWAsj','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Filter\x20dataset\x20records\x20with\x20query\x20conditions'];a46_0x179b=function(){return _0x2d4e2e;};return a46_0x179b();}(function(_0x251eaf,_0x5ce5cb){const _0x27bf5f=a46_0x4897,_0x128335=_0x251eaf();while(!![]){try{const _0xafba14=-parseInt(_0x27bf5f(0x19c))/0x1*(-parseInt(_0x27bf5f(0x1aa))/0x2)+-parseInt(_0x27bf5f(0x1a9))/0x3*(parseInt(_0x27bf5f(0x19a))/0x4)+parseInt(_0x27bf5f(0x19d))/0x5+parseInt(_0x27bf5f(0x1a0))/0x6+parseInt(_0x27bf5f(0x19b))/0x7*(-parseInt(_0x27bf5f(0x1a8))/0x8)+parseInt(_0x27bf5f(0x1a3))/0x9*(parseInt(_0x27bf5f(0x1ac))/0xa)+parseInt(_0x27bf5f(0x19f))/0xb*(-parseInt(_0x27bf5f(0x1a1))/0xc);if(_0xafba14===_0x5ce5cb)break;else _0x128335['push'](_0x128335['shift']());}catch(_0x2cc625){_0x128335['push'](_0x128335['shift']());}}}(a46_0x179b,0xb807b));import{buildDataCommand}from'../../commands/data/shared.js';export const dataFilter=buildDataCommand({'command':'filter','operation':'filter','description':a46_0x55bb91(0x1a5),'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_0x55bb91(0x1a4),a46_0x55bb91(0x19e),a46_0x55bb91(0x1a2),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]',a46_0x55bb91(0x1a7),a46_0x55bb91(0x1ab)][a46_0x55bb91(0x1a6)]('\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
+ function a47_0x5201(){const _0x588a0c=['getOne','372zGViaD','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','88275wHdNcM','16cSczje','550ioZpSA','Get\x20a\x20single\x20record\x20by\x20ID','6sjQOSb','67620HiBGeX','313832jzKmFK','3095wlMAAr','1219347CbhxlO','2230060yEROkS','827034BoYdQH'];a47_0x5201=function(){return _0x588a0c;};return a47_0x5201();}const a47_0x1abc9d=a47_0x53b4;(function(_0x1b2c1d,_0x3afaef){const _0x4c5740=a47_0x53b4,_0x39a710=_0x1b2c1d();while(!![]){try{const _0x22370e=parseInt(_0x4c5740(0xe7))/0x1+-parseInt(_0x4c5740(0xf4))/0x2+-parseInt(_0x4c5740(0xeb))/0x3+-parseInt(_0x4c5740(0xed))/0x4*(-parseInt(_0x4c5740(0xe8))/0x5)+-parseInt(_0x4c5740(0xf3))/0x6*(-parseInt(_0x4c5740(0xea))/0x7)+-parseInt(_0x4c5740(0xf0))/0x8*(-parseInt(_0x4c5740(0xe9))/0x9)+-parseInt(_0x4c5740(0xf1))/0xa*(parseInt(_0x4c5740(0xef))/0xb);if(_0x22370e===_0x3afaef)break;else _0x39a710['push'](_0x39a710['shift']());}catch(_0x29d358){_0x39a710['push'](_0x39a710['shift']());}}}(a47_0x5201,0x334a2));function a47_0x53b4(_0x18ae19,_0x2b7b54){_0x18ae19=_0x18ae19-0xe7;const _0x520171=a47_0x5201();let _0x53b436=_0x520171[_0x18ae19];return _0x53b436;}import{buildDataCommand}from'../../commands/data/shared.js';export const dataGetOne=buildDataCommand({'command':'getOne','operation':a47_0x1abc9d(0xec),'description':a47_0x1abc9d(0xf2),'paramsRequired':!![],'paramsHint':a47_0x1abc9d(0xee)});
@@ -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(_0x3de19e,_0x1ee2cd){const _0x29d018=a48_0x6102,_0x44315c=_0x3de19e();while(!![]){try{const _0x2c7cbe=parseInt(_0x29d018(0x12a))/0x1*(-parseInt(_0x29d018(0x12c))/0x2)+parseInt(_0x29d018(0x12b))/0x3+-parseInt(_0x29d018(0x128))/0x4*(-parseInt(_0x29d018(0x126))/0x5)+-parseInt(_0x29d018(0x129))/0x6*(-parseInt(_0x29d018(0x12d))/0x7)+parseInt(_0x29d018(0x124))/0x8+-parseInt(_0x29d018(0x125))/0x9+-parseInt(_0x29d018(0x127))/0xa;if(_0x2c7cbe===_0x1ee2cd)break;else _0x44315c['push'](_0x44315c['shift']());}catch(_0x36eebf){_0x44315c['push'](_0x44315c['shift']());}}}(a48_0x42c7,0xac4e1));function a48_0x42c7(){const _0x40c64f=['10rYDXCn','2543580FKBwqM','208366NaPoCv','45311DvCLuS','5650896awKQlu','8118945mqTBoI','1055RWlfQi','10023730FkLikv','20504CRqnPY','942CPHMmG'];a48_0x42c7=function(){return _0x40c64f;};return a48_0x42c7();}import{dataFilter}from'../../commands/data/filter.js';import{dataGetOne}from'../../commands/data/getOne.js';function a48_0x6102(_0x5b7a46,_0x26eae9){_0x5b7a46=_0x5b7a46-0x124;const _0x42c7f7=a48_0x42c7();let _0x610210=_0x42c7f7[_0x5b7a46];return _0x610210;}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(_0x3c836c,_0x50bc37){const _0x48a26c=a49_0x145a,_0x4c63a8=_0x3c836c();while(!![]){try{const _0x4d9b24=-parseInt(_0x48a26c(0x13a))/0x1+-parseInt(_0x48a26c(0x122))/0x2+parseInt(_0x48a26c(0x129))/0x3*(parseInt(_0x48a26c(0x120))/0x4)+parseInt(_0x48a26c(0x137))/0x5+-parseInt(_0x48a26c(0x135))/0x6*(parseInt(_0x48a26c(0x132))/0x7)+parseInt(_0x48a26c(0x125))/0x8+parseInt(_0x48a26c(0x124))/0x9;if(_0x4d9b24===_0x50bc37)break;else _0x4c63a8['push'](_0x4c63a8['shift']());}catch(_0x3e74c0){_0x4c63a8['push'](_0x4c63a8['shift']());}}}(a49_0x3479,0xddf41));import{executeDatasetDataOperation}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a49_0x3479(){const _0x2835d2=['operation','24384627mBCNdo','7362336Lorkyr','compress','getOne','params','405477UjkYjn','code','validation','appCode','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','helpExtra','data\x20','\x20completed\x20in\x20','command','14KXnlnB','str','paramsRequired','5371608qTnduY','string','3575315HMXnLf','read','description','523962HMbIcD','data','paramsHint','now','8JfsReo','data\x20getOne\x20requires\x20\x22id\x22\x20in\x20--params','2782914PMjfCK'];a49_0x3479=function(){return _0x2835d2;};return a49_0x3479();}function a49_0x145a(_0x3c8007,_0x2d7058){_0x3c8007=_0x3c8007-0x11f;const _0x3479a1=a49_0x3479();let _0x145a2d=_0x3479a1[_0x3c8007];return _0x145a2d;}import{parseJsonParams}from'../../utils/params.js';function assertGetOneId(_0x2f3c46){const _0x593a79=a49_0x145a;if(!_0x2f3c46)throw CliErrors['flagMissing']('params','Provide\x20--params\x20\x27{\x22id\x22:123}\x27\x20for\x20data\x20getOne.');const _0x104a26=_0x2f3c46['id'];if(_0x104a26===undefined||_0x104a26===null||_0x104a26==='')throw CliErrors[_0x593a79(0x12b)](_0x593a79(0x121),_0x593a79(0x12d));}function parseCommandParams(_0xd807fc){return parseJsonParams(_0xd807fc)??{};}export function buildDataCommand(_0x25f511){const _0x11da48=a49_0x145a,_0x3639a5='Dataset\x20alias\x20defined\x20in\x20api.ts\x20(e.g.\x20order,\x20coupon).\x20Resolves\x20to\x20dataset\x20code\x20automatically';return{'service':_0x11da48(0x13b),'command':_0x25f511[_0x11da48(0x131)],'description':_0x25f511[_0x11da48(0x139)],'risk':_0x11da48(0x138),'defaultOutputFormat':_0x11da48(0x126),'helpExtra':_0x25f511[_0x11da48(0x12e)],'flags':[CODE_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'alias','type':_0x11da48(0x136),'description':_0x3639a5},{'name':_0x11da48(0x128),'type':_0x11da48(0x136),'description':_0x25f511[_0x11da48(0x13c)]}],async 'validate'(_0x1c6ab0){const _0x324d46=_0x11da48,_0x54cada=_0x1c6ab0[_0x324d46(0x133)](_0x324d46(0x128));if(_0x25f511[_0x324d46(0x134)]&&!_0x54cada)throw CliErrors['flagMissing'](_0x324d46(0x128),_0x25f511[_0x324d46(0x13c)]);const _0x1bd4bc=parseJsonParams(_0x54cada);_0x25f511[_0x324d46(0x123)]===_0x324d46(0x127)&&assertGetOneId(_0x1bd4bc);},async 'execute'(_0x5463b9){const _0x353097=_0x11da48,_0x11f3c3=parseCommandParams(_0x5463b9[_0x353097(0x133)](_0x353097(0x128))),_0x500472=Date['now'](),_0x50a97f=await executeDatasetDataOperation(_0x5463b9[_0x353097(0x12c)],_0x5463b9[_0x353097(0x133)](_0x353097(0x12a)),_0x25f511[_0x353097(0x123)],_0x11f3c3),_0x340917=Date[_0x353097(0x11f)]()-_0x500472;return{'ok':!![],'data':{'result':_0x50a97f,'elapsed':_0x340917},'message':_0x353097(0x12f)+_0x25f511[_0x353097(0x131)]+_0x353097(0x130)+_0x340917+'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_0x5e75ea=a50_0x7952;(function(_0x1faafa,_0x17ee6d){const _0x3df049=a50_0x7952,_0x4f0ad0=_0x1faafa();while(!![]){try{const _0x440bb6=-parseInt(_0x3df049(0x129))/0x1*(-parseInt(_0x3df049(0x121))/0x2)+-parseInt(_0x3df049(0x11a))/0x3*(-parseInt(_0x3df049(0x10e))/0x4)+-parseInt(_0x3df049(0x113))/0x5+parseInt(_0x3df049(0x111))/0x6*(-parseInt(_0x3df049(0x11f))/0x7)+parseInt(_0x3df049(0x120))/0x8*(parseInt(_0x3df049(0x12a))/0x9)+parseInt(_0x3df049(0x124))/0xa*(-parseInt(_0x3df049(0x127))/0xb)+-parseInt(_0x3df049(0x123))/0xc;if(_0x440bb6===_0x17ee6d)break;else _0x4f0ad0['push'](_0x4f0ad0['shift']());}catch(_0x1a3ffd){_0x4f0ad0['push'](_0x4f0ad0['shift']());}}}(a50_0x1cdf,0x54c39));import{CliErrors}from'../../errors.js';export const RUNTIME_DATA_ACCESS_COMMANDS={'cli':a50_0x5e75ea(0x118),'filter':a50_0x5e75ea(0x122),'getOne':a50_0x5e75ea(0x12b)};export const RUNTIME_DATA_ACCESS_SUMMARY=a50_0x5e75ea(0x11c);function valueToString(_0x2a9fcc){return _0x2a9fcc==null?'':String(_0x2a9fcc)['trim']();}function getDatasetCode(_0x29f663){const _0x14e54c=a50_0x5e75ea;return valueToString(_0x29f663['code']??_0x29f663['modelCode']??_0x29f663[_0x14e54c(0x116)]?.[_0x14e54c(0x119)]);}function getDatasetName(_0x3eb8df){const _0x59232a=a50_0x5e75ea;return valueToString(_0x3eb8df[_0x59232a(0x117)]??_0x3eb8df['dataset']?.[_0x59232a(0x112)])||_0x59232a(0x11b);}function a50_0x7952(_0x5c2b62,_0x38986f){_0x5c2b62=_0x5c2b62-0x10e;const _0x1cdf04=a50_0x1cdf();let _0x79527e=_0x1cdf04[_0x5c2b62];return _0x79527e;}function getDatasetSource(_0x13c55a){const _0x3e20c5=a50_0x5e75ea;return valueToString(_0x13c55a[_0x3e20c5(0x125)]??_0x13c55a['dataset']?.['sourceType'])[_0x3e20c5(0x12d)]();}function getDbtableConfig(_0x18ed12){const _0x56abcb=a50_0x5e75ea,_0x5288b6=_0x18ed12[_0x56abcb(0x11e)]??_0x18ed12['dbtable'];return _0x5288b6&&typeof _0x5288b6===_0x56abcb(0x10f)?_0x5288b6:{};}function a50_0x1cdf(){const _0x14fdcc=['tableName','dataset','name','lovrabet','datasetCode','69xQvNLz','unknown','Use\x20lovrabet\x20data\x20filter/getOne\x20for\x20real\x20runtime\x20records.','dbId','dbtableConfig','7OlYEzO','2289992aeckpc','2LrBmQZ','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27\x20--format\x20compress','4420692qcjCYc','10yZKisv','source','validation','3264283gtbKLz','filter','435885HnpPOO','18zKKbKK','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27\x20--format\x20compress','原因:该类研发态资产需要\x20DB\x20table、dbId、tableName\x20与数据库连接上下文,并深度依赖\x20SQL\x20执行链路。','toUpperCase','getOne','UNKNOWN','113172GxcEdf','object','\x20是\x20','1800540ANAZmM','datasetName','1733475HuGqwr','join'];a50_0x1cdf=function(){return _0x14fdcc;};return a50_0x1cdf();}export function isDbBackedDataset(_0x3e1130){const _0x32785d=a50_0x5e75ea,_0x5b5681=getDatasetSource(_0x3e1130);if(_0x5b5681==='METADATA')return![];const _0x1396a8=getDbtableConfig(_0x3e1130),_0x5e658f=_0x1396a8[_0x32785d(0x11d)]??_0x1396a8['id'],_0x350f91=valueToString(_0x1396a8[_0x32785d(0x115)]??_0x3e1130[_0x32785d(0x115)]??_0x3e1130['dataset']?.[_0x32785d(0x115)]);return _0x5e658f!==undefined&&_0x5e658f!==null&&_0x350f91['length']>0x0;}export function filterDbBackedDatasets(_0x2310b9){const _0x51334a=a50_0x5e75ea;return _0x2310b9[_0x51334a(0x128)](_0x3ea10a=>isDbBackedDataset(_0x3ea10a));}export function buildDbTableUpgradeMessage(_0x5e758c,_0x565bd6='BFF\x20/\x20SQL\x20等研发态资产'){const _0x48a02c=a50_0x5e75ea,_0x115938=getDatasetSource(_0x5e758c)||_0x48a02c(0x12f),_0x38a73a=getDatasetName(_0x5e758c),_0x13ad4c=getDatasetCode(_0x5e758c),_0x4a9b0c=_0x13ad4c?'\x20('+_0x13ad4c+')':'';return['当前数据集\x20\x22'+_0x38a73a+'\x22'+_0x4a9b0c+_0x48a02c(0x110)+_0x115938+'\x20类型,不适合作为\x20'+_0x565bd6+'\x20的数据源。',_0x48a02c(0x12c),'请先将该数据集升级/迁移为\x20DB\x20table\x20数据集,再基于新的\x20dataset\x20code\x20继续开发。','如果只是查看运行态真实行数据,请切换到\x20lovrabet\x20CLI:'+RUNTIME_DATA_ACCESS_COMMANDS[_0x48a02c(0x128)]+';'+RUNTIME_DATA_ACCESS_COMMANDS[_0x48a02c(0x12e)]+'。'][_0x48a02c(0x114)]('\x20');}export function assertDatasetSupportsLocalDevelopment(_0x197136,_0x2a7f6d){const _0x14cc11=a50_0x5e75ea;if(!isDbBackedDataset(_0x197136))throw CliErrors[_0x14cc11(0x126)](buildDbTableUpgradeMessage(_0x197136,_0x2a7f6d));}