@lovrabet/rabetbase-cli 2.0.7 → 2.0.8
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/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/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 -0
- 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/save.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/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 -0
- 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 -0
- 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 -0
- 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/package.json +4 -2
package/lib/core/db-resolver.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f69dd,_0x551915){const _0x2573c5=a99_0x4a5b,_0x543043=_0x1f69dd();while(!![]){try{const _0x59c2b8=parseInt(_0x2573c5(0xeb))/0x1+parseInt(_0x2573c5(0xd1))/0x2*(parseInt(_0x2573c5(0xdd))/0x3)+-parseInt(_0x2573c5(0xea))/0x4*(-parseInt(_0x2573c5(0xd2))/0x5)+-parseInt(_0x2573c5(0xec))/0x6*(-parseInt(_0x2573c5(0xd7))/0x7)+-parseInt(_0x2573c5(0xe0))/0x8*(-parseInt(_0x2573c5(0xdf))/0x9)+parseInt(_0x2573c5(0xd3))/0xa*(-parseInt(_0x2573c5(0xe6))/0xb)+-parseInt(_0x2573c5(0xd4))/0xc;if(_0x59c2b8===_0x551915)break;else _0x543043['push'](_0x543043['shift']());}catch(_0x158809){_0x543043['push'](_0x543043['shift']());}}}(a99_0x43ce,0x457a8));function a99_0x4a5b(_0x6249ab,_0x58bdc8){_0x6249ab=_0x6249ab-0xd1;const _0x43cef2=a99_0x43ce();let _0x4a5be5=_0x43cef2[_0x6249ab];return _0x4a5be5;}import{listDatasets}from'./api-client.js';function a99_0x43ce(){const _0x1d499e=['entries','get','find','dbId','dbtableConfig','195udsYPA','join','91179TVNQSq','424gLYOfy','\x22.\x20Available:\x20','filter','dbName','toLowerCase','length','687137UeQxHi','includes','No\x20linked\x20databases\x20found\x20for\x20this\x20app.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','set','3368JtgWhY','410978mMXJbl','6smKvXb','isNaN','6694vnULAn','295jQsUff','60zyydxp','12639912pweguL','.\x20Be\x20more\x20specific.','map','3482906QqzJtl'];a99_0x43ce=function(){return _0x1d499e;};return a99_0x43ce();}const cache=new Map();export async function listDatabases(_0xc7f577){const _0x1b6186=a99_0x4a5b;if(cache['has'](_0xc7f577))return cache[_0x1b6186(0xd9)](_0xc7f577);const _0xc54fb7=await listDatasets(_0xc7f577),_0x93d7e0=new Map();for(const _0x4e3046 of _0xc54fb7){const _0x1bef63=_0x4e3046[_0x1b6186(0xdc)];_0x1bef63?.['dbId']!=null&&_0x93d7e0[_0x1b6186(0xe9)](_0x1bef63[_0x1b6186(0xdb)],_0x1bef63[_0x1b6186(0xe3)]??'db-'+_0x1bef63['dbId']);}const _0x20e6ae=[..._0x93d7e0[_0x1b6186(0xd8)]()][_0x1b6186(0xd6)](([_0x5cd5f9,_0x176e0e])=>({'dbId':_0x5cd5f9,'dbName':_0x176e0e}));return cache[_0x1b6186(0xe9)](_0xc7f577,_0x20e6ae),_0x20e6ae;}export async function resolveDb(_0x1049ec,_0x2f351b){const _0x79b577=a99_0x4a5b,_0x41be74=await listDatabases(_0x1049ec);if(_0x41be74[_0x79b577(0xe5)]===0x0)return{'resolved':[],'error':_0x79b577(0xe8)};if(!_0x2f351b)return{'resolved':_0x41be74};const _0x32daf9=Number(_0x2f351b);if(!Number[_0x79b577(0xed)](_0x32daf9)){const _0x2b0c21=_0x41be74[_0x79b577(0xda)](_0x445c57=>_0x445c57['dbId']===_0x32daf9);if(_0x2b0c21)return{'resolved':[_0x2b0c21]};}const _0x89e5c7=_0x2f351b['toLowerCase'](),_0x565d46=_0x41be74[_0x79b577(0xe2)](_0x260f9f=>_0x260f9f[_0x79b577(0xe3)][_0x79b577(0xe4)]()[_0x79b577(0xe7)](_0x89e5c7));if(_0x565d46[_0x79b577(0xe5)]>0x0)return{'resolved':_0x565d46};const _0x5e67b8=_0x41be74[_0x79b577(0xd6)](_0x5cf3d0=>_0x5cf3d0['dbName']+'\x20('+_0x5cf3d0[_0x79b577(0xdb)]+')')[_0x79b577(0xde)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x2f351b+_0x79b577(0xe1)+_0x5e67b8};}export async function resolveOneDb(_0x2de76b,_0xfa77df){const _0xe3cf33=a99_0x4a5b,{resolved:_0x259e02,error:_0x5738f6}=await resolveDb(_0x2de76b,_0xfa77df);if(_0x5738f6)return{'db':null,'error':_0x5738f6};if(_0x259e02[_0xe3cf33(0xe5)]===0x1)return{'db':_0x259e02[0x0]};if(!_0xfa77df){const _0xf01774=_0x259e02[_0xe3cf33(0xd6)](_0x273cbb=>_0x273cbb['dbName']+'\x20('+_0x273cbb[_0xe3cf33(0xdb)]+')')['join'](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0xf01774};}const _0xd4b4f1=_0x259e02[_0xe3cf33(0xd6)](_0x566be3=>_0x566be3[_0xe3cf33(0xe3)]+'\x20('+_0x566be3['dbId']+')')[_0xe3cf33(0xde)](',\x20');return{'db':null,'error':'\x22'+_0xfa77df+'\x22\x20matches\x20multiple\x20databases:\x20'+_0xd4b4f1+_0xe3cf33(0xd5)};}export async function getDbName(_0x349b02,_0x2cbb20){const _0x9b3717=a99_0x4a5b,_0x5036f2=await listDatabases(_0x349b02);return _0x5036f2[_0x9b3717(0xda)](_0x2cb468=>_0x2cb468[_0x9b3717(0xdb)]===_0x2cbb20)?.['dbName'];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4145f5,_0x575159){const _0x3faa73=a100_0x3655,_0x310a95=_0x4145f5();while(!![]){try{const _0x251d3f=parseInt(_0x3faa73(0x16a))/0x1*(-parseInt(_0x3faa73(0x151))/0x2)+-parseInt(_0x3faa73(0x15d))/0x3*(-parseInt(_0x3faa73(0x162))/0x4)+-parseInt(_0x3faa73(0x158))/0x5+parseInt(_0x3faa73(0x16c))/0x6+-parseInt(_0x3faa73(0x173))/0x7*(parseInt(_0x3faa73(0x170))/0x8)+-parseInt(_0x3faa73(0x150))/0x9+-parseInt(_0x3faa73(0x174))/0xa*(-parseInt(_0x3faa73(0x153))/0xb);if(_0x251d3f===_0x575159)break;else _0x310a95['push'](_0x310a95['shift']());}catch(_0x1e04fb){_0x310a95['push'](_0x310a95['shift']());}}}(a100_0x32ba,0x8fded));export function detectSqlType(_0x1e3a66){const _0x4965dc=a100_0x3655;if(!_0x1e3a66?.[_0x4965dc(0x16d)]())return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x291382=_0x1e3a66[_0x4965dc(0x171)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')[_0x4965dc(0x171)](/\/\*[\s\S]*?\*\//g,'')[_0x4965dc(0x16d)](),_0x5c613b=_0x291382[_0x4965dc(0x15c)]('\x0a');let _0xb60003='';for(const _0x32ce76 of _0x5c613b){const _0x3c2e34=_0x32ce76[_0x4965dc(0x16d)]();if(!_0x3c2e34||_0x3c2e34[_0x4965dc(0x16b)]('--')||_0x3c2e34[_0x4965dc(0x16b)]('/*'))continue;_0xb60003=_0x3c2e34;break;}const _0x1f481c=_0xb60003[_0x4965dc(0x164)]();if(_0x1f481c['startsWith']('SELECT')||_0x1f481c['startsWith'](_0x4965dc(0x166))){const _0x57b6b7=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x4965dc(0x165)](_0x291382);return{'type':_0x4965dc(0x161),'isSelectOnly':!_0x57b6b7,'isDangerous':_0x57b6b7,'reason':_0x57b6b7?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x1f481c[_0x4965dc(0x16b)](_0x4965dc(0x163)))return{'type':_0x4965dc(0x163),'isSelectOnly':![],'isDangerous':![]};if(_0x1f481c[_0x4965dc(0x16b)](_0x4965dc(0x157)))return{'type':_0x4965dc(0x157),'isSelectOnly':![],'isDangerous':![]};if(_0x1f481c[_0x4965dc(0x16b)]('DELETE'))return{'type':_0x4965dc(0x156),'isSelectOnly':![],'isDangerous':!![],'reason':_0x4965dc(0x15b)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i['test'](_0x1f481c))return{'type':_0x4965dc(0x169),'isSelectOnly':![],'isDangerous':!![],'reason':_0x4965dc(0x152)};return{'type':_0x4965dc(0x154),'isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x42fcb1){const _0x106f24=a100_0x3655,_0x21ff60=_0x42fcb1[_0x106f24(0x171)](/#\{[^}]*\}/g,'?')[_0x106f24(0x171)](/\$\{[^}]*\}/g,'?')[_0x106f24(0x171)](/'[^']*'/g,'\x27\x27')[_0x106f24(0x171)](/--.*$/gm,'')[_0x106f24(0x171)](/\/\*[\s\S]*?\*\//g,''),_0x190ca=[],_0x230eed=_0x21ff60[_0x106f24(0x16e)](/FROM\s+([^\s,)(]+)/i);if(_0x230eed?.[0x1])_0x190ca[_0x106f24(0x16f)](_0x230eed[0x1]['replace'](/[`"]/g,''));for(const _0x1141c4 of _0x21ff60[_0x106f24(0x168)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x48d126=_0x1141c4[0x1]?.[_0x106f24(0x171)](/[`"]/g,'');if(_0x48d126&&!_0x190ca['includes'](_0x48d126))_0x190ca['push'](_0x48d126);}const _0x449f99=_0x21ff60[_0x106f24(0x16e)](/INTO\s+([^\s(]+)/i);if(_0x449f99?.[0x1]){const _0x4dc48e=_0x449f99[0x1][_0x106f24(0x171)](/[`"]/g,'');if(!_0x190ca[_0x106f24(0x155)](_0x4dc48e))_0x190ca[_0x106f24(0x16f)](_0x4dc48e);}const _0x3e972a=_0x21ff60[_0x106f24(0x16e)](/UPDATE\s+([^\s,)(]+)/i);if(_0x3e972a?.[0x1]){const _0x4f775b=_0x3e972a[0x1][_0x106f24(0x171)](/[`"]/g,'');if(!_0x190ca['includes'](_0x4f775b))_0x190ca[_0x106f24(0x16f)](_0x4f775b);}return _0x190ca;}function extractParameters(_0x35ae48){const _0x27d3f0=a100_0x3655,_0x2bae9c=new Set();for(const _0x5d1bc1 of _0x35ae48[_0x27d3f0(0x168)](/#\{(\w+)\}/g))if(_0x5d1bc1[0x1])_0x2bae9c['add'](_0x5d1bc1[0x1]);for(const _0x52f31c of _0x35ae48[_0x27d3f0(0x168)](/\$\{(\w+)\}/g))if(_0x52f31c[0x1])_0x2bae9c[_0x27d3f0(0x160)](_0x52f31c[0x1]);return Array[_0x27d3f0(0x159)](_0x2bae9c);}function a100_0x3655(_0x29d4d2,_0x5dc971){_0x29d4d2=_0x29d4d2-0x14e;const _0x32ba03=a100_0x32ba();let _0x36550d=_0x32ba03[_0x29d4d2];return _0x36550d;}export function validateSql(_0x3f99b9){const _0x58975f=a100_0x3655,_0xa73749=detectSqlType(_0x3f99b9),_0x22348d=extractTables(_0x3f99b9),_0x49e219=extractParameters(_0x3f99b9);if(_0xa73749['isDangerous'])return{'valid':![],'sqlType':_0xa73749,'tables':_0x22348d,'parameters':_0x49e219,'message':_0xa73749['reason']||_0xa73749[_0x58975f(0x15f)]+_0x58975f(0x172)};if(_0xa73749[_0x58975f(0x15f)]==='UNKNOWN')return{'valid':![],'sqlType':_0xa73749,'tables':_0x22348d,'parameters':_0x49e219,'message':_0x58975f(0x15a)};return{'valid':!![],'sqlType':_0xa73749,'tables':_0x22348d,'parameters':_0x49e219,'message':_0xa73749[_0x58975f(0x15f)]+'\x20query\x20targeting\x20'+(_0x22348d[_0x58975f(0x14f)]?_0x22348d[_0x58975f(0x15e)](',\x20'):_0x58975f(0x14e))+(_0x49e219[_0x58975f(0x14f)]?_0x58975f(0x167)+_0x49e219[_0x58975f(0x15e)](',\x20'):'')};}function a100_0x32ba(){const _0x376ea1=['2289825NWBVbw','34dWTINr','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','11nllQFp','UNKNOWN','includes','DELETE','UPDATE','2483780ODDjJh','from','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','split','3zwyQce','join','type','add','SELECT','1740828lOARgs','INSERT','toUpperCase','test','WITH','\x20with\x20parameters:\x20','matchAll','DDL','65869WTavWA','startsWith','941196jLktRV','trim','match','push','78536cQgrCg','replace','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','35sRmetc','19172590RYueRj','unknown\x20table(s)','length'];a100_0x32ba=function(){return _0x376ea1;};return a100_0x32ba();}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a101_0x3ae818=a101_0x313a;(function(_0x182c8e,_0xa5cc32){const _0x431e21=a101_0x313a,_0x4be022=_0x182c8e();while(!![]){try{const _0x50d33d=parseInt(_0x431e21(0x76))/0x1*(parseInt(_0x431e21(0x7a))/0x2)+-parseInt(_0x431e21(0x6d))/0x3+-parseInt(_0x431e21(0x78))/0x4+parseInt(_0x431e21(0x8d))/0x5*(parseInt(_0x431e21(0x6f))/0x6)+-parseInt(_0x431e21(0x7e))/0x7+parseInt(_0x431e21(0x72))/0x8*(parseInt(_0x431e21(0x70))/0x9)+-parseInt(_0x431e21(0x7f))/0xa;if(_0x50d33d===_0xa5cc32)break;else _0x4be022['push'](_0x4be022['shift']());}catch(_0x5e54bd){_0x4be022['push'](_0x4be022['shift']());}}}(a101_0x52f3,0x72d75));import{CLI_BIN_NAME}from'./constant/cli.js';function a101_0x52f3(){const _0x4bbfe8=['code','exitCode','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','Not\x20in\x20a\x20','validation_error','16795oRPokB','flag_missing','Missing\x20required\x20flag:\x20--','675567VfJXcu','Unknown\x20command:\x20','594yqSSgw','308475sufqbT','Run\x20`','72BqTMuA','config_missing','name','join','11UVZqcl','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','241148KdBqsb','unknown_command','139982TeGNZp','hint','Tip:\x20`','\x0a\x20\x20\x20\x20\x20\x20\x20','2448502eTUSrQ','3052660kECBfz','not_in_project','CliError','Configuration\x20file\x20not\x20found','Authentication\x20required','Operation\x20cancelled.','Network\x20error:\x20','\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.','api_error'];a101_0x52f3=function(){return _0x4bbfe8;};return a101_0x52f3();}function a101_0x313a(_0x1b5190,_0x4b19b2){_0x1b5190=_0x1b5190-0x6c;const _0x52f381=a101_0x52f3();let _0x313aee=_0x52f381[_0x1b5190];return _0x313aee;}export class CliError extends Error{[a101_0x3ae818(0x88)];[a101_0x3ae818(0x89)];['hint'];constructor(_0x27a126,_0x3cb00b,_0xcef257,_0x4226f5){const _0x596e1c=a101_0x3ae818;super(_0xcef257),this[_0x596e1c(0x74)]=_0x596e1c(0x81),this[_0x596e1c(0x88)]=_0x27a126,this['exitCode']=_0x3cb00b,this[_0x596e1c(0x7b)]=_0x4226f5;}}export const CliErrors={'authRequired':_0x1f97d2=>new CliError('auth_required',0x1,a101_0x3ae818(0x83),_0x1f97d2??a101_0x3ae818(0x71)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.'),'configMissing':_0x473aca=>new CliError(a101_0x3ae818(0x73),0x1,a101_0x3ae818(0x82),_0x473aca??['Set\x20appcode\x20via\x20`'+CLI_BIN_NAME+a101_0x3ae818(0x8a),a101_0x3ae818(0x7c)+CLI_BIN_NAME+a101_0x3ae818(0x86)][a101_0x3ae818(0x75)](a101_0x3ae818(0x7d))),'notInProject':()=>new CliError(a101_0x3ae818(0x80),0x1,a101_0x3ae818(0x8b)+CLI_BIN_NAME+'\x20project\x20directory','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.'),'apiError':(_0x248fa3,_0x10d700)=>new CliError(a101_0x3ae818(0x87),0x2,_0x248fa3,_0x10d700),'networkError':_0x84ba40=>new CliError('network_error',0x2,a101_0x3ae818(0x85)+_0x84ba40,a101_0x3ae818(0x77)),'unknownCommand':_0x22bd42=>new CliError(a101_0x3ae818(0x79),0x1,a101_0x3ae818(0x6e)+_0x22bd42,a101_0x3ae818(0x71)+CLI_BIN_NAME+'\x20--help`\x20to\x20see\x20available\x20commands.'),'flagMissing':(_0x1b1f8e,_0x4dec4e)=>new CliError(a101_0x3ae818(0x8e),0x1,a101_0x3ae818(0x6c)+_0x1b1f8e,_0x4dec4e),'validation':(_0x2a763e,_0x516fb4)=>new CliError(a101_0x3ae818(0x8c),0x1,_0x2a763e,_0x516fb4),'cancelled':_0x24432a=>new CliError('cancelled',0x0,_0x24432a??a101_0x3ae818(0x84),undefined)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a102_0x2165(_0x140434,_0x5a8eec){_0x140434=_0x140434-0x13b;const _0x4c726b=a102_0x4c72();let _0x216504=_0x4c726b[_0x140434];return _0x216504;}(function(_0xee44fe,_0x9d3152){const _0x58327c=a102_0x2165,_0x2b5e91=_0xee44fe();while(!![]){try{const _0x260dfb=-parseInt(_0x58327c(0x14e))/0x1+-parseInt(_0x58327c(0x14b))/0x2*(parseInt(_0x58327c(0x141))/0x3)+-parseInt(_0x58327c(0x14a))/0x4+parseInt(_0x58327c(0x14f))/0x5+-parseInt(_0x58327c(0x149))/0x6+-parseInt(_0x58327c(0x13b))/0x7+parseInt(_0x58327c(0x150))/0x8*(parseInt(_0x58327c(0x147))/0x9);if(_0x260dfb===_0x9d3152)break;else _0x2b5e91['push'](_0x2b5e91['shift']());}catch(_0x38f7e1){_0x2b5e91['push'](_0x2b5e91['shift']());}}}(a102_0x4c72,0x8c3c0));export function buildAllFlags(_0x2b774e){const _0x5bf5fe=a102_0x2165,_0xf06f7c=[..._0x2b774e[_0x5bf5fe(0x144)]];return _0x2b774e[_0x5bf5fe(0x146)]&&_0xf06f7c['push']({'name':_0x5bf5fe(0x152),'type':'boolean','description':_0x5bf5fe(0x13c)}),_0x2b774e[_0x5bf5fe(0x143)]!==![]&&_0xf06f7c[_0x5bf5fe(0x148)]({'name':_0x5bf5fe(0x151),'type':'string','default':_0x2b774e[_0x5bf5fe(0x145)]??'pretty','enum':[_0x5bf5fe(0x153),'pretty',_0x5bf5fe(0x13d),_0x5bf5fe(0x14c)],'description':_0x5bf5fe(0x142)}),_0x2b774e[_0x5bf5fe(0x154)]===_0x5bf5fe(0x140)&&_0xf06f7c[_0x5bf5fe(0x148)]({'name':_0x5bf5fe(0x13e),'type':_0x5bf5fe(0x13f),'description':_0x5bf5fe(0x14d)}),_0xf06f7c;}function a102_0x4c72(){const _0x277aa7=['defaultOutputFormat','dryRun','9ZnARuW','push','3871032wvaKiy','211104RuWJBb','4sRqiUt','compress','Skip\x20confirmation\x20prompt','208147XdFsNZ','5398950ROiuLI','14448584WHWBWN','format','dry-run','json','risk','1965418mDWkTT','Preview\x20the\x20operation\x20without\x20executing','table','yes','boolean','high-risk-write','1686891llmvpE','Output\x20format','hasFormat','flags'];a102_0x4c72=function(){return _0x277aa7;};return a102_0x4c72();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43f50e,_0x2483c0){const _0x5383b2=a103_0x175e,_0x49de16=_0x43f50e();while(!![]){try{const _0x158a35=parseInt(_0x5383b2(0x138))/0x1+-parseInt(_0x5383b2(0x140))/0x2+parseInt(_0x5383b2(0x12e))/0x3*(-parseInt(_0x5383b2(0x12a))/0x4)+parseInt(_0x5383b2(0x12c))/0x5+parseInt(_0x5383b2(0x139))/0x6+parseInt(_0x5383b2(0x136))/0x7*(-parseInt(_0x5383b2(0x134))/0x8)+-parseInt(_0x5383b2(0x13d))/0x9;if(_0x158a35===_0x2483c0)break;else _0x49de16['push'](_0x49de16['shift']());}catch(_0xefc5f3){_0x49de16['push'](_0x49de16['shift']());}}}(a103_0x29e8,0xd29b7));import{CliErrors}from'../errors.js';export function parseFlags(_0x4abdd9,_0x1cb4d1){const _0x537a7c=a103_0x175e,_0x3c621c={};for(const _0x33d879 of _0x4abdd9){const _0x1e5056=_0x1cb4d1[_0x33d879[_0x537a7c(0x14c)]]??_0x1cb4d1[toCamelCase(_0x33d879[_0x537a7c(0x14c)])];if(_0x1e5056===undefined||_0x1e5056===null){_0x33d879['default']!==undefined&&(_0x3c621c[_0x33d879[_0x537a7c(0x14c)]]=_0x33d879[_0x537a7c(0x12b)]);continue;}_0x3c621c[_0x33d879[_0x537a7c(0x14c)]]=coerce(_0x33d879,_0x1e5056);}for(const _0x23d38a of[_0x537a7c(0x13e),_0x537a7c(0x146),_0x537a7c(0x12f),_0x537a7c(0x135),'jq']){const _0x1cdeef=_0x1cb4d1[_0x23d38a];if(_0x1cdeef!==undefined){const _0x54c18b=_0x23d38a===_0x537a7c(0x146)?_0x537a7c(0x13e):_0x23d38a;_0x3c621c[_0x54c18b]=_0x1cdeef;}}return _0x3c621c;}function a103_0x175e(_0x3f6e2f,_0x5cb35f){_0x3f6e2f=_0x3f6e2f-0x129;const _0x29e88c=a103_0x29e8();let _0x175e84=_0x29e88c[_0x3f6e2f];return _0x175e84;}export function validateFlags(_0x3827fa,_0x956d75,_0x1014ba){const _0x3d33e4=a103_0x175e;for(const _0x2c712b of _0x3827fa){const _0x2ff166=_0x956d75[_0x2c712b['name']];if(_0x2c712b[_0x3d33e4(0x148)]&&(_0x2ff166===undefined||_0x2ff166===''))throw CliErrors[_0x3d33e4(0x12d)](_0x2c712b[_0x3d33e4(0x14c)],'--'+_0x2c712b[_0x3d33e4(0x14c)]+_0x3d33e4(0x149)+_0x1014ba+'`.');if(_0x2c712b['enum']&&_0x2c712b[_0x3d33e4(0x141)]['length']>0x0&&_0x2ff166!==undefined&&_0x2ff166!==''){if(!_0x2c712b[_0x3d33e4(0x141)]['includes'](String(_0x2ff166)))throw CliErrors[_0x3d33e4(0x147)](_0x3d33e4(0x145)+_0x2ff166+_0x3d33e4(0x130)+_0x2c712b[_0x3d33e4(0x14c)]+_0x3d33e4(0x143)+_0x2c712b[_0x3d33e4(0x141)][_0x3d33e4(0x131)](',\x20'));}if(_0x2c712b[_0x3d33e4(0x142)]&&_0x2ff166!==undefined&&_0x2ff166!==''){if(!_0x2c712b[_0x3d33e4(0x142)][_0x3d33e4(0x13b)][_0x3d33e4(0x13c)](String(_0x2ff166)))throw CliErrors[_0x3d33e4(0x147)](_0x3d33e4(0x14d)+_0x2c712b[_0x3d33e4(0x14c)]+_0x3d33e4(0x132)+_0x2c712b[_0x3d33e4(0x142)][_0x3d33e4(0x144)]+_0x3d33e4(0x13f)+_0x2ff166+'\x22.');}}}function coerce(_0x2c9bc2,_0x3e0619){const _0x47d81e=a103_0x175e;switch(_0x2c9bc2['type']){case _0x47d81e(0x14a):return _0x3e0619===!![]||_0x3e0619===_0x47d81e(0x133);case _0x47d81e(0x129):{const _0x15d4e0=Number(_0x3e0619);if(isNaN(_0x15d4e0))throw CliErrors['validation']('--'+_0x2c9bc2[_0x47d81e(0x14c)]+_0x47d81e(0x13a)+_0x3e0619+'\x22');return _0x15d4e0;}default:return String(_0x3e0619);}}function a103_0x29e8(){const _0x546353=['regex','test','3006657pigiqV','dry-run',',\x20got\x20\x22','1072992kUXbVT','enum','pattern','.\x20Allowed:\x20','description','Invalid\x20value\x20\x22','dryRun','validation','required','\x20is\x20required\x20for\x20`','boolean','replace','name','Invalid\x20--','number','9040lqXOnM','default','5867250KiJZXC','flagMissing','1095HSsiAY','yes','\x22\x20for\x20--','join',':\x20expected\x20','true','6296iNVOwV','format','371LbfOmv','toUpperCase','356461MWQhox','6419496cOLPFV','\x20expects\x20a\x20number,\x20got\x20\x22'];a103_0x29e8=function(){return _0x546353;};return a103_0x29e8();}function toCamelCase(_0x1a282f){const _0x3683d4=a103_0x175e;return _0x1a282f[_0x3683d4(0x14b)](/-([a-z])/g,(_0x10a8af,_0x243257)=>_0x243257[_0x3683d4(0x137)]());}
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a102_0x7b365=a102_0x2984;(function(_0x1ddc41,_0xf3531b){const _0x52e99e=a102_0x2984,_0x21091a=_0x1ddc41();while(!![]){try{const _0x1472dc=parseInt(_0x52e99e(0x198))/0x1+-parseInt(_0x52e99e(0x19c))/0x2+-parseInt(_0x52e99e(0x1cb))/0x3+-parseInt(_0x52e99e(0x199))/0x4*(parseInt(_0x52e99e(0x1a1))/0x5)+-parseInt(_0x52e99e(0x1b3))/0x6+-parseInt(_0x52e99e(0x1a8))/0x7+parseInt(_0x52e99e(0x185))/0x8;if(_0x1472dc===_0xf3531b)break;else _0x21091a['push'](_0x21091a['shift']());}catch(_0x2e2583){_0x21091a['push'](_0x21091a['shift']());}}}(a102_0x5e13,0x23706));import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a102_0x2984(_0x2f8b1d,_0x569b1d){_0x2f8b1d=_0x2f8b1d-0x17e;const _0x5e135d=a102_0x5e13();let _0x2984b9=_0x5e135d[_0x2f8b1d];return _0x2984b9;}const RISK_LABELS={'read':'','write':a102_0x7b365(0x183),'high-risk-write':a102_0x7b365(0x180)};export function generateCommandHelp(_0x2e6225){const _0x4bd342=a102_0x7b365,_0x1d5ed9=[],_0x95f768=_0x2e6225[_0x4bd342(0x1ab)]===_0x2e6225[_0x4bd342(0x1c5)]?CLI_BIN_NAME+'\x20'+_0x2e6225['service']:CLI_BIN_NAME+'\x20'+_0x2e6225[_0x4bd342(0x1ab)]+'\x20'+_0x2e6225['command'],_0x22fec6=_0x2e6225[_0x4bd342(0x181)]?_0x2e6225[_0x4bd342(0x181)]['map'](_0x1a3711=>_0x1a3711[_0x4bd342(0x19a)]!==![]?'<'+_0x1a3711[_0x4bd342(0x197)]+'>':'['+_0x1a3711[_0x4bd342(0x197)]+']')[_0x4bd342(0x194)]('\x20'):'',_0x8c9c38=_0x22fec6?_0x95f768+'\x20'+_0x22fec6+_0x4bd342(0x1c8):_0x95f768+_0x4bd342(0x1c8);_0x1d5ed9[_0x4bd342(0x191)](''),_0x1d5ed9[_0x4bd342(0x191)]('\x20\x20'+_0x2e6225[_0x4bd342(0x1a3)]),_0x1d5ed9[_0x4bd342(0x191)](''),_0x1d5ed9['push'](_0x4bd342(0x1b8)),_0x1d5ed9[_0x4bd342(0x191)]('\x20\x20\x20\x20'+_0x8c9c38),_0x1d5ed9['push'](''),_0x1d5ed9['push'](_0x4bd342(0x1c1)+_0x2e6225[_0x4bd342(0x17f)]);_0x2e6225['risk']==='high-risk-write'&&_0x1d5ed9['push'](_0x4bd342(0x186));_0x1d5ed9[_0x4bd342(0x191)]('');if(_0x2e6225[_0x4bd342(0x181)]&&_0x2e6225[_0x4bd342(0x181)][_0x4bd342(0x1be)]>0x0){_0x1d5ed9['push'](_0x4bd342(0x19f));const _0x568f5d=Math['max'](..._0x2e6225[_0x4bd342(0x181)]['map'](_0x5e9497=>_0x5e9497[_0x4bd342(0x197)][_0x4bd342(0x1be)]+0x2));for(const _0xfe7090 of _0x2e6225['args']){const _0x51fbb2=('<'+_0xfe7090[_0x4bd342(0x197)]+'>')['padEnd'](_0x568f5d+0x2),_0x38e115=_0xfe7090['required']!==![]?'\x20(required)':'';_0x1d5ed9[_0x4bd342(0x191)]('\x20\x20\x20\x20'+_0x51fbb2+_0xfe7090[_0x4bd342(0x1a3)]+_0x38e115);}_0x1d5ed9[_0x4bd342(0x191)]('');}if(_0x2e6225[_0x4bd342(0x18c)][_0x4bd342(0x1be)]>0x0||_0x2e6225[_0x4bd342(0x1bf)]||_0x2e6225[_0x4bd342(0x1cc)]!==![]){_0x1d5ed9['push'](_0x4bd342(0x1af));const _0x5a7eb5=buildAllFlags(_0x2e6225),_0x4aa847=Math[_0x4bd342(0x19e)](..._0x5a7eb5[_0x4bd342(0x1c4)](_0x2a0146=>formatFlagName(_0x2a0146)[_0x4bd342(0x1be)]));for(const _0x3556b7 of _0x5a7eb5){_0x1d5ed9[_0x4bd342(0x191)](_0x4bd342(0x1ba)+formatFlagName(_0x3556b7)[_0x4bd342(0x1c2)](_0x4aa847+0x2)+renderFlagDesc(_0x3556b7));}_0x1d5ed9['push']('');}const _0x3cfecb=[];_0x2e6225[_0x4bd342(0x1a6)]!==![]&&_0x3cfecb['push'](_0x4bd342(0x189)+CLI_BIN_NAME+_0x4bd342(0x1a9));_0x2e6225['requiresAppCode']!==![]&&_0x3cfecb['push'](_0x4bd342(0x1c6)+CLI_BIN_NAME+_0x4bd342(0x1d1));if(_0x3cfecb[_0x4bd342(0x1be)]>0x0){_0x1d5ed9['push'](_0x4bd342(0x1c0));for(const _0x8f3c72 of _0x3cfecb){_0x1d5ed9[_0x4bd342(0x191)](_0x4bd342(0x18e)+_0x8f3c72);}_0x1d5ed9[_0x4bd342(0x191)]('');}if(_0x2e6225['helpExtra']){const _0x2cae7d=typeof _0x2e6225[_0x4bd342(0x1b9)]===_0x4bd342(0x1bd)?_0x2e6225[_0x4bd342(0x1b9)]():_0x2e6225[_0x4bd342(0x1b9)];_0x1d5ed9[_0x4bd342(0x191)](_0x2cae7d),_0x1d5ed9['push']('');}return _0x1d5ed9[_0x4bd342(0x194)]('\x0a');}export function generateServiceHelp(_0x57350f){const _0x14fdaf=a102_0x7b365,_0x53be71=getServiceEntry(_0x57350f);if(!_0x53be71)return'\x20\x20Unknown\x20service:\x20'+_0x57350f+'\x0a';const _0x2c6415=[],_0x22d897=serviceGroups[_0x14fdaf(0x1cf)](_0x57350f);_0x2c6415[_0x14fdaf(0x191)](''),_0x2c6415['push']('\x20\x20'+_0x53be71[_0x14fdaf(0x18a)]),_0x2c6415['push'](''),_0x2c6415[_0x14fdaf(0x191)](_0x14fdaf(0x1b8)),_0x2c6415[_0x14fdaf(0x191)](_0x14fdaf(0x1ba)+CLI_BIN_NAME+'\x20'+_0x57350f+_0x14fdaf(0x1ca)),_0x2c6415['push'](''),_0x2c6415[_0x14fdaf(0x191)]('\x20\x20COMMANDS');for(const _0x385ff6 of _0x53be71[_0x14fdaf(0x1c7)]){_0x2c6415[_0x14fdaf(0x191)]('');const _0x55014e=_0x385ff6[_0x14fdaf(0x1ad)]?'\x20\x20'+_0x385ff6['tag'][_0x14fdaf(0x188)]():'';_0x2c6415[_0x14fdaf(0x191)]('\x20\x20\x20\x20'+_0x385ff6[_0x14fdaf(0x1c5)]+_0x55014e),_0x2c6415['push'](_0x14fdaf(0x1b4)+_0x385ff6['description']);const _0x291229=_0x22d897?.[_0x14fdaf(0x18d)](_0x46877d=>_0x46877d['command']===_0x385ff6[_0x14fdaf(0x1c5)]);if(_0x291229?.['args']&&_0x291229['args']['length']>0x0){_0x2c6415['push'](_0x14fdaf(0x1b7));const _0x334a1b=Math['max'](..._0x291229[_0x14fdaf(0x181)]['map'](_0x23515c=>_0x23515c[_0x14fdaf(0x197)]['length']+0x2));for(const _0x3d09c4 of _0x291229[_0x14fdaf(0x181)]){const _0x43e89b=('<'+_0x3d09c4[_0x14fdaf(0x197)]+'>')['padEnd'](_0x334a1b+0x2),_0x148592=_0x3d09c4['required']!==![]?_0x14fdaf(0x19d):'';_0x2c6415[_0x14fdaf(0x191)](_0x14fdaf(0x1b5)+_0x43e89b+_0x3d09c4['description']+_0x148592);}}const _0xce0dec=getCommandFlags(_0x57350f,_0x385ff6[_0x14fdaf(0x1c5)],_0x22d897);if(_0xce0dec[_0x14fdaf(0x1be)]>0x0){const _0x56fb9e=Math['max'](..._0xce0dec[_0x14fdaf(0x1c4)](_0x4f38a4=>formatFlagName(_0x4f38a4)[_0x14fdaf(0x1be)]));for(const _0x461367 of _0xce0dec){_0x2c6415[_0x14fdaf(0x191)]('\x20\x20\x20\x20\x20\x20'+formatFlagName(_0x461367)[_0x14fdaf(0x1c2)](_0x56fb9e+0x2)+renderFlagDesc(_0x461367));}}}return _0x2c6415[_0x14fdaf(0x191)](''),_0x2c6415[_0x14fdaf(0x194)]('\x0a');}export function generateFullHelp(){const _0x8665a4=a102_0x7b365,_0x33a5b0=[];_0x33a5b0[_0x8665a4(0x191)](''),_0x33a5b0[_0x8665a4(0x191)]('\x20\x20'+CLI_DISPLAY_NAME),_0x33a5b0[_0x8665a4(0x191)](''),_0x33a5b0[_0x8665a4(0x191)](_0x8665a4(0x1b8)),_0x33a5b0[_0x8665a4(0x191)](_0x8665a4(0x1bb)+CLI_BIN_NAME+_0x8665a4(0x195)),_0x33a5b0[_0x8665a4(0x191)](''),_0x33a5b0['push'](_0x8665a4(0x187));const _0x2ab9f5=GLOBAL_FLAGS[_0x8665a4(0x1b1)](_0x229b47=>!_0x229b47[_0x8665a4(0x182)]),_0x5120a2=Math[_0x8665a4(0x19e)](..._0x2ab9f5[_0x8665a4(0x1c4)](_0x311e82=>{const _0x2b8e67=_0x8665a4,_0x1fef25=_0x311e82[_0x2b8e67(0x17e)]?'\x20'+_0x311e82[_0x2b8e67(0x17e)]:'';return('--'+_0x311e82[_0x2b8e67(0x197)]+_0x1fef25)[_0x2b8e67(0x1be)];}));for(const _0xe0dade of _0x2ab9f5){const _0x4b1fa0=_0xe0dade[_0x8665a4(0x17e)]?'\x20'+_0xe0dade[_0x8665a4(0x17e)]:'',_0x249638=('--'+_0xe0dade[_0x8665a4(0x197)]+_0x4b1fa0)[_0x8665a4(0x1c2)](_0x5120a2+0x2);_0x33a5b0[_0x8665a4(0x191)]('\x20\x20\x20\x20'+_0x249638+_0xe0dade[_0x8665a4(0x1a3)]);}_0x33a5b0[_0x8665a4(0x191)](''),_0x33a5b0[_0x8665a4(0x191)](_0x8665a4(0x1aa)),_0x33a5b0['push']('');for(const _0x28a56f of serviceRegistry){_0x33a5b0[_0x8665a4(0x191)]('\x20\x20'+_0x28a56f['label']);if(_0x28a56f[_0x8665a4(0x1a4)]){const _0x1e7f62=_0x28a56f[_0x8665a4(0x1c7)][0x0],_0x32ac61=_0x1e7f62[_0x8665a4(0x1ad)]??'';_0x33a5b0[_0x8665a4(0x191)](_0x8665a4(0x1ba)+_0x28a56f[_0x8665a4(0x1ab)]['padEnd'](0x12)+_0x1e7f62[_0x8665a4(0x1a3)]+_0x32ac61);}else{const _0x481160=_0x28a56f[_0x8665a4(0x1c7)][_0x8665a4(0x1c4)](_0x29acf7=>_0x28a56f['service']+'\x20'+_0x29acf7[_0x8665a4(0x1c5)]),_0x3e5e4f=Math[_0x8665a4(0x19e)](..._0x481160[_0x8665a4(0x1c4)](_0x194488=>_0x194488[_0x8665a4(0x1be)]));for(let _0x2051ca=0x0;_0x2051ca<_0x28a56f['commands'][_0x8665a4(0x1be)];_0x2051ca++){const _0x54ec7c=_0x28a56f[_0x8665a4(0x1c7)][_0x2051ca],_0x26e6aa=_0x54ec7c[_0x8665a4(0x1ad)]??'';_0x33a5b0[_0x8665a4(0x191)]('\x20\x20\x20\x20'+_0x481160[_0x2051ca][_0x8665a4(0x1c2)](_0x3e5e4f+0x2)+_0x54ec7c['description']+_0x26e6aa);}}if(_0x28a56f[_0x8665a4(0x196)]?.['helpExtra']){const _0x2c105f=typeof _0x28a56f[_0x8665a4(0x196)][_0x8665a4(0x1b9)]===_0x8665a4(0x1bd)?_0x28a56f['wildcardDef'][_0x8665a4(0x1b9)]():_0x28a56f[_0x8665a4(0x196)]['helpExtra'];for(const _0x2653c1 of _0x2c105f[_0x8665a4(0x19b)]('\x0a')){_0x33a5b0['push']('\x20\x20'+_0x2653c1);}}_0x33a5b0[_0x8665a4(0x191)]('');}return _0x33a5b0['push']('\x20\x20Run\x20`'+CLI_BIN_NAME+_0x8665a4(0x193)),_0x33a5b0[_0x8665a4(0x191)](_0x8665a4(0x192)+CLI_BIN_NAME+_0x8665a4(0x1b6)),_0x33a5b0[_0x8665a4(0x191)](''),_0x33a5b0['join']('\x0a');}function getCommandFlags(_0x29463f,_0x29d662,_0x11596e){const _0x1ac399=a102_0x7b365;if(_0x11596e){const _0x253142=_0x11596e[_0x1ac399(0x18d)](_0x29327a=>_0x29327a[_0x1ac399(0x1c5)]===_0x29d662);if(_0x253142)return buildAllFlags(_0x253142);}return[];}function buildAllFlags(_0x1eef6d){const _0x1a3ae1=a102_0x7b365,_0x42860c=[..._0x1eef6d[_0x1a3ae1(0x18c)]];return _0x1eef6d[_0x1a3ae1(0x1bf)]&&_0x42860c[_0x1a3ae1(0x191)]({'name':_0x1a3ae1(0x1c9),'type':'boolean','description':_0x1a3ae1(0x1cd)}),_0x1eef6d[_0x1a3ae1(0x1cc)]!==![]&&_0x42860c[_0x1a3ae1(0x191)]({'name':_0x1a3ae1(0x18b),'type':_0x1a3ae1(0x1c3),'default':_0x1a3ae1(0x190),'enum':['json',_0x1a3ae1(0x190),'table'],'description':'Output\x20format'}),_0x1eef6d['risk']==='high-risk-write'&&_0x42860c[_0x1a3ae1(0x191)]({'name':_0x1a3ae1(0x1d0),'type':_0x1a3ae1(0x184),'description':_0x1a3ae1(0x1b2)}),_0x42860c;}function a102_0x5e13(){const _0x1a5c80=['\x20\x20\x20\x20\x20\x20ARGS','\x20\x20USAGE','helpExtra','\x20\x20\x20\x20','\x20\x20\x20\x20$\x20','number','function','length','dryRun','\x20\x20PREREQUISITES','\x20\x20RISK:\x20','padEnd','string','map','command','Requires\x20appcode\x20(set\x20via\x20`','commands','\x20[flags]','dry-run','\x20<command>\x20[flags]','347505zrRzxl','hasFormat','Preview\x20the\x20operation\x20without\x20executing','default','get','yes','\x20project\x20init`\x20or\x20--appcode).','hint','risk','\x20\x20[high-risk-write]','args','hidden','\x20\x20[write]','boolean','3496248SpGwkW','\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','\x20\x20GLOBAL\x20OPTIONS','trim','Requires\x20authentication\x20(run\x20`','label','format','flags','find','\x20\x20\x20\x20•\x20','\x20[default:\x20','pretty','push','\x20\x20Run\x20`','\x20<service>\x20--help`\x20for\x20service\x20commands.','join','\x20[global-options]\x20<service>\x20<command>\x20[flags]','wildcardDef','name','275894FxkmeA','954712HscnVe','required','split','123918QhsPqN','\x20(required)','max','\x20\x20ARGS','includes','5VssKkl','type','description','isSingleCommand','(required)','requiresAuth','\x20<n>','639863ddBSPI','\x20auth`\x20first).','\x20\x20COMMANDS','service','enum','tag','\x20<value>','\x20\x20FLAGS','\x20|\x20','filter','Skip\x20confirmation\x20prompt','359316uagwok','\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20','\x20<service>\x20<command>\x20--help`\x20for\x20command\x20flags.'];a102_0x5e13=function(){return _0x1a5c80;};return a102_0x5e13();}function renderFlagDesc(_0x30f600){const _0x31c00b=a102_0x7b365;let _0x49ee14=_0x30f600[_0x31c00b(0x1a3)];return _0x30f600[_0x31c00b(0x1ac)]&&_0x30f600[_0x31c00b(0x1ac)][_0x31c00b(0x1be)]>0x0&&(_0x49ee14+='\x20('+_0x30f600[_0x31c00b(0x1ac)][_0x31c00b(0x194)](_0x31c00b(0x1b0))+')'),_0x30f600[_0x31c00b(0x1ce)]!==undefined&&_0x30f600[_0x31c00b(0x1ce)]!==''&&_0x30f600[_0x31c00b(0x1ce)]!==![]&&(_0x49ee14+=_0x31c00b(0x18f)+_0x30f600['default']+']'),_0x30f600[_0x31c00b(0x19a)]&&!_0x49ee14[_0x31c00b(0x1a0)](_0x31c00b(0x1a5))&&(_0x49ee14+=_0x31c00b(0x19d)),_0x49ee14;}function formatFlagName(_0x4b377b){const _0x1d0c75=a102_0x7b365,_0x44aadc=_0x4b377b[_0x1d0c75(0x1a2)]===_0x1d0c75(0x184)?'':_0x4b377b['type']===_0x1d0c75(0x1bc)?_0x1d0c75(0x1a7):_0x1d0c75(0x1ae);return'--'+_0x4b377b[_0x1d0c75(0x197)]+_0x44aadc;}
|
|
1
|
+
function a104_0x12ca(){const _0xa5d5e6=['risk','isSingleCommand','3mCgHen','7082887WtRrJK','\x20project\x20init`\x20or\x20--appcode).','\x20<service>\x20<command>\x20--help`\x20for\x20command\x20flags.','13AScLpb','23124972jORGRD','\x20\x20\x20\x20\x20\x20\x20\x20','enum','padEnd','service','\x20\x20COMMANDS','(required)','6amzZQU','300100HsBamB','2nQbtMc','length','\x20<value>','\x20\x20USAGE','68953mECAmg','push','hasFormat','find','required','190ZmfFca','default','type','label','\x20[global-options]\x20<service>\x20<command>\x20[flags]','flags','join','requiresAuth','tag','hint','\x20auth`\x20first).','348689sRJfzP','helpExtra','\x20\x20GLOBAL\x20OPTIONS','\x20<service>\x20--help`\x20for\x20service\x20commands.','dryRun','name','number','\x20|\x20','args','high-risk-write','commands','Requires\x20appcode\x20(set\x20via\x20`','\x20\x20\x20\x20','\x20\x20Unknown\x20service:\x20','description','9bWMTdA','\x20\x20Run\x20`','\x20\x20FLAGS','filter','wildcardDef','6412456ztLzNS','command','\x20\x20[high-risk-write]','max','get','trim','\x20\x20\x20\x20\x20\x20ARGS','map','includes','\x20\x20ARGS','\x20(required)','\x20\x20\x20\x20•\x20','requiresAppCode','869645QVXLga','function','\x20\x20\x20\x20\x20\x20'];a104_0x12ca=function(){return _0xa5d5e6;};return a104_0x12ca();}const a104_0x447fb3=a104_0x1bd9;(function(_0xfb340c,_0x40d0e8){const _0x4ec4a9=a104_0x1bd9,_0x3a4bb8=_0xfb340c();while(!![]){try{const _0x585af5=-parseInt(_0x4ec4a9(0x1d3))/0x1*(-parseInt(_0x4ec4a9(0x1cf))/0x2)+-parseInt(_0x4ec4a9(0x209))/0x3*(parseInt(_0x4ec4a9(0x1ce))/0x4)+-parseInt(_0x4ec4a9(0x204))/0x5+-parseInt(_0x4ec4a9(0x1cd))/0x6*(parseInt(_0x4ec4a9(0x20a))/0x7)+-parseInt(_0x4ec4a9(0x1f7))/0x8*(parseInt(_0x4ec4a9(0x1f2))/0x9)+parseInt(_0x4ec4a9(0x1d8))/0xa*(parseInt(_0x4ec4a9(0x1e3))/0xb)+parseInt(_0x4ec4a9(0x20e))/0xc*(parseInt(_0x4ec4a9(0x20d))/0xd);if(_0x585af5===_0x40d0e8)break;else _0x3a4bb8['push'](_0x3a4bb8['shift']());}catch(_0x5734d1){_0x3a4bb8['push'](_0x3a4bb8['shift']());}}}(a104_0x12ca,0x82d9b));import{buildAllFlags}from'./build-all-flags.js';function a104_0x1bd9(_0x7d9949,_0x132891){_0x7d9949=_0x7d9949-0x1c7;const _0x12ca5c=a104_0x12ca();let _0x1bd928=_0x12ca5c[_0x7d9949];return _0x1bd928;}import{serviceRegistry,serviceGroups,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';const RISK_LABELS={'read':'','write':'\x20\x20[write]','high-risk-write':a104_0x447fb3(0x1f9)};export function generateCommandHelp(_0x343a8d){const _0x11c363=a104_0x447fb3,_0x1ddfe5=[],_0x3d2c44=_0x343a8d[_0x11c363(0x1ca)]===_0x343a8d[_0x11c363(0x1f8)]?CLI_BIN_NAME+'\x20'+_0x343a8d['service']:CLI_BIN_NAME+'\x20'+_0x343a8d['service']+'\x20'+_0x343a8d[_0x11c363(0x1f8)],_0xd7defe=_0x343a8d[_0x11c363(0x1eb)]?_0x343a8d[_0x11c363(0x1eb)][_0x11c363(0x1fe)](_0x2e0347=>_0x2e0347['required']!==![]?'<'+_0x2e0347[_0x11c363(0x1e8)]+'>':'['+_0x2e0347[_0x11c363(0x1e8)]+']')['join']('\x20'):'',_0x3d0e46=_0xd7defe?_0x3d2c44+'\x20'+_0xd7defe+'\x20[flags]':_0x3d2c44+'\x20[flags]';_0x1ddfe5[_0x11c363(0x1d4)](''),_0x1ddfe5[_0x11c363(0x1d4)]('\x20\x20'+_0x343a8d[_0x11c363(0x1f1)]),_0x1ddfe5['push'](''),_0x1ddfe5[_0x11c363(0x1d4)](_0x11c363(0x1d2)),_0x1ddfe5[_0x11c363(0x1d4)](_0x11c363(0x1ef)+_0x3d0e46),_0x1ddfe5[_0x11c363(0x1d4)](''),_0x1ddfe5[_0x11c363(0x1d4)]('\x20\x20RISK:\x20'+_0x343a8d[_0x11c363(0x207)]);_0x343a8d[_0x11c363(0x207)]===_0x11c363(0x1ec)&&_0x1ddfe5['push']('\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.');_0x1ddfe5[_0x11c363(0x1d4)]('');if(_0x343a8d[_0x11c363(0x1eb)]&&_0x343a8d['args'][_0x11c363(0x1d0)]>0x0){_0x1ddfe5['push'](_0x11c363(0x200));const _0xe47dd8=Math['max'](..._0x343a8d[_0x11c363(0x1eb)][_0x11c363(0x1fe)](_0x1adde8=>_0x1adde8[_0x11c363(0x1e8)][_0x11c363(0x1d0)]+0x2));for(const _0x4286ea of _0x343a8d[_0x11c363(0x1eb)]){const _0x50a8da=('<'+_0x4286ea[_0x11c363(0x1e8)]+'>')[_0x11c363(0x1c9)](_0xe47dd8+0x2),_0x2f0c11=_0x4286ea[_0x11c363(0x1d7)]!==![]?'\x20(required)':'';_0x1ddfe5[_0x11c363(0x1d4)]('\x20\x20\x20\x20'+_0x50a8da+_0x4286ea[_0x11c363(0x1f1)]+_0x2f0c11);}_0x1ddfe5[_0x11c363(0x1d4)]('');}if(_0x343a8d[_0x11c363(0x1dd)][_0x11c363(0x1d0)]>0x0||_0x343a8d[_0x11c363(0x1e7)]||_0x343a8d[_0x11c363(0x1d5)]!==![]){_0x1ddfe5[_0x11c363(0x1d4)](_0x11c363(0x1f4));const _0x5f30a8=buildAllFlags(_0x343a8d),_0x18f2dd=Math[_0x11c363(0x1fa)](..._0x5f30a8['map'](_0x55e3d2=>formatFlagName(_0x55e3d2)[_0x11c363(0x1d0)]));for(const _0x541a96 of _0x5f30a8){_0x1ddfe5[_0x11c363(0x1d4)](_0x11c363(0x1ef)+formatFlagName(_0x541a96)[_0x11c363(0x1c9)](_0x18f2dd+0x2)+renderFlagDesc(_0x541a96));}_0x1ddfe5['push']('');}const _0x4b4f20=[];_0x343a8d[_0x11c363(0x1df)]!==![]&&_0x4b4f20[_0x11c363(0x1d4)]('Requires\x20authentication\x20(run\x20`'+CLI_BIN_NAME+_0x11c363(0x1e2));_0x343a8d[_0x11c363(0x203)]!==![]&&_0x4b4f20['push'](_0x11c363(0x1ee)+CLI_BIN_NAME+_0x11c363(0x20b));if(_0x4b4f20['length']>0x0){_0x1ddfe5[_0x11c363(0x1d4)]('\x20\x20PREREQUISITES');for(const _0x480c50 of _0x4b4f20){_0x1ddfe5[_0x11c363(0x1d4)](_0x11c363(0x202)+_0x480c50);}_0x1ddfe5[_0x11c363(0x1d4)]('');}if(_0x343a8d[_0x11c363(0x1e4)]){const _0x13affa=typeof _0x343a8d[_0x11c363(0x1e4)]===_0x11c363(0x205)?_0x343a8d[_0x11c363(0x1e4)]():_0x343a8d[_0x11c363(0x1e4)];_0x1ddfe5[_0x11c363(0x1d4)](_0x13affa),_0x1ddfe5[_0x11c363(0x1d4)]('');}return _0x1ddfe5['join']('\x0a');}export function generateServiceHelp(_0x2da3fe){const _0x221e2d=a104_0x447fb3,_0x575a37=getServiceEntry(_0x2da3fe);if(!_0x575a37)return _0x221e2d(0x1f0)+_0x2da3fe+'\x0a';const _0x3ce2a1=[],_0x2eb709=serviceGroups[_0x221e2d(0x1fb)](_0x2da3fe);_0x3ce2a1[_0x221e2d(0x1d4)](''),_0x3ce2a1[_0x221e2d(0x1d4)]('\x20\x20'+_0x575a37['label']),_0x3ce2a1['push'](''),_0x3ce2a1[_0x221e2d(0x1d4)]('\x20\x20USAGE'),_0x3ce2a1['push'](_0x221e2d(0x1ef)+CLI_BIN_NAME+'\x20'+_0x2da3fe+'\x20<command>\x20[args]\x20[flags]'),_0x3ce2a1[_0x221e2d(0x1d4)](''),_0x3ce2a1[_0x221e2d(0x1d4)](_0x221e2d(0x1cb));for(const _0x531347 of _0x575a37[_0x221e2d(0x1ed)]){_0x3ce2a1[_0x221e2d(0x1d4)]('');const _0x1822c2=_0x531347[_0x221e2d(0x1e0)]?'\x20\x20'+_0x531347['tag'][_0x221e2d(0x1fc)]():'';_0x3ce2a1['push'](_0x221e2d(0x1ef)+_0x531347['command']+_0x1822c2),_0x3ce2a1['push'](_0x221e2d(0x206)+_0x531347[_0x221e2d(0x1f1)]);const _0xb4bed0=_0x2eb709?.[_0x221e2d(0x1d6)](_0x2f02c9=>_0x2f02c9['command']===_0x531347[_0x221e2d(0x1f8)]);if(_0xb4bed0?.[_0x221e2d(0x1eb)]&&_0xb4bed0[_0x221e2d(0x1eb)][_0x221e2d(0x1d0)]>0x0){_0x3ce2a1['push'](_0x221e2d(0x1fd));const _0x3f983e=Math[_0x221e2d(0x1fa)](..._0xb4bed0['args']['map'](_0x5cba9f=>_0x5cba9f[_0x221e2d(0x1e8)]['length']+0x2));for(const _0x34ba1e of _0xb4bed0[_0x221e2d(0x1eb)]){const _0x595a31=('<'+_0x34ba1e[_0x221e2d(0x1e8)]+'>')[_0x221e2d(0x1c9)](_0x3f983e+0x2),_0x2e2850=_0x34ba1e['required']!==![]?_0x221e2d(0x201):'';_0x3ce2a1[_0x221e2d(0x1d4)](_0x221e2d(0x1c7)+_0x595a31+_0x34ba1e[_0x221e2d(0x1f1)]+_0x2e2850);}}const _0x2a68df=getCommandFlags(_0x2da3fe,_0x531347[_0x221e2d(0x1f8)],_0x2eb709);if(_0x2a68df['length']>0x0){const _0x8c5b4d=Math[_0x221e2d(0x1fa)](..._0x2a68df[_0x221e2d(0x1fe)](_0x3bb5b6=>formatFlagName(_0x3bb5b6)[_0x221e2d(0x1d0)]));for(const _0x107bd8 of _0x2a68df){_0x3ce2a1[_0x221e2d(0x1d4)](_0x221e2d(0x206)+formatFlagName(_0x107bd8)[_0x221e2d(0x1c9)](_0x8c5b4d+0x2)+renderFlagDesc(_0x107bd8));}}}return _0x3ce2a1[_0x221e2d(0x1d4)](''),_0x3ce2a1[_0x221e2d(0x1de)]('\x0a');}export function generateFullHelp(){const _0x2540e8=a104_0x447fb3,_0x49c410=[];_0x49c410[_0x2540e8(0x1d4)](''),_0x49c410[_0x2540e8(0x1d4)]('\x20\x20'+CLI_DISPLAY_NAME),_0x49c410['push'](''),_0x49c410[_0x2540e8(0x1d4)](_0x2540e8(0x1d2)),_0x49c410['push']('\x20\x20\x20\x20$\x20'+CLI_BIN_NAME+_0x2540e8(0x1dc)),_0x49c410['push'](''),_0x49c410['push'](_0x2540e8(0x1e5));const _0x575660=GLOBAL_FLAGS[_0x2540e8(0x1f5)](_0x1d8eb9=>!_0x1d8eb9['hidden']),_0x350ad5=Math['max'](..._0x575660[_0x2540e8(0x1fe)](_0x401788=>{const _0x205234=_0x2540e8,_0x10fb69=_0x401788[_0x205234(0x1e1)]?'\x20'+_0x401788[_0x205234(0x1e1)]:'';return('--'+_0x401788['name']+_0x10fb69)[_0x205234(0x1d0)];}));for(const _0x4e1df4 of _0x575660){const _0x38a4ec=_0x4e1df4[_0x2540e8(0x1e1)]?'\x20'+_0x4e1df4[_0x2540e8(0x1e1)]:'',_0xac1382=('--'+_0x4e1df4[_0x2540e8(0x1e8)]+_0x38a4ec)['padEnd'](_0x350ad5+0x2);_0x49c410['push'](_0x2540e8(0x1ef)+_0xac1382+_0x4e1df4['description']);}_0x49c410['push'](''),_0x49c410['push'](_0x2540e8(0x1cb)),_0x49c410[_0x2540e8(0x1d4)]('');for(const _0x26315a of serviceRegistry){_0x49c410[_0x2540e8(0x1d4)]('\x20\x20'+_0x26315a[_0x2540e8(0x1db)]);if(_0x26315a[_0x2540e8(0x208)]){const _0x1ce00f=_0x26315a[_0x2540e8(0x1ed)][0x0],_0x1a71b5=_0x1ce00f['tag']??'';_0x49c410[_0x2540e8(0x1d4)](_0x2540e8(0x1ef)+_0x26315a['service']['padEnd'](0x12)+_0x1ce00f[_0x2540e8(0x1f1)]+_0x1a71b5);}else{const _0x59d837=_0x26315a['commands'][_0x2540e8(0x1fe)](_0x48c6f1=>_0x26315a[_0x2540e8(0x1ca)]+'\x20'+_0x48c6f1[_0x2540e8(0x1f8)]),_0x58278a=Math[_0x2540e8(0x1fa)](..._0x59d837['map'](_0x341e90=>_0x341e90[_0x2540e8(0x1d0)]));for(let _0x5e723e=0x0;_0x5e723e<_0x26315a[_0x2540e8(0x1ed)][_0x2540e8(0x1d0)];_0x5e723e++){const _0x4afe5b=_0x26315a[_0x2540e8(0x1ed)][_0x5e723e],_0x1aa915=_0x4afe5b[_0x2540e8(0x1e0)]??'';_0x49c410[_0x2540e8(0x1d4)](_0x2540e8(0x1ef)+_0x59d837[_0x5e723e][_0x2540e8(0x1c9)](_0x58278a+0x2)+_0x4afe5b[_0x2540e8(0x1f1)]+_0x1aa915);}}if(_0x26315a[_0x2540e8(0x1f6)]?.['helpExtra']){const _0x64fb44=typeof _0x26315a[_0x2540e8(0x1f6)][_0x2540e8(0x1e4)]===_0x2540e8(0x205)?_0x26315a['wildcardDef'][_0x2540e8(0x1e4)]():_0x26315a['wildcardDef'][_0x2540e8(0x1e4)];for(const _0x5e68f9 of _0x64fb44['split']('\x0a')){_0x49c410['push']('\x20\x20'+_0x5e68f9);}}_0x49c410[_0x2540e8(0x1d4)]('');}return _0x49c410[_0x2540e8(0x1d4)]('\x20\x20Run\x20`'+CLI_BIN_NAME+_0x2540e8(0x1e6)),_0x49c410[_0x2540e8(0x1d4)](_0x2540e8(0x1f3)+CLI_BIN_NAME+_0x2540e8(0x20c)),_0x49c410['push'](''),_0x49c410[_0x2540e8(0x1de)]('\x0a');}function getCommandFlags(_0x37961c,_0x3fd502,_0x3d2d34){if(_0x3d2d34){const _0x4f6612=_0x3d2d34['find'](_0x514fb6=>_0x514fb6['command']===_0x3fd502);if(_0x4f6612)return buildAllFlags(_0x4f6612);}return[];}function renderFlagDesc(_0x406c36){const _0x5af847=a104_0x447fb3;let _0x30771f=_0x406c36[_0x5af847(0x1f1)];return _0x406c36[_0x5af847(0x1c8)]&&_0x406c36[_0x5af847(0x1c8)][_0x5af847(0x1d0)]>0x0&&(_0x30771f+='\x20('+_0x406c36[_0x5af847(0x1c8)][_0x5af847(0x1de)](_0x5af847(0x1ea))+')'),_0x406c36[_0x5af847(0x1d9)]!==undefined&&_0x406c36['default']!==''&&_0x406c36[_0x5af847(0x1d9)]!==![]&&(_0x30771f+='\x20[default:\x20'+_0x406c36[_0x5af847(0x1d9)]+']'),_0x406c36[_0x5af847(0x1d7)]&&!_0x30771f[_0x5af847(0x1ff)](_0x5af847(0x1cc))&&(_0x30771f+=_0x5af847(0x201)),_0x30771f;}function formatFlagName(_0x98a334){const _0x1e6c42=a104_0x447fb3,_0x1583f6=_0x98a334['type']==='boolean'?'':_0x98a334[_0x1e6c42(0x1da)]===_0x1e6c42(0x1e9)?'\x20<n>':_0x1e6c42(0x1d1);return'--'+_0x98a334['name']+_0x1583f6;}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a105_0x17ce(){var _0x37582c=['2712rAjpCp','135XNziDZ','1485105xXGMoc','12220IIboGT','37890FiVzri','24nwmEUe','1430YejTlb','18621cdRqKa','48CAaiAM','9718716fxgZNa','17800ENEXdE','285313uYWDhF'];a105_0x17ce=function(){return _0x37582c;};return a105_0x17ce();}(function(_0x1e3b2a,_0x1e1798){var _0x1bc631=a105_0x2967,_0x4c4276=_0x1e3b2a();while(!![]){try{var _0x311589=parseInt(_0x1bc631(0x148))/0x1*(parseInt(_0x1bc631(0x146))/0x2)+parseInt(_0x1bc631(0x14c))/0x3+-parseInt(_0x1bc631(0x14d))/0x4*(parseInt(_0x1bc631(0x14b))/0x5)+-parseInt(_0x1bc631(0x14f))/0x6*(-parseInt(_0x1bc631(0x149))/0x7)+-parseInt(_0x1bc631(0x14a))/0x8*(-parseInt(_0x1bc631(0x145))/0x9)+parseInt(_0x1bc631(0x14e))/0xa*(-parseInt(_0x1bc631(0x144))/0xb)+-parseInt(_0x1bc631(0x147))/0xc;if(_0x311589===_0x1e1798)break;else _0x4c4276['push'](_0x4c4276['shift']());}catch(_0x363542){_0x4c4276['push'](_0x4c4276['shift']());}}}(a105_0x17ce,0x62132));export{runCommand}from'./runner.js';export{parseFlags,validateFlags}from'./flags.js';export{formatOutput}from'./output.js';function a105_0x2967(_0x36ecd2,_0x7d7eb8){_0x36ecd2=_0x36ecd2-0x144;var _0x17ce70=a105_0x17ce();var _0x296788=_0x17ce70[_0x36ecd2];return _0x296788;}export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./help.js';export{extractList,extractPaging}from'./response.js';export{riskLevelOrder}from'./types.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a106_0x3e8e(){const _0x580063=['541899XeYxzt','isArray','map','Unknown\x20error','repeat','message','error','object','(none)','compress','globalPath','data','json','project','meta','dryRun','padEnd','\x20\x20Default\x20app:\x20\x20\x20\x20\x20','(empty)','2222cisNrT','table','log','Error:\x20','61854wWzepp','defaultAppSource','\x20items:\x0a','defaultApp','3iYRgFL','join','1672876NLceXV','pretty','write','\x20(default\x20from\x20global\x20file)','\x20\x20Global\x20config:\x20\x20\x20','78640qltuug','413639ZzpJVC','stringify','3914848oMmNgr','2xXetLc','Found\x20','77pFTlmB','853195lprsyU','max','keys','stdout','[dry-run]\x20Would\x20execute:','trim','entries','length','risk','global','endsWith','\x20\x20Project\x20config:\x20\x20','items'];a106_0x3e8e=function(){return _0x580063;};return a106_0x3e8e();}(function(_0x23d7f,_0x431840){const _0x4a98ae=a106_0x2997,_0x25eeac=_0x23d7f();while(!![]){try{const _0x58932a=-parseInt(_0x4a98ae(0x93))/0x1*(parseInt(_0x4a98ae(0x96))/0x2)+parseInt(_0x4a98ae(0xc1))/0x3*(-parseInt(_0x4a98ae(0xc3))/0x4)+parseInt(_0x4a98ae(0x99))/0x5+parseInt(_0x4a98ae(0xbd))/0x6*(-parseInt(_0x4a98ae(0x98))/0x7)+-parseInt(_0x4a98ae(0x95))/0x8+-parseInt(_0x4a98ae(0xa6))/0x9+parseInt(_0x4a98ae(0x92))/0xa*(parseInt(_0x4a98ae(0xb9))/0xb);if(_0x58932a===_0x431840)break;else _0x25eeac['push'](_0x25eeac['shift']());}catch(_0xdf2f13){_0x25eeac['push'](_0x25eeac['shift']());}}}(a106_0x3e8e,0x40897));import{applyJqFilter}from'../utils/apply-jq-filter.js';export function formatOutput(_0x4bb1e5,_0x5c325e){const _0x34c5f1=a106_0x2997,{format:_0x29fc52}=_0x5c325e;switch(_0x29fc52){case _0x34c5f1(0xb2):printJson(_0x4bb1e5,_0x5c325e);break;case _0x34c5f1(0xaf):printCompress(_0x4bb1e5,_0x5c325e);break;case _0x34c5f1(0xba):printTable(_0x4bb1e5,_0x5c325e);break;case _0x34c5f1(0x8e):default:printPretty(_0x4bb1e5,_0x5c325e);break;}}function buildEnvelope(_0x5e48e9,_0x5ed7de){const _0x408e7b=a106_0x2997,_0x588f03={'ok':_0x5e48e9['ok'],'command':_0x5ed7de['command'],'risk':_0x5ed7de[_0x408e7b(0xa1)]};if(_0x5ed7de[_0x408e7b(0xb5)])_0x588f03[_0x408e7b(0xb5)]=!![];if(_0x5e48e9[_0x408e7b(0xb1)]!==undefined)_0x588f03['data']=_0x5e48e9['data'];return!_0x5e48e9['ok']&&_0x5e48e9[_0x408e7b(0xab)]&&(_0x588f03[_0x408e7b(0xac)]={'code':'command_error','message':_0x5e48e9['message']}),_0x588f03;}function printJson(_0x4c6a9c,_0xbafa44){const _0x28e11b=a106_0x2997,_0x417614=buildEnvelope(_0x4c6a9c,_0xbafa44),_0xb9f27b=JSON[_0x28e11b(0x94)](_0x417614,null,0x2)+'\x0a';writeJsonWithOptionalJq(_0xb9f27b,_0xbafa44);}function printCompress(_0xfc3147,_0x2c068c){const _0x5b411b=buildEnvelope(_0xfc3147,_0x2c068c),_0xa2ed0f=JSON['stringify'](_0x5b411b)+'\x0a';writeJsonWithOptionalJq(_0xa2ed0f,_0x2c068c);}function writeJsonWithOptionalJq(_0x18bd42,_0x47f6a9){const _0x3087b3=a106_0x2997,_0x96328a=_0x47f6a9['jqFilter']?.[_0x3087b3(0x9e)]();if(!_0x96328a){process['stdout'][_0x3087b3(0x8f)](_0x18bd42);return;}const _0x1ea94d=applyJqFilter(_0x18bd42,_0x96328a);process[_0x3087b3(0x9c)][_0x3087b3(0x8f)](_0x1ea94d[_0x3087b3(0xa3)]('\x0a')?_0x1ea94d:_0x1ea94d+'\x0a');}function isListWithMetaData(_0x2991d5){const _0xe807af=a106_0x2997;return typeof _0x2991d5===_0xe807af(0xad)&&_0x2991d5!==null&&_0xe807af(0xa5)in _0x2991d5&&Array[_0xe807af(0xa7)](_0x2991d5[_0xe807af(0xa5)])&&_0xe807af(0xb4)in _0x2991d5&&typeof _0x2991d5[_0xe807af(0xb4)]==='object'&&_0x2991d5[_0xe807af(0xb4)]!==null;}function printAppListMeta(_0x1a536d){const _0x3f36fc=a106_0x2997,_0x543de8=_0x1a536d[_0x3f36fc(0xb0)]!=null?String(_0x1a536d[_0x3f36fc(0xb0)]):_0x3f36fc(0xae),_0x1cc94c=_0x1a536d['projectPath']!=null?String(_0x1a536d['projectPath']):_0x3f36fc(0xae),_0x3929bf=_0x1a536d[_0x3f36fc(0xc0)]!=null?String(_0x1a536d[_0x3f36fc(0xc0)]):_0x3f36fc(0xae),_0x2edcd8=_0x1a536d[_0x3f36fc(0xbe)],_0x571598=_0x2edcd8===_0x3f36fc(0xb3)?'\x20(default\x20from\x20project\x20file)':_0x2edcd8===_0x3f36fc(0xa2)?_0x3f36fc(0x90):'';console[_0x3f36fc(0xbb)](_0x3f36fc(0x91)+_0x543de8),console['log'](_0x3f36fc(0xa4)+_0x1cc94c),console[_0x3f36fc(0xbb)](_0x3f36fc(0xb7)+_0x3929bf+_0x571598),console[_0x3f36fc(0xbb)]();}function a106_0x2997(_0x2f3950,_0x15496e){_0x2f3950=_0x2f3950-0x8e;const _0x3e8e85=a106_0x3e8e();let _0x2997ec=_0x3e8e85[_0x2f3950];return _0x2997ec;}function printPretty(_0x32b3f6,_0x4fe85f){const _0x11020f=a106_0x2997;if(_0x4fe85f[_0x11020f(0xb5)]){console[_0x11020f(0xbb)](_0x11020f(0x9d)),console[_0x11020f(0xbb)](JSON[_0x11020f(0x94)](_0x32b3f6[_0x11020f(0xb1)],null,0x2));return;}if(!_0x32b3f6['ok']){console['error'](_0x11020f(0xbc)+(_0x32b3f6['message']??_0x11020f(0xa9)));return;}const _0x42df71=_0x32b3f6[_0x11020f(0xb1)];if(_0x42df71===undefined||_0x42df71===null){if(_0x32b3f6['message'])console['log'](_0x32b3f6[_0x11020f(0xab)]);return;}if(isListWithMetaData(_0x42df71)){printAppListMeta(_0x42df71[_0x11020f(0xb4)]),printArrayPretty(_0x42df71[_0x11020f(0xa5)]);return;}if(Array[_0x11020f(0xa7)](_0x42df71)){printArrayPretty(_0x42df71);return;}if(typeof _0x42df71===_0x11020f(0xad)){printObjectPretty(_0x42df71);return;}console[_0x11020f(0xbb)](String(_0x42df71));}function printObjectPretty(_0x5bd9a6){const _0x1878d6=a106_0x2997,_0x4bba46=Math[_0x1878d6(0x9a)](...Object[_0x1878d6(0x9b)](_0x5bd9a6)[_0x1878d6(0xa8)](_0x590ad5=>_0x590ad5['length']),0x0);for(const [_0x409f6b,_0x1ef569]of Object[_0x1878d6(0x9f)](_0x5bd9a6)){if(_0x1ef569===undefined||_0x1ef569===null)continue;const _0x4e9566=_0x409f6b[_0x1878d6(0xb6)](_0x4bba46);typeof _0x1ef569===_0x1878d6(0xad)?console[_0x1878d6(0xbb)](_0x4e9566+'\x20\x20'+JSON[_0x1878d6(0x94)](_0x1ef569)):console[_0x1878d6(0xbb)](_0x4e9566+'\x20\x20'+_0x1ef569);}}function printArrayPretty(_0x43e275){const _0x2ea1bb=a106_0x2997;if(_0x43e275[_0x2ea1bb(0xa0)]===0x0){console[_0x2ea1bb(0xbb)](_0x2ea1bb(0xb8));return;}console['log'](_0x2ea1bb(0x97)+_0x43e275[_0x2ea1bb(0xa0)]+_0x2ea1bb(0xbf));for(const _0x7df535 of _0x43e275){if(typeof _0x7df535===_0x2ea1bb(0xad)&&_0x7df535!==null){const _0x14976f=Object[_0x2ea1bb(0x9f)](_0x7df535)['filter'](([,_0x1f9329])=>_0x1f9329!=null&&_0x1f9329!=='');if(_0x14976f[_0x2ea1bb(0xa0)]===0x0)continue;const _0x385c94=Math[_0x2ea1bb(0x9a)](..._0x14976f['map'](([_0x4f0784])=>_0x4f0784['length']));for(const [_0x26033f,_0x4a70f7]of _0x14976f){const _0x3267ad=typeof _0x4a70f7===_0x2ea1bb(0xad)?JSON[_0x2ea1bb(0x94)](_0x4a70f7):String(_0x4a70f7);console[_0x2ea1bb(0xbb)]('\x20\x20'+_0x26033f['padEnd'](_0x385c94)+'\x20\x20'+_0x3267ad);}console['log']('');}else console[_0x2ea1bb(0xbb)]('\x20\x20'+_0x7df535);}}function printTable(_0xb5382d,_0x3ac747){const _0x3c1248=a106_0x2997,_0x1c390c=_0xb5382d['data'];if(!_0xb5382d['ok']){console[_0x3c1248(0xac)](_0x3c1248(0xbc)+(_0xb5382d[_0x3c1248(0xab)]??_0x3c1248(0xa9)));return;}if(isListWithMetaData(_0x1c390c)){printAppListMeta(_0x1c390c['meta']),printTableRows(_0x1c390c[_0x3c1248(0xa5)]);return;}const _0x3709f3=Array[_0x3c1248(0xa7)](_0x1c390c)?_0x1c390c:_0x1c390c?[_0x1c390c]:[];printTableRows(_0x3709f3);}function printTableRows(_0x1dcde6){const _0x2adcb8=a106_0x2997;if(_0x1dcde6[_0x2adcb8(0xa0)]===0x0){console[_0x2adcb8(0xbb)]('(empty)');return;}const _0x346c13=Object['keys'](_0x1dcde6[0x0]),_0x5dd7af=_0x346c13[_0x2adcb8(0xa8)](_0x382e80=>Math[_0x2adcb8(0x9a)](_0x382e80['length'],..._0x1dcde6[_0x2adcb8(0xa8)](_0x445540=>String(_0x445540[_0x382e80]??'')[_0x2adcb8(0xa0)]))),_0x4891b8=_0x346c13['map']((_0x4543e6,_0x12bd90)=>_0x4543e6[_0x2adcb8(0xb6)](_0x5dd7af[_0x12bd90]))[_0x2adcb8(0xc2)]('\x20\x20'),_0xe9b006=_0x5dd7af['map'](_0x58296c=>'-'[_0x2adcb8(0xaa)](_0x58296c))[_0x2adcb8(0xc2)]('\x20\x20');console[_0x2adcb8(0xbb)](_0x4891b8),console['log'](_0xe9b006);for(const _0x2406ab of _0x1dcde6){const _0x440a0e=_0x346c13[_0x2adcb8(0xa8)]((_0x299196,_0x1d2c8e)=>String(_0x2406ab[_0x299196]??'')[_0x2adcb8(0xb6)](_0x5dd7af[_0x1d2c8e]))['join']('\x20\x20');console[_0x2adcb8(0xbb)](_0x440a0e);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32d5ec,_0x2ab586){var _0x58db59=a107_0x5860,_0xea9f54=_0x32d5ec();while(!![]){try{var _0x3a93b6=parseInt(_0x58db59(0x90))/0x1*(parseInt(_0x58db59(0x8f))/0x2)+parseInt(_0x58db59(0x91))/0x3*(-parseInt(_0x58db59(0x85))/0x4)+-parseInt(_0x58db59(0x88))/0x5+parseInt(_0x58db59(0x8b))/0x6+parseInt(_0x58db59(0x87))/0x7*(-parseInt(_0x58db59(0x8d))/0x8)+-parseInt(_0x58db59(0x8a))/0x9*(parseInt(_0x58db59(0x8e))/0xa)+-parseInt(_0x58db59(0x93))/0xb*(-parseInt(_0x58db59(0x8c))/0xc);if(_0x3a93b6===_0x2ab586)break;else _0xea9f54['push'](_0xea9f54['shift']());}catch(_0x4c4cbd){_0xea9f54['push'](_0xea9f54['shift']());}}}(a107_0x92ba,0xca79f));export function extractList(_0x1b80e7){var _0x4fb017=a107_0x5860;if(Array[_0x4fb017(0x86)](_0x1b80e7))return _0x1b80e7;if(_0x1b80e7&&typeof _0x1b80e7===_0x4fb017(0x84))return _0x1b80e7[_0x4fb017(0x89)]??[];return[];}function a107_0x92ba(){var _0x5a6d37=['tableData','473094QIUOiR','7720482UfJvHu','3840eYvqTS','8XfnhDK','190ROpUNq','54rKHFlz','17077BkvZem','15fWoMrK','paging','95172DLGEIu','object','761268YEnhUX','isArray','3152590BaYqYk','6432070HWjBgI'];a107_0x92ba=function(){return _0x5a6d37;};return a107_0x92ba();}function a107_0x5860(_0x5ab521,_0x58d5b5){_0x5ab521=_0x5ab521-0x84;var _0x92ba69=a107_0x92ba();var _0x586031=_0x92ba69[_0x5ab521];return _0x586031;}export function extractPaging(_0x4ce030){var _0x898ab0=a107_0x5860;if(_0x4ce030&&typeof _0x4ce030===_0x898ab0(0x84)&&!Array[_0x898ab0(0x86)](_0x4ce030))return _0x4ce030[_0x898ab0(0x92)];return undefined;}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x459251,_0x4800ce){const _0xce67c4=a108_0x3849,_0xe2a9d3=_0x459251();while(!![]){try{const _0x31a94f=-parseInt(_0xce67c4(0x224))/0x1*(parseInt(_0xce67c4(0x220))/0x2)+-parseInt(_0xce67c4(0x20c))/0x3+-parseInt(_0xce67c4(0x213))/0x4+-parseInt(_0xce67c4(0x225))/0x5*(-parseInt(_0xce67c4(0x21c))/0x6)+parseInt(_0xce67c4(0x210))/0x7+-parseInt(_0xce67c4(0x1fe))/0x8+-parseInt(_0xce67c4(0x233))/0x9*(-parseInt(_0xce67c4(0x1f8))/0xa);if(_0x31a94f===_0x4800ce)break;else _0xe2a9d3['push'](_0xe2a9d3['shift']());}catch(_0x93515b){_0xe2a9d3['push'](_0xe2a9d3['shift']());}}}(a108_0x2427,0xcd953));import{riskLevelOrder,isValidFormat}from'./types.js';import{parseFlags,validateFlags}from'./flags.js';import{formatOutput}from'./output.js';function a108_0x2427(){const _0x460677=['7146QpJwUF','some','verbose','../core/api-client.js','code','\x22.\x20visit\x20https://qizhiyuntu.feishu.cn/docx/JTiOdxQlXo2dQLxXVu6ctutcnme\x20for\x20more\x20information.','command','.\x20Run\x20`','./src/api','\x20\x20Edit\x20the\x20config\x20file\x20manually\x20and\x20set\x20riskLevel\x20to\x20\x22','`\x20requires\x20either\x20--code\x20or\x20--alias.','cookie','args','apiDomain','resolveApiDomain','yes','46370zBhJSg','cancelled','map','Available\x20aliases:\x20','pretty','No\x20api.ts\x20found\x20in\x20','7594480WVdmOR','toLowerCase','Operation\x20cancelled\x20by\x20user.','createInterface','string','type','\x0a\x20\x20\x20Continue?\x20[y/N]\x20','flags','apiDir','json','isNonInteractive','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','trim','dryRun','55734wLItdY','resolveCookie','validation','stdin','6000155CTLgMQ','\x22.\x0a','service','5349924ILleog','riskLevel','defaultOutputFormat','Set\x20appcode\x20via\x20`','authRequired','configMissing','compress','defaultVerbose','selectedAppName','18uxQsOF','stderr','⚠\x20\x20High-risk\x20operation:\x20','jqFilter','88QQEWMq','alias','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','--jq\x20only\x20applies\x20with\x20--format\x20json\x20or\x20--format\x20compress\x20(current:\x20','38122MSYkhN','476435VzGogB','`\x20has\x20risk\x20level\x20\x22','dry-run','defaultPageSize','risk','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','pagesize','hasFormat','number','format','validate','node:readline','Command\x20`','High-risk\x20operation\x20`'];a108_0x2427=function(){return _0x460677;};return a108_0x2427();}import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export async function runCommand(_0x1e8afa,_0x307384){const _0x416ffb=a108_0x3849,_0x235954=CLI_BIN_NAME+'\x20'+_0x1e8afa[_0x416ffb(0x212)]+'\x20'+_0x1e8afa['command'],_0x26e712=parseFlags(_0x1e8afa[_0x416ffb(0x205)],_0x307384['rawFlags']);validateFlags(_0x1e8afa[_0x416ffb(0x205)],_0x26e712,_0x235954);if(!_0x26e712['dry-run']&&_0x307384[_0x416ffb(0x214)]&&riskLevelOrder(_0x1e8afa[_0x416ffb(0x229)])>riskLevelOrder(_0x307384[_0x416ffb(0x214)])){if(_0x307384[_0x416ffb(0x208)])throw CliErrors[_0x416ffb(0x20e)](_0x416ffb(0x231)+_0x235954+_0x416ffb(0x226)+_0x1e8afa[_0x416ffb(0x229)]+'\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22'+_0x307384[_0x416ffb(0x214)]+'\x22.');throw CliErrors['validation'](_0x416ffb(0x231)+_0x235954+_0x416ffb(0x226)+_0x1e8afa['risk']+_0x416ffb(0x22a)+_0x307384['riskLevel']+_0x416ffb(0x211)+(_0x416ffb(0x23c)+_0x1e8afa['risk']+_0x416ffb(0x238)));}const _0x3f9a93=_0x307384[_0x416ffb(0x206)]||_0x416ffb(0x23b);resolveAliasToCode(_0x1e8afa,_0x26e712,_0x3f9a93,_0x235954);let _0x4b9705='';if(_0x1e8afa['requiresAuth']!==![]){_0x4b9705=_0x307384[_0x416ffb(0x20d)]();if(!_0x4b9705)throw CliErrors[_0x416ffb(0x217)]();const {setActiveCookie:_0x5553fd}=await import(_0x416ffb(0x236));_0x5553fd(_0x4b9705);}let _0x3df702='';if(_0x1e8afa['requiresAppCode']!==![]){_0x3df702=_0x307384['resolveAppCode']()??'';if(!_0x3df702)throw CliErrors[_0x416ffb(0x218)](_0x416ffb(0x216)+CLI_BIN_NAME+_0x416ffb(0x209));}const _0x5f31f3=resolveFormat(_0x26e712,_0x1e8afa,_0x307384['defaultFormat']),_0x4c590a=resolveJqFilter(_0x26e712);if(_0x4c590a&&_0x5f31f3!==_0x416ffb(0x207)&&_0x5f31f3!==_0x416ffb(0x219))throw CliErrors[_0x416ffb(0x20e)](_0x416ffb(0x223)+_0x5f31f3+').');const _0x43f3c8=buildRuntimeContext({'appCode':_0x3df702,'cookie':_0x4b9705,'apiDomain':_0x307384[_0x416ffb(0x1f6)](),'format':_0x5f31f3,'jqFilter':_0x4c590a,'flags':_0x26e712,'def':_0x1e8afa,'nonInteractive':_0x307384['isNonInteractive'],'defaultPageSize':_0x307384[_0x416ffb(0x228)],'defaultVerbose':_0x307384[_0x416ffb(0x21a)],'apiDir':_0x3f9a93,'selectedAppName':_0x307384[_0x416ffb(0x21b)],'args':_0x307384[_0x416ffb(0x1f4)]??[]});_0x1e8afa[_0x416ffb(0x22f)]&&await _0x1e8afa['validate'](_0x43f3c8);if(_0x26e712[_0x416ffb(0x227)]){if(!_0x1e8afa['dryRun'])throw CliErrors['validation']('--dry-run\x20is\x20not\x20supported\x20for\x20`'+_0x235954+'`.');const _0x242aae=await _0x1e8afa[_0x416ffb(0x20b)](_0x43f3c8);formatOutput({'ok':!![],'data':_0x242aae},{'command':_0x235954,'risk':_0x1e8afa[_0x416ffb(0x229)],'format':_0x5f31f3,'dryRun':!![],'jqFilter':_0x4c590a});return;}if(_0x1e8afa['risk']==='high-risk-write'&&!_0x26e712['yes']){if(_0x307384[_0x416ffb(0x208)])throw CliErrors['validation'](_0x416ffb(0x232)+_0x235954+_0x416ffb(0x222));await requireConfirmation(_0x235954);}const _0x1ecb81=await _0x1e8afa['execute'](_0x43f3c8);formatOutput(_0x1ecb81,{'command':_0x235954,'risk':_0x1e8afa[_0x416ffb(0x229)],'format':_0x5f31f3,'jqFilter':_0x4c590a});}function buildRuntimeContext(_0x11742d){const _0x21e1ab=a108_0x3849,{flags:_0x51a24b,def:_0x25fef8}=_0x11742d,_0x2e4ef3=CLI_BIN_NAME+'\x20'+_0x25fef8[_0x21e1ab(0x212)]+'\x20'+_0x25fef8[_0x21e1ab(0x239)];return{'appCode':_0x11742d['appCode'],'cookie':_0x11742d[_0x21e1ab(0x1f3)],'apiDomain':_0x11742d[_0x21e1ab(0x1f5)],'format':_0x11742d['format'],'nonInteractive':_0x11742d['nonInteractive'],'apiDir':_0x11742d['apiDir'],'selectedAppName':_0x11742d['selectedAppName'],'args':_0x11742d['args'],'str'(_0x2f10b9){return String(_0x51a24b[_0x2f10b9]??'');},'bool'(_0x312634){const _0x34fa24=_0x21e1ab;if(_0x51a24b[_0x312634]===!![])return!![];if(_0x312634===_0x34fa24(0x235)&&_0x11742d[_0x34fa24(0x21a)])return!![];return![];},'num'(_0xfc718,_0x439345){const _0x5aea44=_0x21e1ab,_0x11adb1=_0x51a24b[_0xfc718];if(typeof _0x11adb1===_0x5aea44(0x22d))return _0x11adb1;if(_0xfc718===_0x5aea44(0x22b)&&_0x11742d[_0x5aea44(0x228)]!=null)return _0x11742d[_0x5aea44(0x228)];return _0x439345??0x0;},'flag'(_0x2ea93a){return _0x51a24b[_0x2ea93a];},'output'(_0x4b62d9){const _0x385b3a=_0x21e1ab;formatOutput(_0x4b62d9,{'command':_0x2e4ef3,'risk':_0x25fef8[_0x385b3a(0x229)],'format':_0x11742d['format'],'jqFilter':_0x11742d[_0x385b3a(0x21f)]});}};}function resolveJqFilter(_0x19eedd){const _0x125efc=a108_0x3849,_0x519066=_0x19eedd['jq'];if(_0x519066===undefined||_0x519066===null)return undefined;const _0x352901=String(_0x519066)[_0x125efc(0x20a)]();return _0x352901===''?undefined:_0x352901;}function a108_0x3849(_0x2e3650,_0x466537){_0x2e3650=_0x2e3650-0x1f2;const _0x2427be=a108_0x2427();let _0x3849ca=_0x2427be[_0x2e3650];return _0x3849ca;}function resolveFormat(_0x249f55,_0x2e8f3c,_0x381800){const _0x480836=a108_0x3849;if(_0x2e8f3c[_0x480836(0x22c)]===![])return _0x480836(0x1fc);const _0x1c2240=_0x249f55[_0x480836(0x22e)];if(isValidFormat(_0x1c2240))return _0x1c2240;if(_0x381800&&isValidFormat(_0x381800))return _0x381800;if(_0x2e8f3c[_0x480836(0x215)]&&isValidFormat(_0x2e8f3c[_0x480836(0x215)]))return _0x2e8f3c[_0x480836(0x215)];return _0x480836(0x1fc);}async function requireConfirmation(_0x291e81){const _0x53ff19=a108_0x3849,_0x4c246c=await import(_0x53ff19(0x230)),_0x3d4196=_0x4c246c[_0x53ff19(0x201)]({'input':process[_0x53ff19(0x20f)],'output':process[_0x53ff19(0x21d)]});return new Promise((_0x44e6d4,_0x34de46)=>{const _0x2475ef=_0x53ff19;_0x3d4196['question'](_0x2475ef(0x21e)+_0x291e81+_0x2475ef(0x204),_0x2e7d71=>{const _0x4e8ea5=_0x2475ef;_0x3d4196['close'](),_0x2e7d71[_0x4e8ea5(0x1ff)]()==='y'||_0x2e7d71[_0x4e8ea5(0x1ff)]()===_0x4e8ea5(0x1f7)?_0x44e6d4():_0x34de46(CliErrors[_0x4e8ea5(0x1f9)](_0x4e8ea5(0x200)));});});}function resolveAliasToCode(_0x29a81f,_0x5022fe,_0x9086e4,_0x50a6e4){const _0x3ccd9d=a108_0x3849,_0x562908=_0x29a81f[_0x3ccd9d(0x205)][_0x3ccd9d(0x234)](_0x4d3dfa=>_0x4d3dfa['name']===_0x3ccd9d(0x237)&&_0x4d3dfa['type']==='string'),_0x380516=_0x29a81f[_0x3ccd9d(0x205)][_0x3ccd9d(0x234)](_0x37da25=>_0x37da25['name']===_0x3ccd9d(0x221)&&_0x37da25[_0x3ccd9d(0x203)]===_0x3ccd9d(0x202));if(!_0x562908||!_0x380516)return;const _0x12153e=_0x5022fe[_0x3ccd9d(0x237)]?String(_0x5022fe[_0x3ccd9d(0x237)]):'',_0x587ac0=_0x5022fe['alias']?String(_0x5022fe[_0x3ccd9d(0x221)]):'';if(!_0x12153e&&!_0x587ac0)throw CliErrors[_0x3ccd9d(0x20e)]('`'+_0x50a6e4+_0x3ccd9d(0x1f2));if(_0x587ac0&&!_0x12153e){const _0x4313f5=resolveAlias(_0x9086e4,_0x587ac0);if(!_0x4313f5){const _0x52daad=listAliases(_0x9086e4)[_0x3ccd9d(0x1fa)](_0x33f168=>_0x33f168[_0x3ccd9d(0x221)]),_0x4a99df=_0x52daad['length']?_0x3ccd9d(0x1fb)+_0x52daad['join'](',\x20'):_0x3ccd9d(0x1fd)+_0x9086e4+_0x3ccd9d(0x23a)+CLI_BIN_NAME+'\x20api\x20pull`\x20first.';throw CliErrors[_0x3ccd9d(0x20e)]('Unknown\x20alias\x20\x22'+_0x587ac0+'\x22.\x20'+_0x4a99df);}_0x5022fe[_0x3ccd9d(0x237)]=_0x4313f5;}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1171b5,_0x18693e){const _0x3a4ffb=a109_0x51c2,_0x385442=_0x1171b5();while(!![]){try{const _0x1f573f=-parseInt(_0x3a4ffb(0x171))/0x1*(-parseInt(_0x3a4ffb(0x16e))/0x2)+parseInt(_0x3a4ffb(0x15e))/0x3+parseInt(_0x3a4ffb(0x164))/0x4+parseInt(_0x3a4ffb(0x16d))/0x5+parseInt(_0x3a4ffb(0x155))/0x6+-parseInt(_0x3a4ffb(0x15b))/0x7*(parseInt(_0x3a4ffb(0x175))/0x8)+-parseInt(_0x3a4ffb(0x169))/0x9;if(_0x1f573f===_0x18693e)break;else _0x385442['push'](_0x385442['shift']());}catch(_0x38ed81){_0x385442['push'](_0x385442['shift']());}}}(a109_0x46f3,0x50bc9));import{buildAllFlags}from'./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 a109_0x46f3(){const _0x3dbd23=['1sviWnI','requiresAppCode','wildcardDef','tag','8Lfnabh','description','dryRun','isSingleCommand','args','pattern','defaultCommand','command','requiresAuth','type','1465962GeoLTZ','hasFormat','helpExtra','map','required','<script>','3477299MmzeYt','push','service','998670Brwuze','../commands/registry.js','label','enum','risk','function','2435032qXxGCO','flags','length','regex','hidden','9845082RBPlGJ','alias','hint','commands','538910UejVsW','1255190OZaSHV','default','name'];a109_0x46f3=function(){return _0x3dbd23;};return a109_0x46f3();}function serializeFlag(_0x33d626){const _0x4f6b95=a109_0x51c2,_0x1d3ae3={'name':_0x33d626[_0x4f6b95(0x170)],'type':_0x33d626[_0x4f6b95(0x154)],'description':_0x33d626[_0x4f6b95(0x176)]};if(_0x33d626['required']!==undefined)_0x1d3ae3[_0x4f6b95(0x159)]=_0x33d626[_0x4f6b95(0x159)];if(_0x33d626[_0x4f6b95(0x16f)]!==undefined)_0x1d3ae3[_0x4f6b95(0x16f)]=_0x33d626[_0x4f6b95(0x16f)];if(_0x33d626[_0x4f6b95(0x161)]&&_0x33d626[_0x4f6b95(0x161)][_0x4f6b95(0x166)]>0x0)_0x1d3ae3[_0x4f6b95(0x161)]=_0x33d626['enum'];if(_0x33d626[_0x4f6b95(0x16a)])_0x1d3ae3[_0x4f6b95(0x16a)]=_0x33d626[_0x4f6b95(0x16a)];if(_0x33d626['hidden'])_0x1d3ae3[_0x4f6b95(0x168)]=_0x33d626[_0x4f6b95(0x168)];return _0x33d626[_0x4f6b95(0x17a)]&&(_0x1d3ae3[_0x4f6b95(0x17a)]={'source':_0x33d626[_0x4f6b95(0x17a)][_0x4f6b95(0x167)]['source'],'flags':_0x33d626[_0x4f6b95(0x17a)]['regex'][_0x4f6b95(0x165)],'description':_0x33d626['pattern'][_0x4f6b95(0x176)]}),_0x1d3ae3;}function serializeHelpExtra(_0x3a9e14){const _0x385dab=a109_0x51c2;if(_0x3a9e14[_0x385dab(0x157)]===undefined)return undefined;if(typeof _0x3a9e14[_0x385dab(0x157)]===_0x385dab(0x163))return{'dynamic':!![]};return _0x3a9e14['helpExtra'];}function a109_0x51c2(_0x177c6d,_0x42c97d){_0x177c6d=_0x177c6d-0x154;const _0x46f33b=a109_0x46f3();let _0x51c283=_0x46f33b[_0x177c6d];return _0x51c283;}function serializeCommand(_0x2922bd,_0x447b3a){const _0x3db46e=a109_0x51c2,_0x5ca88c=_0x2922bd[_0x3db46e(0x17d)]!==![],_0x83e26a=_0x2922bd[_0x3db46e(0x172)]!==![],_0x541f65=_0x2922bd[_0x3db46e(0x156)]!==![],_0x3a7dbb=serializeHelpExtra(_0x2922bd);return{'command':_0x447b3a[_0x3db46e(0x17c)],'description':_0x447b3a['description'],..._0x447b3a['tag']?{'tag':_0x447b3a[_0x3db46e(0x174)]['trim']()}:{},'risk':_0x2922bd[_0x3db46e(0x162)],'requiresAuth':_0x5ca88c,'requiresAppCode':_0x83e26a,'hasFormat':_0x541f65,'supportsDryRun':Boolean(_0x2922bd[_0x3db46e(0x177)]),..._0x2922bd['args']&&_0x2922bd[_0x3db46e(0x179)][_0x3db46e(0x166)]>0x0?{'args':_0x2922bd[_0x3db46e(0x179)]}:{},'flags':buildAllFlags(_0x2922bd)[_0x3db46e(0x158)](serializeFlag),..._0x3a7dbb!==undefined?{'helpExtra':_0x3a7dbb}:{}};}export async function buildSchemaPayload(){const _0x2e40f2=a109_0x51c2,{serviceRegistry:_0x19fcb0,findDefinition:_0x170a6f}=await import(_0x2e40f2(0x15f)),_0x24dcff=[];for(const _0x19a93d of _0x19fcb0){const _0xcd9bb2=[];for(const _0xa6194 of _0x19a93d[_0x2e40f2(0x16c)]){const _0x24972e=_0xa6194[_0x2e40f2(0x17c)]===_0x2e40f2(0x15a)&&_0x19a93d['wildcardDef']?_0x19a93d[_0x2e40f2(0x173)]:_0x170a6f(_0x19a93d[_0x2e40f2(0x15d)],_0xa6194[_0x2e40f2(0x17c)]);if(!_0x24972e)continue;_0xcd9bb2[_0x2e40f2(0x15c)](serializeCommand(_0x24972e,_0xa6194));}_0x24dcff[_0x2e40f2(0x15c)]({'service':_0x19a93d[_0x2e40f2(0x15d)],'label':_0x19a93d[_0x2e40f2(0x160)],..._0x19a93d[_0x2e40f2(0x178)]?{'isSingleCommand':!![]}:{},..._0x19a93d[_0x2e40f2(0x17b)]?{'defaultCommand':_0x19a93d[_0x2e40f2(0x17b)]}:{},'hasWildcard':Boolean(_0x19a93d['wildcardDef']),'commands':_0xcd9bb2});}return{'schemaVersion':0x1,'cli':{'bin':CLI_BIN_NAME,'displayName':CLI_DISPLAY_NAME,'version':VERSION,'gitCommit':GIT_COMMIT},'globalFlags':GLOBAL_FLAGS[_0x2e40f2(0x158)](_0x242ce3=>({'name':_0x242ce3['name'],'type':_0x242ce3[_0x2e40f2(0x154)],'description':_0x242ce3['description'],..._0x242ce3['hint']?{'hint':_0x242ce3[_0x2e40f2(0x16b)]}:{},..._0x242ce3[_0x2e40f2(0x168)]?{'hidden':!![]}:{}})),'services':_0x24dcff};}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a110_0x42e9(_0x1e9682,_0x5d3254){_0x1e9682=_0x1e9682-0x8f;const _0x4d6fba=a110_0x4d6f();let _0x42e9ac=_0x4d6fba[_0x1e9682];return _0x42e9ac;}(function(_0x4dae4a,_0x549f11){const _0x5d9b80=a110_0x42e9,_0xc839f3=_0x4dae4a();while(!![]){try{const _0x4ef0a3=parseInt(_0x5d9b80(0x97))/0x1+parseInt(_0x5d9b80(0x94))/0x2*(-parseInt(_0x5d9b80(0x91))/0x3)+parseInt(_0x5d9b80(0x9d))/0x4*(parseInt(_0x5d9b80(0x99))/0x5)+-parseInt(_0x5d9b80(0x98))/0x6*(parseInt(_0x5d9b80(0x8f))/0x7)+-parseInt(_0x5d9b80(0x9b))/0x8*(-parseInt(_0x5d9b80(0x9c))/0x9)+-parseInt(_0x5d9b80(0x96))/0xa*(-parseInt(_0x5d9b80(0x90))/0xb)+-parseInt(_0x5d9b80(0x9e))/0xc;if(_0x4ef0a3===_0x549f11)break;else _0xc839f3['push'](_0xc839f3['shift']());}catch(_0x9b3ba8){_0xc839f3['push'](_0xc839f3['shift']());}}}(a110_0x4d6f,0x7b590));export function riskLevelOrder(_0x5bd5ce){const _0x5f2e7a=a110_0x42e9,_0x57b605={'read':0x0,'write':0x1,'high-risk-write':0x2};return _0x57b605[_0x5bd5ce??_0x5f2e7a(0x9a)]??0x0;}function a110_0x4d6f(){const _0x5d70a4=['90392MjdfLN','477bgkyUY','4xmUNch','6165528RlbTul','table','1158073uETiWU','948519wEsgKU','687JgojpU','compress','json','4538OQCdub','pretty','20iuugtn','841188ppSLhf','6ULgiiG','457865cMtPvd','read'];a110_0x4d6f=function(){return _0x5d70a4;};return a110_0x4d6f();}export function isValidFormat(_0xbe8e58){const _0x493c1a=a110_0x42e9;return _0xbe8e58===_0x493c1a(0x93)||_0xbe8e58===_0x493c1a(0x95)||_0xbe8e58===_0x493c1a(0x9f)||_0xbe8e58===_0x493c1a(0x92);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a111_0x575d7f=a111_0x5076;(function(_0x488a1e,_0x50d09b){const _0x39b6dc=a111_0x5076,_0xab840c=_0x488a1e();while(!![]){try{const _0x1c0d6e=-parseInt(_0x39b6dc(0x140))/0x1+-parseInt(_0x39b6dc(0x13a))/0x2*(-parseInt(_0x39b6dc(0x136))/0x3)+parseInt(_0x39b6dc(0x133))/0x4*(parseInt(_0x39b6dc(0x132))/0x5)+-parseInt(_0x39b6dc(0x139))/0x6*(parseInt(_0x39b6dc(0x13b))/0x7)+parseInt(_0x39b6dc(0x138))/0x8*(-parseInt(_0x39b6dc(0x135))/0x9)+parseInt(_0x39b6dc(0x13e))/0xa*(-parseInt(_0x39b6dc(0x13f))/0xb)+parseInt(_0x39b6dc(0x134))/0xc;if(_0x1c0d6e===_0x50d09b)break;else _0xab840c['push'](_0xab840c['shift']());}catch(_0x2c3335){_0xab840c['push'](_0xab840c['shift']());}}}(a111_0x4ec4,0x42af0));export const VERSION='2.0.8';function a111_0x5076(_0x47fafd,_0x32d5e0){_0x47fafd=_0x47fafd-0x132;const _0x4ec4d4=a111_0x4ec4();let _0x507699=_0x4ec4d4[_0x47fafd];return _0x507699;}export const GIT_TAG=a111_0x575d7f(0x13c);export const GIT_COMMIT=a111_0x575d7f(0x13d);export const BUILD_TIME=a111_0x575d7f(0x137);function a111_0x4ec4(){const _0x534872=['2930VjcEbB','2136QSFACF','1779792lkpKNe','9tTzbkP','357WTKIwM','2026-04-04T10:38:00.545Z','543576UnKDSk','10638SycoPp','2818krezOn','483gqzEfp','v2.0.8','cd0fdf2','10Qelqdv','68981FXDyDD','159220jczGPn'];a111_0x4ec4=function(){return _0x534872;};return a111_0x4ec4();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a112_0x31a3(){var _0x1f4b36=['log','2126404oukexy','3052LjxBxh','15168hfruZv','1008487psOwwW','bold','3VnDzMk','\x20--help','210pqPaMH','1977222QjnFbQ','12PLfOQW','4jOsuvk','30087RrYiFR','green','5857745GlbShK','19241387nYPbOn'];a112_0x31a3=function(){return _0x1f4b36;};return a112_0x31a3();}(function(_0x2c7e05,_0x3728ca){var _0x2f8fe9=a112_0x5cb0,_0x87e916=_0x2c7e05();while(!![]){try{var _0x3bfac5=-parseInt(_0x2f8fe9(0x14a))/0x1+parseInt(_0x2f8fe9(0x157))/0x2*(parseInt(_0x2f8fe9(0x14c))/0x3)+-parseInt(_0x2f8fe9(0x151))/0x4*(-parseInt(_0x2f8fe9(0x154))/0x5)+parseInt(_0x2f8fe9(0x14f))/0x6+parseInt(_0x2f8fe9(0x148))/0x7*(parseInt(_0x2f8fe9(0x149))/0x8)+-parseInt(_0x2f8fe9(0x152))/0x9*(-parseInt(_0x2f8fe9(0x14e))/0xa)+parseInt(_0x2f8fe9(0x155))/0xb*(-parseInt(_0x2f8fe9(0x150))/0xc);if(_0x3bfac5===_0x3728ca)break;else _0x87e916['push'](_0x87e916['shift']());}catch(_0xa0c208){_0x87e916['push'](_0x87e916['shift']());}}}(a112_0x31a3,0xabbd3));function a112_0x5cb0(_0x59bd48,_0x52063d){_0x59bd48=_0x59bd48-0x148;var _0x31a31b=a112_0x31a3();var _0x5cb053=_0x31a31b[_0x59bd48];return _0x5cb053;}import a112_0x35ee11 from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function showHelp(){var _0x28b8e7=a112_0x5cb0;console[_0x28b8e7(0x156)](),console[_0x28b8e7(0x156)](a112_0x35ee11[_0x28b8e7(0x153)][_0x28b8e7(0x14b)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x28b8e7(0x156)](),console[_0x28b8e7(0x156)]('\x20\x20Use\x20'+a112_0x35ee11[_0x28b8e7(0x153)][_0x28b8e7(0x14b)](CLI_BIN_NAME+_0x28b8e7(0x14d))+'\x20to\x20view\x20available\x20commands.'),console['log']();}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x96fce9,_0x33037f){const _0x28996c=a113_0x47dd,_0x9de783=_0x96fce9();while(!![]){try{const _0x258723=-parseInt(_0x28996c(0x141))/0x1*(parseInt(_0x28996c(0x14e))/0x2)+parseInt(_0x28996c(0x15a))/0x3*(-parseInt(_0x28996c(0x15e))/0x4)+parseInt(_0x28996c(0x15d))/0x5+parseInt(_0x28996c(0x161))/0x6+parseInt(_0x28996c(0x14a))/0x7*(parseInt(_0x28996c(0x153))/0x8)+-parseInt(_0x28996c(0x15b))/0x9+parseInt(_0x28996c(0x146))/0xa;if(_0x258723===_0x33037f)break;else _0x9de783['push'](_0x9de783['shift']());}catch(_0x4467fc){_0x9de783['push'](_0x9de783['shift']());}}}(a113_0x4c21,0x947ff));function a113_0x4c21(){const _0x1d32df=['5045350ocSMtT','737540gIIZYa','push','length','3505890rqLaeQ','-$1','enable-bff-save','skill','has','530hwnKyg','\x20skill\x20--help\x0a\x20\x20','startsWith','\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','--help','7329220vzMADV','entries','help','log','14GDGkcN','error','includes','Error:\x20Unsupported\x20command:\x20','2666YGTHSy','slice','(empty)','Equivalent\x20command:\x20','\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','2619920jTcuqe','from','add','\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a','replace','dangerously-bff-save','argv','18ykQRsM','5042088yDrfaU','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20'];a113_0x4c21=function(){return _0x1d32df;};return a113_0x4c21();}import{logger}from'../utils/logger.js';function a113_0x47dd(_0x1d4b9a,_0x1a5bfd){_0x1d4b9a=_0x1d4b9a-0x13d;const _0x4c21e8=a113_0x4c21();let _0x47ddd0=_0x4c21e8[_0x1d4b9a];return _0x47ddd0;}import{CLI_BIN_NAME}from'../constant/cli.js';export function camelCaseFlagsToKebab(_0x387de2){const _0x3ec2eb=a113_0x47dd,_0x44524d=[];for(const [_0x1ca53f,_0x21952c]of Object[_0x3ec2eb(0x147)](_0x387de2)){if(_0x21952c===!![]){const _0x3e2580=_0x1ca53f[_0x3ec2eb(0x157)](/([A-Z])/g,_0x3ec2eb(0x13d))['toLowerCase']();_0x44524d['push'](_0x3e2580);}}return _0x44524d;}export function parseDynamicFlags(){const _0x3d6a61=a113_0x47dd,_0xe5e282=[];for(let _0x29ee04=0x3;_0x29ee04<process[_0x3d6a61(0x159)][_0x3d6a61(0x160)];_0x29ee04++){const _0x5250b4=process['argv'][_0x29ee04];if(_0x5250b4&&_0x5250b4[_0x3d6a61(0x143)]('--')){const _0x42a08d=_0x5250b4[_0x3d6a61(0x14f)](0x2);_0x42a08d&&!_0x42a08d[_0x3d6a61(0x14c)]('=')&&_0xe5e282[_0x3d6a61(0x15f)](_0x42a08d);}}return _0xe5e282;}export function getAllProvidedFlags(_0x572e20){const _0x35dcc9=a113_0x47dd,_0x50b132=camelCaseFlagsToKebab(_0x572e20),_0x158c41=parseDynamicFlags(),_0x55c4a0=new Set([..._0x50b132,..._0x158c41]);return Array[_0x35dcc9(0x154)](_0x55c4a0);}export function normalizeLegacyBffSaveFlags(_0x50c09f){const _0x25bc4d=a113_0x47dd,_0xbaed66=new Set(_0x50c09f);return _0xbaed66[_0x25bc4d(0x140)](_0x25bc4d(0x158))&&_0xbaed66[_0x25bc4d(0x155)](_0x25bc4d(0x13e)),Array['from'](_0xbaed66);}const SKILLS_INSTALL_COMMAND_LINE='npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global';export async function skillsCommand(_0x17958b,_0x32e6f2,_0x2db948){const _0x5e9de1=a113_0x47dd;logger['setLogPath'](process['cwd']());if(_0x2db948?.[_0x5e9de1(0x148)]||_0x17958b===_0x5e9de1(0x145)){showHelp();return;}console[_0x5e9de1(0x14b)](_0x5e9de1(0x14d)+(_0x17958b||_0x5e9de1(0x150))),console[_0x5e9de1(0x149)]('\x0aAvailable\x20commands:'),console['log']('\x20\x20'+CLI_BIN_NAME+_0x5e9de1(0x144)),console['log']('\x20\x20'+CLI_BIN_NAME+'\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a'),console[_0x5e9de1(0x149)](''),console[_0x5e9de1(0x149)](_0x5e9de1(0x151)+SKILLS_INSTALL_COMMAND_LINE),logger['error'](_0x5e9de1(0x13f),'不支持的命令:\x20'+_0x17958b),process['exit'](0x1);}function showHelp(){const _0x3a037b=a113_0x47dd;console[_0x3a037b(0x149)](_0x3a037b(0x15c)+CLI_BIN_NAME+_0x3a037b(0x142)+CLI_BIN_NAME+_0x3a037b(0x152)+SKILLS_INSTALL_COMMAND_LINE+_0x3a037b(0x156));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x32f90e=a114_0x148c;(function(_0x56156c,_0x4ee777){const _0x3ad417=a114_0x148c,_0x5135a8=_0x56156c();while(!![]){try{const _0x5af049=-parseInt(_0x3ad417(0x1d9))/0x1*(-parseInt(_0x3ad417(0x1d5))/0x2)+parseInt(_0x3ad417(0x1ed))/0x3*(parseInt(_0x3ad417(0x1e8))/0x4)+-parseInt(_0x3ad417(0x1ea))/0x5*(-parseInt(_0x3ad417(0x1eb))/0x6)+-parseInt(_0x3ad417(0x1e1))/0x7*(-parseInt(_0x3ad417(0x1ee))/0x8)+-parseInt(_0x3ad417(0x1e5))/0x9*(-parseInt(_0x3ad417(0x1e0))/0xa)+-parseInt(_0x3ad417(0x1da))/0xb+-parseInt(_0x3ad417(0x1e7))/0xc;if(_0x5af049===_0x4ee777)break;else _0x5135a8['push'](_0x5135a8['shift']());}catch(_0x1edbda){_0x5135a8['push'](_0x5135a8['shift']());}}}(a114_0x27bf,0xcfd4a));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 a114_0x27bf(){const _0x159867=['282HizOuv','1072GYOJqI','inherit','unknown','lovrabet/lovrabet-skill','join','log','2hAuJnA','stdout','trim','pipe','135249HZRNcN','14555376POZZOg','status','stderr','exit\x20','skill','toString','120BKFWfs','8652sxiBQj','stdio','add','Lovrabet','1183752DTcNkA','--skill','14108088wxLyLH','32764wqAsGK','remove','1168335wrKiRo','18CDbYNZ','npx'];a114_0x27bf=function(){return _0x159867;};return a114_0x27bf();}export const NPX_SKILLS_SUBCOMMAND_ADD=a114_0x32f90e(0x1e3);export const NPX_SKILLS_FLAG_SKILL=a114_0x32f90e(0x1e6);export const RABETBASE_SKILL_SOURCE=a114_0x32f90e(0x1f1);export const DEFAULT_RABETBASE_SKILL_NAME=a114_0x32f90e(0x1e4);export function buildNpxSkillsAddArgv(_0xb66a90=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0xb66a90];}function a114_0x148c(_0x3c2be3,_0x4178ce){_0x3c2be3=_0x3c2be3-0x1d3;const _0x27bf23=a114_0x27bf();let _0x148c84=_0x27bf23[_0x3c2be3];return _0x148c84;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a114_0x32f90e(0x1ec),...buildNpxSkillsAddArgv()][a114_0x32f90e(0x1d3)]('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x260f34,_0x156d6e){const _0x4fa637=a114_0x32f90e;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x330fae=_0x156d6e?.[_0x4fa637(0x1e2)]??_0x4fa637(0x1ef),_0x27af24=resolveNpmBin(_0x4fa637(0x1ec)),_0x35e674=buildNpxSkillsAddArgv(_0x156d6e?.[_0x4fa637(0x1de)]??DEFAULT_RABETBASE_SKILL_NAME),_0x3a3172=[_0x27af24,..._0x35e674]['join']('\x20');console[_0x4fa637(0x1d4)]('*\x20'+_0x3a3172);const _0x97b70=spawnSync(_0x27af24,_0x35e674,{'cwd':_0x260f34,'stdio':_0x330fae,'env':process.env,'shell':![]}),_0x42f3ec=_0x97b70[_0x4fa637(0x1db)];if(_0x42f3ec===0x0)return{'ok':!![],'status':0x0};let _0x5cea15=_0x4fa637(0x1dd)+(_0x42f3ec??_0x4fa637(0x1f0));if(_0x330fae===_0x4fa637(0x1d8)){const _0x7b896b=_0x97b70[_0x4fa637(0x1dc)]?_0x97b70[_0x4fa637(0x1dc)][_0x4fa637(0x1df)]()[_0x4fa637(0x1d7)]():'',_0x2a47ab=_0x97b70[_0x4fa637(0x1d6)]?_0x97b70[_0x4fa637(0x1d6)][_0x4fa637(0x1df)]()[_0x4fa637(0x1d7)]():'';if(_0x7b896b)_0x5cea15=_0x7b896b;else{if(_0x2a47ab)_0x5cea15=_0x2a47ab;}}return{'ok':![],'status':_0x42f3ec??null,'error':_0x5cea15};}export function runNpxSkillsRemove(_0x243fd2,_0x1307a6){const _0x5a71b2=a114_0x32f90e,_0xd10e6=_0x1307a6?.[_0x5a71b2(0x1e2)]??_0x5a71b2(0x1ef),_0x98c65e=resolveNpmBin(_0x5a71b2(0x1ec)),_0x412c0c=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x5a71b2(0x1e9),RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x1307a6?.[_0x5a71b2(0x1de)]??DEFAULT_RABETBASE_SKILL_NAME],_0x45c68b=[_0x98c65e,..._0x412c0c][_0x5a71b2(0x1d3)]('\x20');console[_0x5a71b2(0x1d4)]('*\x20'+_0x45c68b);const _0x389c80=spawnSync(_0x98c65e,_0x412c0c,{'cwd':_0x243fd2,'stdio':_0xd10e6,'env':process.env,'shell':![]}),_0x1ec7a6=_0x389c80[_0x5a71b2(0x1db)];if(_0x1ec7a6===0x0)return{'ok':!![],'status':0x0};let _0x2c9b7c=_0x5a71b2(0x1dd)+(_0x1ec7a6??_0x5a71b2(0x1f0));if(_0xd10e6==='pipe'){const _0x29fea0=_0x389c80[_0x5a71b2(0x1dc)]?_0x389c80[_0x5a71b2(0x1dc)][_0x5a71b2(0x1df)]()[_0x5a71b2(0x1d7)]():'',_0x387850=_0x389c80[_0x5a71b2(0x1d6)]?_0x389c80[_0x5a71b2(0x1d6)][_0x5a71b2(0x1df)]()[_0x5a71b2(0x1d7)]():'';if(_0x29fea0)_0x2c9b7c=_0x29fea0;else{if(_0x387850)_0x2c9b7c=_0x387850;}}return{'ok':![],'status':_0x1ec7a6??null,'error':_0x2c9b7c};}export function runNpxSkillsAddGlobal(_0xabbc7a,_0x780f31,_0x278e07){const _0x455329=a114_0x32f90e,_0x2f2b76=_0x278e07?.['stdio']??_0x455329(0x1ef),_0x2c2165=resolveNpmBin(_0x455329(0x1ec)),_0x1c84eb=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x780f31,'--global'],_0x98807c=[_0x2c2165,..._0x1c84eb][_0x455329(0x1d3)]('\x20');console['log']('*\x20'+_0x98807c);const _0x5412f4=spawnSync(_0x2c2165,_0x1c84eb,{'cwd':_0xabbc7a,'stdio':_0x2f2b76,'env':process.env,'shell':![]}),_0x2b0936=_0x5412f4[_0x455329(0x1db)];if(_0x2b0936===0x0)return{'ok':!![],'status':0x0};let _0x5ac17d=_0x455329(0x1dd)+(_0x2b0936??_0x455329(0x1f0));if(_0x2f2b76===_0x455329(0x1d8)){const _0x43f330=_0x5412f4[_0x455329(0x1dc)]?_0x5412f4[_0x455329(0x1dc)][_0x455329(0x1df)]()[_0x455329(0x1d7)]():'',_0x3c7b56=_0x5412f4[_0x455329(0x1d6)]?_0x5412f4[_0x455329(0x1d6)][_0x455329(0x1df)]()['trim']():'';if(_0x43f330)_0x5ac17d=_0x43f330;else{if(_0x3c7b56)_0x5ac17d=_0x3c7b56;}}return{'ok':![],'status':_0x2b0936??null,'error':_0x5ac17d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x598ca0,_0x597eb0){const _0x2693b8=a115_0x4a84,_0x523974=_0x598ca0();while(!![]){try{const _0xca6cb3=-parseInt(_0x2693b8(0x10b))/0x1*(parseInt(_0x2693b8(0x110))/0x2)+parseInt(_0x2693b8(0x103))/0x3*(parseInt(_0x2693b8(0x101))/0x4)+parseInt(_0x2693b8(0x104))/0x5*(-parseInt(_0x2693b8(0x107))/0x6)+parseInt(_0x2693b8(0x105))/0x7+-parseInt(_0x2693b8(0x111))/0x8*(parseInt(_0x2693b8(0x10f))/0x9)+parseInt(_0x2693b8(0x10a))/0xa+parseInt(_0x2693b8(0x10e))/0xb;if(_0xca6cb3===_0x597eb0)break;else _0x523974['push'](_0x523974['shift']());}catch(_0x3b8d1b){_0x523974['push'](_0x523974['shift']());}}}(a115_0x4783,0xaae28));import{sendCliTraceLog}from'./send-cli-trace-log.js';function a115_0x4a84(_0x446468,_0x1f57e1){_0x446468=_0x446468-0x101;const _0x47835a=a115_0x4783();let _0x4a843c=_0x47835a[_0x446468];return _0x4a843c;}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 a115_0x4783(){const _0xac9a2f=['flags','entries','11007062AoSzSi','309249FhNegW','8qCkxok','104SipLFQ','some','error','stringify','28LfNvQq','command','23394DrItiU','3236935IehPjp','5836033SVHVll','service','6raKRBU','durationMs','[REDACTED]','11852890fOiusK','320053uVPeXN'];a115_0x4783=function(){return _0xac9a2f;};return a115_0x4783();}function isSensitiveKey(_0x2fde02){const _0xec948a=a115_0x4a84;return SENSITIVE_PATTERNS[_0xec948a(0x112)](_0xfac795=>_0xfac795['test'](_0x2fde02));}function sanitizeFlags(_0x22532f){const _0x2fbc54=a115_0x4a84,_0x250d4f={};for(const [_0x18420c,_0x151fc1]of Object[_0x2fbc54(0x10d)](_0x22532f)){isSensitiveKey(_0x18420c)?_0x250d4f[_0x18420c]=_0x151fc1!=null&&_0x151fc1!==''?_0x2fbc54(0x109):_0x151fc1:_0x250d4f[_0x18420c]=_0x151fc1;}return _0x250d4f;}export async function reportCommandTrace(_0x58b893){const _0x410792=a115_0x4a84;try{const _0x4e5170=sanitizeFlags(_0x58b893[_0x410792(0x10c)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x58b893[_0x410792(0x106)],'command.name':_0x58b893[_0x410792(0x102)],'command.flags':JSON[_0x410792(0x114)](_0x4e5170),..._0x58b893[_0x410792(0x108)]!=null?{'command.duration_ms':_0x58b893[_0x410792(0x108)]}:{},..._0x58b893['error']?{'command.error':_0x58b893[_0x410792(0x113)]instanceof Error?_0x58b893[_0x410792(0x113)]['message']:String(_0x58b893['error'])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d9a37,_0x22cb4b){var _0x4ba7ed=a116_0x24b3,_0x399a77=_0x4d9a37();while(!![]){try{var _0x1bae46=-parseInt(_0x4ba7ed(0x1ce))/0x1*(parseInt(_0x4ba7ed(0x1c9))/0x2)+parseInt(_0x4ba7ed(0x1d6))/0x3+parseInt(_0x4ba7ed(0x1d4))/0x4*(parseInt(_0x4ba7ed(0x1d7))/0x5)+parseInt(_0x4ba7ed(0x1cb))/0x6*(-parseInt(_0x4ba7ed(0x1cc))/0x7)+-parseInt(_0x4ba7ed(0x1d1))/0x8*(parseInt(_0x4ba7ed(0x1d3))/0x9)+parseInt(_0x4ba7ed(0x1cf))/0xa*(-parseInt(_0x4ba7ed(0x1cd))/0xb)+parseInt(_0x4ba7ed(0x1c8))/0xc;if(_0x1bae46===_0x22cb4b)break;else _0x399a77['push'](_0x399a77['shift']());}catch(_0x37a46f){_0x399a77['push'](_0x399a77['shift']());}}}(a116_0xb7a4,0x6624b));import{sendCliTraceLog}from'./send-cli-trace-log.js';function a116_0xb7a4(){var _0x4771bf=['26cpKgYO','Failed\x20to\x20report\x20CLI\x20help\x20trace:','2501286bOcsuT','14BUVSuC','177001AQJSkM','1583XMtmpO','160FfkEXM','cli.help','3508408ztBWcX','error','9nhTRPf','454228sliXvO','service','1111548cfucAM','5kcHmcx','17815848GWOSLE'];a116_0xb7a4=function(){return _0x4771bf;};return a116_0xb7a4();}function a116_0x24b3(_0x2cd40d,_0xb17ec){_0x2cd40d=_0x2cd40d-0x1c8;var _0xb7a452=a116_0xb7a4();var _0x24b3cf=_0xb7a452[_0x2cd40d];return _0x24b3cf;}export async function reportCliHelpTrace(_0x32d80c,_0x48712b){var _0x251d61=a116_0x24b3;try{await sendCliTraceLog({'spanName':_0x251d61(0x1d0),'logData':{'rabetbase.help.kind':_0x32d80c,..._0x48712b?.[_0x251d61(0x1d5)]&&{'rabetbase.help.service':_0x48712b[_0x251d61(0x1d5)]}}});}catch(_0x283b8e){console[_0x251d61(0x1d2)](_0x251d61(0x1ca),_0x283b8e);}}
|