@lovrabet/rabetbase-cli 2.0.13 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x40c46f,_0x2fc4c4){const _0x4723fa=a122_0x1078,_0x4cc0b4=_0x40c46f();while(!![]){try{const _0x13ec57=-parseInt(_0x4723fa(0x14c))/0x1*(-parseInt(_0x4723fa(0x148))/0x2)+parseInt(_0x4723fa(0x152))/0x3+-parseInt(_0x4723fa(0x151))/0x4*(-parseInt(_0x4723fa(0x12f))/0x5)+-parseInt(_0x4723fa(0x13f))/0x6+parseInt(_0x4723fa(0x12e))/0x7+-parseInt(_0x4723fa(0x149))/0x8*(-parseInt(_0x4723fa(0x146))/0x9)+parseInt(_0x4723fa(0x142))/0xa*(-parseInt(_0x4723fa(0x120))/0xb);if(_0x13ec57===_0x2fc4c4)break;else _0x4cc0b4['push'](_0x4cc0b4['shift']());}catch(_0x1cf582){_0x4cc0b4['push'](_0x4cc0b4['shift']());}}}(a122_0x43a9,0x75679));import{applyJqFilter}from'../utils/apply-jq-filter.js';export function formatOutput(_0x124429,_0x41b496){const _0x301cd1=a122_0x1078,{format:_0x26002a}=_0x41b496;switch(_0x26002a){case _0x301cd1(0x12d):printJson(_0x124429,_0x41b496);break;case _0x301cd1(0x154):printCompress(_0x124429,_0x41b496);break;case'pretty':default:printPretty(_0x124429,_0x41b496);break;}}function buildEnvelope(_0x4764f8,_0x408655){const _0x3bddd7=a122_0x1078,_0x335c0a={'ok':_0x4764f8['ok'],'command':_0x408655[_0x3bddd7(0x140)],'risk':_0x408655[_0x3bddd7(0x127)]};if(_0x408655[_0x3bddd7(0x131)])_0x335c0a[_0x3bddd7(0x131)]=!![];if(_0x4764f8['data']!==undefined)_0x335c0a[_0x3bddd7(0x147)]=_0x4764f8['data'];return!_0x4764f8['ok']&&_0x4764f8[_0x3bddd7(0x143)]&&(_0x335c0a[_0x3bddd7(0x13a)]={'code':_0x3bddd7(0x13e),'message':_0x4764f8[_0x3bddd7(0x143)]}),_0x335c0a;}function printJson(_0x3e43da,_0x4e368f){const _0x40e127=buildEnvelope(_0x3e43da,_0x4e368f),_0xf9fc00=JSON['stringify'](_0x40e127,null,0x2)+'\x0a';writeJsonWithOptionalJq(_0xf9fc00,_0x4e368f);}function printCompress(_0x4fd201,_0x5cfa82){const _0x28fa80=a122_0x1078,_0x29336d=buildEnvelope(_0x4fd201,_0x5cfa82),_0x399af1=JSON[_0x28fa80(0x153)](_0x29336d)+'\x0a';writeJsonWithOptionalJq(_0x399af1,_0x5cfa82);}function writeJsonWithOptionalJq(_0xf3cf4a,_0x34c116){const _0x55af24=a122_0x1078,_0xf95285=_0x34c116['jqFilter']?.[_0x55af24(0x126)]();if(!_0xf95285){process[_0x55af24(0x129)][_0x55af24(0x123)](_0xf3cf4a);return;}const _0x51aed3=applyJqFilter(_0xf3cf4a,_0xf95285);process[_0x55af24(0x129)][_0x55af24(0x123)](_0x51aed3['endsWith']('\x0a')?_0x51aed3:_0x51aed3+'\x0a');}function isListWithMetaData(_0xa13676){const _0x173041=a122_0x1078;return typeof _0xa13676===_0x173041(0x135)&&_0xa13676!==null&&'items'in _0xa13676&&Array[_0x173041(0x124)](_0xa13676[_0x173041(0x144)])&&_0x173041(0x13c)in _0xa13676&&typeof _0xa13676[_0x173041(0x13c)]===_0x173041(0x135)&&_0xa13676[_0x173041(0x13c)]!==null;}function a122_0x1078(_0x242a0a,_0x5eb2ec){_0x242a0a=_0x242a0a-0x11e;const _0x43a9af=a122_0x43a9();let _0x1078f6=_0x43a9af[_0x242a0a];return _0x1078f6;}function printAppListMeta(_0x5c80fc){const _0x4a5aa2=a122_0x1078;if(_0x5c80fc[_0x4a5aa2(0x11e)]){const _0x426ee5=_0x5c80fc[_0x4a5aa2(0x132)]!=null?String(_0x5c80fc['configPath']):_0x4a5aa2(0x12a);console[_0x4a5aa2(0x145)](_0x4a5aa2(0x130)+String(_0x5c80fc[_0x4a5aa2(0x11e)])),console['log']('\x20\x20Config:\x20\x20\x20'+_0x426ee5),console['log']();return;}const _0x24da86=_0x5c80fc[_0x4a5aa2(0x121)]!=null?String(_0x5c80fc[_0x4a5aa2(0x121)]):_0x4a5aa2(0x12a),_0x370ffc=_0x5c80fc[_0x4a5aa2(0x139)]!=null?String(_0x5c80fc[_0x4a5aa2(0x139)]):_0x4a5aa2(0x12a),_0x2215cf=_0x5c80fc[_0x4a5aa2(0x122)]!=null?String(_0x5c80fc[_0x4a5aa2(0x122)]):'(none)',_0x38ca60=_0x5c80fc[_0x4a5aa2(0x14f)],_0x56e144=_0x38ca60===_0x4a5aa2(0x128)?_0x4a5aa2(0x138):_0x38ca60===_0x4a5aa2(0x12c)?_0x4a5aa2(0x14a):'';console['log'](_0x4a5aa2(0x137)+_0x24da86),console['log']('\x20\x20Project\x20config:\x20\x20'+_0x370ffc),console[_0x4a5aa2(0x145)](_0x4a5aa2(0x125)+_0x2215cf+_0x56e144),console[_0x4a5aa2(0x145)]();}function a122_0x43a9(){const _0x4dc346=['\x20\x20Default\x20app:\x20\x20\x20\x20\x20','trim','risk','project','stdout','(none)','\x20items:\x0a','global','json','382466OiqxiP','319645RUuOoz','\x20\x20Scope:\x20\x20\x20\x20','dryRun','configPath','(empty)','entries','object','length','\x20\x20Global\x20config:\x20\x20\x20','\x20(default\x20from\x20project\x20file)','projectPath','error','map','meta','padEnd','command_error','2233092eTigVn','command','keys','9102110kypojX','message','items','log','2993211VLXBNb','data','4eXriWJ','8ZilczN','\x20(default\x20from\x20global\x20file)','[dry-run]\x20Would\x20execute:','28617QfkNYi','max','Error:\x20','defaultAppSource','Unknown\x20error','40eXDliU','2038623xhhrTw','stringify','compress','scope','filter','11sfyZuh','globalPath','defaultApp','write','isArray'];a122_0x43a9=function(){return _0x4dc346;};return a122_0x43a9();}function printPretty(_0x4dde0e,_0xc05fc4){const _0x2b9992=a122_0x1078;if(_0xc05fc4['dryRun']){console['log'](_0x2b9992(0x14b)),console[_0x2b9992(0x145)](JSON[_0x2b9992(0x153)](_0x4dde0e[_0x2b9992(0x147)],null,0x2));return;}if(!_0x4dde0e['ok']){console[_0x2b9992(0x13a)](_0x2b9992(0x14e)+(_0x4dde0e['message']??_0x2b9992(0x150)));return;}const _0x5404d1=_0x4dde0e[_0x2b9992(0x147)];if(_0x5404d1===undefined||_0x5404d1===null){if(_0x4dde0e['message'])console[_0x2b9992(0x145)](_0x4dde0e[_0x2b9992(0x143)]);return;}if(isListWithMetaData(_0x5404d1)){printAppListMeta(_0x5404d1[_0x2b9992(0x13c)]),printArrayPretty(_0x5404d1[_0x2b9992(0x144)]);return;}if(Array['isArray'](_0x5404d1)){printArrayPretty(_0x5404d1);return;}if(typeof _0x5404d1===_0x2b9992(0x135)){printObjectPretty(_0x5404d1);return;}console[_0x2b9992(0x145)](String(_0x5404d1));}function printObjectPretty(_0x3fdcb3){const _0x1148fe=a122_0x1078,_0x25025f=Math['max'](...Object[_0x1148fe(0x141)](_0x3fdcb3)[_0x1148fe(0x13b)](_0x173ab2=>_0x173ab2['length']),0x0);for(const [_0x42d933,_0x225b00]of Object[_0x1148fe(0x134)](_0x3fdcb3)){if(_0x225b00===undefined||_0x225b00===null)continue;const _0x4a2b06=_0x42d933[_0x1148fe(0x13d)](_0x25025f);typeof _0x225b00===_0x1148fe(0x135)?console[_0x1148fe(0x145)](_0x4a2b06+'\x20\x20'+JSON[_0x1148fe(0x153)](_0x225b00)):console[_0x1148fe(0x145)](_0x4a2b06+'\x20\x20'+_0x225b00);}}function printArrayPretty(_0x33234f){const _0x136e91=a122_0x1078;if(_0x33234f[_0x136e91(0x136)]===0x0){console[_0x136e91(0x145)](_0x136e91(0x133));return;}console[_0x136e91(0x145)]('Found\x20'+_0x33234f[_0x136e91(0x136)]+_0x136e91(0x12b));for(const _0x38827d of _0x33234f){if(typeof _0x38827d===_0x136e91(0x135)&&_0x38827d!==null){const _0x378c61=Object['entries'](_0x38827d)[_0x136e91(0x11f)](([,_0xf8adc1])=>_0xf8adc1!=null&&_0xf8adc1!=='');if(_0x378c61[_0x136e91(0x136)]===0x0)continue;const _0x7bc2be=Math[_0x136e91(0x14d)](..._0x378c61[_0x136e91(0x13b)](([_0x1cac99])=>_0x1cac99[_0x136e91(0x136)]));for(const [_0x1b618c,_0x182bcc]of _0x378c61){const _0x5364b5=typeof _0x182bcc==='object'?JSON['stringify'](_0x182bcc):String(_0x182bcc);console[_0x136e91(0x145)]('\x20\x20'+_0x1b618c[_0x136e91(0x13d)](_0x7bc2be)+'\x20\x20'+_0x5364b5);}console[_0x136e91(0x145)]('');}else console[_0x136e91(0x145)]('\x20\x20'+_0x38827d);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xd6bfb3,_0x1b7781){var _0x4b3365=a123_0x42ad,_0x552917=_0xd6bfb3();while(!![]){try{var _0x2c773f=-parseInt(_0x4b3365(0x1e0))/0x1+parseInt(_0x4b3365(0x1dd))/0x2+-parseInt(_0x4b3365(0x1d9))/0x3*(parseInt(_0x4b3365(0x1df))/0x4)+parseInt(_0x4b3365(0x1da))/0x5*(-parseInt(_0x4b3365(0x1dc))/0x6)+parseInt(_0x4b3365(0x1de))/0x7+-parseInt(_0x4b3365(0x1d6))/0x8+parseInt(_0x4b3365(0x1db))/0x9;if(_0x2c773f===_0x1b7781)break;else _0x552917['push'](_0x552917['shift']());}catch(_0x1cb060){_0x552917['push'](_0x552917['shift']());}}}(a123_0x2454,0x5a585));function a123_0x42ad(_0x968ad6,_0x57ab98){_0x968ad6=_0x968ad6-0x1d6;var _0x24548d=a123_0x2454();var _0x42ad29=_0x24548d[_0x968ad6];return _0x42ad29;}export function extractList(_0x2ad875){var _0x53d8e7=a123_0x42ad;if(Array[_0x53d8e7(0x1e1)](_0x2ad875))return _0x2ad875;if(_0x2ad875&&typeof _0x2ad875===_0x53d8e7(0x1d8))return _0x2ad875[_0x53d8e7(0x1e2)]??[];return[];}export function extractPaging(_0x46167c){var _0x4ac2da=a123_0x42ad;if(_0x46167c&&typeof _0x46167c===_0x4ac2da(0x1d8)&&!Array['isArray'](_0x46167c))return _0x46167c[_0x4ac2da(0x1d7)];return undefined;}function a123_0x2454(){var _0x43cfe8=['4765GkEEKm','5990184MRqZPL','696umUCYA','729194srRITA','3088428SHzzPP','1319596HNdZtx','123349FPkrFO','isArray','tableData','4300224nmpOeN','paging','object','3Jhgkao'];a123_0x2454=function(){return _0x43cfe8;};return a123_0x2454();}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a124_0x3d64(_0x9422ab,_0x104f1e){_0x9422ab=_0x9422ab-0x16e;const _0x461aff=a124_0x461a();let _0x3d6494=_0x461aff[_0x9422ab];return _0x3d6494;}(function(_0x469ac6,_0xf4d4c9){const _0xfbab23=a124_0x3d64,_0x505e30=_0x469ac6();while(!![]){try{const _0x3eb2ef=-parseInt(_0xfbab23(0x17b))/0x1*(-parseInt(_0xfbab23(0x172))/0x2)+parseInt(_0xfbab23(0x177))/0x3+parseInt(_0xfbab23(0x1b5))/0x4*(-parseInt(_0xfbab23(0x175))/0x5)+-parseInt(_0xfbab23(0x19c))/0x6*(-parseInt(_0xfbab23(0x1b9))/0x7)+-parseInt(_0xfbab23(0x174))/0x8+-parseInt(_0xfbab23(0x1ad))/0x9*(-parseInt(_0xfbab23(0x178))/0xa)+-parseInt(_0xfbab23(0x1b2))/0xb;if(_0x3eb2ef===_0xf4d4c9)break;else _0x505e30['push'](_0x505e30['shift']());}catch(_0x2866f7){_0x505e30['push'](_0x505e30['shift']());}}}(a124_0x461a,0xcd0a3));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';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_API_DIR}from'../constant/paths.js';export async function runCommand(_0x407ab0,_0x452555){const _0x2293d2=a124_0x3d64,_0xba2b81=CLI_BIN_NAME+'\x20'+_0x407ab0[_0x2293d2(0x1ac)]+'\x20'+_0x407ab0[_0x2293d2(0x17a)],_0x1706b0=parseFlags(_0x407ab0[_0x2293d2(0x18b)],_0x452555['rawFlags']);validateFlags(_0x407ab0[_0x2293d2(0x18b)],_0x1706b0,_0xba2b81);if(!_0x1706b0[_0x2293d2(0x18d)]&&_0x452555[_0x2293d2(0x1b7)]&&riskLevelOrder(_0x407ab0[_0x2293d2(0x1af)])>riskLevelOrder(_0x452555[_0x2293d2(0x1b7)])){if(_0x452555[_0x2293d2(0x17f)])throw CliErrors['validation'](_0x2293d2(0x190)+_0xba2b81+_0x2293d2(0x1b6)+_0x407ab0[_0x2293d2(0x1af)]+_0x2293d2(0x173)+_0x452555[_0x2293d2(0x1b7)]+'\x22.');throw CliErrors[_0x2293d2(0x171)](_0x2293d2(0x190)+_0xba2b81+_0x2293d2(0x1b6)+_0x407ab0[_0x2293d2(0x1af)]+'\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22'+_0x452555[_0x2293d2(0x1b7)]+'\x22.\x0a'+(_0x2293d2(0x1a1)+_0x407ab0['risk']+'\x22.\x20visit\x20https://qizhiyuntu.feishu.cn/docx/JTiOdxQlXo2dQLxXVu6ctutcnme\x20for\x20more\x20information.'));}const _0x258e76=_0x452555['apiDir']||DEFAULT_API_DIR;resolveAliasToCode(_0x407ab0,_0x1706b0,_0x258e76,_0xba2b81);let _0xba5e6='';if(_0x407ab0['requiresAuth']!==![]){_0xba5e6=_0x452555[_0x2293d2(0x188)]();if(!_0xba5e6)throw CliErrors[_0x2293d2(0x19e)]();const {setActiveCookie:_0x1887ab}=await import(_0x2293d2(0x18f));_0x1887ab(_0xba5e6);}let _0x5bbafa='';if(_0x407ab0[_0x2293d2(0x192)]!==![]){_0x5bbafa=_0x452555[_0x2293d2(0x17d)]()??'';if(!_0x5bbafa)throw CliErrors[_0x2293d2(0x1a7)](_0x2293d2(0x1aa)+CLI_BIN_NAME+_0x2293d2(0x1a4));}let _0x20eab0=resolveFormat(_0x1706b0,_0x407ab0,_0x452555[_0x2293d2(0x179)]);const _0x59ae9c=resolveJqFilter(_0x1706b0);_0x59ae9c&&_0x20eab0===_0x2293d2(0x1a3)&&(_0x20eab0='json');if(_0x59ae9c&&_0x20eab0!==_0x2293d2(0x17c)&&_0x20eab0!==_0x2293d2(0x1b4))throw CliErrors['validation'](_0x2293d2(0x197)+_0x20eab0+').');const _0x465109=buildRuntimeContext({'appCode':_0x5bbafa,'cookie':_0xba5e6,'apiDomain':_0x452555[_0x2293d2(0x16f)](),'format':_0x20eab0,'jqFilter':_0x59ae9c,'flags':_0x1706b0,'def':_0x407ab0,'nonInteractive':_0x452555[_0x2293d2(0x17f)],'defaultPageSize':_0x452555[_0x2293d2(0x18c)],'defaultVerbose':_0x452555[_0x2293d2(0x198)],'apiDir':_0x258e76,'selectedAppName':_0x452555[_0x2293d2(0x185)],'args':_0x452555[_0x2293d2(0x195)]??[]});_0x407ab0[_0x2293d2(0x191)]&&await _0x407ab0['validate'](_0x465109);if(_0x1706b0[_0x2293d2(0x18d)]){if(!_0x407ab0['dryRun'])throw CliErrors[_0x2293d2(0x171)](_0x2293d2(0x181)+_0xba2b81+'`.');const _0x549da8=await _0x407ab0[_0x2293d2(0x1b1)](_0x465109);formatOutput({'ok':!![],'data':_0x549da8},{'command':_0xba2b81,'risk':_0x407ab0['risk'],'format':_0x20eab0,'dryRun':!![],'jqFilter':_0x59ae9c});return;}if(_0x407ab0[_0x2293d2(0x1af)]===_0x2293d2(0x1a6)&&!_0x1706b0['yes']){if(_0x452555[_0x2293d2(0x17f)])throw CliErrors['validation'](_0x2293d2(0x193)+_0xba2b81+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.');await requireConfirmation(_0xba2b81);}const _0x21fc43=await _0x407ab0[_0x2293d2(0x18e)](_0x465109);formatOutput(_0x21fc43,{'command':_0xba2b81,'risk':_0x407ab0[_0x2293d2(0x1af)],'format':_0x20eab0,'jqFilter':_0x59ae9c});}function a124_0x461a(){const _0x206754=['compress','4OSowRo','`\x20has\x20risk\x20level\x20\x22','riskLevel','No\x20api.ts\x20found\x20in\x20','9627051sYfLdp','type','resolveApiDomain','createInterface','validation','22HFrRlg','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','7295120vMflLT','6579085ieGYFT','join','2269998FsKBCr','9881150zLBPSv','defaultFormat','command','28319SwnAKW','json','resolveAppCode','apiDir','isNonInteractive','number','--dry-run\x20is\x20not\x20supported\x20for\x20`','stdin','map','hasFormat','selectedAppName','length','some','resolveCookie','code','trim','flags','defaultPageSize','dry-run','execute','../core/api-client.js','Command\x20`','validate','requiresAppCode','High-risk\x20operation\x20`','string','args','toLowerCase','--jq\x20only\x20applies\x20with\x20--format\x20json\x20or\x20--format\x20compress\x20(current:\x20','defaultVerbose','yes','apiDomain','verbose','6AQixcp','Unknown\x20alias\x20\x22','authRequired','Available\x20aliases:\x20','format','\x20\x20Edit\x20the\x20config\x20file\x20manually\x20and\x20set\x20riskLevel\x20to\x20\x22','\x22.\x20','pretty','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','\x20api\x20pull`\x20first.','high-risk-write','configMissing','nonInteractive','question','Set\x20appcode\x20via\x20`','appCode','service','9yDpnRd','stderr','risk','name','dryRun','4004363NUAvha','alias'];a124_0x461a=function(){return _0x206754;};return a124_0x461a();}function buildRuntimeContext(_0x29926f){const _0x35448c=a124_0x3d64,{flags:_0x463117,def:_0x46a443}=_0x29926f,_0x5d8257=CLI_BIN_NAME+'\x20'+_0x46a443[_0x35448c(0x1ac)]+'\x20'+_0x46a443[_0x35448c(0x17a)];return{'appCode':_0x29926f[_0x35448c(0x1ab)],'cookie':_0x29926f['cookie'],'apiDomain':_0x29926f[_0x35448c(0x19a)],'format':_0x29926f[_0x35448c(0x1a0)],'nonInteractive':_0x29926f[_0x35448c(0x1a8)],'apiDir':_0x29926f[_0x35448c(0x17e)],'selectedAppName':_0x29926f[_0x35448c(0x185)],'args':_0x29926f[_0x35448c(0x195)],'str'(_0x2b25dd){return String(_0x463117[_0x2b25dd]??'');},'bool'(_0x49801d){const _0x581797=_0x35448c;if(_0x463117[_0x49801d]===!![])return!![];if(_0x49801d===_0x581797(0x19b)&&_0x29926f[_0x581797(0x198)])return!![];return![];},'num'(_0x374216,_0x634843){const _0x11b229=_0x35448c,_0x5a61dc=_0x463117[_0x374216];if(typeof _0x5a61dc===_0x11b229(0x180))return _0x5a61dc;if(_0x374216==='pagesize'&&_0x29926f[_0x11b229(0x18c)]!=null)return _0x29926f['defaultPageSize'];return _0x634843??0x0;},'flag'(_0x5716f0){return _0x463117[_0x5716f0];},'output'(_0x301ff8){const _0x1fbb69=_0x35448c;formatOutput(_0x301ff8,{'command':_0x5d8257,'risk':_0x46a443[_0x1fbb69(0x1af)],'format':_0x29926f[_0x1fbb69(0x1a0)],'jqFilter':_0x29926f['jqFilter']});}};}function resolveJqFilter(_0x2ede94){const _0xbcb94b=a124_0x3d64,_0x5c4e52=_0x2ede94['jq'];if(_0x5c4e52===undefined||_0x5c4e52===null)return undefined;const _0xcd753=String(_0x5c4e52)[_0xbcb94b(0x18a)]();return _0xcd753===''?undefined:_0xcd753;}function resolveFormat(_0x59b6cd,_0x63b714,_0x5f3ff9){const _0x2b6901=a124_0x3d64;if(_0x63b714[_0x2b6901(0x184)]===![])return'pretty';const _0x1c4117=normalizeLegacyOutputFormat(_0x59b6cd[_0x2b6901(0x1a0)]);if(_0x1c4117)return _0x1c4117;const _0x138ec1=normalizeLegacyOutputFormat(_0x5f3ff9);if(_0x138ec1)return _0x138ec1;const _0x2cf01a=normalizeLegacyOutputFormat(_0x63b714['defaultOutputFormat']);if(_0x2cf01a)return _0x2cf01a;return _0x2b6901(0x1b4);}async function requireConfirmation(_0x343d1a){const _0x10b0e2=a124_0x3d64,_0x29b53d=await import('node:readline'),_0xbc405=_0x29b53d[_0x10b0e2(0x170)]({'input':process[_0x10b0e2(0x182)],'output':process[_0x10b0e2(0x1ae)]});return new Promise((_0x5ad845,_0x2a7fb7)=>{const _0x44e0fc=_0x10b0e2;_0xbc405[_0x44e0fc(0x1a9)]('⚠\x20\x20High-risk\x20operation:\x20'+_0x343d1a+'\x0a\x20\x20\x20Continue?\x20[y/N]\x20',_0xeb2fed=>{const _0x447e54=_0x44e0fc;_0xbc405['close'](),_0xeb2fed[_0x447e54(0x196)]()==='y'||_0xeb2fed[_0x447e54(0x196)]()===_0x447e54(0x199)?_0x5ad845():_0x2a7fb7(CliErrors['cancelled']('Operation\x20cancelled\x20by\x20user.'));});});}function resolveAliasToCode(_0x4cbbc0,_0x5ab3d1,_0x3a1047,_0x4d2dce){const _0x14b005=a124_0x3d64,_0x44c1a5=_0x4cbbc0[_0x14b005(0x18b)]['some'](_0x53ddb2=>_0x53ddb2[_0x14b005(0x1b0)]==='code'&&_0x53ddb2[_0x14b005(0x16e)]==='string'),_0x4c3258=_0x4cbbc0[_0x14b005(0x18b)][_0x14b005(0x187)](_0x45a3d0=>_0x45a3d0[_0x14b005(0x1b0)]==='alias'&&_0x45a3d0[_0x14b005(0x16e)]===_0x14b005(0x194));if(!_0x44c1a5||!_0x4c3258)return;const _0x1a70ea=_0x5ab3d1['code']?String(_0x5ab3d1[_0x14b005(0x189)]):'',_0xfb442b=_0x5ab3d1[_0x14b005(0x1b3)]?String(_0x5ab3d1['alias']):'';if(!_0x1a70ea&&!_0xfb442b)throw CliErrors[_0x14b005(0x171)]('`'+_0x4d2dce+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0xfb442b&&!_0x1a70ea){const _0x54762e=resolveAlias(_0x3a1047,_0xfb442b);if(!_0x54762e){const _0x49510f=listAliases(_0x3a1047)[_0x14b005(0x183)](_0x38439a=>_0x38439a[_0x14b005(0x1b3)]),_0x1101ec=_0x49510f[_0x14b005(0x186)]?_0x14b005(0x19f)+_0x49510f[_0x14b005(0x176)](',\x20'):_0x14b005(0x1b8)+_0x3a1047+'.\x20Run\x20`'+CLI_BIN_NAME+_0x14b005(0x1a5);throw CliErrors[_0x14b005(0x171)](_0x14b005(0x19d)+_0xfb442b+_0x14b005(0x1a2)+_0x1101ec);}_0x5ab3d1[_0x14b005(0x189)]=_0x54762e;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x72cc6c,_0x2e4016){const _0x1df472=a125_0x3789,_0x50e2c4=_0x72cc6c();while(!![]){try{const _0x3374a1=parseInt(_0x1df472(0x11d))/0x1+-parseInt(_0x1df472(0x131))/0x2*(parseInt(_0x1df472(0x11c))/0x3)+-parseInt(_0x1df472(0x111))/0x4*(-parseInt(_0x1df472(0x11b))/0x5)+-parseInt(_0x1df472(0x11e))/0x6*(-parseInt(_0x1df472(0x132))/0x7)+parseInt(_0x1df472(0x122))/0x8+-parseInt(_0x1df472(0x129))/0x9*(-parseInt(_0x1df472(0x123))/0xa)+-parseInt(_0x1df472(0x127))/0xb;if(_0x3374a1===_0x2e4016)break;else _0x50e2c4['push'](_0x50e2c4['shift']());}catch(_0xc4be8){_0x50e2c4['push'](_0x50e2c4['shift']());}}}(a125_0x1afb,0x19db3));import{buildAllFlags}from'../framework/build-all-flags.js';function a125_0x3789(_0x5c1334,_0x2638fa){_0x5c1334=_0x5c1334-0x110;const _0x1afb50=a125_0x1afb();let _0x37895f=_0x1afb50[_0x5c1334];return _0x37895f;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{VERSION,GIT_COMMIT}from'../generated/build-info.js';function serializeFlag(_0x3a51c2){const _0xc318ea=a125_0x3789,_0x2596f6={'name':_0x3a51c2[_0xc318ea(0x128)],'type':_0x3a51c2['type'],'description':_0x3a51c2[_0xc318ea(0x113)]};if(_0x3a51c2[_0xc318ea(0x115)]!==undefined)_0x2596f6[_0xc318ea(0x115)]=_0x3a51c2['required'];if(_0x3a51c2[_0xc318ea(0x134)]!==undefined)_0x2596f6[_0xc318ea(0x134)]=_0x3a51c2[_0xc318ea(0x134)];if(_0x3a51c2['enum']&&_0x3a51c2['enum'][_0xc318ea(0x121)]>0x0)_0x2596f6['enum']=_0x3a51c2[_0xc318ea(0x126)];if(_0x3a51c2[_0xc318ea(0x117)])_0x2596f6[_0xc318ea(0x117)]=_0x3a51c2['alias'];if(_0x3a51c2[_0xc318ea(0x12c)])_0x2596f6[_0xc318ea(0x12c)]=_0x3a51c2[_0xc318ea(0x12c)];return _0x3a51c2['pattern']&&(_0x2596f6[_0xc318ea(0x110)]={'source':_0x3a51c2['pattern'][_0xc318ea(0x125)][_0xc318ea(0x133)],'flags':_0x3a51c2[_0xc318ea(0x110)][_0xc318ea(0x125)]['flags'],'description':_0x3a51c2[_0xc318ea(0x110)][_0xc318ea(0x113)]}),_0x2596f6;}function serializeHelpExtra(_0x4df754){const _0x1b453f=a125_0x3789;if(_0x4df754['helpExtra']===undefined)return undefined;if(typeof _0x4df754['helpExtra']===_0x1b453f(0x116))return{'dynamic':!![]};return _0x4df754[_0x1b453f(0x120)];}function a125_0x1afb(){const _0x44b968=['push','256104pNqRpL','1393609GXALnD','source','default','wildcardDef','commands','pattern','285836JKvSHp','service','description','args','required','function','alias','../commands/registry.js','risk','defaultCommand','5hQNYyi','3asQmWv','116262YAsXSW','6voyocx','command','helpExtra','length','1689976MiQQdt','8540dCfhMU','map','regex','enum','4831728YLDVgV','name','792bvDIqY','trim','hint','hidden','type','isSingleCommand','label'];a125_0x1afb=function(){return _0x44b968;};return a125_0x1afb();}function serializeCommand(_0x32721d,_0x4ba504){const _0x207e06=a125_0x3789,_0x4270b5=_0x32721d['requiresAuth']!==![],_0x372570=_0x32721d['requiresAppCode']!==![],_0x1757fc=_0x32721d['hasFormat']!==![],_0x1e1f05=serializeHelpExtra(_0x32721d);return{'command':_0x4ba504[_0x207e06(0x11f)],'description':_0x4ba504['description'],..._0x4ba504['tag']?{'tag':_0x4ba504['tag'][_0x207e06(0x12a)]()}:{},'risk':_0x32721d[_0x207e06(0x119)],'requiresAuth':_0x4270b5,'requiresAppCode':_0x372570,'hasFormat':_0x1757fc,'supportsDryRun':Boolean(_0x32721d['dryRun']),..._0x32721d[_0x207e06(0x114)]&&_0x32721d[_0x207e06(0x114)][_0x207e06(0x121)]>0x0?{'args':_0x32721d[_0x207e06(0x114)]}:{},'flags':buildAllFlags(_0x32721d)[_0x207e06(0x124)](serializeFlag),..._0x1e1f05!==undefined?{'helpExtra':_0x1e1f05}:{}};}export async function buildSchemaPayload(){const _0x3f552b=a125_0x3789,{serviceRegistry:_0xf16f81,findDefinition:_0x56d4d5}=await import(_0x3f552b(0x118)),_0x412713=[];for(const _0x2c7f96 of _0xf16f81){const _0x5a3840=[];for(const _0x2fd502 of _0x2c7f96[_0x3f552b(0x136)]){const _0x8d8f17=_0x2fd502[_0x3f552b(0x11f)]==='<script>'&&_0x2c7f96['wildcardDef']?_0x2c7f96[_0x3f552b(0x135)]:_0x56d4d5(_0x2c7f96[_0x3f552b(0x112)],_0x2fd502[_0x3f552b(0x11f)]);if(!_0x8d8f17)continue;_0x5a3840[_0x3f552b(0x130)](serializeCommand(_0x8d8f17,_0x2fd502));}_0x412713[_0x3f552b(0x130)]({'service':_0x2c7f96[_0x3f552b(0x112)],'label':_0x2c7f96[_0x3f552b(0x12f)],..._0x2c7f96[_0x3f552b(0x12e)]?{'isSingleCommand':!![]}:{},..._0x2c7f96[_0x3f552b(0x11a)]?{'defaultCommand':_0x2c7f96[_0x3f552b(0x11a)]}:{},'hasWildcard':Boolean(_0x2c7f96[_0x3f552b(0x135)]),'commands':_0x5a3840});}return{'schemaVersion':0x1,'cli':{'bin':CLI_BIN_NAME,'displayName':CLI_DISPLAY_NAME,'version':VERSION,'gitCommit':GIT_COMMIT},'globalFlags':GLOBAL_FLAGS[_0x3f552b(0x124)](_0x4e6f88=>({'name':_0x4e6f88[_0x3f552b(0x128)],'type':_0x4e6f88[_0x3f552b(0x12d)],'description':_0x4e6f88[_0x3f552b(0x113)],..._0x4e6f88['hint']?{'hint':_0x4e6f88[_0x3f552b(0x12b)]}:{},..._0x4e6f88['hidden']?{'hidden':!![]}:{}})),'services':_0x412713};}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a126_0x201f(){const _0x17e258=['390iRDsyv','3HdfGnj','pretty','table','6sHUHot','97182vGBrrU','4015FFUpUW','14964CKDXId','9VecwqA','118018Fybsjy','717335IWrPyi','98204ZXqodi','compress','read','388731bnJrlq','2783280dtVQkV'];a126_0x201f=function(){return _0x17e258;};return a126_0x201f();}(function(_0x1e4ed9,_0x10f6a6){const _0x2d5799=a126_0x5350,_0x5e5bc1=_0x1e4ed9();while(!![]){try{const _0x38eb96=-parseInt(_0x2d5799(0x146))/0x1*(parseInt(_0x2d5799(0x14e))/0x2)+-parseInt(_0x2d5799(0x14d))/0x3*(-parseInt(_0x2d5799(0x140))/0x4)+parseInt(_0x2d5799(0x14f))/0x5*(-parseInt(_0x2d5799(0x149))/0x6)+-parseInt(_0x2d5799(0x143))/0x7+-parseInt(_0x2d5799(0x144))/0x8+parseInt(_0x2d5799(0x14a))/0x9*(parseInt(_0x2d5799(0x145))/0xa)+parseInt(_0x2d5799(0x14b))/0xb*(parseInt(_0x2d5799(0x14c))/0xc);if(_0x38eb96===_0x10f6a6)break;else _0x5e5bc1['push'](_0x5e5bc1['shift']());}catch(_0x3d508a){_0x5e5bc1['push'](_0x5e5bc1['shift']());}}}(a126_0x201f,0x372c9));function a126_0x5350(_0x47e878,_0x11069e){_0x47e878=_0x47e878-0x140;const _0x201ff2=a126_0x201f();let _0x53509e=_0x201ff2[_0x47e878];return _0x53509e;}export function riskLevelOrder(_0x44e5b7){const _0x499f60=a126_0x5350,_0x57f612={'read':0x0,'write':0x1,'high-risk-write':0x2};return _0x57f612[_0x44e5b7??_0x499f60(0x142)]??0x0;}export function isValidFormat(_0x205bd1){const _0x504ce9=a126_0x5350;return _0x205bd1==='json'||_0x205bd1===_0x504ce9(0x147)||_0x205bd1===_0x504ce9(0x141);}export function normalizeLegacyOutputFormat(_0x588851){const _0x51b64b=a126_0x5350;if(_0x588851===_0x51b64b(0x148))return _0x51b64b(0x147);if(isValidFormat(_0x588851))return _0x588851;return undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a127_0x5ebf6a=a127_0x34e2;(function(_0x6fc2fc,_0x2213ff){const _0x37c15e=a127_0x34e2,_0x48b3c4=_0x6fc2fc();while(!![]){try{const _0x311288=-parseInt(_0x37c15e(0x14a))/0x1*(parseInt(_0x37c15e(0x14d))/0x2)+parseInt(_0x37c15e(0x148))/0x3+parseInt(_0x37c15e(0x147))/0x4+parseInt(_0x37c15e(0x142))/0x5+-parseInt(_0x37c15e(0x145))/0x6*(parseInt(_0x37c15e(0x146))/0x7)+parseInt(_0x37c15e(0x144))/0x8*(parseInt(_0x37c15e(0x14c))/0x9)+-parseInt(_0x37c15e(0x149))/0xa;if(_0x311288===_0x2213ff)break;else _0x48b3c4['push'](_0x48b3c4['shift']());}catch(_0x215c2a){_0x48b3c4['push'](_0x48b3c4['shift']());}}}(a127_0x5895,0x8c239));function a127_0x34e2(_0x15e71c,_0x4871b0){_0x15e71c=_0x15e71c-0x142;const _0x589534=a127_0x5895();let _0x34e2d8=_0x589534[_0x15e71c];return _0x34e2d8;}export const VERSION=a127_0x5ebf6a(0x14e);function a127_0x5895(){const _0x772d70=['44UJpqgu','2026-04-09T11:25:15.642Z','1449FQiREl','32050BDeMaF','2.1.1','2292955wMYIpi','v2.1.1','45448rrYoGz','42EgfMBq','238217lLNHDf','4403588HdJHzh','650415RViDIK','11736080pIMmAu'];a127_0x5895=function(){return _0x772d70;};return a127_0x5895();}export const GIT_TAG=a127_0x5ebf6a(0x143);export const GIT_COMMIT='75628b5';export const BUILD_TIME=a127_0x5ebf6a(0x14b);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x473e52,_0x1f5975){var _0x8863bd=a128_0x58fa,_0x28986e=_0x473e52();while(!![]){try{var _0x56ff7d=parseInt(_0x8863bd(0x1ca))/0x1*(parseInt(_0x8863bd(0x1da))/0x2)+parseInt(_0x8863bd(0x1d3))/0x3*(-parseInt(_0x8863bd(0x1cf))/0x4)+-parseInt(_0x8863bd(0x1d8))/0x5*(parseInt(_0x8863bd(0x1d5))/0x6)+-parseInt(_0x8863bd(0x1d7))/0x7*(parseInt(_0x8863bd(0x1ce))/0x8)+-parseInt(_0x8863bd(0x1d6))/0x9+parseInt(_0x8863bd(0x1c9))/0xa+parseInt(_0x8863bd(0x1d4))/0xb*(parseInt(_0x8863bd(0x1cd))/0xc);if(_0x56ff7d===_0x1f5975)break;else _0x28986e['push'](_0x28986e['shift']());}catch(_0x2a5f04){_0x28986e['push'](_0x28986e['shift']());}}}(a128_0x1e48,0xd1e36));import a128_0x4c9ca9 from'chalk';function a128_0x1e48(){var _0x1defb6=['\x20to\x20view\x20available\x20commands.','116ntrYWa','15374680OugTjU','11933wxhHId','\x20--help','log','1499952VeUhZU','410952aURQHf','40384VmdsbS','\x20\x20Use\x20','green','bold','240OsZoXc','88AOgOuM','1686XRpBgG','7644411HzFwqG','14opNDUa','10855FJBnxz'];a128_0x1e48=function(){return _0x1defb6;};return a128_0x1e48();}function a128_0x58fa(_0x35cfc5,_0x43b719){_0x35cfc5=_0x35cfc5-0x1c9;var _0x1e486f=a128_0x1e48();var _0x58fa0b=_0x1e486f[_0x35cfc5];return _0x58fa0b;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0x4e7a9c=a128_0x58fa;console[_0x4e7a9c(0x1cc)](),console[_0x4e7a9c(0x1cc)](a128_0x4c9ca9[_0x4e7a9c(0x1d1)][_0x4e7a9c(0x1d2)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x4e7a9c(0x1cc)](),console['log'](_0x4e7a9c(0x1d0)+a128_0x4c9ca9[_0x4e7a9c(0x1d1)][_0x4e7a9c(0x1d2)](CLI_BIN_NAME+_0x4e7a9c(0x1cb))+_0x4e7a9c(0x1d9)),console['log']();}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a129_0x10d0c9=a129_0x1381;(function(_0xca51d1,_0x5e94b7){const _0x19176e=a129_0x1381,_0x4f1735=_0xca51d1();while(!![]){try{const _0x2f826a=parseInt(_0x19176e(0x1ee))/0x1+parseInt(_0x19176e(0x1e7))/0x2+parseInt(_0x19176e(0x1ec))/0x3+parseInt(_0x19176e(0x1f1))/0x4*(-parseInt(_0x19176e(0x1f0))/0x5)+-parseInt(_0x19176e(0x1f8))/0x6+parseInt(_0x19176e(0x1fe))/0x7*(-parseInt(_0x19176e(0x1e5))/0x8)+-parseInt(_0x19176e(0x1f9))/0x9;if(_0x2f826a===_0x5e94b7)break;else _0x4f1735['push'](_0x4f1735['shift']());}catch(_0x561b40){_0x4f1735['push'](_0x4f1735['shift']());}}}(a129_0x6c56,0x91ea2));import{logger}from'../utils/logger.js';function a129_0x1381(_0x5bfd76,_0x590048){_0x5bfd76=_0x5bfd76-0x1dd;const _0x6c567a=a129_0x6c56();let _0x138113=_0x6c567a[_0x5bfd76];return _0x138113;}import{CLI_BIN_NAME}from'../constant/cli.js';function a129_0x6c56(){const _0x167941=['5QDdDzf','2483868NgoPIN','dangerously-bff-save','has','-$1','\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','exit','不支持的命令:\x20','2776236ehLmkI','4140126RAieip','entries','(empty)','Equivalent\x20command:\x20','\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','6843606NYanAs','push','Error:\x20Unsupported\x20command:\x20','from','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','help','includes','npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global','slice','\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','startsWith','\x20skill\x20--help\x0a\x20\x20','add','argv','8YpscNs','log','2167846dxUwPx','cwd','error','setLogPath','\x0aAvailable\x20commands:','3144039iSniQs','length','987075EsZaar','replace'];a129_0x6c56=function(){return _0x167941;};return a129_0x6c56();}export function camelCaseFlagsToKebab(_0x155f98){const _0x28d4b0=a129_0x1381,_0x1edfb0=[];for(const [_0x3d8eeb,_0x49e0ef]of Object[_0x28d4b0(0x1fa)](_0x155f98)){if(_0x49e0ef===!![]){const _0xee13ab=_0x3d8eeb[_0x28d4b0(0x1ef)](/([A-Z])/g,_0x28d4b0(0x1f4))['toLowerCase']();_0x1edfb0[_0x28d4b0(0x1ff)](_0xee13ab);}}return _0x1edfb0;}export function parseDynamicFlags(){const _0x252c65=a129_0x1381,_0x2373c8=[];for(let _0x3ba355=0x3;_0x3ba355<process[_0x252c65(0x1e4)][_0x252c65(0x1ed)];_0x3ba355++){const _0x2ecf37=process[_0x252c65(0x1e4)][_0x3ba355];if(_0x2ecf37&&_0x2ecf37[_0x252c65(0x1e1)]('--')){const _0x2c2d47=_0x2ecf37[_0x252c65(0x1df)](0x2);_0x2c2d47&&!_0x2c2d47[_0x252c65(0x1dd)]('=')&&_0x2373c8[_0x252c65(0x1ff)](_0x2c2d47);}}return _0x2373c8;}export function getAllProvidedFlags(_0x4a6f80){const _0x475b15=a129_0x1381,_0x33ec5a=camelCaseFlagsToKebab(_0x4a6f80),_0x2d1388=parseDynamicFlags(),_0xea8d41=new Set([..._0x33ec5a,..._0x2d1388]);return Array[_0x475b15(0x201)](_0xea8d41);}export function normalizeLegacyBffSaveFlags(_0x467ab4){const _0x29059c=a129_0x1381,_0xb0e327=new Set(_0x467ab4);return _0xb0e327[_0x29059c(0x1f3)](_0x29059c(0x1f2))&&_0xb0e327[_0x29059c(0x1e3)]('enable-bff-save'),Array[_0x29059c(0x201)](_0xb0e327);}const SKILLS_INSTALL_COMMAND_LINE=a129_0x10d0c9(0x1de);export async function skillsCommand(_0x48f4dc,_0xadbf78,_0x1c2848){const _0x1be7e3=a129_0x10d0c9;logger[_0x1be7e3(0x1ea)](process[_0x1be7e3(0x1e8)]());if(_0x1c2848?.[_0x1be7e3(0x203)]||_0x48f4dc==='--help'){showHelp();return;}console[_0x1be7e3(0x1e9)](_0x1be7e3(0x200)+(_0x48f4dc||_0x1be7e3(0x1fb))),console[_0x1be7e3(0x1e6)](_0x1be7e3(0x1eb)),console[_0x1be7e3(0x1e6)]('\x20\x20'+CLI_BIN_NAME+_0x1be7e3(0x1e0)),console[_0x1be7e3(0x1e6)]('\x20\x20'+CLI_BIN_NAME+_0x1be7e3(0x1f5)),console[_0x1be7e3(0x1e6)](''),console[_0x1be7e3(0x1e6)](_0x1be7e3(0x1fc)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x1be7e3(0x1e9)]('skill',_0x1be7e3(0x1f7)+_0x48f4dc),process[_0x1be7e3(0x1f6)](0x1);}function showHelp(){const _0x334c40=a129_0x10d0c9;console[_0x334c40(0x1e6)](_0x334c40(0x202)+CLI_BIN_NAME+_0x334c40(0x1e2)+CLI_BIN_NAME+_0x334c40(0x1fd)+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x10dca6=a130_0x8ce4;(function(_0x2c800b,_0x4b4965){const _0x14dc9f=a130_0x8ce4,_0x562b04=_0x2c800b();while(!![]){try{const _0x2be0f7=parseInt(_0x14dc9f(0x1b5))/0x1+parseInt(_0x14dc9f(0x1b0))/0x2*(-parseInt(_0x14dc9f(0x19b))/0x3)+parseInt(_0x14dc9f(0x1a8))/0x4+parseInt(_0x14dc9f(0x1af))/0x5+parseInt(_0x14dc9f(0x1ad))/0x6*(-parseInt(_0x14dc9f(0x19f))/0x7)+parseInt(_0x14dc9f(0x1ae))/0x8+parseInt(_0x14dc9f(0x1ac))/0x9*(parseInt(_0x14dc9f(0x1b1))/0xa);if(_0x2be0f7===_0x4b4965)break;else _0x562b04['push'](_0x562b04['shift']());}catch(_0x5bf488){_0x562b04['push'](_0x562b04['shift']());}}}(a130_0x50a4,0x7e9cf));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';export const NPX_SKILLS_CLI='skills';function a130_0x8ce4(_0x29fe4c,_0x28fd42){_0x29fe4c=_0x29fe4c-0x19b;const _0x50a4f0=a130_0x50a4();let _0x8ce4f=_0x50a4f0[_0x29fe4c];return _0x8ce4f;}export const NPX_SKILLS_SUBCOMMAND_ADD=a130_0x10dca6(0x1b9);export const NPX_SKILLS_FLAG_SKILL=a130_0x10dca6(0x1a9);export const RABETBASE_SKILL_SOURCE=a130_0x10dca6(0x1a6);export const DEFAULT_RABETBASE_SKILL_NAME=a130_0x10dca6(0x1a2);export function buildNpxSkillsAddArgv(_0x162d43=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x162d43];}export const NPX_SKILLS_ADD_COMMAND_LINE=[a130_0x10dca6(0x1a4),...buildNpxSkillsAddArgv()]['join']('\x20');function a130_0x50a4(){const _0x3d9533=['3652504phMBqE','1208935JSxrQw','4MdqwIu','105980rTPymz','skill','log','remove','238180CsgRxb','pipe','stdio','status','add','909276NgNufw','inherit','--global','stderr','7pMxbDF','toString','exit\x20','Lovrabet','trim','npx','yes','lovrabet/lovrabet-skill','unknown','864280CdkFVB','--skill','join','stdout','387qqjoND','2901138doRxPX'];a130_0x50a4=function(){return _0x3d9533;};return a130_0x50a4();}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x6076c4,_0x2cae11){const _0x5a5d9c=a130_0x10dca6;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4b2d47=_0x2cae11?.[_0x5a5d9c(0x1b7)]??_0x5a5d9c(0x19c),_0x33ba5c=resolveNpmBin('npx'),_0x4d65d8=buildNpxSkillsAddArgv(_0x2cae11?.['skill']??DEFAULT_RABETBASE_SKILL_NAME),_0x10e54f=[_0x33ba5c,..._0x4d65d8]['join']('\x20');console['log']('*\x20'+_0x10e54f);const _0x53f27a=spawnSync(_0x33ba5c,_0x4d65d8,{'cwd':_0x6076c4,'stdio':_0x4b2d47,'env':process.env,'shell':![]}),_0x4eb288=_0x53f27a[_0x5a5d9c(0x1b8)];if(_0x4eb288===0x0)return{'ok':!![],'status':0x0};let _0x1120c8=_0x5a5d9c(0x1a1)+(_0x4eb288??'unknown');if(_0x4b2d47===_0x5a5d9c(0x1b6)){const _0x36c895=_0x53f27a[_0x5a5d9c(0x19e)]?_0x53f27a[_0x5a5d9c(0x19e)][_0x5a5d9c(0x1a0)]()[_0x5a5d9c(0x1a3)]():'',_0x11abb4=_0x53f27a[_0x5a5d9c(0x1ab)]?_0x53f27a[_0x5a5d9c(0x1ab)][_0x5a5d9c(0x1a0)]()['trim']():'';if(_0x36c895)_0x1120c8=_0x36c895;else{if(_0x11abb4)_0x1120c8=_0x11abb4;}}return{'ok':![],'status':_0x4eb288??null,'error':_0x1120c8};}export function runNpxSkillsRemove(_0x5c2687,_0x2e4a80){const _0x5a5a84=a130_0x10dca6;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4b4a5e=_0x2e4a80?.['stdio']??_0x5a5a84(0x19c),_0xb51310=resolveNpmBin(_0x5a5a84(0x1a4)),_0x46f713=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x5a5a84(0x1b4),RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x2e4a80?.[_0x5a5a84(0x1b2)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x2e4a80?.[_0x5a5a84(0x1a5)]?['-y']:[]],_0x5a0b16=[_0xb51310,..._0x46f713][_0x5a5a84(0x1aa)]('\x20');console[_0x5a5a84(0x1b3)]('*\x20'+_0x5a0b16);const _0x4f67ef=spawnSync(_0xb51310,_0x46f713,{'cwd':_0x5c2687,'stdio':_0x4b4a5e,'env':process.env,'shell':![]}),_0x3ae59f=_0x4f67ef[_0x5a5a84(0x1b8)];if(_0x3ae59f===0x0)return{'ok':!![],'status':0x0};let _0x12cb2b=_0x5a5a84(0x1a1)+(_0x3ae59f??_0x5a5a84(0x1a7));if(_0x4b4a5e===_0x5a5a84(0x1b6)){const _0x20d856=_0x4f67ef[_0x5a5a84(0x19e)]?_0x4f67ef[_0x5a5a84(0x19e)][_0x5a5a84(0x1a0)]()[_0x5a5a84(0x1a3)]():'',_0x47ad11=_0x4f67ef[_0x5a5a84(0x1ab)]?_0x4f67ef[_0x5a5a84(0x1ab)][_0x5a5a84(0x1a0)]()[_0x5a5a84(0x1a3)]():'';if(_0x20d856)_0x12cb2b=_0x20d856;else{if(_0x47ad11)_0x12cb2b=_0x47ad11;}}return{'ok':![],'status':_0x3ae59f??null,'error':_0x12cb2b};}export function runNpxSkillsAddGlobal(_0x1bd765,_0x53206f,_0x2b8b84){const _0x4cf384=a130_0x10dca6;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x51f865=_0x2b8b84?.[_0x4cf384(0x1b7)]??_0x4cf384(0x19c),_0x36df39=resolveNpmBin(_0x4cf384(0x1a4)),_0x42c08e=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x53206f,_0x4cf384(0x19d),..._0x2b8b84?.[_0x4cf384(0x1a5)]?['-y']:[]],_0x98c86f=[_0x36df39,..._0x42c08e]['join']('\x20');console[_0x4cf384(0x1b3)]('*\x20'+_0x98c86f);const _0x23fcbe=spawnSync(_0x36df39,_0x42c08e,{'cwd':_0x1bd765,'stdio':_0x51f865,'env':process.env,'shell':![]}),_0x4aff22=_0x23fcbe[_0x4cf384(0x1b8)];if(_0x4aff22===0x0)return{'ok':!![],'status':0x0};let _0xed1c35=_0x4cf384(0x1a1)+(_0x4aff22??_0x4cf384(0x1a7));if(_0x51f865===_0x4cf384(0x1b6)){const _0x13d536=_0x23fcbe[_0x4cf384(0x19e)]?_0x23fcbe[_0x4cf384(0x19e)][_0x4cf384(0x1a0)]()[_0x4cf384(0x1a3)]():'',_0x4bbf80=_0x23fcbe[_0x4cf384(0x1ab)]?_0x23fcbe[_0x4cf384(0x1ab)]['toString']()['trim']():'';if(_0x13d536)_0xed1c35=_0x13d536;else{if(_0x4bbf80)_0xed1c35=_0x4bbf80;}}return{'ok':![],'status':_0x4aff22??null,'error':_0xed1c35};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x39a795,_0x5481a2){const _0x60d683=a131_0x178c,_0x22c53a=_0x39a795();while(!![]){try{const _0xfbf5f1=-parseInt(_0x60d683(0x19e))/0x1+parseInt(_0x60d683(0x1a9))/0x2*(parseInt(_0x60d683(0x1ad))/0x3)+parseInt(_0x60d683(0x1a7))/0x4*(parseInt(_0x60d683(0x1a2))/0x5)+parseInt(_0x60d683(0x1a6))/0x6*(parseInt(_0x60d683(0x1b2))/0x7)+-parseInt(_0x60d683(0x1af))/0x8*(parseInt(_0x60d683(0x1a8))/0x9)+parseInt(_0x60d683(0x1a4))/0xa+-parseInt(_0x60d683(0x1b0))/0xb*(parseInt(_0x60d683(0x1ac))/0xc);if(_0xfbf5f1===_0x5481a2)break;else _0x22c53a['push'](_0x22c53a['shift']());}catch(_0x1abaf9){_0x22c53a['push'](_0x22c53a['shift']());}}}(a131_0x28ed,0x25fc3));function a131_0x28ed(){const _0x205892=['durationMs','1421040XoPVcJ','stringify','265494UxIinu','376sWUFlm','90819khSzNR','263126EabsMz','service','[REDACTED]','1092QeWpmq','3jHpgKq','command','8wfiHeb','46519rbiDQi','message','21EKcTtE','error','test','flags','151057YwfAPU','rabetbase.command','some','entries','15700LFDbyR'];a131_0x28ed=function(){return _0x205892;};return a131_0x28ed();}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 a131_0x178c(_0x103e95,_0x34b2da){_0x103e95=_0x103e95-0x19b;const _0x28ed96=a131_0x28ed();let _0x178c5d=_0x28ed96[_0x103e95];return _0x178c5d;}function isSensitiveKey(_0x1b6d1b){const _0x5a7f2b=a131_0x178c;return SENSITIVE_PATTERNS[_0x5a7f2b(0x1a0)](_0x512fa9=>_0x512fa9[_0x5a7f2b(0x19c)](_0x1b6d1b));}function sanitizeFlags(_0x39c1a6){const _0x29adbe=a131_0x178c,_0x1d8759={};for(const [_0x4b1a9e,_0x1f3217]of Object[_0x29adbe(0x1a1)](_0x39c1a6)){isSensitiveKey(_0x4b1a9e)?_0x1d8759[_0x4b1a9e]=_0x1f3217!=null&&_0x1f3217!==''?_0x29adbe(0x1ab):_0x1f3217:_0x1d8759[_0x4b1a9e]=_0x1f3217;}return _0x1d8759;}export async function reportCommandTrace(_0x3f4e5e){const _0x333bb6=a131_0x178c;try{const _0x11163d=sanitizeFlags(_0x3f4e5e[_0x333bb6(0x19d)]);await sendCliTraceLog({'spanName':_0x333bb6(0x19f),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x3f4e5e[_0x333bb6(0x1aa)],'command.name':_0x3f4e5e[_0x333bb6(0x1ae)],'command.flags':JSON[_0x333bb6(0x1a5)](_0x11163d),..._0x3f4e5e[_0x333bb6(0x1a3)]!=null?{'command.duration_ms':_0x3f4e5e[_0x333bb6(0x1a3)]}:{},..._0x3f4e5e[_0x333bb6(0x19b)]?{'command.error':_0x3f4e5e['error']instanceof Error?_0x3f4e5e[_0x333bb6(0x19b)][_0x333bb6(0x1b1)]:String(_0x3f4e5e[_0x333bb6(0x19b)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xaedfe1,_0x4488ea){var _0x345aaf=a132_0x7e61,_0x51ac11=_0xaedfe1();while(!![]){try{var _0x141c1c=parseInt(_0x345aaf(0x146))/0x1+parseInt(_0x345aaf(0x147))/0x2*(-parseInt(_0x345aaf(0x145))/0x3)+-parseInt(_0x345aaf(0x143))/0x4+-parseInt(_0x345aaf(0x142))/0x5+-parseInt(_0x345aaf(0x13b))/0x6+-parseInt(_0x345aaf(0x13c))/0x7*(parseInt(_0x345aaf(0x141))/0x8)+parseInt(_0x345aaf(0x13f))/0x9;if(_0x141c1c===_0x4488ea)break;else _0x51ac11['push'](_0x51ac11['shift']());}catch(_0x592c5d){_0x51ac11['push'](_0x51ac11['shift']());}}}(a132_0x4b54,0x90e0c));function a132_0x7e61(_0xb78597,_0x3d2729){_0xb78597=_0xb78597-0x13b;var _0x4b54c8=a132_0x4b54();var _0x7e6170=_0x4b54c8[_0xb78597];return _0x7e6170;}function a132_0x4b54(){var _0x1c4845=['45DdOQHs','769472pErusj','23738OlHTWB','2092926wVOaZi','14sbMgcv','error','service','24519564RHJPKb','Failed\x20to\x20report\x20CLI\x20help\x20trace:','3732696rOsrmL','5025380YedOUa','1741368QiMkTB','cli.help'];a132_0x4b54=function(){return _0x1c4845;};return a132_0x4b54();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x32d2bd,_0x484cf9){var _0x307f6d=a132_0x7e61;try{await sendCliTraceLog({'spanName':_0x307f6d(0x144),'logData':{'rabetbase.help.kind':_0x32d2bd,..._0x484cf9?.[_0x307f6d(0x13e)]&&{'rabetbase.help.service':_0x484cf9[_0x307f6d(0x13e)]}}});}catch(_0x30c13e){console[_0x307f6d(0x13d)](_0x307f6d(0x140),_0x30c13e);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3da43f,_0x8f5225){const _0x5e35a4=a133_0x26fd,_0x3935cd=_0x3da43f();while(!![]){try{const _0x5a0ff1=-parseInt(_0x5e35a4(0x1fa))/0x1*(-parseInt(_0x5e35a4(0x1fb))/0x2)+parseInt(_0x5e35a4(0x1f8))/0x3*(parseInt(_0x5e35a4(0x1f9))/0x4)+parseInt(_0x5e35a4(0x1f0))/0x5*(parseInt(_0x5e35a4(0x1ee))/0x6)+-parseInt(_0x5e35a4(0x1f7))/0x7*(parseInt(_0x5e35a4(0x1fe))/0x8)+-parseInt(_0x5e35a4(0x1fd))/0x9*(-parseInt(_0x5e35a4(0x1ed))/0xa)+parseInt(_0x5e35a4(0x1ff))/0xb+-parseInt(_0x5e35a4(0x1f1))/0xc;if(_0x5a0ff1===_0x8f5225)break;else _0x3935cd['push'](_0x3935cd['shift']());}catch(_0x1d81a9){_0x3935cd['push'](_0x3935cd['shift']());}}}(a133_0xadad,0xddb5f));import a133_0x51901d from'node:os';function a133_0x26fd(_0x5d0096,_0x542f8){_0x5d0096=_0x5d0096-0x1ed;const _0xadad44=a133_0xadad();let _0x26fdb9=_0xadad44[_0x5d0096];return _0x26fdb9;}import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setTraceConfig,getOtelLoggerVersion}from'@lovrabet/otel-logger';function a133_0xadad(){const _0x50325b=['14mdARhS','658392JVGpzy','8pFmLjX','381097giHJpb','4XguhFa','userInfo','5945148vEZtAK','6855272DdNBhl','8104294JJaddj','20FbrrGS','69582ZOcEXm','unknown','175KolxyB','12515640IPVgEJ','daily','user','production','username','rabetbase-cli'];a133_0xadad=function(){return _0x50325b;};return a133_0xadad();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0xcd6f88=a133_0x26fd,_0x3340f1=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x224e35=_0x3340f1?.[_0xcd6f88(0x1f3)];setTraceConfig({'otelLoggerVersion':getOtelLoggerVersion(),'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0xcd6f88(0x1ef)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0xcd6f88(0x1f2):_0xcd6f88(0x1f4)),'username':_0x224e35?.[_0xcd6f88(0x1f5)]??a133_0x51901d[_0xcd6f88(0x1fc)]()[_0xcd6f88(0x1f5)]??_0xcd6f88(0x1f6),..._0x224e35&&{'nickname':_0x224e35['nickname']}}),cliOtelTraceInitialized=!![];}return _0x3340f1;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a134_0xae4a(){const _0x1da3aa=['2439198fpHVeW','SIGTERM','6214932dmxZMd','37295zrrzzC','16KEbrnv','once','11MtiRoz','3nHelEo','1926040FxYfoI','1104TuJhXy','336XSJyNT','exit','31192YMSbTF','1322122YfIdgb','824644pZstqo','then'];a134_0xae4a=function(){return _0x1da3aa;};return a134_0xae4a();}(function(_0x49cbde,_0x52f9f1){const _0x158fd5=a134_0x1993,_0x138a11=_0x49cbde();while(!![]){try{const _0x1e497a=parseInt(_0x158fd5(0xd1))/0x1+parseInt(_0x158fd5(0xd0))/0x2*(parseInt(_0x158fd5(0xda))/0x3)+-parseInt(_0x158fd5(0xcd))/0x4*(parseInt(_0x158fd5(0xd6))/0x5)+parseInt(_0x158fd5(0xcc))/0x6*(parseInt(_0x158fd5(0xcf))/0x7)+parseInt(_0x158fd5(0xd7))/0x8*(-parseInt(_0x158fd5(0xd3))/0x9)+parseInt(_0x158fd5(0xdb))/0xa*(-parseInt(_0x158fd5(0xd9))/0xb)+-parseInt(_0x158fd5(0xd5))/0xc;if(_0x1e497a===_0x52f9f1)break;else _0x138a11['push'](_0x138a11['shift']());}catch(_0x5dfdc7){_0x138a11['push'](_0x138a11['shift']());}}}(a134_0xae4a,0x681fe));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 _0x4a2ed4=a134_0x1993;process['once']('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x326c7f=()=>{const _0x1c1d50=a134_0x1993;void flushOtelNodeIfUsed()[_0x1c1d50(0xd2)](()=>process[_0x1c1d50(0xce)](0x0));};process['once']('SIGINT',_0x326c7f),process[_0x4a2ed4(0xd8)](_0x4a2ed4(0xd4),_0x326c7f);}function a134_0x1993(_0x41de11,_0x157195){_0x41de11=_0x41de11-0xcc;const _0xae4a2a=a134_0xae4a();let _0x199361=_0xae4a2a[_0x41de11];return _0x199361;}export async function exitWithOtelShutdown(_0x52c952){const _0x52ca60=a134_0x1993;await flushOtelNodeIfUsed(),process[_0x52ca60(0xce)](_0x52c952);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5136fb,_0x1660ea){const _0x501a97=a135_0x79d7,_0x55c911=_0x5136fb();while(!![]){try{const _0x2a24e5=-parseInt(_0x501a97(0xa4))/0x1*(parseInt(_0x501a97(0xad))/0x2)+parseInt(_0x501a97(0xa5))/0x3+parseInt(_0x501a97(0xa9))/0x4*(parseInt(_0x501a97(0xac))/0x5)+parseInt(_0x501a97(0xaf))/0x6+-parseInt(_0x501a97(0xaa))/0x7+-parseInt(_0x501a97(0xb0))/0x8*(-parseInt(_0x501a97(0xa8))/0x9)+-parseInt(_0x501a97(0xa6))/0xa*(parseInt(_0x501a97(0xae))/0xb);if(_0x2a24e5===_0x1660ea)break;else _0x55c911['push'](_0x55c911['shift']());}catch(_0x594702){_0x55c911['push'](_0x55c911['shift']());}}}(a135_0x3733,0xc2d26));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';function a135_0x79d7(_0x50279e,_0x374114){_0x50279e=_0x50279e-0xa3;const _0x373315=a135_0x3733();let _0x79d769=_0x373315[_0x50279e];return _0x79d769;}import{getCliVersion}from'../utils/version.js';function a135_0x3733(){const _0x5ef8cc=['5NgmwFn','17526GKyXsD','73337MFIdDq','5136252XcyrTq','16392lHHPZl','manual','142IRNMlI','1953942vsPNnX','120oEOHiX','traceparent','1737BcypuZ','4697584mnjRwB','6684083PrcXXh','version'];a135_0x3733=function(){return _0x5ef8cc;};return a135_0x3733();}const DEFAULT_TRACE_NAME='rabetbase-cli';export async function sendCliTraceLog(_0x12481a){const _0x126039=a135_0x79d7;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x12481a['traceName']??DEFAULT_TRACE_NAME,'version':_0x12481a[_0x126039(0xab)]??getCliVersion(),'spanName':_0x12481a['spanName'],'eventType':_0x126039(0xa3),'logData':_0x12481a['logData'],..._0x12481a['traceparent']&&{'traceparent':_0x12481a[_0x126039(0xa7)]}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a137_0xe5c022=a137_0x552e;function a137_0x552e(_0x39c3f7,_0x36c07c){_0x39c3f7=_0x39c3f7-0x74;const _0x5e9ba1=a137_0x5e9b();let _0x552ecb=_0x5e9ba1[_0x39c3f7];return _0x552ecb;}(function(_0x3cc473,_0xcac7b6){const _0x2f5b5c=a137_0x552e,_0x2bf0b6=_0x3cc473();while(!![]){try{const _0x351474=-parseInt(_0x2f5b5c(0xab))/0x1+-parseInt(_0x2f5b5c(0x88))/0x2*(-parseInt(_0x2f5b5c(0x86))/0x3)+-parseInt(_0x2f5b5c(0x7a))/0x4+-parseInt(_0x2f5b5c(0x81))/0x5*(-parseInt(_0x2f5b5c(0xb0))/0x6)+parseInt(_0x2f5b5c(0x91))/0x7*(parseInt(_0x2f5b5c(0x85))/0x8)+parseInt(_0x2f5b5c(0x7d))/0x9*(parseInt(_0x2f5b5c(0xa2))/0xa)+-parseInt(_0x2f5b5c(0x9f))/0xb*(parseInt(_0x2f5b5c(0x8f))/0xc);if(_0x351474===_0xcac7b6)break;else _0x2bf0b6['push'](_0x2bf0b6['shift']());}catch(_0x9336c){_0x2bf0b6['push'](_0x2bf0b6['shift']());}}}(a137_0x5e9b,0x409db));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a137_0xe5c022(0xa1),'.cursor'],'files':[{'type':a137_0xe5c022(0x8c),'path':a137_0xe5c022(0xb1),'template':a137_0xe5c022(0x89)}]},'windsurf':{'name':a137_0xe5c022(0x99),'description':a137_0xe5c022(0x93),'folders':[a137_0xe5c022(0x9d)],'files':[{'type':a137_0xe5c022(0x8c),'path':a137_0xe5c022(0xa3),'template':a137_0xe5c022(0x89)}]},'claude':{'name':'Claude\x20Code','description':a137_0xe5c022(0x78),'folders':[a137_0xe5c022(0x79)],'files':[{'type':a137_0xe5c022(0x8c),'path':a137_0xe5c022(0x96),'template':a137_0xe5c022(0x89)}]},'cline':{'name':a137_0xe5c022(0x75),'description':'Cline\x20IDE','folders':[a137_0xe5c022(0x83)],'files':[{'type':a137_0xe5c022(0x8c),'path':'.cline/skills/lovrabet/SKILL.md','template':a137_0xe5c022(0x89)}]},'codex':{'name':a137_0xe5c022(0xb2),'description':a137_0xe5c022(0xad),'folders':[a137_0xe5c022(0x9e)],'files':[{'type':'file','path':a137_0xe5c022(0x76),'template':a137_0xe5c022(0x89)}]},'opencode':{'name':a137_0xe5c022(0x7e),'description':a137_0xe5c022(0x98),'folders':[a137_0xe5c022(0xaa)],'files':[{'type':'file','path':a137_0xe5c022(0x7c),'template':a137_0xe5c022(0x89)}]},'qoder':{'name':a137_0xe5c022(0xa4),'description':a137_0xe5c022(0x90),'folders':[a137_0xe5c022(0x7b)],'files':[{'type':a137_0xe5c022(0x8c),'path':a137_0xe5c022(0xa7),'template':a137_0xe5c022(0x89)},{'type':a137_0xe5c022(0x8c),'path':a137_0xe5c022(0x87),'template':a137_0xe5c022(0x89)}]},'codebuddy':{'name':a137_0xe5c022(0xa0),'description':a137_0xe5c022(0x77),'folders':[a137_0xe5c022(0xac)],'files':[{'type':'file','path':a137_0xe5c022(0xa5),'template':a137_0xe5c022(0x89)}]},'trae':{'name':a137_0xe5c022(0x8d),'description':a137_0xe5c022(0x9a),'folders':[a137_0xe5c022(0x94)],'files':[{'type':a137_0xe5c022(0x8c),'path':a137_0xe5c022(0x95),'template':a137_0xe5c022(0x89)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a137_0xe5c022(0x74),'description':a137_0xe5c022(0xaf),'folders':[a137_0xe5c022(0xa8)],'files':[{'type':a137_0xe5c022(0x8c),'path':a137_0xe5c022(0xa6),'template':'SKILL.md.tpl'}]},'antigravity':{'name':a137_0xe5c022(0x92),'description':a137_0xe5c022(0x7f),'folders':[a137_0xe5c022(0xa8)],'files':[{'type':a137_0xe5c022(0x8c),'path':a137_0xe5c022(0xa6),'template':a137_0xe5c022(0x89)}]}};export const CORE_IDE_LIST=[a137_0xe5c022(0x80),a137_0xe5c022(0x84),a137_0xe5c022(0x8b),a137_0xe5c022(0x8e),'cursor',a137_0xe5c022(0x97),a137_0xe5c022(0xae),a137_0xe5c022(0x9b),'windsurf'];export const IDE_LIST=[a137_0xe5c022(0x9c),a137_0xe5c022(0x80),a137_0xe5c022(0x84),'codebuddy',a137_0xe5c022(0x8e),a137_0xe5c022(0x8a),a137_0xe5c022(0x97),a137_0xe5c022(0xae),a137_0xe5c022(0x9b),'windsurf',a137_0xe5c022(0x82)];function a137_0x5e9b(){const _0x2c7d60=['通用模板\x20-\x20兜底方案','12CkMLjD','.cursor/skills/rabetbase.md','Codex','其他\x20(通用模板)','Cline','.codex/skills/lovrabet/SKILL.md','CodeBuddy\x20IDE','Claude\x20Code','.claude','1102304NaXLWo','.qoder','.opencode/skills/lovrabet/SKILL.md','45FVWJPX','OpenCode','Antigravity\x20IDE','claude','194430CMzHku','agent','.cline','cline','211280sYtaMx','1340187PYSHKh','.qoder/skills/lovrabet/SKILL.md','2NUBpzF','SKILL.md.tpl','cursor','codebuddy','file','Trae','codex','13548gwegNu','Qoder\x20IDE','119hYuXgR','Antigravity','Windsurf\x20IDE','.trae','.trae/skills/lovrabet/SKILL.md','.claude/skills/lovrabet/SKILL.md','opencode','OpenCode\x20IDE','Windsurf','Trae\x20IDE','trae','antigravity','.windsurf','.codex','3817BzvFKm','CodeBuddy','.cursorrules','517290QdgwcC','.windsurf/workflows/rabetbase.md','Qoder','.codebuddy/skills/lovrabet/SKILL.md','.agent/skills/lovrabet/SKILL.md','.qoder/rules/rabetbase.md','.agent','windsurf','.opencode','300110ZOQedC','.codebuddy','Codex\x20IDE','qoder'];a137_0x5e9b=function(){return _0x2c7d60;};return a137_0x5e9b();}export const ALL_CORE_IDES=[a137_0xe5c022(0x8a),a137_0xe5c022(0xa9),a137_0xe5c022(0x80),a137_0xe5c022(0x84),a137_0xe5c022(0x8e),a137_0xe5c022(0x97),a137_0xe5c022(0xae),a137_0xe5c022(0x8b),a137_0xe5c022(0x9b)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17384d,_0x4bac80){const _0x1326cc=a138_0x15f9,_0xe07a25=_0x17384d();while(!![]){try{const _0x3ff407=-parseInt(_0x1326cc(0xa6))/0x1*(parseInt(_0x1326cc(0xa3))/0x2)+-parseInt(_0x1326cc(0xa7))/0x3+parseInt(_0x1326cc(0xb8))/0x4+parseInt(_0x1326cc(0xae))/0x5*(-parseInt(_0x1326cc(0xa4))/0x6)+parseInt(_0x1326cc(0xb2))/0x7+-parseInt(_0x1326cc(0xb1))/0x8*(parseInt(_0x1326cc(0xab))/0x9)+parseInt(_0x1326cc(0xb5))/0xa;if(_0x3ff407===_0x4bac80)break;else _0xe07a25['push'](_0xe07a25['shift']());}catch(_0x5d2828){_0xe07a25['push'](_0xe07a25['shift']());}}}(a138_0x335e,0x45197));import{execFileSync}from'node:child_process';import{existsSync}from'node:fs';import{createRequire}from'node:module';function a138_0x335e(){const _0xa1bea2=['validation','988202KfDgwQ','673332nLLoJU','resolve','1VVxPaz','1496742ofdnOa','win32','jq.exe','trim','27mNeMBc','join','platform','5DcgHZi','--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/','node-jq/package.json','13288GhIRQR','182406lLPwpp','pipe','message','10353810RsQLQV','utf8','toString','1327248xEJRhT','stderr','test'];a138_0x335e=function(){return _0xa1bea2;};return a138_0x335e();}function a138_0x15f9(_0x11576d,_0x2dc8cc){_0x11576d=_0x11576d-0xa0;const _0x335e53=a138_0x335e();let _0x15f94e=_0x335e53[_0x11576d];return _0x15f94e;}import a138_0x48c0dc from'node:path';import{CliErrors}from'../errors.js';const MAX_BUFFER=0x32*0x400*0x400;function resolveJqBinary(){const _0x398e0f=a138_0x15f9;try{const _0x51dd32=createRequire(import.meta.url),_0x117e50=a138_0x48c0dc['dirname'](_0x51dd32[_0x398e0f(0xa5)](_0x398e0f(0xb0))),_0x578087=a138_0x48c0dc[_0x398e0f(0xac)](_0x117e50,'bin'),_0x2192dd=process[_0x398e0f(0xad)]===_0x398e0f(0xa8)?_0x398e0f(0xa9):'jq',_0x383af1=a138_0x48c0dc['join'](_0x578087,_0x2192dd);if(existsSync(_0x383af1))return _0x383af1;}catch{}return'jq';}export function applyJqFilter(_0x493767,_0x3016e3){const _0x560851=a138_0x15f9,_0xde7e16=resolveJqBinary();try{return execFileSync(_0xde7e16,[_0x3016e3],{'input':_0x493767,'encoding':_0x560851(0xb6),'maxBuffer':MAX_BUFFER,'stdio':['pipe',_0x560851(0xb3),_0x560851(0xb3)]});}catch(_0x2fc15e){const _0x1e28f9=_0x2fc15e;if(_0x1e28f9['code']==='ENOENT')throw CliErrors[_0x560851(0xa2)](_0x560851(0xaf),'e.g.\x20brew\x20install\x20jq\x20—\x20or\x20npm\x20install\x20with\x20scripts\x20enabled\x20so\x20node-jq\x20can\x20download\x20jq');const _0x404d12=_0x1e28f9[_0x560851(0xa0)]?.[_0x560851(0xb7)]?.()[_0x560851(0xaa)]()??'',_0x1e89bc=(_0x1e28f9[_0x560851(0xb4)]??String(_0x2fc15e))[_0x560851(0xaa)](),_0x372497=_0x404d12||_0x1e89bc,_0x52efd3=/^\s*jq:/i[_0x560851(0xa1)](_0x372497)?_0x372497:'jq:\x20'+_0x372497;throw CliErrors['validation'](_0x52efd3);}}
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3fe588,_0x1ee3e9){const _0xe06e24=a139_0x4c54,_0x11d9f9=_0x3fe588();while(!![]){try{const _0x4520af=parseInt(_0xe06e24(0x1a7))/0x1+-parseInt(_0xe06e24(0x1a5))/0x2+-parseInt(_0xe06e24(0x1a4))/0x3+-parseInt(_0xe06e24(0x1a8))/0x4+-parseInt(_0xe06e24(0x1ab))/0x5*(parseInt(_0xe06e24(0x1ac))/0x6)+-parseInt(_0xe06e24(0x1ae))/0x7+parseInt(_0xe06e24(0x1a2))/0x8;if(_0x4520af===_0x1ee3e9)break;else _0x11d9f9['push'](_0x11d9f9['shift']());}catch(_0x41d02a){_0x11d9f9['push'](_0x11d9f9['shift']());}}}(a139_0x347b,0x93394));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x1e647c=a139_0x4c54;try{const _0x44d61a=getTemplateBaseUrl(),_0x407216=_0x44d61a+'/config.json',_0x59969e=await fetch(_0x407216,{'headers':{'Accept':_0x1e647c(0x1ad)}});if(!_0x59969e['ok'])return null;const _0x54be40=await _0x59969e[_0x1e647c(0x1aa)]();if(!_0x54be40['cli']?.[_0x1e647c(0x1a9)]||!_0x54be40[_0x1e647c(0x1a6)]?.[_0x1e647c(0x1a3)]?.[_0x1e647c(0x1a9)])return null;return _0x54be40;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;function a139_0x4c54(_0x24a51c,_0x29ed62){_0x24a51c=_0x24a51c-0x1a2;const _0x347b41=a139_0x347b();let _0x4c5445=_0x347b41[_0x24a51c];return _0x4c5445;}const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x424f89=Date['now']();if(cachedConfig&&_0x424f89-cacheTime<CACHE_TTL)return cachedConfig;const _0xc6c52b=await fetchCdnConfig();return _0xc6c52b&&(cachedConfig=_0xc6c52b,cacheTime=_0x424f89),_0xc6c52b;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}function a139_0x347b(){const _0x42b0f3=['161706qzxxrL','1912416sOOPlc','stableVersion','json','15WJaQpl','853926ZgozRz','application/json','957859QhxWeD','24937424KtLHej','node','1544943dkRZrU','2237942CUkqou','sdk'];a139_0x347b=function(){return _0x42b0f3;};return a139_0x347b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a140_0x323a1e=a140_0x5c0b;(function(_0x1ffbd8,_0x17322e){const _0x2165c2=a140_0x5c0b,_0x267d6a=_0x1ffbd8();while(!![]){try{const _0x2fb42f=-parseInt(_0x2165c2(0x1b6))/0x1*(parseInt(_0x2165c2(0x190))/0x2)+-parseInt(_0x2165c2(0x1b3))/0x3*(-parseInt(_0x2165c2(0x1a0))/0x4)+-parseInt(_0x2165c2(0x18f))/0x5*(-parseInt(_0x2165c2(0x1a3))/0x6)+parseInt(_0x2165c2(0x19a))/0x7+-parseInt(_0x2165c2(0x1a6))/0x8*(parseInt(_0x2165c2(0x196))/0x9)+-parseInt(_0x2165c2(0x198))/0xa*(-parseInt(_0x2165c2(0x19c))/0xb)+parseInt(_0x2165c2(0x192))/0xc*(-parseInt(_0x2165c2(0x1b7))/0xd);if(_0x2fb42f===_0x17322e)break;else _0x267d6a['push'](_0x267d6a['shift']());}catch(_0x97aafa){_0x267d6a['push'](_0x267d6a['shift']());}}}(a140_0xddc7,0x8a51f));import a140_0xd801e3 from'node:fs';import a140_0x16ba9d from'node:path';import a140_0x221aa8 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a140_0x323a1e(0x19f);function isNonNumericVersion(_0x28077d){const _0x5901ba=a140_0x323a1e,_0x2a3378=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x2a3378['some'](_0x253985=>_0x253985[_0x5901ba(0x1b5)](_0x28077d));}function a140_0x5c0b(_0x5baa44,_0x54945d){_0x5baa44=_0x5baa44-0x18f;const _0xddc77a=a140_0xddc7();let _0x5c0b03=_0xddc77a[_0x5baa44];return _0x5c0b03;}function a140_0xddc7(){const _0x70d0b9=['\x20\x20\x20Upgrade\x20command:\x20','\x1b[1m','dependencies','\x1b[33m','@lovrabet/sdk','3TODZLB','npm\x20install\x20','test','1289xCALkk','252785eRqkxG','55gRQXAe','166MJsiEp','join','24lTgDOs','↪\x20SDK\x20update\x20available','utf8','stableVersion','18UiaMAs','packageName','5613080OuyNSd','log','2465071BoocQz','devDependencies','11dPfqLN','node_modules','parse','1.2.0','2295028zvpJvx','coerce','\x1b[0m','185556cFHycW','node','package.json','4459872pkiErp','utf-8','existsSync','all','sdk','readFileSync','version','latest'];a140_0xddc7=function(){return _0x70d0b9;};return a140_0xddc7();}function getInstalledVersion(_0x1f34e4,_0x395d5b){const _0x51ef04=a140_0x323a1e;try{const _0x3aa52e=a140_0x16ba9d[_0x51ef04(0x191)](_0x1f34e4,_0x51ef04(0x19d),_0x395d5b,_0x51ef04(0x1a5));if(a140_0xd801e3['existsSync'](_0x3aa52e)){const _0x405acb=JSON['parse'](a140_0xd801e3['readFileSync'](_0x3aa52e,_0x51ef04(0x1a7)));return _0x405acb['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x1ca7c2=a140_0x323a1e;try{const _0x46d066=await getCdnConfig();return _0x46d066?.[_0x1ca7c2(0x1aa)]?.[_0x1ca7c2(0x1a4)]?.[_0x1ca7c2(0x195)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x13dda4=a140_0x323a1e;try{const _0x55e6bb=await getCdnConfig();return _0x55e6bb?.[_0x13dda4(0x1aa)]?.[_0x13dda4(0x1a4)]?.[_0x13dda4(0x197)]||_0x13dda4(0x1b2);}catch{return _0x13dda4(0x1b2);}}export async function checkSdkVersion(_0x133f91){const _0x3dc094=a140_0x323a1e,_0x18d24e=a140_0x16ba9d[_0x3dc094(0x191)](_0x133f91,'package.json'),[_0xd62a30,_0x4aaf22]=await Promise[_0x3dc094(0x1a9)]([getSdkStableVersion(),getSdkPackageName()]),_0x333549=_0xd62a30||FALLBACK_MIN_SDK_VERSION;if(!a140_0xd801e3[_0x3dc094(0x1a8)](_0x18d24e))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x333549,'packageName':_0x4aaf22,'stableVersion':_0xd62a30};try{const _0x45fe13=JSON['parse'](a140_0xd801e3[_0x3dc094(0x1ab)](_0x18d24e,_0x3dc094(0x194))),_0x248154=_0x45fe13[_0x3dc094(0x1b0)]||{},_0x5bb250=_0x45fe13[_0x3dc094(0x19b)]||{},_0x5b3daa=_0x248154[_0x4aaf22]||_0x5bb250[_0x4aaf22];if(!_0x5b3daa)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x333549,'packageName':_0x4aaf22,'stableVersion':_0xd62a30};let _0x503ba4=getInstalledVersion(_0x133f91,_0x4aaf22);!_0x503ba4&&(_0x503ba4=_0x5b3daa);if(isNonNumericVersion(_0x5b3daa))return{'installed':!![],'version':_0x503ba4,'needsUpgrade':![],'minVersion':_0x333549,'packageName':_0x4aaf22,'stableVersion':_0xd62a30};const _0x52387d=a140_0x221aa8[_0x3dc094(0x1a1)](_0x503ba4),_0x5a02b4=a140_0x221aa8[_0x3dc094(0x1a1)](_0x333549),_0x836ee8=_0x52387d&&_0x5a02b4?a140_0x221aa8['lt'](_0x52387d,_0x5a02b4):![];return{'installed':!![],'version':_0x503ba4,'needsUpgrade':_0x836ee8,'minVersion':_0x333549,'packageName':_0x4aaf22,'stableVersion':_0xd62a30};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x333549,'packageName':_0x4aaf22,'stableVersion':_0xd62a30};}}export function checkSdkVersionSync(_0x4671ee){const _0x5a8d1a=a140_0x323a1e,_0x5b27eb=a140_0x16ba9d[_0x5a8d1a(0x191)](_0x4671ee,_0x5a8d1a(0x1a5)),_0x42ea7d=_0x5a8d1a(0x1b2);if(!a140_0xd801e3[_0x5a8d1a(0x1a8)](_0x5b27eb))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x42ea7d,'stableVersion':null};try{const _0x5ab169=JSON[_0x5a8d1a(0x19e)](a140_0xd801e3['readFileSync'](_0x5b27eb,'utf8')),_0x5d8ae2=_0x5ab169[_0x5a8d1a(0x1b0)]||{},_0x378b6a=_0x5ab169['devDependencies']||{},_0x2c4544=_0x5d8ae2[_0x42ea7d]||_0x378b6a[_0x42ea7d];if(!_0x2c4544)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x42ea7d,'stableVersion':null};let _0x2d360c=getInstalledVersion(_0x4671ee,_0x42ea7d);!_0x2d360c&&(_0x2d360c=_0x2c4544);if(isNonNumericVersion(_0x2c4544))return{'installed':!![],'version':_0x2d360c,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x42ea7d,'stableVersion':null};const _0x54e3e2=a140_0x221aa8[_0x5a8d1a(0x1a1)](_0x2d360c),_0x33b92f=_0x54e3e2?a140_0x221aa8['lt'](_0x54e3e2,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x2d360c,'needsUpgrade':_0x33b92f,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x42ea7d,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x42ea7d,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x4f88e2){const _0x628e3d=a140_0x323a1e;if(!_0x4f88e2['needsUpgrade'])return;const _0x3480d2=_0x628e3d(0x1b1),_0x5046f0=_0x628e3d(0x1a2),_0x462f9d=_0x628e3d(0x1af),_0x3e487f=_0x4f88e2[_0x628e3d(0x197)]||_0x628e3d(0x1b2),_0x4b23b3=_0x4f88e2[_0x628e3d(0x195)]||_0x4f88e2['minVersion'],_0x285247=_0x628e3d(0x1b4)+_0x3e487f+'@'+(_0x4b23b3||_0x628e3d(0x1ad));console[_0x628e3d(0x199)](),console[_0x628e3d(0x199)](''+_0x3480d2+_0x462f9d+_0x628e3d(0x193)+_0x5046f0),console[_0x628e3d(0x199)](_0x3480d2+'\x20\x20\x20Current\x20version:\x20'+_0x3e487f+'@'+_0x4f88e2[_0x628e3d(0x1ac)]+_0x5046f0),console[_0x628e3d(0x199)](_0x3480d2+'\x20\x20\x20Stable\x20version:\x20'+_0x4b23b3+_0x5046f0),console[_0x628e3d(0x199)](_0x3480d2+_0x628e3d(0x1ae)+_0x285247+_0x5046f0),console[_0x628e3d(0x199)]();}
|