@lovrabet/rabetbase-cli 2.0.13 → 2.1.1-beta.0
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.
- package/README.md +2 -2
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/new.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -0
- package/lib/commands/db/analyze-start.js +1 -0
- package/lib/commands/db/analyze-status.js +1 -0
- package/lib/commands/db/create.js +1 -0
- package/lib/commands/db/delete.js +1 -0
- package/lib/commands/db/detail.js +1 -0
- package/lib/commands/db/diff.js +1 -0
- package/lib/commands/db/index.js +1 -0
- package/lib/commands/db/list.js +1 -0
- package/lib/commands/db/shared.js +1 -0
- package/lib/commands/db/tables.js +1 -0
- package/lib/commands/db/test.js +1 -0
- package/lib/commands/db/update.js +1 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -0
- package/package.json +1 -1
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46811e,_0x550a8a){var _0xa67bd0=a121_0xb27b,_0x23bab0=_0x46811e();while(!![]){try{var _0xfcc2d7=parseInt(_0xa67bd0(0x12d))/0x1+-parseInt(_0xa67bd0(0x12e))/0x2+-parseInt(_0xa67bd0(0x131))/0x3+-parseInt(_0xa67bd0(0x12a))/0x4+parseInt(_0xa67bd0(0x129))/0x5*(parseInt(_0xa67bd0(0x12b))/0x6)+-parseInt(_0xa67bd0(0x12c))/0x7*(parseInt(_0xa67bd0(0x12f))/0x8)+-parseInt(_0xa67bd0(0x130))/0x9*(-parseInt(_0xa67bd0(0x128))/0xa);if(_0xfcc2d7===_0x550a8a)break;else _0x23bab0['push'](_0x23bab0['shift']());}catch(_0x29382f){_0x23bab0['push'](_0x23bab0['shift']());}}}(a121_0x3fc0,0x9a3bd));function a121_0x3fc0(){var _0x4fec89=['3392367MNwOwa','200810rCCkvB','270imDVwi','4036920aLjBzy','86706DapkMR','4102PuzWrY','768162REOZQV','1507998ruvsgQ','17144TDuwYL','1449HhhuxW'];a121_0x3fc0=function(){return _0x4fec89;};return a121_0x3fc0();}export{runCommand}from'../framework/runner.js';function a121_0xb27b(_0x7fcdef,_0x51010c){_0x7fcdef=_0x7fcdef-0x128;var _0x3fc09e=a121_0x3fc0();var _0xb27bcf=_0x3fc09e[_0x7fcdef];return _0xb27bcf;}export{parseFlags,validateFlags}from'../framework/flags.js';export{formatOutput}from'../framework/output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'../framework/help.js';export{extractList,extractPaging}from'../framework/response.js';export{riskLevelOrder}from'../framework/types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a122_0x3105(_0x3c3ff8,_0x1930b6){_0x3c3ff8=_0x3c3ff8-0x17b;const _0x2f7b13=a122_0x2f7b();let _0x310572=_0x2f7b13[_0x3c3ff8];return _0x310572;}(function(_0x5cca0d,_0x483b8b){const _0x32c6ab=a122_0x3105,_0x52d50b=_0x5cca0d();while(!![]){try{const _0x33cd5e=-parseInt(_0x32c6ab(0x18c))/0x1*(parseInt(_0x32c6ab(0x18a))/0x2)+parseInt(_0x32c6ab(0x1a6))/0x3+parseInt(_0x32c6ab(0x198))/0x4+parseInt(_0x32c6ab(0x184))/0x5+-parseInt(_0x32c6ab(0x1a4))/0x6*(-parseInt(_0x32c6ab(0x195))/0x7)+parseInt(_0x32c6ab(0x190))/0x8*(-parseInt(_0x32c6ab(0x1ab))/0x9)+parseInt(_0x32c6ab(0x194))/0xa;if(_0x33cd5e===_0x483b8b)break;else _0x52d50b['push'](_0x52d50b['shift']());}catch(_0xb81695){_0x52d50b['push'](_0x52d50b['shift']());}}}(a122_0x2f7b,0x1c205));import{applyJqFilter}from'../utils/apply-jq-filter.js';export function formatOutput(_0x294861,_0xe6a2da){const _0x20f786=a122_0x3105,{format:_0x30614e}=_0xe6a2da;switch(_0x30614e){case'json':printJson(_0x294861,_0xe6a2da);break;case'compress':printCompress(_0x294861,_0xe6a2da);break;case _0x20f786(0x1a7):default:printPretty(_0x294861,_0xe6a2da);break;}}function buildEnvelope(_0x4ab28b,_0x2efda6){const _0x435ea3=a122_0x3105,_0x570854={'ok':_0x4ab28b['ok'],'command':_0x2efda6[_0x435ea3(0x19e)],'risk':_0x2efda6[_0x435ea3(0x18d)]};if(_0x2efda6['dryRun'])_0x570854[_0x435ea3(0x17e)]=!![];if(_0x4ab28b[_0x435ea3(0x19d)]!==undefined)_0x570854[_0x435ea3(0x19d)]=_0x4ab28b[_0x435ea3(0x19d)];return!_0x4ab28b['ok']&&_0x4ab28b[_0x435ea3(0x180)]&&(_0x570854[_0x435ea3(0x17d)]={'code':_0x435ea3(0x192),'message':_0x4ab28b[_0x435ea3(0x180)]}),_0x570854;}function printJson(_0x1d409f,_0xa71f97){const _0x36e452=buildEnvelope(_0x1d409f,_0xa71f97),_0x3fbde9=JSON['stringify'](_0x36e452,null,0x2)+'\x0a';writeJsonWithOptionalJq(_0x3fbde9,_0xa71f97);}function a122_0x2f7b(){const _0x49be82=['error','dryRun','trim','message','\x20\x20Config:\x20\x20\x20','items','write','70980byxavL','map','stdout','project','meta','isArray','207722qSZpyT','Error:\x20','1LftTQQ','risk','object','(empty)','8PTCkoN','jqFilter','command_error','log','1467680EgkSZj','777bfWBkO','projectPath','stringify','387704yfVTJa','\x20(default\x20from\x20global\x20file)','\x20\x20Scope:\x20\x20\x20\x20','padEnd','scope','data','command','defaultApp','endsWith','keys','Found\x20','configPath','678lgRVGJ','filter','506040dWmJxK','pretty','length','\x20\x20Default\x20app:\x20\x20\x20\x20\x20','entries','1980423iNcszL','\x20(default\x20from\x20project\x20file)','max','(none)'];a122_0x2f7b=function(){return _0x49be82;};return a122_0x2f7b();}function printCompress(_0x404305,_0x4de794){const _0xd47ad0=buildEnvelope(_0x404305,_0x4de794),_0x47c174=JSON['stringify'](_0xd47ad0)+'\x0a';writeJsonWithOptionalJq(_0x47c174,_0x4de794);}function writeJsonWithOptionalJq(_0x5628d9,_0x5c42f2){const _0x141fb1=a122_0x3105,_0x4395b7=_0x5c42f2[_0x141fb1(0x191)]?.[_0x141fb1(0x17f)]();if(!_0x4395b7){process[_0x141fb1(0x186)]['write'](_0x5628d9);return;}const _0x1bb7b6=applyJqFilter(_0x5628d9,_0x4395b7);process[_0x141fb1(0x186)][_0x141fb1(0x183)](_0x1bb7b6[_0x141fb1(0x1a0)]('\x0a')?_0x1bb7b6:_0x1bb7b6+'\x0a');}function isListWithMetaData(_0x3cfe0d){const _0x2109f9=a122_0x3105;return typeof _0x3cfe0d==='object'&&_0x3cfe0d!==null&&_0x2109f9(0x182)in _0x3cfe0d&&Array[_0x2109f9(0x189)](_0x3cfe0d['items'])&&_0x2109f9(0x188)in _0x3cfe0d&&typeof _0x3cfe0d[_0x2109f9(0x188)]===_0x2109f9(0x18e)&&_0x3cfe0d['meta']!==null;}function printAppListMeta(_0x163426){const _0x59e54=a122_0x3105;if(_0x163426[_0x59e54(0x19c)]){const _0x118113=_0x163426[_0x59e54(0x1a3)]!=null?String(_0x163426[_0x59e54(0x1a3)]):'(none)';console[_0x59e54(0x193)](_0x59e54(0x19a)+String(_0x163426[_0x59e54(0x19c)])),console[_0x59e54(0x193)](_0x59e54(0x181)+_0x118113),console['log']();return;}const _0x421314=_0x163426['globalPath']!=null?String(_0x163426['globalPath']):_0x59e54(0x17c),_0x7bddf8=_0x163426[_0x59e54(0x196)]!=null?String(_0x163426[_0x59e54(0x196)]):_0x59e54(0x17c),_0x230bec=_0x163426[_0x59e54(0x19f)]!=null?String(_0x163426['defaultApp']):_0x59e54(0x17c),_0x46913d=_0x163426['defaultAppSource'],_0x3bccf3=_0x46913d===_0x59e54(0x187)?_0x59e54(0x1ac):_0x46913d==='global'?_0x59e54(0x199):'';console[_0x59e54(0x193)]('\x20\x20Global\x20config:\x20\x20\x20'+_0x421314),console['log']('\x20\x20Project\x20config:\x20\x20'+_0x7bddf8),console[_0x59e54(0x193)](_0x59e54(0x1a9)+_0x230bec+_0x3bccf3),console[_0x59e54(0x193)]();}function printPretty(_0x1e997e,_0xce6c72){const _0x4fd911=a122_0x3105;if(_0xce6c72[_0x4fd911(0x17e)]){console[_0x4fd911(0x193)]('[dry-run]\x20Would\x20execute:'),console[_0x4fd911(0x193)](JSON[_0x4fd911(0x197)](_0x1e997e[_0x4fd911(0x19d)],null,0x2));return;}if(!_0x1e997e['ok']){console[_0x4fd911(0x17d)](_0x4fd911(0x18b)+(_0x1e997e[_0x4fd911(0x180)]??'Unknown\x20error'));return;}const _0x2de108=_0x1e997e[_0x4fd911(0x19d)];if(_0x2de108===undefined||_0x2de108===null){if(_0x1e997e[_0x4fd911(0x180)])console[_0x4fd911(0x193)](_0x1e997e['message']);return;}if(isListWithMetaData(_0x2de108)){printAppListMeta(_0x2de108[_0x4fd911(0x188)]),printArrayPretty(_0x2de108[_0x4fd911(0x182)]);return;}if(Array[_0x4fd911(0x189)](_0x2de108)){printArrayPretty(_0x2de108);return;}if(typeof _0x2de108==='object'){printObjectPretty(_0x2de108);return;}console[_0x4fd911(0x193)](String(_0x2de108));}function printObjectPretty(_0x4eaaaa){const _0x4bfec9=a122_0x3105,_0x25c58d=Math[_0x4bfec9(0x17b)](...Object[_0x4bfec9(0x1a1)](_0x4eaaaa)[_0x4bfec9(0x185)](_0x5a8442=>_0x5a8442[_0x4bfec9(0x1a8)]),0x0);for(const [_0x57bee6,_0x44fe28]of Object[_0x4bfec9(0x1aa)](_0x4eaaaa)){if(_0x44fe28===undefined||_0x44fe28===null)continue;const _0x297a00=_0x57bee6[_0x4bfec9(0x19b)](_0x25c58d);typeof _0x44fe28===_0x4bfec9(0x18e)?console[_0x4bfec9(0x193)](_0x297a00+'\x20\x20'+JSON[_0x4bfec9(0x197)](_0x44fe28)):console[_0x4bfec9(0x193)](_0x297a00+'\x20\x20'+_0x44fe28);}}function printArrayPretty(_0x189526){const _0x31d341=a122_0x3105;if(_0x189526[_0x31d341(0x1a8)]===0x0){console[_0x31d341(0x193)](_0x31d341(0x18f));return;}console['log'](_0x31d341(0x1a2)+_0x189526[_0x31d341(0x1a8)]+'\x20items:\x0a');for(const _0x3d2326 of _0x189526){if(typeof _0x3d2326==='object'&&_0x3d2326!==null){const _0x58369f=Object[_0x31d341(0x1aa)](_0x3d2326)[_0x31d341(0x1a5)](([,_0x1563b0])=>_0x1563b0!=null&&_0x1563b0!=='');if(_0x58369f[_0x31d341(0x1a8)]===0x0)continue;const _0x19e605=Math[_0x31d341(0x17b)](..._0x58369f[_0x31d341(0x185)](([_0x40deb6])=>_0x40deb6[_0x31d341(0x1a8)]));for(const [_0x46f8d7,_0x5438ee]of _0x58369f){const _0x3d099d=typeof _0x5438ee===_0x31d341(0x18e)?JSON[_0x31d341(0x197)](_0x5438ee):String(_0x5438ee);console[_0x31d341(0x193)]('\x20\x20'+_0x46f8d7[_0x31d341(0x19b)](_0x19e605)+'\x20\x20'+_0x3d099d);}console[_0x31d341(0x193)]('');}else console['log']('\x20\x20'+_0x3d2326);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4bca52,_0x5f5864){var _0x348e38=a123_0x407d,_0x403ab2=_0x4bca52();while(!![]){try{var _0x1da214=parseInt(_0x348e38(0x129))/0x1+-parseInt(_0x348e38(0x12d))/0x2*(parseInt(_0x348e38(0x124))/0x3)+-parseInt(_0x348e38(0x127))/0x4+parseInt(_0x348e38(0x126))/0x5+-parseInt(_0x348e38(0x123))/0x6*(-parseInt(_0x348e38(0x12f))/0x7)+parseInt(_0x348e38(0x125))/0x8+-parseInt(_0x348e38(0x12c))/0x9*(parseInt(_0x348e38(0x12b))/0xa);if(_0x1da214===_0x5f5864)break;else _0x403ab2['push'](_0x403ab2['shift']());}catch(_0x5d5d01){_0x403ab2['push'](_0x403ab2['shift']());}}}(a123_0x578b,0x8ff64));function a123_0x407d(_0x200372,_0x4a8db4){_0x200372=_0x200372-0x123;var _0x578ba7=a123_0x578b();var _0x407de7=_0x578ba7[_0x200372];return _0x407de7;}export function extractList(_0x2910f3){var _0x993096=a123_0x407d;if(Array[_0x993096(0x12e)](_0x2910f3))return _0x2910f3;if(_0x2910f3&&typeof _0x2910f3===_0x993096(0x12a))return _0x2910f3[_0x993096(0x128)]??[];return[];}function a123_0x578b(){var _0x648c4=['tableData','779659aMVTtB','object','7330ZXCQfH','8235WzCxIy','14airsMa','isArray','7ClGeFG','4921758AvcgYG','186543UjPjsg','4350736hKIlId','1449635isSDcE','2952364GGfMPl'];a123_0x578b=function(){return _0x648c4;};return a123_0x578b();}export function extractPaging(_0x23517c){var _0x28835b=a123_0x407d;if(_0x23517c&&typeof _0x23517c===_0x28835b(0x12a)&&!Array[_0x28835b(0x12e)](_0x23517c))return _0x23517c['paging'];return undefined;}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a124_0x4553(){const _0x4c8e67=['name','some','execute','command','44ffxoip','code','pagesize','`\x20requires\x20either\x20--code\x20or\x20--alias.','Available\x20aliases:\x20','High-risk\x20operation\x20`','hasFormat','type','alias','flags','createInterface','3863850UTSUnm','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','length','Unknown\x20alias\x20\x22','24Lwptoo','334817tHUJeJ','625890sBOERW','pretty','Operation\x20cancelled\x20by\x20user.','yes','resolveAppCode','\x20\x20Edit\x20the\x20config\x20file\x20manually\x20and\x20set\x20riskLevel\x20to\x20\x22','--jq\x20only\x20applies\x20with\x20--format\x20json\x20or\x20--format\x20compress\x20(current:\x20','close','toLowerCase','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','args','stdin','format','1434624FsJrCZ','161810ewenoD','157956rZfBKM','dry-run','selectedAppName','5972uiLHnW','stderr','resolveCookie','riskLevel','apiDir','defaultFormat','\x22.\x20','dryRun','resolveApiDomain','cancelled','apiDomain','isNonInteractive','`\x20has\x20risk\x20level\x20\x22','.\x20Run\x20`','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','service','node:readline','json','number','94vcjlKM','Set\x20appcode\x20via\x20`','compress','12zkjIba','No\x20api.ts\x20found\x20in\x20','defaultPageSize','high-risk-write','\x20api\x20pull`\x20first.','string','appCode','\x0a\x20\x20\x20Continue?\x20[y/N]\x20','defaultOutputFormat','cookie','⚠\x20\x20High-risk\x20operation:\x20','54FEmevj','risk','Command\x20`','\x22.\x20visit\x20https://qizhiyuntu.feishu.cn/docx/JTiOdxQlXo2dQLxXVu6ctutcnme\x20for\x20more\x20information.','defaultVerbose','requiresAuth','rawFlags','validation'];a124_0x4553=function(){return _0x4c8e67;};return a124_0x4553();}(function(_0x198522,_0x4bfe5b){const _0x1e6653=a124_0x230f,_0x22f660=_0x198522();while(!![]){try{const _0x36084f=-parseInt(_0x1e6653(0x1de))/0x1*(-parseInt(_0x1e6653(0x1f1))/0x2)+parseInt(_0x1e6653(0x1db))/0x3*(-parseInt(_0x1e6653(0x1bb))/0x4)+parseInt(_0x1e6653(0x1c6))/0x5+-parseInt(_0x1e6653(0x1f4))/0x6*(-parseInt(_0x1e6653(0x1cb))/0x7)+parseInt(_0x1e6653(0x1d9))/0x8+-parseInt(_0x1e6653(0x1ff))/0x9*(parseInt(_0x1e6653(0x1cc))/0xa)+parseInt(_0x1e6653(0x1da))/0xb*(parseInt(_0x1e6653(0x1ca))/0xc);if(_0x36084f===_0x4bfe5b)break;else _0x22f660['push'](_0x22f660['shift']());}catch(_0xe5f600){_0x22f660['push'](_0x22f660['shift']());}}}(a124_0x4553,0x626d6));import{riskLevelOrder,normalizeLegacyOutputFormat}from'../framework/types.js';import{parseFlags,validateFlags}from'../framework/flags.js';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';function a124_0x230f(_0x1622d1,_0xd4ed9f){_0x1622d1=_0x1622d1-0x1b0;const _0x4553b6=a124_0x4553();let _0x230f4b=_0x4553b6[_0x1622d1];return _0x230f4b;}import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';export async function runCommand(_0x517917,_0x5ecae2){const _0x2cd54a=a124_0x230f,_0x35addc=CLI_BIN_NAME+'\x20'+_0x517917[_0x2cd54a(0x1ed)]+'\x20'+_0x517917[_0x2cd54a(0x1ba)],_0x2790d9=parseFlags(_0x517917[_0x2cd54a(0x1c4)],_0x5ecae2[_0x2cd54a(0x1b5)]);validateFlags(_0x517917[_0x2cd54a(0x1c4)],_0x2790d9,_0x35addc);if(!_0x2790d9[_0x2cd54a(0x1dc)]&&_0x5ecae2[_0x2cd54a(0x1e1)]&&riskLevelOrder(_0x517917[_0x2cd54a(0x1b0)])>riskLevelOrder(_0x5ecae2[_0x2cd54a(0x1e1)])){if(_0x5ecae2[_0x2cd54a(0x1e9)])throw CliErrors[_0x2cd54a(0x1b6)](_0x2cd54a(0x1b1)+_0x35addc+_0x2cd54a(0x1ea)+_0x517917[_0x2cd54a(0x1b0)]+_0x2cd54a(0x1d5)+_0x5ecae2[_0x2cd54a(0x1e1)]+'\x22.');throw CliErrors[_0x2cd54a(0x1b6)](_0x2cd54a(0x1b1)+_0x35addc+_0x2cd54a(0x1ea)+_0x517917[_0x2cd54a(0x1b0)]+_0x2cd54a(0x1d5)+_0x5ecae2[_0x2cd54a(0x1e1)]+'\x22.\x0a'+(_0x2cd54a(0x1d1)+_0x517917[_0x2cd54a(0x1b0)]+_0x2cd54a(0x1b2)));}const _0x5b1f44=_0x5ecae2[_0x2cd54a(0x1e2)]||DEFAULT_API_DIR;resolveAliasToCode(_0x517917,_0x2790d9,_0x5b1f44,_0x35addc);let _0x5cf4dc='';if(_0x517917[_0x2cd54a(0x1b4)]!==![]){_0x5cf4dc=_0x5ecae2[_0x2cd54a(0x1e0)]();if(!_0x5cf4dc)throw CliErrors['authRequired']();const {setActiveCookie:_0x21d453}=await import('../core/api-client.js');_0x21d453(_0x5cf4dc);}let _0x1f8db4='';if(_0x517917['requiresAppCode']!==![]){_0x1f8db4=_0x5ecae2[_0x2cd54a(0x1d0)]()??'';if(!_0x1f8db4)throw CliErrors['configMissing'](_0x2cd54a(0x1f2)+CLI_BIN_NAME+_0x2cd54a(0x1ec));}let _0x5ec0=resolveFormat(_0x2790d9,_0x517917,_0x5ecae2[_0x2cd54a(0x1e3)]);const _0x4a1ca5=resolveJqFilter(_0x2790d9);_0x4a1ca5&&_0x5ec0===_0x2cd54a(0x1cd)&&(_0x5ec0='json');if(_0x4a1ca5&&_0x5ec0!==_0x2cd54a(0x1ef)&&_0x5ec0!==_0x2cd54a(0x1f3))throw CliErrors[_0x2cd54a(0x1b6)](_0x2cd54a(0x1d2)+_0x5ec0+').');const _0xd02a1b=buildRuntimeContext({'appCode':_0x1f8db4,'cookie':_0x5cf4dc,'apiDomain':_0x5ecae2[_0x2cd54a(0x1e6)](),'format':_0x5ec0,'jqFilter':_0x4a1ca5,'flags':_0x2790d9,'def':_0x517917,'nonInteractive':_0x5ecae2[_0x2cd54a(0x1e9)],'defaultPageSize':_0x5ecae2[_0x2cd54a(0x1f6)],'defaultVerbose':_0x5ecae2['defaultVerbose'],'apiDir':_0x5b1f44,'selectedAppName':_0x5ecae2[_0x2cd54a(0x1dd)],'args':_0x5ecae2[_0x2cd54a(0x1d6)]??[]});_0x517917['validate']&&await _0x517917['validate'](_0xd02a1b);if(_0x2790d9[_0x2cd54a(0x1dc)]){if(!_0x517917[_0x2cd54a(0x1e5)])throw CliErrors[_0x2cd54a(0x1b6)]('--dry-run\x20is\x20not\x20supported\x20for\x20`'+_0x35addc+'`.');const _0x57e7ba=await _0x517917[_0x2cd54a(0x1e5)](_0xd02a1b);formatOutput({'ok':!![],'data':_0x57e7ba},{'command':_0x35addc,'risk':_0x517917[_0x2cd54a(0x1b0)],'format':_0x5ec0,'dryRun':!![],'jqFilter':_0x4a1ca5});return;}if(_0x517917[_0x2cd54a(0x1b0)]===_0x2cd54a(0x1f7)&&!_0x2790d9['yes']){if(_0x5ecae2['isNonInteractive'])throw CliErrors[_0x2cd54a(0x1b6)](_0x2cd54a(0x1c0)+_0x35addc+_0x2cd54a(0x1c7));await requireConfirmation(_0x35addc);}const _0x2b0b19=await _0x517917[_0x2cd54a(0x1b9)](_0xd02a1b);formatOutput(_0x2b0b19,{'command':_0x35addc,'risk':_0x517917[_0x2cd54a(0x1b0)],'format':_0x5ec0,'jqFilter':_0x4a1ca5});}function buildRuntimeContext(_0xac3dd9){const _0x2d5c31=a124_0x230f,{flags:_0x101b9b,def:_0x4b4ce4}=_0xac3dd9,_0x2517a7=CLI_BIN_NAME+'\x20'+_0x4b4ce4[_0x2d5c31(0x1ed)]+'\x20'+_0x4b4ce4['command'];return{'appCode':_0xac3dd9[_0x2d5c31(0x1fa)],'cookie':_0xac3dd9[_0x2d5c31(0x1fd)],'apiDomain':_0xac3dd9[_0x2d5c31(0x1e8)],'format':_0xac3dd9[_0x2d5c31(0x1d8)],'nonInteractive':_0xac3dd9['nonInteractive'],'apiDir':_0xac3dd9[_0x2d5c31(0x1e2)],'selectedAppName':_0xac3dd9[_0x2d5c31(0x1dd)],'args':_0xac3dd9[_0x2d5c31(0x1d6)],'str'(_0x1f334d){return String(_0x101b9b[_0x1f334d]??'');},'bool'(_0x4ecaf4){const _0x2c7984=_0x2d5c31;if(_0x101b9b[_0x4ecaf4]===!![])return!![];if(_0x4ecaf4==='verbose'&&_0xac3dd9[_0x2c7984(0x1b3)])return!![];return![];},'num'(_0x32f467,_0x2d8721){const _0x55bca6=_0x2d5c31,_0x3e3c5e=_0x101b9b[_0x32f467];if(typeof _0x3e3c5e===_0x55bca6(0x1f0))return _0x3e3c5e;if(_0x32f467===_0x55bca6(0x1bd)&&_0xac3dd9[_0x55bca6(0x1f6)]!=null)return _0xac3dd9[_0x55bca6(0x1f6)];return _0x2d8721??0x0;},'flag'(_0x5f1607){return _0x101b9b[_0x5f1607];},'output'(_0x351824){const _0x133dad=_0x2d5c31;formatOutput(_0x351824,{'command':_0x2517a7,'risk':_0x4b4ce4[_0x133dad(0x1b0)],'format':_0xac3dd9[_0x133dad(0x1d8)],'jqFilter':_0xac3dd9['jqFilter']});}};}function resolveJqFilter(_0x32ab05){const _0x5159ed=_0x32ab05['jq'];if(_0x5159ed===undefined||_0x5159ed===null)return undefined;const _0x4cf2be=String(_0x5159ed)['trim']();return _0x4cf2be===''?undefined:_0x4cf2be;}function resolveFormat(_0x5bc22f,_0x18cf89,_0x39d504){const _0x6775e2=a124_0x230f;if(_0x18cf89[_0x6775e2(0x1c1)]===![])return _0x6775e2(0x1cd);const _0x3c9637=normalizeLegacyOutputFormat(_0x5bc22f[_0x6775e2(0x1d8)]);if(_0x3c9637)return _0x3c9637;const _0x2f3921=normalizeLegacyOutputFormat(_0x39d504);if(_0x2f3921)return _0x2f3921;const _0xfd1064=normalizeLegacyOutputFormat(_0x18cf89[_0x6775e2(0x1fc)]);if(_0xfd1064)return _0xfd1064;return'compress';}async function requireConfirmation(_0x156097){const _0x722164=a124_0x230f,_0x3fb362=await import(_0x722164(0x1ee)),_0xed7c73=_0x3fb362[_0x722164(0x1c5)]({'input':process[_0x722164(0x1d7)],'output':process[_0x722164(0x1df)]});return new Promise((_0x55f656,_0x29a080)=>{const _0x2dba90=_0x722164;_0xed7c73['question'](_0x2dba90(0x1fe)+_0x156097+_0x2dba90(0x1fb),_0x5db8df=>{const _0x484521=_0x2dba90;_0xed7c73[_0x484521(0x1d3)](),_0x5db8df[_0x484521(0x1d4)]()==='y'||_0x5db8df['toLowerCase']()===_0x484521(0x1cf)?_0x55f656():_0x29a080(CliErrors[_0x484521(0x1e7)](_0x484521(0x1ce)));});});}function resolveAliasToCode(_0x3b1f3f,_0x1a7040,_0x50a985,_0x25b23f){const _0x12c968=a124_0x230f,_0x108739=_0x3b1f3f['flags'][_0x12c968(0x1b8)](_0x355819=>_0x355819[_0x12c968(0x1b7)]==='code'&&_0x355819['type']===_0x12c968(0x1f9)),_0x4e3aeb=_0x3b1f3f[_0x12c968(0x1c4)][_0x12c968(0x1b8)](_0x2aeacb=>_0x2aeacb['name']===_0x12c968(0x1c3)&&_0x2aeacb[_0x12c968(0x1c2)]===_0x12c968(0x1f9));if(!_0x108739||!_0x4e3aeb)return;const _0x416fef=_0x1a7040[_0x12c968(0x1bc)]?String(_0x1a7040[_0x12c968(0x1bc)]):'',_0x2606f3=_0x1a7040[_0x12c968(0x1c3)]?String(_0x1a7040[_0x12c968(0x1c3)]):'';if(!_0x416fef&&!_0x2606f3)throw CliErrors[_0x12c968(0x1b6)]('`'+_0x25b23f+_0x12c968(0x1be));if(_0x2606f3&&!_0x416fef){const _0x3e74cd=resolveAlias(_0x50a985,_0x2606f3);if(!_0x3e74cd){const _0x19a575=listAliases(_0x50a985)['map'](_0x9cae6b=>_0x9cae6b['alias']),_0xaf00f1=_0x19a575[_0x12c968(0x1c8)]?_0x12c968(0x1bf)+_0x19a575['join'](',\x20'):_0x12c968(0x1f5)+_0x50a985+_0x12c968(0x1eb)+CLI_BIN_NAME+_0x12c968(0x1f8);throw CliErrors[_0x12c968(0x1b6)](_0x12c968(0x1c9)+_0x2606f3+_0x12c968(0x1e4)+_0xaf00f1);}_0x1a7040['code']=_0x3e74cd;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a125_0x33b6(_0x283b32,_0xd38494){_0x283b32=_0x283b32-0x74;const _0x6a4682=a125_0x6a46();let _0x33b6dc=_0x6a4682[_0x283b32];return _0x33b6dc;}(function(_0x16c662,_0x1a54b7){const _0x59ce17=a125_0x33b6,_0x30ee05=_0x16c662();while(!![]){try{const _0xeebcd9=parseInt(_0x59ce17(0x82))/0x1+-parseInt(_0x59ce17(0x91))/0x2*(parseInt(_0x59ce17(0x8a))/0x3)+parseInt(_0x59ce17(0x7a))/0x4*(-parseInt(_0x59ce17(0x75))/0x5)+parseInt(_0x59ce17(0x8e))/0x6+-parseInt(_0x59ce17(0x7f))/0x7*(parseInt(_0x59ce17(0x81))/0x8)+parseInt(_0x59ce17(0x9d))/0x9+parseInt(_0x59ce17(0x89))/0xa;if(_0xeebcd9===_0x1a54b7)break;else _0x30ee05['push'](_0x30ee05['shift']());}catch(_0x53a38f){_0x30ee05['push'](_0x30ee05['shift']());}}}(a125_0x6a46,0x66555));import{buildAllFlags}from'../framework/build-all-flags.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{VERSION,GIT_COMMIT}from'../generated/build-info.js';function a125_0x6a46(){const _0x206661=['hidden','4450164CGAIaF','default','args','125130DsRNSO','tag','flags','service','regex','helpExtra','label','map','hasFormat','hint','alias','required','2329830naYpNx','function','<script>','1149865cqhAiG','requiresAuth','source','name','isSingleCommand','8caCldk','../commands/registry.js','description','length','type','11823sVBOAR','wildcardDef','952zuRvlT','364550CeVitl','risk','enum','command','dryRun','commands','defaultCommand','4031950OrtKwM','33jMSWJw','push','pattern'];a125_0x6a46=function(){return _0x206661;};return a125_0x6a46();}function serializeFlag(_0x48a758){const _0x29a5a7=a125_0x33b6,_0x46d0c1={'name':_0x48a758['name'],'type':_0x48a758[_0x29a5a7(0x7e)],'description':_0x48a758[_0x29a5a7(0x7c)]};if(_0x48a758['required']!==undefined)_0x46d0c1[_0x29a5a7(0x9c)]=_0x48a758[_0x29a5a7(0x9c)];if(_0x48a758[_0x29a5a7(0x8f)]!==undefined)_0x46d0c1['default']=_0x48a758[_0x29a5a7(0x8f)];if(_0x48a758[_0x29a5a7(0x84)]&&_0x48a758[_0x29a5a7(0x84)][_0x29a5a7(0x7d)]>0x0)_0x46d0c1[_0x29a5a7(0x84)]=_0x48a758[_0x29a5a7(0x84)];if(_0x48a758[_0x29a5a7(0x9b)])_0x46d0c1[_0x29a5a7(0x9b)]=_0x48a758[_0x29a5a7(0x9b)];if(_0x48a758[_0x29a5a7(0x8d)])_0x46d0c1[_0x29a5a7(0x8d)]=_0x48a758['hidden'];return _0x48a758[_0x29a5a7(0x8c)]&&(_0x46d0c1[_0x29a5a7(0x8c)]={'source':_0x48a758[_0x29a5a7(0x8c)][_0x29a5a7(0x95)][_0x29a5a7(0x77)],'flags':_0x48a758[_0x29a5a7(0x8c)][_0x29a5a7(0x95)][_0x29a5a7(0x93)],'description':_0x48a758[_0x29a5a7(0x8c)]['description']}),_0x46d0c1;}function serializeHelpExtra(_0x4126c1){const _0x3c7a81=a125_0x33b6;if(_0x4126c1['helpExtra']===undefined)return undefined;if(typeof _0x4126c1['helpExtra']===_0x3c7a81(0x9e))return{'dynamic':!![]};return _0x4126c1[_0x3c7a81(0x96)];}function serializeCommand(_0x44e29a,_0x22e06d){const _0x4f0c1a=a125_0x33b6,_0x37fee0=_0x44e29a[_0x4f0c1a(0x76)]!==![],_0x1d9082=_0x44e29a['requiresAppCode']!==![],_0x4ac3b0=_0x44e29a[_0x4f0c1a(0x99)]!==![],_0x4d14a0=serializeHelpExtra(_0x44e29a);return{'command':_0x22e06d['command'],'description':_0x22e06d[_0x4f0c1a(0x7c)],..._0x22e06d[_0x4f0c1a(0x92)]?{'tag':_0x22e06d[_0x4f0c1a(0x92)]['trim']()}:{},'risk':_0x44e29a[_0x4f0c1a(0x83)],'requiresAuth':_0x37fee0,'requiresAppCode':_0x1d9082,'hasFormat':_0x4ac3b0,'supportsDryRun':Boolean(_0x44e29a[_0x4f0c1a(0x86)]),..._0x44e29a[_0x4f0c1a(0x90)]&&_0x44e29a[_0x4f0c1a(0x90)][_0x4f0c1a(0x7d)]>0x0?{'args':_0x44e29a[_0x4f0c1a(0x90)]}:{},'flags':buildAllFlags(_0x44e29a)[_0x4f0c1a(0x98)](serializeFlag),..._0x4d14a0!==undefined?{'helpExtra':_0x4d14a0}:{}};}export async function buildSchemaPayload(){const _0x103619=a125_0x33b6,{serviceRegistry:_0x90054e,findDefinition:_0x2a1a5e}=await import(_0x103619(0x7b)),_0x3699ae=[];for(const _0x1776ec of _0x90054e){const _0x510949=[];for(const _0x144e63 of _0x1776ec[_0x103619(0x87)]){const _0x7b8cad=_0x144e63[_0x103619(0x85)]===_0x103619(0x74)&&_0x1776ec[_0x103619(0x80)]?_0x1776ec[_0x103619(0x80)]:_0x2a1a5e(_0x1776ec[_0x103619(0x94)],_0x144e63['command']);if(!_0x7b8cad)continue;_0x510949['push'](serializeCommand(_0x7b8cad,_0x144e63));}_0x3699ae[_0x103619(0x8b)]({'service':_0x1776ec[_0x103619(0x94)],'label':_0x1776ec[_0x103619(0x97)],..._0x1776ec[_0x103619(0x79)]?{'isSingleCommand':!![]}:{},..._0x1776ec[_0x103619(0x88)]?{'defaultCommand':_0x1776ec[_0x103619(0x88)]}:{},'hasWildcard':Boolean(_0x1776ec['wildcardDef']),'commands':_0x510949});}return{'schemaVersion':0x1,'cli':{'bin':CLI_BIN_NAME,'displayName':CLI_DISPLAY_NAME,'version':VERSION,'gitCommit':GIT_COMMIT},'globalFlags':GLOBAL_FLAGS['map'](_0x2949cf=>({'name':_0x2949cf[_0x103619(0x78)],'type':_0x2949cf['type'],'description':_0x2949cf[_0x103619(0x7c)],..._0x2949cf[_0x103619(0x9a)]?{'hint':_0x2949cf['hint']}:{},..._0x2949cf['hidden']?{'hidden':!![]}:{}})),'services':_0x3699ae};}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fbaf3,_0x2f2983){const _0x3b686d=a126_0x1eca,_0x176434=_0x3fbaf3();while(!![]){try{const _0x2ad990=-parseInt(_0x3b686d(0xda))/0x1*(-parseInt(_0x3b686d(0xd7))/0x2)+-parseInt(_0x3b686d(0xe1))/0x3+parseInt(_0x3b686d(0xdd))/0x4*(-parseInt(_0x3b686d(0xd8))/0x5)+-parseInt(_0x3b686d(0xdf))/0x6*(-parseInt(_0x3b686d(0xe5))/0x7)+parseInt(_0x3b686d(0xe3))/0x8+-parseInt(_0x3b686d(0xe0))/0x9*(parseInt(_0x3b686d(0xdc))/0xa)+parseInt(_0x3b686d(0xde))/0xb*(-parseInt(_0x3b686d(0xd9))/0xc);if(_0x2ad990===_0x2f2983)break;else _0x176434['push'](_0x176434['shift']());}catch(_0x3d4f9e){_0x176434['push'](_0x176434['shift']());}}}(a126_0x14e4,0x82146));export function riskLevelOrder(_0x47b1db){const _0x55c804=a126_0x1eca,_0x317aa7={'read':0x0,'write':0x1,'high-risk-write':0x2};return _0x317aa7[_0x47b1db??_0x55c804(0xe2)]??0x0;}function a126_0x14e4(){const _0x173b31=['102688vHRgnZ','77VhBgJs','5375508uULVkT','25695rOJLEh','131835vcReoG','read','3717400TxctkE','compress','7BQWIKt','table','1788274MzlQoO','80cZLPVg','1433352AyHeNb','1uVXqih','pretty','1510ihWgIV'];a126_0x14e4=function(){return _0x173b31;};return a126_0x14e4();}function a126_0x1eca(_0x503255,_0x23a00f){_0x503255=_0x503255-0xd6;const _0x14e4e3=a126_0x14e4();let _0x1eca37=_0x14e4e3[_0x503255];return _0x1eca37;}export function isValidFormat(_0x17da0a){const _0x59995f=a126_0x1eca;return _0x17da0a==='json'||_0x17da0a===_0x59995f(0xdb)||_0x17da0a===_0x59995f(0xe4);}export function normalizeLegacyOutputFormat(_0x180e1f){const _0x489945=a126_0x1eca;if(_0x180e1f===_0x489945(0xd6))return _0x489945(0xdb);if(isValidFormat(_0x180e1f))return _0x180e1f;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a127_0x5275ad=a127_0x1c9b;(function(_0x350b94,_0x281e9e){const _0x5e1e1e=a127_0x1c9b,_0x121dcb=_0x350b94();while(!![]){try{const _0x493825=parseInt(_0x5e1e1e(0x12a))/0x1+parseInt(_0x5e1e1e(0x130))/0x2+-parseInt(_0x5e1e1e(0x12f))/0x3*(-parseInt(_0x5e1e1e(0x12c))/0x4)+-parseInt(_0x5e1e1e(0x129))/0x5+parseInt(_0x5e1e1e(0x12e))/0x6+parseInt(_0x5e1e1e(0x12d))/0x7*(-parseInt(_0x5e1e1e(0x12b))/0x8)+parseInt(_0x5e1e1e(0x132))/0x9*(parseInt(_0x5e1e1e(0x131))/0xa);if(_0x493825===_0x281e9e)break;else _0x121dcb['push'](_0x121dcb['shift']());}catch(_0x4c33b3){_0x121dcb['push'](_0x121dcb['shift']());}}}(a127_0xa30e,0xa4086));function a127_0x1c9b(_0x49cb8f,_0x3ba26c){_0x49cb8f=_0x49cb8f-0x129;const _0xa30e22=a127_0xa30e();let _0x1c9be7=_0xa30e22[_0x49cb8f];return _0x1c9be7;}function a127_0xa30e(){const _0x5b5532=['2652570CNixIc','2026-04-09T06:42:11.528Z','9c8f5c9','5616080hKtgoB','287027bcSRoc','3738968YtLlhZ','132bhhtPp','7iPYhwU','2215464cDWucF','99987sBPJkL','423214HQiSvE','10gBOELX'];a127_0xa30e=function(){return _0x5b5532;};return a127_0xa30e();}export const VERSION='2.1.1-beta.0';export const GIT_TAG='v2.1.1-beta.0';export const GIT_COMMIT=a127_0x5275ad(0x134);export const BUILD_TIME=a127_0x5275ad(0x133);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d67c0,_0x4db1e9){var _0x546768=a128_0x3202,_0x4a29cd=_0x3d67c0();while(!![]){try{var _0x188103=-parseInt(_0x546768(0x6e))/0x1+-parseInt(_0x546768(0x72))/0x2*(parseInt(_0x546768(0x6d))/0x3)+parseInt(_0x546768(0x71))/0x4+-parseInt(_0x546768(0x6c))/0x5+parseInt(_0x546768(0x6f))/0x6*(-parseInt(_0x546768(0x79))/0x7)+parseInt(_0x546768(0x73))/0x8*(-parseInt(_0x546768(0x74))/0x9)+parseInt(_0x546768(0x75))/0xa;if(_0x188103===_0x4db1e9)break;else _0x4a29cd['push'](_0x4a29cd['shift']());}catch(_0x655d85){_0x4a29cd['push'](_0x4a29cd['shift']());}}}(a128_0x5286,0xe6c28));import a128_0x54fb73 from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a128_0x3202(_0x38ae95,_0x5d7d8b){_0x38ae95=_0x38ae95-0x6b;var _0x52865d=a128_0x5286();var _0x320276=_0x52865d[_0x38ae95];return _0x320276;}export function showHelp(){var _0x187804=a128_0x3202;console[_0x187804(0x70)](),console[_0x187804(0x70)](a128_0x54fb73['green'][_0x187804(0x6b)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x187804(0x70)](),console[_0x187804(0x70)](_0x187804(0x76)+a128_0x54fb73[_0x187804(0x7a)][_0x187804(0x6b)](CLI_BIN_NAME+_0x187804(0x78))+_0x187804(0x77)),console[_0x187804(0x70)]();}function a128_0x5286(){var _0xba19cf=['2272612oifnMw','6VtqDYS','562064TYzYLM','198rXOwrJ','71456830SEdmvh','\x20\x20Use\x20','\x20to\x20view\x20available\x20commands.','\x20--help','7YCSAFb','green','bold','6495350Jhyrys','772323oaYyPT','1486336ayidBk','9991434ABHFFA','log'];a128_0x5286=function(){return _0xba19cf;};return a128_0x5286();}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a129_0x24adb4=a129_0x96ab;function a129_0x1531(){const _0x1315fc=['length','skill','Equivalent\x20command:\x20','log','29898cAxnqs','\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a','argv','enable-bff-save','670mMMHGs','854592nwkCeX','npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global','9VPNzcR','entries','\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','help','push','49ZQeuHY','setLogPath','--help','\x20skill\x20--help\x0a\x20\x20','2671665gPfUbt','不支持的命令:\x20','toLowerCase','error','\x0aAvailable\x20commands:','add','from','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','includes','796314NlhyYA','\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','cwd','2825656njwmzC','has','1704BnXarl','336lGFtSr','143253LCWgYZ','startsWith'];a129_0x1531=function(){return _0x1315fc;};return a129_0x1531();}(function(_0x564f15,_0x363a2b){const _0x39a238=a129_0x96ab,_0x32adf0=_0x564f15();while(!![]){try{const _0x3e0f37=-parseInt(_0x39a238(0x18a))/0x1*(-parseInt(_0x39a238(0x189))/0x2)+parseInt(_0x39a238(0x184))/0x3+-parseInt(_0x39a238(0x170))/0x4+-parseInt(_0x39a238(0x17b))/0x5+-parseInt(_0x39a238(0x191))/0x6*(parseInt(_0x39a238(0x177))/0x7)+-parseInt(_0x39a238(0x187))/0x8*(parseInt(_0x39a238(0x172))/0x9)+-parseInt(_0x39a238(0x195))/0xa*(-parseInt(_0x39a238(0x18b))/0xb);if(_0x3e0f37===_0x363a2b)break;else _0x32adf0['push'](_0x32adf0['shift']());}catch(_0xbd118){_0x32adf0['push'](_0x32adf0['shift']());}}}(a129_0x1531,0x465b6));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';export function camelCaseFlagsToKebab(_0x448115){const _0x468afc=a129_0x96ab,_0x3b01ce=[];for(const [_0x30b2f6,_0x7d5cb4]of Object[_0x468afc(0x173)](_0x448115)){if(_0x7d5cb4===!![]){const _0x12bb4a=_0x30b2f6['replace'](/([A-Z])/g,'-$1')[_0x468afc(0x17d)]();_0x3b01ce[_0x468afc(0x176)](_0x12bb4a);}}return _0x3b01ce;}export function parseDynamicFlags(){const _0x50f116=a129_0x96ab,_0x3b8eb8=[];for(let _0x5a3238=0x3;_0x5a3238<process[_0x50f116(0x193)][_0x50f116(0x18d)];_0x5a3238++){const _0x274c23=process['argv'][_0x5a3238];if(_0x274c23&&_0x274c23[_0x50f116(0x18c)]('--')){const _0xb5f20c=_0x274c23['slice'](0x2);_0xb5f20c&&!_0xb5f20c[_0x50f116(0x183)]('=')&&_0x3b8eb8['push'](_0xb5f20c);}}return _0x3b8eb8;}export function getAllProvidedFlags(_0xc05661){const _0x5593fa=a129_0x96ab,_0x406b67=camelCaseFlagsToKebab(_0xc05661),_0x58aa5f=parseDynamicFlags(),_0x91a9f8=new Set([..._0x406b67,..._0x58aa5f]);return Array[_0x5593fa(0x181)](_0x91a9f8);}export function normalizeLegacyBffSaveFlags(_0x2d5d38){const _0x5620ec=a129_0x96ab,_0x21ffd0=new Set(_0x2d5d38);return _0x21ffd0[_0x5620ec(0x188)]('dangerously-bff-save')&&_0x21ffd0[_0x5620ec(0x180)](_0x5620ec(0x194)),Array[_0x5620ec(0x181)](_0x21ffd0);}const SKILLS_INSTALL_COMMAND_LINE=a129_0x24adb4(0x171);function a129_0x96ab(_0x21c725,_0x1f28a7){_0x21c725=_0x21c725-0x170;const _0x15317a=a129_0x1531();let _0x96ab38=_0x15317a[_0x21c725];return _0x96ab38;}export async function skillsCommand(_0x4b25ce,_0x550d9e,_0x1f3e9e){const _0x2fdd9d=a129_0x24adb4;logger[_0x2fdd9d(0x178)](process[_0x2fdd9d(0x186)]());if(_0x1f3e9e?.[_0x2fdd9d(0x175)]||_0x4b25ce===_0x2fdd9d(0x179)){showHelp();return;}console[_0x2fdd9d(0x17e)]('Error:\x20Unsupported\x20command:\x20'+(_0x4b25ce||'(empty)')),console['log'](_0x2fdd9d(0x17f)),console[_0x2fdd9d(0x190)]('\x20\x20'+CLI_BIN_NAME+_0x2fdd9d(0x174)),console[_0x2fdd9d(0x190)]('\x20\x20'+CLI_BIN_NAME+'\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a'),console[_0x2fdd9d(0x190)](''),console[_0x2fdd9d(0x190)](_0x2fdd9d(0x18f)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x2fdd9d(0x17e)](_0x2fdd9d(0x18e),_0x2fdd9d(0x17c)+_0x4b25ce),process['exit'](0x1);}function showHelp(){const _0x20efc0=a129_0x24adb4;console[_0x20efc0(0x190)](_0x20efc0(0x182)+CLI_BIN_NAME+_0x20efc0(0x17a)+CLI_BIN_NAME+_0x20efc0(0x185)+SKILLS_INSTALL_COMMAND_LINE+_0x20efc0(0x192));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x14b15b=a130_0x1c51;(function(_0x17607c,_0x16eba4){const _0x3f6bd1=a130_0x1c51,_0xf39b81=_0x17607c();while(!![]){try{const _0x2a24b7=-parseInt(_0x3f6bd1(0x10b))/0x1*(-parseInt(_0x3f6bd1(0x113))/0x2)+parseInt(_0x3f6bd1(0x103))/0x3+parseInt(_0x3f6bd1(0xf9))/0x4*(parseInt(_0x3f6bd1(0x117))/0x5)+parseInt(_0x3f6bd1(0x115))/0x6*(parseInt(_0x3f6bd1(0x109))/0x7)+parseInt(_0x3f6bd1(0x110))/0x8+-parseInt(_0x3f6bd1(0x102))/0x9*(-parseInt(_0x3f6bd1(0x10e))/0xa)+-parseInt(_0x3f6bd1(0xfd))/0xb;if(_0x2a24b7===_0x16eba4)break;else _0xf39b81['push'](_0xf39b81['shift']());}catch(_0x31447d){_0xf39b81['push'](_0xf39b81['shift']());}}}(a130_0x1797,0xc0a4f));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';export const NPX_SKILLS_CLI=a130_0x14b15b(0x112);export const NPX_SKILLS_SUBCOMMAND_ADD='add';export const NPX_SKILLS_FLAG_SKILL=a130_0x14b15b(0x10f);export const RABETBASE_SKILL_SOURCE=a130_0x14b15b(0xff);export const DEFAULT_RABETBASE_SKILL_NAME=a130_0x14b15b(0x106);export function buildNpxSkillsAddArgv(_0x5ac50e=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x5ac50e];}function a130_0x1797(){const _0x588846=['remove','7356DGgBGf','status','60raTdOH','unknown','517276unRFoF','stdout','npx','inherit','70766751oHoYCM','stdio','lovrabet/lovrabet-skill','exit\x20','toString','9vNYbei','3525249LAopIk','stderr','yes','Lovrabet','pipe','join','7259wGTJqo','--global','1pxZHLa','log','skill','9521240kMHZaH','--skill','7263440BVuwLP','trim','skills','2728170mAhzvN'];a130_0x1797=function(){return _0x588846;};return a130_0x1797();}export const NPX_SKILLS_ADD_COMMAND_LINE=[a130_0x14b15b(0xfb),...buildNpxSkillsAddArgv()][a130_0x14b15b(0x108)]('\x20');function a130_0x1c51(_0x204baf,_0x2eca86){_0x204baf=_0x204baf-0xf8;const _0x1797b4=a130_0x1797();let _0x1c51e9=_0x1797b4[_0x204baf];return _0x1c51e9;}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x3b7cb2,_0x3622c3){const _0x4c4b3f=a130_0x14b15b;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2ad1c0=_0x3622c3?.[_0x4c4b3f(0xfe)]??_0x4c4b3f(0xfc),_0x2a46cc=resolveNpmBin(_0x4c4b3f(0xfb)),_0x4d6960=buildNpxSkillsAddArgv(_0x3622c3?.[_0x4c4b3f(0x10d)]??DEFAULT_RABETBASE_SKILL_NAME),_0x3cd8a6=[_0x2a46cc,..._0x4d6960][_0x4c4b3f(0x108)]('\x20');console[_0x4c4b3f(0x10c)]('*\x20'+_0x3cd8a6);const _0x59b9b8=spawnSync(_0x2a46cc,_0x4d6960,{'cwd':_0x3b7cb2,'stdio':_0x2ad1c0,'env':process.env,'shell':![]}),_0x56a819=_0x59b9b8[_0x4c4b3f(0x116)];if(_0x56a819===0x0)return{'ok':!![],'status':0x0};let _0x7e03c3=_0x4c4b3f(0x100)+(_0x56a819??_0x4c4b3f(0xf8));if(_0x2ad1c0===_0x4c4b3f(0x107)){const _0x5e6d84=_0x59b9b8[_0x4c4b3f(0x104)]?_0x59b9b8[_0x4c4b3f(0x104)][_0x4c4b3f(0x101)]()[_0x4c4b3f(0x111)]():'',_0x1fec5f=_0x59b9b8[_0x4c4b3f(0xfa)]?_0x59b9b8[_0x4c4b3f(0xfa)][_0x4c4b3f(0x101)]()[_0x4c4b3f(0x111)]():'';if(_0x5e6d84)_0x7e03c3=_0x5e6d84;else{if(_0x1fec5f)_0x7e03c3=_0x1fec5f;}}return{'ok':![],'status':_0x56a819??null,'error':_0x7e03c3};}export function runNpxSkillsRemove(_0x10ac02,_0x26a476){const _0xf7de43=a130_0x14b15b;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1dca2f=_0x26a476?.[_0xf7de43(0xfe)]??'inherit',_0x213731=resolveNpmBin(_0xf7de43(0xfb)),_0x3937f6=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0xf7de43(0x114),RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x26a476?.[_0xf7de43(0x10d)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x26a476?.[_0xf7de43(0x105)]?['-y']:[]],_0x195088=[_0x213731,..._0x3937f6]['join']('\x20');console['log']('*\x20'+_0x195088);const _0x196ff7=spawnSync(_0x213731,_0x3937f6,{'cwd':_0x10ac02,'stdio':_0x1dca2f,'env':process.env,'shell':![]}),_0x461cfe=_0x196ff7[_0xf7de43(0x116)];if(_0x461cfe===0x0)return{'ok':!![],'status':0x0};let _0x9cef43=_0xf7de43(0x100)+(_0x461cfe??_0xf7de43(0xf8));if(_0x1dca2f===_0xf7de43(0x107)){const _0x3ea309=_0x196ff7[_0xf7de43(0x104)]?_0x196ff7[_0xf7de43(0x104)]['toString']()[_0xf7de43(0x111)]():'',_0x2665a0=_0x196ff7[_0xf7de43(0xfa)]?_0x196ff7[_0xf7de43(0xfa)]['toString']()['trim']():'';if(_0x3ea309)_0x9cef43=_0x3ea309;else{if(_0x2665a0)_0x9cef43=_0x2665a0;}}return{'ok':![],'status':_0x461cfe??null,'error':_0x9cef43};}export function runNpxSkillsAddGlobal(_0x21e2ec,_0x547a03,_0x33a986){const _0xd4b57b=a130_0x14b15b;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0xb66933=_0x33a986?.[_0xd4b57b(0xfe)]??_0xd4b57b(0xfc),_0x1adbd8=resolveNpmBin('npx'),_0xbb05b4=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x547a03,_0xd4b57b(0x10a),..._0x33a986?.[_0xd4b57b(0x105)]?['-y']:[]],_0x46c2e6=[_0x1adbd8,..._0xbb05b4][_0xd4b57b(0x108)]('\x20');console[_0xd4b57b(0x10c)]('*\x20'+_0x46c2e6);const _0x50447c=spawnSync(_0x1adbd8,_0xbb05b4,{'cwd':_0x21e2ec,'stdio':_0xb66933,'env':process.env,'shell':![]}),_0x9a7f5e=_0x50447c[_0xd4b57b(0x116)];if(_0x9a7f5e===0x0)return{'ok':!![],'status':0x0};let _0x5da425='exit\x20'+(_0x9a7f5e??'unknown');if(_0xb66933==='pipe'){const _0x2e06d8=_0x50447c[_0xd4b57b(0x104)]?_0x50447c[_0xd4b57b(0x104)]['toString']()[_0xd4b57b(0x111)]():'',_0x386637=_0x50447c[_0xd4b57b(0xfa)]?_0x50447c[_0xd4b57b(0xfa)][_0xd4b57b(0x101)]()[_0xd4b57b(0x111)]():'';if(_0x2e06d8)_0x5da425=_0x2e06d8;else{if(_0x386637)_0x5da425=_0x386637;}}return{'ok':![],'status':_0x9a7f5e??null,'error':_0x5da425};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3539a6,_0x2f2fcb){const _0x2b7513=a131_0x4832,_0x56583a=_0x3539a6();while(!![]){try{const _0x45427c=parseInt(_0x2b7513(0x1fb))/0x1*(-parseInt(_0x2b7513(0x1f2))/0x2)+parseInt(_0x2b7513(0x1f5))/0x3*(parseInt(_0x2b7513(0x1f1))/0x4)+-parseInt(_0x2b7513(0x1f8))/0x5+parseInt(_0x2b7513(0x1fd))/0x6*(-parseInt(_0x2b7513(0x1ed))/0x7)+parseInt(_0x2b7513(0x1ef))/0x8*(parseInt(_0x2b7513(0x1ff))/0x9)+-parseInt(_0x2b7513(0x1fc))/0xa+-parseInt(_0x2b7513(0x1f3))/0xb*(-parseInt(_0x2b7513(0x1e9))/0xc);if(_0x45427c===_0x2f2fcb)break;else _0x56583a['push'](_0x56583a['shift']());}catch(_0x31ce09){_0x56583a['push'](_0x56583a['shift']());}}}(a131_0x57c6,0x480d8));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i];function isSensitiveKey(_0x1dd957){const _0x118692=a131_0x4832;return SENSITIVE_PATTERNS[_0x118692(0x1ec)](_0x5b85af=>_0x5b85af[_0x118692(0x1f7)](_0x1dd957));}function sanitizeFlags(_0x2a6f62){const _0x1122c2=a131_0x4832,_0x1c89d4={};for(const [_0x1001e3,_0x4306e2]of Object[_0x1122c2(0x1fe)](_0x2a6f62)){isSensitiveKey(_0x1001e3)?_0x1c89d4[_0x1001e3]=_0x4306e2!=null&&_0x4306e2!==''?_0x1122c2(0x1ea):_0x4306e2:_0x1c89d4[_0x1001e3]=_0x4306e2;}return _0x1c89d4;}export async function reportCommandTrace(_0x2bc9df){const _0x5938e8=a131_0x4832;try{const _0x21987d=sanitizeFlags(_0x2bc9df[_0x5938e8(0x1f9)]);await sendCliTraceLog({'spanName':_0x5938e8(0x1ee),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x2bc9df[_0x5938e8(0x200)],'command.name':_0x2bc9df[_0x5938e8(0x1f0)],'command.flags':JSON[_0x5938e8(0x1eb)](_0x21987d),..._0x2bc9df[_0x5938e8(0x1f6)]!=null?{'command.duration_ms':_0x2bc9df[_0x5938e8(0x1f6)]}:{},..._0x2bc9df[_0x5938e8(0x1fa)]?{'command.error':_0x2bc9df[_0x5938e8(0x1fa)]instanceof Error?_0x2bc9df[_0x5938e8(0x1fa)][_0x5938e8(0x1f4)]:String(_0x2bc9df[_0x5938e8(0x1fa)])}:{}}});}catch{}}function a131_0x4832(_0x5a1089,_0x20cd3f){_0x5a1089=_0x5a1089-0x1e9;const _0x57c6ab=a131_0x57c6();let _0x483225=_0x57c6ab[_0x5a1089];return _0x483225;}function a131_0x57c6(){const _0x4e9c10=['4VaRuYi','1108943rofayT','message','7749UgtHJX','durationMs','test','2026905YXSllM','flags','error','88747ejbsAp','1765740FvzwzY','6AAzqNd','entries','3337740ktoAyP','service','48IaStpp','[REDACTED]','stringify','some','1906079JpxWXU','rabetbase.command','8mnpGtu','command','856cnJYcA'];a131_0x57c6=function(){return _0x4e9c10;};return a131_0x57c6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ae7fe,_0x32b9b8){var _0x3828be=a132_0x572f,_0x2970f0=_0x2ae7fe();while(!![]){try{var _0x56bbfb=parseInt(_0x3828be(0x120))/0x1+-parseInt(_0x3828be(0x11e))/0x2+parseInt(_0x3828be(0x125))/0x3*(-parseInt(_0x3828be(0x11f))/0x4)+parseInt(_0x3828be(0x11d))/0x5+parseInt(_0x3828be(0x121))/0x6+-parseInt(_0x3828be(0x122))/0x7+parseInt(_0x3828be(0x123))/0x8;if(_0x56bbfb===_0x32b9b8)break;else _0x2970f0['push'](_0x2970f0['shift']());}catch(_0x26b7c7){_0x2970f0['push'](_0x2970f0['shift']());}}}(a132_0x4e02,0xf2375));function a132_0x572f(_0x1976e3,_0x4fb05f){_0x1976e3=_0x1976e3-0x11c;var _0x4e029=a132_0x4e02();var _0x572f25=_0x4e029[_0x1976e3];return _0x572f25;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a132_0x4e02(){var _0x41eb1e=['7588625xYFHcN','2774562KuNCQV','56UGdVJr','251024EnJfNx','8524404RWqXqh','13617443JySykE','21284512ztdrJC','Failed\x20to\x20report\x20CLI\x20help\x20trace:','326850tZGBMM','service'];a132_0x4e02=function(){return _0x41eb1e;};return a132_0x4e02();}export async function reportCliHelpTrace(_0x5b8b29,_0x20c12a){var _0x453f66=a132_0x572f;try{await sendCliTraceLog({'spanName':'cli.help','logData':{'rabetbase.help.kind':_0x5b8b29,..._0x20c12a?.[_0x453f66(0x11c)]&&{'rabetbase.help.service':_0x20c12a['service']}}});}catch(_0x1247c1){console['error'](_0x453f66(0x124),_0x1247c1);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d0f82,_0x3ec0ca){const _0x213226=a133_0xb4a2,_0x2b260c=_0x1d0f82();while(!![]){try{const _0x14028f=parseInt(_0x213226(0xe2))/0x1*(parseInt(_0x213226(0xed))/0x2)+parseInt(_0x213226(0xe4))/0x3+-parseInt(_0x213226(0xee))/0x4*(-parseInt(_0x213226(0xe7))/0x5)+-parseInt(_0x213226(0xec))/0x6+parseInt(_0x213226(0xe6))/0x7*(-parseInt(_0x213226(0xe9))/0x8)+parseInt(_0x213226(0xea))/0x9+-parseInt(_0x213226(0xeb))/0xa;if(_0x14028f===_0x3ec0ca)break;else _0x2b260c['push'](_0x2b260c['shift']());}catch(_0x2af907){_0x2b260c['push'](_0x2b260c['shift']());}}}(a133_0x24ec,0x55316));import a133_0x333d90 from'node:os';import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setTraceConfig,getOtelLoggerVersion}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';let cliOtelTraceInitialized=![];function a133_0x24ec(){const _0x2c0ab9=['80irzCeI','production','698031zeTHDY','username','1508773TgFGOQ','11810KXldcQ','nickname','8IxjXov','1510443FsPWcj','4443650xYUydm','50496qQkVMN','5794ikTIJc','652XskRvL','rabetbase-cli','unknown','userInfo','daily'];a133_0x24ec=function(){return _0x2c0ab9;};return a133_0x24ec();}function a133_0xb4a2(_0x4cfd9f,_0x505c74){_0x4cfd9f=_0x4cfd9f-0xe2;const _0x24ecca=a133_0x24ec();let _0xb4a2b8=_0x24ecca[_0x4cfd9f];return _0xb4a2b8;}export async function ensureCliOtelTraceConfig(){const _0x5dc468=a133_0xb4a2,_0x2c1913=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x324250=_0x2c1913?.['user'];setTraceConfig({'otelLoggerVersion':getOtelLoggerVersion(),'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x5dc468(0xf0)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x5dc468(0xf2):_0x5dc468(0xe3)),'username':_0x324250?.[_0x5dc468(0xe5)]??a133_0x333d90[_0x5dc468(0xf1)]()[_0x5dc468(0xe5)]??_0x5dc468(0xef),..._0x324250&&{'nickname':_0x324250[_0x5dc468(0xe8)]}}),cliOtelTraceInitialized=!![];}return _0x2c1913;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a134_0x16af(_0x57e145,_0x5d117d){_0x57e145=_0x57e145-0x65;const _0x1690ac=a134_0x1690();let _0x16afee=_0x1690ac[_0x57e145];return _0x16afee;}(function(_0x5a317f,_0x415cd3){const _0x4aed37=a134_0x16af,_0x3a811f=_0x5a317f();while(!![]){try{const _0x3766d1=-parseInt(_0x4aed37(0x72))/0x1+parseInt(_0x4aed37(0x66))/0x2+parseInt(_0x4aed37(0x69))/0x3+-parseInt(_0x4aed37(0x65))/0x4+-parseInt(_0x4aed37(0x6e))/0x5*(-parseInt(_0x4aed37(0x6b))/0x6)+-parseInt(_0x4aed37(0x6d))/0x7*(parseInt(_0x4aed37(0x71))/0x8)+parseInt(_0x4aed37(0x67))/0x9*(parseInt(_0x4aed37(0x6f))/0xa);if(_0x3766d1===_0x415cd3)break;else _0x3a811f['push'](_0x3a811f['shift']());}catch(_0x2d6680){_0x3a811f['push'](_0x3a811f['shift']());}}}(a134_0x1690,0x96232));function a134_0x1690(){const _0x403be2=['3609AraIIY','exit','2630364qcgWeg','once','60486GFqVuw','then','28IeFWLT','155LOKRTb','19750TtaLjn','SIGTERM','2039384nqqbMK','654960yMpUXk','2831388ntYISW','2032374OkOAiJ'];a134_0x1690=function(){return _0x403be2;};return a134_0x1690();}import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x36cfc3=a134_0x16af;process[_0x36cfc3(0x6a)]('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x5c9bb4=()=>{const _0x3b3d7b=_0x36cfc3;void flushOtelNodeIfUsed()[_0x3b3d7b(0x6c)](()=>process['exit'](0x0));};process['once']('SIGINT',_0x5c9bb4),process[_0x36cfc3(0x6a)](_0x36cfc3(0x70),_0x5c9bb4);}export async function exitWithOtelShutdown(_0x5ec0e8){const _0x4d8799=a134_0x16af;await flushOtelNodeIfUsed(),process[_0x4d8799(0x68)](_0x5ec0e8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a135_0x5aa96d=a135_0x4f5a;(function(_0xebde42,_0x462b94){const _0x51e49c=a135_0x4f5a,_0x282d1e=_0xebde42();while(!![]){try{const _0x4f2f0c=parseInt(_0x51e49c(0x127))/0x1*(-parseInt(_0x51e49c(0x12a))/0x2)+parseInt(_0x51e49c(0x11d))/0x3+parseInt(_0x51e49c(0x126))/0x4+-parseInt(_0x51e49c(0x124))/0x5+parseInt(_0x51e49c(0x123))/0x6+parseInt(_0x51e49c(0x12c))/0x7*(parseInt(_0x51e49c(0x129))/0x8)+-parseInt(_0x51e49c(0x11e))/0x9;if(_0x4f2f0c===_0x462b94)break;else _0x282d1e['push'](_0x282d1e['shift']());}catch(_0x223b96){_0x282d1e['push'](_0x282d1e['shift']());}}}(a135_0x2ed1,0x2933d));import{sendTraceLog}from'@lovrabet/otel-logger';function a135_0x4f5a(_0x521b4a,_0x26b381){_0x521b4a=_0x521b4a-0x11d;const _0x2ed13d=a135_0x2ed1();let _0x4f5a85=_0x2ed13d[_0x521b4a];return _0x4f5a85;}import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME=a135_0x5aa96d(0x12b);function a135_0x2ed1(){const _0x1cf998=['manual','647004LDggwo','1306025yLZHiV','version','532544HPCckK','59SFMdnI','traceparent','584HdRHda','1774lGITbY','rabetbase-cli','12509syZqGE','411900toJGaU','237762qTXdEg','traceName','spanName','logData'];a135_0x2ed1=function(){return _0x1cf998;};return a135_0x2ed1();}export async function sendCliTraceLog(_0x39c86a){const _0x552cee=a135_0x5aa96d;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x39c86a[_0x552cee(0x11f)]??DEFAULT_TRACE_NAME,'version':_0x39c86a[_0x552cee(0x125)]??getCliVersion(),'spanName':_0x39c86a[_0x552cee(0x120)],'eventType':_0x552cee(0x122),'logData':_0x39c86a[_0x552cee(0x121)],..._0x39c86a[_0x552cee(0x128)]&&{'traceparent':_0x39c86a[_0x552cee(0x128)]}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0x2850b3=a137_0x1d9a;(function(_0x58e09e,_0x5b9839){const _0x4aa58f=a137_0x1d9a,_0xdc8ff=_0x58e09e();while(!![]){try{const _0x52072c=parseInt(_0x4aa58f(0x151))/0x1+-parseInt(_0x4aa58f(0x168))/0x2*(-parseInt(_0x4aa58f(0x16f))/0x3)+parseInt(_0x4aa58f(0x165))/0x4+parseInt(_0x4aa58f(0x16a))/0x5*(parseInt(_0x4aa58f(0x16c))/0x6)+-parseInt(_0x4aa58f(0x144))/0x7+-parseInt(_0x4aa58f(0x16e))/0x8*(-parseInt(_0x4aa58f(0x14c))/0x9)+parseInt(_0x4aa58f(0x14f))/0xa*(-parseInt(_0x4aa58f(0x174))/0xb);if(_0x52072c===_0x5b9839)break;else _0xdc8ff['push'](_0xdc8ff['shift']());}catch(_0x2b6291){_0xdc8ff['push'](_0xdc8ff['shift']());}}}(a137_0x1b5c,0x45200));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':a137_0x2850b3(0x141),'folders':['.cursorrules',a137_0x2850b3(0x150)],'files':[{'type':a137_0x2850b3(0x149),'path':a137_0x2850b3(0x140),'template':a137_0x2850b3(0x164)}]},'windsurf':{'name':'Windsurf','description':a137_0x2850b3(0x160),'folders':[a137_0x2850b3(0x170)],'files':[{'type':a137_0x2850b3(0x149),'path':a137_0x2850b3(0x159),'template':a137_0x2850b3(0x164)}]},'claude':{'name':a137_0x2850b3(0x15d),'description':a137_0x2850b3(0x15d),'folders':[a137_0x2850b3(0x15b)],'files':[{'type':a137_0x2850b3(0x149),'path':a137_0x2850b3(0x169),'template':'SKILL.md.tpl'}]},'cline':{'name':a137_0x2850b3(0x15c),'description':a137_0x2850b3(0x14a),'folders':[a137_0x2850b3(0x143)],'files':[{'type':'file','path':a137_0x2850b3(0x16b),'template':a137_0x2850b3(0x164)}]},'codex':{'name':a137_0x2850b3(0x148),'description':a137_0x2850b3(0x157),'folders':[a137_0x2850b3(0x171)],'files':[{'type':a137_0x2850b3(0x149),'path':a137_0x2850b3(0x13a),'template':'SKILL.md.tpl'}]},'opencode':{'name':a137_0x2850b3(0x142),'description':'OpenCode\x20IDE','folders':[a137_0x2850b3(0x158)],'files':[{'type':a137_0x2850b3(0x149),'path':a137_0x2850b3(0x162),'template':'SKILL.md.tpl'}]},'qoder':{'name':a137_0x2850b3(0x13b),'description':a137_0x2850b3(0x14d),'folders':[a137_0x2850b3(0x147)],'files':[{'type':a137_0x2850b3(0x149),'path':'.qoder/rules/rabetbase.md','template':a137_0x2850b3(0x164)},{'type':a137_0x2850b3(0x149),'path':a137_0x2850b3(0x163),'template':a137_0x2850b3(0x164)}]},'codebuddy':{'name':a137_0x2850b3(0x145),'description':'CodeBuddy\x20IDE','folders':[a137_0x2850b3(0x154)],'files':[{'type':a137_0x2850b3(0x149),'path':a137_0x2850b3(0x146),'template':a137_0x2850b3(0x164)}]},'trae':{'name':a137_0x2850b3(0x156),'description':a137_0x2850b3(0x152),'folders':[a137_0x2850b3(0x13e)],'files':[{'type':'file','path':'.trae/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]}};function a137_0x1d9a(_0x3fb840,_0x13157c){_0x3fb840=_0x3fb840-0x13a;const _0x1b5c5f=a137_0x1b5c();let _0x1d9adc=_0x1b5c5f[_0x3fb840];return _0x1d9adc;}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':'其他\x20(通用模板)','description':a137_0x2850b3(0x13c),'folders':[a137_0x2850b3(0x167)],'files':[{'type':a137_0x2850b3(0x149),'path':a137_0x2850b3(0x14b),'template':'SKILL.md.tpl'}]},'antigravity':{'name':a137_0x2850b3(0x15f),'description':a137_0x2850b3(0x13f),'folders':['.agent'],'files':[{'type':'file','path':a137_0x2850b3(0x14b),'template':a137_0x2850b3(0x164)}]}};export const CORE_IDE_LIST=[a137_0x2850b3(0x172),a137_0x2850b3(0x161),a137_0x2850b3(0x16d),a137_0x2850b3(0x15a),'cursor','opencode',a137_0x2850b3(0x155),a137_0x2850b3(0x14e),a137_0x2850b3(0x153)];function a137_0x1b5c(){const _0x46f102=['codebuddy','24oCuMOw','777aerxMJ','.windsurf','.codex','claude','agent','22VpOMgG','.codex/skills/lovrabet/SKILL.md','Qoder','通用模板\x20-\x20兜底方案','opencode','.trae','Antigravity\x20IDE','.cursor/skills/rabetbase.md','Cursor\x20IDE','OpenCode','.cline','3597223RDauJJ','CodeBuddy','.codebuddy/skills/lovrabet/SKILL.md','.qoder','Codex','file','Cline\x20IDE','.agent/skills/lovrabet/SKILL.md','1144593lDSYuE','Qoder\x20IDE','trae','4325660MxAygi','.cursor','449466rPWJNN','Trae\x20IDE','windsurf','.codebuddy','qoder','Trae','Codex\x20IDE','.opencode','.windsurf/workflows/rabetbase.md','codex','.claude','Cline','Claude\x20Code','cursor','Antigravity','Windsurf\x20IDE','cline','.opencode/skills/lovrabet/SKILL.md','.qoder/skills/lovrabet/SKILL.md','SKILL.md.tpl','1120968bOGhCh','antigravity','.agent','3556ofWths','.claude/skills/lovrabet/SKILL.md','226040XIWyiK','.cline/skills/lovrabet/SKILL.md','12OYNwSo'];a137_0x1b5c=function(){return _0x46f102;};return a137_0x1b5c();}export const IDE_LIST=[a137_0x2850b3(0x166),a137_0x2850b3(0x172),'cline',a137_0x2850b3(0x16d),a137_0x2850b3(0x15a),a137_0x2850b3(0x15e),a137_0x2850b3(0x13d),'qoder','trae','windsurf',a137_0x2850b3(0x173)];export const ALL_CORE_IDES=[a137_0x2850b3(0x15e),a137_0x2850b3(0x153),a137_0x2850b3(0x172),a137_0x2850b3(0x161),a137_0x2850b3(0x15a),a137_0x2850b3(0x13d),'qoder',a137_0x2850b3(0x16d),a137_0x2850b3(0x14e)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41486a,_0x54a649){const _0x35ef3d=a138_0xb9c0,_0x5966a9=_0x41486a();while(!![]){try{const _0x9d9f24=-parseInt(_0x35ef3d(0x1f2))/0x1*(-parseInt(_0x35ef3d(0x1f4))/0x2)+parseInt(_0x35ef3d(0x209))/0x3+-parseInt(_0x35ef3d(0x207))/0x4*(-parseInt(_0x35ef3d(0x1f6))/0x5)+-parseInt(_0x35ef3d(0x201))/0x6*(-parseInt(_0x35ef3d(0x1ff))/0x7)+parseInt(_0x35ef3d(0x1f5))/0x8+parseInt(_0x35ef3d(0x1f7))/0x9+-parseInt(_0x35ef3d(0x208))/0xa;if(_0x9d9f24===_0x54a649)break;else _0x5966a9['push'](_0x5966a9['shift']());}catch(_0x196ae2){_0x5966a9['push'](_0x5966a9['shift']());}}}(a138_0x2040,0xb54db));import{execFileSync}from'node:child_process';function a138_0x2040(){const _0x280c1f=['join','stderr','1414210ZcUkti','resolve','2NqnaKg','11224936ykyNiq','35VTlRbb','2809629pRRbuf','toString','jq.exe','win32','dirname','bin','code','test','3376093GiFyNA','e.g.\x20brew\x20install\x20jq\x20—\x20or\x20npm\x20install\x20with\x20scripts\x20enabled\x20so\x20node-jq\x20can\x20download\x20jq','12twXKuT','jq:\x20','platform','pipe','utf8','trim','380676sNmoBO','49722890IIKHac','2863857BPkVuN','ENOENT','message'];a138_0x2040=function(){return _0x280c1f;};return a138_0x2040();}import{existsSync}from'node:fs';import{createRequire}from'node:module';import a138_0x448528 from'node:path';import{CliErrors}from'../errors.js';const MAX_BUFFER=0x32*0x400*0x400;function a138_0xb9c0(_0x5f4105,_0x6e5e04){_0x5f4105=_0x5f4105-0x1f0;const _0x204032=a138_0x2040();let _0xb9c032=_0x204032[_0x5f4105];return _0xb9c032;}function resolveJqBinary(){const _0x301c45=a138_0xb9c0;try{const _0x3204e7=createRequire(import.meta.url),_0xaf1eae=a138_0x448528[_0x301c45(0x1fb)](_0x3204e7[_0x301c45(0x1f3)]('node-jq/package.json')),_0xa5975e=a138_0x448528['join'](_0xaf1eae,_0x301c45(0x1fc)),_0xbc247=process[_0x301c45(0x203)]===_0x301c45(0x1fa)?_0x301c45(0x1f9):'jq',_0x2a1566=a138_0x448528[_0x301c45(0x1f0)](_0xa5975e,_0xbc247);if(existsSync(_0x2a1566))return _0x2a1566;}catch{}return'jq';}export function applyJqFilter(_0x3d9a5a,_0x3f869a){const _0x47cab1=a138_0xb9c0,_0x3dc96d=resolveJqBinary();try{return execFileSync(_0x3dc96d,[_0x3f869a],{'input':_0x3d9a5a,'encoding':_0x47cab1(0x205),'maxBuffer':MAX_BUFFER,'stdio':[_0x47cab1(0x204),_0x47cab1(0x204),_0x47cab1(0x204)]});}catch(_0x7b1591){const _0x1e697b=_0x7b1591;if(_0x1e697b[_0x47cab1(0x1fd)]===_0x47cab1(0x20a))throw CliErrors['validation']('--jq\x20needs\x20a\x20jq\x20binary.\x20Bundled\x20path\x20(from\x20node-jq)\x20was\x20not\x20found\x20and\x20`jq`\x20is\x20not\x20on\x20PATH.\x20Reinstall\x20dependencies\x20(allow\x20install\x20scripts),\x20set\x20JQ_PATH\x20to\x20a\x20jq\x20executable,\x20or\x20install\x20jq:\x20https://jqlang.org/',_0x47cab1(0x200));const _0x50173d=_0x1e697b[_0x47cab1(0x1f1)]?.[_0x47cab1(0x1f8)]?.()[_0x47cab1(0x206)]()??'',_0x5701e9=(_0x1e697b[_0x47cab1(0x20b)]??String(_0x7b1591))[_0x47cab1(0x206)](),_0x5588de=_0x50173d||_0x5701e9,_0x1cf332=/^\s*jq:/i[_0x47cab1(0x1fe)](_0x5588de)?_0x5588de:_0x47cab1(0x202)+_0x5588de;throw CliErrors['validation'](_0x1cf332);}}
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1fe49d,_0x508e8d){const _0x591d9d=a139_0x5754,_0x156068=_0x1fe49d();while(!![]){try{const _0x54d93f=-parseInt(_0x591d9d(0x182))/0x1*(parseInt(_0x591d9d(0x179))/0x2)+-parseInt(_0x591d9d(0x17f))/0x3+parseInt(_0x591d9d(0x180))/0x4+parseInt(_0x591d9d(0x177))/0x5*(-parseInt(_0x591d9d(0x178))/0x6)+parseInt(_0x591d9d(0x176))/0x7+parseInt(_0x591d9d(0x181))/0x8+parseInt(_0x591d9d(0x17c))/0x9;if(_0x54d93f===_0x508e8d)break;else _0x156068['push'](_0x156068['shift']());}catch(_0x4f30f){_0x156068['push'](_0x156068['shift']());}}}(a139_0x57d4,0x2500e));import{getTemplateBaseUrl}from'../utils/config.js';function a139_0x5754(_0x23f0f,_0x3b83c1){_0x23f0f=_0x23f0f-0x174;const _0x57d4d2=a139_0x57d4();let _0x5754ab=_0x57d4d2[_0x23f0f];return _0x5754ab;}export async function fetchCdnConfig(){const _0x3347ab=a139_0x5754;try{const _0x349760=getTemplateBaseUrl(),_0x43826a=_0x349760+_0x3347ab(0x17a),_0x5de6c3=await fetch(_0x43826a,{'headers':{'Accept':_0x3347ab(0x184)}});if(!_0x5de6c3['ok'])return null;const _0x33cb4e=await _0x5de6c3[_0x3347ab(0x175)]();if(!_0x33cb4e[_0x3347ab(0x183)]?.['stableVersion']||!_0x33cb4e[_0x3347ab(0x17e)]?.[_0x3347ab(0x17b)]?.[_0x3347ab(0x17d)])return null;return _0x33cb4e;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;function a139_0x57d4(){const _0x21d253=['sdk','487872mQTZOd','646488ZBdnXR','1401560cpnoDf','2ShxODd','cli','application/json','now','json','1055250vsRWgi','5TOKPcE','1541172WSLewC','118468XegVZt','/config.json','node','1817577jKrigg','stableVersion'];a139_0x57d4=function(){return _0x21d253;};return a139_0x57d4();}const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x56a31b=a139_0x5754,_0x481972=Date[_0x56a31b(0x174)]();if(cachedConfig&&_0x481972-cacheTime<CACHE_TTL)return cachedConfig;const _0x272542=await fetchCdnConfig();return _0x272542&&(cachedConfig=_0x272542,cacheTime=_0x481972),_0x272542;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a140_0x5a7355=a140_0x5b68;(function(_0x143f90,_0xa0cb51){const _0x854e2f=a140_0x5b68,_0x479f9c=_0x143f90();while(!![]){try{const _0x55474d=-parseInt(_0x854e2f(0x1b2))/0x1+parseInt(_0x854e2f(0x1c7))/0x2*(parseInt(_0x854e2f(0x1c0))/0x3)+-parseInt(_0x854e2f(0x1b9))/0x4*(-parseInt(_0x854e2f(0x1b8))/0x5)+parseInt(_0x854e2f(0x1c1))/0x6+-parseInt(_0x854e2f(0x1d1))/0x7*(-parseInt(_0x854e2f(0x1bb))/0x8)+parseInt(_0x854e2f(0x1ac))/0x9+parseInt(_0x854e2f(0x1b1))/0xa*(-parseInt(_0x854e2f(0x1c5))/0xb);if(_0x55474d===_0xa0cb51)break;else _0x479f9c['push'](_0x479f9c['shift']());}catch(_0x2cbaf7){_0x479f9c['push'](_0x479f9c['shift']());}}}(a140_0x351d,0x51ac7));import a140_0x218a15 from'node:fs';import a140_0x4c37f from'node:path';import a140_0x1e6d74 from'semver';function a140_0x5b68(_0x2f92a7,_0x3cb3c4){_0x2f92a7=_0x2f92a7-0x1ab;const _0x351d74=a140_0x351d();let _0x5b689b=_0x351d74[_0x2f92a7];return _0x5b689b;}import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a140_0x5a7355(0x1ae);function isNonNumericVersion(_0x5c9314){const _0x19a3b1=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x19a3b1['some'](_0x563d7f=>_0x563d7f['test'](_0x5c9314));}function getInstalledVersion(_0x201833,_0x5f299e){const _0x278b6f=a140_0x5a7355;try{const _0x4b84b3=a140_0x4c37f[_0x278b6f(0x1bd)](_0x201833,'node_modules',_0x5f299e,'package.json');if(a140_0x218a15[_0x278b6f(0x1b5)](_0x4b84b3)){const _0x3aa903=JSON['parse'](a140_0x218a15['readFileSync'](_0x4b84b3,_0x278b6f(0x1b7)));return _0x3aa903[_0x278b6f(0x1ba)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x5ccac7=a140_0x5a7355;try{const _0x8a45b6=await getCdnConfig();return _0x8a45b6?.[_0x5ccac7(0x1ab)]?.[_0x5ccac7(0x1c8)]?.[_0x5ccac7(0x1ce)]||null;}catch{return null;}}function a140_0x351d(){const _0x4fb449=['npm\x20install\x20','devDependencies','55BjoDsO','parse','14dzPiBH','node','utf8','\x20\x20\x20Current\x20version:\x20','readFileSync','@lovrabet/sdk','packageName','stableVersion','latest','log','42833krtkjb','\x1b[1m','sdk','3085569JpCVKy','dependencies','1.2.0','\x20\x20\x20Upgrade\x20command:\x20','\x20\x20\x20Stable\x20version:\x20','2199370payHWz','476624yUzBTR','\x1b[33m','\x1b[0m','existsSync','all','utf-8','1073115AdomLc','8GGRgEL','version','568RmpCAO','package.json','join','coerce','↪\x20SDK\x20update\x20available','86283UBIedn','3017886XPjJUg','minVersion'];a140_0x351d=function(){return _0x4fb449;};return a140_0x351d();}async function getSdkPackageName(){const _0x31011d=a140_0x5a7355;try{const _0x5457d2=await getCdnConfig();return _0x5457d2?.[_0x31011d(0x1ab)]?.[_0x31011d(0x1c8)]?.[_0x31011d(0x1cd)]||_0x31011d(0x1cc);}catch{return _0x31011d(0x1cc);}}export async function checkSdkVersion(_0x279797){const _0x5ac57b=a140_0x5a7355,_0x327416=a140_0x4c37f[_0x5ac57b(0x1bd)](_0x279797,_0x5ac57b(0x1bc)),[_0x3a6e63,_0x3e8d13]=await Promise[_0x5ac57b(0x1b6)]([getSdkStableVersion(),getSdkPackageName()]),_0x47544a=_0x3a6e63||FALLBACK_MIN_SDK_VERSION;if(!a140_0x218a15[_0x5ac57b(0x1b5)](_0x327416))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x47544a,'packageName':_0x3e8d13,'stableVersion':_0x3a6e63};try{const _0x255e2c=JSON[_0x5ac57b(0x1c6)](a140_0x218a15[_0x5ac57b(0x1cb)](_0x327416,_0x5ac57b(0x1c9))),_0x32792e=_0x255e2c[_0x5ac57b(0x1ad)]||{},_0x52da83=_0x255e2c[_0x5ac57b(0x1c4)]||{},_0x1a341a=_0x32792e[_0x3e8d13]||_0x52da83[_0x3e8d13];if(!_0x1a341a)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x47544a,'packageName':_0x3e8d13,'stableVersion':_0x3a6e63};let _0x3d1c0e=getInstalledVersion(_0x279797,_0x3e8d13);!_0x3d1c0e&&(_0x3d1c0e=_0x1a341a);if(isNonNumericVersion(_0x1a341a))return{'installed':!![],'version':_0x3d1c0e,'needsUpgrade':![],'minVersion':_0x47544a,'packageName':_0x3e8d13,'stableVersion':_0x3a6e63};const _0x3aebdd=a140_0x1e6d74[_0x5ac57b(0x1be)](_0x3d1c0e),_0x547519=a140_0x1e6d74[_0x5ac57b(0x1be)](_0x47544a),_0x582f52=_0x3aebdd&&_0x547519?a140_0x1e6d74['lt'](_0x3aebdd,_0x547519):![];return{'installed':!![],'version':_0x3d1c0e,'needsUpgrade':_0x582f52,'minVersion':_0x47544a,'packageName':_0x3e8d13,'stableVersion':_0x3a6e63};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x47544a,'packageName':_0x3e8d13,'stableVersion':_0x3a6e63};}}export function checkSdkVersionSync(_0x4d2c23){const _0x24a541=a140_0x5a7355,_0x5ef299=a140_0x4c37f[_0x24a541(0x1bd)](_0x4d2c23,'package.json'),_0x11d090=_0x24a541(0x1cc);if(!a140_0x218a15[_0x24a541(0x1b5)](_0x5ef299))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x11d090,'stableVersion':null};try{const _0x55ab24=JSON[_0x24a541(0x1c6)](a140_0x218a15[_0x24a541(0x1cb)](_0x5ef299,_0x24a541(0x1c9))),_0x3595e0=_0x55ab24[_0x24a541(0x1ad)]||{},_0x3e4b52=_0x55ab24[_0x24a541(0x1c4)]||{},_0x4aceaf=_0x3595e0[_0x11d090]||_0x3e4b52[_0x11d090];if(!_0x4aceaf)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x11d090,'stableVersion':null};let _0x10a8bf=getInstalledVersion(_0x4d2c23,_0x11d090);!_0x10a8bf&&(_0x10a8bf=_0x4aceaf);if(isNonNumericVersion(_0x4aceaf))return{'installed':!![],'version':_0x10a8bf,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x11d090,'stableVersion':null};const _0x3a9dc4=a140_0x1e6d74[_0x24a541(0x1be)](_0x10a8bf),_0x31e7f6=_0x3a9dc4?a140_0x1e6d74['lt'](_0x3a9dc4,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x10a8bf,'needsUpgrade':_0x31e7f6,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x11d090,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x11d090,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x37d73a){const _0x23c2f8=a140_0x5a7355;if(!_0x37d73a['needsUpgrade'])return;const _0x15beb1=_0x23c2f8(0x1b3),_0x4d0e86=_0x23c2f8(0x1b4),_0x59e31b=_0x23c2f8(0x1d2),_0x4e51df=_0x37d73a['packageName']||'@lovrabet/sdk',_0x5c92c1=_0x37d73a[_0x23c2f8(0x1ce)]||_0x37d73a[_0x23c2f8(0x1c2)],_0x2459b2=_0x23c2f8(0x1c3)+_0x4e51df+'@'+(_0x5c92c1||_0x23c2f8(0x1cf));console[_0x23c2f8(0x1d0)](),console[_0x23c2f8(0x1d0)](''+_0x15beb1+_0x59e31b+_0x23c2f8(0x1bf)+_0x4d0e86),console[_0x23c2f8(0x1d0)](_0x15beb1+_0x23c2f8(0x1ca)+_0x4e51df+'@'+_0x37d73a[_0x23c2f8(0x1ba)]+_0x4d0e86),console[_0x23c2f8(0x1d0)](_0x15beb1+_0x23c2f8(0x1b0)+_0x5c92c1+_0x4d0e86),console[_0x23c2f8(0x1d0)](_0x15beb1+_0x23c2f8(0x1af)+_0x2459b2+_0x4d0e86),console[_0x23c2f8(0x1d0)]();}
|